arbor-dashboard 1.60.0 → 1.60.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +2 -2
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
animation-iteration-count: infinite;
|
|
73
73
|
animation-delay: 200ms;
|
|
74
74
|
}
|
|
75
|
-
`,Qu=G.forwardRef(function(e,t){const n=Za({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:o={},className:i,...a}=n,[s,l]=G.useState([]),c=G.useRef(0),u=G.useRef(null);G.useEffect(()=>{u.current&&(u.current(),u.current=null)},[s]);const d=G.useRef(!1),f=ol(),p=G.useRef(null),h=G.useRef(null),m=G.useCallback(e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:i,cb:a}=e;l(e=>[...e,(0,le.jsx)(Xu,{classes:{ripple:Un(o.ripple,Hu.ripple),rippleVisible:Un(o.rippleVisible,Hu.rippleVisible),ripplePulsate:Un(o.ripplePulsate,Hu.ripplePulsate),child:Un(o.child,Hu.child),childLeaving:Un(o.childLeaving,Hu.childLeaving),childPulsate:Un(o.childPulsate,Hu.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i},c.current)]),c.current+=1,u.current=a},[o]),g=G.useCallback((e={},t={},n=()=>{})=>{const{pulsate:o=!1,center:i=r||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===e?.type&&d.current)return void(d.current=!1);"touchstart"===e?.type&&(d.current=!0);const s=a?null:h.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,g;if(i||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(i)g=Math.sqrt((2*l.width**2+l.height**2)/3),g%2==0&&(g+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;g=Math.sqrt(e**2+t**2)}e?.touches?null===p.current&&(p.current=()=>{m({pulsate:o,rippleX:c,rippleY:u,rippleSize:g,cb:n})},f.start(80,()=>{p.current&&(p.current(),p.current=null)})):m({pulsate:o,rippleX:c,rippleY:u,rippleSize:g,cb:n})},[r,m,f]),b=G.useCallback(()=>{g({},{pulsate:!0})},[g]),y=G.useCallback((e,t)=>{if(f.clear(),"touchend"===e?.type&&p.current)return p.current(),p.current=null,void f.start(0,()=>{y(e,t)});p.current=null,l(e=>e.length>0?e.slice(1):e),u.current=t},[f]);return G.useImperativeHandle(t,()=>({pulsate:b,start:g,stop:y}),[b,g,y]),(0,le.jsx)(Gu,{className:Un(Hu.root,o.root,i),ref:h,...a,children:(0,le.jsx)(Wu,{component:null,exit:!0,children:s})})}),Ku=Qu;function Zu(e){return ss("MuiButtonBase",e)}const Ju=ls("MuiButtonBase",["root","disabled","focusVisible"]),ed=Ka("button",{name:"MuiButtonBase",slot:"Root"})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Ju.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}});function td(e,t,n,r=!1){return Fu(o=>(n&&n(o),r||e[t](o),!0))}const nd=G.forwardRef(function(e,t){const n=Za({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:o=!1,children:i,className:a,component:s="button",disabled:l=!1,disableRipple:c=!1,disableTouchRipple:u=!1,focusRipple:d=!1,focusVisibleClassName:f,LinkComponent:p="a",onBlur:h,onClick:m,onContextMenu:g,onDragLeave:b,onFocus:y,onFocusVisible:v,onKeyDown:x,onKeyUp:w,onMouseDown:S,onMouseLeave:k,onMouseUp:C,onTouchEnd:M,onTouchMove:P,onTouchStart:T,tabIndex:O=0,TouchRippleProps:j,touchRippleRef:_,type:D,...E}=n,R=G.useRef(null),A=Lu.use(),I=Ws(A.ref,_),[F,L]=G.useState(!1);l&&F&&L(!1),G.useImperativeHandle(r,()=>({focusVisible:()=>{L(!0),R.current.focus()}}),[]);const N=A.shouldMount&&!c&&!l;G.useEffect(()=>{F&&d&&!c&&A.pulsate()},[c,d,F,A]);const z=td(A,"start",S,u),$=td(A,"stop",g,u),V=td(A,"stop",b,u),B=td(A,"stop",C,u),W=td(A,"stop",e=>{F&&e.preventDefault(),k&&k(e)},u),H=td(A,"start",T,u),q=td(A,"stop",M,u),Y=td(A,"stop",P,u),U=td(A,"stop",e=>{Iu(e.target)||L(!1),h&&h(e)},!1),X=Fu(e=>{R.current||(R.current=e.currentTarget),Iu(e.target)&&(L(!0),v&&v(e)),y&&y(e)}),Q=()=>{const e=R.current;return s&&"button"!==s&&!("A"===e.tagName&&e.href)},K=Fu(e=>{d&&!e.repeat&&F&&" "===e.key&&A.stop(e,()=>{A.start(e)}),e.target===e.currentTarget&&Q()&&" "===e.key&&e.preventDefault(),x&&x(e),e.target===e.currentTarget&&Q()&&"Enter"===e.key&&!l&&(e.preventDefault(),m&&m(e))}),Z=Fu(e=>{d&&" "===e.key&&F&&!e.defaultPrevented&&A.stop(e,()=>{A.pulsate(e)}),w&&w(e),m&&e.target===e.currentTarget&&Q()&&" "===e.key&&!e.defaultPrevented&&m(e)});let J=s;"button"===J&&(E.href||E.to)&&(J=p);const ee={};"button"===J?(ee.type=void 0===D?"button":D,ee.disabled=l):(E.href||E.to||(ee.role="button"),l&&(ee["aria-disabled"]=l));const te=Ws(t,R),ne={...n,centerRipple:o,component:s,disabled:l,disableRipple:c,disableTouchRipple:u,focusRipple:d,tabIndex:O,focusVisible:F},re=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i=Na({root:["root",t&&"disabled",n&&"focusVisible"]},Zu,o);return n&&r&&(i.root+=` ${r}`),i})(ne);return(0,le.jsxs)(ed,{as:J,className:Un(re.root,a),ownerState:ne,onBlur:U,onClick:m,onContextMenu:$,onFocus:X,onKeyDown:K,onKeyUp:Z,onMouseDown:z,onMouseLeave:W,onMouseUp:B,onDragLeave:V,onTouchEnd:q,onTouchMove:Y,onTouchStart:H,ref:te,tabIndex:l?-1:O,type:D,...ee,...E,children:[i,N?(0,le.jsx)(Ku,{ref:I,center:o,...j}):null]})});function rd(e){return ss("MuiDivider",e)}const od=ls("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),id=ls("MuiListItemIcon",["root","alignItemsFlexStart"]),ad=ls("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function sd(e){return ss("MuiMenuItem",e)}const ld=ls("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),cd=Ka(nd,{shouldForwardProp:e=>Xa(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})(gs(({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${ld.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${ld.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${ld.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},[`&.${ld.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${ld.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${od.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${od.inset}`]:{marginLeft:52},[`& .${ad.root}`]:{marginTop:0,marginBottom:0},[`& .${ad.inset}`]:{paddingLeft:36},[`& .${id.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>!e.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${id.root} svg`]:{fontSize:"1.25rem"}}}]}))),ud=G.forwardRef(function(e,t){const n=Za({props:e,name:"MuiMenuItem"}),{autoFocus:r=!1,component:o="li",dense:i=!1,divider:a=!1,disableGutters:s=!1,focusVisibleClassName:l,role:c="menuitem",tabIndex:u,className:d,...f}=n,p=G.useContext(Ls),h=G.useMemo(()=>({dense:i||p.dense||!1,disableGutters:s}),[p.dense,i,s]),m=G.useRef(null);Hs(()=>{r&&m.current&&m.current.focus()},[r]);const g={...n,dense:h.dense,divider:a,disableGutters:s},b=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:a}=e,s=Na({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},sd,a);return{...a,...s}})(n),y=Ws(m,t);let v;return n.disabled||(v=void 0!==u?u:-1),(0,le.jsx)(Ls.Provider,{value:h,children:(0,le.jsx)(cd,{ref:y,role:c,tabIndex:v,component:o,focusVisibleClassName:Un(b.focusVisible,l),className:Un(b.root,d),...f,ownerState:g,classes:b})})}),dd=Ce("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]),fd=Ce("lock-open",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]]),pd=Ce("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]),hd=Ce("table-2",[["path",{d:"M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18",key:"gugj83"}]]),md=Ce("move",[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"m15 19-3 3-3-3",key:"11eu04"}],["path",{d:"m19 9 3 3-3 3",key:"1mg7y2"}],["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"m5 9-3 3 3 3",key:"j64kie"}],["path",{d:"m9 5 3-3 3 3",key:"l8vdw6"}]]),gd=Ce("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]),bd=Ce("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),yd={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},vd=(e,t,n)=>{let r;const o=yd[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function xd(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const wd={date:xd({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:xd({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:xd({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Sd={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},kd=(e,t,n,r)=>Sd[e];function Cd(e){return(t,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,o=n?.width?String(n.width):t;r=e.formattingValues[o]||e.formattingValues[t]}else{const t=e.defaultWidth,o=n?.width?String(n.width):e.defaultWidth;r=e.values[o]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}const Md={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Cd({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Cd({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Cd({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Cd({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Cd({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function Pd(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const a=i[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}(s,e=>e.test(a)):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}(s,e=>e.test(a));let c;return c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c,{value:c,rest:t.slice(a.length)}}}const Td={ordinalNumber:(Od={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(Od.matchPattern);if(!n)return null;const r=n[0],o=e.match(Od.parsePattern);if(!o)return null;let i=Od.valueCallback?Od.valueCallback(o[0]):o[0];return i=t.valueCallback?t.valueCallback(i):i,{value:i,rest:e.slice(r.length)}}),era:Pd({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Pd({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:Pd({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Pd({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Pd({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};var Od;const jd={code:"en-US",formatDistance:vd,formatLong:wd,formatRelative:kd,localize:Md,match:Td,options:{weekStartsOn:0,firstWeekContainsDate:1}};let _d={};function Dd(){return _d}Math.pow(10,8);const Ed=6048e5,Rd=36e5,Ad=Symbol.for("constructDateFrom");function Id(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&Ad in e?e[Ad](t):e instanceof Date?new e.constructor(t):new Date(t)}function Fd(e,t){return Id(t||e,e)}function Ld(e){const t=Fd(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Nd(e,...t){const n=Id.bind(null,e||t.find(e=>"object"==typeof e));return t.map(n)}function zd(e,t){const n=Fd(e,t?.in);return n.setHours(0,0,0,0),n}function $d(e,t){const n=Fd(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Vd(e,t){const n=Fd(e,t?.in);return function(e,t,n){const[r,o]=Nd(n?.in,e,t),i=zd(r),a=zd(o),s=+i-Ld(i),l=+a-Ld(a);return Math.round((s-l)/864e5)}(n,$d(n))+1}function Bd(e,t){const n=Dd(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Fd(e,t?.in),i=o.getDay(),a=(i<r?7:0)+i-r;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function Wd(e,t){return Bd(e,{...t,weekStartsOn:1})}function Hd(e,t){const n=Fd(e,t?.in),r=n.getFullYear(),o=Id(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=Wd(o),a=Id(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=Wd(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function qd(e,t){const n=Fd(e,t?.in),r=+Wd(n)-+function(e,t){const n=Hd(e,t),r=Id(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Wd(r)}(n);return Math.round(r/Ed)+1}function Yd(e,t){const n=Fd(e,t?.in),r=n.getFullYear(),o=Dd(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=Id(t?.in||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=Bd(a,t),l=Id(t?.in||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=Bd(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function Ud(e,t){const n=Fd(e,t?.in),r=+Bd(n,t)-+function(e,t){const n=Dd(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=Yd(e,t),i=Id(t?.in||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),Bd(i,t)}(n,t);return Math.round(r/Ed)+1}function Gd(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const Xd={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Gd("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):Gd(n+1,2)},d:(e,t)=>Gd(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>Gd(e.getHours()%12||12,t.length),H:(e,t)=>Gd(e.getHours(),t.length),m:(e,t)=>Gd(e.getMinutes(),t.length),s:(e,t)=>Gd(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return Gd(Math.trunc(r*Math.pow(10,n-3)),t.length)}},Qd={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return Xd.y(e,t)},Y:function(e,t,n,r){const o=Yd(e,r),i=o>0?o:1-o;return"YY"===t?Gd(i%100,2):"Yo"===t?n.ordinalNumber(i,{unit:"year"}):Gd(i,t.length)},R:function(e,t){return Gd(Hd(e),t.length)},u:function(e,t){return Gd(e.getFullYear(),t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Gd(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Gd(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Xd.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Gd(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=Ud(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):Gd(o,t.length)},I:function(e,t,n){const r=qd(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):Gd(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):Xd.d(e,t)},D:function(e,t,n){const r=Vd(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):Gd(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Gd(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Gd(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return Gd(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(o=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(o=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return Xd.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):Xd.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):Gd(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):Gd(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Xd.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Xd.s(e,t)},S:function(e,t){return Xd.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return Zd(r);case"XXXX":case"XX":return Jd(r);default:return Jd(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Zd(r);case"xxxx":case"xx":return Jd(r);default:return Jd(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Kd(r,":");default:return"GMT"+Jd(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Kd(r,":");default:return"GMT"+Jd(r,":")}},t:function(e,t,n){return Gd(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return Gd(+e,t.length)}};function Kd(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return 0===i?n+String(o):n+String(o)+t+Gd(i,2)}function Zd(e,t){return e%60==0?(e>0?"-":"+")+Gd(Math.abs(e)/60,2):Jd(e,t)}function Jd(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+Gd(Math.trunc(r/60),2)+t+Gd(r%60,2)}const ef=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},tf=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},nf={p:tf,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return ef(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"})}return i.replace("{{date}}",ef(r,t)).replace("{{time}}",tf(o,t))}},rf=/^D+$/,of=/^Y+$/,af=["D","DD","YY","YYYY"];function sf(e){return rf.test(e)}function lf(e){return of.test(e)}function cf(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(console.warn(r),af.includes(e))throw new RangeError(r)}function uf(e){return!(!function(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}(e)&&"number"!=typeof e||isNaN(+Fd(e)))}const df=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ff=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,pf=/^'([^]*?)'?$/,hf=/''/g,mf=/[a-zA-Z]/;function gf(e,t,n){const r=Dd(),o=n?.locale??r.locale??jd,i=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=Fd(e,n?.in);if(!uf(s))throw new RangeError("Invalid time value");let l=t.match(ff).map(e=>{const t=e[0];return"p"===t||"P"===t?(0,nf[t])(e,o.formatLong):e}).join("").match(df).map(e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:bf(e)};if(Qd[t])return{isToken:!0,value:e};if(t.match(mf))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map(r=>{if(!r.isToken)return r.value;const i=r.value;return(!n?.useAdditionalWeekYearTokens&&lf(i)||!n?.useAdditionalDayOfYearTokens&&sf(i))&&cf(i,t,String(e)),(0,Qd[i[0]])(s,i,o.localize,c)}).join("")}function bf(e){const t=e.match(pf);return t?t[1].replace(hf,"'"):e}var yf=function(e,t){if(t&&["date","time","datetime"].includes(t)){var n={date:"dd/MM/yyyy",time:"HH:mm",datetime:"dd/MM/yyyy HH:mm"};return e.map(function(e){return gf(new Date(e),n[t])}).join(" to ")}return e.join(", ")};function vf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var xf="#403e3b",wf=Fe(Me),Sf=Fe(hd),kf=Fe(md),Cf=function(e){var t=e.chartFilters,n=e.globalFilters.filter(function(e){return!t.some(function(t){return t.dimension===e.dimension})});return(0,le.jsxs)("div",{className:"dashboard-filter-icon-tooltip-content",children:[n&&n.filter(function(e){return e.active}).length>0&&(0,le.jsxs)("div",{children:[(0,le.jsxs)("div",{className:"dashboard-filter-icon-tooltip-title",children:[(0,le.jsx)(gd,{size:16,"aria-hidden":!0})," Global Filters"]}),n.filter(function(e){return e.active}).map(function(e){return(0,le.jsxs)("div",{children:[e.title,":"," ",yf(e.currentValues,e.subFieldType)]},e.title)})]}),t&&t.length>0&&(0,le.jsxs)("div",{children:[(0,le.jsx)("div",{className:"dashboard-filter-icon-tooltip-title",children:"Chart Filters"}),t.map(function(e){return(0,le.jsxs)("div",{children:[e.title,":"," ",yf(e.currentValues,e.subFieldType)]},e.title)})]})]})},Mf=function(e){var t,n,r=e.title,o=e.titleTooltip,i=e.editingLayout,a=e.showData,s=e.chartFilters,l=void 0===s?[]:s,c=e.setLockedFilters,u=e.filterChart,d=e.globalFilters,f=void 0===d?[]:d,p=e.chartQuery,h=e.activeFilterCount,m=e.systemFilters,g=(t=(0,G.useState)(!1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,n)||function(e,t){if(e){if("string"==typeof e)return vf(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vf(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),b=g[0],y=g[1],v=Fe(bd),x=0==h?null:h;return(0,le.jsxs)("div",{className:"dashboard-item-header",children:[(0,le.jsxs)("h3",{className:"dashboard-item-header-title",children:[r,(0,le.jsx)(v,{content:o,side:"bottom",size:18,"aria-hidden":!0})]}),(0,le.jsxs)("button",{onClick:function(){return y(!0)},className:"chart-filter-button",children:[(0,le.jsx)("div",{className:be()("dashboard-chart-filter-icon",{"dashboard-chart-filter-icon__active":x&&x>0}),children:(0,le.jsx)(wf,{size:18,color:xf,"aria-hidden":!0,content:x&&x>0?(0,le.jsx)(Cf,{chartFilters:l||[],globalFilters:f||[]}):"No Filters Applied",side:"bottom"})}),x&&0!=x&&(0,le.jsx)("div",{className:"dashboard-chart-filter-icon__count",children:x})]}),a&&(0,le.jsx)("button",{"data-test-id":"show-me-data-button",className:"show-me-data-button",onClick:function(){return a(p,r)},children:(0,le.jsx)(Sf,{content:"Show data",side:"bottom",size:24,"aria-hidden":!0,color:xf})}),i&&(0,le.jsx)("button",{className:"draggable-handle",children:(0,le.jsx)(kf,{content:"Drag to reorder",side:"bottom",size:24,"aria-hidden":!0,color:xf})}),b&&f&&(0,le.jsx)(yY,{title:r,filters:f,chartFilters:l,onClose:function(){return y(!1)},refetchData:u,lockFilter:function(e){c(e)},systemFilters:m})]})},Pf=a(5072),Tf=a.n(Pf),Of=a(7825),jf=a.n(Of),_f=a(7659),Df=a.n(_f),Ef=a(5056),Rf=a.n(Ef),Af=a(540),If=a.n(Af),Ff=a(1113),Lf=a.n(Ff),Nf=a(2602),zf={};zf.styleTagTransform=Lf(),zf.setAttributes=Rf(),zf.insert=Df().bind(null,"head"),zf.domAPI=jf(),zf.insertStyleElement=If(),Tf()(Nf.A,zf),Nf.A&&Nf.A.locals&&Nf.A.locals;var $f=function(){return(0,le.jsxs)("div",{"aria-label":"Loading",className:"loading-widget__shimmer-container","data-testid":"loading-widget",children:[(0,le.jsx)("div",{className:"loading-widget__shimmer-bar loading-widget__shimmer-bar--short"}),(0,le.jsx)("div",{className:"loading-widget__shimmer-bar loading-widget__shimmer-bar--medium"}),(0,le.jsx)("div",{className:"loading-widget__shimmer-bar loading-widget__shimmer-bar--long"})]})};function Vf(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var l=r&&r.prototype instanceof s?r:s,c=Object.create(l.prototype);return Bf(c,"_invoke",function(n,r,o){var i,s,l,c=0,u=o||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return i=t,s=0,l=e,f.n=n,a}};function p(n,r){for(s=n,l=r,t=0;!d&&c&&!o&&t<u.length;t++){var o,i=u[t],p=f.p,h=i[2];n>3?(o=h===r)&&(l=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=n<2&&p<i[1])?(s=0,f.v=r,f.n=i[1]):p<h&&(o=n<3||i[0]>r||r>h)&&(i[4]=n,i[5]=r,f.n=h,s=0))}if(o||n>1)return a;throw d=!0,r}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&p(u,h),s=u,l=h;(t=s<2?e:l)||!d;){i||(s?s<3?(s>1&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(c=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(d=f.n<0)?l:n.call(r,f))!==a)break}catch(t){i=e,s=1,l=t}finally{c=1}}return{value:t,done:d}}}(n,o,i),!0),c}var a={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(Bf(t={},r,function(){return this}),t),d=c.prototype=s.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Bf(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,Bf(d,"constructor",c),Bf(c,"constructor",l),l.displayName="GeneratorFunction",Bf(c,o,"GeneratorFunction"),Bf(d),Bf(d,o,"Generator"),Bf(d,r,function(){return this}),Bf(d,"toString",function(){return"[object Generator]"}),(Vf=function(){return{w:i,m:f}})()}function Bf(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Bf=function(e,t,n,r){function i(t,n){Bf(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},Bf(e,t,n,r)}function Wf(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Hf(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Hf(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Hf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function qf(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}var Yf=function(){var e,t=(e=Vf().m(function e(t){var n,r,o,i,a,s,l;return Vf().w(function(e){for(;;)switch(e.n){case 0:return(n=Wf(t,2))[0],r=n[1],o=r.dataUrl,i=r.params,a=r.authToken,s=r.cookie,e.n=1,et;case 1:return l=e.v,e.a(2,l(o,i,{authToken:a,cookie:s}))}},e)}),function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){qf(i,r,o,a,s,"next",e)}function s(e){qf(i,r,o,a,s,"throw",e)}a(void 0)})});return function(e){return t.apply(this,arguments)}}(),Uf=cp(),Gf=e=>ip(e,Uf),Xf=cp();Gf.write=e=>ip(e,Xf);var Qf=cp();Gf.onStart=e=>ip(e,Qf);var Kf=cp();Gf.onFrame=e=>ip(e,Kf);var Zf=cp();Gf.onFinish=e=>ip(e,Zf);var Jf=[];Gf.setTimeout=(e,t)=>{const n=Gf.now()+t,r=()=>{const e=Jf.findIndex(e=>e.cancel==r);~e&&Jf.splice(e,1),rp-=~e?1:0},o={time:n,handler:e,cancel:r};return Jf.splice(ep(n),0,o),rp+=1,ap(),o};var ep=e=>~(~Jf.findIndex(t=>t.time>e)||~Jf.length);Gf.cancel=e=>{Qf.delete(e),Kf.delete(e),Zf.delete(e),Uf.delete(e),Xf.delete(e)},Gf.sync=e=>{op=!0,Gf.batchedUpdates(e),op=!1},Gf.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,Gf.onStart(n)}return r.handler=e,r.cancel=()=>{Qf.delete(n),t=null},r};var tp="undefined"!=typeof window?window.requestAnimationFrame:()=>{};Gf.use=e=>tp=e,Gf.now="undefined"!=typeof performance?()=>performance.now():Date.now,Gf.batchedUpdates=e=>e(),Gf.catch=console.error,Gf.frameLoop="always",Gf.advance=()=>{"demand"!==Gf.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):lp()};var np=-1,rp=0,op=!1;function ip(e,t){op?(t.delete(e),e(0)):(t.add(e),ap())}function ap(){np<0&&(np=0,"demand"!==Gf.frameLoop&&tp(sp))}function sp(){~np&&(tp(sp),Gf.batchedUpdates(lp))}function lp(){const e=np;np=Gf.now();const t=ep(np);t&&(up(Jf.splice(0,t),e=>e.handler()),rp-=t),rp?(Qf.flush(),Uf.flush(e?Math.min(64,np-e):16.667),Kf.flush(),Xf.flush(),Zf.flush()):np=-1}function cp(){let e=new Set,t=e;return{add(n){rp+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(rp-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,rp-=t.size,up(t,t=>t(n)&&e.add(t)),rp+=e.size,t=e)}}}function up(e,t){e.forEach(e=>{try{t(e)}catch(e){Gf.catch(e)}})}var dp=Object.defineProperty,fp={};function pp(){}((e,t)=>{for(var n in t)dp(e,n,{get:t[n],enumerable:!0})})(fp,{assign:()=>Tp,colors:()=>Cp,createStringInterpolator:()=>xp,skipAnimation:()=>Mp,to:()=>wp,willAdvance:()=>Pp});var hp={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function mp(e,t){if(hp.arr(e)){if(!hp.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var gp=(e,t)=>e.forEach(t);function bp(e,t,n){if(hp.arr(e))for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);else for(const r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var yp=e=>hp.und(e)?[]:hp.arr(e)?e:[e];function vp(e,t){if(e.size){const n=Array.from(e);e.clear(),gp(n,t)}}var xp,wp,Sp=(e,...t)=>vp(e,e=>e(...t)),kp=()=>"undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Cp=null,Mp=!1,Pp=pp,Tp=e=>{e.to&&(wp=e.to),e.now&&(Gf.now=e.now),void 0!==e.colors&&(Cp=e.colors),null!=e.skipAnimation&&(Mp=e.skipAnimation),e.createStringInterpolator&&(xp=e.createStringInterpolator),e.requestAnimationFrame&&Gf.use(e.requestAnimationFrame),e.batchedUpdates&&(Gf.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Pp=e.willAdvance),e.frameLoop&&(Gf.frameLoop=e.frameLoop)},Op=new Set,jp=[],_p=[],Dp=0,Ep={get idle(){return!Op.size&&!jp.length},start(e){Dp>e.priority?(Op.add(e),Gf.onStart(Rp)):(Ap(e),Gf(Fp))},advance:Fp,sort(e){if(Dp)Gf.onFrame(()=>Ep.sort(e));else{const t=jp.indexOf(e);~t&&(jp.splice(t,1),Ip(e))}},clear(){jp=[],Op.clear()}};function Rp(){Op.forEach(Ap),Op.clear(),Gf(Fp)}function Ap(e){jp.includes(e)||Ip(e)}function Ip(e){jp.splice(function(t){const n=t.findIndex(t=>t.priority>e.priority);return n<0?t.length:n}(jp),0,e)}function Fp(e){const t=_p;for(let n=0;n<jp.length;n++){const r=jp[n];Dp=r.priority,r.idle||(Pp(r),r.advance(e),r.idle||t.push(r))}return Dp=0,(_p=jp).length=0,(jp=t).length>0}var Lp="[-+]?\\d*\\.?\\d+",Np=Lp+"%";function zp(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var $p=new RegExp("rgb"+zp(Lp,Lp,Lp)),Vp=new RegExp("rgba"+zp(Lp,Lp,Lp,Lp)),Bp=new RegExp("hsl"+zp(Lp,Np,Np)),Wp=new RegExp("hsla"+zp(Lp,Np,Np,Lp)),Hp=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,qp=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Yp=/^#([0-9a-fA-F]{6})$/,Up=/^#([0-9a-fA-F]{8})$/;function Gp(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Xp(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=Gp(o,r,e+1/3),a=Gp(o,r,e),s=Gp(o,r,e-1/3);return Math.round(255*i)<<24|Math.round(255*a)<<16|Math.round(255*s)<<8}function Qp(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function Kp(e){return(parseFloat(e)%360+360)%360/360}function Zp(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function Jp(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function eh(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Yp.exec(e))?parseInt(t[1]+"ff",16)>>>0:Cp&&void 0!==Cp[e]?Cp[e]:(t=$p.exec(e))?(Qp(t[1])<<24|Qp(t[2])<<16|Qp(t[3])<<8|255)>>>0:(t=Vp.exec(e))?(Qp(t[1])<<24|Qp(t[2])<<16|Qp(t[3])<<8|Zp(t[4]))>>>0:(t=Hp.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Up.exec(e))?parseInt(t[1],16)>>>0:(t=qp.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Bp.exec(e))?(255|Xp(Kp(t[1]),Jp(t[2]),Jp(t[3])))>>>0:(t=Wp.exec(e))?(Xp(Kp(t[1]),Jp(t[2]),Jp(t[3]))|Zp(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}var th=(e,t,n)=>{if(hp.fun(e))return e;if(hp.arr(e))return th({range:e,output:t,extrapolate:n});if(hp.str(e.output[0]))return xp(e);const r=e,o=r.output,i=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",s=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,i);return function(e,t,n,r,o,i,a,s,l){let c=l?l(e):e;if(c<t){if("identity"===a)return c;"clamp"===a&&(c=t)}if(c>n){if("identity"===s)return c;"clamp"===s&&(c=n)}return r===o?r:t===n?e<=t?r:o:(t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t),c=i(c),r===-1/0?c=-c:o===1/0?c+=r:c=c*(o-r)+r,c)}(e,i[t],i[t+1],o[t],o[t+1],l,a,s,r.map)}},nh=1.70158,rh=1.525*nh,oh=nh+1,ih=2*Math.PI/3,ah=2*Math.PI/4.5,sh=e=>{const t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},lh={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>0===e?0:Math.pow(2,10*e-10),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>oh*e*e*e-nh*e*e,easeOutBack:e=>1+oh*Math.pow(e-1,3)+nh*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(7.189819*e-rh)/2:(Math.pow(2*e-2,2)*((rh+1)*(2*e-2)+rh)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*ih),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*ih)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*ah)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*ah)/2+1,easeInBounce:e=>1-sh(1-e),easeOutBounce:sh,easeInOutBounce:e=>e<.5?(1-sh(1-2*e))/2:(1+sh(2*e-1))/2,steps:(e,t="end")=>n=>{const r=(n="end"===t?Math.min(n,.999):Math.max(n,.001))*e;return o=("end"===t?Math.floor(r):Math.ceil(r))/e,Math.min(Math.max(o,0),1);var o}},ch=Symbol.for("FluidValue.get"),uh=Symbol.for("FluidValue.observers"),dh=e=>Boolean(e&&e[ch]),fh=e=>e&&e[ch]?e[ch]():e,ph=e=>e[uh]||null;function hh(e,t){const n=e[uh];n&&n.forEach(e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)})}var mh=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");gh(this,e)}},gh=(e,t)=>xh(e,ch,t);function bh(e,t){if(e[ch]){let n=e[uh];n||xh(e,uh,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function yh(e,t){const n=e[uh];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[uh]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var vh,xh=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),wh=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Sh=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,kh=new RegExp(`(${wh.source})(%|[a-z]+)`,"i"),Ch=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Mh=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Ph=e=>{const[t,n]=Th(e);if(!t||kp())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){return window.getComputedStyle(document.documentElement).getPropertyValue(n)||e}return n&&Mh.test(n)?Ph(n):n||e},Th=e=>{const t=Mh.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},Oh=(e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`,jh=e=>{vh||(vh=Cp?new RegExp(`(${Object.keys(Cp).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(e=>fh(e).replace(Mh,Ph).replace(Sh,eh).replace(vh,eh)),n=t.map(e=>e.match(wh).map(Number)),r=n[0].map((e,t)=>n.map(e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})),o=r.map(t=>th({...e,output:t}));return e=>{const n=!kh.test(t[0])&&t.find(e=>kh.test(e))?.replace(wh,"");let r=0;return t[0].replace(wh,()=>`${o[r++](e)}${n||""}`).replace(Ch,Oh)}},_h="react-spring: ",Dh=e=>{const t=e;let n=!1;if("function"!=typeof t)throw new TypeError(`${_h}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},Eh=Dh(console.warn),Rh=Dh(console.warn);function Ah(e){return hp.str(e)&&("#"==e[0]||/\d/.test(e)||!kp()&&Mh.test(e)||e in(Cp||{}))}var Ih=kp()?G.useEffect:G.useLayoutEffect;function Fh(){const e=(0,G.useState)()[1],t=(()=>{const e=(0,G.useRef)(!1);return Ih(()=>(e.current=!0,()=>{e.current=!1}),[]),e})();return()=>{t.current&&e(Math.random())}}var Lh=e=>(0,G.useEffect)(e,Nh),Nh=[];function zh(e){const t=(0,G.useRef)();return(0,G.useEffect)(()=>{t.current=e}),t.current}var $h=Symbol.for("Animated:node"),Vh=e=>e&&e[$h],Bh=(e,t)=>((e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}))(e,$h,t),Wh=e=>e&&e[$h]&&e[$h].getPayload(),Hh=class{constructor(){Bh(this,this)}getPayload(){return this.payload||[]}},qh=class extends Hh{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,hp.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new qh(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return hp.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,hp.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},Yh=class extends qh{constructor(e){super(0),this._string=null,this._toString=th({output:[e,e]})}static create(e){return new Yh(e)}getValue(){const e=this._string;return null==e?this._string=this._toString(this._value):e}setValue(e){if(hp.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=th({output:[this.getValue(),e]})),this._value=0,super.reset()}},Uh={dependencies:null},Gh=class extends Hh{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return bp(this.source,(n,r)=>{(e=>!!e&&e[$h]===e)(n)?t[r]=n.getValue(e):dh(n)?t[r]=fh(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&gp(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return bp(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Uh.dependencies&&dh(e)&&Uh.dependencies.add(e);const t=Wh(e);t&&gp(t,e=>this.add(e))}},Xh=class extends Gh{constructor(e){super(e)}static create(e){return new Xh(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();return e.length==t.length?t.map((t,n)=>t.setValue(e[n])).some(Boolean):(super.setValue(e.map(Qh)),!0)}};function Qh(e){return(Ah(e)?Yh:qh).create(e)}function Kh(e){const t=Vh(e);return t?t.constructor:hp.arr(e)?Xh:Ah(e)?Yh:qh}var Zh=(e,t)=>{const n=!hp.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,G.forwardRef)((r,o)=>{const i=(0,G.useRef)(null),a=n&&(0,G.useCallback)(e=>{i.current=function(e,t){return e&&(hp.fun(e)?e(t):e.current=t),t}(o,e)},[o]),[s,l]=function(e,t){const n=new Set;return Uh.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Gh(e),Uh.dependencies=null,[e,n]}(r,t),c=Fh(),u=()=>{const e=i.current;n&&!e||!1===(!!e&&t.applyAnimatedValues(e,s.getValue(!0)))&&c()},d=new Jh(u,l),f=(0,G.useRef)();Ih(()=>(f.current=d,gp(l,e=>bh(e,d)),()=>{f.current&&(gp(f.current.deps,e=>yh(e,f.current)),Gf.cancel(f.current.update))})),(0,G.useEffect)(u,[]),Lh(()=>()=>{const e=f.current;gp(e.deps,t=>yh(t,e))});const p=t.getComponentProps(s.getValue());return G.createElement(e,{...p,ref:a})})},Jh=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&Gf.write(this.update)}},em=Symbol.for("AnimatedComponent"),tm=e=>hp.str(e)?e:e&&hp.str(e.displayName)?e.displayName:hp.fun(e)&&e.name||null;function nm(e,...t){return hp.fun(e)?e(...t):e}var rm=(e,t)=>!0===e||!!(t&&e&&(hp.fun(e)?e(t):yp(e).includes(t))),om=(e,t)=>hp.obj(e)?t&&e[t]:e,im=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,am=e=>e,sm=(e,t=am)=>{let n=lm;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));const r={};for(const o of n){const n=t(e[o],o);hp.und(n)||(r[o]=n)}return r},lm=["config","onProps","onStart","onChange","onPause","onResume","onRest"],cm={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function um(e){const t=function(e){const t={};let n=0;if(bp(e,(e,r)=>{cm[r]||(t[r]=e,n++)}),n)return t}(e);if(t){const n={to:t};return bp(e,(e,r)=>r in t||(n[r]=e)),n}return{...e}}function dm(e){return e=fh(e),hp.arr(e)?e.map(dm):Ah(e)?fp.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function fm(e){for(const t in e)return!0;return!1}function pm(e){return hp.fun(e)||hp.arr(e)&&hp.obj(e[0])}function hm(e,t){e.ref?.delete(e),t?.delete(e)}function mm(e,t){t&&e.ref!==t&&(e.ref?.delete(e),t.add(e),e.ref=t)}var gm={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},bm={...gm.default,mass:1,damping:1,easing:lh.linear,clamp:!1},ym=class{constructor(){this.velocity=0,Object.assign(this,bm)}};function vm(e,t){if(hp.und(t.decay)){const n=!hp.und(t.tension)||!hp.und(t.friction);!n&&hp.und(t.frequency)&&hp.und(t.damping)&&hp.und(t.mass)||(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}var xm=[],wm=class{constructor(){this.changed=!1,this.values=xm,this.toValues=null,this.fromValues=xm,this.config=new ym,this.immediate=!1}};function Sm(e,{key:t,props:n,defaultProps:r,state:o,actions:i}){return new Promise((a,s)=>{let l,c,u=rm(n.cancel??r?.cancel,t);if(u)p();else{hp.und(n.pause)||(o.paused=rm(n.pause,t));let e=r?.pause;!0!==e&&(e=o.paused||rm(e,t)),l=nm(n.delay||0,t),e?(o.resumeQueue.add(f),i.pause()):(i.resume(),f())}function d(){o.resumeQueue.add(f),o.timeouts.delete(c),c.cancel(),l=c.time-Gf.now()}function f(){l>0&&!fp.skipAnimation?(o.delayed=!0,c=Gf.setTimeout(p,l),o.pauseQueue.add(d),o.timeouts.add(c)):p()}function p(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(d),o.timeouts.delete(c),e<=(o.cancelId||0)&&(u=!0);try{i.start({...n,callId:e,cancel:u},a)}catch(e){s(e)}}})}var km=(e,t)=>1==t.length?t[0]:t.some(e=>e.cancelled)?Pm(e.get()):t.every(e=>e.noop)?Cm(e.get()):Mm(e.get(),t.every(e=>e.finished)),Cm=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Mm=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Pm=e=>({value:e,cancelled:!0,finished:!1});function Tm(e,t,n,r){const{callId:o,parentId:i,onRest:a}=t,{asyncTo:s,promise:l}=n;return i||e!==s||t.reset?n.promise=(async()=>{n.asyncId=o,n.asyncTo=e;const c=sm(t,(e,t)=>"onRest"===t?void 0:e);let u,d;const f=new Promise((e,t)=>(u=e,d=t)),p=e=>{const t=o<=(n.cancelId||0)&&Pm(r)||o!==n.asyncId&&Mm(r,!1);if(t)throw e.result=t,d(e),e},h=(e,t)=>{const i=new jm,a=new _m;return(async()=>{if(fp.skipAnimation)throw Om(n),a.result=Mm(r,!1),d(a),a;p(i);const s=hp.obj(e)?{...e}:{...t,to:e};s.parentId=o,bp(c,(e,t)=>{hp.und(s[t])&&(s[t]=e)});const l=await r.start(s);return p(i),n.paused&&await new Promise(e=>{n.resumeQueue.add(e)}),l})()};let m;if(fp.skipAnimation)return Om(n),Mm(r,!1);try{let t;t=hp.arr(e)?(async e=>{for(const t of e)await h(t)})(e):Promise.resolve(e(h,r.stop.bind(r))),await Promise.all([t.then(u),f]),m=Mm(r.get(),!0,!1)}catch(e){if(e instanceof jm)m=e.result;else{if(!(e instanceof _m))throw e;m=e.result}}finally{o==n.asyncId&&(n.asyncId=i,n.asyncTo=i?s:void 0,n.promise=i?l:void 0)}return hp.fun(a)&&Gf.batchedUpdates(()=>{a(m,r,r.item)}),m})():l}function Om(e,t){vp(e.timeouts,e=>e.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var jm=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},_m=class extends Error{constructor(){super("SkipAnimationSignal")}},Dm=e=>e instanceof Rm,Em=1,Rm=class extends mh{constructor(){super(...arguments),this.id=Em++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=Vh(this);return e&&e.getValue()}to(...e){return fp.to(this,e)}interpolate(...e){return Eh(`${_h}The "interpolate" function is deprecated in v9 (use "to" instead)`),fp.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){hh(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||Ep.sort(this),hh(this,{type:"priority",parent:this,priority:e})}},Am=Symbol.for("SpringPhase"),Im=e=>(1&e[Am])>0,Fm=e=>(2&e[Am])>0,Lm=e=>(4&e[Am])>0,Nm=(e,t)=>t?e[Am]|=3:e[Am]&=-3,zm=(e,t)=>t?e[Am]|=4:e[Am]&=-5,$m=class extends Rm{constructor(e,t){if(super(),this.animation=new wm,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!hp.und(e)||!hp.und(t)){const n=hp.obj(e)?{...e}:{...t,from:e};hp.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(Fm(this)||this._state.asyncTo)||Lm(this)}get goal(){return fh(this.animation.to)}get velocity(){const e=Vh(this);return e instanceof qh?e.lastVelocity||0:e.getPayload().map(e=>e.lastVelocity||0)}get hasAnimated(){return Im(this)}get isAnimating(){return Fm(this)}get isPaused(){return Lm(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:o}=r;const{config:i}=r,a=Wh(r.to);!a&&dh(r.to)&&(o=yp(fh(r.to))),r.values.forEach((s,l)=>{if(s.done)return;const c=s.constructor==Yh?1:a?a[l].lastPosition:o[l];let u=r.immediate,d=c;if(!u){if(d=s.lastPosition,i.tension<=0)return void(s.done=!0);let t=s.elapsedTime+=e;const n=r.fromValues[l],o=null!=s.v0?s.v0:s.v0=hp.arr(i.velocity)?i.velocity[l]:i.velocity;let a;const f=i.precision||(n==c?.005:Math.min(1,.001*Math.abs(c-n)));if(hp.und(i.duration))if(i.decay){const e=!0===i.decay?.998:i.decay,r=Math.exp(-(1-e)*t);d=n+o/(1-e)*(1-r),u=Math.abs(s.lastPosition-d)<=f,a=o*r}else{a=null==s.lastVelocity?o:s.lastVelocity;const t=i.restVelocity||f/10,r=i.clamp?0:i.bounce,l=!hp.und(r),p=n==c?s.v0>0:n<c;let h,m=!1;const g=1,b=Math.ceil(e/g);for(let e=0;e<b&&(h=Math.abs(a)>t,h||(u=Math.abs(c-d)<=f,!u));++e)l&&(m=d==c||d>c==p,m&&(a=-a*r,d=c)),a+=(1e-6*-i.tension*(d-c)+.001*-i.friction*a)/i.mass*g,d+=a*g}else{let r=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,s.durationProgress>0&&(s.elapsedTime=i.duration*s.durationProgress,t=s.elapsedTime+=e)),r=(i.progress||0)+t/this._memoizedDuration,r=r>1?1:r<0?0:r,s.durationProgress=r),d=n+i.easing(r)*(c-n),a=(d-s.lastPosition)/e,u=1==r}s.lastVelocity=a,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),u=!0)}a&&!a[l].done&&(u=!1),u?s.done=!0:t=!1,s.setValue(d,i.round)&&(n=!0)});const s=Vh(this),l=s.getValue();if(t){const e=fh(r.to);l===e&&!n||i.decay?n&&i.decay&&this._onChange(l):(s.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(l)}set(e){return Gf.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Fm(this)){const{to:e,config:t}=this.animation;Gf.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return hp.und(e)?(n=this.queue||[],this.queue=[]):n=[hp.obj(e)?e:{...t,to:e}],Promise.all(n.map(e=>this._update(e))).then(e=>km(this,e))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Om(this._state,e&&this._lastCallId),Gf.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=hp.obj(n)?n[t]:n,(null==n||pm(n))&&(n=void 0),r=hp.obj(r)?r[t]:r,null==r&&(r=void 0);const o={to:n,from:r};return Im(this)||(e.reverse&&([n,r]=[r,n]),r=fh(r),hp.und(r)?Vh(this)||this._set(n):this._set(r)),o}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,sm(e,(e,t)=>/^on/.test(t)?om(e,n):e)),Um(this,e,"onProps"),Gm(this,"onProps",e,this);const o=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const i=this._state;return Sm(++this._lastCallId,{key:n,props:e,defaultProps:r,state:i,actions:{pause:()=>{Lm(this)||(zm(this,!0),Sp(i.pauseQueue),Gm(this,"onPause",Mm(this,Vm(this,this.animation.to)),this))},resume:()=>{Lm(this)&&(zm(this,!1),Fm(this)&&this._resume(),Sp(i.resumeQueue),Gm(this,"onResume",Mm(this,Vm(this,this.animation.to)),this))},start:this._merge.bind(this,o)}}).then(n=>{if(e.loop&&n.finished&&(!t||!n.noop)){const t=Bm(e);if(t)return this._update(t,!0)}return n})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Pm(this));const r=!hp.und(e.to),o=!hp.und(e.from);if(r||o){if(!(t.callId>this._lastToId))return n(Pm(this));this._lastToId=t.callId}const{key:i,defaultProps:a,animation:s}=this,{to:l,from:c}=s;let{to:u=l,from:d=c}=e;!o||r||t.default&&!hp.und(u)||(u=d),t.reverse&&([u,d]=[d,u]);const f=!mp(d,c);f&&(s.from=d),d=fh(d);const p=!mp(u,l);p&&this._focus(u);const h=pm(t.to),{config:m}=s,{decay:g,velocity:b}=m;(r||o)&&(m.velocity=0),t.config&&!h&&function(e,t,n){n&&(vm(n={...n},t),t={...n,...t}),vm(e,t),Object.assign(e,t);for(const t in bm)null==e[t]&&(e[t]=bm[t]);let{frequency:r,damping:o}=e;const{mass:i}=e;hp.und(r)||(r<.01&&(r=.01),o<0&&(o=0),e.tension=Math.pow(2*Math.PI/r,2)*i,e.friction=4*Math.PI*o*i/r)}(m,nm(t.config,i),t.config!==a.config?nm(a.config,i):void 0);let y=Vh(this);if(!y||hp.und(u))return n(Mm(this,!0));const v=hp.und(t.reset)?o&&!t.default:!hp.und(d)&&rm(t.reset,i),x=v?d:this.get(),w=dm(u),S=hp.num(w)||hp.arr(w)||Ah(w),k=!h&&(!S||rm(a.immediate||t.immediate,i));if(p){const e=Kh(u);if(e!==y.constructor){if(!k)throw Error(`Cannot animate between ${y.constructor.name} and ${e.name}, as the "to" prop suggests`);y=this._set(w)}}const C=y.constructor;let M=dh(u),P=!1;if(!M){const e=v||!Im(this)&&f;(p||e)&&(P=mp(dm(x),w),M=!P),(mp(s.immediate,k)||k)&&mp(m.decay,g)&&mp(m.velocity,b)||(M=!0)}if(P&&Fm(this)&&(s.changed&&!v?M=!0:M||this._stop(l)),!h&&((M||dh(l))&&(s.values=y.getPayload(),s.toValues=dh(u)?null:C==Yh?[1]:yp(w)),s.immediate!=k&&(s.immediate=k,k||v||this._set(l)),M)){const{onRest:e}=s;gp(Ym,e=>Um(this,t,e));const r=Mm(this,Vm(this,l));Sp(this._pendingCalls,r),this._pendingCalls.add(n),s.changed&&Gf.batchedUpdates(()=>{s.changed=!v,e?.(r,this),v?nm(a.onRest,r):s.onStart?.(r,this)})}v&&this._set(x),h?n(Tm(t.to,t,this._state,this)):M?this._start():Fm(this)&&!p?this._pendingCalls.add(n):n(Cm(x))}_focus(e){const t=this.animation;e!==t.to&&(ph(this)&&this._detach(),t.to=e,ph(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;dh(t)&&(bh(t,this),Dm(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;dh(e)&&yh(e,this)}_set(e,t=!0){const n=fh(e);if(!hp.und(n)){const e=Vh(this);if(!e||!mp(n,e.getValue())){const r=Kh(n);e&&e.constructor==r?e.setValue(n):Bh(this,r.create(n)),e&&Gf.batchedUpdates(()=>{this._onChange(n,t)})}}return Vh(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,Gm(this,"onStart",Mm(this,Vm(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),nm(this.animation.onChange,e,this)),nm(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;Vh(this).reset(fh(e.to)),e.immediate||(e.fromValues=e.values.map(e=>e.lastPosition)),Fm(this)||(Nm(this,!0),Lm(this)||this._resume())}_resume(){fp.skipAnimation?this.finish():Ep.start(this)}_stop(e,t){if(Fm(this)){Nm(this,!1);const n=this.animation;gp(n.values,e=>{e.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),hh(this,{type:"idle",parent:this});const r=t?Pm(this.get()):Mm(this.get(),Vm(this,e??n.to));Sp(this._pendingCalls,r),n.changed&&(n.changed=!1,Gm(this,"onRest",r,this))}}};function Vm(e,t){const n=dm(t);return mp(dm(e.get()),n)}function Bm(e,t=e.loop,n=e.to){const r=nm(t);if(r){const o=!0!==r&&um(r),i=(o||e).reverse,a=!o||o.reset;return Wm({...e,loop:t,default:!1,pause:void 0,to:!i||pm(n)?n:void 0,from:a?e.from:void 0,reset:a,...o})}}function Wm(e){const{to:t,from:n}=e=um(e),r=new Set;return hp.obj(t)&&qm(t,r),hp.obj(n)&&qm(n,r),e.keys=r.size?Array.from(r):null,e}function Hm(e){const t=Wm(e);return hp.und(t.default)&&(t.default=sm(t)),t}function qm(e,t){bp(e,(e,n)=>null!=e&&t.add(n))}var Ym=["onStart","onRest","onChange","onPause","onResume"];function Um(e,t,n){e.animation[n]=t[n]!==im(t,n)?om(t[n],e.key):void 0}function Gm(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var Xm=["onStart","onChange","onRest"],Qm=1,Km=class{constructor(e,t){this.id=Qm++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(const t in e){const n=e[t];hp.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(Wm(e)),this}start(e){let{queue:t}=this;return e?t=yp(e).map(Wm):this.queue=[],this._flush?this._flush(this,t):(og(this,t),Zm(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;gp(yp(t),t=>n[t].stop(!!e))}else Om(this._state,this._lastAsyncId),this.each(t=>t.stop(!!e));return this}pause(e){if(hp.und(e))this.start({pause:!0});else{const t=this.springs;gp(yp(e),e=>t[e].pause())}return this}resume(e){if(hp.und(e))this.start({pause:!1});else{const t=this.springs;gp(yp(e),e=>t[e].resume())}return this}each(e){bp(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,o=this._changed.size>0;(r&&!this._started||o&&!this._started)&&(this._started=!0,vp(e,([e,t])=>{t.value=this.get(),e(t,this,this._item)}));const i=!r&&this._started,a=o||i&&n.size?this.get():null;o&&t.size&&vp(t,([e,t])=>{t.value=a,e(t,this,this._item)}),i&&(this._started=!1,vp(n,([e,t])=>{t.value=a,e(t,this,this._item)}))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}Gf.onFrame(this._onFrame)}};function Zm(e,t){return Promise.all(t.map(t=>Jm(e,t))).then(t=>km(e,t))}async function Jm(e,t,n){const{keys:r,to:o,from:i,loop:a,onRest:s,onResolve:l}=t,c=hp.obj(t.default)&&t.default;a&&(t.loop=!1),!1===o&&(t.to=null),!1===i&&(t.from=null);const u=hp.arr(o)||hp.fun(o)?o:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):gp(Xm,n=>{const r=t[n];if(hp.fun(r)){const o=e._events[n];t[n]=({finished:e,cancelled:t})=>{const n=o.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):o.set(r,{value:null,finished:e||!1,cancelled:t||!1})},c&&(c[n]=t[n])}});const d=e._state;t.pause===!d.paused?(d.paused=t.pause,Sp(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);const f=(r||Object.keys(e.springs)).map(n=>e.springs[n].start(t)),p=!0===t.cancel||!0===im(t,"cancel");(u||p&&d.asyncId)&&f.push(Sm(++e._lastAsyncId,{props:t,state:d,actions:{pause:pp,resume:pp,start(t,n){p?(Om(d,e._lastAsyncId),n(Pm(e))):(t.onRest=s,n(Tm(u,t,d,e)))}}})),d.paused&&await new Promise(e=>{d.resumeQueue.add(e)});const h=km(e,await Promise.all(f));if(a&&h.finished&&(!n||!h.noop)){const n=Bm(t,a,o);if(n)return og(e,[n]),Jm(e,n,!0)}return l&&Gf.batchedUpdates(()=>l(h,e,e.item)),h}function eg(e,t){const n={...e.springs};return t&&gp(yp(t),e=>{hp.und(e.keys)&&(e=Wm(e)),hp.obj(e.to)||(e={...e,to:void 0}),rg(n,e,e=>ng(e))}),tg(e,n),n}function tg(e,t){bp(t,(t,n)=>{e.springs[n]||(e.springs[n]=t,bh(t,e))})}function ng(e,t){const n=new $m;return n.key=e,t&&bh(n,t),n}function rg(e,t,n){t.keys&&gp(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function og(e,t){gp(t,t=>{rg(e.springs,t,t=>ng(t,e))})}var ig,ag,sg=({children:e,...t})=>{const n=(0,G.useContext)(lg),r=t.pause||!!n.pause,o=t.immediate||!!n.immediate;t=function(e,t){const[n]=(0,G.useState)(()=>({inputs:t,result:e()})),r=(0,G.useRef)(),o=r.current;let i=o;if(i){const n=Boolean(t&&i.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,i.inputs));n||(i={inputs:t,result:e()})}else i=n;return(0,G.useEffect)(()=>{r.current=i,o==n&&(n.inputs=n.result=void 0)},[i]),i.result}(()=>({pause:r,immediate:o}),[r,o]);const{Provider:i}=lg;return G.createElement(i,{value:t},e)},lg=(ig=sg,ag={},Object.assign(ig,G.createContext(ag)),ig.Provider._context=ig,ig.Consumer._context=ig,ig);sg.Provider=lg.Provider,sg.Consumer=lg.Consumer;var cg=()=>{const e=[],t=function(t){Rh(`${_h}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`);const r=[];return gp(e,(e,o)=>{if(hp.und(t))r.push(e.start());else{const i=n(t,e,o);i&&r.push(e.start(i))}}),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){const n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return gp(e,e=>e.pause(...arguments)),this},t.resume=function(){return gp(e,e=>e.resume(...arguments)),this},t.set=function(t){gp(e,(e,n)=>{const r=hp.fun(t)?t(n,e):t;r&&e.set(r)})},t.start=function(t){const n=[];return gp(e,(e,r)=>{if(hp.und(t))n.push(e.start());else{const o=this._getProps(t,e,r);o&&n.push(e.start(o))}}),n},t.stop=function(){return gp(e,e=>e.stop(...arguments)),this},t.update=function(t){return gp(e,(e,n)=>e.update(this._getProps(t,e,n))),this};const n=function(e,t,n){return hp.fun(e)?e(n,t):e};return t._getProps=n,t};function ug(e,t){const n=hp.fun(e),[[r],o]=function(e,t,n){const r=hp.fun(t)&&t;r&&!n&&(n=[]);const o=(0,G.useMemo)(()=>r||3==arguments.length?cg():void 0,[]),i=(0,G.useRef)(0),a=Fh(),s=(0,G.useMemo)(()=>({ctrls:[],queue:[],flush(e,t){const n=eg(e,t);return i.current>0&&!s.queue.length&&!Object.keys(n).some(t=>!e.springs[t])?Zm(e,t):new Promise(r=>{tg(e,n),s.queue.push(()=>{r(Zm(e,t))}),a()})}}),[]),l=(0,G.useRef)([...s.ctrls]),c=[],u=zh(e)||0;function d(e,n){for(let o=e;o<n;o++){const e=l.current[o]||(l.current[o]=new Km(null,s.flush)),n=r?r(o,e):t[o];n&&(c[o]=Hm(n))}}(0,G.useMemo)(()=>{gp(l.current.slice(e,u),e=>{hm(e,o),e.stop(!0)}),l.current.length=e,d(u,e)},[e]),(0,G.useMemo)(()=>{d(0,Math.min(u,e))},n);const f=l.current.map((e,t)=>eg(e,c[t])),p=(0,G.useContext)(sg),h=zh(p),m=p!==h&&fm(p);Ih(()=>{i.current++,s.ctrls=l.current;const{queue:e}=s;e.length&&(s.queue=[],gp(e,e=>e())),gp(l.current,(e,t)=>{o?.add(e),m&&e.start({default:p});const n=c[t];n&&(mm(e,n.ref),e.ref?e.queue.push(n):e.start(n))})}),Lh(()=>()=>{gp(s.ctrls,e=>e.stop(!0))});const g=f.map(e=>({...e}));return o?[g,o]:g}(1,n?e:[e],n?t||[]:t);return n||2==arguments.length?[r,o]:r}function dg(e,t,n){const r=hp.fun(t)&&t,{reset:o,sort:i,trail:a=0,expires:s=!0,exitBeforeEnter:l=!1,onDestroyed:c,ref:u,config:d}=r?r():t,f=(0,G.useMemo)(()=>r||3==arguments.length?cg():void 0,[]),p=yp(e),h=[],m=(0,G.useRef)(null),g=o?null:m.current;Ih(()=>{m.current=h}),Lh(()=>(gp(h,e=>{f?.add(e.ctrl),e.ctrl.ref=f}),()=>{gp(m.current,e=>{e.expired&&clearTimeout(e.expirationId),hm(e.ctrl,f),e.ctrl.stop(!0)})}));const b=function(e,{key:t,keys:n=t},r){if(null===n){const t=new Set;return e.map(e=>{const n=r&&r.find(n=>n.item===e&&"leave"!==n.phase&&!t.has(n));return n?(t.add(n),n.key):fg++})}return hp.und(n)?e:hp.fun(n)?e.map(n):yp(n)}(p,r?r():t,g),y=o&&m.current||[];Ih(()=>gp(y,({ctrl:e,item:t,key:n})=>{hm(e,f),nm(c,t,n)}));const v=[];if(g&&gp(g,(e,t)=>{e.expired?(clearTimeout(e.expirationId),y.push(e)):~(t=v[t]=b.indexOf(e.key))&&(h[t]=e)}),gp(p,(e,t)=>{h[t]||(h[t]={key:b[t],item:e,phase:"mount",ctrl:new Km},h[t].ctrl.item=e)}),v.length){let e=-1;const{leave:n}=r?r():t;gp(v,(t,r)=>{const o=g[r];~t?(e=h.indexOf(o),h[e]={...o,item:p[t]}):n&&h.splice(++e,0,o)})}hp.fun(i)&&h.sort((e,t)=>i(e.item,t.item));let x=-a;const w=Fh(),S=sm(t),k=new Map,C=(0,G.useRef)(new Map),M=(0,G.useRef)(!1);gp(h,(e,n)=>{const o=e.key,i=e.phase,c=r?r():t;let f,p;const h=nm(c.delay||0,o);if("mount"==i)f=c.enter,p="enter";else{const e=b.indexOf(o)<0;if("leave"!=i)if(e)f=c.leave,p="leave";else{if(!(f=c.update))return;p="update"}else{if(e)return;f=c.enter,p="enter"}}if(f=nm(f,e.item,n),f=hp.obj(f)?um(f):{to:f},!f.config){const t=d||S.config;f.config=nm(t,e.item,n,p)}x+=a;const y={...S,delay:h+x,ref:u,immediate:c.immediate,reset:!1,...f};if("enter"==p&&hp.und(y.from)){const o=r?r():t,i=hp.und(o.initial)||g?o.from:o.initial;y.from=nm(i,e.item,n)}const{onResolve:v}=y;y.onResolve=e=>{nm(v,e);const t=m.current,n=t.find(e=>e.key===o);if(n&&(!e.cancelled||"update"==n.phase)&&n.ctrl.idle){const e=t.every(e=>e.ctrl.idle);if("leave"==n.phase){const t=nm(s,n.item);if(!1!==t){const r=!0===t?0:t;if(n.expired=!0,!e&&r>0)return void(r<=2147483647&&(n.expirationId=setTimeout(w,r)))}}e&&t.some(e=>e.expired)&&(C.current.delete(n),l&&(M.current=!0),w())}};const P=eg(e.ctrl,y);"leave"===p&&l?C.current.set(e,{phase:p,springs:P,payload:y}):k.set(e,{phase:p,springs:P,payload:y})});const P=(0,G.useContext)(sg),T=zh(P),O=P!==T&&fm(P);Ih(()=>{O&&gp(h,e=>{e.ctrl.start({default:P})})},[P]),gp(k,(e,t)=>{if(C.current.size){const e=h.findIndex(e=>e.key===t.key);h.splice(e,1)}}),Ih(()=>{gp(C.current.size?C.current:k,({phase:e,payload:t},n)=>{const{ctrl:r}=n;n.phase=e,f?.add(r),O&&"enter"==e&&r.start({default:P}),t&&(mm(r,t.ref),!r.ref&&!f||M.current?(r.start(t),M.current&&(M.current=!1)):r.update(t))})},o?void 0:n);const j=e=>G.createElement(G.Fragment,null,h.map((t,n)=>{const{springs:r}=k.get(t)||t.ctrl,o=e({...r},t.item,t,n);return o&&o.type?G.createElement(o.type,{...o.props,key:hp.str(t.key)||hp.num(t.key)?t.key:t.ctrl.id,ref:o.ref}):o}));return f?[j,f]:j}var fg=1,pg=class extends Rm{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=th(...t);const n=this._get(),r=Kh(n);Bh(this,r.create(n))}advance(e){const t=this._get();mp(t,this.get())||(Vh(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&mg(this._active)&&gg(this)}_get(){const e=hp.arr(this.source)?this.source.map(fh):yp(fh(this.source));return this.calc(...e)}_start(){this.idle&&!mg(this._active)&&(this.idle=!1,gp(Wh(this),e=>{e.done=!1}),fp.skipAnimation?(Gf.batchedUpdates(()=>this.advance()),gg(this)):Ep.start(this))}_attach(){let e=1;gp(yp(this.source),t=>{dh(t)&&bh(t,this),Dm(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){gp(yp(this.source),e=>{dh(e)&&yh(e,this)}),this._active.clear(),gg(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=yp(this.source).reduce((e,t)=>Math.max(e,(Dm(t)?t.priority:0)+1),0))}};function hg(e){return!1!==e.idle}function mg(e){return!e.size||Array.from(e).every(hg)}function gg(e){e.idle||(e.idle=!0,gp(Wh(e),e=>{e.done=!0}),hh(e,{type:"idle",parent:e}))}var bg=(e,...t)=>new pg(e,t);fp.assign({createStringInterpolator:jh,to:(e,t)=>new pg(e,t)}),Ep.advance;var yg=/^--/;function vg(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||yg.test(e)||wg.hasOwnProperty(e)&&wg[e]?(""+t).trim():t+"px"}var xg={},wg={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Sg=["Webkit","Ms","Moz","O"];wg=Object.keys(wg).reduce((e,t)=>(Sg.forEach(n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t]),e),wg);var kg=/^(matrix|translate|scale|rotate|skew)/,Cg=/^(translate)/,Mg=/^(rotate|skew)/,Pg=(e,t)=>hp.num(e)&&0!==e?e+t:e,Tg=(e,t)=>hp.arr(e)?e.every(e=>Tg(e,t)):hp.num(e)?e===t:parseFloat(e)===t,Og=class extends Gh{constructor({x:e,y:t,z:n,...r}){const o=[],i=[];(e||t||n)&&(o.push([e||0,t||0,n||0]),i.push(e=>[`translate3d(${e.map(e=>Pg(e,"px")).join(",")})`,Tg(e,0)])),bp(r,(e,t)=>{if("transform"===t)o.push([e||""]),i.push(e=>[e,""===e]);else if(kg.test(t)){if(delete r[t],hp.und(e))return;const n=Cg.test(t)?"px":Mg.test(t)?"deg":"";o.push(yp(e)),i.push("rotate3d"===t?([e,t,r,o])=>[`rotate3d(${e},${t},${r},${Pg(o,n)})`,Tg(o,0)]:e=>[`${t}(${e.map(e=>Pg(e,n)).join(",")})`,Tg(e,t.startsWith("scale")?1:0)])}}),o.length&&(r.transform=new jg(o,i)),super(r)}},jg=class extends mh{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return gp(this.inputs,(n,r)=>{const o=fh(n[0]),[i,a]=this.transforms[r](hp.arr(o)?o:n.map(fh));e+=" "+i,t=t&&a}),t?"none":e}observerAdded(e){1==e&&gp(this.inputs,e=>gp(e,e=>dh(e)&&bh(e,this)))}observerRemoved(e){0==e&&gp(this.inputs,e=>gp(e,e=>dh(e)&&yh(e,this)))}eventObserved(e){"change"==e.type&&(this._value=null),hh(this,e)}};fp.assign({batchedUpdates:Pe.unstable_batchedUpdates,createStringInterpolator:jh,colors:{transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199}});var _g=((e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=e=>new Gh(e),getComponentProps:r=e=>e}={})=>{const o={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},i=e=>{const t=tm(e)||"Anonymous";return(e=hp.str(e)?i[e]||(i[e]=Zh(e,o)):e[em]||(e[em]=Zh(e,o))).displayName=`Animated(${t})`,e};return bp(e,(t,n)=>{hp.arr(e)&&(n=tm(t)),i[n]=i(t)}),{animated:i}})(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,{className:r,style:o,children:i,scrollTop:a,scrollLeft:s,viewBox:l,...c}=t,u=Object.values(c),d=Object.keys(c).map(t=>n||e.hasAttribute(t)?t:xg[t]||(xg[t]=t.replace(/([A-Z])/g,e=>"-"+e.toLowerCase())));void 0!==i&&(e.textContent=i);for(const t in o)if(o.hasOwnProperty(t)){const n=vg(t,o[t]);yg.test(t)?e.style.setProperty(t,n):e.style[t]=n}d.forEach((t,n)=>{e.setAttribute(t,u[n])}),void 0!==r&&(e.className=r),void 0!==a&&(e.scrollTop=a),void 0!==s&&(e.scrollLeft=s),void 0!==l&&e.setAttribute("viewBox",l)},createAnimatedStyle:e=>new Og(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),Dg=_g.animated;function Eg(){return Eg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Eg.apply(this,arguments)}var Rg={pointerEvents:"none",position:"absolute",zIndex:10,top:0,left:0},Ag=function(e,t){return"translate("+e+"px, "+t+"px)"},Ig=(0,G.memo)(function(e){var t,n=e.position,r=e.anchor,o=e.children,i=Ck(),a=lk(),s=a.animate,l=a.config,c=yk(),u=c[0],d=c[1],f=(0,G.useRef)(!1),p=void 0,h=!1,m=d.width>0&&d.height>0,g=Math.round(n[0]),b=Math.round(n[1]);m&&("top"===r?(g-=d.width/2,b-=d.height+14):"right"===r?(g+=14,b-=d.height/2):"bottom"===r?(g-=d.width/2,b+=14):"left"===r?(g-=d.width+14,b-=d.height/2):"center"===r&&(g-=d.width/2,b-=d.height/2),p={transform:Ag(g,b)},f.current||(h=!0),f.current=[g,b]);var y=ug({to:p,config:l,immediate:!s||h}),v=Eg({},Rg,i.tooltip.wrapper,{transform:null!=(t=y.transform)?t:Ag(g,b),opacity:y.transform?1:0});return(0,le.jsx)(Dg.div,{ref:u,style:v,children:o})});Ig.displayName="TooltipWrapper";var Fg=(0,G.memo)(function(e){var t=e.size,n=void 0===t?12:t,r=e.color,o=e.style;return(0,le.jsx)("span",{style:Eg({display:"block",width:n,height:n,background:r},void 0===o?{}:o)})}),Lg=(0,G.memo)(function(e){var t,n=e.id,r=e.value,o=e.format,i=e.enableChip,a=void 0!==i&&i,s=e.color,l=e.renderContent,c=Ck(),u=xk(o);if("function"==typeof l)t=l();else{var d=r;void 0!==u&&void 0!==d&&(d=u(d)),t=(0,le.jsxs)("div",{style:c.tooltip.basic,children:[a&&(0,le.jsx)(Fg,{color:s,style:c.tooltip.chip}),void 0!==d?(0,le.jsxs)("span",{children:[n,": ",(0,le.jsx)("strong",{children:""+d})]}):n]})}return(0,le.jsx)("div",{style:c.tooltip.container,children:t})}),Ng={width:"100%",borderCollapse:"collapse"},zg=(0,G.memo)(function(e){var t,n=e.title,r=e.rows,o=void 0===r?[]:r,i=e.renderContent,a=Ck();return o.length?(t="function"==typeof i?i():(0,le.jsxs)("div",{children:[n&&n,(0,le.jsx)("table",{style:Eg({},Ng,a.tooltip.table),children:(0,le.jsx)("tbody",{children:o.map(function(e,t){return(0,le.jsx)("tr",{children:e.map(function(e,t){return(0,le.jsx)("td",{style:a.tooltip.tableCell,children:e},t)})},t)})})})]}),(0,le.jsx)("div",{style:a.tooltip.container,children:t})):null});zg.displayName="TableTooltip";var $g=(0,G.memo)(function(e){var t=e.x0,n=e.x1,r=e.y0,o=e.y1,i=Ck(),a=lk(),s=a.animate,l=a.config,c=(0,G.useMemo)(function(){return Eg({},i.crosshair.line,{pointerEvents:"none"})},[i.crosshair.line]),u=ug({x1:t,x2:n,y1:r,y2:o,config:l,immediate:!s});return(0,le.jsx)(Dg.line,Eg({},u,{fill:"none",style:c}))});$g.displayName="CrosshairLine";var Vg=(0,G.memo)(function(e){var t,n,r=e.width,o=e.height,i=e.type,a=e.x,s=e.y;return"cross"===i?(t={x0:a,x1:a,y0:0,y1:o},n={x0:0,x1:r,y0:s,y1:s}):"top-left"===i?(t={x0:a,x1:a,y0:0,y1:s},n={x0:0,x1:a,y0:s,y1:s}):"top"===i?t={x0:a,x1:a,y0:0,y1:s}:"top-right"===i?(t={x0:a,x1:a,y0:0,y1:s},n={x0:a,x1:r,y0:s,y1:s}):"right"===i?n={x0:a,x1:r,y0:s,y1:s}:"bottom-right"===i?(t={x0:a,x1:a,y0:s,y1:o},n={x0:a,x1:r,y0:s,y1:s}):"bottom"===i?t={x0:a,x1:a,y0:s,y1:o}:"bottom-left"===i?(t={x0:a,x1:a,y0:s,y1:o},n={x0:0,x1:a,y0:s,y1:s}):"left"===i?n={x0:0,x1:a,y0:s,y1:s}:"x"===i?t={x0:a,x1:a,y0:0,y1:o}:"y"===i&&(n={x0:0,x1:r,y0:s,y1:s}),(0,le.jsxs)(le.Fragment,{children:[t&&(0,le.jsx)($g,{x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1}),n&&(0,le.jsx)($g,{x0:n.x0,x1:n.x1,y0:n.y0,y1:n.y1})]})});Vg.displayName="Crosshair";var Bg=(0,G.createContext)({showTooltipAt:function(){},showTooltipFromEvent:function(){},hideTooltip:function(){}}),Wg={isVisible:!1,position:[null,null],content:null,anchor:null},Hg=(0,G.createContext)(Wg),qg=function(){var e=(0,G.useContext)(Bg);if(void 0===e)throw new Error("useTooltip must be used within a TooltipProvider");return e},Yg=function(){var e=function(){var e=(0,G.useContext)(Hg);if(void 0===e)throw new Error("useTooltipState must be used within a TooltipProvider");return e}();return function(e){return e.isVisible}(e)?(0,le.jsx)(Ig,{position:e.position,anchor:e.anchor,children:e.content}):null},Ug=function(e){var t=e.container,n=e.children,r=function(e){var t=(0,G.useState)(Wg),n=t[0],r=t[1],o=(0,G.useCallback)(function(e,t,n){var o=t[0],i=t[1];void 0===n&&(n="top"),r({isVisible:!0,position:[o,i],anchor:n,content:e})},[r]),i=(0,G.useCallback)(function(t,n,o){void 0===o&&(o="top");var i=e.current.getBoundingClientRect(),a=e.current.offsetWidth,s=a===i.width?1:a/i.width,l="touches"in n?n.touches[0]:n,c=l.clientX,u=l.clientY,d=(c-i.left)*s,f=(u-i.top)*s;"left"!==o&&"right"!==o||(o=d<i.width/2?"right":"left"),r({isVisible:!0,position:[d,f],anchor:o,content:t})},[e,r]),a=(0,G.useCallback)(function(){r(Wg)},[r]);return{actions:(0,G.useMemo)(function(){return{showTooltipAt:o,showTooltipFromEvent:i,hideTooltip:a}},[o,i,a]),state:n}}(t),o=r.actions,i=r.state;return(0,le.jsx)(Bg.Provider,{value:o,children:(0,le.jsx)(Hg.Provider,{value:i,children:n})})},Gg=a(5364),Xg=a(8156),Qg=a(3560);function Kg(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Zg=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Jg=new RegExp(Zg.source,"g");function eb(e,t){var n,r,o,i=Zg.lastIndex=Jg.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=Zg.exec(e))&&(r=Jg.exec(t));)(o=r.index)>i&&(o=t.slice(i,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:Kg(n,r)})),i=Jg.lastIndex;return i<t.length&&(o=t.slice(i),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}var tb=a(5015),nb=a(1648);function rb(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function ob(e){this._context=e}function ib(){}function ab(e){this._context=e}function sb(e){this._context=e}function lb(e,t){this._basis=new ob(e),this._beta=t}ob.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:rb(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:rb(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},ab.prototype={areaStart:ib,areaEnd:ib,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:rb(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},sb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:rb(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},lb.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r,o=e[0],i=t[0],a=e[n]-o,s=t[n]-i,l=-1;++l<=n;)r=l/n,this._basis.point(this._beta*e[l]+(1-this._beta)*(o+r*a),this._beta*t[l]+(1-this._beta)*(i+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const cb=function e(t){function n(e){return 1===t?new ob(e):new lb(e,t)}return n.beta=function(t){return e(+t)},n}(.85);function ub(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function db(e,t){this._context=e,this._k=(1-t)/6}db.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:ub(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:ub(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const fb=function e(t){function n(e){return new db(e,t)}return n.tension=function(t){return e(+t)},n}(0);function pb(e,t){this._context=e,this._k=(1-t)/6}pb.prototype={areaStart:ib,areaEnd:ib,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:ub(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const hb=function e(t){function n(e){return new pb(e,t)}return n.tension=function(t){return e(+t)},n}(0);function mb(e,t){this._context=e,this._k=(1-t)/6}mb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ub(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const gb=function e(t){function n(e){return new mb(e,t)}return n.tension=function(t){return e(+t)},n}(0),bb=Math.abs,yb=Math.atan2,vb=Math.cos,xb=Math.max,wb=Math.min,Sb=Math.sin,kb=Math.sqrt,Cb=1e-12,Mb=Math.PI,Pb=Mb/2,Tb=2*Mb;function Ob(e){return e>=1?Pb:e<=-1?-Pb:Math.asin(e)}function jb(e,t,n){var r=e._x1,o=e._y1,i=e._x2,a=e._y2;if(e._l01_a>Cb){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,o=(o*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Cb){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);i=(i*c+e._x1*e._l23_2a-t*e._l12_2a)/u,a=(a*c+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,o,i,a,e._x2,e._y2)}function _b(e,t){this._context=e,this._alpha=t}_b.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:jb(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Db=function e(t){function n(e){return t?new _b(e,t):new db(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function Eb(e,t){this._context=e,this._alpha=t}Eb.prototype={areaStart:ib,areaEnd:ib,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:jb(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Rb=function e(t){function n(e){return t?new Eb(e,t):new pb(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function Ab(e,t){this._context=e,this._alpha=t}Ab.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:jb(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Ib=function e(t){function n(e){return t?new Ab(e,t):new mb(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function Fb(e){this._context=e}function Lb(e){return new Fb(e)}function Nb(e){this._context=e}function zb(e){return e<0?-1:1}function $b(e,t,n){var r=e._x1-e._x0,o=t-e._x1,i=(e._y1-e._y0)/(r||o<0&&-0),a=(n-e._y1)/(o||r<0&&-0),s=(i*o+a*r)/(r+o);return(zb(i)+zb(a))*Math.min(Math.abs(i),Math.abs(a),.5*Math.abs(s))||0}function Vb(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Bb(e,t,n){var r=e._x0,o=e._y0,i=e._x1,a=e._y1,s=(i-r)/3;e._context.bezierCurveTo(r+s,o+s*t,i-s,a-s*n,i,a)}function Wb(e){this._context=e}function Hb(e){this._context=new qb(e)}function qb(e){this._context=e}function Yb(e){this._context=e}function Ub(e){var t,n,r=e.length-1,o=new Array(r),i=new Array(r),a=new Array(r);for(o[0]=0,i[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)o[t]=1,i[t]=4,a[t]=4*e[t]+2*e[t+1];for(o[r-1]=2,i[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=o[t]/i[t-1],i[t]-=n,a[t]-=n*a[t-1];for(o[r-1]=a[r-1]/i[r-1],t=r-2;t>=0;--t)o[t]=(a[t]-o[t+1])/i[t];for(i[r-1]=(e[r]+o[r-1])/2,t=0;t<r-1;++t)i[t]=2*e[t+1]-o[t+1];return[o,i]}function Gb(e,t){this._context=e,this._t=t}function Xb(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function Qb(e){var t=e.map(Kb);return Xb(e).sort(function(e,n){return t[e]-t[n]})}function Kb(e){for(var t,n=0,r=-1,o=e.length;++r<o;)(t=+e[r][1])&&(n+=t);return n}function Zb(e){for(var t,n=-1,r=0,o=e.length,i=-1/0;++n<o;)(t=+e[n][1])>i&&(i=t,r=n);return r}function Jb(e,t){if((o=e.length)>1)for(var n,r,o,i=1,a=e[t[0]],s=a.length;i<o;++i)for(r=a,a=e[t[i]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function ey(e,t){if((s=e.length)>0)for(var n,r,o,i,a,s,l=0,c=e[t[0]].length;l<c;++l)for(i=a=0,n=0;n<s;++n)(o=(r=e[t[n]][l])[1]-r[0])>0?(r[0]=i,r[1]=i+=o):o<0?(r[1]=a,r[0]=a+=o):(r[0]=0,r[1]=o)}Fb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}},Nb.prototype={areaStart:ib,areaEnd:ib,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}},Wb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Bb(this,this._t0,Vb(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Bb(this,Vb(this,n=$b(this,e,t)),n);break;default:Bb(this,this._t0,n=$b(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(Hb.prototype=Object.create(Wb.prototype)).point=function(e,t){Wb.prototype.point.call(this,t,e)},qb.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,o,i){this._context.bezierCurveTo(t,e,r,n,i,o)}},Yb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=Ub(e),o=Ub(t),i=0,a=1;a<n;++i,++a)this._context.bezierCurveTo(r[0][i],o[0][i],r[1][i],o[1][i],e[a],t[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},Gb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};class ty extends Map{constructor(e,t=ry){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(ny(this,e))}has(e){return super.has(ny(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}(this,e))}}function ny({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function ry(e){return null!==e&&"object"==typeof e?e.valueOf():e}function oy(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function iy(e,t){switch(arguments.length){case 0:break;case 1:"function"==typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"==typeof t?this.interpolator(t):this.range(t)}return this}Set;const ay=Symbol("implicit");function sy(){var e=new ty,t=[],n=[],r=ay;function o(o){let i=e.get(o);if(void 0===i){if(r!==ay)return r;e.set(o,i=t.push(o)-1)}return n[i%n.length]}return o.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new ty;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return o},o.range=function(e){return arguments.length?(n=Array.from(e),o):n.slice()},o.unknown=function(e){return arguments.length?(r=e,o):r},o.copy=function(){return sy(t,n).unknown(r)},oy.apply(o,arguments),o}function ly(e){for(var t=e.length/6|0,n=new Array(t),r=0;r<t;)n[r]="#"+e.slice(6*r,6*++r);return n}function cy(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function uy(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function dy(){}var fy=.7,py=1/fy,hy="\\s*([+-]?\\d+)\\s*",my="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",gy="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",by=/^#([0-9a-f]{3,8})$/,yy=new RegExp(`^rgb\\(${hy},${hy},${hy}\\)$`),vy=new RegExp(`^rgb\\(${gy},${gy},${gy}\\)$`),xy=new RegExp(`^rgba\\(${hy},${hy},${hy},${my}\\)$`),wy=new RegExp(`^rgba\\(${gy},${gy},${gy},${my}\\)$`),Sy=new RegExp(`^hsl\\(${my},${gy},${gy}\\)$`),ky=new RegExp(`^hsla\\(${my},${gy},${gy},${my}\\)$`),Cy={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function My(){return this.rgb().formatHex()}function Py(){return this.rgb().formatRgb()}function Ty(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=by.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Oy(t):3===n?new Ey(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?jy(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?jy(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=yy.exec(e))?new Ey(t[1],t[2],t[3],1):(t=vy.exec(e))?new Ey(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=xy.exec(e))?jy(t[1],t[2],t[3],t[4]):(t=wy.exec(e))?jy(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Sy.exec(e))?Ny(t[1],t[2]/100,t[3]/100,1):(t=ky.exec(e))?Ny(t[1],t[2]/100,t[3]/100,t[4]):Cy.hasOwnProperty(e)?Oy(Cy[e]):"transparent"===e?new Ey(NaN,NaN,NaN,0):null}function Oy(e){return new Ey(e>>16&255,e>>8&255,255&e,1)}function jy(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ey(e,t,n,r)}function _y(e){return e instanceof dy||(e=Ty(e)),e?new Ey((e=e.rgb()).r,e.g,e.b,e.opacity):new Ey}function Dy(e,t,n,r){return 1===arguments.length?_y(e):new Ey(e,t,n,null==r?1:r)}function Ey(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Ry(){return`#${Ly(this.r)}${Ly(this.g)}${Ly(this.b)}`}function Ay(){const e=Iy(this.opacity);return`${1===e?"rgb(":"rgba("}${Fy(this.r)}, ${Fy(this.g)}, ${Fy(this.b)}${1===e?")":`, ${e})`}`}function Iy(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Fy(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ly(e){return((e=Fy(e))<16?"0":"")+e.toString(16)}function Ny(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new $y(e,t,n,r)}function zy(e){if(e instanceof $y)return new $y(e.h,e.s,e.l,e.opacity);if(e instanceof dy||(e=Ty(e)),!e)return new $y;if(e instanceof $y)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new $y(a,s,l,e.opacity)}function $y(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Vy(e){return(e=(e||0)%360)<0?e+360:e}function By(e){return Math.max(0,Math.min(1,e||0))}function Wy(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function Hy(e,t,n,r,o){var i=e*e,a=i*e;return((1-3*e+3*i-a)*t+(4-6*i+3*a)*n+(1+3*e+3*i-3*a)*r+a*o)/6}cy(dy,Ty,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:My,formatHex:My,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return zy(this).formatHsl()},formatRgb:Py,toString:Py}),cy(Ey,Dy,uy(dy,{brighter(e){return e=null==e?py:Math.pow(py,e),new Ey(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?fy:Math.pow(fy,e),new Ey(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ey(Fy(this.r),Fy(this.g),Fy(this.b),Iy(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ry,formatHex:Ry,formatHex8:function(){return`#${Ly(this.r)}${Ly(this.g)}${Ly(this.b)}${Ly(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Ay,toString:Ay})),cy($y,function(e,t,n,r){return 1===arguments.length?zy(e):new $y(e,t,n,null==r?1:r)},uy(dy,{brighter(e){return e=null==e?py:Math.pow(py,e),new $y(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?fy:Math.pow(fy,e),new $y(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new Ey(Wy(e>=240?e-240:e+120,o,r),Wy(e,o,r),Wy(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new $y(Vy(this.h),By(this.s),By(this.l),Iy(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Iy(this.opacity);return`${1===e?"hsl(":"hsla("}${Vy(this.h)}, ${100*By(this.s)}%, ${100*By(this.l)}%${1===e?")":`, ${e})`}`}}));const qy=e=>()=>e;function Yy(e,t){return function(n){return e+n*t}}function Uy(e,t){var n=t-e;return n?Yy(e,n):qy(isNaN(e)?t:e)}const Gy=function e(t){var n=function(e){return 1===(e=+e)?Uy:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):qy(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=Dy(e)).r,(t=Dy(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=Uy(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function Xy(e){return function(t){var n,r,o=t.length,i=new Array(o),a=new Array(o),s=new Array(o);for(n=0;n<o;++n)r=Dy(t[n]),i[n]=r.r||0,a[n]=r.g||0,s[n]=r.b||0;return i=e(i),a=e(a),s=e(s),r.opacity=1,function(e){return r.r=i(e),r.g=a(e),r.b=s(e),r+""}}}var Qy=Xy(function(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),o=e[r],i=e[r+1],a=r>0?e[r-1]:2*o-i,s=r<t-1?e[r+2]:2*i-o;return Hy((n-r/t)*t,a,o,i,s)}});Xy(function(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),o=e[(r+t-1)%t],i=e[r%t],a=e[(r+1)%t],s=e[(r+2)%t];return Hy((n-r/t)*t,o,i,a,s)}});const Ky=e=>Qy(e[e.length-1]);var Zy=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(ly);const Jy=Ky(Zy);var ev=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(ly);const tv=Ky(ev);var nv=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(ly);const rv=Ky(nv);var ov=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(ly);const iv=Ky(ov);var av=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(ly);const sv=Ky(av);var lv=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(ly);const cv=Ky(lv);var uv=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(ly);const dv=Ky(uv);var fv=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(ly);const pv=Ky(fv);var hv=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(ly);const mv=Ky(hv);var gv=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(ly);const bv=Ky(gv);var yv=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(ly);const vv=Ky(yv);var xv=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(ly);const wv=Ky(xv);var Sv=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(ly);const kv=Ky(Sv);var Cv=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(ly);const Mv=Ky(Cv);var Pv=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(ly);const Tv=Ky(Pv);var Ov=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(ly);const jv=Ky(Ov);var _v=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(ly);const Dv=Ky(_v);var Ev=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(ly);const Rv=Ky(Ev);var Av=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(ly);const Iv=Ky(Av);var Fv=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(ly);const Lv=Ky(Fv);var Nv=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(ly);const zv=Ky(Nv);var $v=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(ly);const Vv=Ky($v);var Bv=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(ly);const Wv=Ky(Bv);var Hv=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(ly);const qv=Ky(Hv);var Yv=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(ly);const Uv=Ky(Yv);var Gv=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(ly);const Xv=Ky(Gv);var Qv=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(ly);const Kv=Ky(Qv),Zv=ly("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Jv=ly("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),ex=ly("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),tx=ly("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),nx=ly("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),rx=ly("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),ox=ly("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),ix=ly("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),ax=ly("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f");function sx(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}const lx=sx(ly("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var cx=sx(ly("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),ux=sx(ly("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),dx=sx(ly("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));const fx=Math.PI/180,px=180/Math.PI;var hx=-.29227,mx=-.90649,gx=1.97294,bx=-1.7884503806,yx=3.5172982438,vx=-.6557636667999999;function xx(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof wx)return new wx(e.h,e.s,e.l,e.opacity);e instanceof Ey||(e=_y(e));var t=e.r/255,n=e.g/255,r=e.b/255,o=(vx*r+bx*t-yx*n)/(vx+bx-yx),i=r-o,a=(gx*(n-o)-hx*i)/mx,s=Math.sqrt(a*a+i*i)/(gx*o*(1-o)),l=s?Math.atan2(a,i)*px-120:NaN;return new wx(l<0?l+360:l,s,o,e.opacity)}(e):new wx(e,t,n,null==r?1:r)}function wx(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Sx(e){return function t(n){function r(t,r){var o=e((t=xx(t)).h,(r=xx(r)).h),i=Uy(t.s,r.s),a=Uy(t.l,r.l),s=Uy(t.opacity,r.opacity);return function(e){return t.h=o(e),t.s=i(e),t.l=a(Math.pow(e,n)),t.opacity=s(e),t+""}}return n=+n,r.gamma=t,r}(1)}cy(wx,xx,uy(dy,{brighter(e){return e=null==e?py:Math.pow(py,e),new wx(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?fy:Math.pow(fy,e),new wx(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*fx,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),o=Math.sin(e);return new Ey(255*(t+n*(-.14861*r+1.78277*o)),255*(t+n*(hx*r+mx*o)),255*(t+n*(gx*r)),this.opacity)}})),Sx(function(e,t){var n=t-e;return n?Yy(e,n>180||n<-180?n-360*Math.round(n/360):n):qy(isNaN(e)?t:e)});var kx=Sx(Uy),Cx=kx(xx(-100,.75,.35),xx(80,1.5,.8)),Mx=kx(xx(260,.75,.35),xx(80,1.5,.8)),Px=xx();const Tx=kx(xx(300,.5,0),xx(-240,.5,1));var Ox=Dy(),jx=Math.PI/3,_x=2*Math.PI/3;var Dx=a(8090),Ex=(a(6449),a(1882));function Rx(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Ax(e){return(e=Rx(Math.abs(e)))?e[1]:NaN}var Ix,Fx=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Lx(e){if(!(t=Fx.exec(e)))throw new Error("invalid format: "+e);var t;return new Nx({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Nx(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function zx(e,t){var n=Rx(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}Lx.prototype=Nx.prototype,Nx.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const $x={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return zx(100*e,t)},r:zx,s:function(e,t){var n=Rx(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(Ix=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+Rx(e,Math.max(0,t+i-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function Vx(e){return e}var Bx,Wx,Hx,qx=Array.prototype.map,Yx=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];Bx=function(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?Vx:(t=qx.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var o=e.length,i=[],a=0,s=t[0],l=0;o>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(e.substring(o-=s,o+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return i.reverse().join(n)}),o=void 0===e.currency?"":e.currency[0]+"",i=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?Vx:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(qx.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"-":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function d(e){var t=(e=Lx(e)).fill,n=e.align,d=e.sign,f=e.symbol,p=e.zero,h=e.width,m=e.comma,g=e.precision,b=e.trim,y=e.type;"n"===y?(m=!0,y="g"):$x[y]||(void 0===g&&(g=12),b=!0,y="g"),(p||"0"===t&&"="===n)&&(p=!0,t="0",n="=");var v="$"===f?o:"#"===f&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",x="$"===f?i:/[%p]/.test(y)?l:"",w=$x[y],S=/[defgprs%]/.test(y);function k(e){var o,i,l,f=v,k=x;if("c"===y)k=w(e)+k,e="";else{var C=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:w(Math.abs(e),g),b&&(e=function(e){e:for(var t,n=e.length,r=1,o=-1;r<n;++r)switch(e[r]){case".":o=t=r;break;case"0":0===o&&(o=r),t=r;break;default:if(!+e[r])break e;o>0&&(o=0)}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),C&&0===+e&&"+"!==d&&(C=!1),f=(C?"("===d?d:c:"-"===d||"("===d?"":d)+f,k=("s"===y?Yx[8+Ix/3]:"")+k+(C&&"("===d?")":""),S)for(o=-1,i=e.length;++o<i;)if(48>(l=e.charCodeAt(o))||l>57){k=(46===l?a+e.slice(o+1):e.slice(o))+k,e=e.slice(0,o);break}}m&&!p&&(e=r(e,1/0));var M=f.length+e.length+k.length,P=M<h?new Array(h-M+1).join(t):"";switch(m&&p&&(e=r(P+e,P.length?h-k.length:1/0),P=""),n){case"<":e=f+e+k+P;break;case"=":e=f+P+e+k;break;case"^":e=P.slice(0,M=P.length>>1)+f+e+k+P.slice(M);break;default:e=P+f+e+k}return s(e)}return g=void 0===g?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),k.toString=function(){return e+""},k}return{format:d,formatPrefix:function(e,t){var n=d(((e=Lx(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(Ax(t)/3))),o=Math.pow(10,-r),i=Yx[8+r/3];return function(e){return n(o*e)+i}}}}({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Wx=Bx.format,Hx=Bx.formatPrefix;var Ux=new Date,Gx=new Date;function Xx(e,t,n,r){function o(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return o.floor=function(t){return e(t=new Date(+t)),t},o.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},o.round=function(e){var t=o(e),n=o.ceil(e);return e-t<n-e?t:n},o.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},o.range=function(n,r,i){var a,s=[];if(n=o.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return s;do{s.push(a=new Date(+n)),t(n,i),e(n)}while(a<n&&n<r);return s},o.filter=function(n){return Xx(function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););})},n&&(o.count=function(t,r){return Ux.setTime(+t),Gx.setTime(+r),e(Ux),e(Gx),Math.floor(n(Ux,Gx))},o.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(r?function(t){return r(t)%e===0}:function(t){return o.count(0,t)%e===0}):o:null}),o}var Qx=1e3,Kx=6e4,Zx=36e5,Jx=864e5,ew=6048e5;function tw(e){return Xx(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+7*t)},function(e,t){return(t-e)/ew})}var nw=tw(0),rw=tw(1),ow=tw(2),iw=tw(3),aw=tw(4),sw=tw(5),lw=tw(6),cw=(nw.range,rw.range,ow.range,iw.range,aw.range,sw.range,lw.range,Xx(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/Jx},function(e){return e.getUTCDate()-1}));const uw=cw;function dw(e){return Xx(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+7*t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Kx)/ew})}cw.range;var fw=dw(0),pw=dw(1),hw=dw(2),mw=dw(3),gw=dw(4),bw=dw(5),yw=dw(6),vw=fw.range,xw=(pw.range,hw.range,mw.range,gw.range,bw.range,yw.range,Xx(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Kx)/Jx},function(e){return e.getDate()-1}));const ww=xw;var Sw=xw.range,kw=Xx(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});kw.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Xx(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)}):null};const Cw=kw;kw.range;var Mw=Xx(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});Mw.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Xx(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null};const Pw=Mw;function Tw(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Ow(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function jw(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}Mw.range;var _w,Dw,Ew,Rw,Aw,Iw={"-":"",_:" ",0:"0"},Fw=/^\s*\d+/,Lw=/^%/,Nw=/[\\^$*+?|[\]().{}]/g;function zw(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i<n?new Array(n-i+1).join(t)+o:o)}function $w(e){return e.replace(Nw,"\\$&")}function Vw(e){return new RegExp("^(?:"+e.map($w).join("|")+")","i")}function Bw(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function Ww(e,t,n){var r=Fw.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Hw(e,t,n){var r=Fw.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function qw(e,t,n){var r=Fw.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Yw(e,t,n){var r=Fw.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Uw(e,t,n){var r=Fw.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Gw(e,t,n){var r=Fw.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Xw(e,t,n){var r=Fw.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Qw(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Kw(e,t,n){var r=Fw.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function Zw(e,t,n){var r=Fw.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Jw(e,t,n){var r=Fw.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function eS(e,t,n){var r=Fw.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function tS(e,t,n){var r=Fw.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function nS(e,t,n){var r=Fw.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function rS(e,t,n){var r=Fw.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function oS(e,t,n){var r=Fw.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function iS(e,t,n){var r=Fw.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function aS(e,t,n){var r=Lw.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function sS(e,t,n){var r=Fw.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function lS(e,t,n){var r=Fw.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function cS(e,t){return zw(e.getDate(),t,2)}function uS(e,t){return zw(e.getHours(),t,2)}function dS(e,t){return zw(e.getHours()%12||12,t,2)}function fS(e,t){return zw(1+ww.count(Cw(e),e),t,3)}function pS(e,t){return zw(e.getMilliseconds(),t,3)}function hS(e,t){return pS(e,t)+"000"}function mS(e,t){return zw(e.getMonth()+1,t,2)}function gS(e,t){return zw(e.getMinutes(),t,2)}function bS(e,t){return zw(e.getSeconds(),t,2)}function yS(e){var t=e.getDay();return 0===t?7:t}function vS(e,t){return zw(fw.count(Cw(e)-1,e),t,2)}function xS(e){var t=e.getDay();return t>=4||0===t?gw(e):gw.ceil(e)}function wS(e,t){return e=xS(e),zw(gw.count(Cw(e),e)+(4===Cw(e).getDay()),t,2)}function SS(e){return e.getDay()}function kS(e,t){return zw(pw.count(Cw(e)-1,e),t,2)}function CS(e,t){return zw(e.getFullYear()%100,t,2)}function MS(e,t){return zw((e=xS(e)).getFullYear()%100,t,2)}function PS(e,t){return zw(e.getFullYear()%1e4,t,4)}function TS(e,t){var n=e.getDay();return zw((e=n>=4||0===n?gw(e):gw.ceil(e)).getFullYear()%1e4,t,4)}function OS(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+zw(t/60|0,"0",2)+zw(t%60,"0",2)}function jS(e,t){return zw(e.getUTCDate(),t,2)}function _S(e,t){return zw(e.getUTCHours(),t,2)}function DS(e,t){return zw(e.getUTCHours()%12||12,t,2)}function ES(e,t){return zw(1+uw.count(Pw(e),e),t,3)}function RS(e,t){return zw(e.getUTCMilliseconds(),t,3)}function AS(e,t){return RS(e,t)+"000"}function IS(e,t){return zw(e.getUTCMonth()+1,t,2)}function FS(e,t){return zw(e.getUTCMinutes(),t,2)}function LS(e,t){return zw(e.getUTCSeconds(),t,2)}function NS(e){var t=e.getUTCDay();return 0===t?7:t}function zS(e,t){return zw(nw.count(Pw(e)-1,e),t,2)}function $S(e){var t=e.getUTCDay();return t>=4||0===t?aw(e):aw.ceil(e)}function VS(e,t){return e=$S(e),zw(aw.count(Pw(e),e)+(4===Pw(e).getUTCDay()),t,2)}function BS(e){return e.getUTCDay()}function WS(e,t){return zw(rw.count(Pw(e)-1,e),t,2)}function HS(e,t){return zw(e.getUTCFullYear()%100,t,2)}function qS(e,t){return zw((e=$S(e)).getUTCFullYear()%100,t,2)}function YS(e,t){return zw(e.getUTCFullYear()%1e4,t,4)}function US(e,t){var n=e.getUTCDay();return zw((e=n>=4||0===n?aw(e):aw.ceil(e)).getUTCFullYear()%1e4,t,4)}function GS(){return"+0000"}function XS(){return"%"}function QS(e){return+e}function KS(e){return Math.floor(+e/1e3)}_w=function(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,i=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=Vw(o),u=Bw(o),d=Vw(i),f=Bw(i),p=Vw(a),h=Bw(a),m=Vw(s),g=Bw(s),b=Vw(l),y=Bw(l),v={a:function(e){return a[e.getDay()]},A:function(e){return i[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:cS,e:cS,f:hS,g:MS,G:TS,H:uS,I:dS,j:fS,L:pS,m:mS,M:gS,p:function(e){return o[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:QS,s:KS,S:bS,u:yS,U:vS,V:wS,w:SS,W:kS,x:null,X:null,y:CS,Y:PS,Z:OS,"%":XS},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return i[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:jS,e:jS,f:AS,g:qS,G:US,H:_S,I:DS,j:ES,L:RS,m:IS,M:FS,p:function(e){return o[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:QS,s:KS,S:LS,u:NS,U:zS,V:VS,w:BS,W:WS,x:null,X:null,y:HS,Y:YS,Z:GS,"%":XS},w={a:function(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=h.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=b.exec(t.slice(n));return r?(e.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return C(e,t,n,r)},d:Jw,e:Jw,f:iS,g:Xw,G:Gw,H:tS,I:tS,j:eS,L:oS,m:Zw,M:nS,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:Kw,Q:sS,s:lS,S:rS,u:Hw,U:qw,V:Yw,w:Ww,W:Uw,x:function(e,t,r){return C(e,n,t,r)},X:function(e,t,n){return C(e,r,t,n)},y:Xw,Y:Gw,Z:Qw,"%":aS};function S(e,t){return function(n){var r,o,i,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(o=Iw[r=e.charAt(++s)])?r=e.charAt(++s):o="e"===r?" ":"0",(i=t[r])&&(r=i(n,o)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function k(e,t){return function(n){var r,o,i=jw(1900,void 0,1);if(C(i,e,n+="",0)!=n.length)return null;if("Q"in i)return new Date(i.Q);if("s"in i)return new Date(1e3*i.s+("L"in i?i.L:0));if(t&&!("Z"in i)&&(i.Z=0),"p"in i&&(i.H=i.H%12+12*i.p),void 0===i.m&&(i.m="q"in i?i.q:0),"V"in i){if(i.V<1||i.V>53)return null;"w"in i||(i.w=1),"Z"in i?(o=(r=Ow(jw(i.y,0,1))).getUTCDay(),r=o>4||0===o?rw.ceil(r):rw(r),r=uw.offset(r,7*(i.V-1)),i.y=r.getUTCFullYear(),i.m=r.getUTCMonth(),i.d=r.getUTCDate()+(i.w+6)%7):(o=(r=Tw(jw(i.y,0,1))).getDay(),r=o>4||0===o?pw.ceil(r):pw(r),r=ww.offset(r,7*(i.V-1)),i.y=r.getFullYear(),i.m=r.getMonth(),i.d=r.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),o="Z"in i?Ow(jw(i.y,0,1)).getUTCDay():Tw(jw(i.y,0,1)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(o+5)%7:i.w+7*i.U-(o+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,Ow(i)):Tw(i)}}function C(e,t,n,r){for(var o,i,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(o=t.charCodeAt(a++))){if(o=t.charAt(a++),!(i=w[o in Iw?t.charAt(a++):o])||(r=i(e,n,r))<0)return-1}else if(o!=n.charCodeAt(r++))return-1}return r}return v.x=S(n,v),v.X=S(r,v),v.c=S(t,v),x.x=S(n,x),x.X=S(r,x),x.c=S(t,x),{format:function(e){var t=S(e+="",v);return t.toString=function(){return e},t},parse:function(e){var t=k(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=k(e+="",!0);return t.toString=function(){return e},t}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),Dw=_w.format,Ew=_w.parse,Rw=_w.utcFormat,Aw=_w.utcParse;var ZS=a(1331),JS=a(4383),ek=a(2404),tk={background:"transparent",text:{fontFamily:"sans-serif",fontSize:11,fill:"#333333",outlineWidth:0,outlineColor:"transparent",outlineOpacity:1},axis:{domain:{line:{stroke:"transparent",strokeWidth:1}},ticks:{line:{stroke:"#777777",strokeWidth:1},text:{}},legend:{text:{fontSize:12}}},grid:{line:{stroke:"#dddddd",strokeWidth:1}},legends:{hidden:{symbol:{fill:"#333333",opacity:.6},text:{fill:"#333333",opacity:.6}},text:{},ticks:{line:{stroke:"#777777",strokeWidth:1},text:{fontSize:10}},title:{text:{}}},labels:{text:{}},markers:{lineColor:"#000000",lineStrokeWidth:1,text:{}},dots:{text:{}},tooltip:{container:{background:"white",color:"inherit",fontSize:"inherit",borderRadius:"2px",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.25)",padding:"5px 9px"},basic:{whiteSpace:"pre",display:"flex",alignItems:"center"},chip:{marginRight:7},table:{},tableCell:{padding:"3px 5px"},tableCellValue:{fontWeight:"bold"}},crosshair:{line:{stroke:"#000000",strokeWidth:1,strokeOpacity:.75,strokeDasharray:"6 6"}},annotations:{text:{fontSize:13,outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1},link:{stroke:"#000000",strokeWidth:1,outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1},outline:{fill:"none",stroke:"#000000",strokeWidth:2,outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1},symbol:{fill:"#000000",outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1}}};function nk(){return nk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nk.apply(this,arguments)}function rk(e,t){return rk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},rk(e,t)}function ok(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}var ik=["axis.ticks.text","axis.legend.text","legends.title.text","legends.text","legends.ticks.text","legends.title.text","labels.text","dots.text","markers.text","annotations.text"],ak=(0,G.createContext)(),sk=function(e){var t=e.children,n=e.animate,r=void 0===n||n,o=e.config,i=void 0===o?"default":o,a=(0,G.useMemo)(function(){var e=tb(i)?gm[i]:i;return{animate:r,config:e}},[r,i]);return(0,le.jsx)(ak.Provider,{value:a,children:t})},lk=function(){return(0,G.useContext)(ak)},ck=function(e){var t=lk(),n=t.animate,r=t.config,o=function(e){var t=(0,G.useRef)();return(0,G.useEffect)(function(){t.current=e},[e]),t.current}(e),i=(0,G.useMemo)(function(){return eb(o,e)},[o,e]),a=ug({from:{value:0},to:{value:1},reset:!0,config:r,immediate:!n}).value;return bg(a,i)},uk={basis:function(e){return new ob(e)},basisClosed:function(e){return new ab(e)},basisOpen:function(e){return new sb(e)},bundle:cb,cardinal:fb,cardinalClosed:hb,cardinalOpen:gb,catmullRom:Db,catmullRomClosed:Rb,catmullRomOpen:Ib,linear:Lb,linearClosed:function(e){return new Nb(e)},monotoneX:function(e){return new Wb(e)},monotoneY:function(e){return new Hb(e)},natural:function(e){return new Yb(e)},step:function(e){return new Gb(e,.5)},stepAfter:function(e){return new Gb(e,1)},stepBefore:function(e){return new Gb(e,0)}},dk=Object.keys(uk),fk=(dk.filter(function(e){return e.endsWith("Closed")}),nb(dk,"bundle","basisClosed","basisOpen","cardinalClosed","cardinalOpen","catmullRomClosed","catmullRomOpen","linearClosed"),nb(dk,"bundle","basisClosed","basisOpen","cardinalClosed","cardinalOpen","catmullRomClosed","catmullRomOpen","linearClosed"),function(e){if(!uk[e])throw new TypeError("'"+e+"', is not a valid curve interpolator identifier.");return uk[e]}),pk={ascending:Qb,descending:function(e){return Qb(e).reverse()},insideOut:function(e){var t,n,r=e.length,o=e.map(Kb),i=function(e){var t=e.map(Zb);return Xb(e).sort(function(e,n){return t[e]-t[n]})}(e),a=0,s=0,l=[],c=[];for(t=0;t<r;++t)n=i[t],a<s?(a+=o[n],l.push(n)):(s+=o[n],c.push(n));return c.reverse().concat(l)},none:Xb,reverse:function(e){return Xb(e).reverse()}},hk=(Object.keys(pk),{expand:function(e,t){if((r=e.length)>0){for(var n,r,o,i=0,a=e[0].length;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}Jb(e,t)}},diverging:ey,none:Jb,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,o=e[t[0]],i=o.length;r<i;++r){for(var a=0,s=0;a<n;++a)s+=e[a][r][1]||0;o[r][1]+=o[r][0]=-s/2}Jb(e,t)}},wiggle:function(e,t){if((o=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,o,i=0,a=1;a<r;++a){for(var s=0,l=0,c=0;s<o;++s){for(var u=e[t[s]],d=u[a][1]||0,f=(d-(u[a-1][1]||0))/2,p=0;p<s;++p){var h=e[t[p]];f+=(h[a][1]||0)-(h[a-1][1]||0)}l+=d,c+=f*d}n[a-1][1]+=n[a-1][0]=i,l&&(i-=c/l)}n[a-1][1]+=n[a-1][0]=i,Jb(e,t)}}}),mk=(Object.keys(hk),{nivo:["#d76445","#f47560","#e8c1a0","#97e3d5","#61cdbb","#00b0a7"],BrBG:Dx(Zy),PRGn:Dx(ev),PiYG:Dx(nv),PuOr:Dx(ov),RdBu:Dx(av),RdGy:Dx(lv),RdYlBu:Dx(uv),RdYlGn:Dx(fv),spectral:Dx(hv),blues:Dx(gv),greens:Dx(yv),greys:Dx(xv),oranges:Dx(Sv),purples:Dx(Cv),reds:Dx(Pv),BuGn:Dx(Ov),BuPu:Dx(_v),GnBu:Dx(Ev),OrRd:Dx(Av),PuBuGn:Dx(Fv),PuBu:Dx(Nv),PuRd:Dx($v),RdPu:Dx(Bv),YlGnBu:Dx(Hv),YlGn:Dx(Yv),YlOrBr:Dx(Gv),YlOrRd:Dx(Qv)}),gk=(Object.keys(mk),Dx(Zy),Dx(ev),Dx(nv),Dx(ov),Dx(av),Dx(lv),Dx(uv),Dx(fv),Dx(hv),Dx(gv),Dx(yv),Dx(xv),Dx(Sv),Dx(Cv),Dx(Pv),Dx(Ov),Dx(_v),Dx(Ev),Dx(Av),Dx(Fv),Dx(Nv),Dx($v),Dx(Bv),Dx(Hv),Dx(Yv),Dx(Gv),Dx(Qv),sy(ax),{top:0,right:0,bottom:0,left:0}),bk=function(e,t,n){return void 0===n&&(n={}),(0,G.useMemo)(function(){var r=nk({},gk,n);return{margin:r,innerWidth:e-r.left-r.right,innerHeight:t-r.top-r.bottom,outerWidth:e,outerHeight:t}},[e,t,n.top,n.right,n.bottom,n.left])},yk=function(){var e=(0,G.useRef)(null),t=(0,G.useState)({left:0,top:0,width:0,height:0}),n=t[0],r=t[1],o=(0,G.useState)(function(){return"undefined"==typeof ResizeObserver?null:new ResizeObserver(function(e){var t=e[0];return r(t.contentRect)})})[0];return(0,G.useEffect)(function(){return e.current&&null!==o&&o.observe(e.current),function(){null!==o&&o.disconnect()}},[]),[e,n]},vk=function(e){return"function"==typeof e?e:"string"==typeof e?0===e.indexOf("time:")?Dw(e.slice("5")):Wx(e):function(e){return""+e}},xk=function(e){return(0,G.useMemo)(function(){return vk(e)},[e])},wk=(0,G.createContext)(),Sk={},kk=function(e){var t=e.theme,n=void 0===t?Sk:t,r=e.children,o=function(e){return(0,G.useMemo)(function(){return function(e,t){var n=Gg({},e,t);return ik.forEach(function(e){Qg(n,e,function(e,t){return nk({},t,e)}(Xg(n,e),n.text))}),n}(tk,e)},[e])}(n);return(0,le.jsx)(wk.Provider,{value:o,children:r})},Ck=function(){return(0,G.useContext)(wk)},Mk=["outlineWidth","outlineColor","outlineOpacity"],Pk=function(e){return e.outlineWidth,e.outlineColor,e.outlineOpacity,ok(e,Mk)},Tk=function(e){var t=e.children,n=e.condition,r=e.wrapper;return n?(0,G.cloneElement)(r,{},t):t},Ok={position:"relative"},jk=function(e){var t=e.children,n=e.theme,r=e.renderWrapper,o=void 0===r||r,i=e.isInteractive,a=void 0===i||i,s=e.animate,l=e.motionConfig,c=(0,G.useRef)(null);return(0,le.jsx)(kk,{theme:n,children:(0,le.jsx)(sk,{animate:s,config:l,children:(0,le.jsx)(Ug,{container:c,children:(0,le.jsxs)(Tk,{condition:o,wrapper:(0,le.jsx)("div",{style:Ok,ref:c}),children:[t,a&&(0,le.jsx)(Yg,{})]})})})})},_k=function(e){var t=e.children,n=yk(),r=n[0],o=n[1],i=o.width>0&&o.height>0;return(0,le.jsx)("div",{ref:r,style:{width:"100%",height:"100%"},children:i&&t({width:o.width,height:o.height})})},Dk=["id","colors"],Ek={linearGradient:function(e){var t=e.id,n=e.colors,r=ok(e,Dk);return(0,le.jsx)("linearGradient",nk({id:t,x1:0,x2:0,y1:0,y2:1},r,{children:n.map(function(e){var t=e.offset,n=e.color,r=e.opacity;return(0,le.jsx)("stop",{offset:t+"%",stopColor:n,stopOpacity:void 0!==r?r:1},t)})}))}},Rk=(0,G.memo)(function(e){var t=e.id,n=e.background,r=void 0===n?"#ffffff":n,o=e.color,i=void 0===o?"#000000":o,a=e.size,s=void 0===a?4:a,l=e.padding,c=void 0===l?4:l,u=e.stagger,d=void 0!==u&&u,f=s+c,p=s/2,h=c/2;return!0===d&&(f=2*s+2*c),(0,le.jsxs)("pattern",{id:t,width:f,height:f,patternUnits:"userSpaceOnUse",children:[(0,le.jsx)("rect",{width:f,height:f,fill:r}),(0,le.jsx)("circle",{cx:h+p,cy:h+p,r:p,fill:i}),d&&(0,le.jsx)("circle",{cx:1.5*c+s+p,cy:1.5*c+s+p,r:p,fill:i})]})}),Ak=(Math.PI,function(e){return e*Math.PI/180}),Ik=function(e){return 180*e/Math.PI},Fk=function(e,t){return{x:Math.cos(e)*t,y:Math.sin(e)*t}},Lk={svg:{align:{left:"start",center:"middle",right:"end",start:"start",middle:"middle",end:"end"},baseline:{top:"text-before-edge",center:"central",bottom:"alphabetic"}},canvas:{align:{left:"left",center:"center",right:"right",start:"left",middle:"center",end:"right"},baseline:{top:"top",center:"middle",bottom:"bottom"}}},Nk=(0,G.memo)(function(e){var t=e.id,n=e.spacing,r=void 0===n?5:n,o=e.rotation,i=void 0===o?0:o,a=e.background,s=void 0===a?"#000000":a,l=e.color,c=void 0===l?"#ffffff":l,u=e.lineWidth,d=void 0===u?2:u,f=Math.round(i)%360,p=Math.abs(r);f>180?f-=360:f>90?f-=180:f<-180?f+=360:f<-90&&(f+=180);var h,m=p,g=p;return 0===f?h="\n M 0 0 L "+m+" 0\n M 0 "+g+" L "+m+" "+g+"\n ":90===f?h="\n M 0 0 L 0 "+g+"\n M "+m+" 0 L "+m+" "+g+"\n ":(m=Math.abs(p/Math.sin(Ak(f))),g=p/Math.sin(Ak(90-f)),h=f>0?"\n M 0 "+-g+" L "+2*m+" "+g+"\n M "+-m+" "+-g+" L "+m+" "+g+"\n M "+-m+" 0 L "+m+" "+2*g+"\n ":"\n M "+-m+" "+g+" L "+m+" "+-g+"\n M "+-m+" "+2*g+" L "+2*m+" "+-g+"\n M 0 "+2*g+" L "+2*m+" 0\n "),(0,le.jsxs)("pattern",{id:t,width:m,height:g,patternUnits:"userSpaceOnUse",children:[(0,le.jsx)("rect",{width:m,height:g,fill:s,stroke:"rgba(255, 0, 0, 0.1)",strokeWidth:0}),(0,le.jsx)("path",{d:h,strokeWidth:d,stroke:c,strokeLinecap:"square"})]})}),zk={patternDots:Rk,patternLines:Nk,patternSquares:(0,G.memo)(function(e){var t=e.id,n=e.color,r=void 0===n?"#000000":n,o=e.background,i=void 0===o?"#ffffff":o,a=e.size,s=void 0===a?4:a,l=e.padding,c=void 0===l?4:l,u=e.stagger,d=void 0!==u&&u,f=s+c,p=c/2;return!0===d&&(f=2*s+2*c),(0,le.jsxs)("pattern",{id:t,width:f,height:f,patternUnits:"userSpaceOnUse",children:[(0,le.jsx)("rect",{width:f,height:f,fill:i}),(0,le.jsx)("rect",{x:p,y:p,width:s,height:s,fill:r}),d&&(0,le.jsx)("rect",{x:1.5*c+s,y:1.5*c+s,width:s,height:s,fill:r})]})})},$k=["type"],Vk=nk({},Ek,zk),Bk=(0,G.memo)(function(e){var t=e.defs;return!t||t.length<1?null:(0,le.jsx)("defs",{"aria-hidden":!0,children:t.map(function(e){var t=e.type,n=ok(e,$k);return Vk[t]?(0,G.createElement)(Vk[t],nk({key:n.id},n)):null})})}),Wk=function(e){var t=e.width,n=e.height,r=e.margin,o=e.defs,i=e.children,a=e.role,s=e.ariaLabel,l=e.ariaLabelledBy,c=e.ariaDescribedBy,u=e.isFocusable,d=Ck();return(0,le.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:n,role:a,"aria-label":s,"aria-labelledby":l,"aria-describedby":c,focusable:u,tabIndex:u?0:void 0,children:[(0,le.jsx)(Bk,{defs:o}),(0,le.jsx)("rect",{width:t,height:n,fill:d.background}),(0,le.jsx)("g",{transform:"translate("+r.left+","+r.top+")",children:i})]})},Hk=(0,G.memo)(function(e){var t=e.size,n=e.color,r=e.borderWidth,o=e.borderColor;return(0,le.jsx)("circle",{r:t/2,fill:n,stroke:o,strokeWidth:r,style:{pointerEvents:"none"}})}),qk=(0,G.memo)(function(e){var t=e.x,n=e.y,r=e.symbol,o=void 0===r?Hk:r,i=e.size,a=e.datum,s=e.color,l=e.borderWidth,c=e.borderColor,u=e.label,d=e.labelTextAnchor,f=void 0===d?"middle":d,p=e.labelYOffset,h=void 0===p?-12:p,m=Ck(),g=lk(),b=g.animate,y=ug({transform:"translate("+t+", "+n+")",config:g.config,immediate:!b});return(0,le.jsxs)(Dg.g,{transform:y.transform,style:{pointerEvents:"none"},children:[(0,G.createElement)(o,{size:i,color:s,datum:a,borderWidth:l,borderColor:c}),u&&(0,le.jsx)("text",{textAnchor:f,y:h,style:Pk(m.dots.text),children:u})]})}),Yk=(0,G.memo)(function(e){var t=e.width,n=e.height,r=e.axis,o=e.scale,i=e.value,a=e.lineStyle,s=e.textStyle,l=e.legend,c=e.legendNode,u=e.legendPosition,d=void 0===u?"top-right":u,f=e.legendOffsetX,p=void 0===f?14:f,h=e.legendOffsetY,m=void 0===h?14:h,g=e.legendOrientation,b=void 0===g?"horizontal":g,y=Ck(),v=0,x=0,w=0,S=0;if("y"===r?(w=o(i),x=t):(v=o(i),S=n),l&&!c){var k=function(e){var t=e.width,n=e.height,r=e.position,o=e.offsetX,i=e.offsetY,a=e.orientation,s=0,l=0,c="vertical"===a?-90:0,u="start";if("x"===e.axis)switch(r){case"top-left":s=-o,l=i,u="end";break;case"top":l=-i,u="horizontal"===a?"middle":"start";break;case"top-right":s=o,l=i,u="horizontal"===a?"start":"end";break;case"right":s=o,l=n/2,u="horizontal"===a?"start":"middle";break;case"bottom-right":s=o,l=n-i,u="start";break;case"bottom":l=n+i,u="horizontal"===a?"middle":"end";break;case"bottom-left":l=n-i,s=-o,u="horizontal"===a?"end":"start";break;case"left":s=-o,l=n/2,u="horizontal"===a?"end":"middle"}else switch(r){case"top-left":s=o,l=-i,u="start";break;case"top":s=t/2,l=-i,u="horizontal"===a?"middle":"start";break;case"top-right":s=t-o,l=-i,u="horizontal"===a?"end":"start";break;case"right":s=t+o,u="horizontal"===a?"start":"middle";break;case"bottom-right":s=t-o,l=i,u="end";break;case"bottom":s=t/2,l=i,u="horizontal"===a?"middle":"end";break;case"bottom-left":s=o,l=i,u="horizontal"===a?"start":"end";break;case"left":s=-o,u="horizontal"===a?"end":"middle"}return{x:s,y:l,rotation:c,textAnchor:u}}({axis:r,width:t,height:n,position:d,offsetX:p,offsetY:m,orientation:b});c=(0,le.jsx)("text",{transform:"translate("+k.x+", "+k.y+") rotate("+k.rotation+")",textAnchor:k.textAnchor,dominantBaseline:"central",style:s,children:l})}return(0,le.jsxs)("g",{transform:"translate("+v+", "+w+")",children:[(0,le.jsx)("line",{x1:0,x2:x,y1:0,y2:S,stroke:y.markers.lineColor,strokeWidth:y.markers.lineStrokeWidth,style:a}),c]})}),Uk=(0,G.memo)(function(e){var t=e.markers,n=e.width,r=e.height,o=e.xScale,i=e.yScale;return t&&0!==t.length?t.map(function(e,t){return(0,le.jsx)(Yk,nk({},e,{width:n,height:r,scale:"y"===e.axis?i:o}),t)}):null}),Gk=["theme","renderWrapper","animate","motionConfig"],Xk=function(e){return function(t){var n,r;function o(){return t.apply(this,arguments)||this}return r=t,(n=o).prototype=Object.create(r.prototype),n.prototype.constructor=n,rk(n,r),o.prototype.render=function(){var t=this.props,n=t.theme,r=t.renderWrapper,o=t.animate,i=t.motionConfig,a=ok(t,Gk);return(0,le.jsx)(jk,{theme:n,renderWrapper:r,isInteractive:a.isInteractive,animate:o,motionConfig:i,children:(0,le.jsx)(e,nk({},a))})},o}(G.Component)},Qk=function(e){return Ex(e)?e:function(t){return Xg(t,e)}},Kk=function(e){return(0,G.useMemo)(function(){return Qk(e)},[e])},Zk=function(e,t,n,r,o,i){return e<=o&&o<=e+n&&t<=i&&i<=t+r},Jk=function(e,t){var n,r="touches"in t?t.touches[0]:t,o=r.clientX,i=r.clientY,a=e.getBoundingClientRect(),s=(n=void 0!==e.getBBox?e.getBBox():{width:e.offsetWidth||0,height:e.offsetHeight||0}).width===a.width?1:n.width/a.width;return[(o-a.left)*s,(i-a.top)*s]},eC=Object.keys(Ek),tC=Object.keys(zk),nC=function(e,t,n,r){var o=void 0===r?{}:r,i=o.dataKey,a=o.colorKey,s=void 0===a?"color":a,l=o.targetKey,c=void 0===l?"fill":l,u=[],d={};return e.length&&t.length&&(u=[].concat(e),t.forEach(function(t){for(var r=function(){var r=n[o],a=r.id;if(function(e,t,n){if("*"===e)return!0;if(Ex(e))return e(t);if(ZS(e)){var r=n?Xg(t,n):t;return ek(JS(r,Object.keys(e)),e)}return!1}(r.match,t,i)){var l=e.find(function(e){return e.id===a});if(l)if(tC.includes(l.type))if("inherit"===l.background||"inherit"===l.color){var f=Xg(t,s),p=l.background,h=l.color,m=a;"inherit"===l.background&&(m=m+".bg."+f,p=f),"inherit"===l.color&&(m=m+".fg."+f,h=f),Qg(t,c,"url(#"+m+")"),d[m]||(u.push(nk({},l,{id:m,background:p,color:h})),d[m]=1)}else Qg(t,c,"url(#"+a+")");else if(eC.includes(l.type))if(l.colors.map(function(e){return e.color}).includes("inherit")){var g=Xg(t,s),b=a,y=nk({},l,{colors:l.colors.map(function(e,t){return"inherit"!==e.color?e:(b=b+"."+t+"."+g,nk({},e,{color:"inherit"===e.color?g:e.color}))})});y.id=b,Qg(t,c,"url(#"+b+")"),d[b]||(u.push(y),d[b]=1)}else Qg(t,c,"url(#"+a+")");return"break"}},o=0;o<n.length&&"break"!==r();o++);})),u},rC=a(3375),oC=a(14),iC=a(3031),aC=a(3602);const sC=Math.sqrt(50),lC=Math.sqrt(10),cC=Math.sqrt(2);function uC(e,t,n){const r=(t-e)/Math.max(0,n),o=Math.floor(Math.log10(r)),i=r/Math.pow(10,o),a=i>=sC?10:i>=lC?5:i>=cC?2:1;let s,l,c;return o<0?(c=Math.pow(10,-o)/a,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,o)*a,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?uC(e,t,2*n):[s,l,c]}function dC(e,t,n){if(!((n=+n)>0))return[];if((e=+e)===(t=+t))return[e];const r=t<e,[o,i,a]=r?uC(t,e,n):uC(e,t,n);if(!(i>=o))return[];const s=i-o+1,l=new Array(s);if(r)if(a<0)for(let e=0;e<s;++e)l[e]=(i-e)/-a;else for(let e=0;e<s;++e)l[e]=(i-e)*a;else if(a<0)for(let e=0;e<s;++e)l[e]=(o+e)/-a;else for(let e=0;e<s;++e)l[e]=(o+e)*a;return l}function fC(e,t,n){return uC(e=+e,t=+t,n=+n)[2]}function pC(e,t,n){n=+n;const r=(t=+t)<(e=+e),o=r?fC(t,e,n):fC(e,t,n);return(r?-1:1)*(o<0?1/-o:o)}function hC(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function mC(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function gC(e){let t,n,r;function o(e,r,o=0,i=e.length){if(o<i){if(0!==t(r,r))return i;do{const t=o+i>>>1;n(e[t],r)<0?o=t+1:i=t}while(o<i)}return o}return 2!==e.length?(t=hC,n=(t,n)=>hC(e(t),n),r=(t,n)=>e(t)-n):(t=e===hC||e===mC?e:bC,n=e,r=e),{left:o,center:function(e,t,n=0,i=e.length){const a=o(e,t,n,i-1);return a>n&&r(e[a-1],t)>-r(e[a],t)?a-1:a},right:function(e,r,o=0,i=e.length){if(o<i){if(0!==t(r,r))return i;do{const t=o+i>>>1;n(e[t],r)<=0?o=t+1:i=t}while(o<i)}return o}}}function bC(){return 0}const yC=gC(hC),vC=yC.right,xC=(yC.left,gC(function(e){return null===e?NaN:+e}).center,vC);function wC(e,t){var n,r=t?t.length:0,o=e?Math.min(r,e.length):0,i=new Array(o),a=new Array(r);for(n=0;n<o;++n)i[n]=MC(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<o;++n)a[n]=i[n](e);return a}}function SC(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function kC(e,t){var n,r={},o={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=MC(e[n],t[n]):o[n]=t[n];return function(e){for(n in r)o[n]=r[n](e);return o}}function CC(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,o=t.slice();return function(i){for(n=0;n<r;++n)o[n]=e[n]*(1-i)+t[n]*i;return o}}function MC(e,t){var n,r,o=typeof t;return null==t||"boolean"===o?qy(t):("number"===o?Kg:"string"===o?(n=Ty(t))?(t=n,Gy):eb:t instanceof Ty?Gy:t instanceof Date?SC:(r=t,!ArrayBuffer.isView(r)||r instanceof DataView?Array.isArray(t)?wC:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?kC:Kg:CC))(e,t)}function PC(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function TC(e){return+e}var OC=[0,1];function jC(e){return e}function _C(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:(n=isNaN(t)?NaN:.5,function(){return n});var n}function DC(e,t,n){var r=e[0],o=e[1],i=t[0],a=t[1];return o<r?(r=_C(o,r),i=n(a,i)):(r=_C(r,o),i=n(i,a)),function(e){return i(r(e))}}function EC(e,t,n){var r=Math.min(e.length,t.length)-1,o=new Array(r),i=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)o[a]=_C(e[a],e[a+1]),i[a]=n(t[a],t[a+1]);return function(t){var n=xC(e,t,1,r)-1;return i[n](o[n](t))}}function RC(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function AC(){var e,t,n,r,o,i,a=OC,s=OC,l=MC,c=jC;function u(){var e,t,n,l=Math.min(a.length,s.length);return c!==jC&&(e=a[0],t=a[l-1],e>t&&(n=e,e=t,t=n),c=function(n){return Math.max(e,Math.min(t,n))}),r=l>2?EC:DC,o=i=null,d}function d(t){return null==t||isNaN(t=+t)?n:(o||(o=r(a.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((i||(i=r(s,a.map(e),Kg)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,TC),u()):a.slice()},d.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},d.rangeRound=function(e){return s=Array.from(e),l=PC,u()},d.clamp=function(e){return arguments.length?(c=!!e||jC,u()):c!==jC},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}function IC(){return AC()(jC,jC)}function FC(e){var t=e.domain;return e.ticks=function(e){var n=t();return dC(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return function(e,t,n,r){var o,i=pC(e,t,n);switch((r=Lx(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(o=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Ax(t)/3)))-Ax(Math.abs(e)))}(i,a))||(r.precision=o),Hx(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(o=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ax(t)-Ax(e))+1}(i,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=o-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(o=function(e){return Math.max(0,-Ax(Math.abs(e)))}(i))||(r.precision=o-2*("%"===r.type))}return Wx(r)}(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,o,i=t(),a=0,s=i.length-1,l=i[a],c=i[s],u=10;for(c<l&&(o=l,l=c,c=o,o=a,a=s,s=o);u-- >0;){if((o=fC(l,c,n))===r)return i[a]=l,i[s]=c,t(i);if(o>0)l=Math.floor(l/o)*o,c=Math.ceil(c/o)*o;else{if(!(o<0))break;l=Math.ceil(l*o)/o,c=Math.floor(c*o)/o}r=o}return e},e}function LC(){var e=IC();return e.copy=function(){return RC(e,LC())},oy.apply(e,arguments),FC(e)}function NC(){var e,t,n=sy().unknown(void 0),r=n.domain,o=n.range,i=0,a=1,s=!1,l=0,c=0,u=.5;function d(){var n=r().length,d=a<i,f=d?a:i,p=d?i:a;e=(p-f)/Math.max(1,n-l+2*c),s&&(e=Math.floor(e)),f+=(p-f-e*(n-l))*u,t=e*(1-l),s&&(f=Math.round(f),t=Math.round(t));var h=function(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=0|Math.max(0,Math.ceil((t-e)/n)),i=new Array(o);++r<o;)i[r]=e+r*n;return i}(n).map(function(t){return f+e*t});return o(d?h.reverse():h)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),d()):r()},n.range=function(e){return arguments.length?([i,a]=e,i=+i,a=+a,d()):[i,a]},n.rangeRound=function(e){return[i,a]=e,i=+i,a=+a,s=!0,d()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(s=!!e,d()):s},n.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),d()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),d()):l},n.paddingOuter=function(e){return arguments.length?(c=+e,d()):c},n.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},n.copy=function(){return NC(r(),[i,a]).round(s).paddingInner(l).paddingOuter(c).align(u)},oy.apply(d(),arguments)}function zC(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return zC(t())},e}function $C(){return zC(NC.apply(null,arguments).paddingInner(1))}const VC=1e3,BC=6e4,WC=36e5,HC=864e5,qC=6048e5,YC=31536e6,UC=new Date,GC=new Date;function XC(e,t,n,r){function o(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return o.floor=t=>(e(t=new Date(+t)),t),o.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),o.round=e=>{const t=o(e),n=o.ceil(e);return e-t<n-e?t:n},o.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),o.range=(n,r,i)=>{const a=[];if(n=o.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return a;let s;do{a.push(s=new Date(+n)),t(n,i),e(n)}while(s<n&&n<r);return a},o.filter=n=>XC(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(o.count=(t,r)=>(UC.setTime(+t),GC.setTime(+r),e(UC),e(GC),Math.floor(n(UC,GC))),o.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(r?t=>r(t)%e===0:t=>o.count(0,t)%e===0):o:null)),o}const QC=XC(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);QC.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?XC(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):QC:null),QC.range;const KC=XC(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*VC)},(e,t)=>(t-e)/VC,e=>e.getUTCSeconds()),ZC=(KC.range,XC(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*VC)},(e,t)=>{e.setTime(+e+t*BC)},(e,t)=>(t-e)/BC,e=>e.getMinutes())),JC=(ZC.range,XC(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*BC)},(e,t)=>(t-e)/BC,e=>e.getUTCMinutes())),eM=(JC.range,XC(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*VC-e.getMinutes()*BC)},(e,t)=>{e.setTime(+e+t*WC)},(e,t)=>(t-e)/WC,e=>e.getHours())),tM=(eM.range,XC(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*WC)},(e,t)=>(t-e)/WC,e=>e.getUTCHours())),nM=(tM.range,XC(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*BC)/HC,e=>e.getDate()-1)),rM=(nM.range,XC(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/HC,e=>e.getUTCDate()-1)),oM=(rM.range,XC(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/HC,e=>Math.floor(e/HC)));function iM(e){return XC(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+7*t)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*BC)/qC)}oM.range;const aM=iM(0),sM=iM(1),lM=iM(2),cM=iM(3),uM=iM(4),dM=iM(5),fM=iM(6);function pM(e){return XC(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)},(e,t)=>(t-e)/qC)}aM.range,sM.range,lM.range,cM.range,uM.range,dM.range,fM.range;const hM=pM(0),mM=pM(1),gM=pM(2),bM=pM(3),yM=pM(4),vM=pM(5),xM=pM(6),wM=(hM.range,mM.range,gM.range,bM.range,yM.range,vM.range,xM.range,XC(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear()),e=>e.getMonth())),SM=(wM.range,XC(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear()),e=>e.getUTCMonth())),kM=(SM.range,XC(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear()));kM.every=e=>isFinite(e=Math.floor(e))&&e>0?XC(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}):null,kM.range;const CM=XC(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());function MM(e,t,n,r,o,i){const a=[[KC,1,VC],[KC,5,5e3],[KC,15,15e3],[KC,30,3e4],[i,1,BC],[i,5,3e5],[i,15,9e5],[i,30,18e5],[o,1,WC],[o,3,108e5],[o,6,216e5],[o,12,432e5],[r,1,HC],[r,2,1728e5],[n,1,qC],[t,1,2592e6],[t,3,7776e6],[e,1,YC]];function s(t,n,r){const o=Math.abs(n-t)/r,i=gC(([,,e])=>e).right(a,o);if(i===a.length)return e.every(pC(t/YC,n/YC,r));if(0===i)return QC.every(Math.max(pC(t,n,r),1));const[s,l]=a[o/a[i-1][2]<a[i][2]/o?i-1:i];return s.every(l)}return[function(e,t,n){const r=t<e;r&&([e,t]=[t,e]);const o=n&&"function"==typeof n.range?n:s(e,t,n),i=o?o.range(e,+t+1):[];return r?i.reverse():i},s]}CM.every=e=>isFinite(e=Math.floor(e))&&e>0?XC(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null,CM.range;const[PM,TM]=MM(CM,SM,hM,oM,tM,JC),[OM,jM]=MM(kM,wM,aM,nM,eM,ZC);function _M(e,t){var n,r=0,o=(e=e.slice()).length-1,i=e[r],a=e[o];return a<i&&(n=r,r=o,o=n,n=i,i=a,a=n),e[r]=t.floor(i),e[o]=t.ceil(a),e}function DM(e){return new Date(e)}function EM(e){return e instanceof Date?+e:+new Date(+e)}function RM(e,t,n,r,o,i,a,s,l,c){var u=IC(),d=u.invert,f=u.domain,p=c(".%L"),h=c(":%S"),m=c("%I:%M"),g=c("%I %p"),b=c("%a %d"),y=c("%b %d"),v=c("%B"),x=c("%Y");function w(e){return(l(e)<e?p:s(e)<e?h:a(e)<e?m:i(e)<e?g:r(e)<e?o(e)<e?b:y:n(e)<e?v:x)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?f(Array.from(e,EM)):f().map(DM)},u.ticks=function(t){var n=f();return e(n[0],n[n.length-1],null==t?10:t)},u.tickFormat=function(e,t){return null==t?w:c(t)},u.nice=function(e){var n=f();return e&&"function"==typeof e.range||(e=t(n[0],n[n.length-1],null==e?10:e)),e?f(_M(n,e)):u},u.copy=function(){return RC(u,RM(e,t,n,r,o,i,a,s,l,c))},u}function AM(e){return Math.log(e)}function IM(e){return Math.exp(e)}function FM(e){return-Math.log(-e)}function LM(e){return-Math.exp(-e)}function NM(e){return isFinite(e)?+("1e"+e):e<0?0:e}function zM(e){return(t,n)=>-e(-t,n)}function $M(){const e=function(e){const t=e(AM,IM),n=t.domain;let r,o,i=10;function a(){return r=function(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}(i),o=function(e){return 10===e?NM:e===Math.E?Math.exp:t=>Math.pow(e,t)}(i),n()[0]<0?(r=zM(r),o=zM(o),e(FM,LM)):e(AM,IM),t}return t.base=function(e){return arguments.length?(i=+e,a()):i},t.domain=function(e){return arguments.length?(n(e),a()):n()},t.ticks=e=>{const t=n();let a=t[0],s=t[t.length-1];const l=s<a;l&&([a,s]=[s,a]);let c,u,d=r(a),f=r(s);const p=null==e?10:+e;let h=[];if(!(i%1)&&f-d<p){if(d=Math.floor(d),f=Math.ceil(f),a>0){for(;d<=f;++d)for(c=1;c<i;++c)if(u=d<0?c/o(-d):c*o(d),!(u<a)){if(u>s)break;h.push(u)}}else for(;d<=f;++d)for(c=i-1;c>=1;--c)if(u=d>0?c/o(-d):c*o(d),!(u<a)){if(u>s)break;h.push(u)}2*h.length<p&&(h=dC(a,s,p))}else h=dC(d,f,Math.min(f-d,p)).map(o);return l?h.reverse():h},t.tickFormat=(e,n)=>{if(null==e&&(e=10),null==n&&(n=10===i?"s":","),"function"!=typeof n&&(i%1||null!=(n=Lx(n)).precision||(n.trim=!0),n=Wx(n)),e===1/0)return n;const a=Math.max(1,i*e/t.ticks().length);return e=>{let t=e/o(Math.round(r(e)));return t*i<i-.5&&(t*=i),t<=a?n(e):""}},t.nice=()=>n(_M(n(),{floor:e=>o(Math.floor(r(e))),ceil:e=>o(Math.ceil(r(e)))})),t}(AC()).domain([1,10]);return e.copy=()=>RC(e,$M()).base(e.base()),oy.apply(e,arguments),e}function VM(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function BM(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function WM(){var e=function(e){var t=1,n=e(VM(t),BM(t));return n.constant=function(n){return arguments.length?e(VM(t=+n),BM(t)):t},FC(n)}(AC());return e.copy=function(){return RC(e,WM()).constant(e.constant())},oy.apply(e,arguments)}var HM=Xx(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});HM.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?Xx(function(t){t.setTime(Math.floor(t/e)*e)},function(t,n){t.setTime(+t+n*e)},function(t,n){return(n-t)/e}):HM:null};const qM=HM;HM.range;var YM=Xx(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+t*Qx)},function(e,t){return(t-e)/Qx},function(e){return e.getUTCSeconds()});const UM=YM;YM.range;var GM=Xx(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*Qx)},function(e,t){e.setTime(+e+t*Kx)},function(e,t){return(t-e)/Kx},function(e){return e.getMinutes()});const XM=GM;GM.range;var QM=Xx(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*Kx)},function(e,t){return(t-e)/Kx},function(e){return e.getUTCMinutes()});const KM=QM;QM.range;var ZM=Xx(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*Qx-e.getMinutes()*Kx)},function(e,t){e.setTime(+e+t*Zx)},function(e,t){return(t-e)/Zx},function(e){return e.getHours()});const JM=ZM;ZM.range;var eP=Xx(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+t*Zx)},function(e,t){return(t-e)/Zx},function(e){return e.getUTCHours()});const tP=eP;eP.range;var nP=Xx(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())},function(e){return e.getMonth()});const rP=nP;var oP=nP.range,iP=Xx(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())},function(e){return e.getUTCMonth()});const aP=iP;function sP(){return sP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sP.apply(this,arguments)}iP.range;var lP=[function(e){return e.setMilliseconds(0)},function(e){return e.setSeconds(0)},function(e){return e.setMinutes(0)},function(e){return e.setHours(0)},function(e){return e.setDate(1)},function(e){return e.setMonth(0)}],cP={millisecond:[],second:lP.slice(0,1),minute:lP.slice(0,2),hour:lP.slice(0,3),day:lP.slice(0,4),month:lP.slice(0,5),year:lP.slice(0,6)},uP=function(e){var t=e.format,n=void 0===t?"native":t,r=e.precision,o=void 0===r?"millisecond":r,i=e.useUTC,a=void 0===i||i,s=function(e){return function(t){return cP[e].forEach(function(e){e(t)}),t}}(o);return function(e){if(void 0===e)return e;if("native"===n||e instanceof Date)return s(e);var t=a?Aw(n):Ew(n);return s(t(e))}},dP=function(e,t){void 0===t&&(t=!1);var n=e;return n.type="linear",n.stacked=t,n},fP=function(e){var t=e;return t.type="band",t},pP=function(e,t){return e===t},hP=function(e,t){return e.getTime()===t.getTime()};function mP(e,t,n,r){switch(e.type){case"linear":return function(e,t,n,r){var o,i,a,s,l=e.min,c=void 0===l?0:l,u=e.max,d=void 0===u?"auto":u,f=e.stacked,p=void 0!==f&&f,h=e.reverse,m=void 0!==h&&h,g=e.clamp,b=void 0!==g&&g,y=e.nice,v=void 0!==y&&y;o="auto"===c?!0===p?null!=(i=t.minStacked)?i:0:t.min:c,a="auto"===d?!0===p?null!=(s=t.maxStacked)?s:0:t.max:d;var x=LC().rangeRound("x"===r?[0,n]:[n,0]).domain(m?[a,o]:[o,a]).clamp(b);return!0===v?x.nice():"number"==typeof v&&x.nice(v),dP(x,p)}(e,t,n,r);case"point":return function(e,t,n){var r=$C().range([0,n]).domain(t.all);return r.type="point",r}(0,t,n);case"band":return function(e,t,n,r){var o=e.round,i=void 0===o||o,a=NC().range("x"===r?[0,n]:[n,0]).domain(t.all).round(i);return fP(a)}(e,t,n,r);case"time":return function(e,t,n){var r,o,i=e.format,a=void 0===i?"native":i,s=e.precision,l=void 0===s?"millisecond":s,c=e.min,u=void 0===c?"auto":c,d=e.max,f=void 0===d?"auto":d,p=e.useUTC,h=void 0===p||p,m=e.nice,g=void 0!==m&&m,b=uP({format:a,precision:l,useUTC:h});r="auto"===u?b(t.min):"native"!==a?b(u):u,o="auto"===f?b(t.max):"native"!==a?b(f):f;var y=h?function(){return oy.apply(RM(PM,TM,CM,SM,hM,rM,tM,JC,KC,Rw).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}():function(){return oy.apply(RM(OM,jM,kM,wM,aM,nM,eM,ZC,KC,Dw).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}();y.range([0,n]),r&&o&&y.domain([r,o]),!0===g?y.nice():"object"!=typeof g&&"number"!=typeof g||y.nice(g);var v=y;return v.type="time",v.useUTC=h,v}(e,t,n);case"log":return function(e,t,n,r){var o,i=e.base,a=void 0===i?10:i,s=e.min,l=void 0===s?"auto":s,c=e.max,u=void 0===c?"auto":c;if(t.all.some(function(e){return 0===e}))throw new Error("a log scale domain must not include or cross zero");var d,f,p=!1;if(t.all.filter(function(e){return null!=e}).forEach(function(e){p||(void 0===o?o=Math.sign(e):Math.sign(e)!==o&&(p=!0))}),p)throw new Error("a log scale domain must be strictly-positive or strictly-negative");d="auto"===l?t.min:l,f="auto"===u?t.max:u;var h=$M().domain([d,f]).rangeRound("x"===r?[0,n]:[n,0]).base(a).nice();return h.type="log",h}(e,t,n,r);case"symlog":return function(e,t,n,r){var o,i,a=e.constant,s=void 0===a?1:a,l=e.min,c=void 0===l?"auto":l,u=e.max,d=void 0===u?"auto":u,f=e.reverse,p=void 0!==f&&f;o="auto"===c?t.min:c,i="auto"===d?t.max:d;var h=WM().constant(s).rangeRound("x"===r?[0,n]:[n,0]).nice();!0===p?h.domain([i,o]):h.domain([o,i]);var m=h;return m.type="symlog",m}(e,t,n,r);default:throw new Error("invalid scale spec")}}var gP=function(e,t,n){var r;if("stacked"in n&&n.stacked){var o=e.data["x"===t?"xStacked":"yStacked"];return null==o?null:n(o)}return null!=(r=n(e.data[t]))?r:null},bP=function(e,t,n,r,o){var i=e.map(function(e){return function(e){return sP({},e,{data:e.data.map(function(e){return{data:sP({},e)}})})}(e)}),a=yP(i,t,n);"stacked"in t&&!0===t.stacked&&wP(a,i),"stacked"in n&&!0===n.stacked&&SP(a,i);var s=mP(t,a.x,r,"x"),l=mP(n,a.y,o,"y"),c=i.map(function(e){return sP({},e,{data:e.data.map(function(e){return sP({},e,{position:{x:gP(e,"x",s),y:gP(e,"y",l)}})})})});return sP({},a,{series:c,xScale:s,yScale:l})},yP=function(e,t,n){return{x:vP(e,"x",t),y:vP(e,"y",n)}},vP=function(e,t,n,r){var o=void 0===r?{}:r,i=o.getValue,a=void 0===i?function(e){return e.data[t]}:i,s=o.setValue,l=void 0===s?function(e,n){e.data[t]=n}:s;if("linear"===n.type)e.forEach(function(e){e.data.forEach(function(e){var t=a(e);t&&l(e,parseFloat(String(t)))})});else if("time"===n.type&&"native"!==n.format){var c=uP(n);e.forEach(function(e){e.data.forEach(function(e){var t=a(e);t&&l(e,c(t))})})}var u=[];switch(e.forEach(function(e){e.data.forEach(function(e){u.push(a(e))})}),n.type){case"linear":var d=iC(rC(u).filter(function(e){return null!==e}),function(e){return e});return{all:d,min:Math.min.apply(Math,d),max:Math.max.apply(Math,d)};case"time":var f=oC(u,function(e){return e.getTime()}).slice(0).sort(function(e,t){return t.getTime()-e.getTime()}).reverse();return{all:f,min:f[0],max:Dx(f)};default:var p=rC(u);return{all:p,min:p[0],max:Dx(p)}}},xP=function(e,t,n){var r=function(e){return"x"===e?"y":"x"}(e),o=[];t[r].all.forEach(function(t){var i=aC(t)?hP:pP,a=[];n.forEach(function(n){var s=n.data.find(function(e){return i(e.data[r],t)}),l=null,c=null;if(void 0!==s){if(null!==(l=s.data[e])){var u=Dx(a);void 0===u?c=l:null!==u&&(c=u+l)}s.data["x"===e?"xStacked":"yStacked"]=c}a.push(c),null!==c&&o.push(c)})}),t[e].minStacked=Math.min.apply(Math,o),t[e].maxStacked=Math.max.apply(Math,o)},wP=function(e,t){return xP("x",e,t)},SP=function(e,t){return xP("y",e,t)},kP=function(e){var t=e.bandwidth();if(0===t)return e;var n=t/2;return e.round()&&(n=Math.round(n)),function(t){var r;return(null!=(r=e(t))?r:0)+n}},CP={millisecond:[qM,qM],second:[UM,UM],minute:[XM,KM],hour:[JM,tP],day:[Xx(function(e){return e.setHours(0,0,0,0)},function(e,t){return e.setDate(e.getDate()+t)},function(e,t){return(t.getTime()-e.getTime())/864e5},function(e){return Math.floor(e.getTime()/864e5)}),Xx(function(e){return e.setUTCHours(0,0,0,0)},function(e,t){return e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t.getTime()-e.getTime())/864e5},function(e){return Math.floor(e.getTime()/864e5)})],week:[fw,nw],sunday:[fw,nw],monday:[pw,rw],tuesday:[hw,ow],wednesday:[mw,iw],thursday:[gw,aw],friday:[bw,sw],saturday:[yw,lw],month:[rP,aP],year:[Cw,Pw]},MP=Object.keys(CP),PP=new RegExp("^every\\s*(\\d+)?\\s*("+MP.join("|")+")s?$","i"),TP=function(e,t){if(Array.isArray(t))return t;if("string"==typeof t&&"useUTC"in e){var n=t.match(PP);if(n){var r=n[1],o=n[2],i=CP[o][e.useUTC?1:0];if("day"===o){var a,s,l=e.domain(),c=l[0],u=l[1],d=new Date(u);return d.setDate(d.getDate()+1),null!=(a=null==(s=i.every(Number(null!=r?r:1)))?void 0:s.range(c,d))?a:[]}if(void 0===r)return e.ticks(i);var f=i.every(Number(r));if(f)return e.ticks(f)}throw new Error("Invalid tickValues: "+t)}if("ticks"in e){if(void 0===t)return e.ticks();if("number"==typeof(p=t)&&isFinite(p)&&Math.floor(p)===p)return e.ticks(t)}var p;return e.domain()};function OP(){return OP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},OP.apply(this,arguments)}var jP=function(e){var t,n=e.axis,r=e.scale,o=e.ticksPosition,i=e.tickValues,a=e.tickSize,s=e.tickPadding,l=e.tickRotation,c=e.truncateTickAt,u=e.engine,d=void 0===u?"svg":u,f=TP(r,i),p=Lk[d],h="bandwidth"in r?kP(r):r,m={lineX:0,lineY:0},g={textX:0,textY:0},b="object"==typeof document&&"rtl"===document.dir,y=p.align.center,v=p.baseline.center;return"x"===n?(t=function(e){var t;return{x:null!=(t=h(e))?t:0,y:0}},m.lineY=a*("after"===o?1:-1),g.textY=(a+s)*("after"===o?1:-1),v="after"===o?p.baseline.top:p.baseline.bottom,0===l?y=p.align.center:"after"===o&&l<0||"before"===o&&l>0?(y=p.align[b?"left":"right"],v=p.baseline.center):("after"===o&&l>0||"before"===o&&l<0)&&(y=p.align[b?"right":"left"],v=p.baseline.center)):(t=function(e){var t;return{x:0,y:null!=(t=h(e))?t:0}},m.lineX=a*("after"===o?1:-1),g.textX=(a+s)*("after"===o?1:-1),y="after"===o?p.align.left:p.align.right),{ticks:f.map(function(e){var n="string"==typeof e?function(e){var t=String(e).length;return c&&c>0&&t>c?""+String(e).slice(0,c).concat("..."):""+e}(e):e;return OP({key:e instanceof Date?""+e.valueOf():""+e,value:n},t(e),m,g)}),textAlign:y,textBaseline:v}},_P=function(e,t){if(void 0===e||"function"==typeof e)return e;if("time"===t.type){var n=Dw(e);return function(e){return n(e instanceof Date?e:new Date(e))}}return Wx(e)},DP=function(e){var t,n=e.width,r=e.height,o=e.scale,i=e.axis,a=e.values,s=(t=a,(Array.isArray(t)?a:void 0)||TP(o,a)),l="bandwidth"in o?kP(o):o,c="x"===i?s.map(function(e){var t,n;return{key:e instanceof Date?""+e.valueOf():""+e,x1:null!=(t=l(e))?t:0,x2:null!=(n=l(e))?n:0,y1:0,y2:r}}):s.map(function(e){var t,r;return{key:e instanceof Date?""+e.valueOf():""+e,x1:0,x2:n,y1:null!=(t=l(e))?t:0,y2:null!=(r=l(e))?r:0}});return c},EP=(0,G.memo)(function(e){var t,n=e.value,r=e.format,o=e.lineX,i=e.lineY,a=e.onClick,s=e.textBaseline,l=e.textAnchor,c=e.animatedProps,u=Ck(),d=u.axis.ticks.line,f=u.axis.ticks.text,p=null!=(t=null==r?void 0:r(n))?t:n,h=(0,G.useMemo)(function(){var e={opacity:c.opacity};return a?{style:OP({},e,{cursor:"pointer"}),onClick:function(e){return a(e,p)}}:{style:e}},[c.opacity,a,p]);return(0,le.jsxs)(Dg.g,OP({transform:c.transform},h,{children:[(0,le.jsx)("line",{x1:0,x2:o,y1:0,y2:i,style:d}),f.outlineWidth>0&&(0,le.jsx)(Dg.text,{dominantBaseline:s,textAnchor:l,transform:c.textTransform,style:f,strokeWidth:2*f.outlineWidth,stroke:f.outlineColor,strokeLinejoin:"round",children:""+p}),(0,le.jsx)(Dg.text,{dominantBaseline:s,textAnchor:l,transform:c.textTransform,style:Pk(f),children:""+p})]}))}),RP=(0,G.memo)(function(e){var t=e.axis,n=e.scale,r=e.x,o=void 0===r?0:r,i=e.y,a=void 0===i?0:i,s=e.length,l=e.ticksPosition,c=e.tickValues,u=e.tickSize,d=void 0===u?5:u,f=e.tickPadding,p=void 0===f?5:f,h=e.tickRotation,m=void 0===h?0:h,g=e.format,b=e.renderTick,y=void 0===b?EP:b,v=e.truncateTickAt,x=e.legend,w=e.legendPosition,S=void 0===w?"end":w,k=e.legendOffset,C=void 0===k?0:k,M=e.onClick,P=e.ariaHidden,T=Ck(),O=T.axis.legend.text,j=(0,G.useMemo)(function(){return _P(g,n)},[g,n]),_=jP({axis:t,scale:n,ticksPosition:l,tickValues:c,tickSize:d,tickPadding:p,tickRotation:m,truncateTickAt:v}),D=_.ticks,E=_.textAlign,R=_.textBaseline,A=null;if(void 0!==x){var I,F=0,L=0,N=0;"y"===t?(N=-90,F=C,"start"===S?(I="start",L=s):"middle"===S?(I="middle",L=s/2):"end"===S&&(I="end")):(L=C,"start"===S?I="start":"middle"===S?(I="middle",F=s/2):"end"===S&&(I="end",F=s)),A=(0,le.jsxs)(le.Fragment,{children:[O.outlineWidth>0&&(0,le.jsx)("text",{transform:"translate("+F+", "+L+") rotate("+N+")",textAnchor:I,style:OP({dominantBaseline:"central"},O),strokeWidth:2*O.outlineWidth,stroke:O.outlineColor,strokeLinejoin:"round",children:x}),(0,le.jsx)("text",{transform:"translate("+F+", "+L+") rotate("+N+")",textAnchor:I,style:OP({dominantBaseline:"central"},O),children:x})]})}var z=lk(),$=z.animate,V=z.config,B=ug({transform:"translate("+o+","+a+")",lineX2:"x"===t?s:0,lineY2:"x"===t?0:s,config:V,immediate:!$}),W=(0,G.useCallback)(function(e){return{opacity:1,transform:"translate("+e.x+","+e.y+")",textTransform:"translate("+e.textX+","+e.textY+") rotate("+m+")"}},[m]),H=dg(D,{keys:function(e){return e.key},initial:W,from:(0,G.useCallback)(function(e){return{opacity:0,transform:"translate("+e.x+","+e.y+")",textTransform:"translate("+e.textX+","+e.textY+") rotate("+m+")"}},[m]),enter:W,update:W,leave:{opacity:0},config:V,immediate:!$});return(0,le.jsxs)(Dg.g,{transform:B.transform,"aria-hidden":P,children:[H(function(e,t,n,r){return G.createElement(y,OP({tickIndex:r,format:j,rotate:m,textBaseline:R,textAnchor:E,truncateTickAt:v,animatedProps:e},t,M?{onClick:M}:{}))}),(0,le.jsx)(Dg.line,{style:T.axis.domain.line,x1:0,x2:B.lineX2,y1:0,y2:B.lineY2}),A]})}),AP=["top","right","bottom","left"],IP=(0,G.memo)(function(e){var t=e.xScale,n=e.yScale,r=e.width,o=e.height,i={top:e.top,right:e.right,bottom:e.bottom,left:e.left};return(0,le.jsx)(le.Fragment,{children:AP.map(function(e){var a=i[e];if(!a)return null;var s="top"===e||"bottom"===e;return(0,le.jsx)(RP,OP({},a,{axis:s?"x":"y",x:"right"===e?r:0,y:"bottom"===e?o:0,scale:s?t:n,length:s?r:o,ticksPosition:"top"===e||"left"===e?"before":"after",truncateTickAt:a.truncateTickAt}),e)})})}),FP=(0,G.memo)(function(e){var t=e.animatedProps,n=Ck();return(0,le.jsx)(Dg.line,OP({},t,n.grid.line))}),LP=(0,G.memo)(function(e){var t=e.lines,n=lk(),r=n.animate,o=dg(t,{keys:function(e){return e.key},initial:function(e){return{opacity:1,x1:e.x1,x2:e.x2,y1:e.y1,y2:e.y2}},from:function(e){return{opacity:0,x1:e.x1,x2:e.x2,y1:e.y1,y2:e.y2}},enter:function(e){return{opacity:1,x1:e.x1,x2:e.x2,y1:e.y1,y2:e.y2}},update:function(e){return{opacity:1,x1:e.x1,x2:e.x2,y1:e.y1,y2:e.y2}},leave:{opacity:0},config:n.config,immediate:!r});return(0,le.jsx)("g",{children:o(function(e,t){return(0,G.createElement)(FP,OP({},t,{key:t.key,animatedProps:e}))})})}),NP=(0,G.memo)(function(e){var t=e.width,n=e.height,r=e.xScale,o=e.yScale,i=e.xValues,a=e.yValues,s=(0,G.useMemo)(function(){return!!r&&DP({width:t,height:n,scale:r,axis:"x",values:i})},[r,i,t,n]),l=(0,G.useMemo)(function(){return!!o&&DP({width:t,height:n,scale:o,axis:"y",values:a})},[n,t,o,a]);return(0,le.jsxs)(le.Fragment,{children:[s&&(0,le.jsx)(LP,{lines:s}),l&&(0,le.jsx)(LP,{lines:l})]})}),zP=function(e,t){var n=t.xScale,r=t.yScale,o=t.width,i=t.height,a=t.top,s=t.right,l=t.bottom,c=t.left,u=t.theme,d={top:a,right:s,bottom:l,left:c};AP.forEach(function(t){var a=d[t];if(!a)return null;var s="top"===t||"bottom"===t,l="top"===t||"left"===t?"before":"after",c=s?n:r,f=_P(a.format,c);!function(e,t){var n,r=t.axis,o=t.scale,i=t.x,a=void 0===i?0:i,s=t.y,l=void 0===s?0:s,c=t.length,u=t.ticksPosition,d=t.tickValues,f=t.tickSize,p=void 0===f?5:f,h=t.tickPadding,m=void 0===h?5:h,g=t.tickRotation,b=void 0===g?0:g,y=t.format,v=t.legend,x=t.legendPosition,w=void 0===x?"end":x,S=t.legendOffset,k=void 0===S?0:S,C=t.theme,M=jP({axis:r,scale:o,ticksPosition:u,tickValues:d,tickSize:p,tickPadding:m,tickRotation:b,engine:"canvas"}),P=M.ticks,T=M.textAlign,O=M.textBaseline;e.save(),e.translate(a,l),e.textAlign=T,e.textBaseline=O;var j=C.axis.ticks.text;e.font=(j.fontWeight?j.fontWeight+" ":"")+j.fontSize+"px "+j.fontFamily,(null!=(n=C.axis.domain.line.strokeWidth)?n:0)>0&&(e.lineWidth=Number(C.axis.domain.line.strokeWidth),e.lineCap="square",C.axis.domain.line.stroke&&(e.strokeStyle=C.axis.domain.line.stroke),e.beginPath(),e.moveTo(0,0),e.lineTo("x"===r?c:0,"x"===r?0:c),e.stroke());var _="function"==typeof y?y:function(e){return""+e};if(P.forEach(function(t){var n;(null!=(n=C.axis.ticks.line.strokeWidth)?n:0)>0&&(e.lineWidth=Number(C.axis.ticks.line.strokeWidth),e.lineCap="square",C.axis.ticks.line.stroke&&(e.strokeStyle=C.axis.ticks.line.stroke),e.beginPath(),e.moveTo(t.x,t.y),e.lineTo(t.x+t.lineX,t.y+t.lineY),e.stroke());var r=_(t.value);e.save(),e.translate(t.x+t.textX,t.y+t.textY),e.rotate(Ak(b)),j.outlineWidth>0&&(e.strokeStyle=j.outlineColor,e.lineWidth=2*j.outlineWidth,e.lineJoin="round",e.strokeText(""+r,0,0)),C.axis.ticks.text.fill&&(e.fillStyle=j.fill),e.fillText(""+r,0,0),e.restore()}),void 0!==v){var D=0,E=0,R=0,A="center";"y"===r?(R=-90,D=k,"start"===w?(A="start",E=c):"middle"===w?(A="center",E=c/2):"end"===w&&(A="end")):(E=k,"start"===w?A="start":"middle"===w?(A="center",D=c/2):"end"===w&&(A="end",D=c)),e.translate(D,E),e.rotate(Ak(R)),e.font=(C.axis.legend.text.fontWeight?C.axis.legend.text.fontWeight+" ":"")+C.axis.legend.text.fontSize+"px "+C.axis.legend.text.fontFamily,C.axis.legend.text.fill&&(e.fillStyle=C.axis.legend.text.fill),e.textAlign=A,e.textBaseline="middle",e.fillText(v,0,0)}e.restore()}(e,OP({},a,{axis:s?"x":"y",x:"right"===t?o:0,y:"bottom"===t?i:0,scale:c,format:f,length:s?o:i,ticksPosition:l,theme:u}))})},$P=function(e,t){var n=t.width,r=t.height,o=t.scale,i=t.axis,a=t.values;DP({width:n,height:r,scale:o,axis:i,values:a}).forEach(function(t){e.beginPath(),e.moveTo(t.x1,t.y1),e.lineTo(t.x2,t.y2),e.stroke()})},VP=a(7612),BP=a(8023),WP=a(179);function HP(){return HP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},HP.apply(this,arguments)}var qP=function(e){return"circle"===e.type},YP=function(e){return"dot"===e.type},UP=function(e){return"rect"===e.type},GP=function(e){var t,n,r=e.x,o=e.y,i=e.noteX,a=e.noteY,s=e.noteWidth,l=void 0===s?120:s,c=e.noteTextOffset,u=void 0===c?8:c;if(BP(i))t=r+i;else{if(void 0===i.abs)throw new Error("noteX should be either a number or an object containing an 'abs' property");t=i.abs}if(BP(a))n=o+a;else{if(void 0===a.abs)throw new Error("noteY should be either a number or an object containing an 'abs' property");n=a.abs}var d=r,f=o,p=function(e,t,n,r){var o=Math.atan2(r-t,n-e);return function(e){var t=e%360;return t<0&&(t+=360),t}(Ik(o))}(r,o,t,n);if(qP(e)){var h=Fk(Ak(p),e.size/2);d+=h.x,f+=h.y}if(UP(e)){var m=Math.round((p+90)/45)%8;0===m&&(f-=e.height/2),1===m&&(d+=e.width/2,f-=e.height/2),2===m&&(d+=e.width/2),3===m&&(d+=e.width/2,f+=e.height/2),4===m&&(f+=e.height/2),5===m&&(d-=e.width/2,f+=e.height/2),6===m&&(d-=e.width/2),7===m&&(d-=e.width/2,f-=e.height/2)}var g=t,b=t;return(p+90)%360>180?(g-=l,b-=l):b+=l,{points:[[d,f],[t,n],[b,n]],text:[g,n-u],angle:p+90}},XP=function(e){var t=e.data,n=e.annotations,r=e.getPosition,o=e.getDimensions;return(0,G.useMemo)(function(){return function(e){var t=e.data,n=e.getPosition,r=e.getDimensions;return e.annotations.reduce(function(e,o){var i=o.offset||0;return[].concat(e,VP(t,o.match).map(function(e){var t=n(e),a=r(e);return(qP(o)||UP(o))&&(a.size=a.size+2*i,a.width=a.width+2*i,a.height=a.height+2*i),HP({},WP(o,["match","offset"]),t,a,{size:o.size||a.size,datum:e})}))},[])}({data:t,annotations:n,getPosition:r,getDimensions:o})},[t,n,r,o])},QP=function(e){var t=e.datum,n=e.x,r=e.y,o=e.note,i=Ck(),a=lk(),s=a.animate,l=ug({x:n,y:r,config:a.config,immediate:!s});return"function"==typeof o?(0,G.createElement)(o,{x:n,y:r,datum:t}):(0,le.jsxs)(le.Fragment,{children:[i.annotations.text.outlineWidth>0&&(0,le.jsx)(Dg.text,{x:l.x,y:l.y,style:HP({},i.annotations.text,{strokeLinejoin:"round",strokeWidth:2*i.annotations.text.outlineWidth,stroke:i.annotations.text.outlineColor}),children:o}),(0,le.jsx)(Dg.text,{x:l.x,y:l.y,style:WP(i.annotations.text,["outlineWidth","outlineColor"]),children:o})]})},KP=function(e){var t=e.points,n=e.isOutline,r=void 0!==n&&n,o=Ck(),i=(0,G.useMemo)(function(){var e=t[0];return t.slice(1).reduce(function(e,t){return e+" L"+t[0]+","+t[1]},"M"+e[0]+","+e[1])},[t]),a=ck(i);if(r&&o.annotations.link.outlineWidth<=0)return null;var s=HP({},o.annotations.link);return r&&(s.strokeLinecap="square",s.strokeWidth=o.annotations.link.strokeWidth+2*o.annotations.link.outlineWidth,s.stroke=o.annotations.link.outlineColor,s.opacity=o.annotations.link.outlineOpacity),(0,le.jsx)(Dg.path,{fill:"none",d:a,style:s})},ZP=function(e){var t=e.x,n=e.y,r=e.size,o=Ck(),i=lk(),a=i.animate,s=ug({x:t,y:n,radius:r/2,config:i.config,immediate:!a});return(0,le.jsxs)(le.Fragment,{children:[o.annotations.outline.outlineWidth>0&&(0,le.jsx)(Dg.circle,{cx:s.x,cy:s.y,r:s.radius,style:HP({},o.annotations.outline,{fill:"none",strokeWidth:o.annotations.outline.strokeWidth+2*o.annotations.outline.outlineWidth,stroke:o.annotations.outline.outlineColor,opacity:o.annotations.outline.outlineOpacity})}),(0,le.jsx)(Dg.circle,{cx:s.x,cy:s.y,r:s.radius,style:o.annotations.outline})]})},JP=function(e){var t=e.x,n=e.y,r=e.size,o=void 0===r?4:r,i=Ck(),a=lk(),s=a.animate,l=ug({x:t,y:n,radius:o/2,config:a.config,immediate:!s});return(0,le.jsxs)(le.Fragment,{children:[i.annotations.outline.outlineWidth>0&&(0,le.jsx)(Dg.circle,{cx:l.x,cy:l.y,r:l.radius,style:HP({},i.annotations.outline,{fill:"none",strokeWidth:2*i.annotations.outline.outlineWidth,stroke:i.annotations.outline.outlineColor,opacity:i.annotations.outline.outlineOpacity})}),(0,le.jsx)(Dg.circle,{cx:l.x,cy:l.y,r:l.radius,style:i.annotations.symbol})]})},eT=function(e){var t=e.x,n=e.y,r=e.width,o=e.height,i=e.borderRadius,a=void 0===i?6:i,s=Ck(),l=lk(),c=l.animate,u=ug({x:t-r/2,y:n-o/2,width:r,height:o,config:l.config,immediate:!c});return(0,le.jsxs)(le.Fragment,{children:[s.annotations.outline.outlineWidth>0&&(0,le.jsx)(Dg.rect,{x:u.x,y:u.y,rx:a,ry:a,width:u.width,height:u.height,style:HP({},s.annotations.outline,{fill:"none",strokeWidth:s.annotations.outline.strokeWidth+2*s.annotations.outline.outlineWidth,stroke:s.annotations.outline.outlineColor,opacity:s.annotations.outline.outlineOpacity})}),(0,le.jsx)(Dg.rect,{x:u.x,y:u.y,rx:a,ry:a,width:u.width,height:u.height,style:s.annotations.outline})]})},tT=function(e){var t=e.datum,n=e.x,r=e.y,o=e.note,i=function(e){return(0,G.useMemo)(function(){return GP(e)},[e])}(e);if(!function(e){var t=typeof e;return(0,G.isValidElement)(e)||"string"===t||"function"===t||"object"===t}(o))throw new Error("note should be a valid react element");return(0,le.jsxs)(le.Fragment,{children:[(0,le.jsx)(KP,{points:i.points,isOutline:!0}),qP(e)&&(0,le.jsx)(ZP,{x:n,y:r,size:e.size}),YP(e)&&(0,le.jsx)(JP,{x:n,y:r,size:e.size}),UP(e)&&(0,le.jsx)(eT,{x:n,y:r,width:e.width,height:e.height,borderRadius:e.borderRadius}),(0,le.jsx)(KP,{points:i.points}),(0,le.jsx)(QP,{datum:t,x:i.text[0],y:i.text[1],note:o})]})},nT=function(e,t){t.forEach(function(t,n){var r=t[0],o=t[1];0===n?e.moveTo(r,o):e.lineTo(r,o)})},rT=function(e,t){var n=t.annotations,r=t.theme;0!==n.length&&(e.save(),n.forEach(function(t){if(!function(e){var t=typeof e;return"string"===t||"function"===t}(t.note))throw new Error("note is invalid for canvas implementation");r.annotations.link.outlineWidth>0&&(e.lineCap="square",e.strokeStyle=r.annotations.link.outlineColor,e.lineWidth=r.annotations.link.strokeWidth+2*r.annotations.link.outlineWidth,e.beginPath(),nT(e,t.computed.points),e.stroke(),e.lineCap="butt"),qP(t)&&r.annotations.outline.outlineWidth>0&&(e.strokeStyle=r.annotations.outline.outlineColor,e.lineWidth=r.annotations.outline.strokeWidth+2*r.annotations.outline.outlineWidth,e.beginPath(),e.arc(t.x,t.y,t.size/2,0,2*Math.PI),e.stroke()),YP(t)&&r.annotations.symbol.outlineWidth>0&&(e.strokeStyle=r.annotations.symbol.outlineColor,e.lineWidth=2*r.annotations.symbol.outlineWidth,e.beginPath(),e.arc(t.x,t.y,t.size/2,0,2*Math.PI),e.stroke()),UP(t)&&r.annotations.outline.outlineWidth>0&&(e.strokeStyle=r.annotations.outline.outlineColor,e.lineWidth=r.annotations.outline.strokeWidth+2*r.annotations.outline.outlineWidth,e.beginPath(),e.rect(t.x-t.width/2,t.y-t.height/2,t.width,t.height),e.stroke()),e.strokeStyle=r.annotations.link.stroke,e.lineWidth=r.annotations.link.strokeWidth,e.beginPath(),nT(e,t.computed.points),e.stroke(),qP(t)&&(e.strokeStyle=r.annotations.outline.stroke,e.lineWidth=r.annotations.outline.strokeWidth,e.beginPath(),e.arc(t.x,t.y,t.size/2,0,2*Math.PI),e.stroke()),YP(t)&&(e.fillStyle=r.annotations.symbol.fill,e.beginPath(),e.arc(t.x,t.y,t.size/2,0,2*Math.PI),e.fill()),UP(t)&&(e.strokeStyle=r.annotations.outline.stroke,e.lineWidth=r.annotations.outline.strokeWidth,e.beginPath(),e.rect(t.x-t.width/2,t.y-t.height/2,t.width,t.height),e.stroke()),"function"==typeof t.note?t.note(e,{datum:t.datum,x:t.computed.text[0],y:t.computed.text[1],theme:r}):(e.font=r.annotations.text.fontSize+"px "+r.annotations.text.fontFamily,e.textAlign="left",e.textBaseline="alphabetic",e.fillStyle=r.annotations.text.fill,e.strokeStyle=r.annotations.text.outlineColor,e.lineWidth=2*r.annotations.text.outlineWidth,r.annotations.text.outlineWidth>0&&(e.lineJoin="round",e.strokeText(t.note,t.computed.text[0],t.computed.text[1]),e.lineJoin="miter"),e.fillText(t.note,t.computed.text[0],t.computed.text[1]))}),e.restore())};function oT(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function iT(){var e=FC(function(){var e,t,n,r,o,i=0,a=1,s=jC,l=!1;function c(t){return null==t||isNaN(t=+t)?o:s(0===n?.5:(t=(r(t)-e)*n,l?Math.max(0,Math.min(1,t)):t))}function u(e){return function(t){var n,r;return arguments.length?([n,r]=t,s=e(n,r),c):[s(0),s(1)]}}return c.domain=function(o){return arguments.length?([i,a]=o,e=r(i=+i),t=r(a=+a),n=e===t?0:1/(t-e),c):[i,a]},c.clamp=function(e){return arguments.length?(l=!!e,c):l},c.interpolator=function(e){return arguments.length?(s=e,c):s},c.range=u(MC),c.rangeRound=u(PC),c.unknown=function(e){return arguments.length?(o=e,c):o},function(o){return r=o,e=o(i),t=o(a),n=e===t?0:1/(t-e),c}}()(jC));return e.copy=function(){return oT(e,iT())},iy.apply(e,arguments)}function aT(){var e=FC(function(){var e,t,n,r,o,i,a,s=0,l=.5,c=1,u=1,d=jC,f=!1;function p(e){return isNaN(e=+e)?a:(e=.5+((e=+i(e))-t)*(u*e<u*t?r:o),d(f?Math.max(0,Math.min(1,e)):e))}function h(e){return function(t){var n,r,o;return arguments.length?([n,r,o]=t,d=function(e,t){void 0===t&&(t=e,e=MC);for(var n=0,r=t.length-1,o=t[0],i=new Array(r<0?0:r);n<r;)i[n]=e(o,o=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return i[t](e-t)}}(e,[n,r,o]),p):[d(0),d(.5),d(1)]}}return p.domain=function(a){return arguments.length?([s,l,c]=a,e=i(s=+s),t=i(l=+l),n=i(c=+c),r=e===t?0:.5/(t-e),o=t===n?0:.5/(n-t),u=t<e?-1:1,p):[s,l,c]},p.clamp=function(e){return arguments.length?(f=!!e,p):f},p.interpolator=function(e){return arguments.length?(d=e,p):d},p.range=h(MC),p.rangeRound=h(PC),p.unknown=function(e){return arguments.length?(a=e,p):a},function(a){return i=a,e=a(s),t=a(l),n=a(c),r=e===t?0:.5/(t-e),o=t===n?0:.5/(n-t),u=t<e?-1:1,p}}()(jC));return e.copy=function(){return oT(e,aT())},iy.apply(e,arguments)}function sT(){var e,t=0,n=1,r=1,o=[.5],i=[0,1];function a(t){return null!=t&&t<=t?i[xC(o,t,0,r)]:e}function s(){var e=-1;for(o=new Array(r);++e<r;)o[e]=((e+1)*n-(e-r)*t)/(r+1);return a}return a.domain=function(e){return arguments.length?([t,n]=e,t=+t,n=+n,s()):[t,n]},a.range=function(e){return arguments.length?(r=(i=Array.from(e)).length-1,s()):i.slice()},a.invertExtent=function(e){var a=i.indexOf(e);return a<0?[NaN,NaN]:a<1?[t,o[0]]:a>=r?[o[r-1],n]:[o[a-1],o[a]]},a.unknown=function(t){return arguments.length?(e=t,a):a},a.thresholds=function(){return o.slice()},a.copy=function(){return sT().domain([t,n]).range(i).unknown(e)},oy.apply(FC(a),arguments)}function lT(){return lT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lT.apply(this,arguments)}function cT(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var uT={nivo:["#e8c1a0","#f47560","#f1e15b","#e8a838","#61cdbb","#97e3d5"],category10:Zv,accent:Jv,dark2:ex,paired:tx,pastel1:nx,pastel2:rx,set1:ox,set2:ix,set3:ax,tableau10:ly("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")},dT=Object.keys(uT),fT={brown_blueGreen:Zy,purpleRed_green:ev,pink_yellowGreen:nv,purple_orange:ov,red_blue:av,red_grey:lv,red_yellow_blue:uv,red_yellow_green:fv,spectral:hv},pT=Object.keys(fT),hT={brown_blueGreen:Jy,purpleRed_green:tv,pink_yellowGreen:rv,purple_orange:iv,red_blue:sv,red_grey:cv,red_yellow_blue:dv,red_yellow_green:pv,spectral:mv},mT={blues:gv,greens:yv,greys:xv,oranges:Sv,purples:Cv,reds:Pv,blue_green:Ov,blue_purple:_v,green_blue:Ev,orange_red:Av,purple_blue_green:Fv,purple_blue:Nv,purple_red:$v,red_purple:Bv,yellow_green_blue:Hv,yellow_green:Yv,yellow_orange_brown:Gv,yellow_orange_red:Qv},gT=Object.keys(mT),bT={blues:bv,greens:vv,greys:wv,oranges:kv,purples:Mv,reds:Tv,turbo:function(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-14825.05*e)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+707.56*e)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-6838.66*e)))))))+")"},viridis:lx,inferno:ux,magma:cx,plasma:dx,cividis:function(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-e*(35.34-e*(2381.73-e*(6402.7-e*(7024.72-2710.57*e)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+e*(170.73+e*(52.82-e*(131.46-e*(176.58-67.37*e)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+e*(442.36-e*(2482.43-e*(6167.24-e*(6614.94-2475.67*e)))))))+")"},warm:Cx,cool:Mx,cubehelixDefault:Tx,blue_green:jv,blue_purple:Dv,green_blue:Rv,orange_red:Iv,purple_blue_green:Lv,purple_blue:zv,purple_red:Vv,red_purple:Wv,yellow_green_blue:qv,yellow_green:Uv,yellow_orange_brown:Xv,yellow_orange_red:Kv},yT=lT({},uT,fT,mT),vT=(Object.keys(yT),lT({},hT,bT,{rainbow:function(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return Px.h=360*e-100,Px.s=1.5-1.5*t,Px.l=.8-.9*t,Px+""},sinebow:function(e){var t;return e=(.5-e)*Math.PI,Ox.r=255*(t=Math.sin(e))*t,Ox.g=255*(t=Math.sin(e+jx))*t,Ox.b=255*(t=Math.sin(e+_x))*t,Ox+""}})),xT=(Object.keys(vT),function(e,t){if("function"==typeof e)return e;if(ZS(e)){if(function(e){return void 0!==e.theme}(e)){if(void 0===t)throw new Error("Unable to use color from theme as no theme was provided");var n=Xg(t,e.theme);if(void 0===n)throw new Error("Color from theme is undefined at path: '"+e.theme+"'");return function(){return n}}if(function(e){return void 0!==e.from}(e)){var r=function(t){return Xg(t,e.from)};if(Array.isArray(e.modifiers)){for(var o,i=[],a=function(){var e=o.value,t=e[0],n=e[1];if("brighter"===t)i.push(function(e){return e.brighter(n)});else if("darker"===t)i.push(function(e){return e.darker(n)});else{if("opacity"!==t)throw new Error("Invalid color modifier: '"+t+"', must be one of: 'brighter', 'darker', 'opacity'");i.push(function(e){return e.opacity=n,e})}},s=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(t)return(t=t.call(e)).next.bind(t);if(Array.isArray(e)||(t=function(e,t){if(e){if("string"==typeof e)return cT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cT(e,t):void 0}}(e))){t&&(e=t);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e.modifiers);!(o=s()).done;)a();return 0===i.length?r:function(e){return i.reduce(function(e,t){return t(e)},Dy(r(e))).toString()}}return r}throw new Error("Invalid color spec, you should either specify 'theme' or 'from' when using a config object")}return function(){return e}}),wT=function(e,t){return(0,G.useMemo)(function(){return xT(e,t)},[e,t])},ST=function(e,t){if(function(e){return"sequential"===e.type}(e))return function(e,t){var n=e.minValue,r=e.maxValue,o=void 0!==n?n:t.min,i=void 0!==r?r:t.max,a=iT().domain([o,i]).clamp(!0);if("colors"in e)a.range(e.colors);else if("interpolator"in e)a.interpolator(e.interpolator);else{var s,l=null!=(s=e.scheme)?s:"turbo";a.interpolator(vT[l])}return a}(e,t);if(function(e){return"diverging"===e.type}(e))return function(e,t){var n,r=e.minValue,o=e.maxValue,i=void 0!==r?r:t.min,a=void 0!==o?o:t.max,s=[i,i+(a-i)/2,a],l=.5-(null!=(n=e.divergeAt)?n:.5),c=aT().domain(s).clamp(!0),u=function(e){return String(e)};if("colors"in e)u=aT().domain(s.map(function(e){return e-l*(a-i)})).range(e.colors).interpolator();else if("interpolator"in e)u=e.interpolator;else{var d,f=null!=(d=e.scheme)?d:"red_yellow_blue";u=vT[f]}return c.interpolator(function(e){return u(e+l)})}(e,t);if(function(e){return"quantize"===e.type}(e))return function(e,t){var n=sT().domain(e.domain||[t.min,t.max]).nice();if("colors"in e)n.range(e.colors);else{var r=e.scheme||"turbo",o=void 0===e.steps?7:e.steps,i=vT[r],a=Array.from({length:o}).map(function(e,t){return i(t*(1/(o-1)))});n.range(a)}return n}(e,t);throw new Error("Invalid continuous color scale config")},kT=function(e,t){return(0,G.useMemo)(function(){return function(e,t){if("function"==typeof e)return e;var n="function"==typeof t?t:function(e){return Xg(e,t)};if(Array.isArray(e)){var r=sy(e),o=function(e){return r(n(e))};return o.scale=r,o}if(ZS(e)){if(function(e){return void 0!==e.datum}(e))return function(t){return Xg(t,e.datum)};if(function(e){return void 0!==e.scheme}(e)){if(function(e){return dT.includes(e)}(e.scheme)){var i=sy(yT[e.scheme]),a=function(e){return i(n(e))};return a.scale=i,a}if(function(e){return pT.includes(e)}(e.scheme)){if(void 0!==e.size&&(e.size<3||e.size>11))throw new Error("Invalid size '"+e.size+"' for diverging color scheme '"+e.scheme+"', must be between 3~11");var s=sy(yT[e.scheme][e.size||11]),l=function(e){return s(n(e))};return l.scale=s,l}if(function(e){return gT.includes(e)}(e.scheme)){if(void 0!==e.size&&(e.size<3||e.size>9))throw new Error("Invalid size '"+e.size+"' for sequential color scheme '"+e.scheme+"', must be between 3~9");var c=sy(yT[e.scheme][e.size||9]),u=function(e){return c(n(e))};return u.scale=c,u}}throw new Error("Invalid colors, when using an object, you should either pass a 'datum' or a 'scheme' property")}return function(){return e}}(e,t)},[e,t])};function CT(){return CT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},CT.apply(this,arguments)}var MT={length:200,thickness:16,direction:"row",tickPosition:"after",tickSize:4,tickSpacing:3,tickOverlap:!1,tickFormat:function(e){return""+e},titleAlign:"start",titleOffset:4},PT={top:0,right:0,bottom:0,left:0},TT=function(e){var t,n=e.direction,r=e.itemsSpacing,o=e.padding,i=e.itemCount,a=e.itemWidth,s=e.itemHeight;if("number"!=typeof o&&("object"!=typeof(t=o)||Array.isArray(t)||null===t))throw new Error("Invalid property padding, must be one of: number, object");var l="number"==typeof o?{top:o,right:o,bottom:o,left:o}:CT({},PT,o),c=l.left+l.right,u=l.top+l.bottom,d=a+c,f=s+u,p=(i-1)*r;return"row"===n?d=a*i+p+c:"column"===n&&(f=s*i+p+u),{width:d,height:f,padding:l}},OT=function(e){var t=e.anchor,n=e.translateX,r=e.translateY,o=e.containerWidth,i=e.containerHeight,a=e.width,s=e.height,l=n,c=r;switch(t){case"top":l+=(o-a)/2;break;case"top-right":l+=o-a;break;case"right":l+=o-a,c+=(i-s)/2;break;case"bottom-right":l+=o-a,c+=i-s;break;case"bottom":l+=(o-a)/2,c+=i-s;break;case"bottom-left":c+=i-s;break;case"left":c+=(i-s)/2;break;case"center":l+=(o-a)/2,c+=(i-s)/2}return{x:l,y:c}},jT=function(e){var t,n,r,o,i,a,s=e.direction,l=e.justify,c=e.symbolSize,u=e.symbolSpacing,d=e.width,f=e.height;switch(s){case"left-to-right":t=0,n=(f-c)/2,o=f/2,a="central",l?(r=d,i="end"):(r=c+u,i="start");break;case"right-to-left":t=d-c,n=(f-c)/2,o=f/2,a="central",l?(r=0,i="start"):(r=d-c-u,i="end");break;case"top-to-bottom":t=(d-c)/2,n=0,r=d/2,i="middle",l?(o=f,a="alphabetic"):(o=c+u,a="text-before-edge");break;case"bottom-to-top":t=(d-c)/2,n=f-c,r=d/2,i="middle",l?(o=0,a="text-before-edge"):(o=f-c-u,a="alphabetic")}return{symbolX:t,symbolY:n,labelX:r,labelY:o,labelAnchor:i,labelAlignment:a}},_T=function(e){var t=e.scale,n=e.ticks,r=e.length,o=void 0===r?MT.length:r,i=e.thickness,a=void 0===i?MT.thickness:i,s=e.direction,l=void 0===s?MT.direction:s,c=e.tickPosition,u=void 0===c?MT.tickPosition:c,d=e.tickSize,f=void 0===d?MT.tickSize:d,p=e.tickSpacing,h=void 0===p?MT.tickSpacing:p,m=e.tickOverlap,g=void 0===m?MT.tickOverlap:m,b=e.tickFormat,y=void 0===b?MT.tickFormat:b,v=e.title,x=e.titleAlign,w=void 0===x?MT.titleAlign:x,S=e.titleOffset,k=function(e){var t,n=e.scale,r=e.ticks,o=e.length,i=void 0===o?MT.length:o,a=e.thickness,s=void 0===a?MT.thickness:a,l=e.direction,c=void 0===l?MT.direction:l,u=e.tickPosition,d=void 0===u?MT.tickPosition:u,f=e.tickSize,p=void 0===f?MT.tickSize:f,h=e.tickSpacing,m=void 0===h?MT.tickSpacing:h,g=e.tickOverlap,b=void 0===g?MT.tickOverlap:g,y=e.tickFormat,v=void 0===y?MT.tickFormat:y,x=e.title,w=e.titleAlign,S=void 0===w?MT.titleAlign:w,k=e.titleOffset,C=void 0===k?MT.titleOffset:k,M="column"===c?[].concat(n.domain()).reverse():n.domain(),P=LC().domain(M);2===M.length?P.range([0,i]):3===M.length&&P.range([0,i/2,i]),t="thresholds"in n?[M[0]].concat(n.thresholds(),[M[1]]):Array.isArray(r)?r:n.ticks(r);var T,O,j,_,D,E,R,A,I,F,L,N,z,$,V=function(e,t){void 0===t&&(t=16);var n=e.domain();if("thresholds"in e){var r=[],o=LC().domain(n).range([0,1]);return e.range().forEach(function(t,n){var i=e.invertExtent(t),a=i[0],s=i[1];r.push({key:n+".0",offset:o(a),stopColor:t}),r.push({key:n+".1",offset:o(s),stopColor:t})}),r}var i=e.copy();return 2===n.length?i.domain([0,1]):3===n.length&&i.domain([0,.5,1]),i.ticks(t).map(function(e){return{key:""+e,offset:e,stopColor:""+i(e)}})}(n,32),B=vk(v),W=[],H=0,q=0;return"row"===c?(T=i,O=s,q=1,D=0,j="start"===S?0:"middle"===S?i/2:i,"before"===d?(R=-p,A=b?s:0,I=-p-m,F="alphabetic",_=s+C,E="hanging"):(R=b?0:s,I=(A=s+p)+m,F="hanging",_=-C,E="alphabetic"),t.forEach(function(e){var t=P(e);W.push({x1:t,y1:R,x2:t,y2:A,text:B(e),textX:t,textY:I,textHorizontalAlign:"middle",textVerticalAlign:F})})):(T=s,O=i,H=1,D=-90,_="start"===S?i:"middle"===S?i/2:0,"before"===d?(N=b?s:0,z=(L=-p)-m,$="end",j=s+C,E="hanging"):(L=b?0:s,z=(N=s+p)+m,$="start",j=-C,E="alphabetic"),t.forEach(function(e){var t=P(e);W.push({x1:L,y1:t,x2:N,y2:t,text:B(e),textX:z,textY:t,textHorizontalAlign:$,textVerticalAlign:"central"})})),{width:T,height:O,gradientX1:0,gradientY1:H,gradientX2:q,gradientY2:0,colorStops:V,ticks:W,titleText:x,titleX:j,titleY:_,titleRotation:D,titleHorizontalAlign:S,titleVerticalAlign:E}}({scale:t,ticks:n,length:o,thickness:a,direction:l,tickPosition:u,tickSize:f,tickSpacing:h,tickOverlap:g,tickFormat:y,title:v,titleAlign:w,titleOffset:void 0===S?MT.titleOffset:S}),C=k.width,M=k.height,P=k.gradientX1,T=k.gradientY1,O=k.gradientX2,j=k.gradientY2,_=k.ticks,D=k.colorStops,E=k.titleText,R=k.titleX,A=k.titleY,I=k.titleRotation,F=k.titleVerticalAlign,L=k.titleHorizontalAlign,N=Ck(),z="ContinuousColorsLegendSvgGradient."+l+"."+D.map(function(e){return e.stopColor.replace(/[(),\s]/g,"")+"."+e.offset}).join("_");return(0,le.jsxs)("g",{children:[(0,le.jsx)("defs",{children:(0,le.jsx)("linearGradient",{id:z,x1:P,y1:T,x2:O,y2:j,children:D.map(function(e){return(0,le.jsx)("stop",CT({},e))})})}),E&&(0,le.jsx)("text",{transform:"translate("+R+", "+A+") rotate("+I+")",textAnchor:L,dominantBaseline:F,style:N.legends.title.text,children:E}),(0,le.jsx)("rect",{width:C,height:M,fill:"url(#"+z}),_.map(function(e,t){return(0,le.jsxs)(G.Fragment,{children:[(0,le.jsx)("line",{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,style:N.legends.ticks.line}),(0,le.jsx)("text",{x:e.textX,y:e.textY,textAnchor:e.textHorizontalAlign,dominantBaseline:e.textVerticalAlign,style:N.legends.ticks.text,children:e.text})]},t)})]})},DT=["containerWidth","containerHeight","anchor","translateX","translateY","length","thickness","direction"],ET=function(e){var t,n,r=e.containerWidth,o=e.containerHeight,i=e.anchor,a=e.translateX,s=void 0===a?0:a,l=e.translateY,c=void 0===l?0:l,u=e.length,d=void 0===u?MT.length:u,f=e.thickness,p=void 0===f?MT.thickness:f,h=e.direction,m=void 0===h?MT.direction:h,g=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,DT);"row"===m?(t=d,n=p):(t=p,n=d);var b=OT({anchor:i,translateX:s,translateY:c,containerWidth:r,containerHeight:o,width:t,height:n}),y=b.x,v=b.y;return(0,le.jsx)("g",{transform:"translate("+y+", "+v+")",children:(0,le.jsx)(_T,CT({length:d,thickness:p,direction:m},g))})},RT={circle:function(e){var t=e.x,n=e.y,r=e.size,o=e.fill,i=e.opacity,a=void 0===i?1:i,s=e.borderWidth,l=void 0===s?0:s,c=e.borderColor;return(0,le.jsx)("circle",{r:r/2,cx:t+r/2,cy:n+r/2,fill:o,opacity:a,strokeWidth:l,stroke:void 0===c?"transparent":c,style:{pointerEvents:"none"}})},diamond:function(e){var t=e.x,n=e.y,r=e.size,o=e.fill,i=e.opacity,a=void 0===i?1:i,s=e.borderWidth,l=void 0===s?0:s,c=e.borderColor;return(0,le.jsx)("g",{transform:"translate("+t+","+n+")",children:(0,le.jsx)("path",{d:"\n M"+r/2+" 0\n L"+.8*r+" "+r/2+"\n L"+r/2+" "+r+"\n L"+.2*r+" "+r/2+"\n L"+r/2+" 0\n ",fill:o,opacity:a,strokeWidth:l,stroke:void 0===c?"transparent":c,style:{pointerEvents:"none"}})})},square:function(e){var t=e.x,n=e.y,r=e.size,o=e.fill,i=e.opacity,a=void 0===i?1:i,s=e.borderWidth,l=void 0===s?0:s,c=e.borderColor;return(0,le.jsx)("rect",{x:t,y:n,fill:o,opacity:a,strokeWidth:l,stroke:void 0===c?"transparent":c,width:r,height:r,style:{pointerEvents:"none"}})},triangle:function(e){var t=e.x,n=e.y,r=e.size,o=e.fill,i=e.opacity,a=void 0===i?1:i,s=e.borderWidth,l=void 0===s?0:s,c=e.borderColor;return(0,le.jsx)("g",{transform:"translate("+t+","+n+")",children:(0,le.jsx)("path",{d:"\n M"+r/2+" 0\n L"+r+" "+r+"\n L0 "+r+"\n L"+r/2+" 0\n ",fill:o,opacity:a,strokeWidth:l,stroke:void 0===c?"transparent":c,style:{pointerEvents:"none"}})})}},AT=function(e){var t,n,r,o,i,a,s,l,c,u,d,f=e.x,p=e.y,h=e.width,m=e.height,g=e.data,b=e.direction,y=void 0===b?"left-to-right":b,v=e.justify,x=void 0!==v&&v,w=e.textColor,S=e.background,k=void 0===S?"transparent":S,C=e.opacity,M=void 0===C?1:C,P=e.symbolShape,T=void 0===P?"square":P,O=e.symbolSize,j=void 0===O?16:O,_=e.symbolSpacing,D=void 0===_?8:_,E=e.symbolBorderWidth,R=void 0===E?0:E,A=e.symbolBorderColor,I=void 0===A?"transparent":A,F=e.onClick,L=e.onMouseEnter,N=e.onMouseLeave,z=e.toggleSerie,$=e.effects,V=(0,G.useState)({}),B=V[0],W=V[1],H=Ck(),q=(0,G.useCallback)(function(e){if($){var t=$.filter(function(e){return"hover"===e.on}).reduce(function(e,t){return CT({},e,t.style)},{});W(t)}null==L||L(g,e)},[L,g,$]),Y=(0,G.useCallback)(function(e){if($){var t=$.filter(function(e){return"hover"!==e.on}).reduce(function(e,t){return CT({},e,t.style)},{});W(t)}null==N||N(g,e)},[N,g,$]),U=jT({direction:y,justify:x,symbolSize:null!=(t=B.symbolSize)?t:j,symbolSpacing:D,width:h,height:m}),X=U.symbolX,Q=U.symbolY,K=U.labelX,Z=U.labelY,J=U.labelAnchor,ee=U.labelAlignment,te=[F,L,N,z].some(function(e){return void 0!==e}),ne="function"==typeof T?T:RT[T];return(0,le.jsxs)("g",{transform:"translate("+f+","+p+")",style:{opacity:null!=(n=B.itemOpacity)?n:M},children:[(0,le.jsx)("rect",{width:h,height:m,fill:null!=(r=B.itemBackground)?r:k,style:{cursor:te?"pointer":"auto"},onClick:function(e){null==F||F(g,e),null==z||z(g.id)},onMouseEnter:q,onMouseLeave:Y}),G.createElement(ne,CT({id:g.id,x:X,y:Q,size:null!=(o=B.symbolSize)?o:j,fill:null!=(i=null!=(a=g.fill)?a:g.color)?i:"black",borderWidth:null!=(s=B.symbolBorderWidth)?s:R,borderColor:null!=(l=B.symbolBorderColor)?l:I},g.hidden?H.legends.hidden.symbol:void 0)),(0,le.jsx)("text",{textAnchor:J,style:CT({},Pk(H.legends.text),{fill:null!=(c=null!=(u=null!=(d=B.itemTextColor)?d:w)?u:H.legends.text.fill)?c:"black",dominantBaseline:ee,pointerEvents:"none",userSelect:"none"},g.hidden?H.legends.hidden.text:void 0),x:K,y:Z,children:g.label})]})},IT=function(e){var t=e.data,n=e.x,r=e.y,o=e.direction,i=e.padding,a=void 0===i?0:i,s=e.justify,l=e.effects,c=e.itemWidth,u=e.itemHeight,d=e.itemDirection,f=void 0===d?"left-to-right":d,p=e.itemsSpacing,h=void 0===p?0:p,m=e.itemTextColor,g=e.itemBackground,b=void 0===g?"transparent":g,y=e.itemOpacity,v=void 0===y?1:y,x=e.symbolShape,w=e.symbolSize,S=e.symbolSpacing,k=e.symbolBorderWidth,C=e.symbolBorderColor,M=e.onClick,P=e.onMouseEnter,T=e.onMouseLeave,O=e.toggleSerie,j=TT({itemCount:t.length,itemWidth:c,itemHeight:u,itemsSpacing:h,direction:o,padding:a}).padding,_="row"===o?c+h:0,D="column"===o?u+h:0;return(0,le.jsx)("g",{transform:"translate("+n+","+r+")",children:t.map(function(e,t){return(0,le.jsx)(AT,{data:e,x:t*_+j.left,y:t*D+j.top,width:c,height:u,direction:f,justify:s,effects:l,textColor:m,background:b,opacity:v,symbolShape:x,symbolSize:w,symbolSpacing:S,symbolBorderWidth:k,symbolBorderColor:C,onClick:M,onMouseEnter:P,onMouseLeave:T,toggleSerie:O},t)})})},FT=function(e){var t=e.data,n=e.containerWidth,r=e.containerHeight,o=e.translateX,i=void 0===o?0:o,a=e.translateY,s=void 0===a?0:a,l=e.anchor,c=e.direction,u=e.padding,d=void 0===u?0:u,f=e.justify,p=e.itemsSpacing,h=void 0===p?0:p,m=e.itemWidth,g=e.itemHeight,b=e.itemDirection,y=e.itemTextColor,v=e.itemBackground,x=e.itemOpacity,w=e.symbolShape,S=e.symbolSize,k=e.symbolSpacing,C=e.symbolBorderWidth,M=e.symbolBorderColor,P=e.onClick,T=e.onMouseEnter,O=e.onMouseLeave,j=e.toggleSerie,_=e.effects,D=TT({itemCount:t.length,itemsSpacing:h,itemWidth:m,itemHeight:g,direction:c,padding:d}),E=D.width,R=D.height,A=OT({anchor:l,translateX:i,translateY:s,containerWidth:n,containerHeight:r,width:E,height:R}),I=A.x,F=A.y;return(0,le.jsx)(IT,{data:t,x:I,y:F,direction:c,padding:d,justify:f,effects:_,itemsSpacing:h,itemWidth:m,itemHeight:g,itemDirection:b,itemTextColor:y,itemBackground:v,itemOpacity:x,symbolShape:w,symbolSize:S,symbolSpacing:k,symbolBorderWidth:C,symbolBorderColor:M,onClick:P,onMouseEnter:T,onMouseLeave:O,toggleSerie:"boolean"==typeof j?void 0:j})},LT={start:"left",middle:"center",end:"right"},NT=function(e,t){var n=t.data,r=t.containerWidth,o=t.containerHeight,i=t.translateX,a=void 0===i?0:i,s=t.translateY,l=void 0===s?0:s,c=t.anchor,u=t.direction,d=t.padding,f=void 0===d?0:d,p=t.justify,h=void 0!==p&&p,m=t.itemsSpacing,g=void 0===m?0:m,b=t.itemWidth,y=t.itemHeight,v=t.itemDirection,x=void 0===v?"left-to-right":v,w=t.itemTextColor,S=t.symbolSize,k=void 0===S?16:S,C=t.symbolSpacing,M=void 0===C?8:C,P=t.theme,T=TT({itemCount:n.length,itemWidth:b,itemHeight:y,itemsSpacing:g,direction:u,padding:f}),O=T.width,j=T.height,_=T.padding,D=OT({anchor:c,translateX:a,translateY:l,containerWidth:r,containerHeight:o,width:O,height:j}),E=D.x,R=D.y,A="row"===u?b+g:0,I="column"===u?y+g:0;e.save(),e.translate(E,R),e.font=P.legends.text.fontSize+"px "+(P.legends.text.fontFamily||"sans-serif"),n.forEach(function(t,n){var r,o,i=n*A+_.left,a=n*I+_.top,s=jT({direction:x,justify:h,symbolSize:k,symbolSpacing:M,width:b,height:y}),l=s.symbolX,c=s.symbolY,u=s.labelX,d=s.labelY,f=s.labelAnchor,p=s.labelAlignment;e.fillStyle=null!=(r=t.color)?r:"black",e.fillRect(i+l,a+c,k,k),e.textAlign=LT[f],"central"===p&&(e.textBaseline="middle"),e.fillStyle=null!=(o=null!=w?w:P.legends.text.fill)?o:"black",e.fillText(String(t.label),i+u,a+d)}),e.restore()};function zT(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function $T(e){return function(){return e}}function VT(e,t){return e[t]}function BT(e){const t=[];return t.key=e,t}function WT(){return WT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},WT.apply(this,arguments)}function HT(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}Array.prototype.slice;var qT,YT=function(e){var t=e.bars,n=e.annotations,r=XP({data:t,annotations:n,getPosition:function(e){return{x:e.x+e.width/2,y:e.y+e.height/2}},getDimensions:function(e){var t=e.height,n=e.width;return{width:n,height:t,size:Math.max(n,t)}}});return(0,le.jsx)(le.Fragment,{children:r.map(function(e,t){return(0,le.jsx)(tT,WT({},e),t)})})},UT=function(e){var t=e.width,n=e.height,r=e.legends,o=e.toggleSerie;return(0,le.jsx)(le.Fragment,{children:r.map(function(e,r){var i,a=e[0],s=e[1];return(0,le.jsx)(FT,WT({},a,{containerWidth:t,containerHeight:n,data:null!=(i=a.data)?i:s,toggleSerie:a.toggleSerie&&"keys"===a.dataFrom?o:void 0}),r)})})},GT=["data"],XT=["color","label"],QT={indexBy:"id",keys:["value"],groupMode:"stacked",layout:"vertical",reverse:!1,minValue:"auto",maxValue:"auto",valueScale:{type:"linear"},indexScale:{type:"band",round:!0},padding:.1,innerPadding:0,axisBottom:{},axisLeft:{},enableGridX:!1,enableGridY:!0,enableLabel:!0,label:"formattedValue",labelPosition:"middle",labelOffset:0,labelSkipWidth:0,labelSkipHeight:0,labelTextColor:{from:"theme",theme:"labels.text.fill"},colorBy:"id",colors:{scheme:"nivo"},borderRadius:0,borderWidth:0,borderColor:{from:"color"},isInteractive:!0,tooltip:function(e){var t=e.color,n=e.label,r=HT(e,XT);return(0,le.jsx)(Lg,{id:n,value:r.formattedValue,enableChip:!0,color:t})},tooltipLabel:function(e){return e.id+" - "+e.indexValue},legends:[],initialHiddenIds:[],annotations:[],markers:[],enableTotals:!1,totalsOffset:10},KT=WT({},QT,{layers:["grid","axes","bars","totals","markers","legends","annotations"],barComponent:function(e){var t,n=e.bar,r=n.data,o=HT(n,GT),i=e.style,a=i.borderColor,s=i.color,l=i.height,c=i.labelColor,u=i.labelOpacity,d=i.labelX,f=i.labelY,p=i.transform,h=i.width,m=i.textAnchor,g=e.borderRadius,b=e.borderWidth,y=e.label,v=e.shouldRenderLabel,x=e.isInteractive,w=e.onClick,S=e.onMouseEnter,k=e.onMouseLeave,C=e.tooltip,M=e.isFocusable,P=e.ariaLabel,T=e.ariaLabelledBy,O=e.ariaDescribedBy,j=e.ariaDisabled,_=e.ariaHidden,D=Ck(),E=qg(),R=E.showTooltipFromEvent,A=E.showTooltipAt,I=E.hideTooltip,F=(0,G.useMemo)(function(){return function(){return(0,G.createElement)(C,WT({},o,r))}},[C,o,r]),L=(0,G.useCallback)(function(e){null==w||w(WT({color:o.color},r),e)},[o,r,w]),N=(0,G.useCallback)(function(e){return R(F(),e)},[R,F]),z=(0,G.useCallback)(function(e){null==S||S(r,e),R(F(),e)},[r,S,R,F]),$=(0,G.useCallback)(function(e){null==k||k(r,e),I()},[r,I,k]),V=(0,G.useCallback)(function(){A(F(),[o.absX+o.width/2,o.absY])},[A,F,o]),B=(0,G.useCallback)(function(){I()},[I]);return(0,le.jsxs)(Dg.g,{transform:p,children:[(0,le.jsx)(Dg.rect,{width:bg(h,function(e){return Math.max(e,0)}),height:bg(l,function(e){return Math.max(e,0)}),rx:g,ry:g,fill:null!=(t=r.fill)?t:s,strokeWidth:b,stroke:a,focusable:M,tabIndex:M?0:void 0,"aria-label":P?P(r):void 0,"aria-labelledby":T?T(r):void 0,"aria-describedby":O?O(r):void 0,"aria-disabled":j?j(r):void 0,"aria-hidden":_?_(r):void 0,onMouseEnter:x?z:void 0,onMouseMove:x?N:void 0,onMouseLeave:x?$:void 0,onClick:x?L:void 0,onFocus:x&&M?V:void 0,onBlur:x&&M?B:void 0}),v&&(0,le.jsx)(Dg.text,{x:d,y:f,textAnchor:m,dominantBaseline:"central",fillOpacity:u,style:WT({},D.labels.text,{pointerEvents:"none",fill:c}),children:y})]})},defs:[],fill:[],animate:!0,motionConfig:"default",role:"img",isFocusable:!1}),ZT=WT({},QT,{layers:["grid","axes","bars","totals","legends","annotations"],pixelRatio:"undefined"!=typeof window&&null!=(qT=window.devicePixelRatio)?qT:1}),JT=function(e,t,n,r,o,i){return mP(r,{all:e.map(t),min:0,max:0},o,i).padding(n)},eO=function(e,t){return e.map(function(e){return WT({},t.reduce(function(e,t){return e[t]=null,e},{}),e)})},tO=function(e){return Object.keys(e).reduce(function(t,n){return e[n]&&(t[n]=e[n]),t},{})},nO=function(e){return[e,Number(e)]};function rO(e,t,n,r){return void 0===e&&(e=QT.layout),void 0===t&&(t=QT.reverse),void 0===n&&(n=QT.labelPosition),void 0===r&&(r=QT.labelOffset),function(o,i){var a=r*(t?-1:1);if("horizontal"===e){var s=o/2;return"start"===n?s=t?o:0:"end"===n&&(s=t?0:o),{labelX:s+a,labelY:i/2,textAnchor:"middle"===n?"middle":t?"end":"start"}}var l=i/2;return"start"===n?l=t?0:i:"end"===n&&(l=t?i:0),{labelX:o/2,labelY:l-a,textAnchor:"middle"}}}var oO=["layout","minValue","maxValue","reverse","width","height","padding","innerPadding","valueScale","indexScale","hiddenIds"],iO=function(e,t){return e>t},aO=function(e,t){return e<t},sO=function(e,t){return Array.from(" ".repeat(t-e),function(t,n){return e+n})},lO=function(e){return iO(e,0)?0:e},cO=function(e,t,n,r){var o=e.data,i=e.formatValue,a=e.getColor,s=e.getIndex,l=e.getTooltipLabel,c=e.innerPadding,u=void 0===c?0:c,d=e.keys,f=e.xScale,p=e.yScale,h=e.margin,m=n?aO:iO,g=o.map(tO),b=[];return d.forEach(function(e,n){return sO(0,f.domain().length).forEach(function(c){var d,y,v,x=nO(o[c][e]),w=x[0],S=x[1],k=s(o[c]),C=(null!=(d=f(k))?d:0)+t*n+u*n,M=m(y=S,0)?null!=(v=p(y))?v:0:r,P=function(e,t){var n;return m(e,0)?r-t:(null!=(n=p(e))?n:0)-r}(S,M),T={id:e,value:null===w?w:S,formattedValue:i(S),hidden:!1,index:c,indexValue:k,data:g[c]};b.push({key:e+"."+T.indexValue,index:b.length,data:T,x:C,y:M,absX:h.left+C,absY:h.top+M,width:t,height:P,color:a(T),label:l(T)})})}),b},uO=function(e,t,n,r){var o=e.data,i=e.formatValue,a=e.getIndex,s=e.getColor,l=e.getTooltipLabel,c=e.keys,u=e.innerPadding,d=void 0===u?0:u,f=e.xScale,p=e.yScale,h=e.margin,m=n?aO:iO,g=o.map(tO),b=[];return c.forEach(function(e,n){return sO(0,p.domain().length).forEach(function(c){var u,y,v,x=nO(o[c][e]),w=x[0],S=x[1],k=a(o[c]),C=m(y=S,0)?r:null!=(v=f(y))?v:0,M=(null!=(u=p(k))?u:0)+t*n+d*n,P=function(e,t){var n;return m(e,0)?(null!=(n=f(e))?n:0)-r:r-t}(S,C),T={id:e,value:null===w?w:S,formattedValue:i(S),hidden:!1,index:c,indexValue:k,data:g[c]};b.push({key:e+"."+T.indexValue,index:b.length,data:T,x:C,y:M,absX:h.left+C,absY:h.top+M,width:P,height:t,color:s(T),label:l(T)})})}),b},dO=function(e){var t,n,r=e.layout,o=e.minValue,i=e.maxValue,a=e.reverse,s=e.width,l=e.height,c=e.padding,u=void 0===c?0:c,d=e.innerPadding,f=void 0===d?0:d,p=e.valueScale,h=e.indexScale,m=e.hiddenIds,g=void 0===m?[]:m,b=HT(e,oO),y=b.keys.filter(function(e){return!g.includes(e)}),v=eO(b.data,y),x="vertical"===r?["y","x",s]:["x","y",l],w=x[0],S=x[1],k=x[2],C=JT(v,b.getIndex,u,h,k,S),M=WT({max:i,min:o,reverse:a},p),P="auto"===M.min?lO:function(e){return e},T=v.reduce(function(e,t){return[].concat(e,y.map(function(e){return t[e]}))},[]).filter(Boolean),O=mP(M,{all:T,min:P(Math.min.apply(Math,T)),max:(n=Math.max.apply(Math,T),isFinite(n)?n:0)},"x"===w?s:l,w),j="vertical"===r?[C,O]:[O,C],_=j[0],D=j[1],E=(C.bandwidth()-f*(y.length-1))/y.length,R=[WT({},b,{data:v,keys:y,innerPadding:f,xScale:_,yScale:D}),E,M.reverse,null!=(t=O(0))?t:0];return{xScale:_,yScale:D,bars:E>0?"vertical"===r?cO.apply(void 0,R):uO.apply(void 0,R):[]}},fO=["data","layout","minValue","maxValue","reverse","width","height","padding","valueScale","indexScale","hiddenIds"],pO=function e(t){var n;return t.some(Array.isArray)?e((n=[]).concat.apply(n,t)):t},hO=function(e,t,n){var r=e.formatValue,o=e.getColor,i=e.getIndex,a=e.getTooltipLabel,s=e.innerPadding,l=e.stackedData,c=e.xScale,u=e.yScale,d=e.margin,f=[];return l.forEach(function(e){return c.domain().forEach(function(l,p){var h,m,g=e[p],b=null!=(h=c(i(g.data)))?h:0,y=(null!=(m=function(e){return u(e[n?0:1])}(g))?m:0)+.5*s,v=function(e,t){var r;return(null!=(r=u(e[n?1:0]))?r:0)-t}(g,y)-s,x=nO(g.data[e.key]),w=x[0],S=x[1],k={id:e.key,value:null===w?w:S,formattedValue:r(S),hidden:!1,index:p,indexValue:l,data:tO(g.data)};f.push({key:e.key+"."+l,index:f.length,data:k,x:b,y,absX:d.left+b,absY:d.top+y,width:t,height:v,color:o(k),label:a(k)})})}),f},mO=function(e,t,n){var r=e.formatValue,o=e.getColor,i=e.getIndex,a=e.getTooltipLabel,s=e.innerPadding,l=e.stackedData,c=e.xScale,u=e.yScale,d=e.margin,f=[];return l.forEach(function(e){return u.domain().forEach(function(l,p){var h,m,g=e[p],b=null!=(h=u(i(g.data)))?h:0,y=(null!=(m=function(e){return c(e[n?1:0])}(g))?m:0)+.5*s,v=function(e,t){var r;return(null!=(r=c(e[n?0:1]))?r:0)-t}(g,y)-s,x=nO(g.data[e.key]),w=x[0],S=x[1],k={id:e.key,value:null===w?w:S,formattedValue:r(S),hidden:!1,index:p,indexValue:l,data:tO(g.data)};f.push({key:e.key+"."+l,index:f.length,data:k,x:y,y:b,absX:d.left+y,absY:d.top+b,width:v,height:t,color:o(k),label:a(k)})})}),f},gO=function(e){var t,n=e.data,r=e.layout,o=e.minValue,i=e.maxValue,a=e.reverse,s=e.width,l=e.height,c=e.padding,u=void 0===c?0:c,d=e.valueScale,f=e.indexScale,p=e.hiddenIds,h=void 0===p?[]:p,m=HT(e,fO),g=m.keys.filter(function(e){return!h.includes(e)}),b=function(){var e=$T([]),t=Xb,n=Jb,r=VT;function o(o){var i,a,s=Array.from(e.apply(this,arguments),BT),l=s.length,c=-1;for(const e of o)for(i=0,++c;i<l;++i)(s[i][c]=[0,+r(e,s[i].key,c,o)]).data=e;for(i=0,a=zT(t(s));i<l;++i)s[a[i]].index=i;return n(s,a),s}return o.keys=function(t){return arguments.length?(e="function"==typeof t?t:$T(Array.from(t)),o):e},o.value=function(e){return arguments.length?(r="function"==typeof e?e:$T(+e),o):r},o.order=function(e){return arguments.length?(t=null==e?Xb:"function"==typeof e?e:$T(Array.from(e)),o):t},o.offset=function(e){return arguments.length?(n=null==e?Jb:e,o):n},o}().keys(g).offset(ey)(eO(n,g)),y="vertical"===r?["y","x",s]:["x","y",l],v=y[0],x=y[1],w=y[2],S=JT(n,m.getIndex,u,f,w,x),k=WT({max:i,min:o,reverse:a},d),C=(t=pO(b),"log"===d.type?t.filter(function(e){return 0!==e}):t),M=mP(k,{all:C,min:Math.min.apply(Math,C),max:Math.max.apply(Math,C)},"x"===v?s:l,v),P="vertical"===r?[S,M]:[M,S],T=P[0],O=P[1],j=m.innerPadding>0?m.innerPadding:0,_=S.bandwidth(),D=[WT({},m,{innerPadding:j,stackedData:b,xScale:T,yScale:O}),_,k.reverse];return{xScale:T,yScale:O,bars:_>0?"vertical"===r?hO.apply(void 0,D):mO.apply(void 0,D):[]}},bO=function(e){var t=e.bars,n=e.direction,r=e.from,o=e.groupMode,i=e.layout,a=e.legendLabel,s=e.reverse,l=Qk(null!=a?a:"indexes"===r?"indexValue":"id");return"indexes"===r?function(e,t,n){var r=oC(e.map(function(e){var t,r;return{id:null!=(t=e.data.indexValue)?t:"",label:n(e.data),hidden:e.data.hidden,color:null!=(r=e.color)?r:"#000"}}),function(e){return e.id});return"horizontal"===t&&r.reverse(),r}(t,i,l):function(e,t,n,r,o,i){var a=oC(e.map(function(e){var t;return{id:e.data.id,label:i(e.data),hidden:e.data.hidden,color:null!=(t=e.color)?t:"#000"}}),function(e){return e.id});return("vertical"===t&&"stacked"===r&&"column"===n&&!0!==o||"horizontal"===t&&"stacked"===r&&!0===o)&&a.reverse(),a}(t,i,n,o,s,l)},yO=function(e,t,n){var r=e.get(t)||0;e.set(t,r+n)},vO=function(e){var t=e.indexBy,n=void 0===t?QT.indexBy:t,r=e.keys,o=void 0===r?QT.keys:r,i=e.label,a=void 0===i?QT.label:i,s=e.tooltipLabel,l=void 0===s?QT.tooltipLabel:s,c=e.valueFormat,u=e.colors,d=void 0===u?QT.colors:u,f=e.colorBy,p=void 0===f?QT.colorBy:f,h=e.borderColor,m=void 0===h?QT.borderColor:h,g=e.labelTextColor,b=void 0===g?QT.labelTextColor:g,y=e.groupMode,v=void 0===y?QT.groupMode:y,x=e.layout,w=void 0===x?QT.layout:x,S=e.reverse,k=void 0===S?QT.reverse:S,C=e.data,M=e.minValue,P=void 0===M?QT.minValue:M,T=e.maxValue,O=void 0===T?QT.maxValue:T,j=e.margin,_=e.width,D=e.height,E=e.padding,R=void 0===E?QT.padding:E,A=e.innerPadding,I=void 0===A?QT.innerPadding:A,F=e.valueScale,L=void 0===F?QT.valueScale:F,N=e.indexScale,z=void 0===N?QT.indexScale:N,$=e.initialHiddenIds,V=void 0===$?QT.initialHiddenIds:$,B=e.enableLabel,W=void 0===B?QT.enableLabel:B,H=e.labelSkipWidth,q=void 0===H?QT.labelSkipWidth:H,Y=e.labelSkipHeight,U=void 0===Y?QT.labelSkipHeight:Y,X=e.legends,Q=void 0===X?QT.legends:X,K=e.legendLabel,Z=e.totalsOffset,J=void 0===Z?QT.totalsOffset:Z,ee=(0,G.useState)(null!=V?V:[]),te=ee[0],ne=ee[1],re=(0,G.useCallback)(function(e){ne(function(t){return t.indexOf(e)>-1?t.filter(function(t){return t!==e}):[].concat(t,[e])})},[]),oe=Kk(n),ie=Kk(a),ae=Kk(l),se=xk(c),le=Ck(),ce=kT(d,p),ue=wT(m,le),de=wT(b,le),fe=("grouped"===v?dO:gO)({layout:w,reverse:k,data:C,getIndex:oe,keys:o,minValue:P,maxValue:O,width:_,height:D,getColor:ce,padding:R,innerPadding:I,valueScale:L,indexScale:z,hiddenIds:te,formatValue:se,getTooltipLabel:ae,margin:j}),pe=fe.bars,he=fe.xScale,me=fe.yScale,ge=(0,G.useMemo)(function(){return pe.filter(function(e){return null!==e.data.value}).map(function(e,t){return WT({},e,{index:t})})},[pe]),be=(0,G.useCallback)(function(e){var t=e.width,n=e.height;return!(!W||q>0&&t<q||U>0&&n<U)},[W,q,U]),ye=(0,G.useMemo)(function(){return o.map(function(e){var t=pe.find(function(t){return t.data.id===e});return WT({},t,{data:WT({id:e},null==t?void 0:t.data,{hidden:te.includes(e)})})})},[te,o,pe]),ve=(0,G.useMemo)(function(){return Q.map(function(e){return[e,bO({bars:"keys"===e.dataFrom?ye:pe,direction:e.direction,from:e.dataFrom,groupMode:v,layout:w,legendLabel:K,reverse:k})]})},[Q,ye,pe,v,w,K,k]),xe=(0,G.useMemo)(function(){return function(e,t,n,r,o,i,a){void 0===r&&(r=QT.layout),void 0===o&&(o=QT.groupMode);var s=[];if(0===e.length)return s;var l=new Map,c=e[0].width,u=e[0].height;if("stacked"===o){var d=new Map;e.forEach(function(e){var t=e.data,n=t.indexValue,r=t.value;yO(l,n,Number(r)),function(e,t,n){var r=e.get(t)||0;e.set(t,r+(n>0?n:0))}(d,n,Number(r))}),d.forEach(function(e,o){var d,f,p,h=l.get(o)||0;"vertical"===r?(d=t(o),f=n(e),p=n(e/2)):(d=t(e),f=n(o),p=t(e/2)),d+="vertical"===r?c/2:i,f+="vertical"===r?-i:u/2,s.push({key:"total_"+o,x:d,y:f,value:h,formattedValue:a(h),animationOffset:p})})}else if("grouped"===o){var f=new Map,p=new Map;e.forEach(function(e){var t=e.data,n=t.indexValue,r=t.value;yO(l,n,Number(r)),function(e,t,n){var r=e.get(t)||0;e.set(t,Math.max(r,Number(n)))}(f,n,Number(r)),function(e,t){var n=e.get(t)||0;e.set(t,n+1)}(p,n)}),f.forEach(function(e,o){var d,f,h,m=l.get(o)||0,g=p.get(o);"vertical"===r?(d=t(o),f=n(e),h=n(e/2)):(d=t(e),f=n(o),h=t(e/2)),d+="vertical"===r?g*c/2:i,f+="vertical"===r?-i:g*u/2,s.push({key:"total_"+o,x:d,y:f,value:m,formattedValue:a(m),animationOffset:h})})}return s}(pe,he,me,w,v,J,se)},[pe,he,me,w,v,J,se]);return{bars:pe,barsWithValue:ge,xScale:he,yScale:me,getIndex:oe,getLabel:ie,getTooltipLabel:ae,formatValue:se,getColor:ce,getBorderColor:ue,getLabelColor:de,shouldRenderBarLabel:be,hiddenIds:te,toggleSerie:re,legendsWithData:ve,barTotals:xe}},xO=function(e){var t=e.data,n=e.springConfig,r=e.animate,o=e.layout,i=void 0===o?KT.layout:o,a=Ck();return dg(t,{keys:function(e){return e.key},from:function(e){return{x:"vertical"===i?e.x:e.animationOffset,y:"vertical"===i?e.animationOffset:e.y,labelOpacity:0}},enter:function(e){return{x:e.x,y:e.y,labelOpacity:1}},update:function(e){return{x:e.x,y:e.y,labelOpacity:1}},leave:function(e){return{x:"vertical"===i?e.x:e.animationOffset,y:"vertical"===i?e.animationOffset:e.y,labelOpacity:0}},config:n,immediate:!r,initial:r?void 0:null})(function(e,t){return(0,le.jsx)(Dg.text,{x:e.x,y:e.y,fillOpacity:e.labelOpacity,style:WT({},a.labels.text,{pointerEvents:"none"}),fontWeight:"bold",fontSize:a.labels.text.fontSize,fontFamily:a.labels.text.fontFamily,textAnchor:"vertical"===i?"middle":"start",alignmentBaseline:"vertical"===i?"alphabetic":"middle",children:t.formattedValue},t.key)})},wO=["isInteractive","animate","motionConfig","theme","renderWrapper"],SO=function(e){var t=e.data,n=e.indexBy,r=e.keys,o=e.margin,i=e.width,a=e.height,s=e.groupMode,l=e.layout,c=e.reverse,u=e.minValue,d=e.maxValue,f=e.valueScale,p=e.indexScale,h=e.padding,m=e.innerPadding,g=e.axisTop,b=e.axisRight,y=e.axisBottom,v=void 0===y?KT.axisBottom:y,x=e.axisLeft,w=void 0===x?KT.axisLeft:x,S=e.enableGridX,k=void 0===S?KT.enableGridX:S,C=e.enableGridY,M=void 0===C?KT.enableGridY:C,P=e.gridXValues,T=e.gridYValues,O=e.layers,j=void 0===O?KT.layers:O,_=e.barComponent,D=void 0===_?KT.barComponent:_,E=e.enableLabel,R=void 0===E?KT.enableLabel:E,A=e.label,I=e.labelSkipWidth,F=void 0===I?KT.labelSkipWidth:I,L=e.labelSkipHeight,N=void 0===L?KT.labelSkipHeight:L,z=e.labelTextColor,$=e.labelPosition,V=void 0===$?KT.labelPosition:$,B=e.labelOffset,W=void 0===B?KT.labelOffset:B,H=e.markers,q=void 0===H?KT.markers:H,Y=e.colorBy,U=e.colors,X=e.defs,Q=void 0===X?KT.defs:X,K=e.fill,Z=void 0===K?KT.fill:K,J=e.borderRadius,ee=void 0===J?KT.borderRadius:J,te=e.borderWidth,ne=void 0===te?KT.borderWidth:te,re=e.borderColor,oe=e.annotations,ie=void 0===oe?KT.annotations:oe,ae=e.legendLabel,se=e.tooltipLabel,ce=e.valueFormat,ue=e.isInteractive,de=void 0===ue?KT.isInteractive:ue,fe=e.tooltip,pe=void 0===fe?KT.tooltip:fe,he=e.onClick,me=e.onMouseEnter,ge=e.onMouseLeave,be=e.legends,ye=e.role,ve=void 0===ye?KT.role:ye,xe=e.ariaLabel,we=e.ariaLabelledBy,Se=e.ariaDescribedBy,ke=e.isFocusable,Ce=void 0===ke?KT.isFocusable:ke,Me=e.barAriaLabel,Pe=e.barAriaLabelledBy,Te=e.barAriaDescribedBy,Oe=e.barAriaHidden,je=e.barAriaDisabled,_e=e.initialHiddenIds,De=e.enableTotals,Ee=void 0===De?KT.enableTotals:De,Re=e.totalsOffset,Ae=void 0===Re?KT.totalsOffset:Re,Ie=lk(),Fe=Ie.animate,Le=Ie.config,Ne=bk(i,a,o),ze=Ne.outerWidth,$e=Ne.outerHeight,Ve=Ne.margin,Be=Ne.innerWidth,We=Ne.innerHeight,He=vO({indexBy:n,label:A,tooltipLabel:se,valueFormat:ce,colors:U,colorBy:Y,borderColor:re,labelTextColor:z,groupMode:s,layout:l,reverse:c,data:t,keys:r,minValue:u,maxValue:d,margin:Ve,width:Be,height:We,padding:h,innerPadding:m,valueScale:f,indexScale:p,enableLabel:R,labelSkipWidth:F,labelSkipHeight:N,legends:be,legendLabel:ae,initialHiddenIds:_e,totalsOffset:Ae}),qe=He.bars,Ye=He.barsWithValue,Ue=He.xScale,Ge=He.yScale,Xe=He.getLabel,Qe=He.getTooltipLabel,Ke=He.getBorderColor,Ze=He.getLabelColor,Je=He.shouldRenderBarLabel,et=He.toggleSerie,tt=He.legendsWithData,nt=He.barTotals,rt=He.getColor,ot=rO(l,c,V,W),it=dg(Ye,{keys:function(e){return e.key},from:function(e){return WT({borderColor:Ke(e),color:e.color,height:0,labelColor:Ze(e),labelOpacity:0},ot(e.width,e.height),{transform:"translate("+e.x+", "+(e.y+e.height)+")",width:e.width},"vertical"===l?{}:{height:e.height,transform:"translate("+e.x+", "+e.y+")",width:0})},enter:function(e){return WT({borderColor:Ke(e),color:e.color,height:e.height,labelColor:Ze(e),labelOpacity:1},ot(e.width,e.height),{transform:"translate("+e.x+", "+e.y+")",width:e.width})},update:function(e){return WT({borderColor:Ke(e),color:e.color,height:e.height,labelColor:Ze(e),labelOpacity:1},ot(e.width,e.height),{transform:"translate("+e.x+", "+e.y+")",width:e.width})},leave:function(e){return WT({borderColor:Ke(e),color:e.color,height:0,labelColor:Ze(e),labelOpacity:0},ot(e.width,e.height),{labelY:0,transform:"translate("+e.x+", "+(e.y+e.height)+")",width:e.width},"vertical"===l?{}:WT({},ot(e.width,e.height),{labelX:0,height:e.height,transform:"translate("+e.x+", "+e.y+")",width:0}))},config:Le,immediate:!Fe,initial:Fe?void 0:null}),at=(0,G.useMemo)(function(){return{borderRadius:ee,borderWidth:ne,enableLabel:R,isInteractive:de,labelSkipWidth:F,labelSkipHeight:N,onClick:he,onMouseEnter:me,onMouseLeave:ge,getTooltipLabel:Qe,tooltip:pe,isFocusable:Ce,ariaLabel:Me,ariaLabelledBy:Pe,ariaDescribedBy:Te,ariaHidden:Oe,ariaDisabled:je}},[ee,ne,R,Qe,de,N,F,he,me,ge,pe,Ce,Me,Pe,Te,Oe,je]),st=nC(Q,qe,Z,{dataKey:"data",targetKey:"data.fill"}),lt={annotations:null,axes:null,bars:null,grid:null,legends:null,markers:null,totals:null};j.includes("annotations")&&(lt.annotations=(0,le.jsx)(YT,{bars:qe,annotations:ie},"annotations")),j.includes("axes")&&(lt.axes=(0,le.jsx)(IP,{xScale:Ue,yScale:Ge,width:Be,height:We,top:g,right:b,bottom:v,left:w},"axes")),j.includes("bars")&&(lt.bars=(0,le.jsx)(G.Fragment,{children:it(function(e,t){return(0,G.createElement)(D,WT({},at,{bar:t,style:e,shouldRenderLabel:Je(t),label:Xe(t.data)}))})},"bars")),j.includes("grid")&&(lt.grid=(0,le.jsx)(NP,{width:Be,height:We,xScale:k?Ue:null,yScale:M?Ge:null,xValues:P,yValues:T},"grid")),j.includes("legends")&&(lt.legends=(0,le.jsx)(UT,{width:Be,height:We,legends:tt,toggleSerie:et},"legends")),j.includes("markers")&&(lt.markers=(0,le.jsx)(Uk,{markers:q,width:Be,height:We,xScale:Ue,yScale:Ge},"markers")),j.includes("totals")&&Ee&&(lt.totals=(0,le.jsx)(xO,{data:nt,springConfig:Le,animate:Fe,layout:l},"totals"));var ct=(0,G.useMemo)(function(){return WT({},at,{margin:Ve,width:i,height:a,innerWidth:Be,innerHeight:We,bars:qe,legendData:tt,enableLabel:R,xScale:Ue,yScale:Ge,tooltip:pe,getTooltipLabel:Qe,onClick:he,onMouseEnter:me,onMouseLeave:ge,getColor:rt})},[at,Ve,i,a,Be,We,qe,tt,R,Ue,Ge,pe,Qe,he,me,ge,rt]);return(0,le.jsx)(Wk,{width:ze,height:$e,margin:Ve,defs:st,role:ve,ariaLabel:xe,ariaLabelledBy:we,ariaDescribedBy:Se,isFocusable:Ce,children:j.map(function(e,t){var n;return"function"==typeof e?(0,le.jsx)(G.Fragment,{children:(0,G.createElement)(e,ct)},t):null!=(n=null==lt?void 0:lt[e])?n:null})})},kO=function(e){var t=e.isInteractive,n=void 0===t?KT.isInteractive:t,r=e.animate,o=void 0===r?KT.animate:r,i=e.motionConfig,a=void 0===i?KT.motionConfig:i,s=e.theme,l=e.renderWrapper,c=HT(e,wO);return(0,le.jsx)(jk,{animate:o,isInteractive:n,motionConfig:a,renderWrapper:l,theme:s,children:(0,le.jsx)(SO,WT({isInteractive:n},c))})},CO=["isInteractive","renderWrapper","theme"],MO=function(e,t,n,r){return e.find(function(e){return Zk(e.x+t.left,e.y+t.top,e.width,e.height,n,r)})},PO=function(e){var t=e.data,n=e.indexBy,r=e.keys,o=e.margin,i=e.width,a=e.height,s=e.groupMode,l=e.layout,c=e.reverse,u=e.minValue,d=e.maxValue,f=e.valueScale,p=e.indexScale,h=e.padding,m=e.innerPadding,g=e.axisTop,b=e.axisRight,y=e.axisBottom,v=void 0===y?ZT.axisBottom:y,x=e.axisLeft,w=void 0===x?ZT.axisLeft:x,S=e.enableGridX,k=void 0===S?ZT.enableGridX:S,C=e.enableGridY,M=void 0===C?ZT.enableGridY:C,P=e.gridXValues,T=e.gridYValues,O=e.labelPosition,j=void 0===O?ZT.labelPosition:O,_=e.labelOffset,D=void 0===_?ZT.labelOffset:_,E=e.layers,R=void 0===E?ZT.layers:E,A=e.renderBar,I=void 0===A?function(e,t){var n=t.bar,r=n.color,o=n.height,i=n.width,a=n.x,s=n.y,l=t.borderColor,c=t.borderRadius,u=t.borderWidth,d=t.label,f=t.labelColor,p=t.shouldRenderLabel,h=t.labelX,m=t.labelY,g=t.textAnchor;if(e.fillStyle=r,u>0&&(e.strokeStyle=l,e.lineWidth=u),e.beginPath(),c>0){var b=Math.min(c,o);e.moveTo(a+b,s),e.lineTo(a+i-b,s),e.quadraticCurveTo(a+i,s,a+i,s+b),e.lineTo(a+i,s+o-b),e.quadraticCurveTo(a+i,s+o,a+i-b,s+o),e.lineTo(a+b,s+o),e.quadraticCurveTo(a,s+o,a,s+o-b),e.lineTo(a,s+b),e.quadraticCurveTo(a,s,a+b,s),e.closePath()}else e.rect(a,s,i,o);e.fill(),u>0&&e.stroke(),p&&(e.textBaseline="middle",e.textAlign="middle"===g?"center":g,e.fillStyle=f,e.fillText(d,a+h,s+m))}:A,F=e.enableLabel,L=void 0===F?ZT.enableLabel:F,N=e.label,z=e.labelSkipWidth,$=void 0===z?ZT.labelSkipWidth:z,V=e.labelSkipHeight,B=void 0===V?ZT.labelSkipHeight:V,W=e.labelTextColor,H=e.colorBy,q=e.colors,Y=e.borderRadius,U=void 0===Y?ZT.borderRadius:Y,X=e.borderWidth,Q=void 0===X?ZT.borderWidth:X,K=e.borderColor,Z=e.annotations,J=void 0===Z?ZT.annotations:Z,ee=e.legendLabel,te=e.tooltipLabel,ne=e.valueFormat,re=e.isInteractive,oe=void 0===re?ZT.isInteractive:re,ie=e.tooltip,ae=void 0===ie?ZT.tooltip:ie,se=e.onClick,ce=e.onMouseEnter,ue=e.onMouseLeave,de=e.legends,fe=e.pixelRatio,pe=void 0===fe?ZT.pixelRatio:fe,he=e.canvasRef,me=e.enableTotals,ge=void 0===me?ZT.enableTotals:me,be=e.totalsOffset,ye=void 0===be?ZT.totalsOffset:be,ve=(0,G.useRef)(null),xe=Ck(),we=bk(i,a,o),Se=we.margin,ke=we.innerWidth,Ce=we.innerHeight,Me=we.outerWidth,Pe=we.outerHeight,Te=vO({indexBy:n,label:N,tooltipLabel:te,valueFormat:ne,colors:q,colorBy:H,borderColor:K,labelTextColor:W,groupMode:s,layout:l,reverse:c,data:t,keys:r,minValue:u,maxValue:d,margin:Se,width:ke,height:Ce,padding:h,innerPadding:m,valueScale:f,indexScale:p,enableLabel:L,labelSkipWidth:$,labelSkipHeight:B,legends:de,legendLabel:ee,totalsOffset:ye}),Oe=Te.bars,je=Te.barsWithValue,_e=Te.xScale,De=Te.yScale,Ee=Te.getLabel,Re=Te.getTooltipLabel,Ae=Te.getBorderColor,Ie=Te.getLabelColor,Fe=Te.shouldRenderBarLabel,Le=Te.legendsWithData,Ne=Te.barTotals,ze=Te.getColor,$e=qg(),Ve=$e.showTooltipFromEvent,Be=$e.hideTooltip,We=function(e){var t=e.annotations;return(0,G.useMemo)(function(){return t.map(function(e){return HP({},e,{computed:GP(HP({},e))})})},[t])}({annotations:XP({data:Oe,annotations:J,getPosition:function(e){return{x:e.x,y:e.y}},getDimensions:function(e){var t=e.width,n=e.height;return{width:t,height:n,size:Math.max(t,n)}}})}),He=(0,G.useMemo)(function(){return{borderRadius:U,borderWidth:Q,isInteractive:oe,isFocusable:!1,labelSkipWidth:$,labelSkipHeight:B,margin:Se,width:i,height:a,innerWidth:ke,innerHeight:Ce,bars:Oe,legendData:Le,enableLabel:L,xScale:_e,yScale:De,tooltip:ae,getTooltipLabel:Re,onClick:se,onMouseEnter:ce,onMouseLeave:ue,getColor:ze}},[U,Q,oe,$,B,Se,i,a,ke,Ce,Oe,Le,L,_e,De,ae,Re,se,ce,ue,ze]),qe=xk(ne),Ye=rO(l,c,j,D);(0,G.useEffect)(function(){var e,t=null==(e=ve.current)?void 0:e.getContext("2d");ve.current&&t&&(ve.current.width=Me*pe,ve.current.height=Pe*pe,t.scale(pe,pe),t.fillStyle=xe.background,t.fillRect(0,0,Me,Pe),t.translate(Se.left,Se.top),R.forEach(function(e){"grid"===e?"number"==typeof xe.grid.line.strokeWidth&&xe.grid.line.strokeWidth>0&&(t.lineWidth=xe.grid.line.strokeWidth,t.strokeStyle=xe.grid.line.stroke,k&&$P(t,{width:ke,height:Ce,scale:_e,axis:"x",values:P}),M&&$P(t,{width:ke,height:Ce,scale:De,axis:"y",values:T})):"axes"===e?zP(t,{xScale:_e,yScale:De,width:ke,height:Ce,top:g,right:b,bottom:v,left:w,theme:xe}):"bars"===e?je.forEach(function(e){I(t,WT({bar:e,borderColor:Ae(e),borderRadius:U,borderWidth:Q,label:Ee(e.data),labelColor:Ie(e),shouldRenderLabel:Fe(e)},Ye(e.width,e.height)))}):"legends"===e?Le.forEach(function(e){var n=e[0],r=e[1];NT(t,WT({},n,{data:r,containerWidth:ke,containerHeight:Ce,theme:xe}))}):"annotations"===e?rT(t,{annotations:We,theme:xe}):"totals"===e&&ge?function(e,t,n,r){void 0===r&&(r=ZT.layout),e.fillStyle=n.text.fill,e.font="bold "+n.labels.text.fontSize+"px "+n.labels.text.fontFamily,e.textBaseline="vertical"===r?"alphabetic":"middle",e.textAlign="vertical"===r?"center":"start",t.forEach(function(t){e.fillText(t.formattedValue,t.x,t.y)})}(t,Ne,xe,l):"function"==typeof e&&e(t,He)}),t.save())},[v,w,b,g,je,U,Q,We,k,M,Ae,Ee,Ie,P,T,s,a,Ce,ke,He,R,l,Le,Se.left,Se.top,Pe,Me,pe,I,_e,De,c,Fe,xe,i,Ne,ge,qe,Ye]);var Ue=(0,G.useCallback)(function(e){if(Oe&&ve.current){var t=Jk(ve.current,e),n=t[0],r=t[1],o=MO(Oe,Se,n,r);void 0!==o?(Ve((0,G.createElement)(ae,WT({},o.data,{color:o.color,label:o.label,value:Number(o.data.value)})),e),"mouseenter"===e.type&&(null==ce||ce(o.data,e))):Be()}},[Be,Se,ce,Oe,Ve,ae]),Ge=(0,G.useCallback)(function(e){if(Oe&&ve.current){Be();var t=Jk(ve.current,e),n=t[0],r=t[1],o=MO(Oe,Se,n,r);o&&(null==ue||ue(o.data,e))}},[Be,Se,ue,Oe]),Xe=(0,G.useCallback)(function(e){if(Oe&&ve.current){var t=Jk(ve.current,e),n=t[0],r=t[1],o=MO(Oe,Se,n,r);void 0!==o&&(null==se||se(WT({},o.data,{color:o.color}),e))}},[Se,se,Oe]);return(0,le.jsx)("canvas",{ref:function(e){ve.current=e,he&&"current"in he&&(he.current=e)},width:Me*pe,height:Pe*pe,style:{width:Me,height:Pe,cursor:oe?"auto":"normal"},onMouseEnter:oe?Ue:void 0,onMouseMove:oe?Ue:void 0,onMouseLeave:oe?Ge:void 0,onClick:oe?Xe:void 0})},TO=(0,G.forwardRef)(function(e,t){var n=e.isInteractive,r=e.renderWrapper,o=e.theme,i=HT(e,CO);return(0,le.jsx)(jk,{isInteractive:n,renderWrapper:r,theme:o,animate:!1,children:(0,le.jsx)(PO,WT({},i,{canvasRef:t}))})}),OO=function(e){return(0,le.jsx)(_k,{children:function(t){var n=t.width,r=t.height;return(0,le.jsx)(kO,WT({width:n,height:r},e))}})},jO=((0,G.forwardRef)(function(e,t){return(0,le.jsx)(_k,{children:function(n){var r=n.width,o=n.height;return(0,le.jsx)(TO,WT({width:r,height:o},e,{ref:t}))}})}),function(e){var t=e.theme,n=e.minValue,r=e.maxValue,o=e.divergeAt;switch(t){case"sequential-green":return{type:"sequential",colors:["#FFFFFF","#70CC12"],minValue:n,maxValue:r};case"sequential-red":return{type:"sequential",colors:["#FFFFFF","#FA6969"],minValue:n,maxValue:r};case"sequential-blue":return{type:"sequential",colors:["#FFFFFF","#50B4F4"],minValue:n,maxValue:r};case"categorical-default":return["#70CC12","#009D00","#FFB62C","#FA6969","#BA9EEA","#AAEA0F","#FFD950","#6EEAE2","#FA6969","#005F00","#F8C867","#7ACBFF","#CBAFFB","#FFE790"];case"categorical-canvas":return["#AFD318","#68AA23","#CFE574","#FDEC73","#FABE78","#32AABF","#ADF3FF"];case"diverging":return{type:"diverging",colors:["#FF8000","#F6FEE2","#005F00"],minValue:n,maxValue:r,divergeAt:o};case"categorical-single":return["#7ACBFF"];case"categorical-dual-neutral":return["#CBAFFB","#FFE790"];case"categorical-dual-teal-orange":return["#6EEAE2","#FFB62C"];case"categorical-quad-neutral":return["#CBAFFB","#FFE790","#93F8F2","#FF8B8B"]}return["#70CC12","#009D00","#FFB62C","#FA6969","#BA9EEA","#AAEA0F","#FFD950","#6EEAE2","#FA6969","#005F00","#F8C867","#7ACBFF","#CBAFFB","#FFE790"]}),_O=function(e){var t=e.data,n=e.themeConfig,r=(Array.isArray(t)?t:Object.values(t)).map(function(e,t){var r=n&&n.length?n[t%n.length]:void 0;return{title:e.title||e.id,color:r}});return(0,le.jsx)("div",{className:"chart-legend",role:"graphics-legend",children:r.map(function(e,t){return(0,le.jsxs)("div",{className:"chart-legend-item",children:[(0,le.jsx)("div",{className:"chart-legend-symbol",style:{backgroundColor:e.color}}),(0,le.jsx)("span",{children:e.title})]},t)})})},DO=function(e,t,n){var r={};return n.forEach(function(n){var o=t.map(function(e){return n[e]}),i=o.join("|");r[i]||(r[i]={},t.forEach(function(e,t){r[i][e]=o[t]}),e.forEach(function(e){r[i][e]=0})),e.forEach(function(e){r[i][e]+=parseFloat(n[e])||0})}),Object.values(r)};function EO(e){return EO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},EO(e)}function RO(e,t,n){return(t=function(e){var t=function(e){if("object"!=EO(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=EO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==EO(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var AO=function(e){var t=e.barLabel;return(0,le.jsx)(zg,{rows:[[t]]})},IO=function(e){var t=e.x,n=e.y,r=e.value,o=e.textAnchor,i=e.verticalLabels,a=e.horizontalBars,s=a?10:9,l=a?4:12,c=r.split(" "),u=[],d="";c.forEach(function(e){(d+e).length>s?(d&&u.push(d.trim()),d=e+" "):d+=e+" "}),d&&u.push(d.trim());var f=u;if(u.length>1){var p=(f=u.slice(0,1))[0];f[0]=p.slice(0,s-3)+"..."}var h=qg(),m=function(e){return h.showTooltipFromEvent((0,le.jsx)(AO,{barLabel:r}),e,a?"right":"top")};return(0,le.jsx)("g",{transform:"translate(".concat(t,", ").concat(n+l,") rotate(").concat(i?-70:0,")"),onMouseEnter:m,onMouseMove:m,onMouseLeave:h.hideTooltip,children:a?(0,le.jsx)("text",{textAnchor:o,style:{fontSize:"var(--font-size-sm, 12px)",fill:"#333"},children:f[0]}):f.map(function(e,t){return(0,le.jsx)("text",{textAnchor:o,y:14*t,style:{fontSize:"var(--font-size-sm, 12px)",fill:"#333"},children:e},t)})})};const FO=Math.PI,LO=2*FO,NO=1e-6,zO=LO-NO;function $O(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}class VO{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?$O:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return $O;const n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,o,i){this._append`C${+e},${+t},${+n},${+r},${this._x1=+o},${this._y1=+i}`}arcTo(e,t,n,r,o){if(e=+e,t=+t,n=+n,r=+r,(o=+o)<0)throw new Error(`negative radius: ${o}`);let i=this._x1,a=this._y1,s=n-e,l=r-t,c=i-e,u=a-t,d=c*c+u*u;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(d>NO)if(Math.abs(u*s-l*c)>NO&&o){let f=n-i,p=r-a,h=s*s+l*l,m=f*f+p*p,g=Math.sqrt(h),b=Math.sqrt(d),y=o*Math.tan((FO-Math.acos((h+d-m)/(2*g*b)))/2),v=y/b,x=y/g;Math.abs(v-1)>NO&&this._append`L${e+v*c},${t+v*u}`,this._append`A${o},${o},0,0,${+(u*f>c*p)},${this._x1=e+x*s},${this._y1=t+x*l}`}else this._append`L${this._x1=e},${this._y1=t}`}arc(e,t,n,r,o,i){if(e=+e,t=+t,i=!!i,(n=+n)<0)throw new Error(`negative radius: ${n}`);let a=n*Math.cos(r),s=n*Math.sin(r),l=e+a,c=t+s,u=1^i,d=i?r-o:o-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>NO||Math.abs(this._y1-c)>NO)&&this._append`L${l},${c}`,n&&(d<0&&(d=d%LO+LO),d>zO?this._append`A${n},${n},0,1,${u},${e-a},${t-s}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:d>NO&&this._append`A${n},${n},0,${+(d>=FO)},${u},${this._x1=e+n*Math.cos(o)},${this._y1=t+n*Math.sin(o)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function BO(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);t=e}return e},()=>new VO(t)}function WO(e){return e[0]}function HO(e){return e[1]}function qO(e,t){var n=$T(!0),r=null,o=Lb,i=null,a=BO(s);function s(s){var l,c,u,d=(s=zT(s)).length,f=!1;for(null==r&&(i=o(u=a())),l=0;l<=d;++l)!(l<d&&n(c=s[l],l,s))===f&&((f=!f)?i.lineStart():i.lineEnd()),f&&i.point(+e(c,l,s),+t(c,l,s));if(u)return i=null,u+""||null}return e="function"==typeof e?e:void 0===e?WO:$T(e),t="function"==typeof t?t:void 0===t?HO:$T(t),s.x=function(t){return arguments.length?(e="function"==typeof t?t:$T(+t),s):e},s.y=function(e){return arguments.length?(t="function"==typeof e?e:$T(+e),s):t},s.defined=function(e){return arguments.length?(n="function"==typeof e?e:$T(!!e),s):n},s.curve=function(e){return arguments.length?(o=e,null!=r&&(i=o(r)),s):o},s.context=function(e){return arguments.length?(null==e?r=i=null:i=o(r=e),s):r},s}var YO=function(e){var t=e.barLabel,n=e.barValue,r=e.lineLabel,o=e.lineValue;return(0,le.jsx)(zg,{rows:[[t,n],[r,o]]})},UO=function(e){var t=e.bars,n=e.xScale,r=e.innerWidth,o=e.innerHeight,i=e.lineData,a=e.lineMeasure,s=e.lineDimension,l=e.lineColor,c=e.annotation,u=t[0].width,d=bP([{id:"only",data:i.map(function(e,t){return{x:t,y:e[a]}})}],{type:"linear"},{type:"linear"},r,o),f=qO().x(function(e){return n(e[s])+u}).y(function(e){var t;return null!==(t=d.yScale(e[a]))&&void 0!==t?t:0}),p=qg();function h(e,n){var r=t[n].data.indexValue,o=i.find(function(e){return e[s]===r}),l=c.measures[t[n].data.id].title,u=t[n].data.value,d=c.measures[a].title;return p.showTooltipFromEvent((0,le.jsx)(YO,{barLabel:l,barValue:u,lineLabel:d,lineValue:o?o[a]:null}),e)}return(0,le.jsxs)(G.Fragment,{children:[(0,le.jsx)(IP,{yScale:d.yScale,xScale:n,width:r,height:o,right:{ticksPosition:"after"}}),(0,le.jsx)("path",{d:f(i),fill:"none",stroke:l,strokeWidth:5,style:{pointerEvents:"none"}}),i.map(function(e){return(0,le.jsx)("circle",{cx:n(e[s])+u,cy:d.yScale(e[a]),r:2,fill:"white",stroke:l,style:{pointerEvents:"none"}},e[s])}),t.map(function(e,t){return(0,le.jsx)("rect",{x:e.x,y:0,height:o,width:e.width,fill:"transparent",onMouseEnter:function(e){return h(e,t)},onMouseMove:function(e){return h(e,t)},onMouseLeave:p.hideTooltip},e.key)})]})},GO={"green-1":"#70CC12","green-2":"#009D00","green-3":"#AAEA0F","green-4":"#005F00","orange-1":"#FFB62C","orange-2":"#F8C867","blue-1":"#50B4F4","blue-2":"#7ACBFF","purple-1":"#BA9EEA","purple-2":"#CBAFFB","yellow-1":"#FFD950","yellow-2":"#FFE790","teal-1":"#6EEAE2","teal-2":"#93F8F2","red-1":"#FA6969","red-2":"#FF8B8B","grey-system":"#efeeed"},XO=function(e,t,n){if(!e)return[];var r=structuredClone(e);t.forEach(function(e){if(e in r){var t=r[e];delete r[e],r[n[e]]=t}});var o=Object.keys(r).map(function(e){return{threshold:e,colour:GO[r[e]]||"#000000"}});return o.sort(function(e,t){return Number(e.threshold)-Number(t.threshold)}),o},QO=function(e,t){var n,r=GO["grey-system"];return(null===(n=e.slice().reverse().find(function(e){return Number(t)>=Number(e.threshold)}))||void 0===n?void 0:n.colour)||r};function KO(e){return KO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},KO(e)}function ZO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function JO(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ZO(Object(n),!0).forEach(function(t){ej(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZO(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ej(e,t,n){return(t=function(e){var t=function(e){if("object"!=KO(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=KO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==KO(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var tj=function(e){var t=e.data,n=e.chartConfig,r=e.keys,o=e.indexes,i=e.annotation;if(!t||0===t.length)return(0,le.jsx)("div",{children:"Error: no data provided"});var a=n.theme,s=n.xAxisLabel,l=n.yAxisLabel,c=n.grouped,u=n.lineMeasure,d=n.verticalLabels,f=n.horizontalBars,p=n.groupingDimension,h=n.colourThresholds,m=n.showLegend,g=void 0===m||m,b=i.measures,y=function(e,t,n,r,o){var i=o?structuredClone(e):DO(t,n,e),a=r?i.map(function(e){return RO(RO({},String(n[0]),e[n[0]]),String(r),e[r])}):null;r&&i.map(function(e){return delete e[r],e});var s=[],l=i;if(o){s=i.reduce(function(e,t){return t[o]&&!e.includes(t[o])&&e.push(t[o]),e},[]),i.map(function(e){return e[o]&&t.forEach(function(t){e["".concat(t,"_").concat(e[o])]=e[t]}),e});var c=s.flatMap(function(e){return t.map(function(t){return"".concat(t,"_").concat(e)})}),u=n.filter(function(e){return e!==o});l=DO(c,u,i)}return{lineData:a,transformedData:l,uniqueGroupingValues:s}}(t,r,o,u,p),v=y.transformedData,x=y.lineData,w=y.uniqueGroupingValues;if(p&&(w.forEach(function(e){r.forEach(function(t){var n="".concat(t,"_").concat(e);!b[n]&&b[t]&&(b[n]=JO(JO({},b[t]),{},{title:"".concat(b[t].title," (").concat(e,")")}))})}),Object.keys(b).forEach(function(e){w.some(function(t){return e.endsWith("_".concat(t))})||delete b[e]})),f&&u)return(0,le.jsxs)("div",{role:"alert",children:[(0,le.jsx)("p",{children:"Error: line measure not supported with horizontal bars"}),(0,le.jsx)("p",{children:"Check chart config and remove either lineMeasure or horizontalBars attribute"})]});var S=u&&x&&x.length>0,k=r;S&&(k=r.filter(function(e){return e!==u})),p&&(k=w.flatMap(function(e){return k.map(function(t){return"".concat(t,"_").concat(e)})}));var C=jO({theme:a}),M=C[r.findIndex(function(e){return e===u})],P=o[0],T=S?function(e){var t=e.bars,n=e.xScale,r=e.innerWidth,o=e.innerHeight;return(0,le.jsx)(UO,{bars:t,xScale:n,innerWidth:r,innerHeight:o,lineColor:M,lineData:x,lineMeasure:u,lineDimension:P,annotation:i})}:null,O=["grid","axes","bars","markers","legends"];S&&T&&O.push(T),f&&Array.isArray(v)&&v.length>1&&v.reverse();var j=h?function(e){var t=XO(h,r,e.data);return QO(t,e.value)}:C;return(0,le.jsxs)("div",{className:"dashboard-chart-container",children:[(0,le.jsx)("div",{className:"dashboard-chart",role:"graphics-datachart",children:(0,le.jsx)(OO,{"test-id":"bar-chart",layout:f?"horizontal":"vertical",data:v,keys:k,indexBy:function(e){return o.filter(function(e){return e!==p}).map(function(t){return String(e[t])}).join(" - ")},colors:j,theme:{tooltip:{wrapper:{zIndex:1e3}}},colorBy:"id",groupMode:c?"grouped":"stacked",margin:{top:20,right:40,bottom:70,left:90},padding:.35,valueScale:{type:"linear",max:"auto"},indexScale:{type:"band",round:!0},tooltip:function(e){var t,n=e.id,r=e.value,o=e.indexValue,a=(null===(t=i.measures[n])||void 0===t?void 0:t.title)||n;return(0,le.jsxs)("div",{style:{padding:"6px 9px",background:"white"},children:[(0,le.jsxs)("strong",{children:[a,":"]})," ",r," ",(0,le.jsx)("br",{}),(0,le.jsx)("em",{children:o})]})},borderColor:{from:"color",modifiers:[["darker",1.6]]},axisTop:null,axisRight:null,axisBottom:{tickSize:5,tickPadding:5,tickRotation:d?-70:0,legend:s,legendPosition:"middle",legendOffset:60,truncateTickAt:0,renderTick:f?void 0:function(e){return(0,le.jsx)(IO,{x:e.x,y:e.y,value:e.value,textAnchor:d?"end":"middle",horizontalBars:f,verticalLabels:d})}},axisLeft:{tickSize:5,tickPadding:5,tickRotation:0,legend:l,legendPosition:"middle",legendOffset:-70,truncateTickAt:0,renderTick:f?function(e){return(0,le.jsx)(IO,{x:e.x-5,y:e.y,value:e.value,textAnchor:"end",horizontalBars:f,verticalLabels:d})}:void 0},labelSkipWidth:12,labelSkipHeight:12,labelTextColor:{from:"color",modifiers:[["darker",1.6]]},role:"application",ariaLabel:"Bar chart",onClick:function(e){return console.log(e)},layers:O})}),g&&(0,le.jsx)(_O,{data:b,themeConfig:C})]})},nj=a(7200);const rj=134217729;function oj(e,t,n,r,o){let i,a,s,l,c=t[0],u=r[0],d=0,f=0;u>c==u>-c?(i=c,c=t[++d]):(i=u,u=r[++f]);let p=0;if(d<e&&f<n)for(u>c==u>-c?(a=c+i,s=i-(a-c),c=t[++d]):(a=u+i,s=i-(a-u),u=r[++f]),i=a,0!==s&&(o[p++]=s);d<e&&f<n;)u>c==u>-c?(a=i+c,l=a-i,s=i-(a-l)+(c-l),c=t[++d]):(a=i+u,l=a-i,s=i-(a-l)+(u-l),u=r[++f]),i=a,0!==s&&(o[p++]=s);for(;d<e;)a=i+c,l=a-i,s=i-(a-l)+(c-l),c=t[++d],i=a,0!==s&&(o[p++]=s);for(;f<n;)a=i+u,l=a-i,s=i-(a-l)+(u-l),u=r[++f],i=a,0!==s&&(o[p++]=s);return 0===i&&0!==p||(o[p++]=i),p}function ij(e){return new Float64Array(e)}const aj=ij(4),sj=ij(8),lj=ij(12),cj=ij(16),uj=ij(4);function dj(e,t,n,r,o,i){const a=(t-i)*(n-o),s=(e-o)*(r-i),l=a-s,c=Math.abs(a+s);return Math.abs(l)>=33306690738754716e-32*c?l:-function(e,t,n,r,o,i,a){let s,l,c,u,d,f,p,h,m,g,b,y,v,x,w,S,k,C;const M=e-o,P=n-o,T=t-i,O=r-i;x=M*O,f=rj*M,p=f-(f-M),h=M-p,f=rj*O,m=f-(f-O),g=O-m,w=h*g-(x-p*m-h*m-p*g),S=T*P,f=rj*T,p=f-(f-T),h=T-p,f=rj*P,m=f-(f-P),g=P-m,k=h*g-(S-p*m-h*m-p*g),b=w-k,d=w-b,aj[0]=w-(b+d)+(d-k),y=x+b,d=y-x,v=x-(y-d)+(b-d),b=v-S,d=v-b,aj[1]=v-(b+d)+(d-S),C=y+b,d=C-y,aj[2]=y-(C-d)+(b-d),aj[3]=C;let j=function(e,t){let n=t[0];for(let e=1;e<4;e++)n+=t[e];return n}(0,aj),_=22204460492503146e-32*a;if(j>=_||-j>=_)return j;if(d=e-M,s=e-(M+d)+(d-o),d=n-P,c=n-(P+d)+(d-o),d=t-T,l=t-(T+d)+(d-i),d=r-O,u=r-(O+d)+(d-i),0===s&&0===l&&0===c&&0===u)return j;if(_=11093356479670487e-47*a+33306690738754706e-32*Math.abs(j),j+=M*u+O*s-(T*c+P*l),j>=_||-j>=_)return j;x=s*O,f=rj*s,p=f-(f-s),h=s-p,f=rj*O,m=f-(f-O),g=O-m,w=h*g-(x-p*m-h*m-p*g),S=l*P,f=rj*l,p=f-(f-l),h=l-p,f=rj*P,m=f-(f-P),g=P-m,k=h*g-(S-p*m-h*m-p*g),b=w-k,d=w-b,uj[0]=w-(b+d)+(d-k),y=x+b,d=y-x,v=x-(y-d)+(b-d),b=v-S,d=v-b,uj[1]=v-(b+d)+(d-S),C=y+b,d=C-y,uj[2]=y-(C-d)+(b-d),uj[3]=C;const D=oj(4,aj,4,uj,sj);x=M*u,f=rj*M,p=f-(f-M),h=M-p,f=rj*u,m=f-(f-u),g=u-m,w=h*g-(x-p*m-h*m-p*g),S=T*c,f=rj*T,p=f-(f-T),h=T-p,f=rj*c,m=f-(f-c),g=c-m,k=h*g-(S-p*m-h*m-p*g),b=w-k,d=w-b,uj[0]=w-(b+d)+(d-k),y=x+b,d=y-x,v=x-(y-d)+(b-d),b=v-S,d=v-b,uj[1]=v-(b+d)+(d-S),C=y+b,d=C-y,uj[2]=y-(C-d)+(b-d),uj[3]=C;const E=oj(D,sj,4,uj,lj);x=s*u,f=rj*s,p=f-(f-s),h=s-p,f=rj*u,m=f-(f-u),g=u-m,w=h*g-(x-p*m-h*m-p*g),S=l*c,f=rj*l,p=f-(f-l),h=l-p,f=rj*c,m=f-(f-c),g=c-m,k=h*g-(S-p*m-h*m-p*g),b=w-k,d=w-b,uj[0]=w-(b+d)+(d-k),y=x+b,d=y-x,v=x-(y-d)+(b-d),b=v-S,d=v-b,uj[1]=v-(b+d)+(d-S),C=y+b,d=C-y,uj[2]=y-(C-d)+(b-d),uj[3]=C;const R=oj(E,lj,4,uj,cj);return cj[R-1]}(e,t,n,r,o,i,c)}ij(4),ij(4),ij(4),ij(4),ij(4),ij(4),ij(4),ij(4),ij(4),ij(8),ij(8),ij(8),ij(4),ij(8),ij(8),ij(8),ij(12),ij(192),ij(192),ij(4),ij(4),ij(4),ij(4),ij(4),ij(4),ij(4),ij(4),ij(8),ij(8),ij(8),ij(8),ij(8),ij(8),ij(8),ij(8),ij(8),ij(4),ij(4),ij(4),ij(8),ij(16),ij(16),ij(16),ij(32),ij(32),ij(48),ij(64),ij(1152),ij(1152),ij(4),ij(4),ij(4),ij(4),ij(4),ij(4),ij(4),ij(4),ij(4),ij(4),ij(24),ij(24),ij(24),ij(24),ij(24),ij(24),ij(24),ij(24),ij(24),ij(24),ij(1152),ij(1152),ij(1152),ij(1152),ij(1152),ij(2304),ij(2304),ij(3456),ij(5760),ij(8),ij(8),ij(8),ij(16),ij(24),ij(48),ij(48),ij(96),ij(192),ij(384),ij(384),ij(384),ij(768),ij(96),ij(96),ij(96),ij(1152);const fj=Math.pow(2,-52),pj=new Uint32Array(512);class hj{static from(e,t=xj,n=wj){const r=e.length,o=new Float64Array(2*r);for(let i=0;i<r;i++){const r=e[i];o[2*i]=t(r),o[2*i+1]=n(r)}return new hj(o)}constructor(e){const t=e.length>>1;if(t>0&&"number"!=typeof e[0])throw new Error("Expected coords to contain numbers.");this.coords=e;const n=Math.max(2*t-5,0);this._triangles=new Uint32Array(3*n),this._halfedges=new Int32Array(3*n),this._hashSize=Math.ceil(Math.sqrt(t)),this._hullPrev=new Uint32Array(t),this._hullNext=new Uint32Array(t),this._hullTri=new Uint32Array(t),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(t),this._dists=new Float64Array(t),this.update()}update(){const{coords:e,_hullPrev:t,_hullNext:n,_hullTri:r,_hullHash:o}=this,i=e.length>>1;let a=1/0,s=1/0,l=-1/0,c=-1/0;for(let t=0;t<i;t++){const n=e[2*t],r=e[2*t+1];n<a&&(a=n),r<s&&(s=r),n>l&&(l=n),r>c&&(c=r),this._ids[t]=t}const u=(a+l)/2,d=(s+c)/2;let f,p,h;for(let t=0,n=1/0;t<i;t++){const r=mj(u,d,e[2*t],e[2*t+1]);r<n&&(f=t,n=r)}const m=e[2*f],g=e[2*f+1];for(let t=0,n=1/0;t<i;t++){if(t===f)continue;const r=mj(m,g,e[2*t],e[2*t+1]);r<n&&r>0&&(p=t,n=r)}let b=e[2*p],y=e[2*p+1],v=1/0;for(let t=0;t<i;t++){if(t===f||t===p)continue;const n=bj(m,g,b,y,e[2*t],e[2*t+1]);n<v&&(h=t,v=n)}let x=e[2*h],w=e[2*h+1];if(v===1/0){for(let t=0;t<i;t++)this._dists[t]=e[2*t]-e[0]||e[2*t+1]-e[1];yj(this._ids,this._dists,0,i-1);const t=new Uint32Array(i);let n=0;for(let e=0,r=-1/0;e<i;e++){const o=this._ids[e],i=this._dists[o];i>r&&(t[n++]=o,r=i)}return this.hull=t.subarray(0,n),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(dj(m,g,b,y,x,w)<0){const e=p,t=b,n=y;p=h,b=x,y=w,h=e,x=t,w=n}const S=function(e,t,n,r,o,i){const a=n-e,s=r-t,l=o-e,c=i-t,u=a*a+s*s,d=l*l+c*c,f=.5/(a*c-s*l);return{x:e+(c*u-s*d)*f,y:t+(a*d-l*u)*f}}(m,g,b,y,x,w);this._cx=S.x,this._cy=S.y;for(let t=0;t<i;t++)this._dists[t]=mj(e[2*t],e[2*t+1],S.x,S.y);yj(this._ids,this._dists,0,i-1),this._hullStart=f;let k=3;n[f]=t[h]=p,n[p]=t[f]=h,n[h]=t[p]=f,r[f]=0,r[p]=1,r[h]=2,o.fill(-1),o[this._hashKey(m,g)]=f,o[this._hashKey(b,y)]=p,o[this._hashKey(x,w)]=h,this.trianglesLen=0,this._addTriangle(f,p,h,-1,-1,-1);for(let i,a,s=0;s<this._ids.length;s++){const l=this._ids[s],c=e[2*l],u=e[2*l+1];if(s>0&&Math.abs(c-i)<=fj&&Math.abs(u-a)<=fj)continue;if(i=c,a=u,l===f||l===p||l===h)continue;let d=0;for(let e=0,t=this._hashKey(c,u);e<this._hashSize&&(d=o[(t+e)%this._hashSize],-1===d||d===n[d]);e++);d=t[d];let m,g=d;for(;m=n[g],dj(c,u,e[2*g],e[2*g+1],e[2*m],e[2*m+1])>=0;)if(g=m,g===d){g=-1;break}if(-1===g)continue;let b=this._addTriangle(g,l,n[g],-1,-1,r[g]);r[l]=this._legalize(b+2),r[g]=b,k++;let y=n[g];for(;m=n[y],dj(c,u,e[2*y],e[2*y+1],e[2*m],e[2*m+1])<0;)b=this._addTriangle(y,l,m,r[l],-1,r[y]),r[l]=this._legalize(b+2),n[y]=y,k--,y=m;if(g===d)for(;m=t[g],dj(c,u,e[2*m],e[2*m+1],e[2*g],e[2*g+1])<0;)b=this._addTriangle(m,l,g,-1,r[g],r[m]),this._legalize(b+2),r[m]=b,n[g]=g,k--,g=m;this._hullStart=t[l]=g,n[g]=t[y]=l,n[l]=y,o[this._hashKey(c,u)]=l,o[this._hashKey(e[2*g],e[2*g+1])]=g}this.hull=new Uint32Array(k);for(let e=0,t=this._hullStart;e<k;e++)this.hull[e]=t,t=n[t];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(e,t){return Math.floor(function(e,t){const n=e/(Math.abs(e)+Math.abs(t));return(t>0?3-n:1+n)/4}(e-this._cx,t-this._cy)*this._hashSize)%this._hashSize}_legalize(e){const{_triangles:t,_halfedges:n,coords:r}=this;let o=0,i=0;for(;;){const a=n[e],s=e-e%3;if(i=s+(e+2)%3,-1===a){if(0===o)break;e=pj[--o];continue}const l=a-a%3,c=s+(e+1)%3,u=l+(a+2)%3,d=t[i],f=t[e],p=t[c],h=t[u];if(gj(r[2*d],r[2*d+1],r[2*f],r[2*f+1],r[2*p],r[2*p+1],r[2*h],r[2*h+1])){t[e]=h,t[a]=d;const r=n[u];if(-1===r){let t=this._hullStart;do{if(this._hullTri[t]===u){this._hullTri[t]=e;break}t=this._hullPrev[t]}while(t!==this._hullStart)}this._link(e,r),this._link(a,n[i]),this._link(i,u);const s=l+(a+1)%3;o<pj.length&&(pj[o++]=s)}else{if(0===o)break;e=pj[--o]}}return i}_link(e,t){this._halfedges[e]=t,-1!==t&&(this._halfedges[t]=e)}_addTriangle(e,t,n,r,o,i){const a=this.trianglesLen;return this._triangles[a]=e,this._triangles[a+1]=t,this._triangles[a+2]=n,this._link(a,r),this._link(a+1,o),this._link(a+2,i),this.trianglesLen+=3,a}}function mj(e,t,n,r){const o=e-n,i=t-r;return o*o+i*i}function gj(e,t,n,r,o,i,a,s){const l=e-a,c=t-s,u=n-a,d=r-s,f=o-a,p=i-s,h=u*u+d*d,m=f*f+p*p;return l*(d*m-h*p)-c*(u*m-h*f)+(l*l+c*c)*(u*p-d*f)<0}function bj(e,t,n,r,o,i){const a=n-e,s=r-t,l=o-e,c=i-t,u=a*a+s*s,d=l*l+c*c,f=.5/(a*c-s*l),p=(c*u-s*d)*f,h=(a*d-l*u)*f;return p*p+h*h}function yj(e,t,n,r){if(r-n<=20)for(let o=n+1;o<=r;o++){const r=e[o],i=t[r];let a=o-1;for(;a>=n&&t[e[a]]>i;)e[a+1]=e[a--];e[a+1]=r}else{let o=n+1,i=r;vj(e,n+r>>1,o),t[e[n]]>t[e[r]]&&vj(e,n,r),t[e[o]]>t[e[r]]&&vj(e,o,r),t[e[n]]>t[e[o]]&&vj(e,n,o);const a=e[o],s=t[a];for(;;){do{o++}while(t[e[o]]<s);do{i--}while(t[e[i]]>s);if(i<o)break;vj(e,o,i)}e[n+1]=e[i],e[i]=a,r-o+1>=i-n?(yj(e,t,o,r),yj(e,t,n,i-1)):(yj(e,t,n,i-1),yj(e,t,o,r))}}function vj(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function xj(e){return e[0]}function wj(e){return e[1]}const Sj=1e-6;class kj{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(e,t){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(e,t){this._+=`L${this._x1=+e},${this._y1=+t}`}arc(e,t,n){const r=(e=+e)+(n=+n),o=t=+t;if(n<0)throw new Error("negative radius");null===this._x1?this._+=`M${r},${o}`:(Math.abs(this._x1-r)>Sj||Math.abs(this._y1-o)>Sj)&&(this._+="L"+r+","+o),n&&(this._+=`A${n},${n},0,1,1,${e-n},${t}A${n},${n},0,1,1,${this._x1=r},${this._y1=o}`)}rect(e,t,n,r){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${+n}v${+r}h${-n}Z`}value(){return this._||null}}class Cj{constructor(){this._=[]}moveTo(e,t){this._.push([e,t])}closePath(){this._.push(this._[0].slice())}lineTo(e,t){this._.push([e,t])}value(){return this._.length?this._:null}}class Mj{constructor(e,[t,n,r,o]=[0,0,960,500]){if(!((r=+r)>=(t=+t)&&(o=+o)>=(n=+n)))throw new Error("invalid bounds");this.delaunay=e,this._circumcenters=new Float64Array(2*e.points.length),this.vectors=new Float64Array(2*e.points.length),this.xmax=r,this.xmin=t,this.ymax=o,this.ymin=n,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:e,hull:t,triangles:n},vectors:r}=this;let o,i;const a=this.circumcenters=this._circumcenters.subarray(0,n.length/3*2);for(let r,s,l=0,c=0,u=n.length;l<u;l+=3,c+=2){const u=2*n[l],d=2*n[l+1],f=2*n[l+2],p=e[u],h=e[u+1],m=e[d],g=e[d+1],b=e[f],y=e[f+1],v=m-p,x=g-h,w=b-p,S=y-h,k=2*(v*S-x*w);if(Math.abs(k)<1e-9){if(void 0===o){o=i=0;for(const n of t)o+=e[2*n],i+=e[2*n+1];o/=t.length,i/=t.length}const n=1e9*Math.sign((o-p)*S-(i-h)*w);r=(p+b)/2-n*S,s=(h+y)/2+n*w}else{const e=1/k,t=v*v+x*x,n=w*w+S*S;r=p+(S*t-x*n)*e,s=h+(v*n-w*t)*e}a[c]=r,a[c+1]=s}let s,l,c,u=t[t.length-1],d=4*u,f=e[2*u],p=e[2*u+1];r.fill(0);for(let n=0;n<t.length;++n)u=t[n],s=d,l=f,c=p,d=4*u,f=e[2*u],p=e[2*u+1],r[s+2]=r[d]=c-p,r[s+3]=r[d+1]=f-l}render(e){const t=null==e?e=new kj:void 0,{delaunay:{halfedges:n,inedges:r,hull:o},circumcenters:i,vectors:a}=this;if(o.length<=1)return null;for(let t=0,r=n.length;t<r;++t){const r=n[t];if(r<t)continue;const o=2*Math.floor(t/3),a=2*Math.floor(r/3),s=i[o],l=i[o+1],c=i[a],u=i[a+1];this._renderSegment(s,l,c,u,e)}let s,l=o[o.length-1];for(let t=0;t<o.length;++t){s=l,l=o[t];const n=2*Math.floor(r[l]/3),c=i[n],u=i[n+1],d=4*s,f=this._project(c,u,a[d+2],a[d+3]);f&&this._renderSegment(c,u,f[0],f[1],e)}return t&&t.value()}renderBounds(e){const t=null==e?e=new kj:void 0;return e.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),t&&t.value()}renderCell(e,t){const n=null==t?t=new kj:void 0,r=this._clip(e);if(null===r||!r.length)return;t.moveTo(r[0],r[1]);let o=r.length;for(;r[0]===r[o-2]&&r[1]===r[o-1]&&o>1;)o-=2;for(let e=2;e<o;e+=2)r[e]===r[e-2]&&r[e+1]===r[e-1]||t.lineTo(r[e],r[e+1]);return t.closePath(),n&&n.value()}*cellPolygons(){const{delaunay:{points:e}}=this;for(let t=0,n=e.length/2;t<n;++t){const e=this.cellPolygon(t);e&&(e.index=t,yield e)}}cellPolygon(e){const t=new Cj;return this.renderCell(e,t),t.value()}_renderSegment(e,t,n,r,o){let i;const a=this._regioncode(e,t),s=this._regioncode(n,r);0===a&&0===s?(o.moveTo(e,t),o.lineTo(n,r)):(i=this._clipSegment(e,t,n,r,a,s))&&(o.moveTo(i[0],i[1]),o.lineTo(i[2],i[3]))}contains(e,t,n){return(t=+t)==t&&(n=+n)==n&&this.delaunay._step(e,t,n)===e}*neighbors(e){const t=this._clip(e);if(t)for(const n of this.delaunay.neighbors(e)){const e=this._clip(n);if(e)e:for(let r=0,o=t.length;r<o;r+=2)for(let i=0,a=e.length;i<a;i+=2)if(t[r]===e[i]&&t[r+1]===e[i+1]&&t[(r+2)%o]===e[(i+a-2)%a]&&t[(r+3)%o]===e[(i+a-1)%a]){yield n;break e}}}_cell(e){const{circumcenters:t,delaunay:{inedges:n,halfedges:r,triangles:o}}=this,i=n[e];if(-1===i)return null;const a=[];let s=i;do{const n=Math.floor(s/3);if(a.push(t[2*n],t[2*n+1]),s=s%3==2?s-2:s+1,o[s]!==e)break;s=r[s]}while(s!==i&&-1!==s);return a}_clip(e){if(0===e&&1===this.delaunay.hull.length)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const t=this._cell(e);if(null===t)return null;const{vectors:n}=this,r=4*e;return this._simplify(n[r]||n[r+1]?this._clipInfinite(e,t,n[r],n[r+1],n[r+2],n[r+3]):this._clipFinite(e,t))}_clipFinite(e,t){const n=t.length;let r,o,i,a,s=null,l=t[n-2],c=t[n-1],u=this._regioncode(l,c),d=0;for(let f=0;f<n;f+=2)if(r=l,o=c,l=t[f],c=t[f+1],i=u,u=this._regioncode(l,c),0===i&&0===u)a=d,d=0,s?s.push(l,c):s=[l,c];else{let t,n,f,p,h;if(0===i){if(null===(t=this._clipSegment(r,o,l,c,i,u)))continue;[n,f,p,h]=t}else{if(null===(t=this._clipSegment(l,c,r,o,u,i)))continue;[p,h,n,f]=t,a=d,d=this._edgecode(n,f),a&&d&&this._edge(e,a,d,s,s.length),s?s.push(n,f):s=[n,f]}a=d,d=this._edgecode(p,h),a&&d&&this._edge(e,a,d,s,s.length),s?s.push(p,h):s=[p,h]}if(s)a=d,d=this._edgecode(s[0],s[1]),a&&d&&this._edge(e,a,d,s,s.length);else if(this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return s}_clipSegment(e,t,n,r,o,i){const a=o<i;for(a&&([e,t,n,r,o,i]=[n,r,e,t,i,o]);;){if(0===o&&0===i)return a?[n,r,e,t]:[e,t,n,r];if(o&i)return null;let s,l,c=o||i;8&c?(s=e+(n-e)*(this.ymax-t)/(r-t),l=this.ymax):4&c?(s=e+(n-e)*(this.ymin-t)/(r-t),l=this.ymin):2&c?(l=t+(r-t)*(this.xmax-e)/(n-e),s=this.xmax):(l=t+(r-t)*(this.xmin-e)/(n-e),s=this.xmin),o?(e=s,t=l,o=this._regioncode(e,t)):(n=s,r=l,i=this._regioncode(n,r))}}_clipInfinite(e,t,n,r,o,i){let a,s=Array.from(t);if((a=this._project(s[0],s[1],n,r))&&s.unshift(a[0],a[1]),(a=this._project(s[s.length-2],s[s.length-1],o,i))&&s.push(a[0],a[1]),s=this._clipFinite(e,s))for(let t,n=0,r=s.length,o=this._edgecode(s[r-2],s[r-1]);n<r;n+=2)t=o,o=this._edgecode(s[n],s[n+1]),t&&o&&(n=this._edge(e,t,o,s,n),r=s.length);else this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(s=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return s}_edge(e,t,n,r,o){for(;t!==n;){let n,i;switch(t){case 5:t=4;continue;case 4:t=6,n=this.xmax,i=this.ymin;break;case 6:t=2;continue;case 2:t=10,n=this.xmax,i=this.ymax;break;case 10:t=8;continue;case 8:t=9,n=this.xmin,i=this.ymax;break;case 9:t=1;continue;case 1:t=5,n=this.xmin,i=this.ymin}r[o]===n&&r[o+1]===i||!this.contains(e,n,i)||(r.splice(o,0,n,i),o+=2)}return o}_project(e,t,n,r){let o,i,a,s=1/0;if(r<0){if(t<=this.ymin)return null;(o=(this.ymin-t)/r)<s&&(a=this.ymin,i=e+(s=o)*n)}else if(r>0){if(t>=this.ymax)return null;(o=(this.ymax-t)/r)<s&&(a=this.ymax,i=e+(s=o)*n)}if(n>0){if(e>=this.xmax)return null;(o=(this.xmax-e)/n)<s&&(i=this.xmax,a=t+(s=o)*r)}else if(n<0){if(e<=this.xmin)return null;(o=(this.xmin-e)/n)<s&&(i=this.xmin,a=t+(s=o)*r)}return[i,a]}_edgecode(e,t){return(e===this.xmin?1:e===this.xmax?2:0)|(t===this.ymin?4:t===this.ymax?8:0)}_regioncode(e,t){return(e<this.xmin?1:e>this.xmax?2:0)|(t<this.ymin?4:t>this.ymax?8:0)}_simplify(e){if(e&&e.length>4){for(let t=0;t<e.length;t+=2){const n=(t+2)%e.length,r=(t+4)%e.length;(e[t]===e[n]&&e[n]===e[r]||e[t+1]===e[n+1]&&e[n+1]===e[r+1])&&(e.splice(n,2),t-=2)}e.length||(e=null)}return e}}const Pj=2*Math.PI,Tj=Math.pow;function Oj(e){return e[0]}function jj(e){return e[1]}function _j(e,t,n){return[e+Math.sin(e+t)*n,t+Math.cos(e-t)*n]}class Dj{static from(e,t=Oj,n=jj,r){return new Dj("length"in e?function(e,t,n,r){const o=e.length,i=new Float64Array(2*o);for(let a=0;a<o;++a){const o=e[a];i[2*a]=t.call(r,o,a,e),i[2*a+1]=n.call(r,o,a,e)}return i}(e,t,n,r):Float64Array.from(function*(e,t,n,r){let o=0;for(const i of e)yield t.call(r,i,o,e),yield n.call(r,i,o,e),++o}(e,t,n,r)))}constructor(e){this._delaunator=new hj(e),this.inedges=new Int32Array(e.length/2),this._hullIndex=new Int32Array(e.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const e=this._delaunator,t=this.points;if(e.hull&&e.hull.length>2&&function(e){const{triangles:t,coords:n}=e;for(let e=0;e<t.length;e+=3){const r=2*t[e],o=2*t[e+1],i=2*t[e+2];if((n[i]-n[r])*(n[o+1]-n[r+1])-(n[o]-n[r])*(n[i+1]-n[r+1])>1e-10)return!1}return!0}(e)){this.collinear=Int32Array.from({length:t.length/2},(e,t)=>t).sort((e,n)=>t[2*e]-t[2*n]||t[2*e+1]-t[2*n+1]);const e=this.collinear[0],n=this.collinear[this.collinear.length-1],r=[t[2*e],t[2*e+1],t[2*n],t[2*n+1]],o=1e-8*Math.hypot(r[3]-r[1],r[2]-r[0]);for(let e=0,n=t.length/2;e<n;++e){const n=_j(t[2*e],t[2*e+1],o);t[2*e]=n[0],t[2*e+1]=n[1]}this._delaunator=new hj(t)}else delete this.collinear;const n=this.halfedges=this._delaunator.halfedges,r=this.hull=this._delaunator.hull,o=this.triangles=this._delaunator.triangles,i=this.inedges.fill(-1),a=this._hullIndex.fill(-1);for(let e=0,t=n.length;e<t;++e){const t=o[e%3==2?e-2:e+1];-1!==n[e]&&-1!==i[t]||(i[t]=e)}for(let e=0,t=r.length;e<t;++e)a[r[e]]=e;r.length<=2&&r.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=r[0],i[r[0]]=1,2===r.length&&(i[r[1]]=0,this.triangles[1]=r[1],this.triangles[2]=r[1]))}voronoi(e){return new Mj(this,e)}*neighbors(e){const{inedges:t,hull:n,_hullIndex:r,halfedges:o,triangles:i,collinear:a}=this;if(a){const t=a.indexOf(e);return t>0&&(yield a[t-1]),void(t<a.length-1&&(yield a[t+1]))}const s=t[e];if(-1===s)return;let l=s,c=-1;do{if(yield c=i[l],l=l%3==2?l-2:l+1,i[l]!==e)return;if(l=o[l],-1===l){const t=n[(r[e]+1)%n.length];return void(t!==c&&(yield t))}}while(l!==s)}find(e,t,n=0){if((e=+e)!=e||(t=+t)!=t)return-1;const r=n;let o;for(;(o=this._step(n,e,t))>=0&&o!==n&&o!==r;)n=o;return o}_step(e,t,n){const{inedges:r,hull:o,_hullIndex:i,halfedges:a,triangles:s,points:l}=this;if(-1===r[e]||!l.length)return(e+1)%(l.length>>1);let c=e,u=Tj(t-l[2*e],2)+Tj(n-l[2*e+1],2);const d=r[e];let f=d;do{let r=s[f];const d=Tj(t-l[2*r],2)+Tj(n-l[2*r+1],2);if(d<u&&(u=d,c=r),f=f%3==2?f-2:f+1,s[f]!==e)break;if(f=a[f],-1===f){if(f=o[(i[e]+1)%o.length],f!==r&&Tj(t-l[2*f],2)+Tj(n-l[2*f+1],2)<u)return f;break}}while(f!==d);return c}render(e){const t=null==e?e=new kj:void 0,{points:n,halfedges:r,triangles:o}=this;for(let t=0,i=r.length;t<i;++t){const i=r[t];if(i<t)continue;const a=2*o[t],s=2*o[i];e.moveTo(n[a],n[a+1]),e.lineTo(n[s],n[s+1])}return this.renderHull(e),t&&t.value()}renderPoints(e,t){void 0!==t||e&&"function"==typeof e.moveTo||(t=e,e=null),t=null==t?2:+t;const n=null==e?e=new kj:void 0,{points:r}=this;for(let n=0,o=r.length;n<o;n+=2){const o=r[n],i=r[n+1];e.moveTo(o+t,i),e.arc(o,i,t,0,Pj)}return n&&n.value()}renderHull(e){const t=null==e?e=new kj:void 0,{hull:n,points:r}=this,o=2*n[0],i=n.length;e.moveTo(r[o],r[o+1]);for(let t=1;t<i;++t){const o=2*n[t];e.lineTo(r[o],r[o+1])}return e.closePath(),t&&t.value()}hullPolygon(){const e=new Cj;return this.renderHull(e),e.value()}renderTriangle(e,t){const n=null==t?t=new kj:void 0,{points:r,triangles:o}=this,i=2*o[e*=3],a=2*o[e+1],s=2*o[e+2];return t.moveTo(r[i],r[i+1]),t.lineTo(r[a],r[a+1]),t.lineTo(r[s],r[s+1]),t.closePath(),n&&n.value()}*trianglePolygons(){const{triangles:e}=this;for(let t=0,n=e.length/3;t<n;++t)yield this.trianglePolygon(t)}trianglePolygon(e){const t=new Cj;return this.renderTriangle(e,t),t.value()}}var Ej=function(e){return[e.x,e.y]},Rj=gk,Aj="cursor",Ij=function(e){var t=e.points,n=e.getNodePosition,r=void 0===n?Ej:n,o=e.margin,i=void 0===o?Rj:o;return t.map(function(e){var t=r(e),n=t[0],o=t[1];return[n+i.left,o+i.top]})},Fj=function(e){var t=e.points,n=e.getNodePosition,r=void 0===n?Ej:n,o=e.width,i=e.height,a=e.margin,s=void 0===a?Rj:a,l=e.debug;return(0,G.useMemo)(function(){return function(e){var t=e.points,n=e.width,r=e.height,o=e.margin,i=void 0===o?Rj:o,a=e.debug,s=Dj.from(t),l=a?s.voronoi([0,0,i.left+n+i.right,i.top+r+i.bottom]):void 0;return{points:t,delaunay:s,voronoi:l}}({points:Ij({points:t,margin:s,getNodePosition:r}),width:o,height:i,margin:s,debug:l})},[t,o,i,s,l])},Lj=function(e){var t=e.nodes,n=e.width,r=e.height,o=e.margin,i=void 0===o?Rj:o,a=e.getNodePosition,s=e.setCurrent,l=e.onMouseEnter,c=e.onMouseMove,u=e.onMouseLeave,d=e.onClick,f=e.onTouchStart,p=e.onTouchMove,h=e.onTouchEnd,m=e.enableTouchCrosshair,g=void 0!==m&&m,b=e.detectionRadius,y=void 0===b?1/0:b,v=e.tooltip,x=e.tooltipPosition,w=void 0===x?Aj:x,S=e.tooltipAnchor,k=void 0===S?"top":S,C=e.debug,M=(0,G.useRef)(null),P=Fj({points:t,getNodePosition:a,width:n,height:r,margin:i,debug:C}),T=P.delaunay,O=P.voronoi,j=function(e){var t=e.elementRef,n=e.nodes,r=e.getNodePosition,o=void 0===r?Ej:r,i=e.delaunay,a=e.setCurrent,s=e.margin,l=void 0===s?Rj:s,c=e.detectionRadius,u=void 0===c?1/0:c,d=e.isInteractive,f=void 0===d||d,p=e.onMouseEnter,h=e.onMouseMove,m=e.onMouseLeave,g=e.onClick,b=e.onTouchStart,y=e.onTouchMove,v=e.onTouchEnd,x=e.enableTouchCrosshair,w=void 0!==x&&x,S=e.tooltip,k=e.tooltipPosition,C=void 0===k?Aj:k,M=e.tooltipAnchor,P=void 0===M?"top":M,T=(0,G.useState)(null),O=T[0],j=T[1],_=(0,G.useRef)(null);(0,G.useEffect)(function(){_.current=O},[_,O]);var D=(0,G.useCallback)(function(e){if(!t.current||0===n.length)return null;var r=Jk(t.current,e),a=r[0],s=r[1],c=i.find(a,s),d=void 0!==c?n[c]:null;if(d&&u!==1/0){var f=o(d),p=f[0],h=f[1];(function(e,t,n,r){return Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))})(a,s,p+l.left,h+l.top)>u&&(c=null,d=null)}return null===c||null===d?null:[c,d]},[t,i,n,o,l,u]),E=qg(),R=E.showTooltipAt,A=E.showTooltipFromEvent,I=E.hideTooltip,F=(0,G.useMemo)(function(){if(S)return"cursor"===C?function(e,t){A(S(e),t,P)}:function(e){var t=o(e),n=t[0],r=t[1];R(S(e),[n+l.left,r+l.top],P)}},[R,A,S,C,P,o,l]),L=(0,G.useCallback)(function(e){var t=D(e);if(j(t),null==a||a(t?t[1]:null),t){var n=t[1];null==F||F(n,e),null==p||p(t[1],e)}},[D,j,a,F,p]),N=(0,G.useCallback)(function(e){var t=D(e);if(j(t),t){var n=t[0],r=t[1];if(null==a||a(r),null==F||F(r,e),_.current){var o=_.current,i=o[0],s=o[1];n!==i?null==m||m(s,e):null==h||h(r,e)}else null==p||p(r,e)}else null==a||a(null),null==I||I(),_.current&&(null==m||m(_.current[1],e))},[D,j,_,p,h,m,F,I]),z=(0,G.useCallback)(function(e){j(null),null==a||a(null),I(),m&&_.current&&m(_.current[1],e)},[j,a,_,I,m]),$=(0,G.useCallback)(function(e){var t=D(e);j(t),t&&(null==g||g(t[1],e))},[D,j,g]),V=(0,G.useCallback)(function(e){var t=D(e);w&&(j(t),null==a||a(t?t[1]:null)),t&&(null==b||b(t[1],e))},[D,j,a,w,b]),B=(0,G.useCallback)(function(e){var t=D(e);w&&(j(t),null==a||a(t?t[1]:null)),t&&(null==y||y(t[1],e))},[D,j,a,w,y]),W=(0,G.useCallback)(function(e){w&&(j(null),null==a||a(null)),v&&_.current&&v(_.current[1],e)},[w,j,a,v,_]);return{current:O,handleMouseEnter:f?L:void 0,handleMouseMove:f?N:void 0,handleMouseLeave:f?z:void 0,handleClick:f?$:void 0,handleTouchStart:f?V:void 0,handleTouchMove:f?B:void 0,handleTouchEnd:f?W:void 0}}({elementRef:M,nodes:t,delaunay:T,margin:i,detectionRadius:y,setCurrent:s,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,onClick:d,onTouchStart:f,onTouchMove:p,onTouchEnd:h,enableTouchCrosshair:g,tooltip:v,tooltipPosition:w,tooltipAnchor:k}),_=j.current,D=j.handleMouseEnter,E=j.handleMouseMove,R=j.handleMouseLeave,A=j.handleClick,I=j.handleTouchStart,F=j.handleTouchMove,L=j.handleTouchEnd,N=(0,G.useMemo)(function(){if(C&&O)return O.render()},[C,O]);return(0,le.jsxs)("g",{ref:M,transform:"translate("+-i.left+","+-i.top+")",children:[C&&O&&(0,le.jsxs)(le.Fragment,{children:[(0,le.jsx)("path",{d:N,stroke:"red",strokeWidth:1,opacity:.75}),y<1/0&&(0,le.jsx)("path",{stroke:"red",strokeWidth:.35,fill:"none",d:T.renderPoints(void 0,y)}),_&&(0,le.jsx)("path",{fill:"pink",opacity:.35,d:O.renderCell(_[0])})]}),(0,le.jsx)("rect",{"data-ref":"mesh-interceptor",width:i.left+n+i.right,height:i.top+r+i.bottom,fill:"red",opacity:0,style:{cursor:"auto"},onMouseEnter:D,onMouseMove:E,onMouseLeave:R,onTouchStart:I,onTouchMove:F,onTouchEnd:L,onClick:A})]})};function Nj(){return Nj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nj.apply(this,arguments)}var zj=(0,G.memo)(function(e){var t=e.point;return(0,le.jsx)(Lg,{id:(0,le.jsxs)("span",{children:["x: ",(0,le.jsx)("strong",{children:t.data.xFormatted}),", y:"," ",(0,le.jsx)("strong",{children:t.data.yFormatted})]}),enableChip:!0,color:t.serieColor})}),$j=(0,G.memo)(function(e){var t=e.slice,n=e.axis,r=Ck(),o="x"===n?"y":"x";return(0,le.jsx)(zg,{rows:t.points.map(function(e){return[(0,le.jsx)(Fg,{color:e.serieColor,style:r.tooltip.chip},"chip"),e.serieId,(0,le.jsx)("span",{style:r.tooltip.tableCellValue,children:e.data[o+"Formatted"]},"value")]})})}),Vj={curve:"linear",xScale:{type:"point"},yScale:{type:"linear",min:0,max:"auto"},layers:["grid","markers","axes","areas","crosshair","lines","points","slices","mesh","legends"],axisBottom:{},axisLeft:{},enableGridX:!0,enableGridY:!0,enablePoints:!0,pointSize:6,pointColor:{from:"color"},pointBorderWidth:0,pointBorderColor:{theme:"background"},enablePointLabel:!1,pointLabel:"yFormatted",colors:{scheme:"nivo"},enableArea:!1,areaBaselineValue:0,areaOpacity:.2,areaBlendMode:"normal",lineWidth:2,legends:[],isInteractive:!0,tooltip:zj,enableSlices:!1,debugSlices:!1,sliceTooltip:$j,debugMesh:!1,enableCrosshair:!0,crosshairType:"bottom-left"},Bj=Nj({},Vj,{enablePointLabel:!1,useMesh:!1,enableTouchCrosshair:!1,animate:!0,motionConfig:"gentle",defs:[],fill:[],role:"img",initialHiddenIds:[]}),Wj=(Nj({},Vj,{pixelRatio:"undefined"!=typeof window&&window.devicePixelRatio||1}),function(e){var t=e.curve;return(0,G.useMemo)(function(){return qO().defined(function(e){return null!==e.x&&null!==e.y}).x(function(e){return e.x}).y(function(e){return e.y}).curve(fk(t))},[t])}),Hj=function(e){var t=e.curve,n=e.yScale,r=e.areaBaselineValue;return(0,G.useMemo)(function(){return function(e,t,n){var r=null,o=$T(!0),i=null,a=Lb,s=null,l=BO(c);function c(c){var u,d,f,p,h,m=(c=zT(c)).length,g=!1,b=new Array(m),y=new Array(m);for(null==i&&(s=a(h=l())),u=0;u<=m;++u){if(!(u<m&&o(p=c[u],u,c))===g)if(g=!g)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(b[f],y[f]);s.lineEnd(),s.areaEnd()}g&&(b[u]=+e(p,u,c),y[u]=+t(p,u,c),s.point(r?+r(p,u,c):b[u],n?+n(p,u,c):y[u]))}if(h)return s=null,h+""||null}function u(){return qO().defined(o).curve(a).context(i)}return e="function"==typeof e?e:void 0===e?WO:$T(+e),t="function"==typeof t?t:$T(void 0===t?0:+t),n="function"==typeof n?n:void 0===n?HO:$T(+n),c.x=function(t){return arguments.length?(e="function"==typeof t?t:$T(+t),r=null,c):e},c.x0=function(t){return arguments.length?(e="function"==typeof t?t:$T(+t),c):e},c.x1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:$T(+e),c):r},c.y=function(e){return arguments.length?(t="function"==typeof e?e:$T(+e),n=null,c):t},c.y0=function(e){return arguments.length?(t="function"==typeof e?e:$T(+e),c):t},c.y1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:$T(+e),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(e){return arguments.length?(o="function"==typeof e?e:$T(!!e),c):o},c.curve=function(e){return arguments.length?(a=e,null!=i&&(s=a(i)),c):a},c.context=function(e){return arguments.length?(null==e?i=s=null:s=a(i=e),c):i},c}().defined(function(e){return null!==e.x&&null!==e.y}).x(function(e){return e.x}).y1(function(e){return e.y}).curve(fk(t)).y0(n(r))},[t,n,r])},qj=function(e){var t=e.data,n=e.xScale,r=void 0===n?Bj.xScale:n,o=e.xFormat,i=e.yScale,a=void 0===i?Bj.yScale:i,s=e.yFormat,l=e.width,c=e.height,u=e.colors,d=void 0===u?Bj.colors:u,f=e.curve,p=void 0===f?Bj.curve:f,h=e.areaBaselineValue,m=void 0===h?Bj.areaBaselineValue:h,g=e.pointColor,b=void 0===g?Bj.pointColor:g,y=e.pointBorderColor,v=void 0===y?Bj.pointBorderColor:y,x=e.enableSlices,w=void 0===x?Bj.enableSlicesTooltip:x,S=e.initialHiddenIds,k=void 0===S?Bj.initialHiddenIds:S,C=(0,G.useState)(nj("line"))[0],M=xk(o),P=xk(s),T=kT(d,"id"),O=Ck(),j=wT(b,O),_=wT(v,O),D=(0,G.useState)(null!=k?k:[]),E=D[0],R=D[1],A=(0,G.useMemo)(function(){return bP(t.filter(function(e){return-1===E.indexOf(e.id)}),r,a,l,c)},[t,E,r,a,l,c]),I=A.xScale,F=A.yScale,L=A.series,N=(0,G.useMemo)(function(){var e=t.map(function(e){return{id:e.id,label:e.id,color:T(e)}}),n=e.map(function(e){return Nj({},L.find(function(t){return t.id===e.id}),{color:e.color})}).filter(function(e){return Boolean(e.id)});return{legendData:e.map(function(e){return Nj({},e,{hidden:!n.find(function(t){return t.id===e.id})})}).reverse(),series:n}},[t,L,T]),z=N.legendData,$=N.series,V=(0,G.useCallback)(function(e){R(function(t){return t.indexOf(e)>-1?t.filter(function(t){return t!==e}):[].concat(t,[e])})},[]),B=function(e){var t=e.series,n=e.getPointColor,r=e.getPointBorderColor,o=e.formatX,i=e.formatY;return(0,G.useMemo)(function(){return t.reduce(function(e,t){return[].concat(e,t.data.filter(function(e){return null!==e.position.x&&null!==e.position.y}).map(function(a,s){var l={id:t.id+"."+s,index:e.length+s,serieId:t.id,serieColor:t.color,x:a.position.x,y:a.position.y};return l.color=n(t),l.borderColor=r(l),l.data=Nj({},a.data,{xFormatted:o(a.data.x),yFormatted:i(a.data.y)}),l}))},[])},[t,n,r,o,i])}({series:$,getPointColor:j,getPointBorderColor:_,formatX:M,formatY:P}),W=function(e){var t=e.componentId,n=e.enableSlices,r=e.points,o=e.width,i=e.height;return(0,G.useMemo)(function(){if(!1===n)return[];if("x"===n){var e=new Map;return r.forEach(function(t){null!==t.data.x&&null!==t.data.y&&(e.has(t.x)?e.get(t.x).push(t):e.set(t.x,[t]))}),Array.from(e.entries()).sort(function(e,t){return e[0]-t[0]}).map(function(e,n,r){var a,s,l=e[0],c=e[1],u=r[n-1],d=r[n+1];return a=u?l-(l-u[0])/2:l,s=d?l-a+(d[0]-l)/2:o-a,{id:"slice:"+t+":"+l,x0:a,x:l,y0:0,y:0,width:s,height:i,points:c.reverse()}})}if("y"===n){var a=new Map;return r.forEach(function(e){null!==e.data.x&&null!==e.data.y&&(a.has(e.y)?a.get(e.y).push(e):a.set(e.y,[e]))}),Array.from(a.entries()).sort(function(e,t){return e[0]-t[0]}).map(function(e,t,n){var r,a,s=e[0],l=e[1],c=n[t-1],u=n[t+1];return r=c?s-(s-c[0])/2:s,a=u?s-r+(u[0]-s)/2:i-r,{id:s,x0:0,x:0,y0:r,y:s,width:o,height:a,points:l.reverse()}})}},[t,n,i,r,o])}({componentId:C,enableSlices:w,points:B,width:l,height:c});return{legendData:z,toggleSerie:V,lineGenerator:Wj({curve:p}),areaGenerator:Hj({curve:p,yScale:F,areaBaselineValue:m}),getColor:T,series:$,xScale:I,yScale:F,slices:W,points:B}},Yj=function(e){var t=e.areaBlendMode,n=e.areaOpacity,r=e.color,o=e.fill,i=e.path,a=lk(),s=a.animate,l=a.config,c=ck(i),u=ug({color:r,config:l,immediate:!s});return(0,le.jsx)(Dg.path,{d:c,fill:o||u.color,fillOpacity:n,strokeWidth:0,style:{mixBlendMode:t}})},Uj=(0,G.memo)(function(e){var t=e.areaGenerator,n=e.areaOpacity,r=e.areaBlendMode,o=e.lines.slice(0).reverse();return(0,le.jsx)("g",{children:o.map(function(e){return(0,le.jsx)(Yj,Nj({path:t(e.data.map(function(e){return e.position}))},Nj({areaOpacity:n,areaBlendMode:r},e)),e.id)})})}),Gj=(0,G.memo)(function(e){var t=e.lineGenerator,n=e.points,r=e.color,o=e.thickness,i=(0,G.useMemo)(function(){return t(n)},[t,n]),a=ck(i);return(0,le.jsx)(Dg.path,{d:a,fill:"none",strokeWidth:o,stroke:r})}),Xj=(0,G.memo)(function(e){var t=e.lines,n=e.lineGenerator,r=e.lineWidth;return t.slice(0).reverse().map(function(e){var t=e.id,o=e.data,i=e.color;return(0,le.jsx)(Gj,{id:t,points:o.map(function(e){return e.position}),lineGenerator:n,color:i,thickness:r},t)})}),Qj=(0,G.memo)(function(e){var t=e.slice,n=e.slices,r=e.axis,o=e.debug,i=e.tooltip,a=e.isCurrent,s=e.setCurrent,l=e.onMouseEnter,c=e.onMouseMove,u=e.onMouseLeave,d=e.onClick,f=e.onTouchStart,p=e.onTouchMove,h=e.onTouchEnd,m=qg(),g=m.showTooltipFromEvent,b=m.hideTooltip,y=(0,G.useCallback)(function(e){g((0,G.createElement)(i,{slice:t,axis:r}),e,"right"),s(t),l&&l(t,e)},[g,i,t,r,s,l]),v=(0,G.useCallback)(function(e){g((0,G.createElement)(i,{slice:t,axis:r}),e,"right"),c&&c(t,e)},[g,i,t,r,c]),x=(0,G.useCallback)(function(e){b(),s(null),u&&u(t,e)},[b,s,u,t]),w=(0,G.useCallback)(function(e){d&&d(t,e)},[t,d]),S=(0,G.useCallback)(function(e){g((0,G.createElement)(i,{slice:t,axis:r}),e,"right"),s(t),f&&f(t,e)},[r,f,s,g,t,i]),k=(0,G.useCallback)(function(e){var o=e.touches[0],a=document.elementFromPoint(o.clientX,o.clientY),l=null==a?void 0:a.getAttribute("data-ref");if(l){var c=n.find(function(e){return e.id===l});c&&(g((0,G.createElement)(i,{slice:c,axis:r}),e,"right"),s(c))}p&&p(t,e)},[r,p,s,g,t,n,i]),C=(0,G.useCallback)(function(e){b(),s(null),h&&h(t,e)},[b,s,h,t]);return(0,le.jsx)("rect",{x:t.x0,y:t.y0,width:t.width,height:t.height,stroke:"red",strokeWidth:o?1:0,strokeOpacity:.75,fill:"red",fillOpacity:a&&o?.35:0,onMouseEnter:y,onMouseMove:v,onMouseLeave:x,onClick:w,onTouchStart:S,onTouchMove:k,onTouchEnd:C,"data-ref":t.id})}),Kj=(0,G.memo)(function(e){var t=e.slices,n=e.axis,r=e.debug,o=e.height,i=e.tooltip,a=e.current,s=e.setCurrent,l=e.onMouseEnter,c=e.onMouseMove,u=e.onMouseLeave,d=e.onClick,f=e.onTouchStart,p=e.onTouchMove,h=e.onTouchEnd;return t.map(function(e){return(0,le.jsx)(Qj,{slice:e,slices:t,axis:n,debug:r,height:o,tooltip:i,setCurrent:s,isCurrent:null!==a&&a.id===e.id,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,onClick:d,onTouchStart:f,onTouchMove:p,onTouchEnd:h},e.id)})}),Zj=(0,G.memo)(function(e){var t=e.points,n=e.symbol,r=e.size,o=e.borderWidth,i=e.enableLabel,a=e.label,s=e.labelYOffset,l=Ck(),c=function(e){var t,n=Ex(e)?e:function(t){return Xg(t,e)};return t?function(e){return t(n(e))}:n}(a),u=t.slice(0).reverse().map(function(e){return{id:e.id,x:e.x,y:e.y,datum:e.data,fill:e.color,stroke:e.borderColor,label:i?c(e):null}});return(0,le.jsx)("g",{children:u.map(function(e){return(0,le.jsx)(qk,{x:e.x,y:e.y,datum:e.datum,symbol:n,size:r,color:e.fill,borderWidth:o,borderColor:e.stroke,label:e.label,labelYOffset:s,theme:l},e.id)})})}),Jj=(0,G.memo)(function(e){var t=e.points,n=e.width,r=e.height,o=e.margin,i=e.setCurrent,a=e.onMouseEnter,s=e.onMouseMove,l=e.onMouseLeave,c=e.onClick,u=e.onTouchStart,d=e.onTouchMove,f=e.onTouchEnd,p=e.tooltip,h=e.debug,m=e.enableTouchCrosshair,g=qg(),b=g.showTooltipAt,y=g.hideTooltip,v=(0,G.useCallback)(function(e,t){b((0,G.createElement)(p,{point:e}),[e.x+o.left,e.y+o.top],"top"),a&&a(e,t)},[b,p,a,o]),x=(0,G.useCallback)(function(e,t){b((0,G.createElement)(p,{point:e}),[e.x+o.left,e.y+o.top],"top"),s&&s(e,t)},[b,p,o.left,o.top,s]),w=(0,G.useCallback)(function(e,t){y(),l&&l(e,t)},[y,l]),S=(0,G.useCallback)(function(e,t){c&&c(e,t)},[c]),k=(0,G.useCallback)(function(e,t){b((0,G.createElement)(p,{point:e}),[e.x+o.left,e.y+o.top],"top"),u&&u(e,t)},[o.left,o.top,u,b,p]),C=(0,G.useCallback)(function(e,t){b((0,G.createElement)(p,{point:e}),[e.x+o.left,e.y+o.top],"top"),d&&d(e,t)},[o.left,o.top,d,b,p]),M=(0,G.useCallback)(function(e,t){y(),f&&f(e,t)},[f,y]);return(0,le.jsx)(Lj,{nodes:t,width:n,height:r,setCurrent:i,onMouseEnter:v,onMouseMove:x,onMouseLeave:w,onClick:S,onTouchStart:k,onTouchMove:C,onTouchEnd:M,enableTouchCrosshair:m,debug:h})}),e_=Xk(function(e){var t=e.data,n=e.xScale,r=void 0===n?{type:"point"}:n,o=e.xFormat,i=e.yScale,a=void 0===i?{type:"linear",min:0,max:"auto"}:i,s=e.yFormat,l=e.layers,c=void 0===l?["grid","markers","axes","areas","crosshair","lines","points","slices","mesh","legends"]:l,u=e.curve,d=void 0===u?"linear":u,f=e.areaBaselineValue,p=void 0===f?0:f,h=e.colors,m=void 0===h?{scheme:"nivo"}:h,g=e.margin,b=e.width,y=e.height,v=e.axisTop,x=e.axisRight,w=e.axisBottom,S=void 0===w?{}:w,k=e.axisLeft,C=void 0===k?{}:k,M=e.enableGridX,P=void 0===M||M,T=e.enableGridY,O=void 0===T||T,j=e.gridXValues,_=e.gridYValues,D=e.lineWidth,E=void 0===D?2:D,R=e.enableArea,A=void 0!==R&&R,I=e.areaOpacity,F=void 0===I?.2:I,L=e.areaBlendMode,N=void 0===L?"normal":L,z=e.enablePoints,$=void 0===z||z,V=e.pointSymbol,B=e.pointSize,W=void 0===B?6:B,H=e.pointColor,q=void 0===H?{from:"color"}:H,Y=e.pointBorderWidth,U=void 0===Y?0:Y,X=e.pointBorderColor,Q=void 0===X?{theme:"background"}:X,K=e.enablePointLabel,Z=void 0!==K&&K,J=e.pointLabel,ee=void 0===J?"data.yFormatted":J,te=e.pointLabelYOffset,ne=e.defs,re=void 0===ne?[]:ne,oe=e.fill,ie=void 0===oe?[]:oe,ae=e.markers,se=e.legends,ce=void 0===se?[]:se,ue=e.isInteractive,de=void 0===ue||ue,fe=e.useMesh,pe=void 0!==fe&&fe,he=e.debugMesh,me=void 0!==he&&he,ge=e.onMouseEnter,be=e.onMouseMove,ye=e.onMouseLeave,ve=e.onClick,xe=e.onTouchStart,we=e.onTouchMove,Se=e.onTouchEnd,ke=e.tooltip,Ce=void 0===ke?zj:ke,Me=e.enableSlices,Pe=void 0!==Me&&Me,Te=e.debugSlices,Oe=void 0!==Te&&Te,je=e.sliceTooltip,_e=void 0===je?$j:je,De=e.enableCrosshair,Ee=void 0===De||De,Re=e.crosshairType,Ae=void 0===Re?"bottom-left":Re,Ie=e.enableTouchCrosshair,Fe=void 0!==Ie&&Ie,Le=e.role,Ne=void 0===Le?"img":Le,ze=e.initialHiddenIds,$e=void 0===ze?[]:ze,Ve=bk(b,y,g),Be=Ve.margin,We=Ve.innerWidth,He=Ve.innerHeight,qe=Ve.outerWidth,Ye=Ve.outerHeight,Ue=qj({data:t,xScale:r,xFormat:o,yScale:a,yFormat:s,width:We,height:He,colors:m,curve:d,areaBaselineValue:p,pointColor:q,pointBorderColor:Q,enableSlices:Pe,initialHiddenIds:$e}),Ge=Ue.legendData,Xe=Ue.toggleSerie,Qe=Ue.lineGenerator,Ke=Ue.areaGenerator,Ze=Ue.series,Je=Ue.xScale,et=Ue.yScale,tt=Ue.slices,nt=Ue.points,rt=Ck(),ot=wT(q,rt),it=wT(Q,rt),at=(0,G.useState)(null),st=at[0],lt=at[1],ct=(0,G.useState)(null),ut=ct[0],dt=ct[1],ft={grid:(0,le.jsx)(NP,{theme:rt,width:We,height:He,xScale:P?Je:null,yScale:O?et:null,xValues:j,yValues:_},"grid"),markers:(0,le.jsx)(Uk,{markers:ae,width:We,height:He,xScale:Je,yScale:et,theme:rt},"markers"),axes:(0,le.jsx)(IP,{xScale:Je,yScale:et,width:We,height:He,theme:rt,top:v,right:x,bottom:S,left:C},"axes"),areas:null,lines:(0,le.jsx)(Xj,{lines:Ze,lineGenerator:Qe,lineWidth:E},"lines"),slices:null,points:null,crosshair:null,mesh:null,legends:ce.map(function(e,t){return(0,le.jsx)(FT,Nj({},e,{containerWidth:We,containerHeight:He,data:e.data||Ge,theme:rt,toggleSerie:e.toggleSerie?Xe:void 0}),"legend."+t)})},pt=nC(re,Ze,ie);return A&&(ft.areas=(0,le.jsx)(Uj,{areaGenerator:Ke,areaOpacity:F,areaBlendMode:N,lines:Ze},"areas")),de&&!1!==Pe&&(ft.slices=(0,le.jsx)(Kj,{slices:tt,axis:Pe,debug:Oe,height:He,tooltip:_e,current:ut,setCurrent:dt,onMouseEnter:ge,onMouseMove:be,onMouseLeave:ye,onClick:ve,onTouchStart:xe,onTouchMove:we,onTouchEnd:Se},"slices")),$&&(ft.points=(0,le.jsx)(Zj,{points:nt,symbol:V,size:W,color:ot,borderWidth:U,borderColor:it,enableLabel:Z,label:ee,labelYOffset:te},"points")),de&&Ee&&(null!==st&&(ft.crosshair=(0,le.jsx)(Vg,{width:We,height:He,x:st.x,y:st.y,type:Ae},"crosshair")),null!==ut&&(ft.crosshair=(0,le.jsx)(Vg,{width:We,height:He,x:ut.x,y:ut.y,type:Pe},"crosshair"))),de&&pe&&!1===Pe&&(ft.mesh=(0,le.jsx)(Jj,{points:nt,width:We,height:He,margin:Be,current:st,setCurrent:lt,onMouseEnter:ge,onMouseMove:be,onMouseLeave:ye,onClick:ve,onTouchStart:xe,onTouchMove:we,onTouchEnd:Se,tooltip:Ce,enableTouchCrosshair:Fe,debug:me},"mesh")),(0,le.jsx)(Wk,{defs:pt,width:qe,height:Ye,margin:Be,role:Ne,children:c.map(function(t,n){return"function"==typeof t?(0,le.jsx)(G.Fragment,{children:t(Nj({},e,{innerWidth:We,innerHeight:He,series:Ze,slices:tt,points:nt,xScale:Je,yScale:et,lineGenerator:Qe,areaGenerator:Ke,currentPoint:st,setCurrentPoint:lt,currentSlice:ut,setCurrentSlice:dt}))},n):ft[t]})})}),t_=function(e){return(0,le.jsx)(_k,{children:function(t){var n=t.width,r=t.height;return(0,le.jsx)(e_,Nj({width:n,height:r},e))}})},n_=Xk(function(e){var t=(0,G.useRef)(null),n=e.width,r=e.height,o=e.margin,i=e.pixelRatio,a=void 0===i?"undefined"!=typeof window&&window.devicePixelRatio||1:i,s=e.data,l=e.xScale,c=void 0===l?{type:"point"}:l,u=e.xFormat,d=e.yScale,f=void 0===d?{type:"linear",min:0,max:"auto"}:d,p=e.yFormat,h=e.curve,m=void 0===h?"linear":h,g=e.layers,b=void 0===g?["grid","markers","axes","areas","crosshair","lines","points","slices","mesh","legends"]:g,y=e.colors,v=void 0===y?{scheme:"nivo"}:y,x=e.lineWidth,w=void 0===x?2:x,S=e.enableArea,k=void 0!==S&&S,C=e.areaBaselineValue,M=void 0===C?0:C,P=e.areaOpacity,T=void 0===P?.2:P,O=e.enablePoints,j=void 0===O||O,_=e.pointSize,D=void 0===_?6:_,E=e.pointColor,R=void 0===E?{from:"color"}:E,A=e.pointBorderWidth,I=void 0===A?0:A,F=e.pointBorderColor,L=void 0===F?{theme:"background"}:F,N=e.enableGridX,z=void 0===N||N,$=e.gridXValues,V=e.enableGridY,B=void 0===V||V,W=e.gridYValues,H=e.axisTop,q=e.axisRight,Y=e.axisBottom,U=void 0===Y?{}:Y,X=e.axisLeft,Q=void 0===X?{}:X,K=e.legends,Z=void 0===K?[]:K,J=e.isInteractive,ee=void 0===J||J,te=e.debugMesh,ne=void 0!==te&&te,re=e.onMouseLeave,oe=e.onClick,ie=e.tooltip,ae=void 0===ie?zj:ie,se=e.canvasRef,ce=bk(n,r,o),ue=ce.margin,de=ce.innerWidth,fe=ce.innerHeight,pe=ce.outerWidth,he=ce.outerHeight,me=Ck(),ge=(0,G.useState)(null),be=ge[0],ye=ge[1],ve=qj({data:s,xScale:c,xFormat:u,yScale:f,yFormat:p,width:de,height:fe,colors:v,curve:m,areaBaselineValue:M,pointColor:R,pointBorderColor:L}),xe=ve.lineGenerator,we=ve.areaGenerator,Se=ve.series,ke=ve.xScale,Ce=ve.yScale,Me=ve.points,Pe=Fj({points:Me,width:de,height:fe,debug:ne}),Te=Pe.delaunay,Oe=Pe.voronoi;(0,G.useEffect)(function(){se&&(se.current=t.current),t.current.width=pe*a,t.current.height=he*a;var e=t.current.getContext("2d");e.scale(a,a),e.fillStyle=me.background,e.fillRect(0,0,pe,he),e.translate(ue.left,ue.top),b.forEach(function(t){if("function"==typeof t&&t({ctx:e,innerWidth:de,innerHeight:fe,series:Se,points:Me,xScale:ke,yScale:Ce,lineWidth:w,lineGenerator:xe,areaGenerator:we,currentPoint:be,setCurrentPoint:ye}),"grid"===t&&me.grid.line.strokeWidth>0&&(e.lineWidth=me.grid.line.strokeWidth,e.strokeStyle=me.grid.line.stroke,z&&$P(e,{width:de,height:fe,scale:ke,axis:"x",values:$}),B&&$P(e,{width:de,height:fe,scale:Ce,axis:"y",values:W})),"axes"===t&&zP(e,{xScale:ke,yScale:Ce,width:de,height:fe,top:H,right:q,bottom:U,left:Q,theme:me}),"areas"===t&&!0===k){e.save(),e.globalAlpha=T,we.context(e);for(var n=Se.length-1;n>=0;n--)e.fillStyle=Se[n].color,e.beginPath(),we(Se[n].data.map(function(e){return e.position})),e.fill();e.restore()}if("lines"===t&&(xe.context(e),Se.forEach(function(t){e.strokeStyle=t.color,e.lineWidth=w,e.beginPath(),xe(t.data.map(function(e){return e.position})),e.stroke()})),"points"===t&&!0===j&&D>0&&Me.forEach(function(t){e.fillStyle=t.color,e.beginPath(),e.arc(t.x,t.y,D/2,0,2*Math.PI),e.fill(),I>0&&(e.strokeStyle=t.borderColor,e.lineWidth=I,e.stroke())}),"mesh"===t&&!0===ne&&(function(e,t){e.save(),e.globalAlpha=.75,e.beginPath(),t.render(e),e.strokeStyle="red",e.lineWidth=1,e.stroke(),e.restore()}(e,Oe),be&&function(e,t,n){e.save(),e.globalAlpha=.35,e.beginPath(),t.renderCell(n,e),e.fillStyle="pink",e.fill(),e.restore()}(e,Oe,be.index)),"legends"===t){var r=Se.map(function(e){return{id:e.id,label:e.id,color:e.color}}).reverse();Z.forEach(function(t){NT(e,Nj({},t,{data:t.data||r,containerWidth:de,containerHeight:fe,theme:me}))})}})},[t,pe,he,b,me,xe,Se,ke,Ce,z,$,B,W,H,q,U,Q,Z,Me,j,D,be]);var je=(0,G.useCallback)(function(e){var n=Jk(t.current,e),r=n[0],o=n[1];if(!Zk(ue.left,ue.top,de,fe,r,o))return null;var i=Te.find(r-ue.left,o-ue.top);return Me[i]},[t,ue,de,fe,Te]),_e=qg(),De=_e.showTooltipFromEvent,Ee=_e.hideTooltip,Re=(0,G.useCallback)(function(e){var t=je(e);ye(t),t?De((0,G.createElement)(ae,{point:t}),e):Ee()},[je,ye,De,Ee,ae]),Ae=(0,G.useCallback)(function(e){Ee(),ye(null),be&&re&&re(be,e)},[Ee,ye,re]),Ie=(0,G.useCallback)(function(e){if(oe){var t=je(e);t&&oe(t,e)}},[je,oe]);return(0,le.jsx)("canvas",{ref:t,width:pe*a,height:he*a,style:{width:pe,height:he,cursor:ee?"auto":"normal"},onMouseEnter:ee?Re:void 0,onMouseMove:ee?Re:void 0,onMouseLeave:ee?Ae:void 0,onClick:ee?Ie:void 0})}),r_=(0,G.forwardRef)(function(e,t){return(0,le.jsx)(n_,Nj({},e,{canvasRef:t}))}),o_=((0,G.forwardRef)(function(e,t){return(0,le.jsx)(_k,{children:function(n){var r=n.width,o=n.height;return(0,le.jsx)(r_,Nj({width:r,height:o},e,{ref:t}))}})}),function(e){var t=e.data,n=e.chartConfig,r=e.keys,o=e.indexes,i=e.annotation;if(!t||0===t.length)return(0,le.jsx)("div",{children:"Error: no data provided"});var a=function(e,t,n,r){var o,i=t[0],a=n[0],s=n.filter(function(e){return e!==a})[0],l=e.reduce(function(e,t){return t[s]&&!e.includes(t[s])&&e.push(t[s]),e},[]),c=e.reduce(function(e,t){return t[a]&&!e.includes(t[a])&&e.push(t[a]),e},[]),u=c.map(function(t){return{x:t,y:e.reduce(function(e,n){return n[a]===t?Number(e)+Number(n[i]):e},0)}});return o=l.length?l.map(function(t){var n=e.filter(function(e){return e[s]===t}).map(function(e){return{x:e[a],y:Number(e[i])}}),r=c.map(function(e){return n.find(function(t){return t.x===e})||{x:e,y:0}});return{id:String(t),data:r}}):[{id:r.measures[i].title,data:u}],{transformedData:o}}(t,r,o,i),s=a.transformedData,l=n.theme,c=n.xAxisLabel,u=n.yAxisLabel,d=i.measures,f=jO({theme:l});return(0,le.jsxs)("div",{className:"dashboard-chart-container",children:[(0,le.jsx)("div",{className:"dashboard-chart",role:"graphics-datachart",children:(0,le.jsx)(t_,{"test-id":"line-chart",data:s,margin:{top:20,right:15,bottom:50,left:90},xScale:{type:"point"},yScale:{type:"linear",min:"auto",max:"auto",stacked:!1,reverse:!1},yFormat:" >-.2f",axisTop:null,axisRight:null,axisBottom:{tickSize:5,tickPadding:5,tickRotation:0,legend:c,legendOffset:36,legendPosition:"middle",truncateTickAt:0,renderTick:function(e){return(0,le.jsx)(IO,{x:e.x,y:e.y,value:e.value,textAnchor:"middle"})}},axisLeft:{tickSize:5,tickPadding:5,tickRotation:0,legend:u,legendOffset:-70,legendPosition:"middle",truncateTickAt:9},colors:f,pointSize:0,pointColor:{theme:"background"},pointBorderWidth:2,pointBorderColor:{from:"serieColor"},pointLabel:"data.yFormatted",pointLabelYOffset:-12,enableTouchCrosshair:!0,useMesh:!0,enableGridX:!0,enableGridY:!0,onClick:function(e){return console.log(e)}})}),(0,le.jsx)(_O,{data:d,themeConfig:f})]})});function i_(){return i_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i_.apply(this,arguments)}var a_={layers:["grid","axes","cells","legends","annotations"],forceSquare:!1,xInnerPadding:0,xOuterPadding:0,yInnerPadding:0,yOuterPadding:0,sizeVariation:!1,opacity:1,activeOpacity:1,inactiveOpacity:.15,borderWidth:0,borderColor:{from:"color",modifiers:[["darker",.8]]},enableGridX:!1,enableGridY:!1,enableLabels:!0,label:"formattedValue",labelTextColor:{from:"color",modifiers:[["darker",2]]},colors:{type:"sequential",scheme:"brown_blueGreen"},emptyColor:"#000000",legends:[],annotations:[],isInteractive:!0,hoverTarget:"rowColumn",tooltip:(0,G.memo)(function(e){var t=e.cell;return null===t.formattedValue?null:(0,le.jsx)(Lg,{id:t.serieId+" - "+t.data.x,value:t.formattedValue,enableChip:!0,color:t.color})}),animate:!0,motionConfig:"gentle"},s_=i_({},a_,{axisTop:{},axisRight:null,axisBottom:null,axisLeft:{},borderRadius:0,cellComponent:"rect"}),l_=(i_({},a_,{axisTop:{},axisRight:null,axisBottom:null,axisLeft:{},renderCell:"rect",pixelRatio:"undefined"!=typeof window&&window.devicePixelRatio||1}),function(e){var t=e.data,n=e.width,r=e.height,o=e.xInnerPadding,i=e.xOuterPadding,a=e.yInnerPadding,s=e.yOuterPadding,l=e.forceSquare,c=new Set,u=[],d=[],f=[];t.forEach(function(e){u.push(e.id),e.data.forEach(function(t){c.add(t.x);var n=null;void 0!==t.y&&null!==t.y&&(d.push(t.y),n=t.y),f.push({id:e.id+"."+t.x,serieId:e.id,value:n,data:t})})});var p=Array.from(c),h=function(e){var t=e.width,n=e.height,r=e.rows,o=e.columns,i=t,a=n,s=0,l=0;if(e.forceSquare){var c=Math.max(t/o,0),u=Math.max(n/r,0),d=Math.min(c,u);s=(t-(i=d*o))/2,l=(n-(a=d*r))/2}return{offsetX:s,offsetY:l,width:i,height:a}}({width:n,height:r,columns:p.length,rows:u.length,forceSquare:l}),m=h.width,g=h.height,b=h.offsetX,y=h.offsetY,v=fP(NC().domain(p).range([0,m]).paddingOuter(i).paddingInner(o)),x=fP(NC().domain(u).range([0,g]).paddingOuter(s).paddingInner(a)),w=v.bandwidth(),S=x.bandwidth(),k=f.map(function(e){return i_({},e,{x:v(e.data.x)+w/2,y:x(e.serieId)+S/2,width:w,height:S})});return{width:m,height:g,offsetX:b,offsetY:y,xScale:v,yScale:x,minValue:Math.min.apply(Math,d),maxValue:Math.max.apply(Math,d),cells:k}}),c_=function(e){return{x:e.x,y:e.y}},u_=function(e){return{size:Math.max(e.width,e.height),width:e.width,height:e.height}},d_={cell:function(e,t){return e.id===t.id},row:function(e,t){return e.serieId===t.serieId},column:function(e,t){return e.data.x===t.data.x},rowColumn:function(e,t){return e.serieId===t.serieId||e.data.x===t.data.x}},f_=function(e){var t=e.data,n=e.valueFormat,r=e.width,o=e.height,i=e.xOuterPadding,a=void 0===i?a_.xOuterPadding:i,s=e.xInnerPadding,l=void 0===s?a_.xInnerPadding:s,c=e.yOuterPadding,u=void 0===c?a_.yOuterPadding:c,d=e.yInnerPadding,f=void 0===d?a_.yInnerPadding:d,p=e.forceSquare,h=void 0===p?a_.forceSquare:p,m=e.sizeVariation,g=void 0===m?a_.sizeVariation:m,b=e.colors,y=void 0===b?a_.colors:b,v=e.emptyColor,x=void 0===v?a_.emptyColor:v,w=e.opacity,S=void 0===w?a_.opacity:w,k=e.activeOpacity,C=void 0===k?a_.activeOpacity:k,M=e.inactiveOpacity,P=void 0===M?a_.inactiveOpacity:M,T=e.borderColor,O=void 0===T?a_.borderColor:T,j=e.label,_=void 0===j?a_.label:j,D=e.labelTextColor,E=void 0===D?a_.labelTextColor:D,R=e.hoverTarget,A=void 0===R?a_.hoverTarget:R,I=(0,G.useState)(null),F=I[0],L=I[1],N=function(e){var t=e.data,n=e.width,r=e.height,o=e.xInnerPadding,i=e.xOuterPadding,a=e.yInnerPadding,s=e.yOuterPadding,l=e.forceSquare;return(0,G.useMemo)(function(){return l_({data:t,width:n,height:r,xInnerPadding:o,xOuterPadding:i,yInnerPadding:a,yOuterPadding:s,forceSquare:l})},[t,n,r,o,i,a,s,l])}({data:t,width:r,height:o,xOuterPadding:a,xInnerPadding:l,yOuterPadding:u,yInnerPadding:f,forceSquare:h}),z=N.width,$=N.height,V=N.offsetX,B=N.offsetY,W=N.cells,H=N.xScale,q=N.yScale,Y=N.minValue,U=N.maxValue,X=(0,G.useMemo)(function(){if(!F)return[];var e=d_[A];return W.filter(function(t){return e(t,F)}).map(function(e){return e.id})},[W,F,A]),Q=function(e){var t,n,r,o=e.cells,i=e.minValue,a=e.maxValue,s=e.sizeVariation,l=e.colors,c=e.emptyColor,u=e.opacity,d=e.activeOpacity,f=e.inactiveOpacity,p=e.borderColor,h=e.label,m=e.labelTextColor,g=e.valueFormat,b=e.activeIds,y=(0,G.useMemo)(function(){return function(e,t,n){if(!e)return function(){return 1};var r=LC().domain(e.values?e.values:[t,n]).range(e.sizes);return function(e){return null===e?1:r(e)}}(t,n,r)},[t=s,n=i,r=a]),v=(0,G.useMemo)(function(){return"function"==typeof l?null:ST(l,{min:i,max:a})},[l,i,a]),x=(0,G.useCallback)(function(e){if(null!==e.value){if("function"==typeof l)return l(e);if(null!==v)return v(e.value)}return c},[l,v,c]),w=Ck(),S=wT(p,w),k=wT(m,w),C=xk(g),M=Kk(h);return{cells:(0,G.useMemo)(function(){return o.map(function(e){var t=u;b.length>0&&(t=b.includes(e.id)?d:f);var n=y(e.value),r=i_({},e,{width:e.width*n,height:e.height*n,formattedValue:null!==e.value?C(e.value):null,opacity:t});return r.label=M(r),r.color=x(r),r.borderColor=S(r),r.labelTextColor=k(r),r})},[o,y,x,S,k,C,M,b,u,d,f]),colorScale:v}}({cells:W,minValue:Y,maxValue:U,sizeVariation:g,colors:y,emptyColor:x,opacity:S,activeOpacity:C,inactiveOpacity:P,borderColor:O,label:_,labelTextColor:E,valueFormat:n,activeIds:X});return{width:z,height:$,offsetX:V,offsetY:B,cells:Q.cells,xScale:H,yScale:q,colorScale:Q.colorScale,activeCell:F,setActiveCell:L}},p_=(0,G.memo)(function(e){var t=e.cell,n=e.borderWidth,r=e.borderRadius,o=e.animatedProps,i=e.onMouseEnter,a=e.onMouseMove,s=e.onMouseLeave,l=e.onClick,c=e.enableLabels,u=Ck(),d=(0,G.useMemo)(function(){return{onMouseEnter:i?i(t):void 0,onMouseMove:a?a(t):void 0,onMouseLeave:s?s(t):void 0,onClick:l?l(t):void 0}},[t,i,a,s,l]);return(0,le.jsxs)(Dg.g,i_({"data-testid":"cell."+t.id,style:{cursor:"pointer"},opacity:o.opacity},d,{transform:bg([o.x,o.y,o.scale],function(e,t,n){return"translate("+e+", "+t+") scale("+n+")"}),children:[(0,le.jsx)(Dg.rect,{transform:bg([o.width,o.height],function(e,t){return"translate("+-.5*e+", "+-.5*t+")"}),fill:o.color,width:o.width,height:o.height,stroke:o.borderColor,strokeWidth:n,rx:r,ry:r},t.id),c&&(0,le.jsx)(Dg.text,{textAnchor:"middle",dominantBaseline:"central",fill:o.labelTextColor,style:i_({},u.labels.text,{fill:void 0,userSelect:"none"}),children:t.label})]}))}),h_=(0,G.memo)(function(e){var t=e.cell,n=e.borderWidth,r=e.animatedProps,o=e.onMouseEnter,i=e.onMouseMove,a=e.onMouseLeave,s=e.onClick,l=e.enableLabels,c=Ck(),u=(0,G.useMemo)(function(){return{onMouseEnter:o?o(t):void 0,onMouseMove:i?i(t):void 0,onMouseLeave:a?a(t):void 0,onClick:s?s(t):void 0}},[t,o,i,a,s]);return(0,le.jsxs)(Dg.g,i_({"data-testid":"cell."+t.id,style:{cursor:"pointer"},opacity:r.opacity},u,{transform:bg([r.x,r.y],function(e,t){return"translate("+e+", "+t+")"}),children:[(0,le.jsx)(Dg.circle,{r:bg([r.width,r.height],function(e,t){return Math.min(e,t)/2}),fill:r.color,fillOpacity:r.opacity,strokeWidth:n,stroke:r.borderColor}),l&&(0,le.jsx)(Dg.text,{dominantBaseline:"central",textAnchor:"middle",fill:r.labelTextColor,style:i_({},c.labels.text,{fill:void 0}),children:t.label})]}))}),m_=function(e){return{x:e.x,y:e.y,width:e.width,height:e.height,color:e.color,opacity:0,borderColor:e.borderColor,labelTextColor:e.labelTextColor,scale:0}},g_=function(e){return{x:e.x,y:e.y,width:e.width,height:e.height,color:e.color,opacity:e.opacity,borderColor:e.borderColor,labelTextColor:e.labelTextColor,scale:1}},b_=function(e){return{x:e.x,y:e.y,width:e.width,height:e.height,color:e.color,opacity:0,borderColor:e.borderColor,labelTextColor:e.labelTextColor,scale:0}},y_=function(e){var t,n=e.cells,r=e.cellComponent,o=e.borderRadius,i=e.borderWidth,a=e.isInteractive,s=e.setActiveCell,l=e.onMouseEnter,c=e.onMouseMove,u=e.onMouseLeave,d=e.onClick,f=e.tooltip,p=e.enableLabels,h=lk(),m=h.animate,g=h.config,b=dg(n,{keys:function(e){return e.id},initial:g_,from:m_,enter:g_,update:g_,leave:b_,config:g,immediate:!m}),y=qg(),v=y.showTooltipFromEvent,x=y.hideTooltip,w=(0,G.useMemo)(function(){if(a)return function(e){return function(t){v((0,G.createElement)(f,{cell:e}),t),s(e),null==l||l(e,t)}}},[a,v,f,s,l]),S=(0,G.useMemo)(function(){if(a)return function(e){return function(t){v((0,G.createElement)(f,{cell:e}),t),null==c||c(e,t)}}},[a,v,f,c]),k=(0,G.useMemo)(function(){if(a)return function(e){return function(t){x(),s(null),null==u||u(e,t)}}},[a,x,s,u]),C=(0,G.useMemo)(function(){if(a)return function(e){return function(t){null==d||d(e,t)}}},[a,d]);return t="rect"===r?p_:"circle"===r?h_:r,(0,le.jsx)(le.Fragment,{children:b(function(e,n){return(0,G.createElement)(t,{cell:n,borderRadius:o,borderWidth:i,animatedProps:e,enableLabels:p,onMouseEnter:w,onMouseMove:S,onMouseLeave:k,onClick:C})})})},v_=function(e){var t=function(e,t){return XP({data:e,annotations:t,getPosition:c_,getDimensions:u_})}(e.cells,e.annotations);return(0,le.jsx)(le.Fragment,{children:t.map(function(e,t){return(0,le.jsx)(tT,i_({},e),t)})})},x_=["isInteractive","animate","motionConfig","theme","renderWrapper"],w_=function(e){var t=e.data,n=e.layers,r=void 0===n?s_.layers:n,o=e.valueFormat,i=e.width,a=e.height,s=e.margin,l=e.forceSquare,c=void 0===l?s_.forceSquare:l,u=e.xInnerPadding,d=void 0===u?s_.xInnerPadding:u,f=e.xOuterPadding,p=void 0===f?s_.xOuterPadding:f,h=e.yInnerPadding,m=void 0===h?s_.yInnerPadding:h,g=e.yOuterPadding,b=void 0===g?s_.yOuterPadding:g,y=e.sizeVariation,v=void 0===y?s_.sizeVariation:y,x=e.cellComponent,w=void 0===x?s_.cellComponent:x,S=e.opacity,k=void 0===S?s_.opacity:S,C=e.activeOpacity,M=void 0===C?s_.activeOpacity:C,P=e.inactiveOpacity,T=void 0===P?s_.inactiveOpacity:P,O=e.borderRadius,j=void 0===O?s_.borderRadius:O,_=e.borderWidth,D=void 0===_?s_.borderWidth:_,E=e.borderColor,R=void 0===E?s_.borderColor:E,A=e.enableGridX,I=void 0===A?s_.enableGridX:A,F=e.enableGridY,L=void 0===F?s_.enableGridY:F,N=e.axisTop,z=void 0===N?s_.axisTop:N,$=e.axisRight,V=void 0===$?s_.axisRight:$,B=e.axisBottom,W=void 0===B?s_.axisBottom:B,H=e.axisLeft,q=void 0===H?s_.axisLeft:H,Y=e.enableLabels,U=void 0===Y?s_.enableLabels:Y,X=e.label,Q=void 0===X?s_.label:X,K=e.labelTextColor,Z=void 0===K?s_.labelTextColor:K,J=e.colors,ee=void 0===J?s_.colors:J,te=e.emptyColor,ne=void 0===te?s_.emptyColor:te,re=e.legends,oe=void 0===re?s_.legends:re,ie=e.annotations,ae=void 0===ie?s_.annotations:ie,se=e.isInteractive,ce=void 0===se?s_.isInteractive:se,ue=e.onMouseEnter,de=e.onMouseMove,fe=e.onMouseLeave,pe=e.onClick,he=e.hoverTarget,me=void 0===he?s_.hoverTarget:he,ge=e.tooltip,be=void 0===ge?s_.tooltip:ge,ye=e.role,ve=e.ariaLabel,xe=e.ariaLabelledBy,we=e.ariaDescribedBy,Se=bk(i,a,s),ke=Se.margin,Ce=Se.innerWidth,Me=Se.innerHeight,Pe=Se.outerWidth,Te=Se.outerHeight,Oe=f_({data:t,valueFormat:o,width:Ce,height:Me,forceSquare:c,xInnerPadding:d,xOuterPadding:p,yInnerPadding:m,yOuterPadding:b,sizeVariation:v,colors:ee,emptyColor:ne,opacity:k,activeOpacity:M,inactiveOpacity:T,borderColor:R,label:Q,labelTextColor:Z,hoverTarget:me}),je=Oe.width,_e=Oe.height,De=Oe.offsetX,Ee=Oe.offsetY,Re=Oe.xScale,Ae=Oe.yScale,Ie=Oe.cells,Fe=Oe.colorScale,Le=Oe.activeCell,Ne=Oe.setActiveCell,ze=(0,G.useMemo)(function(){return i_({},ke,{top:ke.top+Ee,left:ke.left+De})},[ke,De,Ee]),$e={grid:null,axes:null,cells:null,legends:null,annotations:null};r.includes("grid")&&($e.grid=(0,le.jsx)(NP,{width:je,height:_e,xScale:I?Re:null,yScale:L?Ae:null},"grid")),r.includes("axes")&&($e.axes=(0,le.jsx)(IP,{xScale:Re,yScale:Ae,width:je,height:_e,top:z,right:V,bottom:W,left:q},"axes")),r.includes("cells")&&($e.cells=(0,le.jsx)(G.Fragment,{children:(0,le.jsx)(y_,{cells:Ie,cellComponent:w,borderRadius:j,borderWidth:D,isInteractive:ce,setActiveCell:Ne,onMouseEnter:ue,onMouseMove:de,onMouseLeave:fe,onClick:pe,tooltip:be,enableLabels:U})},"cells")),r.includes("legends")&&null!==Fe&&($e.legends=(0,le.jsx)(G.Fragment,{children:oe.map(function(e,t){return(0,G.createElement)(ET,i_({},e,{key:t,containerWidth:je,containerHeight:_e,scale:Fe}))})},"legends")),r.includes("annotations")&&ae.length>0&&($e.annotations=(0,le.jsx)(v_,{cells:Ie,annotations:ae},"annotations"));var Ve={cells:Ie,activeCell:Le,setActiveCell:Ne};return(0,le.jsx)(Wk,{width:Pe,height:Te,margin:Object.assign({},ze,{top:ze.top,left:ze.left}),role:ye,ariaLabel:ve,ariaLabelledBy:xe,ariaDescribedBy:we,children:r.map(function(e,t){var n;return"function"==typeof e?(0,le.jsx)(G.Fragment,{children:(0,G.createElement)(e,Ve)},t):null!=(n=null==$e?void 0:$e[e])?n:null})})},S_=function(e){var t=e.isInteractive,n=void 0===t?s_.isInteractive:t,r=e.animate,o=void 0===r?s_.animate:r,i=e.motionConfig,a=void 0===i?s_.motionConfig:i,s=e.theme,l=e.renderWrapper,c=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,x_);return(0,le.jsx)(jk,{animate:o,isInteractive:n,motionConfig:a,renderWrapper:l,theme:s,children:(0,le.jsx)(w_,i_({isInteractive:n},c))})},k_=function(e){return(0,le.jsx)(_k,{children:function(t){var n=t.width,r=t.height;return(0,le.jsx)(S_,i_({width:n,height:r},e))}})},C_=function(e){var t=e.data,n=e.chartConfig,r=e.keys,o=e.indexes,i=e.annotation;if(!t||0===t.length)return(0,le.jsx)("div",{children:"Error: no data provided"});var a=n.xAxisLabel,s=n.yAxisLabel,l=n.theme,c=n.minValue,u=n.maxValue,d=function(e,t,n,r){return{transformedData:DO(t,n,e).map(function(e){return{id:e[n[0]],data:t.map(function(t){var n;return{x:r.measures[t]?r.measures[t].title:t,y:null!==(n=e[t])&&void 0!==n?n:null}})}})}}(t,r,o,i),f=d.transformedData,p=jO({theme:l,minValue:c,maxValue:u});return(0,le.jsx)("div",{className:"dashboard-chart-container",children:(0,le.jsx)("div",{className:"dashboard-chart",role:"graphics-datachart",children:(0,le.jsx)(k_,{"test-id":"heatmap",data:f,margin:{top:30,right:90,bottom:50,left:90},valueFormat:">-.2s",axisRight:{tickSize:2,tickPadding:5,tickRotation:0,legend:s,legendPosition:"middle",legendOffset:70,truncateTickAt:0,renderTick:function(e){return(0,le.jsx)(IO,{x:e.x+2,y:e.y-7,value:e.value,textAnchor:"start"})}},axisLeft:{tickSize:2,tickPadding:5,tickRotation:0,legend:s,legendPosition:"middle",legendOffset:-70,truncateTickAt:0,renderTick:function(e){return(0,le.jsx)(IO,{x:e.x-2,y:e.y-7,value:e.value,textAnchor:"end"})}},colors:p,emptyColor:"#555555",opacity:10,legends:[{anchor:"bottom",translateX:0,translateY:30,length:400,thickness:8,direction:"row",tickPosition:"after",tickSize:3,tickSpacing:4,tickOverlap:!1,tickFormat:">-.2s",title:a+" Value →",titleAlign:"start",titleOffset:4}],onClick:function(e){return console.log(e)}},l)})})};function M_(){return M_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},M_.apply(this,arguments)}var P_={pointerEvents:"none"},T_=function(e){var t=e.label,n=e.style,r=Ck();return(0,le.jsx)(Dg.g,{transform:n.transform,opacity:n.progress,style:P_,children:(0,le.jsx)(Dg.text,{textAnchor:"middle",dominantBaseline:"central",style:M_({},r.labels.text,{fill:n.textColor}),children:t})})},O_=function(e,t,n,r,o){return["A",e,e,0,t,n,r,o].join(" ")},j_={startAngle:{enter:function(e){return M_({},e,{endAngle:e.startAngle})},update:function(e){return e},leave:function(e){return M_({},e,{startAngle:e.endAngle})}},middleAngle:{enter:function(e){var t=e.startAngle+(e.endAngle-e.startAngle)/2;return M_({},e,{startAngle:t,endAngle:t})},update:function(e){return e},leave:function(e){var t=e.startAngle+(e.endAngle-e.startAngle)/2;return M_({},e,{startAngle:t,endAngle:t})}},endAngle:{enter:function(e){return M_({},e,{startAngle:e.endAngle})},update:function(e){return e},leave:function(e){return M_({},e,{endAngle:e.startAngle})}},innerRadius:{enter:function(e){return M_({},e,{outerRadius:e.innerRadius})},update:function(e){return e},leave:function(e){return M_({},e,{innerRadius:e.outerRadius})}},centerRadius:{enter:function(e){var t=e.innerRadius+(e.outerRadius-e.innerRadius)/2;return M_({},e,{innerRadius:t,outerRadius:t})},update:function(e){return e},leave:function(e){var t=e.innerRadius+(e.outerRadius-e.innerRadius)/2;return M_({},e,{innerRadius:t,outerRadius:t})}},outerRadius:{enter:function(e){return M_({},e,{innerRadius:e.outerRadius})},update:function(e){return e},leave:function(e){return M_({},e,{outerRadius:e.innerRadius})}},pushIn:{enter:function(e){return M_({},e,{innerRadius:e.innerRadius-e.outerRadius+e.innerRadius,outerRadius:e.innerRadius})},update:function(e){return e},leave:function(e){return M_({},e,{innerRadius:e.outerRadius,outerRadius:e.outerRadius+e.outerRadius-e.innerRadius})}},pushOut:{enter:function(e){return M_({},e,{innerRadius:e.outerRadius,outerRadius:e.outerRadius+e.outerRadius-e.innerRadius})},update:function(e){return e},leave:function(e){return M_({},e,{innerRadius:e.innerRadius-e.outerRadius+e.innerRadius,outerRadius:e.innerRadius})}}},__=function(e,t){return(0,G.useMemo)(function(){var n=j_[e];return{enter:function(e){return M_({progress:0},n.enter(e.arc),t?t.enter(e):{})},update:function(e){return M_({progress:1},n.update(e.arc),t?t.update(e):{})},leave:function(e){return M_({progress:0},n.leave(e.arc),t?t.leave(e):{})}}},[e,t])},D_=function(e){return function(t,n,r,o){return bg([t,n,r,o],function(t,n,r,o){var i=function(e,t){var n=function(e){return e.startAngle+(e.endAngle-e.startAngle)/2}(e)-Math.PI/2,r=e.innerRadius+(e.outerRadius-e.innerRadius)*t;return Fk(n,r)}({startAngle:t,endAngle:n,innerRadius:r,outerRadius:o},e);return"translate("+i.x+","+i.y+")"})}},E_=function(e){var t=e.center,n=e.data,r=e.transitionMode,o=e.label,i=e.radiusOffset,a=e.skipAngle,s=e.skipRadius,l=e.textColor,c=e.component,u=void 0===c?T_:c,d=Kk(o),f=Ck(),p=wT(l,f),h=(0,G.useMemo)(function(){return n.filter(function(e){var t=Math.abs(Ik(e.arc.endAngle-e.arc.startAngle)),n=Math.abs(e.arc.outerRadius-e.arc.innerRadius);return t>=a&&n>=s})},[n,a,s]),m=function(e,t,n){void 0===t&&(t=.5),void 0===n&&(n="innerRadius");var r=lk(),o=r.animate,i=r.config,a=__(n,void 0);return{transition:dg(e,{keys:function(e){return e.id},initial:a.update,from:a.enter,enter:a.update,update:a.update,leave:a.leave,config:i,immediate:!o}),interpolate:D_(t)}}(h,i,r),g=m.transition,b=m.interpolate,y=u;return(0,le.jsx)("g",{transform:"translate("+t[0]+","+t[1]+")",children:g(function(e,t){return(0,G.createElement)(y,{key:t.id,datum:t,label:d(t),style:M_({},e,{transform:b(e.startAngle,e.endAngle,e.innerRadius,e.outerRadius),textColor:p(t)})})})})},R_=(qO().x(function(e){return e.x}).y(function(e){return e.y}),["animated"]),A_=function(e){var t=e.animated,n=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,R_);return(0,le.jsx)(Dg.path,M_({d:bg([t.radius,t.startAngle,t.endAngle],function(e,t,n){return function(e,t,n){var r=Math.min(t,n),o=Math.max(t,n),i=Fk(Ak(o),e),a=Fk(Ak(r),e);if(o-r>=360){var s=Fk(Ak(r+180),e);return["M "+i.x+" "+i.y,O_(e,1,1,s.x,s.y),"M "+i.x+" "+i.y,O_(e,1,0,s.x,s.y)].join(" ")}var l=o-r<=180?0:1;return["M "+i.x+" "+i.y,O_(e,l,0,a.x,a.y)].join(" ")}(e,t,n)})},n))},I_=function(e){var t=e.datum,n=e.style,r=e.onClick,o=e.onMouseEnter,i=e.onMouseMove,a=e.onMouseLeave,s=(0,G.useCallback)(function(e){return null==r?void 0:r(t,e)},[r,t]),l=(0,G.useCallback)(function(e){return null==o?void 0:o(t,e)},[o,t]),c=(0,G.useCallback)(function(e){return null==i?void 0:i(t,e)},[i,t]),u=(0,G.useCallback)(function(e){return null==a?void 0:a(t,e)},[a,t]);return(0,le.jsx)(Dg.path,{d:n.path,opacity:n.opacity,fill:t.fill||n.color,stroke:n.borderColor,strokeWidth:n.borderWidth,onClick:r?s:void 0,onMouseEnter:o?l:void 0,onMouseMove:i?c:void 0,onMouseLeave:a?u:void 0,"data-testid":"arc."+t.id})},F_=function(e,t,n,r,o){return bg([e,t,n,r],function(e,t,n,r){return o({startAngle:e,endAngle:t,innerRadius:Math.max(0,n),outerRadius:Math.max(0,r)})})},L_=function(e){var t=e.center,n=e.data,r=e.arcGenerator,o=e.borderWidth,i=e.borderColor,a=e.onClick,s=e.onMouseEnter,l=e.onMouseMove,c=e.onMouseLeave,u=e.transitionMode,d=e.component,f=void 0===d?I_:d,p=Ck(),h=wT(i,p),m=function(e,t,n){void 0===t&&(t="innerRadius");var r=lk(),o=r.animate,i=r.config,a=__(t,n);return{transition:dg(e,{keys:function(e){return e.id},initial:a.update,from:a.enter,enter:a.update,update:a.update,leave:a.leave,config:i,immediate:!o}),interpolate:F_}}(n,u,{enter:function(e){return{opacity:0,color:e.color,borderColor:h(e)}},update:function(e){return{opacity:1,color:e.color,borderColor:h(e)}},leave:function(e){return{opacity:0,color:e.color,borderColor:h(e)}}}),g=m.transition,b=m.interpolate,y=f;return(0,le.jsx)("g",{transform:"translate("+t[0]+","+t[1]+")",children:g(function(e,t){return(0,G.createElement)(y,{key:t.id,datum:t,style:M_({},e,{borderWidth:o,path:b(e.startAngle,e.endAngle,e.innerRadius,e.outerRadius,r)}),onClick:a,onMouseEnter:s,onMouseMove:l,onMouseLeave:c})})})};function N_(){return N_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},N_.apply(this,arguments)}var z_=function(e){var t=e.label,n=e.animated,r=Ck();return(0,le.jsxs)(Dg.g,{opacity:n.opacity,children:[(0,le.jsx)(Dg.line,{x1:n.x1,y1:n.y1,x2:n.x2,y2:n.y2,style:r.axis.ticks.line}),(0,le.jsx)(Dg.text,{dx:n.textX,dy:n.textY,dominantBaseline:"central",style:r.axis.ticks.text,textAnchor:"middle",children:t})]})},$_=function(e,t,n){var r=Fk(Ak(e),t),o=Fk(Ak(e),n);return{x1:r.x,y1:r.y,x2:o.x,y2:o.y}},V_=function(e,t){var n=Fk(Ak(e),t);return{textX:n.x,textY:n.y}},B_=function(e){var t=e.type,n=e.center,r=void 0===n?[0,0]:n,o=e.radius,i=e.startAngle,a=e.endAngle,s=e.scale,l=e.tickSize,c=void 0===l?5:l,u=e.tickPadding,d=void 0===u?12:u,f=e.tickComponent,p=void 0===f?z_:f,h=i-90,m=a-90,g=Ck(),b=lk(),y=b.animate,v=b.config,x=ug({radius:o,startAngle:h,endAngle:m,opacity:1,immediate:!y,config:v}),w=(0,G.useMemo)(function(){var e=TP(s),t="bandwidth"in s?kP(s):s;return e.map(function(e,n){return{key:n,label:e,angle:t(e)-90}})},[s]),S="inner"===t?o-c:o+c,k="inner"===t?S-d:S+d,C=dg(w,{keys:function(e){return e.key},initial:function(e){return N_({},$_(e.angle,o,S),V_(e.angle,k),{opacity:1})},from:function(e){return N_({},$_(e.angle,o,S),V_(e.angle,k),{opacity:0})},enter:function(e){return N_({},$_(e.angle,o,S),V_(e.angle,k),{opacity:1})},update:function(e){return N_({},$_(e.angle,o,S),V_(e.angle,k),{opacity:1})},leave:function(e){return N_({},$_(e.angle,o,S),V_(e.angle,k),{opacity:0})},immediate:!y,config:v});return(0,le.jsxs)("g",{transform:"translate("+r[0]+", "+r[1]+")",style:{pointerEvents:"none"},children:[(0,le.jsx)(A_,N_({animated:x},g.axis.domain.line,{fill:"none"})),C(function(e,t){return(0,G.createElement)(p,{key:t.key,label:t.label,animated:e})})]})},W_=function(e){var t=e.scale,n=e.innerRadius,r=e.outerRadius,o=Ck(),i=(0,G.useMemo)(function(){return TP(t).map(function(e,n){return{id:n,angle:t(e)-90}})},[t]),a=lk(),s=a.animate,l=dg(i,{keys:function(e){return e.id},initial:function(e){return{angle:e.angle,opacity:1}},from:function(e){return{angle:e.angle,opacity:0}},enter:function(e){return{angle:e.angle,opacity:1}},update:function(e){return{angle:e.angle,opacity:1}},leave:function(e){return{angle:e.angle,opacity:0}},config:a.config,immediate:!s});return(0,le.jsx)(le.Fragment,{children:l(function(e,t){return(0,le.jsx)(Dg.g,{transform:e.angle.to(function(e){return"rotate("+e+")"}),opacity:e.opacity,children:(0,le.jsx)("line",N_({x1:n,x2:r},o.grid.line))},t.id)})})},H_=function(e){var t=e.scale,n=e.ticks,r=e.startAngle,o=e.endAngle,i=Ck(),a=r-90,s=o-90,l=(0,G.useMemo)(function(){return TP(t,n).map(function(e,n){var r=t(e);return"bandwidth"in t&&(r+=t.bandwidth()/2),{id:n,radius:r}})},[t]),c=lk(),u=c.animate,d=dg(l,{keys:function(e){return e.id},initial:function(e){return{radius:e.radius,startAngle:a,endAngle:s,opacity:1}},from:function(e){return{radius:e.radius,startAngle:a,endAngle:s,opacity:0}},enter:function(e){return{radius:e.radius,startAngle:a,endAngle:s,opacity:1}},update:function(e){return{radius:e.radius,startAngle:a,endAngle:s,opacity:1}},leave:function(e){return{radius:e.radius,startAngle:a,endAngle:s,opacity:0}},config:c.config,immediate:!u});return(0,le.jsx)(le.Fragment,{children:d(function(e,t){return(0,le.jsx)(A_,N_({animated:e},i.grid.line,{strokeOpacity:e.opacity,fill:"none"}),t.id)})})},q_=function(e){var t=e.center,n=e.enableRadialGrid,r=e.angleScale,o=e.startAngle,i=e.endAngle,a=e.enableCircularGrid,s=e.radiusScale,l=e.circularGridTicks,c=Math.min.apply(Math,s.range()),u=Math.max.apply(Math,s.range());return(0,le.jsxs)("g",{transform:"translate("+t[0]+","+t[1]+")",children:[n&&(0,le.jsx)(W_,{scale:r,innerRadius:c,outerRadius:u}),a&&(0,le.jsx)(H_,{scale:s,ticks:l,startAngle:o,endAngle:i})]})},Y_=function(e){var t=e.label,n=e.textAnchor,r=e.animated,o=Ck(),i=o.axis.ticks.text,a=Pk(i);return(0,le.jsxs)(Dg.g,{opacity:r.opacity,transform:bg([r.y,r.rotation],function(e,t){return"translate("+e+", 0) rotate("+t+")"}),children:[(0,le.jsx)(Dg.line,{x2:r.length,style:o.axis.ticks.line}),i.outlineWidth>0&&(0,le.jsx)(Dg.text,{dx:r.textX,textAnchor:n,dominantBaseline:"central",style:a,strokeWidth:2*i.outlineWidth,stroke:i.outlineColor,strokeLinejoin:"round",opacity:i.outlineOpacity,children:t}),(0,le.jsx)(Dg.text,{dx:r.textX,textAnchor:n,dominantBaseline:"central",style:a,children:t})]})},U_=function(e){var t,n,r,o,i,a=e.ticksPosition,s=e.center,l=e.angle,c=e.scale,u=e.ticks,d=e.tickSize,f=void 0===d?5:d,p=e.tickPadding,h=void 0===p?5:p,m=e.tickRotation,g=void 0===m?0:m,b=e.tickComponent,y=void 0===b?Y_:b,v=(i=l)<0?360- -i%360:i%360;"before"===a?(o=90+g,v<=90?(r=(n=-f)-h,t="end"):v<270?(r=(n=f)+h,t="start",o-=180):(r=(n=-f)-h,t="end")):(o=90+g,v<90?(r=(n=f)+h,t="start"):v<270?(r=(n=-f)-h,t="end",o-=180):(r=(n=f)+h,t="start"));var x=(0,G.useMemo)(function(){return TP(c,u).map(function(e,t){var n=c(e);return"bandwidth"in c&&(n+=c.bandwidth()/2),{key:t,label:e,position:n}})},[c,u]),w=lk(),S=w.animate,k=w.config,C=ug({rotation:l-90,immediate:!S,config:k}),M=dg(x,{keys:function(e){return e.key},initial:function(e){return{y:e.position,textX:r,rotation:o,length:n,opacity:1}},from:function(e){return{y:e.position,textX:r,rotation:o,length:n,opacity:0}},enter:function(e){return{y:e.position,textX:r,rotation:o,length:n,opacity:1}},update:function(e){return{y:e.position,textX:r,rotation:o,length:n,opacity:1}},leave:function(e){return{y:e.position,textX:r,rotation:o,length:n,opacity:0}},immediate:!S,config:k});return(0,le.jsx)("g",{transform:"translate("+s[0]+", "+s[1]+")",style:{pointerEvents:"none"},children:(0,le.jsx)(Dg.g,{transform:C.rotation.to(function(e){return"rotate("+e+")"}),children:M(function(e,i){return(0,G.createElement)(y,{key:i.key,label:i.label,y:i.position,textX:r,rotation:o,length:n,textAnchor:t,animated:e})})})})};function G_(e){return e.innerRadius}function X_(e){return e.outerRadius}function Q_(e){return e.startAngle}function K_(e){return e.endAngle}function Z_(e){return e&&e.padAngle}function J_(e,t,n,r,o,i,a){var s=e-n,l=t-r,c=(a?i:-i)/kb(s*s+l*l),u=c*l,d=-c*s,f=e+u,p=t+d,h=n+u,m=r+d,g=(f+h)/2,b=(p+m)/2,y=h-f,v=m-p,x=y*y+v*v,w=o-i,S=f*m-h*p,k=(v<0?-1:1)*kb(xb(0,w*w*x-S*S)),C=(S*v-y*k)/x,M=(-S*y-v*k)/x,P=(S*v+y*k)/x,T=(-S*y+v*k)/x,O=C-g,j=M-b,_=P-g,D=T-b;return O*O+j*j>_*_+D*D&&(C=P,M=T),{cx:C,cy:M,x01:-u,y01:-d,x11:C*(o/w-1),y11:M*(o/w-1)}}function eD(){return eD=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},eD.apply(this,arguments)}var tD={maxValue:"auto",layers:["grid","tracks","bars","labels","legends"],startAngle:0,endAngle:270,innerRadius:.3,padding:.2,padAngle:0,cornerRadius:0,enableTracks:!0,tracksColor:"rgba(0, 0, 0, .15)",enableRadialGrid:!0,enableCircularGrid:!0,radialAxisStart:{},radialAxisEnd:null,circularAxisInner:null,circularAxisOuter:{},colors:{scheme:"nivo"},borderWidth:0,borderColor:{from:"color",modifiers:[["darker",1]]},enableLabels:!1,label:"formattedValue",labelsSkipAngle:10,labelsSkipRadius:0,labelsRadiusOffset:.5,labelsTextColor:{theme:"labels.text.fill"},isInteractive:!0,tooltip:function(e){var t=e.bar;return(0,le.jsx)(Lg,{enableChip:!0,id:(0,le.jsxs)("span",{children:[t.category," - ",t.groupId]}),value:t.formattedValue,color:t.color})},legends:[],defs:[],fill:[],animate:!0,motionConfig:"gentle",transitionMode:"centerRadius",renderWrapper:!0},nD=eD({},tD),rD=function(e){var t=e.center,n=e.bars,r=e.borderWidth,o=e.borderColor,i=e.arcGenerator,a=e.isInteractive,s=e.tooltip,l=e.onClick,c=e.onMouseEnter,u=e.onMouseMove,d=e.onMouseLeave,f=e.transitionMode,p=qg(),h=p.showTooltipFromEvent,m=p.hideTooltip,g=(0,G.useCallback)(function(e,t){null==l||l(e,t)},[l]),b=(0,G.useCallback)(function(e,t){h((0,G.createElement)(s,{bar:e}),t),null==c||c(e,t)},[h,s,c]),y=(0,G.useCallback)(function(e,t){h((0,G.createElement)(s,{bar:e}),t),null==u||u(e,t)},[h,s,u]),v=(0,G.useCallback)(function(e,t){m(),null==d||d(e,t)},[m,d]);return(0,le.jsx)(L_,{center:t,data:n,arcGenerator:i,borderWidth:r,borderColor:o,transitionMode:f,onClick:a?g:void 0,onMouseEnter:a?b:void 0,onMouseMove:a?y:void 0,onMouseLeave:a?v:void 0})},oD=function(e){var t=e.center,n=e.tracks,r=e.arcGenerator,o=e.transitionMode;return(0,le.jsx)(L_,{center:t,data:n,arcGenerator:r,borderWidth:0,borderColor:"none",transitionMode:o})},iD=["isInteractive","animate","motionConfig","theme","renderWrapper"],aD=function(e){var t=e.data,n=e.maxValue,r=void 0===n?nD.maxValue:n,o=e.valueFormat,i=e.startAngle,a=void 0===i?nD.startAngle:i,s=e.endAngle,l=void 0===s?nD.endAngle:s,c=e.innerRadius,u=void 0===c?nD.innerRadius:c,d=e.padding,f=void 0===d?nD.padding:d,p=e.padAngle,h=void 0===p?nD.padAngle:p,m=e.cornerRadius,g=void 0===m?nD.cornerRadius:m,b=e.width,y=e.height,v=e.margin,x=e.layers,w=void 0===x?nD.layers:x,S=e.enableTracks,k=void 0===S?nD.enableTracks:S,C=e.tracksColor,M=void 0===C?nD.tracksColor:C,P=e.enableRadialGrid,T=void 0===P?nD.enableRadialGrid:P,O=e.enableCircularGrid,j=void 0===O?nD.enableCircularGrid:O,_=e.radialAxisStart,D=void 0===_?nD.radialAxisStart:_,E=e.radialAxisEnd,R=void 0===E?nD.radialAxisEnd:E,A=e.circularAxisInner,I=void 0===A?nD.circularAxisInner:A,F=e.circularAxisOuter,L=void 0===F?nD.circularAxisOuter:F,N=e.colors,z=void 0===N?nD.colors:N,$=e.defs,V=void 0===$?nD.defs:$,B=e.fill,W=void 0===B?nD.fill:B,H=e.borderWidth,q=void 0===H?nD.borderWidth:H,Y=e.borderColor,U=void 0===Y?nD.borderColor:Y,X=e.enableLabels,Q=void 0===X?nD.enableLabels:X,K=e.label,Z=void 0===K?nD.label:K,J=e.labelsSkipAngle,ee=void 0===J?nD.labelsSkipAngle:J,te=e.labelsSkipRadius,ne=void 0===te?nD.labelsSkipRadius:te,re=e.labelsRadiusOffset,oe=void 0===re?nD.labelsRadiusOffset:re,ie=e.labelsTextColor,ae=void 0===ie?nD.labelsTextColor:ie,se=e.isInteractive,ce=void 0===se?nD.isInteractive:se,ue=e.tooltip,de=void 0===ue?nD.tooltip:ue,fe=e.onClick,pe=e.onMouseEnter,he=e.onMouseMove,me=e.onMouseLeave,ge=e.transitionMode,be=void 0===ge?nD.transitionMode:ge,ye=e.legends,ve=void 0===ye?nD.legends:ye,xe=e.role,we=e.ariaLabel,Se=e.ariaLabelledBy,ke=e.ariaDescribedBy,Ce=bk(b,y,v),Me=Ce.margin,Pe=Ce.innerWidth,Te=Ce.innerHeight,Oe=Ce.outerWidth,je=Ce.outerHeight,_e=function(e,t,n){void 0===n&&(n=360);var r=t;return Math.abs(t-e)>n&&(r=e+(t>e?n:-n)),[e,r]}(a,l),De=_e[0],Ee=_e[1],Re=function(e){var t=e.data,n=e.maxValue,r=void 0===n?nD.maxValue:n,o=e.valueFormat,i=e.startAngle,a=void 0===i?tD.startAngle:i,s=e.endAngle,l=void 0===s?tD.endAngle:s,c=e.innerRadiusRatio,u=void 0===c?tD.innerRadius:c,d=e.padding,f=void 0===d?tD.padding:d,p=e.padAngle,h=void 0===p?tD.padAngle:p,m=e.cornerRadius,g=void 0===m?tD.cornerRadius:m,b=e.width,y=e.height,v=e.colors,x=void 0===v?tD.colors:v,w=e.tracksColor,S=void 0===w?tD.tracksColor:w,k=(0,G.useMemo)(function(){return[b/2,y/2]},[b,y]),C=Math.min.apply(Math,k),M=C*Math.min(u,1),P=kT(x,"category"),T=(0,G.useMemo)(function(){var e={serieIds:[],categories:[],groups:[],maxValue:0};return t.forEach(function(t){e.serieIds.push(t.id);var n=0;t.data.forEach(function(t){e.categories.includes(t.x)||e.categories.push(t.x),n+=t.y}),e.groups.push({id:t.id,total:n,data:t.data})}),e.maxValue="auto"===r?Math.max.apply(Math,e.groups.map(function(e){return e.total})):r,e},[t,r]),O=T.serieIds,j=T.categories,_=T.groups,D=T.maxValue,E=(0,G.useMemo)(function(){return dP(LC().domain([0,D]).range([a,l]))},[D,a,l]),R=(0,G.useMemo)(function(){return fP(NC().domain(O).range([M,C]).padding(f))},[O,C,M,f]),A=(0,G.useMemo)(function(){return function(){var e=G_,t=X_,n=$T(0),r=null,o=Q_,i=K_,a=Z_,s=null,l=BO(c);function c(){var c,u,d,f=+e.apply(this,arguments),p=+t.apply(this,arguments),h=o.apply(this,arguments)-Pb,m=i.apply(this,arguments)-Pb,g=bb(m-h),b=m>h;if(s||(s=c=l()),p<f&&(u=p,p=f,f=u),p>Cb)if(g>Tb-Cb)s.moveTo(p*vb(h),p*Sb(h)),s.arc(0,0,p,h,m,!b),f>Cb&&(s.moveTo(f*vb(m),f*Sb(m)),s.arc(0,0,f,m,h,b));else{var y,v,x=h,w=m,S=h,k=m,C=g,M=g,P=a.apply(this,arguments)/2,T=P>Cb&&(r?+r.apply(this,arguments):kb(f*f+p*p)),O=wb(bb(p-f)/2,+n.apply(this,arguments)),j=O,_=O;if(T>Cb){var D=Ob(T/f*Sb(P)),E=Ob(T/p*Sb(P));(C-=2*D)>Cb?(S+=D*=b?1:-1,k-=D):(C=0,S=k=(h+m)/2),(M-=2*E)>Cb?(x+=E*=b?1:-1,w-=E):(M=0,x=w=(h+m)/2)}var R=p*vb(x),A=p*Sb(x),I=f*vb(k),F=f*Sb(k);if(O>Cb){var L,N=p*vb(w),z=p*Sb(w),$=f*vb(S),V=f*Sb(S);if(g<Mb)if(L=function(e,t,n,r,o,i,a,s){var l=n-e,c=r-t,u=a-o,d=s-i,f=d*l-u*c;if(!(f*f<Cb))return[e+(f=(u*(t-i)-d*(e-o))/f)*l,t+f*c]}(R,A,$,V,N,z,I,F)){var B=R-L[0],W=A-L[1],H=N-L[0],q=z-L[1],Y=1/Sb(((d=(B*H+W*q)/(kb(B*B+W*W)*kb(H*H+q*q)))>1?0:d<-1?Mb:Math.acos(d))/2),U=kb(L[0]*L[0]+L[1]*L[1]);j=wb(O,(f-U)/(Y-1)),_=wb(O,(p-U)/(Y+1))}else j=_=0}M>Cb?_>Cb?(y=J_($,V,R,A,p,_,b),v=J_(N,z,I,F,p,_,b),s.moveTo(y.cx+y.x01,y.cy+y.y01),_<O?s.arc(y.cx,y.cy,_,yb(y.y01,y.x01),yb(v.y01,v.x01),!b):(s.arc(y.cx,y.cy,_,yb(y.y01,y.x01),yb(y.y11,y.x11),!b),s.arc(0,0,p,yb(y.cy+y.y11,y.cx+y.x11),yb(v.cy+v.y11,v.cx+v.x11),!b),s.arc(v.cx,v.cy,_,yb(v.y11,v.x11),yb(v.y01,v.x01),!b))):(s.moveTo(R,A),s.arc(0,0,p,x,w,!b)):s.moveTo(R,A),f>Cb&&C>Cb?j>Cb?(y=J_(I,F,N,z,f,-j,b),v=J_(R,A,$,V,f,-j,b),s.lineTo(y.cx+y.x01,y.cy+y.y01),j<O?s.arc(y.cx,y.cy,j,yb(y.y01,y.x01),yb(v.y01,v.x01),!b):(s.arc(y.cx,y.cy,j,yb(y.y01,y.x01),yb(y.y11,y.x11),!b),s.arc(0,0,f,yb(y.cy+y.y11,y.cx+y.x11),yb(v.cy+v.y11,v.cx+v.x11),b),s.arc(v.cx,v.cy,j,yb(v.y11,v.x11),yb(v.y01,v.x01),!b))):s.arc(0,0,f,k,S,b):s.lineTo(I,F)}else s.moveTo(0,0);if(s.closePath(),c)return s=null,c+""||null}return c.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+o.apply(this,arguments)+ +i.apply(this,arguments))/2-Mb/2;return[vb(r)*n,Sb(r)*n]},c.innerRadius=function(t){return arguments.length?(e="function"==typeof t?t:$T(+t),c):e},c.outerRadius=function(e){return arguments.length?(t="function"==typeof e?e:$T(+e),c):t},c.cornerRadius=function(e){return arguments.length?(n="function"==typeof e?e:$T(+e),c):n},c.padRadius=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:$T(+e),c):r},c.startAngle=function(e){return arguments.length?(o="function"==typeof e?e:$T(+e),c):o},c.endAngle=function(e){return arguments.length?(i="function"==typeof e?e:$T(+e),c):i},c.padAngle=function(e){return arguments.length?(a="function"==typeof e?e:$T(+e),c):a},c.context=function(e){return arguments.length?(s=null==e?null:e,c):s},c}().startAngle(function(e){return e.startAngle}).endAngle(function(e){return e.endAngle}).innerRadius(function(e){return e.innerRadius}).outerRadius(function(e){return e.outerRadius}).cornerRadius(g).padAngle(Ak(h))},[g,h]),I=xk(o),F=(0,G.useMemo)(function(){var e=[];return _.forEach(function(t){var n=0,r=R(t.id),o=r+R.bandwidth();t.data.forEach(function(i){var a=n+i.y,s={id:t.id+"."+i.x,data:i,groupId:t.id,category:i.x,value:i.y,formattedValue:I(i.y),color:"",stackedValue:a,arc:{startAngle:Ak(E(n)),endAngle:Ak(E(a)),innerRadius:r,outerRadius:o}};s.color=P(s),n+=i.y,e.push(s)})}),e},[_,R,E,P,I]),L=Ak(a),N=Ak(l),z=(0,G.useMemo)(function(){return TP(R).map(function(e){var t=R(e);return{id:e,color:S,arc:{startAngle:L,endAngle:N,innerRadius:t,outerRadius:t+R.bandwidth()}}})},[R,L,N,S]),$=(0,G.useMemo)(function(){return j.map(function(e){var t=F.find(function(t){return t.category===e}),n=t?t.color:void 0;return{id:e,label:e,color:n}})},[j,F]),V=(0,G.useMemo)(function(){return{center:k,outerRadius:C,innerRadius:M,bars:F,arcGenerator:A,radiusScale:R,valueScale:E}},[k,C,M,F,A,R,E]);return{center:k,outerRadius:C,innerRadius:M,bars:F,arcGenerator:A,radiusScale:R,valueScale:E,tracks:z,legendData:$,customLayerProps:V}}({data:t,maxValue:r,valueFormat:o,startAngle:De,endAngle:Ee,innerRadiusRatio:u,padding:f,padAngle:h,cornerRadius:g,width:Pe,height:Te,colors:z,tracksColor:M}),Ae=Re.center,Ie=Re.innerRadius,Fe=Re.outerRadius,Le=Re.bars,Ne=Re.arcGenerator,ze=Re.radiusScale,$e=Re.valueScale,Ve=Re.tracks,Be=Re.legendData,We=Re.customLayerProps,He={grid:null,tracks:null,bars:null,labels:null,legends:null};w.includes("grid")&&(He.grid=(0,le.jsxs)(G.Fragment,{children:[(0,le.jsx)(q_,{center:Ae,enableRadialGrid:T,enableCircularGrid:j,angleScale:$e,radiusScale:ze,startAngle:De,endAngle:Ee}),D&&(0,le.jsx)(U_,eD({center:Ae,angle:Math.min(De,Ee),scale:ze,ticksPosition:"before"},D)),R&&(0,le.jsx)(U_,eD({center:Ae,angle:Math.max(De,Ee),scale:ze,ticksPosition:"after"},R)),I&&(0,le.jsx)(B_,eD({type:"inner",center:Ae,radius:Ie,startAngle:De,endAngle:Ee,scale:$e},I)),L&&(0,le.jsx)(B_,eD({type:"outer",center:Ae,radius:Fe,startAngle:De,endAngle:Ee,scale:$e},L))]},"grid")),w.includes("tracks")&&k&&(He.tracks=(0,le.jsx)(oD,{center:Ae,tracks:Ve,arcGenerator:Ne,transitionMode:be},"tracks")),w.includes("bars")&&(He.bars=(0,le.jsx)(rD,{center:Ae,bars:Le,borderWidth:q,borderColor:U,arcGenerator:Ne,isInteractive:ce,tooltip:de,onClick:fe,onMouseEnter:pe,onMouseMove:he,onMouseLeave:me,transitionMode:be},"bars")),w.includes("labels")&&Q&&(He.labels=(0,le.jsx)(E_,{center:Ae,data:Le,label:Z,radiusOffset:oe,skipAngle:ee,skipRadius:ne,textColor:ae,transitionMode:be},"labels")),w.includes("legends")&&ve.length>0&&(He.legends=(0,le.jsx)(G.Fragment,{children:ve.map(function(e,t){return(0,le.jsx)(FT,eD({},e,{containerWidth:Pe,containerHeight:Te,data:Be}),t)})},"legends"));var qe=nC(V,Le,W,{dataKey:"data",targetKey:"fill"});return(0,le.jsx)(Wk,{width:Oe,height:je,margin:Me,defs:qe,role:xe,ariaLabel:we,ariaLabelledBy:Se,ariaDescribedBy:ke,children:w.map(function(e,t){var n;return"function"==typeof e?(0,le.jsx)(G.Fragment,{children:(0,G.createElement)(e,We)},t):null!=(n=null==He?void 0:He[e])?n:null})})},sD=function(e){var t=e.isInteractive,n=void 0===t?nD.isInteractive:t,r=e.animate,o=void 0===r?nD.animate:r,i=e.motionConfig,a=void 0===i?nD.motionConfig:i,s=e.theme,l=e.renderWrapper,c=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,iD);return(0,le.jsx)(jk,{animate:o,isInteractive:n,motionConfig:a,renderWrapper:l,theme:s,children:(0,le.jsx)(aD,eD({isInteractive:n},c))})},lD=function(e){return(0,le.jsx)(_k,{children:function(t){var n=t.width,r=t.height;return(0,le.jsx)(sD,eD({width:n,height:r},e))}})},cD=a(7610),uD={};uD.styleTagTransform=Lf(),uD.setAttributes=Rf(),uD.insert=Df().bind(null,"head"),uD.domAPI=jf(),uD.insertStyleElement=If(),Tf()(cD.A,uD),cD.A&&cD.A.locals&&cD.A.locals;var dD=function(e){var t=e.data,n=e.chartConfig,r=e.keys,o=n.theme,i=n.title,a=n.xAxisLabel,s=n.yAxisLabel,l=n.colourThresholds,c=function(e,t,n,r){var o=t[0];return{transformedData:[{id:n,data:[{x:n,y:Number(e[0][o]),tip:n},{x:r,y:100-Number(e[0][o]),tip:r}]}]}}(t,r,a,s),u=c.transformedData,d=jO({theme:o});if(u[0].data[0].y>100||u[0].data[0].y<0||u[0].data[1].y>100||u[0].data[1].y<0)return(0,le.jsx)("div",{children:"Error: Measure must be a percentage"});var f=u[0].data.map(function(e){return{title:e.x}}),p=l?function(e){var t=XO(l,r,e.data);return QO(t,e.value)}:d;return(0,le.jsxs)("div",{className:"dashboard-chart-container",children:[(0,le.jsx)("div",{className:"dashboard-chart",role:"graphics-datachart",children:(0,le.jsx)(lD,{"test-id":"gauge",data:u,valueFormat:">-.2f",startAngle:-90,endAngle:90,maxValue:100,padding:.4,colors:p,cornerRadius:2,margin:{top:20,right:20,bottom:-130,left:0},enableTracks:!1,enableRadialGrid:!1,enableCircularGrid:!1,radialAxisStart:null,circularAxisOuter:null,isInteractive:!0,labelsRadiusOffset:.9,layers:["grid","bars","legends",function(e){var t=e.center;return(0,le.jsx)("g",{transform:"translate(".concat(t[0],", ").concat(t[1]+20,")"),children:(0,le.jsx)("text",{textAnchor:"middle",dominantBaseline:"central",className:"gauge-title",children:i})})}],tooltip:function(e){return(0,le.jsxs)("div",{style:{backgroundColor:"white",padding:8},children:[e.bar.data.tip,": ",e.bar.data.y]})}})}),(0,le.jsx)(_O,{data:f,themeConfig:d})]})};const fD=Ce("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]),pD=Ce("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),hD=Ce("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]),mD=Ce("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]),gD=Ce("check-line",[["path",{d:"M20 4L9 15",key:"1qkx8z"}],["path",{d:"M21 19L3 19",key:"100sma"}],["path",{d:"M9 15L4 10",key:"9zxff7"}]]);function bD(e){return bD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bD(e)}var yD=["className","colourName"],vD=["className","tooltip"],xD=["className"],wD=["className"];function SD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?SD(Object(n),!0).forEach(function(t){CD(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function CD(e,t,n){return(t=function(e){var t=function(e){if("object"!=bD(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=bD(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==bD(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MD(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var PD=function(e){var t=e.className,n=e.colourName,r=MD(e,yD);return(0,le.jsx)("div",kD({className:be()("kpi-card",n&&"kpi-card__hover-".concat(n),t)},r))},TD=function(e){var t=e.className,n=e.tooltip,r=MD(e,vD),o=(0,le.jsx)("div",kD({className:be()("kpi-card-header",t)},r));return n?(0,le.jsx)(Le,{content:n,style:{display:"block"},children:o}):o},OD=function(e){var t=e.className,n=MD(e,xD);return(0,le.jsx)("h3",kD({className:be()("kpi-card-title",t)},n))},jD=function(e){var t=e.className,n=MD(e,wD);return(0,le.jsx)("div",kD({className:be()("kpi-card-content",t)},n))};function _D(e){return _D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_D(e)}function DD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ED(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?DD(Object(n),!0).forEach(function(t){RD(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function RD(e,t,n){return(t=function(e){var t=function(e){if("object"!=_D(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=_D(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==_D(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AD(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ID=function(e){var t,n,r=e.data,o=e.title,i=e.thresholds,a=e.queryMeasures,s=e.showData,l=e.chartQuery,c=r[0].measure,u=r[0].dataLabel,d=r[1]?r[1].measure:void 0,f=r[1]?r[1].dataLabel:void 0,p=void 0!==d,h=function(){if(!i)return null;var e=structuredClone(i);a.forEach(function(t,n){if(t in e){var o=e[t];delete e[t],e[r[n].measure]=o}});for(var t="",n=0,o=Object.keys(e);n<o.length;n++){var s=o[n];c>=Number(s)&&Number(s)>=Number(t)&&(t=s)}return e[t]}(),m=GO[h||""]||"#202020",g=(0,G.useRef)(null),b=(t=(0,G.useState)(1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,n)||function(e,t){if(e){if("string"==typeof e)return AD(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?AD(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),y=b[0],v=b[1];(0,G.useLayoutEffect)(function(){var e=g.current;if(e){var t=function(){var t=e.clientHeight;t<=0||v(Math.min(1,t/60))};t();var n=new ResizeObserver(t);return n.observe(e),function(){return n.disconnect()}}},[]);var x,w,S,k=Boolean(s&&l);return(0,le.jsx)("div",{ref:g,className:"dashboard-kpi",children:(0,le.jsxs)(PD,ED(ED({colourName:h,style:{zoom:y}},k&&{role:"button",tabIndex:0,onClick:function(){return s(l,null!=o?o:"")},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),s(l,null!=o?o:""))},className:be()(k&&"dashboard-kpi-clickable")}),{},{children:[o&&(0,le.jsx)(TD,{tooltip:o,children:(0,le.jsx)(OD,{children:o})}),(0,le.jsxs)(jD,{children:[(0,le.jsx)("div",{className:"dashboard-kpi-metric-number-row",children:(0,le.jsxs)("div",{className:be()("dashboard-kpi-metric-number-and-arrow",!p&&"dashboard-kpi-metric-number-and-arrow--no-comparator"),children:[(0,le.jsx)("div",{className:be()("dashboard-kpi-metric-number","dashboard-kpi-metric-number__".concat(h)),"aria-label":u+" "+c,children:c}),p?(x=c,w=d,S={size:16,color:m},x>w?(0,le.jsx)("div",{className:"dashboard-kpi-metric-arrow arrow-up","aria-hidden":!0,children:(0,le.jsx)(hD,ED({},S))}):x<w?(0,le.jsx)("div",{className:"dashboard-kpi-metric-arrow arrow-down","aria-hidden":!0,children:(0,le.jsx)(mD,ED({},S))}):(0,le.jsx)("div",{className:"dashboard-kpi-metric-arrow on-track","aria-hidden":!0,children:(0,le.jsx)(gD,ED({},S))})):(0,le.jsx)("div",{className:"dashboard-kpi-metric-arrow-placeholder","aria-hidden":!0})]})}),(0,le.jsx)("div",{className:"dashboard-kpi-metric-label",children:u}),p&&(0,le.jsxs)(le.Fragment,{children:[(0,le.jsx)("div",{className:"dashboard-kpi-metric-seperator"}),(0,le.jsx)("div",{className:be()("dashboard-kpi-metric-number","dashboard-kpi-metric-number__".concat(h)),"aria-label":f+" "+d,children:d}),(0,le.jsx)("div",{className:"dashboard-kpi-metric-label",children:f})]})]})]}))})};function FD(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return LD(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?LD(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function LD(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ND=function(e){var t=e.data,n=e.thresholds,r=FD((0,G.useState)(!1),2),o=r[0],i=r[1],a=FD((0,G.useState)(!1),2),s=a[0],l=a[1],c=(0,G.useRef)(null);return(0,G.useEffect)(function(){var e=c.current;if(e){var t=function(){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;i(t>1),l(t+r<n-1)};t(),e.addEventListener("scroll",t);var n=new ResizeObserver(t);return n.observe(e),function(){e.removeEventListener("scroll",t),n.disconnect()}}},[]),t?(0,le.jsxs)("div",{className:"dashboard-infopanel",children:[(0,le.jsx)("div",{className:be()("dashboard-infopanel__scroll-indicator",{"dashboard-infopanel__scroll-indicator--hidden":!o}),onClick:function(){c.current&&c.current.scrollBy({left:-c.current.clientWidth,behavior:"smooth"})},children:(0,le.jsx)(Le,{content:"Scroll left",side:"bottom",children:(0,le.jsx)(fD,{size:20,"aria-hidden":!0})})}),(0,le.jsx)("div",{className:be()("dashboard-infopanel__scroll-indicator dashboard-infopanel__scroll-indicator--right",{"dashboard-infopanel__scroll-indicator--hidden":!s}),onClick:function(){c.current&&c.current.scrollBy({left:c.current.clientWidth,behavior:"smooth"})},children:(0,le.jsx)(Le,{content:"Scroll right",side:"bottom",children:(0,le.jsx)(pD,{size:20,"aria-hidden":!0})})}),(0,le.jsx)("div",{className:"dashboard-infopanel-metrics",ref:c,children:t.map(function(e,t){var r;return(0,le.jsx)(ID,{data:e.data,title:e.title,queryMeasures:e.queryMeasures,thresholds:null!==(r=null==n?void 0:n[e.title])&&void 0!==r?r:{}},t)})})]}):(0,le.jsx)("div",{children:"Error: no data provided"})},zD=function(e,t){return Object.keys(t.measures).length>2&&console.error("More than 2 measures provided for KPI. Only 2 or less are supported."),Object.keys(e).map(function(n){return{dataLabel:t.measures[n]?t.measures[n].title:n,measure:Number(e[n])}})},$D=a(104),VD=a(3181);function BD(){return BD=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},BD.apply(this,arguments)}function WD(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(0,G.memo)(function(e){var t=e.years,n=e.legend,r=e.theme;return(0,le.jsx)(le.Fragment,{children:t.map(function(e){return(0,le.jsx)("text",{transform:"translate("+e.x+","+e.y+") rotate("+e.rotation+")",textAnchor:"middle",style:r.labels.text,children:n(e.year)},e.year)})})}),(0,G.memo)(function(e){var t=e.path,n=e.borderWidth,r=e.borderColor;return(0,le.jsx)("path",{d:t,style:{fill:"none",strokeWidth:n,stroke:r,pointerEvents:"none"}})});var HD,qD=(0,G.memo)(function(e){var t=e.months,n=e.legend,r=e.theme;return(0,le.jsx)(le.Fragment,{children:t.map(function(e){return(0,le.jsx)("text",{transform:"translate("+e.x+","+e.y+") rotate("+e.rotation+")",textAnchor:"middle",style:r.labels.text,children:n(e.year,e.month,e.date)},e.date.toString()+".legend")})})}),YD=((0,G.memo)(function(e){var t=e.data,n=e.x,r=e.y,o=e.size,i=e.color,a=e.borderWidth,s=e.borderColor,l=e.isInteractive,c=e.tooltip,u=e.onMouseEnter,d=e.onMouseMove,f=e.onMouseLeave,p=e.onClick,h=e.formatValue,m=qg(),g=m.showTooltipFromEvent,b=m.hideTooltip,y=(0,G.useCallback)(function(e){if("value"in t){var n=BD({},t,{value:h(t.value),data:BD({},t.data)});g(G.createElement(c,BD({},n)),e),null==u||u(t,e)}},[g,c,t,u,h]),v=(0,G.useCallback)(function(e){if("value"in t){var n=BD({},t,{value:h(t.value),data:BD({},t.data)});g(G.createElement(c,BD({},n)),e),d&&d(t,e)}},[g,c,t,d,h]),x=(0,G.useCallback)(function(e){"value"in t&&(b(),null==f||f(t,e))},[b,t,f]),w=(0,G.useCallback)(function(e){return null==p?void 0:p(t,e)},[t,p]);return(0,le.jsx)("rect",{x:n,y:r,width:o,height:o,style:{fill:i,strokeWidth:a,stroke:s},onMouseEnter:l?y:void 0,onMouseMove:l?v:void 0,onMouseLeave:l?x:void 0,onClick:l?w:void 0})}),(0,G.memo)(function(e){var t=e.value,n=e.day,r=e.color;return void 0===t||isNaN(Number(t))?null:(0,le.jsx)(Lg,{id:n,value:t,color:r,enableChip:!0})})),UD=Dw("%b"),GD={colors:["#61cdbb","#97e3d5","#e8c1a0","#f47560"],align:"center",direction:"horizontal",emptyColor:"#fff",minValue:0,maxValue:"auto",yearSpacing:30,yearLegend:function(e){return e},yearLegendPosition:"before",yearLegendOffset:10,monthBorderWidth:2,monthBorderColor:"#000",monthSpacing:0,monthLegend:function(e,t,n){return UD(n)},monthLegendPosition:"before",monthLegendOffset:10,daySpacing:0,dayBorderWidth:1,dayBorderColor:"#000",isInteractive:!0,legends:[],tooltip:YD},XD=BD({},GD,{role:"img"}),QD=BD({},GD,{pixelRatio:"undefined"!=typeof window&&null!=(HD=window.devicePixelRatio)?HD:1}),KD=BD({},XD,{dayBorderColor:"#fff",dayRadius:0,square:!0,weekdayLegendOffset:75,firstWeekday:"sunday",weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}),ZD=$D(function(e){var t,n=e.date,r=e.cellSize,o=e.yearIndex,i=e.yearSpacing,a=e.monthSpacing,s=e.daySpacing,l=e.direction,c=e.originX,u=e.originY,d=new Date(n.getFullYear(),n.getMonth()+1,0),f=fw.count(Cw(n),n),p=fw.count(Cw(d),d),h=n.getDay(),m=d.getDay(),g=c,b=u,y=o*(7*(r+s)+i),v=n.getMonth()*a;"horizontal"===l?(b+=y,g+=v):(b+=v,g+=y);var x={x:g,y:b,width:0,height:0};return"horizontal"===l?(t=["M"+(g+(f+1)*(r+s))+","+(b+h*(r+s)),"H"+(g+f*(r+s))+"V"+(b+7*(r+s)),"H"+(g+p*(r+s))+"V"+(b+(m+1)*(r+s)),"H"+(g+(p+1)*(r+s))+"V"+b,"H"+(g+(f+1)*(r+s))+"Z"].join(""),x.x=g+f*(r+s),x.width=g+(p+1)*(r+s)-x.x,x.height=7*(r+s)):(t=["M"+(g+h*(r+s))+","+(b+(f+1)*(r+s)),"H"+g+"V"+(b+(p+1)*(r+s)),"H"+(g+(m+1)*(r+s))+"V"+(b+p*(r+s)),"H"+(g+7*(r+s))+"V"+(b+f*(r+s)),"H"+(g+h*(r+s))+"Z"].join(""),x.y=b+f*(r+s),x.width=7*(r+s),x.height=b+(p+1)*(r+s)-x.y),{path:t,bbox:x}},function(e){var t=e.date,n=e.cellSize,r=e.yearIndex,o=e.yearSpacing,i=e.monthSpacing,a=e.daySpacing,s=e.direction,l=e.originX,c=e.originY;return t.toString()+"."+n+"."+r+"."+o+"."+i+"."+a+"."+s+"."+l+"."+c}),JD=Dw("%Y-%m-%d"),eE=function(e){var t=e.data,n=e.minValue,r=e.maxValue,o=e.colors,i=e.colorScale;return(0,G.useMemo)(function(){if(i)return i;var e=function(e,t,n){var r=e.map(function(e){return e.value});return["auto"===t?Math.min.apply(Math,r):t,"auto"===n?Math.max.apply(Math,r):n]}(t,n,r);return sT().domain(e).range(o)},[t,n,r,o,i])},tE=function(e){var t=e.months,n=e.direction,r=e.monthLegendPosition,o=e.monthLegendOffset;return(0,G.useMemo)(function(){return function(e){var t=e.direction,n=e.position,r=e.offset;return e.months.map(function(e){var o=0,i=0,a=0;return"horizontal"===t&&"before"===n?(o=e.bbox.x+e.bbox.width/2,i=e.bbox.y-r):"horizontal"===t&&"after"===n?(o=e.bbox.x+e.bbox.width/2,i=e.bbox.y+e.bbox.height+r):"vertical"===t&&"before"===n?(o=e.bbox.x-r,i=e.bbox.y+e.bbox.height/2,a=-90):(o=e.bbox.x+e.bbox.width+r,i=e.bbox.y+e.bbox.height/2,a=-90),BD({},e,{x:o,y:i,rotation:a})})}({months:t,direction:n,position:r,offset:o})},[t,n,r,o])},nE=Dw("%Y-%m-%d"),rE=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function oE(e){return rE.findIndex(function(t){return t.toLowerCase()===e})}var iE=function(e,t){var n=e.getDay()-oE(t);return[0,1,2,3,4,5,6].slice(n)[0]},aE=(0,G.memo)(function(e){var t=e.data,n=e.x,r=e.ry,o=void 0===r?5:r,i=e.rx,a=void 0===i?5:i,s=e.y,l=e.width,c=e.height,u=e.color,d=e.borderWidth,f=e.borderColor,p=e.isInteractive,h=e.tooltip,m=e.onMouseEnter,g=e.onMouseMove,b=e.onMouseLeave,y=e.onClick,v=e.formatValue,x=qg(),w=x.showTooltipFromEvent,S=x.hideTooltip,k=(0,G.useCallback)(function(e){if("value"in t){var n=BD({},t,{value:v(t.value)});w((0,G.createElement)(h,BD({},n)),e),null==m||m(t,e)}},[w,h,t,m,v]),C=(0,G.useCallback)(function(e){if("value"in t){var n=BD({},t,{value:v(t.value)});w((0,G.createElement)(h,BD({},n)),e),null==g||g(t,e)}},[w,h,t,g,v]),M=(0,G.useCallback)(function(e){"value"in t&&(S(),null==b||b(t,e))},[S,t,b]),P=(0,G.useCallback)(function(e){return null==y?void 0:y(t,e)},[t,y]);return(0,le.jsx)("rect",{x:n,y:s,rx:a,ry:o,width:l,height:c,style:{fill:u,strokeWidth:d,stroke:f},onMouseEnter:p?k:void 0,onMouseMove:p?C:void 0,onMouseLeave:p?M:void 0,onClick:p?P:void 0})}),sE=["isInteractive","renderWrapper","theme"],lE=function(e){var t=e.margin,n=e.width,r=e.height,o=e.square,i=void 0===o?KD.square:o,a=e.colors,s=void 0===a?KD.colors:a,l=e.colorScale,c=e.emptyColor,u=void 0===c?KD.emptyColor:c,d=e.from,f=e.to,p=e.data,h=e.direction,m=void 0===h?KD.direction:h,g=e.minValue,b=void 0===g?KD.minValue:g,y=e.maxValue,v=void 0===y?KD.maxValue:y,x=e.valueFormat,w=e.legendFormat,S=e.monthLegend,k=void 0===S?KD.monthLegend:S,C=e.monthLegendOffset,M=void 0===C?KD.monthLegendOffset:C,P=e.monthLegendPosition,T=void 0===P?KD.monthLegendPosition:P,O=e.weekdayLegendOffset,j=void 0===O?KD.weekdayLegendOffset:O,_=e.weekdayTicks,D=e.weekdays,E=void 0===D?KD.weekdays:D,R=e.dayBorderColor,A=void 0===R?KD.dayBorderColor:R,I=e.dayBorderWidth,F=void 0===I?KD.dayBorderWidth:I,L=e.daySpacing,N=void 0===L?KD.daySpacing:L,z=e.dayRadius,$=void 0===z?KD.dayRadius:z,V=e.isInteractive,B=void 0===V?KD.isInteractive:V,W=e.tooltip,H=void 0===W?KD.tooltip:W,q=e.onClick,Y=e.onMouseEnter,U=e.onMouseLeave,X=e.onMouseMove,Q=e.legends,K=void 0===Q?KD.legends:Q,Z=e.role,J=void 0===Z?KD.role:Z,ee=e.firstWeekday,te=void 0===ee?KD.firstWeekday:ee,ne=bk(n,r,t),re=ne.margin,oe=ne.innerWidth,ie=ne.innerHeight,ae=ne.outerWidth,se=ne.outerHeight,ce=(0,G.useMemo)(function(){return p.map(function(e){return BD({},e,{date:new Date(e.day+"T00:00:00")})}).sort(function(e,t){return e.day.localeCompare(t.day)})},[p]),ue=Ck(),de=eE({data:ce,minValue:b,maxValue:v,colors:s,colorScale:l}),fe=function(e){var t,n,r=e.from,o=e.to,i=e.data;return t=r?aC(r)?r:new Date(r):i[0].date,n=r&&o?aC(o)?o:new Date(o):i[i.length-1].date,t.getDay()+ww.count(t,n)}({from:d,to:f,data:ce}),pe=function(e){var t,n,r=e.daySpacing,o=e.offset,i=e.square,a=e.totalDays,s=e.width,l=e.height;"horizontal"===e.direction?(s-=o,t=7,n=Math.ceil(a/7)):(l-=o,n=7,t=Math.ceil(a/7));var c=(l-r*(t+1))/t,u=(s-r*(n+1))/n,d=Math.min(c,u);return{columns:n,rows:t,cellHeight:i?d:c,cellWidth:i?d:u}}({square:i,offset:j,totalDays:fe,width:oe,height:ie,daySpacing:N,direction:m}),he=pe.cellHeight,me=pe.cellWidth,ge=function(e){var t=e.direction,n=e.colorScale,r=e.emptyColor,o=e.from,i=e.to,a=e.data,s=e.cellWidth,l=e.cellHeight,c=e.daySpacing,u=e.offset,d=e.firstWeekday,f=c,p=c;"horizontal"===t?f+=u:p+=u;var h=o||a[0].date,m=i||a[a.length-1].date,g=aC(h)?h:new Date(h),b=aC(m)?m:new Date(m);return Sw(g,b).map(function(e){return{date:e,day:nE(e)}}).map(function(e){var o=a.find(function(t){return t.day===e.day}),i=function(e){var t=e.startDate,n=e.date,r=e.direction,o=e.firstWeekday,i=function(e){return[fw,pw,hw,mw,gw,bw,yw][oE(e)]}(o),a=i.count(t,n),s=n.getMonth(),l=n.getFullYear(),c=0,u=0;return"horizontal"===r?(c=a,u=iE(n,o)):(c=iE(n,o),u=a),{currentColumn:c,year:l,currentRow:u,firstWeek:a,month:s,date:n}}({startDate:g,date:e.date,direction:t,firstWeekday:d}),u=i.currentColumn,h=i.currentRow,m=i.firstWeek,b=i.year,y=i.month,v=i.date,x={x:f+c*u+s*u,y:p+c*h+l*h};return o?BD({},o,{coordinates:x,firstWeek:m,month:y,year:b,date:v,color:n(o.value),width:s,height:l}):BD({},e,{coordinates:x,firstWeek:m,month:y,year:b,date:v,color:r,width:s,height:l})})}({offset:j,colorScale:de,emptyColor:u,cellHeight:he,cellWidth:me,from:d,to:f,data:ce,direction:m,daySpacing:N,firstWeekday:te}),be=Object.values(function(e){var t=e.direction,n=e.daySpacing,r=e.cellHeight,o=e.cellWidth;return e.days.reduce(function(e,i){if(e.weeks.length===i.firstWeek||!e.weeks.length&&1===i.firstWeek){e.weeks.push(i);var a=i.year+"-"+i.month;if(Object.keys(e.months).includes(a))"horizontal"===t?e.months[a].bbox.width=(i.firstWeek-e.months[a].firstWeek)*(o+n):e.months[a].bbox.height=(i.firstWeek-e.months[a].firstWeek)*(r+n);else{var s={x:0,y:0,width:0,height:0};"horizontal"===t?(s.x=i.coordinates.x-n,s.height=r+n,s.width=o+2*n):(s.y=i.coordinates.y-n,s.height=r+2*n,s.width=o+2*n),e.months[a]={date:i.date,bbox:s,firstWeek:i.firstWeek,month:0,year:0}}}return e},{months:{},weeks:[]})}({daySpacing:N,direction:m,cellHeight:he,cellWidth:me,days:ge}).months),ye=function(e){var t,n,r=e.direction,o=e.daySpacing,i=e.ticks,a=void 0===i?[1,3,5]:i,s=e.arrayOfWeekdays,l=e.cellWidth+o,c=e.cellHeight+o,u=(t=void 0===s?rE:s,n=oE(e.firstWeekday),t.length&&n?(n%=t.length,t.slice(n,t.length).concat(t.slice(0,n))):t);return a.map(function(e){return{value:u[e],rotation:"horizontal"===r?0:-90,y:"horizontal"===r?c*(e+1)-c/3:0,x:"horizontal"===r?0:l*(e+1)-l/3}})}({direction:m,cellHeight:he,cellWidth:me,daySpacing:N,ticks:_,firstWeekday:te,arrayOfWeekdays:E}),ve=tE({months:be,direction:m,monthLegendPosition:T,monthLegendOffset:M}),xe=xk(x),we=xk(w);return(0,le.jsxs)(Wk,{width:ae,height:se,margin:re,role:J,children:[ye.map(function(e){return(0,le.jsx)("text",{transform:"translate("+e.x+","+e.y+") rotate("+e.rotation+")",textAnchor:"left",style:ue.labels.text,children:e.value},e.value+"-"+e.x+"-"+e.y)}),ge.map(function(e){return(0,le.jsx)(aE,{data:e,x:e.coordinates.x,rx:$,y:e.coordinates.y,ry:$,width:me,height:he,color:e.color,borderWidth:F,borderColor:A,onMouseEnter:Y,onMouseLeave:U,onMouseMove:X,isInteractive:B,tooltip:H,onClick:q,formatValue:xe},e.date.toString())}),(0,le.jsx)(qD,{months:ve,legend:k,theme:ue}),K.map(function(e,t){var o=de.ticks(e.itemCount).map(function(e){return{id:e,label:we(e),color:de(e)}});return(0,le.jsx)(FT,BD({},e,{containerWidth:n,containerHeight:r,data:o}),t)})]})},cE=function(e){var t=e.isInteractive,n=void 0===t?KD.isInteractive:t,r=e.renderWrapper,o=e.theme,i=WD(e,sE);return(0,le.jsx)(jk,{isInteractive:n,renderWrapper:r,theme:o,children:(0,le.jsx)(lE,BD({isInteractive:n},i))})},uE=["months","years"],dE=function(e,t,n,r,o,i){var a=Jk(t,e),s=a[0],l=a[1];return n.find(function(e){return"value"in e&&Zk(e.x+i.left-o/2,e.y+i.top-o/2,r+o,r+o,s,l)})};function fE(e){return function(e){if(Array.isArray(e))return pE(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return pE(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pE(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}(0,G.memo)(function(e){var t=e.margin,n=e.width,r=e.height,o=e.pixelRatio,i=void 0===o?QD.pixelRatio:o,a=e.align,s=void 0===a?QD.align:a,l=e.colors,c=void 0===l?QD.colors:l,u=e.colorScale,d=e.data,f=e.direction,p=void 0===f?QD.direction:f,h=e.emptyColor,m=void 0===h?QD.emptyColor:h,g=e.from,b=e.to,y=e.minValue,v=void 0===y?QD.minValue:y,x=e.maxValue,w=void 0===x?QD.maxValue:x,S=e.valueFormat,k=e.legendFormat,C=e.yearLegend,M=void 0===C?QD.yearLegend:C,P=e.yearLegendOffset,T=void 0===P?QD.yearLegendOffset:P,O=e.yearLegendPosition,j=void 0===O?QD.yearLegendPosition:O,_=e.yearSpacing,D=void 0===_?QD.yearSpacing:_,E=e.monthLegend,R=void 0===E?QD.monthLegend:E,A=e.monthLegendOffset,I=void 0===A?QD.monthLegendOffset:A,F=e.monthLegendPosition,L=void 0===F?QD.monthLegendPosition:F,N=e.monthSpacing,z=void 0===N?QD.monthSpacing:N,$=e.dayBorderColor,V=void 0===$?QD.dayBorderColor:$,B=e.dayBorderWidth,W=void 0===B?QD.dayBorderWidth:B,H=e.daySpacing,q=void 0===H?QD.daySpacing:H,Y=e.isInteractive,U=void 0===Y?QD.isInteractive:Y,X=e.tooltip,Q=void 0===X?QD.tooltip:X,K=e.onClick,Z=e.onMouseEnter,J=e.onMouseLeave,ee=e.onMouseMove,te=e.legends,ne=void 0===te?QD.legends:te,re=(0,G.useRef)(null),oe=bk(n,r,t),ie=oe.innerWidth,ae=oe.innerHeight,se=oe.outerWidth,ce=oe.outerHeight,ue=oe.margin,de=function(e){var t=e.width,n=e.height,r=e.from,o=e.to,i=e.direction,a=e.yearSpacing,s=e.monthSpacing,l=e.daySpacing,c=e.align;return(0,G.useMemo)(function(){return function(e){var t,n=e.width,r=e.height,o=e.from,i=e.to,a=e.direction,s=e.yearSpacing,l=e.monthSpacing,c=e.daySpacing,u=e.align,d=aC(o)?o:new Date(o),f=aC(i)?i:new Date(i),p=VD(d.getFullYear(),f.getFullYear()+1),h=Math.max.apply(Math,p.map(function(e){return vw(new Date(e,0,1),new Date(e+1,0,1)).length}))+1,m=function(e){var t,n,r=e.width,o=e.height,i=e.yearRange,a=e.yearSpacing,s=e.monthSpacing,l=e.daySpacing,c=e.maxWeeks;return"horizontal"===e.direction?(t=(r-12*s-l*c)/c,n=(o-(i.length-1)*a-i.length*(8*l))/(7*i.length)):(t=(r-(i.length-1)*a-i.length*(8*l))/(7*i.length),n=(o-12*s-l*c)/c),Math.min(t,n)}({width:n,height:r,direction:a,yearRange:p,yearSpacing:s,monthSpacing:l,daySpacing:c,maxWeeks:h}),g=m*h+c*h+12*l,b=7*(m+c)*p.length+s*(p.length-1),y="horizontal"===a?g:b,v="horizontal"===a?b:g,x=function(e,t,n){var r=t.width-e.width,o=t.height-e.height,i=0,a=0;return"center"===n&&(i=r/2,a=o/2),"top"===n&&(i=r/2),"top-right"===n&&(i=r),"right"===n&&(i=r,a=o/2),"bottom-right"===n&&(i=r,a=o),"bottom"===n&&(i=r/2,a=o),"bottom-left"===n&&(a=o),"left"===n&&(a=o/2),[i,a]}({x:0,y:0,width:y,height:v},{x:0,y:0,width:n,height:r},u),w=x[0],S=x[1];t="horizontal"===a?function(e,t,n,r){return function(o,i,a,s){return{x:o+fw.count(Cw(a),a)*(e+r)+r/2+a.getMonth()*n,y:i+a.getDay()*(e+r)+r/2+s*(t+7*(e+r))}}}(m,s,l,c):function(e,t,n,r){return function(o,i,a,s){var l=fw.count(Cw(a),a);return{x:o+a.getDay()*(e+r)+r/2+s*(t+7*(e+r)),y:i+l*(e+r)+r/2+a.getMonth()*n}}}(m,s,l,c);var k=[],C=[],M=[];return p.forEach(function(e,n){var r=new Date(e,0,1),o=new Date(e+1,0,1);M=M.concat(Sw(r,o).map(function(e){return BD({date:e,day:JD(e),size:m},t(w,S,e,n))}));var i=oP(r,o).map(function(e){return BD({date:e,year:e.getFullYear(),month:e.getMonth()},ZD({originX:w,originY:S,date:e,direction:a,yearIndex:n,yearSpacing:s,monthSpacing:l,daySpacing:c,cellSize:m}))});C=C.concat(i),k.push({year:e,bbox:{x:i[0].bbox.x,y:i[0].bbox.y,width:i[11].bbox.x-i[0].bbox.x+i[11].bbox.width,height:i[11].bbox.y-i[0].bbox.y+i[11].bbox.height}})}),{years:k,months:C,days:M,cellSize:m,calendarWidth:y,calendarHeight:v,originX:w,originY:S}}({width:t,height:n,from:r,to:o,direction:i,yearSpacing:a,monthSpacing:s,daySpacing:l,align:c})},[t,n,r,o,i,a,s,l,c])}({width:ie,height:ae,from:g,to:b,direction:p,yearSpacing:D,monthSpacing:z,daySpacing:q,align:s}),fe=de.months,pe=de.years,he=WD(de,uE),me=eE({data:d,minValue:v,maxValue:w,colors:c,colorScale:u}),ge=tE({months:fe,direction:p,monthLegendPosition:L,monthLegendOffset:I}),be=function(e){var t=e.years,n=e.direction,r=e.yearLegendPosition,o=e.yearLegendOffset;return(0,G.useMemo)(function(){return function(e){var t=e.direction,n=e.position,r=e.offset;return e.years.map(function(e){var o=0,i=0,a=0;return"horizontal"===t&&"before"===n?(o=e.bbox.x-r,i=e.bbox.y+e.bbox.height/2,a=-90):"horizontal"===t&&"after"===n?(o=e.bbox.x+e.bbox.width+r,i=e.bbox.y+e.bbox.height/2,a=-90):"vertical"===t&&"before"===n?(o=e.bbox.x+e.bbox.width/2,i=e.bbox.y-r):(o=e.bbox.x+e.bbox.width/2,i=e.bbox.y+e.bbox.height+r),BD({},e,{x:o,y:i,rotation:a})})}({years:t,direction:n,position:r,offset:o})},[t,n,r,o])}({years:pe,direction:p,yearLegendPosition:j,yearLegendOffset:T}),ye=function(e){var t=e.days,n=e.data,r=e.colorScale,o=e.emptyColor;return(0,G.useMemo)(function(){return function(e){var t=e.data,n=e.colorScale,r=e.emptyColor;return e.days.map(function(e){var o=t.find(function(t){return t.day===e.day});return BD({},e,o?{color:n(o.value),data:o,value:o.value}:{color:r})})}({days:t,data:n,colorScale:r,emptyColor:o})},[t,n,r,o])}({days:he.days,data:d,colorScale:me,emptyColor:m}),ve=(0,G.useState)(null),xe=ve[0],we=ve[1],Se=Ck(),ke=xk(S),Ce=xk(k),Me=qg(),Pe=Me.showTooltipFromEvent,Te=Me.hideTooltip;(0,G.useEffect)(function(){var e;if(re.current){re.current.width=se*i,re.current.height=ce*i;var t=re.current.getContext("2d");t&&(t.scale(i,i),t.fillStyle=Se.background,t.fillRect(0,0,se,ce),t.translate(ue.left,ue.top),ye.forEach(function(e){t.fillStyle=e.color,W>0&&(t.strokeStyle=V,t.lineWidth=W),t.beginPath(),t.rect(e.x,e.y,e.size,e.size),t.fill(),W>0&&t.stroke()}),t.textAlign="center",t.textBaseline="middle",t.fillStyle=null!=(e=Se.labels.text.fill)?e:"",t.font=Se.labels.text.fontSize+"px "+Se.labels.text.fontFamily,ge.forEach(function(e){t.save(),t.translate(e.x,e.y),t.rotate(Ak(e.rotation)),t.fillText(String(R(e.year,e.month,e.date)),0,0),t.restore()}),be.forEach(function(e){t.save(),t.translate(e.x,e.y),t.rotate(Ak(e.rotation)),t.fillText(String(M(e.year)),0,0),t.restore()}),ne.forEach(function(e){var n=me.ticks(e.itemCount).map(function(e){return{id:e,label:Ce(e),color:me(e)}});NT(t,BD({},e,{data:n,containerWidth:ie,containerHeight:ae,theme:Se}))}))}},[re,ae,ie,se,ce,i,ue,ye,V,W,u,M,be,R,ge,ne,Se,Ce,me]);var Oe=(0,G.useCallback)(function(e){if(re.current){var t=dE(e,re.current,ye,ye[0].size,W,ue);if(t){if(we(t),!("value"in t))return;var n=BD({},t,{value:ke(t.value),data:BD({},t.data)});Pe(G.createElement(Q,BD({},n)),e),!xe&&(null==Z||Z(t,e)),null==ee||ee(t,e),xe&&(null==J||J(t,e))}else Te(),t&&(null==J||J(t,e))}},[re,xe,ue,ye,we,ke,W,Pe,Te,Z,ee,J,Q]),je=(0,G.useCallback)(function(){we(null),Te()},[we,Te]),_e=(0,G.useCallback)(function(e){if(K&&re.current){var t=dE(e,re.current,ye,ye[0].size,q,ue);t&&K(t,e)}},[re,q,ue,ye,K]);return(0,le.jsx)("canvas",{ref:re,width:se*i,height:ce*i,style:{width:se,height:ce},onMouseEnter:U?Oe:void 0,onMouseMove:U?Oe:void 0,onMouseLeave:U?je:void 0,onClick:U?_e:void 0})});var hE=function(e){var t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(n,"-").concat(r)};function mE(e,t){let n;return(...r)=>{window.clearTimeout(n),n=window.setTimeout(()=>e(...r),t)}}function gE({debounce:e,scroll:t,polyfill:n,offsetSize:r}={debounce:0,scroll:!1,offsetSize:!1}){const o=n||("undefined"==typeof window?class{}:window.ResizeObserver);if(!o)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[i,a]=(0,G.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),s=(0,G.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:i,orientationHandler:null}),l=e?"number"==typeof e?e:e.scroll:null,c=e?"number"==typeof e?e:e.resize:null,u=(0,G.useRef)(!1);(0,G.useEffect)(()=>(u.current=!0,()=>{u.current=!1}));const[d,f,p]=(0,G.useMemo)(()=>{const e=()=>{if(!s.current.element)return;const{left:e,top:t,width:n,height:o,bottom:i,right:l,x:c,y:d}=s.current.element.getBoundingClientRect(),f={left:e,top:t,width:n,height:o,bottom:i,right:l,x:c,y:d};s.current.element instanceof HTMLElement&&r&&(f.height=s.current.element.offsetHeight,f.width=s.current.element.offsetWidth),Object.freeze(f),u.current&&!vE(s.current.lastBounds,f)&&a(s.current.lastBounds=f)};return[e,c?mE(e,c):e,l?mE(e,l):e]},[a,r,l,c]);function h(){s.current.scrollContainers&&(s.current.scrollContainers.forEach(e=>e.removeEventListener("scroll",p,!0)),s.current.scrollContainers=null),s.current.resizeObserver&&(s.current.resizeObserver.disconnect(),s.current.resizeObserver=null),s.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",s.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",s.current.orientationHandler))}function m(){s.current.element&&(s.current.resizeObserver=new o(p),s.current.resizeObserver.observe(s.current.element),t&&s.current.scrollContainers&&s.current.scrollContainers.forEach(e=>e.addEventListener("scroll",p,{capture:!0,passive:!0})),s.current.orientationHandler=()=>{p()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",s.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",s.current.orientationHandler))}return function(e,t){(0,G.useEffect)(()=>{if(t){const t=e;return window.addEventListener("scroll",t,{capture:!0,passive:!0}),()=>{window.removeEventListener("scroll",t,!0)}}},[e,t])}(p,!!t),function(e){(0,G.useEffect)(()=>{const t=e;return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[e])}(f),(0,G.useEffect)(()=>{h(),m()},[t,p,f]),(0,G.useEffect)(()=>h,[]),[e=>{!e||e===s.current.element||(h(),s.current.element=e,s.current.scrollContainers=bE(e),m())},i,d]}function bE(e){const t=[];if(!e||e===document.body)return t;const{overflow:n,overflowX:r,overflowY:o}=window.getComputedStyle(e);return[n,r,o].some(e=>"auto"===e||"scroll"===e)&&t.push(e),[...t,...bE(e.parentElement)]}const yE=["x","y","top","bottom","left","right","width","height"],vE=(e,t)=>yE.every(n=>e[n]===t[n]);function xE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var wE=function(e){var t,n,r=e.data,o=e.chartConfig,i=e.keys,a=e.indexes,s=e.annotation,l=(t=gE(),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,n)||function(e,t){if(e){if("string"==typeof e)return xE(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xE(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),c=l[0],u=l[1],d=i[0],f=function(e,t,n){var r,o,i=e.map(function(e){return e&&e[t]?new Date(e[t]):null}).filter(function(e){return e instanceof Date&&!isNaN(e.getTime())});if(i.length){var a=new Date(Math.min.apply(Math,fE(i.map(function(e){return e.getTime()})))),s=new Date(Math.max.apply(Math,fE(i.map(function(e){return e.getTime()}))));r=hE(a),o=hE(s)}return{transformedData:e.map(function(e){return{day:e[t],value:null!==e[n]?e[n]:"Empty"}}),startDate:r,endDate:o}}(r,a[0],d),p=f.transformedData,h=f.startDate,m=f.endDate,g=o.colourThresholds,b=Object.keys(g||{}).map(function(e){return{threshold:e,colour:g?GO[g[e]]:GO["grey-system"]}});b.sort(function(e,t){return Number(e.threshold)-Number(t.threshold)});var y=b.map(function(e){return Number(e.threshold)}),v=function(e){return QO(b,e)};return v.ticks=function(){return y},(0,le.jsx)("div",{className:"dashboard-calendar-container",ref:c,children:(0,le.jsx)(cE,{height:u.height,width:u.width,data:p,from:h,to:m,emptyColor:GO["grey-system"],margin:{top:40,right:40,bottom:40,left:40},dayBorderWidth:2,dayBorderColor:"#ffffff",direction:"horizontal",colorScale:v,weekdayTicks:[0,1,2,3,4,5,6],legendFormat:function(e){return String(e)},legends:[{anchor:"bottom",direction:"row",translateY:-40,translateX:-40,itemCount:4,itemWidth:50,itemHeight:36,itemsSpacing:30,itemDirection:"right-to-left"}],tooltip:function(e){var t=e.value,n=e.day,r=new Date(n).toLocaleDateString(void 0,{weekday:"long"}),o=new Date(n).toLocaleDateString();return(0,le.jsxs)("div",{className:"dashboard-calendar-tooltip",children:[(0,le.jsxs)("div",{className:"dashboard-calendar-tooltip-title",children:[r," ","(",o,")"]})," ",(0,le.jsxs)("span",{className:"dashboard-calendar-tooltip-value",children:[(0,le.jsx)("div",{className:"dashboard-calendar-tooltip-icon",style:{backgroundColor:v(t)}}),s.measures[d].title||d,": ",t]})]})}})})},SE=function(e,t){return e.reduce(function(e,n){return e[n[t]]=n,e},{})},kE=function(e){var t=e.dataQuery,n=e.chartQueryKey,r=e.chartType,o=e.chartConfig,i=e.showData,a=qe({queryKey:[n,t],queryFn:function(){return Yf([n,t])},staleTime:3e5}),s=a.data,l=a.isError,c=a.isLoading,u=fe();if(c||u)return(0,le.jsx)("div",{className:"dashboard-item-loading",children:(0,le.jsx)($f,{})});if(l||!s)return(0,le.jsx)("div",{children:"Error fetching data"});var d=structuredClone(s);"annotation"in d&&d.annotation&&(Array.isArray(d.annotation.measures)&&(d.annotation.measures=SE(d.annotation.measures,"name")),Array.isArray(d.annotation.dimensions)&&(d.annotation.dimensions=SE(d.annotation.dimensions,"name")));var f=r.replace(/-(\w)/g,function(e){return e[1].toUpperCase()}),p={bar:function(){try{if(!o)return(0,le.jsx)("div",{children:"Chart config is missing"});var e=d,t=e.query,n=e.annotation,r=e.data;return(0,le.jsx)(tj,{data:r,keys:t.measures,indexes:t.dimensions,annotation:n,chartConfig:o})}catch(e){return(0,le.jsxs)("div",{children:["Error rendering bar chart: ",e.message]})}},line:function(){try{if(!o)return(0,le.jsx)("div",{children:"Chart config is missing"});var e=d,t=e.query,n=e.annotation,r=e.data;return(0,le.jsx)(o_,{data:r,keys:t.measures,indexes:t.dimensions,annotation:n,chartConfig:o})}catch(e){return(0,le.jsxs)("div",{children:["Error rendering line chart: ",e.message]})}},heatMap:function(){try{if(!o)return(0,le.jsx)("div",{children:"Chart config is missing"});var e=d,t=e.query,n=e.annotation,r=e.data;return(0,le.jsx)(C_,{data:r,keys:t.measures,indexes:t.dimensions,annotation:n,chartConfig:o})}catch(e){return(0,le.jsxs)("div",{children:["Error rendering heatmap: ",e.message]})}},gauge:function(){try{if(!o)return(0,le.jsx)("div",{children:"Chart config is missing"});var e=s,t=e.query,n=e.annotation,r=e.data;return(0,le.jsx)(dD,{data:r,keys:t.measures,indexes:t.dimensions,annotation:n,chartConfig:o})}catch(e){return(0,le.jsxs)("div",{children:["Error rendering gauge: ",e.message]})}},headlines:function(){try{var e=function(e){return e.results.map(function(e){e.annotation&&(Array.isArray(e.annotation.measures)&&(e.annotation.measures=SE(e.annotation.measures,"name")),Array.isArray(e.annotation.filters)&&(e.annotation.filters=SE(e.annotation.filters||[],"name")));var t=zD(e.data[0],e.annotation),n="";if(e.query.filters){var r,o=(null===(r=e.annotation)||void 0===r?void 0:r.filters)||{},i=e.query.filters[0].value[0],a=e.query.filters[0].field;n="boolean"==typeof i?o[a]?o[a].title:a:i}return{title:n,data:t,queryMeasures:e.query.measures}})}(s);return(0,le.jsx)(ND,{data:e,thresholds:(null==o?void 0:o.multiQueryColourThresholds)||{}})}catch(e){return(0,le.jsxs)("div",{children:["Error rendering info panel: ",e.message]})}},kpi:function(){try{var e=d,n=e.annotation,r=e.data,a=zD(r[0],n),s=t.params;return(0,le.jsx)(ID,{data:a,title:null==o?void 0:o.title,thresholds:null==o?void 0:o.colourThresholds,queryMeasures:s.measures,showData:i,chartQuery:t})}catch(e){return(0,le.jsxs)("div",{children:["Error rendering KPI: ",e.message]})}},calendar:function(){try{if(!o)return(0,le.jsx)("div",{children:"Chart config is missing"});var e=d,t=e.data,n=e.query,r=e.annotation;return(0,le.jsx)(wE,{data:t,keys:n.measures,indexes:n.dimensions,chartConfig:o,annotation:r})}catch(e){return(0,le.jsxs)("div",{children:["Error rendering calendar: ",e.message]})}}},h=p[f];return h?(0,le.jsx)(h,{}):(0,le.jsxs)("p",{children:["Unknown component type: ",f]})};function CE(e){return function(e){if(Array.isArray(e))return ME(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return ME(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ME(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ME(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var PE=function(e,t){var n=e.map(function(e){var n=null==t?void 0:t.find(function(t){return t.field===e.dimension});return n?{field:n.field,operator:n.operator,value:n.value}:{field:e.dimension,operator:e.currentOperator,value:e.currentValues}});return t?[].concat(CE(t),CE(n.filter(function(e){return!t.some(function(t){return t.field===e.field})}))):n};function TE(e){return TE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},TE(e)}function OE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function jE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?OE(Object(n),!0).forEach(function(t){_E(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OE(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _E(e,t,n){return(t=function(e){var t=function(e){if("object"!=TE(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=TE(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==TE(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||EE(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function EE(e,t){if(e){if("string"==typeof e)return RE(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?RE(e,t):void 0}}function RE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var AE=(0,G.createContext)(void 0),IE=function(e){var t,n=e.item,r=e.editingLayout,o=e.showData,i=e.activeFilters,a=e.queryWithToken,s=e.filtersUrl,l=e.filterValuesQuery,c=qe({queryKey:["chartFilters"],queryFn:function(){return lt(s)}}),u=c.data,d=c.isLoading,f=DE((0,G.useState)(),2),p=f[0],h=f[1],m=DE((0,G.useState)(null),2),g=m[0],b=m[1],y=DE((0,G.useState)([]),2),v=y[0],x=y[1],w=(0,G.useRef)([]),S=n.layout,k=n.chartType,C=n.chartConfig,M=n.query,P=jE({},a),T=M.params,O=null!==(t=null==T?void 0:T.filters)&&void 0!==t?t:[],j={lockedFilters:w.current,filterValuesQuery:l};return(0,G.useEffect)(function(){if(u&&Array.isArray(u.filters)){var e=u.filters.filter(function(e){return O.some(function(t){return t.field===e.dimension})}).map(function(e){var t=O.find(function(t){return t.field===e.dimension});return jE(jE({},e),{},{currentValues:(null==t?void 0:t.value)||[],operator:null==t?void 0:t.operator})});b(u.filters),h(e);var t=u.filters.map(function(t){var n,r,o=e.find(function(e){return e.dimension===t.dimension});return t.active||o?jE(jE({},t),{},{active:!0,currentValues:null!==(n=null==o?void 0:o.currentValues)&&void 0!==n?n:t.currentValues,operators:null!==(r=null==o?void 0:o.operators)&&void 0!==r?r:t.operators}):null}).filter(Boolean);x(t)}},[u]),(0,G.useEffect)(function(){if(i){var e=p?p.filter(function(e){return O.some(function(t){return t.field===e.dimension})||w.current.some(function(t){return t.dimension===e.dimension})}):[],t=g?g.map(function(e){var t=w.current.some(function(t){return t.dimension===e.dimension}),n=i.find(function(t){return t.dimension===e.dimension});return jE(jE({},e),{},{active:!!n,currentValues:t?e.currentValues||[]:(null==n?void 0:n.currentValues)||[],currentOperator:t?e.currentOperator:(null==n?void 0:n.currentOperator)||e.currentOperator})}):null;b(t),h(e),x(t?t.map(function(t){var n,r,o=e.find(function(e){return e.dimension===t.dimension});return t.active||o?jE(jE({},t),{},{active:!0,currentValues:null!==(n=null==o?void 0:o.currentValues)&&void 0!==n?n:t.currentValues,operators:null!==(r=null==o?void 0:o.operators)&&void 0!==r?r:t.operators}):null}).filter(Boolean):[])}},[i]),d?(0,le.jsx)("div",{className:"dashboard-item-loading",children:(0,le.jsx)($f,{})}):(0,le.jsxs)("div",{className:"dashboard-item",children:["headlines"!==k&&(0,le.jsx)(AE.Provider,{value:j,children:(0,le.jsx)(Mf,{title:C.title,titleTooltip:C.titleTooltip,editingLayout:r,showData:o,chartFilters:p,filterChart:function(e){var t=e.filter(function(e){var t=null==i?void 0:i.find(function(t){return t.dimension===e.dimension&&t.active});return!!w.current.some(function(t){return t.dimension===e.dimension})||(t?e.active&&JSON.stringify(e.currentValues)!==JSON.stringify(t.currentValues):e.active)});h(t);var n=e.map(function(e){return t.some(function(t){return t.dimension===e.dimension})?jE(jE({},e),{},{currentValues:[],operator:""}):e});b(n);var r=e.filter(function(e){return e.active});x(r),P&&P.params&&"object"===TE(P.params)&&"filters"in P.params&&(P.params.filters=PE(r,O))},setLockedFilters:function(e){var t,n=w.current.some(function(t){return t.dimension===e.dimension});w.current=n?w.current.filter(function(t){return t.dimension!==e.dimension}):[].concat(function(e){if(Array.isArray(e))return RE(e)}(t=w.current)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||EE(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[e])},lockedFilters:w.current,globalFilters:g,chartQuery:P,activeFilterCount:v.length,systemFilters:O})}),(0,le.jsx)(kE,{dataQuery:a,chartQueryKey:S.i,chartType:k,chartConfig:C,showData:o})]})};function FE(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var l=r&&r.prototype instanceof s?r:s,c=Object.create(l.prototype);return LE(c,"_invoke",function(n,r,o){var i,s,l,c=0,u=o||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return i=t,s=0,l=e,f.n=n,a}};function p(n,r){for(s=n,l=r,t=0;!d&&c&&!o&&t<u.length;t++){var o,i=u[t],p=f.p,h=i[2];n>3?(o=h===r)&&(l=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=n<2&&p<i[1])?(s=0,f.v=r,f.n=i[1]):p<h&&(o=n<3||i[0]>r||r>h)&&(i[4]=n,i[5]=r,f.n=h,s=0))}if(o||n>1)return a;throw d=!0,r}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&p(u,h),s=u,l=h;(t=s<2?e:l)||!d;){i||(s?s<3?(s>1&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(c=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(d=f.n<0)?l:n.call(r,f))!==a)break}catch(t){i=e,s=1,l=t}finally{c=1}}return{value:t,done:d}}}(n,o,i),!0),c}var a={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(LE(t={},r,function(){return this}),t),d=c.prototype=s.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,LE(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,LE(d,"constructor",c),LE(c,"constructor",l),l.displayName="GeneratorFunction",LE(c,o,"GeneratorFunction"),LE(d),LE(d,o,"Generator"),LE(d,r,function(){return this}),LE(d,"toString",function(){return"[object Generator]"}),(FE=function(){return{w:i,m:f}})()}function LE(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}LE=function(e,t,n,r){function i(t,n){LE(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},LE(e,t,n,r)}function NE(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}var zE=function(){var e,t=(e=FE().m(function e(t){var n,r,o,i,a=arguments;return FE().w(function(e){for(;;)switch(e.n){case 0:if(n=a.length>1&&void 0!==a[1]?a[1]:{},r=a.length>2?a[2]:void 0,t){e.n=1;break}throw new Error("Data URL is required to fetch filter values");case 1:return e.n=2,Je(t,n,r);case 2:return o=e.v,i=o.map(function(e){var t=String(e);return"true"===t.toLowerCase()||"false"===t.toLowerCase()?t.charAt(0).toUpperCase()+t.slice(1):t}),e.a(2,i)}},e)}),function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){NE(i,r,o,a,s,"next",e)}function s(e){NE(i,r,o,a,s,"throw",e)}a(void 0)})});return function(e){return t.apply(this,arguments)}}(),$E=Oa({palette:{primary:{main:GO["green-2"]}},components:{MuiMenuItem:{styleOverrides:{root:{fontSize:"var(--font-size-md, 14px)","&&.Mui-selected":{backgroundColor:GO["green-2"],color:"#FFFFFF","&&:hover":{backgroundColor:GO["green-4"]}},"&&:hover":{backgroundColor:"#dfdcdb"}}}},MuiMenu:{styleOverrides:{list:{maxHeight:250,overflowY:"auto"}}},MuiOutlinedInput:{styleOverrides:{root:{"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:GO["green-2"]},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:GO["green-2"]},"&.Mui-error .MuiOutlinedInput-notchedOutline":{borderColor:GO["red-1"]},"&.Mui-error:hover .MuiOutlinedInput-notchedOutline":{borderColor:GO["red-1"]},"&.Mui-error.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:GO["red-1"]}}}},MuiPickersOutlinedInput:{styleOverrides:{root:{"&.Mui-focused .MuiPickersOutlinedInput-notchedOutline":{borderColor:GO["green-2"]},"&:hover .MuiPickersOutlinedInput-notchedOutline":{borderColor:GO["green-2"]},"&.Mui-error .MuiPickersOutlinedInput-notchedOutline":{borderColor:GO["red-1"]},"&.Mui-error:hover .MuiPickersOutlinedInput-notchedOutline":{borderColor:GO["red-1"]},"&.Mui-error.Mui-focused .MuiPickersOutlinedInput-notchedOutline":{borderColor:GO["red-1"]}}}},MuiInputLabel:{styleOverrides:{root:{"&.MuiInputLabel-shrink":{color:GO["green-2"],"&.Mui-focused":{color:GO["green-2"]},"&.Mui-error":{color:GO["red-1"]}}}}},MuiChip:{styleOverrides:{root:{backgroundColor:GO["green-2"],color:"#FFFFFF"}}}}});function VE(e){const{theme:t,name:n,props:r}=e;return t&&t.components&&t.components[n]&&t.components[n].defaultProps?Gn(t.components[n].defaultProps,r):r}function BE(e,t,n,r,o){const[i,a]=G.useState(()=>o&&n?n(e).matches:r?r(e).matches:t);return Kn(()=>{if(!n)return;const t=n(e),r=()=>{a(t.matches)};return r(),t.addEventListener("change",r),()=>{t.removeEventListener("change",r)}},[e,n]),i}const WE={...X}.useSyncExternalStore;function HE(e,t,n,r,o){const i=G.useCallback(()=>t,[t]),a=G.useMemo(()=>{if(o&&n)return()=>n(e).matches;if(null!==r){const{matches:t}=r(e);return()=>t}return i},[i,e,r,o,n]),[s,l]=G.useMemo(()=>{if(null===n)return[i,()=>()=>{}];const t=n(e);return[()=>t.matches,e=>(t.addEventListener("change",e),()=>{t.removeEventListener("change",e)})]},[i,n,e]);return WE(l,s,a)}function qE(e={}){const{themeId:t}=e;return function(e,n={}){let r=Bn();r&&t&&(r=r[t]||r);const o="undefined"!=typeof window&&void 0!==window.matchMedia,{defaultMatches:i=!1,matchMedia:a=(o?window.matchMedia:null),ssrMatchMedia:s=null,noSsr:l=!1}=VE({name:"MuiUseMediaQuery",props:n,theme:r});let c="function"==typeof e?e(r):e;return c=c.replace(/^@media( ?)/m,""),c.includes("print")&&console.warn(["MUI: You have provided a `print` query to the `useMediaQuery` hook.","Using the print media query to modify print styles can lead to unexpected results.","Consider using the `displayPrint` field in the `sx` prop instead.","More information about `displayPrint` on our docs: https://mui.com/system/display/#display-in-print."].join("\n")),(void 0!==WE?HE:BE)(c,i,a,s,l)}}qE();const YE=qE({themeId:zo});function UE({props:e,name:t}){return function({props:e,name:t,defaultTheme:n,themeId:r}){let o=Ro(n);return r&&(o=o[r]||o),VE({theme:o,name:t,props:e})}({props:e,name:t,defaultTheme:Ua,themeId:zo})}var GE=a(5556);const XE=GE.oneOfType([GE.func,GE.object]),QE=(e,t)=>e.length===t.length&&t.every(t=>e.includes(t)),KE=({openTo:e,defaultOpenTo:t,views:n,defaultViews:r})=>{const o=n??r;let i;if(null!=e)i=e;else if(o.includes(t))i=t;else{if(!(o.length>0))throw new Error("MUI X: The `views` prop must contain at least one view.");i=o[0]}return{views:o,openTo:i}},ZE=(e,t,n)=>{let r=t;return r=e.setHours(r,e.getHours(n)),r=e.setMinutes(r,e.getMinutes(n)),r=e.setSeconds(r,e.getSeconds(n)),r=e.setMilliseconds(r,e.getMilliseconds(n)),r},JE=({date:e,disableFuture:t,disablePast:n,maxDate:r,minDate:o,isDateDisabled:i,adapter:a,timezone:s})=>{const l=ZE(a,a.date(void 0,s),e);n&&a.isBefore(o,l)&&(o=l),t&&a.isAfter(r,l)&&(r=l);let c=e,u=e;for(a.isBefore(e,o)&&(c=o,u=null),a.isAfter(e,r)&&(u&&(u=r),c=null);c||u;){if(c&&a.isAfter(c,r)&&(c=null),u&&a.isBefore(u,o)&&(u=null),c){if(!i(c))return c;c=a.addDays(c,1)}if(u){if(!i(u))return u;u=a.addDays(u,-1)}}return null},eR=(e,t,n)=>null!=t&&e.isValid(t)?t:n,tR=(e,t)=>{const n=[e.startOfYear(t)];for(;n.length<12;){const t=n[n.length-1];n.push(e.addMonths(t,1))}return n},nR=(e,t,n)=>"date"===n?e.startOfDay(e.date(void 0,t)):e.date(void 0,t),rR=(e,t)=>{const n=e.setHours(e.date(),"am"===t?2:14);return e.format(n,"meridiem")},oR=["year","month","day"],iR=e=>oR.includes(e),aR=(e,{format:t,views:n},r)=>{if(null!=t)return t;const o=e.formats;return QE(n,["year"])?o.year:QE(n,["month"])?o.month:QE(n,["day"])?o.dayOfMonth:QE(n,["month","year"])?`${o.month} ${o.year}`:QE(n,["day","month"])?`${o.month} ${o.dayOfMonth}`:r?/en/.test(e.getCurrentLocaleCode())?o.normalDateWithWeekday:o.normalDate:o.keyboardDate},sR=(e,t)=>{const n=e.startOfWeek(t);return[0,1,2,3,4,5,6].map(t=>e.addDays(n,t))},lR=["hours","minutes","seconds"],cR=["hours","minutes","seconds","meridiem"],uR=e=>lR.includes(e),dR=e=>cR.includes(e),fR=(e,t,n)=>n&&(e>=12?"pm":"am")!==t?"am"===t?e-12:e+12:e,pR=(e,t)=>3600*t.getHours(e)+60*t.getMinutes(e)+t.getSeconds(e),hR=(e,t)=>(n,r)=>e?t.isAfter(n,r):pR(n,t)>pR(r,t),mR=(e,{format:t,views:n,ampm:r})=>{if(null!=t)return t;const o=e.formats;return QE(n,["hours"])?r?`${o.hours12h} ${o.meridiem}`:o.hours24h:QE(n,["minutes"])?o.minutes:QE(n,["seconds"])?o.seconds:QE(n,["minutes","seconds"])?`${o.minutes}:${o.seconds}`:QE(n,["hours","minutes","seconds"])?r?`${o.hours12h}:${o.minutes}:${o.seconds} ${o.meridiem}`:`${o.hours24h}:${o.minutes}:${o.seconds}`:r?`${o.hours12h}:${o.minutes} ${o.meridiem}`:`${o.hours24h}:${o.minutes}`},gR={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},bR=(e,t,n)=>{if(t===gR.year)return e.startOfYear(n);if(t===gR.month)return e.startOfMonth(n);if(t===gR.day)return e.startOfDay(n);let r=n;return t<gR.minutes&&(r=e.setMinutes(r,0)),t<gR.seconds&&(r=e.setSeconds(r,0)),t<gR.milliseconds&&(r=e.setMilliseconds(r,0)),r},yR=(e,t)=>{const n=e.formatTokenMap[t];if(null==n)throw new Error([`MUI X: The token "${t}" is not supported by the Date and Time Pickers.`,"Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported."].join("\n"));return"string"==typeof n?{type:n,contentType:"meridiem"===n?"letter":"digit",maxLength:void 0}:{type:n.sectionType,contentType:n.contentType,maxLength:n.maxLength}},vR=(e,t)=>{const n=[],r=e.date(void 0,"default"),o=e.startOfWeek(r),i=e.endOfWeek(r);let a=o;for(;e.isBefore(a,i);)n.push(a),a=e.addDays(a,1);return n.map(n=>e.formatByString(n,t))},xR=(e,t,n,r)=>{switch(n){case"month":return tR(e,e.date(void 0,t)).map(t=>e.formatByString(t,r));case"weekDay":return vR(e,r);case"meridiem":{const n=e.date(void 0,t);return[e.startOfDay(n),e.endOfDay(n)].map(t=>e.formatByString(t,r))}default:return[]}},wR=["0","1","2","3","4","5","6","7","8","9"],SR=(e,t)=>{if("0"===t[0])return e;const n=[];let r="";for(let o=0;o<e.length;o+=1){r+=e[o];const i=t.indexOf(r);i>-1&&(n.push(i.toString()),r="")}return n.join("")},kR=(e,t)=>"0"===t[0]?e:e.split("").map(e=>t[Number(e)]).join(""),CR=(e,t)=>{const n=SR(e,t);return" "!==n&&!Number.isNaN(Number(n))},MR=(e,t)=>Number(e).toString().padStart(t,"0"),PR=(e,t,n,r,o)=>{if("day"===o.type&&"digit-with-letter"===o.contentType){const r=e.setDate(n.longestMonth,t);return e.formatByString(r,o.format)}let i=t.toString();return o.hasLeadingZerosInInput&&(i=MR(i,o.maxLength)),kR(i,r)},TR=(e,t,n)=>{let r=e.value||e.placeholder;const o="non-input"===t?e.hasLeadingZerosInFormat:e.hasLeadingZerosInInput;return"non-input"===t&&e.hasLeadingZerosInInput&&!e.hasLeadingZerosInFormat&&(r=Number(SR(r,n)).toString()),["input-rtl","input-ltr"].includes(t)&&"digit"===e.contentType&&!o&&1===r.length&&(r=`${r}`),"input-rtl"===t&&(r=`${r}`),r},OR=(e,t,n,r)=>e.formatByString(e.parse(t,n),r),jR=(e,t)=>4===e.formatByString(e.date(void 0,"system"),t).length,_R=(e,t,n,r)=>{if("digit"!==t)return!1;const o=e.date(void 0,"default");switch(n){case"year":return"dayjs"===e.lib&&"YY"===r||e.formatByString(e.setYear(o,1),r).startsWith("0");case"month":return e.formatByString(e.startOfYear(o),r).length>1;case"day":return e.formatByString(e.startOfMonth(o),r).length>1;case"weekDay":return e.formatByString(e.startOfWeek(o),r).length>1;case"hours":return e.formatByString(e.setHours(o,1),r).length>1;case"minutes":return e.formatByString(e.setMinutes(o,1),r).length>1;case"seconds":return e.formatByString(e.setSeconds(o,1),r).length>1;default:throw new Error("Invalid section type")}},DR={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8,empty:9},ER=(e,t,n,r,o)=>[...n].sort((e,t)=>DR[e.type]-DR[t.type]).reduce((n,r)=>!o||r.modified?((e,t,n,r)=>{switch(t.type){case"year":return e.setYear(r,e.getYear(n));case"month":return e.setMonth(r,e.getMonth(n));case"weekDay":{let r=e.formatByString(n,t.format);t.hasLeadingZerosInInput&&(r=MR(r,t.maxLength));const o=vR(e,t.format),i=o.indexOf(r),a=o.indexOf(t.value)-i;return e.addDays(n,a)}case"day":return e.setDate(r,e.getDate(n));case"meridiem":{const t=e.getHours(n)<12,o=e.getHours(r);return t&&o>=12?e.addHours(r,-12):!t&&o<12?e.addHours(r,12):r}case"hours":return e.setHours(r,e.getHours(n));case"minutes":return e.setMinutes(r,e.getMinutes(n));case"seconds":return e.setSeconds(r,e.getSeconds(n));default:return r}})(e,r,t,n):n,r),RR=(e,t)=>{if(null==e)return null;if("all"===e)return"all";if("string"==typeof e){const n=t.findIndex(t=>t.type===e);return-1===n?null:n}return e},AR=["value","referenceDate"],IR={emptyValue:null,getTodayValue:nR,getInitialReferenceValue:e=>{let{value:t,referenceDate:n}=e,r=il(e,AR);return r.adapter.isValid(t)?t:null!=n?n:(({props:e,adapter:t,granularity:n,timezone:r,getTodayDate:o})=>{let i=o?o():bR(t,n,nR(t,r));null!=e.minDate&&t.isAfterDay(e.minDate,i)&&(i=bR(t,n,e.minDate)),null!=e.maxDate&&t.isBeforeDay(e.maxDate,i)&&(i=bR(t,n,e.maxDate));const a=hR(e.disableIgnoringDatePartForTimeValidation??!1,t);return null!=e.minTime&&a(e.minTime,i)&&(i=bR(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:ZE(t,i,e.minTime))),null!=e.maxTime&&a(i,e.maxTime)&&(i=bR(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:ZE(t,i,e.maxTime))),i})(r)},cleanValue:(e,t)=>e.isValid(t)?t:null,areValuesEqual:(e,t,n)=>!e.isValid(t)&&null!=t&&!e.isValid(n)&&null!=n||e.isEqual(t,n),isSameError:(e,t)=>e===t,hasError:e=>null!=e,defaultErrorState:null,getTimezone:(e,t)=>e.isValid(t)?e.getTimezone(t):null,setTimezone:(e,t,n)=>null==n?null:e.setTimezone(n,t)},FR={updateReferenceValue:(e,t,n)=>e.isValid(t)?t:n,getSectionsFromValue:(e,t)=>t(e),getV7HiddenInputValueFromSections:e=>e.map(e=>`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`).join(""),getV6InputValueFromSections:(e,t,n)=>{const r=e.map(e=>{const r=TR(e,n?"input-rtl":"input-ltr",t);return`${e.startSeparator}${r}${e.endSeparator}`}).join("");return n?`${r}`:r},parseValueStr:(e,t,n)=>n(e.trim(),t),getDateFromSection:e=>e,getDateSectionsFromValue:e=>e,updateDateInValue:(e,t,n)=>n,clearDateSections:e=>e.map(e=>tr({},e,{value:""}))};function LR(e){return ss("MuiTypography",e)}ls("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const NR={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},zR=Xc,$R=Ka("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t[`align${ts(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(gs(({theme:e})=>({margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([e,t])=>"inherit"!==e&&t&&"object"==typeof t).map(([e,t])=>({props:{variant:e},style:t})),...Object.entries(e.palette).filter(bs()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette?.text||{}).filter(([,e])=>"string"==typeof e).map(([t])=>({props:{color:`text${ts(t)}`},style:{color:(e.vars||e).palette.text[t]}})),{props:({ownerState:e})=>"inherit"!==e.align,style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:e})=>e.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:e})=>e.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:e})=>e.paragraph,style:{marginBottom:16}}]}))),VR={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},BR=G.forwardRef(function(e,t){const{color:n,...r}=Za({props:e,name:"MuiTypography"}),o=zR({...r,...!NR[n]&&{color:n}}),{align:i="inherit",className:a,component:s,gutterBottom:l=!1,noWrap:c=!1,paragraph:u=!1,variant:d="body1",variantMapping:f=VR,...p}=o,h={...o,align:i,color:n,className:a,component:s,gutterBottom:l,noWrap:c,paragraph:u,variant:d,variantMapping:f},m=s||(u?"p":f[d]||VR[d])||"span",g=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=e;return Na({root:["root",i,"inherit"!==e.align&&`align${ts(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]},LR,a)})(h);return(0,le.jsx)($R,{as:m,ref:t,className:Un(g.root,a),...p,ownerState:h,style:{..."inherit"!==i&&{"--Typography-textAlign":i},...p.style}})});function WR(e){return ss("MuiPickersToolbar",e)}const HR=ls("MuiPickersToolbar",["root","title","content"]),qR=["localeText"],YR=G.createContext(null),UR=function(e){const{localeText:t}=e,n=il(e,qR),{adapter:r,localeText:o}=G.useContext(YR)??{utils:void 0,adapter:void 0,localeText:void 0},i=UE({props:n,name:"MuiLocalizationProvider"}),{children:a,dateAdapter:s,dateFormats:l,dateLibInstance:c,adapterLocale:u,localeText:d}=i,f=G.useMemo(()=>tr({},d,o,t),[d,o,t]),p=G.useMemo(()=>{if(!s)return r||null;const e=new s({locale:u,formats:l,instance:c});if(!e.isMUIAdapter)throw new Error(["MUI X: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/quickstart/#installation"].join("\n"));return e},[s,u,l,c,r]),h=G.useMemo(()=>p?{minDate:p.date("1900-01-01T00:00:00.000"),maxDate:p.date("2099-12-31T00:00:00.000")}:null,[p]),m=G.useMemo(()=>({utils:p,adapter:p,defaultDates:h,localeText:f}),[h,p,f]);return(0,le.jsx)(YR.Provider,{value:m,children:a})},GR=G.createContext(()=>!0),XR=G.createContext(null);function QR(){return G.useContext(XR)}const KR=G.createContext(null),ZR=()=>{const e=G.useContext(KR);if(null==e)throw new Error("MUI X: The `usePickerContext` hook can only be called inside the context of a Picker component");return e},JR=G.createContext(null),eA=G.createContext({ownerState:{isPickerDisabled:!1,isPickerReadOnly:!1,isPickerValueEmpty:!1,isPickerOpen:!1,pickerVariant:"desktop",pickerOrientation:"portrait"},rootRefObject:{current:null},labelId:void 0,dismissViews:()=>{},hasUIView:!0,getCurrentViewMode:()=>"UI",triggerElement:null,viewContainerRole:null,defaultActionBarActions:[],onPopperExited:void 0});function tA(e){const{contextValue:t,actionsContextValue:n,privateContextValue:r,fieldPrivateContextValue:o,isValidContextValue:i,localeText:a,children:s}=e;return(0,le.jsx)(KR.Provider,{value:t,children:(0,le.jsx)(JR.Provider,{value:n,children:(0,le.jsx)(eA.Provider,{value:r,children:(0,le.jsx)(XR.Provider,{value:o,children:(0,le.jsx)(GR.Provider,{value:i,children:(0,le.jsx)(UR,{localeText:a,children:s})})})})})})}const nA=()=>G.useContext(eA);function rA(){const{ownerState:e}=nA(),t=Hn();return G.useMemo(()=>tr({},e,{toolbarDirection:t?"rtl":"ltr"}),[e,t])}const oA=["children","className","classes","toolbarTitle","hidden","titleId","classes","landscapeDirection"],iA=Ka("div",{name:"MuiPickersToolbar",slot:"Root"})(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:e.spacing(2,3),variants:[{props:{pickerOrientation:"landscape"},style:{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"}}]})),aA=Ka("div",{name:"MuiPickersToolbar",slot:"Content",shouldForwardProp:e=>Va(e)&&"landscapeDirection"!==e})({display:"flex",flexWrap:"wrap",width:"100%",flex:1,justifyContent:"space-between",alignItems:"center",flexDirection:"row",variants:[{props:{pickerOrientation:"landscape"},style:{justifyContent:"flex-start",alignItems:"flex-start",flexDirection:"column"}},{props:{pickerOrientation:"landscape",landscapeDirection:"row"},style:{flexDirection:"row"}}]}),sA=G.forwardRef(function(e,t){const n=UE({props:e,name:"MuiPickersToolbar"}),{children:r,className:o,classes:i,toolbarTitle:a,hidden:s,titleId:l,landscapeDirection:c}=n,u=il(n,oA),d=rA(),f=(e=>Na({root:["root"],title:["title"],content:["content"]},WR,e))(i);return s?null:(0,le.jsxs)(iA,tr({ref:t,className:Un(f.root,o),ownerState:d},u,{children:[(0,le.jsx)(BR,{color:"text.secondary",variant:"overline",id:l,className:f.title,children:a}),(0,le.jsx)(aA,{className:f.content,ownerState:d,landscapeDirection:c,children:r})]}))}),lA={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"Open previous view",openNextView:"Open next view",calendarViewSwitchingButtonAriaLabel:e=>"year"===e?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",startDate:"Start date",startTime:"Start time",endDate:"End date",endTime:"End time",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",nextStepButtonLabel:"Next",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",timeRangePickerToolbarTitle:"Select time range",clockLabelText:(e,t)=>`Select ${e}. ${t?`Selected time is ${t}`:"No time selected"}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,selectViewText:e=>`Select ${e}`,calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:e=>`Week ${e}`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:e=>e?`Choose date, selected date is ${e}`:"Choose date",openTimePickerDialogue:e=>e?`Choose time, selected time is ${e}`:"Choose time",openRangePickerDialogue:e=>e?`Choose range, selected range is ${e}`:"Choose range",fieldClearLabel:"Clear",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:e=>"Y".repeat(e.digitAmount),fieldMonthPlaceholder:e=>"letter"===e.contentType?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:e=>"letter"===e.contentType?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa",year:"Year",month:"Month",day:"Day",weekDay:"Week day",hours:"Hours",minutes:"Minutes",seconds:"Seconds",meridiem:"Meridiem",empty:"Empty"},cA=lA;tr({},lA);const uA=()=>{const e=G.useContext(YR);if(null===e)throw new Error(["MUI X: Can not find the date and time pickers localization context.","It looks like you forgot to wrap your component in LocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package"].join("\n"));if(null===e.adapter)throw new Error(["MUI X: Can not find the date and time pickers adapter from its localization context.","It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider."].join("\n"));const t=G.useMemo(()=>tr({},cA,e.localeText),[e.localeText]);return G.useMemo(()=>tr({},e,{localeText:t}),[e,t])},dA=()=>uA().adapter,fA=()=>uA().localeText;function pA(e){return ss("MuiDatePickerToolbar",e)}ls("MuiDatePickerToolbar",["root","title"]);const hA=["toolbarFormat","toolbarPlaceholder","className","classes"],mA=Ka(sA,{name:"MuiDatePickerToolbar",slot:"Root"})({}),gA=Ka(BR,{name:"MuiDatePickerToolbar",slot:"Title"})({variants:[{props:{pickerOrientation:"landscape"},style:{margin:"auto 16px auto auto"}}]}),bA=G.forwardRef(function(e,t){const n=UE({props:e,name:"MuiDatePickerToolbar"}),{toolbarFormat:r,toolbarPlaceholder:o="––",className:i,classes:a}=n,s=il(n,hA),l=dA(),{value:c,views:u,orientation:d}=ZR(),f=fA(),p=rA(),h=(e=>Na({root:["root"],title:["title"]},pA,e))(a),m=G.useMemo(()=>{if(!l.isValid(c))return o;const e=aR(l,{format:r,views:u},!0);return l.formatByString(c,e)},[c,r,o,l,u]);return(0,le.jsx)(mA,tr({ref:t,toolbarTitle:f.datePickerToolbarTitle,className:Un(h.root,i)},s,{children:(0,le.jsx)(gA,{variant:"h4",align:"landscape"===d?"left":"center",ownerState:p,className:h.title,children:m})}))}),yA=({props:e,value:t,timezone:n,adapter:r})=>{if(null===t)return null;const{shouldDisableDate:o,shouldDisableMonth:i,shouldDisableYear:a,disablePast:s,disableFuture:l,minDate:c,maxDate:u}=e,d=r.date(void 0,n);switch(!0){case!r.isValid(t):return"invalidDate";case Boolean(o&&o(t)):return"shouldDisableDate";case Boolean(i&&i(t)):return"shouldDisableMonth";case Boolean(a&&a(t)):return"shouldDisableYear";case Boolean(l&&r.isAfterDay(t,d)):return"disableFuture";case Boolean(s&&r.isBeforeDay(t,d)):return"disablePast";case Boolean(c&&r.isBeforeDay(t,c)):return"minDate";case Boolean(u&&r.isAfterDay(t,u)):return"maxDate";default:return null}};yA.valueManager=IR;const vA=()=>uA().defaultDates,xA=e=>{const t=dA(),n=G.useRef(void 0);return void 0===n.current&&(n.current=t.date(void 0,e)),n.current};function wA(e){const t=dA(),n=fA();return G.useMemo(()=>{const r=t.isValid(e)?t.format(e,"fullDate"):null;return n.openDatePickerDialogue(r)},[e,n,t])}function SA(e){const t=dA(),n=kA(e);return G.useMemo(()=>tr({},e,n,{format:e.format??t.formats.keyboardDate}),[e,n,t])}function kA(e){const t=dA(),n=vA();return G.useMemo(()=>({disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,minDate:eR(t,e.minDate,n.minDate),maxDate:eR(t,e.maxDate,n.maxDate)}),[e.minDate,e.maxDate,e.disableFuture,e.disablePast,t,n])}function CA(e,t){const n=UE({props:e,name:t}),r=kA(n),o=G.useMemo(()=>null==n.localeText?.toolbarTitle?n.localeText:tr({},n.localeText,{datePickerToolbarTitle:n.localeText.toolbarTitle}),[n.localeText]);return tr({},n,r,{localeText:o},KE({views:n.views,openTo:n.openTo,defaultViews:["year","day"],defaultOpenTo:"day"}),{slots:tr({toolbar:bA},n.slots)})}const MA=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],PA=["disablePast","disableFuture","minTime","maxTime","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],TA=["minDateTime","maxDateTime"],OA=[...MA,...PA,...TA],jA=e=>OA.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{});function _A(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function DA(e){return e instanceof _A(e).Element||e instanceof Element}function EA(e){return e instanceof _A(e).HTMLElement||e instanceof HTMLElement}function RA(e){return"undefined"!=typeof ShadowRoot&&(e instanceof _A(e).ShadowRoot||e instanceof ShadowRoot)}var AA=Math.max,IA=Math.min,FA=Math.round;function LA(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function NA(){return!/^((?!chrome|android).)*safari/i.test(LA())}function zA(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&EA(e)&&(o=e.offsetWidth>0&&FA(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&FA(r.height)/e.offsetHeight||1);var a=(DA(e)?_A(e):window).visualViewport,s=!NA()&&n,l=(r.left+(s&&a?a.offsetLeft:0))/o,c=(r.top+(s&&a?a.offsetTop:0))/i,u=r.width/o,d=r.height/i;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l,x:l,y:c}}function $A(e){var t=_A(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function VA(e){return e?(e.nodeName||"").toLowerCase():null}function BA(e){return((DA(e)?e.ownerDocument:e.document)||window.document).documentElement}function WA(e){return zA(BA(e)).left+$A(e).scrollLeft}function HA(e){return _A(e).getComputedStyle(e)}function qA(e){var t=HA(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function YA(e,t,n){void 0===n&&(n=!1);var r=EA(t),o=EA(t)&&function(e){var t=e.getBoundingClientRect(),n=FA(t.width)/e.offsetWidth||1,r=FA(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),i=BA(t),a=zA(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==VA(t)||qA(i))&&(s=function(e){return e!==_A(e)&&EA(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:$A(e);var t}(t)),EA(t)?((l=zA(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=WA(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function UA(e){var t=zA(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function GA(e){return"html"===VA(e)?e:e.assignedSlot||e.parentNode||(RA(e)?e.host:null)||BA(e)}function XA(e){return["html","body","#document"].indexOf(VA(e))>=0?e.ownerDocument.body:EA(e)&&qA(e)?e:XA(GA(e))}function QA(e,t){var n;void 0===t&&(t=[]);var r=XA(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=_A(r),a=o?[i].concat(i.visualViewport||[],qA(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(QA(GA(a)))}function KA(e){return["table","td","th"].indexOf(VA(e))>=0}function ZA(e){return EA(e)&&"fixed"!==HA(e).position?e.offsetParent:null}function JA(e){for(var t=_A(e),n=ZA(e);n&&KA(n)&&"static"===HA(n).position;)n=ZA(n);return n&&("html"===VA(n)||"body"===VA(n)&&"static"===HA(n).position)?t:n||function(e){var t=/firefox/i.test(LA());if(/Trident/i.test(LA())&&EA(e)&&"fixed"===HA(e).position)return null;var n=GA(e);for(RA(n)&&(n=n.host);EA(n)&&["html","body"].indexOf(VA(n))<0;){var r=HA(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var eI="top",tI="bottom",nI="right",rI="left",oI="auto",iI=[eI,tI,nI,rI],aI="start",sI="end",lI="viewport",cI="popper",uI=iI.reduce(function(e,t){return e.concat([t+"-"+aI,t+"-"+sI])},[]),dI=[].concat(iI,[oI]).reduce(function(e,t){return e.concat([t,t+"-"+aI,t+"-"+sI])},[]),fI=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function pI(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}}),r.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){n.has(e.name)||o(e)}),r}function hI(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}var mI={placement:"bottom",modifiers:[],strategy:"absolute"};function gI(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}function bI(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,i=void 0===o?mI:o;return function(e,t,n){void 0===n&&(n=i);var o={placement:"bottom",orderedModifiers:[],options:Object.assign({},mI,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},a=[],s=!1,l={state:o,setOptions:function(n){var s="function"==typeof n?n(o.options):n;c(),o.options=Object.assign({},i,o.options,s),o.scrollParents={reference:DA(e)?QA(e):e.contextElement?QA(e.contextElement):[],popper:QA(t)};var u,d,f=function(e){var t=pI(e);return fI.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}((u=[].concat(r,o.options.modifiers),d=u.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{}),Object.keys(d).map(function(e){return d[e]})));return o.orderedModifiers=f.filter(function(e){return e.enabled}),o.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,i=e.effect;if("function"==typeof i){var s=i({state:o,name:t,instance:l,options:r});a.push(s||function(){})}}),l.update()},forceUpdate:function(){if(!s){var e=o.elements,t=e.reference,n=e.popper;if(gI(t,n)){o.rects={reference:YA(t,JA(n),"fixed"===o.options.strategy),popper:UA(n)},o.reset=!1,o.placement=o.options.placement,o.orderedModifiers.forEach(function(e){return o.modifiersData[e.name]=Object.assign({},e.data)});for(var r=0;r<o.orderedModifiers.length;r++)if(!0!==o.reset){var i=o.orderedModifiers[r],a=i.fn,c=i.options,u=void 0===c?{}:c,d=i.name;"function"==typeof a&&(o=a({state:o,options:u,name:d,instance:l})||o)}else o.reset=!1,r=-1}}},update:hI(function(){return new Promise(function(e){l.forceUpdate(),e(o)})}),destroy:function(){c(),s=!0}};if(!gI(e,t))return l;function c(){a.forEach(function(e){return e()}),a=[]}return l.setOptions(n).then(function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)}),l}}var yI={passive:!0};const vI={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=void 0===o||o,a=r.resize,s=void 0===a||a,l=_A(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach(function(e){e.addEventListener("scroll",n.update,yI)}),s&&l.addEventListener("resize",n.update,yI),function(){i&&c.forEach(function(e){e.removeEventListener("scroll",n.update,yI)}),s&&l.removeEventListener("resize",n.update,yI)}},data:{}};function xI(e){return e.split("-")[0]}function wI(e){return e.split("-")[1]}function SI(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function kI(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?xI(o):null,a=o?wI(o):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(i){case eI:t={x:s,y:n.y-r.height};break;case tI:t={x:s,y:n.y+n.height};break;case nI:t={x:n.x+n.width,y:l};break;case rI:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=i?SI(i):null;if(null!=c){var u="y"===c?"height":"width";switch(a){case aI:t[c]=t[c]-(n[u]/2-r[u]/2);break;case sI:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}var CI={top:"auto",right:"auto",bottom:"auto",left:"auto"};function MI(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=a.x,p=void 0===f?0:f,h=a.y,m=void 0===h?0:h,g="function"==typeof u?u({x:p,y:m}):{x:p,y:m};p=g.x,m=g.y;var b=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),v=rI,x=eI,w=window;if(c){var S=JA(n),k="clientHeight",C="clientWidth";S===_A(n)&&"static"!==HA(S=BA(n)).position&&"absolute"===s&&(k="scrollHeight",C="scrollWidth"),(o===eI||(o===rI||o===nI)&&i===sI)&&(x=tI,m-=(d&&S===w&&w.visualViewport?w.visualViewport.height:S[k])-r.height,m*=l?1:-1),o!==rI&&(o!==eI&&o!==tI||i!==sI)||(v=nI,p-=(d&&S===w&&w.visualViewport?w.visualViewport.width:S[C])-r.width,p*=l?1:-1)}var M,P=Object.assign({position:s},c&&CI),T=!0===u?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:FA(n*o)/o||0,y:FA(r*o)/o||0}}({x:p,y:m},_A(n)):{x:p,y:m};return p=T.x,m=T.y,l?Object.assign({},P,((M={})[x]=y?"0":"",M[v]=b?"0":"",M.transform=(w.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",M)):Object.assign({},P,((t={})[x]=y?m+"px":"",t[v]=b?p+"px":"",t.transform="",t))}const PI={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,l=void 0===s||s,c={placement:xI(t.placement),variation:wI(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,MI(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,MI(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},TI={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];EA(o)&&VA(o)&&(Object.assign(o.style,n),Object.keys(r).forEach(function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]="",e},{});EA(r)&&VA(r)&&(Object.assign(r.style,i),Object.keys(o).forEach(function(e){r.removeAttribute(e)}))})}},requires:["computeStyles"]},OI={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=dI.reduce(function(e,n){return e[n]=function(e,t,n){var r=xI(e),o=[rI,eI].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[rI,nI].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e},{}),s=a[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}};var jI={left:"right",right:"left",bottom:"top",top:"bottom"};function _I(e){return e.replace(/left|right|bottom|top/g,function(e){return jI[e]})}var DI={start:"end",end:"start"};function EI(e){return e.replace(/start|end/g,function(e){return DI[e]})}function RI(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&RA(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function AI(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function II(e,t,n){return t===lI?AI(function(e,t){var n=_A(e),r=BA(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var c=NA();(c||!c&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+WA(e),y:l}}(e,n)):DA(t)?function(e,t){var n=zA(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):AI(function(e){var t,n=BA(e),r=$A(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=AA(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=AA(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+WA(e),l=-r.scrollTop;return"rtl"===HA(o||n).direction&&(s+=AA(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(BA(e)))}function FI(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function LI(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}function NI(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.strategy,a=void 0===i?e.strategy:i,s=n.boundary,l=void 0===s?"clippingParents":s,c=n.rootBoundary,u=void 0===c?lI:c,d=n.elementContext,f=void 0===d?cI:d,p=n.altBoundary,h=void 0!==p&&p,m=n.padding,g=void 0===m?0:m,b=FI("number"!=typeof g?g:LI(g,iI)),y=f===cI?"reference":cI,v=e.rects.popper,x=e.elements[h?y:f],w=function(e,t,n,r){var o="clippingParents"===t?function(e){var t=QA(GA(e)),n=["absolute","fixed"].indexOf(HA(e).position)>=0&&EA(e)?JA(e):e;return DA(n)?t.filter(function(e){return DA(e)&&RI(e,n)&&"body"!==VA(e)}):[]}(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce(function(t,n){var o=II(e,n,r);return t.top=AA(o.top,t.top),t.right=IA(o.right,t.right),t.bottom=IA(o.bottom,t.bottom),t.left=AA(o.left,t.left),t},II(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}(DA(x)?x:x.contextElement||BA(e.elements.popper),l,u,a),S=zA(e.elements.reference),k=kI({reference:S,element:v,strategy:"absolute",placement:o}),C=AI(Object.assign({},v,k)),M=f===cI?C:S,P={top:w.top-M.top+b.top,bottom:M.bottom-w.bottom+b.bottom,left:w.left-M.left+b.left,right:M.right-w.right+b.right},T=e.modifiersData.offset;if(f===cI&&T){var O=T[o];Object.keys(P).forEach(function(e){var t=[nI,tI].indexOf(e)>=0?1:-1,n=[eI,tI].indexOf(e)>=0?"y":"x";P[e]+=O[n]*t})}return P}const zI={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,h=void 0===p||p,m=n.allowedAutoPlacements,g=t.options.placement,b=xI(g),y=l||(b!==g&&h?function(e){if(xI(e)===oI)return[];var t=_I(e);return[EI(e),t,EI(t)]}(g):[_I(g)]),v=[g].concat(y).reduce(function(e,n){return e.concat(xI(n)===oI?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?dI:l,u=wI(r),d=u?s?uI:uI.filter(function(e){return wI(e)===u}):iI,f=d.filter(function(e){return c.indexOf(e)>=0});0===f.length&&(f=d);var p=f.reduce(function(t,n){return t[n]=NI(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[xI(n)],t},{});return Object.keys(p).sort(function(e,t){return p[e]-p[t]})}(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:m}):n)},[]),x=t.rects.reference,w=t.rects.popper,S=new Map,k=!0,C=v[0],M=0;M<v.length;M++){var P=v[M],T=xI(P),O=wI(P)===aI,j=[eI,tI].indexOf(T)>=0,_=j?"width":"height",D=NI(t,{placement:P,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),E=j?O?nI:rI:O?tI:eI;x[_]>w[_]&&(E=_I(E));var R=_I(E),A=[];if(i&&A.push(D[T]<=0),s&&A.push(D[E]<=0,D[R]<=0),A.every(function(e){return e})){C=P,k=!1;break}S.set(P,A)}if(k)for(var I=function(e){var t=v.find(function(t){var n=S.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return C=t,"break"},F=h?3:1;F>0&&"break"!==I(F);F--);t.placement!==C&&(t.modifiersData[r]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function $I(e,t,n){return AA(e,IA(t,n))}const VI={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0!==a&&a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=void 0===f||f,h=n.tetherOffset,m=void 0===h?0:h,g=NI(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),b=xI(t.placement),y=wI(t.placement),v=!y,x=SI(b),w="x"===x?"y":"x",S=t.modifiersData.popperOffsets,k=t.rects.reference,C=t.rects.popper,M="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,P="number"==typeof M?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),T=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(S){if(i){var j,_="y"===x?eI:rI,D="y"===x?tI:nI,E="y"===x?"height":"width",R=S[x],A=R+g[_],I=R-g[D],F=p?-C[E]/2:0,L=y===aI?k[E]:C[E],N=y===aI?-C[E]:-k[E],z=t.elements.arrow,$=p&&z?UA(z):{width:0,height:0},V=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},B=V[_],W=V[D],H=$I(0,k[E],$[E]),q=v?k[E]/2-F-H-B-P.mainAxis:L-H-B-P.mainAxis,Y=v?-k[E]/2+F+H+W+P.mainAxis:N+H+W+P.mainAxis,U=t.elements.arrow&&JA(t.elements.arrow),G=U?"y"===x?U.clientTop||0:U.clientLeft||0:0,X=null!=(j=null==T?void 0:T[x])?j:0,Q=R+Y-X,K=$I(p?IA(A,R+q-X-G):A,R,p?AA(I,Q):I);S[x]=K,O[x]=K-R}if(s){var Z,J="x"===x?eI:rI,ee="x"===x?tI:nI,te=S[w],ne="y"===w?"height":"width",re=te+g[J],oe=te-g[ee],ie=-1!==[eI,rI].indexOf(b),ae=null!=(Z=null==T?void 0:T[w])?Z:0,se=ie?re:te-k[ne]-C[ne]-ae+P.altAxis,le=ie?te+k[ne]+C[ne]-ae-P.altAxis:oe,ce=p&&ie?function(e,t,n){var r=$I(e,t,n);return r>n?n:r}(se,te,le):$I(p?se:re,te,p?le:oe);S[w]=ce,O[w]=ce-te}t.modifiersData[r]=O}},requiresIfExists:["offset"]},BI={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=xI(n.placement),l=SI(s),c=[rI,nI].indexOf(s)>=0?"height":"width";if(i&&a){var u=function(e,t){return FI("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:LI(e,iI))}(o.padding,n),d=UA(i),f="y"===l?eI:rI,p="y"===l?tI:nI,h=n.rects.reference[c]+n.rects.reference[l]-a[l]-n.rects.popper[c],m=a[l]-n.rects.reference[l],g=JA(i),b=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,y=h/2-m/2,v=u[f],x=b-d[c]-u[p],w=b/2-d[c]/2+y,S=$I(v,w,x),k=l;n.modifiersData[r]=((t={})[k]=S,t.centerOffset=S-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&RI(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function WI(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function HI(e){return[eI,nI,tI,rI].some(function(t){return e[t]>=0})}var qI=bI({defaultModifiers:[vI,{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=kI({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},PI,TI,OI,zI,VI,BI,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=NI(t,{elementContext:"reference"}),s=NI(t,{altBoundary:!0}),l=WI(a,r),c=WI(s,o,i),u=HI(l),d=HI(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}]});function YI(e){return ss("MuiPopper",e)}function UI(e){return"function"==typeof e?e():e}ls("MuiPopper",["root"]);const GI={},XI=G.forwardRef(function(e,t){const{anchorEl:n,children:r,direction:o,disablePortal:i,modifiers:a,open:s,placement:l,popperOptions:c,popperRef:u,slotProps:d={},slots:f={},TransitionProps:p,ownerState:h,...m}=e,g=G.useRef(null),b=js(g,t),y=G.useRef(null),v=js(y,u),x=G.useRef(v);Kn(()=>{x.current=v},[v]),G.useImperativeHandle(u,()=>y.current,[]);const w=function(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(l,o),[S,k]=G.useState(w),[C,M]=G.useState(UI(n));G.useEffect(()=>{y.current&&y.current.forceUpdate()}),G.useEffect(()=>{n&&M(UI(n))},[n]),Kn(()=>{if(!C||!s)return;let e=[{name:"preventOverflow",options:{altBoundary:i}},{name:"flip",options:{altBoundary:i}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:e})=>{k(e.placement)}}];null!=a&&(e=e.concat(a)),c&&null!=c.modifiers&&(e=e.concat(c.modifiers));const t=qI(C,g.current,{placement:w,...c,modifiers:e});return x.current(t),()=>{t.destroy(),x.current(null)}},[C,i,a,s,c,w]);const P={placement:S};null!==p&&(P.TransitionProps=p);const T=(e=>{const{classes:t}=e;return Na({root:["root"]},YI,t)})(e),O=f.root??"div",j=Fs({elementType:O,externalSlotProps:d.root,externalForwardedProps:m,additionalProps:{role:"tooltip",ref:b},ownerState:e,className:T.root});return(0,le.jsx)(O,{...j,children:"function"==typeof r?r(P):r})}),QI=Ka(G.forwardRef(function(e,t){const{anchorEl:n,children:r,container:o,direction:i="ltr",disablePortal:a=!1,keepMounted:s=!1,modifiers:l,open:c,placement:u="bottom",popperOptions:d=GI,popperRef:f,style:p,transition:h=!1,slotProps:m={},slots:g={},...b}=e,[y,v]=G.useState(!0);if(!s&&!c&&(!h||y))return null;let x;if(o)x=o;else if(n){const e=UI(n);x=e&&void 0!==e.nodeType?Ts(e).body:Ts(null).body}const w=c||!s||h&&!y?void 0:"none",S=h?{in:c,onEnter:()=>{v(!1)},onExited:()=>{v(!0)}}:void 0;return(0,le.jsx)(Dl,{disablePortal:a,container:x,children:(0,le.jsx)(XI,{anchorEl:n,direction:i,disablePortal:a,modifiers:l,ref:t,open:h?!y:c,placement:u,popperOptions:d,popperRef:f,slotProps:m,slots:g,...b,style:{position:"fixed",top:0,left:0,display:w,...p},TransitionProps:S,children:r})})}),{name:"MuiPopper",slot:"Root"})({}),KI=G.forwardRef(function(e,t){const n=Hn(),r=Za({props:e,name:"MuiPopper"}),{anchorEl:o,component:i,components:a,componentsProps:s,container:l,disablePortal:c,keepMounted:u,modifiers:d,open:f,placement:p,popperOptions:h,popperRef:m,transition:g,slots:b,slotProps:y,...v}=r,x=b?.root??a?.Root,w={anchorEl:o,container:l,disablePortal:c,keepMounted:u,modifiers:d,open:f,placement:p,popperOptions:h,popperRef:m,transition:g,...v};return(0,le.jsx)(QI,{as:i,direction:n?"rtl":"ltr",slots:{root:x},slotProps:y??s,...w,ref:t})});function ZI(e){return ss("MuiPickerPopper",e)}function JI(e,t){return Array.isArray(t)?t.every(t=>-1!==e.indexOf(t)):-1!==e.indexOf(t)}ls("MuiPickerPopper",["root","paper"]);const eF=(e=document)=>{const t=e.activeElement;return t?t.shadowRoot?eF(t.shadowRoot):t:null},tF=e=>eF(Ts(e)),nF=e=>Array.from(e.children).indexOf(tF(e)),rF="@media (pointer: fine)";function oF(...e){return e.reduce((e,t)=>(Array.isArray(t)?e.push(...t):null!=t&&e.push(t),e),[])}const iF=["PaperComponent","ownerState","children","paperSlotProps","paperClasses","onPaperClick","onPaperTouchStart"],aF=Ka(KI,{name:"MuiPickerPopper",slot:"Root"})(({theme:e})=>({zIndex:e.zIndex.modal})),sF=Ka(ec,{name:"MuiPickerPopper",slot:"Paper"})({outline:0,transformOrigin:"top center",variants:[{props:({popperPlacement:e})=>new Set(["top","top-start","top-end"]).has(e),style:{transformOrigin:"bottom center"}}]}),lF=G.forwardRef((e,t)=>{const{PaperComponent:n,ownerState:r,children:o,paperSlotProps:i,paperClasses:a,onPaperClick:s,onPaperTouchStart:l}=e,c=il(e,iF),u=Fs({elementType:n,externalSlotProps:i,additionalProps:{tabIndex:-1,elevation:8,ref:t},className:a,ownerState:r});return(0,le.jsx)(n,tr({},c,u,{onClick:e=>{s(e),u.onClick?.(e)},onTouchStart:e=>{l(e),u.onTouchStart?.(e)},ownerState:r,children:o}))});function cF(e){const t=UE({props:e,name:"MuiPickerPopper"}),{children:n,placement:r="bottom-start",slots:o,slotProps:i,classes:a}=t,{open:s,popupRef:l,reduceAnimations:c}=ZR(),{ownerState:u,rootRefObject:d}=nA(),{dismissViews:f,getCurrentViewMode:p,onPopperExited:h,triggerElement:m,viewContainerRole:g}=nA();G.useEffect(()=>{function e(e){s&&"Escape"===e.key&&f()}return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[f,s]);const b=G.useRef(null);G.useEffect(()=>{"tooltip"!==g&&"field"!==p()&&(s?b.current=tF(d.current):b.current&&b.current instanceof HTMLElement&&setTimeout(()=>{b.current instanceof HTMLElement&&b.current.focus()}))},[s,g,p,d]);const y=(e=>Na({root:["root"],paper:["paper"]},ZI,e))(a),v=zl(()=>{"tooltip"===g?setTimeout(()=>{d.current?.contains(tF(d.current))||l.current?.contains(tF(l.current))||f()},0):f()}),[x,w,S]=function(e,t){const n=G.useRef(!1),r=G.useRef(!1),o=G.useRef(null),i=G.useRef(!1);G.useEffect(()=>{if(e)return document.addEventListener("mousedown",t,!0),document.addEventListener("touchstart",t,!0),()=>{document.removeEventListener("mousedown",t,!0),document.removeEventListener("touchstart",t,!0),i.current=!1};function t(){i.current=!0}},[e]);const a=zl(e=>{if(!i.current)return;const a=r.current;r.current=!1;const s=Ts(o.current);if(!o.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}(e,s))return;if(n.current)return void(n.current=!1);let l;l=e.composedPath?e.composedPath().indexOf(o.current)>-1:!s.documentElement.contains(e.target)||o.current.contains(e.target),l||a||t(e)}),s=e=>{e.defaultMuiPrevented||(r.current=!0)};return G.useEffect(()=>{if(e){const e=Ts(o.current),t=()=>{n.current=!0};return e.addEventListener("touchstart",a),e.addEventListener("touchmove",t),()=>{e.removeEventListener("touchstart",a),e.removeEventListener("touchmove",t)}}},[e,a]),G.useEffect(()=>{if(e){const e=Ts(o.current);return e.addEventListener("click",a),()=>{e.removeEventListener("click",a),r.current=!1}}},[e,a]),[o,s,s]}(s,v),k=js(G.useRef(null),l),C=js(k,x),M=o?.desktopTransition??c?Il:Ml,P=o?.desktopTrapFocus??jl,T=o?.desktopPaper??sF,O=o?.popper??aF,j=Fs({elementType:O,externalSlotProps:i?.popper,additionalProps:{transition:!0,role:null==g?void 0:g,open:s,placement:r,anchorEl:m,onKeyDown:e=>{"Escape"===e.key&&(e.stopPropagation(),f())}},className:y.root,ownerState:u}),_=G.useMemo(()=>tr({},u,{popperPlacement:j.placement}),[u,j.placement]);return(0,le.jsx)(O,tr({},j,{children:({TransitionProps:e})=>(0,le.jsx)(P,tr({open:s,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:"tooltip"===g,isEnabled:()=>!0},i?.desktopTrapFocus,{children:(0,le.jsx)(M,tr({},e,i?.desktopTransition,{onExited:t=>{h?.(),i?.desktopTransition?.onExited?.(t),e?.onExited?.()},children:(0,le.jsx)(lF,{PaperComponent:T,ownerState:_,ref:C,onPaperClick:w,onPaperTouchStart:S,paperClasses:y.paper,paperSlotProps:i?.desktopPaper,children:n})}))}))}))}const uF="undefined"!=typeof navigator&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),dF=uF&&uF[1]?parseInt(uF[1],10):null,fF=uF&&uF[2]?parseInt(uF[2],10):null,pF=dF&&dF<10||fF&&fF<13||!1;function hF(e){const t=YE("@media (prefers-reduced-motion: reduce)",{defaultMatches:!1});return null!=e?e:t||pF}const mF={hasNextStep:!1,hasSeveralSteps:!1,goToNextStep:()=>{},areViewsInSameStep:()=>!0};function gF({onChange:e,onViewChange:t,openTo:n,view:r,views:o,autoFocus:i,focusedView:a,onFocusedViewChange:s,getStepNavigation:l}){const c=G.useRef(n),u=G.useRef(o),d=G.useRef(o.includes(n)?n:o[0]),[f,p]=Pc({name:"useViews",state:"view",controlled:r,default:d.current}),h=G.useRef(i?f:null),[m,g]=Pc({name:"useViews",state:"focusedView",controlled:a,default:h.current}),b=l?l({setView:p,view:f,defaultView:d.current,views:o}):mF;G.useEffect(()=>{(c.current&&c.current!==n||u.current&&u.current.some(e=>!o.includes(e)))&&(p(o.includes(n)?n:o[0]),u.current=o,c.current=n)},[n,p,f,o]);const y=o.indexOf(f),v=o[y-1]??null,x=o[y+1]??null,w=zl((e,t)=>{g(t?e:t=>e===t?null:t),s?.(e,t)}),S=zl(e=>{w(e,!0),e!==f&&(p(e),t&&t(e))}),k=zl(()=>{x&&S(x)}),C=zl((t,n,r)=>{const i="finish"===n,a=r?o.indexOf(r)<o.length-1:Boolean(x);e(t,i&&a?"partial":n,r);let s=null;if(null!=r&&r!==f?s=r:i&&(s=f),null==s)return;const l=o[o.indexOf(s)+1];null!=l&&b.areViewsInSameStep(s,l)&&S(l)});return tr({},b,{view:f,setView:S,focusedView:m,setFocusedView:w,nextView:x,previousView:v,defaultView:o.includes(n)?n:o[0],goToNextView:k,setValueAndGoToNextView:C})}function bF(){return"undefined"==typeof window?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?90===Math.abs(window.screen.orientation.angle)?"landscape":"portrait":window.orientation&&90===Math.abs(Number(window.orientation))?"landscape":"portrait"}const yF=({name:e,timezone:t,value:n,defaultValue:r,referenceDate:o,onChange:i,valueManager:a})=>{const s=dA(),[l,c]=Pc({name:e,state:"value",controlled:n,default:r??a.emptyValue}),u=G.useMemo(()=>a.getTimezone(s,l),[s,a,l]),d=zl(e=>null==u?e:a.setTimezone(s,u,e)),f=G.useMemo(()=>t||u||(o?s.getTimezone(Array.isArray(o)?o[0]:o):"default"),[t,u,o,s]);return{value:G.useMemo(()=>a.setTimezone(s,f,l),[a,s,f,l]),handleValueChange:zl((e,...t)=>{const n=d(e);c(n),i?.(n,...t)}),timezone:f}};function vF(e){const{props:t,validator:n,value:r,timezone:o,onError:i}=e,a=dA(),s=G.useRef(n.valueManager.defaultErrorState),l=n({adapter:a,value:r,timezone:o,props:t}),c=n.valueManager.hasError(l);G.useEffect(()=>{i&&!n.valueManager.isSameError(l,s.current)&&i(l,r),s.current=l},[n,i,l,r]);const u=zl(e=>n({adapter:a,value:e,timezone:o,props:t}));return{validationError:l,hasValidationError:c,getValidationErrorForNewValue:u}}const xF=["className","sx"],wF=({ref:e,props:t,valueManager:n,valueType:r,variant:o,validator:i,onPopperExited:a,autoFocusView:s,rendererInterceptor:l,localeText:c,viewContainerRole:u,getStepNavigation:d})=>{const{views:f,view:p,openTo:h,onViewChange:m,viewRenderers:g,reduceAnimations:b,orientation:y,disableOpenPicker:v,closeOnSelect:x,disabled:w,readOnly:S,formatDensity:k,enableAccessibleFieldDOMStructure:C,selectedSections:M,onSelectedSectionsChange:P,format:T,label:O,autoFocus:j,name:_}=t,{className:D,sx:E}=t,R=il(t,xF),A=er(),I=dA(),F=hF(b),L=function(e,t){const[n,r]=G.useState(bF);return Kn(()=>{const e=()=>{r(bF())};return window.addEventListener("orientationchange",e),()=>{window.removeEventListener("orientationchange",e)}},[]),JI(e,["hours","minutes","seconds"])?"portrait":t??n}(f,y),{current:N}=G.useRef(h??null),[z,$]=G.useState(null),V=G.useRef(null),B=G.useRef(null),W=G.useRef(null),H=js(e,W),{timezone:q,state:Y,setOpen:U,setValue:X,setValueFromView:Q,value:K,viewValue:Z}=function(e){const{props:t,valueManager:n,validator:r}=e,{value:o,defaultValue:i,onChange:a,referenceDate:s,timezone:l,onAccept:c,closeOnSelect:u,open:d,onOpen:f,onClose:p}=t,{current:h}=G.useRef(i),{current:m}=G.useRef(void 0!==o),{current:g}=G.useRef(void 0!==d),b=dA(),{timezone:y,value:v,handleValueChange:x}=yF({name:"a picker component",timezone:l,value:o,defaultValue:h,referenceDate:s,onChange:a,valueManager:n}),[w,S]=G.useState(()=>({open:!1,lastExternalValue:v,clockShallowValue:void 0,lastCommittedValue:v,hasBeenModifiedSinceMount:!1})),{getValidationErrorForNewValue:k}=vF({props:t,validator:r,timezone:y,value:v,onError:t.onError}),C=zl(e=>{const t="function"==typeof e?e(w.open):e;g||S(e=>tr({},e,{open:t})),t&&f&&f(),t||p?.()}),M=zl((e,t)=>{const{changeImportance:r="accept",skipPublicationIfPristine:o=!1,validationError:i,shortcut:a,source:s,shouldClose:l="accept"===r}=t??{};let u,d;o||m||w.hasBeenModifiedSinceMount?(u=!n.areValuesEqual(b,e,v),d="accept"===r&&!n.areValuesEqual(b,e,w.lastCommittedValue)):(u=!0,d="accept"===r),S(t=>tr({},t,{clockShallowValue:u?void 0:t.clockShallowValue,lastCommittedValue:d?e:t.lastCommittedValue,hasBeenModifiedSinceMount:!0}));let f=null;const p=()=>{if(!f){let t;t=s||(a?"view":"unknown"),f={validationError:null==i?k(e):i,source:t},a&&(f.shortcut=a)}return f};u&&x(e,p()),d&&c&&c(e,p()),l&&C(!1)});v!==w.lastExternalValue&&S(e=>tr({},e,{lastExternalValue:v,clockShallowValue:void 0,hasBeenModifiedSinceMount:!0}));const P=zl((e,t="partial")=>{"shallow"!==t?M(e,{changeImportance:"finish"===t&&u?"accept":"set",source:"view"}):S(t=>tr({},t,{clockShallowValue:e,hasBeenModifiedSinceMount:!0}))});G.useEffect(()=>{if(g){if(void 0===d)throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");S(e=>tr({},e,{open:d}))}},[g,d]);const T=G.useMemo(()=>n.cleanValue(b,void 0===w.clockShallowValue?v:w.clockShallowValue),[b,n,w.clockShallowValue,v]);return{timezone:y,state:w,setValue:M,setValueFromView:P,setOpen:C,value:v,viewValue:T}}({props:t,valueManager:n,validator:i}),{view:J,setView:ee,defaultView:te,focusedView:ne,setFocusedView:re,setValueAndGoToNextView:oe,goToNextStep:ie,hasNextStep:ae,hasSeveralSteps:se}=gF({view:p,views:f,openTo:h,onChange:Q,onViewChange:m,autoFocus:s,getStepNavigation:d}),ce=zl(()=>X(n.emptyValue,{source:"view"})),ue=zl(()=>X(n.getTodayValue(I,q,r),{source:"view"})),de=zl(()=>X(K,{source:"view"})),fe=zl(()=>X(Y.lastCommittedValue,{skipPublicationIfPristine:!0,source:"view"})),pe=zl(()=>{X(K,{skipPublicationIfPristine:!0,source:"view"})}),{hasUIView:he,viewModeLookup:me,timeViewsCount:ge}=G.useMemo(()=>f.reduce((e,t)=>{const n=null==g[t]?"field":"UI";return e.viewModeLookup[t]=n,"UI"===n&&(e.hasUIView=!0,uR(t)&&(e.timeViewsCount+=1)),e},{hasUIView:!1,viewModeLookup:{},timeViewsCount:0}),[g,f]),be=me[J],ye=zl(()=>be),[ve,xe]=G.useState("UI"===be?J:null);ve!==J&&"UI"===me[J]&&xe(J),Kn(()=>{"field"===be&&Y.open&&(U(!1),setTimeout(()=>{B?.current?.setSelectedSections(J),B?.current?.focusField(J)}))},[J]),Kn(()=>{if(!Y.open)return;let e=J;"field"===be&&null!=ve&&(e=ve),e!==te&&"UI"===me[e]&&"UI"===me[te]&&(e=te),e!==J&&ee(e),re(e,!0)},[Y.open]);const we=G.useMemo(()=>({isPickerValueEmpty:n.areValuesEqual(I,K,n.emptyValue),isPickerOpen:Y.open,isPickerDisabled:t.disabled??!1,isPickerReadOnly:t.readOnly??!1,pickerOrientation:L,pickerVariant:o}),[I,n,K,Y.open,L,o,t.disabled,t.readOnly]),Se=G.useMemo(()=>v||!he?"hidden":w||S?"disabled":"enabled",[v,he,w,S]),ke=zl(ie),Ce=G.useMemo(()=>x&&!se?[]:["cancel","nextOrAccept"],[x,se]),Me=G.useMemo(()=>({setValue:X,setOpen:U,clearValue:ce,setValueToToday:ue,acceptValueChanges:de,cancelValueChanges:fe,setView:ee,goToNextStep:ke}),[X,U,ce,ue,de,fe,ee,ke]),Pe=G.useMemo(()=>tr({},Me,{value:K,timezone:q,open:Y.open,views:f,view:ve,initialView:N,disabled:w??!1,readOnly:S??!1,autoFocus:j??!1,variant:o,orientation:L,popupRef:V,reduceAnimations:F,triggerRef:$,triggerStatus:Se,hasNextStep:ae,fieldFormat:T??"",name:_,label:O,rootSx:E,rootRef:H,rootClassName:D}),[Me,K,H,o,L,F,w,S,T,D,_,O,E,Se,ae,q,Y.open,ve,f,N,j]),Te=G.useMemo(()=>({dismissViews:pe,ownerState:we,hasUIView:he,getCurrentViewMode:ye,rootRefObject:W,labelId:A,triggerElement:z,viewContainerRole:u,defaultActionBarActions:Ce,onPopperExited:a}),[pe,we,he,ye,A,z,u,Ce,a]),Oe=G.useMemo(()=>({formatDensity:k,enableAccessibleFieldDOMStructure:C,selectedSections:M,onSelectedSectionsChange:P,fieldRef:B}),[k,C,M,P,B]);return{providerProps:{localeText:c,contextValue:Pe,privateContextValue:Te,actionsContextValue:Me,fieldPrivateContextValue:Oe,isValidContextValue:e=>{const r=i({adapter:I,value:e,timezone:q,props:t});return!n.hasError(r)}},renderCurrentView:()=>{if(null==ve)return null;const e=g[ve];if(null==e)return null;const t=tr({},R,{views:f,timezone:q,value:Z,onChange:oe,view:ve,onViewChange:ee,showViewSwitcher:ge>1,timeViewsCount:ge},"tooltip"===u?{focusedView:null,onFocusedViewChange:()=>{}}:{focusedView:ne,onFocusedViewChange:re});return l?(0,le.jsx)(l,{viewRenderers:g,popperView:ve,rendererProps:t}):e(t)},ownerState:we}};function SF(e){return ss("MuiPickersLayout",e)}const kF=ls("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","tabs","shortcuts"]),CF=er;function MF(e){return ss("MuiCircularProgress",e)}ls("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","track","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const PF=44,TF=br`
|
|
75
|
+
`,Qu=G.forwardRef(function(e,t){const n=Za({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:o={},className:i,...a}=n,[s,l]=G.useState([]),c=G.useRef(0),u=G.useRef(null);G.useEffect(()=>{u.current&&(u.current(),u.current=null)},[s]);const d=G.useRef(!1),f=ol(),p=G.useRef(null),h=G.useRef(null),m=G.useCallback(e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:i,cb:a}=e;l(e=>[...e,(0,le.jsx)(Xu,{classes:{ripple:Un(o.ripple,Hu.ripple),rippleVisible:Un(o.rippleVisible,Hu.rippleVisible),ripplePulsate:Un(o.ripplePulsate,Hu.ripplePulsate),child:Un(o.child,Hu.child),childLeaving:Un(o.childLeaving,Hu.childLeaving),childPulsate:Un(o.childPulsate,Hu.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i},c.current)]),c.current+=1,u.current=a},[o]),g=G.useCallback((e={},t={},n=()=>{})=>{const{pulsate:o=!1,center:i=r||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===e?.type&&d.current)return void(d.current=!1);"touchstart"===e?.type&&(d.current=!0);const s=a?null:h.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,g;if(i||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(i)g=Math.sqrt((2*l.width**2+l.height**2)/3),g%2==0&&(g+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;g=Math.sqrt(e**2+t**2)}e?.touches?null===p.current&&(p.current=()=>{m({pulsate:o,rippleX:c,rippleY:u,rippleSize:g,cb:n})},f.start(80,()=>{p.current&&(p.current(),p.current=null)})):m({pulsate:o,rippleX:c,rippleY:u,rippleSize:g,cb:n})},[r,m,f]),b=G.useCallback(()=>{g({},{pulsate:!0})},[g]),y=G.useCallback((e,t)=>{if(f.clear(),"touchend"===e?.type&&p.current)return p.current(),p.current=null,void f.start(0,()=>{y(e,t)});p.current=null,l(e=>e.length>0?e.slice(1):e),u.current=t},[f]);return G.useImperativeHandle(t,()=>({pulsate:b,start:g,stop:y}),[b,g,y]),(0,le.jsx)(Gu,{className:Un(Hu.root,o.root,i),ref:h,...a,children:(0,le.jsx)(Wu,{component:null,exit:!0,children:s})})}),Ku=Qu;function Zu(e){return ss("MuiButtonBase",e)}const Ju=ls("MuiButtonBase",["root","disabled","focusVisible"]),ed=Ka("button",{name:"MuiButtonBase",slot:"Root"})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Ju.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}});function td(e,t,n,r=!1){return Fu(o=>(n&&n(o),r||e[t](o),!0))}const nd=G.forwardRef(function(e,t){const n=Za({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:o=!1,children:i,className:a,component:s="button",disabled:l=!1,disableRipple:c=!1,disableTouchRipple:u=!1,focusRipple:d=!1,focusVisibleClassName:f,LinkComponent:p="a",onBlur:h,onClick:m,onContextMenu:g,onDragLeave:b,onFocus:y,onFocusVisible:v,onKeyDown:x,onKeyUp:w,onMouseDown:S,onMouseLeave:k,onMouseUp:C,onTouchEnd:M,onTouchMove:P,onTouchStart:T,tabIndex:O=0,TouchRippleProps:j,touchRippleRef:_,type:D,...E}=n,R=G.useRef(null),A=Lu.use(),I=Ws(A.ref,_),[F,L]=G.useState(!1);l&&F&&L(!1),G.useImperativeHandle(r,()=>({focusVisible:()=>{L(!0),R.current.focus()}}),[]);const N=A.shouldMount&&!c&&!l;G.useEffect(()=>{F&&d&&!c&&A.pulsate()},[c,d,F,A]);const z=td(A,"start",S,u),$=td(A,"stop",g,u),V=td(A,"stop",b,u),B=td(A,"stop",C,u),W=td(A,"stop",e=>{F&&e.preventDefault(),k&&k(e)},u),H=td(A,"start",T,u),q=td(A,"stop",M,u),Y=td(A,"stop",P,u),U=td(A,"stop",e=>{Iu(e.target)||L(!1),h&&h(e)},!1),X=Fu(e=>{R.current||(R.current=e.currentTarget),Iu(e.target)&&(L(!0),v&&v(e)),y&&y(e)}),Q=()=>{const e=R.current;return s&&"button"!==s&&!("A"===e.tagName&&e.href)},K=Fu(e=>{d&&!e.repeat&&F&&" "===e.key&&A.stop(e,()=>{A.start(e)}),e.target===e.currentTarget&&Q()&&" "===e.key&&e.preventDefault(),x&&x(e),e.target===e.currentTarget&&Q()&&"Enter"===e.key&&!l&&(e.preventDefault(),m&&m(e))}),Z=Fu(e=>{d&&" "===e.key&&F&&!e.defaultPrevented&&A.stop(e,()=>{A.pulsate(e)}),w&&w(e),m&&e.target===e.currentTarget&&Q()&&" "===e.key&&!e.defaultPrevented&&m(e)});let J=s;"button"===J&&(E.href||E.to)&&(J=p);const ee={};"button"===J?(ee.type=void 0===D?"button":D,ee.disabled=l):(E.href||E.to||(ee.role="button"),l&&(ee["aria-disabled"]=l));const te=Ws(t,R),ne={...n,centerRipple:o,component:s,disabled:l,disableRipple:c,disableTouchRipple:u,focusRipple:d,tabIndex:O,focusVisible:F},re=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i=Na({root:["root",t&&"disabled",n&&"focusVisible"]},Zu,o);return n&&r&&(i.root+=` ${r}`),i})(ne);return(0,le.jsxs)(ed,{as:J,className:Un(re.root,a),ownerState:ne,onBlur:U,onClick:m,onContextMenu:$,onFocus:X,onKeyDown:K,onKeyUp:Z,onMouseDown:z,onMouseLeave:W,onMouseUp:B,onDragLeave:V,onTouchEnd:q,onTouchMove:Y,onTouchStart:H,ref:te,tabIndex:l?-1:O,type:D,...ee,...E,children:[i,N?(0,le.jsx)(Ku,{ref:I,center:o,...j}):null]})});function rd(e){return ss("MuiDivider",e)}const od=ls("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),id=ls("MuiListItemIcon",["root","alignItemsFlexStart"]),ad=ls("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function sd(e){return ss("MuiMenuItem",e)}const ld=ls("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),cd=Ka(nd,{shouldForwardProp:e=>Xa(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})(gs(({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${ld.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${ld.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${ld.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},[`&.${ld.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${ld.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${od.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${od.inset}`]:{marginLeft:52},[`& .${ad.root}`]:{marginTop:0,marginBottom:0},[`& .${ad.inset}`]:{paddingLeft:36},[`& .${id.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>!e.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${id.root} svg`]:{fontSize:"1.25rem"}}}]}))),ud=G.forwardRef(function(e,t){const n=Za({props:e,name:"MuiMenuItem"}),{autoFocus:r=!1,component:o="li",dense:i=!1,divider:a=!1,disableGutters:s=!1,focusVisibleClassName:l,role:c="menuitem",tabIndex:u,className:d,...f}=n,p=G.useContext(Ls),h=G.useMemo(()=>({dense:i||p.dense||!1,disableGutters:s}),[p.dense,i,s]),m=G.useRef(null);Hs(()=>{r&&m.current&&m.current.focus()},[r]);const g={...n,dense:h.dense,divider:a,disableGutters:s},b=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:a}=e,s=Na({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},sd,a);return{...a,...s}})(n),y=Ws(m,t);let v;return n.disabled||(v=void 0!==u?u:-1),(0,le.jsx)(Ls.Provider,{value:h,children:(0,le.jsx)(cd,{ref:y,role:c,tabIndex:v,component:o,focusVisibleClassName:Un(b.focusVisible,l),className:Un(b.root,d),...f,ownerState:g,classes:b})})}),dd=Ce("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]),fd=Ce("lock-open",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]]),pd=Ce("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]),hd=Ce("table-2",[["path",{d:"M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18",key:"gugj83"}]]),md=Ce("move",[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"m15 19-3 3-3-3",key:"11eu04"}],["path",{d:"m19 9 3 3-3 3",key:"1mg7y2"}],["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"m5 9-3 3 3 3",key:"j64kie"}],["path",{d:"m9 5 3-3 3 3",key:"l8vdw6"}]]),gd=Ce("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]),bd=Ce("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),yd={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},vd=(e,t,n)=>{let r;const o=yd[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function xd(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const wd={date:xd({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:xd({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:xd({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Sd={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},kd=(e,t,n,r)=>Sd[e];function Cd(e){return(t,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,o=n?.width?String(n.width):t;r=e.formattingValues[o]||e.formattingValues[t]}else{const t=e.defaultWidth,o=n?.width?String(n.width):e.defaultWidth;r=e.values[o]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}const Md={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Cd({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Cd({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Cd({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Cd({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Cd({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function Pd(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const a=i[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}(s,e=>e.test(a)):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}(s,e=>e.test(a));let c;return c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c,{value:c,rest:t.slice(a.length)}}}const Td={ordinalNumber:(Od={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(Od.matchPattern);if(!n)return null;const r=n[0],o=e.match(Od.parsePattern);if(!o)return null;let i=Od.valueCallback?Od.valueCallback(o[0]):o[0];return i=t.valueCallback?t.valueCallback(i):i,{value:i,rest:e.slice(r.length)}}),era:Pd({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Pd({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:Pd({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Pd({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Pd({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};var Od;const jd={code:"en-US",formatDistance:vd,formatLong:wd,formatRelative:kd,localize:Md,match:Td,options:{weekStartsOn:0,firstWeekContainsDate:1}};let _d={};function Dd(){return _d}Math.pow(10,8);const Ed=6048e5,Rd=36e5,Ad=Symbol.for("constructDateFrom");function Id(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&Ad in e?e[Ad](t):e instanceof Date?new e.constructor(t):new Date(t)}function Fd(e,t){return Id(t||e,e)}function Ld(e){const t=Fd(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Nd(e,...t){const n=Id.bind(null,e||t.find(e=>"object"==typeof e));return t.map(n)}function zd(e,t){const n=Fd(e,t?.in);return n.setHours(0,0,0,0),n}function $d(e,t){const n=Fd(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Vd(e,t){const n=Fd(e,t?.in);return function(e,t,n){const[r,o]=Nd(n?.in,e,t),i=zd(r),a=zd(o),s=+i-Ld(i),l=+a-Ld(a);return Math.round((s-l)/864e5)}(n,$d(n))+1}function Bd(e,t){const n=Dd(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Fd(e,t?.in),i=o.getDay(),a=(i<r?7:0)+i-r;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function Wd(e,t){return Bd(e,{...t,weekStartsOn:1})}function Hd(e,t){const n=Fd(e,t?.in),r=n.getFullYear(),o=Id(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=Wd(o),a=Id(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=Wd(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function qd(e,t){const n=Fd(e,t?.in),r=+Wd(n)-+function(e,t){const n=Hd(e,t),r=Id(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Wd(r)}(n);return Math.round(r/Ed)+1}function Yd(e,t){const n=Fd(e,t?.in),r=n.getFullYear(),o=Dd(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=Id(t?.in||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=Bd(a,t),l=Id(t?.in||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=Bd(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function Ud(e,t){const n=Fd(e,t?.in),r=+Bd(n,t)-+function(e,t){const n=Dd(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=Yd(e,t),i=Id(t?.in||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),Bd(i,t)}(n,t);return Math.round(r/Ed)+1}function Gd(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const Xd={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Gd("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):Gd(n+1,2)},d:(e,t)=>Gd(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>Gd(e.getHours()%12||12,t.length),H:(e,t)=>Gd(e.getHours(),t.length),m:(e,t)=>Gd(e.getMinutes(),t.length),s:(e,t)=>Gd(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return Gd(Math.trunc(r*Math.pow(10,n-3)),t.length)}},Qd={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return Xd.y(e,t)},Y:function(e,t,n,r){const o=Yd(e,r),i=o>0?o:1-o;return"YY"===t?Gd(i%100,2):"Yo"===t?n.ordinalNumber(i,{unit:"year"}):Gd(i,t.length)},R:function(e,t){return Gd(Hd(e),t.length)},u:function(e,t){return Gd(e.getFullYear(),t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Gd(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Gd(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Xd.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Gd(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=Ud(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):Gd(o,t.length)},I:function(e,t,n){const r=qd(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):Gd(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):Xd.d(e,t)},D:function(e,t,n){const r=Vd(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):Gd(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Gd(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Gd(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return Gd(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(o=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(o=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return Xd.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):Xd.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):Gd(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):Gd(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Xd.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Xd.s(e,t)},S:function(e,t){return Xd.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return Zd(r);case"XXXX":case"XX":return Jd(r);default:return Jd(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Zd(r);case"xxxx":case"xx":return Jd(r);default:return Jd(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Kd(r,":");default:return"GMT"+Jd(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Kd(r,":");default:return"GMT"+Jd(r,":")}},t:function(e,t,n){return Gd(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return Gd(+e,t.length)}};function Kd(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return 0===i?n+String(o):n+String(o)+t+Gd(i,2)}function Zd(e,t){return e%60==0?(e>0?"-":"+")+Gd(Math.abs(e)/60,2):Jd(e,t)}function Jd(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+Gd(Math.trunc(r/60),2)+t+Gd(r%60,2)}const ef=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},tf=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},nf={p:tf,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return ef(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"})}return i.replace("{{date}}",ef(r,t)).replace("{{time}}",tf(o,t))}},rf=/^D+$/,of=/^Y+$/,af=["D","DD","YY","YYYY"];function sf(e){return rf.test(e)}function lf(e){return of.test(e)}function cf(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(console.warn(r),af.includes(e))throw new RangeError(r)}function uf(e){return!(!function(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}(e)&&"number"!=typeof e||isNaN(+Fd(e)))}const df=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ff=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,pf=/^'([^]*?)'?$/,hf=/''/g,mf=/[a-zA-Z]/;function gf(e,t,n){const r=Dd(),o=n?.locale??r.locale??jd,i=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=Fd(e,n?.in);if(!uf(s))throw new RangeError("Invalid time value");let l=t.match(ff).map(e=>{const t=e[0];return"p"===t||"P"===t?(0,nf[t])(e,o.formatLong):e}).join("").match(df).map(e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:bf(e)};if(Qd[t])return{isToken:!0,value:e};if(t.match(mf))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map(r=>{if(!r.isToken)return r.value;const i=r.value;return(!n?.useAdditionalWeekYearTokens&&lf(i)||!n?.useAdditionalDayOfYearTokens&&sf(i))&&cf(i,t,String(e)),(0,Qd[i[0]])(s,i,o.localize,c)}).join("")}function bf(e){const t=e.match(pf);return t?t[1].replace(hf,"'"):e}var yf=function(e,t){if(t&&["date","time","datetime"].includes(t)){var n={date:"dd/MM/yyyy",time:"HH:mm",datetime:"dd/MM/yyyy HH:mm"};return e.map(function(e){return gf(new Date(e),n[t])}).join(" to ")}return e.join(", ")};function vf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var xf="#403e3b",wf=Fe(Me),Sf=Fe(hd),kf=Fe(md),Cf=function(e){var t=e.chartFilters,n=e.globalFilters.filter(function(e){return!t.some(function(t){return t.dimension===e.dimension})});return(0,le.jsxs)("div",{className:"dashboard-filter-icon-tooltip-content",children:[n&&n.filter(function(e){return e.active}).length>0&&(0,le.jsxs)("div",{children:[(0,le.jsxs)("div",{className:"dashboard-filter-icon-tooltip-title",children:[(0,le.jsx)(gd,{size:16,"aria-hidden":!0})," Global Filters"]}),n.filter(function(e){return e.active}).map(function(e){return(0,le.jsxs)("div",{children:[e.title,":"," ",yf(e.currentValues,e.subFieldType)]},e.title)})]}),t&&t.length>0&&(0,le.jsxs)("div",{children:[(0,le.jsx)("div",{className:"dashboard-filter-icon-tooltip-title",children:"Chart Filters"}),t.map(function(e){return(0,le.jsxs)("div",{children:[e.title,":"," ",yf(e.currentValues,e.subFieldType)]},e.title)})]})]})},Mf=function(e){var t,n,r=e.title,o=e.titleTooltip,i=e.editingLayout,a=e.showData,s=e.chartFilters,l=void 0===s?[]:s,c=e.setLockedFilters,u=e.filterChart,d=e.globalFilters,f=void 0===d?[]:d,p=e.chartQuery,h=e.activeFilterCount,m=e.systemFilters,g=(t=(0,G.useState)(!1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,n)||function(e,t){if(e){if("string"==typeof e)return vf(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vf(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),b=g[0],y=g[1],v=Fe(bd),x=0==h?null:h;return(0,le.jsxs)("div",{className:"dashboard-item-header",children:[(0,le.jsxs)("h3",{className:"dashboard-item-header-title",children:[r,(0,le.jsx)(v,{content:o,side:"bottom",size:18,"aria-hidden":!0})]}),(0,le.jsxs)("button",{onClick:function(){return y(!0)},className:"chart-filter-button",children:[(0,le.jsx)("div",{className:be()("dashboard-chart-filter-icon",{"dashboard-chart-filter-icon__active":x&&x>0}),children:(0,le.jsx)(wf,{size:18,color:xf,"aria-hidden":!0,content:x&&x>0?(0,le.jsx)(Cf,{chartFilters:l||[],globalFilters:f||[]}):"No Filters Applied",side:"bottom"})}),x&&0!=x&&(0,le.jsx)("div",{className:"dashboard-chart-filter-icon__count",children:x})]}),a&&(0,le.jsx)("button",{"data-test-id":"show-me-data-button",className:"show-me-data-button",onClick:function(){return a(p,r)},children:(0,le.jsx)(Sf,{content:"Show data",side:"bottom",size:24,"aria-hidden":!0,color:xf})}),i&&(0,le.jsx)("button",{className:"draggable-handle",children:(0,le.jsx)(kf,{content:"Drag to reorder",side:"bottom",size:24,"aria-hidden":!0,color:xf})}),b&&f&&(0,le.jsx)(yY,{title:r,filters:f,chartFilters:l,onClose:function(){return y(!1)},refetchData:u,lockFilter:function(e){c(e)},systemFilters:m})]})},Pf=a(5072),Tf=a.n(Pf),Of=a(7825),jf=a.n(Of),_f=a(7659),Df=a.n(_f),Ef=a(5056),Rf=a.n(Ef),Af=a(540),If=a.n(Af),Ff=a(1113),Lf=a.n(Ff),Nf=a(2602),zf={};zf.styleTagTransform=Lf(),zf.setAttributes=Rf(),zf.insert=Df().bind(null,"head"),zf.domAPI=jf(),zf.insertStyleElement=If(),Tf()(Nf.A,zf),Nf.A&&Nf.A.locals&&Nf.A.locals;var $f=function(){return(0,le.jsxs)("div",{"aria-label":"Loading",className:"loading-widget__shimmer-container","data-testid":"loading-widget",children:[(0,le.jsx)("div",{className:"loading-widget__shimmer-bar loading-widget__shimmer-bar--short"}),(0,le.jsx)("div",{className:"loading-widget__shimmer-bar loading-widget__shimmer-bar--medium"}),(0,le.jsx)("div",{className:"loading-widget__shimmer-bar loading-widget__shimmer-bar--long"})]})};function Vf(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var l=r&&r.prototype instanceof s?r:s,c=Object.create(l.prototype);return Bf(c,"_invoke",function(n,r,o){var i,s,l,c=0,u=o||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return i=t,s=0,l=e,f.n=n,a}};function p(n,r){for(s=n,l=r,t=0;!d&&c&&!o&&t<u.length;t++){var o,i=u[t],p=f.p,h=i[2];n>3?(o=h===r)&&(l=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=n<2&&p<i[1])?(s=0,f.v=r,f.n=i[1]):p<h&&(o=n<3||i[0]>r||r>h)&&(i[4]=n,i[5]=r,f.n=h,s=0))}if(o||n>1)return a;throw d=!0,r}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&p(u,h),s=u,l=h;(t=s<2?e:l)||!d;){i||(s?s<3?(s>1&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(c=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(d=f.n<0)?l:n.call(r,f))!==a)break}catch(t){i=e,s=1,l=t}finally{c=1}}return{value:t,done:d}}}(n,o,i),!0),c}var a={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(Bf(t={},r,function(){return this}),t),d=c.prototype=s.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,Bf(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,Bf(d,"constructor",c),Bf(c,"constructor",l),l.displayName="GeneratorFunction",Bf(c,o,"GeneratorFunction"),Bf(d),Bf(d,o,"Generator"),Bf(d,r,function(){return this}),Bf(d,"toString",function(){return"[object Generator]"}),(Vf=function(){return{w:i,m:f}})()}function Bf(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Bf=function(e,t,n,r){function i(t,n){Bf(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},Bf(e,t,n,r)}function Wf(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Hf(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Hf(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Hf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function qf(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}var Yf=function(){var e,t=(e=Vf().m(function e(t){var n,r,o,i,a,s,l;return Vf().w(function(e){for(;;)switch(e.n){case 0:return(n=Wf(t,2))[0],r=n[1],o=r.dataUrl,i=r.params,a=r.authToken,s=r.cookie,e.n=1,et;case 1:return l=e.v,e.a(2,l(o,i,{authToken:a,cookie:s}))}},e)}),function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){qf(i,r,o,a,s,"next",e)}function s(e){qf(i,r,o,a,s,"throw",e)}a(void 0)})});return function(e){return t.apply(this,arguments)}}(),Uf=cp(),Gf=e=>ip(e,Uf),Xf=cp();Gf.write=e=>ip(e,Xf);var Qf=cp();Gf.onStart=e=>ip(e,Qf);var Kf=cp();Gf.onFrame=e=>ip(e,Kf);var Zf=cp();Gf.onFinish=e=>ip(e,Zf);var Jf=[];Gf.setTimeout=(e,t)=>{const n=Gf.now()+t,r=()=>{const e=Jf.findIndex(e=>e.cancel==r);~e&&Jf.splice(e,1),rp-=~e?1:0},o={time:n,handler:e,cancel:r};return Jf.splice(ep(n),0,o),rp+=1,ap(),o};var ep=e=>~(~Jf.findIndex(t=>t.time>e)||~Jf.length);Gf.cancel=e=>{Qf.delete(e),Kf.delete(e),Zf.delete(e),Uf.delete(e),Xf.delete(e)},Gf.sync=e=>{op=!0,Gf.batchedUpdates(e),op=!1},Gf.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,Gf.onStart(n)}return r.handler=e,r.cancel=()=>{Qf.delete(n),t=null},r};var tp="undefined"!=typeof window?window.requestAnimationFrame:()=>{};Gf.use=e=>tp=e,Gf.now="undefined"!=typeof performance?()=>performance.now():Date.now,Gf.batchedUpdates=e=>e(),Gf.catch=console.error,Gf.frameLoop="always",Gf.advance=()=>{"demand"!==Gf.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):lp()};var np=-1,rp=0,op=!1;function ip(e,t){op?(t.delete(e),e(0)):(t.add(e),ap())}function ap(){np<0&&(np=0,"demand"!==Gf.frameLoop&&tp(sp))}function sp(){~np&&(tp(sp),Gf.batchedUpdates(lp))}function lp(){const e=np;np=Gf.now();const t=ep(np);t&&(up(Jf.splice(0,t),e=>e.handler()),rp-=t),rp?(Qf.flush(),Uf.flush(e?Math.min(64,np-e):16.667),Kf.flush(),Xf.flush(),Zf.flush()):np=-1}function cp(){let e=new Set,t=e;return{add(n){rp+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(rp-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,rp-=t.size,up(t,t=>t(n)&&e.add(t)),rp+=e.size,t=e)}}}function up(e,t){e.forEach(e=>{try{t(e)}catch(e){Gf.catch(e)}})}var dp=Object.defineProperty,fp={};function pp(){}((e,t)=>{for(var n in t)dp(e,n,{get:t[n],enumerable:!0})})(fp,{assign:()=>Tp,colors:()=>Cp,createStringInterpolator:()=>xp,skipAnimation:()=>Mp,to:()=>wp,willAdvance:()=>Pp});var hp={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function mp(e,t){if(hp.arr(e)){if(!hp.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var gp=(e,t)=>e.forEach(t);function bp(e,t,n){if(hp.arr(e))for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);else for(const r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var yp=e=>hp.und(e)?[]:hp.arr(e)?e:[e];function vp(e,t){if(e.size){const n=Array.from(e);e.clear(),gp(n,t)}}var xp,wp,Sp=(e,...t)=>vp(e,e=>e(...t)),kp=()=>"undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Cp=null,Mp=!1,Pp=pp,Tp=e=>{e.to&&(wp=e.to),e.now&&(Gf.now=e.now),void 0!==e.colors&&(Cp=e.colors),null!=e.skipAnimation&&(Mp=e.skipAnimation),e.createStringInterpolator&&(xp=e.createStringInterpolator),e.requestAnimationFrame&&Gf.use(e.requestAnimationFrame),e.batchedUpdates&&(Gf.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Pp=e.willAdvance),e.frameLoop&&(Gf.frameLoop=e.frameLoop)},Op=new Set,jp=[],_p=[],Dp=0,Ep={get idle(){return!Op.size&&!jp.length},start(e){Dp>e.priority?(Op.add(e),Gf.onStart(Rp)):(Ap(e),Gf(Fp))},advance:Fp,sort(e){if(Dp)Gf.onFrame(()=>Ep.sort(e));else{const t=jp.indexOf(e);~t&&(jp.splice(t,1),Ip(e))}},clear(){jp=[],Op.clear()}};function Rp(){Op.forEach(Ap),Op.clear(),Gf(Fp)}function Ap(e){jp.includes(e)||Ip(e)}function Ip(e){jp.splice(function(t){const n=t.findIndex(t=>t.priority>e.priority);return n<0?t.length:n}(jp),0,e)}function Fp(e){const t=_p;for(let n=0;n<jp.length;n++){const r=jp[n];Dp=r.priority,r.idle||(Pp(r),r.advance(e),r.idle||t.push(r))}return Dp=0,(_p=jp).length=0,(jp=t).length>0}var Lp="[-+]?\\d*\\.?\\d+",Np=Lp+"%";function zp(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var $p=new RegExp("rgb"+zp(Lp,Lp,Lp)),Vp=new RegExp("rgba"+zp(Lp,Lp,Lp,Lp)),Bp=new RegExp("hsl"+zp(Lp,Np,Np)),Wp=new RegExp("hsla"+zp(Lp,Np,Np,Lp)),Hp=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,qp=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Yp=/^#([0-9a-fA-F]{6})$/,Up=/^#([0-9a-fA-F]{8})$/;function Gp(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Xp(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=Gp(o,r,e+1/3),a=Gp(o,r,e),s=Gp(o,r,e-1/3);return Math.round(255*i)<<24|Math.round(255*a)<<16|Math.round(255*s)<<8}function Qp(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function Kp(e){return(parseFloat(e)%360+360)%360/360}function Zp(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function Jp(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function eh(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Yp.exec(e))?parseInt(t[1]+"ff",16)>>>0:Cp&&void 0!==Cp[e]?Cp[e]:(t=$p.exec(e))?(Qp(t[1])<<24|Qp(t[2])<<16|Qp(t[3])<<8|255)>>>0:(t=Vp.exec(e))?(Qp(t[1])<<24|Qp(t[2])<<16|Qp(t[3])<<8|Zp(t[4]))>>>0:(t=Hp.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Up.exec(e))?parseInt(t[1],16)>>>0:(t=qp.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Bp.exec(e))?(255|Xp(Kp(t[1]),Jp(t[2]),Jp(t[3])))>>>0:(t=Wp.exec(e))?(Xp(Kp(t[1]),Jp(t[2]),Jp(t[3]))|Zp(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}var th=(e,t,n)=>{if(hp.fun(e))return e;if(hp.arr(e))return th({range:e,output:t,extrapolate:n});if(hp.str(e.output[0]))return xp(e);const r=e,o=r.output,i=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",s=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,i);return function(e,t,n,r,o,i,a,s,l){let c=l?l(e):e;if(c<t){if("identity"===a)return c;"clamp"===a&&(c=t)}if(c>n){if("identity"===s)return c;"clamp"===s&&(c=n)}return r===o?r:t===n?e<=t?r:o:(t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t),c=i(c),r===-1/0?c=-c:o===1/0?c+=r:c=c*(o-r)+r,c)}(e,i[t],i[t+1],o[t],o[t+1],l,a,s,r.map)}},nh=1.70158,rh=1.525*nh,oh=nh+1,ih=2*Math.PI/3,ah=2*Math.PI/4.5,sh=e=>{const t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},lh={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>0===e?0:Math.pow(2,10*e-10),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>oh*e*e*e-nh*e*e,easeOutBack:e=>1+oh*Math.pow(e-1,3)+nh*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(7.189819*e-rh)/2:(Math.pow(2*e-2,2)*((rh+1)*(2*e-2)+rh)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*ih),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*ih)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*ah)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*ah)/2+1,easeInBounce:e=>1-sh(1-e),easeOutBounce:sh,easeInOutBounce:e=>e<.5?(1-sh(1-2*e))/2:(1+sh(2*e-1))/2,steps:(e,t="end")=>n=>{const r=(n="end"===t?Math.min(n,.999):Math.max(n,.001))*e;return o=("end"===t?Math.floor(r):Math.ceil(r))/e,Math.min(Math.max(o,0),1);var o}},ch=Symbol.for("FluidValue.get"),uh=Symbol.for("FluidValue.observers"),dh=e=>Boolean(e&&e[ch]),fh=e=>e&&e[ch]?e[ch]():e,ph=e=>e[uh]||null;function hh(e,t){const n=e[uh];n&&n.forEach(e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)})}var mh=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");gh(this,e)}},gh=(e,t)=>xh(e,ch,t);function bh(e,t){if(e[ch]){let n=e[uh];n||xh(e,uh,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function yh(e,t){const n=e[uh];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[uh]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var vh,xh=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),wh=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Sh=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,kh=new RegExp(`(${wh.source})(%|[a-z]+)`,"i"),Ch=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Mh=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Ph=e=>{const[t,n]=Th(e);if(!t||kp())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){return window.getComputedStyle(document.documentElement).getPropertyValue(n)||e}return n&&Mh.test(n)?Ph(n):n||e},Th=e=>{const t=Mh.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},Oh=(e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`,jh=e=>{vh||(vh=Cp?new RegExp(`(${Object.keys(Cp).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(e=>fh(e).replace(Mh,Ph).replace(Sh,eh).replace(vh,eh)),n=t.map(e=>e.match(wh).map(Number)),r=n[0].map((e,t)=>n.map(e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})),o=r.map(t=>th({...e,output:t}));return e=>{const n=!kh.test(t[0])&&t.find(e=>kh.test(e))?.replace(wh,"");let r=0;return t[0].replace(wh,()=>`${o[r++](e)}${n||""}`).replace(Ch,Oh)}},_h="react-spring: ",Dh=e=>{const t=e;let n=!1;if("function"!=typeof t)throw new TypeError(`${_h}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},Eh=Dh(console.warn),Rh=Dh(console.warn);function Ah(e){return hp.str(e)&&("#"==e[0]||/\d/.test(e)||!kp()&&Mh.test(e)||e in(Cp||{}))}var Ih=kp()?G.useEffect:G.useLayoutEffect;function Fh(){const e=(0,G.useState)()[1],t=(()=>{const e=(0,G.useRef)(!1);return Ih(()=>(e.current=!0,()=>{e.current=!1}),[]),e})();return()=>{t.current&&e(Math.random())}}var Lh=e=>(0,G.useEffect)(e,Nh),Nh=[];function zh(e){const t=(0,G.useRef)();return(0,G.useEffect)(()=>{t.current=e}),t.current}var $h=Symbol.for("Animated:node"),Vh=e=>e&&e[$h],Bh=(e,t)=>((e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}))(e,$h,t),Wh=e=>e&&e[$h]&&e[$h].getPayload(),Hh=class{constructor(){Bh(this,this)}getPayload(){return this.payload||[]}},qh=class extends Hh{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,hp.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new qh(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return hp.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,hp.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},Yh=class extends qh{constructor(e){super(0),this._string=null,this._toString=th({output:[e,e]})}static create(e){return new Yh(e)}getValue(){const e=this._string;return null==e?this._string=this._toString(this._value):e}setValue(e){if(hp.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=th({output:[this.getValue(),e]})),this._value=0,super.reset()}},Uh={dependencies:null},Gh=class extends Hh{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return bp(this.source,(n,r)=>{(e=>!!e&&e[$h]===e)(n)?t[r]=n.getValue(e):dh(n)?t[r]=fh(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&gp(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return bp(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Uh.dependencies&&dh(e)&&Uh.dependencies.add(e);const t=Wh(e);t&&gp(t,e=>this.add(e))}},Xh=class extends Gh{constructor(e){super(e)}static create(e){return new Xh(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();return e.length==t.length?t.map((t,n)=>t.setValue(e[n])).some(Boolean):(super.setValue(e.map(Qh)),!0)}};function Qh(e){return(Ah(e)?Yh:qh).create(e)}function Kh(e){const t=Vh(e);return t?t.constructor:hp.arr(e)?Xh:Ah(e)?Yh:qh}var Zh=(e,t)=>{const n=!hp.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,G.forwardRef)((r,o)=>{const i=(0,G.useRef)(null),a=n&&(0,G.useCallback)(e=>{i.current=function(e,t){return e&&(hp.fun(e)?e(t):e.current=t),t}(o,e)},[o]),[s,l]=function(e,t){const n=new Set;return Uh.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Gh(e),Uh.dependencies=null,[e,n]}(r,t),c=Fh(),u=()=>{const e=i.current;n&&!e||!1===(!!e&&t.applyAnimatedValues(e,s.getValue(!0)))&&c()},d=new Jh(u,l),f=(0,G.useRef)();Ih(()=>(f.current=d,gp(l,e=>bh(e,d)),()=>{f.current&&(gp(f.current.deps,e=>yh(e,f.current)),Gf.cancel(f.current.update))})),(0,G.useEffect)(u,[]),Lh(()=>()=>{const e=f.current;gp(e.deps,t=>yh(t,e))});const p=t.getComponentProps(s.getValue());return G.createElement(e,{...p,ref:a})})},Jh=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&Gf.write(this.update)}},em=Symbol.for("AnimatedComponent"),tm=e=>hp.str(e)?e:e&&hp.str(e.displayName)?e.displayName:hp.fun(e)&&e.name||null;function nm(e,...t){return hp.fun(e)?e(...t):e}var rm=(e,t)=>!0===e||!!(t&&e&&(hp.fun(e)?e(t):yp(e).includes(t))),om=(e,t)=>hp.obj(e)?t&&e[t]:e,im=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,am=e=>e,sm=(e,t=am)=>{let n=lm;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));const r={};for(const o of n){const n=t(e[o],o);hp.und(n)||(r[o]=n)}return r},lm=["config","onProps","onStart","onChange","onPause","onResume","onRest"],cm={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function um(e){const t=function(e){const t={};let n=0;if(bp(e,(e,r)=>{cm[r]||(t[r]=e,n++)}),n)return t}(e);if(t){const n={to:t};return bp(e,(e,r)=>r in t||(n[r]=e)),n}return{...e}}function dm(e){return e=fh(e),hp.arr(e)?e.map(dm):Ah(e)?fp.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function fm(e){for(const t in e)return!0;return!1}function pm(e){return hp.fun(e)||hp.arr(e)&&hp.obj(e[0])}function hm(e,t){e.ref?.delete(e),t?.delete(e)}function mm(e,t){t&&e.ref!==t&&(e.ref?.delete(e),t.add(e),e.ref=t)}var gm={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},bm={...gm.default,mass:1,damping:1,easing:lh.linear,clamp:!1},ym=class{constructor(){this.velocity=0,Object.assign(this,bm)}};function vm(e,t){if(hp.und(t.decay)){const n=!hp.und(t.tension)||!hp.und(t.friction);!n&&hp.und(t.frequency)&&hp.und(t.damping)&&hp.und(t.mass)||(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}var xm=[],wm=class{constructor(){this.changed=!1,this.values=xm,this.toValues=null,this.fromValues=xm,this.config=new ym,this.immediate=!1}};function Sm(e,{key:t,props:n,defaultProps:r,state:o,actions:i}){return new Promise((a,s)=>{let l,c,u=rm(n.cancel??r?.cancel,t);if(u)p();else{hp.und(n.pause)||(o.paused=rm(n.pause,t));let e=r?.pause;!0!==e&&(e=o.paused||rm(e,t)),l=nm(n.delay||0,t),e?(o.resumeQueue.add(f),i.pause()):(i.resume(),f())}function d(){o.resumeQueue.add(f),o.timeouts.delete(c),c.cancel(),l=c.time-Gf.now()}function f(){l>0&&!fp.skipAnimation?(o.delayed=!0,c=Gf.setTimeout(p,l),o.pauseQueue.add(d),o.timeouts.add(c)):p()}function p(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(d),o.timeouts.delete(c),e<=(o.cancelId||0)&&(u=!0);try{i.start({...n,callId:e,cancel:u},a)}catch(e){s(e)}}})}var km=(e,t)=>1==t.length?t[0]:t.some(e=>e.cancelled)?Pm(e.get()):t.every(e=>e.noop)?Cm(e.get()):Mm(e.get(),t.every(e=>e.finished)),Cm=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Mm=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Pm=e=>({value:e,cancelled:!0,finished:!1});function Tm(e,t,n,r){const{callId:o,parentId:i,onRest:a}=t,{asyncTo:s,promise:l}=n;return i||e!==s||t.reset?n.promise=(async()=>{n.asyncId=o,n.asyncTo=e;const c=sm(t,(e,t)=>"onRest"===t?void 0:e);let u,d;const f=new Promise((e,t)=>(u=e,d=t)),p=e=>{const t=o<=(n.cancelId||0)&&Pm(r)||o!==n.asyncId&&Mm(r,!1);if(t)throw e.result=t,d(e),e},h=(e,t)=>{const i=new jm,a=new _m;return(async()=>{if(fp.skipAnimation)throw Om(n),a.result=Mm(r,!1),d(a),a;p(i);const s=hp.obj(e)?{...e}:{...t,to:e};s.parentId=o,bp(c,(e,t)=>{hp.und(s[t])&&(s[t]=e)});const l=await r.start(s);return p(i),n.paused&&await new Promise(e=>{n.resumeQueue.add(e)}),l})()};let m;if(fp.skipAnimation)return Om(n),Mm(r,!1);try{let t;t=hp.arr(e)?(async e=>{for(const t of e)await h(t)})(e):Promise.resolve(e(h,r.stop.bind(r))),await Promise.all([t.then(u),f]),m=Mm(r.get(),!0,!1)}catch(e){if(e instanceof jm)m=e.result;else{if(!(e instanceof _m))throw e;m=e.result}}finally{o==n.asyncId&&(n.asyncId=i,n.asyncTo=i?s:void 0,n.promise=i?l:void 0)}return hp.fun(a)&&Gf.batchedUpdates(()=>{a(m,r,r.item)}),m})():l}function Om(e,t){vp(e.timeouts,e=>e.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var jm=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},_m=class extends Error{constructor(){super("SkipAnimationSignal")}},Dm=e=>e instanceof Rm,Em=1,Rm=class extends mh{constructor(){super(...arguments),this.id=Em++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=Vh(this);return e&&e.getValue()}to(...e){return fp.to(this,e)}interpolate(...e){return Eh(`${_h}The "interpolate" function is deprecated in v9 (use "to" instead)`),fp.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){hh(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||Ep.sort(this),hh(this,{type:"priority",parent:this,priority:e})}},Am=Symbol.for("SpringPhase"),Im=e=>(1&e[Am])>0,Fm=e=>(2&e[Am])>0,Lm=e=>(4&e[Am])>0,Nm=(e,t)=>t?e[Am]|=3:e[Am]&=-3,zm=(e,t)=>t?e[Am]|=4:e[Am]&=-5,$m=class extends Rm{constructor(e,t){if(super(),this.animation=new wm,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!hp.und(e)||!hp.und(t)){const n=hp.obj(e)?{...e}:{...t,from:e};hp.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(Fm(this)||this._state.asyncTo)||Lm(this)}get goal(){return fh(this.animation.to)}get velocity(){const e=Vh(this);return e instanceof qh?e.lastVelocity||0:e.getPayload().map(e=>e.lastVelocity||0)}get hasAnimated(){return Im(this)}get isAnimating(){return Fm(this)}get isPaused(){return Lm(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:o}=r;const{config:i}=r,a=Wh(r.to);!a&&dh(r.to)&&(o=yp(fh(r.to))),r.values.forEach((s,l)=>{if(s.done)return;const c=s.constructor==Yh?1:a?a[l].lastPosition:o[l];let u=r.immediate,d=c;if(!u){if(d=s.lastPosition,i.tension<=0)return void(s.done=!0);let t=s.elapsedTime+=e;const n=r.fromValues[l],o=null!=s.v0?s.v0:s.v0=hp.arr(i.velocity)?i.velocity[l]:i.velocity;let a;const f=i.precision||(n==c?.005:Math.min(1,.001*Math.abs(c-n)));if(hp.und(i.duration))if(i.decay){const e=!0===i.decay?.998:i.decay,r=Math.exp(-(1-e)*t);d=n+o/(1-e)*(1-r),u=Math.abs(s.lastPosition-d)<=f,a=o*r}else{a=null==s.lastVelocity?o:s.lastVelocity;const t=i.restVelocity||f/10,r=i.clamp?0:i.bounce,l=!hp.und(r),p=n==c?s.v0>0:n<c;let h,m=!1;const g=1,b=Math.ceil(e/g);for(let e=0;e<b&&(h=Math.abs(a)>t,h||(u=Math.abs(c-d)<=f,!u));++e)l&&(m=d==c||d>c==p,m&&(a=-a*r,d=c)),a+=(1e-6*-i.tension*(d-c)+.001*-i.friction*a)/i.mass*g,d+=a*g}else{let r=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,s.durationProgress>0&&(s.elapsedTime=i.duration*s.durationProgress,t=s.elapsedTime+=e)),r=(i.progress||0)+t/this._memoizedDuration,r=r>1?1:r<0?0:r,s.durationProgress=r),d=n+i.easing(r)*(c-n),a=(d-s.lastPosition)/e,u=1==r}s.lastVelocity=a,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),u=!0)}a&&!a[l].done&&(u=!1),u?s.done=!0:t=!1,s.setValue(d,i.round)&&(n=!0)});const s=Vh(this),l=s.getValue();if(t){const e=fh(r.to);l===e&&!n||i.decay?n&&i.decay&&this._onChange(l):(s.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(l)}set(e){return Gf.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Fm(this)){const{to:e,config:t}=this.animation;Gf.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return hp.und(e)?(n=this.queue||[],this.queue=[]):n=[hp.obj(e)?e:{...t,to:e}],Promise.all(n.map(e=>this._update(e))).then(e=>km(this,e))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Om(this._state,e&&this._lastCallId),Gf.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=hp.obj(n)?n[t]:n,(null==n||pm(n))&&(n=void 0),r=hp.obj(r)?r[t]:r,null==r&&(r=void 0);const o={to:n,from:r};return Im(this)||(e.reverse&&([n,r]=[r,n]),r=fh(r),hp.und(r)?Vh(this)||this._set(n):this._set(r)),o}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,sm(e,(e,t)=>/^on/.test(t)?om(e,n):e)),Um(this,e,"onProps"),Gm(this,"onProps",e,this);const o=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const i=this._state;return Sm(++this._lastCallId,{key:n,props:e,defaultProps:r,state:i,actions:{pause:()=>{Lm(this)||(zm(this,!0),Sp(i.pauseQueue),Gm(this,"onPause",Mm(this,Vm(this,this.animation.to)),this))},resume:()=>{Lm(this)&&(zm(this,!1),Fm(this)&&this._resume(),Sp(i.resumeQueue),Gm(this,"onResume",Mm(this,Vm(this,this.animation.to)),this))},start:this._merge.bind(this,o)}}).then(n=>{if(e.loop&&n.finished&&(!t||!n.noop)){const t=Bm(e);if(t)return this._update(t,!0)}return n})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Pm(this));const r=!hp.und(e.to),o=!hp.und(e.from);if(r||o){if(!(t.callId>this._lastToId))return n(Pm(this));this._lastToId=t.callId}const{key:i,defaultProps:a,animation:s}=this,{to:l,from:c}=s;let{to:u=l,from:d=c}=e;!o||r||t.default&&!hp.und(u)||(u=d),t.reverse&&([u,d]=[d,u]);const f=!mp(d,c);f&&(s.from=d),d=fh(d);const p=!mp(u,l);p&&this._focus(u);const h=pm(t.to),{config:m}=s,{decay:g,velocity:b}=m;(r||o)&&(m.velocity=0),t.config&&!h&&function(e,t,n){n&&(vm(n={...n},t),t={...n,...t}),vm(e,t),Object.assign(e,t);for(const t in bm)null==e[t]&&(e[t]=bm[t]);let{frequency:r,damping:o}=e;const{mass:i}=e;hp.und(r)||(r<.01&&(r=.01),o<0&&(o=0),e.tension=Math.pow(2*Math.PI/r,2)*i,e.friction=4*Math.PI*o*i/r)}(m,nm(t.config,i),t.config!==a.config?nm(a.config,i):void 0);let y=Vh(this);if(!y||hp.und(u))return n(Mm(this,!0));const v=hp.und(t.reset)?o&&!t.default:!hp.und(d)&&rm(t.reset,i),x=v?d:this.get(),w=dm(u),S=hp.num(w)||hp.arr(w)||Ah(w),k=!h&&(!S||rm(a.immediate||t.immediate,i));if(p){const e=Kh(u);if(e!==y.constructor){if(!k)throw Error(`Cannot animate between ${y.constructor.name} and ${e.name}, as the "to" prop suggests`);y=this._set(w)}}const C=y.constructor;let M=dh(u),P=!1;if(!M){const e=v||!Im(this)&&f;(p||e)&&(P=mp(dm(x),w),M=!P),(mp(s.immediate,k)||k)&&mp(m.decay,g)&&mp(m.velocity,b)||(M=!0)}if(P&&Fm(this)&&(s.changed&&!v?M=!0:M||this._stop(l)),!h&&((M||dh(l))&&(s.values=y.getPayload(),s.toValues=dh(u)?null:C==Yh?[1]:yp(w)),s.immediate!=k&&(s.immediate=k,k||v||this._set(l)),M)){const{onRest:e}=s;gp(Ym,e=>Um(this,t,e));const r=Mm(this,Vm(this,l));Sp(this._pendingCalls,r),this._pendingCalls.add(n),s.changed&&Gf.batchedUpdates(()=>{s.changed=!v,e?.(r,this),v?nm(a.onRest,r):s.onStart?.(r,this)})}v&&this._set(x),h?n(Tm(t.to,t,this._state,this)):M?this._start():Fm(this)&&!p?this._pendingCalls.add(n):n(Cm(x))}_focus(e){const t=this.animation;e!==t.to&&(ph(this)&&this._detach(),t.to=e,ph(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;dh(t)&&(bh(t,this),Dm(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;dh(e)&&yh(e,this)}_set(e,t=!0){const n=fh(e);if(!hp.und(n)){const e=Vh(this);if(!e||!mp(n,e.getValue())){const r=Kh(n);e&&e.constructor==r?e.setValue(n):Bh(this,r.create(n)),e&&Gf.batchedUpdates(()=>{this._onChange(n,t)})}}return Vh(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,Gm(this,"onStart",Mm(this,Vm(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),nm(this.animation.onChange,e,this)),nm(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;Vh(this).reset(fh(e.to)),e.immediate||(e.fromValues=e.values.map(e=>e.lastPosition)),Fm(this)||(Nm(this,!0),Lm(this)||this._resume())}_resume(){fp.skipAnimation?this.finish():Ep.start(this)}_stop(e,t){if(Fm(this)){Nm(this,!1);const n=this.animation;gp(n.values,e=>{e.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),hh(this,{type:"idle",parent:this});const r=t?Pm(this.get()):Mm(this.get(),Vm(this,e??n.to));Sp(this._pendingCalls,r),n.changed&&(n.changed=!1,Gm(this,"onRest",r,this))}}};function Vm(e,t){const n=dm(t);return mp(dm(e.get()),n)}function Bm(e,t=e.loop,n=e.to){const r=nm(t);if(r){const o=!0!==r&&um(r),i=(o||e).reverse,a=!o||o.reset;return Wm({...e,loop:t,default:!1,pause:void 0,to:!i||pm(n)?n:void 0,from:a?e.from:void 0,reset:a,...o})}}function Wm(e){const{to:t,from:n}=e=um(e),r=new Set;return hp.obj(t)&&qm(t,r),hp.obj(n)&&qm(n,r),e.keys=r.size?Array.from(r):null,e}function Hm(e){const t=Wm(e);return hp.und(t.default)&&(t.default=sm(t)),t}function qm(e,t){bp(e,(e,n)=>null!=e&&t.add(n))}var Ym=["onStart","onRest","onChange","onPause","onResume"];function Um(e,t,n){e.animation[n]=t[n]!==im(t,n)?om(t[n],e.key):void 0}function Gm(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var Xm=["onStart","onChange","onRest"],Qm=1,Km=class{constructor(e,t){this.id=Qm++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(const t in e){const n=e[t];hp.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(Wm(e)),this}start(e){let{queue:t}=this;return e?t=yp(e).map(Wm):this.queue=[],this._flush?this._flush(this,t):(og(this,t),Zm(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;gp(yp(t),t=>n[t].stop(!!e))}else Om(this._state,this._lastAsyncId),this.each(t=>t.stop(!!e));return this}pause(e){if(hp.und(e))this.start({pause:!0});else{const t=this.springs;gp(yp(e),e=>t[e].pause())}return this}resume(e){if(hp.und(e))this.start({pause:!1});else{const t=this.springs;gp(yp(e),e=>t[e].resume())}return this}each(e){bp(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,o=this._changed.size>0;(r&&!this._started||o&&!this._started)&&(this._started=!0,vp(e,([e,t])=>{t.value=this.get(),e(t,this,this._item)}));const i=!r&&this._started,a=o||i&&n.size?this.get():null;o&&t.size&&vp(t,([e,t])=>{t.value=a,e(t,this,this._item)}),i&&(this._started=!1,vp(n,([e,t])=>{t.value=a,e(t,this,this._item)}))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}Gf.onFrame(this._onFrame)}};function Zm(e,t){return Promise.all(t.map(t=>Jm(e,t))).then(t=>km(e,t))}async function Jm(e,t,n){const{keys:r,to:o,from:i,loop:a,onRest:s,onResolve:l}=t,c=hp.obj(t.default)&&t.default;a&&(t.loop=!1),!1===o&&(t.to=null),!1===i&&(t.from=null);const u=hp.arr(o)||hp.fun(o)?o:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):gp(Xm,n=>{const r=t[n];if(hp.fun(r)){const o=e._events[n];t[n]=({finished:e,cancelled:t})=>{const n=o.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):o.set(r,{value:null,finished:e||!1,cancelled:t||!1})},c&&(c[n]=t[n])}});const d=e._state;t.pause===!d.paused?(d.paused=t.pause,Sp(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);const f=(r||Object.keys(e.springs)).map(n=>e.springs[n].start(t)),p=!0===t.cancel||!0===im(t,"cancel");(u||p&&d.asyncId)&&f.push(Sm(++e._lastAsyncId,{props:t,state:d,actions:{pause:pp,resume:pp,start(t,n){p?(Om(d,e._lastAsyncId),n(Pm(e))):(t.onRest=s,n(Tm(u,t,d,e)))}}})),d.paused&&await new Promise(e=>{d.resumeQueue.add(e)});const h=km(e,await Promise.all(f));if(a&&h.finished&&(!n||!h.noop)){const n=Bm(t,a,o);if(n)return og(e,[n]),Jm(e,n,!0)}return l&&Gf.batchedUpdates(()=>l(h,e,e.item)),h}function eg(e,t){const n={...e.springs};return t&&gp(yp(t),e=>{hp.und(e.keys)&&(e=Wm(e)),hp.obj(e.to)||(e={...e,to:void 0}),rg(n,e,e=>ng(e))}),tg(e,n),n}function tg(e,t){bp(t,(t,n)=>{e.springs[n]||(e.springs[n]=t,bh(t,e))})}function ng(e,t){const n=new $m;return n.key=e,t&&bh(n,t),n}function rg(e,t,n){t.keys&&gp(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function og(e,t){gp(t,t=>{rg(e.springs,t,t=>ng(t,e))})}var ig,ag,sg=({children:e,...t})=>{const n=(0,G.useContext)(lg),r=t.pause||!!n.pause,o=t.immediate||!!n.immediate;t=function(e,t){const[n]=(0,G.useState)(()=>({inputs:t,result:e()})),r=(0,G.useRef)(),o=r.current;let i=o;if(i){const n=Boolean(t&&i.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,i.inputs));n||(i={inputs:t,result:e()})}else i=n;return(0,G.useEffect)(()=>{r.current=i,o==n&&(n.inputs=n.result=void 0)},[i]),i.result}(()=>({pause:r,immediate:o}),[r,o]);const{Provider:i}=lg;return G.createElement(i,{value:t},e)},lg=(ig=sg,ag={},Object.assign(ig,G.createContext(ag)),ig.Provider._context=ig,ig.Consumer._context=ig,ig);sg.Provider=lg.Provider,sg.Consumer=lg.Consumer;var cg=()=>{const e=[],t=function(t){Rh(`${_h}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`);const r=[];return gp(e,(e,o)=>{if(hp.und(t))r.push(e.start());else{const i=n(t,e,o);i&&r.push(e.start(i))}}),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){const n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return gp(e,e=>e.pause(...arguments)),this},t.resume=function(){return gp(e,e=>e.resume(...arguments)),this},t.set=function(t){gp(e,(e,n)=>{const r=hp.fun(t)?t(n,e):t;r&&e.set(r)})},t.start=function(t){const n=[];return gp(e,(e,r)=>{if(hp.und(t))n.push(e.start());else{const o=this._getProps(t,e,r);o&&n.push(e.start(o))}}),n},t.stop=function(){return gp(e,e=>e.stop(...arguments)),this},t.update=function(t){return gp(e,(e,n)=>e.update(this._getProps(t,e,n))),this};const n=function(e,t,n){return hp.fun(e)?e(n,t):e};return t._getProps=n,t};function ug(e,t){const n=hp.fun(e),[[r],o]=function(e,t,n){const r=hp.fun(t)&&t;r&&!n&&(n=[]);const o=(0,G.useMemo)(()=>r||3==arguments.length?cg():void 0,[]),i=(0,G.useRef)(0),a=Fh(),s=(0,G.useMemo)(()=>({ctrls:[],queue:[],flush(e,t){const n=eg(e,t);return i.current>0&&!s.queue.length&&!Object.keys(n).some(t=>!e.springs[t])?Zm(e,t):new Promise(r=>{tg(e,n),s.queue.push(()=>{r(Zm(e,t))}),a()})}}),[]),l=(0,G.useRef)([...s.ctrls]),c=[],u=zh(e)||0;function d(e,n){for(let o=e;o<n;o++){const e=l.current[o]||(l.current[o]=new Km(null,s.flush)),n=r?r(o,e):t[o];n&&(c[o]=Hm(n))}}(0,G.useMemo)(()=>{gp(l.current.slice(e,u),e=>{hm(e,o),e.stop(!0)}),l.current.length=e,d(u,e)},[e]),(0,G.useMemo)(()=>{d(0,Math.min(u,e))},n);const f=l.current.map((e,t)=>eg(e,c[t])),p=(0,G.useContext)(sg),h=zh(p),m=p!==h&&fm(p);Ih(()=>{i.current++,s.ctrls=l.current;const{queue:e}=s;e.length&&(s.queue=[],gp(e,e=>e())),gp(l.current,(e,t)=>{o?.add(e),m&&e.start({default:p});const n=c[t];n&&(mm(e,n.ref),e.ref?e.queue.push(n):e.start(n))})}),Lh(()=>()=>{gp(s.ctrls,e=>e.stop(!0))});const g=f.map(e=>({...e}));return o?[g,o]:g}(1,n?e:[e],n?t||[]:t);return n||2==arguments.length?[r,o]:r}function dg(e,t,n){const r=hp.fun(t)&&t,{reset:o,sort:i,trail:a=0,expires:s=!0,exitBeforeEnter:l=!1,onDestroyed:c,ref:u,config:d}=r?r():t,f=(0,G.useMemo)(()=>r||3==arguments.length?cg():void 0,[]),p=yp(e),h=[],m=(0,G.useRef)(null),g=o?null:m.current;Ih(()=>{m.current=h}),Lh(()=>(gp(h,e=>{f?.add(e.ctrl),e.ctrl.ref=f}),()=>{gp(m.current,e=>{e.expired&&clearTimeout(e.expirationId),hm(e.ctrl,f),e.ctrl.stop(!0)})}));const b=function(e,{key:t,keys:n=t},r){if(null===n){const t=new Set;return e.map(e=>{const n=r&&r.find(n=>n.item===e&&"leave"!==n.phase&&!t.has(n));return n?(t.add(n),n.key):fg++})}return hp.und(n)?e:hp.fun(n)?e.map(n):yp(n)}(p,r?r():t,g),y=o&&m.current||[];Ih(()=>gp(y,({ctrl:e,item:t,key:n})=>{hm(e,f),nm(c,t,n)}));const v=[];if(g&&gp(g,(e,t)=>{e.expired?(clearTimeout(e.expirationId),y.push(e)):~(t=v[t]=b.indexOf(e.key))&&(h[t]=e)}),gp(p,(e,t)=>{h[t]||(h[t]={key:b[t],item:e,phase:"mount",ctrl:new Km},h[t].ctrl.item=e)}),v.length){let e=-1;const{leave:n}=r?r():t;gp(v,(t,r)=>{const o=g[r];~t?(e=h.indexOf(o),h[e]={...o,item:p[t]}):n&&h.splice(++e,0,o)})}hp.fun(i)&&h.sort((e,t)=>i(e.item,t.item));let x=-a;const w=Fh(),S=sm(t),k=new Map,C=(0,G.useRef)(new Map),M=(0,G.useRef)(!1);gp(h,(e,n)=>{const o=e.key,i=e.phase,c=r?r():t;let f,p;const h=nm(c.delay||0,o);if("mount"==i)f=c.enter,p="enter";else{const e=b.indexOf(o)<0;if("leave"!=i)if(e)f=c.leave,p="leave";else{if(!(f=c.update))return;p="update"}else{if(e)return;f=c.enter,p="enter"}}if(f=nm(f,e.item,n),f=hp.obj(f)?um(f):{to:f},!f.config){const t=d||S.config;f.config=nm(t,e.item,n,p)}x+=a;const y={...S,delay:h+x,ref:u,immediate:c.immediate,reset:!1,...f};if("enter"==p&&hp.und(y.from)){const o=r?r():t,i=hp.und(o.initial)||g?o.from:o.initial;y.from=nm(i,e.item,n)}const{onResolve:v}=y;y.onResolve=e=>{nm(v,e);const t=m.current,n=t.find(e=>e.key===o);if(n&&(!e.cancelled||"update"==n.phase)&&n.ctrl.idle){const e=t.every(e=>e.ctrl.idle);if("leave"==n.phase){const t=nm(s,n.item);if(!1!==t){const r=!0===t?0:t;if(n.expired=!0,!e&&r>0)return void(r<=2147483647&&(n.expirationId=setTimeout(w,r)))}}e&&t.some(e=>e.expired)&&(C.current.delete(n),l&&(M.current=!0),w())}};const P=eg(e.ctrl,y);"leave"===p&&l?C.current.set(e,{phase:p,springs:P,payload:y}):k.set(e,{phase:p,springs:P,payload:y})});const P=(0,G.useContext)(sg),T=zh(P),O=P!==T&&fm(P);Ih(()=>{O&&gp(h,e=>{e.ctrl.start({default:P})})},[P]),gp(k,(e,t)=>{if(C.current.size){const e=h.findIndex(e=>e.key===t.key);h.splice(e,1)}}),Ih(()=>{gp(C.current.size?C.current:k,({phase:e,payload:t},n)=>{const{ctrl:r}=n;n.phase=e,f?.add(r),O&&"enter"==e&&r.start({default:P}),t&&(mm(r,t.ref),!r.ref&&!f||M.current?(r.start(t),M.current&&(M.current=!1)):r.update(t))})},o?void 0:n);const j=e=>G.createElement(G.Fragment,null,h.map((t,n)=>{const{springs:r}=k.get(t)||t.ctrl,o=e({...r},t.item,t,n);return o&&o.type?G.createElement(o.type,{...o.props,key:hp.str(t.key)||hp.num(t.key)?t.key:t.ctrl.id,ref:o.ref}):o}));return f?[j,f]:j}var fg=1,pg=class extends Rm{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=th(...t);const n=this._get(),r=Kh(n);Bh(this,r.create(n))}advance(e){const t=this._get();mp(t,this.get())||(Vh(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&mg(this._active)&&gg(this)}_get(){const e=hp.arr(this.source)?this.source.map(fh):yp(fh(this.source));return this.calc(...e)}_start(){this.idle&&!mg(this._active)&&(this.idle=!1,gp(Wh(this),e=>{e.done=!1}),fp.skipAnimation?(Gf.batchedUpdates(()=>this.advance()),gg(this)):Ep.start(this))}_attach(){let e=1;gp(yp(this.source),t=>{dh(t)&&bh(t,this),Dm(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){gp(yp(this.source),e=>{dh(e)&&yh(e,this)}),this._active.clear(),gg(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=yp(this.source).reduce((e,t)=>Math.max(e,(Dm(t)?t.priority:0)+1),0))}};function hg(e){return!1!==e.idle}function mg(e){return!e.size||Array.from(e).every(hg)}function gg(e){e.idle||(e.idle=!0,gp(Wh(e),e=>{e.done=!0}),hh(e,{type:"idle",parent:e}))}var bg=(e,...t)=>new pg(e,t);fp.assign({createStringInterpolator:jh,to:(e,t)=>new pg(e,t)}),Ep.advance;var yg=/^--/;function vg(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||yg.test(e)||wg.hasOwnProperty(e)&&wg[e]?(""+t).trim():t+"px"}var xg={},wg={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Sg=["Webkit","Ms","Moz","O"];wg=Object.keys(wg).reduce((e,t)=>(Sg.forEach(n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t]),e),wg);var kg=/^(matrix|translate|scale|rotate|skew)/,Cg=/^(translate)/,Mg=/^(rotate|skew)/,Pg=(e,t)=>hp.num(e)&&0!==e?e+t:e,Tg=(e,t)=>hp.arr(e)?e.every(e=>Tg(e,t)):hp.num(e)?e===t:parseFloat(e)===t,Og=class extends Gh{constructor({x:e,y:t,z:n,...r}){const o=[],i=[];(e||t||n)&&(o.push([e||0,t||0,n||0]),i.push(e=>[`translate3d(${e.map(e=>Pg(e,"px")).join(",")})`,Tg(e,0)])),bp(r,(e,t)=>{if("transform"===t)o.push([e||""]),i.push(e=>[e,""===e]);else if(kg.test(t)){if(delete r[t],hp.und(e))return;const n=Cg.test(t)?"px":Mg.test(t)?"deg":"";o.push(yp(e)),i.push("rotate3d"===t?([e,t,r,o])=>[`rotate3d(${e},${t},${r},${Pg(o,n)})`,Tg(o,0)]:e=>[`${t}(${e.map(e=>Pg(e,n)).join(",")})`,Tg(e,t.startsWith("scale")?1:0)])}}),o.length&&(r.transform=new jg(o,i)),super(r)}},jg=class extends mh{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return gp(this.inputs,(n,r)=>{const o=fh(n[0]),[i,a]=this.transforms[r](hp.arr(o)?o:n.map(fh));e+=" "+i,t=t&&a}),t?"none":e}observerAdded(e){1==e&&gp(this.inputs,e=>gp(e,e=>dh(e)&&bh(e,this)))}observerRemoved(e){0==e&&gp(this.inputs,e=>gp(e,e=>dh(e)&&yh(e,this)))}eventObserved(e){"change"==e.type&&(this._value=null),hh(this,e)}};fp.assign({batchedUpdates:Pe.unstable_batchedUpdates,createStringInterpolator:jh,colors:{transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199}});var _g=((e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=e=>new Gh(e),getComponentProps:r=e=>e}={})=>{const o={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},i=e=>{const t=tm(e)||"Anonymous";return(e=hp.str(e)?i[e]||(i[e]=Zh(e,o)):e[em]||(e[em]=Zh(e,o))).displayName=`Animated(${t})`,e};return bp(e,(t,n)=>{hp.arr(e)&&(n=tm(t)),i[n]=i(t)}),{animated:i}})(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,{className:r,style:o,children:i,scrollTop:a,scrollLeft:s,viewBox:l,...c}=t,u=Object.values(c),d=Object.keys(c).map(t=>n||e.hasAttribute(t)?t:xg[t]||(xg[t]=t.replace(/([A-Z])/g,e=>"-"+e.toLowerCase())));void 0!==i&&(e.textContent=i);for(const t in o)if(o.hasOwnProperty(t)){const n=vg(t,o[t]);yg.test(t)?e.style.setProperty(t,n):e.style[t]=n}d.forEach((t,n)=>{e.setAttribute(t,u[n])}),void 0!==r&&(e.className=r),void 0!==a&&(e.scrollTop=a),void 0!==s&&(e.scrollLeft=s),void 0!==l&&e.setAttribute("viewBox",l)},createAnimatedStyle:e=>new Og(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),Dg=_g.animated;function Eg(){return Eg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Eg.apply(this,arguments)}var Rg={pointerEvents:"none",position:"absolute",zIndex:10,top:0,left:0},Ag=function(e,t){return"translate("+e+"px, "+t+"px)"},Ig=(0,G.memo)(function(e){var t,n=e.position,r=e.anchor,o=e.children,i=Ck(),a=lk(),s=a.animate,l=a.config,c=yk(),u=c[0],d=c[1],f=(0,G.useRef)(!1),p=void 0,h=!1,m=d.width>0&&d.height>0,g=Math.round(n[0]),b=Math.round(n[1]);m&&("top"===r?(g-=d.width/2,b-=d.height+14):"right"===r?(g+=14,b-=d.height/2):"bottom"===r?(g-=d.width/2,b+=14):"left"===r?(g-=d.width+14,b-=d.height/2):"center"===r&&(g-=d.width/2,b-=d.height/2),p={transform:Ag(g,b)},f.current||(h=!0),f.current=[g,b]);var y=ug({to:p,config:l,immediate:!s||h}),v=Eg({},Rg,i.tooltip.wrapper,{transform:null!=(t=y.transform)?t:Ag(g,b),opacity:y.transform?1:0});return(0,le.jsx)(Dg.div,{ref:u,style:v,children:o})});Ig.displayName="TooltipWrapper";var Fg=(0,G.memo)(function(e){var t=e.size,n=void 0===t?12:t,r=e.color,o=e.style;return(0,le.jsx)("span",{style:Eg({display:"block",width:n,height:n,background:r},void 0===o?{}:o)})}),Lg=(0,G.memo)(function(e){var t,n=e.id,r=e.value,o=e.format,i=e.enableChip,a=void 0!==i&&i,s=e.color,l=e.renderContent,c=Ck(),u=xk(o);if("function"==typeof l)t=l();else{var d=r;void 0!==u&&void 0!==d&&(d=u(d)),t=(0,le.jsxs)("div",{style:c.tooltip.basic,children:[a&&(0,le.jsx)(Fg,{color:s,style:c.tooltip.chip}),void 0!==d?(0,le.jsxs)("span",{children:[n,": ",(0,le.jsx)("strong",{children:""+d})]}):n]})}return(0,le.jsx)("div",{style:c.tooltip.container,children:t})}),Ng={width:"100%",borderCollapse:"collapse"},zg=(0,G.memo)(function(e){var t,n=e.title,r=e.rows,o=void 0===r?[]:r,i=e.renderContent,a=Ck();return o.length?(t="function"==typeof i?i():(0,le.jsxs)("div",{children:[n&&n,(0,le.jsx)("table",{style:Eg({},Ng,a.tooltip.table),children:(0,le.jsx)("tbody",{children:o.map(function(e,t){return(0,le.jsx)("tr",{children:e.map(function(e,t){return(0,le.jsx)("td",{style:a.tooltip.tableCell,children:e},t)})},t)})})})]}),(0,le.jsx)("div",{style:a.tooltip.container,children:t})):null});zg.displayName="TableTooltip";var $g=(0,G.memo)(function(e){var t=e.x0,n=e.x1,r=e.y0,o=e.y1,i=Ck(),a=lk(),s=a.animate,l=a.config,c=(0,G.useMemo)(function(){return Eg({},i.crosshair.line,{pointerEvents:"none"})},[i.crosshair.line]),u=ug({x1:t,x2:n,y1:r,y2:o,config:l,immediate:!s});return(0,le.jsx)(Dg.line,Eg({},u,{fill:"none",style:c}))});$g.displayName="CrosshairLine";var Vg=(0,G.memo)(function(e){var t,n,r=e.width,o=e.height,i=e.type,a=e.x,s=e.y;return"cross"===i?(t={x0:a,x1:a,y0:0,y1:o},n={x0:0,x1:r,y0:s,y1:s}):"top-left"===i?(t={x0:a,x1:a,y0:0,y1:s},n={x0:0,x1:a,y0:s,y1:s}):"top"===i?t={x0:a,x1:a,y0:0,y1:s}:"top-right"===i?(t={x0:a,x1:a,y0:0,y1:s},n={x0:a,x1:r,y0:s,y1:s}):"right"===i?n={x0:a,x1:r,y0:s,y1:s}:"bottom-right"===i?(t={x0:a,x1:a,y0:s,y1:o},n={x0:a,x1:r,y0:s,y1:s}):"bottom"===i?t={x0:a,x1:a,y0:s,y1:o}:"bottom-left"===i?(t={x0:a,x1:a,y0:s,y1:o},n={x0:0,x1:a,y0:s,y1:s}):"left"===i?n={x0:0,x1:a,y0:s,y1:s}:"x"===i?t={x0:a,x1:a,y0:0,y1:o}:"y"===i&&(n={x0:0,x1:r,y0:s,y1:s}),(0,le.jsxs)(le.Fragment,{children:[t&&(0,le.jsx)($g,{x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1}),n&&(0,le.jsx)($g,{x0:n.x0,x1:n.x1,y0:n.y0,y1:n.y1})]})});Vg.displayName="Crosshair";var Bg=(0,G.createContext)({showTooltipAt:function(){},showTooltipFromEvent:function(){},hideTooltip:function(){}}),Wg={isVisible:!1,position:[null,null],content:null,anchor:null},Hg=(0,G.createContext)(Wg),qg=function(){var e=(0,G.useContext)(Bg);if(void 0===e)throw new Error("useTooltip must be used within a TooltipProvider");return e},Yg=function(){var e=function(){var e=(0,G.useContext)(Hg);if(void 0===e)throw new Error("useTooltipState must be used within a TooltipProvider");return e}();return function(e){return e.isVisible}(e)?(0,le.jsx)(Ig,{position:e.position,anchor:e.anchor,children:e.content}):null},Ug=function(e){var t=e.container,n=e.children,r=function(e){var t=(0,G.useState)(Wg),n=t[0],r=t[1],o=(0,G.useCallback)(function(e,t,n){var o=t[0],i=t[1];void 0===n&&(n="top"),r({isVisible:!0,position:[o,i],anchor:n,content:e})},[r]),i=(0,G.useCallback)(function(t,n,o){void 0===o&&(o="top");var i=e.current.getBoundingClientRect(),a=e.current.offsetWidth,s=a===i.width?1:a/i.width,l="touches"in n?n.touches[0]:n,c=l.clientX,u=l.clientY,d=(c-i.left)*s,f=(u-i.top)*s;"left"!==o&&"right"!==o||(o=d<i.width/2?"right":"left"),r({isVisible:!0,position:[d,f],anchor:o,content:t})},[e,r]),a=(0,G.useCallback)(function(){r(Wg)},[r]);return{actions:(0,G.useMemo)(function(){return{showTooltipAt:o,showTooltipFromEvent:i,hideTooltip:a}},[o,i,a]),state:n}}(t),o=r.actions,i=r.state;return(0,le.jsx)(Bg.Provider,{value:o,children:(0,le.jsx)(Hg.Provider,{value:i,children:n})})},Gg=a(5364),Xg=a(8156),Qg=a(3560);function Kg(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Zg=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Jg=new RegExp(Zg.source,"g");function eb(e,t){var n,r,o,i=Zg.lastIndex=Jg.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=Zg.exec(e))&&(r=Jg.exec(t));)(o=r.index)>i&&(o=t.slice(i,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:Kg(n,r)})),i=Jg.lastIndex;return i<t.length&&(o=t.slice(i),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}var tb=a(5015),nb=a(1648);function rb(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function ob(e){this._context=e}function ib(){}function ab(e){this._context=e}function sb(e){this._context=e}function lb(e,t){this._basis=new ob(e),this._beta=t}ob.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:rb(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:rb(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},ab.prototype={areaStart:ib,areaEnd:ib,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:rb(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},sb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:rb(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},lb.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r,o=e[0],i=t[0],a=e[n]-o,s=t[n]-i,l=-1;++l<=n;)r=l/n,this._basis.point(this._beta*e[l]+(1-this._beta)*(o+r*a),this._beta*t[l]+(1-this._beta)*(i+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const cb=function e(t){function n(e){return 1===t?new ob(e):new lb(e,t)}return n.beta=function(t){return e(+t)},n}(.85);function ub(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function db(e,t){this._context=e,this._k=(1-t)/6}db.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:ub(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:ub(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const fb=function e(t){function n(e){return new db(e,t)}return n.tension=function(t){return e(+t)},n}(0);function pb(e,t){this._context=e,this._k=(1-t)/6}pb.prototype={areaStart:ib,areaEnd:ib,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:ub(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const hb=function e(t){function n(e){return new pb(e,t)}return n.tension=function(t){return e(+t)},n}(0);function mb(e,t){this._context=e,this._k=(1-t)/6}mb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ub(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const gb=function e(t){function n(e){return new mb(e,t)}return n.tension=function(t){return e(+t)},n}(0),bb=Math.abs,yb=Math.atan2,vb=Math.cos,xb=Math.max,wb=Math.min,Sb=Math.sin,kb=Math.sqrt,Cb=1e-12,Mb=Math.PI,Pb=Mb/2,Tb=2*Mb;function Ob(e){return e>=1?Pb:e<=-1?-Pb:Math.asin(e)}function jb(e,t,n){var r=e._x1,o=e._y1,i=e._x2,a=e._y2;if(e._l01_a>Cb){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,o=(o*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Cb){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);i=(i*c+e._x1*e._l23_2a-t*e._l12_2a)/u,a=(a*c+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,o,i,a,e._x2,e._y2)}function _b(e,t){this._context=e,this._alpha=t}_b.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:jb(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Db=function e(t){function n(e){return t?new _b(e,t):new db(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function Eb(e,t){this._context=e,this._alpha=t}Eb.prototype={areaStart:ib,areaEnd:ib,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:jb(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Rb=function e(t){function n(e){return t?new Eb(e,t):new pb(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function Ab(e,t){this._context=e,this._alpha=t}Ab.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:jb(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Ib=function e(t){function n(e){return t?new Ab(e,t):new mb(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function Fb(e){this._context=e}function Lb(e){return new Fb(e)}function Nb(e){this._context=e}function zb(e){return e<0?-1:1}function $b(e,t,n){var r=e._x1-e._x0,o=t-e._x1,i=(e._y1-e._y0)/(r||o<0&&-0),a=(n-e._y1)/(o||r<0&&-0),s=(i*o+a*r)/(r+o);return(zb(i)+zb(a))*Math.min(Math.abs(i),Math.abs(a),.5*Math.abs(s))||0}function Vb(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Bb(e,t,n){var r=e._x0,o=e._y0,i=e._x1,a=e._y1,s=(i-r)/3;e._context.bezierCurveTo(r+s,o+s*t,i-s,a-s*n,i,a)}function Wb(e){this._context=e}function Hb(e){this._context=new qb(e)}function qb(e){this._context=e}function Yb(e){this._context=e}function Ub(e){var t,n,r=e.length-1,o=new Array(r),i=new Array(r),a=new Array(r);for(o[0]=0,i[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)o[t]=1,i[t]=4,a[t]=4*e[t]+2*e[t+1];for(o[r-1]=2,i[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=o[t]/i[t-1],i[t]-=n,a[t]-=n*a[t-1];for(o[r-1]=a[r-1]/i[r-1],t=r-2;t>=0;--t)o[t]=(a[t]-o[t+1])/i[t];for(i[r-1]=(e[r]+o[r-1])/2,t=0;t<r-1;++t)i[t]=2*e[t+1]-o[t+1];return[o,i]}function Gb(e,t){this._context=e,this._t=t}function Xb(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function Qb(e){var t=e.map(Kb);return Xb(e).sort(function(e,n){return t[e]-t[n]})}function Kb(e){for(var t,n=0,r=-1,o=e.length;++r<o;)(t=+e[r][1])&&(n+=t);return n}function Zb(e){for(var t,n=-1,r=0,o=e.length,i=-1/0;++n<o;)(t=+e[n][1])>i&&(i=t,r=n);return r}function Jb(e,t){if((o=e.length)>1)for(var n,r,o,i=1,a=e[t[0]],s=a.length;i<o;++i)for(r=a,a=e[t[i]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function ey(e,t){if((s=e.length)>0)for(var n,r,o,i,a,s,l=0,c=e[t[0]].length;l<c;++l)for(i=a=0,n=0;n<s;++n)(o=(r=e[t[n]][l])[1]-r[0])>0?(r[0]=i,r[1]=i+=o):o<0?(r[1]=a,r[0]=a+=o):(r[0]=0,r[1]=o)}Fb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}},Nb.prototype={areaStart:ib,areaEnd:ib,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}},Wb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Bb(this,this._t0,Vb(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Bb(this,Vb(this,n=$b(this,e,t)),n);break;default:Bb(this,this._t0,n=$b(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(Hb.prototype=Object.create(Wb.prototype)).point=function(e,t){Wb.prototype.point.call(this,t,e)},qb.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,o,i){this._context.bezierCurveTo(t,e,r,n,i,o)}},Yb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=Ub(e),o=Ub(t),i=0,a=1;a<n;++i,++a)this._context.bezierCurveTo(r[0][i],o[0][i],r[1][i],o[1][i],e[a],t[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},Gb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};class ty extends Map{constructor(e,t=ry){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(ny(this,e))}has(e){return super.has(ny(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}(this,e))}}function ny({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function ry(e){return null!==e&&"object"==typeof e?e.valueOf():e}function oy(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function iy(e,t){switch(arguments.length){case 0:break;case 1:"function"==typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"==typeof t?this.interpolator(t):this.range(t)}return this}Set;const ay=Symbol("implicit");function sy(){var e=new ty,t=[],n=[],r=ay;function o(o){let i=e.get(o);if(void 0===i){if(r!==ay)return r;e.set(o,i=t.push(o)-1)}return n[i%n.length]}return o.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new ty;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return o},o.range=function(e){return arguments.length?(n=Array.from(e),o):n.slice()},o.unknown=function(e){return arguments.length?(r=e,o):r},o.copy=function(){return sy(t,n).unknown(r)},oy.apply(o,arguments),o}function ly(e){for(var t=e.length/6|0,n=new Array(t),r=0;r<t;)n[r]="#"+e.slice(6*r,6*++r);return n}function cy(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function uy(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function dy(){}var fy=.7,py=1/fy,hy="\\s*([+-]?\\d+)\\s*",my="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",gy="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",by=/^#([0-9a-f]{3,8})$/,yy=new RegExp(`^rgb\\(${hy},${hy},${hy}\\)$`),vy=new RegExp(`^rgb\\(${gy},${gy},${gy}\\)$`),xy=new RegExp(`^rgba\\(${hy},${hy},${hy},${my}\\)$`),wy=new RegExp(`^rgba\\(${gy},${gy},${gy},${my}\\)$`),Sy=new RegExp(`^hsl\\(${my},${gy},${gy}\\)$`),ky=new RegExp(`^hsla\\(${my},${gy},${gy},${my}\\)$`),Cy={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function My(){return this.rgb().formatHex()}function Py(){return this.rgb().formatRgb()}function Ty(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=by.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Oy(t):3===n?new Ey(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?jy(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?jy(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=yy.exec(e))?new Ey(t[1],t[2],t[3],1):(t=vy.exec(e))?new Ey(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=xy.exec(e))?jy(t[1],t[2],t[3],t[4]):(t=wy.exec(e))?jy(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Sy.exec(e))?Ny(t[1],t[2]/100,t[3]/100,1):(t=ky.exec(e))?Ny(t[1],t[2]/100,t[3]/100,t[4]):Cy.hasOwnProperty(e)?Oy(Cy[e]):"transparent"===e?new Ey(NaN,NaN,NaN,0):null}function Oy(e){return new Ey(e>>16&255,e>>8&255,255&e,1)}function jy(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ey(e,t,n,r)}function _y(e){return e instanceof dy||(e=Ty(e)),e?new Ey((e=e.rgb()).r,e.g,e.b,e.opacity):new Ey}function Dy(e,t,n,r){return 1===arguments.length?_y(e):new Ey(e,t,n,null==r?1:r)}function Ey(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Ry(){return`#${Ly(this.r)}${Ly(this.g)}${Ly(this.b)}`}function Ay(){const e=Iy(this.opacity);return`${1===e?"rgb(":"rgba("}${Fy(this.r)}, ${Fy(this.g)}, ${Fy(this.b)}${1===e?")":`, ${e})`}`}function Iy(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Fy(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ly(e){return((e=Fy(e))<16?"0":"")+e.toString(16)}function Ny(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new $y(e,t,n,r)}function zy(e){if(e instanceof $y)return new $y(e.h,e.s,e.l,e.opacity);if(e instanceof dy||(e=Ty(e)),!e)return new $y;if(e instanceof $y)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new $y(a,s,l,e.opacity)}function $y(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Vy(e){return(e=(e||0)%360)<0?e+360:e}function By(e){return Math.max(0,Math.min(1,e||0))}function Wy(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function Hy(e,t,n,r,o){var i=e*e,a=i*e;return((1-3*e+3*i-a)*t+(4-6*i+3*a)*n+(1+3*e+3*i-3*a)*r+a*o)/6}cy(dy,Ty,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:My,formatHex:My,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return zy(this).formatHsl()},formatRgb:Py,toString:Py}),cy(Ey,Dy,uy(dy,{brighter(e){return e=null==e?py:Math.pow(py,e),new Ey(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?fy:Math.pow(fy,e),new Ey(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ey(Fy(this.r),Fy(this.g),Fy(this.b),Iy(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ry,formatHex:Ry,formatHex8:function(){return`#${Ly(this.r)}${Ly(this.g)}${Ly(this.b)}${Ly(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Ay,toString:Ay})),cy($y,function(e,t,n,r){return 1===arguments.length?zy(e):new $y(e,t,n,null==r?1:r)},uy(dy,{brighter(e){return e=null==e?py:Math.pow(py,e),new $y(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?fy:Math.pow(fy,e),new $y(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new Ey(Wy(e>=240?e-240:e+120,o,r),Wy(e,o,r),Wy(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new $y(Vy(this.h),By(this.s),By(this.l),Iy(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Iy(this.opacity);return`${1===e?"hsl(":"hsla("}${Vy(this.h)}, ${100*By(this.s)}%, ${100*By(this.l)}%${1===e?")":`, ${e})`}`}}));const qy=e=>()=>e;function Yy(e,t){return function(n){return e+n*t}}function Uy(e,t){var n=t-e;return n?Yy(e,n):qy(isNaN(e)?t:e)}const Gy=function e(t){var n=function(e){return 1===(e=+e)?Uy:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):qy(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=Dy(e)).r,(t=Dy(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=Uy(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function Xy(e){return function(t){var n,r,o=t.length,i=new Array(o),a=new Array(o),s=new Array(o);for(n=0;n<o;++n)r=Dy(t[n]),i[n]=r.r||0,a[n]=r.g||0,s[n]=r.b||0;return i=e(i),a=e(a),s=e(s),r.opacity=1,function(e){return r.r=i(e),r.g=a(e),r.b=s(e),r+""}}}var Qy=Xy(function(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),o=e[r],i=e[r+1],a=r>0?e[r-1]:2*o-i,s=r<t-1?e[r+2]:2*i-o;return Hy((n-r/t)*t,a,o,i,s)}});Xy(function(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),o=e[(r+t-1)%t],i=e[r%t],a=e[(r+1)%t],s=e[(r+2)%t];return Hy((n-r/t)*t,o,i,a,s)}});const Ky=e=>Qy(e[e.length-1]);var Zy=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(ly);const Jy=Ky(Zy);var ev=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(ly);const tv=Ky(ev);var nv=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(ly);const rv=Ky(nv);var ov=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(ly);const iv=Ky(ov);var av=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(ly);const sv=Ky(av);var lv=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(ly);const cv=Ky(lv);var uv=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(ly);const dv=Ky(uv);var fv=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(ly);const pv=Ky(fv);var hv=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(ly);const mv=Ky(hv);var gv=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(ly);const bv=Ky(gv);var yv=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(ly);const vv=Ky(yv);var xv=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(ly);const wv=Ky(xv);var Sv=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(ly);const kv=Ky(Sv);var Cv=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(ly);const Mv=Ky(Cv);var Pv=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(ly);const Tv=Ky(Pv);var Ov=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(ly);const jv=Ky(Ov);var _v=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(ly);const Dv=Ky(_v);var Ev=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(ly);const Rv=Ky(Ev);var Av=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(ly);const Iv=Ky(Av);var Fv=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(ly);const Lv=Ky(Fv);var Nv=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(ly);const zv=Ky(Nv);var $v=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(ly);const Vv=Ky($v);var Bv=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(ly);const Wv=Ky(Bv);var Hv=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(ly);const qv=Ky(Hv);var Yv=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(ly);const Uv=Ky(Yv);var Gv=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(ly);const Xv=Ky(Gv);var Qv=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(ly);const Kv=Ky(Qv),Zv=ly("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Jv=ly("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),ex=ly("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),tx=ly("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),nx=ly("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),rx=ly("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),ox=ly("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),ix=ly("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),ax=ly("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f");function sx(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}const lx=sx(ly("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var cx=sx(ly("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),ux=sx(ly("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),dx=sx(ly("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));const fx=Math.PI/180,px=180/Math.PI;var hx=-.29227,mx=-.90649,gx=1.97294,bx=-1.7884503806,yx=3.5172982438,vx=-.6557636667999999;function xx(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof wx)return new wx(e.h,e.s,e.l,e.opacity);e instanceof Ey||(e=_y(e));var t=e.r/255,n=e.g/255,r=e.b/255,o=(vx*r+bx*t-yx*n)/(vx+bx-yx),i=r-o,a=(gx*(n-o)-hx*i)/mx,s=Math.sqrt(a*a+i*i)/(gx*o*(1-o)),l=s?Math.atan2(a,i)*px-120:NaN;return new wx(l<0?l+360:l,s,o,e.opacity)}(e):new wx(e,t,n,null==r?1:r)}function wx(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Sx(e){return function t(n){function r(t,r){var o=e((t=xx(t)).h,(r=xx(r)).h),i=Uy(t.s,r.s),a=Uy(t.l,r.l),s=Uy(t.opacity,r.opacity);return function(e){return t.h=o(e),t.s=i(e),t.l=a(Math.pow(e,n)),t.opacity=s(e),t+""}}return n=+n,r.gamma=t,r}(1)}cy(wx,xx,uy(dy,{brighter(e){return e=null==e?py:Math.pow(py,e),new wx(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?fy:Math.pow(fy,e),new wx(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*fx,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),o=Math.sin(e);return new Ey(255*(t+n*(-.14861*r+1.78277*o)),255*(t+n*(hx*r+mx*o)),255*(t+n*(gx*r)),this.opacity)}})),Sx(function(e,t){var n=t-e;return n?Yy(e,n>180||n<-180?n-360*Math.round(n/360):n):qy(isNaN(e)?t:e)});var kx=Sx(Uy),Cx=kx(xx(-100,.75,.35),xx(80,1.5,.8)),Mx=kx(xx(260,.75,.35),xx(80,1.5,.8)),Px=xx();const Tx=kx(xx(300,.5,0),xx(-240,.5,1));var Ox=Dy(),jx=Math.PI/3,_x=2*Math.PI/3;var Dx=a(8090),Ex=(a(6449),a(1882));function Rx(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Ax(e){return(e=Rx(Math.abs(e)))?e[1]:NaN}var Ix,Fx=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Lx(e){if(!(t=Fx.exec(e)))throw new Error("invalid format: "+e);var t;return new Nx({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Nx(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function zx(e,t){var n=Rx(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}Lx.prototype=Nx.prototype,Nx.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const $x={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return zx(100*e,t)},r:zx,s:function(e,t){var n=Rx(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(Ix=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+Rx(e,Math.max(0,t+i-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function Vx(e){return e}var Bx,Wx,Hx,qx=Array.prototype.map,Yx=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];Bx=function(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?Vx:(t=qx.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var o=e.length,i=[],a=0,s=t[0],l=0;o>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(e.substring(o-=s,o+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return i.reverse().join(n)}),o=void 0===e.currency?"":e.currency[0]+"",i=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?Vx:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(qx.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"-":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function d(e){var t=(e=Lx(e)).fill,n=e.align,d=e.sign,f=e.symbol,p=e.zero,h=e.width,m=e.comma,g=e.precision,b=e.trim,y=e.type;"n"===y?(m=!0,y="g"):$x[y]||(void 0===g&&(g=12),b=!0,y="g"),(p||"0"===t&&"="===n)&&(p=!0,t="0",n="=");var v="$"===f?o:"#"===f&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",x="$"===f?i:/[%p]/.test(y)?l:"",w=$x[y],S=/[defgprs%]/.test(y);function k(e){var o,i,l,f=v,k=x;if("c"===y)k=w(e)+k,e="";else{var C=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:w(Math.abs(e),g),b&&(e=function(e){e:for(var t,n=e.length,r=1,o=-1;r<n;++r)switch(e[r]){case".":o=t=r;break;case"0":0===o&&(o=r),t=r;break;default:if(!+e[r])break e;o>0&&(o=0)}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),C&&0===+e&&"+"!==d&&(C=!1),f=(C?"("===d?d:c:"-"===d||"("===d?"":d)+f,k=("s"===y?Yx[8+Ix/3]:"")+k+(C&&"("===d?")":""),S)for(o=-1,i=e.length;++o<i;)if(48>(l=e.charCodeAt(o))||l>57){k=(46===l?a+e.slice(o+1):e.slice(o))+k,e=e.slice(0,o);break}}m&&!p&&(e=r(e,1/0));var M=f.length+e.length+k.length,P=M<h?new Array(h-M+1).join(t):"";switch(m&&p&&(e=r(P+e,P.length?h-k.length:1/0),P=""),n){case"<":e=f+e+k+P;break;case"=":e=f+P+e+k;break;case"^":e=P.slice(0,M=P.length>>1)+f+e+k+P.slice(M);break;default:e=P+f+e+k}return s(e)}return g=void 0===g?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),k.toString=function(){return e+""},k}return{format:d,formatPrefix:function(e,t){var n=d(((e=Lx(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(Ax(t)/3))),o=Math.pow(10,-r),i=Yx[8+r/3];return function(e){return n(o*e)+i}}}}({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Wx=Bx.format,Hx=Bx.formatPrefix;var Ux=new Date,Gx=new Date;function Xx(e,t,n,r){function o(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return o.floor=function(t){return e(t=new Date(+t)),t},o.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},o.round=function(e){var t=o(e),n=o.ceil(e);return e-t<n-e?t:n},o.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},o.range=function(n,r,i){var a,s=[];if(n=o.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return s;do{s.push(a=new Date(+n)),t(n,i),e(n)}while(a<n&&n<r);return s},o.filter=function(n){return Xx(function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););})},n&&(o.count=function(t,r){return Ux.setTime(+t),Gx.setTime(+r),e(Ux),e(Gx),Math.floor(n(Ux,Gx))},o.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(r?function(t){return r(t)%e===0}:function(t){return o.count(0,t)%e===0}):o:null}),o}var Qx=1e3,Kx=6e4,Zx=36e5,Jx=864e5,ew=6048e5;function tw(e){return Xx(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+7*t)},function(e,t){return(t-e)/ew})}var nw=tw(0),rw=tw(1),ow=tw(2),iw=tw(3),aw=tw(4),sw=tw(5),lw=tw(6),cw=(nw.range,rw.range,ow.range,iw.range,aw.range,sw.range,lw.range,Xx(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/Jx},function(e){return e.getUTCDate()-1}));const uw=cw;function dw(e){return Xx(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+7*t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Kx)/ew})}cw.range;var fw=dw(0),pw=dw(1),hw=dw(2),mw=dw(3),gw=dw(4),bw=dw(5),yw=dw(6),vw=fw.range,xw=(pw.range,hw.range,mw.range,gw.range,bw.range,yw.range,Xx(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Kx)/Jx},function(e){return e.getDate()-1}));const ww=xw;var Sw=xw.range,kw=Xx(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});kw.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Xx(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)}):null};const Cw=kw;kw.range;var Mw=Xx(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});Mw.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Xx(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null};const Pw=Mw;function Tw(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Ow(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function jw(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}Mw.range;var _w,Dw,Ew,Rw,Aw,Iw={"-":"",_:" ",0:"0"},Fw=/^\s*\d+/,Lw=/^%/,Nw=/[\\^$*+?|[\]().{}]/g;function zw(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i<n?new Array(n-i+1).join(t)+o:o)}function $w(e){return e.replace(Nw,"\\$&")}function Vw(e){return new RegExp("^(?:"+e.map($w).join("|")+")","i")}function Bw(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function Ww(e,t,n){var r=Fw.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Hw(e,t,n){var r=Fw.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function qw(e,t,n){var r=Fw.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Yw(e,t,n){var r=Fw.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Uw(e,t,n){var r=Fw.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Gw(e,t,n){var r=Fw.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Xw(e,t,n){var r=Fw.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Qw(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Kw(e,t,n){var r=Fw.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function Zw(e,t,n){var r=Fw.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Jw(e,t,n){var r=Fw.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function eS(e,t,n){var r=Fw.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function tS(e,t,n){var r=Fw.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function nS(e,t,n){var r=Fw.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function rS(e,t,n){var r=Fw.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function oS(e,t,n){var r=Fw.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function iS(e,t,n){var r=Fw.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function aS(e,t,n){var r=Lw.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function sS(e,t,n){var r=Fw.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function lS(e,t,n){var r=Fw.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function cS(e,t){return zw(e.getDate(),t,2)}function uS(e,t){return zw(e.getHours(),t,2)}function dS(e,t){return zw(e.getHours()%12||12,t,2)}function fS(e,t){return zw(1+ww.count(Cw(e),e),t,3)}function pS(e,t){return zw(e.getMilliseconds(),t,3)}function hS(e,t){return pS(e,t)+"000"}function mS(e,t){return zw(e.getMonth()+1,t,2)}function gS(e,t){return zw(e.getMinutes(),t,2)}function bS(e,t){return zw(e.getSeconds(),t,2)}function yS(e){var t=e.getDay();return 0===t?7:t}function vS(e,t){return zw(fw.count(Cw(e)-1,e),t,2)}function xS(e){var t=e.getDay();return t>=4||0===t?gw(e):gw.ceil(e)}function wS(e,t){return e=xS(e),zw(gw.count(Cw(e),e)+(4===Cw(e).getDay()),t,2)}function SS(e){return e.getDay()}function kS(e,t){return zw(pw.count(Cw(e)-1,e),t,2)}function CS(e,t){return zw(e.getFullYear()%100,t,2)}function MS(e,t){return zw((e=xS(e)).getFullYear()%100,t,2)}function PS(e,t){return zw(e.getFullYear()%1e4,t,4)}function TS(e,t){var n=e.getDay();return zw((e=n>=4||0===n?gw(e):gw.ceil(e)).getFullYear()%1e4,t,4)}function OS(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+zw(t/60|0,"0",2)+zw(t%60,"0",2)}function jS(e,t){return zw(e.getUTCDate(),t,2)}function _S(e,t){return zw(e.getUTCHours(),t,2)}function DS(e,t){return zw(e.getUTCHours()%12||12,t,2)}function ES(e,t){return zw(1+uw.count(Pw(e),e),t,3)}function RS(e,t){return zw(e.getUTCMilliseconds(),t,3)}function AS(e,t){return RS(e,t)+"000"}function IS(e,t){return zw(e.getUTCMonth()+1,t,2)}function FS(e,t){return zw(e.getUTCMinutes(),t,2)}function LS(e,t){return zw(e.getUTCSeconds(),t,2)}function NS(e){var t=e.getUTCDay();return 0===t?7:t}function zS(e,t){return zw(nw.count(Pw(e)-1,e),t,2)}function $S(e){var t=e.getUTCDay();return t>=4||0===t?aw(e):aw.ceil(e)}function VS(e,t){return e=$S(e),zw(aw.count(Pw(e),e)+(4===Pw(e).getUTCDay()),t,2)}function BS(e){return e.getUTCDay()}function WS(e,t){return zw(rw.count(Pw(e)-1,e),t,2)}function HS(e,t){return zw(e.getUTCFullYear()%100,t,2)}function qS(e,t){return zw((e=$S(e)).getUTCFullYear()%100,t,2)}function YS(e,t){return zw(e.getUTCFullYear()%1e4,t,4)}function US(e,t){var n=e.getUTCDay();return zw((e=n>=4||0===n?aw(e):aw.ceil(e)).getUTCFullYear()%1e4,t,4)}function GS(){return"+0000"}function XS(){return"%"}function QS(e){return+e}function KS(e){return Math.floor(+e/1e3)}_w=function(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,i=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=Vw(o),u=Bw(o),d=Vw(i),f=Bw(i),p=Vw(a),h=Bw(a),m=Vw(s),g=Bw(s),b=Vw(l),y=Bw(l),v={a:function(e){return a[e.getDay()]},A:function(e){return i[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:cS,e:cS,f:hS,g:MS,G:TS,H:uS,I:dS,j:fS,L:pS,m:mS,M:gS,p:function(e){return o[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:QS,s:KS,S:bS,u:yS,U:vS,V:wS,w:SS,W:kS,x:null,X:null,y:CS,Y:PS,Z:OS,"%":XS},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return i[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:jS,e:jS,f:AS,g:qS,G:US,H:_S,I:DS,j:ES,L:RS,m:IS,M:FS,p:function(e){return o[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:QS,s:KS,S:LS,u:NS,U:zS,V:VS,w:BS,W:WS,x:null,X:null,y:HS,Y:YS,Z:GS,"%":XS},w={a:function(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=h.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=b.exec(t.slice(n));return r?(e.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return C(e,t,n,r)},d:Jw,e:Jw,f:iS,g:Xw,G:Gw,H:tS,I:tS,j:eS,L:oS,m:Zw,M:nS,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:Kw,Q:sS,s:lS,S:rS,u:Hw,U:qw,V:Yw,w:Ww,W:Uw,x:function(e,t,r){return C(e,n,t,r)},X:function(e,t,n){return C(e,r,t,n)},y:Xw,Y:Gw,Z:Qw,"%":aS};function S(e,t){return function(n){var r,o,i,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(o=Iw[r=e.charAt(++s)])?r=e.charAt(++s):o="e"===r?" ":"0",(i=t[r])&&(r=i(n,o)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function k(e,t){return function(n){var r,o,i=jw(1900,void 0,1);if(C(i,e,n+="",0)!=n.length)return null;if("Q"in i)return new Date(i.Q);if("s"in i)return new Date(1e3*i.s+("L"in i?i.L:0));if(t&&!("Z"in i)&&(i.Z=0),"p"in i&&(i.H=i.H%12+12*i.p),void 0===i.m&&(i.m="q"in i?i.q:0),"V"in i){if(i.V<1||i.V>53)return null;"w"in i||(i.w=1),"Z"in i?(o=(r=Ow(jw(i.y,0,1))).getUTCDay(),r=o>4||0===o?rw.ceil(r):rw(r),r=uw.offset(r,7*(i.V-1)),i.y=r.getUTCFullYear(),i.m=r.getUTCMonth(),i.d=r.getUTCDate()+(i.w+6)%7):(o=(r=Tw(jw(i.y,0,1))).getDay(),r=o>4||0===o?pw.ceil(r):pw(r),r=ww.offset(r,7*(i.V-1)),i.y=r.getFullYear(),i.m=r.getMonth(),i.d=r.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),o="Z"in i?Ow(jw(i.y,0,1)).getUTCDay():Tw(jw(i.y,0,1)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(o+5)%7:i.w+7*i.U-(o+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,Ow(i)):Tw(i)}}function C(e,t,n,r){for(var o,i,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(o=t.charCodeAt(a++))){if(o=t.charAt(a++),!(i=w[o in Iw?t.charAt(a++):o])||(r=i(e,n,r))<0)return-1}else if(o!=n.charCodeAt(r++))return-1}return r}return v.x=S(n,v),v.X=S(r,v),v.c=S(t,v),x.x=S(n,x),x.X=S(r,x),x.c=S(t,x),{format:function(e){var t=S(e+="",v);return t.toString=function(){return e},t},parse:function(e){var t=k(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=k(e+="",!0);return t.toString=function(){return e},t}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),Dw=_w.format,Ew=_w.parse,Rw=_w.utcFormat,Aw=_w.utcParse;var ZS=a(1331),JS=a(4383),ek=a(2404),tk={background:"transparent",text:{fontFamily:"sans-serif",fontSize:11,fill:"#333333",outlineWidth:0,outlineColor:"transparent",outlineOpacity:1},axis:{domain:{line:{stroke:"transparent",strokeWidth:1}},ticks:{line:{stroke:"#777777",strokeWidth:1},text:{}},legend:{text:{fontSize:12}}},grid:{line:{stroke:"#dddddd",strokeWidth:1}},legends:{hidden:{symbol:{fill:"#333333",opacity:.6},text:{fill:"#333333",opacity:.6}},text:{},ticks:{line:{stroke:"#777777",strokeWidth:1},text:{fontSize:10}},title:{text:{}}},labels:{text:{}},markers:{lineColor:"#000000",lineStrokeWidth:1,text:{}},dots:{text:{}},tooltip:{container:{background:"white",color:"inherit",fontSize:"inherit",borderRadius:"2px",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.25)",padding:"5px 9px"},basic:{whiteSpace:"pre",display:"flex",alignItems:"center"},chip:{marginRight:7},table:{},tableCell:{padding:"3px 5px"},tableCellValue:{fontWeight:"bold"}},crosshair:{line:{stroke:"#000000",strokeWidth:1,strokeOpacity:.75,strokeDasharray:"6 6"}},annotations:{text:{fontSize:13,outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1},link:{stroke:"#000000",strokeWidth:1,outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1},outline:{fill:"none",stroke:"#000000",strokeWidth:2,outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1},symbol:{fill:"#000000",outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1}}};function nk(){return nk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nk.apply(this,arguments)}function rk(e,t){return rk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},rk(e,t)}function ok(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}var ik=["axis.ticks.text","axis.legend.text","legends.title.text","legends.text","legends.ticks.text","legends.title.text","labels.text","dots.text","markers.text","annotations.text"],ak=(0,G.createContext)(),sk=function(e){var t=e.children,n=e.animate,r=void 0===n||n,o=e.config,i=void 0===o?"default":o,a=(0,G.useMemo)(function(){var e=tb(i)?gm[i]:i;return{animate:r,config:e}},[r,i]);return(0,le.jsx)(ak.Provider,{value:a,children:t})},lk=function(){return(0,G.useContext)(ak)},ck=function(e){var t=lk(),n=t.animate,r=t.config,o=function(e){var t=(0,G.useRef)();return(0,G.useEffect)(function(){t.current=e},[e]),t.current}(e),i=(0,G.useMemo)(function(){return eb(o,e)},[o,e]),a=ug({from:{value:0},to:{value:1},reset:!0,config:r,immediate:!n}).value;return bg(a,i)},uk={basis:function(e){return new ob(e)},basisClosed:function(e){return new ab(e)},basisOpen:function(e){return new sb(e)},bundle:cb,cardinal:fb,cardinalClosed:hb,cardinalOpen:gb,catmullRom:Db,catmullRomClosed:Rb,catmullRomOpen:Ib,linear:Lb,linearClosed:function(e){return new Nb(e)},monotoneX:function(e){return new Wb(e)},monotoneY:function(e){return new Hb(e)},natural:function(e){return new Yb(e)},step:function(e){return new Gb(e,.5)},stepAfter:function(e){return new Gb(e,1)},stepBefore:function(e){return new Gb(e,0)}},dk=Object.keys(uk),fk=(dk.filter(function(e){return e.endsWith("Closed")}),nb(dk,"bundle","basisClosed","basisOpen","cardinalClosed","cardinalOpen","catmullRomClosed","catmullRomOpen","linearClosed"),nb(dk,"bundle","basisClosed","basisOpen","cardinalClosed","cardinalOpen","catmullRomClosed","catmullRomOpen","linearClosed"),function(e){if(!uk[e])throw new TypeError("'"+e+"', is not a valid curve interpolator identifier.");return uk[e]}),pk={ascending:Qb,descending:function(e){return Qb(e).reverse()},insideOut:function(e){var t,n,r=e.length,o=e.map(Kb),i=function(e){var t=e.map(Zb);return Xb(e).sort(function(e,n){return t[e]-t[n]})}(e),a=0,s=0,l=[],c=[];for(t=0;t<r;++t)n=i[t],a<s?(a+=o[n],l.push(n)):(s+=o[n],c.push(n));return c.reverse().concat(l)},none:Xb,reverse:function(e){return Xb(e).reverse()}},hk=(Object.keys(pk),{expand:function(e,t){if((r=e.length)>0){for(var n,r,o,i=0,a=e[0].length;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}Jb(e,t)}},diverging:ey,none:Jb,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,o=e[t[0]],i=o.length;r<i;++r){for(var a=0,s=0;a<n;++a)s+=e[a][r][1]||0;o[r][1]+=o[r][0]=-s/2}Jb(e,t)}},wiggle:function(e,t){if((o=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,o,i=0,a=1;a<r;++a){for(var s=0,l=0,c=0;s<o;++s){for(var u=e[t[s]],d=u[a][1]||0,f=(d-(u[a-1][1]||0))/2,p=0;p<s;++p){var h=e[t[p]];f+=(h[a][1]||0)-(h[a-1][1]||0)}l+=d,c+=f*d}n[a-1][1]+=n[a-1][0]=i,l&&(i-=c/l)}n[a-1][1]+=n[a-1][0]=i,Jb(e,t)}}}),mk=(Object.keys(hk),{nivo:["#d76445","#f47560","#e8c1a0","#97e3d5","#61cdbb","#00b0a7"],BrBG:Dx(Zy),PRGn:Dx(ev),PiYG:Dx(nv),PuOr:Dx(ov),RdBu:Dx(av),RdGy:Dx(lv),RdYlBu:Dx(uv),RdYlGn:Dx(fv),spectral:Dx(hv),blues:Dx(gv),greens:Dx(yv),greys:Dx(xv),oranges:Dx(Sv),purples:Dx(Cv),reds:Dx(Pv),BuGn:Dx(Ov),BuPu:Dx(_v),GnBu:Dx(Ev),OrRd:Dx(Av),PuBuGn:Dx(Fv),PuBu:Dx(Nv),PuRd:Dx($v),RdPu:Dx(Bv),YlGnBu:Dx(Hv),YlGn:Dx(Yv),YlOrBr:Dx(Gv),YlOrRd:Dx(Qv)}),gk=(Object.keys(mk),Dx(Zy),Dx(ev),Dx(nv),Dx(ov),Dx(av),Dx(lv),Dx(uv),Dx(fv),Dx(hv),Dx(gv),Dx(yv),Dx(xv),Dx(Sv),Dx(Cv),Dx(Pv),Dx(Ov),Dx(_v),Dx(Ev),Dx(Av),Dx(Fv),Dx(Nv),Dx($v),Dx(Bv),Dx(Hv),Dx(Yv),Dx(Gv),Dx(Qv),sy(ax),{top:0,right:0,bottom:0,left:0}),bk=function(e,t,n){return void 0===n&&(n={}),(0,G.useMemo)(function(){var r=nk({},gk,n);return{margin:r,innerWidth:e-r.left-r.right,innerHeight:t-r.top-r.bottom,outerWidth:e,outerHeight:t}},[e,t,n.top,n.right,n.bottom,n.left])},yk=function(){var e=(0,G.useRef)(null),t=(0,G.useState)({left:0,top:0,width:0,height:0}),n=t[0],r=t[1],o=(0,G.useState)(function(){return"undefined"==typeof ResizeObserver?null:new ResizeObserver(function(e){var t=e[0];return r(t.contentRect)})})[0];return(0,G.useEffect)(function(){return e.current&&null!==o&&o.observe(e.current),function(){null!==o&&o.disconnect()}},[]),[e,n]},vk=function(e){return"function"==typeof e?e:"string"==typeof e?0===e.indexOf("time:")?Dw(e.slice("5")):Wx(e):function(e){return""+e}},xk=function(e){return(0,G.useMemo)(function(){return vk(e)},[e])},wk=(0,G.createContext)(),Sk={},kk=function(e){var t=e.theme,n=void 0===t?Sk:t,r=e.children,o=function(e){return(0,G.useMemo)(function(){return function(e,t){var n=Gg({},e,t);return ik.forEach(function(e){Qg(n,e,function(e,t){return nk({},t,e)}(Xg(n,e),n.text))}),n}(tk,e)},[e])}(n);return(0,le.jsx)(wk.Provider,{value:o,children:r})},Ck=function(){return(0,G.useContext)(wk)},Mk=["outlineWidth","outlineColor","outlineOpacity"],Pk=function(e){return e.outlineWidth,e.outlineColor,e.outlineOpacity,ok(e,Mk)},Tk=function(e){var t=e.children,n=e.condition,r=e.wrapper;return n?(0,G.cloneElement)(r,{},t):t},Ok={position:"relative"},jk=function(e){var t=e.children,n=e.theme,r=e.renderWrapper,o=void 0===r||r,i=e.isInteractive,a=void 0===i||i,s=e.animate,l=e.motionConfig,c=(0,G.useRef)(null);return(0,le.jsx)(kk,{theme:n,children:(0,le.jsx)(sk,{animate:s,config:l,children:(0,le.jsx)(Ug,{container:c,children:(0,le.jsxs)(Tk,{condition:o,wrapper:(0,le.jsx)("div",{style:Ok,ref:c}),children:[t,a&&(0,le.jsx)(Yg,{})]})})})})},_k=function(e){var t=e.children,n=yk(),r=n[0],o=n[1],i=o.width>0&&o.height>0;return(0,le.jsx)("div",{ref:r,style:{width:"100%",height:"100%"},children:i&&t({width:o.width,height:o.height})})},Dk=["id","colors"],Ek={linearGradient:function(e){var t=e.id,n=e.colors,r=ok(e,Dk);return(0,le.jsx)("linearGradient",nk({id:t,x1:0,x2:0,y1:0,y2:1},r,{children:n.map(function(e){var t=e.offset,n=e.color,r=e.opacity;return(0,le.jsx)("stop",{offset:t+"%",stopColor:n,stopOpacity:void 0!==r?r:1},t)})}))}},Rk=(0,G.memo)(function(e){var t=e.id,n=e.background,r=void 0===n?"#ffffff":n,o=e.color,i=void 0===o?"#000000":o,a=e.size,s=void 0===a?4:a,l=e.padding,c=void 0===l?4:l,u=e.stagger,d=void 0!==u&&u,f=s+c,p=s/2,h=c/2;return!0===d&&(f=2*s+2*c),(0,le.jsxs)("pattern",{id:t,width:f,height:f,patternUnits:"userSpaceOnUse",children:[(0,le.jsx)("rect",{width:f,height:f,fill:r}),(0,le.jsx)("circle",{cx:h+p,cy:h+p,r:p,fill:i}),d&&(0,le.jsx)("circle",{cx:1.5*c+s+p,cy:1.5*c+s+p,r:p,fill:i})]})}),Ak=(Math.PI,function(e){return e*Math.PI/180}),Ik=function(e){return 180*e/Math.PI},Fk=function(e,t){return{x:Math.cos(e)*t,y:Math.sin(e)*t}},Lk={svg:{align:{left:"start",center:"middle",right:"end",start:"start",middle:"middle",end:"end"},baseline:{top:"text-before-edge",center:"central",bottom:"alphabetic"}},canvas:{align:{left:"left",center:"center",right:"right",start:"left",middle:"center",end:"right"},baseline:{top:"top",center:"middle",bottom:"bottom"}}},Nk=(0,G.memo)(function(e){var t=e.id,n=e.spacing,r=void 0===n?5:n,o=e.rotation,i=void 0===o?0:o,a=e.background,s=void 0===a?"#000000":a,l=e.color,c=void 0===l?"#ffffff":l,u=e.lineWidth,d=void 0===u?2:u,f=Math.round(i)%360,p=Math.abs(r);f>180?f-=360:f>90?f-=180:f<-180?f+=360:f<-90&&(f+=180);var h,m=p,g=p;return 0===f?h="\n M 0 0 L "+m+" 0\n M 0 "+g+" L "+m+" "+g+"\n ":90===f?h="\n M 0 0 L 0 "+g+"\n M "+m+" 0 L "+m+" "+g+"\n ":(m=Math.abs(p/Math.sin(Ak(f))),g=p/Math.sin(Ak(90-f)),h=f>0?"\n M 0 "+-g+" L "+2*m+" "+g+"\n M "+-m+" "+-g+" L "+m+" "+g+"\n M "+-m+" 0 L "+m+" "+2*g+"\n ":"\n M "+-m+" "+g+" L "+m+" "+-g+"\n M "+-m+" "+2*g+" L "+2*m+" "+-g+"\n M 0 "+2*g+" L "+2*m+" 0\n "),(0,le.jsxs)("pattern",{id:t,width:m,height:g,patternUnits:"userSpaceOnUse",children:[(0,le.jsx)("rect",{width:m,height:g,fill:s,stroke:"rgba(255, 0, 0, 0.1)",strokeWidth:0}),(0,le.jsx)("path",{d:h,strokeWidth:d,stroke:c,strokeLinecap:"square"})]})}),zk={patternDots:Rk,patternLines:Nk,patternSquares:(0,G.memo)(function(e){var t=e.id,n=e.color,r=void 0===n?"#000000":n,o=e.background,i=void 0===o?"#ffffff":o,a=e.size,s=void 0===a?4:a,l=e.padding,c=void 0===l?4:l,u=e.stagger,d=void 0!==u&&u,f=s+c,p=c/2;return!0===d&&(f=2*s+2*c),(0,le.jsxs)("pattern",{id:t,width:f,height:f,patternUnits:"userSpaceOnUse",children:[(0,le.jsx)("rect",{width:f,height:f,fill:i}),(0,le.jsx)("rect",{x:p,y:p,width:s,height:s,fill:r}),d&&(0,le.jsx)("rect",{x:1.5*c+s,y:1.5*c+s,width:s,height:s,fill:r})]})})},$k=["type"],Vk=nk({},Ek,zk),Bk=(0,G.memo)(function(e){var t=e.defs;return!t||t.length<1?null:(0,le.jsx)("defs",{"aria-hidden":!0,children:t.map(function(e){var t=e.type,n=ok(e,$k);return Vk[t]?(0,G.createElement)(Vk[t],nk({key:n.id},n)):null})})}),Wk=function(e){var t=e.width,n=e.height,r=e.margin,o=e.defs,i=e.children,a=e.role,s=e.ariaLabel,l=e.ariaLabelledBy,c=e.ariaDescribedBy,u=e.isFocusable,d=Ck();return(0,le.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:n,role:a,"aria-label":s,"aria-labelledby":l,"aria-describedby":c,focusable:u,tabIndex:u?0:void 0,children:[(0,le.jsx)(Bk,{defs:o}),(0,le.jsx)("rect",{width:t,height:n,fill:d.background}),(0,le.jsx)("g",{transform:"translate("+r.left+","+r.top+")",children:i})]})},Hk=(0,G.memo)(function(e){var t=e.size,n=e.color,r=e.borderWidth,o=e.borderColor;return(0,le.jsx)("circle",{r:t/2,fill:n,stroke:o,strokeWidth:r,style:{pointerEvents:"none"}})}),qk=(0,G.memo)(function(e){var t=e.x,n=e.y,r=e.symbol,o=void 0===r?Hk:r,i=e.size,a=e.datum,s=e.color,l=e.borderWidth,c=e.borderColor,u=e.label,d=e.labelTextAnchor,f=void 0===d?"middle":d,p=e.labelYOffset,h=void 0===p?-12:p,m=Ck(),g=lk(),b=g.animate,y=ug({transform:"translate("+t+", "+n+")",config:g.config,immediate:!b});return(0,le.jsxs)(Dg.g,{transform:y.transform,style:{pointerEvents:"none"},children:[(0,G.createElement)(o,{size:i,color:s,datum:a,borderWidth:l,borderColor:c}),u&&(0,le.jsx)("text",{textAnchor:f,y:h,style:Pk(m.dots.text),children:u})]})}),Yk=(0,G.memo)(function(e){var t=e.width,n=e.height,r=e.axis,o=e.scale,i=e.value,a=e.lineStyle,s=e.textStyle,l=e.legend,c=e.legendNode,u=e.legendPosition,d=void 0===u?"top-right":u,f=e.legendOffsetX,p=void 0===f?14:f,h=e.legendOffsetY,m=void 0===h?14:h,g=e.legendOrientation,b=void 0===g?"horizontal":g,y=Ck(),v=0,x=0,w=0,S=0;if("y"===r?(w=o(i),x=t):(v=o(i),S=n),l&&!c){var k=function(e){var t=e.width,n=e.height,r=e.position,o=e.offsetX,i=e.offsetY,a=e.orientation,s=0,l=0,c="vertical"===a?-90:0,u="start";if("x"===e.axis)switch(r){case"top-left":s=-o,l=i,u="end";break;case"top":l=-i,u="horizontal"===a?"middle":"start";break;case"top-right":s=o,l=i,u="horizontal"===a?"start":"end";break;case"right":s=o,l=n/2,u="horizontal"===a?"start":"middle";break;case"bottom-right":s=o,l=n-i,u="start";break;case"bottom":l=n+i,u="horizontal"===a?"middle":"end";break;case"bottom-left":l=n-i,s=-o,u="horizontal"===a?"end":"start";break;case"left":s=-o,l=n/2,u="horizontal"===a?"end":"middle"}else switch(r){case"top-left":s=o,l=-i,u="start";break;case"top":s=t/2,l=-i,u="horizontal"===a?"middle":"start";break;case"top-right":s=t-o,l=-i,u="horizontal"===a?"end":"start";break;case"right":s=t+o,u="horizontal"===a?"start":"middle";break;case"bottom-right":s=t-o,l=i,u="end";break;case"bottom":s=t/2,l=i,u="horizontal"===a?"middle":"end";break;case"bottom-left":s=o,l=i,u="horizontal"===a?"start":"end";break;case"left":s=-o,u="horizontal"===a?"end":"middle"}return{x:s,y:l,rotation:c,textAnchor:u}}({axis:r,width:t,height:n,position:d,offsetX:p,offsetY:m,orientation:b});c=(0,le.jsx)("text",{transform:"translate("+k.x+", "+k.y+") rotate("+k.rotation+")",textAnchor:k.textAnchor,dominantBaseline:"central",style:s,children:l})}return(0,le.jsxs)("g",{transform:"translate("+v+", "+w+")",children:[(0,le.jsx)("line",{x1:0,x2:x,y1:0,y2:S,stroke:y.markers.lineColor,strokeWidth:y.markers.lineStrokeWidth,style:a}),c]})}),Uk=(0,G.memo)(function(e){var t=e.markers,n=e.width,r=e.height,o=e.xScale,i=e.yScale;return t&&0!==t.length?t.map(function(e,t){return(0,le.jsx)(Yk,nk({},e,{width:n,height:r,scale:"y"===e.axis?i:o}),t)}):null}),Gk=["theme","renderWrapper","animate","motionConfig"],Xk=function(e){return function(t){var n,r;function o(){return t.apply(this,arguments)||this}return r=t,(n=o).prototype=Object.create(r.prototype),n.prototype.constructor=n,rk(n,r),o.prototype.render=function(){var t=this.props,n=t.theme,r=t.renderWrapper,o=t.animate,i=t.motionConfig,a=ok(t,Gk);return(0,le.jsx)(jk,{theme:n,renderWrapper:r,isInteractive:a.isInteractive,animate:o,motionConfig:i,children:(0,le.jsx)(e,nk({},a))})},o}(G.Component)},Qk=function(e){return Ex(e)?e:function(t){return Xg(t,e)}},Kk=function(e){return(0,G.useMemo)(function(){return Qk(e)},[e])},Zk=function(e,t,n,r,o,i){return e<=o&&o<=e+n&&t<=i&&i<=t+r},Jk=function(e,t){var n,r="touches"in t?t.touches[0]:t,o=r.clientX,i=r.clientY,a=e.getBoundingClientRect(),s=(n=void 0!==e.getBBox?e.getBBox():{width:e.offsetWidth||0,height:e.offsetHeight||0}).width===a.width?1:n.width/a.width;return[(o-a.left)*s,(i-a.top)*s]},eC=Object.keys(Ek),tC=Object.keys(zk),nC=function(e,t,n,r){var o=void 0===r?{}:r,i=o.dataKey,a=o.colorKey,s=void 0===a?"color":a,l=o.targetKey,c=void 0===l?"fill":l,u=[],d={};return e.length&&t.length&&(u=[].concat(e),t.forEach(function(t){for(var r=function(){var r=n[o],a=r.id;if(function(e,t,n){if("*"===e)return!0;if(Ex(e))return e(t);if(ZS(e)){var r=n?Xg(t,n):t;return ek(JS(r,Object.keys(e)),e)}return!1}(r.match,t,i)){var l=e.find(function(e){return e.id===a});if(l)if(tC.includes(l.type))if("inherit"===l.background||"inherit"===l.color){var f=Xg(t,s),p=l.background,h=l.color,m=a;"inherit"===l.background&&(m=m+".bg."+f,p=f),"inherit"===l.color&&(m=m+".fg."+f,h=f),Qg(t,c,"url(#"+m+")"),d[m]||(u.push(nk({},l,{id:m,background:p,color:h})),d[m]=1)}else Qg(t,c,"url(#"+a+")");else if(eC.includes(l.type))if(l.colors.map(function(e){return e.color}).includes("inherit")){var g=Xg(t,s),b=a,y=nk({},l,{colors:l.colors.map(function(e,t){return"inherit"!==e.color?e:(b=b+"."+t+"."+g,nk({},e,{color:"inherit"===e.color?g:e.color}))})});y.id=b,Qg(t,c,"url(#"+b+")"),d[b]||(u.push(y),d[b]=1)}else Qg(t,c,"url(#"+a+")");return"break"}},o=0;o<n.length&&"break"!==r();o++);})),u},rC=a(3375),oC=a(14),iC=a(3031),aC=a(3602);const sC=Math.sqrt(50),lC=Math.sqrt(10),cC=Math.sqrt(2);function uC(e,t,n){const r=(t-e)/Math.max(0,n),o=Math.floor(Math.log10(r)),i=r/Math.pow(10,o),a=i>=sC?10:i>=lC?5:i>=cC?2:1;let s,l,c;return o<0?(c=Math.pow(10,-o)/a,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,o)*a,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?uC(e,t,2*n):[s,l,c]}function dC(e,t,n){if(!((n=+n)>0))return[];if((e=+e)===(t=+t))return[e];const r=t<e,[o,i,a]=r?uC(t,e,n):uC(e,t,n);if(!(i>=o))return[];const s=i-o+1,l=new Array(s);if(r)if(a<0)for(let e=0;e<s;++e)l[e]=(i-e)/-a;else for(let e=0;e<s;++e)l[e]=(i-e)*a;else if(a<0)for(let e=0;e<s;++e)l[e]=(o+e)/-a;else for(let e=0;e<s;++e)l[e]=(o+e)*a;return l}function fC(e,t,n){return uC(e=+e,t=+t,n=+n)[2]}function pC(e,t,n){n=+n;const r=(t=+t)<(e=+e),o=r?fC(t,e,n):fC(e,t,n);return(r?-1:1)*(o<0?1/-o:o)}function hC(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function mC(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function gC(e){let t,n,r;function o(e,r,o=0,i=e.length){if(o<i){if(0!==t(r,r))return i;do{const t=o+i>>>1;n(e[t],r)<0?o=t+1:i=t}while(o<i)}return o}return 2!==e.length?(t=hC,n=(t,n)=>hC(e(t),n),r=(t,n)=>e(t)-n):(t=e===hC||e===mC?e:bC,n=e,r=e),{left:o,center:function(e,t,n=0,i=e.length){const a=o(e,t,n,i-1);return a>n&&r(e[a-1],t)>-r(e[a],t)?a-1:a},right:function(e,r,o=0,i=e.length){if(o<i){if(0!==t(r,r))return i;do{const t=o+i>>>1;n(e[t],r)<=0?o=t+1:i=t}while(o<i)}return o}}}function bC(){return 0}const yC=gC(hC),vC=yC.right,xC=(yC.left,gC(function(e){return null===e?NaN:+e}).center,vC);function wC(e,t){var n,r=t?t.length:0,o=e?Math.min(r,e.length):0,i=new Array(o),a=new Array(r);for(n=0;n<o;++n)i[n]=MC(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<o;++n)a[n]=i[n](e);return a}}function SC(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function kC(e,t){var n,r={},o={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=MC(e[n],t[n]):o[n]=t[n];return function(e){for(n in r)o[n]=r[n](e);return o}}function CC(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,o=t.slice();return function(i){for(n=0;n<r;++n)o[n]=e[n]*(1-i)+t[n]*i;return o}}function MC(e,t){var n,r,o=typeof t;return null==t||"boolean"===o?qy(t):("number"===o?Kg:"string"===o?(n=Ty(t))?(t=n,Gy):eb:t instanceof Ty?Gy:t instanceof Date?SC:(r=t,!ArrayBuffer.isView(r)||r instanceof DataView?Array.isArray(t)?wC:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?kC:Kg:CC))(e,t)}function PC(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function TC(e){return+e}var OC=[0,1];function jC(e){return e}function _C(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:(n=isNaN(t)?NaN:.5,function(){return n});var n}function DC(e,t,n){var r=e[0],o=e[1],i=t[0],a=t[1];return o<r?(r=_C(o,r),i=n(a,i)):(r=_C(r,o),i=n(i,a)),function(e){return i(r(e))}}function EC(e,t,n){var r=Math.min(e.length,t.length)-1,o=new Array(r),i=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)o[a]=_C(e[a],e[a+1]),i[a]=n(t[a],t[a+1]);return function(t){var n=xC(e,t,1,r)-1;return i[n](o[n](t))}}function RC(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function AC(){var e,t,n,r,o,i,a=OC,s=OC,l=MC,c=jC;function u(){var e,t,n,l=Math.min(a.length,s.length);return c!==jC&&(e=a[0],t=a[l-1],e>t&&(n=e,e=t,t=n),c=function(n){return Math.max(e,Math.min(t,n))}),r=l>2?EC:DC,o=i=null,d}function d(t){return null==t||isNaN(t=+t)?n:(o||(o=r(a.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((i||(i=r(s,a.map(e),Kg)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,TC),u()):a.slice()},d.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},d.rangeRound=function(e){return s=Array.from(e),l=PC,u()},d.clamp=function(e){return arguments.length?(c=!!e||jC,u()):c!==jC},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}function IC(){return AC()(jC,jC)}function FC(e){var t=e.domain;return e.ticks=function(e){var n=t();return dC(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return function(e,t,n,r){var o,i=pC(e,t,n);switch((r=Lx(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(o=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Ax(t)/3)))-Ax(Math.abs(e)))}(i,a))||(r.precision=o),Hx(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(o=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ax(t)-Ax(e))+1}(i,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=o-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(o=function(e){return Math.max(0,-Ax(Math.abs(e)))}(i))||(r.precision=o-2*("%"===r.type))}return Wx(r)}(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,o,i=t(),a=0,s=i.length-1,l=i[a],c=i[s],u=10;for(c<l&&(o=l,l=c,c=o,o=a,a=s,s=o);u-- >0;){if((o=fC(l,c,n))===r)return i[a]=l,i[s]=c,t(i);if(o>0)l=Math.floor(l/o)*o,c=Math.ceil(c/o)*o;else{if(!(o<0))break;l=Math.ceil(l*o)/o,c=Math.floor(c*o)/o}r=o}return e},e}function LC(){var e=IC();return e.copy=function(){return RC(e,LC())},oy.apply(e,arguments),FC(e)}function NC(){var e,t,n=sy().unknown(void 0),r=n.domain,o=n.range,i=0,a=1,s=!1,l=0,c=0,u=.5;function d(){var n=r().length,d=a<i,f=d?a:i,p=d?i:a;e=(p-f)/Math.max(1,n-l+2*c),s&&(e=Math.floor(e)),f+=(p-f-e*(n-l))*u,t=e*(1-l),s&&(f=Math.round(f),t=Math.round(t));var h=function(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=0|Math.max(0,Math.ceil((t-e)/n)),i=new Array(o);++r<o;)i[r]=e+r*n;return i}(n).map(function(t){return f+e*t});return o(d?h.reverse():h)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),d()):r()},n.range=function(e){return arguments.length?([i,a]=e,i=+i,a=+a,d()):[i,a]},n.rangeRound=function(e){return[i,a]=e,i=+i,a=+a,s=!0,d()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(s=!!e,d()):s},n.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),d()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),d()):l},n.paddingOuter=function(e){return arguments.length?(c=+e,d()):c},n.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},n.copy=function(){return NC(r(),[i,a]).round(s).paddingInner(l).paddingOuter(c).align(u)},oy.apply(d(),arguments)}function zC(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return zC(t())},e}function $C(){return zC(NC.apply(null,arguments).paddingInner(1))}const VC=1e3,BC=6e4,WC=36e5,HC=864e5,qC=6048e5,YC=31536e6,UC=new Date,GC=new Date;function XC(e,t,n,r){function o(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return o.floor=t=>(e(t=new Date(+t)),t),o.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),o.round=e=>{const t=o(e),n=o.ceil(e);return e-t<n-e?t:n},o.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),o.range=(n,r,i)=>{const a=[];if(n=o.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return a;let s;do{a.push(s=new Date(+n)),t(n,i),e(n)}while(s<n&&n<r);return a},o.filter=n=>XC(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(o.count=(t,r)=>(UC.setTime(+t),GC.setTime(+r),e(UC),e(GC),Math.floor(n(UC,GC))),o.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(r?t=>r(t)%e===0:t=>o.count(0,t)%e===0):o:null)),o}const QC=XC(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);QC.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?XC(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):QC:null),QC.range;const KC=XC(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*VC)},(e,t)=>(t-e)/VC,e=>e.getUTCSeconds()),ZC=(KC.range,XC(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*VC)},(e,t)=>{e.setTime(+e+t*BC)},(e,t)=>(t-e)/BC,e=>e.getMinutes())),JC=(ZC.range,XC(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*BC)},(e,t)=>(t-e)/BC,e=>e.getUTCMinutes())),eM=(JC.range,XC(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*VC-e.getMinutes()*BC)},(e,t)=>{e.setTime(+e+t*WC)},(e,t)=>(t-e)/WC,e=>e.getHours())),tM=(eM.range,XC(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*WC)},(e,t)=>(t-e)/WC,e=>e.getUTCHours())),nM=(tM.range,XC(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*BC)/HC,e=>e.getDate()-1)),rM=(nM.range,XC(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/HC,e=>e.getUTCDate()-1)),oM=(rM.range,XC(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/HC,e=>Math.floor(e/HC)));function iM(e){return XC(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+7*t)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*BC)/qC)}oM.range;const aM=iM(0),sM=iM(1),lM=iM(2),cM=iM(3),uM=iM(4),dM=iM(5),fM=iM(6);function pM(e){return XC(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)},(e,t)=>(t-e)/qC)}aM.range,sM.range,lM.range,cM.range,uM.range,dM.range,fM.range;const hM=pM(0),mM=pM(1),gM=pM(2),bM=pM(3),yM=pM(4),vM=pM(5),xM=pM(6),wM=(hM.range,mM.range,gM.range,bM.range,yM.range,vM.range,xM.range,XC(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear()),e=>e.getMonth())),SM=(wM.range,XC(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear()),e=>e.getUTCMonth())),kM=(SM.range,XC(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear()));kM.every=e=>isFinite(e=Math.floor(e))&&e>0?XC(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}):null,kM.range;const CM=XC(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());function MM(e,t,n,r,o,i){const a=[[KC,1,VC],[KC,5,5e3],[KC,15,15e3],[KC,30,3e4],[i,1,BC],[i,5,3e5],[i,15,9e5],[i,30,18e5],[o,1,WC],[o,3,108e5],[o,6,216e5],[o,12,432e5],[r,1,HC],[r,2,1728e5],[n,1,qC],[t,1,2592e6],[t,3,7776e6],[e,1,YC]];function s(t,n,r){const o=Math.abs(n-t)/r,i=gC(([,,e])=>e).right(a,o);if(i===a.length)return e.every(pC(t/YC,n/YC,r));if(0===i)return QC.every(Math.max(pC(t,n,r),1));const[s,l]=a[o/a[i-1][2]<a[i][2]/o?i-1:i];return s.every(l)}return[function(e,t,n){const r=t<e;r&&([e,t]=[t,e]);const o=n&&"function"==typeof n.range?n:s(e,t,n),i=o?o.range(e,+t+1):[];return r?i.reverse():i},s]}CM.every=e=>isFinite(e=Math.floor(e))&&e>0?XC(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null,CM.range;const[PM,TM]=MM(CM,SM,hM,oM,tM,JC),[OM,jM]=MM(kM,wM,aM,nM,eM,ZC);function _M(e,t){var n,r=0,o=(e=e.slice()).length-1,i=e[r],a=e[o];return a<i&&(n=r,r=o,o=n,n=i,i=a,a=n),e[r]=t.floor(i),e[o]=t.ceil(a),e}function DM(e){return new Date(e)}function EM(e){return e instanceof Date?+e:+new Date(+e)}function RM(e,t,n,r,o,i,a,s,l,c){var u=IC(),d=u.invert,f=u.domain,p=c(".%L"),h=c(":%S"),m=c("%I:%M"),g=c("%I %p"),b=c("%a %d"),y=c("%b %d"),v=c("%B"),x=c("%Y");function w(e){return(l(e)<e?p:s(e)<e?h:a(e)<e?m:i(e)<e?g:r(e)<e?o(e)<e?b:y:n(e)<e?v:x)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?f(Array.from(e,EM)):f().map(DM)},u.ticks=function(t){var n=f();return e(n[0],n[n.length-1],null==t?10:t)},u.tickFormat=function(e,t){return null==t?w:c(t)},u.nice=function(e){var n=f();return e&&"function"==typeof e.range||(e=t(n[0],n[n.length-1],null==e?10:e)),e?f(_M(n,e)):u},u.copy=function(){return RC(u,RM(e,t,n,r,o,i,a,s,l,c))},u}function AM(e){return Math.log(e)}function IM(e){return Math.exp(e)}function FM(e){return-Math.log(-e)}function LM(e){return-Math.exp(-e)}function NM(e){return isFinite(e)?+("1e"+e):e<0?0:e}function zM(e){return(t,n)=>-e(-t,n)}function $M(){const e=function(e){const t=e(AM,IM),n=t.domain;let r,o,i=10;function a(){return r=function(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}(i),o=function(e){return 10===e?NM:e===Math.E?Math.exp:t=>Math.pow(e,t)}(i),n()[0]<0?(r=zM(r),o=zM(o),e(FM,LM)):e(AM,IM),t}return t.base=function(e){return arguments.length?(i=+e,a()):i},t.domain=function(e){return arguments.length?(n(e),a()):n()},t.ticks=e=>{const t=n();let a=t[0],s=t[t.length-1];const l=s<a;l&&([a,s]=[s,a]);let c,u,d=r(a),f=r(s);const p=null==e?10:+e;let h=[];if(!(i%1)&&f-d<p){if(d=Math.floor(d),f=Math.ceil(f),a>0){for(;d<=f;++d)for(c=1;c<i;++c)if(u=d<0?c/o(-d):c*o(d),!(u<a)){if(u>s)break;h.push(u)}}else for(;d<=f;++d)for(c=i-1;c>=1;--c)if(u=d>0?c/o(-d):c*o(d),!(u<a)){if(u>s)break;h.push(u)}2*h.length<p&&(h=dC(a,s,p))}else h=dC(d,f,Math.min(f-d,p)).map(o);return l?h.reverse():h},t.tickFormat=(e,n)=>{if(null==e&&(e=10),null==n&&(n=10===i?"s":","),"function"!=typeof n&&(i%1||null!=(n=Lx(n)).precision||(n.trim=!0),n=Wx(n)),e===1/0)return n;const a=Math.max(1,i*e/t.ticks().length);return e=>{let t=e/o(Math.round(r(e)));return t*i<i-.5&&(t*=i),t<=a?n(e):""}},t.nice=()=>n(_M(n(),{floor:e=>o(Math.floor(r(e))),ceil:e=>o(Math.ceil(r(e)))})),t}(AC()).domain([1,10]);return e.copy=()=>RC(e,$M()).base(e.base()),oy.apply(e,arguments),e}function VM(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function BM(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function WM(){var e=function(e){var t=1,n=e(VM(t),BM(t));return n.constant=function(n){return arguments.length?e(VM(t=+n),BM(t)):t},FC(n)}(AC());return e.copy=function(){return RC(e,WM()).constant(e.constant())},oy.apply(e,arguments)}var HM=Xx(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});HM.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?Xx(function(t){t.setTime(Math.floor(t/e)*e)},function(t,n){t.setTime(+t+n*e)},function(t,n){return(n-t)/e}):HM:null};const qM=HM;HM.range;var YM=Xx(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+t*Qx)},function(e,t){return(t-e)/Qx},function(e){return e.getUTCSeconds()});const UM=YM;YM.range;var GM=Xx(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*Qx)},function(e,t){e.setTime(+e+t*Kx)},function(e,t){return(t-e)/Kx},function(e){return e.getMinutes()});const XM=GM;GM.range;var QM=Xx(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*Kx)},function(e,t){return(t-e)/Kx},function(e){return e.getUTCMinutes()});const KM=QM;QM.range;var ZM=Xx(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*Qx-e.getMinutes()*Kx)},function(e,t){e.setTime(+e+t*Zx)},function(e,t){return(t-e)/Zx},function(e){return e.getHours()});const JM=ZM;ZM.range;var eP=Xx(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+t*Zx)},function(e,t){return(t-e)/Zx},function(e){return e.getUTCHours()});const tP=eP;eP.range;var nP=Xx(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())},function(e){return e.getMonth()});const rP=nP;var oP=nP.range,iP=Xx(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())},function(e){return e.getUTCMonth()});const aP=iP;function sP(){return sP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sP.apply(this,arguments)}iP.range;var lP=[function(e){return e.setMilliseconds(0)},function(e){return e.setSeconds(0)},function(e){return e.setMinutes(0)},function(e){return e.setHours(0)},function(e){return e.setDate(1)},function(e){return e.setMonth(0)}],cP={millisecond:[],second:lP.slice(0,1),minute:lP.slice(0,2),hour:lP.slice(0,3),day:lP.slice(0,4),month:lP.slice(0,5),year:lP.slice(0,6)},uP=function(e){var t=e.format,n=void 0===t?"native":t,r=e.precision,o=void 0===r?"millisecond":r,i=e.useUTC,a=void 0===i||i,s=function(e){return function(t){return cP[e].forEach(function(e){e(t)}),t}}(o);return function(e){if(void 0===e)return e;if("native"===n||e instanceof Date)return s(e);var t=a?Aw(n):Ew(n);return s(t(e))}},dP=function(e,t){void 0===t&&(t=!1);var n=e;return n.type="linear",n.stacked=t,n},fP=function(e){var t=e;return t.type="band",t},pP=function(e,t){return e===t},hP=function(e,t){return e.getTime()===t.getTime()};function mP(e,t,n,r){switch(e.type){case"linear":return function(e,t,n,r){var o,i,a,s,l=e.min,c=void 0===l?0:l,u=e.max,d=void 0===u?"auto":u,f=e.stacked,p=void 0!==f&&f,h=e.reverse,m=void 0!==h&&h,g=e.clamp,b=void 0!==g&&g,y=e.nice,v=void 0!==y&&y;o="auto"===c?!0===p?null!=(i=t.minStacked)?i:0:t.min:c,a="auto"===d?!0===p?null!=(s=t.maxStacked)?s:0:t.max:d;var x=LC().rangeRound("x"===r?[0,n]:[n,0]).domain(m?[a,o]:[o,a]).clamp(b);return!0===v?x.nice():"number"==typeof v&&x.nice(v),dP(x,p)}(e,t,n,r);case"point":return function(e,t,n){var r=$C().range([0,n]).domain(t.all);return r.type="point",r}(0,t,n);case"band":return function(e,t,n,r){var o=e.round,i=void 0===o||o,a=NC().range("x"===r?[0,n]:[n,0]).domain(t.all).round(i);return fP(a)}(e,t,n,r);case"time":return function(e,t,n){var r,o,i=e.format,a=void 0===i?"native":i,s=e.precision,l=void 0===s?"millisecond":s,c=e.min,u=void 0===c?"auto":c,d=e.max,f=void 0===d?"auto":d,p=e.useUTC,h=void 0===p||p,m=e.nice,g=void 0!==m&&m,b=uP({format:a,precision:l,useUTC:h});r="auto"===u?b(t.min):"native"!==a?b(u):u,o="auto"===f?b(t.max):"native"!==a?b(f):f;var y=h?function(){return oy.apply(RM(PM,TM,CM,SM,hM,rM,tM,JC,KC,Rw).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}():function(){return oy.apply(RM(OM,jM,kM,wM,aM,nM,eM,ZC,KC,Dw).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}();y.range([0,n]),r&&o&&y.domain([r,o]),!0===g?y.nice():"object"!=typeof g&&"number"!=typeof g||y.nice(g);var v=y;return v.type="time",v.useUTC=h,v}(e,t,n);case"log":return function(e,t,n,r){var o,i=e.base,a=void 0===i?10:i,s=e.min,l=void 0===s?"auto":s,c=e.max,u=void 0===c?"auto":c;if(t.all.some(function(e){return 0===e}))throw new Error("a log scale domain must not include or cross zero");var d,f,p=!1;if(t.all.filter(function(e){return null!=e}).forEach(function(e){p||(void 0===o?o=Math.sign(e):Math.sign(e)!==o&&(p=!0))}),p)throw new Error("a log scale domain must be strictly-positive or strictly-negative");d="auto"===l?t.min:l,f="auto"===u?t.max:u;var h=$M().domain([d,f]).rangeRound("x"===r?[0,n]:[n,0]).base(a).nice();return h.type="log",h}(e,t,n,r);case"symlog":return function(e,t,n,r){var o,i,a=e.constant,s=void 0===a?1:a,l=e.min,c=void 0===l?"auto":l,u=e.max,d=void 0===u?"auto":u,f=e.reverse,p=void 0!==f&&f;o="auto"===c?t.min:c,i="auto"===d?t.max:d;var h=WM().constant(s).rangeRound("x"===r?[0,n]:[n,0]).nice();!0===p?h.domain([i,o]):h.domain([o,i]);var m=h;return m.type="symlog",m}(e,t,n,r);default:throw new Error("invalid scale spec")}}var gP=function(e,t,n){var r;if("stacked"in n&&n.stacked){var o=e.data["x"===t?"xStacked":"yStacked"];return null==o?null:n(o)}return null!=(r=n(e.data[t]))?r:null},bP=function(e,t,n,r,o){var i=e.map(function(e){return function(e){return sP({},e,{data:e.data.map(function(e){return{data:sP({},e)}})})}(e)}),a=yP(i,t,n);"stacked"in t&&!0===t.stacked&&wP(a,i),"stacked"in n&&!0===n.stacked&&SP(a,i);var s=mP(t,a.x,r,"x"),l=mP(n,a.y,o,"y"),c=i.map(function(e){return sP({},e,{data:e.data.map(function(e){return sP({},e,{position:{x:gP(e,"x",s),y:gP(e,"y",l)}})})})});return sP({},a,{series:c,xScale:s,yScale:l})},yP=function(e,t,n){return{x:vP(e,"x",t),y:vP(e,"y",n)}},vP=function(e,t,n,r){var o=void 0===r?{}:r,i=o.getValue,a=void 0===i?function(e){return e.data[t]}:i,s=o.setValue,l=void 0===s?function(e,n){e.data[t]=n}:s;if("linear"===n.type)e.forEach(function(e){e.data.forEach(function(e){var t=a(e);t&&l(e,parseFloat(String(t)))})});else if("time"===n.type&&"native"!==n.format){var c=uP(n);e.forEach(function(e){e.data.forEach(function(e){var t=a(e);t&&l(e,c(t))})})}var u=[];switch(e.forEach(function(e){e.data.forEach(function(e){u.push(a(e))})}),n.type){case"linear":var d=iC(rC(u).filter(function(e){return null!==e}),function(e){return e});return{all:d,min:Math.min.apply(Math,d),max:Math.max.apply(Math,d)};case"time":var f=oC(u,function(e){return e.getTime()}).slice(0).sort(function(e,t){return t.getTime()-e.getTime()}).reverse();return{all:f,min:f[0],max:Dx(f)};default:var p=rC(u);return{all:p,min:p[0],max:Dx(p)}}},xP=function(e,t,n){var r=function(e){return"x"===e?"y":"x"}(e),o=[];t[r].all.forEach(function(t){var i=aC(t)?hP:pP,a=[];n.forEach(function(n){var s=n.data.find(function(e){return i(e.data[r],t)}),l=null,c=null;if(void 0!==s){if(null!==(l=s.data[e])){var u=Dx(a);void 0===u?c=l:null!==u&&(c=u+l)}s.data["x"===e?"xStacked":"yStacked"]=c}a.push(c),null!==c&&o.push(c)})}),t[e].minStacked=Math.min.apply(Math,o),t[e].maxStacked=Math.max.apply(Math,o)},wP=function(e,t){return xP("x",e,t)},SP=function(e,t){return xP("y",e,t)},kP=function(e){var t=e.bandwidth();if(0===t)return e;var n=t/2;return e.round()&&(n=Math.round(n)),function(t){var r;return(null!=(r=e(t))?r:0)+n}},CP={millisecond:[qM,qM],second:[UM,UM],minute:[XM,KM],hour:[JM,tP],day:[Xx(function(e){return e.setHours(0,0,0,0)},function(e,t){return e.setDate(e.getDate()+t)},function(e,t){return(t.getTime()-e.getTime())/864e5},function(e){return Math.floor(e.getTime()/864e5)}),Xx(function(e){return e.setUTCHours(0,0,0,0)},function(e,t){return e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t.getTime()-e.getTime())/864e5},function(e){return Math.floor(e.getTime()/864e5)})],week:[fw,nw],sunday:[fw,nw],monday:[pw,rw],tuesday:[hw,ow],wednesday:[mw,iw],thursday:[gw,aw],friday:[bw,sw],saturday:[yw,lw],month:[rP,aP],year:[Cw,Pw]},MP=Object.keys(CP),PP=new RegExp("^every\\s*(\\d+)?\\s*("+MP.join("|")+")s?$","i"),TP=function(e,t){if(Array.isArray(t))return t;if("string"==typeof t&&"useUTC"in e){var n=t.match(PP);if(n){var r=n[1],o=n[2],i=CP[o][e.useUTC?1:0];if("day"===o){var a,s,l=e.domain(),c=l[0],u=l[1],d=new Date(u);return d.setDate(d.getDate()+1),null!=(a=null==(s=i.every(Number(null!=r?r:1)))?void 0:s.range(c,d))?a:[]}if(void 0===r)return e.ticks(i);var f=i.every(Number(r));if(f)return e.ticks(f)}throw new Error("Invalid tickValues: "+t)}if("ticks"in e){if(void 0===t)return e.ticks();if("number"==typeof(p=t)&&isFinite(p)&&Math.floor(p)===p)return e.ticks(t)}var p;return e.domain()};function OP(){return OP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},OP.apply(this,arguments)}var jP=function(e){var t,n=e.axis,r=e.scale,o=e.ticksPosition,i=e.tickValues,a=e.tickSize,s=e.tickPadding,l=e.tickRotation,c=e.truncateTickAt,u=e.engine,d=void 0===u?"svg":u,f=TP(r,i),p=Lk[d],h="bandwidth"in r?kP(r):r,m={lineX:0,lineY:0},g={textX:0,textY:0},b="object"==typeof document&&"rtl"===document.dir,y=p.align.center,v=p.baseline.center;return"x"===n?(t=function(e){var t;return{x:null!=(t=h(e))?t:0,y:0}},m.lineY=a*("after"===o?1:-1),g.textY=(a+s)*("after"===o?1:-1),v="after"===o?p.baseline.top:p.baseline.bottom,0===l?y=p.align.center:"after"===o&&l<0||"before"===o&&l>0?(y=p.align[b?"left":"right"],v=p.baseline.center):("after"===o&&l>0||"before"===o&&l<0)&&(y=p.align[b?"right":"left"],v=p.baseline.center)):(t=function(e){var t;return{x:0,y:null!=(t=h(e))?t:0}},m.lineX=a*("after"===o?1:-1),g.textX=(a+s)*("after"===o?1:-1),y="after"===o?p.align.left:p.align.right),{ticks:f.map(function(e){var n="string"==typeof e?function(e){var t=String(e).length;return c&&c>0&&t>c?""+String(e).slice(0,c).concat("..."):""+e}(e):e;return OP({key:e instanceof Date?""+e.valueOf():""+e,value:n},t(e),m,g)}),textAlign:y,textBaseline:v}},_P=function(e,t){if(void 0===e||"function"==typeof e)return e;if("time"===t.type){var n=Dw(e);return function(e){return n(e instanceof Date?e:new Date(e))}}return Wx(e)},DP=function(e){var t,n=e.width,r=e.height,o=e.scale,i=e.axis,a=e.values,s=(t=a,(Array.isArray(t)?a:void 0)||TP(o,a)),l="bandwidth"in o?kP(o):o,c="x"===i?s.map(function(e){var t,n;return{key:e instanceof Date?""+e.valueOf():""+e,x1:null!=(t=l(e))?t:0,x2:null!=(n=l(e))?n:0,y1:0,y2:r}}):s.map(function(e){var t,r;return{key:e instanceof Date?""+e.valueOf():""+e,x1:0,x2:n,y1:null!=(t=l(e))?t:0,y2:null!=(r=l(e))?r:0}});return c},EP=(0,G.memo)(function(e){var t,n=e.value,r=e.format,o=e.lineX,i=e.lineY,a=e.onClick,s=e.textBaseline,l=e.textAnchor,c=e.animatedProps,u=Ck(),d=u.axis.ticks.line,f=u.axis.ticks.text,p=null!=(t=null==r?void 0:r(n))?t:n,h=(0,G.useMemo)(function(){var e={opacity:c.opacity};return a?{style:OP({},e,{cursor:"pointer"}),onClick:function(e){return a(e,p)}}:{style:e}},[c.opacity,a,p]);return(0,le.jsxs)(Dg.g,OP({transform:c.transform},h,{children:[(0,le.jsx)("line",{x1:0,x2:o,y1:0,y2:i,style:d}),f.outlineWidth>0&&(0,le.jsx)(Dg.text,{dominantBaseline:s,textAnchor:l,transform:c.textTransform,style:f,strokeWidth:2*f.outlineWidth,stroke:f.outlineColor,strokeLinejoin:"round",children:""+p}),(0,le.jsx)(Dg.text,{dominantBaseline:s,textAnchor:l,transform:c.textTransform,style:Pk(f),children:""+p})]}))}),RP=(0,G.memo)(function(e){var t=e.axis,n=e.scale,r=e.x,o=void 0===r?0:r,i=e.y,a=void 0===i?0:i,s=e.length,l=e.ticksPosition,c=e.tickValues,u=e.tickSize,d=void 0===u?5:u,f=e.tickPadding,p=void 0===f?5:f,h=e.tickRotation,m=void 0===h?0:h,g=e.format,b=e.renderTick,y=void 0===b?EP:b,v=e.truncateTickAt,x=e.legend,w=e.legendPosition,S=void 0===w?"end":w,k=e.legendOffset,C=void 0===k?0:k,M=e.onClick,P=e.ariaHidden,T=Ck(),O=T.axis.legend.text,j=(0,G.useMemo)(function(){return _P(g,n)},[g,n]),_=jP({axis:t,scale:n,ticksPosition:l,tickValues:c,tickSize:d,tickPadding:p,tickRotation:m,truncateTickAt:v}),D=_.ticks,E=_.textAlign,R=_.textBaseline,A=null;if(void 0!==x){var I,F=0,L=0,N=0;"y"===t?(N=-90,F=C,"start"===S?(I="start",L=s):"middle"===S?(I="middle",L=s/2):"end"===S&&(I="end")):(L=C,"start"===S?I="start":"middle"===S?(I="middle",F=s/2):"end"===S&&(I="end",F=s)),A=(0,le.jsxs)(le.Fragment,{children:[O.outlineWidth>0&&(0,le.jsx)("text",{transform:"translate("+F+", "+L+") rotate("+N+")",textAnchor:I,style:OP({dominantBaseline:"central"},O),strokeWidth:2*O.outlineWidth,stroke:O.outlineColor,strokeLinejoin:"round",children:x}),(0,le.jsx)("text",{transform:"translate("+F+", "+L+") rotate("+N+")",textAnchor:I,style:OP({dominantBaseline:"central"},O),children:x})]})}var z=lk(),$=z.animate,V=z.config,B=ug({transform:"translate("+o+","+a+")",lineX2:"x"===t?s:0,lineY2:"x"===t?0:s,config:V,immediate:!$}),W=(0,G.useCallback)(function(e){return{opacity:1,transform:"translate("+e.x+","+e.y+")",textTransform:"translate("+e.textX+","+e.textY+") rotate("+m+")"}},[m]),H=dg(D,{keys:function(e){return e.key},initial:W,from:(0,G.useCallback)(function(e){return{opacity:0,transform:"translate("+e.x+","+e.y+")",textTransform:"translate("+e.textX+","+e.textY+") rotate("+m+")"}},[m]),enter:W,update:W,leave:{opacity:0},config:V,immediate:!$});return(0,le.jsxs)(Dg.g,{transform:B.transform,"aria-hidden":P,children:[H(function(e,t,n,r){return G.createElement(y,OP({tickIndex:r,format:j,rotate:m,textBaseline:R,textAnchor:E,truncateTickAt:v,animatedProps:e},t,M?{onClick:M}:{}))}),(0,le.jsx)(Dg.line,{style:T.axis.domain.line,x1:0,x2:B.lineX2,y1:0,y2:B.lineY2}),A]})}),AP=["top","right","bottom","left"],IP=(0,G.memo)(function(e){var t=e.xScale,n=e.yScale,r=e.width,o=e.height,i={top:e.top,right:e.right,bottom:e.bottom,left:e.left};return(0,le.jsx)(le.Fragment,{children:AP.map(function(e){var a=i[e];if(!a)return null;var s="top"===e||"bottom"===e;return(0,le.jsx)(RP,OP({},a,{axis:s?"x":"y",x:"right"===e?r:0,y:"bottom"===e?o:0,scale:s?t:n,length:s?r:o,ticksPosition:"top"===e||"left"===e?"before":"after",truncateTickAt:a.truncateTickAt}),e)})})}),FP=(0,G.memo)(function(e){var t=e.animatedProps,n=Ck();return(0,le.jsx)(Dg.line,OP({},t,n.grid.line))}),LP=(0,G.memo)(function(e){var t=e.lines,n=lk(),r=n.animate,o=dg(t,{keys:function(e){return e.key},initial:function(e){return{opacity:1,x1:e.x1,x2:e.x2,y1:e.y1,y2:e.y2}},from:function(e){return{opacity:0,x1:e.x1,x2:e.x2,y1:e.y1,y2:e.y2}},enter:function(e){return{opacity:1,x1:e.x1,x2:e.x2,y1:e.y1,y2:e.y2}},update:function(e){return{opacity:1,x1:e.x1,x2:e.x2,y1:e.y1,y2:e.y2}},leave:{opacity:0},config:n.config,immediate:!r});return(0,le.jsx)("g",{children:o(function(e,t){return(0,G.createElement)(FP,OP({},t,{key:t.key,animatedProps:e}))})})}),NP=(0,G.memo)(function(e){var t=e.width,n=e.height,r=e.xScale,o=e.yScale,i=e.xValues,a=e.yValues,s=(0,G.useMemo)(function(){return!!r&&DP({width:t,height:n,scale:r,axis:"x",values:i})},[r,i,t,n]),l=(0,G.useMemo)(function(){return!!o&&DP({width:t,height:n,scale:o,axis:"y",values:a})},[n,t,o,a]);return(0,le.jsxs)(le.Fragment,{children:[s&&(0,le.jsx)(LP,{lines:s}),l&&(0,le.jsx)(LP,{lines:l})]})}),zP=function(e,t){var n=t.xScale,r=t.yScale,o=t.width,i=t.height,a=t.top,s=t.right,l=t.bottom,c=t.left,u=t.theme,d={top:a,right:s,bottom:l,left:c};AP.forEach(function(t){var a=d[t];if(!a)return null;var s="top"===t||"bottom"===t,l="top"===t||"left"===t?"before":"after",c=s?n:r,f=_P(a.format,c);!function(e,t){var n,r=t.axis,o=t.scale,i=t.x,a=void 0===i?0:i,s=t.y,l=void 0===s?0:s,c=t.length,u=t.ticksPosition,d=t.tickValues,f=t.tickSize,p=void 0===f?5:f,h=t.tickPadding,m=void 0===h?5:h,g=t.tickRotation,b=void 0===g?0:g,y=t.format,v=t.legend,x=t.legendPosition,w=void 0===x?"end":x,S=t.legendOffset,k=void 0===S?0:S,C=t.theme,M=jP({axis:r,scale:o,ticksPosition:u,tickValues:d,tickSize:p,tickPadding:m,tickRotation:b,engine:"canvas"}),P=M.ticks,T=M.textAlign,O=M.textBaseline;e.save(),e.translate(a,l),e.textAlign=T,e.textBaseline=O;var j=C.axis.ticks.text;e.font=(j.fontWeight?j.fontWeight+" ":"")+j.fontSize+"px "+j.fontFamily,(null!=(n=C.axis.domain.line.strokeWidth)?n:0)>0&&(e.lineWidth=Number(C.axis.domain.line.strokeWidth),e.lineCap="square",C.axis.domain.line.stroke&&(e.strokeStyle=C.axis.domain.line.stroke),e.beginPath(),e.moveTo(0,0),e.lineTo("x"===r?c:0,"x"===r?0:c),e.stroke());var _="function"==typeof y?y:function(e){return""+e};if(P.forEach(function(t){var n;(null!=(n=C.axis.ticks.line.strokeWidth)?n:0)>0&&(e.lineWidth=Number(C.axis.ticks.line.strokeWidth),e.lineCap="square",C.axis.ticks.line.stroke&&(e.strokeStyle=C.axis.ticks.line.stroke),e.beginPath(),e.moveTo(t.x,t.y),e.lineTo(t.x+t.lineX,t.y+t.lineY),e.stroke());var r=_(t.value);e.save(),e.translate(t.x+t.textX,t.y+t.textY),e.rotate(Ak(b)),j.outlineWidth>0&&(e.strokeStyle=j.outlineColor,e.lineWidth=2*j.outlineWidth,e.lineJoin="round",e.strokeText(""+r,0,0)),C.axis.ticks.text.fill&&(e.fillStyle=j.fill),e.fillText(""+r,0,0),e.restore()}),void 0!==v){var D=0,E=0,R=0,A="center";"y"===r?(R=-90,D=k,"start"===w?(A="start",E=c):"middle"===w?(A="center",E=c/2):"end"===w&&(A="end")):(E=k,"start"===w?A="start":"middle"===w?(A="center",D=c/2):"end"===w&&(A="end",D=c)),e.translate(D,E),e.rotate(Ak(R)),e.font=(C.axis.legend.text.fontWeight?C.axis.legend.text.fontWeight+" ":"")+C.axis.legend.text.fontSize+"px "+C.axis.legend.text.fontFamily,C.axis.legend.text.fill&&(e.fillStyle=C.axis.legend.text.fill),e.textAlign=A,e.textBaseline="middle",e.fillText(v,0,0)}e.restore()}(e,OP({},a,{axis:s?"x":"y",x:"right"===t?o:0,y:"bottom"===t?i:0,scale:c,format:f,length:s?o:i,ticksPosition:l,theme:u}))})},$P=function(e,t){var n=t.width,r=t.height,o=t.scale,i=t.axis,a=t.values;DP({width:n,height:r,scale:o,axis:i,values:a}).forEach(function(t){e.beginPath(),e.moveTo(t.x1,t.y1),e.lineTo(t.x2,t.y2),e.stroke()})},VP=a(7612),BP=a(8023),WP=a(179);function HP(){return HP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},HP.apply(this,arguments)}var qP=function(e){return"circle"===e.type},YP=function(e){return"dot"===e.type},UP=function(e){return"rect"===e.type},GP=function(e){var t,n,r=e.x,o=e.y,i=e.noteX,a=e.noteY,s=e.noteWidth,l=void 0===s?120:s,c=e.noteTextOffset,u=void 0===c?8:c;if(BP(i))t=r+i;else{if(void 0===i.abs)throw new Error("noteX should be either a number or an object containing an 'abs' property");t=i.abs}if(BP(a))n=o+a;else{if(void 0===a.abs)throw new Error("noteY should be either a number or an object containing an 'abs' property");n=a.abs}var d=r,f=o,p=function(e,t,n,r){var o=Math.atan2(r-t,n-e);return function(e){var t=e%360;return t<0&&(t+=360),t}(Ik(o))}(r,o,t,n);if(qP(e)){var h=Fk(Ak(p),e.size/2);d+=h.x,f+=h.y}if(UP(e)){var m=Math.round((p+90)/45)%8;0===m&&(f-=e.height/2),1===m&&(d+=e.width/2,f-=e.height/2),2===m&&(d+=e.width/2),3===m&&(d+=e.width/2,f+=e.height/2),4===m&&(f+=e.height/2),5===m&&(d-=e.width/2,f+=e.height/2),6===m&&(d-=e.width/2),7===m&&(d-=e.width/2,f-=e.height/2)}var g=t,b=t;return(p+90)%360>180?(g-=l,b-=l):b+=l,{points:[[d,f],[t,n],[b,n]],text:[g,n-u],angle:p+90}},XP=function(e){var t=e.data,n=e.annotations,r=e.getPosition,o=e.getDimensions;return(0,G.useMemo)(function(){return function(e){var t=e.data,n=e.getPosition,r=e.getDimensions;return e.annotations.reduce(function(e,o){var i=o.offset||0;return[].concat(e,VP(t,o.match).map(function(e){var t=n(e),a=r(e);return(qP(o)||UP(o))&&(a.size=a.size+2*i,a.width=a.width+2*i,a.height=a.height+2*i),HP({},WP(o,["match","offset"]),t,a,{size:o.size||a.size,datum:e})}))},[])}({data:t,annotations:n,getPosition:r,getDimensions:o})},[t,n,r,o])},QP=function(e){var t=e.datum,n=e.x,r=e.y,o=e.note,i=Ck(),a=lk(),s=a.animate,l=ug({x:n,y:r,config:a.config,immediate:!s});return"function"==typeof o?(0,G.createElement)(o,{x:n,y:r,datum:t}):(0,le.jsxs)(le.Fragment,{children:[i.annotations.text.outlineWidth>0&&(0,le.jsx)(Dg.text,{x:l.x,y:l.y,style:HP({},i.annotations.text,{strokeLinejoin:"round",strokeWidth:2*i.annotations.text.outlineWidth,stroke:i.annotations.text.outlineColor}),children:o}),(0,le.jsx)(Dg.text,{x:l.x,y:l.y,style:WP(i.annotations.text,["outlineWidth","outlineColor"]),children:o})]})},KP=function(e){var t=e.points,n=e.isOutline,r=void 0!==n&&n,o=Ck(),i=(0,G.useMemo)(function(){var e=t[0];return t.slice(1).reduce(function(e,t){return e+" L"+t[0]+","+t[1]},"M"+e[0]+","+e[1])},[t]),a=ck(i);if(r&&o.annotations.link.outlineWidth<=0)return null;var s=HP({},o.annotations.link);return r&&(s.strokeLinecap="square",s.strokeWidth=o.annotations.link.strokeWidth+2*o.annotations.link.outlineWidth,s.stroke=o.annotations.link.outlineColor,s.opacity=o.annotations.link.outlineOpacity),(0,le.jsx)(Dg.path,{fill:"none",d:a,style:s})},ZP=function(e){var t=e.x,n=e.y,r=e.size,o=Ck(),i=lk(),a=i.animate,s=ug({x:t,y:n,radius:r/2,config:i.config,immediate:!a});return(0,le.jsxs)(le.Fragment,{children:[o.annotations.outline.outlineWidth>0&&(0,le.jsx)(Dg.circle,{cx:s.x,cy:s.y,r:s.radius,style:HP({},o.annotations.outline,{fill:"none",strokeWidth:o.annotations.outline.strokeWidth+2*o.annotations.outline.outlineWidth,stroke:o.annotations.outline.outlineColor,opacity:o.annotations.outline.outlineOpacity})}),(0,le.jsx)(Dg.circle,{cx:s.x,cy:s.y,r:s.radius,style:o.annotations.outline})]})},JP=function(e){var t=e.x,n=e.y,r=e.size,o=void 0===r?4:r,i=Ck(),a=lk(),s=a.animate,l=ug({x:t,y:n,radius:o/2,config:a.config,immediate:!s});return(0,le.jsxs)(le.Fragment,{children:[i.annotations.outline.outlineWidth>0&&(0,le.jsx)(Dg.circle,{cx:l.x,cy:l.y,r:l.radius,style:HP({},i.annotations.outline,{fill:"none",strokeWidth:2*i.annotations.outline.outlineWidth,stroke:i.annotations.outline.outlineColor,opacity:i.annotations.outline.outlineOpacity})}),(0,le.jsx)(Dg.circle,{cx:l.x,cy:l.y,r:l.radius,style:i.annotations.symbol})]})},eT=function(e){var t=e.x,n=e.y,r=e.width,o=e.height,i=e.borderRadius,a=void 0===i?6:i,s=Ck(),l=lk(),c=l.animate,u=ug({x:t-r/2,y:n-o/2,width:r,height:o,config:l.config,immediate:!c});return(0,le.jsxs)(le.Fragment,{children:[s.annotations.outline.outlineWidth>0&&(0,le.jsx)(Dg.rect,{x:u.x,y:u.y,rx:a,ry:a,width:u.width,height:u.height,style:HP({},s.annotations.outline,{fill:"none",strokeWidth:s.annotations.outline.strokeWidth+2*s.annotations.outline.outlineWidth,stroke:s.annotations.outline.outlineColor,opacity:s.annotations.outline.outlineOpacity})}),(0,le.jsx)(Dg.rect,{x:u.x,y:u.y,rx:a,ry:a,width:u.width,height:u.height,style:s.annotations.outline})]})},tT=function(e){var t=e.datum,n=e.x,r=e.y,o=e.note,i=function(e){return(0,G.useMemo)(function(){return GP(e)},[e])}(e);if(!function(e){var t=typeof e;return(0,G.isValidElement)(e)||"string"===t||"function"===t||"object"===t}(o))throw new Error("note should be a valid react element");return(0,le.jsxs)(le.Fragment,{children:[(0,le.jsx)(KP,{points:i.points,isOutline:!0}),qP(e)&&(0,le.jsx)(ZP,{x:n,y:r,size:e.size}),YP(e)&&(0,le.jsx)(JP,{x:n,y:r,size:e.size}),UP(e)&&(0,le.jsx)(eT,{x:n,y:r,width:e.width,height:e.height,borderRadius:e.borderRadius}),(0,le.jsx)(KP,{points:i.points}),(0,le.jsx)(QP,{datum:t,x:i.text[0],y:i.text[1],note:o})]})},nT=function(e,t){t.forEach(function(t,n){var r=t[0],o=t[1];0===n?e.moveTo(r,o):e.lineTo(r,o)})},rT=function(e,t){var n=t.annotations,r=t.theme;0!==n.length&&(e.save(),n.forEach(function(t){if(!function(e){var t=typeof e;return"string"===t||"function"===t}(t.note))throw new Error("note is invalid for canvas implementation");r.annotations.link.outlineWidth>0&&(e.lineCap="square",e.strokeStyle=r.annotations.link.outlineColor,e.lineWidth=r.annotations.link.strokeWidth+2*r.annotations.link.outlineWidth,e.beginPath(),nT(e,t.computed.points),e.stroke(),e.lineCap="butt"),qP(t)&&r.annotations.outline.outlineWidth>0&&(e.strokeStyle=r.annotations.outline.outlineColor,e.lineWidth=r.annotations.outline.strokeWidth+2*r.annotations.outline.outlineWidth,e.beginPath(),e.arc(t.x,t.y,t.size/2,0,2*Math.PI),e.stroke()),YP(t)&&r.annotations.symbol.outlineWidth>0&&(e.strokeStyle=r.annotations.symbol.outlineColor,e.lineWidth=2*r.annotations.symbol.outlineWidth,e.beginPath(),e.arc(t.x,t.y,t.size/2,0,2*Math.PI),e.stroke()),UP(t)&&r.annotations.outline.outlineWidth>0&&(e.strokeStyle=r.annotations.outline.outlineColor,e.lineWidth=r.annotations.outline.strokeWidth+2*r.annotations.outline.outlineWidth,e.beginPath(),e.rect(t.x-t.width/2,t.y-t.height/2,t.width,t.height),e.stroke()),e.strokeStyle=r.annotations.link.stroke,e.lineWidth=r.annotations.link.strokeWidth,e.beginPath(),nT(e,t.computed.points),e.stroke(),qP(t)&&(e.strokeStyle=r.annotations.outline.stroke,e.lineWidth=r.annotations.outline.strokeWidth,e.beginPath(),e.arc(t.x,t.y,t.size/2,0,2*Math.PI),e.stroke()),YP(t)&&(e.fillStyle=r.annotations.symbol.fill,e.beginPath(),e.arc(t.x,t.y,t.size/2,0,2*Math.PI),e.fill()),UP(t)&&(e.strokeStyle=r.annotations.outline.stroke,e.lineWidth=r.annotations.outline.strokeWidth,e.beginPath(),e.rect(t.x-t.width/2,t.y-t.height/2,t.width,t.height),e.stroke()),"function"==typeof t.note?t.note(e,{datum:t.datum,x:t.computed.text[0],y:t.computed.text[1],theme:r}):(e.font=r.annotations.text.fontSize+"px "+r.annotations.text.fontFamily,e.textAlign="left",e.textBaseline="alphabetic",e.fillStyle=r.annotations.text.fill,e.strokeStyle=r.annotations.text.outlineColor,e.lineWidth=2*r.annotations.text.outlineWidth,r.annotations.text.outlineWidth>0&&(e.lineJoin="round",e.strokeText(t.note,t.computed.text[0],t.computed.text[1]),e.lineJoin="miter"),e.fillText(t.note,t.computed.text[0],t.computed.text[1]))}),e.restore())};function oT(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function iT(){var e=FC(function(){var e,t,n,r,o,i=0,a=1,s=jC,l=!1;function c(t){return null==t||isNaN(t=+t)?o:s(0===n?.5:(t=(r(t)-e)*n,l?Math.max(0,Math.min(1,t)):t))}function u(e){return function(t){var n,r;return arguments.length?([n,r]=t,s=e(n,r),c):[s(0),s(1)]}}return c.domain=function(o){return arguments.length?([i,a]=o,e=r(i=+i),t=r(a=+a),n=e===t?0:1/(t-e),c):[i,a]},c.clamp=function(e){return arguments.length?(l=!!e,c):l},c.interpolator=function(e){return arguments.length?(s=e,c):s},c.range=u(MC),c.rangeRound=u(PC),c.unknown=function(e){return arguments.length?(o=e,c):o},function(o){return r=o,e=o(i),t=o(a),n=e===t?0:1/(t-e),c}}()(jC));return e.copy=function(){return oT(e,iT())},iy.apply(e,arguments)}function aT(){var e=FC(function(){var e,t,n,r,o,i,a,s=0,l=.5,c=1,u=1,d=jC,f=!1;function p(e){return isNaN(e=+e)?a:(e=.5+((e=+i(e))-t)*(u*e<u*t?r:o),d(f?Math.max(0,Math.min(1,e)):e))}function h(e){return function(t){var n,r,o;return arguments.length?([n,r,o]=t,d=function(e,t){void 0===t&&(t=e,e=MC);for(var n=0,r=t.length-1,o=t[0],i=new Array(r<0?0:r);n<r;)i[n]=e(o,o=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return i[t](e-t)}}(e,[n,r,o]),p):[d(0),d(.5),d(1)]}}return p.domain=function(a){return arguments.length?([s,l,c]=a,e=i(s=+s),t=i(l=+l),n=i(c=+c),r=e===t?0:.5/(t-e),o=t===n?0:.5/(n-t),u=t<e?-1:1,p):[s,l,c]},p.clamp=function(e){return arguments.length?(f=!!e,p):f},p.interpolator=function(e){return arguments.length?(d=e,p):d},p.range=h(MC),p.rangeRound=h(PC),p.unknown=function(e){return arguments.length?(a=e,p):a},function(a){return i=a,e=a(s),t=a(l),n=a(c),r=e===t?0:.5/(t-e),o=t===n?0:.5/(n-t),u=t<e?-1:1,p}}()(jC));return e.copy=function(){return oT(e,aT())},iy.apply(e,arguments)}function sT(){var e,t=0,n=1,r=1,o=[.5],i=[0,1];function a(t){return null!=t&&t<=t?i[xC(o,t,0,r)]:e}function s(){var e=-1;for(o=new Array(r);++e<r;)o[e]=((e+1)*n-(e-r)*t)/(r+1);return a}return a.domain=function(e){return arguments.length?([t,n]=e,t=+t,n=+n,s()):[t,n]},a.range=function(e){return arguments.length?(r=(i=Array.from(e)).length-1,s()):i.slice()},a.invertExtent=function(e){var a=i.indexOf(e);return a<0?[NaN,NaN]:a<1?[t,o[0]]:a>=r?[o[r-1],n]:[o[a-1],o[a]]},a.unknown=function(t){return arguments.length?(e=t,a):a},a.thresholds=function(){return o.slice()},a.copy=function(){return sT().domain([t,n]).range(i).unknown(e)},oy.apply(FC(a),arguments)}function lT(){return lT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lT.apply(this,arguments)}function cT(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var uT={nivo:["#e8c1a0","#f47560","#f1e15b","#e8a838","#61cdbb","#97e3d5"],category10:Zv,accent:Jv,dark2:ex,paired:tx,pastel1:nx,pastel2:rx,set1:ox,set2:ix,set3:ax,tableau10:ly("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")},dT=Object.keys(uT),fT={brown_blueGreen:Zy,purpleRed_green:ev,pink_yellowGreen:nv,purple_orange:ov,red_blue:av,red_grey:lv,red_yellow_blue:uv,red_yellow_green:fv,spectral:hv},pT=Object.keys(fT),hT={brown_blueGreen:Jy,purpleRed_green:tv,pink_yellowGreen:rv,purple_orange:iv,red_blue:sv,red_grey:cv,red_yellow_blue:dv,red_yellow_green:pv,spectral:mv},mT={blues:gv,greens:yv,greys:xv,oranges:Sv,purples:Cv,reds:Pv,blue_green:Ov,blue_purple:_v,green_blue:Ev,orange_red:Av,purple_blue_green:Fv,purple_blue:Nv,purple_red:$v,red_purple:Bv,yellow_green_blue:Hv,yellow_green:Yv,yellow_orange_brown:Gv,yellow_orange_red:Qv},gT=Object.keys(mT),bT={blues:bv,greens:vv,greys:wv,oranges:kv,purples:Mv,reds:Tv,turbo:function(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-14825.05*e)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+707.56*e)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-6838.66*e)))))))+")"},viridis:lx,inferno:ux,magma:cx,plasma:dx,cividis:function(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-e*(35.34-e*(2381.73-e*(6402.7-e*(7024.72-2710.57*e)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+e*(170.73+e*(52.82-e*(131.46-e*(176.58-67.37*e)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+e*(442.36-e*(2482.43-e*(6167.24-e*(6614.94-2475.67*e)))))))+")"},warm:Cx,cool:Mx,cubehelixDefault:Tx,blue_green:jv,blue_purple:Dv,green_blue:Rv,orange_red:Iv,purple_blue_green:Lv,purple_blue:zv,purple_red:Vv,red_purple:Wv,yellow_green_blue:qv,yellow_green:Uv,yellow_orange_brown:Xv,yellow_orange_red:Kv},yT=lT({},uT,fT,mT),vT=(Object.keys(yT),lT({},hT,bT,{rainbow:function(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return Px.h=360*e-100,Px.s=1.5-1.5*t,Px.l=.8-.9*t,Px+""},sinebow:function(e){var t;return e=(.5-e)*Math.PI,Ox.r=255*(t=Math.sin(e))*t,Ox.g=255*(t=Math.sin(e+jx))*t,Ox.b=255*(t=Math.sin(e+_x))*t,Ox+""}})),xT=(Object.keys(vT),function(e,t){if("function"==typeof e)return e;if(ZS(e)){if(function(e){return void 0!==e.theme}(e)){if(void 0===t)throw new Error("Unable to use color from theme as no theme was provided");var n=Xg(t,e.theme);if(void 0===n)throw new Error("Color from theme is undefined at path: '"+e.theme+"'");return function(){return n}}if(function(e){return void 0!==e.from}(e)){var r=function(t){return Xg(t,e.from)};if(Array.isArray(e.modifiers)){for(var o,i=[],a=function(){var e=o.value,t=e[0],n=e[1];if("brighter"===t)i.push(function(e){return e.brighter(n)});else if("darker"===t)i.push(function(e){return e.darker(n)});else{if("opacity"!==t)throw new Error("Invalid color modifier: '"+t+"', must be one of: 'brighter', 'darker', 'opacity'");i.push(function(e){return e.opacity=n,e})}},s=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(t)return(t=t.call(e)).next.bind(t);if(Array.isArray(e)||(t=function(e,t){if(e){if("string"==typeof e)return cT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cT(e,t):void 0}}(e))){t&&(e=t);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e.modifiers);!(o=s()).done;)a();return 0===i.length?r:function(e){return i.reduce(function(e,t){return t(e)},Dy(r(e))).toString()}}return r}throw new Error("Invalid color spec, you should either specify 'theme' or 'from' when using a config object")}return function(){return e}}),wT=function(e,t){return(0,G.useMemo)(function(){return xT(e,t)},[e,t])},ST=function(e,t){if(function(e){return"sequential"===e.type}(e))return function(e,t){var n=e.minValue,r=e.maxValue,o=void 0!==n?n:t.min,i=void 0!==r?r:t.max,a=iT().domain([o,i]).clamp(!0);if("colors"in e)a.range(e.colors);else if("interpolator"in e)a.interpolator(e.interpolator);else{var s,l=null!=(s=e.scheme)?s:"turbo";a.interpolator(vT[l])}return a}(e,t);if(function(e){return"diverging"===e.type}(e))return function(e,t){var n,r=e.minValue,o=e.maxValue,i=void 0!==r?r:t.min,a=void 0!==o?o:t.max,s=[i,i+(a-i)/2,a],l=.5-(null!=(n=e.divergeAt)?n:.5),c=aT().domain(s).clamp(!0),u=function(e){return String(e)};if("colors"in e)u=aT().domain(s.map(function(e){return e-l*(a-i)})).range(e.colors).interpolator();else if("interpolator"in e)u=e.interpolator;else{var d,f=null!=(d=e.scheme)?d:"red_yellow_blue";u=vT[f]}return c.interpolator(function(e){return u(e+l)})}(e,t);if(function(e){return"quantize"===e.type}(e))return function(e,t){var n=sT().domain(e.domain||[t.min,t.max]).nice();if("colors"in e)n.range(e.colors);else{var r=e.scheme||"turbo",o=void 0===e.steps?7:e.steps,i=vT[r],a=Array.from({length:o}).map(function(e,t){return i(t*(1/(o-1)))});n.range(a)}return n}(e,t);throw new Error("Invalid continuous color scale config")},kT=function(e,t){return(0,G.useMemo)(function(){return function(e,t){if("function"==typeof e)return e;var n="function"==typeof t?t:function(e){return Xg(e,t)};if(Array.isArray(e)){var r=sy(e),o=function(e){return r(n(e))};return o.scale=r,o}if(ZS(e)){if(function(e){return void 0!==e.datum}(e))return function(t){return Xg(t,e.datum)};if(function(e){return void 0!==e.scheme}(e)){if(function(e){return dT.includes(e)}(e.scheme)){var i=sy(yT[e.scheme]),a=function(e){return i(n(e))};return a.scale=i,a}if(function(e){return pT.includes(e)}(e.scheme)){if(void 0!==e.size&&(e.size<3||e.size>11))throw new Error("Invalid size '"+e.size+"' for diverging color scheme '"+e.scheme+"', must be between 3~11");var s=sy(yT[e.scheme][e.size||11]),l=function(e){return s(n(e))};return l.scale=s,l}if(function(e){return gT.includes(e)}(e.scheme)){if(void 0!==e.size&&(e.size<3||e.size>9))throw new Error("Invalid size '"+e.size+"' for sequential color scheme '"+e.scheme+"', must be between 3~9");var c=sy(yT[e.scheme][e.size||9]),u=function(e){return c(n(e))};return u.scale=c,u}}throw new Error("Invalid colors, when using an object, you should either pass a 'datum' or a 'scheme' property")}return function(){return e}}(e,t)},[e,t])};function CT(){return CT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},CT.apply(this,arguments)}var MT={length:200,thickness:16,direction:"row",tickPosition:"after",tickSize:4,tickSpacing:3,tickOverlap:!1,tickFormat:function(e){return""+e},titleAlign:"start",titleOffset:4},PT={top:0,right:0,bottom:0,left:0},TT=function(e){var t,n=e.direction,r=e.itemsSpacing,o=e.padding,i=e.itemCount,a=e.itemWidth,s=e.itemHeight;if("number"!=typeof o&&("object"!=typeof(t=o)||Array.isArray(t)||null===t))throw new Error("Invalid property padding, must be one of: number, object");var l="number"==typeof o?{top:o,right:o,bottom:o,left:o}:CT({},PT,o),c=l.left+l.right,u=l.top+l.bottom,d=a+c,f=s+u,p=(i-1)*r;return"row"===n?d=a*i+p+c:"column"===n&&(f=s*i+p+u),{width:d,height:f,padding:l}},OT=function(e){var t=e.anchor,n=e.translateX,r=e.translateY,o=e.containerWidth,i=e.containerHeight,a=e.width,s=e.height,l=n,c=r;switch(t){case"top":l+=(o-a)/2;break;case"top-right":l+=o-a;break;case"right":l+=o-a,c+=(i-s)/2;break;case"bottom-right":l+=o-a,c+=i-s;break;case"bottom":l+=(o-a)/2,c+=i-s;break;case"bottom-left":c+=i-s;break;case"left":c+=(i-s)/2;break;case"center":l+=(o-a)/2,c+=(i-s)/2}return{x:l,y:c}},jT=function(e){var t,n,r,o,i,a,s=e.direction,l=e.justify,c=e.symbolSize,u=e.symbolSpacing,d=e.width,f=e.height;switch(s){case"left-to-right":t=0,n=(f-c)/2,o=f/2,a="central",l?(r=d,i="end"):(r=c+u,i="start");break;case"right-to-left":t=d-c,n=(f-c)/2,o=f/2,a="central",l?(r=0,i="start"):(r=d-c-u,i="end");break;case"top-to-bottom":t=(d-c)/2,n=0,r=d/2,i="middle",l?(o=f,a="alphabetic"):(o=c+u,a="text-before-edge");break;case"bottom-to-top":t=(d-c)/2,n=f-c,r=d/2,i="middle",l?(o=0,a="text-before-edge"):(o=f-c-u,a="alphabetic")}return{symbolX:t,symbolY:n,labelX:r,labelY:o,labelAnchor:i,labelAlignment:a}},_T=function(e){var t=e.scale,n=e.ticks,r=e.length,o=void 0===r?MT.length:r,i=e.thickness,a=void 0===i?MT.thickness:i,s=e.direction,l=void 0===s?MT.direction:s,c=e.tickPosition,u=void 0===c?MT.tickPosition:c,d=e.tickSize,f=void 0===d?MT.tickSize:d,p=e.tickSpacing,h=void 0===p?MT.tickSpacing:p,m=e.tickOverlap,g=void 0===m?MT.tickOverlap:m,b=e.tickFormat,y=void 0===b?MT.tickFormat:b,v=e.title,x=e.titleAlign,w=void 0===x?MT.titleAlign:x,S=e.titleOffset,k=function(e){var t,n=e.scale,r=e.ticks,o=e.length,i=void 0===o?MT.length:o,a=e.thickness,s=void 0===a?MT.thickness:a,l=e.direction,c=void 0===l?MT.direction:l,u=e.tickPosition,d=void 0===u?MT.tickPosition:u,f=e.tickSize,p=void 0===f?MT.tickSize:f,h=e.tickSpacing,m=void 0===h?MT.tickSpacing:h,g=e.tickOverlap,b=void 0===g?MT.tickOverlap:g,y=e.tickFormat,v=void 0===y?MT.tickFormat:y,x=e.title,w=e.titleAlign,S=void 0===w?MT.titleAlign:w,k=e.titleOffset,C=void 0===k?MT.titleOffset:k,M="column"===c?[].concat(n.domain()).reverse():n.domain(),P=LC().domain(M);2===M.length?P.range([0,i]):3===M.length&&P.range([0,i/2,i]),t="thresholds"in n?[M[0]].concat(n.thresholds(),[M[1]]):Array.isArray(r)?r:n.ticks(r);var T,O,j,_,D,E,R,A,I,F,L,N,z,$,V=function(e,t){void 0===t&&(t=16);var n=e.domain();if("thresholds"in e){var r=[],o=LC().domain(n).range([0,1]);return e.range().forEach(function(t,n){var i=e.invertExtent(t),a=i[0],s=i[1];r.push({key:n+".0",offset:o(a),stopColor:t}),r.push({key:n+".1",offset:o(s),stopColor:t})}),r}var i=e.copy();return 2===n.length?i.domain([0,1]):3===n.length&&i.domain([0,.5,1]),i.ticks(t).map(function(e){return{key:""+e,offset:e,stopColor:""+i(e)}})}(n,32),B=vk(v),W=[],H=0,q=0;return"row"===c?(T=i,O=s,q=1,D=0,j="start"===S?0:"middle"===S?i/2:i,"before"===d?(R=-p,A=b?s:0,I=-p-m,F="alphabetic",_=s+C,E="hanging"):(R=b?0:s,I=(A=s+p)+m,F="hanging",_=-C,E="alphabetic"),t.forEach(function(e){var t=P(e);W.push({x1:t,y1:R,x2:t,y2:A,text:B(e),textX:t,textY:I,textHorizontalAlign:"middle",textVerticalAlign:F})})):(T=s,O=i,H=1,D=-90,_="start"===S?i:"middle"===S?i/2:0,"before"===d?(N=b?s:0,z=(L=-p)-m,$="end",j=s+C,E="hanging"):(L=b?0:s,z=(N=s+p)+m,$="start",j=-C,E="alphabetic"),t.forEach(function(e){var t=P(e);W.push({x1:L,y1:t,x2:N,y2:t,text:B(e),textX:z,textY:t,textHorizontalAlign:$,textVerticalAlign:"central"})})),{width:T,height:O,gradientX1:0,gradientY1:H,gradientX2:q,gradientY2:0,colorStops:V,ticks:W,titleText:x,titleX:j,titleY:_,titleRotation:D,titleHorizontalAlign:S,titleVerticalAlign:E}}({scale:t,ticks:n,length:o,thickness:a,direction:l,tickPosition:u,tickSize:f,tickSpacing:h,tickOverlap:g,tickFormat:y,title:v,titleAlign:w,titleOffset:void 0===S?MT.titleOffset:S}),C=k.width,M=k.height,P=k.gradientX1,T=k.gradientY1,O=k.gradientX2,j=k.gradientY2,_=k.ticks,D=k.colorStops,E=k.titleText,R=k.titleX,A=k.titleY,I=k.titleRotation,F=k.titleVerticalAlign,L=k.titleHorizontalAlign,N=Ck(),z="ContinuousColorsLegendSvgGradient."+l+"."+D.map(function(e){return e.stopColor.replace(/[(),\s]/g,"")+"."+e.offset}).join("_");return(0,le.jsxs)("g",{children:[(0,le.jsx)("defs",{children:(0,le.jsx)("linearGradient",{id:z,x1:P,y1:T,x2:O,y2:j,children:D.map(function(e){return(0,le.jsx)("stop",CT({},e))})})}),E&&(0,le.jsx)("text",{transform:"translate("+R+", "+A+") rotate("+I+")",textAnchor:L,dominantBaseline:F,style:N.legends.title.text,children:E}),(0,le.jsx)("rect",{width:C,height:M,fill:"url(#"+z}),_.map(function(e,t){return(0,le.jsxs)(G.Fragment,{children:[(0,le.jsx)("line",{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,style:N.legends.ticks.line}),(0,le.jsx)("text",{x:e.textX,y:e.textY,textAnchor:e.textHorizontalAlign,dominantBaseline:e.textVerticalAlign,style:N.legends.ticks.text,children:e.text})]},t)})]})},DT=["containerWidth","containerHeight","anchor","translateX","translateY","length","thickness","direction"],ET=function(e){var t,n,r=e.containerWidth,o=e.containerHeight,i=e.anchor,a=e.translateX,s=void 0===a?0:a,l=e.translateY,c=void 0===l?0:l,u=e.length,d=void 0===u?MT.length:u,f=e.thickness,p=void 0===f?MT.thickness:f,h=e.direction,m=void 0===h?MT.direction:h,g=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,DT);"row"===m?(t=d,n=p):(t=p,n=d);var b=OT({anchor:i,translateX:s,translateY:c,containerWidth:r,containerHeight:o,width:t,height:n}),y=b.x,v=b.y;return(0,le.jsx)("g",{transform:"translate("+y+", "+v+")",children:(0,le.jsx)(_T,CT({length:d,thickness:p,direction:m},g))})},RT={circle:function(e){var t=e.x,n=e.y,r=e.size,o=e.fill,i=e.opacity,a=void 0===i?1:i,s=e.borderWidth,l=void 0===s?0:s,c=e.borderColor;return(0,le.jsx)("circle",{r:r/2,cx:t+r/2,cy:n+r/2,fill:o,opacity:a,strokeWidth:l,stroke:void 0===c?"transparent":c,style:{pointerEvents:"none"}})},diamond:function(e){var t=e.x,n=e.y,r=e.size,o=e.fill,i=e.opacity,a=void 0===i?1:i,s=e.borderWidth,l=void 0===s?0:s,c=e.borderColor;return(0,le.jsx)("g",{transform:"translate("+t+","+n+")",children:(0,le.jsx)("path",{d:"\n M"+r/2+" 0\n L"+.8*r+" "+r/2+"\n L"+r/2+" "+r+"\n L"+.2*r+" "+r/2+"\n L"+r/2+" 0\n ",fill:o,opacity:a,strokeWidth:l,stroke:void 0===c?"transparent":c,style:{pointerEvents:"none"}})})},square:function(e){var t=e.x,n=e.y,r=e.size,o=e.fill,i=e.opacity,a=void 0===i?1:i,s=e.borderWidth,l=void 0===s?0:s,c=e.borderColor;return(0,le.jsx)("rect",{x:t,y:n,fill:o,opacity:a,strokeWidth:l,stroke:void 0===c?"transparent":c,width:r,height:r,style:{pointerEvents:"none"}})},triangle:function(e){var t=e.x,n=e.y,r=e.size,o=e.fill,i=e.opacity,a=void 0===i?1:i,s=e.borderWidth,l=void 0===s?0:s,c=e.borderColor;return(0,le.jsx)("g",{transform:"translate("+t+","+n+")",children:(0,le.jsx)("path",{d:"\n M"+r/2+" 0\n L"+r+" "+r+"\n L0 "+r+"\n L"+r/2+" 0\n ",fill:o,opacity:a,strokeWidth:l,stroke:void 0===c?"transparent":c,style:{pointerEvents:"none"}})})}},AT=function(e){var t,n,r,o,i,a,s,l,c,u,d,f=e.x,p=e.y,h=e.width,m=e.height,g=e.data,b=e.direction,y=void 0===b?"left-to-right":b,v=e.justify,x=void 0!==v&&v,w=e.textColor,S=e.background,k=void 0===S?"transparent":S,C=e.opacity,M=void 0===C?1:C,P=e.symbolShape,T=void 0===P?"square":P,O=e.symbolSize,j=void 0===O?16:O,_=e.symbolSpacing,D=void 0===_?8:_,E=e.symbolBorderWidth,R=void 0===E?0:E,A=e.symbolBorderColor,I=void 0===A?"transparent":A,F=e.onClick,L=e.onMouseEnter,N=e.onMouseLeave,z=e.toggleSerie,$=e.effects,V=(0,G.useState)({}),B=V[0],W=V[1],H=Ck(),q=(0,G.useCallback)(function(e){if($){var t=$.filter(function(e){return"hover"===e.on}).reduce(function(e,t){return CT({},e,t.style)},{});W(t)}null==L||L(g,e)},[L,g,$]),Y=(0,G.useCallback)(function(e){if($){var t=$.filter(function(e){return"hover"!==e.on}).reduce(function(e,t){return CT({},e,t.style)},{});W(t)}null==N||N(g,e)},[N,g,$]),U=jT({direction:y,justify:x,symbolSize:null!=(t=B.symbolSize)?t:j,symbolSpacing:D,width:h,height:m}),X=U.symbolX,Q=U.symbolY,K=U.labelX,Z=U.labelY,J=U.labelAnchor,ee=U.labelAlignment,te=[F,L,N,z].some(function(e){return void 0!==e}),ne="function"==typeof T?T:RT[T];return(0,le.jsxs)("g",{transform:"translate("+f+","+p+")",style:{opacity:null!=(n=B.itemOpacity)?n:M},children:[(0,le.jsx)("rect",{width:h,height:m,fill:null!=(r=B.itemBackground)?r:k,style:{cursor:te?"pointer":"auto"},onClick:function(e){null==F||F(g,e),null==z||z(g.id)},onMouseEnter:q,onMouseLeave:Y}),G.createElement(ne,CT({id:g.id,x:X,y:Q,size:null!=(o=B.symbolSize)?o:j,fill:null!=(i=null!=(a=g.fill)?a:g.color)?i:"black",borderWidth:null!=(s=B.symbolBorderWidth)?s:R,borderColor:null!=(l=B.symbolBorderColor)?l:I},g.hidden?H.legends.hidden.symbol:void 0)),(0,le.jsx)("text",{textAnchor:J,style:CT({},Pk(H.legends.text),{fill:null!=(c=null!=(u=null!=(d=B.itemTextColor)?d:w)?u:H.legends.text.fill)?c:"black",dominantBaseline:ee,pointerEvents:"none",userSelect:"none"},g.hidden?H.legends.hidden.text:void 0),x:K,y:Z,children:g.label})]})},IT=function(e){var t=e.data,n=e.x,r=e.y,o=e.direction,i=e.padding,a=void 0===i?0:i,s=e.justify,l=e.effects,c=e.itemWidth,u=e.itemHeight,d=e.itemDirection,f=void 0===d?"left-to-right":d,p=e.itemsSpacing,h=void 0===p?0:p,m=e.itemTextColor,g=e.itemBackground,b=void 0===g?"transparent":g,y=e.itemOpacity,v=void 0===y?1:y,x=e.symbolShape,w=e.symbolSize,S=e.symbolSpacing,k=e.symbolBorderWidth,C=e.symbolBorderColor,M=e.onClick,P=e.onMouseEnter,T=e.onMouseLeave,O=e.toggleSerie,j=TT({itemCount:t.length,itemWidth:c,itemHeight:u,itemsSpacing:h,direction:o,padding:a}).padding,_="row"===o?c+h:0,D="column"===o?u+h:0;return(0,le.jsx)("g",{transform:"translate("+n+","+r+")",children:t.map(function(e,t){return(0,le.jsx)(AT,{data:e,x:t*_+j.left,y:t*D+j.top,width:c,height:u,direction:f,justify:s,effects:l,textColor:m,background:b,opacity:v,symbolShape:x,symbolSize:w,symbolSpacing:S,symbolBorderWidth:k,symbolBorderColor:C,onClick:M,onMouseEnter:P,onMouseLeave:T,toggleSerie:O},t)})})},FT=function(e){var t=e.data,n=e.containerWidth,r=e.containerHeight,o=e.translateX,i=void 0===o?0:o,a=e.translateY,s=void 0===a?0:a,l=e.anchor,c=e.direction,u=e.padding,d=void 0===u?0:u,f=e.justify,p=e.itemsSpacing,h=void 0===p?0:p,m=e.itemWidth,g=e.itemHeight,b=e.itemDirection,y=e.itemTextColor,v=e.itemBackground,x=e.itemOpacity,w=e.symbolShape,S=e.symbolSize,k=e.symbolSpacing,C=e.symbolBorderWidth,M=e.symbolBorderColor,P=e.onClick,T=e.onMouseEnter,O=e.onMouseLeave,j=e.toggleSerie,_=e.effects,D=TT({itemCount:t.length,itemsSpacing:h,itemWidth:m,itemHeight:g,direction:c,padding:d}),E=D.width,R=D.height,A=OT({anchor:l,translateX:i,translateY:s,containerWidth:n,containerHeight:r,width:E,height:R}),I=A.x,F=A.y;return(0,le.jsx)(IT,{data:t,x:I,y:F,direction:c,padding:d,justify:f,effects:_,itemsSpacing:h,itemWidth:m,itemHeight:g,itemDirection:b,itemTextColor:y,itemBackground:v,itemOpacity:x,symbolShape:w,symbolSize:S,symbolSpacing:k,symbolBorderWidth:C,symbolBorderColor:M,onClick:P,onMouseEnter:T,onMouseLeave:O,toggleSerie:"boolean"==typeof j?void 0:j})},LT={start:"left",middle:"center",end:"right"},NT=function(e,t){var n=t.data,r=t.containerWidth,o=t.containerHeight,i=t.translateX,a=void 0===i?0:i,s=t.translateY,l=void 0===s?0:s,c=t.anchor,u=t.direction,d=t.padding,f=void 0===d?0:d,p=t.justify,h=void 0!==p&&p,m=t.itemsSpacing,g=void 0===m?0:m,b=t.itemWidth,y=t.itemHeight,v=t.itemDirection,x=void 0===v?"left-to-right":v,w=t.itemTextColor,S=t.symbolSize,k=void 0===S?16:S,C=t.symbolSpacing,M=void 0===C?8:C,P=t.theme,T=TT({itemCount:n.length,itemWidth:b,itemHeight:y,itemsSpacing:g,direction:u,padding:f}),O=T.width,j=T.height,_=T.padding,D=OT({anchor:c,translateX:a,translateY:l,containerWidth:r,containerHeight:o,width:O,height:j}),E=D.x,R=D.y,A="row"===u?b+g:0,I="column"===u?y+g:0;e.save(),e.translate(E,R),e.font=P.legends.text.fontSize+"px "+(P.legends.text.fontFamily||"sans-serif"),n.forEach(function(t,n){var r,o,i=n*A+_.left,a=n*I+_.top,s=jT({direction:x,justify:h,symbolSize:k,symbolSpacing:M,width:b,height:y}),l=s.symbolX,c=s.symbolY,u=s.labelX,d=s.labelY,f=s.labelAnchor,p=s.labelAlignment;e.fillStyle=null!=(r=t.color)?r:"black",e.fillRect(i+l,a+c,k,k),e.textAlign=LT[f],"central"===p&&(e.textBaseline="middle"),e.fillStyle=null!=(o=null!=w?w:P.legends.text.fill)?o:"black",e.fillText(String(t.label),i+u,a+d)}),e.restore()};function zT(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function $T(e){return function(){return e}}function VT(e,t){return e[t]}function BT(e){const t=[];return t.key=e,t}function WT(){return WT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},WT.apply(this,arguments)}function HT(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}Array.prototype.slice;var qT,YT=function(e){var t=e.bars,n=e.annotations,r=XP({data:t,annotations:n,getPosition:function(e){return{x:e.x+e.width/2,y:e.y+e.height/2}},getDimensions:function(e){var t=e.height,n=e.width;return{width:n,height:t,size:Math.max(n,t)}}});return(0,le.jsx)(le.Fragment,{children:r.map(function(e,t){return(0,le.jsx)(tT,WT({},e),t)})})},UT=function(e){var t=e.width,n=e.height,r=e.legends,o=e.toggleSerie;return(0,le.jsx)(le.Fragment,{children:r.map(function(e,r){var i,a=e[0],s=e[1];return(0,le.jsx)(FT,WT({},a,{containerWidth:t,containerHeight:n,data:null!=(i=a.data)?i:s,toggleSerie:a.toggleSerie&&"keys"===a.dataFrom?o:void 0}),r)})})},GT=["data"],XT=["color","label"],QT={indexBy:"id",keys:["value"],groupMode:"stacked",layout:"vertical",reverse:!1,minValue:"auto",maxValue:"auto",valueScale:{type:"linear"},indexScale:{type:"band",round:!0},padding:.1,innerPadding:0,axisBottom:{},axisLeft:{},enableGridX:!1,enableGridY:!0,enableLabel:!0,label:"formattedValue",labelPosition:"middle",labelOffset:0,labelSkipWidth:0,labelSkipHeight:0,labelTextColor:{from:"theme",theme:"labels.text.fill"},colorBy:"id",colors:{scheme:"nivo"},borderRadius:0,borderWidth:0,borderColor:{from:"color"},isInteractive:!0,tooltip:function(e){var t=e.color,n=e.label,r=HT(e,XT);return(0,le.jsx)(Lg,{id:n,value:r.formattedValue,enableChip:!0,color:t})},tooltipLabel:function(e){return e.id+" - "+e.indexValue},legends:[],initialHiddenIds:[],annotations:[],markers:[],enableTotals:!1,totalsOffset:10},KT=WT({},QT,{layers:["grid","axes","bars","totals","markers","legends","annotations"],barComponent:function(e){var t,n=e.bar,r=n.data,o=HT(n,GT),i=e.style,a=i.borderColor,s=i.color,l=i.height,c=i.labelColor,u=i.labelOpacity,d=i.labelX,f=i.labelY,p=i.transform,h=i.width,m=i.textAnchor,g=e.borderRadius,b=e.borderWidth,y=e.label,v=e.shouldRenderLabel,x=e.isInteractive,w=e.onClick,S=e.onMouseEnter,k=e.onMouseLeave,C=e.tooltip,M=e.isFocusable,P=e.ariaLabel,T=e.ariaLabelledBy,O=e.ariaDescribedBy,j=e.ariaDisabled,_=e.ariaHidden,D=Ck(),E=qg(),R=E.showTooltipFromEvent,A=E.showTooltipAt,I=E.hideTooltip,F=(0,G.useMemo)(function(){return function(){return(0,G.createElement)(C,WT({},o,r))}},[C,o,r]),L=(0,G.useCallback)(function(e){null==w||w(WT({color:o.color},r),e)},[o,r,w]),N=(0,G.useCallback)(function(e){return R(F(),e)},[R,F]),z=(0,G.useCallback)(function(e){null==S||S(r,e),R(F(),e)},[r,S,R,F]),$=(0,G.useCallback)(function(e){null==k||k(r,e),I()},[r,I,k]),V=(0,G.useCallback)(function(){A(F(),[o.absX+o.width/2,o.absY])},[A,F,o]),B=(0,G.useCallback)(function(){I()},[I]);return(0,le.jsxs)(Dg.g,{transform:p,children:[(0,le.jsx)(Dg.rect,{width:bg(h,function(e){return Math.max(e,0)}),height:bg(l,function(e){return Math.max(e,0)}),rx:g,ry:g,fill:null!=(t=r.fill)?t:s,strokeWidth:b,stroke:a,focusable:M,tabIndex:M?0:void 0,"aria-label":P?P(r):void 0,"aria-labelledby":T?T(r):void 0,"aria-describedby":O?O(r):void 0,"aria-disabled":j?j(r):void 0,"aria-hidden":_?_(r):void 0,onMouseEnter:x?z:void 0,onMouseMove:x?N:void 0,onMouseLeave:x?$:void 0,onClick:x?L:void 0,onFocus:x&&M?V:void 0,onBlur:x&&M?B:void 0}),v&&(0,le.jsx)(Dg.text,{x:d,y:f,textAnchor:m,dominantBaseline:"central",fillOpacity:u,style:WT({},D.labels.text,{pointerEvents:"none",fill:c}),children:y})]})},defs:[],fill:[],animate:!0,motionConfig:"default",role:"img",isFocusable:!1}),ZT=WT({},QT,{layers:["grid","axes","bars","totals","legends","annotations"],pixelRatio:"undefined"!=typeof window&&null!=(qT=window.devicePixelRatio)?qT:1}),JT=function(e,t,n,r,o,i){return mP(r,{all:e.map(t),min:0,max:0},o,i).padding(n)},eO=function(e,t){return e.map(function(e){return WT({},t.reduce(function(e,t){return e[t]=null,e},{}),e)})},tO=function(e){return Object.keys(e).reduce(function(t,n){return e[n]&&(t[n]=e[n]),t},{})},nO=function(e){return[e,Number(e)]};function rO(e,t,n,r){return void 0===e&&(e=QT.layout),void 0===t&&(t=QT.reverse),void 0===n&&(n=QT.labelPosition),void 0===r&&(r=QT.labelOffset),function(o,i){var a=r*(t?-1:1);if("horizontal"===e){var s=o/2;return"start"===n?s=t?o:0:"end"===n&&(s=t?0:o),{labelX:s+a,labelY:i/2,textAnchor:"middle"===n?"middle":t?"end":"start"}}var l=i/2;return"start"===n?l=t?0:i:"end"===n&&(l=t?i:0),{labelX:o/2,labelY:l-a,textAnchor:"middle"}}}var oO=["layout","minValue","maxValue","reverse","width","height","padding","innerPadding","valueScale","indexScale","hiddenIds"],iO=function(e,t){return e>t},aO=function(e,t){return e<t},sO=function(e,t){return Array.from(" ".repeat(t-e),function(t,n){return e+n})},lO=function(e){return iO(e,0)?0:e},cO=function(e,t,n,r){var o=e.data,i=e.formatValue,a=e.getColor,s=e.getIndex,l=e.getTooltipLabel,c=e.innerPadding,u=void 0===c?0:c,d=e.keys,f=e.xScale,p=e.yScale,h=e.margin,m=n?aO:iO,g=o.map(tO),b=[];return d.forEach(function(e,n){return sO(0,f.domain().length).forEach(function(c){var d,y,v,x=nO(o[c][e]),w=x[0],S=x[1],k=s(o[c]),C=(null!=(d=f(k))?d:0)+t*n+u*n,M=m(y=S,0)?null!=(v=p(y))?v:0:r,P=function(e,t){var n;return m(e,0)?r-t:(null!=(n=p(e))?n:0)-r}(S,M),T={id:e,value:null===w?w:S,formattedValue:i(S),hidden:!1,index:c,indexValue:k,data:g[c]};b.push({key:e+"."+T.indexValue,index:b.length,data:T,x:C,y:M,absX:h.left+C,absY:h.top+M,width:t,height:P,color:a(T),label:l(T)})})}),b},uO=function(e,t,n,r){var o=e.data,i=e.formatValue,a=e.getIndex,s=e.getColor,l=e.getTooltipLabel,c=e.keys,u=e.innerPadding,d=void 0===u?0:u,f=e.xScale,p=e.yScale,h=e.margin,m=n?aO:iO,g=o.map(tO),b=[];return c.forEach(function(e,n){return sO(0,p.domain().length).forEach(function(c){var u,y,v,x=nO(o[c][e]),w=x[0],S=x[1],k=a(o[c]),C=m(y=S,0)?r:null!=(v=f(y))?v:0,M=(null!=(u=p(k))?u:0)+t*n+d*n,P=function(e,t){var n;return m(e,0)?(null!=(n=f(e))?n:0)-r:r-t}(S,C),T={id:e,value:null===w?w:S,formattedValue:i(S),hidden:!1,index:c,indexValue:k,data:g[c]};b.push({key:e+"."+T.indexValue,index:b.length,data:T,x:C,y:M,absX:h.left+C,absY:h.top+M,width:P,height:t,color:s(T),label:l(T)})})}),b},dO=function(e){var t,n,r=e.layout,o=e.minValue,i=e.maxValue,a=e.reverse,s=e.width,l=e.height,c=e.padding,u=void 0===c?0:c,d=e.innerPadding,f=void 0===d?0:d,p=e.valueScale,h=e.indexScale,m=e.hiddenIds,g=void 0===m?[]:m,b=HT(e,oO),y=b.keys.filter(function(e){return!g.includes(e)}),v=eO(b.data,y),x="vertical"===r?["y","x",s]:["x","y",l],w=x[0],S=x[1],k=x[2],C=JT(v,b.getIndex,u,h,k,S),M=WT({max:i,min:o,reverse:a},p),P="auto"===M.min?lO:function(e){return e},T=v.reduce(function(e,t){return[].concat(e,y.map(function(e){return t[e]}))},[]).filter(Boolean),O=mP(M,{all:T,min:P(Math.min.apply(Math,T)),max:(n=Math.max.apply(Math,T),isFinite(n)?n:0)},"x"===w?s:l,w),j="vertical"===r?[C,O]:[O,C],_=j[0],D=j[1],E=(C.bandwidth()-f*(y.length-1))/y.length,R=[WT({},b,{data:v,keys:y,innerPadding:f,xScale:_,yScale:D}),E,M.reverse,null!=(t=O(0))?t:0];return{xScale:_,yScale:D,bars:E>0?"vertical"===r?cO.apply(void 0,R):uO.apply(void 0,R):[]}},fO=["data","layout","minValue","maxValue","reverse","width","height","padding","valueScale","indexScale","hiddenIds"],pO=function e(t){var n;return t.some(Array.isArray)?e((n=[]).concat.apply(n,t)):t},hO=function(e,t,n){var r=e.formatValue,o=e.getColor,i=e.getIndex,a=e.getTooltipLabel,s=e.innerPadding,l=e.stackedData,c=e.xScale,u=e.yScale,d=e.margin,f=[];return l.forEach(function(e){return c.domain().forEach(function(l,p){var h,m,g=e[p],b=null!=(h=c(i(g.data)))?h:0,y=(null!=(m=function(e){return u(e[n?0:1])}(g))?m:0)+.5*s,v=function(e,t){var r;return(null!=(r=u(e[n?1:0]))?r:0)-t}(g,y)-s,x=nO(g.data[e.key]),w=x[0],S=x[1],k={id:e.key,value:null===w?w:S,formattedValue:r(S),hidden:!1,index:p,indexValue:l,data:tO(g.data)};f.push({key:e.key+"."+l,index:f.length,data:k,x:b,y,absX:d.left+b,absY:d.top+y,width:t,height:v,color:o(k),label:a(k)})})}),f},mO=function(e,t,n){var r=e.formatValue,o=e.getColor,i=e.getIndex,a=e.getTooltipLabel,s=e.innerPadding,l=e.stackedData,c=e.xScale,u=e.yScale,d=e.margin,f=[];return l.forEach(function(e){return u.domain().forEach(function(l,p){var h,m,g=e[p],b=null!=(h=u(i(g.data)))?h:0,y=(null!=(m=function(e){return c(e[n?1:0])}(g))?m:0)+.5*s,v=function(e,t){var r;return(null!=(r=c(e[n?0:1]))?r:0)-t}(g,y)-s,x=nO(g.data[e.key]),w=x[0],S=x[1],k={id:e.key,value:null===w?w:S,formattedValue:r(S),hidden:!1,index:p,indexValue:l,data:tO(g.data)};f.push({key:e.key+"."+l,index:f.length,data:k,x:y,y:b,absX:d.left+y,absY:d.top+b,width:v,height:t,color:o(k),label:a(k)})})}),f},gO=function(e){var t,n=e.data,r=e.layout,o=e.minValue,i=e.maxValue,a=e.reverse,s=e.width,l=e.height,c=e.padding,u=void 0===c?0:c,d=e.valueScale,f=e.indexScale,p=e.hiddenIds,h=void 0===p?[]:p,m=HT(e,fO),g=m.keys.filter(function(e){return!h.includes(e)}),b=function(){var e=$T([]),t=Xb,n=Jb,r=VT;function o(o){var i,a,s=Array.from(e.apply(this,arguments),BT),l=s.length,c=-1;for(const e of o)for(i=0,++c;i<l;++i)(s[i][c]=[0,+r(e,s[i].key,c,o)]).data=e;for(i=0,a=zT(t(s));i<l;++i)s[a[i]].index=i;return n(s,a),s}return o.keys=function(t){return arguments.length?(e="function"==typeof t?t:$T(Array.from(t)),o):e},o.value=function(e){return arguments.length?(r="function"==typeof e?e:$T(+e),o):r},o.order=function(e){return arguments.length?(t=null==e?Xb:"function"==typeof e?e:$T(Array.from(e)),o):t},o.offset=function(e){return arguments.length?(n=null==e?Jb:e,o):n},o}().keys(g).offset(ey)(eO(n,g)),y="vertical"===r?["y","x",s]:["x","y",l],v=y[0],x=y[1],w=y[2],S=JT(n,m.getIndex,u,f,w,x),k=WT({max:i,min:o,reverse:a},d),C=(t=pO(b),"log"===d.type?t.filter(function(e){return 0!==e}):t),M=mP(k,{all:C,min:Math.min.apply(Math,C),max:Math.max.apply(Math,C)},"x"===v?s:l,v),P="vertical"===r?[S,M]:[M,S],T=P[0],O=P[1],j=m.innerPadding>0?m.innerPadding:0,_=S.bandwidth(),D=[WT({},m,{innerPadding:j,stackedData:b,xScale:T,yScale:O}),_,k.reverse];return{xScale:T,yScale:O,bars:_>0?"vertical"===r?hO.apply(void 0,D):mO.apply(void 0,D):[]}},bO=function(e){var t=e.bars,n=e.direction,r=e.from,o=e.groupMode,i=e.layout,a=e.legendLabel,s=e.reverse,l=Qk(null!=a?a:"indexes"===r?"indexValue":"id");return"indexes"===r?function(e,t,n){var r=oC(e.map(function(e){var t,r;return{id:null!=(t=e.data.indexValue)?t:"",label:n(e.data),hidden:e.data.hidden,color:null!=(r=e.color)?r:"#000"}}),function(e){return e.id});return"horizontal"===t&&r.reverse(),r}(t,i,l):function(e,t,n,r,o,i){var a=oC(e.map(function(e){var t;return{id:e.data.id,label:i(e.data),hidden:e.data.hidden,color:null!=(t=e.color)?t:"#000"}}),function(e){return e.id});return("vertical"===t&&"stacked"===r&&"column"===n&&!0!==o||"horizontal"===t&&"stacked"===r&&!0===o)&&a.reverse(),a}(t,i,n,o,s,l)},yO=function(e,t,n){var r=e.get(t)||0;e.set(t,r+n)},vO=function(e){var t=e.indexBy,n=void 0===t?QT.indexBy:t,r=e.keys,o=void 0===r?QT.keys:r,i=e.label,a=void 0===i?QT.label:i,s=e.tooltipLabel,l=void 0===s?QT.tooltipLabel:s,c=e.valueFormat,u=e.colors,d=void 0===u?QT.colors:u,f=e.colorBy,p=void 0===f?QT.colorBy:f,h=e.borderColor,m=void 0===h?QT.borderColor:h,g=e.labelTextColor,b=void 0===g?QT.labelTextColor:g,y=e.groupMode,v=void 0===y?QT.groupMode:y,x=e.layout,w=void 0===x?QT.layout:x,S=e.reverse,k=void 0===S?QT.reverse:S,C=e.data,M=e.minValue,P=void 0===M?QT.minValue:M,T=e.maxValue,O=void 0===T?QT.maxValue:T,j=e.margin,_=e.width,D=e.height,E=e.padding,R=void 0===E?QT.padding:E,A=e.innerPadding,I=void 0===A?QT.innerPadding:A,F=e.valueScale,L=void 0===F?QT.valueScale:F,N=e.indexScale,z=void 0===N?QT.indexScale:N,$=e.initialHiddenIds,V=void 0===$?QT.initialHiddenIds:$,B=e.enableLabel,W=void 0===B?QT.enableLabel:B,H=e.labelSkipWidth,q=void 0===H?QT.labelSkipWidth:H,Y=e.labelSkipHeight,U=void 0===Y?QT.labelSkipHeight:Y,X=e.legends,Q=void 0===X?QT.legends:X,K=e.legendLabel,Z=e.totalsOffset,J=void 0===Z?QT.totalsOffset:Z,ee=(0,G.useState)(null!=V?V:[]),te=ee[0],ne=ee[1],re=(0,G.useCallback)(function(e){ne(function(t){return t.indexOf(e)>-1?t.filter(function(t){return t!==e}):[].concat(t,[e])})},[]),oe=Kk(n),ie=Kk(a),ae=Kk(l),se=xk(c),le=Ck(),ce=kT(d,p),ue=wT(m,le),de=wT(b,le),fe=("grouped"===v?dO:gO)({layout:w,reverse:k,data:C,getIndex:oe,keys:o,minValue:P,maxValue:O,width:_,height:D,getColor:ce,padding:R,innerPadding:I,valueScale:L,indexScale:z,hiddenIds:te,formatValue:se,getTooltipLabel:ae,margin:j}),pe=fe.bars,he=fe.xScale,me=fe.yScale,ge=(0,G.useMemo)(function(){return pe.filter(function(e){return null!==e.data.value}).map(function(e,t){return WT({},e,{index:t})})},[pe]),be=(0,G.useCallback)(function(e){var t=e.width,n=e.height;return!(!W||q>0&&t<q||U>0&&n<U)},[W,q,U]),ye=(0,G.useMemo)(function(){return o.map(function(e){var t=pe.find(function(t){return t.data.id===e});return WT({},t,{data:WT({id:e},null==t?void 0:t.data,{hidden:te.includes(e)})})})},[te,o,pe]),ve=(0,G.useMemo)(function(){return Q.map(function(e){return[e,bO({bars:"keys"===e.dataFrom?ye:pe,direction:e.direction,from:e.dataFrom,groupMode:v,layout:w,legendLabel:K,reverse:k})]})},[Q,ye,pe,v,w,K,k]),xe=(0,G.useMemo)(function(){return function(e,t,n,r,o,i,a){void 0===r&&(r=QT.layout),void 0===o&&(o=QT.groupMode);var s=[];if(0===e.length)return s;var l=new Map,c=e[0].width,u=e[0].height;if("stacked"===o){var d=new Map;e.forEach(function(e){var t=e.data,n=t.indexValue,r=t.value;yO(l,n,Number(r)),function(e,t,n){var r=e.get(t)||0;e.set(t,r+(n>0?n:0))}(d,n,Number(r))}),d.forEach(function(e,o){var d,f,p,h=l.get(o)||0;"vertical"===r?(d=t(o),f=n(e),p=n(e/2)):(d=t(e),f=n(o),p=t(e/2)),d+="vertical"===r?c/2:i,f+="vertical"===r?-i:u/2,s.push({key:"total_"+o,x:d,y:f,value:h,formattedValue:a(h),animationOffset:p})})}else if("grouped"===o){var f=new Map,p=new Map;e.forEach(function(e){var t=e.data,n=t.indexValue,r=t.value;yO(l,n,Number(r)),function(e,t,n){var r=e.get(t)||0;e.set(t,Math.max(r,Number(n)))}(f,n,Number(r)),function(e,t){var n=e.get(t)||0;e.set(t,n+1)}(p,n)}),f.forEach(function(e,o){var d,f,h,m=l.get(o)||0,g=p.get(o);"vertical"===r?(d=t(o),f=n(e),h=n(e/2)):(d=t(e),f=n(o),h=t(e/2)),d+="vertical"===r?g*c/2:i,f+="vertical"===r?-i:g*u/2,s.push({key:"total_"+o,x:d,y:f,value:m,formattedValue:a(m),animationOffset:h})})}return s}(pe,he,me,w,v,J,se)},[pe,he,me,w,v,J,se]);return{bars:pe,barsWithValue:ge,xScale:he,yScale:me,getIndex:oe,getLabel:ie,getTooltipLabel:ae,formatValue:se,getColor:ce,getBorderColor:ue,getLabelColor:de,shouldRenderBarLabel:be,hiddenIds:te,toggleSerie:re,legendsWithData:ve,barTotals:xe}},xO=function(e){var t=e.data,n=e.springConfig,r=e.animate,o=e.layout,i=void 0===o?KT.layout:o,a=Ck();return dg(t,{keys:function(e){return e.key},from:function(e){return{x:"vertical"===i?e.x:e.animationOffset,y:"vertical"===i?e.animationOffset:e.y,labelOpacity:0}},enter:function(e){return{x:e.x,y:e.y,labelOpacity:1}},update:function(e){return{x:e.x,y:e.y,labelOpacity:1}},leave:function(e){return{x:"vertical"===i?e.x:e.animationOffset,y:"vertical"===i?e.animationOffset:e.y,labelOpacity:0}},config:n,immediate:!r,initial:r?void 0:null})(function(e,t){return(0,le.jsx)(Dg.text,{x:e.x,y:e.y,fillOpacity:e.labelOpacity,style:WT({},a.labels.text,{pointerEvents:"none"}),fontWeight:"bold",fontSize:a.labels.text.fontSize,fontFamily:a.labels.text.fontFamily,textAnchor:"vertical"===i?"middle":"start",alignmentBaseline:"vertical"===i?"alphabetic":"middle",children:t.formattedValue},t.key)})},wO=["isInteractive","animate","motionConfig","theme","renderWrapper"],SO=function(e){var t=e.data,n=e.indexBy,r=e.keys,o=e.margin,i=e.width,a=e.height,s=e.groupMode,l=e.layout,c=e.reverse,u=e.minValue,d=e.maxValue,f=e.valueScale,p=e.indexScale,h=e.padding,m=e.innerPadding,g=e.axisTop,b=e.axisRight,y=e.axisBottom,v=void 0===y?KT.axisBottom:y,x=e.axisLeft,w=void 0===x?KT.axisLeft:x,S=e.enableGridX,k=void 0===S?KT.enableGridX:S,C=e.enableGridY,M=void 0===C?KT.enableGridY:C,P=e.gridXValues,T=e.gridYValues,O=e.layers,j=void 0===O?KT.layers:O,_=e.barComponent,D=void 0===_?KT.barComponent:_,E=e.enableLabel,R=void 0===E?KT.enableLabel:E,A=e.label,I=e.labelSkipWidth,F=void 0===I?KT.labelSkipWidth:I,L=e.labelSkipHeight,N=void 0===L?KT.labelSkipHeight:L,z=e.labelTextColor,$=e.labelPosition,V=void 0===$?KT.labelPosition:$,B=e.labelOffset,W=void 0===B?KT.labelOffset:B,H=e.markers,q=void 0===H?KT.markers:H,Y=e.colorBy,U=e.colors,X=e.defs,Q=void 0===X?KT.defs:X,K=e.fill,Z=void 0===K?KT.fill:K,J=e.borderRadius,ee=void 0===J?KT.borderRadius:J,te=e.borderWidth,ne=void 0===te?KT.borderWidth:te,re=e.borderColor,oe=e.annotations,ie=void 0===oe?KT.annotations:oe,ae=e.legendLabel,se=e.tooltipLabel,ce=e.valueFormat,ue=e.isInteractive,de=void 0===ue?KT.isInteractive:ue,fe=e.tooltip,pe=void 0===fe?KT.tooltip:fe,he=e.onClick,me=e.onMouseEnter,ge=e.onMouseLeave,be=e.legends,ye=e.role,ve=void 0===ye?KT.role:ye,xe=e.ariaLabel,we=e.ariaLabelledBy,Se=e.ariaDescribedBy,ke=e.isFocusable,Ce=void 0===ke?KT.isFocusable:ke,Me=e.barAriaLabel,Pe=e.barAriaLabelledBy,Te=e.barAriaDescribedBy,Oe=e.barAriaHidden,je=e.barAriaDisabled,_e=e.initialHiddenIds,De=e.enableTotals,Ee=void 0===De?KT.enableTotals:De,Re=e.totalsOffset,Ae=void 0===Re?KT.totalsOffset:Re,Ie=lk(),Fe=Ie.animate,Le=Ie.config,Ne=bk(i,a,o),ze=Ne.outerWidth,$e=Ne.outerHeight,Ve=Ne.margin,Be=Ne.innerWidth,We=Ne.innerHeight,He=vO({indexBy:n,label:A,tooltipLabel:se,valueFormat:ce,colors:U,colorBy:Y,borderColor:re,labelTextColor:z,groupMode:s,layout:l,reverse:c,data:t,keys:r,minValue:u,maxValue:d,margin:Ve,width:Be,height:We,padding:h,innerPadding:m,valueScale:f,indexScale:p,enableLabel:R,labelSkipWidth:F,labelSkipHeight:N,legends:be,legendLabel:ae,initialHiddenIds:_e,totalsOffset:Ae}),qe=He.bars,Ye=He.barsWithValue,Ue=He.xScale,Ge=He.yScale,Xe=He.getLabel,Qe=He.getTooltipLabel,Ke=He.getBorderColor,Ze=He.getLabelColor,Je=He.shouldRenderBarLabel,et=He.toggleSerie,tt=He.legendsWithData,nt=He.barTotals,rt=He.getColor,ot=rO(l,c,V,W),it=dg(Ye,{keys:function(e){return e.key},from:function(e){return WT({borderColor:Ke(e),color:e.color,height:0,labelColor:Ze(e),labelOpacity:0},ot(e.width,e.height),{transform:"translate("+e.x+", "+(e.y+e.height)+")",width:e.width},"vertical"===l?{}:{height:e.height,transform:"translate("+e.x+", "+e.y+")",width:0})},enter:function(e){return WT({borderColor:Ke(e),color:e.color,height:e.height,labelColor:Ze(e),labelOpacity:1},ot(e.width,e.height),{transform:"translate("+e.x+", "+e.y+")",width:e.width})},update:function(e){return WT({borderColor:Ke(e),color:e.color,height:e.height,labelColor:Ze(e),labelOpacity:1},ot(e.width,e.height),{transform:"translate("+e.x+", "+e.y+")",width:e.width})},leave:function(e){return WT({borderColor:Ke(e),color:e.color,height:0,labelColor:Ze(e),labelOpacity:0},ot(e.width,e.height),{labelY:0,transform:"translate("+e.x+", "+(e.y+e.height)+")",width:e.width},"vertical"===l?{}:WT({},ot(e.width,e.height),{labelX:0,height:e.height,transform:"translate("+e.x+", "+e.y+")",width:0}))},config:Le,immediate:!Fe,initial:Fe?void 0:null}),at=(0,G.useMemo)(function(){return{borderRadius:ee,borderWidth:ne,enableLabel:R,isInteractive:de,labelSkipWidth:F,labelSkipHeight:N,onClick:he,onMouseEnter:me,onMouseLeave:ge,getTooltipLabel:Qe,tooltip:pe,isFocusable:Ce,ariaLabel:Me,ariaLabelledBy:Pe,ariaDescribedBy:Te,ariaHidden:Oe,ariaDisabled:je}},[ee,ne,R,Qe,de,N,F,he,me,ge,pe,Ce,Me,Pe,Te,Oe,je]),st=nC(Q,qe,Z,{dataKey:"data",targetKey:"data.fill"}),lt={annotations:null,axes:null,bars:null,grid:null,legends:null,markers:null,totals:null};j.includes("annotations")&&(lt.annotations=(0,le.jsx)(YT,{bars:qe,annotations:ie},"annotations")),j.includes("axes")&&(lt.axes=(0,le.jsx)(IP,{xScale:Ue,yScale:Ge,width:Be,height:We,top:g,right:b,bottom:v,left:w},"axes")),j.includes("bars")&&(lt.bars=(0,le.jsx)(G.Fragment,{children:it(function(e,t){return(0,G.createElement)(D,WT({},at,{bar:t,style:e,shouldRenderLabel:Je(t),label:Xe(t.data)}))})},"bars")),j.includes("grid")&&(lt.grid=(0,le.jsx)(NP,{width:Be,height:We,xScale:k?Ue:null,yScale:M?Ge:null,xValues:P,yValues:T},"grid")),j.includes("legends")&&(lt.legends=(0,le.jsx)(UT,{width:Be,height:We,legends:tt,toggleSerie:et},"legends")),j.includes("markers")&&(lt.markers=(0,le.jsx)(Uk,{markers:q,width:Be,height:We,xScale:Ue,yScale:Ge},"markers")),j.includes("totals")&&Ee&&(lt.totals=(0,le.jsx)(xO,{data:nt,springConfig:Le,animate:Fe,layout:l},"totals"));var ct=(0,G.useMemo)(function(){return WT({},at,{margin:Ve,width:i,height:a,innerWidth:Be,innerHeight:We,bars:qe,legendData:tt,enableLabel:R,xScale:Ue,yScale:Ge,tooltip:pe,getTooltipLabel:Qe,onClick:he,onMouseEnter:me,onMouseLeave:ge,getColor:rt})},[at,Ve,i,a,Be,We,qe,tt,R,Ue,Ge,pe,Qe,he,me,ge,rt]);return(0,le.jsx)(Wk,{width:ze,height:$e,margin:Ve,defs:st,role:ve,ariaLabel:xe,ariaLabelledBy:we,ariaDescribedBy:Se,isFocusable:Ce,children:j.map(function(e,t){var n;return"function"==typeof e?(0,le.jsx)(G.Fragment,{children:(0,G.createElement)(e,ct)},t):null!=(n=null==lt?void 0:lt[e])?n:null})})},kO=function(e){var t=e.isInteractive,n=void 0===t?KT.isInteractive:t,r=e.animate,o=void 0===r?KT.animate:r,i=e.motionConfig,a=void 0===i?KT.motionConfig:i,s=e.theme,l=e.renderWrapper,c=HT(e,wO);return(0,le.jsx)(jk,{animate:o,isInteractive:n,motionConfig:a,renderWrapper:l,theme:s,children:(0,le.jsx)(SO,WT({isInteractive:n},c))})},CO=["isInteractive","renderWrapper","theme"],MO=function(e,t,n,r){return e.find(function(e){return Zk(e.x+t.left,e.y+t.top,e.width,e.height,n,r)})},PO=function(e){var t=e.data,n=e.indexBy,r=e.keys,o=e.margin,i=e.width,a=e.height,s=e.groupMode,l=e.layout,c=e.reverse,u=e.minValue,d=e.maxValue,f=e.valueScale,p=e.indexScale,h=e.padding,m=e.innerPadding,g=e.axisTop,b=e.axisRight,y=e.axisBottom,v=void 0===y?ZT.axisBottom:y,x=e.axisLeft,w=void 0===x?ZT.axisLeft:x,S=e.enableGridX,k=void 0===S?ZT.enableGridX:S,C=e.enableGridY,M=void 0===C?ZT.enableGridY:C,P=e.gridXValues,T=e.gridYValues,O=e.labelPosition,j=void 0===O?ZT.labelPosition:O,_=e.labelOffset,D=void 0===_?ZT.labelOffset:_,E=e.layers,R=void 0===E?ZT.layers:E,A=e.renderBar,I=void 0===A?function(e,t){var n=t.bar,r=n.color,o=n.height,i=n.width,a=n.x,s=n.y,l=t.borderColor,c=t.borderRadius,u=t.borderWidth,d=t.label,f=t.labelColor,p=t.shouldRenderLabel,h=t.labelX,m=t.labelY,g=t.textAnchor;if(e.fillStyle=r,u>0&&(e.strokeStyle=l,e.lineWidth=u),e.beginPath(),c>0){var b=Math.min(c,o);e.moveTo(a+b,s),e.lineTo(a+i-b,s),e.quadraticCurveTo(a+i,s,a+i,s+b),e.lineTo(a+i,s+o-b),e.quadraticCurveTo(a+i,s+o,a+i-b,s+o),e.lineTo(a+b,s+o),e.quadraticCurveTo(a,s+o,a,s+o-b),e.lineTo(a,s+b),e.quadraticCurveTo(a,s,a+b,s),e.closePath()}else e.rect(a,s,i,o);e.fill(),u>0&&e.stroke(),p&&(e.textBaseline="middle",e.textAlign="middle"===g?"center":g,e.fillStyle=f,e.fillText(d,a+h,s+m))}:A,F=e.enableLabel,L=void 0===F?ZT.enableLabel:F,N=e.label,z=e.labelSkipWidth,$=void 0===z?ZT.labelSkipWidth:z,V=e.labelSkipHeight,B=void 0===V?ZT.labelSkipHeight:V,W=e.labelTextColor,H=e.colorBy,q=e.colors,Y=e.borderRadius,U=void 0===Y?ZT.borderRadius:Y,X=e.borderWidth,Q=void 0===X?ZT.borderWidth:X,K=e.borderColor,Z=e.annotations,J=void 0===Z?ZT.annotations:Z,ee=e.legendLabel,te=e.tooltipLabel,ne=e.valueFormat,re=e.isInteractive,oe=void 0===re?ZT.isInteractive:re,ie=e.tooltip,ae=void 0===ie?ZT.tooltip:ie,se=e.onClick,ce=e.onMouseEnter,ue=e.onMouseLeave,de=e.legends,fe=e.pixelRatio,pe=void 0===fe?ZT.pixelRatio:fe,he=e.canvasRef,me=e.enableTotals,ge=void 0===me?ZT.enableTotals:me,be=e.totalsOffset,ye=void 0===be?ZT.totalsOffset:be,ve=(0,G.useRef)(null),xe=Ck(),we=bk(i,a,o),Se=we.margin,ke=we.innerWidth,Ce=we.innerHeight,Me=we.outerWidth,Pe=we.outerHeight,Te=vO({indexBy:n,label:N,tooltipLabel:te,valueFormat:ne,colors:q,colorBy:H,borderColor:K,labelTextColor:W,groupMode:s,layout:l,reverse:c,data:t,keys:r,minValue:u,maxValue:d,margin:Se,width:ke,height:Ce,padding:h,innerPadding:m,valueScale:f,indexScale:p,enableLabel:L,labelSkipWidth:$,labelSkipHeight:B,legends:de,legendLabel:ee,totalsOffset:ye}),Oe=Te.bars,je=Te.barsWithValue,_e=Te.xScale,De=Te.yScale,Ee=Te.getLabel,Re=Te.getTooltipLabel,Ae=Te.getBorderColor,Ie=Te.getLabelColor,Fe=Te.shouldRenderBarLabel,Le=Te.legendsWithData,Ne=Te.barTotals,ze=Te.getColor,$e=qg(),Ve=$e.showTooltipFromEvent,Be=$e.hideTooltip,We=function(e){var t=e.annotations;return(0,G.useMemo)(function(){return t.map(function(e){return HP({},e,{computed:GP(HP({},e))})})},[t])}({annotations:XP({data:Oe,annotations:J,getPosition:function(e){return{x:e.x,y:e.y}},getDimensions:function(e){var t=e.width,n=e.height;return{width:t,height:n,size:Math.max(t,n)}}})}),He=(0,G.useMemo)(function(){return{borderRadius:U,borderWidth:Q,isInteractive:oe,isFocusable:!1,labelSkipWidth:$,labelSkipHeight:B,margin:Se,width:i,height:a,innerWidth:ke,innerHeight:Ce,bars:Oe,legendData:Le,enableLabel:L,xScale:_e,yScale:De,tooltip:ae,getTooltipLabel:Re,onClick:se,onMouseEnter:ce,onMouseLeave:ue,getColor:ze}},[U,Q,oe,$,B,Se,i,a,ke,Ce,Oe,Le,L,_e,De,ae,Re,se,ce,ue,ze]),qe=xk(ne),Ye=rO(l,c,j,D);(0,G.useEffect)(function(){var e,t=null==(e=ve.current)?void 0:e.getContext("2d");ve.current&&t&&(ve.current.width=Me*pe,ve.current.height=Pe*pe,t.scale(pe,pe),t.fillStyle=xe.background,t.fillRect(0,0,Me,Pe),t.translate(Se.left,Se.top),R.forEach(function(e){"grid"===e?"number"==typeof xe.grid.line.strokeWidth&&xe.grid.line.strokeWidth>0&&(t.lineWidth=xe.grid.line.strokeWidth,t.strokeStyle=xe.grid.line.stroke,k&&$P(t,{width:ke,height:Ce,scale:_e,axis:"x",values:P}),M&&$P(t,{width:ke,height:Ce,scale:De,axis:"y",values:T})):"axes"===e?zP(t,{xScale:_e,yScale:De,width:ke,height:Ce,top:g,right:b,bottom:v,left:w,theme:xe}):"bars"===e?je.forEach(function(e){I(t,WT({bar:e,borderColor:Ae(e),borderRadius:U,borderWidth:Q,label:Ee(e.data),labelColor:Ie(e),shouldRenderLabel:Fe(e)},Ye(e.width,e.height)))}):"legends"===e?Le.forEach(function(e){var n=e[0],r=e[1];NT(t,WT({},n,{data:r,containerWidth:ke,containerHeight:Ce,theme:xe}))}):"annotations"===e?rT(t,{annotations:We,theme:xe}):"totals"===e&&ge?function(e,t,n,r){void 0===r&&(r=ZT.layout),e.fillStyle=n.text.fill,e.font="bold "+n.labels.text.fontSize+"px "+n.labels.text.fontFamily,e.textBaseline="vertical"===r?"alphabetic":"middle",e.textAlign="vertical"===r?"center":"start",t.forEach(function(t){e.fillText(t.formattedValue,t.x,t.y)})}(t,Ne,xe,l):"function"==typeof e&&e(t,He)}),t.save())},[v,w,b,g,je,U,Q,We,k,M,Ae,Ee,Ie,P,T,s,a,Ce,ke,He,R,l,Le,Se.left,Se.top,Pe,Me,pe,I,_e,De,c,Fe,xe,i,Ne,ge,qe,Ye]);var Ue=(0,G.useCallback)(function(e){if(Oe&&ve.current){var t=Jk(ve.current,e),n=t[0],r=t[1],o=MO(Oe,Se,n,r);void 0!==o?(Ve((0,G.createElement)(ae,WT({},o.data,{color:o.color,label:o.label,value:Number(o.data.value)})),e),"mouseenter"===e.type&&(null==ce||ce(o.data,e))):Be()}},[Be,Se,ce,Oe,Ve,ae]),Ge=(0,G.useCallback)(function(e){if(Oe&&ve.current){Be();var t=Jk(ve.current,e),n=t[0],r=t[1],o=MO(Oe,Se,n,r);o&&(null==ue||ue(o.data,e))}},[Be,Se,ue,Oe]),Xe=(0,G.useCallback)(function(e){if(Oe&&ve.current){var t=Jk(ve.current,e),n=t[0],r=t[1],o=MO(Oe,Se,n,r);void 0!==o&&(null==se||se(WT({},o.data,{color:o.color}),e))}},[Se,se,Oe]);return(0,le.jsx)("canvas",{ref:function(e){ve.current=e,he&&"current"in he&&(he.current=e)},width:Me*pe,height:Pe*pe,style:{width:Me,height:Pe,cursor:oe?"auto":"normal"},onMouseEnter:oe?Ue:void 0,onMouseMove:oe?Ue:void 0,onMouseLeave:oe?Ge:void 0,onClick:oe?Xe:void 0})},TO=(0,G.forwardRef)(function(e,t){var n=e.isInteractive,r=e.renderWrapper,o=e.theme,i=HT(e,CO);return(0,le.jsx)(jk,{isInteractive:n,renderWrapper:r,theme:o,animate:!1,children:(0,le.jsx)(PO,WT({},i,{canvasRef:t}))})}),OO=function(e){return(0,le.jsx)(_k,{children:function(t){var n=t.width,r=t.height;return(0,le.jsx)(kO,WT({width:n,height:r},e))}})},jO=((0,G.forwardRef)(function(e,t){return(0,le.jsx)(_k,{children:function(n){var r=n.width,o=n.height;return(0,le.jsx)(TO,WT({width:r,height:o},e,{ref:t}))}})}),function(e){var t=e.theme,n=e.minValue,r=e.maxValue,o=e.divergeAt;switch(t){case"sequential-green":return{type:"sequential",colors:["#FFFFFF","#70CC12"],minValue:n,maxValue:r};case"sequential-red":return{type:"sequential",colors:["#FFFFFF","#FA6969"],minValue:n,maxValue:r};case"sequential-blue":return{type:"sequential",colors:["#FFFFFF","#50B4F4"],minValue:n,maxValue:r};case"categorical-default":return["#70CC12","#009D00","#FFB62C","#FA6969","#BA9EEA","#AAEA0F","#FFD950","#6EEAE2","#FA6969","#005F00","#F8C867","#7ACBFF","#CBAFFB","#FFE790"];case"categorical-canvas":return["#AFD318","#68AA23","#CFE574","#FDEC73","#FABE78","#32AABF","#ADF3FF"];case"diverging":return{type:"diverging",colors:["#FF8000","#F6FEE2","#005F00"],minValue:n,maxValue:r,divergeAt:o};case"categorical-single":return["#7ACBFF"];case"categorical-dual-neutral":return["#CBAFFB","#FFE790"];case"categorical-dual-teal-orange":return["#6EEAE2","#FFB62C"];case"categorical-quad-neutral":return["#CBAFFB","#FFE790","#93F8F2","#FF8B8B"]}return["#70CC12","#009D00","#FFB62C","#FA6969","#BA9EEA","#AAEA0F","#FFD950","#6EEAE2","#FA6969","#005F00","#F8C867","#7ACBFF","#CBAFFB","#FFE790"]}),_O=function(e){var t=e.data,n=e.themeConfig,r=(Array.isArray(t)?t:Object.values(t)).map(function(e,t){var r=n&&n.length?n[t%n.length]:void 0;return{title:e.title||e.id,color:r}});return(0,le.jsx)("div",{className:"chart-legend",role:"graphics-legend",children:r.map(function(e,t){return(0,le.jsxs)("div",{className:"chart-legend-item",children:[(0,le.jsx)("div",{className:"chart-legend-symbol",style:{backgroundColor:e.color}}),(0,le.jsx)("span",{children:e.title})]},t)})})},DO=function(e,t,n){var r={};return n.forEach(function(n){var o=t.map(function(e){return n[e]}),i=o.join("|");r[i]||(r[i]={},t.forEach(function(e,t){r[i][e]=o[t]}),e.forEach(function(e){r[i][e]=0})),e.forEach(function(e){r[i][e]+=parseFloat(n[e])||0})}),Object.values(r)};function EO(e){return EO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},EO(e)}function RO(e,t,n){return(t=function(e){var t=function(e){if("object"!=EO(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=EO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==EO(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var AO=function(e){var t=e.barLabel;return(0,le.jsx)(zg,{rows:[[t]]})},IO=function(e){var t=e.x,n=e.y,r=e.value,o=e.textAnchor,i=e.verticalLabels,a=e.horizontalBars,s=a?10:9,l=a?4:12,c=r.split(" "),u=[],d="";c.forEach(function(e){(d+e).length>s?(d&&u.push(d.trim()),d=e+" "):d+=e+" "}),d&&u.push(d.trim());var f=u;if(u.length>1){var p=(f=u.slice(0,1))[0];f[0]=p.slice(0,s-3)+"..."}var h=qg(),m=function(e){return h.showTooltipFromEvent((0,le.jsx)(AO,{barLabel:r}),e,a?"right":"top")};return(0,le.jsx)("g",{transform:"translate(".concat(t,", ").concat(n+l,") rotate(").concat(i?-70:0,")"),onMouseEnter:m,onMouseMove:m,onMouseLeave:h.hideTooltip,children:a?(0,le.jsx)("text",{textAnchor:o,style:{fontSize:"var(--font-size-sm, 12px)",fill:"#333"},children:f[0]}):f.map(function(e,t){return(0,le.jsx)("text",{textAnchor:o,y:14*t,style:{fontSize:"var(--font-size-sm, 12px)",fill:"#333"},children:e},t)})})};const FO=Math.PI,LO=2*FO,NO=1e-6,zO=LO-NO;function $O(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}class VO{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?$O:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return $O;const n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,o,i){this._append`C${+e},${+t},${+n},${+r},${this._x1=+o},${this._y1=+i}`}arcTo(e,t,n,r,o){if(e=+e,t=+t,n=+n,r=+r,(o=+o)<0)throw new Error(`negative radius: ${o}`);let i=this._x1,a=this._y1,s=n-e,l=r-t,c=i-e,u=a-t,d=c*c+u*u;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(d>NO)if(Math.abs(u*s-l*c)>NO&&o){let f=n-i,p=r-a,h=s*s+l*l,m=f*f+p*p,g=Math.sqrt(h),b=Math.sqrt(d),y=o*Math.tan((FO-Math.acos((h+d-m)/(2*g*b)))/2),v=y/b,x=y/g;Math.abs(v-1)>NO&&this._append`L${e+v*c},${t+v*u}`,this._append`A${o},${o},0,0,${+(u*f>c*p)},${this._x1=e+x*s},${this._y1=t+x*l}`}else this._append`L${this._x1=e},${this._y1=t}`}arc(e,t,n,r,o,i){if(e=+e,t=+t,i=!!i,(n=+n)<0)throw new Error(`negative radius: ${n}`);let a=n*Math.cos(r),s=n*Math.sin(r),l=e+a,c=t+s,u=1^i,d=i?r-o:o-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>NO||Math.abs(this._y1-c)>NO)&&this._append`L${l},${c}`,n&&(d<0&&(d=d%LO+LO),d>zO?this._append`A${n},${n},0,1,${u},${e-a},${t-s}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:d>NO&&this._append`A${n},${n},0,${+(d>=FO)},${u},${this._x1=e+n*Math.cos(o)},${this._y1=t+n*Math.sin(o)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function BO(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);t=e}return e},()=>new VO(t)}function WO(e){return e[0]}function HO(e){return e[1]}function qO(e,t){var n=$T(!0),r=null,o=Lb,i=null,a=BO(s);function s(s){var l,c,u,d=(s=zT(s)).length,f=!1;for(null==r&&(i=o(u=a())),l=0;l<=d;++l)!(l<d&&n(c=s[l],l,s))===f&&((f=!f)?i.lineStart():i.lineEnd()),f&&i.point(+e(c,l,s),+t(c,l,s));if(u)return i=null,u+""||null}return e="function"==typeof e?e:void 0===e?WO:$T(e),t="function"==typeof t?t:void 0===t?HO:$T(t),s.x=function(t){return arguments.length?(e="function"==typeof t?t:$T(+t),s):e},s.y=function(e){return arguments.length?(t="function"==typeof e?e:$T(+e),s):t},s.defined=function(e){return arguments.length?(n="function"==typeof e?e:$T(!!e),s):n},s.curve=function(e){return arguments.length?(o=e,null!=r&&(i=o(r)),s):o},s.context=function(e){return arguments.length?(null==e?r=i=null:i=o(r=e),s):r},s}var YO=function(e){var t=e.barLabel,n=e.barValue,r=e.lineLabel,o=e.lineValue;return(0,le.jsx)(zg,{rows:[[t,n],[r,o]]})},UO=function(e){var t=e.bars,n=e.xScale,r=e.innerWidth,o=e.innerHeight,i=e.lineData,a=e.lineMeasure,s=e.lineDimension,l=e.lineColor,c=e.annotation,u=t[0].width,d=bP([{id:"only",data:i.map(function(e,t){return{x:t,y:e[a]}})}],{type:"linear"},{type:"linear"},r,o),f=qO().x(function(e){return n(e[s])+u}).y(function(e){var t;return null!==(t=d.yScale(e[a]))&&void 0!==t?t:0}),p=qg();function h(e,n){var r=t[n].data.indexValue,o=i.find(function(e){return e[s]===r}),l=c.measures[t[n].data.id].title,u=t[n].data.value,d=c.measures[a].title;return p.showTooltipFromEvent((0,le.jsx)(YO,{barLabel:l,barValue:u,lineLabel:d,lineValue:o?o[a]:null}),e)}return(0,le.jsxs)(G.Fragment,{children:[(0,le.jsx)(IP,{yScale:d.yScale,xScale:n,width:r,height:o,right:{ticksPosition:"after"}}),(0,le.jsx)("path",{d:f(i),fill:"none",stroke:l,strokeWidth:5,style:{pointerEvents:"none"}}),i.map(function(e){return(0,le.jsx)("circle",{cx:n(e[s])+u,cy:d.yScale(e[a]),r:2,fill:"white",stroke:l,style:{pointerEvents:"none"}},e[s])}),t.map(function(e,t){return(0,le.jsx)("rect",{x:e.x,y:0,height:o,width:e.width,fill:"transparent",onMouseEnter:function(e){return h(e,t)},onMouseMove:function(e){return h(e,t)},onMouseLeave:p.hideTooltip},e.key)})]})},GO={"green-1":"#70CC12","green-2":"#009D00","green-3":"#AAEA0F","green-4":"#005F00","orange-1":"#FFB62C","orange-2":"#F8C867","blue-1":"#50B4F4","blue-2":"#7ACBFF","purple-1":"#BA9EEA","purple-2":"#CBAFFB","yellow-1":"#FFD950","yellow-2":"#FFE790","teal-1":"#6EEAE2","teal-2":"#93F8F2","red-1":"#FA6969","red-2":"#FF8B8B","grey-system":"#efeeed"},XO=function(e,t,n){if(!e)return[];var r=structuredClone(e);t.forEach(function(e){if(e in r){var t=r[e];delete r[e],r[n[e]]=t}});var o=Object.keys(r).map(function(e){return{threshold:e,colour:GO[r[e]]||"#000000"}});return o.sort(function(e,t){return Number(e.threshold)-Number(t.threshold)}),o},QO=function(e,t){var n,r=GO["grey-system"];return(null===(n=e.slice().reverse().find(function(e){return Number(t)>=Number(e.threshold)}))||void 0===n?void 0:n.colour)||r};function KO(e){return KO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},KO(e)}function ZO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function JO(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ZO(Object(n),!0).forEach(function(t){ej(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZO(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ej(e,t,n){return(t=function(e){var t=function(e){if("object"!=KO(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=KO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==KO(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var tj=function(e){var t=e.data,n=e.chartConfig,r=e.keys,o=e.indexes,i=e.annotation;if(!t||0===t.length)return(0,le.jsx)("div",{children:"Error: no data provided"});var a=n.theme,s=n.xAxisLabel,l=n.yAxisLabel,c=n.grouped,u=n.lineMeasure,d=n.verticalLabels,f=n.horizontalBars,p=n.groupingDimension,h=n.colourThresholds,m=n.showLegend,g=void 0===m||m,b=i.measures,y=function(e,t,n,r,o){var i=o?structuredClone(e):DO(t,n,e),a=r?i.map(function(e){return RO(RO({},String(n[0]),e[n[0]]),String(r),e[r])}):null;r&&i.map(function(e){return delete e[r],e});var s=[],l=i;if(o){s=i.reduce(function(e,t){return t[o]&&!e.includes(t[o])&&e.push(t[o]),e},[]),i.map(function(e){return e[o]&&t.forEach(function(t){e["".concat(t,"_").concat(e[o])]=e[t]}),e});var c=s.flatMap(function(e){return t.map(function(t){return"".concat(t,"_").concat(e)})}),u=n.filter(function(e){return e!==o});l=DO(c,u,i)}return{lineData:a,transformedData:l,uniqueGroupingValues:s}}(t,r,o,u,p),v=y.transformedData,x=y.lineData,w=y.uniqueGroupingValues;if(p&&(w.forEach(function(e){r.forEach(function(t){var n="".concat(t,"_").concat(e);!b[n]&&b[t]&&(b[n]=JO(JO({},b[t]),{},{title:"".concat(b[t].title," (").concat(e,")")}))})}),Object.keys(b).forEach(function(e){w.some(function(t){return e.endsWith("_".concat(t))})||delete b[e]})),f&&u)return(0,le.jsxs)("div",{role:"alert",children:[(0,le.jsx)("p",{children:"Error: line measure not supported with horizontal bars"}),(0,le.jsx)("p",{children:"Check chart config and remove either lineMeasure or horizontalBars attribute"})]});var S=u&&x&&x.length>0,k=r;S&&(k=r.filter(function(e){return e!==u})),p&&(k=w.flatMap(function(e){return k.map(function(t){return"".concat(t,"_").concat(e)})}));var C=jO({theme:a}),M=C[r.findIndex(function(e){return e===u})],P=o[0],T=S?function(e){var t=e.bars,n=e.xScale,r=e.innerWidth,o=e.innerHeight;return(0,le.jsx)(UO,{bars:t,xScale:n,innerWidth:r,innerHeight:o,lineColor:M,lineData:x,lineMeasure:u,lineDimension:P,annotation:i})}:null,O=["grid","axes","bars","markers","legends"];S&&T&&O.push(T),f&&Array.isArray(v)&&v.length>1&&v.reverse();var j=h?function(e){var t=XO(h,r,e.data);return QO(t,e.value)}:C;return(0,le.jsxs)("div",{className:"dashboard-chart-container",children:[(0,le.jsx)("div",{className:"dashboard-chart",role:"graphics-datachart",children:(0,le.jsx)(OO,{"test-id":"bar-chart",layout:f?"horizontal":"vertical",data:v,keys:k,indexBy:function(e){return o.filter(function(e){return e!==p}).map(function(t){return String(e[t])}).join(" - ")},colors:j,theme:{tooltip:{wrapper:{zIndex:1e3}}},colorBy:"id",groupMode:c?"grouped":"stacked",margin:{top:20,right:40,bottom:70,left:90},padding:.35,valueScale:{type:"linear",max:"auto"},indexScale:{type:"band",round:!0},tooltip:function(e){var t,n=e.id,r=e.value,o=e.indexValue,a=(null===(t=i.measures[n])||void 0===t?void 0:t.title)||n;return(0,le.jsxs)("div",{style:{padding:"6px 9px",background:"white"},children:[(0,le.jsxs)("strong",{children:[a,":"]})," ",r," ",(0,le.jsx)("br",{}),(0,le.jsx)("em",{children:o})]})},borderColor:{from:"color",modifiers:[["darker",1.6]]},axisTop:null,axisRight:null,axisBottom:{tickSize:5,tickPadding:5,tickRotation:d?-70:0,legend:s,legendPosition:"middle",legendOffset:60,truncateTickAt:0,renderTick:f?void 0:function(e){return(0,le.jsx)(IO,{x:e.x,y:e.y,value:e.value,textAnchor:d?"end":"middle",horizontalBars:f,verticalLabels:d})}},axisLeft:{tickSize:5,tickPadding:5,tickRotation:0,legend:l,legendPosition:"middle",legendOffset:-70,truncateTickAt:0,renderTick:f?function(e){return(0,le.jsx)(IO,{x:e.x-5,y:e.y,value:e.value,textAnchor:"end",horizontalBars:f,verticalLabels:d})}:void 0},labelSkipWidth:12,labelSkipHeight:12,labelTextColor:{from:"color",modifiers:[["darker",1.6]]},role:"application",ariaLabel:"Bar chart",onClick:function(e){return console.log(e)},layers:O})}),g&&(0,le.jsx)(_O,{data:b,themeConfig:C})]})},nj=a(7200);const rj=134217729;function oj(e,t,n,r,o){let i,a,s,l,c=t[0],u=r[0],d=0,f=0;u>c==u>-c?(i=c,c=t[++d]):(i=u,u=r[++f]);let p=0;if(d<e&&f<n)for(u>c==u>-c?(a=c+i,s=i-(a-c),c=t[++d]):(a=u+i,s=i-(a-u),u=r[++f]),i=a,0!==s&&(o[p++]=s);d<e&&f<n;)u>c==u>-c?(a=i+c,l=a-i,s=i-(a-l)+(c-l),c=t[++d]):(a=i+u,l=a-i,s=i-(a-l)+(u-l),u=r[++f]),i=a,0!==s&&(o[p++]=s);for(;d<e;)a=i+c,l=a-i,s=i-(a-l)+(c-l),c=t[++d],i=a,0!==s&&(o[p++]=s);for(;f<n;)a=i+u,l=a-i,s=i-(a-l)+(u-l),u=r[++f],i=a,0!==s&&(o[p++]=s);return 0===i&&0!==p||(o[p++]=i),p}function ij(e){return new Float64Array(e)}const aj=ij(4),sj=ij(8),lj=ij(12),cj=ij(16),uj=ij(4);function dj(e,t,n,r,o,i){const a=(t-i)*(n-o),s=(e-o)*(r-i),l=a-s,c=Math.abs(a+s);return Math.abs(l)>=33306690738754716e-32*c?l:-function(e,t,n,r,o,i,a){let s,l,c,u,d,f,p,h,m,g,b,y,v,x,w,S,k,C;const M=e-o,P=n-o,T=t-i,O=r-i;x=M*O,f=rj*M,p=f-(f-M),h=M-p,f=rj*O,m=f-(f-O),g=O-m,w=h*g-(x-p*m-h*m-p*g),S=T*P,f=rj*T,p=f-(f-T),h=T-p,f=rj*P,m=f-(f-P),g=P-m,k=h*g-(S-p*m-h*m-p*g),b=w-k,d=w-b,aj[0]=w-(b+d)+(d-k),y=x+b,d=y-x,v=x-(y-d)+(b-d),b=v-S,d=v-b,aj[1]=v-(b+d)+(d-S),C=y+b,d=C-y,aj[2]=y-(C-d)+(b-d),aj[3]=C;let j=function(e,t){let n=t[0];for(let e=1;e<4;e++)n+=t[e];return n}(0,aj),_=22204460492503146e-32*a;if(j>=_||-j>=_)return j;if(d=e-M,s=e-(M+d)+(d-o),d=n-P,c=n-(P+d)+(d-o),d=t-T,l=t-(T+d)+(d-i),d=r-O,u=r-(O+d)+(d-i),0===s&&0===l&&0===c&&0===u)return j;if(_=11093356479670487e-47*a+33306690738754706e-32*Math.abs(j),j+=M*u+O*s-(T*c+P*l),j>=_||-j>=_)return j;x=s*O,f=rj*s,p=f-(f-s),h=s-p,f=rj*O,m=f-(f-O),g=O-m,w=h*g-(x-p*m-h*m-p*g),S=l*P,f=rj*l,p=f-(f-l),h=l-p,f=rj*P,m=f-(f-P),g=P-m,k=h*g-(S-p*m-h*m-p*g),b=w-k,d=w-b,uj[0]=w-(b+d)+(d-k),y=x+b,d=y-x,v=x-(y-d)+(b-d),b=v-S,d=v-b,uj[1]=v-(b+d)+(d-S),C=y+b,d=C-y,uj[2]=y-(C-d)+(b-d),uj[3]=C;const D=oj(4,aj,4,uj,sj);x=M*u,f=rj*M,p=f-(f-M),h=M-p,f=rj*u,m=f-(f-u),g=u-m,w=h*g-(x-p*m-h*m-p*g),S=T*c,f=rj*T,p=f-(f-T),h=T-p,f=rj*c,m=f-(f-c),g=c-m,k=h*g-(S-p*m-h*m-p*g),b=w-k,d=w-b,uj[0]=w-(b+d)+(d-k),y=x+b,d=y-x,v=x-(y-d)+(b-d),b=v-S,d=v-b,uj[1]=v-(b+d)+(d-S),C=y+b,d=C-y,uj[2]=y-(C-d)+(b-d),uj[3]=C;const E=oj(D,sj,4,uj,lj);x=s*u,f=rj*s,p=f-(f-s),h=s-p,f=rj*u,m=f-(f-u),g=u-m,w=h*g-(x-p*m-h*m-p*g),S=l*c,f=rj*l,p=f-(f-l),h=l-p,f=rj*c,m=f-(f-c),g=c-m,k=h*g-(S-p*m-h*m-p*g),b=w-k,d=w-b,uj[0]=w-(b+d)+(d-k),y=x+b,d=y-x,v=x-(y-d)+(b-d),b=v-S,d=v-b,uj[1]=v-(b+d)+(d-S),C=y+b,d=C-y,uj[2]=y-(C-d)+(b-d),uj[3]=C;const R=oj(E,lj,4,uj,cj);return cj[R-1]}(e,t,n,r,o,i,c)}ij(4),ij(4),ij(4),ij(4),ij(4),ij(4),ij(4),ij(4),ij(4),ij(8),ij(8),ij(8),ij(4),ij(8),ij(8),ij(8),ij(12),ij(192),ij(192),ij(4),ij(4),ij(4),ij(4),ij(4),ij(4),ij(4),ij(4),ij(8),ij(8),ij(8),ij(8),ij(8),ij(8),ij(8),ij(8),ij(8),ij(4),ij(4),ij(4),ij(8),ij(16),ij(16),ij(16),ij(32),ij(32),ij(48),ij(64),ij(1152),ij(1152),ij(4),ij(4),ij(4),ij(4),ij(4),ij(4),ij(4),ij(4),ij(4),ij(4),ij(24),ij(24),ij(24),ij(24),ij(24),ij(24),ij(24),ij(24),ij(24),ij(24),ij(1152),ij(1152),ij(1152),ij(1152),ij(1152),ij(2304),ij(2304),ij(3456),ij(5760),ij(8),ij(8),ij(8),ij(16),ij(24),ij(48),ij(48),ij(96),ij(192),ij(384),ij(384),ij(384),ij(768),ij(96),ij(96),ij(96),ij(1152);const fj=Math.pow(2,-52),pj=new Uint32Array(512);class hj{static from(e,t=xj,n=wj){const r=e.length,o=new Float64Array(2*r);for(let i=0;i<r;i++){const r=e[i];o[2*i]=t(r),o[2*i+1]=n(r)}return new hj(o)}constructor(e){const t=e.length>>1;if(t>0&&"number"!=typeof e[0])throw new Error("Expected coords to contain numbers.");this.coords=e;const n=Math.max(2*t-5,0);this._triangles=new Uint32Array(3*n),this._halfedges=new Int32Array(3*n),this._hashSize=Math.ceil(Math.sqrt(t)),this._hullPrev=new Uint32Array(t),this._hullNext=new Uint32Array(t),this._hullTri=new Uint32Array(t),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(t),this._dists=new Float64Array(t),this.update()}update(){const{coords:e,_hullPrev:t,_hullNext:n,_hullTri:r,_hullHash:o}=this,i=e.length>>1;let a=1/0,s=1/0,l=-1/0,c=-1/0;for(let t=0;t<i;t++){const n=e[2*t],r=e[2*t+1];n<a&&(a=n),r<s&&(s=r),n>l&&(l=n),r>c&&(c=r),this._ids[t]=t}const u=(a+l)/2,d=(s+c)/2;let f,p,h;for(let t=0,n=1/0;t<i;t++){const r=mj(u,d,e[2*t],e[2*t+1]);r<n&&(f=t,n=r)}const m=e[2*f],g=e[2*f+1];for(let t=0,n=1/0;t<i;t++){if(t===f)continue;const r=mj(m,g,e[2*t],e[2*t+1]);r<n&&r>0&&(p=t,n=r)}let b=e[2*p],y=e[2*p+1],v=1/0;for(let t=0;t<i;t++){if(t===f||t===p)continue;const n=bj(m,g,b,y,e[2*t],e[2*t+1]);n<v&&(h=t,v=n)}let x=e[2*h],w=e[2*h+1];if(v===1/0){for(let t=0;t<i;t++)this._dists[t]=e[2*t]-e[0]||e[2*t+1]-e[1];yj(this._ids,this._dists,0,i-1);const t=new Uint32Array(i);let n=0;for(let e=0,r=-1/0;e<i;e++){const o=this._ids[e],i=this._dists[o];i>r&&(t[n++]=o,r=i)}return this.hull=t.subarray(0,n),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(dj(m,g,b,y,x,w)<0){const e=p,t=b,n=y;p=h,b=x,y=w,h=e,x=t,w=n}const S=function(e,t,n,r,o,i){const a=n-e,s=r-t,l=o-e,c=i-t,u=a*a+s*s,d=l*l+c*c,f=.5/(a*c-s*l);return{x:e+(c*u-s*d)*f,y:t+(a*d-l*u)*f}}(m,g,b,y,x,w);this._cx=S.x,this._cy=S.y;for(let t=0;t<i;t++)this._dists[t]=mj(e[2*t],e[2*t+1],S.x,S.y);yj(this._ids,this._dists,0,i-1),this._hullStart=f;let k=3;n[f]=t[h]=p,n[p]=t[f]=h,n[h]=t[p]=f,r[f]=0,r[p]=1,r[h]=2,o.fill(-1),o[this._hashKey(m,g)]=f,o[this._hashKey(b,y)]=p,o[this._hashKey(x,w)]=h,this.trianglesLen=0,this._addTriangle(f,p,h,-1,-1,-1);for(let i,a,s=0;s<this._ids.length;s++){const l=this._ids[s],c=e[2*l],u=e[2*l+1];if(s>0&&Math.abs(c-i)<=fj&&Math.abs(u-a)<=fj)continue;if(i=c,a=u,l===f||l===p||l===h)continue;let d=0;for(let e=0,t=this._hashKey(c,u);e<this._hashSize&&(d=o[(t+e)%this._hashSize],-1===d||d===n[d]);e++);d=t[d];let m,g=d;for(;m=n[g],dj(c,u,e[2*g],e[2*g+1],e[2*m],e[2*m+1])>=0;)if(g=m,g===d){g=-1;break}if(-1===g)continue;let b=this._addTriangle(g,l,n[g],-1,-1,r[g]);r[l]=this._legalize(b+2),r[g]=b,k++;let y=n[g];for(;m=n[y],dj(c,u,e[2*y],e[2*y+1],e[2*m],e[2*m+1])<0;)b=this._addTriangle(y,l,m,r[l],-1,r[y]),r[l]=this._legalize(b+2),n[y]=y,k--,y=m;if(g===d)for(;m=t[g],dj(c,u,e[2*m],e[2*m+1],e[2*g],e[2*g+1])<0;)b=this._addTriangle(m,l,g,-1,r[g],r[m]),this._legalize(b+2),r[m]=b,n[g]=g,k--,g=m;this._hullStart=t[l]=g,n[g]=t[y]=l,n[l]=y,o[this._hashKey(c,u)]=l,o[this._hashKey(e[2*g],e[2*g+1])]=g}this.hull=new Uint32Array(k);for(let e=0,t=this._hullStart;e<k;e++)this.hull[e]=t,t=n[t];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(e,t){return Math.floor(function(e,t){const n=e/(Math.abs(e)+Math.abs(t));return(t>0?3-n:1+n)/4}(e-this._cx,t-this._cy)*this._hashSize)%this._hashSize}_legalize(e){const{_triangles:t,_halfedges:n,coords:r}=this;let o=0,i=0;for(;;){const a=n[e],s=e-e%3;if(i=s+(e+2)%3,-1===a){if(0===o)break;e=pj[--o];continue}const l=a-a%3,c=s+(e+1)%3,u=l+(a+2)%3,d=t[i],f=t[e],p=t[c],h=t[u];if(gj(r[2*d],r[2*d+1],r[2*f],r[2*f+1],r[2*p],r[2*p+1],r[2*h],r[2*h+1])){t[e]=h,t[a]=d;const r=n[u];if(-1===r){let t=this._hullStart;do{if(this._hullTri[t]===u){this._hullTri[t]=e;break}t=this._hullPrev[t]}while(t!==this._hullStart)}this._link(e,r),this._link(a,n[i]),this._link(i,u);const s=l+(a+1)%3;o<pj.length&&(pj[o++]=s)}else{if(0===o)break;e=pj[--o]}}return i}_link(e,t){this._halfedges[e]=t,-1!==t&&(this._halfedges[t]=e)}_addTriangle(e,t,n,r,o,i){const a=this.trianglesLen;return this._triangles[a]=e,this._triangles[a+1]=t,this._triangles[a+2]=n,this._link(a,r),this._link(a+1,o),this._link(a+2,i),this.trianglesLen+=3,a}}function mj(e,t,n,r){const o=e-n,i=t-r;return o*o+i*i}function gj(e,t,n,r,o,i,a,s){const l=e-a,c=t-s,u=n-a,d=r-s,f=o-a,p=i-s,h=u*u+d*d,m=f*f+p*p;return l*(d*m-h*p)-c*(u*m-h*f)+(l*l+c*c)*(u*p-d*f)<0}function bj(e,t,n,r,o,i){const a=n-e,s=r-t,l=o-e,c=i-t,u=a*a+s*s,d=l*l+c*c,f=.5/(a*c-s*l),p=(c*u-s*d)*f,h=(a*d-l*u)*f;return p*p+h*h}function yj(e,t,n,r){if(r-n<=20)for(let o=n+1;o<=r;o++){const r=e[o],i=t[r];let a=o-1;for(;a>=n&&t[e[a]]>i;)e[a+1]=e[a--];e[a+1]=r}else{let o=n+1,i=r;vj(e,n+r>>1,o),t[e[n]]>t[e[r]]&&vj(e,n,r),t[e[o]]>t[e[r]]&&vj(e,o,r),t[e[n]]>t[e[o]]&&vj(e,n,o);const a=e[o],s=t[a];for(;;){do{o++}while(t[e[o]]<s);do{i--}while(t[e[i]]>s);if(i<o)break;vj(e,o,i)}e[n+1]=e[i],e[i]=a,r-o+1>=i-n?(yj(e,t,o,r),yj(e,t,n,i-1)):(yj(e,t,n,i-1),yj(e,t,o,r))}}function vj(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function xj(e){return e[0]}function wj(e){return e[1]}const Sj=1e-6;class kj{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(e,t){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(e,t){this._+=`L${this._x1=+e},${this._y1=+t}`}arc(e,t,n){const r=(e=+e)+(n=+n),o=t=+t;if(n<0)throw new Error("negative radius");null===this._x1?this._+=`M${r},${o}`:(Math.abs(this._x1-r)>Sj||Math.abs(this._y1-o)>Sj)&&(this._+="L"+r+","+o),n&&(this._+=`A${n},${n},0,1,1,${e-n},${t}A${n},${n},0,1,1,${this._x1=r},${this._y1=o}`)}rect(e,t,n,r){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${+n}v${+r}h${-n}Z`}value(){return this._||null}}class Cj{constructor(){this._=[]}moveTo(e,t){this._.push([e,t])}closePath(){this._.push(this._[0].slice())}lineTo(e,t){this._.push([e,t])}value(){return this._.length?this._:null}}class Mj{constructor(e,[t,n,r,o]=[0,0,960,500]){if(!((r=+r)>=(t=+t)&&(o=+o)>=(n=+n)))throw new Error("invalid bounds");this.delaunay=e,this._circumcenters=new Float64Array(2*e.points.length),this.vectors=new Float64Array(2*e.points.length),this.xmax=r,this.xmin=t,this.ymax=o,this.ymin=n,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:e,hull:t,triangles:n},vectors:r}=this;let o,i;const a=this.circumcenters=this._circumcenters.subarray(0,n.length/3*2);for(let r,s,l=0,c=0,u=n.length;l<u;l+=3,c+=2){const u=2*n[l],d=2*n[l+1],f=2*n[l+2],p=e[u],h=e[u+1],m=e[d],g=e[d+1],b=e[f],y=e[f+1],v=m-p,x=g-h,w=b-p,S=y-h,k=2*(v*S-x*w);if(Math.abs(k)<1e-9){if(void 0===o){o=i=0;for(const n of t)o+=e[2*n],i+=e[2*n+1];o/=t.length,i/=t.length}const n=1e9*Math.sign((o-p)*S-(i-h)*w);r=(p+b)/2-n*S,s=(h+y)/2+n*w}else{const e=1/k,t=v*v+x*x,n=w*w+S*S;r=p+(S*t-x*n)*e,s=h+(v*n-w*t)*e}a[c]=r,a[c+1]=s}let s,l,c,u=t[t.length-1],d=4*u,f=e[2*u],p=e[2*u+1];r.fill(0);for(let n=0;n<t.length;++n)u=t[n],s=d,l=f,c=p,d=4*u,f=e[2*u],p=e[2*u+1],r[s+2]=r[d]=c-p,r[s+3]=r[d+1]=f-l}render(e){const t=null==e?e=new kj:void 0,{delaunay:{halfedges:n,inedges:r,hull:o},circumcenters:i,vectors:a}=this;if(o.length<=1)return null;for(let t=0,r=n.length;t<r;++t){const r=n[t];if(r<t)continue;const o=2*Math.floor(t/3),a=2*Math.floor(r/3),s=i[o],l=i[o+1],c=i[a],u=i[a+1];this._renderSegment(s,l,c,u,e)}let s,l=o[o.length-1];for(let t=0;t<o.length;++t){s=l,l=o[t];const n=2*Math.floor(r[l]/3),c=i[n],u=i[n+1],d=4*s,f=this._project(c,u,a[d+2],a[d+3]);f&&this._renderSegment(c,u,f[0],f[1],e)}return t&&t.value()}renderBounds(e){const t=null==e?e=new kj:void 0;return e.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),t&&t.value()}renderCell(e,t){const n=null==t?t=new kj:void 0,r=this._clip(e);if(null===r||!r.length)return;t.moveTo(r[0],r[1]);let o=r.length;for(;r[0]===r[o-2]&&r[1]===r[o-1]&&o>1;)o-=2;for(let e=2;e<o;e+=2)r[e]===r[e-2]&&r[e+1]===r[e-1]||t.lineTo(r[e],r[e+1]);return t.closePath(),n&&n.value()}*cellPolygons(){const{delaunay:{points:e}}=this;for(let t=0,n=e.length/2;t<n;++t){const e=this.cellPolygon(t);e&&(e.index=t,yield e)}}cellPolygon(e){const t=new Cj;return this.renderCell(e,t),t.value()}_renderSegment(e,t,n,r,o){let i;const a=this._regioncode(e,t),s=this._regioncode(n,r);0===a&&0===s?(o.moveTo(e,t),o.lineTo(n,r)):(i=this._clipSegment(e,t,n,r,a,s))&&(o.moveTo(i[0],i[1]),o.lineTo(i[2],i[3]))}contains(e,t,n){return(t=+t)==t&&(n=+n)==n&&this.delaunay._step(e,t,n)===e}*neighbors(e){const t=this._clip(e);if(t)for(const n of this.delaunay.neighbors(e)){const e=this._clip(n);if(e)e:for(let r=0,o=t.length;r<o;r+=2)for(let i=0,a=e.length;i<a;i+=2)if(t[r]===e[i]&&t[r+1]===e[i+1]&&t[(r+2)%o]===e[(i+a-2)%a]&&t[(r+3)%o]===e[(i+a-1)%a]){yield n;break e}}}_cell(e){const{circumcenters:t,delaunay:{inedges:n,halfedges:r,triangles:o}}=this,i=n[e];if(-1===i)return null;const a=[];let s=i;do{const n=Math.floor(s/3);if(a.push(t[2*n],t[2*n+1]),s=s%3==2?s-2:s+1,o[s]!==e)break;s=r[s]}while(s!==i&&-1!==s);return a}_clip(e){if(0===e&&1===this.delaunay.hull.length)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const t=this._cell(e);if(null===t)return null;const{vectors:n}=this,r=4*e;return this._simplify(n[r]||n[r+1]?this._clipInfinite(e,t,n[r],n[r+1],n[r+2],n[r+3]):this._clipFinite(e,t))}_clipFinite(e,t){const n=t.length;let r,o,i,a,s=null,l=t[n-2],c=t[n-1],u=this._regioncode(l,c),d=0;for(let f=0;f<n;f+=2)if(r=l,o=c,l=t[f],c=t[f+1],i=u,u=this._regioncode(l,c),0===i&&0===u)a=d,d=0,s?s.push(l,c):s=[l,c];else{let t,n,f,p,h;if(0===i){if(null===(t=this._clipSegment(r,o,l,c,i,u)))continue;[n,f,p,h]=t}else{if(null===(t=this._clipSegment(l,c,r,o,u,i)))continue;[p,h,n,f]=t,a=d,d=this._edgecode(n,f),a&&d&&this._edge(e,a,d,s,s.length),s?s.push(n,f):s=[n,f]}a=d,d=this._edgecode(p,h),a&&d&&this._edge(e,a,d,s,s.length),s?s.push(p,h):s=[p,h]}if(s)a=d,d=this._edgecode(s[0],s[1]),a&&d&&this._edge(e,a,d,s,s.length);else if(this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return s}_clipSegment(e,t,n,r,o,i){const a=o<i;for(a&&([e,t,n,r,o,i]=[n,r,e,t,i,o]);;){if(0===o&&0===i)return a?[n,r,e,t]:[e,t,n,r];if(o&i)return null;let s,l,c=o||i;8&c?(s=e+(n-e)*(this.ymax-t)/(r-t),l=this.ymax):4&c?(s=e+(n-e)*(this.ymin-t)/(r-t),l=this.ymin):2&c?(l=t+(r-t)*(this.xmax-e)/(n-e),s=this.xmax):(l=t+(r-t)*(this.xmin-e)/(n-e),s=this.xmin),o?(e=s,t=l,o=this._regioncode(e,t)):(n=s,r=l,i=this._regioncode(n,r))}}_clipInfinite(e,t,n,r,o,i){let a,s=Array.from(t);if((a=this._project(s[0],s[1],n,r))&&s.unshift(a[0],a[1]),(a=this._project(s[s.length-2],s[s.length-1],o,i))&&s.push(a[0],a[1]),s=this._clipFinite(e,s))for(let t,n=0,r=s.length,o=this._edgecode(s[r-2],s[r-1]);n<r;n+=2)t=o,o=this._edgecode(s[n],s[n+1]),t&&o&&(n=this._edge(e,t,o,s,n),r=s.length);else this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(s=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return s}_edge(e,t,n,r,o){for(;t!==n;){let n,i;switch(t){case 5:t=4;continue;case 4:t=6,n=this.xmax,i=this.ymin;break;case 6:t=2;continue;case 2:t=10,n=this.xmax,i=this.ymax;break;case 10:t=8;continue;case 8:t=9,n=this.xmin,i=this.ymax;break;case 9:t=1;continue;case 1:t=5,n=this.xmin,i=this.ymin}r[o]===n&&r[o+1]===i||!this.contains(e,n,i)||(r.splice(o,0,n,i),o+=2)}return o}_project(e,t,n,r){let o,i,a,s=1/0;if(r<0){if(t<=this.ymin)return null;(o=(this.ymin-t)/r)<s&&(a=this.ymin,i=e+(s=o)*n)}else if(r>0){if(t>=this.ymax)return null;(o=(this.ymax-t)/r)<s&&(a=this.ymax,i=e+(s=o)*n)}if(n>0){if(e>=this.xmax)return null;(o=(this.xmax-e)/n)<s&&(i=this.xmax,a=t+(s=o)*r)}else if(n<0){if(e<=this.xmin)return null;(o=(this.xmin-e)/n)<s&&(i=this.xmin,a=t+(s=o)*r)}return[i,a]}_edgecode(e,t){return(e===this.xmin?1:e===this.xmax?2:0)|(t===this.ymin?4:t===this.ymax?8:0)}_regioncode(e,t){return(e<this.xmin?1:e>this.xmax?2:0)|(t<this.ymin?4:t>this.ymax?8:0)}_simplify(e){if(e&&e.length>4){for(let t=0;t<e.length;t+=2){const n=(t+2)%e.length,r=(t+4)%e.length;(e[t]===e[n]&&e[n]===e[r]||e[t+1]===e[n+1]&&e[n+1]===e[r+1])&&(e.splice(n,2),t-=2)}e.length||(e=null)}return e}}const Pj=2*Math.PI,Tj=Math.pow;function Oj(e){return e[0]}function jj(e){return e[1]}function _j(e,t,n){return[e+Math.sin(e+t)*n,t+Math.cos(e-t)*n]}class Dj{static from(e,t=Oj,n=jj,r){return new Dj("length"in e?function(e,t,n,r){const o=e.length,i=new Float64Array(2*o);for(let a=0;a<o;++a){const o=e[a];i[2*a]=t.call(r,o,a,e),i[2*a+1]=n.call(r,o,a,e)}return i}(e,t,n,r):Float64Array.from(function*(e,t,n,r){let o=0;for(const i of e)yield t.call(r,i,o,e),yield n.call(r,i,o,e),++o}(e,t,n,r)))}constructor(e){this._delaunator=new hj(e),this.inedges=new Int32Array(e.length/2),this._hullIndex=new Int32Array(e.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const e=this._delaunator,t=this.points;if(e.hull&&e.hull.length>2&&function(e){const{triangles:t,coords:n}=e;for(let e=0;e<t.length;e+=3){const r=2*t[e],o=2*t[e+1],i=2*t[e+2];if((n[i]-n[r])*(n[o+1]-n[r+1])-(n[o]-n[r])*(n[i+1]-n[r+1])>1e-10)return!1}return!0}(e)){this.collinear=Int32Array.from({length:t.length/2},(e,t)=>t).sort((e,n)=>t[2*e]-t[2*n]||t[2*e+1]-t[2*n+1]);const e=this.collinear[0],n=this.collinear[this.collinear.length-1],r=[t[2*e],t[2*e+1],t[2*n],t[2*n+1]],o=1e-8*Math.hypot(r[3]-r[1],r[2]-r[0]);for(let e=0,n=t.length/2;e<n;++e){const n=_j(t[2*e],t[2*e+1],o);t[2*e]=n[0],t[2*e+1]=n[1]}this._delaunator=new hj(t)}else delete this.collinear;const n=this.halfedges=this._delaunator.halfedges,r=this.hull=this._delaunator.hull,o=this.triangles=this._delaunator.triangles,i=this.inedges.fill(-1),a=this._hullIndex.fill(-1);for(let e=0,t=n.length;e<t;++e){const t=o[e%3==2?e-2:e+1];-1!==n[e]&&-1!==i[t]||(i[t]=e)}for(let e=0,t=r.length;e<t;++e)a[r[e]]=e;r.length<=2&&r.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=r[0],i[r[0]]=1,2===r.length&&(i[r[1]]=0,this.triangles[1]=r[1],this.triangles[2]=r[1]))}voronoi(e){return new Mj(this,e)}*neighbors(e){const{inedges:t,hull:n,_hullIndex:r,halfedges:o,triangles:i,collinear:a}=this;if(a){const t=a.indexOf(e);return t>0&&(yield a[t-1]),void(t<a.length-1&&(yield a[t+1]))}const s=t[e];if(-1===s)return;let l=s,c=-1;do{if(yield c=i[l],l=l%3==2?l-2:l+1,i[l]!==e)return;if(l=o[l],-1===l){const t=n[(r[e]+1)%n.length];return void(t!==c&&(yield t))}}while(l!==s)}find(e,t,n=0){if((e=+e)!=e||(t=+t)!=t)return-1;const r=n;let o;for(;(o=this._step(n,e,t))>=0&&o!==n&&o!==r;)n=o;return o}_step(e,t,n){const{inedges:r,hull:o,_hullIndex:i,halfedges:a,triangles:s,points:l}=this;if(-1===r[e]||!l.length)return(e+1)%(l.length>>1);let c=e,u=Tj(t-l[2*e],2)+Tj(n-l[2*e+1],2);const d=r[e];let f=d;do{let r=s[f];const d=Tj(t-l[2*r],2)+Tj(n-l[2*r+1],2);if(d<u&&(u=d,c=r),f=f%3==2?f-2:f+1,s[f]!==e)break;if(f=a[f],-1===f){if(f=o[(i[e]+1)%o.length],f!==r&&Tj(t-l[2*f],2)+Tj(n-l[2*f+1],2)<u)return f;break}}while(f!==d);return c}render(e){const t=null==e?e=new kj:void 0,{points:n,halfedges:r,triangles:o}=this;for(let t=0,i=r.length;t<i;++t){const i=r[t];if(i<t)continue;const a=2*o[t],s=2*o[i];e.moveTo(n[a],n[a+1]),e.lineTo(n[s],n[s+1])}return this.renderHull(e),t&&t.value()}renderPoints(e,t){void 0!==t||e&&"function"==typeof e.moveTo||(t=e,e=null),t=null==t?2:+t;const n=null==e?e=new kj:void 0,{points:r}=this;for(let n=0,o=r.length;n<o;n+=2){const o=r[n],i=r[n+1];e.moveTo(o+t,i),e.arc(o,i,t,0,Pj)}return n&&n.value()}renderHull(e){const t=null==e?e=new kj:void 0,{hull:n,points:r}=this,o=2*n[0],i=n.length;e.moveTo(r[o],r[o+1]);for(let t=1;t<i;++t){const o=2*n[t];e.lineTo(r[o],r[o+1])}return e.closePath(),t&&t.value()}hullPolygon(){const e=new Cj;return this.renderHull(e),e.value()}renderTriangle(e,t){const n=null==t?t=new kj:void 0,{points:r,triangles:o}=this,i=2*o[e*=3],a=2*o[e+1],s=2*o[e+2];return t.moveTo(r[i],r[i+1]),t.lineTo(r[a],r[a+1]),t.lineTo(r[s],r[s+1]),t.closePath(),n&&n.value()}*trianglePolygons(){const{triangles:e}=this;for(let t=0,n=e.length/3;t<n;++t)yield this.trianglePolygon(t)}trianglePolygon(e){const t=new Cj;return this.renderTriangle(e,t),t.value()}}var Ej=function(e){return[e.x,e.y]},Rj=gk,Aj="cursor",Ij=function(e){var t=e.points,n=e.getNodePosition,r=void 0===n?Ej:n,o=e.margin,i=void 0===o?Rj:o;return t.map(function(e){var t=r(e),n=t[0],o=t[1];return[n+i.left,o+i.top]})},Fj=function(e){var t=e.points,n=e.getNodePosition,r=void 0===n?Ej:n,o=e.width,i=e.height,a=e.margin,s=void 0===a?Rj:a,l=e.debug;return(0,G.useMemo)(function(){return function(e){var t=e.points,n=e.width,r=e.height,o=e.margin,i=void 0===o?Rj:o,a=e.debug,s=Dj.from(t),l=a?s.voronoi([0,0,i.left+n+i.right,i.top+r+i.bottom]):void 0;return{points:t,delaunay:s,voronoi:l}}({points:Ij({points:t,margin:s,getNodePosition:r}),width:o,height:i,margin:s,debug:l})},[t,o,i,s,l])},Lj=function(e){var t=e.nodes,n=e.width,r=e.height,o=e.margin,i=void 0===o?Rj:o,a=e.getNodePosition,s=e.setCurrent,l=e.onMouseEnter,c=e.onMouseMove,u=e.onMouseLeave,d=e.onClick,f=e.onTouchStart,p=e.onTouchMove,h=e.onTouchEnd,m=e.enableTouchCrosshair,g=void 0!==m&&m,b=e.detectionRadius,y=void 0===b?1/0:b,v=e.tooltip,x=e.tooltipPosition,w=void 0===x?Aj:x,S=e.tooltipAnchor,k=void 0===S?"top":S,C=e.debug,M=(0,G.useRef)(null),P=Fj({points:t,getNodePosition:a,width:n,height:r,margin:i,debug:C}),T=P.delaunay,O=P.voronoi,j=function(e){var t=e.elementRef,n=e.nodes,r=e.getNodePosition,o=void 0===r?Ej:r,i=e.delaunay,a=e.setCurrent,s=e.margin,l=void 0===s?Rj:s,c=e.detectionRadius,u=void 0===c?1/0:c,d=e.isInteractive,f=void 0===d||d,p=e.onMouseEnter,h=e.onMouseMove,m=e.onMouseLeave,g=e.onClick,b=e.onTouchStart,y=e.onTouchMove,v=e.onTouchEnd,x=e.enableTouchCrosshair,w=void 0!==x&&x,S=e.tooltip,k=e.tooltipPosition,C=void 0===k?Aj:k,M=e.tooltipAnchor,P=void 0===M?"top":M,T=(0,G.useState)(null),O=T[0],j=T[1],_=(0,G.useRef)(null);(0,G.useEffect)(function(){_.current=O},[_,O]);var D=(0,G.useCallback)(function(e){if(!t.current||0===n.length)return null;var r=Jk(t.current,e),a=r[0],s=r[1],c=i.find(a,s),d=void 0!==c?n[c]:null;if(d&&u!==1/0){var f=o(d),p=f[0],h=f[1];(function(e,t,n,r){return Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))})(a,s,p+l.left,h+l.top)>u&&(c=null,d=null)}return null===c||null===d?null:[c,d]},[t,i,n,o,l,u]),E=qg(),R=E.showTooltipAt,A=E.showTooltipFromEvent,I=E.hideTooltip,F=(0,G.useMemo)(function(){if(S)return"cursor"===C?function(e,t){A(S(e),t,P)}:function(e){var t=o(e),n=t[0],r=t[1];R(S(e),[n+l.left,r+l.top],P)}},[R,A,S,C,P,o,l]),L=(0,G.useCallback)(function(e){var t=D(e);if(j(t),null==a||a(t?t[1]:null),t){var n=t[1];null==F||F(n,e),null==p||p(t[1],e)}},[D,j,a,F,p]),N=(0,G.useCallback)(function(e){var t=D(e);if(j(t),t){var n=t[0],r=t[1];if(null==a||a(r),null==F||F(r,e),_.current){var o=_.current,i=o[0],s=o[1];n!==i?null==m||m(s,e):null==h||h(r,e)}else null==p||p(r,e)}else null==a||a(null),null==I||I(),_.current&&(null==m||m(_.current[1],e))},[D,j,_,p,h,m,F,I]),z=(0,G.useCallback)(function(e){j(null),null==a||a(null),I(),m&&_.current&&m(_.current[1],e)},[j,a,_,I,m]),$=(0,G.useCallback)(function(e){var t=D(e);j(t),t&&(null==g||g(t[1],e))},[D,j,g]),V=(0,G.useCallback)(function(e){var t=D(e);w&&(j(t),null==a||a(t?t[1]:null)),t&&(null==b||b(t[1],e))},[D,j,a,w,b]),B=(0,G.useCallback)(function(e){var t=D(e);w&&(j(t),null==a||a(t?t[1]:null)),t&&(null==y||y(t[1],e))},[D,j,a,w,y]),W=(0,G.useCallback)(function(e){w&&(j(null),null==a||a(null)),v&&_.current&&v(_.current[1],e)},[w,j,a,v,_]);return{current:O,handleMouseEnter:f?L:void 0,handleMouseMove:f?N:void 0,handleMouseLeave:f?z:void 0,handleClick:f?$:void 0,handleTouchStart:f?V:void 0,handleTouchMove:f?B:void 0,handleTouchEnd:f?W:void 0}}({elementRef:M,nodes:t,delaunay:T,margin:i,detectionRadius:y,setCurrent:s,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,onClick:d,onTouchStart:f,onTouchMove:p,onTouchEnd:h,enableTouchCrosshair:g,tooltip:v,tooltipPosition:w,tooltipAnchor:k}),_=j.current,D=j.handleMouseEnter,E=j.handleMouseMove,R=j.handleMouseLeave,A=j.handleClick,I=j.handleTouchStart,F=j.handleTouchMove,L=j.handleTouchEnd,N=(0,G.useMemo)(function(){if(C&&O)return O.render()},[C,O]);return(0,le.jsxs)("g",{ref:M,transform:"translate("+-i.left+","+-i.top+")",children:[C&&O&&(0,le.jsxs)(le.Fragment,{children:[(0,le.jsx)("path",{d:N,stroke:"red",strokeWidth:1,opacity:.75}),y<1/0&&(0,le.jsx)("path",{stroke:"red",strokeWidth:.35,fill:"none",d:T.renderPoints(void 0,y)}),_&&(0,le.jsx)("path",{fill:"pink",opacity:.35,d:O.renderCell(_[0])})]}),(0,le.jsx)("rect",{"data-ref":"mesh-interceptor",width:i.left+n+i.right,height:i.top+r+i.bottom,fill:"red",opacity:0,style:{cursor:"auto"},onMouseEnter:D,onMouseMove:E,onMouseLeave:R,onTouchStart:I,onTouchMove:F,onTouchEnd:L,onClick:A})]})};function Nj(){return Nj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nj.apply(this,arguments)}var zj=(0,G.memo)(function(e){var t=e.point;return(0,le.jsx)(Lg,{id:(0,le.jsxs)("span",{children:["x: ",(0,le.jsx)("strong",{children:t.data.xFormatted}),", y:"," ",(0,le.jsx)("strong",{children:t.data.yFormatted})]}),enableChip:!0,color:t.serieColor})}),$j=(0,G.memo)(function(e){var t=e.slice,n=e.axis,r=Ck(),o="x"===n?"y":"x";return(0,le.jsx)(zg,{rows:t.points.map(function(e){return[(0,le.jsx)(Fg,{color:e.serieColor,style:r.tooltip.chip},"chip"),e.serieId,(0,le.jsx)("span",{style:r.tooltip.tableCellValue,children:e.data[o+"Formatted"]},"value")]})})}),Vj={curve:"linear",xScale:{type:"point"},yScale:{type:"linear",min:0,max:"auto"},layers:["grid","markers","axes","areas","crosshair","lines","points","slices","mesh","legends"],axisBottom:{},axisLeft:{},enableGridX:!0,enableGridY:!0,enablePoints:!0,pointSize:6,pointColor:{from:"color"},pointBorderWidth:0,pointBorderColor:{theme:"background"},enablePointLabel:!1,pointLabel:"yFormatted",colors:{scheme:"nivo"},enableArea:!1,areaBaselineValue:0,areaOpacity:.2,areaBlendMode:"normal",lineWidth:2,legends:[],isInteractive:!0,tooltip:zj,enableSlices:!1,debugSlices:!1,sliceTooltip:$j,debugMesh:!1,enableCrosshair:!0,crosshairType:"bottom-left"},Bj=Nj({},Vj,{enablePointLabel:!1,useMesh:!1,enableTouchCrosshair:!1,animate:!0,motionConfig:"gentle",defs:[],fill:[],role:"img",initialHiddenIds:[]}),Wj=(Nj({},Vj,{pixelRatio:"undefined"!=typeof window&&window.devicePixelRatio||1}),function(e){var t=e.curve;return(0,G.useMemo)(function(){return qO().defined(function(e){return null!==e.x&&null!==e.y}).x(function(e){return e.x}).y(function(e){return e.y}).curve(fk(t))},[t])}),Hj=function(e){var t=e.curve,n=e.yScale,r=e.areaBaselineValue;return(0,G.useMemo)(function(){return function(e,t,n){var r=null,o=$T(!0),i=null,a=Lb,s=null,l=BO(c);function c(c){var u,d,f,p,h,m=(c=zT(c)).length,g=!1,b=new Array(m),y=new Array(m);for(null==i&&(s=a(h=l())),u=0;u<=m;++u){if(!(u<m&&o(p=c[u],u,c))===g)if(g=!g)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(b[f],y[f]);s.lineEnd(),s.areaEnd()}g&&(b[u]=+e(p,u,c),y[u]=+t(p,u,c),s.point(r?+r(p,u,c):b[u],n?+n(p,u,c):y[u]))}if(h)return s=null,h+""||null}function u(){return qO().defined(o).curve(a).context(i)}return e="function"==typeof e?e:void 0===e?WO:$T(+e),t="function"==typeof t?t:$T(void 0===t?0:+t),n="function"==typeof n?n:void 0===n?HO:$T(+n),c.x=function(t){return arguments.length?(e="function"==typeof t?t:$T(+t),r=null,c):e},c.x0=function(t){return arguments.length?(e="function"==typeof t?t:$T(+t),c):e},c.x1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:$T(+e),c):r},c.y=function(e){return arguments.length?(t="function"==typeof e?e:$T(+e),n=null,c):t},c.y0=function(e){return arguments.length?(t="function"==typeof e?e:$T(+e),c):t},c.y1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:$T(+e),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(e){return arguments.length?(o="function"==typeof e?e:$T(!!e),c):o},c.curve=function(e){return arguments.length?(a=e,null!=i&&(s=a(i)),c):a},c.context=function(e){return arguments.length?(null==e?i=s=null:s=a(i=e),c):i},c}().defined(function(e){return null!==e.x&&null!==e.y}).x(function(e){return e.x}).y1(function(e){return e.y}).curve(fk(t)).y0(n(r))},[t,n,r])},qj=function(e){var t=e.data,n=e.xScale,r=void 0===n?Bj.xScale:n,o=e.xFormat,i=e.yScale,a=void 0===i?Bj.yScale:i,s=e.yFormat,l=e.width,c=e.height,u=e.colors,d=void 0===u?Bj.colors:u,f=e.curve,p=void 0===f?Bj.curve:f,h=e.areaBaselineValue,m=void 0===h?Bj.areaBaselineValue:h,g=e.pointColor,b=void 0===g?Bj.pointColor:g,y=e.pointBorderColor,v=void 0===y?Bj.pointBorderColor:y,x=e.enableSlices,w=void 0===x?Bj.enableSlicesTooltip:x,S=e.initialHiddenIds,k=void 0===S?Bj.initialHiddenIds:S,C=(0,G.useState)(nj("line"))[0],M=xk(o),P=xk(s),T=kT(d,"id"),O=Ck(),j=wT(b,O),_=wT(v,O),D=(0,G.useState)(null!=k?k:[]),E=D[0],R=D[1],A=(0,G.useMemo)(function(){return bP(t.filter(function(e){return-1===E.indexOf(e.id)}),r,a,l,c)},[t,E,r,a,l,c]),I=A.xScale,F=A.yScale,L=A.series,N=(0,G.useMemo)(function(){var e=t.map(function(e){return{id:e.id,label:e.id,color:T(e)}}),n=e.map(function(e){return Nj({},L.find(function(t){return t.id===e.id}),{color:e.color})}).filter(function(e){return Boolean(e.id)});return{legendData:e.map(function(e){return Nj({},e,{hidden:!n.find(function(t){return t.id===e.id})})}).reverse(),series:n}},[t,L,T]),z=N.legendData,$=N.series,V=(0,G.useCallback)(function(e){R(function(t){return t.indexOf(e)>-1?t.filter(function(t){return t!==e}):[].concat(t,[e])})},[]),B=function(e){var t=e.series,n=e.getPointColor,r=e.getPointBorderColor,o=e.formatX,i=e.formatY;return(0,G.useMemo)(function(){return t.reduce(function(e,t){return[].concat(e,t.data.filter(function(e){return null!==e.position.x&&null!==e.position.y}).map(function(a,s){var l={id:t.id+"."+s,index:e.length+s,serieId:t.id,serieColor:t.color,x:a.position.x,y:a.position.y};return l.color=n(t),l.borderColor=r(l),l.data=Nj({},a.data,{xFormatted:o(a.data.x),yFormatted:i(a.data.y)}),l}))},[])},[t,n,r,o,i])}({series:$,getPointColor:j,getPointBorderColor:_,formatX:M,formatY:P}),W=function(e){var t=e.componentId,n=e.enableSlices,r=e.points,o=e.width,i=e.height;return(0,G.useMemo)(function(){if(!1===n)return[];if("x"===n){var e=new Map;return r.forEach(function(t){null!==t.data.x&&null!==t.data.y&&(e.has(t.x)?e.get(t.x).push(t):e.set(t.x,[t]))}),Array.from(e.entries()).sort(function(e,t){return e[0]-t[0]}).map(function(e,n,r){var a,s,l=e[0],c=e[1],u=r[n-1],d=r[n+1];return a=u?l-(l-u[0])/2:l,s=d?l-a+(d[0]-l)/2:o-a,{id:"slice:"+t+":"+l,x0:a,x:l,y0:0,y:0,width:s,height:i,points:c.reverse()}})}if("y"===n){var a=new Map;return r.forEach(function(e){null!==e.data.x&&null!==e.data.y&&(a.has(e.y)?a.get(e.y).push(e):a.set(e.y,[e]))}),Array.from(a.entries()).sort(function(e,t){return e[0]-t[0]}).map(function(e,t,n){var r,a,s=e[0],l=e[1],c=n[t-1],u=n[t+1];return r=c?s-(s-c[0])/2:s,a=u?s-r+(u[0]-s)/2:i-r,{id:s,x0:0,x:0,y0:r,y:s,width:o,height:a,points:l.reverse()}})}},[t,n,i,r,o])}({componentId:C,enableSlices:w,points:B,width:l,height:c});return{legendData:z,toggleSerie:V,lineGenerator:Wj({curve:p}),areaGenerator:Hj({curve:p,yScale:F,areaBaselineValue:m}),getColor:T,series:$,xScale:I,yScale:F,slices:W,points:B}},Yj=function(e){var t=e.areaBlendMode,n=e.areaOpacity,r=e.color,o=e.fill,i=e.path,a=lk(),s=a.animate,l=a.config,c=ck(i),u=ug({color:r,config:l,immediate:!s});return(0,le.jsx)(Dg.path,{d:c,fill:o||u.color,fillOpacity:n,strokeWidth:0,style:{mixBlendMode:t}})},Uj=(0,G.memo)(function(e){var t=e.areaGenerator,n=e.areaOpacity,r=e.areaBlendMode,o=e.lines.slice(0).reverse();return(0,le.jsx)("g",{children:o.map(function(e){return(0,le.jsx)(Yj,Nj({path:t(e.data.map(function(e){return e.position}))},Nj({areaOpacity:n,areaBlendMode:r},e)),e.id)})})}),Gj=(0,G.memo)(function(e){var t=e.lineGenerator,n=e.points,r=e.color,o=e.thickness,i=(0,G.useMemo)(function(){return t(n)},[t,n]),a=ck(i);return(0,le.jsx)(Dg.path,{d:a,fill:"none",strokeWidth:o,stroke:r})}),Xj=(0,G.memo)(function(e){var t=e.lines,n=e.lineGenerator,r=e.lineWidth;return t.slice(0).reverse().map(function(e){var t=e.id,o=e.data,i=e.color;return(0,le.jsx)(Gj,{id:t,points:o.map(function(e){return e.position}),lineGenerator:n,color:i,thickness:r},t)})}),Qj=(0,G.memo)(function(e){var t=e.slice,n=e.slices,r=e.axis,o=e.debug,i=e.tooltip,a=e.isCurrent,s=e.setCurrent,l=e.onMouseEnter,c=e.onMouseMove,u=e.onMouseLeave,d=e.onClick,f=e.onTouchStart,p=e.onTouchMove,h=e.onTouchEnd,m=qg(),g=m.showTooltipFromEvent,b=m.hideTooltip,y=(0,G.useCallback)(function(e){g((0,G.createElement)(i,{slice:t,axis:r}),e,"right"),s(t),l&&l(t,e)},[g,i,t,r,s,l]),v=(0,G.useCallback)(function(e){g((0,G.createElement)(i,{slice:t,axis:r}),e,"right"),c&&c(t,e)},[g,i,t,r,c]),x=(0,G.useCallback)(function(e){b(),s(null),u&&u(t,e)},[b,s,u,t]),w=(0,G.useCallback)(function(e){d&&d(t,e)},[t,d]),S=(0,G.useCallback)(function(e){g((0,G.createElement)(i,{slice:t,axis:r}),e,"right"),s(t),f&&f(t,e)},[r,f,s,g,t,i]),k=(0,G.useCallback)(function(e){var o=e.touches[0],a=document.elementFromPoint(o.clientX,o.clientY),l=null==a?void 0:a.getAttribute("data-ref");if(l){var c=n.find(function(e){return e.id===l});c&&(g((0,G.createElement)(i,{slice:c,axis:r}),e,"right"),s(c))}p&&p(t,e)},[r,p,s,g,t,n,i]),C=(0,G.useCallback)(function(e){b(),s(null),h&&h(t,e)},[b,s,h,t]);return(0,le.jsx)("rect",{x:t.x0,y:t.y0,width:t.width,height:t.height,stroke:"red",strokeWidth:o?1:0,strokeOpacity:.75,fill:"red",fillOpacity:a&&o?.35:0,onMouseEnter:y,onMouseMove:v,onMouseLeave:x,onClick:w,onTouchStart:S,onTouchMove:k,onTouchEnd:C,"data-ref":t.id})}),Kj=(0,G.memo)(function(e){var t=e.slices,n=e.axis,r=e.debug,o=e.height,i=e.tooltip,a=e.current,s=e.setCurrent,l=e.onMouseEnter,c=e.onMouseMove,u=e.onMouseLeave,d=e.onClick,f=e.onTouchStart,p=e.onTouchMove,h=e.onTouchEnd;return t.map(function(e){return(0,le.jsx)(Qj,{slice:e,slices:t,axis:n,debug:r,height:o,tooltip:i,setCurrent:s,isCurrent:null!==a&&a.id===e.id,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,onClick:d,onTouchStart:f,onTouchMove:p,onTouchEnd:h},e.id)})}),Zj=(0,G.memo)(function(e){var t=e.points,n=e.symbol,r=e.size,o=e.borderWidth,i=e.enableLabel,a=e.label,s=e.labelYOffset,l=Ck(),c=function(e){var t,n=Ex(e)?e:function(t){return Xg(t,e)};return t?function(e){return t(n(e))}:n}(a),u=t.slice(0).reverse().map(function(e){return{id:e.id,x:e.x,y:e.y,datum:e.data,fill:e.color,stroke:e.borderColor,label:i?c(e):null}});return(0,le.jsx)("g",{children:u.map(function(e){return(0,le.jsx)(qk,{x:e.x,y:e.y,datum:e.datum,symbol:n,size:r,color:e.fill,borderWidth:o,borderColor:e.stroke,label:e.label,labelYOffset:s,theme:l},e.id)})})}),Jj=(0,G.memo)(function(e){var t=e.points,n=e.width,r=e.height,o=e.margin,i=e.setCurrent,a=e.onMouseEnter,s=e.onMouseMove,l=e.onMouseLeave,c=e.onClick,u=e.onTouchStart,d=e.onTouchMove,f=e.onTouchEnd,p=e.tooltip,h=e.debug,m=e.enableTouchCrosshair,g=qg(),b=g.showTooltipAt,y=g.hideTooltip,v=(0,G.useCallback)(function(e,t){b((0,G.createElement)(p,{point:e}),[e.x+o.left,e.y+o.top],"top"),a&&a(e,t)},[b,p,a,o]),x=(0,G.useCallback)(function(e,t){b((0,G.createElement)(p,{point:e}),[e.x+o.left,e.y+o.top],"top"),s&&s(e,t)},[b,p,o.left,o.top,s]),w=(0,G.useCallback)(function(e,t){y(),l&&l(e,t)},[y,l]),S=(0,G.useCallback)(function(e,t){c&&c(e,t)},[c]),k=(0,G.useCallback)(function(e,t){b((0,G.createElement)(p,{point:e}),[e.x+o.left,e.y+o.top],"top"),u&&u(e,t)},[o.left,o.top,u,b,p]),C=(0,G.useCallback)(function(e,t){b((0,G.createElement)(p,{point:e}),[e.x+o.left,e.y+o.top],"top"),d&&d(e,t)},[o.left,o.top,d,b,p]),M=(0,G.useCallback)(function(e,t){y(),f&&f(e,t)},[f,y]);return(0,le.jsx)(Lj,{nodes:t,width:n,height:r,setCurrent:i,onMouseEnter:v,onMouseMove:x,onMouseLeave:w,onClick:S,onTouchStart:k,onTouchMove:C,onTouchEnd:M,enableTouchCrosshair:m,debug:h})}),e_=Xk(function(e){var t=e.data,n=e.xScale,r=void 0===n?{type:"point"}:n,o=e.xFormat,i=e.yScale,a=void 0===i?{type:"linear",min:0,max:"auto"}:i,s=e.yFormat,l=e.layers,c=void 0===l?["grid","markers","axes","areas","crosshair","lines","points","slices","mesh","legends"]:l,u=e.curve,d=void 0===u?"linear":u,f=e.areaBaselineValue,p=void 0===f?0:f,h=e.colors,m=void 0===h?{scheme:"nivo"}:h,g=e.margin,b=e.width,y=e.height,v=e.axisTop,x=e.axisRight,w=e.axisBottom,S=void 0===w?{}:w,k=e.axisLeft,C=void 0===k?{}:k,M=e.enableGridX,P=void 0===M||M,T=e.enableGridY,O=void 0===T||T,j=e.gridXValues,_=e.gridYValues,D=e.lineWidth,E=void 0===D?2:D,R=e.enableArea,A=void 0!==R&&R,I=e.areaOpacity,F=void 0===I?.2:I,L=e.areaBlendMode,N=void 0===L?"normal":L,z=e.enablePoints,$=void 0===z||z,V=e.pointSymbol,B=e.pointSize,W=void 0===B?6:B,H=e.pointColor,q=void 0===H?{from:"color"}:H,Y=e.pointBorderWidth,U=void 0===Y?0:Y,X=e.pointBorderColor,Q=void 0===X?{theme:"background"}:X,K=e.enablePointLabel,Z=void 0!==K&&K,J=e.pointLabel,ee=void 0===J?"data.yFormatted":J,te=e.pointLabelYOffset,ne=e.defs,re=void 0===ne?[]:ne,oe=e.fill,ie=void 0===oe?[]:oe,ae=e.markers,se=e.legends,ce=void 0===se?[]:se,ue=e.isInteractive,de=void 0===ue||ue,fe=e.useMesh,pe=void 0!==fe&&fe,he=e.debugMesh,me=void 0!==he&&he,ge=e.onMouseEnter,be=e.onMouseMove,ye=e.onMouseLeave,ve=e.onClick,xe=e.onTouchStart,we=e.onTouchMove,Se=e.onTouchEnd,ke=e.tooltip,Ce=void 0===ke?zj:ke,Me=e.enableSlices,Pe=void 0!==Me&&Me,Te=e.debugSlices,Oe=void 0!==Te&&Te,je=e.sliceTooltip,_e=void 0===je?$j:je,De=e.enableCrosshair,Ee=void 0===De||De,Re=e.crosshairType,Ae=void 0===Re?"bottom-left":Re,Ie=e.enableTouchCrosshair,Fe=void 0!==Ie&&Ie,Le=e.role,Ne=void 0===Le?"img":Le,ze=e.initialHiddenIds,$e=void 0===ze?[]:ze,Ve=bk(b,y,g),Be=Ve.margin,We=Ve.innerWidth,He=Ve.innerHeight,qe=Ve.outerWidth,Ye=Ve.outerHeight,Ue=qj({data:t,xScale:r,xFormat:o,yScale:a,yFormat:s,width:We,height:He,colors:m,curve:d,areaBaselineValue:p,pointColor:q,pointBorderColor:Q,enableSlices:Pe,initialHiddenIds:$e}),Ge=Ue.legendData,Xe=Ue.toggleSerie,Qe=Ue.lineGenerator,Ke=Ue.areaGenerator,Ze=Ue.series,Je=Ue.xScale,et=Ue.yScale,tt=Ue.slices,nt=Ue.points,rt=Ck(),ot=wT(q,rt),it=wT(Q,rt),at=(0,G.useState)(null),st=at[0],lt=at[1],ct=(0,G.useState)(null),ut=ct[0],dt=ct[1],ft={grid:(0,le.jsx)(NP,{theme:rt,width:We,height:He,xScale:P?Je:null,yScale:O?et:null,xValues:j,yValues:_},"grid"),markers:(0,le.jsx)(Uk,{markers:ae,width:We,height:He,xScale:Je,yScale:et,theme:rt},"markers"),axes:(0,le.jsx)(IP,{xScale:Je,yScale:et,width:We,height:He,theme:rt,top:v,right:x,bottom:S,left:C},"axes"),areas:null,lines:(0,le.jsx)(Xj,{lines:Ze,lineGenerator:Qe,lineWidth:E},"lines"),slices:null,points:null,crosshair:null,mesh:null,legends:ce.map(function(e,t){return(0,le.jsx)(FT,Nj({},e,{containerWidth:We,containerHeight:He,data:e.data||Ge,theme:rt,toggleSerie:e.toggleSerie?Xe:void 0}),"legend."+t)})},pt=nC(re,Ze,ie);return A&&(ft.areas=(0,le.jsx)(Uj,{areaGenerator:Ke,areaOpacity:F,areaBlendMode:N,lines:Ze},"areas")),de&&!1!==Pe&&(ft.slices=(0,le.jsx)(Kj,{slices:tt,axis:Pe,debug:Oe,height:He,tooltip:_e,current:ut,setCurrent:dt,onMouseEnter:ge,onMouseMove:be,onMouseLeave:ye,onClick:ve,onTouchStart:xe,onTouchMove:we,onTouchEnd:Se},"slices")),$&&(ft.points=(0,le.jsx)(Zj,{points:nt,symbol:V,size:W,color:ot,borderWidth:U,borderColor:it,enableLabel:Z,label:ee,labelYOffset:te},"points")),de&&Ee&&(null!==st&&(ft.crosshair=(0,le.jsx)(Vg,{width:We,height:He,x:st.x,y:st.y,type:Ae},"crosshair")),null!==ut&&(ft.crosshair=(0,le.jsx)(Vg,{width:We,height:He,x:ut.x,y:ut.y,type:Pe},"crosshair"))),de&&pe&&!1===Pe&&(ft.mesh=(0,le.jsx)(Jj,{points:nt,width:We,height:He,margin:Be,current:st,setCurrent:lt,onMouseEnter:ge,onMouseMove:be,onMouseLeave:ye,onClick:ve,onTouchStart:xe,onTouchMove:we,onTouchEnd:Se,tooltip:Ce,enableTouchCrosshair:Fe,debug:me},"mesh")),(0,le.jsx)(Wk,{defs:pt,width:qe,height:Ye,margin:Be,role:Ne,children:c.map(function(t,n){return"function"==typeof t?(0,le.jsx)(G.Fragment,{children:t(Nj({},e,{innerWidth:We,innerHeight:He,series:Ze,slices:tt,points:nt,xScale:Je,yScale:et,lineGenerator:Qe,areaGenerator:Ke,currentPoint:st,setCurrentPoint:lt,currentSlice:ut,setCurrentSlice:dt}))},n):ft[t]})})}),t_=function(e){return(0,le.jsx)(_k,{children:function(t){var n=t.width,r=t.height;return(0,le.jsx)(e_,Nj({width:n,height:r},e))}})},n_=Xk(function(e){var t=(0,G.useRef)(null),n=e.width,r=e.height,o=e.margin,i=e.pixelRatio,a=void 0===i?"undefined"!=typeof window&&window.devicePixelRatio||1:i,s=e.data,l=e.xScale,c=void 0===l?{type:"point"}:l,u=e.xFormat,d=e.yScale,f=void 0===d?{type:"linear",min:0,max:"auto"}:d,p=e.yFormat,h=e.curve,m=void 0===h?"linear":h,g=e.layers,b=void 0===g?["grid","markers","axes","areas","crosshair","lines","points","slices","mesh","legends"]:g,y=e.colors,v=void 0===y?{scheme:"nivo"}:y,x=e.lineWidth,w=void 0===x?2:x,S=e.enableArea,k=void 0!==S&&S,C=e.areaBaselineValue,M=void 0===C?0:C,P=e.areaOpacity,T=void 0===P?.2:P,O=e.enablePoints,j=void 0===O||O,_=e.pointSize,D=void 0===_?6:_,E=e.pointColor,R=void 0===E?{from:"color"}:E,A=e.pointBorderWidth,I=void 0===A?0:A,F=e.pointBorderColor,L=void 0===F?{theme:"background"}:F,N=e.enableGridX,z=void 0===N||N,$=e.gridXValues,V=e.enableGridY,B=void 0===V||V,W=e.gridYValues,H=e.axisTop,q=e.axisRight,Y=e.axisBottom,U=void 0===Y?{}:Y,X=e.axisLeft,Q=void 0===X?{}:X,K=e.legends,Z=void 0===K?[]:K,J=e.isInteractive,ee=void 0===J||J,te=e.debugMesh,ne=void 0!==te&&te,re=e.onMouseLeave,oe=e.onClick,ie=e.tooltip,ae=void 0===ie?zj:ie,se=e.canvasRef,ce=bk(n,r,o),ue=ce.margin,de=ce.innerWidth,fe=ce.innerHeight,pe=ce.outerWidth,he=ce.outerHeight,me=Ck(),ge=(0,G.useState)(null),be=ge[0],ye=ge[1],ve=qj({data:s,xScale:c,xFormat:u,yScale:f,yFormat:p,width:de,height:fe,colors:v,curve:m,areaBaselineValue:M,pointColor:R,pointBorderColor:L}),xe=ve.lineGenerator,we=ve.areaGenerator,Se=ve.series,ke=ve.xScale,Ce=ve.yScale,Me=ve.points,Pe=Fj({points:Me,width:de,height:fe,debug:ne}),Te=Pe.delaunay,Oe=Pe.voronoi;(0,G.useEffect)(function(){se&&(se.current=t.current),t.current.width=pe*a,t.current.height=he*a;var e=t.current.getContext("2d");e.scale(a,a),e.fillStyle=me.background,e.fillRect(0,0,pe,he),e.translate(ue.left,ue.top),b.forEach(function(t){if("function"==typeof t&&t({ctx:e,innerWidth:de,innerHeight:fe,series:Se,points:Me,xScale:ke,yScale:Ce,lineWidth:w,lineGenerator:xe,areaGenerator:we,currentPoint:be,setCurrentPoint:ye}),"grid"===t&&me.grid.line.strokeWidth>0&&(e.lineWidth=me.grid.line.strokeWidth,e.strokeStyle=me.grid.line.stroke,z&&$P(e,{width:de,height:fe,scale:ke,axis:"x",values:$}),B&&$P(e,{width:de,height:fe,scale:Ce,axis:"y",values:W})),"axes"===t&&zP(e,{xScale:ke,yScale:Ce,width:de,height:fe,top:H,right:q,bottom:U,left:Q,theme:me}),"areas"===t&&!0===k){e.save(),e.globalAlpha=T,we.context(e);for(var n=Se.length-1;n>=0;n--)e.fillStyle=Se[n].color,e.beginPath(),we(Se[n].data.map(function(e){return e.position})),e.fill();e.restore()}if("lines"===t&&(xe.context(e),Se.forEach(function(t){e.strokeStyle=t.color,e.lineWidth=w,e.beginPath(),xe(t.data.map(function(e){return e.position})),e.stroke()})),"points"===t&&!0===j&&D>0&&Me.forEach(function(t){e.fillStyle=t.color,e.beginPath(),e.arc(t.x,t.y,D/2,0,2*Math.PI),e.fill(),I>0&&(e.strokeStyle=t.borderColor,e.lineWidth=I,e.stroke())}),"mesh"===t&&!0===ne&&(function(e,t){e.save(),e.globalAlpha=.75,e.beginPath(),t.render(e),e.strokeStyle="red",e.lineWidth=1,e.stroke(),e.restore()}(e,Oe),be&&function(e,t,n){e.save(),e.globalAlpha=.35,e.beginPath(),t.renderCell(n,e),e.fillStyle="pink",e.fill(),e.restore()}(e,Oe,be.index)),"legends"===t){var r=Se.map(function(e){return{id:e.id,label:e.id,color:e.color}}).reverse();Z.forEach(function(t){NT(e,Nj({},t,{data:t.data||r,containerWidth:de,containerHeight:fe,theme:me}))})}})},[t,pe,he,b,me,xe,Se,ke,Ce,z,$,B,W,H,q,U,Q,Z,Me,j,D,be]);var je=(0,G.useCallback)(function(e){var n=Jk(t.current,e),r=n[0],o=n[1];if(!Zk(ue.left,ue.top,de,fe,r,o))return null;var i=Te.find(r-ue.left,o-ue.top);return Me[i]},[t,ue,de,fe,Te]),_e=qg(),De=_e.showTooltipFromEvent,Ee=_e.hideTooltip,Re=(0,G.useCallback)(function(e){var t=je(e);ye(t),t?De((0,G.createElement)(ae,{point:t}),e):Ee()},[je,ye,De,Ee,ae]),Ae=(0,G.useCallback)(function(e){Ee(),ye(null),be&&re&&re(be,e)},[Ee,ye,re]),Ie=(0,G.useCallback)(function(e){if(oe){var t=je(e);t&&oe(t,e)}},[je,oe]);return(0,le.jsx)("canvas",{ref:t,width:pe*a,height:he*a,style:{width:pe,height:he,cursor:ee?"auto":"normal"},onMouseEnter:ee?Re:void 0,onMouseMove:ee?Re:void 0,onMouseLeave:ee?Ae:void 0,onClick:ee?Ie:void 0})}),r_=(0,G.forwardRef)(function(e,t){return(0,le.jsx)(n_,Nj({},e,{canvasRef:t}))}),o_=((0,G.forwardRef)(function(e,t){return(0,le.jsx)(_k,{children:function(n){var r=n.width,o=n.height;return(0,le.jsx)(r_,Nj({width:r,height:o},e,{ref:t}))}})}),function(e){var t=e.data,n=e.chartConfig,r=e.keys,o=e.indexes,i=e.annotation;if(!t||0===t.length)return(0,le.jsx)("div",{children:"Error: no data provided"});var a=function(e,t,n,r){var o,i=t[0],a=n[0],s=n.filter(function(e){return e!==a})[0],l=e.reduce(function(e,t){return t[s]&&!e.includes(t[s])&&e.push(t[s]),e},[]),c=e.reduce(function(e,t){return t[a]&&!e.includes(t[a])&&e.push(t[a]),e},[]),u=c.map(function(t){return{x:t,y:e.reduce(function(e,n){return n[a]===t?Number(e)+Number(n[i]):e},0)}});return o=l.length?l.map(function(t){var n=e.filter(function(e){return e[s]===t}).map(function(e){return{x:e[a],y:Number(e[i])}}),r=c.map(function(e){return n.find(function(t){return t.x===e})||{x:e,y:0}});return{id:String(t),data:r}}):[{id:r.measures[i].title,data:u}],{transformedData:o}}(t,r,o,i),s=a.transformedData,l=n.theme,c=n.xAxisLabel,u=n.yAxisLabel,d=i.measures,f=jO({theme:l});return(0,le.jsxs)("div",{className:"dashboard-chart-container",children:[(0,le.jsx)("div",{className:"dashboard-chart",role:"graphics-datachart",children:(0,le.jsx)(t_,{"test-id":"line-chart",data:s,margin:{top:20,right:15,bottom:50,left:90},xScale:{type:"point"},yScale:{type:"linear",min:"auto",max:"auto",stacked:!1,reverse:!1},yFormat:" >-.2f",axisTop:null,axisRight:null,axisBottom:{tickSize:5,tickPadding:5,tickRotation:0,legend:c,legendOffset:36,legendPosition:"middle",truncateTickAt:0,renderTick:function(e){return(0,le.jsx)(IO,{x:e.x,y:e.y,value:e.value,textAnchor:"middle"})}},axisLeft:{tickSize:5,tickPadding:5,tickRotation:0,legend:u,legendOffset:-70,legendPosition:"middle",truncateTickAt:9},colors:f,pointSize:0,pointColor:{theme:"background"},pointBorderWidth:2,pointBorderColor:{from:"serieColor"},pointLabel:"data.yFormatted",pointLabelYOffset:-12,enableTouchCrosshair:!0,useMesh:!0,enableGridX:!0,enableGridY:!0,onClick:function(e){return console.log(e)}})}),(0,le.jsx)(_O,{data:d,themeConfig:f})]})});function i_(){return i_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i_.apply(this,arguments)}var a_={layers:["grid","axes","cells","legends","annotations"],forceSquare:!1,xInnerPadding:0,xOuterPadding:0,yInnerPadding:0,yOuterPadding:0,sizeVariation:!1,opacity:1,activeOpacity:1,inactiveOpacity:.15,borderWidth:0,borderColor:{from:"color",modifiers:[["darker",.8]]},enableGridX:!1,enableGridY:!1,enableLabels:!0,label:"formattedValue",labelTextColor:{from:"color",modifiers:[["darker",2]]},colors:{type:"sequential",scheme:"brown_blueGreen"},emptyColor:"#000000",legends:[],annotations:[],isInteractive:!0,hoverTarget:"rowColumn",tooltip:(0,G.memo)(function(e){var t=e.cell;return null===t.formattedValue?null:(0,le.jsx)(Lg,{id:t.serieId+" - "+t.data.x,value:t.formattedValue,enableChip:!0,color:t.color})}),animate:!0,motionConfig:"gentle"},s_=i_({},a_,{axisTop:{},axisRight:null,axisBottom:null,axisLeft:{},borderRadius:0,cellComponent:"rect"}),l_=(i_({},a_,{axisTop:{},axisRight:null,axisBottom:null,axisLeft:{},renderCell:"rect",pixelRatio:"undefined"!=typeof window&&window.devicePixelRatio||1}),function(e){var t=e.data,n=e.width,r=e.height,o=e.xInnerPadding,i=e.xOuterPadding,a=e.yInnerPadding,s=e.yOuterPadding,l=e.forceSquare,c=new Set,u=[],d=[],f=[];t.forEach(function(e){u.push(e.id),e.data.forEach(function(t){c.add(t.x);var n=null;void 0!==t.y&&null!==t.y&&(d.push(t.y),n=t.y),f.push({id:e.id+"."+t.x,serieId:e.id,value:n,data:t})})});var p=Array.from(c),h=function(e){var t=e.width,n=e.height,r=e.rows,o=e.columns,i=t,a=n,s=0,l=0;if(e.forceSquare){var c=Math.max(t/o,0),u=Math.max(n/r,0),d=Math.min(c,u);s=(t-(i=d*o))/2,l=(n-(a=d*r))/2}return{offsetX:s,offsetY:l,width:i,height:a}}({width:n,height:r,columns:p.length,rows:u.length,forceSquare:l}),m=h.width,g=h.height,b=h.offsetX,y=h.offsetY,v=fP(NC().domain(p).range([0,m]).paddingOuter(i).paddingInner(o)),x=fP(NC().domain(u).range([0,g]).paddingOuter(s).paddingInner(a)),w=v.bandwidth(),S=x.bandwidth(),k=f.map(function(e){return i_({},e,{x:v(e.data.x)+w/2,y:x(e.serieId)+S/2,width:w,height:S})});return{width:m,height:g,offsetX:b,offsetY:y,xScale:v,yScale:x,minValue:Math.min.apply(Math,d),maxValue:Math.max.apply(Math,d),cells:k}}),c_=function(e){return{x:e.x,y:e.y}},u_=function(e){return{size:Math.max(e.width,e.height),width:e.width,height:e.height}},d_={cell:function(e,t){return e.id===t.id},row:function(e,t){return e.serieId===t.serieId},column:function(e,t){return e.data.x===t.data.x},rowColumn:function(e,t){return e.serieId===t.serieId||e.data.x===t.data.x}},f_=function(e){var t=e.data,n=e.valueFormat,r=e.width,o=e.height,i=e.xOuterPadding,a=void 0===i?a_.xOuterPadding:i,s=e.xInnerPadding,l=void 0===s?a_.xInnerPadding:s,c=e.yOuterPadding,u=void 0===c?a_.yOuterPadding:c,d=e.yInnerPadding,f=void 0===d?a_.yInnerPadding:d,p=e.forceSquare,h=void 0===p?a_.forceSquare:p,m=e.sizeVariation,g=void 0===m?a_.sizeVariation:m,b=e.colors,y=void 0===b?a_.colors:b,v=e.emptyColor,x=void 0===v?a_.emptyColor:v,w=e.opacity,S=void 0===w?a_.opacity:w,k=e.activeOpacity,C=void 0===k?a_.activeOpacity:k,M=e.inactiveOpacity,P=void 0===M?a_.inactiveOpacity:M,T=e.borderColor,O=void 0===T?a_.borderColor:T,j=e.label,_=void 0===j?a_.label:j,D=e.labelTextColor,E=void 0===D?a_.labelTextColor:D,R=e.hoverTarget,A=void 0===R?a_.hoverTarget:R,I=(0,G.useState)(null),F=I[0],L=I[1],N=function(e){var t=e.data,n=e.width,r=e.height,o=e.xInnerPadding,i=e.xOuterPadding,a=e.yInnerPadding,s=e.yOuterPadding,l=e.forceSquare;return(0,G.useMemo)(function(){return l_({data:t,width:n,height:r,xInnerPadding:o,xOuterPadding:i,yInnerPadding:a,yOuterPadding:s,forceSquare:l})},[t,n,r,o,i,a,s,l])}({data:t,width:r,height:o,xOuterPadding:a,xInnerPadding:l,yOuterPadding:u,yInnerPadding:f,forceSquare:h}),z=N.width,$=N.height,V=N.offsetX,B=N.offsetY,W=N.cells,H=N.xScale,q=N.yScale,Y=N.minValue,U=N.maxValue,X=(0,G.useMemo)(function(){if(!F)return[];var e=d_[A];return W.filter(function(t){return e(t,F)}).map(function(e){return e.id})},[W,F,A]),Q=function(e){var t,n,r,o=e.cells,i=e.minValue,a=e.maxValue,s=e.sizeVariation,l=e.colors,c=e.emptyColor,u=e.opacity,d=e.activeOpacity,f=e.inactiveOpacity,p=e.borderColor,h=e.label,m=e.labelTextColor,g=e.valueFormat,b=e.activeIds,y=(0,G.useMemo)(function(){return function(e,t,n){if(!e)return function(){return 1};var r=LC().domain(e.values?e.values:[t,n]).range(e.sizes);return function(e){return null===e?1:r(e)}}(t,n,r)},[t=s,n=i,r=a]),v=(0,G.useMemo)(function(){return"function"==typeof l?null:ST(l,{min:i,max:a})},[l,i,a]),x=(0,G.useCallback)(function(e){if(null!==e.value){if("function"==typeof l)return l(e);if(null!==v)return v(e.value)}return c},[l,v,c]),w=Ck(),S=wT(p,w),k=wT(m,w),C=xk(g),M=Kk(h);return{cells:(0,G.useMemo)(function(){return o.map(function(e){var t=u;b.length>0&&(t=b.includes(e.id)?d:f);var n=y(e.value),r=i_({},e,{width:e.width*n,height:e.height*n,formattedValue:null!==e.value?C(e.value):null,opacity:t});return r.label=M(r),r.color=x(r),r.borderColor=S(r),r.labelTextColor=k(r),r})},[o,y,x,S,k,C,M,b,u,d,f]),colorScale:v}}({cells:W,minValue:Y,maxValue:U,sizeVariation:g,colors:y,emptyColor:x,opacity:S,activeOpacity:C,inactiveOpacity:P,borderColor:O,label:_,labelTextColor:E,valueFormat:n,activeIds:X});return{width:z,height:$,offsetX:V,offsetY:B,cells:Q.cells,xScale:H,yScale:q,colorScale:Q.colorScale,activeCell:F,setActiveCell:L}},p_=(0,G.memo)(function(e){var t=e.cell,n=e.borderWidth,r=e.borderRadius,o=e.animatedProps,i=e.onMouseEnter,a=e.onMouseMove,s=e.onMouseLeave,l=e.onClick,c=e.enableLabels,u=Ck(),d=(0,G.useMemo)(function(){return{onMouseEnter:i?i(t):void 0,onMouseMove:a?a(t):void 0,onMouseLeave:s?s(t):void 0,onClick:l?l(t):void 0}},[t,i,a,s,l]);return(0,le.jsxs)(Dg.g,i_({"data-testid":"cell."+t.id,style:{cursor:"pointer"},opacity:o.opacity},d,{transform:bg([o.x,o.y,o.scale],function(e,t,n){return"translate("+e+", "+t+") scale("+n+")"}),children:[(0,le.jsx)(Dg.rect,{transform:bg([o.width,o.height],function(e,t){return"translate("+-.5*e+", "+-.5*t+")"}),fill:o.color,width:o.width,height:o.height,stroke:o.borderColor,strokeWidth:n,rx:r,ry:r},t.id),c&&(0,le.jsx)(Dg.text,{textAnchor:"middle",dominantBaseline:"central",fill:o.labelTextColor,style:i_({},u.labels.text,{fill:void 0,userSelect:"none"}),children:t.label})]}))}),h_=(0,G.memo)(function(e){var t=e.cell,n=e.borderWidth,r=e.animatedProps,o=e.onMouseEnter,i=e.onMouseMove,a=e.onMouseLeave,s=e.onClick,l=e.enableLabels,c=Ck(),u=(0,G.useMemo)(function(){return{onMouseEnter:o?o(t):void 0,onMouseMove:i?i(t):void 0,onMouseLeave:a?a(t):void 0,onClick:s?s(t):void 0}},[t,o,i,a,s]);return(0,le.jsxs)(Dg.g,i_({"data-testid":"cell."+t.id,style:{cursor:"pointer"},opacity:r.opacity},u,{transform:bg([r.x,r.y],function(e,t){return"translate("+e+", "+t+")"}),children:[(0,le.jsx)(Dg.circle,{r:bg([r.width,r.height],function(e,t){return Math.min(e,t)/2}),fill:r.color,fillOpacity:r.opacity,strokeWidth:n,stroke:r.borderColor}),l&&(0,le.jsx)(Dg.text,{dominantBaseline:"central",textAnchor:"middle",fill:r.labelTextColor,style:i_({},c.labels.text,{fill:void 0}),children:t.label})]}))}),m_=function(e){return{x:e.x,y:e.y,width:e.width,height:e.height,color:e.color,opacity:0,borderColor:e.borderColor,labelTextColor:e.labelTextColor,scale:0}},g_=function(e){return{x:e.x,y:e.y,width:e.width,height:e.height,color:e.color,opacity:e.opacity,borderColor:e.borderColor,labelTextColor:e.labelTextColor,scale:1}},b_=function(e){return{x:e.x,y:e.y,width:e.width,height:e.height,color:e.color,opacity:0,borderColor:e.borderColor,labelTextColor:e.labelTextColor,scale:0}},y_=function(e){var t,n=e.cells,r=e.cellComponent,o=e.borderRadius,i=e.borderWidth,a=e.isInteractive,s=e.setActiveCell,l=e.onMouseEnter,c=e.onMouseMove,u=e.onMouseLeave,d=e.onClick,f=e.tooltip,p=e.enableLabels,h=lk(),m=h.animate,g=h.config,b=dg(n,{keys:function(e){return e.id},initial:g_,from:m_,enter:g_,update:g_,leave:b_,config:g,immediate:!m}),y=qg(),v=y.showTooltipFromEvent,x=y.hideTooltip,w=(0,G.useMemo)(function(){if(a)return function(e){return function(t){v((0,G.createElement)(f,{cell:e}),t),s(e),null==l||l(e,t)}}},[a,v,f,s,l]),S=(0,G.useMemo)(function(){if(a)return function(e){return function(t){v((0,G.createElement)(f,{cell:e}),t),null==c||c(e,t)}}},[a,v,f,c]),k=(0,G.useMemo)(function(){if(a)return function(e){return function(t){x(),s(null),null==u||u(e,t)}}},[a,x,s,u]),C=(0,G.useMemo)(function(){if(a)return function(e){return function(t){null==d||d(e,t)}}},[a,d]);return t="rect"===r?p_:"circle"===r?h_:r,(0,le.jsx)(le.Fragment,{children:b(function(e,n){return(0,G.createElement)(t,{cell:n,borderRadius:o,borderWidth:i,animatedProps:e,enableLabels:p,onMouseEnter:w,onMouseMove:S,onMouseLeave:k,onClick:C})})})},v_=function(e){var t=function(e,t){return XP({data:e,annotations:t,getPosition:c_,getDimensions:u_})}(e.cells,e.annotations);return(0,le.jsx)(le.Fragment,{children:t.map(function(e,t){return(0,le.jsx)(tT,i_({},e),t)})})},x_=["isInteractive","animate","motionConfig","theme","renderWrapper"],w_=function(e){var t=e.data,n=e.layers,r=void 0===n?s_.layers:n,o=e.valueFormat,i=e.width,a=e.height,s=e.margin,l=e.forceSquare,c=void 0===l?s_.forceSquare:l,u=e.xInnerPadding,d=void 0===u?s_.xInnerPadding:u,f=e.xOuterPadding,p=void 0===f?s_.xOuterPadding:f,h=e.yInnerPadding,m=void 0===h?s_.yInnerPadding:h,g=e.yOuterPadding,b=void 0===g?s_.yOuterPadding:g,y=e.sizeVariation,v=void 0===y?s_.sizeVariation:y,x=e.cellComponent,w=void 0===x?s_.cellComponent:x,S=e.opacity,k=void 0===S?s_.opacity:S,C=e.activeOpacity,M=void 0===C?s_.activeOpacity:C,P=e.inactiveOpacity,T=void 0===P?s_.inactiveOpacity:P,O=e.borderRadius,j=void 0===O?s_.borderRadius:O,_=e.borderWidth,D=void 0===_?s_.borderWidth:_,E=e.borderColor,R=void 0===E?s_.borderColor:E,A=e.enableGridX,I=void 0===A?s_.enableGridX:A,F=e.enableGridY,L=void 0===F?s_.enableGridY:F,N=e.axisTop,z=void 0===N?s_.axisTop:N,$=e.axisRight,V=void 0===$?s_.axisRight:$,B=e.axisBottom,W=void 0===B?s_.axisBottom:B,H=e.axisLeft,q=void 0===H?s_.axisLeft:H,Y=e.enableLabels,U=void 0===Y?s_.enableLabels:Y,X=e.label,Q=void 0===X?s_.label:X,K=e.labelTextColor,Z=void 0===K?s_.labelTextColor:K,J=e.colors,ee=void 0===J?s_.colors:J,te=e.emptyColor,ne=void 0===te?s_.emptyColor:te,re=e.legends,oe=void 0===re?s_.legends:re,ie=e.annotations,ae=void 0===ie?s_.annotations:ie,se=e.isInteractive,ce=void 0===se?s_.isInteractive:se,ue=e.onMouseEnter,de=e.onMouseMove,fe=e.onMouseLeave,pe=e.onClick,he=e.hoverTarget,me=void 0===he?s_.hoverTarget:he,ge=e.tooltip,be=void 0===ge?s_.tooltip:ge,ye=e.role,ve=e.ariaLabel,xe=e.ariaLabelledBy,we=e.ariaDescribedBy,Se=bk(i,a,s),ke=Se.margin,Ce=Se.innerWidth,Me=Se.innerHeight,Pe=Se.outerWidth,Te=Se.outerHeight,Oe=f_({data:t,valueFormat:o,width:Ce,height:Me,forceSquare:c,xInnerPadding:d,xOuterPadding:p,yInnerPadding:m,yOuterPadding:b,sizeVariation:v,colors:ee,emptyColor:ne,opacity:k,activeOpacity:M,inactiveOpacity:T,borderColor:R,label:Q,labelTextColor:Z,hoverTarget:me}),je=Oe.width,_e=Oe.height,De=Oe.offsetX,Ee=Oe.offsetY,Re=Oe.xScale,Ae=Oe.yScale,Ie=Oe.cells,Fe=Oe.colorScale,Le=Oe.activeCell,Ne=Oe.setActiveCell,ze=(0,G.useMemo)(function(){return i_({},ke,{top:ke.top+Ee,left:ke.left+De})},[ke,De,Ee]),$e={grid:null,axes:null,cells:null,legends:null,annotations:null};r.includes("grid")&&($e.grid=(0,le.jsx)(NP,{width:je,height:_e,xScale:I?Re:null,yScale:L?Ae:null},"grid")),r.includes("axes")&&($e.axes=(0,le.jsx)(IP,{xScale:Re,yScale:Ae,width:je,height:_e,top:z,right:V,bottom:W,left:q},"axes")),r.includes("cells")&&($e.cells=(0,le.jsx)(G.Fragment,{children:(0,le.jsx)(y_,{cells:Ie,cellComponent:w,borderRadius:j,borderWidth:D,isInteractive:ce,setActiveCell:Ne,onMouseEnter:ue,onMouseMove:de,onMouseLeave:fe,onClick:pe,tooltip:be,enableLabels:U})},"cells")),r.includes("legends")&&null!==Fe&&($e.legends=(0,le.jsx)(G.Fragment,{children:oe.map(function(e,t){return(0,G.createElement)(ET,i_({},e,{key:t,containerWidth:je,containerHeight:_e,scale:Fe}))})},"legends")),r.includes("annotations")&&ae.length>0&&($e.annotations=(0,le.jsx)(v_,{cells:Ie,annotations:ae},"annotations"));var Ve={cells:Ie,activeCell:Le,setActiveCell:Ne};return(0,le.jsx)(Wk,{width:Pe,height:Te,margin:Object.assign({},ze,{top:ze.top,left:ze.left}),role:ye,ariaLabel:ve,ariaLabelledBy:xe,ariaDescribedBy:we,children:r.map(function(e,t){var n;return"function"==typeof e?(0,le.jsx)(G.Fragment,{children:(0,G.createElement)(e,Ve)},t):null!=(n=null==$e?void 0:$e[e])?n:null})})},S_=function(e){var t=e.isInteractive,n=void 0===t?s_.isInteractive:t,r=e.animate,o=void 0===r?s_.animate:r,i=e.motionConfig,a=void 0===i?s_.motionConfig:i,s=e.theme,l=e.renderWrapper,c=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,x_);return(0,le.jsx)(jk,{animate:o,isInteractive:n,motionConfig:a,renderWrapper:l,theme:s,children:(0,le.jsx)(w_,i_({isInteractive:n},c))})},k_=function(e){return(0,le.jsx)(_k,{children:function(t){var n=t.width,r=t.height;return(0,le.jsx)(S_,i_({width:n,height:r},e))}})},C_=function(e){var t=e.data,n=e.chartConfig,r=e.keys,o=e.indexes,i=e.annotation;if(!t||0===t.length)return(0,le.jsx)("div",{children:"Error: no data provided"});var a=n.xAxisLabel,s=n.yAxisLabel,l=n.theme,c=n.minValue,u=n.maxValue,d=function(e,t,n,r){return{transformedData:DO(t,n,e).map(function(e){return{id:e[n[0]],data:t.map(function(t){var n;return{x:r.measures[t]?r.measures[t].title:t,y:null!==(n=e[t])&&void 0!==n?n:null}})}})}}(t,r,o,i),f=d.transformedData,p=jO({theme:l,minValue:c,maxValue:u});return(0,le.jsx)("div",{className:"dashboard-chart-container",children:(0,le.jsx)("div",{className:"dashboard-chart",role:"graphics-datachart",children:(0,le.jsx)(k_,{"test-id":"heatmap",data:f,margin:{top:30,right:90,bottom:50,left:90},valueFormat:">-.2s",axisRight:{tickSize:2,tickPadding:5,tickRotation:0,legend:s,legendPosition:"middle",legendOffset:70,truncateTickAt:0,renderTick:function(e){return(0,le.jsx)(IO,{x:e.x+2,y:e.y-7,value:e.value,textAnchor:"start"})}},axisLeft:{tickSize:2,tickPadding:5,tickRotation:0,legend:s,legendPosition:"middle",legendOffset:-70,truncateTickAt:0,renderTick:function(e){return(0,le.jsx)(IO,{x:e.x-2,y:e.y-7,value:e.value,textAnchor:"end"})}},colors:p,emptyColor:"#555555",opacity:10,legends:[{anchor:"bottom",translateX:0,translateY:30,length:400,thickness:8,direction:"row",tickPosition:"after",tickSize:3,tickSpacing:4,tickOverlap:!1,tickFormat:">-.2s",title:a+" Value →",titleAlign:"start",titleOffset:4}],onClick:function(e){return console.log(e)}},l)})})};function M_(){return M_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},M_.apply(this,arguments)}var P_={pointerEvents:"none"},T_=function(e){var t=e.label,n=e.style,r=Ck();return(0,le.jsx)(Dg.g,{transform:n.transform,opacity:n.progress,style:P_,children:(0,le.jsx)(Dg.text,{textAnchor:"middle",dominantBaseline:"central",style:M_({},r.labels.text,{fill:n.textColor}),children:t})})},O_=function(e,t,n,r,o){return["A",e,e,0,t,n,r,o].join(" ")},j_={startAngle:{enter:function(e){return M_({},e,{endAngle:e.startAngle})},update:function(e){return e},leave:function(e){return M_({},e,{startAngle:e.endAngle})}},middleAngle:{enter:function(e){var t=e.startAngle+(e.endAngle-e.startAngle)/2;return M_({},e,{startAngle:t,endAngle:t})},update:function(e){return e},leave:function(e){var t=e.startAngle+(e.endAngle-e.startAngle)/2;return M_({},e,{startAngle:t,endAngle:t})}},endAngle:{enter:function(e){return M_({},e,{startAngle:e.endAngle})},update:function(e){return e},leave:function(e){return M_({},e,{endAngle:e.startAngle})}},innerRadius:{enter:function(e){return M_({},e,{outerRadius:e.innerRadius})},update:function(e){return e},leave:function(e){return M_({},e,{innerRadius:e.outerRadius})}},centerRadius:{enter:function(e){var t=e.innerRadius+(e.outerRadius-e.innerRadius)/2;return M_({},e,{innerRadius:t,outerRadius:t})},update:function(e){return e},leave:function(e){var t=e.innerRadius+(e.outerRadius-e.innerRadius)/2;return M_({},e,{innerRadius:t,outerRadius:t})}},outerRadius:{enter:function(e){return M_({},e,{innerRadius:e.outerRadius})},update:function(e){return e},leave:function(e){return M_({},e,{outerRadius:e.innerRadius})}},pushIn:{enter:function(e){return M_({},e,{innerRadius:e.innerRadius-e.outerRadius+e.innerRadius,outerRadius:e.innerRadius})},update:function(e){return e},leave:function(e){return M_({},e,{innerRadius:e.outerRadius,outerRadius:e.outerRadius+e.outerRadius-e.innerRadius})}},pushOut:{enter:function(e){return M_({},e,{innerRadius:e.outerRadius,outerRadius:e.outerRadius+e.outerRadius-e.innerRadius})},update:function(e){return e},leave:function(e){return M_({},e,{innerRadius:e.innerRadius-e.outerRadius+e.innerRadius,outerRadius:e.innerRadius})}}},__=function(e,t){return(0,G.useMemo)(function(){var n=j_[e];return{enter:function(e){return M_({progress:0},n.enter(e.arc),t?t.enter(e):{})},update:function(e){return M_({progress:1},n.update(e.arc),t?t.update(e):{})},leave:function(e){return M_({progress:0},n.leave(e.arc),t?t.leave(e):{})}}},[e,t])},D_=function(e){return function(t,n,r,o){return bg([t,n,r,o],function(t,n,r,o){var i=function(e,t){var n=function(e){return e.startAngle+(e.endAngle-e.startAngle)/2}(e)-Math.PI/2,r=e.innerRadius+(e.outerRadius-e.innerRadius)*t;return Fk(n,r)}({startAngle:t,endAngle:n,innerRadius:r,outerRadius:o},e);return"translate("+i.x+","+i.y+")"})}},E_=function(e){var t=e.center,n=e.data,r=e.transitionMode,o=e.label,i=e.radiusOffset,a=e.skipAngle,s=e.skipRadius,l=e.textColor,c=e.component,u=void 0===c?T_:c,d=Kk(o),f=Ck(),p=wT(l,f),h=(0,G.useMemo)(function(){return n.filter(function(e){var t=Math.abs(Ik(e.arc.endAngle-e.arc.startAngle)),n=Math.abs(e.arc.outerRadius-e.arc.innerRadius);return t>=a&&n>=s})},[n,a,s]),m=function(e,t,n){void 0===t&&(t=.5),void 0===n&&(n="innerRadius");var r=lk(),o=r.animate,i=r.config,a=__(n,void 0);return{transition:dg(e,{keys:function(e){return e.id},initial:a.update,from:a.enter,enter:a.update,update:a.update,leave:a.leave,config:i,immediate:!o}),interpolate:D_(t)}}(h,i,r),g=m.transition,b=m.interpolate,y=u;return(0,le.jsx)("g",{transform:"translate("+t[0]+","+t[1]+")",children:g(function(e,t){return(0,G.createElement)(y,{key:t.id,datum:t,label:d(t),style:M_({},e,{transform:b(e.startAngle,e.endAngle,e.innerRadius,e.outerRadius),textColor:p(t)})})})})},R_=(qO().x(function(e){return e.x}).y(function(e){return e.y}),["animated"]),A_=function(e){var t=e.animated,n=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,R_);return(0,le.jsx)(Dg.path,M_({d:bg([t.radius,t.startAngle,t.endAngle],function(e,t,n){return function(e,t,n){var r=Math.min(t,n),o=Math.max(t,n),i=Fk(Ak(o),e),a=Fk(Ak(r),e);if(o-r>=360){var s=Fk(Ak(r+180),e);return["M "+i.x+" "+i.y,O_(e,1,1,s.x,s.y),"M "+i.x+" "+i.y,O_(e,1,0,s.x,s.y)].join(" ")}var l=o-r<=180?0:1;return["M "+i.x+" "+i.y,O_(e,l,0,a.x,a.y)].join(" ")}(e,t,n)})},n))},I_=function(e){var t=e.datum,n=e.style,r=e.onClick,o=e.onMouseEnter,i=e.onMouseMove,a=e.onMouseLeave,s=(0,G.useCallback)(function(e){return null==r?void 0:r(t,e)},[r,t]),l=(0,G.useCallback)(function(e){return null==o?void 0:o(t,e)},[o,t]),c=(0,G.useCallback)(function(e){return null==i?void 0:i(t,e)},[i,t]),u=(0,G.useCallback)(function(e){return null==a?void 0:a(t,e)},[a,t]);return(0,le.jsx)(Dg.path,{d:n.path,opacity:n.opacity,fill:t.fill||n.color,stroke:n.borderColor,strokeWidth:n.borderWidth,onClick:r?s:void 0,onMouseEnter:o?l:void 0,onMouseMove:i?c:void 0,onMouseLeave:a?u:void 0,"data-testid":"arc."+t.id})},F_=function(e,t,n,r,o){return bg([e,t,n,r],function(e,t,n,r){return o({startAngle:e,endAngle:t,innerRadius:Math.max(0,n),outerRadius:Math.max(0,r)})})},L_=function(e){var t=e.center,n=e.data,r=e.arcGenerator,o=e.borderWidth,i=e.borderColor,a=e.onClick,s=e.onMouseEnter,l=e.onMouseMove,c=e.onMouseLeave,u=e.transitionMode,d=e.component,f=void 0===d?I_:d,p=Ck(),h=wT(i,p),m=function(e,t,n){void 0===t&&(t="innerRadius");var r=lk(),o=r.animate,i=r.config,a=__(t,n);return{transition:dg(e,{keys:function(e){return e.id},initial:a.update,from:a.enter,enter:a.update,update:a.update,leave:a.leave,config:i,immediate:!o}),interpolate:F_}}(n,u,{enter:function(e){return{opacity:0,color:e.color,borderColor:h(e)}},update:function(e){return{opacity:1,color:e.color,borderColor:h(e)}},leave:function(e){return{opacity:0,color:e.color,borderColor:h(e)}}}),g=m.transition,b=m.interpolate,y=f;return(0,le.jsx)("g",{transform:"translate("+t[0]+","+t[1]+")",children:g(function(e,t){return(0,G.createElement)(y,{key:t.id,datum:t,style:M_({},e,{borderWidth:o,path:b(e.startAngle,e.endAngle,e.innerRadius,e.outerRadius,r)}),onClick:a,onMouseEnter:s,onMouseMove:l,onMouseLeave:c})})})};function N_(){return N_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},N_.apply(this,arguments)}var z_=function(e){var t=e.label,n=e.animated,r=Ck();return(0,le.jsxs)(Dg.g,{opacity:n.opacity,children:[(0,le.jsx)(Dg.line,{x1:n.x1,y1:n.y1,x2:n.x2,y2:n.y2,style:r.axis.ticks.line}),(0,le.jsx)(Dg.text,{dx:n.textX,dy:n.textY,dominantBaseline:"central",style:r.axis.ticks.text,textAnchor:"middle",children:t})]})},$_=function(e,t,n){var r=Fk(Ak(e),t),o=Fk(Ak(e),n);return{x1:r.x,y1:r.y,x2:o.x,y2:o.y}},V_=function(e,t){var n=Fk(Ak(e),t);return{textX:n.x,textY:n.y}},B_=function(e){var t=e.type,n=e.center,r=void 0===n?[0,0]:n,o=e.radius,i=e.startAngle,a=e.endAngle,s=e.scale,l=e.tickSize,c=void 0===l?5:l,u=e.tickPadding,d=void 0===u?12:u,f=e.tickComponent,p=void 0===f?z_:f,h=i-90,m=a-90,g=Ck(),b=lk(),y=b.animate,v=b.config,x=ug({radius:o,startAngle:h,endAngle:m,opacity:1,immediate:!y,config:v}),w=(0,G.useMemo)(function(){var e=TP(s),t="bandwidth"in s?kP(s):s;return e.map(function(e,n){return{key:n,label:e,angle:t(e)-90}})},[s]),S="inner"===t?o-c:o+c,k="inner"===t?S-d:S+d,C=dg(w,{keys:function(e){return e.key},initial:function(e){return N_({},$_(e.angle,o,S),V_(e.angle,k),{opacity:1})},from:function(e){return N_({},$_(e.angle,o,S),V_(e.angle,k),{opacity:0})},enter:function(e){return N_({},$_(e.angle,o,S),V_(e.angle,k),{opacity:1})},update:function(e){return N_({},$_(e.angle,o,S),V_(e.angle,k),{opacity:1})},leave:function(e){return N_({},$_(e.angle,o,S),V_(e.angle,k),{opacity:0})},immediate:!y,config:v});return(0,le.jsxs)("g",{transform:"translate("+r[0]+", "+r[1]+")",style:{pointerEvents:"none"},children:[(0,le.jsx)(A_,N_({animated:x},g.axis.domain.line,{fill:"none"})),C(function(e,t){return(0,G.createElement)(p,{key:t.key,label:t.label,animated:e})})]})},W_=function(e){var t=e.scale,n=e.innerRadius,r=e.outerRadius,o=Ck(),i=(0,G.useMemo)(function(){return TP(t).map(function(e,n){return{id:n,angle:t(e)-90}})},[t]),a=lk(),s=a.animate,l=dg(i,{keys:function(e){return e.id},initial:function(e){return{angle:e.angle,opacity:1}},from:function(e){return{angle:e.angle,opacity:0}},enter:function(e){return{angle:e.angle,opacity:1}},update:function(e){return{angle:e.angle,opacity:1}},leave:function(e){return{angle:e.angle,opacity:0}},config:a.config,immediate:!s});return(0,le.jsx)(le.Fragment,{children:l(function(e,t){return(0,le.jsx)(Dg.g,{transform:e.angle.to(function(e){return"rotate("+e+")"}),opacity:e.opacity,children:(0,le.jsx)("line",N_({x1:n,x2:r},o.grid.line))},t.id)})})},H_=function(e){var t=e.scale,n=e.ticks,r=e.startAngle,o=e.endAngle,i=Ck(),a=r-90,s=o-90,l=(0,G.useMemo)(function(){return TP(t,n).map(function(e,n){var r=t(e);return"bandwidth"in t&&(r+=t.bandwidth()/2),{id:n,radius:r}})},[t]),c=lk(),u=c.animate,d=dg(l,{keys:function(e){return e.id},initial:function(e){return{radius:e.radius,startAngle:a,endAngle:s,opacity:1}},from:function(e){return{radius:e.radius,startAngle:a,endAngle:s,opacity:0}},enter:function(e){return{radius:e.radius,startAngle:a,endAngle:s,opacity:1}},update:function(e){return{radius:e.radius,startAngle:a,endAngle:s,opacity:1}},leave:function(e){return{radius:e.radius,startAngle:a,endAngle:s,opacity:0}},config:c.config,immediate:!u});return(0,le.jsx)(le.Fragment,{children:d(function(e,t){return(0,le.jsx)(A_,N_({animated:e},i.grid.line,{strokeOpacity:e.opacity,fill:"none"}),t.id)})})},q_=function(e){var t=e.center,n=e.enableRadialGrid,r=e.angleScale,o=e.startAngle,i=e.endAngle,a=e.enableCircularGrid,s=e.radiusScale,l=e.circularGridTicks,c=Math.min.apply(Math,s.range()),u=Math.max.apply(Math,s.range());return(0,le.jsxs)("g",{transform:"translate("+t[0]+","+t[1]+")",children:[n&&(0,le.jsx)(W_,{scale:r,innerRadius:c,outerRadius:u}),a&&(0,le.jsx)(H_,{scale:s,ticks:l,startAngle:o,endAngle:i})]})},Y_=function(e){var t=e.label,n=e.textAnchor,r=e.animated,o=Ck(),i=o.axis.ticks.text,a=Pk(i);return(0,le.jsxs)(Dg.g,{opacity:r.opacity,transform:bg([r.y,r.rotation],function(e,t){return"translate("+e+", 0) rotate("+t+")"}),children:[(0,le.jsx)(Dg.line,{x2:r.length,style:o.axis.ticks.line}),i.outlineWidth>0&&(0,le.jsx)(Dg.text,{dx:r.textX,textAnchor:n,dominantBaseline:"central",style:a,strokeWidth:2*i.outlineWidth,stroke:i.outlineColor,strokeLinejoin:"round",opacity:i.outlineOpacity,children:t}),(0,le.jsx)(Dg.text,{dx:r.textX,textAnchor:n,dominantBaseline:"central",style:a,children:t})]})},U_=function(e){var t,n,r,o,i,a=e.ticksPosition,s=e.center,l=e.angle,c=e.scale,u=e.ticks,d=e.tickSize,f=void 0===d?5:d,p=e.tickPadding,h=void 0===p?5:p,m=e.tickRotation,g=void 0===m?0:m,b=e.tickComponent,y=void 0===b?Y_:b,v=(i=l)<0?360- -i%360:i%360;"before"===a?(o=90+g,v<=90?(r=(n=-f)-h,t="end"):v<270?(r=(n=f)+h,t="start",o-=180):(r=(n=-f)-h,t="end")):(o=90+g,v<90?(r=(n=f)+h,t="start"):v<270?(r=(n=-f)-h,t="end",o-=180):(r=(n=f)+h,t="start"));var x=(0,G.useMemo)(function(){return TP(c,u).map(function(e,t){var n=c(e);return"bandwidth"in c&&(n+=c.bandwidth()/2),{key:t,label:e,position:n}})},[c,u]),w=lk(),S=w.animate,k=w.config,C=ug({rotation:l-90,immediate:!S,config:k}),M=dg(x,{keys:function(e){return e.key},initial:function(e){return{y:e.position,textX:r,rotation:o,length:n,opacity:1}},from:function(e){return{y:e.position,textX:r,rotation:o,length:n,opacity:0}},enter:function(e){return{y:e.position,textX:r,rotation:o,length:n,opacity:1}},update:function(e){return{y:e.position,textX:r,rotation:o,length:n,opacity:1}},leave:function(e){return{y:e.position,textX:r,rotation:o,length:n,opacity:0}},immediate:!S,config:k});return(0,le.jsx)("g",{transform:"translate("+s[0]+", "+s[1]+")",style:{pointerEvents:"none"},children:(0,le.jsx)(Dg.g,{transform:C.rotation.to(function(e){return"rotate("+e+")"}),children:M(function(e,i){return(0,G.createElement)(y,{key:i.key,label:i.label,y:i.position,textX:r,rotation:o,length:n,textAnchor:t,animated:e})})})})};function G_(e){return e.innerRadius}function X_(e){return e.outerRadius}function Q_(e){return e.startAngle}function K_(e){return e.endAngle}function Z_(e){return e&&e.padAngle}function J_(e,t,n,r,o,i,a){var s=e-n,l=t-r,c=(a?i:-i)/kb(s*s+l*l),u=c*l,d=-c*s,f=e+u,p=t+d,h=n+u,m=r+d,g=(f+h)/2,b=(p+m)/2,y=h-f,v=m-p,x=y*y+v*v,w=o-i,S=f*m-h*p,k=(v<0?-1:1)*kb(xb(0,w*w*x-S*S)),C=(S*v-y*k)/x,M=(-S*y-v*k)/x,P=(S*v+y*k)/x,T=(-S*y+v*k)/x,O=C-g,j=M-b,_=P-g,D=T-b;return O*O+j*j>_*_+D*D&&(C=P,M=T),{cx:C,cy:M,x01:-u,y01:-d,x11:C*(o/w-1),y11:M*(o/w-1)}}function eD(){return eD=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},eD.apply(this,arguments)}var tD={maxValue:"auto",layers:["grid","tracks","bars","labels","legends"],startAngle:0,endAngle:270,innerRadius:.3,padding:.2,padAngle:0,cornerRadius:0,enableTracks:!0,tracksColor:"rgba(0, 0, 0, .15)",enableRadialGrid:!0,enableCircularGrid:!0,radialAxisStart:{},radialAxisEnd:null,circularAxisInner:null,circularAxisOuter:{},colors:{scheme:"nivo"},borderWidth:0,borderColor:{from:"color",modifiers:[["darker",1]]},enableLabels:!1,label:"formattedValue",labelsSkipAngle:10,labelsSkipRadius:0,labelsRadiusOffset:.5,labelsTextColor:{theme:"labels.text.fill"},isInteractive:!0,tooltip:function(e){var t=e.bar;return(0,le.jsx)(Lg,{enableChip:!0,id:(0,le.jsxs)("span",{children:[t.category," - ",t.groupId]}),value:t.formattedValue,color:t.color})},legends:[],defs:[],fill:[],animate:!0,motionConfig:"gentle",transitionMode:"centerRadius",renderWrapper:!0},nD=eD({},tD),rD=function(e){var t=e.center,n=e.bars,r=e.borderWidth,o=e.borderColor,i=e.arcGenerator,a=e.isInteractive,s=e.tooltip,l=e.onClick,c=e.onMouseEnter,u=e.onMouseMove,d=e.onMouseLeave,f=e.transitionMode,p=qg(),h=p.showTooltipFromEvent,m=p.hideTooltip,g=(0,G.useCallback)(function(e,t){null==l||l(e,t)},[l]),b=(0,G.useCallback)(function(e,t){h((0,G.createElement)(s,{bar:e}),t),null==c||c(e,t)},[h,s,c]),y=(0,G.useCallback)(function(e,t){h((0,G.createElement)(s,{bar:e}),t),null==u||u(e,t)},[h,s,u]),v=(0,G.useCallback)(function(e,t){m(),null==d||d(e,t)},[m,d]);return(0,le.jsx)(L_,{center:t,data:n,arcGenerator:i,borderWidth:r,borderColor:o,transitionMode:f,onClick:a?g:void 0,onMouseEnter:a?b:void 0,onMouseMove:a?y:void 0,onMouseLeave:a?v:void 0})},oD=function(e){var t=e.center,n=e.tracks,r=e.arcGenerator,o=e.transitionMode;return(0,le.jsx)(L_,{center:t,data:n,arcGenerator:r,borderWidth:0,borderColor:"none",transitionMode:o})},iD=["isInteractive","animate","motionConfig","theme","renderWrapper"],aD=function(e){var t=e.data,n=e.maxValue,r=void 0===n?nD.maxValue:n,o=e.valueFormat,i=e.startAngle,a=void 0===i?nD.startAngle:i,s=e.endAngle,l=void 0===s?nD.endAngle:s,c=e.innerRadius,u=void 0===c?nD.innerRadius:c,d=e.padding,f=void 0===d?nD.padding:d,p=e.padAngle,h=void 0===p?nD.padAngle:p,m=e.cornerRadius,g=void 0===m?nD.cornerRadius:m,b=e.width,y=e.height,v=e.margin,x=e.layers,w=void 0===x?nD.layers:x,S=e.enableTracks,k=void 0===S?nD.enableTracks:S,C=e.tracksColor,M=void 0===C?nD.tracksColor:C,P=e.enableRadialGrid,T=void 0===P?nD.enableRadialGrid:P,O=e.enableCircularGrid,j=void 0===O?nD.enableCircularGrid:O,_=e.radialAxisStart,D=void 0===_?nD.radialAxisStart:_,E=e.radialAxisEnd,R=void 0===E?nD.radialAxisEnd:E,A=e.circularAxisInner,I=void 0===A?nD.circularAxisInner:A,F=e.circularAxisOuter,L=void 0===F?nD.circularAxisOuter:F,N=e.colors,z=void 0===N?nD.colors:N,$=e.defs,V=void 0===$?nD.defs:$,B=e.fill,W=void 0===B?nD.fill:B,H=e.borderWidth,q=void 0===H?nD.borderWidth:H,Y=e.borderColor,U=void 0===Y?nD.borderColor:Y,X=e.enableLabels,Q=void 0===X?nD.enableLabels:X,K=e.label,Z=void 0===K?nD.label:K,J=e.labelsSkipAngle,ee=void 0===J?nD.labelsSkipAngle:J,te=e.labelsSkipRadius,ne=void 0===te?nD.labelsSkipRadius:te,re=e.labelsRadiusOffset,oe=void 0===re?nD.labelsRadiusOffset:re,ie=e.labelsTextColor,ae=void 0===ie?nD.labelsTextColor:ie,se=e.isInteractive,ce=void 0===se?nD.isInteractive:se,ue=e.tooltip,de=void 0===ue?nD.tooltip:ue,fe=e.onClick,pe=e.onMouseEnter,he=e.onMouseMove,me=e.onMouseLeave,ge=e.transitionMode,be=void 0===ge?nD.transitionMode:ge,ye=e.legends,ve=void 0===ye?nD.legends:ye,xe=e.role,we=e.ariaLabel,Se=e.ariaLabelledBy,ke=e.ariaDescribedBy,Ce=bk(b,y,v),Me=Ce.margin,Pe=Ce.innerWidth,Te=Ce.innerHeight,Oe=Ce.outerWidth,je=Ce.outerHeight,_e=function(e,t,n){void 0===n&&(n=360);var r=t;return Math.abs(t-e)>n&&(r=e+(t>e?n:-n)),[e,r]}(a,l),De=_e[0],Ee=_e[1],Re=function(e){var t=e.data,n=e.maxValue,r=void 0===n?nD.maxValue:n,o=e.valueFormat,i=e.startAngle,a=void 0===i?tD.startAngle:i,s=e.endAngle,l=void 0===s?tD.endAngle:s,c=e.innerRadiusRatio,u=void 0===c?tD.innerRadius:c,d=e.padding,f=void 0===d?tD.padding:d,p=e.padAngle,h=void 0===p?tD.padAngle:p,m=e.cornerRadius,g=void 0===m?tD.cornerRadius:m,b=e.width,y=e.height,v=e.colors,x=void 0===v?tD.colors:v,w=e.tracksColor,S=void 0===w?tD.tracksColor:w,k=(0,G.useMemo)(function(){return[b/2,y/2]},[b,y]),C=Math.min.apply(Math,k),M=C*Math.min(u,1),P=kT(x,"category"),T=(0,G.useMemo)(function(){var e={serieIds:[],categories:[],groups:[],maxValue:0};return t.forEach(function(t){e.serieIds.push(t.id);var n=0;t.data.forEach(function(t){e.categories.includes(t.x)||e.categories.push(t.x),n+=t.y}),e.groups.push({id:t.id,total:n,data:t.data})}),e.maxValue="auto"===r?Math.max.apply(Math,e.groups.map(function(e){return e.total})):r,e},[t,r]),O=T.serieIds,j=T.categories,_=T.groups,D=T.maxValue,E=(0,G.useMemo)(function(){return dP(LC().domain([0,D]).range([a,l]))},[D,a,l]),R=(0,G.useMemo)(function(){return fP(NC().domain(O).range([M,C]).padding(f))},[O,C,M,f]),A=(0,G.useMemo)(function(){return function(){var e=G_,t=X_,n=$T(0),r=null,o=Q_,i=K_,a=Z_,s=null,l=BO(c);function c(){var c,u,d,f=+e.apply(this,arguments),p=+t.apply(this,arguments),h=o.apply(this,arguments)-Pb,m=i.apply(this,arguments)-Pb,g=bb(m-h),b=m>h;if(s||(s=c=l()),p<f&&(u=p,p=f,f=u),p>Cb)if(g>Tb-Cb)s.moveTo(p*vb(h),p*Sb(h)),s.arc(0,0,p,h,m,!b),f>Cb&&(s.moveTo(f*vb(m),f*Sb(m)),s.arc(0,0,f,m,h,b));else{var y,v,x=h,w=m,S=h,k=m,C=g,M=g,P=a.apply(this,arguments)/2,T=P>Cb&&(r?+r.apply(this,arguments):kb(f*f+p*p)),O=wb(bb(p-f)/2,+n.apply(this,arguments)),j=O,_=O;if(T>Cb){var D=Ob(T/f*Sb(P)),E=Ob(T/p*Sb(P));(C-=2*D)>Cb?(S+=D*=b?1:-1,k-=D):(C=0,S=k=(h+m)/2),(M-=2*E)>Cb?(x+=E*=b?1:-1,w-=E):(M=0,x=w=(h+m)/2)}var R=p*vb(x),A=p*Sb(x),I=f*vb(k),F=f*Sb(k);if(O>Cb){var L,N=p*vb(w),z=p*Sb(w),$=f*vb(S),V=f*Sb(S);if(g<Mb)if(L=function(e,t,n,r,o,i,a,s){var l=n-e,c=r-t,u=a-o,d=s-i,f=d*l-u*c;if(!(f*f<Cb))return[e+(f=(u*(t-i)-d*(e-o))/f)*l,t+f*c]}(R,A,$,V,N,z,I,F)){var B=R-L[0],W=A-L[1],H=N-L[0],q=z-L[1],Y=1/Sb(((d=(B*H+W*q)/(kb(B*B+W*W)*kb(H*H+q*q)))>1?0:d<-1?Mb:Math.acos(d))/2),U=kb(L[0]*L[0]+L[1]*L[1]);j=wb(O,(f-U)/(Y-1)),_=wb(O,(p-U)/(Y+1))}else j=_=0}M>Cb?_>Cb?(y=J_($,V,R,A,p,_,b),v=J_(N,z,I,F,p,_,b),s.moveTo(y.cx+y.x01,y.cy+y.y01),_<O?s.arc(y.cx,y.cy,_,yb(y.y01,y.x01),yb(v.y01,v.x01),!b):(s.arc(y.cx,y.cy,_,yb(y.y01,y.x01),yb(y.y11,y.x11),!b),s.arc(0,0,p,yb(y.cy+y.y11,y.cx+y.x11),yb(v.cy+v.y11,v.cx+v.x11),!b),s.arc(v.cx,v.cy,_,yb(v.y11,v.x11),yb(v.y01,v.x01),!b))):(s.moveTo(R,A),s.arc(0,0,p,x,w,!b)):s.moveTo(R,A),f>Cb&&C>Cb?j>Cb?(y=J_(I,F,N,z,f,-j,b),v=J_(R,A,$,V,f,-j,b),s.lineTo(y.cx+y.x01,y.cy+y.y01),j<O?s.arc(y.cx,y.cy,j,yb(y.y01,y.x01),yb(v.y01,v.x01),!b):(s.arc(y.cx,y.cy,j,yb(y.y01,y.x01),yb(y.y11,y.x11),!b),s.arc(0,0,f,yb(y.cy+y.y11,y.cx+y.x11),yb(v.cy+v.y11,v.cx+v.x11),b),s.arc(v.cx,v.cy,j,yb(v.y11,v.x11),yb(v.y01,v.x01),!b))):s.arc(0,0,f,k,S,b):s.lineTo(I,F)}else s.moveTo(0,0);if(s.closePath(),c)return s=null,c+""||null}return c.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+o.apply(this,arguments)+ +i.apply(this,arguments))/2-Mb/2;return[vb(r)*n,Sb(r)*n]},c.innerRadius=function(t){return arguments.length?(e="function"==typeof t?t:$T(+t),c):e},c.outerRadius=function(e){return arguments.length?(t="function"==typeof e?e:$T(+e),c):t},c.cornerRadius=function(e){return arguments.length?(n="function"==typeof e?e:$T(+e),c):n},c.padRadius=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:$T(+e),c):r},c.startAngle=function(e){return arguments.length?(o="function"==typeof e?e:$T(+e),c):o},c.endAngle=function(e){return arguments.length?(i="function"==typeof e?e:$T(+e),c):i},c.padAngle=function(e){return arguments.length?(a="function"==typeof e?e:$T(+e),c):a},c.context=function(e){return arguments.length?(s=null==e?null:e,c):s},c}().startAngle(function(e){return e.startAngle}).endAngle(function(e){return e.endAngle}).innerRadius(function(e){return e.innerRadius}).outerRadius(function(e){return e.outerRadius}).cornerRadius(g).padAngle(Ak(h))},[g,h]),I=xk(o),F=(0,G.useMemo)(function(){var e=[];return _.forEach(function(t){var n=0,r=R(t.id),o=r+R.bandwidth();t.data.forEach(function(i){var a=n+i.y,s={id:t.id+"."+i.x,data:i,groupId:t.id,category:i.x,value:i.y,formattedValue:I(i.y),color:"",stackedValue:a,arc:{startAngle:Ak(E(n)),endAngle:Ak(E(a)),innerRadius:r,outerRadius:o}};s.color=P(s),n+=i.y,e.push(s)})}),e},[_,R,E,P,I]),L=Ak(a),N=Ak(l),z=(0,G.useMemo)(function(){return TP(R).map(function(e){var t=R(e);return{id:e,color:S,arc:{startAngle:L,endAngle:N,innerRadius:t,outerRadius:t+R.bandwidth()}}})},[R,L,N,S]),$=(0,G.useMemo)(function(){return j.map(function(e){var t=F.find(function(t){return t.category===e}),n=t?t.color:void 0;return{id:e,label:e,color:n}})},[j,F]),V=(0,G.useMemo)(function(){return{center:k,outerRadius:C,innerRadius:M,bars:F,arcGenerator:A,radiusScale:R,valueScale:E}},[k,C,M,F,A,R,E]);return{center:k,outerRadius:C,innerRadius:M,bars:F,arcGenerator:A,radiusScale:R,valueScale:E,tracks:z,legendData:$,customLayerProps:V}}({data:t,maxValue:r,valueFormat:o,startAngle:De,endAngle:Ee,innerRadiusRatio:u,padding:f,padAngle:h,cornerRadius:g,width:Pe,height:Te,colors:z,tracksColor:M}),Ae=Re.center,Ie=Re.innerRadius,Fe=Re.outerRadius,Le=Re.bars,Ne=Re.arcGenerator,ze=Re.radiusScale,$e=Re.valueScale,Ve=Re.tracks,Be=Re.legendData,We=Re.customLayerProps,He={grid:null,tracks:null,bars:null,labels:null,legends:null};w.includes("grid")&&(He.grid=(0,le.jsxs)(G.Fragment,{children:[(0,le.jsx)(q_,{center:Ae,enableRadialGrid:T,enableCircularGrid:j,angleScale:$e,radiusScale:ze,startAngle:De,endAngle:Ee}),D&&(0,le.jsx)(U_,eD({center:Ae,angle:Math.min(De,Ee),scale:ze,ticksPosition:"before"},D)),R&&(0,le.jsx)(U_,eD({center:Ae,angle:Math.max(De,Ee),scale:ze,ticksPosition:"after"},R)),I&&(0,le.jsx)(B_,eD({type:"inner",center:Ae,radius:Ie,startAngle:De,endAngle:Ee,scale:$e},I)),L&&(0,le.jsx)(B_,eD({type:"outer",center:Ae,radius:Fe,startAngle:De,endAngle:Ee,scale:$e},L))]},"grid")),w.includes("tracks")&&k&&(He.tracks=(0,le.jsx)(oD,{center:Ae,tracks:Ve,arcGenerator:Ne,transitionMode:be},"tracks")),w.includes("bars")&&(He.bars=(0,le.jsx)(rD,{center:Ae,bars:Le,borderWidth:q,borderColor:U,arcGenerator:Ne,isInteractive:ce,tooltip:de,onClick:fe,onMouseEnter:pe,onMouseMove:he,onMouseLeave:me,transitionMode:be},"bars")),w.includes("labels")&&Q&&(He.labels=(0,le.jsx)(E_,{center:Ae,data:Le,label:Z,radiusOffset:oe,skipAngle:ee,skipRadius:ne,textColor:ae,transitionMode:be},"labels")),w.includes("legends")&&ve.length>0&&(He.legends=(0,le.jsx)(G.Fragment,{children:ve.map(function(e,t){return(0,le.jsx)(FT,eD({},e,{containerWidth:Pe,containerHeight:Te,data:Be}),t)})},"legends"));var qe=nC(V,Le,W,{dataKey:"data",targetKey:"fill"});return(0,le.jsx)(Wk,{width:Oe,height:je,margin:Me,defs:qe,role:xe,ariaLabel:we,ariaLabelledBy:Se,ariaDescribedBy:ke,children:w.map(function(e,t){var n;return"function"==typeof e?(0,le.jsx)(G.Fragment,{children:(0,G.createElement)(e,We)},t):null!=(n=null==He?void 0:He[e])?n:null})})},sD=function(e){var t=e.isInteractive,n=void 0===t?nD.isInteractive:t,r=e.animate,o=void 0===r?nD.animate:r,i=e.motionConfig,a=void 0===i?nD.motionConfig:i,s=e.theme,l=e.renderWrapper,c=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,iD);return(0,le.jsx)(jk,{animate:o,isInteractive:n,motionConfig:a,renderWrapper:l,theme:s,children:(0,le.jsx)(aD,eD({isInteractive:n},c))})},lD=function(e){return(0,le.jsx)(_k,{children:function(t){var n=t.width,r=t.height;return(0,le.jsx)(sD,eD({width:n,height:r},e))}})},cD=a(7610),uD={};uD.styleTagTransform=Lf(),uD.setAttributes=Rf(),uD.insert=Df().bind(null,"head"),uD.domAPI=jf(),uD.insertStyleElement=If(),Tf()(cD.A,uD),cD.A&&cD.A.locals&&cD.A.locals;var dD=function(e){var t=e.data,n=e.chartConfig,r=e.keys,o=n.theme,i=n.title,a=n.xAxisLabel,s=n.yAxisLabel,l=n.colourThresholds,c=function(e,t,n,r){var o=t[0];return{transformedData:[{id:n,data:[{x:n,y:Number(e[0][o]),tip:n},{x:r,y:100-Number(e[0][o]),tip:r}]}]}}(t,r,a,s),u=c.transformedData,d=jO({theme:o});if(u[0].data[0].y>100||u[0].data[0].y<0||u[0].data[1].y>100||u[0].data[1].y<0)return(0,le.jsx)("div",{children:"Error: Measure must be a percentage"});var f=u[0].data.map(function(e){return{title:e.x}}),p=l?function(e){var t=XO(l,r,e.data);return QO(t,e.value)}:d;return(0,le.jsxs)("div",{className:"dashboard-chart-container",children:[(0,le.jsx)("div",{className:"dashboard-chart",role:"graphics-datachart",children:(0,le.jsx)(lD,{"test-id":"gauge",data:u,valueFormat:">-.2f",startAngle:-90,endAngle:90,maxValue:100,padding:.4,colors:p,cornerRadius:2,margin:{top:20,right:20,bottom:-130,left:0},enableTracks:!1,enableRadialGrid:!1,enableCircularGrid:!1,radialAxisStart:null,circularAxisOuter:null,isInteractive:!0,labelsRadiusOffset:.9,layers:["grid","bars","legends",function(e){var t=e.center;return(0,le.jsx)("g",{transform:"translate(".concat(t[0],", ").concat(t[1]+20,")"),children:(0,le.jsx)("text",{textAnchor:"middle",dominantBaseline:"central",className:"gauge-title",children:i})})}],tooltip:function(e){return(0,le.jsxs)("div",{style:{backgroundColor:"white",padding:8},children:[e.bar.data.tip,": ",e.bar.data.y]})}})}),(0,le.jsx)(_O,{data:f,themeConfig:d})]})};const fD=Ce("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]),pD=Ce("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),hD=Ce("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]),mD=Ce("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]),gD=Ce("check-line",[["path",{d:"M20 4L9 15",key:"1qkx8z"}],["path",{d:"M21 19L3 19",key:"100sma"}],["path",{d:"M9 15L4 10",key:"9zxff7"}]]);function bD(e){return bD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bD(e)}var yD=["className","colourName"],vD=["className","tooltip"],xD=["className"],wD=["className"];function SD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?SD(Object(n),!0).forEach(function(t){CD(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function CD(e,t,n){return(t=function(e){var t=function(e){if("object"!=bD(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=bD(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==bD(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MD(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var PD=function(e){var t=e.className,n=e.colourName,r=MD(e,yD);return(0,le.jsx)("div",kD({className:be()("kpi-card",n&&"kpi-card__hover-".concat(n),t)},r))},TD=function(e){var t=e.className,n=e.tooltip,r=MD(e,vD),o=(0,le.jsx)("div",kD({className:be()("kpi-card-header",t)},r));return n?(0,le.jsx)(Le,{content:n,style:{display:"block"},children:o}):o},OD=function(e){var t=e.className,n=MD(e,xD);return(0,le.jsx)("h3",kD({className:be()("kpi-card-title",t)},n))},jD=function(e){var t=e.className,n=MD(e,wD);return(0,le.jsx)("div",kD({className:be()("kpi-card-content",t)},n))};function _D(e){return _D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_D(e)}function DD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ED(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?DD(Object(n),!0).forEach(function(t){RD(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function RD(e,t,n){return(t=function(e){var t=function(e){if("object"!=_D(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=_D(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==_D(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AD(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ID=function(e){var t,n,r=e.data,o=e.title,i=e.thresholds,a=e.queryMeasures,s=e.showData,l=e.chartQuery,c=r[0].measure,u=r[0].dataLabel,d=r[1]?r[1].measure:void 0,f=r[1]?r[1].dataLabel:void 0,p=void 0!==d,h=function(){if(!i)return null;var e=structuredClone(i);a.forEach(function(t,n){if(t in e){var o=e[t];delete e[t],e[r[n].measure]=o}});for(var t="",n=0,o=Object.keys(e);n<o.length;n++){var s=o[n];c>=Number(s)&&Number(s)>=Number(t)&&(t=s)}return e[t]}(),m=GO[h||""]||"#202020",g=(0,G.useRef)(null),b=(t=(0,G.useState)(1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,n)||function(e,t){if(e){if("string"==typeof e)return AD(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?AD(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),y=b[0],v=b[1];(0,G.useLayoutEffect)(function(){var e=g.current;if(e){var t=function(){var t=e.clientHeight;t<=0||v(Math.min(1,t/60))};t();var n=new ResizeObserver(t);return n.observe(e),function(){return n.disconnect()}}},[]);var x,w,S,k=Boolean(s&&l);return(0,le.jsx)("div",{ref:g,className:"dashboard-kpi",children:(0,le.jsxs)(PD,ED(ED({colourName:h,style:{zoom:y}},k&&{role:"button",tabIndex:0,onClick:function(){return s(l,null!=o?o:"")},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),s(l,null!=o?o:""))},className:be()(k&&"dashboard-kpi-clickable")}),{},{children:[o&&(0,le.jsx)(TD,{tooltip:o,children:(0,le.jsx)(OD,{children:o})}),(0,le.jsxs)(jD,{children:[(0,le.jsx)("div",{className:"dashboard-kpi-metric-number-row",children:(0,le.jsxs)("div",{className:be()("dashboard-kpi-metric-number-and-arrow",!p&&"dashboard-kpi-metric-number-and-arrow--no-comparator"),children:[(0,le.jsx)("div",{className:be()("dashboard-kpi-metric-number","dashboard-kpi-metric-number__".concat(h)),"aria-label":u+" "+c,children:c}),p?(x=c,w=d,S={size:16,color:m},x>w?(0,le.jsx)("div",{className:"dashboard-kpi-metric-arrow arrow-up","aria-hidden":!0,children:(0,le.jsx)(hD,ED({},S))}):x<w?(0,le.jsx)("div",{className:"dashboard-kpi-metric-arrow arrow-down","aria-hidden":!0,children:(0,le.jsx)(mD,ED({},S))}):(0,le.jsx)("div",{className:"dashboard-kpi-metric-arrow on-track","aria-hidden":!0,children:(0,le.jsx)(gD,ED({},S))})):(0,le.jsx)("div",{className:"dashboard-kpi-metric-arrow-placeholder","aria-hidden":!0})]})}),(0,le.jsx)("div",{className:"dashboard-kpi-metric-label",children:u}),p&&(0,le.jsxs)(le.Fragment,{children:[(0,le.jsx)("div",{className:"dashboard-kpi-metric-seperator"}),(0,le.jsx)("div",{className:be()("dashboard-kpi-metric-number","dashboard-kpi-metric-number__".concat(h)),"aria-label":f+" "+d,children:d}),(0,le.jsx)("div",{className:"dashboard-kpi-metric-label",children:f})]})]})]}))})};function FD(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return LD(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?LD(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function LD(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ND=function(e){var t=e.data,n=e.thresholds,r=FD((0,G.useState)(!1),2),o=r[0],i=r[1],a=FD((0,G.useState)(!1),2),s=a[0],l=a[1],c=(0,G.useRef)(null);return(0,G.useEffect)(function(){var e=c.current;if(e){var t=function(){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;i(t>1),l(t+r<n-1)};t(),e.addEventListener("scroll",t);var n=new ResizeObserver(t);return n.observe(e),function(){e.removeEventListener("scroll",t),n.disconnect()}}},[]),t?(0,le.jsxs)("div",{className:"dashboard-infopanel",children:[(0,le.jsx)("div",{className:be()("dashboard-infopanel__scroll-indicator",{"dashboard-infopanel__scroll-indicator--hidden":!o}),onClick:function(){c.current&&c.current.scrollBy({left:-c.current.clientWidth,behavior:"smooth"})},children:(0,le.jsx)(Le,{content:"Scroll left",side:"bottom",children:(0,le.jsx)(fD,{size:20,"aria-hidden":!0})})}),(0,le.jsx)("div",{className:be()("dashboard-infopanel__scroll-indicator dashboard-infopanel__scroll-indicator--right",{"dashboard-infopanel__scroll-indicator--hidden":!s}),onClick:function(){c.current&&c.current.scrollBy({left:c.current.clientWidth,behavior:"smooth"})},children:(0,le.jsx)(Le,{content:"Scroll right",side:"bottom",children:(0,le.jsx)(pD,{size:20,"aria-hidden":!0})})}),(0,le.jsx)("div",{className:"dashboard-infopanel-metrics",ref:c,children:t.map(function(e,t){var r;return(0,le.jsx)(ID,{data:e.data,title:e.title,queryMeasures:e.queryMeasures,thresholds:null!==(r=null==n?void 0:n[e.title])&&void 0!==r?r:{}},t)})})]}):(0,le.jsx)("div",{children:"Error: no data provided"})},zD=function(e,t){return Object.keys(t.measures).length>2&&console.error("More than 2 measures provided for KPI. Only 2 or less are supported."),Object.keys(e).map(function(n){return{dataLabel:t.measures[n]?t.measures[n].title:n,measure:Number(e[n])}})},$D=a(104),VD=a(3181);function BD(){return BD=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},BD.apply(this,arguments)}function WD(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(0,G.memo)(function(e){var t=e.years,n=e.legend,r=e.theme;return(0,le.jsx)(le.Fragment,{children:t.map(function(e){return(0,le.jsx)("text",{transform:"translate("+e.x+","+e.y+") rotate("+e.rotation+")",textAnchor:"middle",style:r.labels.text,children:n(e.year)},e.year)})})}),(0,G.memo)(function(e){var t=e.path,n=e.borderWidth,r=e.borderColor;return(0,le.jsx)("path",{d:t,style:{fill:"none",strokeWidth:n,stroke:r,pointerEvents:"none"}})});var HD,qD=(0,G.memo)(function(e){var t=e.months,n=e.legend,r=e.theme;return(0,le.jsx)(le.Fragment,{children:t.map(function(e){return(0,le.jsx)("text",{transform:"translate("+e.x+","+e.y+") rotate("+e.rotation+")",textAnchor:"middle",style:r.labels.text,children:n(e.year,e.month,e.date)},e.date.toString()+".legend")})})}),YD=((0,G.memo)(function(e){var t=e.data,n=e.x,r=e.y,o=e.size,i=e.color,a=e.borderWidth,s=e.borderColor,l=e.isInteractive,c=e.tooltip,u=e.onMouseEnter,d=e.onMouseMove,f=e.onMouseLeave,p=e.onClick,h=e.formatValue,m=qg(),g=m.showTooltipFromEvent,b=m.hideTooltip,y=(0,G.useCallback)(function(e){if("value"in t){var n=BD({},t,{value:h(t.value),data:BD({},t.data)});g(G.createElement(c,BD({},n)),e),null==u||u(t,e)}},[g,c,t,u,h]),v=(0,G.useCallback)(function(e){if("value"in t){var n=BD({},t,{value:h(t.value),data:BD({},t.data)});g(G.createElement(c,BD({},n)),e),d&&d(t,e)}},[g,c,t,d,h]),x=(0,G.useCallback)(function(e){"value"in t&&(b(),null==f||f(t,e))},[b,t,f]),w=(0,G.useCallback)(function(e){return null==p?void 0:p(t,e)},[t,p]);return(0,le.jsx)("rect",{x:n,y:r,width:o,height:o,style:{fill:i,strokeWidth:a,stroke:s},onMouseEnter:l?y:void 0,onMouseMove:l?v:void 0,onMouseLeave:l?x:void 0,onClick:l?w:void 0})}),(0,G.memo)(function(e){var t=e.value,n=e.day,r=e.color;return void 0===t||isNaN(Number(t))?null:(0,le.jsx)(Lg,{id:n,value:t,color:r,enableChip:!0})})),UD=Dw("%b"),GD={colors:["#61cdbb","#97e3d5","#e8c1a0","#f47560"],align:"center",direction:"horizontal",emptyColor:"#fff",minValue:0,maxValue:"auto",yearSpacing:30,yearLegend:function(e){return e},yearLegendPosition:"before",yearLegendOffset:10,monthBorderWidth:2,monthBorderColor:"#000",monthSpacing:0,monthLegend:function(e,t,n){return UD(n)},monthLegendPosition:"before",monthLegendOffset:10,daySpacing:0,dayBorderWidth:1,dayBorderColor:"#000",isInteractive:!0,legends:[],tooltip:YD},XD=BD({},GD,{role:"img"}),QD=BD({},GD,{pixelRatio:"undefined"!=typeof window&&null!=(HD=window.devicePixelRatio)?HD:1}),KD=BD({},XD,{dayBorderColor:"#fff",dayRadius:0,square:!0,weekdayLegendOffset:75,firstWeekday:"sunday",weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}),ZD=$D(function(e){var t,n=e.date,r=e.cellSize,o=e.yearIndex,i=e.yearSpacing,a=e.monthSpacing,s=e.daySpacing,l=e.direction,c=e.originX,u=e.originY,d=new Date(n.getFullYear(),n.getMonth()+1,0),f=fw.count(Cw(n),n),p=fw.count(Cw(d),d),h=n.getDay(),m=d.getDay(),g=c,b=u,y=o*(7*(r+s)+i),v=n.getMonth()*a;"horizontal"===l?(b+=y,g+=v):(b+=v,g+=y);var x={x:g,y:b,width:0,height:0};return"horizontal"===l?(t=["M"+(g+(f+1)*(r+s))+","+(b+h*(r+s)),"H"+(g+f*(r+s))+"V"+(b+7*(r+s)),"H"+(g+p*(r+s))+"V"+(b+(m+1)*(r+s)),"H"+(g+(p+1)*(r+s))+"V"+b,"H"+(g+(f+1)*(r+s))+"Z"].join(""),x.x=g+f*(r+s),x.width=g+(p+1)*(r+s)-x.x,x.height=7*(r+s)):(t=["M"+(g+h*(r+s))+","+(b+(f+1)*(r+s)),"H"+g+"V"+(b+(p+1)*(r+s)),"H"+(g+(m+1)*(r+s))+"V"+(b+p*(r+s)),"H"+(g+7*(r+s))+"V"+(b+f*(r+s)),"H"+(g+h*(r+s))+"Z"].join(""),x.y=b+f*(r+s),x.width=7*(r+s),x.height=b+(p+1)*(r+s)-x.y),{path:t,bbox:x}},function(e){var t=e.date,n=e.cellSize,r=e.yearIndex,o=e.yearSpacing,i=e.monthSpacing,a=e.daySpacing,s=e.direction,l=e.originX,c=e.originY;return t.toString()+"."+n+"."+r+"."+o+"."+i+"."+a+"."+s+"."+l+"."+c}),JD=Dw("%Y-%m-%d"),eE=function(e){var t=e.data,n=e.minValue,r=e.maxValue,o=e.colors,i=e.colorScale;return(0,G.useMemo)(function(){if(i)return i;var e=function(e,t,n){var r=e.map(function(e){return e.value});return["auto"===t?Math.min.apply(Math,r):t,"auto"===n?Math.max.apply(Math,r):n]}(t,n,r);return sT().domain(e).range(o)},[t,n,r,o,i])},tE=function(e){var t=e.months,n=e.direction,r=e.monthLegendPosition,o=e.monthLegendOffset;return(0,G.useMemo)(function(){return function(e){var t=e.direction,n=e.position,r=e.offset;return e.months.map(function(e){var o=0,i=0,a=0;return"horizontal"===t&&"before"===n?(o=e.bbox.x+e.bbox.width/2,i=e.bbox.y-r):"horizontal"===t&&"after"===n?(o=e.bbox.x+e.bbox.width/2,i=e.bbox.y+e.bbox.height+r):"vertical"===t&&"before"===n?(o=e.bbox.x-r,i=e.bbox.y+e.bbox.height/2,a=-90):(o=e.bbox.x+e.bbox.width+r,i=e.bbox.y+e.bbox.height/2,a=-90),BD({},e,{x:o,y:i,rotation:a})})}({months:t,direction:n,position:r,offset:o})},[t,n,r,o])},nE=Dw("%Y-%m-%d"),rE=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function oE(e){return rE.findIndex(function(t){return t.toLowerCase()===e})}var iE=function(e,t){var n=e.getDay()-oE(t);return[0,1,2,3,4,5,6].slice(n)[0]},aE=(0,G.memo)(function(e){var t=e.data,n=e.x,r=e.ry,o=void 0===r?5:r,i=e.rx,a=void 0===i?5:i,s=e.y,l=e.width,c=e.height,u=e.color,d=e.borderWidth,f=e.borderColor,p=e.isInteractive,h=e.tooltip,m=e.onMouseEnter,g=e.onMouseMove,b=e.onMouseLeave,y=e.onClick,v=e.formatValue,x=qg(),w=x.showTooltipFromEvent,S=x.hideTooltip,k=(0,G.useCallback)(function(e){if("value"in t){var n=BD({},t,{value:v(t.value)});w((0,G.createElement)(h,BD({},n)),e),null==m||m(t,e)}},[w,h,t,m,v]),C=(0,G.useCallback)(function(e){if("value"in t){var n=BD({},t,{value:v(t.value)});w((0,G.createElement)(h,BD({},n)),e),null==g||g(t,e)}},[w,h,t,g,v]),M=(0,G.useCallback)(function(e){"value"in t&&(S(),null==b||b(t,e))},[S,t,b]),P=(0,G.useCallback)(function(e){return null==y?void 0:y(t,e)},[t,y]);return(0,le.jsx)("rect",{x:n,y:s,rx:a,ry:o,width:l,height:c,style:{fill:u,strokeWidth:d,stroke:f},onMouseEnter:p?k:void 0,onMouseMove:p?C:void 0,onMouseLeave:p?M:void 0,onClick:p?P:void 0})}),sE=["isInteractive","renderWrapper","theme"],lE=function(e){var t=e.margin,n=e.width,r=e.height,o=e.square,i=void 0===o?KD.square:o,a=e.colors,s=void 0===a?KD.colors:a,l=e.colorScale,c=e.emptyColor,u=void 0===c?KD.emptyColor:c,d=e.from,f=e.to,p=e.data,h=e.direction,m=void 0===h?KD.direction:h,g=e.minValue,b=void 0===g?KD.minValue:g,y=e.maxValue,v=void 0===y?KD.maxValue:y,x=e.valueFormat,w=e.legendFormat,S=e.monthLegend,k=void 0===S?KD.monthLegend:S,C=e.monthLegendOffset,M=void 0===C?KD.monthLegendOffset:C,P=e.monthLegendPosition,T=void 0===P?KD.monthLegendPosition:P,O=e.weekdayLegendOffset,j=void 0===O?KD.weekdayLegendOffset:O,_=e.weekdayTicks,D=e.weekdays,E=void 0===D?KD.weekdays:D,R=e.dayBorderColor,A=void 0===R?KD.dayBorderColor:R,I=e.dayBorderWidth,F=void 0===I?KD.dayBorderWidth:I,L=e.daySpacing,N=void 0===L?KD.daySpacing:L,z=e.dayRadius,$=void 0===z?KD.dayRadius:z,V=e.isInteractive,B=void 0===V?KD.isInteractive:V,W=e.tooltip,H=void 0===W?KD.tooltip:W,q=e.onClick,Y=e.onMouseEnter,U=e.onMouseLeave,X=e.onMouseMove,Q=e.legends,K=void 0===Q?KD.legends:Q,Z=e.role,J=void 0===Z?KD.role:Z,ee=e.firstWeekday,te=void 0===ee?KD.firstWeekday:ee,ne=bk(n,r,t),re=ne.margin,oe=ne.innerWidth,ie=ne.innerHeight,ae=ne.outerWidth,se=ne.outerHeight,ce=(0,G.useMemo)(function(){return p.map(function(e){return BD({},e,{date:new Date(e.day+"T00:00:00")})}).sort(function(e,t){return e.day.localeCompare(t.day)})},[p]),ue=Ck(),de=eE({data:ce,minValue:b,maxValue:v,colors:s,colorScale:l}),fe=function(e){var t,n,r=e.from,o=e.to,i=e.data;return t=r?aC(r)?r:new Date(r):i[0].date,n=r&&o?aC(o)?o:new Date(o):i[i.length-1].date,t.getDay()+ww.count(t,n)}({from:d,to:f,data:ce}),pe=function(e){var t,n,r=e.daySpacing,o=e.offset,i=e.square,a=e.totalDays,s=e.width,l=e.height;"horizontal"===e.direction?(s-=o,t=7,n=Math.ceil(a/7)):(l-=o,n=7,t=Math.ceil(a/7));var c=(l-r*(t+1))/t,u=(s-r*(n+1))/n,d=Math.min(c,u);return{columns:n,rows:t,cellHeight:i?d:c,cellWidth:i?d:u}}({square:i,offset:j,totalDays:fe,width:oe,height:ie,daySpacing:N,direction:m}),he=pe.cellHeight,me=pe.cellWidth,ge=function(e){var t=e.direction,n=e.colorScale,r=e.emptyColor,o=e.from,i=e.to,a=e.data,s=e.cellWidth,l=e.cellHeight,c=e.daySpacing,u=e.offset,d=e.firstWeekday,f=c,p=c;"horizontal"===t?f+=u:p+=u;var h=o||a[0].date,m=i||a[a.length-1].date,g=aC(h)?h:new Date(h),b=aC(m)?m:new Date(m);return Sw(g,b).map(function(e){return{date:e,day:nE(e)}}).map(function(e){var o=a.find(function(t){return t.day===e.day}),i=function(e){var t=e.startDate,n=e.date,r=e.direction,o=e.firstWeekday,i=function(e){return[fw,pw,hw,mw,gw,bw,yw][oE(e)]}(o),a=i.count(t,n),s=n.getMonth(),l=n.getFullYear(),c=0,u=0;return"horizontal"===r?(c=a,u=iE(n,o)):(c=iE(n,o),u=a),{currentColumn:c,year:l,currentRow:u,firstWeek:a,month:s,date:n}}({startDate:g,date:e.date,direction:t,firstWeekday:d}),u=i.currentColumn,h=i.currentRow,m=i.firstWeek,b=i.year,y=i.month,v=i.date,x={x:f+c*u+s*u,y:p+c*h+l*h};return o?BD({},o,{coordinates:x,firstWeek:m,month:y,year:b,date:v,color:n(o.value),width:s,height:l}):BD({},e,{coordinates:x,firstWeek:m,month:y,year:b,date:v,color:r,width:s,height:l})})}({offset:j,colorScale:de,emptyColor:u,cellHeight:he,cellWidth:me,from:d,to:f,data:ce,direction:m,daySpacing:N,firstWeekday:te}),be=Object.values(function(e){var t=e.direction,n=e.daySpacing,r=e.cellHeight,o=e.cellWidth;return e.days.reduce(function(e,i){if(e.weeks.length===i.firstWeek||!e.weeks.length&&1===i.firstWeek){e.weeks.push(i);var a=i.year+"-"+i.month;if(Object.keys(e.months).includes(a))"horizontal"===t?e.months[a].bbox.width=(i.firstWeek-e.months[a].firstWeek)*(o+n):e.months[a].bbox.height=(i.firstWeek-e.months[a].firstWeek)*(r+n);else{var s={x:0,y:0,width:0,height:0};"horizontal"===t?(s.x=i.coordinates.x-n,s.height=r+n,s.width=o+2*n):(s.y=i.coordinates.y-n,s.height=r+2*n,s.width=o+2*n),e.months[a]={date:i.date,bbox:s,firstWeek:i.firstWeek,month:0,year:0}}}return e},{months:{},weeks:[]})}({daySpacing:N,direction:m,cellHeight:he,cellWidth:me,days:ge}).months),ye=function(e){var t,n,r=e.direction,o=e.daySpacing,i=e.ticks,a=void 0===i?[1,3,5]:i,s=e.arrayOfWeekdays,l=e.cellWidth+o,c=e.cellHeight+o,u=(t=void 0===s?rE:s,n=oE(e.firstWeekday),t.length&&n?(n%=t.length,t.slice(n,t.length).concat(t.slice(0,n))):t);return a.map(function(e){return{value:u[e],rotation:"horizontal"===r?0:-90,y:"horizontal"===r?c*(e+1)-c/3:0,x:"horizontal"===r?0:l*(e+1)-l/3}})}({direction:m,cellHeight:he,cellWidth:me,daySpacing:N,ticks:_,firstWeekday:te,arrayOfWeekdays:E}),ve=tE({months:be,direction:m,monthLegendPosition:T,monthLegendOffset:M}),xe=xk(x),we=xk(w);return(0,le.jsxs)(Wk,{width:ae,height:se,margin:re,role:J,children:[ye.map(function(e){return(0,le.jsx)("text",{transform:"translate("+e.x+","+e.y+") rotate("+e.rotation+")",textAnchor:"left",style:ue.labels.text,children:e.value},e.value+"-"+e.x+"-"+e.y)}),ge.map(function(e){return(0,le.jsx)(aE,{data:e,x:e.coordinates.x,rx:$,y:e.coordinates.y,ry:$,width:me,height:he,color:e.color,borderWidth:F,borderColor:A,onMouseEnter:Y,onMouseLeave:U,onMouseMove:X,isInteractive:B,tooltip:H,onClick:q,formatValue:xe},e.date.toString())}),(0,le.jsx)(qD,{months:ve,legend:k,theme:ue}),K.map(function(e,t){var o=de.ticks(e.itemCount).map(function(e){return{id:e,label:we(e),color:de(e)}});return(0,le.jsx)(FT,BD({},e,{containerWidth:n,containerHeight:r,data:o}),t)})]})},cE=function(e){var t=e.isInteractive,n=void 0===t?KD.isInteractive:t,r=e.renderWrapper,o=e.theme,i=WD(e,sE);return(0,le.jsx)(jk,{isInteractive:n,renderWrapper:r,theme:o,children:(0,le.jsx)(lE,BD({isInteractive:n},i))})},uE=["months","years"],dE=function(e,t,n,r,o,i){var a=Jk(t,e),s=a[0],l=a[1];return n.find(function(e){return"value"in e&&Zk(e.x+i.left-o/2,e.y+i.top-o/2,r+o,r+o,s,l)})};function fE(e){return function(e){if(Array.isArray(e))return pE(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return pE(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pE(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}(0,G.memo)(function(e){var t=e.margin,n=e.width,r=e.height,o=e.pixelRatio,i=void 0===o?QD.pixelRatio:o,a=e.align,s=void 0===a?QD.align:a,l=e.colors,c=void 0===l?QD.colors:l,u=e.colorScale,d=e.data,f=e.direction,p=void 0===f?QD.direction:f,h=e.emptyColor,m=void 0===h?QD.emptyColor:h,g=e.from,b=e.to,y=e.minValue,v=void 0===y?QD.minValue:y,x=e.maxValue,w=void 0===x?QD.maxValue:x,S=e.valueFormat,k=e.legendFormat,C=e.yearLegend,M=void 0===C?QD.yearLegend:C,P=e.yearLegendOffset,T=void 0===P?QD.yearLegendOffset:P,O=e.yearLegendPosition,j=void 0===O?QD.yearLegendPosition:O,_=e.yearSpacing,D=void 0===_?QD.yearSpacing:_,E=e.monthLegend,R=void 0===E?QD.monthLegend:E,A=e.monthLegendOffset,I=void 0===A?QD.monthLegendOffset:A,F=e.monthLegendPosition,L=void 0===F?QD.monthLegendPosition:F,N=e.monthSpacing,z=void 0===N?QD.monthSpacing:N,$=e.dayBorderColor,V=void 0===$?QD.dayBorderColor:$,B=e.dayBorderWidth,W=void 0===B?QD.dayBorderWidth:B,H=e.daySpacing,q=void 0===H?QD.daySpacing:H,Y=e.isInteractive,U=void 0===Y?QD.isInteractive:Y,X=e.tooltip,Q=void 0===X?QD.tooltip:X,K=e.onClick,Z=e.onMouseEnter,J=e.onMouseLeave,ee=e.onMouseMove,te=e.legends,ne=void 0===te?QD.legends:te,re=(0,G.useRef)(null),oe=bk(n,r,t),ie=oe.innerWidth,ae=oe.innerHeight,se=oe.outerWidth,ce=oe.outerHeight,ue=oe.margin,de=function(e){var t=e.width,n=e.height,r=e.from,o=e.to,i=e.direction,a=e.yearSpacing,s=e.monthSpacing,l=e.daySpacing,c=e.align;return(0,G.useMemo)(function(){return function(e){var t,n=e.width,r=e.height,o=e.from,i=e.to,a=e.direction,s=e.yearSpacing,l=e.monthSpacing,c=e.daySpacing,u=e.align,d=aC(o)?o:new Date(o),f=aC(i)?i:new Date(i),p=VD(d.getFullYear(),f.getFullYear()+1),h=Math.max.apply(Math,p.map(function(e){return vw(new Date(e,0,1),new Date(e+1,0,1)).length}))+1,m=function(e){var t,n,r=e.width,o=e.height,i=e.yearRange,a=e.yearSpacing,s=e.monthSpacing,l=e.daySpacing,c=e.maxWeeks;return"horizontal"===e.direction?(t=(r-12*s-l*c)/c,n=(o-(i.length-1)*a-i.length*(8*l))/(7*i.length)):(t=(r-(i.length-1)*a-i.length*(8*l))/(7*i.length),n=(o-12*s-l*c)/c),Math.min(t,n)}({width:n,height:r,direction:a,yearRange:p,yearSpacing:s,monthSpacing:l,daySpacing:c,maxWeeks:h}),g=m*h+c*h+12*l,b=7*(m+c)*p.length+s*(p.length-1),y="horizontal"===a?g:b,v="horizontal"===a?b:g,x=function(e,t,n){var r=t.width-e.width,o=t.height-e.height,i=0,a=0;return"center"===n&&(i=r/2,a=o/2),"top"===n&&(i=r/2),"top-right"===n&&(i=r),"right"===n&&(i=r,a=o/2),"bottom-right"===n&&(i=r,a=o),"bottom"===n&&(i=r/2,a=o),"bottom-left"===n&&(a=o),"left"===n&&(a=o/2),[i,a]}({x:0,y:0,width:y,height:v},{x:0,y:0,width:n,height:r},u),w=x[0],S=x[1];t="horizontal"===a?function(e,t,n,r){return function(o,i,a,s){return{x:o+fw.count(Cw(a),a)*(e+r)+r/2+a.getMonth()*n,y:i+a.getDay()*(e+r)+r/2+s*(t+7*(e+r))}}}(m,s,l,c):function(e,t,n,r){return function(o,i,a,s){var l=fw.count(Cw(a),a);return{x:o+a.getDay()*(e+r)+r/2+s*(t+7*(e+r)),y:i+l*(e+r)+r/2+a.getMonth()*n}}}(m,s,l,c);var k=[],C=[],M=[];return p.forEach(function(e,n){var r=new Date(e,0,1),o=new Date(e+1,0,1);M=M.concat(Sw(r,o).map(function(e){return BD({date:e,day:JD(e),size:m},t(w,S,e,n))}));var i=oP(r,o).map(function(e){return BD({date:e,year:e.getFullYear(),month:e.getMonth()},ZD({originX:w,originY:S,date:e,direction:a,yearIndex:n,yearSpacing:s,monthSpacing:l,daySpacing:c,cellSize:m}))});C=C.concat(i),k.push({year:e,bbox:{x:i[0].bbox.x,y:i[0].bbox.y,width:i[11].bbox.x-i[0].bbox.x+i[11].bbox.width,height:i[11].bbox.y-i[0].bbox.y+i[11].bbox.height}})}),{years:k,months:C,days:M,cellSize:m,calendarWidth:y,calendarHeight:v,originX:w,originY:S}}({width:t,height:n,from:r,to:o,direction:i,yearSpacing:a,monthSpacing:s,daySpacing:l,align:c})},[t,n,r,o,i,a,s,l,c])}({width:ie,height:ae,from:g,to:b,direction:p,yearSpacing:D,monthSpacing:z,daySpacing:q,align:s}),fe=de.months,pe=de.years,he=WD(de,uE),me=eE({data:d,minValue:v,maxValue:w,colors:c,colorScale:u}),ge=tE({months:fe,direction:p,monthLegendPosition:L,monthLegendOffset:I}),be=function(e){var t=e.years,n=e.direction,r=e.yearLegendPosition,o=e.yearLegendOffset;return(0,G.useMemo)(function(){return function(e){var t=e.direction,n=e.position,r=e.offset;return e.years.map(function(e){var o=0,i=0,a=0;return"horizontal"===t&&"before"===n?(o=e.bbox.x-r,i=e.bbox.y+e.bbox.height/2,a=-90):"horizontal"===t&&"after"===n?(o=e.bbox.x+e.bbox.width+r,i=e.bbox.y+e.bbox.height/2,a=-90):"vertical"===t&&"before"===n?(o=e.bbox.x+e.bbox.width/2,i=e.bbox.y-r):(o=e.bbox.x+e.bbox.width/2,i=e.bbox.y+e.bbox.height+r),BD({},e,{x:o,y:i,rotation:a})})}({years:t,direction:n,position:r,offset:o})},[t,n,r,o])}({years:pe,direction:p,yearLegendPosition:j,yearLegendOffset:T}),ye=function(e){var t=e.days,n=e.data,r=e.colorScale,o=e.emptyColor;return(0,G.useMemo)(function(){return function(e){var t=e.data,n=e.colorScale,r=e.emptyColor;return e.days.map(function(e){var o=t.find(function(t){return t.day===e.day});return BD({},e,o?{color:n(o.value),data:o,value:o.value}:{color:r})})}({days:t,data:n,colorScale:r,emptyColor:o})},[t,n,r,o])}({days:he.days,data:d,colorScale:me,emptyColor:m}),ve=(0,G.useState)(null),xe=ve[0],we=ve[1],Se=Ck(),ke=xk(S),Ce=xk(k),Me=qg(),Pe=Me.showTooltipFromEvent,Te=Me.hideTooltip;(0,G.useEffect)(function(){var e;if(re.current){re.current.width=se*i,re.current.height=ce*i;var t=re.current.getContext("2d");t&&(t.scale(i,i),t.fillStyle=Se.background,t.fillRect(0,0,se,ce),t.translate(ue.left,ue.top),ye.forEach(function(e){t.fillStyle=e.color,W>0&&(t.strokeStyle=V,t.lineWidth=W),t.beginPath(),t.rect(e.x,e.y,e.size,e.size),t.fill(),W>0&&t.stroke()}),t.textAlign="center",t.textBaseline="middle",t.fillStyle=null!=(e=Se.labels.text.fill)?e:"",t.font=Se.labels.text.fontSize+"px "+Se.labels.text.fontFamily,ge.forEach(function(e){t.save(),t.translate(e.x,e.y),t.rotate(Ak(e.rotation)),t.fillText(String(R(e.year,e.month,e.date)),0,0),t.restore()}),be.forEach(function(e){t.save(),t.translate(e.x,e.y),t.rotate(Ak(e.rotation)),t.fillText(String(M(e.year)),0,0),t.restore()}),ne.forEach(function(e){var n=me.ticks(e.itemCount).map(function(e){return{id:e,label:Ce(e),color:me(e)}});NT(t,BD({},e,{data:n,containerWidth:ie,containerHeight:ae,theme:Se}))}))}},[re,ae,ie,se,ce,i,ue,ye,V,W,u,M,be,R,ge,ne,Se,Ce,me]);var Oe=(0,G.useCallback)(function(e){if(re.current){var t=dE(e,re.current,ye,ye[0].size,W,ue);if(t){if(we(t),!("value"in t))return;var n=BD({},t,{value:ke(t.value),data:BD({},t.data)});Pe(G.createElement(Q,BD({},n)),e),!xe&&(null==Z||Z(t,e)),null==ee||ee(t,e),xe&&(null==J||J(t,e))}else Te(),t&&(null==J||J(t,e))}},[re,xe,ue,ye,we,ke,W,Pe,Te,Z,ee,J,Q]),je=(0,G.useCallback)(function(){we(null),Te()},[we,Te]),_e=(0,G.useCallback)(function(e){if(K&&re.current){var t=dE(e,re.current,ye,ye[0].size,q,ue);t&&K(t,e)}},[re,q,ue,ye,K]);return(0,le.jsx)("canvas",{ref:re,width:se*i,height:ce*i,style:{width:se,height:ce},onMouseEnter:U?Oe:void 0,onMouseMove:U?Oe:void 0,onMouseLeave:U?je:void 0,onClick:U?_e:void 0})});var hE=function(e){var t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(n,"-").concat(r)};function mE(e,t){let n;return(...r)=>{window.clearTimeout(n),n=window.setTimeout(()=>e(...r),t)}}function gE({debounce:e,scroll:t,polyfill:n,offsetSize:r}={debounce:0,scroll:!1,offsetSize:!1}){const o=n||("undefined"==typeof window?class{}:window.ResizeObserver);if(!o)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[i,a]=(0,G.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),s=(0,G.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:i,orientationHandler:null}),l=e?"number"==typeof e?e:e.scroll:null,c=e?"number"==typeof e?e:e.resize:null,u=(0,G.useRef)(!1);(0,G.useEffect)(()=>(u.current=!0,()=>{u.current=!1}));const[d,f,p]=(0,G.useMemo)(()=>{const e=()=>{if(!s.current.element)return;const{left:e,top:t,width:n,height:o,bottom:i,right:l,x:c,y:d}=s.current.element.getBoundingClientRect(),f={left:e,top:t,width:n,height:o,bottom:i,right:l,x:c,y:d};s.current.element instanceof HTMLElement&&r&&(f.height=s.current.element.offsetHeight,f.width=s.current.element.offsetWidth),Object.freeze(f),u.current&&!vE(s.current.lastBounds,f)&&a(s.current.lastBounds=f)};return[e,c?mE(e,c):e,l?mE(e,l):e]},[a,r,l,c]);function h(){s.current.scrollContainers&&(s.current.scrollContainers.forEach(e=>e.removeEventListener("scroll",p,!0)),s.current.scrollContainers=null),s.current.resizeObserver&&(s.current.resizeObserver.disconnect(),s.current.resizeObserver=null),s.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",s.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",s.current.orientationHandler))}function m(){s.current.element&&(s.current.resizeObserver=new o(p),s.current.resizeObserver.observe(s.current.element),t&&s.current.scrollContainers&&s.current.scrollContainers.forEach(e=>e.addEventListener("scroll",p,{capture:!0,passive:!0})),s.current.orientationHandler=()=>{p()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",s.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",s.current.orientationHandler))}return function(e,t){(0,G.useEffect)(()=>{if(t){const t=e;return window.addEventListener("scroll",t,{capture:!0,passive:!0}),()=>{window.removeEventListener("scroll",t,!0)}}},[e,t])}(p,!!t),function(e){(0,G.useEffect)(()=>{const t=e;return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[e])}(f),(0,G.useEffect)(()=>{h(),m()},[t,p,f]),(0,G.useEffect)(()=>h,[]),[e=>{!e||e===s.current.element||(h(),s.current.element=e,s.current.scrollContainers=bE(e),m())},i,d]}function bE(e){const t=[];if(!e||e===document.body)return t;const{overflow:n,overflowX:r,overflowY:o}=window.getComputedStyle(e);return[n,r,o].some(e=>"auto"===e||"scroll"===e)&&t.push(e),[...t,...bE(e.parentElement)]}const yE=["x","y","top","bottom","left","right","width","height"],vE=(e,t)=>yE.every(n=>e[n]===t[n]);function xE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var wE=function(e){var t,n,r=e.data,o=e.chartConfig,i=e.keys,a=e.indexes,s=e.annotation,l=(t=gE(),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,n)||function(e,t){if(e){if("string"==typeof e)return xE(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xE(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),c=l[0],u=l[1],d=i[0],f=function(e,t,n){var r,o,i=e.map(function(e){return e&&e[t]?new Date(e[t]):null}).filter(function(e){return e instanceof Date&&!isNaN(e.getTime())});if(i.length){var a=new Date(Math.min.apply(Math,fE(i.map(function(e){return e.getTime()})))),s=new Date(Math.max.apply(Math,fE(i.map(function(e){return e.getTime()}))));r=hE(a),o=hE(s)}return{transformedData:e.map(function(e){return{day:e[t],value:null!==e[n]?e[n]:"Empty"}}),startDate:r,endDate:o}}(r,a[0],d),p=f.transformedData,h=f.startDate,m=f.endDate,g=o.colourThresholds,b=Object.keys(g||{}).map(function(e){return{threshold:e,colour:g?GO[g[e]]:GO["grey-system"]}});b.sort(function(e,t){return Number(e.threshold)-Number(t.threshold)});var y=b.map(function(e){return Number(e.threshold)}),v=function(e){return QO(b,e)};return v.ticks=function(){return y},(0,le.jsx)("div",{className:"dashboard-calendar-container",ref:c,children:(0,le.jsx)(cE,{height:u.height,width:u.width,data:p,from:h,to:m,emptyColor:GO["grey-system"],margin:{top:40,right:40,bottom:40,left:40},dayBorderWidth:2,dayBorderColor:"#ffffff",direction:"horizontal",colorScale:v,weekdayTicks:[0,1,2,3,4,5,6],legendFormat:function(e){return String(e)},legends:[{anchor:"bottom",direction:"row",translateY:-40,translateX:-40,itemCount:4,itemWidth:50,itemHeight:36,itemsSpacing:30,itemDirection:"right-to-left"}],tooltip:function(e){var t=e.value,n=e.day,r=new Date(n).toLocaleDateString(void 0,{weekday:"long"}),o=new Date(n).toLocaleDateString();return(0,le.jsxs)("div",{className:"dashboard-calendar-tooltip",children:[(0,le.jsxs)("div",{className:"dashboard-calendar-tooltip-title",children:[r," ","(",o,")"]})," ",(0,le.jsxs)("span",{className:"dashboard-calendar-tooltip-value",children:[(0,le.jsx)("div",{className:"dashboard-calendar-tooltip-icon",style:{backgroundColor:v(t)}}),s.measures[d].title||d,": ",t]})]})}})})},SE=function(e,t){return e.reduce(function(e,n){return e[n[t]]=n,e},{})},kE=function(e){var t=e.dataQuery,n=e.chartQueryKey,r=e.chartType,o=e.chartConfig,i=e.showData,a=qe({queryKey:[n,t],queryFn:function(){return Yf([n,t])},staleTime:3e5}),s=a.data,l=a.isError,c=a.isLoading,u=fe();if(c||u)return(0,le.jsx)("div",{className:"dashboard-item-loading",children:(0,le.jsx)($f,{})});if(l||!s)return(0,le.jsx)("div",{children:"Error fetching data"});var d=structuredClone(s);"annotation"in d&&d.annotation&&(Array.isArray(d.annotation.measures)&&(d.annotation.measures=SE(d.annotation.measures,"name")),Array.isArray(d.annotation.dimensions)&&(d.annotation.dimensions=SE(d.annotation.dimensions,"name")));var f=r.replace(/-(\w)/g,function(e){return e[1].toUpperCase()}),p={bar:function(){try{if(!o)return(0,le.jsx)("div",{children:"Chart config is missing"});var e=d,t=e.query,n=e.annotation,r=e.data;return(0,le.jsx)(tj,{data:r,keys:t.measures,indexes:t.dimensions,annotation:n,chartConfig:o})}catch(e){return(0,le.jsxs)("div",{children:["Error rendering bar chart: ",e.message]})}},line:function(){try{if(!o)return(0,le.jsx)("div",{children:"Chart config is missing"});var e=d,t=e.query,n=e.annotation,r=e.data;return(0,le.jsx)(o_,{data:r,keys:t.measures,indexes:t.dimensions,annotation:n,chartConfig:o})}catch(e){return(0,le.jsxs)("div",{children:["Error rendering line chart: ",e.message]})}},heatMap:function(){try{if(!o)return(0,le.jsx)("div",{children:"Chart config is missing"});var e=d,t=e.query,n=e.annotation,r=e.data;return(0,le.jsx)(C_,{data:r,keys:t.measures,indexes:t.dimensions,annotation:n,chartConfig:o})}catch(e){return(0,le.jsxs)("div",{children:["Error rendering heatmap: ",e.message]})}},gauge:function(){try{if(!o)return(0,le.jsx)("div",{children:"Chart config is missing"});var e=s,t=e.query,n=e.annotation,r=e.data;return(0,le.jsx)(dD,{data:r,keys:t.measures,indexes:t.dimensions,annotation:n,chartConfig:o})}catch(e){return(0,le.jsxs)("div",{children:["Error rendering gauge: ",e.message]})}},headlines:function(){try{var e=function(e){return e.results.map(function(e){e.annotation&&(Array.isArray(e.annotation.measures)&&(e.annotation.measures=SE(e.annotation.measures,"name")),Array.isArray(e.annotation.filters)&&(e.annotation.filters=SE(e.annotation.filters||[],"name")));var t=zD(e.data[0],e.annotation),n="";if(e.query.filters){var r,o=(null===(r=e.annotation)||void 0===r?void 0:r.filters)||{},i=e.query.filters[0].value[0],a=e.query.filters[0].field;n="boolean"==typeof i?o[a]?o[a].title:a:i}return{title:n,data:t,queryMeasures:e.query.measures}})}(s);return(0,le.jsx)(ND,{data:e,thresholds:(null==o?void 0:o.multiQueryColourThresholds)||{}})}catch(e){return(0,le.jsxs)("div",{children:["Error rendering info panel: ",e.message]})}},kpi:function(){try{var e=d,n=e.annotation,r=e.data,a=zD(r[0],n),s=t.params;return(0,le.jsx)(ID,{data:a,title:null==o?void 0:o.title,thresholds:null==o?void 0:o.colourThresholds,queryMeasures:s.measures,showData:i,chartQuery:t})}catch(e){return(0,le.jsxs)("div",{children:["Error rendering KPI: ",e.message]})}},calendar:function(){try{if(!o)return(0,le.jsx)("div",{children:"Chart config is missing"});var e=d,t=e.data,n=e.query,r=e.annotation;return(0,le.jsx)(wE,{data:t,keys:n.measures,indexes:n.dimensions,chartConfig:o,annotation:r})}catch(e){return(0,le.jsxs)("div",{children:["Error rendering calendar: ",e.message]})}}},h=p[f];return h?(0,le.jsx)(h,{}):(0,le.jsxs)("p",{children:["Unknown component type: ",f]})};function CE(e){return function(e){if(Array.isArray(e))return ME(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return ME(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ME(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ME(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var PE=function(e,t){var n=e.map(function(e){var n=null==t?void 0:t.find(function(t){return t.field===e.dimension});return n?{field:n.field,operator:n.operator,value:n.value}:{field:e.dimension,operator:e.currentOperator,value:e.currentValues}});return t?[].concat(CE(t),CE(n.filter(function(e){return!t.some(function(t){return t.field===e.field})}))):n};function TE(e){return TE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},TE(e)}function OE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function jE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?OE(Object(n),!0).forEach(function(t){_E(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OE(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _E(e,t,n){return(t=function(e){var t=function(e){if("object"!=TE(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=TE(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==TE(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||EE(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function EE(e,t){if(e){if("string"==typeof e)return RE(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?RE(e,t):void 0}}function RE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var AE=(0,G.createContext)(void 0),IE=function(e){var t,n=e.item,r=e.editingLayout,o=e.showData,i=e.activeFilters,a=e.queryWithToken,s=e.filtersUrl,l=e.filterValuesQuery,c=qe({queryKey:["chartFilters"],queryFn:function(){return lt(s)}}),u=c.data,d=c.isLoading,f=DE((0,G.useState)(),2),p=f[0],h=f[1],m=DE((0,G.useState)(null),2),g=m[0],b=m[1],y=DE((0,G.useState)([]),2),v=y[0],x=y[1],w=(0,G.useRef)([]),S=n.layout,k=n.chartType,C=n.chartConfig,M=n.query,P=jE({},a),T=M.params,O=null!==(t=null==T?void 0:T.filters)&&void 0!==t?t:[],j={lockedFilters:w.current,filterValuesQuery:l};return(0,G.useEffect)(function(){if(u&&Array.isArray(u.filters)){var e=u.filters.filter(function(e){return O.some(function(t){return t.field===e.dimension})}).map(function(e){var t=O.find(function(t){return t.field===e.dimension});return jE(jE({},e),{},{currentValues:(null==t?void 0:t.value)||[],operator:null==t?void 0:t.operator})});b(u.filters),h(e);var t=u.filters.map(function(t){var n,r,o=e.find(function(e){return e.dimension===t.dimension});return t.active||o?jE(jE({},t),{},{active:!0,currentValues:null!==(n=null==o?void 0:o.currentValues)&&void 0!==n?n:t.currentValues,operators:null!==(r=null==o?void 0:o.operators)&&void 0!==r?r:t.operators}):null}).filter(Boolean);x(t)}},[u]),(0,G.useEffect)(function(){if(i){var e=p?p.filter(function(e){return O.some(function(t){return t.field===e.dimension})||w.current.some(function(t){return t.dimension===e.dimension})}):[],t=g?g.map(function(e){var t=w.current.some(function(t){return t.dimension===e.dimension}),n=i.find(function(t){return t.dimension===e.dimension});return jE(jE({},e),{},{active:!!n,currentValues:t?e.currentValues||[]:(null==n?void 0:n.currentValues)||[],currentOperator:t?e.currentOperator:(null==n?void 0:n.currentOperator)||e.currentOperator})}):null;b(t),h(e),x(t?t.map(function(t){var n,r,o=e.find(function(e){return e.dimension===t.dimension});return t.active||o?jE(jE({},t),{},{active:!0,currentValues:null!==(n=null==o?void 0:o.currentValues)&&void 0!==n?n:t.currentValues,operators:null!==(r=null==o?void 0:o.operators)&&void 0!==r?r:t.operators}):null}).filter(Boolean):[])}},[i]),d?(0,le.jsx)("div",{className:"dashboard-item-loading",children:(0,le.jsx)($f,{})}):(0,le.jsxs)("div",{className:"dashboard-item",children:["headlines"!==k&&(0,le.jsx)(AE.Provider,{value:j,children:(0,le.jsx)(Mf,{title:C.title,titleTooltip:C.titleTooltip,editingLayout:r,showData:o,chartFilters:p,filterChart:function(e){var t=e.filter(function(e){var t=null==i?void 0:i.find(function(t){return t.dimension===e.dimension&&t.active});return!!w.current.some(function(t){return t.dimension===e.dimension})||(t?e.active&&JSON.stringify(e.currentValues)!==JSON.stringify(t.currentValues):e.active)});h(t);var n=e.map(function(e){return t.some(function(t){return t.dimension===e.dimension})?jE(jE({},e),{},{currentValues:[],operator:""}):e});b(n);var r=e.filter(function(e){return e.active});x(r),P&&P.params&&"object"===TE(P.params)&&"filters"in P.params&&(P.params.filters=PE(r,O))},setLockedFilters:function(e){var t,n=w.current.some(function(t){return t.dimension===e.dimension});w.current=n?w.current.filter(function(t){return t.dimension!==e.dimension}):[].concat(function(e){if(Array.isArray(e))return RE(e)}(t=w.current)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||EE(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[e])},lockedFilters:w.current,globalFilters:g,chartQuery:P,activeFilterCount:v.length,systemFilters:O})}),(0,le.jsx)(kE,{dataQuery:a,chartQueryKey:S.i,chartType:k,chartConfig:C,showData:o})]})};function FE(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var l=r&&r.prototype instanceof s?r:s,c=Object.create(l.prototype);return LE(c,"_invoke",function(n,r,o){var i,s,l,c=0,u=o||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return i=t,s=0,l=e,f.n=n,a}};function p(n,r){for(s=n,l=r,t=0;!d&&c&&!o&&t<u.length;t++){var o,i=u[t],p=f.p,h=i[2];n>3?(o=h===r)&&(l=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=n<2&&p<i[1])?(s=0,f.v=r,f.n=i[1]):p<h&&(o=n<3||i[0]>r||r>h)&&(i[4]=n,i[5]=r,f.n=h,s=0))}if(o||n>1)return a;throw d=!0,r}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&p(u,h),s=u,l=h;(t=s<2?e:l)||!d;){i||(s?s<3?(s>1&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(c=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(d=f.n<0)?l:n.call(r,f))!==a)break}catch(t){i=e,s=1,l=t}finally{c=1}}return{value:t,done:d}}}(n,o,i),!0),c}var a={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(LE(t={},r,function(){return this}),t),d=c.prototype=s.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,LE(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,LE(d,"constructor",c),LE(c,"constructor",l),l.displayName="GeneratorFunction",LE(c,o,"GeneratorFunction"),LE(d),LE(d,o,"Generator"),LE(d,r,function(){return this}),LE(d,"toString",function(){return"[object Generator]"}),(FE=function(){return{w:i,m:f}})()}function LE(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}LE=function(e,t,n,r){function i(t,n){LE(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},LE(e,t,n,r)}function NE(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}var zE=function(){var e,t=(e=FE().m(function e(t){var n,r,o,i,a=arguments;return FE().w(function(e){for(;;)switch(e.n){case 0:if(n=a.length>1&&void 0!==a[1]?a[1]:{},r=a.length>2?a[2]:void 0,t){e.n=1;break}throw new Error("Data URL is required to fetch filter values");case 1:return e.n=2,Je(t,n,r);case 2:return o=e.v,i=o.map(function(e){var t=String(e);return"true"===t.toLowerCase()||"false"===t.toLowerCase()?t.charAt(0).toUpperCase()+t.slice(1):t}),e.a(2,i)}},e)}),function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){NE(i,r,o,a,s,"next",e)}function s(e){NE(i,r,o,a,s,"throw",e)}a(void 0)})});return function(e){return t.apply(this,arguments)}}(),$E=Oa({palette:{primary:{main:GO["green-2"]}},components:{MuiMenuItem:{styleOverrides:{root:{fontSize:"var(--font-size-md, 14px)","&&.Mui-selected":{backgroundColor:GO["green-2"],color:"#FFFFFF","&&:hover":{backgroundColor:GO["green-4"]}},"&&:hover":{backgroundColor:"#dfdcdb"}}}},MuiMenu:{styleOverrides:{list:{maxHeight:250,overflowY:"auto"}}},MuiOutlinedInput:{styleOverrides:{root:{"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:GO["green-2"]},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:GO["green-2"]},"&.Mui-error .MuiOutlinedInput-notchedOutline":{borderColor:GO["red-1"]},"&.Mui-error:hover .MuiOutlinedInput-notchedOutline":{borderColor:GO["red-1"]},"&.Mui-error.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:GO["red-1"]}}}},MuiPickersOutlinedInput:{styleOverrides:{root:{fontSize:"var(--font-size-md, 14px)","& .MuiSvgIcon-root":{fontSize:"20px"},"&.Mui-focused .MuiPickersOutlinedInput-notchedOutline":{borderColor:GO["green-2"]},"&:hover .MuiPickersOutlinedInput-notchedOutline":{borderColor:GO["green-2"]},"&.Mui-error .MuiPickersOutlinedInput-notchedOutline":{borderColor:GO["red-1"]},"&.Mui-error:hover .MuiPickersOutlinedInput-notchedOutline":{borderColor:GO["red-1"]},"&.Mui-error.Mui-focused .MuiPickersOutlinedInput-notchedOutline":{borderColor:GO["red-1"]}}}},MuiInputLabel:{styleOverrides:{root:{fontSize:"var(--font-size-md, 14px)","&.MuiInputLabel-shrink":{color:GO["green-2"],"&.Mui-focused":{color:GO["green-2"]},"&.Mui-error":{color:GO["red-1"]}}}}},MuiChip:{styleOverrides:{root:{backgroundColor:GO["green-2"],color:"#FFFFFF"}}}}});function VE(e){const{theme:t,name:n,props:r}=e;return t&&t.components&&t.components[n]&&t.components[n].defaultProps?Gn(t.components[n].defaultProps,r):r}function BE(e,t,n,r,o){const[i,a]=G.useState(()=>o&&n?n(e).matches:r?r(e).matches:t);return Kn(()=>{if(!n)return;const t=n(e),r=()=>{a(t.matches)};return r(),t.addEventListener("change",r),()=>{t.removeEventListener("change",r)}},[e,n]),i}const WE={...X}.useSyncExternalStore;function HE(e,t,n,r,o){const i=G.useCallback(()=>t,[t]),a=G.useMemo(()=>{if(o&&n)return()=>n(e).matches;if(null!==r){const{matches:t}=r(e);return()=>t}return i},[i,e,r,o,n]),[s,l]=G.useMemo(()=>{if(null===n)return[i,()=>()=>{}];const t=n(e);return[()=>t.matches,e=>(t.addEventListener("change",e),()=>{t.removeEventListener("change",e)})]},[i,n,e]);return WE(l,s,a)}function qE(e={}){const{themeId:t}=e;return function(e,n={}){let r=Bn();r&&t&&(r=r[t]||r);const o="undefined"!=typeof window&&void 0!==window.matchMedia,{defaultMatches:i=!1,matchMedia:a=(o?window.matchMedia:null),ssrMatchMedia:s=null,noSsr:l=!1}=VE({name:"MuiUseMediaQuery",props:n,theme:r});let c="function"==typeof e?e(r):e;return c=c.replace(/^@media( ?)/m,""),c.includes("print")&&console.warn(["MUI: You have provided a `print` query to the `useMediaQuery` hook.","Using the print media query to modify print styles can lead to unexpected results.","Consider using the `displayPrint` field in the `sx` prop instead.","More information about `displayPrint` on our docs: https://mui.com/system/display/#display-in-print."].join("\n")),(void 0!==WE?HE:BE)(c,i,a,s,l)}}qE();const YE=qE({themeId:zo});function UE({props:e,name:t}){return function({props:e,name:t,defaultTheme:n,themeId:r}){let o=Ro(n);return r&&(o=o[r]||o),VE({theme:o,name:t,props:e})}({props:e,name:t,defaultTheme:Ua,themeId:zo})}var GE=a(5556);const XE=GE.oneOfType([GE.func,GE.object]),QE=(e,t)=>e.length===t.length&&t.every(t=>e.includes(t)),KE=({openTo:e,defaultOpenTo:t,views:n,defaultViews:r})=>{const o=n??r;let i;if(null!=e)i=e;else if(o.includes(t))i=t;else{if(!(o.length>0))throw new Error("MUI X: The `views` prop must contain at least one view.");i=o[0]}return{views:o,openTo:i}},ZE=(e,t,n)=>{let r=t;return r=e.setHours(r,e.getHours(n)),r=e.setMinutes(r,e.getMinutes(n)),r=e.setSeconds(r,e.getSeconds(n)),r=e.setMilliseconds(r,e.getMilliseconds(n)),r},JE=({date:e,disableFuture:t,disablePast:n,maxDate:r,minDate:o,isDateDisabled:i,adapter:a,timezone:s})=>{const l=ZE(a,a.date(void 0,s),e);n&&a.isBefore(o,l)&&(o=l),t&&a.isAfter(r,l)&&(r=l);let c=e,u=e;for(a.isBefore(e,o)&&(c=o,u=null),a.isAfter(e,r)&&(u&&(u=r),c=null);c||u;){if(c&&a.isAfter(c,r)&&(c=null),u&&a.isBefore(u,o)&&(u=null),c){if(!i(c))return c;c=a.addDays(c,1)}if(u){if(!i(u))return u;u=a.addDays(u,-1)}}return null},eR=(e,t,n)=>null!=t&&e.isValid(t)?t:n,tR=(e,t)=>{const n=[e.startOfYear(t)];for(;n.length<12;){const t=n[n.length-1];n.push(e.addMonths(t,1))}return n},nR=(e,t,n)=>"date"===n?e.startOfDay(e.date(void 0,t)):e.date(void 0,t),rR=(e,t)=>{const n=e.setHours(e.date(),"am"===t?2:14);return e.format(n,"meridiem")},oR=["year","month","day"],iR=e=>oR.includes(e),aR=(e,{format:t,views:n},r)=>{if(null!=t)return t;const o=e.formats;return QE(n,["year"])?o.year:QE(n,["month"])?o.month:QE(n,["day"])?o.dayOfMonth:QE(n,["month","year"])?`${o.month} ${o.year}`:QE(n,["day","month"])?`${o.month} ${o.dayOfMonth}`:r?/en/.test(e.getCurrentLocaleCode())?o.normalDateWithWeekday:o.normalDate:o.keyboardDate},sR=(e,t)=>{const n=e.startOfWeek(t);return[0,1,2,3,4,5,6].map(t=>e.addDays(n,t))},lR=["hours","minutes","seconds"],cR=["hours","minutes","seconds","meridiem"],uR=e=>lR.includes(e),dR=e=>cR.includes(e),fR=(e,t,n)=>n&&(e>=12?"pm":"am")!==t?"am"===t?e-12:e+12:e,pR=(e,t)=>3600*t.getHours(e)+60*t.getMinutes(e)+t.getSeconds(e),hR=(e,t)=>(n,r)=>e?t.isAfter(n,r):pR(n,t)>pR(r,t),mR=(e,{format:t,views:n,ampm:r})=>{if(null!=t)return t;const o=e.formats;return QE(n,["hours"])?r?`${o.hours12h} ${o.meridiem}`:o.hours24h:QE(n,["minutes"])?o.minutes:QE(n,["seconds"])?o.seconds:QE(n,["minutes","seconds"])?`${o.minutes}:${o.seconds}`:QE(n,["hours","minutes","seconds"])?r?`${o.hours12h}:${o.minutes}:${o.seconds} ${o.meridiem}`:`${o.hours24h}:${o.minutes}:${o.seconds}`:r?`${o.hours12h}:${o.minutes} ${o.meridiem}`:`${o.hours24h}:${o.minutes}`},gR={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},bR=(e,t,n)=>{if(t===gR.year)return e.startOfYear(n);if(t===gR.month)return e.startOfMonth(n);if(t===gR.day)return e.startOfDay(n);let r=n;return t<gR.minutes&&(r=e.setMinutes(r,0)),t<gR.seconds&&(r=e.setSeconds(r,0)),t<gR.milliseconds&&(r=e.setMilliseconds(r,0)),r},yR=(e,t)=>{const n=e.formatTokenMap[t];if(null==n)throw new Error([`MUI X: The token "${t}" is not supported by the Date and Time Pickers.`,"Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported."].join("\n"));return"string"==typeof n?{type:n,contentType:"meridiem"===n?"letter":"digit",maxLength:void 0}:{type:n.sectionType,contentType:n.contentType,maxLength:n.maxLength}},vR=(e,t)=>{const n=[],r=e.date(void 0,"default"),o=e.startOfWeek(r),i=e.endOfWeek(r);let a=o;for(;e.isBefore(a,i);)n.push(a),a=e.addDays(a,1);return n.map(n=>e.formatByString(n,t))},xR=(e,t,n,r)=>{switch(n){case"month":return tR(e,e.date(void 0,t)).map(t=>e.formatByString(t,r));case"weekDay":return vR(e,r);case"meridiem":{const n=e.date(void 0,t);return[e.startOfDay(n),e.endOfDay(n)].map(t=>e.formatByString(t,r))}default:return[]}},wR=["0","1","2","3","4","5","6","7","8","9"],SR=(e,t)=>{if("0"===t[0])return e;const n=[];let r="";for(let o=0;o<e.length;o+=1){r+=e[o];const i=t.indexOf(r);i>-1&&(n.push(i.toString()),r="")}return n.join("")},kR=(e,t)=>"0"===t[0]?e:e.split("").map(e=>t[Number(e)]).join(""),CR=(e,t)=>{const n=SR(e,t);return" "!==n&&!Number.isNaN(Number(n))},MR=(e,t)=>Number(e).toString().padStart(t,"0"),PR=(e,t,n,r,o)=>{if("day"===o.type&&"digit-with-letter"===o.contentType){const r=e.setDate(n.longestMonth,t);return e.formatByString(r,o.format)}let i=t.toString();return o.hasLeadingZerosInInput&&(i=MR(i,o.maxLength)),kR(i,r)},TR=(e,t,n)=>{let r=e.value||e.placeholder;const o="non-input"===t?e.hasLeadingZerosInFormat:e.hasLeadingZerosInInput;return"non-input"===t&&e.hasLeadingZerosInInput&&!e.hasLeadingZerosInFormat&&(r=Number(SR(r,n)).toString()),["input-rtl","input-ltr"].includes(t)&&"digit"===e.contentType&&!o&&1===r.length&&(r=`${r}`),"input-rtl"===t&&(r=`${r}`),r},OR=(e,t,n,r)=>e.formatByString(e.parse(t,n),r),jR=(e,t)=>4===e.formatByString(e.date(void 0,"system"),t).length,_R=(e,t,n,r)=>{if("digit"!==t)return!1;const o=e.date(void 0,"default");switch(n){case"year":return"dayjs"===e.lib&&"YY"===r||e.formatByString(e.setYear(o,1),r).startsWith("0");case"month":return e.formatByString(e.startOfYear(o),r).length>1;case"day":return e.formatByString(e.startOfMonth(o),r).length>1;case"weekDay":return e.formatByString(e.startOfWeek(o),r).length>1;case"hours":return e.formatByString(e.setHours(o,1),r).length>1;case"minutes":return e.formatByString(e.setMinutes(o,1),r).length>1;case"seconds":return e.formatByString(e.setSeconds(o,1),r).length>1;default:throw new Error("Invalid section type")}},DR={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8,empty:9},ER=(e,t,n,r,o)=>[...n].sort((e,t)=>DR[e.type]-DR[t.type]).reduce((n,r)=>!o||r.modified?((e,t,n,r)=>{switch(t.type){case"year":return e.setYear(r,e.getYear(n));case"month":return e.setMonth(r,e.getMonth(n));case"weekDay":{let r=e.formatByString(n,t.format);t.hasLeadingZerosInInput&&(r=MR(r,t.maxLength));const o=vR(e,t.format),i=o.indexOf(r),a=o.indexOf(t.value)-i;return e.addDays(n,a)}case"day":return e.setDate(r,e.getDate(n));case"meridiem":{const t=e.getHours(n)<12,o=e.getHours(r);return t&&o>=12?e.addHours(r,-12):!t&&o<12?e.addHours(r,12):r}case"hours":return e.setHours(r,e.getHours(n));case"minutes":return e.setMinutes(r,e.getMinutes(n));case"seconds":return e.setSeconds(r,e.getSeconds(n));default:return r}})(e,r,t,n):n,r),RR=(e,t)=>{if(null==e)return null;if("all"===e)return"all";if("string"==typeof e){const n=t.findIndex(t=>t.type===e);return-1===n?null:n}return e},AR=["value","referenceDate"],IR={emptyValue:null,getTodayValue:nR,getInitialReferenceValue:e=>{let{value:t,referenceDate:n}=e,r=il(e,AR);return r.adapter.isValid(t)?t:null!=n?n:(({props:e,adapter:t,granularity:n,timezone:r,getTodayDate:o})=>{let i=o?o():bR(t,n,nR(t,r));null!=e.minDate&&t.isAfterDay(e.minDate,i)&&(i=bR(t,n,e.minDate)),null!=e.maxDate&&t.isBeforeDay(e.maxDate,i)&&(i=bR(t,n,e.maxDate));const a=hR(e.disableIgnoringDatePartForTimeValidation??!1,t);return null!=e.minTime&&a(e.minTime,i)&&(i=bR(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:ZE(t,i,e.minTime))),null!=e.maxTime&&a(i,e.maxTime)&&(i=bR(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:ZE(t,i,e.maxTime))),i})(r)},cleanValue:(e,t)=>e.isValid(t)?t:null,areValuesEqual:(e,t,n)=>!e.isValid(t)&&null!=t&&!e.isValid(n)&&null!=n||e.isEqual(t,n),isSameError:(e,t)=>e===t,hasError:e=>null!=e,defaultErrorState:null,getTimezone:(e,t)=>e.isValid(t)?e.getTimezone(t):null,setTimezone:(e,t,n)=>null==n?null:e.setTimezone(n,t)},FR={updateReferenceValue:(e,t,n)=>e.isValid(t)?t:n,getSectionsFromValue:(e,t)=>t(e),getV7HiddenInputValueFromSections:e=>e.map(e=>`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`).join(""),getV6InputValueFromSections:(e,t,n)=>{const r=e.map(e=>{const r=TR(e,n?"input-rtl":"input-ltr",t);return`${e.startSeparator}${r}${e.endSeparator}`}).join("");return n?`${r}`:r},parseValueStr:(e,t,n)=>n(e.trim(),t),getDateFromSection:e=>e,getDateSectionsFromValue:e=>e,updateDateInValue:(e,t,n)=>n,clearDateSections:e=>e.map(e=>tr({},e,{value:""}))};function LR(e){return ss("MuiTypography",e)}ls("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const NR={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},zR=Xc,$R=Ka("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t[`align${ts(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(gs(({theme:e})=>({margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([e,t])=>"inherit"!==e&&t&&"object"==typeof t).map(([e,t])=>({props:{variant:e},style:t})),...Object.entries(e.palette).filter(bs()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette?.text||{}).filter(([,e])=>"string"==typeof e).map(([t])=>({props:{color:`text${ts(t)}`},style:{color:(e.vars||e).palette.text[t]}})),{props:({ownerState:e})=>"inherit"!==e.align,style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:e})=>e.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:e})=>e.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:e})=>e.paragraph,style:{marginBottom:16}}]}))),VR={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},BR=G.forwardRef(function(e,t){const{color:n,...r}=Za({props:e,name:"MuiTypography"}),o=zR({...r,...!NR[n]&&{color:n}}),{align:i="inherit",className:a,component:s,gutterBottom:l=!1,noWrap:c=!1,paragraph:u=!1,variant:d="body1",variantMapping:f=VR,...p}=o,h={...o,align:i,color:n,className:a,component:s,gutterBottom:l,noWrap:c,paragraph:u,variant:d,variantMapping:f},m=s||(u?"p":f[d]||VR[d])||"span",g=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=e;return Na({root:["root",i,"inherit"!==e.align&&`align${ts(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]},LR,a)})(h);return(0,le.jsx)($R,{as:m,ref:t,className:Un(g.root,a),...p,ownerState:h,style:{..."inherit"!==i&&{"--Typography-textAlign":i},...p.style}})});function WR(e){return ss("MuiPickersToolbar",e)}const HR=ls("MuiPickersToolbar",["root","title","content"]),qR=["localeText"],YR=G.createContext(null),UR=function(e){const{localeText:t}=e,n=il(e,qR),{adapter:r,localeText:o}=G.useContext(YR)??{utils:void 0,adapter:void 0,localeText:void 0},i=UE({props:n,name:"MuiLocalizationProvider"}),{children:a,dateAdapter:s,dateFormats:l,dateLibInstance:c,adapterLocale:u,localeText:d}=i,f=G.useMemo(()=>tr({},d,o,t),[d,o,t]),p=G.useMemo(()=>{if(!s)return r||null;const e=new s({locale:u,formats:l,instance:c});if(!e.isMUIAdapter)throw new Error(["MUI X: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/quickstart/#installation"].join("\n"));return e},[s,u,l,c,r]),h=G.useMemo(()=>p?{minDate:p.date("1900-01-01T00:00:00.000"),maxDate:p.date("2099-12-31T00:00:00.000")}:null,[p]),m=G.useMemo(()=>({utils:p,adapter:p,defaultDates:h,localeText:f}),[h,p,f]);return(0,le.jsx)(YR.Provider,{value:m,children:a})},GR=G.createContext(()=>!0),XR=G.createContext(null);function QR(){return G.useContext(XR)}const KR=G.createContext(null),ZR=()=>{const e=G.useContext(KR);if(null==e)throw new Error("MUI X: The `usePickerContext` hook can only be called inside the context of a Picker component");return e},JR=G.createContext(null),eA=G.createContext({ownerState:{isPickerDisabled:!1,isPickerReadOnly:!1,isPickerValueEmpty:!1,isPickerOpen:!1,pickerVariant:"desktop",pickerOrientation:"portrait"},rootRefObject:{current:null},labelId:void 0,dismissViews:()=>{},hasUIView:!0,getCurrentViewMode:()=>"UI",triggerElement:null,viewContainerRole:null,defaultActionBarActions:[],onPopperExited:void 0});function tA(e){const{contextValue:t,actionsContextValue:n,privateContextValue:r,fieldPrivateContextValue:o,isValidContextValue:i,localeText:a,children:s}=e;return(0,le.jsx)(KR.Provider,{value:t,children:(0,le.jsx)(JR.Provider,{value:n,children:(0,le.jsx)(eA.Provider,{value:r,children:(0,le.jsx)(XR.Provider,{value:o,children:(0,le.jsx)(GR.Provider,{value:i,children:(0,le.jsx)(UR,{localeText:a,children:s})})})})})})}const nA=()=>G.useContext(eA);function rA(){const{ownerState:e}=nA(),t=Hn();return G.useMemo(()=>tr({},e,{toolbarDirection:t?"rtl":"ltr"}),[e,t])}const oA=["children","className","classes","toolbarTitle","hidden","titleId","classes","landscapeDirection"],iA=Ka("div",{name:"MuiPickersToolbar",slot:"Root"})(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:e.spacing(2,3),variants:[{props:{pickerOrientation:"landscape"},style:{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"}}]})),aA=Ka("div",{name:"MuiPickersToolbar",slot:"Content",shouldForwardProp:e=>Va(e)&&"landscapeDirection"!==e})({display:"flex",flexWrap:"wrap",width:"100%",flex:1,justifyContent:"space-between",alignItems:"center",flexDirection:"row",variants:[{props:{pickerOrientation:"landscape"},style:{justifyContent:"flex-start",alignItems:"flex-start",flexDirection:"column"}},{props:{pickerOrientation:"landscape",landscapeDirection:"row"},style:{flexDirection:"row"}}]}),sA=G.forwardRef(function(e,t){const n=UE({props:e,name:"MuiPickersToolbar"}),{children:r,className:o,classes:i,toolbarTitle:a,hidden:s,titleId:l,landscapeDirection:c}=n,u=il(n,oA),d=rA(),f=(e=>Na({root:["root"],title:["title"],content:["content"]},WR,e))(i);return s?null:(0,le.jsxs)(iA,tr({ref:t,className:Un(f.root,o),ownerState:d},u,{children:[(0,le.jsx)(BR,{color:"text.secondary",variant:"overline",id:l,className:f.title,children:a}),(0,le.jsx)(aA,{className:f.content,ownerState:d,landscapeDirection:c,children:r})]}))}),lA={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"Open previous view",openNextView:"Open next view",calendarViewSwitchingButtonAriaLabel:e=>"year"===e?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",startDate:"Start date",startTime:"Start time",endDate:"End date",endTime:"End time",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",nextStepButtonLabel:"Next",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",timeRangePickerToolbarTitle:"Select time range",clockLabelText:(e,t)=>`Select ${e}. ${t?`Selected time is ${t}`:"No time selected"}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,selectViewText:e=>`Select ${e}`,calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:e=>`Week ${e}`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:e=>e?`Choose date, selected date is ${e}`:"Choose date",openTimePickerDialogue:e=>e?`Choose time, selected time is ${e}`:"Choose time",openRangePickerDialogue:e=>e?`Choose range, selected range is ${e}`:"Choose range",fieldClearLabel:"Clear",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:e=>"Y".repeat(e.digitAmount),fieldMonthPlaceholder:e=>"letter"===e.contentType?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:e=>"letter"===e.contentType?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa",year:"Year",month:"Month",day:"Day",weekDay:"Week day",hours:"Hours",minutes:"Minutes",seconds:"Seconds",meridiem:"Meridiem",empty:"Empty"},cA=lA;tr({},lA);const uA=()=>{const e=G.useContext(YR);if(null===e)throw new Error(["MUI X: Can not find the date and time pickers localization context.","It looks like you forgot to wrap your component in LocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package"].join("\n"));if(null===e.adapter)throw new Error(["MUI X: Can not find the date and time pickers adapter from its localization context.","It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider."].join("\n"));const t=G.useMemo(()=>tr({},cA,e.localeText),[e.localeText]);return G.useMemo(()=>tr({},e,{localeText:t}),[e,t])},dA=()=>uA().adapter,fA=()=>uA().localeText;function pA(e){return ss("MuiDatePickerToolbar",e)}ls("MuiDatePickerToolbar",["root","title"]);const hA=["toolbarFormat","toolbarPlaceholder","className","classes"],mA=Ka(sA,{name:"MuiDatePickerToolbar",slot:"Root"})({}),gA=Ka(BR,{name:"MuiDatePickerToolbar",slot:"Title"})({variants:[{props:{pickerOrientation:"landscape"},style:{margin:"auto 16px auto auto"}}]}),bA=G.forwardRef(function(e,t){const n=UE({props:e,name:"MuiDatePickerToolbar"}),{toolbarFormat:r,toolbarPlaceholder:o="––",className:i,classes:a}=n,s=il(n,hA),l=dA(),{value:c,views:u,orientation:d}=ZR(),f=fA(),p=rA(),h=(e=>Na({root:["root"],title:["title"]},pA,e))(a),m=G.useMemo(()=>{if(!l.isValid(c))return o;const e=aR(l,{format:r,views:u},!0);return l.formatByString(c,e)},[c,r,o,l,u]);return(0,le.jsx)(mA,tr({ref:t,toolbarTitle:f.datePickerToolbarTitle,className:Un(h.root,i)},s,{children:(0,le.jsx)(gA,{variant:"h4",align:"landscape"===d?"left":"center",ownerState:p,className:h.title,children:m})}))}),yA=({props:e,value:t,timezone:n,adapter:r})=>{if(null===t)return null;const{shouldDisableDate:o,shouldDisableMonth:i,shouldDisableYear:a,disablePast:s,disableFuture:l,minDate:c,maxDate:u}=e,d=r.date(void 0,n);switch(!0){case!r.isValid(t):return"invalidDate";case Boolean(o&&o(t)):return"shouldDisableDate";case Boolean(i&&i(t)):return"shouldDisableMonth";case Boolean(a&&a(t)):return"shouldDisableYear";case Boolean(l&&r.isAfterDay(t,d)):return"disableFuture";case Boolean(s&&r.isBeforeDay(t,d)):return"disablePast";case Boolean(c&&r.isBeforeDay(t,c)):return"minDate";case Boolean(u&&r.isAfterDay(t,u)):return"maxDate";default:return null}};yA.valueManager=IR;const vA=()=>uA().defaultDates,xA=e=>{const t=dA(),n=G.useRef(void 0);return void 0===n.current&&(n.current=t.date(void 0,e)),n.current};function wA(e){const t=dA(),n=fA();return G.useMemo(()=>{const r=t.isValid(e)?t.format(e,"fullDate"):null;return n.openDatePickerDialogue(r)},[e,n,t])}function SA(e){const t=dA(),n=kA(e);return G.useMemo(()=>tr({},e,n,{format:e.format??t.formats.keyboardDate}),[e,n,t])}function kA(e){const t=dA(),n=vA();return G.useMemo(()=>({disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,minDate:eR(t,e.minDate,n.minDate),maxDate:eR(t,e.maxDate,n.maxDate)}),[e.minDate,e.maxDate,e.disableFuture,e.disablePast,t,n])}function CA(e,t){const n=UE({props:e,name:t}),r=kA(n),o=G.useMemo(()=>null==n.localeText?.toolbarTitle?n.localeText:tr({},n.localeText,{datePickerToolbarTitle:n.localeText.toolbarTitle}),[n.localeText]);return tr({},n,r,{localeText:o},KE({views:n.views,openTo:n.openTo,defaultViews:["year","day"],defaultOpenTo:"day"}),{slots:tr({toolbar:bA},n.slots)})}const MA=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],PA=["disablePast","disableFuture","minTime","maxTime","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],TA=["minDateTime","maxDateTime"],OA=[...MA,...PA,...TA],jA=e=>OA.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{});function _A(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function DA(e){return e instanceof _A(e).Element||e instanceof Element}function EA(e){return e instanceof _A(e).HTMLElement||e instanceof HTMLElement}function RA(e){return"undefined"!=typeof ShadowRoot&&(e instanceof _A(e).ShadowRoot||e instanceof ShadowRoot)}var AA=Math.max,IA=Math.min,FA=Math.round;function LA(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function NA(){return!/^((?!chrome|android).)*safari/i.test(LA())}function zA(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&EA(e)&&(o=e.offsetWidth>0&&FA(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&FA(r.height)/e.offsetHeight||1);var a=(DA(e)?_A(e):window).visualViewport,s=!NA()&&n,l=(r.left+(s&&a?a.offsetLeft:0))/o,c=(r.top+(s&&a?a.offsetTop:0))/i,u=r.width/o,d=r.height/i;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l,x:l,y:c}}function $A(e){var t=_A(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function VA(e){return e?(e.nodeName||"").toLowerCase():null}function BA(e){return((DA(e)?e.ownerDocument:e.document)||window.document).documentElement}function WA(e){return zA(BA(e)).left+$A(e).scrollLeft}function HA(e){return _A(e).getComputedStyle(e)}function qA(e){var t=HA(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function YA(e,t,n){void 0===n&&(n=!1);var r=EA(t),o=EA(t)&&function(e){var t=e.getBoundingClientRect(),n=FA(t.width)/e.offsetWidth||1,r=FA(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),i=BA(t),a=zA(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==VA(t)||qA(i))&&(s=function(e){return e!==_A(e)&&EA(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:$A(e);var t}(t)),EA(t)?((l=zA(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=WA(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function UA(e){var t=zA(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function GA(e){return"html"===VA(e)?e:e.assignedSlot||e.parentNode||(RA(e)?e.host:null)||BA(e)}function XA(e){return["html","body","#document"].indexOf(VA(e))>=0?e.ownerDocument.body:EA(e)&&qA(e)?e:XA(GA(e))}function QA(e,t){var n;void 0===t&&(t=[]);var r=XA(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=_A(r),a=o?[i].concat(i.visualViewport||[],qA(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(QA(GA(a)))}function KA(e){return["table","td","th"].indexOf(VA(e))>=0}function ZA(e){return EA(e)&&"fixed"!==HA(e).position?e.offsetParent:null}function JA(e){for(var t=_A(e),n=ZA(e);n&&KA(n)&&"static"===HA(n).position;)n=ZA(n);return n&&("html"===VA(n)||"body"===VA(n)&&"static"===HA(n).position)?t:n||function(e){var t=/firefox/i.test(LA());if(/Trident/i.test(LA())&&EA(e)&&"fixed"===HA(e).position)return null;var n=GA(e);for(RA(n)&&(n=n.host);EA(n)&&["html","body"].indexOf(VA(n))<0;){var r=HA(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var eI="top",tI="bottom",nI="right",rI="left",oI="auto",iI=[eI,tI,nI,rI],aI="start",sI="end",lI="viewport",cI="popper",uI=iI.reduce(function(e,t){return e.concat([t+"-"+aI,t+"-"+sI])},[]),dI=[].concat(iI,[oI]).reduce(function(e,t){return e.concat([t,t+"-"+aI,t+"-"+sI])},[]),fI=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function pI(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}}),r.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){n.has(e.name)||o(e)}),r}function hI(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}var mI={placement:"bottom",modifiers:[],strategy:"absolute"};function gI(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}function bI(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,i=void 0===o?mI:o;return function(e,t,n){void 0===n&&(n=i);var o={placement:"bottom",orderedModifiers:[],options:Object.assign({},mI,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},a=[],s=!1,l={state:o,setOptions:function(n){var s="function"==typeof n?n(o.options):n;c(),o.options=Object.assign({},i,o.options,s),o.scrollParents={reference:DA(e)?QA(e):e.contextElement?QA(e.contextElement):[],popper:QA(t)};var u,d,f=function(e){var t=pI(e);return fI.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}((u=[].concat(r,o.options.modifiers),d=u.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{}),Object.keys(d).map(function(e){return d[e]})));return o.orderedModifiers=f.filter(function(e){return e.enabled}),o.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,i=e.effect;if("function"==typeof i){var s=i({state:o,name:t,instance:l,options:r});a.push(s||function(){})}}),l.update()},forceUpdate:function(){if(!s){var e=o.elements,t=e.reference,n=e.popper;if(gI(t,n)){o.rects={reference:YA(t,JA(n),"fixed"===o.options.strategy),popper:UA(n)},o.reset=!1,o.placement=o.options.placement,o.orderedModifiers.forEach(function(e){return o.modifiersData[e.name]=Object.assign({},e.data)});for(var r=0;r<o.orderedModifiers.length;r++)if(!0!==o.reset){var i=o.orderedModifiers[r],a=i.fn,c=i.options,u=void 0===c?{}:c,d=i.name;"function"==typeof a&&(o=a({state:o,options:u,name:d,instance:l})||o)}else o.reset=!1,r=-1}}},update:hI(function(){return new Promise(function(e){l.forceUpdate(),e(o)})}),destroy:function(){c(),s=!0}};if(!gI(e,t))return l;function c(){a.forEach(function(e){return e()}),a=[]}return l.setOptions(n).then(function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)}),l}}var yI={passive:!0};const vI={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=void 0===o||o,a=r.resize,s=void 0===a||a,l=_A(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach(function(e){e.addEventListener("scroll",n.update,yI)}),s&&l.addEventListener("resize",n.update,yI),function(){i&&c.forEach(function(e){e.removeEventListener("scroll",n.update,yI)}),s&&l.removeEventListener("resize",n.update,yI)}},data:{}};function xI(e){return e.split("-")[0]}function wI(e){return e.split("-")[1]}function SI(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function kI(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?xI(o):null,a=o?wI(o):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(i){case eI:t={x:s,y:n.y-r.height};break;case tI:t={x:s,y:n.y+n.height};break;case nI:t={x:n.x+n.width,y:l};break;case rI:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=i?SI(i):null;if(null!=c){var u="y"===c?"height":"width";switch(a){case aI:t[c]=t[c]-(n[u]/2-r[u]/2);break;case sI:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}var CI={top:"auto",right:"auto",bottom:"auto",left:"auto"};function MI(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=a.x,p=void 0===f?0:f,h=a.y,m=void 0===h?0:h,g="function"==typeof u?u({x:p,y:m}):{x:p,y:m};p=g.x,m=g.y;var b=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),v=rI,x=eI,w=window;if(c){var S=JA(n),k="clientHeight",C="clientWidth";S===_A(n)&&"static"!==HA(S=BA(n)).position&&"absolute"===s&&(k="scrollHeight",C="scrollWidth"),(o===eI||(o===rI||o===nI)&&i===sI)&&(x=tI,m-=(d&&S===w&&w.visualViewport?w.visualViewport.height:S[k])-r.height,m*=l?1:-1),o!==rI&&(o!==eI&&o!==tI||i!==sI)||(v=nI,p-=(d&&S===w&&w.visualViewport?w.visualViewport.width:S[C])-r.width,p*=l?1:-1)}var M,P=Object.assign({position:s},c&&CI),T=!0===u?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:FA(n*o)/o||0,y:FA(r*o)/o||0}}({x:p,y:m},_A(n)):{x:p,y:m};return p=T.x,m=T.y,l?Object.assign({},P,((M={})[x]=y?"0":"",M[v]=b?"0":"",M.transform=(w.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",M)):Object.assign({},P,((t={})[x]=y?m+"px":"",t[v]=b?p+"px":"",t.transform="",t))}const PI={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,l=void 0===s||s,c={placement:xI(t.placement),variation:wI(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,MI(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,MI(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},TI={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];EA(o)&&VA(o)&&(Object.assign(o.style,n),Object.keys(r).forEach(function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]="",e},{});EA(r)&&VA(r)&&(Object.assign(r.style,i),Object.keys(o).forEach(function(e){r.removeAttribute(e)}))})}},requires:["computeStyles"]},OI={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=dI.reduce(function(e,n){return e[n]=function(e,t,n){var r=xI(e),o=[rI,eI].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[rI,nI].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e},{}),s=a[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}};var jI={left:"right",right:"left",bottom:"top",top:"bottom"};function _I(e){return e.replace(/left|right|bottom|top/g,function(e){return jI[e]})}var DI={start:"end",end:"start"};function EI(e){return e.replace(/start|end/g,function(e){return DI[e]})}function RI(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&RA(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function AI(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function II(e,t,n){return t===lI?AI(function(e,t){var n=_A(e),r=BA(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var c=NA();(c||!c&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+WA(e),y:l}}(e,n)):DA(t)?function(e,t){var n=zA(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):AI(function(e){var t,n=BA(e),r=$A(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=AA(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=AA(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+WA(e),l=-r.scrollTop;return"rtl"===HA(o||n).direction&&(s+=AA(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(BA(e)))}function FI(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function LI(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}function NI(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.strategy,a=void 0===i?e.strategy:i,s=n.boundary,l=void 0===s?"clippingParents":s,c=n.rootBoundary,u=void 0===c?lI:c,d=n.elementContext,f=void 0===d?cI:d,p=n.altBoundary,h=void 0!==p&&p,m=n.padding,g=void 0===m?0:m,b=FI("number"!=typeof g?g:LI(g,iI)),y=f===cI?"reference":cI,v=e.rects.popper,x=e.elements[h?y:f],w=function(e,t,n,r){var o="clippingParents"===t?function(e){var t=QA(GA(e)),n=["absolute","fixed"].indexOf(HA(e).position)>=0&&EA(e)?JA(e):e;return DA(n)?t.filter(function(e){return DA(e)&&RI(e,n)&&"body"!==VA(e)}):[]}(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce(function(t,n){var o=II(e,n,r);return t.top=AA(o.top,t.top),t.right=IA(o.right,t.right),t.bottom=IA(o.bottom,t.bottom),t.left=AA(o.left,t.left),t},II(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}(DA(x)?x:x.contextElement||BA(e.elements.popper),l,u,a),S=zA(e.elements.reference),k=kI({reference:S,element:v,strategy:"absolute",placement:o}),C=AI(Object.assign({},v,k)),M=f===cI?C:S,P={top:w.top-M.top+b.top,bottom:M.bottom-w.bottom+b.bottom,left:w.left-M.left+b.left,right:M.right-w.right+b.right},T=e.modifiersData.offset;if(f===cI&&T){var O=T[o];Object.keys(P).forEach(function(e){var t=[nI,tI].indexOf(e)>=0?1:-1,n=[eI,tI].indexOf(e)>=0?"y":"x";P[e]+=O[n]*t})}return P}const zI={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,h=void 0===p||p,m=n.allowedAutoPlacements,g=t.options.placement,b=xI(g),y=l||(b!==g&&h?function(e){if(xI(e)===oI)return[];var t=_I(e);return[EI(e),t,EI(t)]}(g):[_I(g)]),v=[g].concat(y).reduce(function(e,n){return e.concat(xI(n)===oI?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?dI:l,u=wI(r),d=u?s?uI:uI.filter(function(e){return wI(e)===u}):iI,f=d.filter(function(e){return c.indexOf(e)>=0});0===f.length&&(f=d);var p=f.reduce(function(t,n){return t[n]=NI(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[xI(n)],t},{});return Object.keys(p).sort(function(e,t){return p[e]-p[t]})}(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:m}):n)},[]),x=t.rects.reference,w=t.rects.popper,S=new Map,k=!0,C=v[0],M=0;M<v.length;M++){var P=v[M],T=xI(P),O=wI(P)===aI,j=[eI,tI].indexOf(T)>=0,_=j?"width":"height",D=NI(t,{placement:P,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),E=j?O?nI:rI:O?tI:eI;x[_]>w[_]&&(E=_I(E));var R=_I(E),A=[];if(i&&A.push(D[T]<=0),s&&A.push(D[E]<=0,D[R]<=0),A.every(function(e){return e})){C=P,k=!1;break}S.set(P,A)}if(k)for(var I=function(e){var t=v.find(function(t){var n=S.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return C=t,"break"},F=h?3:1;F>0&&"break"!==I(F);F--);t.placement!==C&&(t.modifiersData[r]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function $I(e,t,n){return AA(e,IA(t,n))}const VI={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0!==a&&a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=void 0===f||f,h=n.tetherOffset,m=void 0===h?0:h,g=NI(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),b=xI(t.placement),y=wI(t.placement),v=!y,x=SI(b),w="x"===x?"y":"x",S=t.modifiersData.popperOffsets,k=t.rects.reference,C=t.rects.popper,M="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,P="number"==typeof M?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),T=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(S){if(i){var j,_="y"===x?eI:rI,D="y"===x?tI:nI,E="y"===x?"height":"width",R=S[x],A=R+g[_],I=R-g[D],F=p?-C[E]/2:0,L=y===aI?k[E]:C[E],N=y===aI?-C[E]:-k[E],z=t.elements.arrow,$=p&&z?UA(z):{width:0,height:0},V=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},B=V[_],W=V[D],H=$I(0,k[E],$[E]),q=v?k[E]/2-F-H-B-P.mainAxis:L-H-B-P.mainAxis,Y=v?-k[E]/2+F+H+W+P.mainAxis:N+H+W+P.mainAxis,U=t.elements.arrow&&JA(t.elements.arrow),G=U?"y"===x?U.clientTop||0:U.clientLeft||0:0,X=null!=(j=null==T?void 0:T[x])?j:0,Q=R+Y-X,K=$I(p?IA(A,R+q-X-G):A,R,p?AA(I,Q):I);S[x]=K,O[x]=K-R}if(s){var Z,J="x"===x?eI:rI,ee="x"===x?tI:nI,te=S[w],ne="y"===w?"height":"width",re=te+g[J],oe=te-g[ee],ie=-1!==[eI,rI].indexOf(b),ae=null!=(Z=null==T?void 0:T[w])?Z:0,se=ie?re:te-k[ne]-C[ne]-ae+P.altAxis,le=ie?te+k[ne]+C[ne]-ae-P.altAxis:oe,ce=p&&ie?function(e,t,n){var r=$I(e,t,n);return r>n?n:r}(se,te,le):$I(p?se:re,te,p?le:oe);S[w]=ce,O[w]=ce-te}t.modifiersData[r]=O}},requiresIfExists:["offset"]},BI={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=xI(n.placement),l=SI(s),c=[rI,nI].indexOf(s)>=0?"height":"width";if(i&&a){var u=function(e,t){return FI("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:LI(e,iI))}(o.padding,n),d=UA(i),f="y"===l?eI:rI,p="y"===l?tI:nI,h=n.rects.reference[c]+n.rects.reference[l]-a[l]-n.rects.popper[c],m=a[l]-n.rects.reference[l],g=JA(i),b=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,y=h/2-m/2,v=u[f],x=b-d[c]-u[p],w=b/2-d[c]/2+y,S=$I(v,w,x),k=l;n.modifiersData[r]=((t={})[k]=S,t.centerOffset=S-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&RI(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function WI(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function HI(e){return[eI,nI,tI,rI].some(function(t){return e[t]>=0})}var qI=bI({defaultModifiers:[vI,{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=kI({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},PI,TI,OI,zI,VI,BI,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=NI(t,{elementContext:"reference"}),s=NI(t,{altBoundary:!0}),l=WI(a,r),c=WI(s,o,i),u=HI(l),d=HI(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}]});function YI(e){return ss("MuiPopper",e)}function UI(e){return"function"==typeof e?e():e}ls("MuiPopper",["root"]);const GI={},XI=G.forwardRef(function(e,t){const{anchorEl:n,children:r,direction:o,disablePortal:i,modifiers:a,open:s,placement:l,popperOptions:c,popperRef:u,slotProps:d={},slots:f={},TransitionProps:p,ownerState:h,...m}=e,g=G.useRef(null),b=js(g,t),y=G.useRef(null),v=js(y,u),x=G.useRef(v);Kn(()=>{x.current=v},[v]),G.useImperativeHandle(u,()=>y.current,[]);const w=function(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(l,o),[S,k]=G.useState(w),[C,M]=G.useState(UI(n));G.useEffect(()=>{y.current&&y.current.forceUpdate()}),G.useEffect(()=>{n&&M(UI(n))},[n]),Kn(()=>{if(!C||!s)return;let e=[{name:"preventOverflow",options:{altBoundary:i}},{name:"flip",options:{altBoundary:i}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:e})=>{k(e.placement)}}];null!=a&&(e=e.concat(a)),c&&null!=c.modifiers&&(e=e.concat(c.modifiers));const t=qI(C,g.current,{placement:w,...c,modifiers:e});return x.current(t),()=>{t.destroy(),x.current(null)}},[C,i,a,s,c,w]);const P={placement:S};null!==p&&(P.TransitionProps=p);const T=(e=>{const{classes:t}=e;return Na({root:["root"]},YI,t)})(e),O=f.root??"div",j=Fs({elementType:O,externalSlotProps:d.root,externalForwardedProps:m,additionalProps:{role:"tooltip",ref:b},ownerState:e,className:T.root});return(0,le.jsx)(O,{...j,children:"function"==typeof r?r(P):r})}),QI=Ka(G.forwardRef(function(e,t){const{anchorEl:n,children:r,container:o,direction:i="ltr",disablePortal:a=!1,keepMounted:s=!1,modifiers:l,open:c,placement:u="bottom",popperOptions:d=GI,popperRef:f,style:p,transition:h=!1,slotProps:m={},slots:g={},...b}=e,[y,v]=G.useState(!0);if(!s&&!c&&(!h||y))return null;let x;if(o)x=o;else if(n){const e=UI(n);x=e&&void 0!==e.nodeType?Ts(e).body:Ts(null).body}const w=c||!s||h&&!y?void 0:"none",S=h?{in:c,onEnter:()=>{v(!1)},onExited:()=>{v(!0)}}:void 0;return(0,le.jsx)(Dl,{disablePortal:a,container:x,children:(0,le.jsx)(XI,{anchorEl:n,direction:i,disablePortal:a,modifiers:l,ref:t,open:h?!y:c,placement:u,popperOptions:d,popperRef:f,slotProps:m,slots:g,...b,style:{position:"fixed",top:0,left:0,display:w,...p},TransitionProps:S,children:r})})}),{name:"MuiPopper",slot:"Root"})({}),KI=G.forwardRef(function(e,t){const n=Hn(),r=Za({props:e,name:"MuiPopper"}),{anchorEl:o,component:i,components:a,componentsProps:s,container:l,disablePortal:c,keepMounted:u,modifiers:d,open:f,placement:p,popperOptions:h,popperRef:m,transition:g,slots:b,slotProps:y,...v}=r,x=b?.root??a?.Root,w={anchorEl:o,container:l,disablePortal:c,keepMounted:u,modifiers:d,open:f,placement:p,popperOptions:h,popperRef:m,transition:g,...v};return(0,le.jsx)(QI,{as:i,direction:n?"rtl":"ltr",slots:{root:x},slotProps:y??s,...w,ref:t})});function ZI(e){return ss("MuiPickerPopper",e)}function JI(e,t){return Array.isArray(t)?t.every(t=>-1!==e.indexOf(t)):-1!==e.indexOf(t)}ls("MuiPickerPopper",["root","paper"]);const eF=(e=document)=>{const t=e.activeElement;return t?t.shadowRoot?eF(t.shadowRoot):t:null},tF=e=>eF(Ts(e)),nF=e=>Array.from(e.children).indexOf(tF(e)),rF="@media (pointer: fine)";function oF(...e){return e.reduce((e,t)=>(Array.isArray(t)?e.push(...t):null!=t&&e.push(t),e),[])}const iF=["PaperComponent","ownerState","children","paperSlotProps","paperClasses","onPaperClick","onPaperTouchStart"],aF=Ka(KI,{name:"MuiPickerPopper",slot:"Root"})(({theme:e})=>({zIndex:e.zIndex.modal})),sF=Ka(ec,{name:"MuiPickerPopper",slot:"Paper"})({outline:0,transformOrigin:"top center",variants:[{props:({popperPlacement:e})=>new Set(["top","top-start","top-end"]).has(e),style:{transformOrigin:"bottom center"}}]}),lF=G.forwardRef((e,t)=>{const{PaperComponent:n,ownerState:r,children:o,paperSlotProps:i,paperClasses:a,onPaperClick:s,onPaperTouchStart:l}=e,c=il(e,iF),u=Fs({elementType:n,externalSlotProps:i,additionalProps:{tabIndex:-1,elevation:8,ref:t},className:a,ownerState:r});return(0,le.jsx)(n,tr({},c,u,{onClick:e=>{s(e),u.onClick?.(e)},onTouchStart:e=>{l(e),u.onTouchStart?.(e)},ownerState:r,children:o}))});function cF(e){const t=UE({props:e,name:"MuiPickerPopper"}),{children:n,placement:r="bottom-start",slots:o,slotProps:i,classes:a}=t,{open:s,popupRef:l,reduceAnimations:c}=ZR(),{ownerState:u,rootRefObject:d}=nA(),{dismissViews:f,getCurrentViewMode:p,onPopperExited:h,triggerElement:m,viewContainerRole:g}=nA();G.useEffect(()=>{function e(e){s&&"Escape"===e.key&&f()}return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[f,s]);const b=G.useRef(null);G.useEffect(()=>{"tooltip"!==g&&"field"!==p()&&(s?b.current=tF(d.current):b.current&&b.current instanceof HTMLElement&&setTimeout(()=>{b.current instanceof HTMLElement&&b.current.focus()}))},[s,g,p,d]);const y=(e=>Na({root:["root"],paper:["paper"]},ZI,e))(a),v=zl(()=>{"tooltip"===g?setTimeout(()=>{d.current?.contains(tF(d.current))||l.current?.contains(tF(l.current))||f()},0):f()}),[x,w,S]=function(e,t){const n=G.useRef(!1),r=G.useRef(!1),o=G.useRef(null),i=G.useRef(!1);G.useEffect(()=>{if(e)return document.addEventListener("mousedown",t,!0),document.addEventListener("touchstart",t,!0),()=>{document.removeEventListener("mousedown",t,!0),document.removeEventListener("touchstart",t,!0),i.current=!1};function t(){i.current=!0}},[e]);const a=zl(e=>{if(!i.current)return;const a=r.current;r.current=!1;const s=Ts(o.current);if(!o.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}(e,s))return;if(n.current)return void(n.current=!1);let l;l=e.composedPath?e.composedPath().indexOf(o.current)>-1:!s.documentElement.contains(e.target)||o.current.contains(e.target),l||a||t(e)}),s=e=>{e.defaultMuiPrevented||(r.current=!0)};return G.useEffect(()=>{if(e){const e=Ts(o.current),t=()=>{n.current=!0};return e.addEventListener("touchstart",a),e.addEventListener("touchmove",t),()=>{e.removeEventListener("touchstart",a),e.removeEventListener("touchmove",t)}}},[e,a]),G.useEffect(()=>{if(e){const e=Ts(o.current);return e.addEventListener("click",a),()=>{e.removeEventListener("click",a),r.current=!1}}},[e,a]),[o,s,s]}(s,v),k=js(G.useRef(null),l),C=js(k,x),M=o?.desktopTransition??c?Il:Ml,P=o?.desktopTrapFocus??jl,T=o?.desktopPaper??sF,O=o?.popper??aF,j=Fs({elementType:O,externalSlotProps:i?.popper,additionalProps:{transition:!0,role:null==g?void 0:g,open:s,placement:r,anchorEl:m,onKeyDown:e=>{"Escape"===e.key&&(e.stopPropagation(),f())}},className:y.root,ownerState:u}),_=G.useMemo(()=>tr({},u,{popperPlacement:j.placement}),[u,j.placement]);return(0,le.jsx)(O,tr({},j,{children:({TransitionProps:e})=>(0,le.jsx)(P,tr({open:s,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:"tooltip"===g,isEnabled:()=>!0},i?.desktopTrapFocus,{children:(0,le.jsx)(M,tr({},e,i?.desktopTransition,{onExited:t=>{h?.(),i?.desktopTransition?.onExited?.(t),e?.onExited?.()},children:(0,le.jsx)(lF,{PaperComponent:T,ownerState:_,ref:C,onPaperClick:w,onPaperTouchStart:S,paperClasses:y.paper,paperSlotProps:i?.desktopPaper,children:n})}))}))}))}const uF="undefined"!=typeof navigator&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),dF=uF&&uF[1]?parseInt(uF[1],10):null,fF=uF&&uF[2]?parseInt(uF[2],10):null,pF=dF&&dF<10||fF&&fF<13||!1;function hF(e){const t=YE("@media (prefers-reduced-motion: reduce)",{defaultMatches:!1});return null!=e?e:t||pF}const mF={hasNextStep:!1,hasSeveralSteps:!1,goToNextStep:()=>{},areViewsInSameStep:()=>!0};function gF({onChange:e,onViewChange:t,openTo:n,view:r,views:o,autoFocus:i,focusedView:a,onFocusedViewChange:s,getStepNavigation:l}){const c=G.useRef(n),u=G.useRef(o),d=G.useRef(o.includes(n)?n:o[0]),[f,p]=Pc({name:"useViews",state:"view",controlled:r,default:d.current}),h=G.useRef(i?f:null),[m,g]=Pc({name:"useViews",state:"focusedView",controlled:a,default:h.current}),b=l?l({setView:p,view:f,defaultView:d.current,views:o}):mF;G.useEffect(()=>{(c.current&&c.current!==n||u.current&&u.current.some(e=>!o.includes(e)))&&(p(o.includes(n)?n:o[0]),u.current=o,c.current=n)},[n,p,f,o]);const y=o.indexOf(f),v=o[y-1]??null,x=o[y+1]??null,w=zl((e,t)=>{g(t?e:t=>e===t?null:t),s?.(e,t)}),S=zl(e=>{w(e,!0),e!==f&&(p(e),t&&t(e))}),k=zl(()=>{x&&S(x)}),C=zl((t,n,r)=>{const i="finish"===n,a=r?o.indexOf(r)<o.length-1:Boolean(x);e(t,i&&a?"partial":n,r);let s=null;if(null!=r&&r!==f?s=r:i&&(s=f),null==s)return;const l=o[o.indexOf(s)+1];null!=l&&b.areViewsInSameStep(s,l)&&S(l)});return tr({},b,{view:f,setView:S,focusedView:m,setFocusedView:w,nextView:x,previousView:v,defaultView:o.includes(n)?n:o[0],goToNextView:k,setValueAndGoToNextView:C})}function bF(){return"undefined"==typeof window?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?90===Math.abs(window.screen.orientation.angle)?"landscape":"portrait":window.orientation&&90===Math.abs(Number(window.orientation))?"landscape":"portrait"}const yF=({name:e,timezone:t,value:n,defaultValue:r,referenceDate:o,onChange:i,valueManager:a})=>{const s=dA(),[l,c]=Pc({name:e,state:"value",controlled:n,default:r??a.emptyValue}),u=G.useMemo(()=>a.getTimezone(s,l),[s,a,l]),d=zl(e=>null==u?e:a.setTimezone(s,u,e)),f=G.useMemo(()=>t||u||(o?s.getTimezone(Array.isArray(o)?o[0]:o):"default"),[t,u,o,s]);return{value:G.useMemo(()=>a.setTimezone(s,f,l),[a,s,f,l]),handleValueChange:zl((e,...t)=>{const n=d(e);c(n),i?.(n,...t)}),timezone:f}};function vF(e){const{props:t,validator:n,value:r,timezone:o,onError:i}=e,a=dA(),s=G.useRef(n.valueManager.defaultErrorState),l=n({adapter:a,value:r,timezone:o,props:t}),c=n.valueManager.hasError(l);G.useEffect(()=>{i&&!n.valueManager.isSameError(l,s.current)&&i(l,r),s.current=l},[n,i,l,r]);const u=zl(e=>n({adapter:a,value:e,timezone:o,props:t}));return{validationError:l,hasValidationError:c,getValidationErrorForNewValue:u}}const xF=["className","sx"],wF=({ref:e,props:t,valueManager:n,valueType:r,variant:o,validator:i,onPopperExited:a,autoFocusView:s,rendererInterceptor:l,localeText:c,viewContainerRole:u,getStepNavigation:d})=>{const{views:f,view:p,openTo:h,onViewChange:m,viewRenderers:g,reduceAnimations:b,orientation:y,disableOpenPicker:v,closeOnSelect:x,disabled:w,readOnly:S,formatDensity:k,enableAccessibleFieldDOMStructure:C,selectedSections:M,onSelectedSectionsChange:P,format:T,label:O,autoFocus:j,name:_}=t,{className:D,sx:E}=t,R=il(t,xF),A=er(),I=dA(),F=hF(b),L=function(e,t){const[n,r]=G.useState(bF);return Kn(()=>{const e=()=>{r(bF())};return window.addEventListener("orientationchange",e),()=>{window.removeEventListener("orientationchange",e)}},[]),JI(e,["hours","minutes","seconds"])?"portrait":t??n}(f,y),{current:N}=G.useRef(h??null),[z,$]=G.useState(null),V=G.useRef(null),B=G.useRef(null),W=G.useRef(null),H=js(e,W),{timezone:q,state:Y,setOpen:U,setValue:X,setValueFromView:Q,value:K,viewValue:Z}=function(e){const{props:t,valueManager:n,validator:r}=e,{value:o,defaultValue:i,onChange:a,referenceDate:s,timezone:l,onAccept:c,closeOnSelect:u,open:d,onOpen:f,onClose:p}=t,{current:h}=G.useRef(i),{current:m}=G.useRef(void 0!==o),{current:g}=G.useRef(void 0!==d),b=dA(),{timezone:y,value:v,handleValueChange:x}=yF({name:"a picker component",timezone:l,value:o,defaultValue:h,referenceDate:s,onChange:a,valueManager:n}),[w,S]=G.useState(()=>({open:!1,lastExternalValue:v,clockShallowValue:void 0,lastCommittedValue:v,hasBeenModifiedSinceMount:!1})),{getValidationErrorForNewValue:k}=vF({props:t,validator:r,timezone:y,value:v,onError:t.onError}),C=zl(e=>{const t="function"==typeof e?e(w.open):e;g||S(e=>tr({},e,{open:t})),t&&f&&f(),t||p?.()}),M=zl((e,t)=>{const{changeImportance:r="accept",skipPublicationIfPristine:o=!1,validationError:i,shortcut:a,source:s,shouldClose:l="accept"===r}=t??{};let u,d;o||m||w.hasBeenModifiedSinceMount?(u=!n.areValuesEqual(b,e,v),d="accept"===r&&!n.areValuesEqual(b,e,w.lastCommittedValue)):(u=!0,d="accept"===r),S(t=>tr({},t,{clockShallowValue:u?void 0:t.clockShallowValue,lastCommittedValue:d?e:t.lastCommittedValue,hasBeenModifiedSinceMount:!0}));let f=null;const p=()=>{if(!f){let t;t=s||(a?"view":"unknown"),f={validationError:null==i?k(e):i,source:t},a&&(f.shortcut=a)}return f};u&&x(e,p()),d&&c&&c(e,p()),l&&C(!1)});v!==w.lastExternalValue&&S(e=>tr({},e,{lastExternalValue:v,clockShallowValue:void 0,hasBeenModifiedSinceMount:!0}));const P=zl((e,t="partial")=>{"shallow"!==t?M(e,{changeImportance:"finish"===t&&u?"accept":"set",source:"view"}):S(t=>tr({},t,{clockShallowValue:e,hasBeenModifiedSinceMount:!0}))});G.useEffect(()=>{if(g){if(void 0===d)throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");S(e=>tr({},e,{open:d}))}},[g,d]);const T=G.useMemo(()=>n.cleanValue(b,void 0===w.clockShallowValue?v:w.clockShallowValue),[b,n,w.clockShallowValue,v]);return{timezone:y,state:w,setValue:M,setValueFromView:P,setOpen:C,value:v,viewValue:T}}({props:t,valueManager:n,validator:i}),{view:J,setView:ee,defaultView:te,focusedView:ne,setFocusedView:re,setValueAndGoToNextView:oe,goToNextStep:ie,hasNextStep:ae,hasSeveralSteps:se}=gF({view:p,views:f,openTo:h,onChange:Q,onViewChange:m,autoFocus:s,getStepNavigation:d}),ce=zl(()=>X(n.emptyValue,{source:"view"})),ue=zl(()=>X(n.getTodayValue(I,q,r),{source:"view"})),de=zl(()=>X(K,{source:"view"})),fe=zl(()=>X(Y.lastCommittedValue,{skipPublicationIfPristine:!0,source:"view"})),pe=zl(()=>{X(K,{skipPublicationIfPristine:!0,source:"view"})}),{hasUIView:he,viewModeLookup:me,timeViewsCount:ge}=G.useMemo(()=>f.reduce((e,t)=>{const n=null==g[t]?"field":"UI";return e.viewModeLookup[t]=n,"UI"===n&&(e.hasUIView=!0,uR(t)&&(e.timeViewsCount+=1)),e},{hasUIView:!1,viewModeLookup:{},timeViewsCount:0}),[g,f]),be=me[J],ye=zl(()=>be),[ve,xe]=G.useState("UI"===be?J:null);ve!==J&&"UI"===me[J]&&xe(J),Kn(()=>{"field"===be&&Y.open&&(U(!1),setTimeout(()=>{B?.current?.setSelectedSections(J),B?.current?.focusField(J)}))},[J]),Kn(()=>{if(!Y.open)return;let e=J;"field"===be&&null!=ve&&(e=ve),e!==te&&"UI"===me[e]&&"UI"===me[te]&&(e=te),e!==J&&ee(e),re(e,!0)},[Y.open]);const we=G.useMemo(()=>({isPickerValueEmpty:n.areValuesEqual(I,K,n.emptyValue),isPickerOpen:Y.open,isPickerDisabled:t.disabled??!1,isPickerReadOnly:t.readOnly??!1,pickerOrientation:L,pickerVariant:o}),[I,n,K,Y.open,L,o,t.disabled,t.readOnly]),Se=G.useMemo(()=>v||!he?"hidden":w||S?"disabled":"enabled",[v,he,w,S]),ke=zl(ie),Ce=G.useMemo(()=>x&&!se?[]:["cancel","nextOrAccept"],[x,se]),Me=G.useMemo(()=>({setValue:X,setOpen:U,clearValue:ce,setValueToToday:ue,acceptValueChanges:de,cancelValueChanges:fe,setView:ee,goToNextStep:ke}),[X,U,ce,ue,de,fe,ee,ke]),Pe=G.useMemo(()=>tr({},Me,{value:K,timezone:q,open:Y.open,views:f,view:ve,initialView:N,disabled:w??!1,readOnly:S??!1,autoFocus:j??!1,variant:o,orientation:L,popupRef:V,reduceAnimations:F,triggerRef:$,triggerStatus:Se,hasNextStep:ae,fieldFormat:T??"",name:_,label:O,rootSx:E,rootRef:H,rootClassName:D}),[Me,K,H,o,L,F,w,S,T,D,_,O,E,Se,ae,q,Y.open,ve,f,N,j]),Te=G.useMemo(()=>({dismissViews:pe,ownerState:we,hasUIView:he,getCurrentViewMode:ye,rootRefObject:W,labelId:A,triggerElement:z,viewContainerRole:u,defaultActionBarActions:Ce,onPopperExited:a}),[pe,we,he,ye,A,z,u,Ce,a]),Oe=G.useMemo(()=>({formatDensity:k,enableAccessibleFieldDOMStructure:C,selectedSections:M,onSelectedSectionsChange:P,fieldRef:B}),[k,C,M,P,B]);return{providerProps:{localeText:c,contextValue:Pe,privateContextValue:Te,actionsContextValue:Me,fieldPrivateContextValue:Oe,isValidContextValue:e=>{const r=i({adapter:I,value:e,timezone:q,props:t});return!n.hasError(r)}},renderCurrentView:()=>{if(null==ve)return null;const e=g[ve];if(null==e)return null;const t=tr({},R,{views:f,timezone:q,value:Z,onChange:oe,view:ve,onViewChange:ee,showViewSwitcher:ge>1,timeViewsCount:ge},"tooltip"===u?{focusedView:null,onFocusedViewChange:()=>{}}:{focusedView:ne,onFocusedViewChange:re});return l?(0,le.jsx)(l,{viewRenderers:g,popperView:ve,rendererProps:t}):e(t)},ownerState:we}};function SF(e){return ss("MuiPickersLayout",e)}const kF=ls("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","tabs","shortcuts"]),CF=er;function MF(e){return ss("MuiCircularProgress",e)}ls("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","track","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const PF=44,TF=br`
|
|
76
76
|
0% {
|
|
77
77
|
transform: rotate(0deg);
|
|
78
78
|
}
|
|
@@ -99,4 +99,4 @@
|
|
|
99
99
|
animation: ${TF} 1.4s linear infinite;
|
|
100
100
|
`:null,_F="string"!=typeof OF?gr`
|
|
101
101
|
animation: ${OF} 1.4s ease-in-out infinite;
|
|
102
|
-
`:null,DF=Ka("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${ts(n.color)}`]]}})(gs(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:jF||{animation:`${TF} 1.4s linear infinite`}},...Object.entries(e.palette).filter(bs()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),EF=Ka("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),RF=Ka("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${ts(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(gs(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:e})=>"indeterminate"===e.variant&&!e.disableShrink,style:_F||{animation:`${OF} 1.4s ease-in-out infinite`}}]}))),AF=Ka("circle",{name:"MuiCircularProgress",slot:"Track"})(gs(({theme:e})=>({stroke:"currentColor",opacity:(e.vars||e).palette.action.activatedOpacity}))),IF=G.forwardRef(function(e,t){const n=Za({props:e,name:"MuiCircularProgress"}),{className:r,color:o="primary",disableShrink:i=!1,enableTrackSlot:a=!1,size:s=40,style:l,thickness:c=3.6,value:u=0,variant:d="indeterminate",...f}=n,p={...n,color:o,disableShrink:i,size:s,thickness:c,value:u,variant:d,enableTrackSlot:a},h=(e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e;return Na({root:["root",n,`color${ts(r)}`],svg:["svg"],track:["track"],circle:["circle",`circle${ts(n)}`,o&&"circleDisableShrink"]},MF,t)})(p),m={},g={},b={};if("determinate"===d){const e=2*Math.PI*((PF-c)/2);m.strokeDasharray=e.toFixed(3),b["aria-valuenow"]=Math.round(u),m.strokeDashoffset=`${((100-u)/100*e).toFixed(3)}px`,g.transform="rotate(-90deg)"}return(0,le.jsx)(DF,{className:Un(h.root,r),style:{width:s,height:s,...g,...l},ownerState:p,ref:t,role:"progressbar",...b,...f,children:(0,le.jsxs)(EF,{className:h.svg,ownerState:p,viewBox:"22 22 44 44",children:[a?(0,le.jsx)(AF,{className:h.track,ownerState:p,cx:PF,cy:PF,r:(PF-c)/2,fill:"none",strokeWidth:c,"aria-hidden":"true"}):null,(0,le.jsx)(RF,{className:h.circle,style:m,ownerState:p,cx:PF,cy:PF,r:(PF-c)/2,fill:"none",strokeWidth:c})]})})}),FF=IF;function LF(e){return ss("MuiButton",e)}const NF=ls("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),zF=G.createContext({}),$F=G.createContext(void 0),VF=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],BF=Ka(nd,{shouldForwardProp:e=>Xa(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${ts(n.color)}`],t[`size${ts(n.size)}`],t[`${n.variant}Size${ts(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(gs(({theme:e})=>{const t="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],n="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${NF.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${NF.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${NF.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${NF.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter(bs()).map(([t])=>({props:{color:t},style:{"--variant-textColor":(e.vars||e).palette[t].main,"--variant-outlinedColor":(e.vars||e).palette[t].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[t].main,.5),"--variant-containedColor":(e.vars||e).palette[t].contrastText,"--variant-containedBg":(e.vars||e).palette[t].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[t].dark,"--variant-textBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[t].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${NF.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${NF.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${NF.loading}`]:{color:"transparent"}}}]}})),WF=Ka("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${ts(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...VF]})),HF=Ka("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${ts(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...VF]})),qF=Ka("span",{name:"MuiButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),YF=Ka("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),UF=G.forwardRef(function(e,t){const n=G.useContext(zF),r=G.useContext($F),o=Za({props:Gn(n,e),name:"MuiButton"}),{children:i,color:a="primary",component:s="button",className:l,disabled:c=!1,disableElevation:u=!1,disableFocusRipple:d=!1,endIcon:f,focusVisibleClassName:p,fullWidth:h=!1,id:m,loading:g=null,loadingIndicator:b,loadingPosition:y="center",size:v="medium",startIcon:x,type:w,variant:S="text",...k}=o,C=CF(m),M=b??(0,le.jsx)(FF,{"aria-labelledby":C,color:"inherit",size:16}),P={...o,color:a,component:s,disabled:c,disableElevation:u,disableFocusRipple:d,fullWidth:h,loading:g,loadingIndicator:M,loadingPosition:y,size:v,type:w,variant:S},T=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,loading:a,loadingPosition:s,classes:l}=e,c=Na({root:["root",a&&"loading",i,`${i}${ts(t)}`,`size${ts(o)}`,`${i}Size${ts(o)}`,`color${ts(t)}`,n&&"disableElevation",r&&"fullWidth",a&&`loadingPosition${ts(s)}`],startIcon:["icon","startIcon",`iconSize${ts(o)}`],endIcon:["icon","endIcon",`iconSize${ts(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},LF,l);return{...l,...c}})(P),O=(x||g&&"start"===y)&&(0,le.jsx)(WF,{className:T.startIcon,ownerState:P,children:x||(0,le.jsx)(YF,{className:T.loadingIconPlaceholder,ownerState:P})}),j=(f||g&&"end"===y)&&(0,le.jsx)(HF,{className:T.endIcon,ownerState:P,children:f||(0,le.jsx)(YF,{className:T.loadingIconPlaceholder,ownerState:P})}),_=r||"",D="boolean"==typeof g?(0,le.jsx)("span",{className:T.loadingWrapper,style:{display:"contents"},children:g&&(0,le.jsx)(qF,{className:T.loadingIndicator,ownerState:P,children:M})}):null;return(0,le.jsxs)(BF,{ownerState:P,className:Un(n.className,T.root,l,_),component:s,disabled:c||g,focusRipple:!d,focusVisibleClassName:Un(T.focusVisible,p),ref:t,type:w,id:g?C:m,...k,classes:T,children:[O,"end"!==y&&D,i,"end"===y&&D,j]})});function GF(e){return ss("MuiDialogActions",e)}ls("MuiDialogActions",["root","spacing"]);const XF=Ka("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto",variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),QF=["actions"],KF=Ka(G.forwardRef(function(e,t){const n=Za({props:e,name:"MuiDialogActions"}),{className:r,disableSpacing:o=!1,...i}=n,a={...n,disableSpacing:o},s=(e=>{const{classes:t,disableSpacing:n}=e;return Na({root:["root",!n&&"spacing"]},GF,t)})(a);return(0,le.jsx)(XF,{className:Un(s.root,r),ownerState:a,ref:t,...i})}),{name:"MuiPickersLayout",slot:"ActionBar"})({});function ZF(e){const{actions:t}=e,n=il(e,QF),r=fA(),{clearValue:o,setValueToToday:i,acceptValueChanges:a,cancelValueChanges:s,goToNextStep:l,hasNextStep:c}=ZR();if(null==t||0===t.length)return null;const u=t?.map(e=>{switch(e){case"clear":return(0,le.jsx)(UF,{onClick:o,children:r.clearButtonLabel},e);case"cancel":return(0,le.jsx)(UF,{onClick:s,children:r.cancelButtonLabel},e);case"accept":return(0,le.jsx)(UF,{onClick:a,children:r.okButtonLabel},e);case"today":return(0,le.jsx)(UF,{onClick:i,children:r.todayButtonLabel},e);case"next":return(0,le.jsx)(UF,{onClick:l,children:r.nextStepButtonLabel},e);case"nextOrAccept":return c?(0,le.jsx)(UF,{onClick:l,children:r.nextStepButtonLabel},e):(0,le.jsx)(UF,{onClick:a,children:r.okButtonLabel},e);default:return null}});return(0,le.jsx)(KF,tr({},n,{children:u}))}const JF=G.memo(ZF);function eL(e){return ss("MuiListItem",e)}ls("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);const tL=ls("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function nL(e){return ss("MuiListItemSecondaryAction",e)}ls("MuiListItemSecondaryAction",["root","disableGutters"]);const rL=Ka("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)",variants:[{props:({ownerState:e})=>e.disableGutters,style:{right:0}}]}),oL=G.forwardRef(function(e,t){const n=Za({props:e,name:"MuiListItemSecondaryAction"}),{className:r,...o}=n,i=G.useContext(Ls),a={...n,disableGutters:i.disableGutters},s=(e=>{const{disableGutters:t,classes:n}=e;return Na({root:["root",t&&"disableGutters"]},nL,n)})(a);return(0,le.jsx)(rL,{className:Un(s.root,r),ownerState:a,ref:t,...o})});oL.muiName="ListItemSecondaryAction";const iL=oL,aL=Ka("div",{name:"MuiListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.hasSecondaryAction&&t.secondaryAction]}})(gs(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>!e.disablePadding&&e.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:e})=>!e.disablePadding&&!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>!e.disablePadding&&!!e.secondaryAction,style:{paddingRight:48}},{props:({ownerState:e})=>!!e.secondaryAction,style:{[`& > .${tL.root}`]:{paddingRight:48}}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>e.button,style:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}}},{props:({ownerState:e})=>e.hasSecondaryAction,style:{paddingRight:48}}]}))),sL=Ka("li",{name:"MuiListItem",slot:"Container"})({position:"relative"}),lL=G.forwardRef(function(e,t){const n=Za({props:e,name:"MuiListItem"}),{alignItems:r="center",children:o,className:i,component:a,components:s={},componentsProps:l={},ContainerComponent:c="li",ContainerProps:{className:u,...d}={},dense:f=!1,disableGutters:p=!1,disablePadding:h=!1,divider:m=!1,secondaryAction:g,slotProps:b={},slots:y={},...v}=n,x=G.useContext(Ls),w=G.useMemo(()=>({dense:f||x.dense||!1,alignItems:r,disableGutters:p}),[r,x.dense,f,p]),S=G.useRef(null),k=G.Children.toArray(o),C=k.length&&ns(k[k.length-1],["ListItemSecondaryAction"]),M={...n,alignItems:r,dense:w.dense,disableGutters:p,disablePadding:h,divider:m,hasSecondaryAction:C},P=(e=>{const{alignItems:t,classes:n,dense:r,disableGutters:o,disablePadding:i,divider:a,hasSecondaryAction:s}=e;return Na({root:["root",r&&"dense",!o&&"gutters",!i&&"padding",a&&"divider","flex-start"===t&&"alignItemsFlexStart",s&&"secondaryAction"],container:["container"]},eL,n)})(M),T=Ws(S,t),O=y.root||s.Root||aL,j=b.root||l.root||{},_={className:Un(P.root,j.className,i),...v};let D=a||"li";return C?(D=_.component||a?D:"div","li"===c&&("li"===D?D="div":"li"===_.component&&(_.component="div")),(0,le.jsx)(Ls.Provider,{value:w,children:(0,le.jsxs)(sL,{as:c,className:Un(P.container,u),ref:T,ownerState:M,...d,children:[(0,le.jsx)(O,{...j,...!_s(O)&&{as:D,ownerState:{...M,...j.ownerState}},..._,children:k}),k.pop()]})})):(0,le.jsx)(Ls.Provider,{value:w,children:(0,le.jsxs)(O,{...j,as:D,ref:T,...!_s(O)&&{ownerState:{...M,...j.ownerState}},..._,children:[k,g&&(0,le.jsx)(iL,{children:g})]})})}),cL=Bc((0,le.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}));function uL(e){return ss("MuiChip",e)}const dL=ls("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),fL=Ka("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:o,clickable:i,onDelete:a,size:s,variant:l}=n;return[{[`& .${dL.avatar}`]:t.avatar},{[`& .${dL.avatar}`]:t[`avatar${ts(s)}`]},{[`& .${dL.avatar}`]:t[`avatarColor${ts(r)}`]},{[`& .${dL.icon}`]:t.icon},{[`& .${dL.icon}`]:t[`icon${ts(s)}`]},{[`& .${dL.icon}`]:t[`iconColor${ts(o)}`]},{[`& .${dL.deleteIcon}`]:t.deleteIcon},{[`& .${dL.deleteIcon}`]:t[`deleteIcon${ts(s)}`]},{[`& .${dL.deleteIcon}`]:t[`deleteIconColor${ts(r)}`]},{[`& .${dL.deleteIcon}`]:t[`deleteIcon${ts(l)}Color${ts(r)}`]},t.root,t[`size${ts(s)}`],t[`color${ts(r)}`],i&&t.clickable,i&&"default"!==r&&t[`clickableColor${ts(r)})`],a&&t.deletable,a&&"default"!==r&&t[`deletableColor${ts(r)}`],t[l],t[`${l}${ts(r)}`]]}})(gs(({theme:e})=>{const t="light"===e.palette.mode?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,lineHeight:1.5,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:16,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${dL.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${dL.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${dL.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${dL.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${dL.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${dL.icon}`]:{marginLeft:5,marginRight:-6},[`& .${dL.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:e.alpha((e.vars||e).palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.alpha((e.vars||e).palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${dL.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${dL.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(bs(["contrastText"])).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText,[`& .${dL.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[t].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[t].contrastText}}}})),{props:e=>e.iconColor===e.color,style:{[`& .${dL.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:e=>e.iconColor===e.color&&"default"!==e.color,style:{[`& .${dL.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${dL.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}},...Object.entries(e.palette).filter(bs(["dark"])).map(([t])=>({props:{color:t,onDelete:!0},style:{[`&.${dL.focusVisible}`]:{background:(e.vars||e).palette[t].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`)},[`&.${dL.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter(bs(["dark"])).map(([t])=>({props:{color:t,clickable:!0},style:{[`&:hover, &.${dL.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${"light"===e.palette.mode?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${dL.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${dL.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${dL.avatar}`]:{marginLeft:4},[`& .${dL.avatarSmall}`]:{marginLeft:2},[`& .${dL.icon}`]:{marginLeft:4},[`& .${dL.iconSmall}`]:{marginLeft:2},[`& .${dL.deleteIcon}`]:{marginRight:5},[`& .${dL.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter(bs()).map(([t])=>({props:{variant:"outlined",color:t},style:{color:(e.vars||e).palette[t].main,border:`1px solid ${e.alpha((e.vars||e).palette[t].main,.7)}`,[`&.${dL.clickable}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)},[`&.${dL.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.focusOpacity)},[`& .${dL.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[t].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t].main}}}}))]}})),pL=Ka("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${ts(r)}`]]}})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function hL(e){return"Backspace"===e.key||"Delete"===e.key}const mL=G.forwardRef(function(e,t){const n=Za({props:e,name:"MuiChip"}),{avatar:r,className:o,clickable:i,color:a="default",component:s,deleteIcon:l,disabled:c=!1,icon:u,label:d,onClick:f,onDelete:p,onKeyDown:h,onKeyUp:m,size:g="medium",variant:b="filled",tabIndex:y,skipFocusWhenDisabled:v=!1,slots:x={},slotProps:w={},...S}=n,k=G.useRef(null),C=Ws(k,t),M=e=>{e.stopPropagation(),p&&p(e)},P=!(!1===i||!f)||i,T=P||p?nd:s||"div",O={...n,component:T,disabled:c,size:g,color:a,iconColor:G.isValidElement(u)&&u.props.color||a,onDelete:!!p,clickable:P,variant:b},j=(e=>{const{classes:t,disabled:n,size:r,color:o,iconColor:i,onDelete:a,clickable:s,variant:l}=e;return Na({root:["root",l,n&&"disabled",`size${ts(r)}`,`color${ts(o)}`,s&&"clickable",s&&`clickableColor${ts(o)}`,a&&"deletable",a&&`deletableColor${ts(o)}`,`${l}${ts(o)}`],label:["label",`label${ts(r)}`],avatar:["avatar",`avatar${ts(r)}`,`avatarColor${ts(o)}`],icon:["icon",`icon${ts(r)}`,`iconColor${ts(i)}`],deleteIcon:["deleteIcon",`deleteIcon${ts(r)}`,`deleteIconColor${ts(o)}`,`deleteIcon${ts(l)}Color${ts(o)}`]},uL,t)})(O),_=T===nd?{component:s||"div",focusVisibleClassName:j.focusVisible,...p&&{disableRipple:!0}}:{};let D=null;p&&(D=l&&G.isValidElement(l)?G.cloneElement(l,{className:Un(l.props.className,j.deleteIcon),onClick:M}):(0,le.jsx)(cL,{className:j.deleteIcon,onClick:M}));let E=null;r&&G.isValidElement(r)&&(E=G.cloneElement(r,{className:Un(j.avatar,r.props.className)}));let R=null;u&&G.isValidElement(u)&&(R=G.cloneElement(u,{className:Un(j.icon,u.props.className)}));const A={slots:x,slotProps:w},[I,F]=El("root",{elementType:fL,externalForwardedProps:{...A,...S},ownerState:O,shouldForwardComponentProp:!0,ref:C,className:Un(j.root,o),additionalProps:{disabled:!(!P||!c)||void 0,tabIndex:v&&c?-1:y,..._},getSlotProps:e=>({...e,onClick:t=>{e.onClick?.(t),f?.(t)},onKeyDown:t=>{e.onKeyDown?.(t),(e=>{e.currentTarget===e.target&&hL(e)&&e.preventDefault(),h&&h(e)})(t)},onKeyUp:t=>{e.onKeyUp?.(t),(e=>{e.currentTarget===e.target&&p&&hL(e)&&p(e),m&&m(e)})(t)}})}),[L,N]=El("label",{elementType:pL,externalForwardedProps:A,ownerState:O,className:j.label});return(0,le.jsxs)(I,{as:T,...F,children:[E||R,(0,le.jsx)(L,{...N,children:d}),D]})}),gL=320,bL=336,yL=["items","changeImportance"],vL=["getValue"],xL=Ka($s,{name:"MuiPickersLayout",slot:"Shortcuts"})({});function wL(e){const{items:t,changeImportance:n="accept"}=e,r=il(e,yL),{setValue:o}=(()=>{const e=G.useContext(JR);if(null==e)throw new Error(["MUI X: The `usePickerActionsContext` can only be called in fields that are used as a slot of a Picker component"].join("\n"));return e})(),i=G.useContext(GR);if(null==t||0===t.length)return null;const a=t.map(e=>{let{getValue:t}=e,r=il(e,vL);const a=t({isValid:i});return tr({},r,{label:r.label,onClick:()=>{o(a,{changeImportance:n,shortcut:r,source:"view"})},disabled:!i(a)})});return(0,le.jsx)(xL,tr({dense:!0,sx:[{maxHeight:bL,maxWidth:200,overflow:"auto"},...Array.isArray(r.sx)?r.sx:[r.sx]]},r,{children:a.map(e=>(0,le.jsx)(lL,{children:(0,le.jsx)(mL,tr({},e))},e.id??e.label))}))}const SL=["ownerState"],kL=e=>{const{ownerState:t,defaultActionBarActions:n}=nA(),{view:r}=ZR(),o=Hn(),{children:i,slots:a,slotProps:s,classes:l}=e,c=G.useMemo(()=>tr({},t,{layoutDirection:o?"rtl":"ltr",hasShortcuts:!1}),[t,o]),u=((e,t)=>{const{pickerOrientation:n}=t;return Na({root:["root","landscape"===n&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},SF,e)})(l,c),d=a?.actionBar??JF,f=il(Fs({elementType:d,externalSlotProps:s?.actionBar,additionalProps:{actions:n},className:u.actionBar,ownerState:c}),SL),p=(0,le.jsx)(d,tr({},f)),h=a?.toolbar,m=Fs({elementType:h,externalSlotProps:s?.toolbar,className:u.toolbar,ownerState:c}),g=function(e){return null!==e.view}(m)&&h?(0,le.jsx)(h,tr({},m)):null,b=i,y=a?.tabs,v=r&&y?(0,le.jsx)(y,tr({className:u.tabs},s?.tabs)):null,x=a?.shortcuts??wL,w=Fs({elementType:x,externalSlotProps:s?.shortcuts,className:u.shortcuts,ownerState:c}),S=Array.isArray(w?.items)&&w.items.length>0;return{toolbar:g,content:b,tabs:v,actionBar:p,shortcuts:r&&x?(0,le.jsx)(x,tr({},w)):null,ownerState:tr({},c,{hasShortcuts:S})}},CL=Ka("div",{name:"MuiPickersLayout",slot:"Root"})({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${kF.actionBar}`]:{gridColumn:"1 / 4",gridRow:3},variants:[{props:{pickerOrientation:"landscape",hasShortcuts:!1},style:{[`& .${kF.toolbar}`]:{gridColumn:1,gridRow:"1 / 3"}}},{props:{pickerOrientation:"landscape",hasShortcuts:!0},style:{[`& .${kF.toolbar}`]:{gridColumn:"2 / 4",gridRow:1,maxWidth:"max-content"},[`& .${kF.shortcuts}`]:{gridColumn:1,gridRow:2}}},{props:{pickerOrientation:"portrait"},style:{[`& .${kF.toolbar}`]:{gridColumn:"2 / 4",gridRow:1},[`& .${kF.shortcuts}`]:{gridColumn:1,gridRow:"2 / 3"}}},{props:{hasShortcuts:!0,layoutDirection:"rtl"},style:{[`& .${kF.shortcuts}`]:{gridColumn:4}}}]}),ML=Ka("div",{name:"MuiPickersLayout",slot:"ContentWrapper"})({gridColumn:"2 / 4",gridRow:2,display:"flex",flexDirection:"column"}),PL=G.forwardRef(function(e,t){const n=UE({props:e,name:"MuiPickersLayout"}),{toolbar:r,content:o,tabs:i,actionBar:a,shortcuts:s,ownerState:l}=kL(n),{orientation:c,variant:u}=ZR(),{sx:d,className:f,classes:p}=n,h=((e,t)=>{const{pickerOrientation:n}=t;return Na({root:["root","landscape"===n&&"landscape"],contentWrapper:["contentWrapper"]},SF,e)})(p,l);return(0,le.jsxs)(CL,{ref:t,sx:d,className:Un(h.root,f),ownerState:l,children:["landscape"===c?s:r,"landscape"===c?r:s,(0,le.jsx)(ML,{className:h.contentWrapper,ownerState:l,children:"desktop"===u?(0,le.jsxs)(G.Fragment,{children:[o,i]}):(0,le.jsxs)(G.Fragment,{children:[i,o]})}),a]})});function TL(e){const{steps:t}=e;return function(e){const{steps:t,isViewMatchingStep:n,onStepChange:r}=e;return e=>{if(null==t)return mF;const o=t.findIndex(t=>n(e.view,t)),i=-1===o||o===t.length-1?null:t[o+1];return{hasNextStep:null!=i,hasSeveralSteps:t.length>1,goToNextStep:()=>{null!=i&&r(tr({},e,{step:i}))},areViewsInSameStep:(e,r)=>t.find(t=>n(e,t))===t.find(e=>n(r,e))}}}({steps:t,isViewMatchingStep:(e,t)=>null==t.views||t.views.includes(e),onStepChange:({step:e,defaultView:t,setView:n,view:r,views:o})=>{const i=null==e.views?t:e.views.find(e=>o.includes(e));i!==r&&n(i)}})}const OL=["props","steps"],jL=["ownerState"],_L=e=>{let{props:t,steps:n}=e,r=il(e,OL);const{slots:o,slotProps:i,label:a,inputRef:s,localeText:l}=t,c=TL({steps:n}),{providerProps:u,renderCurrentView:d,ownerState:f}=wF(tr({},r,{props:t,localeText:l,autoFocusView:!0,viewContainerRole:"dialog",variant:"desktop",getStepNavigation:c})),p=u.privateContextValue.labelId,h=i?.toolbar?.hidden??!1,m=o.field,g=il(Fs({elementType:m,externalSlotProps:i?.field,additionalProps:tr({},h&&{id:p}),ownerState:f}),jL),b=o.layout??PL;let y=p;h&&(y=a?`${p}-label`:void 0);const v=tr({},i,{toolbar:tr({},i?.toolbar,{titleId:p}),popper:tr({"aria-labelledby":y},i?.popper)});return{renderPicker:()=>(0,le.jsxs)(tA,tr({},u,{children:[(0,le.jsx)(m,tr({},g,{slots:tr({},o,g.slots),slotProps:tr({},v,g.slotProps),inputRef:s})),(0,le.jsx)(cF,{slots:o,slotProps:v,children:(0,le.jsx)(b,tr({},v?.layout,{slots:o,slotProps:v,children:d()}))})]}))}},DL=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef","unstableStartFieldRef","unstableEndFieldRef","enableAccessibleFieldDOMStructure","disabled","readOnly","dateSeparator","autoFocus","focused"],EL=(e,t)=>G.useMemo(()=>{const n=tr({},e),r={},o=e=>{n.hasOwnProperty(e)&&(r[e]=n[e],delete n[e])};return DL.forEach(o),"date"===t?MA.forEach(o):"time"===t?PA.forEach(o):"date-time"===t&&(MA.forEach(o),PA.forEach(o),TA.forEach(o)),{forwardedProps:n,internalProps:r}},[e,t]),RL=e=>null!=e.saveQuery,AL=({stateResponse:{localizedDigits:e,sectionsValueBoundaries:t,state:n,timezone:r,setCharacterQuery:o,setTempAndroidValueStr:i,updateSectionValue:a}})=>{const s=dA(),l=({keyPressed:e,sectionIndex:t},r,i)=>{const a=e.toLowerCase(),s=n.sections[t];if(null!=n.characterQuery&&(!i||i(n.characterQuery.value))&&n.characterQuery.sectionIndex===t){const e=`${n.characterQuery.value}${a}`,i=r(e,s);if(!RL(i))return o({sectionIndex:t,value:e,sectionType:s.type}),i}const l=r(a,s);return RL(l)&&!l.saveQuery?(o(null),null):(o({sectionIndex:t,value:a,sectionType:s.type}),RL(l)?null:l)};return zl(o=>{const c=n.sections[o.sectionIndex],u=CR(o.keyPressed,e)?(n=>{const r=({queryValue:n,skipIfBelowMinimum:r,section:o})=>{const i=SR(n,e),a=Number(i),l=t[o.type]({currentDate:null,format:o.format,contentType:o.contentType});if(a>l.maximum)return{saveQuery:!1};if(r&&a<l.minimum)return{saveQuery:!0};const c=10*a>l.maximum||i.length===l.maximum.toString().length;return{sectionValue:PR(s,a,l,e,o),shouldGoToNextSection:c}};return l(n,(e,t)=>{if("digit"===t.contentType||"digit-with-letter"===t.contentType)return r({queryValue:e,skipIfBelowMinimum:!1,section:t});if("month"===t.type){const n=_R(s,"digit","month","MM"),o=r({queryValue:e,skipIfBelowMinimum:!0,section:{type:t.type,format:"MM",hasLeadingZerosInFormat:n,hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2}});return RL(o)?o:tr({},o,{sectionValue:OR(s,o.sectionValue,"MM",t.format)})}if("weekDay"===t.type){const n=r({queryValue:e,skipIfBelowMinimum:!0,section:t});return RL(n)?n:tr({},n,{sectionValue:vR(s,t.format)[Number(n.sectionValue)-1]})}return{saveQuery:!1}},t=>CR(t,e))})(tr({},o,{keyPressed:kR(o.keyPressed,e)})):(e=>{const t=(e,t,n)=>{const r=t.filter(e=>e.toLowerCase().startsWith(n));return 0===r.length?{saveQuery:!1}:{sectionValue:r[0],shouldGoToNextSection:1===r.length}},n=(e,n,o,i)=>{const a=e=>xR(s,r,n.type,e);if("letter"===n.contentType)return t(n.format,a(n.format),e);if(o&&null!=i&&"letter"===yR(s,o).contentType){const n=a(o),r=t(0,n,e);return RL(r)?{saveQuery:!1}:tr({},r,{sectionValue:i(r.sectionValue,n)})}return{saveQuery:!1}};return l(e,(e,t)=>{switch(t.type){case"month":{const r=e=>OR(s,e,s.formats.month,t.format);return n(e,t,s.formats.month,r)}case"weekDay":{const r=(e,t)=>t.indexOf(e).toString();return n(e,t,s.formats.weekday,r)}case"meridiem":return n(e,t);default:return{saveQuery:!1}}})})(o);null!=u?a({section:c,newSectionValue:u.sectionValue,shouldGoToNextSection:u.shouldGoToNextSection}):i(null)})},IL=(e,t,n,r)=>{switch(n.type){case"year":return t.fieldYearPlaceholder({digitAmount:e.formatByString(e.date(void 0,"default"),r).length,format:r});case"month":return t.fieldMonthPlaceholder({contentType:n.contentType,format:r});case"day":return t.fieldDayPlaceholder({format:r});case"weekDay":return t.fieldWeekDayPlaceholder({contentType:n.contentType,format:r});case"hours":return t.fieldHoursPlaceholder({format:r});case"minutes":return t.fieldMinutesPlaceholder({format:r});case"seconds":return t.fieldSecondsPlaceholder({format:r});case"meridiem":return t.fieldMeridiemPlaceholder({format:r});default:return r}},FL=({adapter:e,date:t,shouldRespectLeadingZeros:n,localeText:r,localizedDigits:o,now:i,token:a,startSeparator:s})=>{if(""===a)throw new Error("MUI X: Should not call `commitToken` with an empty token");const l=yR(e,a),c=_R(e,l.contentType,l.type,a),u=n?c:"digit"===l.contentType,d=e.isValid(t);let f=d?e.formatByString(t,a):"",p=null;if(u)if(c)p=""===f?e.formatByString(i,a).length:f.length;else{if(null==l.maxLength)throw new Error(`MUI X: The token ${a} should have a 'maxLength' property on it's adapter`);p=l.maxLength,d&&(f=kR(MR(SR(f,o),p),o))}return tr({},l,{format:a,maxLength:p,value:f,placeholder:IL(e,r,l,a),hasLeadingZerosInFormat:c,hasLeadingZerosInInput:u,startSeparator:s,endSeparator:"",modified:!1})},LL=e=>{let t=(({adapter:e,format:t})=>{let n=10,r=t,o=e.expandFormat(t);for(;o!==r;)if(r=o,o=e.expandFormat(r),n-=1,n<0)throw new Error("MUI X: The format expansion seems to be in an infinite loop. Please open an issue with the format passed to the component.");return o})(e);e.isRtl&&e.enableAccessibleFieldDOMStructure&&(t=t.split(" ").reverse().join(" "));const n=(({adapter:e,expandedFormat:t})=>{const n=[],{start:r,end:o}=e.escapedCharacters,i=new RegExp(`(\\${r}[^\\${o}]*\\${o})+`,"g");let a=null;for(;a=i.exec(t);)n.push({start:a.index,end:i.lastIndex-1});return n})(tr({},e,{expandedFormat:t})),r=(e=>{const{adapter:t,expandedFormat:n,escapedParts:r}=e,o=t.date(void 0),i=[];let a="";const s=Object.keys(t.formatTokenMap).sort((e,t)=>t.length-e.length),l=/^([a-zA-Z]+)/,c=new RegExp(`^(${s.join("|")})*$`),u=new RegExp(`^(${s.join("|")})`),d=e=>r.find(t=>t.start<=e&&t.end>=e);let f=0;for(;f<n.length;){const t=d(f),r=null!=t,s=l.exec(n.slice(f))?.[1];if(!r&&null!=s&&c.test(s)){let t=s;for(;t.length>0;){const n=u.exec(t)[1];t=t.slice(n.length),i.push(FL(tr({},e,{now:o,token:n,startSeparator:a}))),a=""}f+=s.length}else{const e=n[f];r&&t?.start===f||t?.end===f||(0===i.length?a+=e:(i[i.length-1].endSeparator+=e,i[i.length-1].isEndFormatSeparator=!0)),f+=1}}return 0===i.length&&a.length>0&&i.push({type:"empty",contentType:"letter",maxLength:null,format:"",value:"",placeholder:"",hasLeadingZerosInFormat:!1,hasLeadingZerosInInput:!1,startSeparator:a,endSeparator:"",modified:!1}),i})(tr({},e,{expandedFormat:t,escapedParts:n}));return(({isRtl:e,formatDensity:t,sections:n})=>n.map(n=>{const r=n=>{let r=n;return e&&null!==r&&r.includes(" ")&&(r=`${r}`),"spacious"===t&&["/",".","-"].includes(r)&&(r=` ${r} `),r};return n.startSeparator=r(n.startSeparator),n.endSeparator=r(n.endSeparator),n}))(tr({},e,{sections:r}))},NL=e=>{const t=dA(),n=fA(),r=Hn(),{manager:{validator:o,valueType:i,internal_valueManager:a,internal_fieldValueManager:s},internalPropsWithDefaults:l,internalPropsWithDefaults:{value:c,defaultValue:u,referenceDate:d,onChange:f,format:p,formatDensity:h="dense",selectedSections:m,onSelectedSectionsChange:g,shouldRespectLeadingZeros:b=!1,timezone:y,enableAccessibleFieldDOMStructure:v=!0},forwardedProps:{error:x}}=e,{value:w,handleValueChange:S,timezone:k}=yF({name:"a field component",timezone:y,value:c,defaultValue:u,referenceDate:d,onChange:f,valueManager:a}),C=G.useRef(w);G.useEffect(()=>{C.current=w},[w]);const{hasValidationError:M}=vF({props:l,validator:o,timezone:k,value:w,onError:l.onError}),P=G.useMemo(()=>(e=>{const t=e.date(void 0);return"0"===e.formatByString(e.setSeconds(t,0),"s")?wR:Array.from({length:10}).map((n,r)=>e.formatByString(e.setSeconds(t,r),"s"))})(t),[t]),T=G.useMemo(()=>((e,t,n)=>{const r=e.date(void 0,n),o=e.endOfYear(r),i=e.endOfDay(r),{maxDaysInMonth:a,longestMonth:s}=tR(e,r).reduce((t,n)=>{const r=e.getDaysInMonth(n);return r>t.maxDaysInMonth?{maxDaysInMonth:r,longestMonth:n}:t},{maxDaysInMonth:0,longestMonth:null});return{year:({format:t})=>({minimum:0,maximum:jR(e,t)?9999:99}),month:()=>({minimum:1,maximum:e.getMonth(o)+1}),day:({currentDate:t})=>({minimum:1,maximum:e.isValid(t)?e.getDaysInMonth(t):a,longestMonth:s}),weekDay:({format:t,contentType:n})=>{if("digit"===n){const n=vR(e,t).map(Number);return{minimum:Math.min(...n),maximum:Math.max(...n)}}return{minimum:1,maximum:7}},hours:({format:n})=>{const o=e.getHours(i);return SR(e.formatByString(e.endOfDay(r),n),t)!==o.toString()?{minimum:1,maximum:Number(SR(e.formatByString(e.startOfDay(r),n),t))}:{minimum:0,maximum:o}},minutes:()=>({minimum:0,maximum:e.getMinutes(i)}),seconds:()=>({minimum:0,maximum:e.getSeconds(i)}),meridiem:()=>({minimum:0,maximum:1}),empty:()=>({minimum:0,maximum:0})}})(t,P,k),[t,P,k]),O=G.useCallback(e=>s.getSectionsFromValue(e,e=>LL({adapter:t,localeText:n,localizedDigits:P,format:p,date:e,formatDensity:h,shouldRespectLeadingZeros:b,enableAccessibleFieldDOMStructure:v,isRtl:r})),[s,p,n,P,r,b,t,h,v]),[j,_]=G.useState(()=>{const e=O(w),n={sections:e,lastExternalValue:w,lastSectionsDependencies:{format:p,isRtl:r,locale:t.locale},tempValueStrAndroid:null,characterQuery:null},o=(e=>Math.max(...e.map(e=>gR[e.type]??1)))(e);return tr({},n,{referenceValue:a.getInitialReferenceValue({referenceDate:d,value:w,adapter:t,props:l,granularity:o,timezone:k})})}),[D,E]=Pc({controlled:m,default:null,name:"useField",state:"selectedSections"}),R=e=>{E(e),g?.(e)},A=G.useMemo(()=>RR(D,j.sections),[D,j.sections]),I="all"===A?0:A,F=G.useMemo(()=>((e,t)=>{const n={};if(!t)return e.forEach((t,r)=>{const o=0===r?null:r-1,i=r===e.length-1?null:r+1;n[r]={leftIndex:o,rightIndex:i}}),{neighbors:n,startIndex:0,endIndex:e.length-1};const r={},o={};let i=0,a=0,s=e.length-1;for(;s>=0;){a=e.findIndex((e,t)=>t>=i&&e.endSeparator?.includes(" ")&&" / "!==e.endSeparator),-1===a&&(a=e.length-1);for(let e=a;e>=i;e-=1)o[e]=s,r[s]=e,s-=1;i=a+1}return e.forEach((t,i)=>{const a=o[i],s=0===a?null:r[a-1],l=a===e.length-1?null:r[a+1];n[i]={leftIndex:s,rightIndex:l}}),{neighbors:n,startIndex:r[0],endIndex:r[e.length-1]}})(j.sections,r&&!v),[j.sections,r,v]),L=G.useMemo(()=>j.sections.every(e=>""===e.value),[j.sections]),N=G.useMemo(()=>{if(null!=I)return!1;const e=j.sections.filter(e=>""!==e.value);return e.length>0&&j.sections.length-e.length>0},[j.sections,I]),z=G.useMemo(()=>void 0!==x?x:M||N,[M,N,x]),$=e=>{const n={validationError:o({adapter:t,value:e,timezone:k,props:l})};S(e,n)},V=(e,t)=>{const n=[...j.sections];return n[e]=tr({},n[e],{value:t,modified:!0}),n},B=G.useRef(null),W=ol(),H=e=>{null!=I&&(B.current={sectionIndex:I,value:e},W.start(0,()=>{B.current=null}))},q=()=>{if(null==I)return;const e=j.sections[I];""!==e.value&&(H(""),null===s.getDateFromSection(w,e)?_(e=>tr({},e,{sections:V(I,""),tempValueStrAndroid:null,characterQuery:null})):(_(e=>tr({},e,{characterQuery:null})),$(s.updateDateInValue(w,e,null))))},Y=ol(),U=zl(e=>{_(t=>tr({},t,{characterQuery:e}))});if(w!==j.lastExternalValue){const e=null!=B.current&&!t.isValid(s.getDateFromSection(w,j.sections[B.current.sectionIndex]));let n;n=e?V(B.current.sectionIndex,B.current.value):O(w),_(o=>tr({},o,{lastExternalValue:w,sections:n,sectionsDependencies:{format:p,isRtl:r,locale:t.locale},referenceValue:e?o.referenceValue:s.updateReferenceValue(t,w,o.referenceValue),tempValueStrAndroid:null}))}if(r!==j.lastSectionsDependencies.isRtl||p!==j.lastSectionsDependencies.format||t.locale!==j.lastSectionsDependencies.locale){const e=O(w);_(n=>tr({},n,{lastSectionsDependencies:{format:p,isRtl:r,locale:t.locale},sections:e,tempValueStrAndroid:null,characterQuery:null}))}null==j.characterQuery||z||null!=I||U(null),null!=j.characterQuery&&j.sections[j.characterQuery.sectionIndex]?.type!==j.characterQuery.sectionType&&U(null),G.useEffect(()=>{null!=B.current&&(B.current=null)});const X=ol();return G.useEffect(()=>(null!=j.characterQuery&&X.start(5e3,()=>U(null)),()=>{}),[j.characterQuery,U,X]),G.useEffect(()=>{null!=j.tempValueStrAndroid&&null!=I&&q()},[j.sections]),{activeSectionIndex:I,areAllSectionsEmpty:L,error:z,localizedDigits:P,parsedSelectedSections:A,sectionOrder:F,sectionsValueBoundaries:T,state:j,timezone:k,value:w,clearValue:()=>{a.areValuesEqual(t,w,a.emptyValue)?_(e=>tr({},e,{sections:e.sections.map(e=>tr({},e,{value:""})),tempValueStrAndroid:null,characterQuery:null})):(_(e=>tr({},e,{characterQuery:null})),$(a.emptyValue))},clearActiveSection:q,setCharacterQuery:U,setSelectedSections:R,setTempAndroidValueStr:e=>_(t=>tr({},t,{tempValueStrAndroid:e})),updateSectionValue:({section:e,newSectionValue:n,shouldGoToNextSection:r})=>{W.clear(),Y.clear();const o=s.getDateFromSection(w,e);r&&I<j.sections.length-1&&R(I+1);const i=V(I,n),a=s.getDateSectionsFromValue(i,e),l=((e,t,n)=>{const r=t.some(e=>"day"===e.type),o=[],i=[];for(let e=0;e<t.length;e+=1){const a=t[e];r&&"weekDay"===a.type||(o.push(a.format),i.push(TR(a,"non-input",n)))}const a=o.join(" "),s=i.join(" ");return e.parse(s,a)})(t,a,P);if(t.isValid(l)){const n=ER(t,l,a,s.getDateFromSection(j.referenceValue,e),!0);return null==o&&Y.start(0,()=>{C.current===w&&_(t=>tr({},t,{sections:s.clearDateSections(j.sections,e),tempValueStrAndroid:null}))}),$(s.updateDateInValue(w,e,n))}return a.every(e=>""!==e.value)&&(null==o||t.isValid(o))?(H(n),$(s.updateDateInValue(w,e,l))):(null!=o&&(H(n),$(s.updateDateInValue(w,e,l))),_(e=>tr({},e,{sections:i,tempValueStrAndroid:null})))},updateValueFromValueStr:e=>{const o=s.parseValueStr(e,j.referenceValue,(e,o)=>{const i=t.parse(e,p);if(!t.isValid(i))return null;const a=LL({adapter:t,localeText:n,localizedDigits:P,format:p,date:i,formatDensity:h,shouldRespectLeadingZeros:b,enableAccessibleFieldDOMStructure:v,isRtl:r});return ER(t,i,a,o,!1)});$(o)},getSectionsFromValue:O}},zL=()=>G.useContext(KR);function $L(e){const{manager:{internal_useApplyDefaultValuesToFieldInternalProps:t},internalProps:n,skipContextFieldRefAssignment:r}=e,o=zL(),i=QR(),a=js(n.unstableFieldRef,r?null:i?.fieldRef),s=o?.setValue,l=G.useCallback((e,t)=>s?.(e,{validationError:t.validationError,shouldClose:!1}),[s]);return t(G.useMemo(()=>null!=i&&null!=o?tr({value:o.value,onChange:l,timezone:o.timezone,disabled:o.disabled,readOnly:o.readOnly,autoFocus:o.autoFocus&&!o.open,focused:!!o.open||void 0,format:o.fieldFormat,formatDensity:i.formatDensity,enableAccessibleFieldDOMStructure:i.enableAccessibleFieldDOMStructure,selectedSections:i.selectedSections,onSelectedSectionsChange:i.onSelectedSectionsChange,unstableFieldRef:a},n):n,[o,i,n,l,a]))}function VL(e){const{focused:t,domGetters:n,stateResponse:{parsedSelectedSections:r,state:o}}=e;if(!n.isReady())return;const i=Ts(n.getRoot()).getSelection();if(!i)return;if(null==r)return i.rangeCount>0&&i.getRangeAt(0).startContainer instanceof Node&&n.getRoot().contains(i.getRangeAt(0).startContainer)&&i.removeAllRanges(),void(t&&n.getRoot().blur());if(!n.getRoot().contains(tF(n.getRoot())))return;const a=new window.Range;let s;s="all"===r?n.getRoot():"empty"===o.sections[r].type?n.getSectionContainer(r):n.getSectionContent(r),a.selectNodeContents(s),s.focus(),i.removeAllRanges(),i.addRange(a)}function BL(e){const t=dA(),{manager:{internal_fieldValueManager:n},internalPropsWithDefaults:{minutesStep:r,disabled:o,readOnly:i},stateResponse:{state:a,value:s,activeSectionIndex:l,parsedSelectedSections:c,sectionsValueBoundaries:u,localizedDigits:d,timezone:f,sectionOrder:p,clearValue:h,clearActiveSection:m,setSelectedSections:g,updateSectionValue:b}}=e;return zl(e=>{if(!o)switch(!0){case(e.ctrlKey||e.metaKey)&&"A"===String.fromCharCode(e.keyCode)&&!e.shiftKey&&!e.altKey:e.preventDefault(),g("all");break;case"ArrowRight"===e.key:if(e.preventDefault(),null==c)g(p.startIndex);else if("all"===c)g(p.endIndex);else{const e=p.neighbors[c].rightIndex;null!==e&&g(e)}break;case"ArrowLeft"===e.key:if(e.preventDefault(),null==c)g(p.endIndex);else if("all"===c)g(p.startIndex);else{const e=p.neighbors[c].leftIndex;null!==e&&g(e)}break;case"Delete"===e.key:if(e.preventDefault(),i)break;null==c||"all"===c?h():m();break;case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(e.key):{if(e.preventDefault(),i||null==l)break;"all"===c&&g(l);const o=a.sections[l],p=function(e,t,n,r,o,i,a,s){const l=function(e){switch(e){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}}(r),c="Home"===r,u="End"===r,d=""===n.value||c||u;return"digit"===n.contentType||"digit-with-letter"===n.contentType?(()=>{const r=o[n.type]({currentDate:a,format:n.format,contentType:n.contentType}),f=t=>PR(e,t,r,i,n),p="minutes"===n.type&&s?.minutesStep?s.minutesStep:1;let h;if(d){if("year"===n.type&&!u&&!c)return e.formatByString(e.date(void 0,t),n.format);h=l>0||c?r.minimum:r.maximum}else h=parseInt(SR(n.value,i),10)+l*p;return h%p!==0&&((l<0||c)&&(h+=p-(p+h)%p),(l>0||u)&&(h-=h%p)),h>r.maximum?f(r.minimum+(h-r.maximum-1)%(r.maximum-r.minimum+1)):h<r.minimum?f(r.maximum-(r.minimum-h-1)%(r.maximum-r.minimum+1)):f(h)})():(()=>{const r=xR(e,t,n.type,n.format);if(0===r.length)return n.value;if(d)return l>0||c?r[0]:r[r.length-1];const o=r.indexOf(n.value);return r[((o+l)%r.length+r.length)%r.length]})()}(t,f,o,e.key,u,d,n.getDateFromSection(s,o),{minutesStep:r});b({section:o,newSectionValue:p,shouldGoToNextSection:!1});break}}})}function WL(e,t){if(e.value)switch(e.type){case"month":{if("digit"===e.contentType){const n=t.setMonth(t.date(),Number(e.value)-1);return t.isValid(n)?t.format(n,"month"):""}const n=t.parse(e.value,e.format);return n&&t.isValid(n)?t.format(n,"month"):void 0}case"day":if("digit"===e.contentType){const n=t.setDate(t.startOfYear(t.date()),Number(e.value));return t.isValid(n)?t.format(n,"dayOfMonthFull"):""}return e.value;default:return}}function HL(e,t){if(e.value)switch(e.type){case"weekDay":if("letter"===e.contentType)return;return Number(e.value);case"meridiem":{const n=t.parse(`01:00 ${e.value}`,`${t.formats.hours12h}:${t.formats.minutes} ${e.format}`);return n?t.getHours(n)>=12?1:0:void 0}case"day":return"digit-with-letter"===e.contentType?parseInt(e.value,10):Number(e.value);case"month":{if("digit"===e.contentType)return Number(e.value);const n=t.parse(e.value,e.format);return n?t.getMonth(n)+1:void 0}default:return"letter"!==e.contentType?Number(e.value):void 0}}const qL=e=>{const{props:t,manager:n,skipContextFieldRefAssignment:r,manager:{valueType:o,internal_useOpenPickerButtonAriaLabel:i}}=e,{internalProps:a,forwardedProps:s}=EL(t,o),l=$L({manager:n,internalProps:a,skipContextFieldRefAssignment:r}),{sectionListRef:c,onBlur:u,onClick:d,onFocus:f,onInput:p,onPaste:h,onKeyDown:m,onClear:g,clearable:b}=s,{disabled:y=!1,readOnly:v=!1,autoFocus:x=!1,focused:w,unstableFieldRef:S}=l,k=G.useRef(null),C=js(c,k),M=G.useMemo(()=>({isReady:()=>null!=k.current,getRoot:()=>k.current.getRoot(),getSectionContainer:e=>k.current.getSectionContainer(e),getSectionContent:e=>k.current.getSectionContent(e),getSectionIndexFromDOMElement:e=>k.current.getSectionIndexFromDOMElement(e)}),[k]),P=NL({manager:n,internalPropsWithDefaults:l,forwardedProps:s}),{areAllSectionsEmpty:T,error:O,parsedSelectedSections:j,sectionOrder:_,state:D,value:E,clearValue:R,setSelectedSections:A}=P,I=AL({stateResponse:P}),F=i(E),[L,N]=G.useState(!1);function z(e=0){if(y||!k.current||null!=YL(k))return;const t=RR(e,D.sections);N(!0),k.current.getSectionContent(t).focus()}const $=function(e){const{manager:t,focused:n,setFocused:r,domGetters:o,stateResponse:i,applyCharacterEditing:a,internalPropsWithDefaults:s,stateResponse:{parsedSelectedSections:l,sectionOrder:c,state:u,clearValue:d,setCharacterQuery:f,setSelectedSections:p,updateValueFromValueStr:h},internalPropsWithDefaults:{disabled:m=!1,readOnly:g=!1}}=e,b=BL({manager:t,internalPropsWithDefaults:s,stateResponse:i}),y=ol(),v=zl(e=>{!m&&o.isReady()&&(r(!0),"all"===l?y.start(0,()=>{const e=document.getSelection().getRangeAt(0).startOffset;if(0===e)return void p(c.startIndex);let t=0,n=0;for(;n<e&&t<u.sections.length;){const e=u.sections[t];t+=1,n+=`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`.length}p(t-1)}):n?o.getRoot().contains(e.target)||p(c.startIndex):(r(!0),p(c.startIndex)))}),x=zl(e=>{if(!o.isReady()||"all"!==l)return;const t=e.target.textContent??"";o.getRoot().innerHTML=u.sections.map(e=>`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`).join(""),VL({focused:n,domGetters:o,stateResponse:i}),0===t.length||10===t.charCodeAt(0)?(d(),p("all")):t.length>1?h(t):("all"===l&&p(0),a({keyPressed:t,sectionIndex:0}))}),w=zl(e=>{if(g||"all"!==l)return void e.preventDefault();const t=e.clipboardData.getData("text");e.preventDefault(),f(null),h(t)}),S=zl(()=>{if(n||m||!o.isReady())return;const e=tF(o.getRoot());r(!0),null!=o.getSectionIndexFromDOMElement(e)||p(c.startIndex)});return{onKeyDown:b,onBlur:zl(()=>{setTimeout(()=>{if(!o.isReady())return;const e=tF(o.getRoot());!o.getRoot().contains(e)&&(r(!1),p(null))})}),onFocus:S,onClick:v,onPaste:w,onInput:x,contentEditable:"all"===l,tabIndex:s.disabled||0===l?-1:0}}({manager:n,internalPropsWithDefaults:l,stateResponse:P,applyCharacterEditing:I,focused:L,setFocused:N,domGetters:M}),V=function(e){const{manager:{internal_fieldValueManager:t},stateResponse:{areAllSectionsEmpty:n,state:r,updateValueFromValueStr:o}}=e,i=zl(e=>{o(e.target.value)});return{value:G.useMemo(()=>n?"":t.getV7HiddenInputValueFromSections(r.sections),[n,r.sections,t]),onChange:i}}({manager:n,stateResponse:P}),B=function(e){const{stateResponse:{setSelectedSections:t},internalPropsWithDefaults:{disabled:n=!1}}=e,r=G.useCallback(e=>r=>{n||r.isDefaultPrevented()||t(e)},[n,t]);return G.useCallback(e=>({"data-sectionindex":e,onClick:r(e)}),[r])}({stateResponse:P,internalPropsWithDefaults:l}),W=function(e){const t=dA(),n=fA(),{focused:r,domGetters:o,stateResponse:i,applyCharacterEditing:a,manager:{internal_fieldValueManager:s},stateResponse:{parsedSelectedSections:l,sectionsValueBoundaries:c,state:u,value:d,clearActiveSection:f,setCharacterQuery:p,setSelectedSections:h,updateSectionValue:m,updateValueFromValueStr:g},internalPropsWithDefaults:{disabled:b=!1,readOnly:y=!1}}=e,v="all"===l,x=!v&&!b&&!y,w=zl(e=>{if(!o.isReady())return;const t=u.sections[e];o.getSectionContent(e).innerHTML=t.value||t.placeholder,VL({focused:r,domGetters:o,stateResponse:i})}),S=zl(e=>{if(!o.isReady())return;const t=e.target,n=t.textContent??"",r=o.getSectionIndexFromDOMElement(t),i=u.sections[r];if(y)w(r);else{if(0===n.length){if(""===i.value)return void w(r);const t=e.nativeEvent.inputType;return"insertParagraph"===t||"insertLineBreak"===t?void w(r):(w(r),void f())}a({keyPressed:n,sectionIndex:r}),w(r)}}),k=zl(e=>{e.preventDefault()}),C=zl(e=>{if(e.preventDefault(),y||b||"number"!=typeof l)return;const t=u.sections[l],n=e.clipboardData.getData("text"),r=/^[a-zA-Z]+$/.test(n),o=/^[0-9]+$/.test(n),i=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(n);"letter"===t.contentType&&r||"digit"===t.contentType&&o||"digit-with-letter"===t.contentType&&i?(p(null),m({section:t,newSectionValue:n,shouldGoToNextSection:!0})):r||o||(p(null),g(n))}),M=zl(e=>{e.preventDefault(),e.dataTransfer.dropEffect="none"}),P=G.useCallback(e=>()=>{b||h(e)},[b,h]);return G.useCallback((e,r)=>{const o=c[e.type]({currentDate:s.getDateFromSection(d,e),contentType:e.contentType,format:e.format});return{onInput:S,onPaste:C,onMouseUp:k,onDragOver:M,onFocus:P(r),"aria-readonly":y,"aria-valuenow":HL(e,t),"aria-valuemin":o.minimum,"aria-valuemax":o.maximum,"aria-valuetext":e.value?WL(e,t):n.empty,"aria-label":n[e.type],"aria-disabled":b,tabIndex:!x||v||r>0?-1:0,contentEditable:!v&&!b&&!y,role:"spinbutton","data-range-position":e.dateName||void 0,spellCheck:!x&&void 0,autoCapitalize:x?"none":void 0,autoCorrect:x?"off":void 0,children:e.value||e.placeholder,inputMode:"letter"===e.contentType?"text":"numeric"}},[c,v,b,y,x,n,t,S,C,k,M,P,s,d])}({manager:n,stateResponse:P,applyCharacterEditing:I,internalPropsWithDefaults:l,domGetters:M,focused:L}),H=zl(e=>{m?.(e),$.onKeyDown(e)}),q=zl(e=>{u?.(e),$.onBlur(e)}),Y=zl(e=>{f?.(e),$.onFocus(e)}),U=zl(e=>{e.isDefaultPrevented()||(d?.(e),$.onClick(e))}),X=zl(e=>{h?.(e),$.onPaste(e)}),Q=zl(e=>{p?.(e),$.onInput(e)}),K=zl((e,...t)=>{e.preventDefault(),g?.(e,...t),R(),UL(k)?A(_.startIndex):z(0)}),Z=G.useMemo(()=>D.sections.map((e,t)=>{const n=W(e,t);return{container:B(t),content:W(e,t),before:{children:e.startSeparator},after:{children:e.endSeparator,"data-range-position":e.isEndFormatSeparator?n["data-range-position"]:void 0}}}),[D.sections,B,W]);return G.useEffect(()=>{if(null==k.current)throw new Error(["MUI X: The `sectionListRef` prop has not been initialized by `PickersSectionList`","You probably tried to pass a component to the `textField` slot that contains an `<input />` element instead of a `PickersSectionList`.","","If you want to keep using an `<input />` HTML element for the editing, please add the `enableAccessibleFieldDOMStructure={false}` prop to your Picker or Field component:","","<DatePicker enableAccessibleFieldDOMStructure={false} slots={{ textField: MyCustomTextField }} />","","Learn more about the field accessible DOM structure on the MUI documentation: https://mui.com/x/react-date-pickers/fields/#fields-to-edit-a-single-element"].join("\n"));x&&!y&&k.current&&k.current.getSectionContent(_.startIndex).focus()},[]),Kn(()=>{if(L&&k.current)if("all"===j)k.current.getRoot().focus();else if("number"==typeof j){const e=k.current.getSectionContent(j);e&&e.focus()}},[j,L]),Kn(()=>{VL({focused:L,domGetters:M,stateResponse:P})}),G.useImperativeHandle(S,()=>({getSections:()=>D.sections,getActiveSectionIndex:()=>YL(k),setSelectedSections:e=>{if(y||!k.current)return;const t=RR(e,D.sections);N(null!==("all"===t?0:t)),A(e)},focusField:z,isFieldFocused:()=>UL(k)})),tr({},s,$,{onBlur:q,onClick:U,onFocus:Y,onInput:Q,onPaste:X,onKeyDown:H,onClear:K},V,{error:O,clearable:Boolean(b&&!T&&!v&&!y),focused:w??L,sectionListRef:C,enableAccessibleFieldDOMStructure:!0,elements:Z,areAllSectionsEmpty:T,disabled:y,readOnly:v,autoFocus:x,openPickerAriaLabel:F})};function YL(e){const t=tF(e.current?.getRoot());return t&&e.current&&e.current.getRoot().contains(t)?e.current.getSectionIndexFromDOMElement(t):null}function UL(e){const t=tF(e.current?.getRoot());return!!e.current&&e.current.getRoot().contains(t)}const GL=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),XL=e=>{const t=Hn(),n=ol(),r=ol(),{props:o,manager:i,skipContextFieldRefAssignment:a,manager:{valueType:s,internal_valueManager:l,internal_fieldValueManager:c,internal_useOpenPickerButtonAriaLabel:u}}=e,{internalProps:d,forwardedProps:f}=EL(o,s),p=$L({manager:i,internalProps:d,skipContextFieldRefAssignment:a}),{onFocus:h,onClick:m,onPaste:g,onBlur:b,onKeyDown:y,onClear:v,clearable:x,inputRef:w,placeholder:S}=f,{readOnly:k=!1,disabled:C=!1,autoFocus:M=!1,focused:P,unstableFieldRef:T}=p,O=G.useRef(null),j=js(w,O),_=NL({manager:i,internalPropsWithDefaults:p,forwardedProps:f}),{activeSectionIndex:D,areAllSectionsEmpty:E,error:R,localizedDigits:A,parsedSelectedSections:I,sectionOrder:F,state:L,value:N,clearValue:z,clearActiveSection:$,setCharacterQuery:V,setSelectedSections:B,setTempAndroidValueStr:W,updateSectionValue:H,updateValueFromValueStr:q,getSectionsFromValue:Y}=_,U=AL({stateResponse:_}),X=u(N),Q=G.useMemo(()=>((e,t,n)=>{let r=0,o=n?1:0;const i=[];for(let a=0;a<e.length;a+=1){const s=e[a],l=TR(s,n?"input-rtl":"input-ltr",t),c=`${s.startSeparator}${l}${s.endSeparator}`,u=GL(c).length,d=c.length,f=GL(l),p=o+(""===f?0:l.indexOf(f[0]))+s.startSeparator.length,h=p+f.length;i.push(tr({},s,{start:r,end:r+u,startInInput:p,endInInput:h})),r+=u,o+=d}return i})(L.sections,A,t),[L.sections,A,t]);function K(){const e=O.current.selectionStart??0;let t;t=e<=Q[0].startInInput||e>=Q[Q.length-1].endInInput?1:Q.findIndex(t=>t.startInInput-t.startSeparator.length>e);const n=-1===t?Q.length-1:t-1;B(n)}function Z(e=0){tF(O.current)!==O.current&&(O.current?.focus(),B(e))}const J=zl(e=>{h?.(e);const t=O.current;n.start(0,()=>{t&&t===O.current&&null==D&&(t.value.length&&Number(t.selectionEnd)-Number(t.selectionStart)===t.value.length?B("all"):K())})}),ee=zl((e,...t)=>{e.isDefaultPrevented()||(m?.(e,...t),K())}),te=zl(e=>{if(g?.(e),e.preventDefault(),k||C)return;const t=e.clipboardData.getData("text");if("number"==typeof I){const e=L.sections[I],n=/^[a-zA-Z]+$/.test(t),r=/^[0-9]+$/.test(t),o=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(t);if("letter"===e.contentType&&n||"digit"===e.contentType&&r||"digit-with-letter"===e.contentType&&o)return V(null),void H({section:e,newSectionValue:t,shouldGoToNextSection:!0});if(n||r)return}V(null),q(t)}),ne=zl(e=>{b?.(e),B(null)}),re=zl(e=>{if(k)return;const n=e.target.value;if(""===n)return void z();const r=e.nativeEvent.data,o=r&&r.length>1,i=o?r:n,a=GL(i);if("all"===I&&B(D),null==D||o)return void q(o?r:a);let s;if("all"===I&&1===a.length)s=a;else{const e=GL(c.getV6InputValueFromSections(Q,A,t));let n=-1,r=-1;for(let t=0;t<e.length;t+=1)-1===n&&e[t]!==a[t]&&(n=t),-1===r&&e[e.length-t-1]!==a[a.length-t-1]&&(r=t);const o=Q[D];if(n<o.start||e.length-r-1>o.end)return;const i=a.length-e.length+o.end-GL(o.endSeparator||"").length;s=a.slice(o.start+GL(o.startSeparator||"").length,i)}if(0===s.length)return navigator.userAgent.toLowerCase().includes("android")&&W(i),void $();U({keyPressed:s,sectionIndex:D})}),oe=zl((e,...t)=>{e.preventDefault(),v?.(e,...t),z(),QL(O)?B(F.startIndex):Z(0)}),ie=BL({manager:i,internalPropsWithDefaults:p,stateResponse:_}),ae=zl(e=>{y?.(e),ie(e)}),se=G.useMemo(()=>void 0!==S?S:c.getV6InputValueFromSections(Y(l.emptyValue),A,t),[S,c,Y,l.emptyValue,A,t]),le=G.useMemo(()=>L.tempValueStrAndroid??c.getV6InputValueFromSections(L.sections,A,t),[L.sections,c,L.tempValueStrAndroid,A,t]);G.useEffect(()=>{O.current&&O.current===tF(O.current)&&B("all")},[]),Kn(()=>{!function e(){if(!O.current)return;if(null==I)return void(O.current.scrollLeft&&(O.current.scrollLeft=0));if(O.current!==tF(O.current))return;const t=O.current.scrollTop;if("all"===I)O.current.select();else{const t=Q[I],n="empty"===t.type?t.startInInput-t.startSeparator.length:t.startInInput,o="empty"===t.type?t.endInInput+t.endSeparator.length:t.endInInput;n===O.current.selectionStart&&o===O.current.selectionEnd||O.current===tF(O.current)&&O.current.setSelectionRange(n,o),r.start(0,()=>{!O.current||O.current!==tF(O.current)||O.current.selectionStart!==O.current.selectionEnd||O.current.selectionStart===n&&O.current.selectionEnd===o||e()})}O.current.scrollTop=t}()});const ce=G.useMemo(()=>null==D||"letter"===L.sections[D].contentType?"text":"numeric",[D,L.sections]),ue=!(O.current&&O.current===tF(O.current))&&E;return G.useImperativeHandle(T,()=>({getSections:()=>L.sections,getActiveSectionIndex:()=>{const e=O.current.selectionStart??0,t=O.current.selectionEnd??0;if(0===e&&0===t)return null;const n=e<=Q[0].startInInput?1:Q.findIndex(t=>t.startInInput-t.startSeparator.length>e);return-1===n?Q.length-1:n-1},setSelectedSections:e=>B(e),focusField:Z,isFieldFocused:()=>QL(O)})),tr({},f,{error:R,"aria-invalid":R,clearable:Boolean(x&&!E&&!k&&!C),onBlur:ne,onClick:ee,onFocus:J,onPaste:te,onKeyDown:ae,onClear:oe,inputRef:j,enableAccessibleFieldDOMStructure:!1,placeholder:se,inputMode:ce,autoComplete:"off",value:ue?"":le,onChange:re,focused:P,disabled:C,readOnly:k,autoFocus:M,openPickerAriaLabel:X})};function QL(e){return e.current===tF(e.current)}const KL=e=>{const t=QR();return(e.props.enableAccessibleFieldDOMStructure??t?.enableAccessibleFieldDOMStructure??1?qL:XL)(e)};function ZL(e){return ss("MuiFormHelperText",e)}const JL=ls("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var eN;const tN=Ka("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${ts(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(gs(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${JL.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${JL.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:e})=>e.contained,style:{marginLeft:14,marginRight:14}}]}))),nN=G.forwardRef(function(e,t){const n=Za({props:e,name:"MuiFormHelperText"}),{children:r,className:o,component:i="p",disabled:a,error:s,filled:l,focused:c,margin:u,required:d,variant:f,...p}=n,h=ps({props:n,muiFormControl:hs(),states:["variant","size","disabled","error","filled","focused","required"]}),m={...n,component:i,contained:"filled"===h.variant||"outlined"===h.variant,variant:h.variant,size:h.size,disabled:h.disabled,error:h.error,filled:h.filled,focused:h.focused,required:h.required};delete m.ownerState;const g=(e=>{const{classes:t,contained:n,size:r,disabled:o,error:i,filled:a,focused:s,required:l}=e;return Na({root:["root",o&&"disabled",i&&"error",r&&`size${ts(r)}`,n&&"contained",s&&"focused",a&&"filled",l&&"required"]},ZL,t)})(m);return(0,le.jsx)(tN,{as:i,className:Un(g.root,o),ref:t,...p,ownerState:m,children:" "===r?eN||(eN=(0,le.jsx)("span",{className:"notranslate","aria-hidden":!0,children:""})):r})});function rN(e){return ss("MuiTextField",e)}ls("MuiTextField",["root"]);const oN={standard:fu,filled:yu,outlined:Ou},iN=Ka(fs,{name:"MuiTextField",slot:"Root"})({}),aN=G.forwardRef(function(e,t){const n=Za({props:e,name:"MuiTextField"}),{autoComplete:r,autoFocus:o=!1,children:i,className:a,color:s="primary",defaultValue:l,disabled:c=!1,error:u=!1,FormHelperTextProps:d,fullWidth:f=!1,helperText:p,id:h,InputLabelProps:m,inputProps:g,InputProps:b,inputRef:y,label:v,maxRows:x,minRows:w,multiline:S=!1,name:k,onBlur:C,onChange:M,onFocus:P,placeholder:T,required:O=!1,rows:j,select:_=!1,SelectProps:D,slots:E={},slotProps:R={},type:A,value:I,variant:F="outlined",...L}=n,N={...n,autoFocus:o,color:s,disabled:c,error:u,fullWidth:f,multiline:S,required:O,select:_,variant:F},z=(e=>{const{classes:t}=e;return Na({root:["root"]},rN,t)})(N),$=er(h),V=p&&$?`${$}-helper-text`:void 0,B=v&&$?`${$}-label`:void 0,W=oN[F],H={slots:E,slotProps:{input:b,inputLabel:m,htmlInput:g,formHelperText:d,select:D,...R}},q={},Y=H.slotProps.inputLabel;"outlined"===F&&(Y&&void 0!==Y.shrink&&(q.notched=Y.shrink),q.label=v),_&&(D&&D.native||(q.id=void 0),q["aria-describedby"]=void 0);const[U,G]=El("root",{elementType:iN,shouldForwardComponentProp:!0,externalForwardedProps:{...H,...L},ownerState:N,className:Un(z.root,a),ref:t,additionalProps:{disabled:c,error:u,fullWidth:f,required:O,color:s,variant:F}}),[X,Q]=El("input",{elementType:W,externalForwardedProps:H,additionalProps:q,ownerState:N}),[K,Z]=El("inputLabel",{elementType:Ms,externalForwardedProps:H,ownerState:N}),[J,ee]=El("htmlInput",{elementType:"input",externalForwardedProps:H,ownerState:N}),[te,ne]=El("formHelperText",{elementType:nN,externalForwardedProps:H,ownerState:N}),[re,oe]=El("select",{elementType:Au,externalForwardedProps:H,ownerState:N}),ie=(0,le.jsx)(X,{"aria-describedby":V,autoComplete:r,autoFocus:o,defaultValue:l,fullWidth:f,multiline:S,name:k,rows:j,maxRows:x,minRows:w,type:A,value:I,id:$,inputRef:y,onBlur:C,onChange:M,onFocus:P,placeholder:T,inputProps:ee,slots:{input:E.htmlInput?J:void 0},...Q});return(0,le.jsxs)(U,{...G,children:[null!=v&&""!==v&&(0,le.jsx)(K,{htmlFor:$,id:B,...Z,children:v}),_?(0,le.jsx)(re,{"aria-describedby":V,id:$,labelId:B,value:I,input:ie,...oe,children:i}):ie,p&&(0,le.jsx)(te,{id:V,...ne,children:p})]})}),sN=aN;function lN(e){return ss("MuiIconButton",e)}const cN=ls("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),uN=Ka(nd,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,"default"!==n.color&&t[`color${ts(n.color)}`],n.edge&&t[`edge${ts(n.edge)}`],t[`size${ts(n.size)}`]]}})(gs(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),gs(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(bs()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(bs()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${cN.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${cN.loading}`]:{color:"transparent"}}))),dN=Ka("span",{name:"MuiIconButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),fN=G.forwardRef(function(e,t){const n=Za({props:e,name:"MuiIconButton"}),{edge:r=!1,children:o,className:i,color:a="default",disabled:s=!1,disableFocusRipple:l=!1,size:c="medium",id:u,loading:d=null,loadingIndicator:f,...p}=n,h=CF(u),m=f??(0,le.jsx)(FF,{"aria-labelledby":h,color:"inherit",size:16}),g={...n,edge:r,color:a,disabled:s,disableFocusRipple:l,loading:d,loadingIndicator:m,size:c},b=(e=>{const{classes:t,disabled:n,color:r,edge:o,size:i,loading:a}=e;return Na({root:["root",a&&"loading",n&&"disabled","default"!==r&&`color${ts(r)}`,o&&`edge${ts(o)}`,`size${ts(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},lN,t)})(g);return(0,le.jsxs)(uN,{id:d?h:u,className:Un(b.root,i),centerRipple:!0,focusRipple:!l,disabled:s||d,ref:t,...p,ownerState:g,children:["boolean"==typeof d&&(0,le.jsx)("span",{className:b.loadingWrapper,style:{display:"contents"},children:(0,le.jsx)(dN,{className:b.loadingIndicator,ownerState:g,children:d&&m})}),o]})});function pN(e){return ss("MuiInputAdornment",e)}const hN=ls("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var mN;const gN=Ka("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${ts(n.position)}`],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})(gs(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${hN.positionStart}&:not(.${hN.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),bN=G.forwardRef(function(e,t){const n=Za({props:e,name:"MuiInputAdornment"}),{children:r,className:o,component:i="div",disablePointerEvents:a=!1,disableTypography:s=!1,position:l,variant:c,...u}=n,d=hs()||{};let f=c;c&&d.variant,d&&!f&&(f=d.variant);const p={...n,hiddenLabel:d.hiddenLabel,size:d.size,disablePointerEvents:a,position:l,variant:f},h=(e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:i,variant:a}=e;return Na({root:["root",n&&"disablePointerEvents",o&&`position${ts(o)}`,a,r&&"hiddenLabel",i&&`size${ts(i)}`]},pN,t)})(p);return(0,le.jsx)(rs.Provider,{value:null,children:(0,le.jsx)(gN,{as:i,ownerState:p,className:Un(h.root,o),ref:t,...u,children:"string"!=typeof r||s?(0,le.jsxs)(G.Fragment,{children:["start"===l?mN||(mN=(0,le.jsx)("span",{className:"notranslate","aria-hidden":!0,children:""})):null,r]}):(0,le.jsx)(BR,{color:"textSecondary",children:r})})})}),yN=bN,vN=Number("7");function xN(e){const{ownerState:t}=nA(),n=Hn();return G.useMemo(()=>tr({},t,{isFieldDisabled:e.disabled??!1,isFieldReadOnly:e.readOnly??!1,isFieldRequired:e.required??!1,fieldDirection:n?"rtl":"ltr"}),[t,e.disabled,e.readOnly,e.required,n])}Number("3"),Number("5");const wN=Bc((0,le.jsx)("path",{d:"M7 10l5 5 5-5z"})),SN=Bc((0,le.jsx)("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"})),kN=Bc((0,le.jsx)("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})),CN=Bc((0,le.jsx)("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"})),MN=Bc((0,le.jsxs)(G.Fragment,{children:[(0,le.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,le.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})),PN=Bc((0,le.jsx)("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"})),TN=Bc((0,le.jsxs)(G.Fragment,{children:[(0,le.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,le.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})),ON=Bc((0,le.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}));function jN(e){return ss("MuiPickersTextField",e)}function _N(e){return ss("MuiPickersInputBase",e)}ls("MuiPickersTextField",["root","focused","disabled","error","required"]);const DN=ls("MuiPickersInputBase",["root","focused","disabled","error","notchedOutline","sectionContent","sectionBefore","sectionAfter","adornedStart","adornedEnd","input","inputSizeSmall","activeBar"]);function EN(e){return ss("MuiPickersOutlinedInput",e)}const RN=tr({},DN,ls("MuiPickersOutlinedInput",["root","notchedOutline","input"])),AN=G.createContext(null),IN=()=>{const e=G.useContext(AN);if(null==e)throw new Error(["MUI X: The `usePickerTextFieldOwnerState` can only be called in components that are used inside a PickerTextField component"].join("\n"));return e},FN=["children","className","label","notched","shrink"],LN=Ka("fieldset",{name:"MuiPickersOutlinedInput",slot:"NotchedOutline"})(({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%",borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),NN=Ka("span",{slot:"internal",shouldForwardProp:void 0})(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit"})),zN=Ka("legend",{slot:"internal",shouldForwardProp:e=>Va(e)&&"notched"!==e})(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:{inputHasLabel:!1},style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:{inputHasLabel:!0},style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:{inputHasLabel:!0,notched:!0},style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]}));function $N(e){const{className:t,label:n,notched:r}=e,o=il(e,FN),i=IN();return(0,le.jsx)(LN,tr({"aria-hidden":!0,className:t},o,{ownerState:i,children:(0,le.jsx)(zN,{ownerState:i,notched:r,children:n?(0,le.jsx)(NN,{children:n}):(0,le.jsx)(NN,{className:"notranslate",children:""})})}))}function VN(e){return ss("MuiPickersSectionList",e)}const BN=ls("MuiPickersSectionList",["root","section","sectionContent"]),WN=["slots","slotProps","elements","sectionListRef","classes"],HN=Ka("div",{name:"MuiPickersSectionList",slot:"Root"})({direction:"ltr /*! @noflip */",outline:"none"}),qN=Ka("span",{name:"MuiPickersSectionList",slot:"Section"})({}),YN=Ka("span",{name:"MuiPickersSectionList",slot:"SectionSeparator"})({whiteSpace:"pre"}),UN=Ka("span",{name:"MuiPickersSectionList",slot:"SectionContent"})({outline:"none"});function GN(e){const{slots:t,slotProps:n,element:r,classes:o}=e,{ownerState:i}=nA(),a=t?.section??qN,s=Fs({elementType:a,externalSlotProps:n?.section,externalForwardedProps:r.container,className:o.section,ownerState:i}),l=t?.sectionContent??UN,c=Fs({elementType:l,externalSlotProps:n?.sectionContent,externalForwardedProps:r.content,additionalProps:{suppressContentEditableWarning:!0},className:o.sectionContent,ownerState:i}),u=t?.sectionSeparator??YN,d=Fs({elementType:u,externalSlotProps:n?.sectionSeparator,externalForwardedProps:r.before,ownerState:tr({},i,{separatorPosition:"before"})}),f=Fs({elementType:u,externalSlotProps:n?.sectionSeparator,externalForwardedProps:r.after,ownerState:tr({},i,{separatorPosition:"after"})}),p=G.useRef(null),h=js(c.ref,p);return(0,le.jsxs)(a,tr({},s,{children:[(0,le.jsx)(u,tr({},d)),(0,le.jsx)(l,tr({},c,{ref:h,onBlur:e=>{const t=e.relatedTarget,n=e.currentTarget.closest(`.${BN.root}`);n&&t instanceof Node&&n.contains(t)&&e.stopPropagation()}})),(0,le.jsx)(u,tr({},f))]}))}const XN=G.forwardRef(function(e,t){const n=UE({props:e,name:"MuiPickersSectionList"}),{slots:r,slotProps:o,elements:i,sectionListRef:a,classes:s}=n,l=il(n,WN),c=(e=>Na({root:["root"],section:["section"],sectionContent:["sectionContent"]},VN,e))(s),{ownerState:u}=nA(),d=G.useRef(null),f=js(t,d),p=e=>{if(!d.current)throw new Error(`MUI X: Cannot call sectionListRef.${e} before the mount of the component.`);return d.current};G.useImperativeHandle(a,()=>({getRoot:()=>p("getRoot"),getSectionContainer:e=>p("getSectionContainer").querySelector(`.${BN.section}[data-sectionindex="${e}"]`),getSectionContent:e=>p("getSectionContent").querySelector(`.${BN.section}[data-sectionindex="${e}"] .${BN.sectionContent}`),getSectionIndexFromDOMElement(e){const t=p("getSectionIndexFromDOMElement");if(null==e||!t.contains(e))return null;let n=null;return e.classList.contains(BN.section)?n=e:e.classList.contains(BN.sectionContent)&&(n=e.parentElement),null==n?null:Number(n.dataset.sectionindex)}}));const h=r?.root??HN,m=Fs({elementType:h,externalSlotProps:o?.root,externalForwardedProps:l,additionalProps:{ref:f,suppressContentEditableWarning:!0},className:c.root,ownerState:u});return(0,le.jsx)(h,tr({},m,{children:m.contentEditable?i.map(({content:e,before:t,after:n})=>`${t.children}${e.children}${n.children}`).join(""):(0,le.jsx)(G.Fragment,{children:i.map((e,t)=>(0,le.jsx)(GN,{slots:r,slotProps:o,element:e,classes:c},t))})}))}),QN=["elements","areAllSectionsEmpty","defaultValue","label","value","onChange","id","autoFocus","endAdornment","startAdornment","renderSuffix","slots","slotProps","contentEditable","tabIndex","onInput","onPaste","onKeyDown","fullWidth","name","readOnly","inputProps","inputRef","sectionListRef","onFocus","onBlur","classes","ownerState"],KN=e=>Math.round(1e5*e)/1e5,ZN=Ka("div",{name:"MuiPickersInputBase",slot:"Root"})(({theme:e})=>tr({},e.typography.body1,{color:(e.vars||e).palette.text.primary,cursor:"text",padding:0,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",boxSizing:"border-box",letterSpacing:`${KN(.15/16)}em`,variants:[{props:{isInputInFullWidth:!0},style:{width:"100%"}}]})),JN=Ka(HN,{name:"MuiPickersInputBase",slot:"SectionsContainer"})(({theme:e})=>({padding:"4px 0 5px",fontFamily:e.typography.fontFamily,fontSize:"inherit",lineHeight:"1.4375em",flexGrow:1,outline:"none",display:"flex",flexWrap:"nowrap",overflow:"hidden",letterSpacing:"inherit",width:"182px",variants:[{props:{fieldDirection:"rtl"},style:{justifyContent:"end"}},{props:{inputSize:"small"},style:{paddingTop:1}},{props:{hasStartAdornment:!1,isFieldFocused:!1,isFieldValueEmpty:!0},style:{color:"currentColor",opacity:0}},{props:{hasStartAdornment:!1,isFieldFocused:!1,isFieldValueEmpty:!0,inputHasLabel:!1},style:e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:"light"===e.palette.mode?.42:.5}},{props:{hasStartAdornment:!1,isFieldFocused:!1,isFieldValueEmpty:!0,inputHasLabel:!0,isLabelShrunk:!0},style:e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:"light"===e.palette.mode?.42:.5}}]})),ez=Ka(qN,{name:"MuiPickersInputBase",slot:"Section"})(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit",letterSpacing:"inherit",lineHeight:"1.4375em",display:"inline-block",whiteSpace:"nowrap"})),tz=Ka(UN,{name:"MuiPickersInputBase",slot:"SectionContent",overridesResolver:(e,t)=>t.content})(({theme:e})=>({fontFamily:e.typography.fontFamily,lineHeight:"1.4375em",letterSpacing:"inherit",width:"fit-content",outline:"none"})),nz=Ka(YN,{name:"MuiPickersInputBase",slot:"Separator"})(()=>({whiteSpace:"pre",letterSpacing:"inherit"})),rz=Ka("input",{name:"MuiPickersInputBase",slot:"Input",overridesResolver:(e,t)=>t.hiddenInput})(tr({},{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"})),oz=Ka("div",{name:"MuiPickersInputBase",slot:"ActiveBar"})(({theme:e,ownerState:t})=>({display:"none",position:"absolute",height:2,bottom:2,borderTopLeftRadius:2,borderTopRightRadius:2,transition:e.transitions.create(["width","left"],{duration:e.transitions.duration.shortest}),backgroundColor:(e.vars||e).palette.primary.main,'[data-active-range-position="start"] &, [data-active-range-position="end"] &':{display:"block"},'[data-active-range-position="start"] &':{left:t.sectionOffsets[0]},'[data-active-range-position="end"] &':{left:t.sectionOffsets[1]}}));function iz(e,t,n,r){if(e.content.id){const e=t.current?.querySelectorAll(`[data-sectionindex="${n}"] [data-range-position="${r}"]`);if(e)return Array.from(e).reduce((e,t)=>e+t.offsetWidth,0)}return 0}const az=G.forwardRef(function(e,t){const n=UE({props:e,name:"MuiPickersInputBase"}),{elements:r,areAllSectionsEmpty:o,value:i,onChange:a,id:s,endAdornment:l,startAdornment:c,renderSuffix:u,slots:d,slotProps:f,contentEditable:p,tabIndex:h,onInput:m,onPaste:g,onKeyDown:b,name:y,readOnly:v,inputProps:x,inputRef:w,sectionListRef:S,onFocus:k,onBlur:C,classes:M,ownerState:P}=n,T=il(n,QN),O=IN(),j=G.useRef(null),_=G.useRef(null),D=G.useRef([]),E=js(t,j),R=js(x?.ref,w),A=hs();if(!A)throw new Error("MUI X: PickersInputBase should always be used inside a PickersTextField component");const I=P??O,F=e=>{A.onFocus?.(e),k?.(e)};G.useEffect(()=>{A&&A.setAdornedStart(Boolean(c))},[A,c]),G.useEffect(()=>{A&&(o?A.onEmpty():A.onFilled())},[A,o]);const L=((e,t)=>{const{isFieldFocused:n,isFieldDisabled:r,isFieldReadOnly:o,hasFieldError:i,inputSize:a,isInputInFullWidth:s,inputColor:l,hasStartAdornment:c,hasEndAdornment:u}=t;return Na({root:["root",n&&!r&&"focused",r&&"disabled",o&&"readOnly",i&&"error",s&&"fullWidth",`color${Er(l)}`,"small"===a&&"inputSizeSmall",c&&"adornedStart",u&&"adornedEnd"],notchedOutline:["notchedOutline"],input:["input"],sectionsContainer:["sectionsContainer"],sectionContent:["sectionContent"],sectionBefore:["sectionBefore"],sectionAfter:["sectionAfter"],activeBar:["activeBar"]},_N,e)})(M,I),N=d?.root||ZN,z=Fs({elementType:N,externalSlotProps:f?.root,externalForwardedProps:T,additionalProps:{"aria-invalid":A.error,ref:E},className:L.root,ownerState:I}),$=d?.input||JN,V=r.some(e=>void 0!==e.content["data-range-position"]);return G.useEffect(()=>{if(!V||!I.isPickerOpen)return;const{activeBarWidth:e,sectionOffsets:t}=function(e,t){let n=0;const r=t.current?.getAttribute("data-active-range-position");if("end"===r)for(let r=e.length-1;r>=e.length/2;r-=1)n+=iz(e[r],t,r,"end");else for(let r=0;r<e.length/2;r+=1)n+=iz(e[r],t,r,"start");return{activeBarWidth:n,sectionOffsets:[t.current?.querySelector('[data-sectionindex="0"]')?.offsetLeft||0,t.current?.querySelector(`[data-sectionindex="${e.length/2}"]`)?.offsetLeft||0]}}(r,j);D.current=[t[0],t[1]],_.current&&(_.current.style.width=`${e}px`)},[r,V,I.isPickerOpen]),(0,le.jsxs)(N,tr({},z,{children:[c,(0,le.jsx)(XN,{sectionListRef:S,elements:r,contentEditable:p,tabIndex:h,className:L.sectionsContainer,onFocus:F,onBlur:e=>{A.onBlur?.(e),C?.(e)},onInput:m,onPaste:g,onKeyDown:e=>{if(b?.(e),"Enter"===e.key&&!e.defaultMuiPrevented){if(j.current?.dataset.multiInput)return;const t=j.current?.closest("form"),n=t?.querySelector('[type="submit"]');if(!t||!n)return;e.preventDefault(),t.requestSubmit(n)}},slots:{root:$,section:ez,sectionContent:tz,sectionSeparator:nz},slotProps:{root:tr({},f?.input,{ownerState:I}),sectionContent:{className:DN.sectionContent},sectionSeparator:({separatorPosition:e})=>({className:"before"===e?DN.sectionBefore:DN.sectionAfter})}}),l,u?u(tr({},A)):null,(0,le.jsx)(rz,tr({name:y,className:L.input,value:i,onChange:a,id:s,"aria-hidden":"true",tabIndex:-1,readOnly:v,required:A.required,disabled:A.disabled,onFocus:e=>{F(e)}},x,{ref:R})),V&&(0,le.jsx)(oz,{className:L.activeBar,ref:_,ownerState:{sectionOffsets:D.current}})]}))}),sz=["label","autoFocus","ownerState","classes","notched"],lz=Ka(ZN,{name:"MuiPickersOutlinedInput",slot:"Root"})(({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{padding:"0 14px",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${RN.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${RN.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${RN.focused} .${RN.notchedOutline}`]:{borderStyle:"solid",borderWidth:2},[`&.${RN.disabled}`]:{[`& .${RN.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled},"*":{color:(e.vars||e).palette.action.disabled}},[`&.${RN.error} .${RN.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},variants:Object.keys((e.vars??e).palette).filter(t=>(e.vars??e).palette[t]?.main??!1).map(t=>({props:{inputColor:t},style:{[`&.${RN.focused}:not(.${RN.error}) .${RN.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}}))}}),cz=Ka(JN,{name:"MuiPickersOutlinedInput",slot:"SectionsContainer"})({padding:"16.5px 0",variants:[{props:{inputSize:"small"},style:{padding:"8.5px 0"}}]}),uz=G.forwardRef(function(e,t){const n=UE({props:e,name:"MuiPickersOutlinedInput"}),{label:r,classes:o,notched:i}=n,a=il(n,sz),s=hs(),l=(e=>tr({},e,Na({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},EN,e)))(o);return(0,le.jsx)(az,tr({slots:{root:lz,input:cz},renderSuffix:e=>(0,le.jsx)($N,{shrink:Boolean(i||e.adornedStart||e.focused||e.filled),notched:Boolean(i||e.adornedStart||e.focused||e.filled),className:l.notchedOutline,label:null!=r&&""!==r&&s?.required?(0,le.jsxs)(G.Fragment,{children:[r," ","*"]}):r})},a,{label:r,classes:l,ref:t}))});function dz(e){return ss("MuiPickersFilledInput",e)}uz.muiName="Input";const fz=tr({},DN,ls("MuiPickersFilledInput",["root","underline","input"])),pz=["label","autoFocus","disableUnderline","hiddenLabel","classes"],hz=Ka(ZN,{name:"MuiPickersFilledInput",slot:"Root",shouldForwardProp:e=>Va(e)&&"disableUnderline"!==e})(({theme:e})=>{const t="light"===e.palette.mode,n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${fz.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${fz.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[...Object.keys((e.vars??e).palette).filter(t=>(e.vars??e).palette[t].main).map(t=>({props:{inputColor:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t]?.main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${fz.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${fz.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${fz.disabled}, .${fz.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${fz.disabled}:before`]:{borderBottomStyle:"dotted"}}},{props:{hasStartAdornment:!0},style:{paddingLeft:12}},{props:{hasEndAdornment:!0},style:{paddingRight:12}}]}}),mz=Ka(JN,{name:"MuiPickersFilledInput",slot:"sectionsContainer",shouldForwardProp:e=>Va(e)&&"hiddenLabel"!==e})({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,variants:[{props:{inputSize:"small"},style:{paddingTop:21,paddingBottom:4}},{props:{hasStartAdornment:!0},style:{paddingLeft:0}},{props:{hasEndAdornment:!0},style:{paddingRight:0}},{props:{hiddenLabel:!0},style:{paddingTop:16,paddingBottom:17}},{props:{hiddenLabel:!0,inputSize:"small"},style:{paddingTop:8,paddingBottom:9}}]}),gz=G.forwardRef(function(e,t){const n=UE({props:e,name:"MuiPickersFilledInput"}),{label:r,disableUnderline:o=!1,hiddenLabel:i=!1,classes:a}=n,s=il(n,pz),l=tr({},IN(),{inputHasUnderline:!o}),c=((e,t)=>{const{inputHasUnderline:n}=t;return tr({},e,Na({root:["root",n&&"underline"],input:["input"]},dz,e))})(a,l);return(0,le.jsx)(az,tr({slots:{root:hz,input:mz},slotProps:{root:{disableUnderline:o},input:{hiddenLabel:i}}},s,{label:r,classes:c,ref:t,ownerState:l}))});function bz(e){return ss("MuiPickersFilledInput",e)}gz.muiName="Input";const yz=tr({},DN,ls("MuiPickersInput",["root","underline","input"])),vz=["label","autoFocus","disableUnderline","ownerState","classes"],xz=Ka(ZN,{name:"MuiPickersInput",slot:"Root",shouldForwardProp:e=>Va(e)&&"disableUnderline"!==e})(({theme:e})=>{let t="light"===e.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(t=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{"label + &":{marginTop:16},variants:[...Object.keys((e.vars??e).palette).filter(t=>(e.vars??e).palette[t].main).map(t=>({props:{inputColor:t,inputHasUnderline:!0},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}})),{props:{inputHasUnderline:!0},style:{"&::after":{background:"red",left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${yz.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${yz.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${t}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${yz.disabled}, .${yz.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${yz.disabled}:before`]:{borderBottomStyle:"dotted"}}}]}}),wz=G.forwardRef(function(e,t){const n=UE({props:e,name:"MuiPickersInput"}),{label:r,disableUnderline:o=!1,classes:i}=n,a=il(n,vz),s=tr({},IN(),{inputHasUnderline:!o}),l=((e,t)=>{const{inputHasUnderline:n}=t;return tr({},e,Na({root:["root",!n&&"underline"],input:["input"]},bz,e))})(i,s);return(0,le.jsx)(az,tr({slots:{root:xz},slotProps:{root:{disableUnderline:o}}},a,{ownerState:s,label:r,classes:l,ref:t}))});wz.muiName="Input";const Sz=["onFocus","onBlur","className","classes","color","disabled","error","variant","required","hiddenLabel","InputProps","inputProps","inputRef","sectionListRef","elements","areAllSectionsEmpty","onClick","onKeyDown","onKeyUp","onPaste","onInput","endAdornment","startAdornment","tabIndex","contentEditable","focused","value","onChange","fullWidth","id","name","helperText","FormHelperTextProps","label","InputLabelProps","data-active-range-position"],kz={standard:wz,filled:gz,outlined:uz},Cz=Ka(fs,{name:"MuiPickersTextField",slot:"Root"})({maxWidth:"100%"}),Mz=G.forwardRef(function(e,t){const n=UE({props:e,name:"MuiPickersTextField"}),{onFocus:r,onBlur:o,className:i,classes:a,color:s="primary",disabled:l=!1,error:c=!1,variant:u="outlined",required:d=!1,hiddenLabel:f=!1,InputProps:p,inputProps:h,inputRef:m,sectionListRef:g,elements:b,areAllSectionsEmpty:y,onClick:v,onKeyDown:x,onKeyUp:w,onPaste:S,onInput:k,endAdornment:C,startAdornment:M,tabIndex:P,contentEditable:T,focused:O,value:j,onChange:_,fullWidth:D,id:E,name:R,helperText:A,FormHelperTextProps:I,label:F,InputLabelProps:L,"data-active-range-position":N}=n,z=il(n,Sz),$=js(t,G.useRef(null)),V=er(E),B=A&&V?`${V}-helper-text`:void 0,W=F&&V?`${V}-label`:void 0,H=xN({disabled:n.disabled,required:n.required,readOnly:p?.readOnly}),q=G.useMemo(()=>tr({},H,{isFieldValueEmpty:y,isFieldFocused:O??!1,hasFieldError:c??!1,inputSize:n.size??"medium",inputColor:s??"primary",isInputInFullWidth:D??!1,hasStartAdornment:Boolean(M??p?.startAdornment),hasEndAdornment:Boolean(C??p?.endAdornment),inputHasLabel:!!F,isLabelShrunk:Boolean(L?.shrink)}),[H,y,O,c,n.size,s,D,M,C,p?.startAdornment,p?.endAdornment,F,L?.shrink]),Y=((e,t)=>{const{isFieldFocused:n,isFieldDisabled:r,isFieldRequired:o}=t;return Na({root:["root",n&&!r&&"focused",r&&"disabled",o&&"required"]},jN,e)})(a,q),U=kz[u],X={};return"outlined"===u?(L&&void 0!==L.shrink&&(X.notched=L.shrink),X.label=F):"filled"===u&&(X.hiddenLabel=f),(0,le.jsx)(AN.Provider,{value:q,children:(0,le.jsxs)(Cz,tr({className:Un(Y.root,i),ref:$,focused:O,disabled:l,variant:u,error:c,color:s,fullWidth:D,required:d,ownerState:q},z,{children:[null!=F&&""!==F&&(0,le.jsx)(Ms,tr({htmlFor:V,id:W},L,{children:F})),(0,le.jsx)(U,tr({elements:b,areAllSectionsEmpty:y,onClick:v,onKeyDown:x,onKeyUp:w,onInput:k,onPaste:S,onFocus:r,onBlur:o,endAdornment:C,startAdornment:M,tabIndex:P,contentEditable:T,value:j,onChange:_,id:V,fullWidth:D,inputProps:h,inputRef:m,sectionListRef:g,label:F,name:R,role:"group","aria-labelledby":W,"aria-describedby":B,"aria-live":B?"polite":void 0,"data-active-range-position":N},X,p)),A&&(0,le.jsx)(nN,tr({id:B},I,{children:A}))]}))})}),Pz=["enableAccessibleFieldDOMStructure"],Tz=["InputProps","readOnly","onClear","clearable","clearButtonPosition","openPickerButtonPosition","openPickerAriaLabel"],Oz=["onPaste","onKeyDown","inputMode","readOnly","InputProps","inputProps","inputRef","onClear","clearable","clearButtonPosition","openPickerButtonPosition","openPickerAriaLabel"],jz=["ownerState"],_z=["ownerState"],Dz=["ownerState"],Ez=["ownerState"],Rz=["InputProps","inputProps"],Az=()=>{},Iz=G.createContext({slots:{},slotProps:{},inputRef:void 0});function Fz(e){const{fieldResponse:t,defaultOpenPickerIcon:n}=e,r=fA(),o=zL(),i=G.useContext(Iz),{textFieldProps:a,onClear:s,clearable:l,openPickerAriaLabel:c,clearButtonPosition:u="end",openPickerButtonPosition:d="end"}=(e=>{let{enableAccessibleFieldDOMStructure:t}=e,n=il(e,Pz);if(t){const{InputProps:e,readOnly:t,onClear:r,clearable:o,clearButtonPosition:i,openPickerButtonPosition:a,openPickerAriaLabel:s}=n,l=il(n,Tz),c=vN>=6&&l?.slotProps?.input?Lz(l?.slotProps?.input,e):Az;return{clearable:o,onClear:r,clearButtonPosition:i,openPickerButtonPosition:a,openPickerAriaLabel:s,textFieldProps:tr({},l,vN>=6&&l?.slotProps?.input?{slotProps:tr({},l?.slotProps,{input:e=>tr({},Is(c,e),{readOnly:t})})}:{InputProps:tr({},e??{},{readOnly:t})})}}const{onPaste:r,onKeyDown:o,inputMode:i,readOnly:a,InputProps:s,inputProps:l,inputRef:c,onClear:u,clearable:d,clearButtonPosition:f,openPickerButtonPosition:p,openPickerAriaLabel:h}=n,m=il(n,Oz),g=vN>=6&&m?.slotProps?.input?Lz(m?.slotProps?.input,s):Az,b=vN>=6&&m?.slotProps?.htmlInput?Lz(m?.slotProps?.htmlInput,l):Az;return{clearable:d,onClear:u,clearButtonPosition:f,openPickerButtonPosition:p,openPickerAriaLabel:h,textFieldProps:tr({},m,vN>=6&&(m?.slotProps?.input||m?.slotProps?.htmlInput)?{slotProps:tr({},m?.slotProps,{input:e=>tr({},Is(g,e),{readOnly:a}),htmlInput:e=>tr({},Is(b,e),{inputMode:i,onPaste:r,onKeyDown:o,ref:c})})}:{InputProps:tr({},s??{},{readOnly:a}),inputProps:tr({},l??{},{inputMode:i,onPaste:r,onKeyDown:o,ref:c})})}})(t),f=xN(a),p=zl(e=>{e.preventDefault(),o?.setOpen(e=>!e)}),h=o?o.triggerStatus:"hidden",m=l?u:null,g="hidden"!==h?d:null,b=i.slots.textField??(!1===t.enableAccessibleFieldDOMStructure?sN:Mz),y=i.slots.inputAdornment??yN,v=il(Fs({elementType:y,externalSlotProps:i.slotProps.inputAdornment,additionalProps:{position:"start"},ownerState:tr({},f,{position:"start"})}),jz),x=il(Fs({elementType:y,externalSlotProps:i.slotProps.inputAdornment,additionalProps:{position:"end"},ownerState:tr({},f,{position:"end"})}),_z),w=i.slots.openPickerButton??fN,S=il(Fs({elementType:w,externalSlotProps:i.slotProps.openPickerButton,additionalProps:{disabled:"disabled"===h,onClick:p,"aria-label":c,edge:"standard"!==a.variant&&g},ownerState:f}),Dz),k=i.slots.openPickerIcon??n,C=Fs({elementType:k,externalSlotProps:i.slotProps.openPickerIcon,ownerState:f}),M=i.slots.clearButton??fN,P=il(Fs({elementType:M,externalSlotProps:i.slotProps.clearButton,className:"clearButton",additionalProps:{title:r.fieldClearLabel,tabIndex:-1,onClick:s,disabled:t.disabled||t.readOnly,edge:"standard"!==a.variant&&m!==g&&m},ownerState:f}),Ez),T=i.slots.clearIcon??ON,O=Fs({elementType:T,externalSlotProps:i.slotProps.clearIcon,additionalProps:{fontSize:"small"},ownerState:f});a.ref=js(a.ref,o?.rootRef);const j={},_=Is((vN>=6&&a?.slotProps?.input)??a.InputProps,f);o&&(j.ref=o.triggerRef),_?.startAdornment||"start"!==m&&"start"!==g||(j.startAdornment=(0,le.jsxs)(y,tr({},v,{children:["start"===g&&(0,le.jsx)(w,tr({},S,{children:(0,le.jsx)(k,tr({},C))})),"start"===m&&(0,le.jsx)(M,tr({},P,{children:(0,le.jsx)(T,tr({},O))}))]}))),_?.endAdornment||"end"!==m&&"end"!==g||(j.endAdornment=(0,le.jsxs)(y,tr({},x,{children:["end"===m&&(0,le.jsx)(M,tr({},P,{children:(0,le.jsx)(T,tr({},O))})),"end"===g&&(0,le.jsx)(w,tr({},S,{children:(0,le.jsx)(k,tr({},C))}))]}))),j?.endAdornment||j?.startAdornment||!i.slots.inputAdornment||(j.endAdornment=(0,le.jsx)(y,tr({},x))),null!=m&&(a.sx=[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(a.sx)?a.sx:[a.sx]]);const D=vN>=6&&a?.slotProps?.input?Is(Lz(_,j),f):tr({},_,j);return a.inputProps=vN>=6&&a?.slotProps?.htmlInput?Is(a.slotProps.htmlInput,f):a.inputProps,delete a?.slotProps?.input,t.enableAccessibleFieldDOMStructure&&delete a?.slotProps,(0,le.jsx)(b,tr({},a,{InputProps:D}))}function Lz(e,t){return e?t?n=>tr({},Is(t,n),Is(e,n)):e:t}function Nz(e){const{ref:t,externalForwardedProps:n,slotProps:r}=e,o=G.useContext(Iz),i=zL(),a=xN(n),{InputProps:s,inputProps:l}=n,c=il(n,Rz),u=Fs({elementType:Mz,externalSlotProps:Lz(o.slotProps.textField,r?.textField),externalForwardedProps:c,additionalProps:{ref:t,sx:i?.rootSx,label:i?.label,name:i?.name,className:i?.rootClassName,inputRef:o.inputRef},ownerState:a});return u.inputProps=tr({},l,u.inputProps),u.InputProps=tr({},s,u.InputProps),u}function zz(e){const{slots:t={},slotProps:n={},inputRef:r,children:o}=e,i=G.useMemo(()=>({inputRef:r,slots:{openPickerButton:t.openPickerButton,openPickerIcon:t.openPickerIcon,textField:t.textField,inputAdornment:t.inputAdornment,clearIcon:t.clearIcon,clearButton:t.clearButton},slotProps:{openPickerButton:n.openPickerButton,openPickerIcon:n.openPickerIcon,textField:n.textField,inputAdornment:n.inputAdornment,clearIcon:n.clearIcon,clearButton:n.clearButton}}),[r,t.openPickerButton,t.openPickerIcon,t.textField,t.inputAdornment,t.clearIcon,t.clearButton,n.openPickerButton,n.openPickerIcon,n.textField,n.inputAdornment,n.clearIcon,n.clearButton]);return(0,le.jsx)(Iz.Provider,{value:i,children:o})}const $z=["slots","slotProps"],Vz=G.forwardRef(function(e,t){const n=UE({props:e,name:"MuiDateField"}),{slots:r,slotProps:o}=n,i=il(n,$z),a=(e=>{const t=function(e={}){const{enableAccessibleFieldDOMStructure:t=!0}=e;return G.useMemo(()=>({valueType:"date",validator:yA,internal_valueManager:IR,internal_fieldValueManager:FR,internal_enableAccessibleFieldDOMStructure:t,internal_useApplyDefaultValuesToFieldInternalProps:SA,internal_useOpenPickerButtonAriaLabel:wA}),[t])}(e);return KL({manager:t,props:e})})(Nz({slotProps:o,ref:t,externalForwardedProps:i}));return(0,le.jsx)(zz,{slots:r,slotProps:o,inputRef:i.inputRef,children:(0,le.jsx)(Fz,{fieldResponse:a,defaultOpenPickerIcon:CN})})}),Bz=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:a,timezone:s})=>{const l=dA();return G.useCallback(c=>null!==yA({adapter:l,value:c,timezone:s,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:a}}),[l,e,t,n,r,o,i,a,s])},Wz=e=>ss("MuiPickersFadeTransitionGroup",e),Hz=(ls("MuiPickersFadeTransitionGroup",["root"]),["children"]),qz=Ka(Wu,{name:"MuiPickersFadeTransitionGroup",slot:"Root"})({display:"block",position:"relative"});function Yz(e){const t=UE({props:e,name:"MuiPickersFadeTransitionGroup"}),{className:n,reduceAnimations:r,transKey:o,classes:i}=t,{children:a}=t,s=il(t,Hz),l=(e=>Na({root:["root"]},Wz,e))(i),c=yl();return r?a:(0,le.jsx)(qz,{className:Un(l.root,n),ownerState:s,children:(0,le.jsx)(Il,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:c.transitions.duration.enteringScreen,enter:c.transitions.duration.enteringScreen,exit:0},children:a},o)})}function Uz(e){return ss("MuiPickersDay",e)}const Gz=ls("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]);function Xz(e){const{disabled:t,selected:n,today:r,outsideCurrentMonth:o,day:i,disableMargin:a,disableHighlightToday:s,showDaysOutsideCurrentMonth:l}=e,c=dA(),{ownerState:u}=nA();return G.useMemo(()=>tr({},u,{day:i,isDaySelected:n??!1,isDayDisabled:t??!1,isDayCurrent:r??!1,isDayOutsideMonth:o??!1,isDayStartOfWeek:c.isSameDay(i,c.startOfWeek(i)),isDayEndOfWeek:c.isSameDay(i,c.endOfWeek(i)),disableMargin:a??!1,disableHighlightToday:s??!1,showDaysOutsideCurrentMonth:l??!1}),[c,u,i,n,t,r,o,a,s,l])}const Qz=["autoFocus","className","classes","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","children","isFirstVisibleCell","isLastVisibleCell","day","selected","disabled","today","outsideCurrentMonth","disableMargin","disableHighlightToday","showDaysOutsideCurrentMonth"],Kz=({theme:e})=>tr({},e.typography.caption,{width:36,height:36,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),color:(e.vars||e).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:ti(e.palette.primary.main,e.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:ti(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${Gz.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${Gz.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${Gz.disabled}:not(.${Gz.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${Gz.disabled}&.${Gz.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:"0 2px"}},{props:{isDayOutsideMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(e.vars||e).palette.text.secondary}},{props:{disableHighlightToday:!1,isDayCurrent:!0},style:{[`&:not(.${Gz.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}}]}),Zz=(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.isDayCurrent&&t.today,n.isDayOutsideMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.isDayOutsideMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},Jz=Ka(nd,{name:"MuiPickersDay",slot:"Root",overridesResolver:Zz})(Kz),e$=Ka("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:Zz})(({theme:e})=>tr({},Kz({theme:e}),{opacity:0,pointerEvents:"none"})),t$=()=>{},n$=G.forwardRef(function(e,t){const n=UE({props:e,name:"MuiPickersDay"}),{autoFocus:r=!1,className:o,classes:i,isAnimating:a,onClick:s,onDaySelect:l,onFocus:c=t$,onBlur:u=t$,onKeyDown:d=t$,onMouseDown:f=t$,onMouseEnter:p=t$,children:h,day:m,selected:g,disabled:b,today:y,outsideCurrentMonth:v,disableMargin:x,disableHighlightToday:w,showDaysOutsideCurrentMonth:S}=n,k=il(n,Qz),C=Xz({day:m,selected:g,disabled:b,today:y,outsideCurrentMonth:v,disableMargin:x,disableHighlightToday:w,showDaysOutsideCurrentMonth:S}),M=((e,t)=>{const{isDaySelected:n,isDayDisabled:r,isDayCurrent:o,isDayOutsideMonth:i,disableMargin:a,disableHighlightToday:s,showDaysOutsideCurrentMonth:l}=t,c=i&&!l;return Na({root:["root",n&&!c&&"selected",r&&"disabled",!a&&"dayWithMargin",!s&&o&&"today",i&&l&&"dayOutsideMonth",c&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},Uz,e)})(i,C),P=dA(),T=G.useRef(null),O=js(T,t);return Kn(()=>{!r||b||a||v||T.current.focus()},[r,b,a,v]),v&&!S?(0,le.jsx)(e$,{className:Un(M.root,M.hiddenDaySpacingFiller,o),ownerState:C,role:k.role}):(0,le.jsx)(Jz,tr({className:Un(M.root,o),ref:O,centerRipple:!0,disabled:b,tabIndex:g?0:-1,onKeyDown:e=>d(e,m),onFocus:e=>c(e,m),onBlur:e=>u(e,m),onMouseEnter:e=>p(e,m),onClick:e=>{e.defaultMuiPrevented=!0,b||l(m),v&&e.currentTarget.focus(),s&&s(e)},onMouseDown:e=>{f(e),v&&e.preventDefault()}},k,{ownerState:C,children:h??P.format(m,"dayOfMonth")}))}),r$=G.memo(n$);function o$(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var i$=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"==typeof n.className?n.className=o$(n.className,r):n.setAttribute("class",o$(n.className&&n.className.baseVal||"",r)));var n,r})},a$=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),o=r[0],i=r[1];t.removeClasses(o,"exit"),t.addClass(o,i?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),o=r[0],i=r[1]?"appear":"enter";t.addClass(o,i,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),o=r[0],i=r[1]?"appear":"enter";t.removeClasses(o,i),t.addClass(o,i,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r="string"==typeof n,o=r?(r&&n?n+"-":"")+e:n[e];return{baseClassName:o,activeClassName:r?o+"-active":n[e+"Active"],doneClassName:r?o+"-done":n[e+"Done"]}},t}sl(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+"ClassName"],o=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&o&&(r+=" "+o),"active"===n&&e&&cl(e),r&&(this.appliedClasses[t][n]=r,function(e,t){e&&t&&t.split(" ").forEach(function(t){return r=t,void((n=e).classList?n.classList.add(r):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,r)||("string"==typeof n.className?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r)));var n,r})}(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,o=n.active,i=n.done;this.appliedClasses[t]={},r&&i$(e,r),o&&i$(e,o),i&&i$(e,i)},n.render=function(){var e=this.props,t=(e.classNames,il(e,["classNames"]));return Q().createElement(bl,tr({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(Q().Component);a$.defaultProps={classNames:""},a$.propTypes={};const s$=a$,l$=e=>ss("MuiPickersSlideTransition",e),c$=ls("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),u$=["children","className","reduceAnimations","slideDirection","transKey","classes"],d$=Ka(Wu,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${c$["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${c$["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${c$.slideEnterActive}`]:t.slideEnterActive},{[`.${c$.slideExit}`]:t.slideExit},{[`.${c$["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${c$["slideExitActiveLeft-right"]}`]:t["slideExitActiveLeft-right"]}]})(({theme:e})=>{const t=e.transitions.create("transform",{duration:e.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${c$["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${c$["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${c$.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${c$.slideExit}`]:{transform:"translate(0%)"},[`& .${c$["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${c$["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}}),f$=e=>ss("MuiDayCalendar",e),p$=(ls("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]),["parentProps","day","focusedDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"]),h$=["ownerState"],m$=Ka("div",{name:"MuiDayCalendar",slot:"Root"})({}),g$=Ka("div",{name:"MuiDayCalendar",slot:"Header"})({display:"flex",justifyContent:"center",alignItems:"center"}),b$=Ka(BR,{name:"MuiDayCalendar",slot:"WeekDayLabel"})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.secondary})),y$=Ka(BR,{name:"MuiDayCalendar",slot:"WeekNumberLabel"})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.disabled})),v$=Ka(BR,{name:"MuiDayCalendar",slot:"WeekNumber"})(({theme:e})=>tr({},e.typography.caption,{width:36,height:36,padding:0,margin:"0 2px",color:(e.vars||e).palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),x$=Ka("div",{name:"MuiDayCalendar",slot:"LoadingContainer"})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:240}),w$=Ka(function(e){const t=UE({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:r,reduceAnimations:o,slideDirection:i,transKey:a,classes:s}=t,l=il(t,u$),{ownerState:c}=nA(),u=tr({},c,{slideDirection:i}),d=((e,t)=>{const{slideDirection:n}=t;return Na({root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]},l$,e)})(s,u),f=yl();if(o)return(0,le.jsx)("div",{className:Un(d.root,r),children:n});const p={exit:d.exit,enterActive:d.enterActive,enter:d.enter,exitActive:d.exitActive};return(0,le.jsx)(d$,{className:Un(d.root,r),childFactory:e=>G.cloneElement(e,{classNames:p}),role:"presentation",ownerState:u,children:(0,le.jsx)(s$,tr({mountOnEnter:!0,unmountOnExit:!0,timeout:f.transitions.duration.complex,classNames:p},l,{children:n}),a)})},{name:"MuiDayCalendar",slot:"SlideTransition"})({minHeight:240}),S$=Ka("div",{name:"MuiDayCalendar",slot:"MonthContainer"})({overflow:"hidden"}),k$=Ka("div",{name:"MuiDayCalendar",slot:"WeekContainer"})({margin:"2px 0",display:"flex",justifyContent:"center"});function C$(e){let{parentProps:t,day:n,focusedDay:r,selectedDays:o,isDateDisabled:i,currentMonthNumber:a,isViewFocused:s}=e,l=il(e,p$);const{disabled:c,disableHighlightToday:u,isMonthSwitchingAnimating:d,showDaysOutsideCurrentMonth:f,slots:p,slotProps:h,timezone:m}=t,g=dA(),b=xA(m),y=null!=r&&g.isSameDay(n,r),v=s&&y,x=o.some(e=>g.isSameDay(e,n)),w=g.isSameDay(n,b),S=G.useMemo(()=>c||i(n),[c,i,n]),k=G.useMemo(()=>g.getMonth(n)!==a,[g,n,a]),C=Xz({day:n,selected:x,disabled:S,today:w,outsideCurrentMonth:k,disableMargin:void 0,disableHighlightToday:u,showDaysOutsideCurrentMonth:f}),M=p?.day??r$,P=il(Fs({elementType:M,externalSlotProps:h?.day,additionalProps:tr({disableHighlightToday:u,showDaysOutsideCurrentMonth:f,role:"gridcell",isAnimating:d,"data-timestamp":g.toJsDate(n).valueOf()},l),ownerState:tr({},C,{day:n,isDayDisabled:S,isDaySelected:x})}),h$),T=G.useMemo(()=>{const e=g.startOfMonth(g.setMonth(n,a));return f?g.isSameDay(n,g.startOfWeek(e)):g.isSameDay(n,e)},[a,n,f,g]),O=G.useMemo(()=>{const e=g.endOfMonth(g.setMonth(n,a));return f?g.isSameDay(n,g.endOfWeek(e)):g.isSameDay(n,e)},[a,n,f,g]);return(0,le.jsx)(M,tr({},P,{day:n,disabled:S,autoFocus:!k&&v,today:w,outsideCurrentMonth:k,isFirstVisibleCell:T,isLastVisibleCell:O,selected:x,tabIndex:y?0:-1,"aria-selected":x,"aria-current":w?"date":void 0}))}function M$(e){const t=UE({props:e,name:"MuiDayCalendar"}),n=dA(),{onFocusedDayChange:r,className:o,classes:i,currentMonth:a,selectedDays:s,focusedDay:l,loading:c,onSelectedDaysChange:u,onMonthSwitchingAnimationEnd:d,readOnly:f,reduceAnimations:p,renderLoading:h=()=>(0,le.jsx)("span",{children:"..."}),slideDirection:m,TransitionProps:g,disablePast:b,disableFuture:y,minDate:v,maxDate:x,shouldDisableDate:w,shouldDisableMonth:S,shouldDisableYear:k,dayOfWeekFormatter:C=e=>n.format(e,"weekdayShort").charAt(0).toUpperCase(),hasFocus:M,onFocusedViewChange:P,gridLabelId:T,displayWeekNumber:O,fixedWeekNumber:j,timezone:_}=t,D=xA(_),E=(e=>Na({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},f$,e))(i),R=Hn(),A=Bz({shouldDisableDate:w,shouldDisableMonth:S,shouldDisableYear:k,minDate:v,maxDate:x,disablePast:b,disableFuture:y,timezone:_}),I=fA(),F=zl(e=>{f||u(e)}),L=e=>{A(e)||(r(e),P?.(!0))},N=zl((e,t)=>{switch(e.key){case"ArrowUp":L(n.addDays(t,-7)),e.preventDefault();break;case"ArrowDown":L(n.addDays(t,7)),e.preventDefault();break;case"ArrowLeft":{const r=n.addDays(t,R?1:-1),o=n.addMonths(t,R?1:-1),i=JE({adapter:n,date:r,minDate:R?r:n.startOfMonth(o),maxDate:R?n.endOfMonth(o):r,isDateDisabled:A,timezone:_});L(i||r),e.preventDefault();break}case"ArrowRight":{const r=n.addDays(t,R?-1:1),o=n.addMonths(t,R?-1:1),i=JE({adapter:n,date:r,minDate:R?n.startOfMonth(o):r,maxDate:R?r:n.endOfMonth(o),isDateDisabled:A,timezone:_});L(i||r),e.preventDefault();break}case"Home":L(n.startOfWeek(t)),e.preventDefault();break;case"End":L(n.endOfWeek(t)),e.preventDefault();break;case"PageUp":L(n.addMonths(t,1)),e.preventDefault();break;case"PageDown":L(n.addMonths(t,-1)),e.preventDefault();break;case"Enter":case" ":F(t),e.preventDefault()}}),z=zl((e,t)=>L(t)),$=zl((e,t)=>{null!=l&&n.isSameDay(l,t)&&P?.(!1)}),V=n.getMonth(a),B=n.getYear(a),W=G.useMemo(()=>s.filter(e=>!!e).map(e=>n.startOfDay(e)),[n,s]),H=`${B}-${V}`,q=G.useMemo(()=>G.createRef(),[H]),Y=G.useMemo(()=>{const e=n.getWeekArray(a);let t=n.addMonths(a,1);for(;j&&e.length<j;){const r=n.getWeekArray(t),o=n.isSameDay(e[e.length-1][0],r[0][0]);r.slice(o?1:0).forEach(t=>{e.length<j&&e.push(t)}),t=n.addMonths(t,1)}return e},[a,j,n]);return(0,le.jsxs)(m$,{role:"grid","aria-labelledby":T,className:E.root,children:[(0,le.jsxs)(g$,{role:"row",className:E.header,children:[O&&(0,le.jsx)(y$,{variant:"caption",role:"columnheader","aria-label":I.calendarWeekNumberHeaderLabel,className:E.weekNumberLabel,children:I.calendarWeekNumberHeaderText}),sR(n,D).map((e,t)=>(0,le.jsx)(b$,{variant:"caption",role:"columnheader","aria-label":n.format(e,"weekday"),className:E.weekDayLabel,children:C(e)},t.toString()))]}),c?(0,le.jsx)(x$,{className:E.loadingContainer,children:h()}):(0,le.jsx)(w$,tr({transKey:H,onExited:d,reduceAnimations:p,slideDirection:m,className:Un(o,E.slideTransition)},g,{nodeRef:q,children:(0,le.jsx)(S$,{ref:q,role:"rowgroup",className:E.monthContainer,children:Y.map((e,r)=>(0,le.jsxs)(k$,{role:"row",className:E.weekContainer,"aria-rowindex":r+1,children:[O&&(0,le.jsx)(v$,{className:E.weekNumber,role:"rowheader","aria-label":I.calendarWeekNumberAriaLabelText(n.getWeekNumber(e[0])),children:I.calendarWeekNumberText(n.getWeekNumber(e[0]))}),e.map((e,n)=>(0,le.jsx)(C$,{parentProps:t,day:e,selectedDays:W,isViewFocused:M,focusedDay:l,onKeyDown:N,onFocus:z,onBlur:$,onDaySelect:F,isDateDisabled:A,currentMonthNumber:V,"aria-colindex":n+1},e.toString()))]},`week-${e[0]}`))})}))]})}function P$(e){return ss("MuiMonthCalendar",e)}const T$=ls("MuiMonthCalendar",["root","button","disabled","selected"]),O$=["autoFocus","classes","disabled","selected","value","onClick","onKeyDown","onFocus","onBlur","slots","slotProps"],j$=Ka("button",{name:"MuiMonthCalendar",slot:"Button",overridesResolver:(e,t)=>[t.button,{[`&.${T$.disabled}`]:t.disabled},{[`&.${T$.selected}`]:t.selected}]})(({theme:e})=>tr({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:ti(e.palette.action.active,e.palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:ti(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${T$.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${T$.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),_$=G.memo(function(e){const{autoFocus:t,classes:n,disabled:r,selected:o,value:i,onClick:a,onKeyDown:s,onFocus:l,onBlur:c,slots:u,slotProps:d}=e,f=il(e,O$),p=G.useRef(null),{ownerState:h}=nA(),m=tr({},h,{isMonthDisabled:r,isMonthSelected:o}),g=((e,t)=>Na({button:["button",t.isMonthDisabled&&"disabled",t.isMonthSelected&&"selected"]},P$,e))(n,m);Kn(()=>{t&&p.current?.focus()},[t]);const b=u?.monthButton??j$,y=Fs({elementType:b,externalSlotProps:d?.monthButton,externalForwardedProps:f,additionalProps:{disabled:r,ref:p,type:"button",role:"radio","aria-checked":o,onClick:e=>a(e,i),onKeyDown:e=>s(e,i),onFocus:e=>l(e,i),onBlur:e=>c(e,i)},ownerState:m,className:g.button});return(0,le.jsx)(b,tr({},y))}),D$=["autoFocus","className","currentMonth","classes","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"],E$=(e,t,n,r,o)=>Boolean(e===t&&r&&o.isSameYear(n,r)),R$=Ka("div",{name:"MuiMonthCalendar",slot:"Root",shouldForwardProp:e=>Va(e)&&"monthsPerRow"!==e})({display:"flex",flexWrap:"wrap",justifyContent:"space-evenly",rowGap:16,padding:"8px 0",width:gL,boxSizing:"border-box",variants:[{props:{monthsPerRow:3},style:{columnGap:24}},{props:{monthsPerRow:4},style:{columnGap:0}}]}),A$=G.forwardRef(function(e,t){const n=function(e){const t=UE({props:e,name:"MuiMonthCalendar"});return tr({},t,kA(t),{monthsPerRow:t.monthsPerRow??3})}(e),{autoFocus:r,className:o,currentMonth:i,classes:a,value:s,defaultValue:l,referenceDate:c,disabled:u,disableFuture:d,disablePast:f,maxDate:p,minDate:h,onChange:m,shouldDisableMonth:g,readOnly:b,onMonthFocus:y,hasFocus:v,onFocusedViewChange:x,monthsPerRow:w,timezone:S,gridLabelId:k,slots:C,slotProps:M}=n,P=il(n,D$),{value:T,handleValueChange:O,timezone:j}=yF({name:"MonthCalendar",timezone:S,value:s,defaultValue:l,referenceDate:c,onChange:m,valueManager:IR}),_=xA(j),D=Hn(),E=dA(),{ownerState:R}=nA(),A=G.useMemo(()=>IR.getInitialReferenceValue({value:T,adapter:E,props:n,timezone:j,referenceDate:c,granularity:gR.month}),[]),I=(e=>Na({root:["root"]},P$,e))(a),F=G.useMemo(()=>E.getMonth(_),[E,_]),L=G.useMemo(()=>null!=T?E.getMonth(T):null,[T,E]),[N,z]=G.useState(()=>L||E.getMonth(A)),[$,V]=Pc({name:"MonthCalendar",state:"hasFocus",controlled:v,default:r??!1}),B=zl(e=>{V(e),x&&x(e)}),W=G.useCallback(e=>{const t=E.startOfMonth(f&&E.isAfter(_,h)?_:h),n=E.startOfMonth(d&&E.isBefore(_,p)?_:p),r=E.startOfMonth(e);return!!E.isBefore(r,t)||!!E.isAfter(r,n)||!!g&&g(r)},[d,f,p,h,_,g,E]),H=zl((e,t)=>{if(b)return;const n=(T&&i&&!E.isSameYear(T,i)?E.setYear(T,E.getYear(i)):T)??i??A,r=E.setMonth(n,t);O(r)}),q=zl(e=>{W(E.setMonth(T??i??A,e))||(z(e),B(!0),y&&y(e))});G.useEffect(()=>{z(e=>null!==L&&e!==L?L:e)},[L]);const Y=zl((e,t)=>{const n=12;switch(e.key){case"ArrowUp":q((n+t-3)%n),e.preventDefault();break;case"ArrowDown":q((n+t+3)%n),e.preventDefault();break;case"ArrowLeft":q((n+t+(D?1:-1))%n),e.preventDefault();break;case"ArrowRight":q((n+t+(D?-1:1))%n),e.preventDefault();break;case"Enter":case" ":H(e,t),e.preventDefault()}}),U=zl((e,t)=>{q(t)}),X=zl((e,t)=>{N===t&&B(!1)});return(0,le.jsx)(R$,tr({ref:t,className:Un(I.root,o),ownerState:R,role:"radiogroup","aria-labelledby":k,monthsPerRow:w},P,{children:tR(E,i??T??A).map(e=>{const t=E.getMonth(e),n=E.format(e,"monthShort"),r=E.format(e,"month"),o=E$(t,L,e,T,E),i=u||W(e);return(0,le.jsx)(_$,{selected:o,value:t,onClick:H,onKeyDown:Y,autoFocus:$&&t===N,disabled:i,tabIndex:t!==N||i?-1:0,onFocus:U,onBlur:X,"aria-current":E$(t,F,e,_,E)?"date":void 0,"aria-label":r,slots:C,slotProps:M,classes:a,children:n},n)})}))});function I$(e){return ss("MuiYearCalendar",e)}const F$=ls("MuiYearCalendar",["root","button","disabled","selected"]),L$=["autoFocus","classes","disabled","selected","value","onClick","onKeyDown","onFocus","onBlur","slots","slotProps"],N$=Ka("button",{name:"MuiYearCalendar",slot:"Button",overridesResolver:(e,t)=>[t.button,{[`&.${F$.disabled}`]:t.disabled},{[`&.${F$.selected}`]:t.selected}]})(({theme:e})=>tr({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.focusOpacity})`:ti(e.palette.action.active,e.palette.action.focusOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:ti(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${F$.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${F$.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),z$=G.memo(function(e){const{autoFocus:t,classes:n,disabled:r,selected:o,value:i,onClick:a,onKeyDown:s,onFocus:l,onBlur:c,slots:u,slotProps:d}=e,f=il(e,L$),p=G.useRef(null),{ownerState:h}=nA(),m=tr({},h,{isYearDisabled:r,isYearSelected:o}),g=((e,t)=>Na({button:["button",t.isYearDisabled&&"disabled",t.isYearSelected&&"selected"]},I$,e))(n,m);Kn(()=>{t&&p.current?.focus()},[t]);const b=u?.yearButton??N$,y=Fs({elementType:b,externalSlotProps:d?.yearButton,externalForwardedProps:f,additionalProps:{disabled:r,ref:p,type:"button",role:"radio","aria-checked":o,onClick:e=>a(e,i),onKeyDown:e=>s(e,i),onFocus:e=>l(e,i),onBlur:e=>c(e,i)},ownerState:m,className:g.button});return(0,le.jsx)(b,tr({},y))}),$$=["autoFocus","className","classes","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"],V$=Ka("div",{name:"MuiYearCalendar",slot:"Root",shouldForwardProp:e=>Va(e)&&"yearsPerRow"!==e})({display:"flex",flexWrap:"wrap",justifyContent:"space-evenly",rowGap:12,padding:"6px 0",overflowY:"auto",height:"100%",width:gL,maxHeight:280,boxSizing:"border-box",position:"relative",variants:[{props:{yearsPerRow:3},style:{columnGap:24}},{props:{yearsPerRow:4},style:{columnGap:0,padding:"0 2px"}}]}),B$=Ka("div",{name:"MuiYearCalendar",slot:"ButtonFiller"})({height:36,width:72}),W$=G.forwardRef(function(e,t){const n=function(e){const t=UE({props:e,name:"MuiYearCalendar"});return tr({},t,kA(t),{yearsPerRow:t.yearsPerRow??3,yearsOrder:t.yearsOrder??"asc"})}(e),{autoFocus:r,className:o,classes:i,value:a,defaultValue:s,referenceDate:l,disabled:c,disableFuture:u,disablePast:d,maxDate:f,minDate:p,onChange:h,readOnly:m,shouldDisableYear:g,onYearFocus:b,hasFocus:y,onFocusedViewChange:v,yearsOrder:x,yearsPerRow:w,timezone:S,gridLabelId:k,slots:C,slotProps:M}=n,P=il(n,$$),{value:T,handleValueChange:O,timezone:j}=yF({name:"YearCalendar",timezone:S,value:a,defaultValue:s,referenceDate:l,onChange:h,valueManager:IR}),_=xA(j),D=Hn(),E=dA(),{ownerState:R}=nA(),A=G.useMemo(()=>IR.getInitialReferenceValue({value:T,adapter:E,props:n,timezone:j,referenceDate:l,granularity:gR.year}),[]),I=(e=>Na({root:["root"]},I$,e))(i),F=G.useMemo(()=>E.getYear(_),[E,_]),L=G.useMemo(()=>null!=T?E.getYear(T):null,[T,E]),[N,z]=G.useState(()=>L||E.getYear(A)),[$,V]=Pc({name:"YearCalendar",state:"hasFocus",controlled:y,default:r??!1}),B=zl(e=>{V(e),v&&v(e)}),W=G.useCallback(e=>{if(d&&E.isBeforeYear(e,_))return!0;if(u&&E.isAfterYear(e,_))return!0;if(p&&E.isBeforeYear(e,p))return!0;if(f&&E.isAfterYear(e,f))return!0;if(!g)return!1;const t=E.startOfYear(e);return g(t)},[u,d,f,p,_,g,E]),H=zl((e,t)=>{if(m)return;const n=E.setYear(T??A,t);O(n)}),q=zl(e=>{W(E.setYear(T??A,e))||(z(e),B(!0),b?.(e))});G.useEffect(()=>{z(e=>null!==L&&e!==L?L:e)},[L]);const Y="desc"!==x?1*w:-1*w,U=D&&"asc"===x||!D&&"desc"===x?-1:1,X=zl((e,t)=>{switch(e.key){case"ArrowUp":q(t-Y),e.preventDefault();break;case"ArrowDown":q(t+Y),e.preventDefault();break;case"ArrowLeft":q(t-U),e.preventDefault();break;case"ArrowRight":q(t+U),e.preventDefault();break;case"Enter":case" ":H(e,t),e.preventDefault()}}),Q=zl((e,t)=>{q(t)}),K=zl((e,t)=>{N===t&&B(!1)}),Z=G.useRef(null),J=js(t,Z);G.useEffect(()=>{if(r||null===Z.current)return;const e=Z.current.querySelector('[tabindex="0"]');if(!e)return;const t=e.offsetHeight,n=e.offsetTop,o=Z.current.clientHeight,i=Z.current.scrollTop,a=n+t;t>o||n<i||(Z.current.scrollTop=a-o/2-t/2)},[r]);const ee=E.getYearRange([p,f]);"desc"===x&&ee.reverse();let te=w-ee.length%w;return te===w&&(te=0),(0,le.jsxs)(V$,tr({ref:J,className:Un(I.root,o),ownerState:R,role:"radiogroup","aria-labelledby":k,yearsPerRow:w},P,{children:[ee.map(e=>{const t=E.getYear(e),n=t===L,r=c||W(e);return(0,le.jsx)(z$,{selected:n,value:t,onClick:H,onKeyDown:X,autoFocus:$&&t===N,disabled:r,tabIndex:t!==N||r?-1:0,onFocus:Q,onBlur:K,"aria-current":F===t?"date":void 0,slots:C,slotProps:M,classes:i,children:E.format(e,"year")},E.format(e,"year"))}),Array.from({length:te},(e,t)=>(0,le.jsx)(B$,{},t))]}))});function H$(e){return ss("MuiPickersArrowSwitcher",e)}ls("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);const q$=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId","classes"],Y$=["ownerState"],U$=["ownerState"],G$=Ka("div",{name:"MuiPickersArrowSwitcher",slot:"Root"})({display:"flex"}),X$=Ka("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer"})(({theme:e})=>({width:e.spacing(3)})),Q$=Ka(fN,{name:"MuiPickersArrowSwitcher",slot:"Button"})({variants:[{props:{isButtonHidden:!0},style:{visibility:"hidden"}}]}),K$=G.forwardRef(function(e,t){const n=Hn(),r=UE({props:e,name:"MuiPickersArrowSwitcher"}),{children:o,className:i,slots:a,slotProps:s,isNextDisabled:l,isNextHidden:c,onGoToNext:u,nextLabel:d,isPreviousDisabled:f,isPreviousHidden:p,onGoToPrevious:h,previousLabel:m,labelId:g,classes:b}=r,y=il(r,q$),{ownerState:v}=nA(),x=(e=>Na({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},H$,e))(b),w={isDisabled:l,isHidden:c,goTo:u,label:d},S={isDisabled:f,isHidden:p,goTo:h,label:m},k=a?.previousIconButton??Q$,C=Fs({elementType:k,externalSlotProps:s?.previousIconButton,additionalProps:{size:"medium",title:S.label,"aria-label":S.label,disabled:S.isDisabled,edge:"end",onClick:S.goTo},ownerState:tr({},v,{isButtonHidden:S.isHidden??!1}),className:Un(x.button,x.previousIconButton)}),M=a?.nextIconButton??Q$,P=Fs({elementType:M,externalSlotProps:s?.nextIconButton,additionalProps:{size:"medium",title:w.label,"aria-label":w.label,disabled:w.isDisabled,edge:"start",onClick:w.goTo},ownerState:tr({},v,{isButtonHidden:w.isHidden??!1}),className:Un(x.button,x.nextIconButton)}),T=a?.leftArrowIcon??SN,O=il(Fs({elementType:T,externalSlotProps:s?.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:v,className:x.leftArrowIcon}),Y$),j=a?.rightArrowIcon??kN,_=il(Fs({elementType:j,externalSlotProps:s?.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:v,className:x.rightArrowIcon}),U$);return(0,le.jsxs)(G$,tr({ref:t,className:Un(x.root,i),ownerState:v},y,{children:[(0,le.jsx)(k,tr({},C,{children:n?(0,le.jsx)(j,tr({},_)):(0,le.jsx)(T,tr({},O))})),o?(0,le.jsx)(BR,{variant:"subtitle1",component:"span",id:g,children:o}):(0,le.jsx)(X$,{className:x.spacer,ownerState:v}),(0,le.jsx)(M,tr({},P,{children:n?(0,le.jsx)(T,tr({},O)):(0,le.jsx)(j,tr({},_))}))]}))});function Z$(e,t,n,r){const o=dA(),i=G.useMemo(()=>o.isValid(e)?e:null,[o,e]),a=((e,t)=>e?t.getHours(e)>=12?"pm":"am":null)(i,o),s=G.useCallback(e=>{const a=null==i?null:((e,t,n,r)=>{const o=fR(r.getHours(e),t,n);return r.setHours(e,o)})(i,e,Boolean(t),o);n(a,r??"partial")},[t,i,n,r,o]);return{meridiemMode:a,handleMeridiemChange:s}}const J$=e=>ss("MuiPickersCalendarHeader",e),eV=ls("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]),tV=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","classes","timezone","format"],nV=["ownerState"],rV=Ka("div",{name:"MuiPickersCalendarHeader",slot:"Root"})({display:"flex",alignItems:"center",marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),oV=Ka("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer"})(({theme:e})=>tr({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),iV=Ka("div",{name:"MuiPickersCalendarHeader",slot:"Label"})({marginRight:6}),aV=Ka(fN,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton"})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${eV.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),sV=Ka(wN,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon"})(({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"})),lV=G.forwardRef(function(e,t){const n=fA(),r=dA(),o=UE({props:e,name:"MuiPickersCalendarHeader"}),{slots:i,slotProps:a,currentMonth:s,disabled:l,disableFuture:c,disablePast:u,maxDate:d,minDate:f,onMonthChange:p,onViewChange:h,view:m,reduceAnimations:g,views:b,labelId:y,className:v,classes:x,timezone:w,format:S=`${r.formats.month} ${r.formats.year}`}=o,k=il(o,tV),{ownerState:C}=nA(),M=(e=>Na({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},J$,e))(x),P=i?.switchViewButton??aV,T=Fs({elementType:P,externalSlotProps:a?.switchViewButton,additionalProps:{size:"small","aria-label":n.calendarViewSwitchingButtonAriaLabel(m)},ownerState:tr({},C,{view:m}),className:M.switchViewButton}),O=i?.switchViewIcon??sV,j=il(Fs({elementType:O,externalSlotProps:a?.switchViewIcon,ownerState:C,className:M.switchViewIcon}),nV),_=function(e,{disableFuture:t,maxDate:n,timezone:r}){const o=dA();return G.useMemo(()=>{const i=o.date(void 0,r),a=o.startOfMonth(t&&o.isBefore(i,n)?i:n);return!o.isAfter(a,e)},[t,n,e,o,r])}(s,{disableFuture:c,maxDate:d,timezone:w}),D=function(e,{disablePast:t,minDate:n,timezone:r}){const o=dA();return G.useMemo(()=>{const i=o.date(void 0,r),a=o.startOfMonth(t&&o.isAfter(i,n)?i:n);return!o.isBefore(a,e)},[t,n,e,o,r])}(s,{disablePast:u,minDate:f,timezone:w});if(1===b.length&&"year"===b[0])return null;const E=r.formatByString(s,S);return(0,le.jsxs)(rV,tr({},k,{ownerState:C,className:Un(M.root,v),ref:t,children:[(0,le.jsxs)(oV,{role:"presentation",onClick:()=>{if(1!==b.length&&h&&!l)if(2===b.length)h(b.find(e=>e!==m)||b[0]);else{const e=0!==b.indexOf(m)?0:1;h(b[e])}},ownerState:C,"aria-live":"polite",className:M.labelContainer,children:[(0,le.jsx)(Yz,{reduceAnimations:g,transKey:E,children:(0,le.jsx)(iV,{id:y,ownerState:C,className:M.label,children:E})}),b.length>1&&!l&&(0,le.jsx)(P,tr({},T,{children:(0,le.jsx)(O,tr({},j))}))]}),(0,le.jsx)(Il,{in:"day"===m,appear:!g,enter:!g,children:(0,le.jsx)(K$,{slots:i,slotProps:a,onGoToPrevious:()=>p(r.addMonths(s,-1)),isPreviousDisabled:D,previousLabel:n.previousMonth,onGoToNext:()=>p(r.addMonths(s,1)),isNextDisabled:_,nextLabel:n.nextMonth})})]}))}),cV=Ka("div",{slot:"internal",shouldForwardProp:void 0})({overflow:"hidden",width:gL,maxHeight:bL,display:"flex",flexDirection:"column",margin:"0 auto"}),uV=e=>ss("MuiDateCalendar",e),dV=(ls("MuiDateCalendar",["root","viewTransitionContainer"]),["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","classes","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsOrder","yearsPerRow","monthsPerRow","timezone"]),fV=Ka(cV,{name:"MuiDateCalendar",slot:"Root"})({display:"flex",flexDirection:"column",height:bL}),pV=Ka(Yz,{name:"MuiDateCalendar",slot:"ViewTransitionContainer"})({}),hV=G.forwardRef(function(e,t){const n=dA(),{ownerState:r}=nA(),o=er(),i=function(e){const t=UE({props:e,name:"MuiDateCalendar"}),n=hF(t.reduceAnimations);return tr({},t,kA(t),{loading:t.loading??!1,openTo:t.openTo??"day",views:t.views??["year","day"],reduceAnimations:n,renderLoading:t.renderLoading??(()=>(0,le.jsx)("span",{children:"..."}))})}(e),{autoFocus:a,onViewChange:s,value:l,defaultValue:c,referenceDate:u,disableFuture:d,disablePast:f,onChange:p,onMonthChange:h,reduceAnimations:m,shouldDisableDate:g,shouldDisableMonth:b,shouldDisableYear:y,view:v,views:x,openTo:w,className:S,classes:k,disabled:C,readOnly:M,minDate:P,maxDate:T,disableHighlightToday:O,focusedView:j,onFocusedViewChange:_,showDaysOutsideCurrentMonth:D,fixedWeekNumber:E,dayOfWeekFormatter:R,slots:A,slotProps:I,loading:F,renderLoading:L,displayWeekNumber:N,yearsOrder:z,yearsPerRow:$,monthsPerRow:V,timezone:B}=i,W=il(i,dV),{value:H,handleValueChange:q,timezone:Y}=yF({name:"DateCalendar",timezone:B,value:l,defaultValue:c,referenceDate:u,onChange:p,valueManager:IR}),{view:U,setView:X,focusedView:Q,setFocusedView:K,goToNextView:Z,setValueAndGoToNextView:J}=gF({view:v,views:x,openTo:w,onChange:q,onViewChange:s,autoFocus:a,focusedView:j,onFocusedViewChange:_}),{referenceDate:ee,calendarState:te,setVisibleDate:ne,isDateDisabled:re,onMonthSwitchingAnimationEnd:oe}=(e=>{const{value:t,referenceDate:n,disableFuture:r,disablePast:o,maxDate:i,minDate:a,onMonthChange:s,onYearChange:l,reduceAnimations:c,shouldDisableDate:u,timezone:d,getCurrentMonthFromVisibleDate:f}=e,p=dA(),h=G.useRef(((e,t)=>(n,r)=>{switch(r.type){case"setVisibleDate":return tr({},n,{slideDirection:r.direction,currentMonth:r.month,isMonthSwitchingAnimating:!t.isSameMonth(r.month,n.currentMonth)&&!e&&!r.skipAnimation,focusedDay:r.focusedDay});case"changeMonthTimezone":{const e=r.newTimezone;if(t.getTimezone(n.currentMonth)===e)return n;let o=t.setTimezone(n.currentMonth,e);return t.getMonth(o)!==t.getMonth(n.currentMonth)&&(o=t.setMonth(o,t.getMonth(n.currentMonth))),tr({},n,{currentMonth:o})}case"finishMonthSwitchingAnimation":return tr({},n,{isMonthSwitchingAnimating:!1});default:throw new Error("missing support")}})(Boolean(c),p)).current,m=G.useMemo(()=>IR.getInitialReferenceValue({value:t,adapter:p,timezone:d,props:e,referenceDate:n,granularity:gR.day}),[n,d]),[g,b]=G.useReducer(h,{isMonthSwitchingAnimating:!1,focusedDay:m,currentMonth:p.setDate(m,1),slideDirection:"left"}),y=Bz({shouldDisableDate:u,minDate:a,maxDate:i,disableFuture:r,disablePast:o,timezone:d});G.useEffect(()=>{b({type:"changeMonthTimezone",newTimezone:p.getTimezone(m)})},[m,p]);const v=zl(({target:e,reason:t})=>{if("cell-interaction"===t&&null!=g.focusedDay&&p.isSameDay(e,g.focusedDay))return;const n="cell-interaction"===t;let c,u;if("cell-interaction"===t)c=f(e,g.currentMonth),u=e;else if(c=p.isSameMonth(e,g.currentMonth)?g.currentMonth:p.startOfMonth(e),u=e,y(u)){const t=p.startOfMonth(e),n=p.endOfMonth(e);u=JE({adapter:p,date:u,minDate:p.isBefore(a,t)?t:a,maxDate:p.isAfter(i,n)?n:i,disablePast:o,disableFuture:r,isDateDisabled:y,timezone:d})}const h=!p.isSameMonth(g.currentMonth,c),m=!p.isSameYear(g.currentMonth,c);h&&s?.(c),m&&l?.(p.startOfYear(c)),b({type:"setVisibleDate",month:c,direction:p.isAfterDay(c,g.currentMonth)?"left":"right",focusedDay:null!=g.focusedDay&&null!=u&&p.isSameDay(u,g.focusedDay)?g.focusedDay:u,skipAnimation:n})}),x=G.useCallback(()=>{b({type:"finishMonthSwitchingAnimation"})},[]);return{referenceDate:m,calendarState:g,setVisibleDate:v,isDateDisabled:y,onMonthSwitchingAnimationEnd:x}})({value:H,referenceDate:u,reduceAnimations:m,onMonthChange:h,minDate:P,maxDate:T,shouldDisableDate:g,disablePast:f,disableFuture:d,timezone:Y,getCurrentMonthFromVisibleDate:(e,t)=>n.isSameMonth(e,t)?t:n.startOfMonth(e)}),ie=C&&H||P,ae=C&&H||T,se=`${o}-grid-label`,ce=null!==Q,ue=A?.calendarHeader??lV,de=Fs({elementType:ue,externalSlotProps:I?.calendarHeader,additionalProps:{views:x,view:U,currentMonth:te.currentMonth,onViewChange:X,onMonthChange:e=>ne({target:e,reason:"header-navigation"}),minDate:ie,maxDate:ae,disabled:C,disablePast:f,disableFuture:d,reduceAnimations:m,timezone:Y,labelId:se},ownerState:r}),fe=zl(e=>{const t=n.startOfMonth(e),r=n.endOfMonth(e),o=re(e)?JE({adapter:n,date:e,minDate:n.isBefore(P,t)?t:P,maxDate:n.isAfter(T,r)?r:T,disablePast:f,disableFuture:d,isDateDisabled:re,timezone:Y}):e;o?(J(o,"finish"),ne({target:o,reason:"cell-interaction"})):(Z(),ne({target:t,reason:"cell-interaction"}))}),pe=zl(e=>{const t=n.startOfYear(e),r=n.endOfYear(e),o=re(e)?JE({adapter:n,date:e,minDate:n.isBefore(P,t)?t:P,maxDate:n.isAfter(T,r)?r:T,disablePast:f,disableFuture:d,isDateDisabled:re,timezone:Y}):e;o?(J(o,"finish"),ne({target:o,reason:"cell-interaction"})):(Z(),ne({target:t,reason:"cell-interaction"}))}),he=zl(e=>q(e?ZE(n,e,H??ee):e,"finish",U));G.useEffect(()=>{n.isValid(H)&&ne({target:H,reason:"controlled-value-change"})},[H]);const me=(e=>Na({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},uV,e))(k),ge={disablePast:f,disableFuture:d,maxDate:T,minDate:P},be={disableHighlightToday:O,readOnly:M,disabled:C,timezone:Y,gridLabelId:se,slots:A,slotProps:I},ye=G.useRef(U);G.useEffect(()=>{ye.current!==U&&(Q===ye.current&&K(U,!0),ye.current=U)},[Q,K,U]);const ve=G.useMemo(()=>[H],[H]);return(0,le.jsxs)(fV,tr({ref:t,className:Un(me.root,S),ownerState:r},W,{children:[(0,le.jsx)(ue,tr({},de,{slots:A,slotProps:I})),(0,le.jsx)(pV,{reduceAnimations:m,className:me.viewTransitionContainer,transKey:U,ownerState:r,children:(0,le.jsxs)("div",{children:["year"===U&&(0,le.jsx)(W$,tr({},ge,be,{value:H,onChange:pe,shouldDisableYear:y,hasFocus:ce,onFocusedViewChange:e=>K("year",e),yearsOrder:z,yearsPerRow:$,referenceDate:ee})),"month"===U&&(0,le.jsx)(A$,tr({},ge,be,{currentMonth:te.currentMonth,hasFocus:ce,className:S,value:H,onChange:fe,shouldDisableMonth:b,onFocusedViewChange:e=>K("month",e),monthsPerRow:V,referenceDate:ee})),"day"===U&&(0,le.jsx)(M$,tr({},te,ge,be,{onMonthSwitchingAnimationEnd:oe,hasFocus:ce,onFocusedDayChange:e=>ne({target:e,reason:"cell-interaction"}),reduceAnimations:m,selectedDays:ve,onSelectedDaysChange:he,shouldDisableDate:g,shouldDisableMonth:b,shouldDisableYear:y,onFocusedViewChange:e=>K("day",e),showDaysOutsideCurrentMonth:D,fixedWeekNumber:E,dayOfWeekFormatter:R,displayWeekNumber:N,loading:F,renderLoading:L}))]})})]}))}),mV=({view:e,onViewChange:t,views:n,focusedView:r,onFocusedViewChange:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minDate:p,maxDate:h,shouldDisableDate:m,shouldDisableMonth:g,shouldDisableYear:b,reduceAnimations:y,onMonthChange:v,monthsPerRow:x,onYearChange:w,yearsOrder:S,yearsPerRow:k,slots:C,slotProps:M,loading:P,renderLoading:T,disableHighlightToday:O,readOnly:j,disabled:_,showDaysOutsideCurrentMonth:D,dayOfWeekFormatter:E,sx:R,autoFocus:A,fixedWeekNumber:I,displayWeekNumber:F,timezone:L})=>(0,le.jsx)(hV,{view:e,onViewChange:t,views:n.filter(iR),focusedView:r&&iR(r)?r:null,onFocusedViewChange:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minDate:p,maxDate:h,shouldDisableDate:m,shouldDisableMonth:g,shouldDisableYear:b,reduceAnimations:y,onMonthChange:v,monthsPerRow:x,onYearChange:w,yearsOrder:S,yearsPerRow:k,slots:C,slotProps:M,loading:P,renderLoading:T,disableHighlightToday:O,readOnly:j,disabled:_,showDaysOutsideCurrentMonth:D,dayOfWeekFormatter:E,sx:R,autoFocus:A,fixedWeekNumber:I,displayWeekNumber:F,timezone:L}),gV=G.forwardRef(function(e,t){const n=dA(),r=CA(e,"MuiDesktopDatePicker"),o=tr({day:mV,month:mV,year:mV},r.viewRenderers),i=tr({},r,{closeOnSelect:r.closeOnSelect??!0,viewRenderers:o,format:aR(n,r,!1),yearsPerRow:r.yearsPerRow??4,slots:tr({field:Vz},r.slots),slotProps:tr({},r.slotProps,{field:e=>tr({},Is(r.slotProps?.field,e),jA(r)),toolbar:tr({hidden:!0},r.slotProps?.toolbar)})}),{renderPicker:a}=_L({ref:t,props:i,valueManager:IR,valueType:"date",validator:yA,steps:null});return a()});function bV(e){return ss("MuiDialogContent",e)}gV.propTypes={autoFocus:GE.bool,className:GE.string,closeOnSelect:GE.bool,dayOfWeekFormatter:GE.func,defaultValue:GE.object,disabled:GE.bool,disableFuture:GE.bool,disableHighlightToday:GE.bool,disableOpenPicker:GE.bool,disablePast:GE.bool,displayWeekNumber:GE.bool,enableAccessibleFieldDOMStructure:GE.any,fixedWeekNumber:GE.number,format:GE.string,formatDensity:GE.oneOf(["dense","spacious"]),inputRef:XE,label:GE.node,loading:GE.bool,localeText:GE.object,maxDate:GE.object,minDate:GE.object,monthsPerRow:GE.oneOf([3,4]),name:GE.string,onAccept:GE.func,onChange:GE.func,onClose:GE.func,onError:GE.func,onMonthChange:GE.func,onOpen:GE.func,onSelectedSectionsChange:GE.func,onViewChange:GE.func,onYearChange:GE.func,open:GE.bool,openTo:GE.oneOf(["day","month","year"]),orientation:GE.oneOf(["landscape","portrait"]),readOnly:GE.bool,reduceAnimations:GE.bool,referenceDate:GE.object,renderLoading:GE.func,selectedSections:GE.oneOfType([GE.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),GE.number]),shouldDisableDate:GE.func,shouldDisableMonth:GE.func,shouldDisableYear:GE.func,showDaysOutsideCurrentMonth:GE.bool,slotProps:GE.object,slots:GE.object,sx:GE.oneOfType([GE.arrayOf(GE.oneOfType([GE.func,GE.object,GE.bool])),GE.func,GE.object]),timezone:GE.string,value:GE.object,view:GE.oneOf(["day","month","year"]),viewRenderers:GE.shape({day:GE.func,month:GE.func,year:GE.func}),views:GE.arrayOf(GE.oneOf(["day","month","year"]).isRequired),yearsOrder:GE.oneOf(["asc","desc"]),yearsPerRow:GE.oneOf([3,4])},ls("MuiDialogContent",["root","dividers"]);const yV=ls("MuiDialogTitle",["root"]),vV=Ka("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(gs(({theme:e})=>({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:({ownerState:e})=>e.dividers,style:{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>!e.dividers,style:{[`.${yV.root} + &`]:{paddingTop:0}}}]}))),xV=G.forwardRef(function(e,t){const n=Za({props:e,name:"MuiDialogContent"}),{className:r,dividers:o=!1,...i}=n,a={...n,dividers:o},s=(e=>{const{classes:t,dividers:n}=e;return Na({root:["root",n&&"dividers"]},bV,t)})(a);return(0,le.jsx)(vV,{className:Un(s.root,r),ownerState:a,ref:t,...i})});function wV(e){return ss("MuiDialog",e)}const SV=ls("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),kV=G.createContext({}),CV=Ka(Nl,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),MV=Ka(Kl,{name:"MuiDialog",slot:"Root"})({"@media print":{position:"absolute !important"}}),PV=Ka("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${ts(n.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),TV=Ka(ec,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${ts(n.scroll)}`],t[`paperWidth${ts(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(gs(({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:e})=>!e.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:"px"===e.breakpoints.unit?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${SV.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(e.breakpoints.values).filter(e=>"xs"!==e).map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`,[`&.${SV.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t]+64)]:{maxWidth:"calc(100% - 64px)"}}}})),{props:({ownerState:e})=>e.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:e})=>e.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${SV.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),OV=G.forwardRef(function(e,t){const n=Za({props:e,name:"MuiDialog"}),r=yl(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{"aria-describedby":i,"aria-labelledby":a,"aria-modal":s=!0,BackdropComponent:l,BackdropProps:c,children:u,className:d,disableEscapeKeyDown:f=!1,fullScreen:p=!1,fullWidth:h=!1,maxWidth:m="sm",onClick:g,onClose:b,open:y,PaperComponent:v=ec,PaperProps:x={},scroll:w="paper",slots:S={},slotProps:k={},TransitionComponent:C=Il,transitionDuration:M=o,TransitionProps:P,...T}=n,O={...n,disableEscapeKeyDown:f,fullScreen:p,fullWidth:h,maxWidth:m,scroll:w},j=(e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:i}=e;return Na({root:["root"],container:["container",`scroll${ts(n)}`],paper:["paper",`paperScroll${ts(n)}`,`paperWidth${ts(String(r))}`,o&&"paperFullWidth",i&&"paperFullScreen"]},wV,t)})(O),_=G.useRef(),D=er(a),E=G.useMemo(()=>({titleId:D}),[D]),R={slots:{transition:C,...S},slotProps:{transition:P,paper:x,backdrop:c,...k}},[A,I]=El("root",{elementType:MV,shouldForwardComponentProp:!0,externalForwardedProps:R,ownerState:O,className:Un(j.root,d),ref:t}),[F,L]=El("backdrop",{elementType:CV,shouldForwardComponentProp:!0,externalForwardedProps:R,ownerState:O}),[N,z]=El("paper",{elementType:TV,shouldForwardComponentProp:!0,externalForwardedProps:R,ownerState:O,className:Un(j.paper,x.className)}),[$,V]=El("container",{elementType:PV,externalForwardedProps:R,ownerState:O,className:j.container}),[B,W]=El("transition",{elementType:Il,externalForwardedProps:R,ownerState:O,additionalProps:{appear:!0,in:y,timeout:M,role:"presentation"}});return(0,le.jsx)(A,{closeAfterTransition:!0,slots:{backdrop:F},slotProps:{backdrop:{transitionDuration:M,as:l,...L}},disableEscapeKeyDown:f,onClose:b,open:y,onClick:e=>{g&&g(e),_.current&&(_.current=null,b&&b(e,"backdropClick"))},...I,...T,children:(0,le.jsx)(B,{...W,children:(0,le.jsx)($,{onMouseDown:e=>{_.current=e.target===e.currentTarget},...V,children:(0,le.jsx)(N,{as:v,elevation:24,role:"dialog","aria-describedby":i,"aria-labelledby":D,"aria-modal":s,...z,children:(0,le.jsx)(kV.Provider,{value:E,children:u})})})})})}),jV=Ka(OV,{slot:"internal"})({[`& .${SV.container}`]:{outline:0},[`& .${SV.paper}`]:{outline:0,minWidth:gL}}),_V=Ka(xV,{slot:"internal"})({"&:first-of-type":{padding:0}});function DV(e){const{children:t,slots:n,slotProps:r}=e,{open:o}=ZR(),{dismissViews:i,onPopperExited:a}=nA(),s=n?.dialog??jV,l=n?.mobileTransition??Il;return(0,le.jsx)(s,tr({open:o,onClose:()=>{i(),a?.()}},r?.dialog,{TransitionComponent:l,TransitionProps:r?.mobileTransition,PaperComponent:n?.mobilePaper,PaperProps:r?.mobilePaper,children:(0,le.jsx)(_V,{children:t})}))}const EV=["props","steps"],RV=["ownerState"],AV=e=>{let{props:t,steps:n}=e,r=il(e,EV);const{slots:o,slotProps:i,label:a,inputRef:s,localeText:l}=t,c=TL({steps:n}),{providerProps:u,renderCurrentView:d,ownerState:f}=wF(tr({},r,{props:t,localeText:l,autoFocusView:!0,viewContainerRole:"dialog",variant:"mobile",getStepNavigation:c})),p=u.privateContextValue.labelId,h=i?.toolbar?.hidden??!1,m=o.field,g=il(Fs({elementType:m,externalSlotProps:i?.field,additionalProps:tr({},h&&{id:p}),ownerState:f}),RV),b=o.layout??PL;let y=p;h&&(y=a?`${p}-label`:void 0);const v=tr({},i,{toolbar:tr({},i?.toolbar,{titleId:p}),mobilePaper:tr({"aria-labelledby":y},i?.mobilePaper)});return{renderPicker:()=>(0,le.jsxs)(tA,tr({},u,{children:[(0,le.jsx)(m,tr({},g,{slots:tr({},o,g.slots),slotProps:tr({},v,g.slotProps),inputRef:s})),(0,le.jsx)(DV,{slots:o,slotProps:v,children:(0,le.jsx)(b,tr({},v?.layout,{slots:o,slotProps:v,children:d()}))})]}))}},IV=G.forwardRef(function(e,t){const n=dA(),r=CA(e,"MuiMobileDatePicker"),o=tr({day:mV,month:mV,year:mV},r.viewRenderers),i=tr({},r,{viewRenderers:o,format:aR(n,r,!1),slots:tr({field:Vz},r.slots),slotProps:tr({},r.slotProps,{field:e=>tr({},Is(r.slotProps?.field,e),jA(r)),toolbar:tr({hidden:!1},r.slotProps?.toolbar)})}),{renderPicker:a}=AV({ref:t,props:i,valueManager:IR,valueType:"date",validator:yA,steps:null});return a()});IV.propTypes={autoFocus:GE.bool,className:GE.string,closeOnSelect:GE.bool,dayOfWeekFormatter:GE.func,defaultValue:GE.object,disabled:GE.bool,disableFuture:GE.bool,disableHighlightToday:GE.bool,disableOpenPicker:GE.bool,disablePast:GE.bool,displayWeekNumber:GE.bool,enableAccessibleFieldDOMStructure:GE.any,fixedWeekNumber:GE.number,format:GE.string,formatDensity:GE.oneOf(["dense","spacious"]),inputRef:XE,label:GE.node,loading:GE.bool,localeText:GE.object,maxDate:GE.object,minDate:GE.object,monthsPerRow:GE.oneOf([3,4]),name:GE.string,onAccept:GE.func,onChange:GE.func,onClose:GE.func,onError:GE.func,onMonthChange:GE.func,onOpen:GE.func,onSelectedSectionsChange:GE.func,onViewChange:GE.func,onYearChange:GE.func,open:GE.bool,openTo:GE.oneOf(["day","month","year"]),orientation:GE.oneOf(["landscape","portrait"]),readOnly:GE.bool,reduceAnimations:GE.bool,referenceDate:GE.object,renderLoading:GE.func,selectedSections:GE.oneOfType([GE.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),GE.number]),shouldDisableDate:GE.func,shouldDisableMonth:GE.func,shouldDisableYear:GE.func,showDaysOutsideCurrentMonth:GE.bool,slotProps:GE.object,slots:GE.object,sx:GE.oneOfType([GE.arrayOf(GE.oneOfType([GE.func,GE.object,GE.bool])),GE.func,GE.object]),timezone:GE.string,value:GE.object,view:GE.oneOf(["day","month","year"]),viewRenderers:GE.shape({day:GE.func,month:GE.func,year:GE.func}),views:GE.arrayOf(GE.oneOf(["day","month","year"]).isRequired),yearsOrder:GE.oneOf(["asc","desc"]),yearsPerRow:GE.oneOf([3,4])};const FV=["desktopModeMediaQuery"],LV=G.forwardRef(function(e,t){const n=UE({props:e,name:"MuiDatePicker"}),{desktopModeMediaQuery:r=rF}=n,o=il(n,FV);return YE(r,{defaultMatches:!0})?(0,le.jsx)(gV,tr({ref:t},o)):(0,le.jsx)(IV,tr({ref:t},o))}),NV=({adapter:e,value:t,timezone:n,props:r})=>{if(null===t)return null;const{minTime:o,maxTime:i,minutesStep:a,shouldDisableTime:s,disableIgnoringDatePartForTimeValidation:l=!1,disablePast:c,disableFuture:u}=r,d=e.date(void 0,n),f=hR(l,e);switch(!0){case!e.isValid(t):return"invalidDate";case Boolean(o&&f(o,t)):return"minTime";case Boolean(i&&f(t,i)):return"maxTime";case Boolean(u&&e.isAfter(t,d)):return"disableFuture";case Boolean(c&&e.isBefore(t,d)):return"disablePast";case Boolean(s&&s(t,"hours")):return"shouldDisableTime-hours";case Boolean(s&&s(t,"minutes")):return"shouldDisableTime-minutes";case Boolean(s&&s(t,"seconds")):return"shouldDisableTime-seconds";case Boolean(a&&e.getMinutes(t)%a!==0):return"minutesStep";default:return null}};function zV(e){return function(t){const n=dA(),r=fA();return G.useMemo(()=>{const o=e??n.is12HourCycleInCurrentLocale()?"fullTime12h":"fullTime24h",i=n.isValid(t)?n.format(t,o):null;return r.openTimePickerDialogue(i)},[t,r,n])}}function $V(e){const t=dA(),n=VV(e),r=G.useMemo(()=>e.ampm??t.is12HourCycleInCurrentLocale(),[e.ampm,t]);return G.useMemo(()=>tr({},e,n,{format:e.format??(r?t.formats.fullTime12h:t.formats.fullTime24h)}),[e,n,r,t])}function VV(e){return G.useMemo(()=>({disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1}),[e.disablePast,e.disableFuture])}NV.valueManager=IR;const BV=["slots","slotProps","InputProps","inputProps"],WV=G.forwardRef(function(e,t){const n=UE({props:e,name:"MuiTimeField"}),{slots:r,slotProps:o}=n,i=il(n,BV),a=(e=>{const t=function(e={}){const{enableAccessibleFieldDOMStructure:t=!0,ampm:n}=e;return G.useMemo(()=>({valueType:"time",validator:NV,internal_valueManager:IR,internal_fieldValueManager:FR,internal_enableAccessibleFieldDOMStructure:t,internal_useApplyDefaultValuesToFieldInternalProps:$V,internal_useOpenPickerButtonAriaLabel:zV(n)}),[n,t])}(e);return KL({manager:t,props:e})})(Nz({slotProps:o,ref:t,externalForwardedProps:i}));return(0,le.jsx)(zz,{slots:r,slotProps:o,inputRef:i.inputRef,children:(0,le.jsx)(Fz,{fieldResponse:a,defaultOpenPickerIcon:MN})})});function HV(e){return ss("MuiPickersToolbarText",e)}const qV=ls("MuiPickersToolbarText",["root"]),YV=["className","classes","selected","value"],UV=Ka(BR,{name:"MuiPickersToolbarText",slot:"Root"})(({theme:e})=>({transition:e.transitions.create("color"),color:(e.vars||e).palette.text.secondary,"&[data-selected]":{color:(e.vars||e).palette.text.primary}})),GV=G.forwardRef(function(e,t){const n=UE({props:e,name:"MuiPickersToolbarText"}),{className:r,classes:o,selected:i,value:a}=n,s=il(n,YV),l=(e=>Na({root:["root"]},HV,e))(o);return(0,le.jsx)(UV,tr({ref:t,className:Un(l.root,r),component:"span",ownerState:n},i&&{"data-selected":!0},s,{children:a}))}),XV=["align","className","classes","selected","typographyClassName","value","variant","width"],QV=Ka(UF,{name:"MuiPickersToolbarButton",slot:"Root"})({padding:0,minWidth:16,textTransform:"none"}),KV=G.forwardRef(function(e,t){const n=UE({props:e,name:"MuiPickersToolbarButton"}),{align:r,className:o,classes:i,selected:a,typographyClassName:s,value:l,variant:c,width:u}=n,d=il(n,XV),f=(e=>Na({root:["root"]},WR,e))(i);return(0,le.jsx)(QV,tr({variant:"text",ref:t,className:Un(f.root,o),ownerState:n},u?{sx:{width:u}}:{},d,{children:(0,le.jsx)(GV,{align:r,className:s,variant:c,value:l,selected:a})}))});function ZV(e){return ss("MuiTimePickerToolbar",e)}const JV=ls("MuiTimePickerToolbar",["root","separator","hourMinuteLabel","hourMinuteLabelLandscape","hourMinuteLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),eB=["ampm","ampmInClock","className","classes"],tB=Ka(sA,{name:"MuiTimePickerToolbar",slot:"Root"})({}),nB=Ka(GV,{name:"MuiTimePickerToolbar",slot:"Separator"})({outline:0,margin:"0 4px 0 2px",cursor:"default"}),rB=Ka("div",{name:"MuiTimePickerToolbar",slot:"HourMinuteLabel",overridesResolver:(e,t)=>[{[`&.${JV.hourMinuteLabelLandscape}`]:t.hourMinuteLabelLandscape,[`&.${JV.hourMinuteLabelReverse}`]:t.hourMinuteLabelReverse},t.hourMinuteLabel]})({display:"flex",justifyContent:"flex-end",alignItems:"flex-end",variants:[{props:{toolbarDirection:"rtl"},style:{flexDirection:"row-reverse"}},{props:{pickerOrientation:"landscape"},style:{marginTop:"auto"}}]}),oB=Ka("div",{name:"MuiTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[`.${JV.ampmLabel}`]:t.ampmLabel},{[`&.${JV.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12,[`& .${JV.ampmLabel}`]:{fontSize:17},variants:[{props:{pickerOrientation:"landscape"},style:{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",flexBasis:"100%"}}]});function iB(e){const t=UE({props:e,name:"MuiTimePickerToolbar"}),{ampm:n,ampmInClock:r,className:o,classes:i}=t,a=il(t,eB),s=dA(),l=fA(),c=rA(),u=((e,t)=>{const{pickerOrientation:n,toolbarDirection:r}=t;return Na({root:["root"],separator:["separator"],hourMinuteLabel:["hourMinuteLabel","landscape"===n&&"hourMinuteLabelLandscape","rtl"===r&&"hourMinuteLabelReverse"],ampmSelection:["ampmSelection","landscape"===n&&"ampmLandscape"],ampmLabel:["ampmLabel"]},ZV,e)})(i,c),{value:d,setValue:f,disabled:p,readOnly:h,view:m,setView:g,views:b}=ZR(),y=Boolean(n&&!r&&b.includes("hours")),{meridiemMode:v,handleMeridiemChange:x}=Z$(d,n,e=>f(e,{changeImportance:"set",source:"view"})),w=e=>s.isValid(d)?s.format(d,e):"--",S=(0,le.jsx)(nB,{tabIndex:-1,value:":",variant:"h3",selected:!1,className:u.separator});return(0,le.jsxs)(tB,tr({landscapeDirection:"row",toolbarTitle:l.timePickerToolbarTitle,ownerState:c,className:Un(u.root,o)},a,{children:[(0,le.jsxs)(rB,{className:u.hourMinuteLabel,ownerState:c,children:[JI(b,"hours")&&(0,le.jsx)(KV,{tabIndex:-1,variant:"h3",onClick:()=>g("hours"),selected:"hours"===m,value:w(n?"hours12h":"hours24h")}),JI(b,["hours","minutes"])&&S,JI(b,"minutes")&&(0,le.jsx)(KV,{tabIndex:-1,variant:"h3",onClick:()=>g("minutes"),selected:"minutes"===m,value:w("minutes")}),JI(b,["minutes","seconds"])&&S,JI(b,"seconds")&&(0,le.jsx)(KV,{variant:"h3",onClick:()=>g("seconds"),selected:"seconds"===m,value:w("seconds")})]}),y&&(0,le.jsxs)(oB,{className:u.ampmSelection,ownerState:c,children:[(0,le.jsx)(KV,{disableRipple:!0,variant:"subtitle2",selected:"am"===v,typographyClassName:u.ampmLabel,value:rR(s,"am"),onClick:h?void 0:()=>x("am"),disabled:p}),(0,le.jsx)(KV,{disableRipple:!0,variant:"subtitle2",selected:"pm"===v,typographyClassName:u.ampmLabel,value:rR(s,"pm"),onClick:h?void 0:()=>x("pm"),disabled:p})]})]}))}function aB(e,t){const n=dA(),r=UE({props:e,name:t}),o=VV(r),i=r.ampm??n.is12HourCycleInCurrentLocale(),a=G.useMemo(()=>null==r.localeText?.toolbarTitle?r.localeText:tr({},r.localeText,{timePickerToolbarTitle:r.localeText.toolbarTitle}),[r.localeText]);return tr({},r,o,{ampm:i,localeText:a},KE({views:r.views,openTo:r.openTo,defaultViews:["hours","minutes"],defaultOpenTo:"hours"}),{slots:tr({toolbar:iB},r.slots),slotProps:tr({},r.slotProps,{toolbar:tr({ampm:i,ampmInClock:r.ampmInClock},r.slotProps?.toolbar)})})}function sB(e){return ss("MuiTimeClock",e)}ls("MuiTimeClock",["root","arrowSwitcher"]);const lB=110,cB=110,uB=lB-lB,dB=0-cB,fB=(e,t,n)=>{const r=t-lB,o=n-cB;let i=(Math.atan2(uB,dB)-Math.atan2(r,o))*(180/Math.PI);i=Math.round(i/e)*e,i%=360;const a=r**2+o**2;return{value:Math.floor(i/e)||0,distance:Math.sqrt(a)}};function pB(e){return ss("MuiClockPointer",e)}ls("MuiClockPointer",["root","thumb"]);const hB=["className","classes","isBetweenTwoClockValues","isInner","type","viewValue"],mB=Ka("div",{name:"MuiClockPointer",slot:"Root"})(({theme:e})=>({width:2,backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",left:"calc(50% - 1px)",bottom:"50%",transformOrigin:"center bottom 0px",variants:[{props:{isClockPointerAnimated:!0},style:{transition:e.transitions.create(["transform","height"])}}]})),gB=Ka("div",{name:"MuiClockPointer",slot:"Thumb"})(({theme:e})=>({width:4,height:4,backgroundColor:(e.vars||e).palette.primary.contrastText,borderRadius:"50%",position:"absolute",top:-21,left:"calc(50% - 18px)",border:`16px solid ${(e.vars||e).palette.primary.main}`,boxSizing:"content-box",variants:[{props:{isClockPointerBetweenTwoValues:!1},style:{backgroundColor:(e.vars||e).palette.primary.main}}]}));function bB(e){const t=UE({props:e,name:"MuiClockPointer"}),{className:n,classes:r,isBetweenTwoClockValues:o,isInner:i,type:a,viewValue:s}=t,l=il(t,hB),c=G.useRef(a);G.useEffect(()=>{c.current=a},[a]);const{ownerState:u}=nA(),d=tr({},u,{isClockPointerAnimated:c.current!==a,isClockPointerBetweenTwoValues:o}),f=(e=>Na({root:["root"],thumb:["thumb"]},pB,e))(r);return(0,le.jsx)(mB,tr({style:(()=>{let e=360/("hours"===a?12:60)*s;return"hours"===a&&s>12&&(e-=360),{height:Math.round(220*(i?.26:.4)),transform:`rotateZ(${e}deg)`}})(),className:Un(f.root,n),ownerState:d},l,{children:(0,le.jsx)(gB,{ownerState:d,className:f.thumb})}))}function yB(e){return ss("MuiClock",e)}ls("MuiClock",["root","clock","wrapper","squareMask","pin","amButton","pmButton","meridiemText","selected"]);const vB=Ka("div",{name:"MuiClock",slot:"Root"})(({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",margin:e.spacing(2)})),xB=Ka("div",{name:"MuiClock",slot:"Clock"})({backgroundColor:"rgba(0,0,0,.07)",borderRadius:"50%",height:220,width:220,flexShrink:0,position:"relative",pointerEvents:"none"}),wB=Ka("div",{name:"MuiClock",slot:"Wrapper"})({"&:focus":{outline:"none"}}),SB=Ka("div",{name:"MuiClock",slot:"SquareMask"})({width:"100%",height:"100%",position:"absolute",pointerEvents:"auto",outline:0,touchAction:"none",userSelect:"none",variants:[{props:{isClockDisabled:!1},style:{"@media (pointer: fine)":{cursor:"pointer",borderRadius:"50%"},"&:active":{cursor:"move"}}}]}),kB=Ka("div",{name:"MuiClock",slot:"Pin"})(({theme:e})=>({width:6,height:6,borderRadius:"50%",backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"})),CB=(e,t)=>({zIndex:1,bottom:8,paddingLeft:4,paddingRight:4,width:36,variants:[{props:{clockMeridiemMode:t},style:{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:hover":{backgroundColor:(e.vars||e).palette.primary.light}}}]}),MB=Ka(fN,{name:"MuiClock",slot:"AmButton"})(({theme:e})=>tr({},CB(e,"am"),{position:"absolute",left:8})),PB=Ka(fN,{name:"MuiClock",slot:"PmButton"})(({theme:e})=>tr({},CB(e,"pm"),{position:"absolute",right:8})),TB=Ka(BR,{name:"MuiClock",slot:"MeridiemText"})({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});function OB(e){const t=UE({props:e,name:"MuiClock"}),{ampm:n,ampmInClock:r,autoFocus:o,children:i,value:a,handleMeridiemChange:s,isTimeDisabled:l,meridiemMode:c,minutesStep:u=1,onChange:d,selectedId:f,type:p,viewValue:h,viewRange:[m,g],disabled:b=!1,readOnly:y,className:v,classes:x}=t,w=dA(),S=fA(),{ownerState:k}=nA(),C=tr({},k,{isClockDisabled:b,clockMeridiemMode:c}),M=G.useRef(!1),P=((e,t)=>Na({root:["root"],clock:["clock"],wrapper:["wrapper"],squareMask:["squareMask"],pin:["pin"],amButton:["amButton","am"===t.clockMeridiemMode&&"selected"],pmButton:["pmButton","pm"===t.clockMeridiemMode&&"selected"],meridiemText:["meridiemText"]},yB,e))(x,C),T=l(h,p),O=!n&&"hours"===p&&(h<1||h>12),j=(e,t)=>{b||y||l(e,p)||d(e,t)},_=(e,t)=>{let{offsetX:r,offsetY:o}=e;if(void 0===r){const t=e.target.getBoundingClientRect();r=e.changedTouches[0].clientX-t.left,o=e.changedTouches[0].clientY-t.top}const i="seconds"===p||"minutes"===p?((e,t,n=1)=>{const r=6*n;let{value:o}=fB(r,e,t);return o=o*n%60,o})(r,o,u):((e,t,n)=>{const{value:r,distance:o}=fB(30,e,t);let i=r||12;return n?i%=12:o<74&&(i+=12,i%=24),i})(r,o,Boolean(n));j(i,t)},D=e=>{M.current=!0,_(e,"shallow")},E="hours"!==p&&h%5!=0,R="minutes"===p?u:1,A=G.useRef(null);Kn(()=>{o&&A.current.focus()},[o]);const I=e=>Math.max(m,Math.min(g,e)),F=e=>(e+(g+1))%(g+1);return(0,le.jsxs)(vB,{className:Un(P.root,v),children:[(0,le.jsxs)(xB,{className:P.clock,children:[(0,le.jsx)(SB,{onTouchMove:D,onTouchStart:D,onTouchEnd:e=>{M.current&&(_(e,"finish"),M.current=!1),e.preventDefault()},onMouseUp:e=>{M.current&&(M.current=!1),_(e.nativeEvent,"finish")},onMouseMove:e=>{e.buttons>0&&_(e.nativeEvent,"shallow")},ownerState:C,className:P.squareMask}),!T&&(0,le.jsxs)(G.Fragment,{children:[(0,le.jsx)(kB,{className:P.pin}),null!=a&&(0,le.jsx)(bB,{type:p,viewValue:h,isInner:O,isBetweenTwoClockValues:E})]}),(0,le.jsx)(wB,{"aria-activedescendant":f,"aria-label":S.clockLabelText(p,null==a?null:w.format(a,n?"fullTime12h":"fullTime24h")),ref:A,role:"listbox",onKeyDown:e=>{if(!M.current)switch(e.key){case"Home":j(m,"partial"),e.preventDefault();break;case"End":j(g,"partial"),e.preventDefault();break;case"ArrowUp":j(F(h+R),"partial"),e.preventDefault();break;case"ArrowDown":j(F(h-R),"partial"),e.preventDefault();break;case"PageUp":j(I(h+5),"partial"),e.preventDefault();break;case"PageDown":j(I(h-5),"partial"),e.preventDefault();break;case"Enter":case" ":j(h,"finish"),e.preventDefault()}},tabIndex:0,className:P.wrapper,children:i})]}),n&&r&&(0,le.jsxs)(G.Fragment,{children:[(0,le.jsx)(MB,{onClick:y?void 0:()=>s("am"),disabled:b||null===c,ownerState:C,className:P.amButton,title:rR(w,"am"),children:(0,le.jsx)(TB,{variant:"caption",className:P.meridiemText,children:rR(w,"am")})}),(0,le.jsx)(PB,{disabled:b||null===c,onClick:y?void 0:()=>s("pm"),ownerState:C,className:P.pmButton,title:rR(w,"pm"),children:(0,le.jsx)(TB,{variant:"caption",className:P.meridiemText,children:rR(w,"pm")})})]})]})}function jB(e){return ss("MuiClockNumber",e)}const _B=ls("MuiClockNumber",["root","selected","disabled"]),DB=["className","classes","disabled","index","inner","label","selected"],EB=Ka("span",{name:"MuiClockNumber",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${_B.disabled}`]:t.disabled},{[`&.${_B.selected}`]:t.selected}]})(({theme:e})=>({height:36,width:36,position:"absolute",left:"calc((100% - 36px) / 2)",display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",color:(e.vars||e).palette.text.primary,fontFamily:e.typography.fontFamily,"&:focused":{backgroundColor:(e.vars||e).palette.background.paper},[`&.${_B.selected}`]:{color:(e.vars||e).palette.primary.contrastText},[`&.${_B.disabled}`]:{pointerEvents:"none",color:(e.vars||e).palette.text.disabled},variants:[{props:{isClockNumberInInnerRing:!0},style:tr({},e.typography.body2,{color:(e.vars||e).palette.text.secondary})}]}));function RB(e){const t=UE({props:e,name:"MuiClockNumber"}),{className:n,classes:r,disabled:o,index:i,inner:a,label:s,selected:l}=t,c=il(t,DB),{ownerState:u}=nA(),d=tr({},u,{isClockNumberInInnerRing:a,isClockNumberSelected:l,isClockNumberDisabled:o}),f=((e,t)=>Na({root:["root",t.isClockNumberSelected&&"selected",t.isClockNumberDisabled&&"disabled"]},jB,e))(r,d),p=i%12/12*Math.PI*2-Math.PI/2,h=91*(a?.65:1),m=Math.round(Math.cos(p)*h),g=Math.round(Math.sin(p)*h);return(0,le.jsx)(EB,tr({className:Un(f.root,n),"aria-disabled":!!o||void 0,"aria-selected":!!l||void 0,role:"option",style:{transform:`translate(${m}px, ${g+92}px`},ownerState:d},c,{children:s}))}const AB=({ampm:e,value:t,getClockNumberText:n,isDisabled:r,selectedId:o,adapter:i})=>{const a=t?i.getHours(t):null,s=[],l=e?12:23,c=t=>null!==a&&(e?12===t?12===a||0===a:a===t||a-12===t:a===t);for(let t=e?1:0;t<=l;t+=1){let a=t.toString();0===t&&(a="00");const l=!e&&(0===t||t>12);a=i.formatNumber(a);const u=c(t);s.push((0,le.jsx)(RB,{id:u?o:void 0,index:t,inner:l,selected:u,disabled:r(t),label:a,"aria-label":n(a)},t))}return s},IB=({adapter:e,value:t,isDisabled:n,getClockNumberText:r,selectedId:o})=>{const i=e.formatNumber;return[[5,i("05")],[10,i("10")],[15,i("15")],[20,i("20")],[25,i("25")],[30,i("30")],[35,i("35")],[40,i("40")],[45,i("45")],[50,i("50")],[55,i("55")],[0,i("00")]].map(([e,i],a)=>{const s=e===t;return(0,le.jsx)(RB,{label:i,id:s?o:void 0,index:a+1,inner:!1,disabled:n(e),selected:s,"aria-label":r(i)},e)})},FB=({value:e,referenceDate:t,adapter:n,props:r,timezone:o})=>{const i=G.useMemo(()=>IR.getInitialReferenceValue({value:e,adapter:n,props:r,referenceDate:t,granularity:gR.day,timezone:o,getTodayDate:()=>nR(n,o,"date")}),[t,o]);return e??i},LB=["ampm","ampmInClock","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","showViewSwitcher","onChange","view","views","openTo","onViewChange","focusedView","onFocusedViewChange","className","classes","disabled","readOnly","timezone"],NB=Ka(cV,{name:"MuiTimeClock",slot:"Root"})({display:"flex",flexDirection:"column",position:"relative"}),zB=Ka(K$,{name:"MuiTimeClock",slot:"ArrowSwitcher"})({position:"absolute",right:12,top:15}),$B=["hours","minutes"],VB=G.forwardRef(function(e,t){const n=dA(),r=UE({props:e,name:"MuiTimeClock"}),{ampm:o=n.is12HourCycleInCurrentLocale(),ampmInClock:i=!1,autoFocus:a,slots:s,slotProps:l,value:c,defaultValue:u,referenceDate:d,disableIgnoringDatePartForTimeValidation:f=!1,maxTime:p,minTime:h,disableFuture:m,disablePast:g,minutesStep:b=1,shouldDisableTime:y,showViewSwitcher:v,onChange:x,view:w,views:S=$B,openTo:k,onViewChange:C,focusedView:M,onFocusedViewChange:P,className:T,classes:O,disabled:j,readOnly:_,timezone:D}=r,E=il(r,LB),{value:R,handleValueChange:A,timezone:I}=yF({name:"TimeClock",timezone:D,value:c,defaultValue:u,referenceDate:d,onChange:x,valueManager:IR}),F=FB({value:R,referenceDate:d,adapter:n,props:r,timezone:I}),L=fA(),N=xA(I),z=er(),{ownerState:$}=nA(),{view:V,setView:B,previousView:W,nextView:H,setValueAndGoToNextView:q}=gF({view:w,views:S,openTo:k,onViewChange:C,onChange:A,focusedView:M,onFocusedViewChange:P}),{meridiemMode:Y,handleMeridiemChange:U}=Z$(F,o,q),X=G.useCallback((e,t)=>{const r=hR(f,n),i="hours"===t||"minutes"===t&&S.includes("seconds"),a=({start:e,end:t})=>!(h&&r(h,t)||p&&r(e,p)||m&&r(e,N)||g&&r(N,i?t:e)),s=(e,r=1)=>{if(e%r!==0)return!1;if(y)switch(t){case"hours":return!y(n.setHours(F,e),"hours");case"minutes":return!y(n.setMinutes(F,e),"minutes");case"seconds":return!y(n.setSeconds(F,e),"seconds");default:return!1}return!0};switch(t){case"hours":{const t=fR(e,Y,o),r=n.setHours(F,t);return n.getHours(r)!==t||(!a({start:n.setSeconds(n.setMinutes(r,0),0),end:n.setSeconds(n.setMinutes(r,59),59)})||!s(t))}case"minutes":{const t=n.setMinutes(F,e);return!a({start:n.setSeconds(t,0),end:n.setSeconds(t,59)})||!s(e,b)}case"seconds":{const t=n.setSeconds(F,e);return!a({start:t,end:t})||!s(e)}default:throw new Error("not supported")}},[o,F,f,p,Y,h,b,y,n,m,g,N,S]),Q=G.useMemo(()=>{switch(V){case"hours":{const e=(e,t)=>{const r=fR(e,Y,o);q(n.setHours(F,r),t,"hours")},t=n.getHours(F);let r;return r=o?t>12?[12,23]:[0,11]:[0,23],{onChange:e,viewValue:t,children:AB({value:R,adapter:n,ampm:o,onChange:e,getClockNumberText:L.hoursClockNumberText,isDisabled:e=>j||X(e,"hours"),selectedId:z}),viewRange:r}}case"minutes":{const e=n.getMinutes(F),t=(e,t)=>{q(n.setMinutes(F,e),t,"minutes")};return{viewValue:e,onChange:t,children:IB({adapter:n,value:e,onChange:t,getClockNumberText:L.minutesClockNumberText,isDisabled:e=>j||X(e,"minutes"),selectedId:z}),viewRange:[0,59]}}case"seconds":{const e=n.getSeconds(F),t=(e,t)=>{q(n.setSeconds(F,e),t,"seconds")};return{viewValue:e,onChange:t,children:IB({adapter:n,value:e,onChange:t,getClockNumberText:L.secondsClockNumberText,isDisabled:e=>j||X(e,"seconds"),selectedId:z}),viewRange:[0,59]}}default:throw new Error("You must provide the type for ClockView")}},[V,n,R,o,L.hoursClockNumberText,L.minutesClockNumberText,L.secondsClockNumberText,Y,q,F,X,z,j]),K=(e=>Na({root:["root"],arrowSwitcher:["arrowSwitcher"]},sB,e))(O);return(0,le.jsxs)(NB,tr({ref:t,className:Un(K.root,T),ownerState:$},E,{children:[(0,le.jsx)(OB,tr({autoFocus:a??!!M,ampmInClock:i&&S.includes("hours"),value:R,type:V,ampm:o,minutesStep:b,isTimeDisabled:X,meridiemMode:Y,handleMeridiemChange:U,selectedId:z,disabled:j,readOnly:_},Q)),v&&(0,le.jsx)(zB,{className:K.arrowSwitcher,slots:s,slotProps:l,onGoToPrevious:()=>B(W),isPreviousDisabled:!W,previousLabel:L.openPreviousView,onGoToNext:()=>B(H),isNextDisabled:!H,nextLabel:L.openNextView,ownerState:$})]}))});function BB(e){return ss("MuiDigitalClock",e)}const WB=ls("MuiDigitalClock",["root","list","item"]),HB=["ampm","timeStep","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","onChange","view","openTo","onViewChange","focusedView","onFocusedViewChange","className","classes","disabled","readOnly","views","skipDisabled","timezone"],qB=Ka(cV,{name:"MuiDigitalClock",slot:"Root"})({overflowY:"auto",width:"100%",scrollbarWidth:"thin","@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"auto"},maxHeight:232,variants:[{props:{hasDigitalClockAlreadyBeenRendered:!0},style:{"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"smooth"}}}]}),YB=Ka(Ks,{name:"MuiDigitalClock",slot:"List"})({padding:0}),UB=Ka(ud,{name:"MuiDigitalClock",slot:"Item",shouldForwardProp:e=>"itemValue"!==e&&"formattedValue"!==e})(({theme:e})=>({padding:"8px 16px",margin:"2px 4px","&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:ti(e.palette.primary.main,e.palette.action.hoverOpacity)},"&.Mui-selected":{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:focus-visible, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}},"&.Mui-focusVisible":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:ti(e.palette.primary.main,e.palette.action.focusOpacity)}})),GB=G.forwardRef(function(e,t){const n=dA(),r=G.useRef(null),o=js(t,r),i=G.useRef(null),a=UE({props:e,name:"MuiDigitalClock"}),{ampm:s=n.is12HourCycleInCurrentLocale(),timeStep:l=30,autoFocus:c,slots:u,slotProps:d,value:f,defaultValue:p,referenceDate:h,disableIgnoringDatePartForTimeValidation:m=!1,maxTime:g,minTime:b,disableFuture:y,disablePast:v,minutesStep:x=1,shouldDisableTime:w,onChange:S,view:k,openTo:C,onViewChange:M,focusedView:P,onFocusedViewChange:T,className:O,classes:j,disabled:_,readOnly:D,views:E=["hours"],skipDisabled:R=!1,timezone:A}=a,I=il(a,HB),{value:F,handleValueChange:L,timezone:N}=yF({name:"DigitalClock",timezone:A,value:f,defaultValue:p,referenceDate:h,onChange:S,valueManager:IR}),z=fA(),$=xA(N),{ownerState:V}=nA(),B=tr({},V,{hasDigitalClockAlreadyBeenRendered:!!r.current}),W=(e=>Na({root:["root"],list:["list"],item:["item"]},BB,e))(j),H=u?.digitalClockItem??UB,q=Fs({elementType:H,externalSlotProps:d?.digitalClockItem,ownerState:B,className:W.item}),Y=FB({value:F,referenceDate:h,adapter:n,props:a,timezone:N}),U=zl(e=>L(e,"finish","hours")),{setValueAndGoToNextView:X}=gF({view:k,views:E,openTo:C,onViewChange:M,onChange:U,focusedView:P,onFocusedViewChange:T}),Q=zl(e=>{X(e,"finish")});Kn(()=>{if(null===r.current)return;const e=r.current.querySelector('[role="listbox"] [role="option"][tabindex="0"], [role="listbox"] [role="option"][aria-selected="true"]');if(!e)return;const t=e.offsetTop;(c||P)&&e.focus(),r.current.scrollTop=t-4});const K=G.useCallback(e=>{const t=hR(m,n);return!!(b&&t(b,e)||g&&t(e,g)||y&&t(e,$)||v&&t($,e))||!!(n.getMinutes(e)%x!==0||w&&w(e,"hours"))},[m,n,b,g,y,$,v,x,w]),Z=G.useMemo(()=>{const e=[];let t=n.startOfDay(Y);for(;n.isSameDay(Y,t);)e.push(t),t=n.addMinutes(t,l);return e},[Y,l,n]),J=Z.findIndex(e=>n.isEqual(e,Y));return(0,le.jsx)(qB,tr({ref:o,className:Un(W.root,O),ownerState:B},I,{children:(0,le.jsx)(YB,{ref:i,role:"listbox","aria-label":z.timePickerToolbarTitle,className:W.list,onKeyDown:e=>{switch(e.key){case"PageUp":{const t=nF(i.current)-5,n=i.current.children[Math.max(0,t)];n&&n.focus(),e.preventDefault();break}case"PageDown":{const t=nF(i.current)+5,n=i.current.children,r=n[Math.min(n.length-1,t)];r&&r.focus(),e.preventDefault();break}}},children:Z.map((e,t)=>{const r=K(e);if(R&&r)return null;const o=n.isEqual(e,F),i=n.format(e,s?"fullTime12h":"fullTime24h"),a=J===t||-1===J&&0===t?0:-1;return(0,le.jsx)(H,tr({onClick:()=>!D&&Q(e),selected:o,disabled:_||r,disableRipple:D,role:"option","aria-disabled":D,"aria-selected":o,tabIndex:a,itemValue:e,formattedValue:i},q,{children:i}),`${e.valueOf()}-${i}`)})})}))});function XB(e){return ss("MuiMultiSectionDigitalClock",e)}const QB=ls("MuiMultiSectionDigitalClock",["root"]);function KB(e){return ss("MuiMultiSectionDigitalClockSection",e)}const ZB=ls("MuiMultiSectionDigitalClockSection",["root","item"]),JB=["autoFocus","onChange","className","classes","disabled","readOnly","items","active","slots","slotProps","skipDisabled"],eW=Ka(Ks,{name:"MuiMultiSectionDigitalClockSection",slot:"Root"})(({theme:e})=>({maxHeight:232,width:56,padding:0,overflow:"hidden",scrollbarWidth:"thin","@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"auto"},"@media (pointer: fine)":{"&:hover":{overflowY:"auto"}},"@media (pointer: none), (pointer: coarse)":{overflowY:"auto"},"&:not(:first-of-type)":{borderLeft:`1px solid ${(e.vars||e).palette.divider}`},variants:[{props:{hasDigitalClockAlreadyBeenRendered:!0},style:{"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"smooth"}}}]})),tW=Ka(ud,{name:"MuiMultiSectionDigitalClockSection",slot:"Item"})(({theme:e})=>({padding:8,margin:"2px 4px",width:48,justifyContent:"center","&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:ti(e.palette.primary.main,e.palette.action.hoverOpacity)},"&.Mui-selected":{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:focus-visible, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}},"&.Mui-focusVisible":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:ti(e.palette.primary.main,e.palette.action.focusOpacity)}})),nW=G.forwardRef(function(e,t){const n=G.useRef(null),r=js(t,n),o=G.useRef(null),i=UE({props:e,name:"MuiMultiSectionDigitalClockSection"}),{autoFocus:a,onChange:s,className:l,classes:c,disabled:u,readOnly:d,items:f,active:p,slots:h,slotProps:m,skipDisabled:g}=i,b=il(i,JB),{ownerState:y}=nA(),v=tr({},y,{hasDigitalClockAlreadyBeenRendered:!!n.current}),x=(e=>Na({root:["root"],item:["item"]},KB,e))(c),w=h?.digitalClockSectionItem??tW;Kn(()=>{if(null===n.current)return;const e=n.current.querySelector('[role="option"][tabindex="0"], [role="option"][aria-selected="true"]');if(p&&a&&e&&e.focus(),!e||o.current===e)return;o.current=e;const t=e.offsetTop,r=e.offsetHeight,i=n.current.clientHeight,s=t-i/2+r/2,l=n.current.scrollHeight-i,c=Math.min(s,l);n.current.scrollTop=Math.max(0,c)});const S=f.findIndex(e=>e.isFocused(e.value));return(0,le.jsx)(eW,tr({ref:r,className:Un(x.root,l),ownerState:v,autoFocusItem:a&&p,role:"listbox",onKeyDown:e=>{switch(e.key){case"PageUp":{const t=nF(n.current)-5,r=n.current.children[Math.max(0,t)];r&&r.focus(),e.preventDefault();break}case"PageDown":{const t=nF(n.current)+5,r=n.current.children,o=r[Math.min(r.length-1,t)];o&&o.focus(),e.preventDefault();break}}}},b,{children:f.map((e,t)=>{const n=e.isDisabled?.(e.value),r=u||n;if(g&&r)return null;const o=e.isSelected(e.value),i=S===t||-1===S&&0===t?0:-1;return(0,le.jsx)(w,tr({onClick:()=>!d&&s(e.value),selected:o,disabled:r,disableRipple:d,role:"option","aria-disabled":d||r||void 0,"aria-label":e.ariaLabel,"aria-selected":o,tabIndex:i,className:x.item},m?.digitalClockSectionItem,{children:e.label}),e.label)})}))}),rW=({now:e,value:t,adapter:n,ampm:r,isDisabled:o,resolveAriaLabel:i,timeStep:a,valueOrReferenceDate:s})=>{const l=t?n.getHours(t):null,c=[],u=(e,t)=>{const n=t??l;return null!==n&&(r?12===e?12===n||0===n:n===e||n-12===e:n===e)},d=e=>u(e,n.getHours(s)),f=r?11:23;for(let t=0;t<=f;t+=a){let a=n.format(n.setHours(e,t),r?"hours12h":"hours24h");const s=i(parseInt(a,10).toString());a=n.formatNumber(a),c.push({value:t,label:a,isSelected:u,isDisabled:o,isFocused:d,ariaLabel:s})}return c},oW=({value:e,adapter:t,isDisabled:n,timeStep:r,resolveLabel:o,resolveAriaLabel:i,hasValue:a=!0})=>{const s=t=>null!==e&&a&&e===t,l=t=>e===t;return[...Array.from({length:Math.ceil(60/r)},(e,a)=>{const c=r*a;return{value:c,label:t.formatNumber(o(c)),isDisabled:n,isSelected:s,isFocused:l,ariaLabel:i(c.toString())}})]},iW=["ampm","timeSteps","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","onChange","view","views","openTo","onViewChange","focusedView","onFocusedViewChange","className","classes","disabled","readOnly","skipDisabled","timezone"],aW=Ka(cV,{name:"MuiMultiSectionDigitalClock",slot:"Root"})(({theme:e})=>({flexDirection:"row",width:"100%",borderBottom:`1px solid ${(e.vars||e).palette.divider}`})),sW=G.forwardRef(function(e,t){const n=dA(),r=Hn(),o=UE({props:e,name:"MuiMultiSectionDigitalClock"}),{ampm:i=n.is12HourCycleInCurrentLocale(),timeSteps:a,autoFocus:s,slots:l,slotProps:c,value:u,defaultValue:d,referenceDate:f,disableIgnoringDatePartForTimeValidation:p=!1,maxTime:h,minTime:m,disableFuture:g,disablePast:b,minutesStep:y=1,shouldDisableTime:v,onChange:x,view:w,views:S=["hours","minutes"],openTo:k,onViewChange:C,focusedView:M,onFocusedViewChange:P,className:T,classes:O,disabled:j,readOnly:_,skipDisabled:D=!1,timezone:E}=o,R=il(o,iW),{value:A,handleValueChange:I,timezone:F}=yF({name:"MultiSectionDigitalClock",timezone:E,value:u,defaultValue:d,referenceDate:f,onChange:x,valueManager:IR}),L=fA(),N=xA(F),z=G.useMemo(()=>tr({hours:1,minutes:5,seconds:5},a),[a]),$=FB({value:A,referenceDate:f,adapter:n,props:o,timezone:F}),V=zl((e,t,n)=>I(e,t,n)),B=G.useMemo(()=>i&&S.includes("hours")?S.includes("meridiem")?S:[...S,"meridiem"]:S,[i,S]),{view:W,setValueAndGoToNextView:H,focusedView:q}=gF({view:w,views:B,openTo:k,onViewChange:C,onChange:V,focusedView:M,onFocusedViewChange:P}),Y=zl(e=>{H(e,"finish","meridiem")}),{meridiemMode:U,handleMeridiemChange:X}=Z$($,i,Y,"finish"),Q=G.useCallback((e,t)=>{const r=hR(p,n),o="hours"===t||"minutes"===t&&B.includes("seconds"),a=({start:e,end:t})=>!(m&&r(m,t)||h&&r(e,h)||g&&r(e,N)||b&&r(N,o?t:e)),s=(e,r=1)=>{if(e%r!==0)return!1;if(v)switch(t){case"hours":return!v(n.setHours($,e),"hours");case"minutes":return!v(n.setMinutes($,e),"minutes");case"seconds":return!v(n.setSeconds($,e),"seconds");default:return!1}return!0};switch(t){case"hours":{const t=fR(e,U,i),r=n.setHours($,t);return n.getHours(r)!==t||(!a({start:n.setSeconds(n.setMinutes(r,0),0),end:n.setSeconds(n.setMinutes(r,59),59)})||!s(t))}case"minutes":{const t=n.setMinutes($,e);return!a({start:n.setSeconds(t,0),end:n.setSeconds(t,59)})||!s(e,y)}case"seconds":{const t=n.setSeconds($,e);return!a({start:t,end:t})||!s(e)}default:throw new Error("not supported")}},[i,$,p,h,U,m,y,v,n,g,b,N,B]),K=G.useCallback(e=>{switch(e){case"hours":return{onChange:e=>{const t=fR(e,U,i);H(n.setHours($,t),"finish","hours")},items:rW({now:N,value:A,ampm:i,adapter:n,isDisabled:e=>Q(e,"hours"),timeStep:z.hours,resolveAriaLabel:L.hoursClockNumberText,valueOrReferenceDate:$})};case"minutes":return{onChange:e=>{H(n.setMinutes($,e),"finish","minutes")},items:oW({value:n.getMinutes($),adapter:n,isDisabled:e=>Q(e,"minutes"),resolveLabel:e=>n.format(n.setMinutes(N,e),"minutes"),timeStep:z.minutes,hasValue:!!A,resolveAriaLabel:L.minutesClockNumberText})};case"seconds":return{onChange:e=>{H(n.setSeconds($,e),"finish","seconds")},items:oW({value:n.getSeconds($),adapter:n,isDisabled:e=>Q(e,"seconds"),resolveLabel:e=>n.format(n.setSeconds(N,e),"seconds"),timeStep:z.seconds,hasValue:!!A,resolveAriaLabel:L.secondsClockNumberText})};case"meridiem":{const e=rR(n,"am"),t=rR(n,"pm");return{onChange:X,items:[{value:"am",label:e,isSelected:()=>!!A&&"am"===U,isFocused:()=>!!$&&"am"===U,ariaLabel:e},{value:"pm",label:t,isSelected:()=>!!A&&"pm"===U,isFocused:()=>!!$&&"pm"===U,ariaLabel:t}]}}default:throw new Error(`Unknown view: ${e} found.`)}},[N,A,i,n,z.hours,z.minutes,z.seconds,L.hoursClockNumberText,L.minutesClockNumberText,L.secondsClockNumberText,U,H,$,Q,X]),Z=G.useMemo(()=>{if(!r)return B;const e=B.filter(e=>"meridiem"!==e);return e.reverse(),B.includes("meridiem")&&e.push("meridiem"),e},[r,B]),J=G.useMemo(()=>B.reduce((e,t)=>tr({},e,{[t]:K(t)}),{}),[B,K]),{ownerState:ee}=nA(),te=(e=>Na({root:["root"]},XB,e))(O);return(0,le.jsx)(aW,tr({ref:t,className:Un(te.root,T),ownerState:ee,role:"group"},R,{children:Z.map(e=>(0,le.jsx)(nW,{items:J[e].items,onChange:J[e].onChange,active:W===e,autoFocus:s||q===e,disabled:j,readOnly:_,slots:l,slotProps:c,skipDisabled:D,"aria-label":L.selectViewText(e)},e))}))}),lW=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:h,shouldDisableTime:m,minutesStep:g,ampm:b,ampmInClock:y,slots:v,slotProps:x,readOnly:w,disabled:S,sx:k,autoFocus:C,showViewSwitcher:M,disableIgnoringDatePartForTimeValidation:P,timezone:T})=>(0,le.jsx)(VB,{view:e,onViewChange:t,focusedView:n&&uR(n)?n:null,onFocusedViewChange:r,views:o.filter(uR),value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:h,shouldDisableTime:m,minutesStep:g,ampm:b,ampmInClock:y,slots:v,slotProps:x,readOnly:w,disabled:S,sx:k,autoFocus:C,showViewSwitcher:M,disableIgnoringDatePartForTimeValidation:P,timezone:T}),cW=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:h,shouldDisableTime:m,minutesStep:g,ampm:b,slots:y,slotProps:v,readOnly:x,disabled:w,sx:S,autoFocus:k,disableIgnoringDatePartForTimeValidation:C,timeSteps:M,skipDisabled:P,timezone:T})=>(0,le.jsx)(GB,{view:e,onViewChange:t,focusedView:n&&uR(n)?n:null,onFocusedViewChange:r,views:o.filter(uR),value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:h,shouldDisableTime:m,minutesStep:g,ampm:b,slots:y,slotProps:v,readOnly:x,disabled:w,sx:S,autoFocus:k,disableIgnoringDatePartForTimeValidation:C,timeStep:M?.minutes,skipDisabled:P,timezone:T}),uW=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:h,shouldDisableTime:m,minutesStep:g,ampm:b,slots:y,slotProps:v,readOnly:x,disabled:w,sx:S,autoFocus:k,disableIgnoringDatePartForTimeValidation:C,timeSteps:M,skipDisabled:P,timezone:T})=>(0,le.jsx)(sW,{view:e,onViewChange:t,focusedView:n&&dR(n)?n:null,onFocusedViewChange:r,views:o.filter(uR),value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:h,shouldDisableTime:m,minutesStep:g,ampm:b,slots:y,slotProps:v,readOnly:x,disabled:w,sx:S,autoFocus:k,disableIgnoringDatePartForTimeValidation:C,timeSteps:M,skipDisabled:P,timezone:T}),dW=["views","format"],fW=(e,t,n)=>{let{views:r,format:o}=t,i=il(t,dW);if(o)return o;const a=[],s=[];if(r.forEach(e=>{uR(e)?s.push(e):iR(e)&&a.push(e)}),0===s.length)return aR(e,tr({views:a},i),!1);if(0===a.length)return mR(e,tr({views:s},i));const l=mR(e,tr({views:s},i));return`${n?e.formats.keyboardDate:aR(e,tr({views:a},i),!1)} ${l}`},pW=(e,t,n)=>n?t.filter(e=>!dR(e)||"hours"===e):e?[...t,"meridiem"]:t;function hW({thresholdToRenderTimeInASingleColumn:e,ampm:t,timeSteps:n,views:r}){const o=e??24,i=tr({hours:1,minutes:5,seconds:5},n),a=((e,t)=>1440/((e.hours??1)*(e.minutes??5))<=t)(i,o);return{thresholdToRenderTimeInASingleColumn:o,timeSteps:i,shouldRenderTimeInASingleColumn:a,views:pW(t,r,a)}}const mW=G.forwardRef(function(e,t){const n=dA(),r=aB(e,"MuiDesktopTimePicker"),{shouldRenderTimeInASingleColumn:o,views:i,timeSteps:a}=hW(r),s=o?cW:uW,l=tr({hours:s,minutes:s,seconds:s,meridiem:s},r.viewRenderers),c=r.ampmInClock??!0,u=l.hours?.name===uW.name?i:i.filter(e=>"meridiem"!==e),d=tr({},r,{ampmInClock:c,timeSteps:a,viewRenderers:l,format:mR(n,r),views:o?["hours"]:u,slots:tr({field:WV},r.slots),slotProps:tr({},r.slotProps,{field:e=>tr({},Is(r.slotProps?.field,e),jA(r)),toolbar:tr({hidden:!0,ampmInClock:c},r.slotProps?.toolbar)})}),{renderPicker:f}=_L({ref:t,props:d,valueManager:IR,valueType:"time",validator:NV,steps:null});return f()});mW.propTypes={ampm:GE.bool,ampmInClock:GE.bool,autoFocus:GE.bool,className:GE.string,closeOnSelect:GE.bool,defaultValue:GE.object,disabled:GE.bool,disableFuture:GE.bool,disableIgnoringDatePartForTimeValidation:GE.bool,disableOpenPicker:GE.bool,disablePast:GE.bool,enableAccessibleFieldDOMStructure:GE.any,format:GE.string,formatDensity:GE.oneOf(["dense","spacious"]),inputRef:XE,label:GE.node,localeText:GE.object,maxTime:GE.object,minTime:GE.object,minutesStep:GE.number,name:GE.string,onAccept:GE.func,onChange:GE.func,onClose:GE.func,onError:GE.func,onOpen:GE.func,onSelectedSectionsChange:GE.func,onViewChange:GE.func,open:GE.bool,openTo:GE.oneOf(["hours","meridiem","minutes","seconds"]),orientation:GE.oneOf(["landscape","portrait"]),readOnly:GE.bool,reduceAnimations:GE.bool,referenceDate:GE.object,selectedSections:GE.oneOfType([GE.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),GE.number]),shouldDisableTime:GE.func,skipDisabled:GE.bool,slotProps:GE.object,slots:GE.object,sx:GE.oneOfType([GE.arrayOf(GE.oneOfType([GE.func,GE.object,GE.bool])),GE.func,GE.object]),thresholdToRenderTimeInASingleColumn:GE.number,timeSteps:GE.shape({hours:GE.number,minutes:GE.number,seconds:GE.number}),timezone:GE.string,value:GE.object,view:GE.oneOf(["hours","meridiem","minutes","seconds"]),viewRenderers:GE.shape({hours:GE.func,meridiem:GE.func,minutes:GE.func,seconds:GE.func}),views:GE.arrayOf(GE.oneOf(["hours","minutes","seconds"]).isRequired)};const gW=G.forwardRef(function(e,t){const n=dA(),r=aB(e,"MuiMobileTimePicker"),o=tr({hours:lW,minutes:lW,seconds:lW},r.viewRenderers),i=r.ampmInClock??!1,a=tr({},r,{ampmInClock:i,viewRenderers:o,format:mR(n,r),slots:tr({field:WV},r.slots),slotProps:tr({},r.slotProps,{field:e=>tr({},Is(r.slotProps?.field,e),jA(r)),toolbar:tr({hidden:!1,ampmInClock:i},r.slotProps?.toolbar)})}),{renderPicker:s}=AV({ref:t,props:a,valueManager:IR,valueType:"time",validator:NV,steps:null});return s()});gW.propTypes={ampm:GE.bool,ampmInClock:GE.bool,autoFocus:GE.bool,className:GE.string,closeOnSelect:GE.bool,defaultValue:GE.object,disabled:GE.bool,disableFuture:GE.bool,disableIgnoringDatePartForTimeValidation:GE.bool,disableOpenPicker:GE.bool,disablePast:GE.bool,enableAccessibleFieldDOMStructure:GE.any,format:GE.string,formatDensity:GE.oneOf(["dense","spacious"]),inputRef:XE,label:GE.node,localeText:GE.object,maxTime:GE.object,minTime:GE.object,minutesStep:GE.number,name:GE.string,onAccept:GE.func,onChange:GE.func,onClose:GE.func,onError:GE.func,onOpen:GE.func,onSelectedSectionsChange:GE.func,onViewChange:GE.func,open:GE.bool,openTo:GE.oneOf(["hours","minutes","seconds"]),orientation:GE.oneOf(["landscape","portrait"]),readOnly:GE.bool,reduceAnimations:GE.bool,referenceDate:GE.object,selectedSections:GE.oneOfType([GE.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),GE.number]),shouldDisableTime:GE.func,slotProps:GE.object,slots:GE.object,sx:GE.oneOfType([GE.arrayOf(GE.oneOfType([GE.func,GE.object,GE.bool])),GE.func,GE.object]),timezone:GE.string,value:GE.object,view:GE.oneOf(["hours","minutes","seconds"]),viewRenderers:GE.shape({hours:GE.func,minutes:GE.func,seconds:GE.func}),views:GE.arrayOf(GE.oneOf(["hours","minutes","seconds"]).isRequired)};const bW=["desktopModeMediaQuery"],yW=G.forwardRef(function(e,t){const n=UE({props:e,name:"MuiTimePicker"}),{desktopModeMediaQuery:r=rF}=n,o=il(n,bW);return YE(r,{defaultMatches:!0})?(0,le.jsx)(mW,tr({ref:t},o)):(0,le.jsx)(gW,tr({ref:t},o))}),vW=Ka("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,"vertical"===n.orientation&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&"vertical"===n.orientation&&t.withChildrenVertical,"right"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignRight,"left"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignLeft]}})(gs(({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:e.alpha((e.vars||e).palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:e})=>!!e.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:e})=>e.children&&"vertical"!==e.orientation,style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:e})=>"vertical"===e.orientation&&e.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:e})=>"right"===e.textAlign&&"vertical"!==e.orientation,style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:e})=>"left"===e.textAlign&&"vertical"!==e.orientation,style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]}))),xW=Ka("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})(gs(({theme:e})=>({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}}]}))),wW=G.forwardRef(function(e,t){const n=Za({props:e,name:"MuiDivider"}),{absolute:r=!1,children:o,className:i,orientation:a="horizontal",component:s=(o||"vertical"===a?"div":"hr"),flexItem:l=!1,light:c=!1,role:u=("hr"!==s?"separator":void 0),textAlign:d="center",variant:f="fullWidth",...p}=n,h={...n,absolute:r,component:s,flexItem:l,light:c,orientation:a,role:u,textAlign:d,variant:f},m=(e=>{const{absolute:t,children:n,classes:r,flexItem:o,light:i,orientation:a,textAlign:s,variant:l}=e;return Na({root:["root",t&&"absolute",l,i&&"light","vertical"===a&&"vertical",o&&"flexItem",n&&"withChildren",n&&"vertical"===a&&"withChildrenVertical","right"===s&&"vertical"!==a&&"textAlignRight","left"===s&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]},rd,r)})(h);return(0,le.jsx)(vW,{as:s,className:Un(m.root,i),role:u,ref:t,ownerState:h,"aria-orientation":"separator"!==u||"hr"===s&&"vertical"!==a?void 0:a,...p,children:o?(0,le.jsx)(xW,{className:m.wrapper,ownerState:h,children:o}):null})});wW&&(wW.muiSkipListHighlight=!0);const SW=wW,kW=({adapter:e,value:t,timezone:n,props:r})=>{const o=yA({adapter:e,value:t,timezone:n,props:r});return null!==o?o:NV({adapter:e,value:t,timezone:n,props:r})};function CW(e){const t=dA(),n=fA();return G.useMemo(()=>{const r=t.isValid(e)?t.format(e,"fullDate"):null;return n.openDatePickerDialogue(r)},[e,n,t])}function MW(e){const t=dA(),n=PW(e),r=G.useMemo(()=>e.ampm??t.is12HourCycleInCurrentLocale(),[e.ampm,t]);return G.useMemo(()=>tr({},e,n,{format:e.format??(r?t.formats.keyboardDateTime12h:t.formats.keyboardDateTime24h)}),[e,n,r,t])}function PW(e){const t=dA(),n=vA();return G.useMemo(()=>({disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,disableIgnoringDatePartForTimeValidation:!!(e.minDateTime||e.maxDateTime||e.disableFuture||e.disablePast),minDate:eR(t,e.minDateTime??e.minDate,n.minDate),maxDate:eR(t,e.maxDateTime??e.maxDate,n.maxDate),minTime:e.minDateTime??e.minTime,maxTime:e.maxDateTime??e.maxTime}),[e.minDateTime,e.maxDateTime,e.minTime,e.maxTime,e.minDate,e.maxDate,e.disableFuture,e.disablePast,t,n])}kW.valueManager=IR;const TW=["slots","slotProps"],OW=G.forwardRef(function(e,t){const n=UE({props:e,name:"MuiDateTimeField"}),{slots:r,slotProps:o}=n,i=il(n,TW),a=(e=>{const t=function(e={}){const{enableAccessibleFieldDOMStructure:t=!0}=e;return G.useMemo(()=>({valueType:"date-time",validator:kW,internal_valueManager:IR,internal_fieldValueManager:FR,internal_enableAccessibleFieldDOMStructure:t,internal_useApplyDefaultValuesToFieldInternalProps:MW,internal_useOpenPickerButtonAriaLabel:CW}),[t])}(e);return KL({manager:t,props:e})})(Nz({slotProps:o,ref:t,externalForwardedProps:i}));return(0,le.jsx)(zz,{slots:r,slotProps:o,inputRef:i.inputRef,children:(0,le.jsx)(Fz,{fieldResponse:a,defaultOpenPickerIcon:CN})})});function jW(e){return ss("MuiTab",e)}const _W=ls("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper","icon"]),DW=Ka(nd,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${ts(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${_W.iconWrapper}`]:t.iconWrapper},{[`& .${_W.icon}`]:t.icon}]}})(gs(({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center",lineHeight:1.25,variants:[{props:({ownerState:e})=>e.label&&("top"===e.iconPosition||"bottom"===e.iconPosition),style:{flexDirection:"column"}},{props:({ownerState:e})=>e.label&&"top"!==e.iconPosition&&"bottom"!==e.iconPosition,style:{flexDirection:"row"}},{props:({ownerState:e})=>e.icon&&e.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"top"===t,style:{[`& > .${_W.icon}`]:{marginBottom:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"bottom"===t,style:{[`& > .${_W.icon}`]:{marginTop:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"start"===t,style:{[`& > .${_W.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"end"===t,style:{[`& > .${_W.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${_W.selected}`]:{opacity:1},[`&.${_W.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${_W.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${_W.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${_W.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${_W.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:e})=>e.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"}},{props:({ownerState:e})=>e.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]}))),EW=G.forwardRef(function(e,t){const n=Za({props:e,name:"MuiTab"}),{className:r,disabled:o=!1,disableFocusRipple:i=!1,fullWidth:a,icon:s,iconPosition:l="top",indicator:c,label:u,onChange:d,onClick:f,onFocus:p,selected:h,selectionFollowsFocus:m,textColor:g="inherit",value:b,wrapped:y=!1,...v}=n,x={...n,disabled:o,disableFocusRipple:i,selected:h,icon:!!s,iconPosition:l,label:!!u,fullWidth:a,textColor:g,wrapped:y},w=(e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:o,icon:i,label:a,selected:s,disabled:l}=e;return Na({root:["root",i&&a&&"labelIcon",`textColor${ts(n)}`,r&&"fullWidth",o&&"wrapped",s&&"selected",l&&"disabled"],icon:["iconWrapper","icon"]},jW,t)})(x),S=s&&u&&G.isValidElement(s)?G.cloneElement(s,{className:Un(w.icon,s.props.className)}):s;return(0,le.jsxs)(DW,{focusRipple:!i,className:Un(w.root,r),ref:t,role:"tab","aria-selected":h,disabled:o,onClick:e=>{!h&&d&&d(e,b),f&&f(e)},onFocus:e=>{m&&!h&&d&&d(e,b),p&&p(e)},ownerState:x,tabIndex:h?0:-1,...v,children:["top"===l||"start"===l?(0,le.jsxs)(G.Fragment,{children:[S,u]}):(0,le.jsxs)(G.Fragment,{children:[u,S]}),c]})}),RW=EW;function AW(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}const IW={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"},FW=Bc((0,le.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"})),LW=Bc((0,le.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}));function NW(e){return ss("MuiTabScrollButton",e)}const zW=ls("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),$W=Ka(nd,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${zW.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),VW=G.forwardRef(function(e,t){const n=Za({props:e,name:"MuiTabScrollButton"}),{className:r,slots:o={},slotProps:i={},direction:a,orientation:s,disabled:l,...c}=n,u=Hn(),d={isRtl:u,...n},f=(e=>{const{classes:t,orientation:n,disabled:r}=e;return Na({root:["root",n,r&&"disabled"]},NW,t)})(d),p=o.StartScrollButtonIcon??FW,h=o.EndScrollButtonIcon??LW,m=Fs({elementType:p,externalSlotProps:i.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:d}),g=Fs({elementType:h,externalSlotProps:i.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:d});return(0,le.jsx)($W,{component:"div",className:Un(f.root,r),ref:t,role:null,ownerState:d,tabIndex:null,...c,style:{...c.style,..."vertical"===s&&{"--TabScrollButton-svgRotate":`rotate(${u?-90:90}deg)`}},children:"left"===a?(0,le.jsx)(p,{...m}):(0,le.jsx)(h,{...g})})});function BW(e){return ss("MuiTabs",e)}const WW=ls("MuiTabs",["root","vertical","list","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),HW=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,qW=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,YW=(e,t,n)=>{let r=!1,o=n(e,t);for(;o;){if(o===e.firstChild){if(r)return;r=!0}const t=o.disabled||"true"===o.getAttribute("aria-disabled");if(o.hasAttribute("tabindex")&&!t)return void o.focus();o=n(e,o)}},UW=Ka("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${WW.scrollButtons}`]:t.scrollButtons},{[`& .${WW.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(gs(({theme:e})=>({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.scrollButtonsHideMobile,style:{[`& .${WW.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}}}]}))),GW=Ka("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap",variants:[{props:({ownerState:e})=>e.fixed,style:{overflowX:"hidden",width:"100%"}},{props:({ownerState:e})=>e.hideScrollbar,style:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},{props:({ownerState:e})=>e.scrollableX,style:{overflowX:"auto",overflowY:"hidden"}},{props:({ownerState:e})=>e.scrollableY,style:{overflowY:"auto",overflowX:"hidden"}}]}),XW=Ka("div",{name:"MuiTabs",slot:"List",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.list,t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})({display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.centered,style:{justifyContent:"center"}}]}),QW=Ka("span",{name:"MuiTabs",slot:"Indicator"})(gs(({theme:e})=>({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create(),variants:[{props:{indicatorColor:"primary"},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:"secondary"},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:e})=>e.vertical,style:{height:"100%",width:2,right:0}}]}))),KW=Ka(function(e){const{onChange:t,...n}=e,r=G.useRef(),o=G.useRef(null),i=()=>{r.current=o.current.offsetHeight-o.current.clientHeight};return Hs(()=>{const e=Js(()=>{const e=r.current;i(),e!==r.current&&t(r.current)}),n=Ys(o.current);return n.addEventListener("resize",e),()=>{e.clear(),n.removeEventListener("resize",e)}},[t]),G.useEffect(()=>{i(),t(r.current)},[t]),(0,le.jsx)("div",{style:IW,...n,ref:o})})({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),ZW={},JW=G.forwardRef(function(e,t){const n=Za({props:e,name:"MuiTabs"}),r=yl(),o=Hn(),{"aria-label":i,"aria-labelledby":a,action:s,centered:l=!1,children:c,className:u,component:d="div",allowScrollButtonsMobile:f=!1,indicatorColor:p="primary",onChange:h,orientation:m="horizontal",ScrollButtonComponent:g,scrollButtons:b="auto",selectionFollowsFocus:y,slots:v={},slotProps:x={},TabIndicatorProps:w={},TabScrollButtonProps:S={},textColor:k="primary",value:C,variant:M="standard",visibleScrollbar:P=!1,...T}=n,O="scrollable"===M,j="vertical"===m,_=j?"scrollTop":"scrollLeft",D=j?"top":"left",E=j?"bottom":"right",R=j?"clientHeight":"clientWidth",A=j?"height":"width",I={...n,component:d,allowScrollButtonsMobile:f,indicatorColor:p,orientation:m,vertical:j,scrollButtons:b,textColor:k,variant:M,visibleScrollbar:P,fixed:!O,hideScrollbar:O&&!P,scrollableX:O&&!j,scrollableY:O&&j,centered:l&&!O,scrollButtonsHideMobile:!f},F=(e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:o,scrollableY:i,centered:a,scrollButtonsHideMobile:s,classes:l}=e;return Na({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",o&&"scrollableX",i&&"scrollableY"],list:["list","flexContainer",t&&"flexContainerVertical",t&&"vertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",s&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},BW,l)})(I),L=Fs({elementType:v.StartScrollButtonIcon,externalSlotProps:x.startScrollButtonIcon,ownerState:I}),N=Fs({elementType:v.EndScrollButtonIcon,externalSlotProps:x.endScrollButtonIcon,ownerState:I}),[z,$]=G.useState(!1),[V,B]=G.useState(ZW),[W,H]=G.useState(!1),[q,Y]=G.useState(!1),[U,X]=G.useState(!1),[Q,K]=G.useState({overflow:"hidden",scrollbarWidth:0}),Z=new Map,J=G.useRef(null),ee=G.useRef(null),te={slots:v,slotProps:{indicator:w,scrollButton:S,...x}},ne=()=>{const e=J.current;let t,n;if(e){const n=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollWidth:e.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}if(e&&!1!==C){const e=ee.current.children;if(e.length>0){const t=e[Z.get(C)];n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},re=Fu(()=>{const{tabsMeta:e,tabMeta:t}=ne();let n,r=0;j?(n="top",t&&e&&(r=t.top-e.top+e.scrollTop)):(n=o?"right":"left",t&&e&&(r=(o?-1:1)*(t[n]-e[n]+e.scrollLeft)));const i={[n]:r,[A]:t?t[A]:0};if("number"!=typeof V[n]||"number"!=typeof V[A])B(i);else{const e=Math.abs(V[n]-i[n]),t=Math.abs(V[A]-i[A]);(e>=1||t>=1)&&B(i)}}),oe=(e,{animation:t=!0}={})=>{t?function(e,t,n,r={},o=()=>{}){const{ease:i=AW,duration:a=300}=r;let s=null;const l=t[e];let c=!1;const u=r=>{if(c)return void o(new Error("Animation cancelled"));null===s&&(s=r);const d=Math.min(1,(r-s)/a);t[e]=i(d)*(n-l)+l,d>=1?requestAnimationFrame(()=>{o(null)}):requestAnimationFrame(u)};l===n?o(new Error("Element already at target position")):requestAnimationFrame(u)}(_,J.current,e,{duration:r.transitions.duration.standard}):J.current[_]=e},ie=e=>{let t=J.current[_];t+=j?e:e*(o?-1:1),oe(t)},ae=()=>{const e=J.current[R];let t=0;const n=Array.from(ee.current.children);for(let r=0;r<n.length;r+=1){const o=n[r];if(t+o[R]>e){0===r&&(t=e);break}t+=o[R]}return t},se=()=>{ie(-1*ae())},ce=()=>{ie(ae())},[ue,{onChange:de,...fe}]=El("scrollbar",{className:Un(F.scrollableX,F.hideScrollbar),elementType:KW,shouldForwardComponentProp:!0,externalForwardedProps:te,ownerState:I}),pe=G.useCallback(e=>{de?.(e),K({overflow:null,scrollbarWidth:e})},[de]),[he,me]=El("scrollButtons",{className:Un(F.scrollButtons,S.className),elementType:VW,externalForwardedProps:te,ownerState:I,additionalProps:{orientation:m,slots:{StartScrollButtonIcon:v.startScrollButtonIcon||v.StartScrollButtonIcon,EndScrollButtonIcon:v.endScrollButtonIcon||v.EndScrollButtonIcon},slotProps:{startScrollButtonIcon:L,endScrollButtonIcon:N}}}),ge=Fu(e=>{const{tabsMeta:t,tabMeta:n}=ne();if(n&&t)if(n[D]<t[D]){const r=t[_]+(n[D]-t[D]);oe(r,{animation:e})}else if(n[E]>t[E]){const r=t[_]+(n[E]-t[E]);oe(r,{animation:e})}}),be=Fu(()=>{O&&!1!==b&&X(!U)});G.useEffect(()=>{const e=Js(()=>{J.current&&re()});let t;const n=Ys(J.current);let r;return n.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(t=new ResizeObserver(e),Array.from(ee.current.children).forEach(e=>{t.observe(e)})),"undefined"!=typeof MutationObserver&&(r=new MutationObserver(n=>{n.forEach(e=>{e.removedNodes.forEach(e=>{t?.unobserve(e)}),e.addedNodes.forEach(e=>{t?.observe(e)})}),e(),be()}),r.observe(ee.current,{childList:!0})),()=>{e.clear(),n.removeEventListener("resize",e),r?.disconnect(),t?.disconnect()}},[re,be]),G.useEffect(()=>{const e=Array.from(ee.current.children),t=e.length;if("undefined"!=typeof IntersectionObserver&&t>0&&O&&!1!==b){const n=e[0],r=e[t-1],o={root:J.current,threshold:.99},i=new IntersectionObserver(e=>{H(!e[0].isIntersecting)},o);i.observe(n);const a=new IntersectionObserver(e=>{Y(!e[0].isIntersecting)},o);return a.observe(r),()=>{i.disconnect(),a.disconnect()}}},[O,b,U,c?.length]),G.useEffect(()=>{$(!0)},[]),G.useEffect(()=>{re()}),G.useEffect(()=>{ge(ZW!==V)},[ge,V]),G.useImperativeHandle(s,()=>({updateIndicator:re,updateScrollButtons:be}),[re,be]);const[ye,ve]=El("indicator",{className:Un(F.indicator,w.className),elementType:QW,externalForwardedProps:te,ownerState:I,additionalProps:{style:V}}),xe=(0,le.jsx)(ye,{...ve});let we=0;const Se=G.Children.map(c,e=>{if(!G.isValidElement(e))return null;const t=void 0===e.props.value?we:e.props.value;Z.set(t,we);const n=t===C;return we+=1,G.cloneElement(e,{fullWidth:"fullWidth"===M,indicator:n&&!z&&xe,selected:n,selectionFollowsFocus:y,onChange:h,textColor:k,value:t,...1!==we||!1!==C||e.props.tabIndex?{}:{tabIndex:0}})}),ke=(()=>{const e={};e.scrollbarSizeListener=O?(0,le.jsx)(ue,{...fe,onChange:pe}):null;const t=O&&("auto"===b&&(W||q)||!0===b);return e.scrollButtonStart=t?(0,le.jsx)(he,{direction:o?"right":"left",onClick:se,disabled:!W,...me}):null,e.scrollButtonEnd=t?(0,le.jsx)(he,{direction:o?"left":"right",onClick:ce,disabled:!q,...me}):null,e})(),[Ce,Me]=El("root",{ref:t,className:Un(F.root,u),elementType:UW,externalForwardedProps:{...te,...T,component:d},ownerState:I}),[Pe,Te]=El("scroller",{ref:J,className:F.scroller,elementType:GW,externalForwardedProps:te,ownerState:I,additionalProps:{style:{overflow:Q.overflow,[j?"margin"+(o?"Left":"Right"):"marginBottom"]:P?void 0:-Q.scrollbarWidth}}}),[Oe,je]=El("list",{ref:ee,className:Un(F.list,F.flexContainer),elementType:XW,externalForwardedProps:te,ownerState:I,getSlotProps:e=>({...e,onKeyDown:t=>{(e=>{if(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey)return;const t=ee.current,n=Os(t).activeElement;if("tab"!==n.getAttribute("role"))return;let r="horizontal"===m?"ArrowLeft":"ArrowUp",i="horizontal"===m?"ArrowRight":"ArrowDown";switch("horizontal"===m&&o&&(r="ArrowRight",i="ArrowLeft"),e.key){case r:e.preventDefault(),YW(t,n,qW);break;case i:e.preventDefault(),YW(t,n,HW);break;case"Home":e.preventDefault(),YW(t,null,HW);break;case"End":e.preventDefault(),YW(t,null,qW)}})(t),e.onKeyDown?.(t)}})});return(0,le.jsxs)(Ce,{...Me,children:[ke.scrollButtonStart,ke.scrollbarSizeListener,(0,le.jsxs)(Pe,{...Te,children:[(0,le.jsx)(Oe,{"aria-label":i,"aria-labelledby":a,"aria-orientation":"vertical"===m?"vertical":null,role:"tablist",...je,children:Se}),z&&xe]}),ke.scrollButtonEnd]})}),eH=JW;function tH(e){return ss("MuiDateTimePickerTabs",e)}ls("MuiDateTimePickerTabs",["root"]);const nH=e=>iR(e)?"date":"time",rH=Ka(eH,{name:"MuiDateTimePickerTabs",slot:"Root"})(({theme:e})=>({boxShadow:`0 -1px 0 0 inset ${(e.vars||e).palette.divider}`,"&:last-child":{boxShadow:`0 1px 0 0 inset ${(e.vars||e).palette.divider}`,[`& .${WW.indicator}`]:{bottom:"auto",top:0}}})),oH=function(e){const t=UE({props:e,name:"MuiDateTimePickerTabs"}),{dateIcon:n=(0,le.jsx)(PN,{}),timeIcon:r=(0,le.jsx)(TN,{}),hidden:o="undefined"==typeof window||window.innerHeight<667,className:i,classes:a,sx:s}=t,l=fA(),{ownerState:c}=nA(),{view:u,setView:d}=ZR(),f=(e=>Na({root:["root"]},tH,e))(a);return o?null:(0,le.jsxs)(rH,{ownerState:c,variant:"fullWidth",value:nH(u),onChange:(e,t)=>{d("date"===t?"day":"hours")},className:Un(i,f.root),sx:s,children:[(0,le.jsx)(RW,{value:"date","aria-label":l.dateTableLabel,icon:(0,le.jsx)(G.Fragment,{children:n})}),(0,le.jsx)(RW,{value:"time","aria-label":l.timeTableLabel,icon:(0,le.jsx)(G.Fragment,{children:r})})]})};function iH(e){return ss("MuiDateTimePickerToolbar",e)}const aH=ls("MuiDateTimePickerToolbar",["root","dateContainer","timeContainer","timeDigitsContainer","separator","timeLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),sH=["ampm","ampmInClock","toolbarFormat","toolbarPlaceholder","toolbarTitle","className","classes"],lH=Ka(sA,{name:"MuiDateTimePickerToolbar",slot:"Root",shouldForwardProp:e=>Va(e)&&"toolbarVariant"!==e})(({theme:e})=>({paddingLeft:16,paddingRight:16,justifyContent:"space-around",position:"relative",variants:[{props:{toolbarVariant:"desktop"},style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,[`& .${HR.content} .${qV.root}[data-selected]`]:{color:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightBold}}},{props:{toolbarVariant:"desktop",pickerOrientation:"landscape"},style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:{toolbarVariant:"desktop",pickerOrientation:"portrait"},style:{paddingLeft:24,paddingRight:0}}]})),cH=Ka("div",{name:"MuiDateTimePickerToolbar",slot:"DateContainer"})({display:"flex",flexDirection:"column",alignItems:"flex-start"}),uH=Ka("div",{name:"MuiDateTimePickerToolbar",slot:"TimeContainer",shouldForwardProp:e=>Va(e)&&"toolbarVariant"!==e})({display:"flex",flexDirection:"row",variants:[{props:{toolbarDirection:"rtl"},style:{flexDirection:"row-reverse"}},{props:{toolbarVariant:"desktop",pickerOrientation:"portrait"},style:{gap:9,marginRight:4,alignSelf:"flex-end"}},{props:({pickerOrientation:e,toolbarVariant:t})=>"landscape"===e&&"desktop"!==t,style:{flexDirection:"column"}},{props:({pickerOrientation:e,toolbarVariant:t,toolbarDirection:n})=>"landscape"===e&&"desktop"!==t&&"rtl"===n,style:{flexDirection:"column-reverse"}}]}),dH=Ka("div",{name:"MuiDateTimePickerToolbar",slot:"TimeDigitsContainer",shouldForwardProp:e=>Va(e)&&"toolbarVariant"!==e})({display:"flex",variants:[{props:{toolbarDirection:"rtl"},style:{flexDirection:"row-reverse"}},{props:{toolbarVariant:"desktop"},style:{gap:1.5}}]}),fH=Ka(GV,{name:"MuiDateTimePickerToolbar",slot:"Separator",shouldForwardProp:e=>Va(e)&&"toolbarVariant"!==e})({margin:"0 4px 0 2px",cursor:"default",variants:[{props:{toolbarVariant:"desktop"},style:{margin:0}}]}),pH=Ka("div",{name:"MuiDateTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[`.${aH.ampmLabel}`]:t.ampmLabel},{[`&.${aH.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12,[`& .${aH.ampmLabel}`]:{fontSize:17},variants:[{props:{pickerOrientation:"landscape"},style:{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",width:"100%"}}]}),hH=G.createContext(null);function mH(e){const t=UE({props:e,name:"MuiDateTimePickerToolbar"}),{ampm:n,ampmInClock:r,toolbarFormat:o,toolbarPlaceholder:i="––",toolbarTitle:a,className:s,classes:l}=t,c=il(t,sH),{value:u,setValue:d,disabled:f,readOnly:p,variant:h,orientation:m,view:g,setView:b,views:y}=ZR(),v=fA(),x=rA(),w=((e,t)=>{const{pickerOrientation:n,toolbarDirection:r}=t;return Na({root:["root"],dateContainer:["dateContainer"],timeContainer:["timeContainer","rtl"===r&&"timeLabelReverse"],timeDigitsContainer:["timeDigitsContainer","rtl"===r&&"timeLabelReverse"],separator:["separator"],ampmSelection:["ampmSelection","landscape"===n&&"ampmLandscape"],ampmLabel:["ampmLabel"]},iH,e)})(l,x),S=dA(),k=G.useContext(hH),C=k?k.value:u,M=k?k.setValue:d,P=k?k.view:g,T=k?k.setView:b,{meridiemMode:O,handleMeridiemChange:j}=Z$(C,n,e=>M(e,{changeImportance:"set",source:"view"})),_=k?.forceDesktopVariant?"desktop":h,D="desktop"===_,E=Boolean(n&&!r),R=a??v.dateTimePickerToolbarTitle,A=G.useMemo(()=>S.isValid(C)?o?S.formatByString(C,o):S.format(C,"shortDate"):i,[C,o,i,S]),I=(e,t)=>S.isValid(C)?S.format(C,e):t;return(0,le.jsxs)(lH,tr({className:Un(w.root,s),toolbarTitle:R,toolbarVariant:_},c,{ownerState:x,children:[(0,le.jsxs)(cH,{className:w.dateContainer,ownerState:x,children:[y.includes("year")&&(0,le.jsx)(KV,{tabIndex:-1,variant:"subtitle1",onClick:()=>T("year"),selected:"year"===P,value:I("year","–")}),y.includes("day")&&(0,le.jsx)(KV,{tabIndex:-1,variant:D?"h5":"h4",onClick:()=>T("day"),selected:"day"===P,value:A})]}),(0,le.jsxs)(uH,{className:w.timeContainer,ownerState:x,toolbarVariant:_,children:[(0,le.jsxs)(dH,{className:w.timeDigitsContainer,ownerState:x,toolbarVariant:_,children:[y.includes("hours")&&(0,le.jsxs)(G.Fragment,{children:[(0,le.jsx)(KV,{variant:D?"h5":"h3",width:D&&"portrait"===m?48:void 0,onClick:()=>T("hours"),selected:"hours"===P,value:I(n?"hours12h":"hours24h","--")}),(0,le.jsx)(fH,{variant:D?"h5":"h3",value:":",className:w.separator,ownerState:x,toolbarVariant:_}),(0,le.jsx)(KV,{variant:D?"h5":"h3",width:D&&"portrait"===m?48:void 0,onClick:()=>T("minutes"),selected:"minutes"===P||!y.includes("minutes")&&"hours"===P,value:I("minutes","--"),disabled:!y.includes("minutes")})]}),y.includes("seconds")&&(0,le.jsxs)(G.Fragment,{children:[(0,le.jsx)(fH,{variant:D?"h5":"h3",value:":",className:w.separator,ownerState:x,toolbarVariant:_}),(0,le.jsx)(KV,{variant:D?"h5":"h3",width:D&&"portrait"===m?48:void 0,onClick:()=>T("seconds"),selected:"seconds"===P,value:I("seconds","--")})]})]}),E&&!D&&(0,le.jsxs)(pH,{className:w.ampmSelection,ownerState:x,children:[(0,le.jsx)(KV,{variant:"subtitle2",selected:"am"===O,typographyClassName:w.ampmLabel,value:rR(S,"am"),onClick:p?void 0:()=>j("am"),disabled:f}),(0,le.jsx)(KV,{variant:"subtitle2",selected:"pm"===O,typographyClassName:w.ampmLabel,value:rR(S,"pm"),onClick:p?void 0:()=>j("pm"),disabled:f})]}),n&&D&&(0,le.jsx)(KV,{variant:"h5",onClick:()=>T("meridiem"),selected:"meridiem"===P,value:C&&O?rR(S,O):"--",width:48})]})]}))}function gH(e,t){const n=dA(),r=UE({props:e,name:t}),o=PW(r),i=r.ampm??n.is12HourCycleInCurrentLocale(),a=G.useMemo(()=>null==r.localeText?.toolbarTitle?r.localeText:tr({},r.localeText,{dateTimePickerToolbarTitle:r.localeText.toolbarTitle}),[r.localeText]),{openTo:s,views:l}=KE({views:r.views,openTo:r.openTo,defaultViews:["year","day","hours","minutes"],defaultOpenTo:"day"}),{shouldRenderTimeInASingleColumn:c,thresholdToRenderTimeInASingleColumn:u,views:d,timeSteps:f}=hW({thresholdToRenderTimeInASingleColumn:r.thresholdToRenderTimeInASingleColumn,ampm:i,timeSteps:r.timeSteps,views:l}),p=i?[...l,"meridiem"]:l;return tr({},r,o,{timeSteps:f,openTo:s,shouldRenderTimeInASingleColumn:c,thresholdToRenderTimeInASingleColumn:u,views:d,viewsForFormatting:p,ampm:i,localeText:a,orientation:r.orientation??"portrait",slots:tr({toolbar:mH,tabs:oH},r.slots),slotProps:tr({},r.slotProps,{toolbar:tr({ampm:i},r.slotProps?.toolbar)})})}const bH=G.forwardRef(function(e,t){const{toolbar:n,tabs:r,content:o,actionBar:i,shortcuts:a,ownerState:s}=kL(e),{orientation:l}=ZR(),{sx:c,className:u,classes:d}=e,f=i&&(i.props.actions?.length??0)>0;return(0,le.jsxs)(CL,{ref:t,className:Un(kF.root,d?.root,u),sx:[{[`& .${kF.tabs}`]:{gridRow:4,gridColumn:"1 / 4"},[`& .${kF.actionBar}`]:{gridRow:5}},...Array.isArray(c)?c:[c]],ownerState:s,children:["landscape"===l?a:n,"landscape"===l?n:a,(0,le.jsxs)(ML,{className:Un(kF.contentWrapper,d?.contentWrapper),ownerState:s,sx:{display:"grid"},children:[o,r,f&&(0,le.jsx)(SW,{sx:{gridRow:3,gridColumn:"1 / 4"}})]}),i]})}),yH=["openTo","focusedView","timeViewsCount"],vH=function(e){const{viewRenderers:t,popperView:n,rendererProps:r}=e,{openTo:o,focusedView:i,timeViewsCount:a}=r,s=tr({},il(r,yH),{autoFocus:!1,focusedView:null,sx:[{[`&.${QB.root}`]:{borderBottom:0},[`&.${QB.root}, .${ZB.root}, &.${WB.root}`]:{maxHeight:bL}}]}),l=dR(n),c=l?"day":n,u=l?n:"hours";return(0,le.jsxs)(G.Fragment,{children:[t[c]?.(tr({},r,{view:l?"day":n,focusedView:i&&iR(i)?i:null,views:r.views.filter(iR),sx:[{gridColumn:1},...s.sx]})),a>0&&(0,le.jsxs)(G.Fragment,{children:[(0,le.jsx)(SW,{orientation:"vertical",sx:{gridColumn:2}}),t[u]?.(tr({},s,{view:l?n:"hours",focusedView:i&&dR(i)?i:null,openTo:dR(o)?o:"hours",views:r.views.filter(dR),sx:[{gridColumn:3},...s.sx]}))]})]})},xH=G.forwardRef(function(e,t){const n=dA(),r=gH(e,"MuiDesktopDateTimePicker"),o=r.shouldRenderTimeInASingleColumn?cW:uW,i=tr({day:mV,month:mV,year:mV,hours:o,minutes:o,seconds:o,meridiem:o},r.viewRenderers),a=r.ampmInClock??!0,s=i.hours?.name===uW.name?r.views:r.views.filter(e=>"meridiem"!==e),l=tr({},r,{viewRenderers:i,format:fW(n,tr({},r,{views:r.viewsForFormatting})),views:s,yearsPerRow:r.yearsPerRow??4,ampmInClock:a,slots:tr({field:OW,layout:bH},r.slots),slotProps:tr({},r.slotProps,{field:e=>tr({},Is(r.slotProps?.field,e),jA(r)),toolbar:tr({hidden:!0,ampmInClock:a},r.slotProps?.toolbar),tabs:tr({hidden:!0},r.slotProps?.tabs)})}),{renderPicker:c}=_L({ref:t,props:l,valueManager:IR,valueType:"date-time",validator:kW,rendererInterceptor:vH,steps:null});return c()});xH.propTypes={ampm:GE.bool,ampmInClock:GE.bool,autoFocus:GE.bool,className:GE.string,closeOnSelect:GE.bool,dayOfWeekFormatter:GE.func,defaultValue:GE.object,disabled:GE.bool,disableFuture:GE.bool,disableHighlightToday:GE.bool,disableIgnoringDatePartForTimeValidation:GE.bool,disableOpenPicker:GE.bool,disablePast:GE.bool,displayWeekNumber:GE.bool,enableAccessibleFieldDOMStructure:GE.any,fixedWeekNumber:GE.number,format:GE.string,formatDensity:GE.oneOf(["dense","spacious"]),inputRef:XE,label:GE.node,loading:GE.bool,localeText:GE.object,maxDate:GE.object,maxDateTime:GE.object,maxTime:GE.object,minDate:GE.object,minDateTime:GE.object,minTime:GE.object,minutesStep:GE.number,monthsPerRow:GE.oneOf([3,4]),name:GE.string,onAccept:GE.func,onChange:GE.func,onClose:GE.func,onError:GE.func,onMonthChange:GE.func,onOpen:GE.func,onSelectedSectionsChange:GE.func,onViewChange:GE.func,onYearChange:GE.func,open:GE.bool,openTo:GE.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),orientation:GE.oneOf(["landscape","portrait"]),readOnly:GE.bool,reduceAnimations:GE.bool,referenceDate:GE.object,renderLoading:GE.func,selectedSections:GE.oneOfType([GE.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),GE.number]),shouldDisableDate:GE.func,shouldDisableMonth:GE.func,shouldDisableTime:GE.func,shouldDisableYear:GE.func,showDaysOutsideCurrentMonth:GE.bool,skipDisabled:GE.bool,slotProps:GE.object,slots:GE.object,sx:GE.oneOfType([GE.arrayOf(GE.oneOfType([GE.func,GE.object,GE.bool])),GE.func,GE.object]),thresholdToRenderTimeInASingleColumn:GE.number,timeSteps:GE.shape({hours:GE.number,minutes:GE.number,seconds:GE.number}),timezone:GE.string,value:GE.object,view:GE.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),viewRenderers:GE.shape({day:GE.func,hours:GE.func,meridiem:GE.func,minutes:GE.func,month:GE.func,seconds:GE.func,year:GE.func}),views:GE.arrayOf(GE.oneOf(["day","hours","minutes","month","seconds","year"]).isRequired),yearsOrder:GE.oneOf(["asc","desc"]),yearsPerRow:GE.oneOf([3,4])};const wH=[{views:oR},{views:lR}],SH=G.forwardRef(function(e,t){const n=dA(),r=gH(e,"MuiMobileDateTimePicker"),o=r.shouldRenderTimeInASingleColumn?cW:uW,i=tr({day:mV,month:mV,year:mV,hours:o,minutes:o,seconds:o,meridiem:o},r.viewRenderers),a=r.ampmInClock??!1,s=i.hours?.name===uW.name?r.views:r.views.filter(e=>"meridiem"!==e),l=tr({},r,{viewRenderers:i,format:fW(n,tr({},r,{views:r.viewsForFormatting})),views:s,ampmInClock:a,slots:tr({field:OW},r.slots),slotProps:tr({},r.slotProps,{field:e=>tr({},Is(r.slotProps?.field,e),jA(r)),toolbar:tr({hidden:!1,ampmInClock:a},r.slotProps?.toolbar),tabs:tr({hidden:!1},r.slotProps?.tabs),layout:tr({},r.slotProps?.layout,{sx:oF([{[`& .${QB.root}`]:{width:gL},[`& .${ZB.root}`]:{flex:1,maxHeight:335,[`.${ZB.item}`]:{width:"auto"}},[`& .${WB.root}`]:{width:gL,maxHeight:bL,flex:1,[`.${WB.item}`]:{justifyContent:"center"}}}],r.slotProps?.layout?.sx)})})}),{renderPicker:c}=AV({ref:t,props:l,valueManager:IR,valueType:"date-time",validator:kW,steps:wH});return c()});SH.propTypes={ampm:GE.bool,ampmInClock:GE.bool,autoFocus:GE.bool,className:GE.string,closeOnSelect:GE.bool,dayOfWeekFormatter:GE.func,defaultValue:GE.object,disabled:GE.bool,disableFuture:GE.bool,disableHighlightToday:GE.bool,disableIgnoringDatePartForTimeValidation:GE.bool,disableOpenPicker:GE.bool,disablePast:GE.bool,displayWeekNumber:GE.bool,enableAccessibleFieldDOMStructure:GE.any,fixedWeekNumber:GE.number,format:GE.string,formatDensity:GE.oneOf(["dense","spacious"]),inputRef:XE,label:GE.node,loading:GE.bool,localeText:GE.object,maxDate:GE.object,maxDateTime:GE.object,maxTime:GE.object,minDate:GE.object,minDateTime:GE.object,minTime:GE.object,minutesStep:GE.number,monthsPerRow:GE.oneOf([3,4]),name:GE.string,onAccept:GE.func,onChange:GE.func,onClose:GE.func,onError:GE.func,onMonthChange:GE.func,onOpen:GE.func,onSelectedSectionsChange:GE.func,onViewChange:GE.func,onYearChange:GE.func,open:GE.bool,openTo:GE.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),orientation:GE.oneOf(["landscape","portrait"]),readOnly:GE.bool,reduceAnimations:GE.bool,referenceDate:GE.object,renderLoading:GE.func,selectedSections:GE.oneOfType([GE.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),GE.number]),shouldDisableDate:GE.func,shouldDisableMonth:GE.func,shouldDisableTime:GE.func,shouldDisableYear:GE.func,showDaysOutsideCurrentMonth:GE.bool,skipDisabled:GE.bool,slotProps:GE.object,slots:GE.object,sx:GE.oneOfType([GE.arrayOf(GE.oneOfType([GE.func,GE.object,GE.bool])),GE.func,GE.object]),thresholdToRenderTimeInASingleColumn:GE.number,timeSteps:GE.shape({hours:GE.number,minutes:GE.number,seconds:GE.number}),timezone:GE.string,value:GE.object,view:GE.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),viewRenderers:GE.shape({day:GE.func,hours:GE.func,meridiem:GE.func,minutes:GE.func,month:GE.func,seconds:GE.func,year:GE.func}),views:GE.arrayOf(GE.oneOf(["day","hours","minutes","month","seconds","year"]).isRequired),yearsOrder:GE.oneOf(["asc","desc"]),yearsPerRow:GE.oneOf([3,4])};const kH=["desktopModeMediaQuery"],CH=G.forwardRef(function(e,t){const n=UE({props:e,name:"MuiDateTimePicker"}),{desktopModeMediaQuery:r=rF}=n,o=il(n,kH);return YE(r,{defaultMatches:!0})?(0,le.jsx)(xH,tr({ref:t},o)):(0,le.jsx)(SH,tr({ref:t},o))});function MH(e,t,n){const r=Fd(e,n?.in);return isNaN(t)?Id(n?.in||e,NaN):t?(r.setDate(r.getDate()+t),r):r}function PH(e,t,n){return Id(n?.in||e,+Fd(e)+t)}function TH(e,t,n){const r=Fd(e,n?.in);if(isNaN(t))return Id(n?.in||e,NaN);if(!t)return r;const o=r.getDate(),i=Id(n?.in||e,r.getTime());return i.setMonth(r.getMonth()+t+1,0),o>=i.getDate()?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}function OH(e,t){const n=Fd(e,t?.in);return n.setHours(23,59,59,999),n}function jH(e,t){const n=Fd(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function _H(e,t){const n=Fd(e,t?.in),r=n.getFullYear(),o=n.getMonth(),i=Id(n,0);return i.setFullYear(r,o+1,0),i.setHours(0,0,0,0),i.getDate()}function DH(e,t){return+Fd(e)>+Fd(t)}function EH(e,t){return+Fd(e)<+Fd(t)}function RH(e,t){const n=Fd(e,t?.in);return n.setMinutes(0,0,0),n}class AH{subPriority=0;validate(e,t){return!0}}class IH extends AH{constructor(e,t,n,r,o){super(),this.value=e,this.validateValue=t,this.setValue=n,this.priority=r,o&&(this.subPriority=o)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,n){return this.setValue(e,t,this.value,n)}}class FH extends AH{priority=10;subPriority=-1;constructor(e,t){super(),this.context=e||(e=>Id(t,e))}set(e,t){return t.timestampIsSet?e:Id(e,function(e,t){const n=function(e){return"function"==typeof e&&e.prototype?.constructor===e}(t)?new t(0):Id(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}(e,this.context))}}class LH{run(e,t,n,r){const o=this.parse(e,t,n,r);return o?{setter:new IH(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(e,t,n){return!0}}const NH=/^(1[0-2]|0?\d)/,zH=/^(3[0-1]|[0-2]?\d)/,$H=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,VH=/^(5[0-3]|[0-4]?\d)/,BH=/^(2[0-3]|[0-1]?\d)/,WH=/^(2[0-4]|[0-1]?\d)/,HH=/^(1[0-1]|0?\d)/,qH=/^(1[0-2]|0?\d)/,YH=/^[0-5]?\d/,UH=/^[0-5]?\d/,GH=/^\d/,XH=/^\d{1,2}/,QH=/^\d{1,3}/,KH=/^\d{1,4}/,ZH=/^-?\d+/,JH=/^-?\d/,eq=/^-?\d{1,2}/,tq=/^-?\d{1,3}/,nq=/^-?\d{1,4}/,rq=/^([+-])(\d{2})(\d{2})?|Z/,oq=/^([+-])(\d{2})(\d{2})|Z/,iq=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,aq=/^([+-])(\d{2}):(\d{2})|Z/,sq=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function lq(e,t){return e?{value:t(e.value),rest:e.rest}:e}function cq(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function uq(e,t){const n=t.match(e);if(!n)return null;if("Z"===n[0])return{value:0,rest:t.slice(1)};const r="+"===n[1]?1:-1,o=n[2]?parseInt(n[2],10):0,i=n[3]?parseInt(n[3],10):0,a=n[5]?parseInt(n[5],10):0;return{value:r*(o*Rd+6e4*i+1e3*a),rest:t.slice(n[0].length)}}function dq(e){return cq(ZH,e)}function fq(e,t){switch(e){case 1:return cq(GH,t);case 2:return cq(XH,t);case 3:return cq(QH,t);case 4:return cq(KH,t);default:return cq(new RegExp("^\\d{1,"+e+"}"),t)}}function pq(e,t){switch(e){case 1:return cq(JH,t);case 2:return cq(eq,t);case 3:return cq(tq,t);case 4:return cq(nq,t);default:return cq(new RegExp("^-?\\d{1,"+e+"}"),t)}}function hq(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function mq(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const t=r+50;o=e+100*Math.trunc(t/100)-(e>=t%100?100:0)}return n?o:1-o}function gq(e){return e%400==0||e%4==0&&e%100!=0}const bq=[31,28,31,30,31,30,31,31,30,31,30,31],yq=[31,29,31,30,31,30,31,31,30,31,30,31];function vq(e,t,n){const r=Dd(),o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=Fd(e,n?.in),a=i.getDay(),s=7-o;return MH(i,t<0||t>6?t-(a+s)%7:((t%7+7)%7+s)%7-(a+s)%7,n)}function xq(e,t,n){const r=Fd(e,n?.in);return MH(r,t-function(e,t){const n=Fd(e,t?.in).getDay();return 0===n?7:n}(r,n),n)}const wq={G:new class extends LH{priority=140;parse(e,t,n){switch(t){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}}set(e,t,n){return t.era=n,e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]},y:new class extends LH{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,t,n){const r=e=>({year:e,isTwoDigitYear:"yy"===t});switch(t){case"y":return lq(fq(4,e),r);case"yo":return lq(n.ordinalNumber(e,{unit:"year"}),r);default:return lq(fq(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n){const r=e.getFullYear();if(n.isTwoDigitYear){const t=mq(n.year,r);return e.setFullYear(t,0,1),e.setHours(0,0,0,0),e}const o="era"in t&&1!==t.era?1-n.year:n.year;return e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}},Y:new class extends LH{priority=130;parse(e,t,n){const r=e=>({year:e,isTwoDigitYear:"YY"===t});switch(t){case"Y":return lq(fq(4,e),r);case"Yo":return lq(n.ordinalNumber(e,{unit:"year"}),r);default:return lq(fq(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n,r){const o=Yd(e,r);if(n.isTwoDigitYear){const t=mq(n.year,o);return e.setFullYear(t,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),Bd(e,r)}const i="era"in t&&1!==t.era?1-n.year:n.year;return e.setFullYear(i,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),Bd(e,r)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:new class extends LH{priority=130;parse(e,t){return pq("R"===t?4:t.length,e)}set(e,t,n){const r=Id(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Wd(r)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:new class extends LH{priority=130;parse(e,t){return pq("u"===t?4:t.length,e)}set(e,t,n){return e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]},Q:new class extends LH{priority=120;parse(e,t,n){switch(t){case"Q":case"QQ":return fq(t.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth(3*(n-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:new class extends LH{priority=120;parse(e,t,n){switch(t){case"q":case"qq":return fq(t.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth(3*(n-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:new class extends LH{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,t,n){const r=e=>e-1;switch(t){case"M":return lq(cq(NH,e),r);case"MM":return lq(fq(2,e),r);case"Mo":return lq(n.ordinalNumber(e,{unit:"month"}),r);case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}},L:new class extends LH{priority=110;parse(e,t,n){const r=e=>e-1;switch(t){case"L":return lq(cq(NH,e),r);case"LL":return lq(fq(2,e),r);case"Lo":return lq(n.ordinalNumber(e,{unit:"month"}),r);case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:new class extends LH{priority=100;parse(e,t,n){switch(t){case"w":return cq(VH,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return fq(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n,r){return Bd(function(e,t,n){const r=Fd(e,n?.in),o=Ud(r,n)-t;return r.setDate(r.getDate()-7*o),Fd(r,n?.in)}(e,n,r),r)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:new class extends LH{priority=100;parse(e,t,n){switch(t){case"I":return cq(VH,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return fq(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n){return Wd(function(e,t,n){const r=Fd(e,n?.in),o=qd(r,n)-t;return r.setDate(r.getDate()-7*o),r}(e,n))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:new class extends LH{priority=90;subPriority=1;parse(e,t,n){switch(t){case"d":return cq(zH,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return fq(t.length,e)}}validate(e,t){const n=gq(e.getFullYear()),r=e.getMonth();return n?t>=1&&t<=yq[r]:t>=1&&t<=bq[r]}set(e,t,n){return e.setDate(n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:new class extends LH{priority=90;subpriority=1;parse(e,t,n){switch(t){case"D":case"DD":return cq($H,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return fq(t.length,e)}}validate(e,t){return gq(e.getFullYear())?t>=1&&t<=366:t>=1&&t<=365}set(e,t,n){return e.setMonth(0,n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:new class extends LH{priority=90;parse(e,t,n){switch(t){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=vq(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]},e:new class extends LH{priority=90;parse(e,t,n,r){const o=e=>{const t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return lq(fq(t.length,e),o);case"eo":return lq(n.ordinalNumber(e,{unit:"day"}),o);case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=vq(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:new class extends LH{priority=90;parse(e,t,n,r){const o=e=>{const t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return lq(fq(t.length,e),o);case"co":return lq(n.ordinalNumber(e,{unit:"day"}),o);case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=vq(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:new class extends LH{priority=90;parse(e,t,n){const r=e=>0===e?7:e;switch(t){case"i":case"ii":return fq(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return lq(n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiii":return lq(n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiiii":return lq(n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);default:return lq(n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r)}}validate(e,t){return t>=1&&t<=7}set(e,t,n){return(e=xq(e,n)).setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:new class extends LH{priority=80;parse(e,t,n){switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(hq(n),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]},b:new class extends LH{priority=80;parse(e,t,n){switch(t){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(hq(n),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]},B:new class extends LH{priority=80;parse(e,t,n){switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(hq(n),0,0,0),e}incompatibleTokens=["a","b","t","T"]},h:new class extends LH{priority=70;parse(e,t,n){switch(t){case"h":return cq(qH,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return fq(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,n){const r=e.getHours()>=12;return r&&n<12?e.setHours(n+12,0,0,0):r||12!==n?e.setHours(n,0,0,0):e.setHours(0,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]},H:new class extends LH{priority=70;parse(e,t,n){switch(t){case"H":return cq(BH,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return fq(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,n){return e.setHours(n,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]},K:new class extends LH{priority=70;parse(e,t,n){switch(t){case"K":return cq(HH,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return fq(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.getHours()>=12&&n<12?e.setHours(n+12,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]},k:new class extends LH{priority=70;parse(e,t,n){switch(t){case"k":return cq(WH,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return fq(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,n){const r=n<=24?n%24:n;return e.setHours(r,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]},m:new class extends LH{priority=60;parse(e,t,n){switch(t){case"m":return cq(YH,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return fq(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setMinutes(n,0,0),e}incompatibleTokens=["t","T"]},s:new class extends LH{priority=50;parse(e,t,n){switch(t){case"s":return cq(UH,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return fq(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setSeconds(n,0),e}incompatibleTokens=["t","T"]},S:new class extends LH{priority=30;parse(e,t){return lq(fq(t.length,e),e=>Math.trunc(e*Math.pow(10,3-t.length)))}set(e,t,n){return e.setMilliseconds(n),e}incompatibleTokens=["t","T"]},X:new class extends LH{priority=10;parse(e,t){switch(t){case"X":return uq(rq,e);case"XX":return uq(oq,e);case"XXXX":return uq(iq,e);case"XXXXX":return uq(sq,e);default:return uq(aq,e)}}set(e,t,n){return t.timestampIsSet?e:Id(e,e.getTime()-Ld(e)-n)}incompatibleTokens=["t","T","x"]},x:new class extends LH{priority=10;parse(e,t){switch(t){case"x":return uq(rq,e);case"xx":return uq(oq,e);case"xxxx":return uq(iq,e);case"xxxxx":return uq(sq,e);default:return uq(aq,e)}}set(e,t,n){return t.timestampIsSet?e:Id(e,e.getTime()-Ld(e)-n)}incompatibleTokens=["t","T","X"]},t:new class extends LH{priority=40;parse(e){return dq(e)}set(e,t,n){return[Id(e,1e3*n),{timestampIsSet:!0}]}incompatibleTokens="*"},T:new class extends LH{priority=20;parse(e){return dq(e)}set(e,t,n){return[Id(e,n),{timestampIsSet:!0}]}incompatibleTokens="*"}},Sq=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,kq=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Cq=/^'([^]*?)'?$/,Mq=/''/g,Pq=/\S/,Tq=/[a-zA-Z]/;function Oq(e,t,n,r){const o=()=>Id(r?.in||n,NaN),i=Object.assign({},Dd()),a=r?.locale??i.locale??jd,s=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,l=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0;if(!t)return e?o():Fd(n,r?.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:a},u=[new FH(r?.in,n)],d=t.match(kq).map(e=>{const t=e[0];return t in nf?(0,nf[t])(e,a.formatLong):e}).join("").match(Sq),f=[];for(let n of d){!r?.useAdditionalWeekYearTokens&&lf(n)&&cf(n,t,e),!r?.useAdditionalDayOfYearTokens&&sf(n)&&cf(n,t,e);const i=n[0],s=wq[i];if(s){const{incompatibleTokens:t}=s;if(Array.isArray(t)){const e=f.find(e=>t.includes(e.token)||e.token===i);if(e)throw new RangeError(`The format string mustn't contain \`${e.fullToken}\` and \`${n}\` at the same time`)}else if("*"===s.incompatibleTokens&&f.length>0)throw new RangeError(`The format string mustn't contain \`${n}\` and any other token at the same time`);f.push({token:i,fullToken:n});const r=s.run(e,n,a.match,c);if(!r)return o();u.push(r.setter),e=r.rest}else{if(i.match(Tq))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");if("''"===n?n="'":"'"===i&&(n=jq(n)),0!==e.indexOf(n))return o();e=e.slice(n.length)}}if(e.length>0&&Pq.test(e))return o();const p=u.map(e=>e.priority).sort((e,t)=>t-e).filter((e,t,n)=>n.indexOf(e)===t).map(e=>u.filter(t=>t.priority===e).sort((e,t)=>t.subPriority-e.subPriority)).map(e=>e[0]);let h=Fd(n,r?.in);if(isNaN(+h))return o();const m={};for(const e of p){if(!e.validate(h,c))return o();const t=e.set(h,m,c);Array.isArray(t)?(h=t[0],Object.assign(m,t[1])):h=t}return h}function jq(e){return e.match(Cq)[1].replace(Mq,"'")}const _q={y:{sectionType:"year",contentType:"digit",maxLength:4},yy:"year",yyy:{sectionType:"year",contentType:"digit",maxLength:4},yyyy:"year",M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMMM:{sectionType:"month",contentType:"letter"},MMM:{sectionType:"month",contentType:"letter"},L:{sectionType:"month",contentType:"digit",maxLength:2},LL:"month",LLL:{sectionType:"month",contentType:"letter"},LLLL:{sectionType:"month",contentType:"letter"},d:{sectionType:"day",contentType:"digit",maxLength:2},dd:"day",do:{sectionType:"day",contentType:"digit-with-letter"},E:{sectionType:"weekDay",contentType:"letter"},EE:{sectionType:"weekDay",contentType:"letter"},EEE:{sectionType:"weekDay",contentType:"letter"},EEEE:{sectionType:"weekDay",contentType:"letter"},EEEEE:{sectionType:"weekDay",contentType:"letter"},i:{sectionType:"weekDay",contentType:"digit",maxLength:1},ii:"weekDay",iii:{sectionType:"weekDay",contentType:"letter"},iiii:{sectionType:"weekDay",contentType:"letter"},e:{sectionType:"weekDay",contentType:"digit",maxLength:1},ee:"weekDay",eee:{sectionType:"weekDay",contentType:"letter"},eeee:{sectionType:"weekDay",contentType:"letter"},eeeee:{sectionType:"weekDay",contentType:"letter"},eeeeee:{sectionType:"weekDay",contentType:"letter"},c:{sectionType:"weekDay",contentType:"digit",maxLength:1},cc:"weekDay",ccc:{sectionType:"weekDay",contentType:"letter"},cccc:{sectionType:"weekDay",contentType:"letter"},ccccc:{sectionType:"weekDay",contentType:"letter"},cccccc:{sectionType:"weekDay",contentType:"letter"},a:"meridiem",aa:"meridiem",aaa:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},Dq={year:"yyyy",month:"LLLL",monthShort:"MMM",dayOfMonth:"d",dayOfMonthFull:"do",weekday:"EEEE",weekdayShort:"EEEEEE",hours24h:"HH",hours12h:"hh",meridiem:"aa",minutes:"mm",seconds:"ss",fullDate:"PP",keyboardDate:"P",shortDate:"MMM d",normalDate:"d MMMM",normalDateWithWeekday:"EEE, MMM d",fullTime12h:"hh:mm aa",fullTime24h:"HH:mm",keyboardDateTime12h:"P hh:mm aa",keyboardDateTime24h:"P HH:mm"};class Eq{isMUIAdapter=!0;isTimezoneCompatible=!1;formatTokenMap=(()=>_q)();escapedCharacters={start:"'",end:"'"};constructor(e){const{locale:t,formats:n,longFormatters:r,lib:o}=e;this.locale=t,this.formats=tr({},Dq,n),this.longFormatters=r,this.lib=o||"date-fns"}date=e=>void 0===e?new Date:null===e?null:new Date(e);getInvalidDate=()=>new Date("Invalid Date");getTimezone=()=>"default";setTimezone=e=>e;toJsDate=e=>e;getCurrentLocaleCode=()=>this.locale.code;is12HourCycleInCurrentLocale=()=>/a/.test(this.locale.formatLong.time({width:"short"}));expandFormat=e=>e.match(/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g).map(e=>{const t=e[0];return"p"===t||"P"===t?(0,this.longFormatters[t])(e,this.locale.formatLong):e}).join("");formatNumber=e=>e;getDayOfWeek=e=>e.getDay()+1}class Rq extends Eq{constructor({locale:e,formats:t}={}){super({locale:e??jd,formats:t,longFormatters:nf})}parse=(e,t)=>""===e?null:Oq(e,t,new Date,{locale:this.locale});isValid=e=>null!=e&&uf(e);format=(e,t)=>this.formatByString(e,this.formats[t]);formatByString=(e,t)=>gf(e,t,{locale:this.locale});isEqual=(e,t)=>{return null===e&&null===t||null!==e&&null!==t&&(n=t,+Fd(e)===+Fd(n));var n};isSameYear=(e,t)=>function(e,t,n){const[r,o]=Nd(n?.in,e,t);return r.getFullYear()===o.getFullYear()}(e,t);isSameMonth=(e,t)=>function(e,t,n){const[r,o]=Nd(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}(e,t);isSameDay=(e,t)=>function(e,t,n){const[r,o]=Nd(n?.in,e,t);return+zd(r)===+zd(o)}(e,t);isSameHour=(e,t)=>function(e,t,n){const[r,o]=Nd(n?.in,e,t);return+RH(r)===+RH(o)}(e,t);isAfter=(e,t)=>DH(e,t);isAfterYear=(e,t)=>DH(e,jH(t));isAfterDay=(e,t)=>DH(e,OH(t));isBefore=(e,t)=>EH(e,t);isBeforeYear=(e,t)=>EH(e,this.startOfYear(t));isBeforeDay=(e,t)=>EH(e,this.startOfDay(t));isWithinRange=(e,[t,n])=>function(e,t,n){const r=+Fd(e,n?.in),[o,i]=[+Fd(t.start,n?.in),+Fd(t.end,n?.in)].sort((e,t)=>e-t);return r>=o&&r<=i}(e,{start:t,end:n});startOfYear=e=>$d(e);startOfMonth=e=>function(e,t){const n=Fd(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}(e);startOfWeek=e=>Bd(e,{locale:this.locale});startOfDay=e=>zd(e);endOfYear=e=>jH(e);endOfMonth=e=>function(e,t){const n=Fd(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}(e);endOfWeek=e=>function(e,t){const n=Dd(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Fd(e,t?.in),i=o.getDay(),a=6+(i<r?-7:0)-(i-r);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}(e,{locale:this.locale});endOfDay=e=>OH(e);addYears=(e,t)=>function(e,t,n){return TH(e,12*t,n)}(e,t);addMonths=(e,t)=>TH(e,t);addWeeks=(e,t)=>function(e,t,n){return MH(e,7*t,n)}(e,t);addDays=(e,t)=>MH(e,t);addHours=(e,t)=>function(e,t,n){return PH(e,t*Rd,n)}(e,t);addMinutes=(e,t)=>function(e,t,n){const r=Fd(e,n?.in);return r.setTime(r.getTime()+6e4*t),r}(e,t);addSeconds=(e,t)=>function(e,t,n){return PH(e,1e3*t,n)}(e,t);getYear=e=>function(e,t){return Fd(e,t?.in).getFullYear()}(e);getMonth=e=>function(e,t){return Fd(e,t?.in).getMonth()}(e);getDate=e=>function(e,t){return Fd(e,t?.in).getDate()}(e);getHours=e=>function(e,t){return Fd(e,t?.in).getHours()}(e);getMinutes=e=>function(e,t){return Fd(e,t?.in).getMinutes()}(e);getSeconds=e=>function(e){return Fd(e).getSeconds()}(e);getMilliseconds=e=>function(e){return Fd(e).getMilliseconds()}(e);setYear=(e,t)=>function(e,t,n){const r=Fd(e,n?.in);return isNaN(+r)?Id(n?.in||e,NaN):(r.setFullYear(t),r)}(e,t);setMonth=(e,t)=>function(e,t,n){const r=Fd(e,n?.in),o=r.getFullYear(),i=r.getDate(),a=Id(n?.in||e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const s=_H(a);return r.setMonth(t,Math.min(i,s)),r}(e,t);setDate=(e,t)=>function(e,t,n){const r=Fd(e,n?.in);return r.setDate(t),r}(e,t);setHours=(e,t)=>function(e,t,n){const r=Fd(e,n?.in);return r.setHours(t),r}(e,t);setMinutes=(e,t)=>function(e,t,n){const r=Fd(e,n?.in);return r.setMinutes(t),r}(e,t);setSeconds=(e,t)=>function(e,t,n){const r=Fd(e,n?.in);return r.setSeconds(t),r}(e,t);setMilliseconds=(e,t)=>function(e,t,n){const r=Fd(e,n?.in);return r.setMilliseconds(t),r}(e,t);getDaysInMonth=e=>_H(e);getWeekArray=e=>{const t=this.startOfWeek(this.startOfMonth(e)),n=this.endOfWeek(this.endOfMonth(e));let r=0,o=t;const i=[];for(;this.isBefore(o,n);){const e=Math.floor(r/7);i[e]=i[e]||[],i[e].push(o),o=this.addDays(o,1),r+=1}return i};getWeekNumber=e=>Ud(e,{locale:this.locale});getYearRange=([e,t])=>{const n=this.startOfYear(e),r=this.endOfYear(t),o=[];let i=n;for(;this.isBefore(i,r);)o.push(i),i=this.addYears(i,1);return o}}const Aq={code:"en-GB",formatDistance:vd,formatLong:{date:xd({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:xd({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:xd({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},formatRelative:kd,localize:Md,match:Td,options:{weekStartsOn:1,firstWeekContainsDate:4}},Iq=Ce("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);function Fq(e){return Fq="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fq(e)}function Lq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Nq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lq(Object(n),!0).forEach(function(t){zq(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lq(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function zq(e,t,n){return(t=function(e){var t=function(e){if("object"!=Fq(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Fq(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Fq(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $q(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Vq(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Vq(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vq(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Bq=new Date("1901-01-01"),Wq=new Date("2099-12-31"),Hq="Please enter a valid date",qq="From date must be earlier than To date",Yq=function(e){var t,n=e.subFieldType,r=e.isRange,o=e.value,i=e.onChange,a=e.disabled,s=void 0!==a&&a,l=$q(o,2),c=l[0],u=void 0===c?"":c,d=l[1],f=void 0===d?"":d,p=$q((0,G.useState)(u?new Date(u):null),2),h=p[0],m=p[1],g=$q((0,G.useState)(f?new Date(f):null),2),b=g[0],y=g[1],v=r&&h&&b&&h>b,x=$q((0,G.useState)(v?qq:null),2),w=x[0],S=x[1],k=(0,G.useId)(),C=null!==(t={date:LV,time:yW,datetime:CH}[n])&&void 0!==t?t:CH,M={size:"small",sx:{width:"100%","& .MuiPickersInputBase-root":{fontSize:"14px"}}},P=function(e){return"date"===n?e.toISOString().split("T")[0]:e.toISOString()},T=function(){return"datetime"===n?{start:{minDateTime:Bq,maxDateTime:Wq},end:{minDateTime:null!=h?h:Bq,maxDateTime:Wq}}:"date"===n?{start:{minDate:Bq,maxDate:Wq},end:{minDate:null!=h?h:Bq,maxDate:Wq}}:{start:{},end:{}}},O=function(e){if(!e)return S(null);S(r&&"invalidDate"!==e?qq:Hq)},j=function(e){return e>=Bq&&e<=Wq};return(0,le.jsxs)(UR,{dateAdapter:Rq,adapterLocale:Aq,children:[(0,le.jsx)(fs,{sx:{m:1,width:"100%"},size:"small",children:(0,le.jsx)(C,Nq({disabled:s,label:r?"From":"Value",value:h,onChange:r?function(e){m(e),e&&j(e)&&(b&&e>b?S(qq):(S(null),b&&e<=b&&i([P(e),P(b)])))}:function(e){m(e),e&&j(e)&&(S(null),i([P(e)]))},onError:O,slotProps:{textField:Nq(Nq({},M),{},{error:!!w,inputProps:{"aria-describedby":k},onBlur:function(){h||S(Hq)}})}},T().start))}),r&&(0,le.jsx)(fs,{sx:{m:1,width:"100%"},size:"small",children:(0,le.jsx)(C,Nq({disabled:s,label:"To",value:b,onChange:function(e){y(e),e&&j(e)&&(h&&h>e?S(qq):(S(null),h&&h<=e&&i([P(h),P(e)])))},onError:O,slotProps:{textField:Nq(Nq({},M),{},{error:!!w,inputProps:{"aria-describedby":k},onBlur:function(){b||S(Hq)}})}},T().end))}),w&&(0,le.jsxs)("p",{id:k,role:"alert","aria-live":"polite",className:"dashboard-filter-panel-popup-filter-option--error",children:[(0,le.jsx)(Iq,{size:12}),w]})]})};const Uq=ls("MuiBox",["root"]),Gq=Oa(),Xq=function(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:o}=e,i=cr("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(jo);return G.forwardRef(function(e,a){const s=Ro(n),{className:l,component:c="div",...u}=Xc(e);return(0,le.jsx)(i,{as:c,ref:a,className:Un(l,o?o(r):r),theme:t&&s[t]||s,...u})})}({themeId:zo,defaultTheme:Gq,defaultClassName:Uq.root,generateClassName:is.generate}),Qq=Xq;var Kq=function(e){var t=e.className;return(0,le.jsx)("div",{className:be()("loading-spinner",[t]),"aria-label":"Loading spinner",role:"img",children:(0,le.jsxs)("div",{className:"loading-spinner__inner",role:"presentation",children:[(0,le.jsx)("div",{className:"loading-spinner__circle loading-spinner__circle-left",role:"presentation"}),(0,le.jsx)("div",{className:"loading-spinner__circle loading-spinner__circle-top",role:"presentation"}),(0,le.jsx)("div",{className:"loading-spinner__circle loading-spinner__circle-right",role:"presentation"}),(0,le.jsx)("div",{className:"loading-spinner__circle loading-spinner__circle-bottom",role:"presentation"})]})})},Zq=function(e){var t=e.dimension,n=e.title,r=e.value,o=e.filterValues,i=e.isMultiSelect,a=e.onChange,s=e.disabled,l=void 0!==s&&s,c=e.isLoading;return void 0!==c&&c?(0,le.jsxs)("div",{className:"dashboard-filter-panel-popup-filter-dropdown-loading",children:[(0,le.jsx)(Kq,{className:"dashboard-filter-panel-popup-filter-dropdown-loading-spinner"}),(0,le.jsx)("span",{className:"dashboard-filter-panel-popup-filter-dropdown-loading-text",children:"Loading values..."})]}):(0,le.jsxs)(fs,{sx:{m:1,width:"100%"},size:"small",children:[(0,le.jsx)(Ms,{id:"filter-input-label-".concat(t,"-value"),sx:{fontSize:"16px"},children:"Value"}),(0,le.jsx)(Au,{disabled:l,labelId:"filter-input-label-".concat(t,"-value"),value:r,onChange:function(e){a(Array.isArray(e.target.value)?e.target.value:[e.target.value])},multiple:i,input:(0,le.jsx)(Ou,{id:"select-multiple-value-".concat(n),label:"Value",sx:{fontSize:"14px"}}),renderValue:function(e){return(0,le.jsx)(Qq,{sx:{display:"flex",overflow:"ellipsis",gap:.5},children:Array.isArray(e)?e.map(function(t,n){if(!(n>1||""===t))return(0,le.jsx)(mL,{label:0===n?t:"+"+(e.length-1),style:{maxHeight:20}},t)}):e&&(0,le.jsx)(mL,{label:e,style:{maxHeight:20}},e)})},children:o.map(function(e,t){return(0,le.jsx)(ud,{value:e,children:e},t)})})]})};function Jq(e){return Jq="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jq(e)}function eY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eY(Object(n),!0).forEach(function(t){nY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function nY(e,t,n){return(t=function(e){var t=function(e){if("object"!=Jq(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Jq(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Jq(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rY(e){return function(e){if(Array.isArray(e))return aY(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||iY(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function oY(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||iY(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function iY(e,t){if(e){if("string"==typeof e)return aY(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?aY(e,t):void 0}}function aY(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var sY=function(e){var t,n,r,o,i=e.filters,a=e.filter,s=e.updateFilters,l=e.filterCache,c=e.lockFilter,u=e.isDisabled,d=void 0!==u&&u,f=e.filterValuesQuery,p=oY((0,G.useState)(a),2),h=p[0],m=p[1],g=oY((0,G.useState)(a.dimension),2),b=g[0],y=g[1],v=oY((0,G.useState)(a.currentOperator),2),x=v[0],w=v[1],S=oY((0,G.useState)(a.currentValues),2),k=S[0],C=S[1],M=oY((0,G.useState)(!1),2),P=M[0],T=M[1],O=oY((0,G.useState)([]),2),j=O[0],_=O[1],D=structuredClone(l).sort(function(e,t){var n;return null===(n=e.title)||void 0===n?void 0:n.localeCompare(t.title)}),E=null===(t=(0,G.useContext)(AE))||void 0===t?void 0:t.lockedFilters,R=null===(n=(0,G.useContext)(AE))||void 0===n?void 0:n.filterValuesQuery,A=f||R;if(!A)throw new Error("No URL for fetching filter values");var I=["date","time","datetime"].includes(null!==(r=h.subFieldType)&&void 0!==r?r:""),F=qe({queryKey:["filterValues",b],queryFn:function(){return zE(A.url+"/"+b,{},{authToken:A.authToken})},enabled:!I}),L=F.data,N=F.isLoading;(0,G.useEffect)(function(){try{if(L){var e=L.sort(function(e,t){return e.localeCompare(t)}),t=[].concat(rY(k.filter(function(t){return e.includes(t)}).sort(function(e,t){return e.localeCompare(t)})),rY(e.filter(function(e){return!k.includes(e)})));_(t)}}catch(e){console.error("Error fetching filter values for dimension "+b,e),_([])}},[L,b,k]),(0,G.useEffect)(function(){if(E&&E.length>0){var e=E.some(function(e){return e.dimension===h.dimension});T(e)}},[E,h.dimension]),(0,G.useEffect)(function(){w(h.currentOperator),C(h.currentValues)},[h]);var z=function(e){s(function(t){return t.map(function(t){return t.dimension===e?tY(tY({},t),{},{active:!1,currentValues:[],currentOperator:""}):t})})},$=(null===(o=h.operators[h.currentOperator])||void 0===o?void 0:o.isMultiSelect)||!1,V="between"===x,B=function(e){_([].concat(rY(e),rY(j.filter(function(t){return!e.includes(t)})))),m(tY(tY({},h),{},{currentValues:e})),s(function(t){return t.map(function(t){return t.dimension===b?tY(tY({},t),{},{currentValues:e,active:e.length>0}):t})})};return(0,le.jsx)(La,{theme:$E,children:(0,le.jsxs)("div",{className:"dashboard-filter-panel-popup-filter-option".concat(V?" dashboard-filter-panel-popup-filter-option--date-range":""),children:[(0,le.jsx)("div",{className:"dashboard-filter-panel-popup-filter-dropdown",children:(0,le.jsxs)(fs,{sx:{m:1,width:"100%"},size:"small",children:[(0,le.jsx)(Ms,{id:"filter-input-label-".concat(h.dimension),sx:{fontSize:"var(--font-size-xl, 16px)"},children:"Filter on"}),(0,le.jsx)(Au,{disabled:d,input:(0,le.jsx)(Ou,{id:"select-multiple-chip",label:"Filter on",sx:{fontSize:"var(--font-size-md, 14px)"}}),labelId:"filter-input-label-".concat(h.dimension),onChange:function(e){var t=l.findIndex(function(t){return t.dimension===e.target.value}),n=l.findIndex(function(e){return e.dimension===b});z(b),s(function(r){return r.map(function(t){t.dimension===e.target.value&&(t.currentValues=[],t.currentOperator="",t.active=!0)}),o=t,i=n,s=(a=rY(r))[o],a[o]=a[i],a[i]=s,a;var o,i,a,s}),m(i[t]),y(e.target.value)},value:b,children:D.map(function(e,t){return(!e.active||e.dimension===b)&&(0,le.jsx)(ud,{value:e.dimension,children:e.title},t)})})]})}),(0,le.jsx)("div",{className:"dashboard-filter-panel-popup-filter-dropdown",children:(0,le.jsxs)(fs,{sx:{m:1,width:"100%"},size:"small",children:[(0,le.jsx)(Ms,{id:"filter-input-label-".concat(h.dimension,"-condition"),sx:{fontSize:"var(--font-size-md, 14px)"},children:"Condition"}),(0,le.jsx)(Au,{disabled:d,labelId:"filter-input-label-".concat(h.dimension,"-condition"),value:x,onChange:function(e){C([]),m(tY(tY({},h),{},{currentOperator:e.target.value,currentValues:[]})),s(function(t){return t.map(function(t){return t.dimension===b&&(t.currentOperator=e.target.value),t}),t})},input:(0,le.jsx)(Ou,{id:"select-multiple-condition-".concat(h.dimension),label:"Condition",sx:{fontSize:"var(--font-size-md, 14px)"}}),children:Object.keys(h.operators).map(function(e,t){return(0,le.jsx)(ud,{value:e,children:h.operators[e].title},t)})})]})}),(0,le.jsx)("div",{className:"dashboard-filter-panel-popup-filter-dropdown",children:I?(0,le.jsx)(Yq,{subFieldType:h.subFieldType,isRange:V,value:k,onChange:B,disabled:d},"".concat(b,"-").concat(x)):(0,le.jsx)(Zq,{dimension:h.dimension,title:h.title,value:k,filterValues:j,isMultiSelect:$,onChange:B,disabled:d,isLoading:N})}),(0,le.jsxs)("div",{children:[c&&(0,le.jsx)("button",{onClick:function(){return!d&&(T(!P),void(c&&c(h)))},className:"dashboard-filter-panel-popup-filter-option-action-button",children:(0,le.jsx)(Le,{content:d?"Filter is disabled":P?"Unlock filter":"Lock filter",side:"bottom",children:d?(0,le.jsx)(dd,{size:20,color:"#9e9e9e",strokeWidth:2}):P?(0,le.jsx)(dd,{size:20}):(0,le.jsx)(fd,{size:20})})}),(0,le.jsx)("button",{className:"dashboard-filter-panel-popup-filter-option-action-button",onClick:function(){return!d&&z(h.dimension)},children:(0,le.jsx)(Le,{content:d?"Filter is disabled":"Remove filter",side:"bottom",children:d?(0,le.jsx)(pd,{size:18,color:"#9e9e9e",strokeWidth:2,"aria-hidden":!0}):(0,le.jsx)(pd,{size:18,"aria-hidden":!0})})})]})]})})};const lY=Ce("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);function cY(e){return function(e){if(Array.isArray(e))return uY(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return uY(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?uY(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function uY(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function dY(e){return dY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dY(e)}function fY(e){return function(e){if(Array.isArray(e))return bY(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||gY(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function hY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pY(Object(n),!0).forEach(function(t){mY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function mY(e,t,n){return(t=function(e){var t=function(e){if("object"!=dY(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=dY(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==dY(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gY(e,t){if(e){if("string"==typeof e)return bY(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?bY(e,t):void 0}}function bY(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var yY=function(e){var t,n,r=e.title,o=void 0===r?"Global Filters":r,i=e.filters,a=e.onClose,s=e.refetchData,l=e.lockFilter,c=e.chartFilters,u=e.systemFilters,d=e.filterValuesQuery,f=(0,G.useState)(function(e,t){if(!t)return e;var n=t.map(function(e){return e.field}),r=e.filter(function(e){return n.includes(e.dimension)}),o=e.filter(function(e){return!n.includes(e.dimension)});return[].concat(cY(r),cY(o))}(c?i.map(function(e){var t=c.find(function(t){return t.dimension===e.dimension});return t?hY(hY({},e),{},{active:!0,currentOperator:t.currentOperator,currentValues:t.currentValues}):hY({},e)}):structuredClone(i),u)),p=(n=2,function(e){if(Array.isArray(e))return e}(t=f)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,n)||gY(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),h=p[0],m=p[1],g=(0,G.useRef)(null);return(0,G.useEffect)(function(){g.current&&g.current.scrollIntoView({behavior:"instant",block:"end"})},[h]),(0,le.jsxs)(ut,{onClose:function(){a()},title:o,children:[(0,le.jsxs)("div",{className:"dashboard-filter-panel-popup-filter-options",children:[h.map(function(e,t){var n=null==u?void 0:u.find(function(t){return t.field===e.dimension});return e.active&&(0,le.jsx)(sY,{filter:e,filters:i,filterCache:h,updateFilters:m,lockFilter:l,isDisabled:!!n,filterValuesQuery:d},t)}),(0,le.jsxs)("div",{onClick:function(){m(function(e){var t=fY(e),n=t.findIndex(function(e){return!e.active});-1!==n&&(t[n]=hY(hY({},t[n]),{},{active:!0}));var r=t.splice(n,1);return t.push(r[0]),t})},className:"dashboard-filter-panel-popup-add-button",children:[(0,le.jsx)(Le,{content:"Add filter",side:"bottom",children:(0,le.jsx)(lY,{size:20,"aria-hidden":!0})}),"Filter"]}),(0,le.jsx)("div",{ref:g})]}),(0,le.jsxs)("div",{className:"dashboard-filter-panel-popup-button-container",children:[(0,le.jsx)("button",{className:be()("dashboard-filter-panel-popup-button","dashboard-filter-panel-popup-button__cancel"),onClick:function(){a()},children:"Cancel"}),(0,le.jsx)("button",{className:be()("dashboard-filter-panel-popup-button","dashboard-filter-panel-popup-button__clear-all"),onClick:function(){m(function(e){return e.map(function(e){return(null==u?void 0:u.find(function(t){return t.field===e.dimension}))||(e.currentValues=[],e.currentOperator=""),e}),fY(e)})},children:"Clear All"}),(0,le.jsx)("button",{className:be()("dashboard-filter-panel-popup-button","dashboard-filter-panel-popup-button__save-changes"),onClick:function(){m(function(e){var t=e.map(function(e){return 0===e.currentValues.length&&(e.active=!1),e});return t}),s(h),a()},children:"Apply Filters"})]})]})};function vY(e){return vY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vY(e)}function xY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function wY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xY(Object(n),!0).forEach(function(t){SY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function SY(e,t,n){return(t=function(e){var t=function(e){if("object"!=vY(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=vY(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==vY(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kY(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return CY(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?CY(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function CY(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var MY=Fe(function(e){var t=e.onClick;return(0,le.jsx)("div",{onClick:function(){return t(!0)},children:(0,le.jsx)("div",{className:"dashboard-filter-panel-edit-button-text",children:"Edit"})})}),PY=Fe(mL),TY=Fe(function(e){var t=e.activeFilters;return(0,le.jsxs)("div",{className:be()("dashboard-filter-panel-filters-icon",{"dashboard-filter-panel-filters-icon__active":t&&t.length>0}),children:[(0,le.jsx)(Me,{size:18}),t?t.length:0]})}),OY=function(e){var t=e.updateActiveFilters,n=e.filtersUrl,r=e.activeFilters,o=e.queryClient,i=e.filterValuesQuery,a=qe({queryKey:["globalFilters"],queryFn:function(){return lt(n)}}),s=a.data,l=a.isLoading,c=fe(),u=kY((0,G.useState)(!1),2),d=u[0],f=u[1],p=kY((0,G.useState)(null),2),h=p[0],m=p[1];return(0,G.useEffect)(function(){s&&Array.isArray(s.filters)&&(t(s.filters.filter(function(e){return e.active})),m(s.filters))},[s]),l||c?(0,le.jsx)("div",{className:"dashboard-filter-panel-loading",children:(0,le.jsx)($f,{})}):(0,le.jsxs)("div",{className:be()("dashboard-filter-panel",{"dashboard-filter-panel__inactive":!r||0===r.length}),children:[(0,le.jsxs)("div",{className:"dashboard-filter-panel__content",children:[(0,le.jsx)(TY,{content:null!=r&&r.length?"Filters applied: ".concat(r.length):"No filters applied",side:"bottom",activeFilters:null!=r?r:void 0}),r&&0!==r.length?(0,le.jsxs)(le.Fragment,{children:[(0,le.jsx)("div",{className:"dashboard-filter-panel-status__active",children:"Filters Applied:"}),r.map(function(e,t){return t>2?null:t>1?(0,le.jsx)(PY,{label:"+ ".concat(r.length-2),className:be()("dashboard-filter-panel-filters-icon","dashboard-filter-panel-filters-icon__active"),content:null!=r&&r.length?(0,le.jsx)("div",{children:r.map(function(e){return(0,le.jsxs)("div",{children:[e.title,":"," ",yf(e.currentValues,e.subFieldType)]},e.title)})}):"",side:"bottom"},t):(0,le.jsxs)("span",{className:"dashboard-filter-panel__filter-option",children:[(0,le.jsx)("span",{className:"dashboard-filter-panel__filter-option__active",children:e.title+": "}),e.currentValues&&yf(e.currentValues,e.subFieldType)]},t)})]}):(0,le.jsx)(le.Fragment,{children:(0,le.jsx)("div",{className:"dashboard-filter-panel-status__inactive",children:"No Filters Applied..."})})]}),(0,le.jsx)("div",{className:"dashboard-filter-panel-edit-button",children:(0,le.jsx)(MY,{onClick:f,content:"Edit Filter",side:"bottom"})}),d&&h&&(0,le.jsx)(yY,{filters:h,onClose:function(){return f(!1)},refetchData:function(e){t(Array.isArray(e)?e.filter(function(e){return e.active}):[]),o.setQueryData(["globalFilters"],function(t){return t?wY(wY({},t),{},{filters:e}):t}),m(e)},filterValuesQuery:i})]})},jY=a(9258),_Y={};function DY(){}function EY(e,{interval:n=1e3,onError:r=DY}={}){if("function"!=typeof e)throw new Error("argument is not function.");let o=0,i=null,a=!1,s=!1;return async(...l)=>{if(i=l,!s){for(s=!0;a;)await new Promise(e=>t.setTimeout(e,n));for(;Date.now()<o;)await new Promise(e=>t.setTimeout(e,o-Date.now()));s=!1,a=!0;try{await e(...i)}catch(e){try{r(e)}catch{}}o=Date.now()+n,a=!1}}}_Y.styleTagTransform=Lf(),_Y.setAttributes=Rf(),_Y.insert=Df().bind(null,"head"),_Y.domAPI=jf(),_Y.insertStyleElement=If(),Tf()(jY.A,_Y),jY.A&&jY.A.locals&&jY.A.locals;const RY=Ce("pencil-off",[["path",{d:"m10 10-6.157 6.162a2 2 0 0 0-.5.833l-1.322 4.36a.5.5 0 0 0 .622.624l4.358-1.323a2 2 0 0 0 .83-.5L14 13.982",key:"bjo8r8"}],["path",{d:"m12.829 7.172 4.359-4.346a1 1 0 1 1 3.986 3.986l-4.353 4.353",key:"16h5ne"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]),AY=Ce("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);function IY(e){return IY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},IY(e)}function FY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function LY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?FY(Object(n),!0).forEach(function(t){NY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function NY(e,t,n){return(t=function(e){var t=function(e){if("object"!=IY(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=IY(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==IY(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zY(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return $Y(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$Y(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $Y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var VY=(0,me.WidthProvider)(me.Responsive),BY=new class{#H;#b;#f;#q;#Y;#U;#G;#X;constructor(e={}){this.#H=e.queryCache||new V,this.#b=e.mutationCache||new W,this.#f=e.defaultOptions||{},this.#q=new Map,this.#Y=new Map,this.#U=0}mount(){this.#U++,1===this.#U&&(this.#G=j.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#H.onFocus())}),this.#X=_.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#H.onOnline())}))}unmount(){this.#U--,0===this.#U&&(this.#G?.(),this.#G=void 0,this.#X?.(),this.#X=void 0)}isFetching(e){return this.#H.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#b.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#H.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#H.build(this,t),r=n.state.data;return void 0===r?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(l(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#H.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=this.#H.get(r.queryHash),i=o?.state.data,a=function(e,t){return"function"==typeof e?e(t):e}(t,i);if(void 0!==a)return this.#H.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return T.batch(()=>this.#H.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#H.get(t.queryHash)?.state}removeQueries(e){const t=this.#H;T.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){const n=this.#H;return T.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},o=T.batch(()=>this.#H.findAll(e).map(e=>e.cancel(n)));return Promise.all(o).then(r).catch(r)}invalidateQueries(e,t={}){return T.batch(()=>(this.#H.findAll(e).forEach(e=>{e.invalidate()}),"none"===e?.refetchType?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},o=T.batch(()=>this.#H.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(r)),"paused"===e.state.fetchStatus?Promise.resolve():t}));return Promise.all(o).then(r)}fetchQuery(e){const t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);const n=this.#H.build(this,t);return n.isStaleByTime(l(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(r).catch(r)}fetchInfiniteQuery(e){return e.behavior=q(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(r).catch(r)}ensureInfiniteQueryData(e){return e.behavior=q(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return _.isOnline()?this.#b.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#H}getMutationCache(){return this.#b}getDefaultOptions(){return this.#f}setDefaultOptions(e){this.#f=e}setQueryDefaults(e,t){this.#q.set(p(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#q.values()],n={};return t.forEach(t=>{h(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#Y.set(p(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#Y.values()],n={};return t.forEach(t=>{h(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#f.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=f(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===C&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#f.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#H.clear(),this.#b.clear()}}({defaultOptions:{queries:{gcTime:0,staleTime:0,refetchOnWindowFocus:!1,refetchOnMount:!1}}}),WY=function(e){var t=e.dashboardConfigJSON,n=e.authToken,r=e.showData,o=(({storage:e,key:t="REACT_QUERY_OFFLINE_CACHE",throttleTime:n=1e3,serialize:r=JSON.stringify,deserialize:o=JSON.parse,retry:i})=>{if(e){const a=async n=>{try{const o=await r(n);return void await e.setItem(t,o)}catch(e){return e}};return{persistClient:EY(async e=>{let t=e,n=await a(t),r=0;for(;n&&t;)r++,t=await(i?.({persistedClient:t,error:n,errorCount:r})),t&&(n=await a(t))},{interval:n}),restoreClient:async()=>{const n=await e.getItem(t);if(n)return await o(n)},removeClient:()=>e.removeItem(t)}}return{persistClient:DY,restoreClient:()=>Promise.resolve(void 0),removeClient:DY}})({storage:window.localStorage}),i=zY((0,G.useState)(!1),2),a=i[0],s=i[1],l=zY((0,G.useState)(null),2),c=l[0],u=l[1],d=JSON.parse(t),f=d.filtersUrl,p=d.filterValuesUrl,h=d.filterableCharts,m=d.filterLayout,g=d.charts,b=d.dashboards,y={url:p,authToken:n};return(0,le.jsx)(he,{client:BY,persistOptions:{persister:o},children:(0,le.jsxs)("div",{className:"dashboard-root",children:[(0,le.jsxs)("div",{className:"dashboard-header",children:[m&&(0,le.jsx)("div",{className:"dashboard-header__filter-panel-container","data-grid":m,children:(0,le.jsx)(OY,{activeFilters:c,updateActiveFilters:u,filtersUrl:f,queryClient:BY,filterValuesQuery:y})},m.i),(0,le.jsx)("div",{className:"dashboard-header__edit-layout-container",children:(0,le.jsx)("button",{onClick:function(){return s(!a)},className:be()("dashboard-edit-layout-button"),children:(0,le.jsx)(Le,{content:a?"Done editing layout":"Edit layout",side:"bottom",children:a?(0,le.jsx)(le.Fragment,{children:(0,le.jsx)(RY,{size:20,"aria-hidden":!0})}):(0,le.jsx)(le.Fragment,{children:(0,le.jsx)(AY,{size:20,"aria-hidden":!0})})})})})]}),(0,le.jsxs)(VY,{"test-id":"dashboard",className:"dashboard",maxHeight:"100%",breakpoints:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:{lg:12,md:12,sm:6,xs:4,xxs:2},rowHeight:140,maxRows:8,maxWidth:1900,width:"100%",isResizable:!1,draggableHandle:".draggable-handle",resizeHandles:["s","w","e","n","sw","nw","se","ne"],compactType:"vertical",autosize:!1,children:[h&&h.map(function(e){var t;if("queryType"in e.query.params&&"multi"===e.query.params.queryType){var o=e.query.params.queries.map(function(e){return LY(LY({},e),{},{filters:c?PE(c,e.filters):e.filters})});t=LY(LY({},e.query),{},{params:{queries:o}})}else{var i=e.query.params;t=LY(LY({},e.query),{},{params:LY(LY({},e.query.params),{},{filters:c?PE(c,i.filters):i.filters})})}var s=t.authToken?t:LY(LY({},t),{},{authToken:n});return(0,le.jsx)("div",{"data-grid":e.layout,children:(0,le.jsx)(IE,{item:e,editingLayout:a,showData:r,activeFilters:c,queryWithToken:s,filtersUrl:f,filterValuesQuery:y})},e.layout.i)}),g&&g.map(function(e){var t,o=LY(LY({},e.query),{},{params:LY({},e.query.params),authToken:null!==(t=e.query.authToken)&&void 0!==t?t:n});return(0,le.jsx)("div",{className:"dashboard-item","data-grid":e.layout,children:(0,le.jsx)(IE,{item:e,editingLayout:a,showData:r,activeFilters:c,queryWithToken:o,filtersUrl:f,filterValuesQuery:y})},e.layout.i)}),b&&b.map(function(e,t){return(0,le.jsx)("div",{"data-grid":e.dashboardLayout,children:(0,le.jsx)(WY,{dashboardConfigJSON:JSON.stringify(e),authToken:n})},t)})]})]})})}})(),s})());
|
|
102
|
+
`:null,DF=Ka("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${ts(n.color)}`]]}})(gs(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:jF||{animation:`${TF} 1.4s linear infinite`}},...Object.entries(e.palette).filter(bs()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),EF=Ka("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),RF=Ka("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${ts(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(gs(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:e})=>"indeterminate"===e.variant&&!e.disableShrink,style:_F||{animation:`${OF} 1.4s ease-in-out infinite`}}]}))),AF=Ka("circle",{name:"MuiCircularProgress",slot:"Track"})(gs(({theme:e})=>({stroke:"currentColor",opacity:(e.vars||e).palette.action.activatedOpacity}))),IF=G.forwardRef(function(e,t){const n=Za({props:e,name:"MuiCircularProgress"}),{className:r,color:o="primary",disableShrink:i=!1,enableTrackSlot:a=!1,size:s=40,style:l,thickness:c=3.6,value:u=0,variant:d="indeterminate",...f}=n,p={...n,color:o,disableShrink:i,size:s,thickness:c,value:u,variant:d,enableTrackSlot:a},h=(e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e;return Na({root:["root",n,`color${ts(r)}`],svg:["svg"],track:["track"],circle:["circle",`circle${ts(n)}`,o&&"circleDisableShrink"]},MF,t)})(p),m={},g={},b={};if("determinate"===d){const e=2*Math.PI*((PF-c)/2);m.strokeDasharray=e.toFixed(3),b["aria-valuenow"]=Math.round(u),m.strokeDashoffset=`${((100-u)/100*e).toFixed(3)}px`,g.transform="rotate(-90deg)"}return(0,le.jsx)(DF,{className:Un(h.root,r),style:{width:s,height:s,...g,...l},ownerState:p,ref:t,role:"progressbar",...b,...f,children:(0,le.jsxs)(EF,{className:h.svg,ownerState:p,viewBox:"22 22 44 44",children:[a?(0,le.jsx)(AF,{className:h.track,ownerState:p,cx:PF,cy:PF,r:(PF-c)/2,fill:"none",strokeWidth:c,"aria-hidden":"true"}):null,(0,le.jsx)(RF,{className:h.circle,style:m,ownerState:p,cx:PF,cy:PF,r:(PF-c)/2,fill:"none",strokeWidth:c})]})})}),FF=IF;function LF(e){return ss("MuiButton",e)}const NF=ls("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),zF=G.createContext({}),$F=G.createContext(void 0),VF=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],BF=Ka(nd,{shouldForwardProp:e=>Xa(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${ts(n.color)}`],t[`size${ts(n.size)}`],t[`${n.variant}Size${ts(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(gs(({theme:e})=>{const t="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],n="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${NF.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${NF.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${NF.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${NF.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter(bs()).map(([t])=>({props:{color:t},style:{"--variant-textColor":(e.vars||e).palette[t].main,"--variant-outlinedColor":(e.vars||e).palette[t].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[t].main,.5),"--variant-containedColor":(e.vars||e).palette[t].contrastText,"--variant-containedBg":(e.vars||e).palette[t].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[t].dark,"--variant-textBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[t].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${NF.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${NF.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${NF.loading}`]:{color:"transparent"}}}]}})),WF=Ka("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${ts(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...VF]})),HF=Ka("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${ts(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...VF]})),qF=Ka("span",{name:"MuiButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),YF=Ka("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),UF=G.forwardRef(function(e,t){const n=G.useContext(zF),r=G.useContext($F),o=Za({props:Gn(n,e),name:"MuiButton"}),{children:i,color:a="primary",component:s="button",className:l,disabled:c=!1,disableElevation:u=!1,disableFocusRipple:d=!1,endIcon:f,focusVisibleClassName:p,fullWidth:h=!1,id:m,loading:g=null,loadingIndicator:b,loadingPosition:y="center",size:v="medium",startIcon:x,type:w,variant:S="text",...k}=o,C=CF(m),M=b??(0,le.jsx)(FF,{"aria-labelledby":C,color:"inherit",size:16}),P={...o,color:a,component:s,disabled:c,disableElevation:u,disableFocusRipple:d,fullWidth:h,loading:g,loadingIndicator:M,loadingPosition:y,size:v,type:w,variant:S},T=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,loading:a,loadingPosition:s,classes:l}=e,c=Na({root:["root",a&&"loading",i,`${i}${ts(t)}`,`size${ts(o)}`,`${i}Size${ts(o)}`,`color${ts(t)}`,n&&"disableElevation",r&&"fullWidth",a&&`loadingPosition${ts(s)}`],startIcon:["icon","startIcon",`iconSize${ts(o)}`],endIcon:["icon","endIcon",`iconSize${ts(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},LF,l);return{...l,...c}})(P),O=(x||g&&"start"===y)&&(0,le.jsx)(WF,{className:T.startIcon,ownerState:P,children:x||(0,le.jsx)(YF,{className:T.loadingIconPlaceholder,ownerState:P})}),j=(f||g&&"end"===y)&&(0,le.jsx)(HF,{className:T.endIcon,ownerState:P,children:f||(0,le.jsx)(YF,{className:T.loadingIconPlaceholder,ownerState:P})}),_=r||"",D="boolean"==typeof g?(0,le.jsx)("span",{className:T.loadingWrapper,style:{display:"contents"},children:g&&(0,le.jsx)(qF,{className:T.loadingIndicator,ownerState:P,children:M})}):null;return(0,le.jsxs)(BF,{ownerState:P,className:Un(n.className,T.root,l,_),component:s,disabled:c||g,focusRipple:!d,focusVisibleClassName:Un(T.focusVisible,p),ref:t,type:w,id:g?C:m,...k,classes:T,children:[O,"end"!==y&&D,i,"end"===y&&D,j]})});function GF(e){return ss("MuiDialogActions",e)}ls("MuiDialogActions",["root","spacing"]);const XF=Ka("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto",variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),QF=["actions"],KF=Ka(G.forwardRef(function(e,t){const n=Za({props:e,name:"MuiDialogActions"}),{className:r,disableSpacing:o=!1,...i}=n,a={...n,disableSpacing:o},s=(e=>{const{classes:t,disableSpacing:n}=e;return Na({root:["root",!n&&"spacing"]},GF,t)})(a);return(0,le.jsx)(XF,{className:Un(s.root,r),ownerState:a,ref:t,...i})}),{name:"MuiPickersLayout",slot:"ActionBar"})({});function ZF(e){const{actions:t}=e,n=il(e,QF),r=fA(),{clearValue:o,setValueToToday:i,acceptValueChanges:a,cancelValueChanges:s,goToNextStep:l,hasNextStep:c}=ZR();if(null==t||0===t.length)return null;const u=t?.map(e=>{switch(e){case"clear":return(0,le.jsx)(UF,{onClick:o,children:r.clearButtonLabel},e);case"cancel":return(0,le.jsx)(UF,{onClick:s,children:r.cancelButtonLabel},e);case"accept":return(0,le.jsx)(UF,{onClick:a,children:r.okButtonLabel},e);case"today":return(0,le.jsx)(UF,{onClick:i,children:r.todayButtonLabel},e);case"next":return(0,le.jsx)(UF,{onClick:l,children:r.nextStepButtonLabel},e);case"nextOrAccept":return c?(0,le.jsx)(UF,{onClick:l,children:r.nextStepButtonLabel},e):(0,le.jsx)(UF,{onClick:a,children:r.okButtonLabel},e);default:return null}});return(0,le.jsx)(KF,tr({},n,{children:u}))}const JF=G.memo(ZF);function eL(e){return ss("MuiListItem",e)}ls("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);const tL=ls("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function nL(e){return ss("MuiListItemSecondaryAction",e)}ls("MuiListItemSecondaryAction",["root","disableGutters"]);const rL=Ka("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)",variants:[{props:({ownerState:e})=>e.disableGutters,style:{right:0}}]}),oL=G.forwardRef(function(e,t){const n=Za({props:e,name:"MuiListItemSecondaryAction"}),{className:r,...o}=n,i=G.useContext(Ls),a={...n,disableGutters:i.disableGutters},s=(e=>{const{disableGutters:t,classes:n}=e;return Na({root:["root",t&&"disableGutters"]},nL,n)})(a);return(0,le.jsx)(rL,{className:Un(s.root,r),ownerState:a,ref:t,...o})});oL.muiName="ListItemSecondaryAction";const iL=oL,aL=Ka("div",{name:"MuiListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.hasSecondaryAction&&t.secondaryAction]}})(gs(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>!e.disablePadding&&e.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:e})=>!e.disablePadding&&!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>!e.disablePadding&&!!e.secondaryAction,style:{paddingRight:48}},{props:({ownerState:e})=>!!e.secondaryAction,style:{[`& > .${tL.root}`]:{paddingRight:48}}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>e.button,style:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}}},{props:({ownerState:e})=>e.hasSecondaryAction,style:{paddingRight:48}}]}))),sL=Ka("li",{name:"MuiListItem",slot:"Container"})({position:"relative"}),lL=G.forwardRef(function(e,t){const n=Za({props:e,name:"MuiListItem"}),{alignItems:r="center",children:o,className:i,component:a,components:s={},componentsProps:l={},ContainerComponent:c="li",ContainerProps:{className:u,...d}={},dense:f=!1,disableGutters:p=!1,disablePadding:h=!1,divider:m=!1,secondaryAction:g,slotProps:b={},slots:y={},...v}=n,x=G.useContext(Ls),w=G.useMemo(()=>({dense:f||x.dense||!1,alignItems:r,disableGutters:p}),[r,x.dense,f,p]),S=G.useRef(null),k=G.Children.toArray(o),C=k.length&&ns(k[k.length-1],["ListItemSecondaryAction"]),M={...n,alignItems:r,dense:w.dense,disableGutters:p,disablePadding:h,divider:m,hasSecondaryAction:C},P=(e=>{const{alignItems:t,classes:n,dense:r,disableGutters:o,disablePadding:i,divider:a,hasSecondaryAction:s}=e;return Na({root:["root",r&&"dense",!o&&"gutters",!i&&"padding",a&&"divider","flex-start"===t&&"alignItemsFlexStart",s&&"secondaryAction"],container:["container"]},eL,n)})(M),T=Ws(S,t),O=y.root||s.Root||aL,j=b.root||l.root||{},_={className:Un(P.root,j.className,i),...v};let D=a||"li";return C?(D=_.component||a?D:"div","li"===c&&("li"===D?D="div":"li"===_.component&&(_.component="div")),(0,le.jsx)(Ls.Provider,{value:w,children:(0,le.jsxs)(sL,{as:c,className:Un(P.container,u),ref:T,ownerState:M,...d,children:[(0,le.jsx)(O,{...j,...!_s(O)&&{as:D,ownerState:{...M,...j.ownerState}},..._,children:k}),k.pop()]})})):(0,le.jsx)(Ls.Provider,{value:w,children:(0,le.jsxs)(O,{...j,as:D,ref:T,...!_s(O)&&{ownerState:{...M,...j.ownerState}},..._,children:[k,g&&(0,le.jsx)(iL,{children:g})]})})}),cL=Bc((0,le.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}));function uL(e){return ss("MuiChip",e)}const dL=ls("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),fL=Ka("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:o,clickable:i,onDelete:a,size:s,variant:l}=n;return[{[`& .${dL.avatar}`]:t.avatar},{[`& .${dL.avatar}`]:t[`avatar${ts(s)}`]},{[`& .${dL.avatar}`]:t[`avatarColor${ts(r)}`]},{[`& .${dL.icon}`]:t.icon},{[`& .${dL.icon}`]:t[`icon${ts(s)}`]},{[`& .${dL.icon}`]:t[`iconColor${ts(o)}`]},{[`& .${dL.deleteIcon}`]:t.deleteIcon},{[`& .${dL.deleteIcon}`]:t[`deleteIcon${ts(s)}`]},{[`& .${dL.deleteIcon}`]:t[`deleteIconColor${ts(r)}`]},{[`& .${dL.deleteIcon}`]:t[`deleteIcon${ts(l)}Color${ts(r)}`]},t.root,t[`size${ts(s)}`],t[`color${ts(r)}`],i&&t.clickable,i&&"default"!==r&&t[`clickableColor${ts(r)})`],a&&t.deletable,a&&"default"!==r&&t[`deletableColor${ts(r)}`],t[l],t[`${l}${ts(r)}`]]}})(gs(({theme:e})=>{const t="light"===e.palette.mode?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,lineHeight:1.5,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:16,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${dL.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${dL.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${dL.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${dL.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${dL.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${dL.icon}`]:{marginLeft:5,marginRight:-6},[`& .${dL.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:e.alpha((e.vars||e).palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.alpha((e.vars||e).palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${dL.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${dL.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(bs(["contrastText"])).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText,[`& .${dL.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[t].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[t].contrastText}}}})),{props:e=>e.iconColor===e.color,style:{[`& .${dL.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:e=>e.iconColor===e.color&&"default"!==e.color,style:{[`& .${dL.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${dL.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}},...Object.entries(e.palette).filter(bs(["dark"])).map(([t])=>({props:{color:t,onDelete:!0},style:{[`&.${dL.focusVisible}`]:{background:(e.vars||e).palette[t].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`)},[`&.${dL.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter(bs(["dark"])).map(([t])=>({props:{color:t,clickable:!0},style:{[`&:hover, &.${dL.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${"light"===e.palette.mode?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${dL.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${dL.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${dL.avatar}`]:{marginLeft:4},[`& .${dL.avatarSmall}`]:{marginLeft:2},[`& .${dL.icon}`]:{marginLeft:4},[`& .${dL.iconSmall}`]:{marginLeft:2},[`& .${dL.deleteIcon}`]:{marginRight:5},[`& .${dL.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter(bs()).map(([t])=>({props:{variant:"outlined",color:t},style:{color:(e.vars||e).palette[t].main,border:`1px solid ${e.alpha((e.vars||e).palette[t].main,.7)}`,[`&.${dL.clickable}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)},[`&.${dL.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.focusOpacity)},[`& .${dL.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[t].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t].main}}}}))]}})),pL=Ka("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${ts(r)}`]]}})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function hL(e){return"Backspace"===e.key||"Delete"===e.key}const mL=G.forwardRef(function(e,t){const n=Za({props:e,name:"MuiChip"}),{avatar:r,className:o,clickable:i,color:a="default",component:s,deleteIcon:l,disabled:c=!1,icon:u,label:d,onClick:f,onDelete:p,onKeyDown:h,onKeyUp:m,size:g="medium",variant:b="filled",tabIndex:y,skipFocusWhenDisabled:v=!1,slots:x={},slotProps:w={},...S}=n,k=G.useRef(null),C=Ws(k,t),M=e=>{e.stopPropagation(),p&&p(e)},P=!(!1===i||!f)||i,T=P||p?nd:s||"div",O={...n,component:T,disabled:c,size:g,color:a,iconColor:G.isValidElement(u)&&u.props.color||a,onDelete:!!p,clickable:P,variant:b},j=(e=>{const{classes:t,disabled:n,size:r,color:o,iconColor:i,onDelete:a,clickable:s,variant:l}=e;return Na({root:["root",l,n&&"disabled",`size${ts(r)}`,`color${ts(o)}`,s&&"clickable",s&&`clickableColor${ts(o)}`,a&&"deletable",a&&`deletableColor${ts(o)}`,`${l}${ts(o)}`],label:["label",`label${ts(r)}`],avatar:["avatar",`avatar${ts(r)}`,`avatarColor${ts(o)}`],icon:["icon",`icon${ts(r)}`,`iconColor${ts(i)}`],deleteIcon:["deleteIcon",`deleteIcon${ts(r)}`,`deleteIconColor${ts(o)}`,`deleteIcon${ts(l)}Color${ts(o)}`]},uL,t)})(O),_=T===nd?{component:s||"div",focusVisibleClassName:j.focusVisible,...p&&{disableRipple:!0}}:{};let D=null;p&&(D=l&&G.isValidElement(l)?G.cloneElement(l,{className:Un(l.props.className,j.deleteIcon),onClick:M}):(0,le.jsx)(cL,{className:j.deleteIcon,onClick:M}));let E=null;r&&G.isValidElement(r)&&(E=G.cloneElement(r,{className:Un(j.avatar,r.props.className)}));let R=null;u&&G.isValidElement(u)&&(R=G.cloneElement(u,{className:Un(j.icon,u.props.className)}));const A={slots:x,slotProps:w},[I,F]=El("root",{elementType:fL,externalForwardedProps:{...A,...S},ownerState:O,shouldForwardComponentProp:!0,ref:C,className:Un(j.root,o),additionalProps:{disabled:!(!P||!c)||void 0,tabIndex:v&&c?-1:y,..._},getSlotProps:e=>({...e,onClick:t=>{e.onClick?.(t),f?.(t)},onKeyDown:t=>{e.onKeyDown?.(t),(e=>{e.currentTarget===e.target&&hL(e)&&e.preventDefault(),h&&h(e)})(t)},onKeyUp:t=>{e.onKeyUp?.(t),(e=>{e.currentTarget===e.target&&p&&hL(e)&&p(e),m&&m(e)})(t)}})}),[L,N]=El("label",{elementType:pL,externalForwardedProps:A,ownerState:O,className:j.label});return(0,le.jsxs)(I,{as:T,...F,children:[E||R,(0,le.jsx)(L,{...N,children:d}),D]})}),gL=320,bL=336,yL=["items","changeImportance"],vL=["getValue"],xL=Ka($s,{name:"MuiPickersLayout",slot:"Shortcuts"})({});function wL(e){const{items:t,changeImportance:n="accept"}=e,r=il(e,yL),{setValue:o}=(()=>{const e=G.useContext(JR);if(null==e)throw new Error(["MUI X: The `usePickerActionsContext` can only be called in fields that are used as a slot of a Picker component"].join("\n"));return e})(),i=G.useContext(GR);if(null==t||0===t.length)return null;const a=t.map(e=>{let{getValue:t}=e,r=il(e,vL);const a=t({isValid:i});return tr({},r,{label:r.label,onClick:()=>{o(a,{changeImportance:n,shortcut:r,source:"view"})},disabled:!i(a)})});return(0,le.jsx)(xL,tr({dense:!0,sx:[{maxHeight:bL,maxWidth:200,overflow:"auto"},...Array.isArray(r.sx)?r.sx:[r.sx]]},r,{children:a.map(e=>(0,le.jsx)(lL,{children:(0,le.jsx)(mL,tr({},e))},e.id??e.label))}))}const SL=["ownerState"],kL=e=>{const{ownerState:t,defaultActionBarActions:n}=nA(),{view:r}=ZR(),o=Hn(),{children:i,slots:a,slotProps:s,classes:l}=e,c=G.useMemo(()=>tr({},t,{layoutDirection:o?"rtl":"ltr",hasShortcuts:!1}),[t,o]),u=((e,t)=>{const{pickerOrientation:n}=t;return Na({root:["root","landscape"===n&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},SF,e)})(l,c),d=a?.actionBar??JF,f=il(Fs({elementType:d,externalSlotProps:s?.actionBar,additionalProps:{actions:n},className:u.actionBar,ownerState:c}),SL),p=(0,le.jsx)(d,tr({},f)),h=a?.toolbar,m=Fs({elementType:h,externalSlotProps:s?.toolbar,className:u.toolbar,ownerState:c}),g=function(e){return null!==e.view}(m)&&h?(0,le.jsx)(h,tr({},m)):null,b=i,y=a?.tabs,v=r&&y?(0,le.jsx)(y,tr({className:u.tabs},s?.tabs)):null,x=a?.shortcuts??wL,w=Fs({elementType:x,externalSlotProps:s?.shortcuts,className:u.shortcuts,ownerState:c}),S=Array.isArray(w?.items)&&w.items.length>0;return{toolbar:g,content:b,tabs:v,actionBar:p,shortcuts:r&&x?(0,le.jsx)(x,tr({},w)):null,ownerState:tr({},c,{hasShortcuts:S})}},CL=Ka("div",{name:"MuiPickersLayout",slot:"Root"})({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${kF.actionBar}`]:{gridColumn:"1 / 4",gridRow:3},variants:[{props:{pickerOrientation:"landscape",hasShortcuts:!1},style:{[`& .${kF.toolbar}`]:{gridColumn:1,gridRow:"1 / 3"}}},{props:{pickerOrientation:"landscape",hasShortcuts:!0},style:{[`& .${kF.toolbar}`]:{gridColumn:"2 / 4",gridRow:1,maxWidth:"max-content"},[`& .${kF.shortcuts}`]:{gridColumn:1,gridRow:2}}},{props:{pickerOrientation:"portrait"},style:{[`& .${kF.toolbar}`]:{gridColumn:"2 / 4",gridRow:1},[`& .${kF.shortcuts}`]:{gridColumn:1,gridRow:"2 / 3"}}},{props:{hasShortcuts:!0,layoutDirection:"rtl"},style:{[`& .${kF.shortcuts}`]:{gridColumn:4}}}]}),ML=Ka("div",{name:"MuiPickersLayout",slot:"ContentWrapper"})({gridColumn:"2 / 4",gridRow:2,display:"flex",flexDirection:"column"}),PL=G.forwardRef(function(e,t){const n=UE({props:e,name:"MuiPickersLayout"}),{toolbar:r,content:o,tabs:i,actionBar:a,shortcuts:s,ownerState:l}=kL(n),{orientation:c,variant:u}=ZR(),{sx:d,className:f,classes:p}=n,h=((e,t)=>{const{pickerOrientation:n}=t;return Na({root:["root","landscape"===n&&"landscape"],contentWrapper:["contentWrapper"]},SF,e)})(p,l);return(0,le.jsxs)(CL,{ref:t,sx:d,className:Un(h.root,f),ownerState:l,children:["landscape"===c?s:r,"landscape"===c?r:s,(0,le.jsx)(ML,{className:h.contentWrapper,ownerState:l,children:"desktop"===u?(0,le.jsxs)(G.Fragment,{children:[o,i]}):(0,le.jsxs)(G.Fragment,{children:[i,o]})}),a]})});function TL(e){const{steps:t}=e;return function(e){const{steps:t,isViewMatchingStep:n,onStepChange:r}=e;return e=>{if(null==t)return mF;const o=t.findIndex(t=>n(e.view,t)),i=-1===o||o===t.length-1?null:t[o+1];return{hasNextStep:null!=i,hasSeveralSteps:t.length>1,goToNextStep:()=>{null!=i&&r(tr({},e,{step:i}))},areViewsInSameStep:(e,r)=>t.find(t=>n(e,t))===t.find(e=>n(r,e))}}}({steps:t,isViewMatchingStep:(e,t)=>null==t.views||t.views.includes(e),onStepChange:({step:e,defaultView:t,setView:n,view:r,views:o})=>{const i=null==e.views?t:e.views.find(e=>o.includes(e));i!==r&&n(i)}})}const OL=["props","steps"],jL=["ownerState"],_L=e=>{let{props:t,steps:n}=e,r=il(e,OL);const{slots:o,slotProps:i,label:a,inputRef:s,localeText:l}=t,c=TL({steps:n}),{providerProps:u,renderCurrentView:d,ownerState:f}=wF(tr({},r,{props:t,localeText:l,autoFocusView:!0,viewContainerRole:"dialog",variant:"desktop",getStepNavigation:c})),p=u.privateContextValue.labelId,h=i?.toolbar?.hidden??!1,m=o.field,g=il(Fs({elementType:m,externalSlotProps:i?.field,additionalProps:tr({},h&&{id:p}),ownerState:f}),jL),b=o.layout??PL;let y=p;h&&(y=a?`${p}-label`:void 0);const v=tr({},i,{toolbar:tr({},i?.toolbar,{titleId:p}),popper:tr({"aria-labelledby":y},i?.popper)});return{renderPicker:()=>(0,le.jsxs)(tA,tr({},u,{children:[(0,le.jsx)(m,tr({},g,{slots:tr({},o,g.slots),slotProps:tr({},v,g.slotProps),inputRef:s})),(0,le.jsx)(cF,{slots:o,slotProps:v,children:(0,le.jsx)(b,tr({},v?.layout,{slots:o,slotProps:v,children:d()}))})]}))}},DL=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef","unstableStartFieldRef","unstableEndFieldRef","enableAccessibleFieldDOMStructure","disabled","readOnly","dateSeparator","autoFocus","focused"],EL=(e,t)=>G.useMemo(()=>{const n=tr({},e),r={},o=e=>{n.hasOwnProperty(e)&&(r[e]=n[e],delete n[e])};return DL.forEach(o),"date"===t?MA.forEach(o):"time"===t?PA.forEach(o):"date-time"===t&&(MA.forEach(o),PA.forEach(o),TA.forEach(o)),{forwardedProps:n,internalProps:r}},[e,t]),RL=e=>null!=e.saveQuery,AL=({stateResponse:{localizedDigits:e,sectionsValueBoundaries:t,state:n,timezone:r,setCharacterQuery:o,setTempAndroidValueStr:i,updateSectionValue:a}})=>{const s=dA(),l=({keyPressed:e,sectionIndex:t},r,i)=>{const a=e.toLowerCase(),s=n.sections[t];if(null!=n.characterQuery&&(!i||i(n.characterQuery.value))&&n.characterQuery.sectionIndex===t){const e=`${n.characterQuery.value}${a}`,i=r(e,s);if(!RL(i))return o({sectionIndex:t,value:e,sectionType:s.type}),i}const l=r(a,s);return RL(l)&&!l.saveQuery?(o(null),null):(o({sectionIndex:t,value:a,sectionType:s.type}),RL(l)?null:l)};return zl(o=>{const c=n.sections[o.sectionIndex],u=CR(o.keyPressed,e)?(n=>{const r=({queryValue:n,skipIfBelowMinimum:r,section:o})=>{const i=SR(n,e),a=Number(i),l=t[o.type]({currentDate:null,format:o.format,contentType:o.contentType});if(a>l.maximum)return{saveQuery:!1};if(r&&a<l.minimum)return{saveQuery:!0};const c=10*a>l.maximum||i.length===l.maximum.toString().length;return{sectionValue:PR(s,a,l,e,o),shouldGoToNextSection:c}};return l(n,(e,t)=>{if("digit"===t.contentType||"digit-with-letter"===t.contentType)return r({queryValue:e,skipIfBelowMinimum:!1,section:t});if("month"===t.type){const n=_R(s,"digit","month","MM"),o=r({queryValue:e,skipIfBelowMinimum:!0,section:{type:t.type,format:"MM",hasLeadingZerosInFormat:n,hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2}});return RL(o)?o:tr({},o,{sectionValue:OR(s,o.sectionValue,"MM",t.format)})}if("weekDay"===t.type){const n=r({queryValue:e,skipIfBelowMinimum:!0,section:t});return RL(n)?n:tr({},n,{sectionValue:vR(s,t.format)[Number(n.sectionValue)-1]})}return{saveQuery:!1}},t=>CR(t,e))})(tr({},o,{keyPressed:kR(o.keyPressed,e)})):(e=>{const t=(e,t,n)=>{const r=t.filter(e=>e.toLowerCase().startsWith(n));return 0===r.length?{saveQuery:!1}:{sectionValue:r[0],shouldGoToNextSection:1===r.length}},n=(e,n,o,i)=>{const a=e=>xR(s,r,n.type,e);if("letter"===n.contentType)return t(n.format,a(n.format),e);if(o&&null!=i&&"letter"===yR(s,o).contentType){const n=a(o),r=t(0,n,e);return RL(r)?{saveQuery:!1}:tr({},r,{sectionValue:i(r.sectionValue,n)})}return{saveQuery:!1}};return l(e,(e,t)=>{switch(t.type){case"month":{const r=e=>OR(s,e,s.formats.month,t.format);return n(e,t,s.formats.month,r)}case"weekDay":{const r=(e,t)=>t.indexOf(e).toString();return n(e,t,s.formats.weekday,r)}case"meridiem":return n(e,t);default:return{saveQuery:!1}}})})(o);null!=u?a({section:c,newSectionValue:u.sectionValue,shouldGoToNextSection:u.shouldGoToNextSection}):i(null)})},IL=(e,t,n,r)=>{switch(n.type){case"year":return t.fieldYearPlaceholder({digitAmount:e.formatByString(e.date(void 0,"default"),r).length,format:r});case"month":return t.fieldMonthPlaceholder({contentType:n.contentType,format:r});case"day":return t.fieldDayPlaceholder({format:r});case"weekDay":return t.fieldWeekDayPlaceholder({contentType:n.contentType,format:r});case"hours":return t.fieldHoursPlaceholder({format:r});case"minutes":return t.fieldMinutesPlaceholder({format:r});case"seconds":return t.fieldSecondsPlaceholder({format:r});case"meridiem":return t.fieldMeridiemPlaceholder({format:r});default:return r}},FL=({adapter:e,date:t,shouldRespectLeadingZeros:n,localeText:r,localizedDigits:o,now:i,token:a,startSeparator:s})=>{if(""===a)throw new Error("MUI X: Should not call `commitToken` with an empty token");const l=yR(e,a),c=_R(e,l.contentType,l.type,a),u=n?c:"digit"===l.contentType,d=e.isValid(t);let f=d?e.formatByString(t,a):"",p=null;if(u)if(c)p=""===f?e.formatByString(i,a).length:f.length;else{if(null==l.maxLength)throw new Error(`MUI X: The token ${a} should have a 'maxLength' property on it's adapter`);p=l.maxLength,d&&(f=kR(MR(SR(f,o),p),o))}return tr({},l,{format:a,maxLength:p,value:f,placeholder:IL(e,r,l,a),hasLeadingZerosInFormat:c,hasLeadingZerosInInput:u,startSeparator:s,endSeparator:"",modified:!1})},LL=e=>{let t=(({adapter:e,format:t})=>{let n=10,r=t,o=e.expandFormat(t);for(;o!==r;)if(r=o,o=e.expandFormat(r),n-=1,n<0)throw new Error("MUI X: The format expansion seems to be in an infinite loop. Please open an issue with the format passed to the component.");return o})(e);e.isRtl&&e.enableAccessibleFieldDOMStructure&&(t=t.split(" ").reverse().join(" "));const n=(({adapter:e,expandedFormat:t})=>{const n=[],{start:r,end:o}=e.escapedCharacters,i=new RegExp(`(\\${r}[^\\${o}]*\\${o})+`,"g");let a=null;for(;a=i.exec(t);)n.push({start:a.index,end:i.lastIndex-1});return n})(tr({},e,{expandedFormat:t})),r=(e=>{const{adapter:t,expandedFormat:n,escapedParts:r}=e,o=t.date(void 0),i=[];let a="";const s=Object.keys(t.formatTokenMap).sort((e,t)=>t.length-e.length),l=/^([a-zA-Z]+)/,c=new RegExp(`^(${s.join("|")})*$`),u=new RegExp(`^(${s.join("|")})`),d=e=>r.find(t=>t.start<=e&&t.end>=e);let f=0;for(;f<n.length;){const t=d(f),r=null!=t,s=l.exec(n.slice(f))?.[1];if(!r&&null!=s&&c.test(s)){let t=s;for(;t.length>0;){const n=u.exec(t)[1];t=t.slice(n.length),i.push(FL(tr({},e,{now:o,token:n,startSeparator:a}))),a=""}f+=s.length}else{const e=n[f];r&&t?.start===f||t?.end===f||(0===i.length?a+=e:(i[i.length-1].endSeparator+=e,i[i.length-1].isEndFormatSeparator=!0)),f+=1}}return 0===i.length&&a.length>0&&i.push({type:"empty",contentType:"letter",maxLength:null,format:"",value:"",placeholder:"",hasLeadingZerosInFormat:!1,hasLeadingZerosInInput:!1,startSeparator:a,endSeparator:"",modified:!1}),i})(tr({},e,{expandedFormat:t,escapedParts:n}));return(({isRtl:e,formatDensity:t,sections:n})=>n.map(n=>{const r=n=>{let r=n;return e&&null!==r&&r.includes(" ")&&(r=`${r}`),"spacious"===t&&["/",".","-"].includes(r)&&(r=` ${r} `),r};return n.startSeparator=r(n.startSeparator),n.endSeparator=r(n.endSeparator),n}))(tr({},e,{sections:r}))},NL=e=>{const t=dA(),n=fA(),r=Hn(),{manager:{validator:o,valueType:i,internal_valueManager:a,internal_fieldValueManager:s},internalPropsWithDefaults:l,internalPropsWithDefaults:{value:c,defaultValue:u,referenceDate:d,onChange:f,format:p,formatDensity:h="dense",selectedSections:m,onSelectedSectionsChange:g,shouldRespectLeadingZeros:b=!1,timezone:y,enableAccessibleFieldDOMStructure:v=!0},forwardedProps:{error:x}}=e,{value:w,handleValueChange:S,timezone:k}=yF({name:"a field component",timezone:y,value:c,defaultValue:u,referenceDate:d,onChange:f,valueManager:a}),C=G.useRef(w);G.useEffect(()=>{C.current=w},[w]);const{hasValidationError:M}=vF({props:l,validator:o,timezone:k,value:w,onError:l.onError}),P=G.useMemo(()=>(e=>{const t=e.date(void 0);return"0"===e.formatByString(e.setSeconds(t,0),"s")?wR:Array.from({length:10}).map((n,r)=>e.formatByString(e.setSeconds(t,r),"s"))})(t),[t]),T=G.useMemo(()=>((e,t,n)=>{const r=e.date(void 0,n),o=e.endOfYear(r),i=e.endOfDay(r),{maxDaysInMonth:a,longestMonth:s}=tR(e,r).reduce((t,n)=>{const r=e.getDaysInMonth(n);return r>t.maxDaysInMonth?{maxDaysInMonth:r,longestMonth:n}:t},{maxDaysInMonth:0,longestMonth:null});return{year:({format:t})=>({minimum:0,maximum:jR(e,t)?9999:99}),month:()=>({minimum:1,maximum:e.getMonth(o)+1}),day:({currentDate:t})=>({minimum:1,maximum:e.isValid(t)?e.getDaysInMonth(t):a,longestMonth:s}),weekDay:({format:t,contentType:n})=>{if("digit"===n){const n=vR(e,t).map(Number);return{minimum:Math.min(...n),maximum:Math.max(...n)}}return{minimum:1,maximum:7}},hours:({format:n})=>{const o=e.getHours(i);return SR(e.formatByString(e.endOfDay(r),n),t)!==o.toString()?{minimum:1,maximum:Number(SR(e.formatByString(e.startOfDay(r),n),t))}:{minimum:0,maximum:o}},minutes:()=>({minimum:0,maximum:e.getMinutes(i)}),seconds:()=>({minimum:0,maximum:e.getSeconds(i)}),meridiem:()=>({minimum:0,maximum:1}),empty:()=>({minimum:0,maximum:0})}})(t,P,k),[t,P,k]),O=G.useCallback(e=>s.getSectionsFromValue(e,e=>LL({adapter:t,localeText:n,localizedDigits:P,format:p,date:e,formatDensity:h,shouldRespectLeadingZeros:b,enableAccessibleFieldDOMStructure:v,isRtl:r})),[s,p,n,P,r,b,t,h,v]),[j,_]=G.useState(()=>{const e=O(w),n={sections:e,lastExternalValue:w,lastSectionsDependencies:{format:p,isRtl:r,locale:t.locale},tempValueStrAndroid:null,characterQuery:null},o=(e=>Math.max(...e.map(e=>gR[e.type]??1)))(e);return tr({},n,{referenceValue:a.getInitialReferenceValue({referenceDate:d,value:w,adapter:t,props:l,granularity:o,timezone:k})})}),[D,E]=Pc({controlled:m,default:null,name:"useField",state:"selectedSections"}),R=e=>{E(e),g?.(e)},A=G.useMemo(()=>RR(D,j.sections),[D,j.sections]),I="all"===A?0:A,F=G.useMemo(()=>((e,t)=>{const n={};if(!t)return e.forEach((t,r)=>{const o=0===r?null:r-1,i=r===e.length-1?null:r+1;n[r]={leftIndex:o,rightIndex:i}}),{neighbors:n,startIndex:0,endIndex:e.length-1};const r={},o={};let i=0,a=0,s=e.length-1;for(;s>=0;){a=e.findIndex((e,t)=>t>=i&&e.endSeparator?.includes(" ")&&" / "!==e.endSeparator),-1===a&&(a=e.length-1);for(let e=a;e>=i;e-=1)o[e]=s,r[s]=e,s-=1;i=a+1}return e.forEach((t,i)=>{const a=o[i],s=0===a?null:r[a-1],l=a===e.length-1?null:r[a+1];n[i]={leftIndex:s,rightIndex:l}}),{neighbors:n,startIndex:r[0],endIndex:r[e.length-1]}})(j.sections,r&&!v),[j.sections,r,v]),L=G.useMemo(()=>j.sections.every(e=>""===e.value),[j.sections]),N=G.useMemo(()=>{if(null!=I)return!1;const e=j.sections.filter(e=>""!==e.value);return e.length>0&&j.sections.length-e.length>0},[j.sections,I]),z=G.useMemo(()=>void 0!==x?x:M||N,[M,N,x]),$=e=>{const n={validationError:o({adapter:t,value:e,timezone:k,props:l})};S(e,n)},V=(e,t)=>{const n=[...j.sections];return n[e]=tr({},n[e],{value:t,modified:!0}),n},B=G.useRef(null),W=ol(),H=e=>{null!=I&&(B.current={sectionIndex:I,value:e},W.start(0,()=>{B.current=null}))},q=()=>{if(null==I)return;const e=j.sections[I];""!==e.value&&(H(""),null===s.getDateFromSection(w,e)?_(e=>tr({},e,{sections:V(I,""),tempValueStrAndroid:null,characterQuery:null})):(_(e=>tr({},e,{characterQuery:null})),$(s.updateDateInValue(w,e,null))))},Y=ol(),U=zl(e=>{_(t=>tr({},t,{characterQuery:e}))});if(w!==j.lastExternalValue){const e=null!=B.current&&!t.isValid(s.getDateFromSection(w,j.sections[B.current.sectionIndex]));let n;n=e?V(B.current.sectionIndex,B.current.value):O(w),_(o=>tr({},o,{lastExternalValue:w,sections:n,sectionsDependencies:{format:p,isRtl:r,locale:t.locale},referenceValue:e?o.referenceValue:s.updateReferenceValue(t,w,o.referenceValue),tempValueStrAndroid:null}))}if(r!==j.lastSectionsDependencies.isRtl||p!==j.lastSectionsDependencies.format||t.locale!==j.lastSectionsDependencies.locale){const e=O(w);_(n=>tr({},n,{lastSectionsDependencies:{format:p,isRtl:r,locale:t.locale},sections:e,tempValueStrAndroid:null,characterQuery:null}))}null==j.characterQuery||z||null!=I||U(null),null!=j.characterQuery&&j.sections[j.characterQuery.sectionIndex]?.type!==j.characterQuery.sectionType&&U(null),G.useEffect(()=>{null!=B.current&&(B.current=null)});const X=ol();return G.useEffect(()=>(null!=j.characterQuery&&X.start(5e3,()=>U(null)),()=>{}),[j.characterQuery,U,X]),G.useEffect(()=>{null!=j.tempValueStrAndroid&&null!=I&&q()},[j.sections]),{activeSectionIndex:I,areAllSectionsEmpty:L,error:z,localizedDigits:P,parsedSelectedSections:A,sectionOrder:F,sectionsValueBoundaries:T,state:j,timezone:k,value:w,clearValue:()=>{a.areValuesEqual(t,w,a.emptyValue)?_(e=>tr({},e,{sections:e.sections.map(e=>tr({},e,{value:""})),tempValueStrAndroid:null,characterQuery:null})):(_(e=>tr({},e,{characterQuery:null})),$(a.emptyValue))},clearActiveSection:q,setCharacterQuery:U,setSelectedSections:R,setTempAndroidValueStr:e=>_(t=>tr({},t,{tempValueStrAndroid:e})),updateSectionValue:({section:e,newSectionValue:n,shouldGoToNextSection:r})=>{W.clear(),Y.clear();const o=s.getDateFromSection(w,e);r&&I<j.sections.length-1&&R(I+1);const i=V(I,n),a=s.getDateSectionsFromValue(i,e),l=((e,t,n)=>{const r=t.some(e=>"day"===e.type),o=[],i=[];for(let e=0;e<t.length;e+=1){const a=t[e];r&&"weekDay"===a.type||(o.push(a.format),i.push(TR(a,"non-input",n)))}const a=o.join(" "),s=i.join(" ");return e.parse(s,a)})(t,a,P);if(t.isValid(l)){const n=ER(t,l,a,s.getDateFromSection(j.referenceValue,e),!0);return null==o&&Y.start(0,()=>{C.current===w&&_(t=>tr({},t,{sections:s.clearDateSections(j.sections,e),tempValueStrAndroid:null}))}),$(s.updateDateInValue(w,e,n))}return a.every(e=>""!==e.value)&&(null==o||t.isValid(o))?(H(n),$(s.updateDateInValue(w,e,l))):(null!=o&&(H(n),$(s.updateDateInValue(w,e,l))),_(e=>tr({},e,{sections:i,tempValueStrAndroid:null})))},updateValueFromValueStr:e=>{const o=s.parseValueStr(e,j.referenceValue,(e,o)=>{const i=t.parse(e,p);if(!t.isValid(i))return null;const a=LL({adapter:t,localeText:n,localizedDigits:P,format:p,date:i,formatDensity:h,shouldRespectLeadingZeros:b,enableAccessibleFieldDOMStructure:v,isRtl:r});return ER(t,i,a,o,!1)});$(o)},getSectionsFromValue:O}},zL=()=>G.useContext(KR);function $L(e){const{manager:{internal_useApplyDefaultValuesToFieldInternalProps:t},internalProps:n,skipContextFieldRefAssignment:r}=e,o=zL(),i=QR(),a=js(n.unstableFieldRef,r?null:i?.fieldRef),s=o?.setValue,l=G.useCallback((e,t)=>s?.(e,{validationError:t.validationError,shouldClose:!1}),[s]);return t(G.useMemo(()=>null!=i&&null!=o?tr({value:o.value,onChange:l,timezone:o.timezone,disabled:o.disabled,readOnly:o.readOnly,autoFocus:o.autoFocus&&!o.open,focused:!!o.open||void 0,format:o.fieldFormat,formatDensity:i.formatDensity,enableAccessibleFieldDOMStructure:i.enableAccessibleFieldDOMStructure,selectedSections:i.selectedSections,onSelectedSectionsChange:i.onSelectedSectionsChange,unstableFieldRef:a},n):n,[o,i,n,l,a]))}function VL(e){const{focused:t,domGetters:n,stateResponse:{parsedSelectedSections:r,state:o}}=e;if(!n.isReady())return;const i=Ts(n.getRoot()).getSelection();if(!i)return;if(null==r)return i.rangeCount>0&&i.getRangeAt(0).startContainer instanceof Node&&n.getRoot().contains(i.getRangeAt(0).startContainer)&&i.removeAllRanges(),void(t&&n.getRoot().blur());if(!n.getRoot().contains(tF(n.getRoot())))return;const a=new window.Range;let s;s="all"===r?n.getRoot():"empty"===o.sections[r].type?n.getSectionContainer(r):n.getSectionContent(r),a.selectNodeContents(s),s.focus(),i.removeAllRanges(),i.addRange(a)}function BL(e){const t=dA(),{manager:{internal_fieldValueManager:n},internalPropsWithDefaults:{minutesStep:r,disabled:o,readOnly:i},stateResponse:{state:a,value:s,activeSectionIndex:l,parsedSelectedSections:c,sectionsValueBoundaries:u,localizedDigits:d,timezone:f,sectionOrder:p,clearValue:h,clearActiveSection:m,setSelectedSections:g,updateSectionValue:b}}=e;return zl(e=>{if(!o)switch(!0){case(e.ctrlKey||e.metaKey)&&"A"===String.fromCharCode(e.keyCode)&&!e.shiftKey&&!e.altKey:e.preventDefault(),g("all");break;case"ArrowRight"===e.key:if(e.preventDefault(),null==c)g(p.startIndex);else if("all"===c)g(p.endIndex);else{const e=p.neighbors[c].rightIndex;null!==e&&g(e)}break;case"ArrowLeft"===e.key:if(e.preventDefault(),null==c)g(p.endIndex);else if("all"===c)g(p.startIndex);else{const e=p.neighbors[c].leftIndex;null!==e&&g(e)}break;case"Delete"===e.key:if(e.preventDefault(),i)break;null==c||"all"===c?h():m();break;case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(e.key):{if(e.preventDefault(),i||null==l)break;"all"===c&&g(l);const o=a.sections[l],p=function(e,t,n,r,o,i,a,s){const l=function(e){switch(e){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}}(r),c="Home"===r,u="End"===r,d=""===n.value||c||u;return"digit"===n.contentType||"digit-with-letter"===n.contentType?(()=>{const r=o[n.type]({currentDate:a,format:n.format,contentType:n.contentType}),f=t=>PR(e,t,r,i,n),p="minutes"===n.type&&s?.minutesStep?s.minutesStep:1;let h;if(d){if("year"===n.type&&!u&&!c)return e.formatByString(e.date(void 0,t),n.format);h=l>0||c?r.minimum:r.maximum}else h=parseInt(SR(n.value,i),10)+l*p;return h%p!==0&&((l<0||c)&&(h+=p-(p+h)%p),(l>0||u)&&(h-=h%p)),h>r.maximum?f(r.minimum+(h-r.maximum-1)%(r.maximum-r.minimum+1)):h<r.minimum?f(r.maximum-(r.minimum-h-1)%(r.maximum-r.minimum+1)):f(h)})():(()=>{const r=xR(e,t,n.type,n.format);if(0===r.length)return n.value;if(d)return l>0||c?r[0]:r[r.length-1];const o=r.indexOf(n.value);return r[((o+l)%r.length+r.length)%r.length]})()}(t,f,o,e.key,u,d,n.getDateFromSection(s,o),{minutesStep:r});b({section:o,newSectionValue:p,shouldGoToNextSection:!1});break}}})}function WL(e,t){if(e.value)switch(e.type){case"month":{if("digit"===e.contentType){const n=t.setMonth(t.date(),Number(e.value)-1);return t.isValid(n)?t.format(n,"month"):""}const n=t.parse(e.value,e.format);return n&&t.isValid(n)?t.format(n,"month"):void 0}case"day":if("digit"===e.contentType){const n=t.setDate(t.startOfYear(t.date()),Number(e.value));return t.isValid(n)?t.format(n,"dayOfMonthFull"):""}return e.value;default:return}}function HL(e,t){if(e.value)switch(e.type){case"weekDay":if("letter"===e.contentType)return;return Number(e.value);case"meridiem":{const n=t.parse(`01:00 ${e.value}`,`${t.formats.hours12h}:${t.formats.minutes} ${e.format}`);return n?t.getHours(n)>=12?1:0:void 0}case"day":return"digit-with-letter"===e.contentType?parseInt(e.value,10):Number(e.value);case"month":{if("digit"===e.contentType)return Number(e.value);const n=t.parse(e.value,e.format);return n?t.getMonth(n)+1:void 0}default:return"letter"!==e.contentType?Number(e.value):void 0}}const qL=e=>{const{props:t,manager:n,skipContextFieldRefAssignment:r,manager:{valueType:o,internal_useOpenPickerButtonAriaLabel:i}}=e,{internalProps:a,forwardedProps:s}=EL(t,o),l=$L({manager:n,internalProps:a,skipContextFieldRefAssignment:r}),{sectionListRef:c,onBlur:u,onClick:d,onFocus:f,onInput:p,onPaste:h,onKeyDown:m,onClear:g,clearable:b}=s,{disabled:y=!1,readOnly:v=!1,autoFocus:x=!1,focused:w,unstableFieldRef:S}=l,k=G.useRef(null),C=js(c,k),M=G.useMemo(()=>({isReady:()=>null!=k.current,getRoot:()=>k.current.getRoot(),getSectionContainer:e=>k.current.getSectionContainer(e),getSectionContent:e=>k.current.getSectionContent(e),getSectionIndexFromDOMElement:e=>k.current.getSectionIndexFromDOMElement(e)}),[k]),P=NL({manager:n,internalPropsWithDefaults:l,forwardedProps:s}),{areAllSectionsEmpty:T,error:O,parsedSelectedSections:j,sectionOrder:_,state:D,value:E,clearValue:R,setSelectedSections:A}=P,I=AL({stateResponse:P}),F=i(E),[L,N]=G.useState(!1);function z(e=0){if(y||!k.current||null!=YL(k))return;const t=RR(e,D.sections);N(!0),k.current.getSectionContent(t).focus()}const $=function(e){const{manager:t,focused:n,setFocused:r,domGetters:o,stateResponse:i,applyCharacterEditing:a,internalPropsWithDefaults:s,stateResponse:{parsedSelectedSections:l,sectionOrder:c,state:u,clearValue:d,setCharacterQuery:f,setSelectedSections:p,updateValueFromValueStr:h},internalPropsWithDefaults:{disabled:m=!1,readOnly:g=!1}}=e,b=BL({manager:t,internalPropsWithDefaults:s,stateResponse:i}),y=ol(),v=zl(e=>{!m&&o.isReady()&&(r(!0),"all"===l?y.start(0,()=>{const e=document.getSelection().getRangeAt(0).startOffset;if(0===e)return void p(c.startIndex);let t=0,n=0;for(;n<e&&t<u.sections.length;){const e=u.sections[t];t+=1,n+=`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`.length}p(t-1)}):n?o.getRoot().contains(e.target)||p(c.startIndex):(r(!0),p(c.startIndex)))}),x=zl(e=>{if(!o.isReady()||"all"!==l)return;const t=e.target.textContent??"";o.getRoot().innerHTML=u.sections.map(e=>`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`).join(""),VL({focused:n,domGetters:o,stateResponse:i}),0===t.length||10===t.charCodeAt(0)?(d(),p("all")):t.length>1?h(t):("all"===l&&p(0),a({keyPressed:t,sectionIndex:0}))}),w=zl(e=>{if(g||"all"!==l)return void e.preventDefault();const t=e.clipboardData.getData("text");e.preventDefault(),f(null),h(t)}),S=zl(()=>{if(n||m||!o.isReady())return;const e=tF(o.getRoot());r(!0),null!=o.getSectionIndexFromDOMElement(e)||p(c.startIndex)});return{onKeyDown:b,onBlur:zl(()=>{setTimeout(()=>{if(!o.isReady())return;const e=tF(o.getRoot());!o.getRoot().contains(e)&&(r(!1),p(null))})}),onFocus:S,onClick:v,onPaste:w,onInput:x,contentEditable:"all"===l,tabIndex:s.disabled||0===l?-1:0}}({manager:n,internalPropsWithDefaults:l,stateResponse:P,applyCharacterEditing:I,focused:L,setFocused:N,domGetters:M}),V=function(e){const{manager:{internal_fieldValueManager:t},stateResponse:{areAllSectionsEmpty:n,state:r,updateValueFromValueStr:o}}=e,i=zl(e=>{o(e.target.value)});return{value:G.useMemo(()=>n?"":t.getV7HiddenInputValueFromSections(r.sections),[n,r.sections,t]),onChange:i}}({manager:n,stateResponse:P}),B=function(e){const{stateResponse:{setSelectedSections:t},internalPropsWithDefaults:{disabled:n=!1}}=e,r=G.useCallback(e=>r=>{n||r.isDefaultPrevented()||t(e)},[n,t]);return G.useCallback(e=>({"data-sectionindex":e,onClick:r(e)}),[r])}({stateResponse:P,internalPropsWithDefaults:l}),W=function(e){const t=dA(),n=fA(),{focused:r,domGetters:o,stateResponse:i,applyCharacterEditing:a,manager:{internal_fieldValueManager:s},stateResponse:{parsedSelectedSections:l,sectionsValueBoundaries:c,state:u,value:d,clearActiveSection:f,setCharacterQuery:p,setSelectedSections:h,updateSectionValue:m,updateValueFromValueStr:g},internalPropsWithDefaults:{disabled:b=!1,readOnly:y=!1}}=e,v="all"===l,x=!v&&!b&&!y,w=zl(e=>{if(!o.isReady())return;const t=u.sections[e];o.getSectionContent(e).innerHTML=t.value||t.placeholder,VL({focused:r,domGetters:o,stateResponse:i})}),S=zl(e=>{if(!o.isReady())return;const t=e.target,n=t.textContent??"",r=o.getSectionIndexFromDOMElement(t),i=u.sections[r];if(y)w(r);else{if(0===n.length){if(""===i.value)return void w(r);const t=e.nativeEvent.inputType;return"insertParagraph"===t||"insertLineBreak"===t?void w(r):(w(r),void f())}a({keyPressed:n,sectionIndex:r}),w(r)}}),k=zl(e=>{e.preventDefault()}),C=zl(e=>{if(e.preventDefault(),y||b||"number"!=typeof l)return;const t=u.sections[l],n=e.clipboardData.getData("text"),r=/^[a-zA-Z]+$/.test(n),o=/^[0-9]+$/.test(n),i=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(n);"letter"===t.contentType&&r||"digit"===t.contentType&&o||"digit-with-letter"===t.contentType&&i?(p(null),m({section:t,newSectionValue:n,shouldGoToNextSection:!0})):r||o||(p(null),g(n))}),M=zl(e=>{e.preventDefault(),e.dataTransfer.dropEffect="none"}),P=G.useCallback(e=>()=>{b||h(e)},[b,h]);return G.useCallback((e,r)=>{const o=c[e.type]({currentDate:s.getDateFromSection(d,e),contentType:e.contentType,format:e.format});return{onInput:S,onPaste:C,onMouseUp:k,onDragOver:M,onFocus:P(r),"aria-readonly":y,"aria-valuenow":HL(e,t),"aria-valuemin":o.minimum,"aria-valuemax":o.maximum,"aria-valuetext":e.value?WL(e,t):n.empty,"aria-label":n[e.type],"aria-disabled":b,tabIndex:!x||v||r>0?-1:0,contentEditable:!v&&!b&&!y,role:"spinbutton","data-range-position":e.dateName||void 0,spellCheck:!x&&void 0,autoCapitalize:x?"none":void 0,autoCorrect:x?"off":void 0,children:e.value||e.placeholder,inputMode:"letter"===e.contentType?"text":"numeric"}},[c,v,b,y,x,n,t,S,C,k,M,P,s,d])}({manager:n,stateResponse:P,applyCharacterEditing:I,internalPropsWithDefaults:l,domGetters:M,focused:L}),H=zl(e=>{m?.(e),$.onKeyDown(e)}),q=zl(e=>{u?.(e),$.onBlur(e)}),Y=zl(e=>{f?.(e),$.onFocus(e)}),U=zl(e=>{e.isDefaultPrevented()||(d?.(e),$.onClick(e))}),X=zl(e=>{h?.(e),$.onPaste(e)}),Q=zl(e=>{p?.(e),$.onInput(e)}),K=zl((e,...t)=>{e.preventDefault(),g?.(e,...t),R(),UL(k)?A(_.startIndex):z(0)}),Z=G.useMemo(()=>D.sections.map((e,t)=>{const n=W(e,t);return{container:B(t),content:W(e,t),before:{children:e.startSeparator},after:{children:e.endSeparator,"data-range-position":e.isEndFormatSeparator?n["data-range-position"]:void 0}}}),[D.sections,B,W]);return G.useEffect(()=>{if(null==k.current)throw new Error(["MUI X: The `sectionListRef` prop has not been initialized by `PickersSectionList`","You probably tried to pass a component to the `textField` slot that contains an `<input />` element instead of a `PickersSectionList`.","","If you want to keep using an `<input />` HTML element for the editing, please add the `enableAccessibleFieldDOMStructure={false}` prop to your Picker or Field component:","","<DatePicker enableAccessibleFieldDOMStructure={false} slots={{ textField: MyCustomTextField }} />","","Learn more about the field accessible DOM structure on the MUI documentation: https://mui.com/x/react-date-pickers/fields/#fields-to-edit-a-single-element"].join("\n"));x&&!y&&k.current&&k.current.getSectionContent(_.startIndex).focus()},[]),Kn(()=>{if(L&&k.current)if("all"===j)k.current.getRoot().focus();else if("number"==typeof j){const e=k.current.getSectionContent(j);e&&e.focus()}},[j,L]),Kn(()=>{VL({focused:L,domGetters:M,stateResponse:P})}),G.useImperativeHandle(S,()=>({getSections:()=>D.sections,getActiveSectionIndex:()=>YL(k),setSelectedSections:e=>{if(y||!k.current)return;const t=RR(e,D.sections);N(null!==("all"===t?0:t)),A(e)},focusField:z,isFieldFocused:()=>UL(k)})),tr({},s,$,{onBlur:q,onClick:U,onFocus:Y,onInput:Q,onPaste:X,onKeyDown:H,onClear:K},V,{error:O,clearable:Boolean(b&&!T&&!v&&!y),focused:w??L,sectionListRef:C,enableAccessibleFieldDOMStructure:!0,elements:Z,areAllSectionsEmpty:T,disabled:y,readOnly:v,autoFocus:x,openPickerAriaLabel:F})};function YL(e){const t=tF(e.current?.getRoot());return t&&e.current&&e.current.getRoot().contains(t)?e.current.getSectionIndexFromDOMElement(t):null}function UL(e){const t=tF(e.current?.getRoot());return!!e.current&&e.current.getRoot().contains(t)}const GL=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),XL=e=>{const t=Hn(),n=ol(),r=ol(),{props:o,manager:i,skipContextFieldRefAssignment:a,manager:{valueType:s,internal_valueManager:l,internal_fieldValueManager:c,internal_useOpenPickerButtonAriaLabel:u}}=e,{internalProps:d,forwardedProps:f}=EL(o,s),p=$L({manager:i,internalProps:d,skipContextFieldRefAssignment:a}),{onFocus:h,onClick:m,onPaste:g,onBlur:b,onKeyDown:y,onClear:v,clearable:x,inputRef:w,placeholder:S}=f,{readOnly:k=!1,disabled:C=!1,autoFocus:M=!1,focused:P,unstableFieldRef:T}=p,O=G.useRef(null),j=js(w,O),_=NL({manager:i,internalPropsWithDefaults:p,forwardedProps:f}),{activeSectionIndex:D,areAllSectionsEmpty:E,error:R,localizedDigits:A,parsedSelectedSections:I,sectionOrder:F,state:L,value:N,clearValue:z,clearActiveSection:$,setCharacterQuery:V,setSelectedSections:B,setTempAndroidValueStr:W,updateSectionValue:H,updateValueFromValueStr:q,getSectionsFromValue:Y}=_,U=AL({stateResponse:_}),X=u(N),Q=G.useMemo(()=>((e,t,n)=>{let r=0,o=n?1:0;const i=[];for(let a=0;a<e.length;a+=1){const s=e[a],l=TR(s,n?"input-rtl":"input-ltr",t),c=`${s.startSeparator}${l}${s.endSeparator}`,u=GL(c).length,d=c.length,f=GL(l),p=o+(""===f?0:l.indexOf(f[0]))+s.startSeparator.length,h=p+f.length;i.push(tr({},s,{start:r,end:r+u,startInInput:p,endInInput:h})),r+=u,o+=d}return i})(L.sections,A,t),[L.sections,A,t]);function K(){const e=O.current.selectionStart??0;let t;t=e<=Q[0].startInInput||e>=Q[Q.length-1].endInInput?1:Q.findIndex(t=>t.startInInput-t.startSeparator.length>e);const n=-1===t?Q.length-1:t-1;B(n)}function Z(e=0){tF(O.current)!==O.current&&(O.current?.focus(),B(e))}const J=zl(e=>{h?.(e);const t=O.current;n.start(0,()=>{t&&t===O.current&&null==D&&(t.value.length&&Number(t.selectionEnd)-Number(t.selectionStart)===t.value.length?B("all"):K())})}),ee=zl((e,...t)=>{e.isDefaultPrevented()||(m?.(e,...t),K())}),te=zl(e=>{if(g?.(e),e.preventDefault(),k||C)return;const t=e.clipboardData.getData("text");if("number"==typeof I){const e=L.sections[I],n=/^[a-zA-Z]+$/.test(t),r=/^[0-9]+$/.test(t),o=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(t);if("letter"===e.contentType&&n||"digit"===e.contentType&&r||"digit-with-letter"===e.contentType&&o)return V(null),void H({section:e,newSectionValue:t,shouldGoToNextSection:!0});if(n||r)return}V(null),q(t)}),ne=zl(e=>{b?.(e),B(null)}),re=zl(e=>{if(k)return;const n=e.target.value;if(""===n)return void z();const r=e.nativeEvent.data,o=r&&r.length>1,i=o?r:n,a=GL(i);if("all"===I&&B(D),null==D||o)return void q(o?r:a);let s;if("all"===I&&1===a.length)s=a;else{const e=GL(c.getV6InputValueFromSections(Q,A,t));let n=-1,r=-1;for(let t=0;t<e.length;t+=1)-1===n&&e[t]!==a[t]&&(n=t),-1===r&&e[e.length-t-1]!==a[a.length-t-1]&&(r=t);const o=Q[D];if(n<o.start||e.length-r-1>o.end)return;const i=a.length-e.length+o.end-GL(o.endSeparator||"").length;s=a.slice(o.start+GL(o.startSeparator||"").length,i)}if(0===s.length)return navigator.userAgent.toLowerCase().includes("android")&&W(i),void $();U({keyPressed:s,sectionIndex:D})}),oe=zl((e,...t)=>{e.preventDefault(),v?.(e,...t),z(),QL(O)?B(F.startIndex):Z(0)}),ie=BL({manager:i,internalPropsWithDefaults:p,stateResponse:_}),ae=zl(e=>{y?.(e),ie(e)}),se=G.useMemo(()=>void 0!==S?S:c.getV6InputValueFromSections(Y(l.emptyValue),A,t),[S,c,Y,l.emptyValue,A,t]),le=G.useMemo(()=>L.tempValueStrAndroid??c.getV6InputValueFromSections(L.sections,A,t),[L.sections,c,L.tempValueStrAndroid,A,t]);G.useEffect(()=>{O.current&&O.current===tF(O.current)&&B("all")},[]),Kn(()=>{!function e(){if(!O.current)return;if(null==I)return void(O.current.scrollLeft&&(O.current.scrollLeft=0));if(O.current!==tF(O.current))return;const t=O.current.scrollTop;if("all"===I)O.current.select();else{const t=Q[I],n="empty"===t.type?t.startInInput-t.startSeparator.length:t.startInInput,o="empty"===t.type?t.endInInput+t.endSeparator.length:t.endInInput;n===O.current.selectionStart&&o===O.current.selectionEnd||O.current===tF(O.current)&&O.current.setSelectionRange(n,o),r.start(0,()=>{!O.current||O.current!==tF(O.current)||O.current.selectionStart!==O.current.selectionEnd||O.current.selectionStart===n&&O.current.selectionEnd===o||e()})}O.current.scrollTop=t}()});const ce=G.useMemo(()=>null==D||"letter"===L.sections[D].contentType?"text":"numeric",[D,L.sections]),ue=!(O.current&&O.current===tF(O.current))&&E;return G.useImperativeHandle(T,()=>({getSections:()=>L.sections,getActiveSectionIndex:()=>{const e=O.current.selectionStart??0,t=O.current.selectionEnd??0;if(0===e&&0===t)return null;const n=e<=Q[0].startInInput?1:Q.findIndex(t=>t.startInInput-t.startSeparator.length>e);return-1===n?Q.length-1:n-1},setSelectedSections:e=>B(e),focusField:Z,isFieldFocused:()=>QL(O)})),tr({},f,{error:R,"aria-invalid":R,clearable:Boolean(x&&!E&&!k&&!C),onBlur:ne,onClick:ee,onFocus:J,onPaste:te,onKeyDown:ae,onClear:oe,inputRef:j,enableAccessibleFieldDOMStructure:!1,placeholder:se,inputMode:ce,autoComplete:"off",value:ue?"":le,onChange:re,focused:P,disabled:C,readOnly:k,autoFocus:M,openPickerAriaLabel:X})};function QL(e){return e.current===tF(e.current)}const KL=e=>{const t=QR();return(e.props.enableAccessibleFieldDOMStructure??t?.enableAccessibleFieldDOMStructure??1?qL:XL)(e)};function ZL(e){return ss("MuiFormHelperText",e)}const JL=ls("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var eN;const tN=Ka("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${ts(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(gs(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${JL.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${JL.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:e})=>e.contained,style:{marginLeft:14,marginRight:14}}]}))),nN=G.forwardRef(function(e,t){const n=Za({props:e,name:"MuiFormHelperText"}),{children:r,className:o,component:i="p",disabled:a,error:s,filled:l,focused:c,margin:u,required:d,variant:f,...p}=n,h=ps({props:n,muiFormControl:hs(),states:["variant","size","disabled","error","filled","focused","required"]}),m={...n,component:i,contained:"filled"===h.variant||"outlined"===h.variant,variant:h.variant,size:h.size,disabled:h.disabled,error:h.error,filled:h.filled,focused:h.focused,required:h.required};delete m.ownerState;const g=(e=>{const{classes:t,contained:n,size:r,disabled:o,error:i,filled:a,focused:s,required:l}=e;return Na({root:["root",o&&"disabled",i&&"error",r&&`size${ts(r)}`,n&&"contained",s&&"focused",a&&"filled",l&&"required"]},ZL,t)})(m);return(0,le.jsx)(tN,{as:i,className:Un(g.root,o),ref:t,...p,ownerState:m,children:" "===r?eN||(eN=(0,le.jsx)("span",{className:"notranslate","aria-hidden":!0,children:""})):r})});function rN(e){return ss("MuiTextField",e)}ls("MuiTextField",["root"]);const oN={standard:fu,filled:yu,outlined:Ou},iN=Ka(fs,{name:"MuiTextField",slot:"Root"})({}),aN=G.forwardRef(function(e,t){const n=Za({props:e,name:"MuiTextField"}),{autoComplete:r,autoFocus:o=!1,children:i,className:a,color:s="primary",defaultValue:l,disabled:c=!1,error:u=!1,FormHelperTextProps:d,fullWidth:f=!1,helperText:p,id:h,InputLabelProps:m,inputProps:g,InputProps:b,inputRef:y,label:v,maxRows:x,minRows:w,multiline:S=!1,name:k,onBlur:C,onChange:M,onFocus:P,placeholder:T,required:O=!1,rows:j,select:_=!1,SelectProps:D,slots:E={},slotProps:R={},type:A,value:I,variant:F="outlined",...L}=n,N={...n,autoFocus:o,color:s,disabled:c,error:u,fullWidth:f,multiline:S,required:O,select:_,variant:F},z=(e=>{const{classes:t}=e;return Na({root:["root"]},rN,t)})(N),$=er(h),V=p&&$?`${$}-helper-text`:void 0,B=v&&$?`${$}-label`:void 0,W=oN[F],H={slots:E,slotProps:{input:b,inputLabel:m,htmlInput:g,formHelperText:d,select:D,...R}},q={},Y=H.slotProps.inputLabel;"outlined"===F&&(Y&&void 0!==Y.shrink&&(q.notched=Y.shrink),q.label=v),_&&(D&&D.native||(q.id=void 0),q["aria-describedby"]=void 0);const[U,G]=El("root",{elementType:iN,shouldForwardComponentProp:!0,externalForwardedProps:{...H,...L},ownerState:N,className:Un(z.root,a),ref:t,additionalProps:{disabled:c,error:u,fullWidth:f,required:O,color:s,variant:F}}),[X,Q]=El("input",{elementType:W,externalForwardedProps:H,additionalProps:q,ownerState:N}),[K,Z]=El("inputLabel",{elementType:Ms,externalForwardedProps:H,ownerState:N}),[J,ee]=El("htmlInput",{elementType:"input",externalForwardedProps:H,ownerState:N}),[te,ne]=El("formHelperText",{elementType:nN,externalForwardedProps:H,ownerState:N}),[re,oe]=El("select",{elementType:Au,externalForwardedProps:H,ownerState:N}),ie=(0,le.jsx)(X,{"aria-describedby":V,autoComplete:r,autoFocus:o,defaultValue:l,fullWidth:f,multiline:S,name:k,rows:j,maxRows:x,minRows:w,type:A,value:I,id:$,inputRef:y,onBlur:C,onChange:M,onFocus:P,placeholder:T,inputProps:ee,slots:{input:E.htmlInput?J:void 0},...Q});return(0,le.jsxs)(U,{...G,children:[null!=v&&""!==v&&(0,le.jsx)(K,{htmlFor:$,id:B,...Z,children:v}),_?(0,le.jsx)(re,{"aria-describedby":V,id:$,labelId:B,value:I,input:ie,...oe,children:i}):ie,p&&(0,le.jsx)(te,{id:V,...ne,children:p})]})}),sN=aN;function lN(e){return ss("MuiIconButton",e)}const cN=ls("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),uN=Ka(nd,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,"default"!==n.color&&t[`color${ts(n.color)}`],n.edge&&t[`edge${ts(n.edge)}`],t[`size${ts(n.size)}`]]}})(gs(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),gs(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(bs()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(bs()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${cN.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${cN.loading}`]:{color:"transparent"}}))),dN=Ka("span",{name:"MuiIconButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),fN=G.forwardRef(function(e,t){const n=Za({props:e,name:"MuiIconButton"}),{edge:r=!1,children:o,className:i,color:a="default",disabled:s=!1,disableFocusRipple:l=!1,size:c="medium",id:u,loading:d=null,loadingIndicator:f,...p}=n,h=CF(u),m=f??(0,le.jsx)(FF,{"aria-labelledby":h,color:"inherit",size:16}),g={...n,edge:r,color:a,disabled:s,disableFocusRipple:l,loading:d,loadingIndicator:m,size:c},b=(e=>{const{classes:t,disabled:n,color:r,edge:o,size:i,loading:a}=e;return Na({root:["root",a&&"loading",n&&"disabled","default"!==r&&`color${ts(r)}`,o&&`edge${ts(o)}`,`size${ts(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},lN,t)})(g);return(0,le.jsxs)(uN,{id:d?h:u,className:Un(b.root,i),centerRipple:!0,focusRipple:!l,disabled:s||d,ref:t,...p,ownerState:g,children:["boolean"==typeof d&&(0,le.jsx)("span",{className:b.loadingWrapper,style:{display:"contents"},children:(0,le.jsx)(dN,{className:b.loadingIndicator,ownerState:g,children:d&&m})}),o]})});function pN(e){return ss("MuiInputAdornment",e)}const hN=ls("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var mN;const gN=Ka("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${ts(n.position)}`],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})(gs(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${hN.positionStart}&:not(.${hN.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),bN=G.forwardRef(function(e,t){const n=Za({props:e,name:"MuiInputAdornment"}),{children:r,className:o,component:i="div",disablePointerEvents:a=!1,disableTypography:s=!1,position:l,variant:c,...u}=n,d=hs()||{};let f=c;c&&d.variant,d&&!f&&(f=d.variant);const p={...n,hiddenLabel:d.hiddenLabel,size:d.size,disablePointerEvents:a,position:l,variant:f},h=(e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:i,variant:a}=e;return Na({root:["root",n&&"disablePointerEvents",o&&`position${ts(o)}`,a,r&&"hiddenLabel",i&&`size${ts(i)}`]},pN,t)})(p);return(0,le.jsx)(rs.Provider,{value:null,children:(0,le.jsx)(gN,{as:i,ownerState:p,className:Un(h.root,o),ref:t,...u,children:"string"!=typeof r||s?(0,le.jsxs)(G.Fragment,{children:["start"===l?mN||(mN=(0,le.jsx)("span",{className:"notranslate","aria-hidden":!0,children:""})):null,r]}):(0,le.jsx)(BR,{color:"textSecondary",children:r})})})}),yN=bN,vN=Number("7");function xN(e){const{ownerState:t}=nA(),n=Hn();return G.useMemo(()=>tr({},t,{isFieldDisabled:e.disabled??!1,isFieldReadOnly:e.readOnly??!1,isFieldRequired:e.required??!1,fieldDirection:n?"rtl":"ltr"}),[t,e.disabled,e.readOnly,e.required,n])}Number("3"),Number("5");const wN=Bc((0,le.jsx)("path",{d:"M7 10l5 5 5-5z"})),SN=Bc((0,le.jsx)("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"})),kN=Bc((0,le.jsx)("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})),CN=Bc((0,le.jsx)("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"})),MN=Bc((0,le.jsxs)(G.Fragment,{children:[(0,le.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,le.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})),PN=Bc((0,le.jsx)("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"})),TN=Bc((0,le.jsxs)(G.Fragment,{children:[(0,le.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,le.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})),ON=Bc((0,le.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}));function jN(e){return ss("MuiPickersTextField",e)}function _N(e){return ss("MuiPickersInputBase",e)}ls("MuiPickersTextField",["root","focused","disabled","error","required"]);const DN=ls("MuiPickersInputBase",["root","focused","disabled","error","notchedOutline","sectionContent","sectionBefore","sectionAfter","adornedStart","adornedEnd","input","inputSizeSmall","activeBar"]);function EN(e){return ss("MuiPickersOutlinedInput",e)}const RN=tr({},DN,ls("MuiPickersOutlinedInput",["root","notchedOutline","input"])),AN=G.createContext(null),IN=()=>{const e=G.useContext(AN);if(null==e)throw new Error(["MUI X: The `usePickerTextFieldOwnerState` can only be called in components that are used inside a PickerTextField component"].join("\n"));return e},FN=["children","className","label","notched","shrink"],LN=Ka("fieldset",{name:"MuiPickersOutlinedInput",slot:"NotchedOutline"})(({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%",borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),NN=Ka("span",{slot:"internal",shouldForwardProp:void 0})(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit"})),zN=Ka("legend",{slot:"internal",shouldForwardProp:e=>Va(e)&&"notched"!==e})(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:{inputHasLabel:!1},style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:{inputHasLabel:!0},style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:{inputHasLabel:!0,notched:!0},style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]}));function $N(e){const{className:t,label:n,notched:r}=e,o=il(e,FN),i=IN();return(0,le.jsx)(LN,tr({"aria-hidden":!0,className:t},o,{ownerState:i,children:(0,le.jsx)(zN,{ownerState:i,notched:r,children:n?(0,le.jsx)(NN,{children:n}):(0,le.jsx)(NN,{className:"notranslate",children:""})})}))}function VN(e){return ss("MuiPickersSectionList",e)}const BN=ls("MuiPickersSectionList",["root","section","sectionContent"]),WN=["slots","slotProps","elements","sectionListRef","classes"],HN=Ka("div",{name:"MuiPickersSectionList",slot:"Root"})({direction:"ltr /*! @noflip */",outline:"none"}),qN=Ka("span",{name:"MuiPickersSectionList",slot:"Section"})({}),YN=Ka("span",{name:"MuiPickersSectionList",slot:"SectionSeparator"})({whiteSpace:"pre"}),UN=Ka("span",{name:"MuiPickersSectionList",slot:"SectionContent"})({outline:"none"});function GN(e){const{slots:t,slotProps:n,element:r,classes:o}=e,{ownerState:i}=nA(),a=t?.section??qN,s=Fs({elementType:a,externalSlotProps:n?.section,externalForwardedProps:r.container,className:o.section,ownerState:i}),l=t?.sectionContent??UN,c=Fs({elementType:l,externalSlotProps:n?.sectionContent,externalForwardedProps:r.content,additionalProps:{suppressContentEditableWarning:!0},className:o.sectionContent,ownerState:i}),u=t?.sectionSeparator??YN,d=Fs({elementType:u,externalSlotProps:n?.sectionSeparator,externalForwardedProps:r.before,ownerState:tr({},i,{separatorPosition:"before"})}),f=Fs({elementType:u,externalSlotProps:n?.sectionSeparator,externalForwardedProps:r.after,ownerState:tr({},i,{separatorPosition:"after"})}),p=G.useRef(null),h=js(c.ref,p);return(0,le.jsxs)(a,tr({},s,{children:[(0,le.jsx)(u,tr({},d)),(0,le.jsx)(l,tr({},c,{ref:h,onBlur:e=>{const t=e.relatedTarget,n=e.currentTarget.closest(`.${BN.root}`);n&&t instanceof Node&&n.contains(t)&&e.stopPropagation()}})),(0,le.jsx)(u,tr({},f))]}))}const XN=G.forwardRef(function(e,t){const n=UE({props:e,name:"MuiPickersSectionList"}),{slots:r,slotProps:o,elements:i,sectionListRef:a,classes:s}=n,l=il(n,WN),c=(e=>Na({root:["root"],section:["section"],sectionContent:["sectionContent"]},VN,e))(s),{ownerState:u}=nA(),d=G.useRef(null),f=js(t,d),p=e=>{if(!d.current)throw new Error(`MUI X: Cannot call sectionListRef.${e} before the mount of the component.`);return d.current};G.useImperativeHandle(a,()=>({getRoot:()=>p("getRoot"),getSectionContainer:e=>p("getSectionContainer").querySelector(`.${BN.section}[data-sectionindex="${e}"]`),getSectionContent:e=>p("getSectionContent").querySelector(`.${BN.section}[data-sectionindex="${e}"] .${BN.sectionContent}`),getSectionIndexFromDOMElement(e){const t=p("getSectionIndexFromDOMElement");if(null==e||!t.contains(e))return null;let n=null;return e.classList.contains(BN.section)?n=e:e.classList.contains(BN.sectionContent)&&(n=e.parentElement),null==n?null:Number(n.dataset.sectionindex)}}));const h=r?.root??HN,m=Fs({elementType:h,externalSlotProps:o?.root,externalForwardedProps:l,additionalProps:{ref:f,suppressContentEditableWarning:!0},className:c.root,ownerState:u});return(0,le.jsx)(h,tr({},m,{children:m.contentEditable?i.map(({content:e,before:t,after:n})=>`${t.children}${e.children}${n.children}`).join(""):(0,le.jsx)(G.Fragment,{children:i.map((e,t)=>(0,le.jsx)(GN,{slots:r,slotProps:o,element:e,classes:c},t))})}))}),QN=["elements","areAllSectionsEmpty","defaultValue","label","value","onChange","id","autoFocus","endAdornment","startAdornment","renderSuffix","slots","slotProps","contentEditable","tabIndex","onInput","onPaste","onKeyDown","fullWidth","name","readOnly","inputProps","inputRef","sectionListRef","onFocus","onBlur","classes","ownerState"],KN=e=>Math.round(1e5*e)/1e5,ZN=Ka("div",{name:"MuiPickersInputBase",slot:"Root"})(({theme:e})=>tr({},e.typography.body1,{color:(e.vars||e).palette.text.primary,cursor:"text",padding:0,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",boxSizing:"border-box",letterSpacing:`${KN(.15/16)}em`,variants:[{props:{isInputInFullWidth:!0},style:{width:"100%"}}]})),JN=Ka(HN,{name:"MuiPickersInputBase",slot:"SectionsContainer"})(({theme:e})=>({padding:"4px 0 5px",fontFamily:e.typography.fontFamily,fontSize:"inherit",lineHeight:"1.4375em",flexGrow:1,outline:"none",display:"flex",flexWrap:"nowrap",overflow:"hidden",letterSpacing:"inherit",width:"182px",variants:[{props:{fieldDirection:"rtl"},style:{justifyContent:"end"}},{props:{inputSize:"small"},style:{paddingTop:1}},{props:{hasStartAdornment:!1,isFieldFocused:!1,isFieldValueEmpty:!0},style:{color:"currentColor",opacity:0}},{props:{hasStartAdornment:!1,isFieldFocused:!1,isFieldValueEmpty:!0,inputHasLabel:!1},style:e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:"light"===e.palette.mode?.42:.5}},{props:{hasStartAdornment:!1,isFieldFocused:!1,isFieldValueEmpty:!0,inputHasLabel:!0,isLabelShrunk:!0},style:e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:"light"===e.palette.mode?.42:.5}}]})),ez=Ka(qN,{name:"MuiPickersInputBase",slot:"Section"})(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit",letterSpacing:"inherit",lineHeight:"1.4375em",display:"inline-block",whiteSpace:"nowrap"})),tz=Ka(UN,{name:"MuiPickersInputBase",slot:"SectionContent",overridesResolver:(e,t)=>t.content})(({theme:e})=>({fontFamily:e.typography.fontFamily,lineHeight:"1.4375em",letterSpacing:"inherit",width:"fit-content",outline:"none"})),nz=Ka(YN,{name:"MuiPickersInputBase",slot:"Separator"})(()=>({whiteSpace:"pre",letterSpacing:"inherit"})),rz=Ka("input",{name:"MuiPickersInputBase",slot:"Input",overridesResolver:(e,t)=>t.hiddenInput})(tr({},{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"})),oz=Ka("div",{name:"MuiPickersInputBase",slot:"ActiveBar"})(({theme:e,ownerState:t})=>({display:"none",position:"absolute",height:2,bottom:2,borderTopLeftRadius:2,borderTopRightRadius:2,transition:e.transitions.create(["width","left"],{duration:e.transitions.duration.shortest}),backgroundColor:(e.vars||e).palette.primary.main,'[data-active-range-position="start"] &, [data-active-range-position="end"] &':{display:"block"},'[data-active-range-position="start"] &':{left:t.sectionOffsets[0]},'[data-active-range-position="end"] &':{left:t.sectionOffsets[1]}}));function iz(e,t,n,r){if(e.content.id){const e=t.current?.querySelectorAll(`[data-sectionindex="${n}"] [data-range-position="${r}"]`);if(e)return Array.from(e).reduce((e,t)=>e+t.offsetWidth,0)}return 0}const az=G.forwardRef(function(e,t){const n=UE({props:e,name:"MuiPickersInputBase"}),{elements:r,areAllSectionsEmpty:o,value:i,onChange:a,id:s,endAdornment:l,startAdornment:c,renderSuffix:u,slots:d,slotProps:f,contentEditable:p,tabIndex:h,onInput:m,onPaste:g,onKeyDown:b,name:y,readOnly:v,inputProps:x,inputRef:w,sectionListRef:S,onFocus:k,onBlur:C,classes:M,ownerState:P}=n,T=il(n,QN),O=IN(),j=G.useRef(null),_=G.useRef(null),D=G.useRef([]),E=js(t,j),R=js(x?.ref,w),A=hs();if(!A)throw new Error("MUI X: PickersInputBase should always be used inside a PickersTextField component");const I=P??O,F=e=>{A.onFocus?.(e),k?.(e)};G.useEffect(()=>{A&&A.setAdornedStart(Boolean(c))},[A,c]),G.useEffect(()=>{A&&(o?A.onEmpty():A.onFilled())},[A,o]);const L=((e,t)=>{const{isFieldFocused:n,isFieldDisabled:r,isFieldReadOnly:o,hasFieldError:i,inputSize:a,isInputInFullWidth:s,inputColor:l,hasStartAdornment:c,hasEndAdornment:u}=t;return Na({root:["root",n&&!r&&"focused",r&&"disabled",o&&"readOnly",i&&"error",s&&"fullWidth",`color${Er(l)}`,"small"===a&&"inputSizeSmall",c&&"adornedStart",u&&"adornedEnd"],notchedOutline:["notchedOutline"],input:["input"],sectionsContainer:["sectionsContainer"],sectionContent:["sectionContent"],sectionBefore:["sectionBefore"],sectionAfter:["sectionAfter"],activeBar:["activeBar"]},_N,e)})(M,I),N=d?.root||ZN,z=Fs({elementType:N,externalSlotProps:f?.root,externalForwardedProps:T,additionalProps:{"aria-invalid":A.error,ref:E},className:L.root,ownerState:I}),$=d?.input||JN,V=r.some(e=>void 0!==e.content["data-range-position"]);return G.useEffect(()=>{if(!V||!I.isPickerOpen)return;const{activeBarWidth:e,sectionOffsets:t}=function(e,t){let n=0;const r=t.current?.getAttribute("data-active-range-position");if("end"===r)for(let r=e.length-1;r>=e.length/2;r-=1)n+=iz(e[r],t,r,"end");else for(let r=0;r<e.length/2;r+=1)n+=iz(e[r],t,r,"start");return{activeBarWidth:n,sectionOffsets:[t.current?.querySelector('[data-sectionindex="0"]')?.offsetLeft||0,t.current?.querySelector(`[data-sectionindex="${e.length/2}"]`)?.offsetLeft||0]}}(r,j);D.current=[t[0],t[1]],_.current&&(_.current.style.width=`${e}px`)},[r,V,I.isPickerOpen]),(0,le.jsxs)(N,tr({},z,{children:[c,(0,le.jsx)(XN,{sectionListRef:S,elements:r,contentEditable:p,tabIndex:h,className:L.sectionsContainer,onFocus:F,onBlur:e=>{A.onBlur?.(e),C?.(e)},onInput:m,onPaste:g,onKeyDown:e=>{if(b?.(e),"Enter"===e.key&&!e.defaultMuiPrevented){if(j.current?.dataset.multiInput)return;const t=j.current?.closest("form"),n=t?.querySelector('[type="submit"]');if(!t||!n)return;e.preventDefault(),t.requestSubmit(n)}},slots:{root:$,section:ez,sectionContent:tz,sectionSeparator:nz},slotProps:{root:tr({},f?.input,{ownerState:I}),sectionContent:{className:DN.sectionContent},sectionSeparator:({separatorPosition:e})=>({className:"before"===e?DN.sectionBefore:DN.sectionAfter})}}),l,u?u(tr({},A)):null,(0,le.jsx)(rz,tr({name:y,className:L.input,value:i,onChange:a,id:s,"aria-hidden":"true",tabIndex:-1,readOnly:v,required:A.required,disabled:A.disabled,onFocus:e=>{F(e)}},x,{ref:R})),V&&(0,le.jsx)(oz,{className:L.activeBar,ref:_,ownerState:{sectionOffsets:D.current}})]}))}),sz=["label","autoFocus","ownerState","classes","notched"],lz=Ka(ZN,{name:"MuiPickersOutlinedInput",slot:"Root"})(({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{padding:"0 14px",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${RN.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${RN.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${RN.focused} .${RN.notchedOutline}`]:{borderStyle:"solid",borderWidth:2},[`&.${RN.disabled}`]:{[`& .${RN.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled},"*":{color:(e.vars||e).palette.action.disabled}},[`&.${RN.error} .${RN.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},variants:Object.keys((e.vars??e).palette).filter(t=>(e.vars??e).palette[t]?.main??!1).map(t=>({props:{inputColor:t},style:{[`&.${RN.focused}:not(.${RN.error}) .${RN.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}}))}}),cz=Ka(JN,{name:"MuiPickersOutlinedInput",slot:"SectionsContainer"})({padding:"16.5px 0",variants:[{props:{inputSize:"small"},style:{padding:"8.5px 0"}}]}),uz=G.forwardRef(function(e,t){const n=UE({props:e,name:"MuiPickersOutlinedInput"}),{label:r,classes:o,notched:i}=n,a=il(n,sz),s=hs(),l=(e=>tr({},e,Na({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},EN,e)))(o);return(0,le.jsx)(az,tr({slots:{root:lz,input:cz},renderSuffix:e=>(0,le.jsx)($N,{shrink:Boolean(i||e.adornedStart||e.focused||e.filled),notched:Boolean(i||e.adornedStart||e.focused||e.filled),className:l.notchedOutline,label:null!=r&&""!==r&&s?.required?(0,le.jsxs)(G.Fragment,{children:[r," ","*"]}):r})},a,{label:r,classes:l,ref:t}))});function dz(e){return ss("MuiPickersFilledInput",e)}uz.muiName="Input";const fz=tr({},DN,ls("MuiPickersFilledInput",["root","underline","input"])),pz=["label","autoFocus","disableUnderline","hiddenLabel","classes"],hz=Ka(ZN,{name:"MuiPickersFilledInput",slot:"Root",shouldForwardProp:e=>Va(e)&&"disableUnderline"!==e})(({theme:e})=>{const t="light"===e.palette.mode,n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${fz.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${fz.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[...Object.keys((e.vars??e).palette).filter(t=>(e.vars??e).palette[t].main).map(t=>({props:{inputColor:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t]?.main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${fz.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${fz.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${fz.disabled}, .${fz.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${fz.disabled}:before`]:{borderBottomStyle:"dotted"}}},{props:{hasStartAdornment:!0},style:{paddingLeft:12}},{props:{hasEndAdornment:!0},style:{paddingRight:12}}]}}),mz=Ka(JN,{name:"MuiPickersFilledInput",slot:"sectionsContainer",shouldForwardProp:e=>Va(e)&&"hiddenLabel"!==e})({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,variants:[{props:{inputSize:"small"},style:{paddingTop:21,paddingBottom:4}},{props:{hasStartAdornment:!0},style:{paddingLeft:0}},{props:{hasEndAdornment:!0},style:{paddingRight:0}},{props:{hiddenLabel:!0},style:{paddingTop:16,paddingBottom:17}},{props:{hiddenLabel:!0,inputSize:"small"},style:{paddingTop:8,paddingBottom:9}}]}),gz=G.forwardRef(function(e,t){const n=UE({props:e,name:"MuiPickersFilledInput"}),{label:r,disableUnderline:o=!1,hiddenLabel:i=!1,classes:a}=n,s=il(n,pz),l=tr({},IN(),{inputHasUnderline:!o}),c=((e,t)=>{const{inputHasUnderline:n}=t;return tr({},e,Na({root:["root",n&&"underline"],input:["input"]},dz,e))})(a,l);return(0,le.jsx)(az,tr({slots:{root:hz,input:mz},slotProps:{root:{disableUnderline:o},input:{hiddenLabel:i}}},s,{label:r,classes:c,ref:t,ownerState:l}))});function bz(e){return ss("MuiPickersFilledInput",e)}gz.muiName="Input";const yz=tr({},DN,ls("MuiPickersInput",["root","underline","input"])),vz=["label","autoFocus","disableUnderline","ownerState","classes"],xz=Ka(ZN,{name:"MuiPickersInput",slot:"Root",shouldForwardProp:e=>Va(e)&&"disableUnderline"!==e})(({theme:e})=>{let t="light"===e.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(t=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{"label + &":{marginTop:16},variants:[...Object.keys((e.vars??e).palette).filter(t=>(e.vars??e).palette[t].main).map(t=>({props:{inputColor:t,inputHasUnderline:!0},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}})),{props:{inputHasUnderline:!0},style:{"&::after":{background:"red",left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${yz.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${yz.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${t}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${yz.disabled}, .${yz.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${yz.disabled}:before`]:{borderBottomStyle:"dotted"}}}]}}),wz=G.forwardRef(function(e,t){const n=UE({props:e,name:"MuiPickersInput"}),{label:r,disableUnderline:o=!1,classes:i}=n,a=il(n,vz),s=tr({},IN(),{inputHasUnderline:!o}),l=((e,t)=>{const{inputHasUnderline:n}=t;return tr({},e,Na({root:["root",!n&&"underline"],input:["input"]},bz,e))})(i,s);return(0,le.jsx)(az,tr({slots:{root:xz},slotProps:{root:{disableUnderline:o}}},a,{ownerState:s,label:r,classes:l,ref:t}))});wz.muiName="Input";const Sz=["onFocus","onBlur","className","classes","color","disabled","error","variant","required","hiddenLabel","InputProps","inputProps","inputRef","sectionListRef","elements","areAllSectionsEmpty","onClick","onKeyDown","onKeyUp","onPaste","onInput","endAdornment","startAdornment","tabIndex","contentEditable","focused","value","onChange","fullWidth","id","name","helperText","FormHelperTextProps","label","InputLabelProps","data-active-range-position"],kz={standard:wz,filled:gz,outlined:uz},Cz=Ka(fs,{name:"MuiPickersTextField",slot:"Root"})({maxWidth:"100%"}),Mz=G.forwardRef(function(e,t){const n=UE({props:e,name:"MuiPickersTextField"}),{onFocus:r,onBlur:o,className:i,classes:a,color:s="primary",disabled:l=!1,error:c=!1,variant:u="outlined",required:d=!1,hiddenLabel:f=!1,InputProps:p,inputProps:h,inputRef:m,sectionListRef:g,elements:b,areAllSectionsEmpty:y,onClick:v,onKeyDown:x,onKeyUp:w,onPaste:S,onInput:k,endAdornment:C,startAdornment:M,tabIndex:P,contentEditable:T,focused:O,value:j,onChange:_,fullWidth:D,id:E,name:R,helperText:A,FormHelperTextProps:I,label:F,InputLabelProps:L,"data-active-range-position":N}=n,z=il(n,Sz),$=js(t,G.useRef(null)),V=er(E),B=A&&V?`${V}-helper-text`:void 0,W=F&&V?`${V}-label`:void 0,H=xN({disabled:n.disabled,required:n.required,readOnly:p?.readOnly}),q=G.useMemo(()=>tr({},H,{isFieldValueEmpty:y,isFieldFocused:O??!1,hasFieldError:c??!1,inputSize:n.size??"medium",inputColor:s??"primary",isInputInFullWidth:D??!1,hasStartAdornment:Boolean(M??p?.startAdornment),hasEndAdornment:Boolean(C??p?.endAdornment),inputHasLabel:!!F,isLabelShrunk:Boolean(L?.shrink)}),[H,y,O,c,n.size,s,D,M,C,p?.startAdornment,p?.endAdornment,F,L?.shrink]),Y=((e,t)=>{const{isFieldFocused:n,isFieldDisabled:r,isFieldRequired:o}=t;return Na({root:["root",n&&!r&&"focused",r&&"disabled",o&&"required"]},jN,e)})(a,q),U=kz[u],X={};return"outlined"===u?(L&&void 0!==L.shrink&&(X.notched=L.shrink),X.label=F):"filled"===u&&(X.hiddenLabel=f),(0,le.jsx)(AN.Provider,{value:q,children:(0,le.jsxs)(Cz,tr({className:Un(Y.root,i),ref:$,focused:O,disabled:l,variant:u,error:c,color:s,fullWidth:D,required:d,ownerState:q},z,{children:[null!=F&&""!==F&&(0,le.jsx)(Ms,tr({htmlFor:V,id:W},L,{children:F})),(0,le.jsx)(U,tr({elements:b,areAllSectionsEmpty:y,onClick:v,onKeyDown:x,onKeyUp:w,onInput:k,onPaste:S,onFocus:r,onBlur:o,endAdornment:C,startAdornment:M,tabIndex:P,contentEditable:T,value:j,onChange:_,id:V,fullWidth:D,inputProps:h,inputRef:m,sectionListRef:g,label:F,name:R,role:"group","aria-labelledby":W,"aria-describedby":B,"aria-live":B?"polite":void 0,"data-active-range-position":N},X,p)),A&&(0,le.jsx)(nN,tr({id:B},I,{children:A}))]}))})}),Pz=["enableAccessibleFieldDOMStructure"],Tz=["InputProps","readOnly","onClear","clearable","clearButtonPosition","openPickerButtonPosition","openPickerAriaLabel"],Oz=["onPaste","onKeyDown","inputMode","readOnly","InputProps","inputProps","inputRef","onClear","clearable","clearButtonPosition","openPickerButtonPosition","openPickerAriaLabel"],jz=["ownerState"],_z=["ownerState"],Dz=["ownerState"],Ez=["ownerState"],Rz=["InputProps","inputProps"],Az=()=>{},Iz=G.createContext({slots:{},slotProps:{},inputRef:void 0});function Fz(e){const{fieldResponse:t,defaultOpenPickerIcon:n}=e,r=fA(),o=zL(),i=G.useContext(Iz),{textFieldProps:a,onClear:s,clearable:l,openPickerAriaLabel:c,clearButtonPosition:u="end",openPickerButtonPosition:d="end"}=(e=>{let{enableAccessibleFieldDOMStructure:t}=e,n=il(e,Pz);if(t){const{InputProps:e,readOnly:t,onClear:r,clearable:o,clearButtonPosition:i,openPickerButtonPosition:a,openPickerAriaLabel:s}=n,l=il(n,Tz),c=vN>=6&&l?.slotProps?.input?Lz(l?.slotProps?.input,e):Az;return{clearable:o,onClear:r,clearButtonPosition:i,openPickerButtonPosition:a,openPickerAriaLabel:s,textFieldProps:tr({},l,vN>=6&&l?.slotProps?.input?{slotProps:tr({},l?.slotProps,{input:e=>tr({},Is(c,e),{readOnly:t})})}:{InputProps:tr({},e??{},{readOnly:t})})}}const{onPaste:r,onKeyDown:o,inputMode:i,readOnly:a,InputProps:s,inputProps:l,inputRef:c,onClear:u,clearable:d,clearButtonPosition:f,openPickerButtonPosition:p,openPickerAriaLabel:h}=n,m=il(n,Oz),g=vN>=6&&m?.slotProps?.input?Lz(m?.slotProps?.input,s):Az,b=vN>=6&&m?.slotProps?.htmlInput?Lz(m?.slotProps?.htmlInput,l):Az;return{clearable:d,onClear:u,clearButtonPosition:f,openPickerButtonPosition:p,openPickerAriaLabel:h,textFieldProps:tr({},m,vN>=6&&(m?.slotProps?.input||m?.slotProps?.htmlInput)?{slotProps:tr({},m?.slotProps,{input:e=>tr({},Is(g,e),{readOnly:a}),htmlInput:e=>tr({},Is(b,e),{inputMode:i,onPaste:r,onKeyDown:o,ref:c})})}:{InputProps:tr({},s??{},{readOnly:a}),inputProps:tr({},l??{},{inputMode:i,onPaste:r,onKeyDown:o,ref:c})})}})(t),f=xN(a),p=zl(e=>{e.preventDefault(),o?.setOpen(e=>!e)}),h=o?o.triggerStatus:"hidden",m=l?u:null,g="hidden"!==h?d:null,b=i.slots.textField??(!1===t.enableAccessibleFieldDOMStructure?sN:Mz),y=i.slots.inputAdornment??yN,v=il(Fs({elementType:y,externalSlotProps:i.slotProps.inputAdornment,additionalProps:{position:"start"},ownerState:tr({},f,{position:"start"})}),jz),x=il(Fs({elementType:y,externalSlotProps:i.slotProps.inputAdornment,additionalProps:{position:"end"},ownerState:tr({},f,{position:"end"})}),_z),w=i.slots.openPickerButton??fN,S=il(Fs({elementType:w,externalSlotProps:i.slotProps.openPickerButton,additionalProps:{disabled:"disabled"===h,onClick:p,"aria-label":c,edge:"standard"!==a.variant&&g},ownerState:f}),Dz),k=i.slots.openPickerIcon??n,C=Fs({elementType:k,externalSlotProps:i.slotProps.openPickerIcon,ownerState:f}),M=i.slots.clearButton??fN,P=il(Fs({elementType:M,externalSlotProps:i.slotProps.clearButton,className:"clearButton",additionalProps:{title:r.fieldClearLabel,tabIndex:-1,onClick:s,disabled:t.disabled||t.readOnly,edge:"standard"!==a.variant&&m!==g&&m},ownerState:f}),Ez),T=i.slots.clearIcon??ON,O=Fs({elementType:T,externalSlotProps:i.slotProps.clearIcon,additionalProps:{fontSize:"small"},ownerState:f});a.ref=js(a.ref,o?.rootRef);const j={},_=Is((vN>=6&&a?.slotProps?.input)??a.InputProps,f);o&&(j.ref=o.triggerRef),_?.startAdornment||"start"!==m&&"start"!==g||(j.startAdornment=(0,le.jsxs)(y,tr({},v,{children:["start"===g&&(0,le.jsx)(w,tr({},S,{children:(0,le.jsx)(k,tr({},C))})),"start"===m&&(0,le.jsx)(M,tr({},P,{children:(0,le.jsx)(T,tr({},O))}))]}))),_?.endAdornment||"end"!==m&&"end"!==g||(j.endAdornment=(0,le.jsxs)(y,tr({},x,{children:["end"===m&&(0,le.jsx)(M,tr({},P,{children:(0,le.jsx)(T,tr({},O))})),"end"===g&&(0,le.jsx)(w,tr({},S,{children:(0,le.jsx)(k,tr({},C))}))]}))),j?.endAdornment||j?.startAdornment||!i.slots.inputAdornment||(j.endAdornment=(0,le.jsx)(y,tr({},x))),null!=m&&(a.sx=[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(a.sx)?a.sx:[a.sx]]);const D=vN>=6&&a?.slotProps?.input?Is(Lz(_,j),f):tr({},_,j);return a.inputProps=vN>=6&&a?.slotProps?.htmlInput?Is(a.slotProps.htmlInput,f):a.inputProps,delete a?.slotProps?.input,t.enableAccessibleFieldDOMStructure&&delete a?.slotProps,(0,le.jsx)(b,tr({},a,{InputProps:D}))}function Lz(e,t){return e?t?n=>tr({},Is(t,n),Is(e,n)):e:t}function Nz(e){const{ref:t,externalForwardedProps:n,slotProps:r}=e,o=G.useContext(Iz),i=zL(),a=xN(n),{InputProps:s,inputProps:l}=n,c=il(n,Rz),u=Fs({elementType:Mz,externalSlotProps:Lz(o.slotProps.textField,r?.textField),externalForwardedProps:c,additionalProps:{ref:t,sx:i?.rootSx,label:i?.label,name:i?.name,className:i?.rootClassName,inputRef:o.inputRef},ownerState:a});return u.inputProps=tr({},l,u.inputProps),u.InputProps=tr({},s,u.InputProps),u}function zz(e){const{slots:t={},slotProps:n={},inputRef:r,children:o}=e,i=G.useMemo(()=>({inputRef:r,slots:{openPickerButton:t.openPickerButton,openPickerIcon:t.openPickerIcon,textField:t.textField,inputAdornment:t.inputAdornment,clearIcon:t.clearIcon,clearButton:t.clearButton},slotProps:{openPickerButton:n.openPickerButton,openPickerIcon:n.openPickerIcon,textField:n.textField,inputAdornment:n.inputAdornment,clearIcon:n.clearIcon,clearButton:n.clearButton}}),[r,t.openPickerButton,t.openPickerIcon,t.textField,t.inputAdornment,t.clearIcon,t.clearButton,n.openPickerButton,n.openPickerIcon,n.textField,n.inputAdornment,n.clearIcon,n.clearButton]);return(0,le.jsx)(Iz.Provider,{value:i,children:o})}const $z=["slots","slotProps"],Vz=G.forwardRef(function(e,t){const n=UE({props:e,name:"MuiDateField"}),{slots:r,slotProps:o}=n,i=il(n,$z),a=(e=>{const t=function(e={}){const{enableAccessibleFieldDOMStructure:t=!0}=e;return G.useMemo(()=>({valueType:"date",validator:yA,internal_valueManager:IR,internal_fieldValueManager:FR,internal_enableAccessibleFieldDOMStructure:t,internal_useApplyDefaultValuesToFieldInternalProps:SA,internal_useOpenPickerButtonAriaLabel:wA}),[t])}(e);return KL({manager:t,props:e})})(Nz({slotProps:o,ref:t,externalForwardedProps:i}));return(0,le.jsx)(zz,{slots:r,slotProps:o,inputRef:i.inputRef,children:(0,le.jsx)(Fz,{fieldResponse:a,defaultOpenPickerIcon:CN})})}),Bz=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:a,timezone:s})=>{const l=dA();return G.useCallback(c=>null!==yA({adapter:l,value:c,timezone:s,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:a}}),[l,e,t,n,r,o,i,a,s])},Wz=e=>ss("MuiPickersFadeTransitionGroup",e),Hz=(ls("MuiPickersFadeTransitionGroup",["root"]),["children"]),qz=Ka(Wu,{name:"MuiPickersFadeTransitionGroup",slot:"Root"})({display:"block",position:"relative"});function Yz(e){const t=UE({props:e,name:"MuiPickersFadeTransitionGroup"}),{className:n,reduceAnimations:r,transKey:o,classes:i}=t,{children:a}=t,s=il(t,Hz),l=(e=>Na({root:["root"]},Wz,e))(i),c=yl();return r?a:(0,le.jsx)(qz,{className:Un(l.root,n),ownerState:s,children:(0,le.jsx)(Il,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:c.transitions.duration.enteringScreen,enter:c.transitions.duration.enteringScreen,exit:0},children:a},o)})}function Uz(e){return ss("MuiPickersDay",e)}const Gz=ls("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]);function Xz(e){const{disabled:t,selected:n,today:r,outsideCurrentMonth:o,day:i,disableMargin:a,disableHighlightToday:s,showDaysOutsideCurrentMonth:l}=e,c=dA(),{ownerState:u}=nA();return G.useMemo(()=>tr({},u,{day:i,isDaySelected:n??!1,isDayDisabled:t??!1,isDayCurrent:r??!1,isDayOutsideMonth:o??!1,isDayStartOfWeek:c.isSameDay(i,c.startOfWeek(i)),isDayEndOfWeek:c.isSameDay(i,c.endOfWeek(i)),disableMargin:a??!1,disableHighlightToday:s??!1,showDaysOutsideCurrentMonth:l??!1}),[c,u,i,n,t,r,o,a,s,l])}const Qz=["autoFocus","className","classes","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","children","isFirstVisibleCell","isLastVisibleCell","day","selected","disabled","today","outsideCurrentMonth","disableMargin","disableHighlightToday","showDaysOutsideCurrentMonth"],Kz=({theme:e})=>tr({},e.typography.caption,{width:36,height:36,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),color:(e.vars||e).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:ti(e.palette.primary.main,e.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:ti(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${Gz.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${Gz.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${Gz.disabled}:not(.${Gz.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${Gz.disabled}&.${Gz.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:"0 2px"}},{props:{isDayOutsideMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(e.vars||e).palette.text.secondary}},{props:{disableHighlightToday:!1,isDayCurrent:!0},style:{[`&:not(.${Gz.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}}]}),Zz=(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.isDayCurrent&&t.today,n.isDayOutsideMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.isDayOutsideMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},Jz=Ka(nd,{name:"MuiPickersDay",slot:"Root",overridesResolver:Zz})(Kz),e$=Ka("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:Zz})(({theme:e})=>tr({},Kz({theme:e}),{opacity:0,pointerEvents:"none"})),t$=()=>{},n$=G.forwardRef(function(e,t){const n=UE({props:e,name:"MuiPickersDay"}),{autoFocus:r=!1,className:o,classes:i,isAnimating:a,onClick:s,onDaySelect:l,onFocus:c=t$,onBlur:u=t$,onKeyDown:d=t$,onMouseDown:f=t$,onMouseEnter:p=t$,children:h,day:m,selected:g,disabled:b,today:y,outsideCurrentMonth:v,disableMargin:x,disableHighlightToday:w,showDaysOutsideCurrentMonth:S}=n,k=il(n,Qz),C=Xz({day:m,selected:g,disabled:b,today:y,outsideCurrentMonth:v,disableMargin:x,disableHighlightToday:w,showDaysOutsideCurrentMonth:S}),M=((e,t)=>{const{isDaySelected:n,isDayDisabled:r,isDayCurrent:o,isDayOutsideMonth:i,disableMargin:a,disableHighlightToday:s,showDaysOutsideCurrentMonth:l}=t,c=i&&!l;return Na({root:["root",n&&!c&&"selected",r&&"disabled",!a&&"dayWithMargin",!s&&o&&"today",i&&l&&"dayOutsideMonth",c&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},Uz,e)})(i,C),P=dA(),T=G.useRef(null),O=js(T,t);return Kn(()=>{!r||b||a||v||T.current.focus()},[r,b,a,v]),v&&!S?(0,le.jsx)(e$,{className:Un(M.root,M.hiddenDaySpacingFiller,o),ownerState:C,role:k.role}):(0,le.jsx)(Jz,tr({className:Un(M.root,o),ref:O,centerRipple:!0,disabled:b,tabIndex:g?0:-1,onKeyDown:e=>d(e,m),onFocus:e=>c(e,m),onBlur:e=>u(e,m),onMouseEnter:e=>p(e,m),onClick:e=>{e.defaultMuiPrevented=!0,b||l(m),v&&e.currentTarget.focus(),s&&s(e)},onMouseDown:e=>{f(e),v&&e.preventDefault()}},k,{ownerState:C,children:h??P.format(m,"dayOfMonth")}))}),r$=G.memo(n$);function o$(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var i$=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"==typeof n.className?n.className=o$(n.className,r):n.setAttribute("class",o$(n.className&&n.className.baseVal||"",r)));var n,r})},a$=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),o=r[0],i=r[1];t.removeClasses(o,"exit"),t.addClass(o,i?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),o=r[0],i=r[1]?"appear":"enter";t.addClass(o,i,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),o=r[0],i=r[1]?"appear":"enter";t.removeClasses(o,i),t.addClass(o,i,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r="string"==typeof n,o=r?(r&&n?n+"-":"")+e:n[e];return{baseClassName:o,activeClassName:r?o+"-active":n[e+"Active"],doneClassName:r?o+"-done":n[e+"Done"]}},t}sl(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+"ClassName"],o=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&o&&(r+=" "+o),"active"===n&&e&&cl(e),r&&(this.appliedClasses[t][n]=r,function(e,t){e&&t&&t.split(" ").forEach(function(t){return r=t,void((n=e).classList?n.classList.add(r):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,r)||("string"==typeof n.className?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r)));var n,r})}(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,o=n.active,i=n.done;this.appliedClasses[t]={},r&&i$(e,r),o&&i$(e,o),i&&i$(e,i)},n.render=function(){var e=this.props,t=(e.classNames,il(e,["classNames"]));return Q().createElement(bl,tr({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(Q().Component);a$.defaultProps={classNames:""},a$.propTypes={};const s$=a$,l$=e=>ss("MuiPickersSlideTransition",e),c$=ls("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),u$=["children","className","reduceAnimations","slideDirection","transKey","classes"],d$=Ka(Wu,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${c$["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${c$["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${c$.slideEnterActive}`]:t.slideEnterActive},{[`.${c$.slideExit}`]:t.slideExit},{[`.${c$["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${c$["slideExitActiveLeft-right"]}`]:t["slideExitActiveLeft-right"]}]})(({theme:e})=>{const t=e.transitions.create("transform",{duration:e.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${c$["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${c$["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${c$.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${c$.slideExit}`]:{transform:"translate(0%)"},[`& .${c$["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${c$["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}}),f$=e=>ss("MuiDayCalendar",e),p$=(ls("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]),["parentProps","day","focusedDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"]),h$=["ownerState"],m$=Ka("div",{name:"MuiDayCalendar",slot:"Root"})({}),g$=Ka("div",{name:"MuiDayCalendar",slot:"Header"})({display:"flex",justifyContent:"center",alignItems:"center"}),b$=Ka(BR,{name:"MuiDayCalendar",slot:"WeekDayLabel"})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.secondary})),y$=Ka(BR,{name:"MuiDayCalendar",slot:"WeekNumberLabel"})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.disabled})),v$=Ka(BR,{name:"MuiDayCalendar",slot:"WeekNumber"})(({theme:e})=>tr({},e.typography.caption,{width:36,height:36,padding:0,margin:"0 2px",color:(e.vars||e).palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),x$=Ka("div",{name:"MuiDayCalendar",slot:"LoadingContainer"})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:240}),w$=Ka(function(e){const t=UE({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:r,reduceAnimations:o,slideDirection:i,transKey:a,classes:s}=t,l=il(t,u$),{ownerState:c}=nA(),u=tr({},c,{slideDirection:i}),d=((e,t)=>{const{slideDirection:n}=t;return Na({root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]},l$,e)})(s,u),f=yl();if(o)return(0,le.jsx)("div",{className:Un(d.root,r),children:n});const p={exit:d.exit,enterActive:d.enterActive,enter:d.enter,exitActive:d.exitActive};return(0,le.jsx)(d$,{className:Un(d.root,r),childFactory:e=>G.cloneElement(e,{classNames:p}),role:"presentation",ownerState:u,children:(0,le.jsx)(s$,tr({mountOnEnter:!0,unmountOnExit:!0,timeout:f.transitions.duration.complex,classNames:p},l,{children:n}),a)})},{name:"MuiDayCalendar",slot:"SlideTransition"})({minHeight:240}),S$=Ka("div",{name:"MuiDayCalendar",slot:"MonthContainer"})({overflow:"hidden"}),k$=Ka("div",{name:"MuiDayCalendar",slot:"WeekContainer"})({margin:"2px 0",display:"flex",justifyContent:"center"});function C$(e){let{parentProps:t,day:n,focusedDay:r,selectedDays:o,isDateDisabled:i,currentMonthNumber:a,isViewFocused:s}=e,l=il(e,p$);const{disabled:c,disableHighlightToday:u,isMonthSwitchingAnimating:d,showDaysOutsideCurrentMonth:f,slots:p,slotProps:h,timezone:m}=t,g=dA(),b=xA(m),y=null!=r&&g.isSameDay(n,r),v=s&&y,x=o.some(e=>g.isSameDay(e,n)),w=g.isSameDay(n,b),S=G.useMemo(()=>c||i(n),[c,i,n]),k=G.useMemo(()=>g.getMonth(n)!==a,[g,n,a]),C=Xz({day:n,selected:x,disabled:S,today:w,outsideCurrentMonth:k,disableMargin:void 0,disableHighlightToday:u,showDaysOutsideCurrentMonth:f}),M=p?.day??r$,P=il(Fs({elementType:M,externalSlotProps:h?.day,additionalProps:tr({disableHighlightToday:u,showDaysOutsideCurrentMonth:f,role:"gridcell",isAnimating:d,"data-timestamp":g.toJsDate(n).valueOf()},l),ownerState:tr({},C,{day:n,isDayDisabled:S,isDaySelected:x})}),h$),T=G.useMemo(()=>{const e=g.startOfMonth(g.setMonth(n,a));return f?g.isSameDay(n,g.startOfWeek(e)):g.isSameDay(n,e)},[a,n,f,g]),O=G.useMemo(()=>{const e=g.endOfMonth(g.setMonth(n,a));return f?g.isSameDay(n,g.endOfWeek(e)):g.isSameDay(n,e)},[a,n,f,g]);return(0,le.jsx)(M,tr({},P,{day:n,disabled:S,autoFocus:!k&&v,today:w,outsideCurrentMonth:k,isFirstVisibleCell:T,isLastVisibleCell:O,selected:x,tabIndex:y?0:-1,"aria-selected":x,"aria-current":w?"date":void 0}))}function M$(e){const t=UE({props:e,name:"MuiDayCalendar"}),n=dA(),{onFocusedDayChange:r,className:o,classes:i,currentMonth:a,selectedDays:s,focusedDay:l,loading:c,onSelectedDaysChange:u,onMonthSwitchingAnimationEnd:d,readOnly:f,reduceAnimations:p,renderLoading:h=()=>(0,le.jsx)("span",{children:"..."}),slideDirection:m,TransitionProps:g,disablePast:b,disableFuture:y,minDate:v,maxDate:x,shouldDisableDate:w,shouldDisableMonth:S,shouldDisableYear:k,dayOfWeekFormatter:C=e=>n.format(e,"weekdayShort").charAt(0).toUpperCase(),hasFocus:M,onFocusedViewChange:P,gridLabelId:T,displayWeekNumber:O,fixedWeekNumber:j,timezone:_}=t,D=xA(_),E=(e=>Na({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},f$,e))(i),R=Hn(),A=Bz({shouldDisableDate:w,shouldDisableMonth:S,shouldDisableYear:k,minDate:v,maxDate:x,disablePast:b,disableFuture:y,timezone:_}),I=fA(),F=zl(e=>{f||u(e)}),L=e=>{A(e)||(r(e),P?.(!0))},N=zl((e,t)=>{switch(e.key){case"ArrowUp":L(n.addDays(t,-7)),e.preventDefault();break;case"ArrowDown":L(n.addDays(t,7)),e.preventDefault();break;case"ArrowLeft":{const r=n.addDays(t,R?1:-1),o=n.addMonths(t,R?1:-1),i=JE({adapter:n,date:r,minDate:R?r:n.startOfMonth(o),maxDate:R?n.endOfMonth(o):r,isDateDisabled:A,timezone:_});L(i||r),e.preventDefault();break}case"ArrowRight":{const r=n.addDays(t,R?-1:1),o=n.addMonths(t,R?-1:1),i=JE({adapter:n,date:r,minDate:R?n.startOfMonth(o):r,maxDate:R?r:n.endOfMonth(o),isDateDisabled:A,timezone:_});L(i||r),e.preventDefault();break}case"Home":L(n.startOfWeek(t)),e.preventDefault();break;case"End":L(n.endOfWeek(t)),e.preventDefault();break;case"PageUp":L(n.addMonths(t,1)),e.preventDefault();break;case"PageDown":L(n.addMonths(t,-1)),e.preventDefault();break;case"Enter":case" ":F(t),e.preventDefault()}}),z=zl((e,t)=>L(t)),$=zl((e,t)=>{null!=l&&n.isSameDay(l,t)&&P?.(!1)}),V=n.getMonth(a),B=n.getYear(a),W=G.useMemo(()=>s.filter(e=>!!e).map(e=>n.startOfDay(e)),[n,s]),H=`${B}-${V}`,q=G.useMemo(()=>G.createRef(),[H]),Y=G.useMemo(()=>{const e=n.getWeekArray(a);let t=n.addMonths(a,1);for(;j&&e.length<j;){const r=n.getWeekArray(t),o=n.isSameDay(e[e.length-1][0],r[0][0]);r.slice(o?1:0).forEach(t=>{e.length<j&&e.push(t)}),t=n.addMonths(t,1)}return e},[a,j,n]);return(0,le.jsxs)(m$,{role:"grid","aria-labelledby":T,className:E.root,children:[(0,le.jsxs)(g$,{role:"row",className:E.header,children:[O&&(0,le.jsx)(y$,{variant:"caption",role:"columnheader","aria-label":I.calendarWeekNumberHeaderLabel,className:E.weekNumberLabel,children:I.calendarWeekNumberHeaderText}),sR(n,D).map((e,t)=>(0,le.jsx)(b$,{variant:"caption",role:"columnheader","aria-label":n.format(e,"weekday"),className:E.weekDayLabel,children:C(e)},t.toString()))]}),c?(0,le.jsx)(x$,{className:E.loadingContainer,children:h()}):(0,le.jsx)(w$,tr({transKey:H,onExited:d,reduceAnimations:p,slideDirection:m,className:Un(o,E.slideTransition)},g,{nodeRef:q,children:(0,le.jsx)(S$,{ref:q,role:"rowgroup",className:E.monthContainer,children:Y.map((e,r)=>(0,le.jsxs)(k$,{role:"row",className:E.weekContainer,"aria-rowindex":r+1,children:[O&&(0,le.jsx)(v$,{className:E.weekNumber,role:"rowheader","aria-label":I.calendarWeekNumberAriaLabelText(n.getWeekNumber(e[0])),children:I.calendarWeekNumberText(n.getWeekNumber(e[0]))}),e.map((e,n)=>(0,le.jsx)(C$,{parentProps:t,day:e,selectedDays:W,isViewFocused:M,focusedDay:l,onKeyDown:N,onFocus:z,onBlur:$,onDaySelect:F,isDateDisabled:A,currentMonthNumber:V,"aria-colindex":n+1},e.toString()))]},`week-${e[0]}`))})}))]})}function P$(e){return ss("MuiMonthCalendar",e)}const T$=ls("MuiMonthCalendar",["root","button","disabled","selected"]),O$=["autoFocus","classes","disabled","selected","value","onClick","onKeyDown","onFocus","onBlur","slots","slotProps"],j$=Ka("button",{name:"MuiMonthCalendar",slot:"Button",overridesResolver:(e,t)=>[t.button,{[`&.${T$.disabled}`]:t.disabled},{[`&.${T$.selected}`]:t.selected}]})(({theme:e})=>tr({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:ti(e.palette.action.active,e.palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:ti(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${T$.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${T$.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),_$=G.memo(function(e){const{autoFocus:t,classes:n,disabled:r,selected:o,value:i,onClick:a,onKeyDown:s,onFocus:l,onBlur:c,slots:u,slotProps:d}=e,f=il(e,O$),p=G.useRef(null),{ownerState:h}=nA(),m=tr({},h,{isMonthDisabled:r,isMonthSelected:o}),g=((e,t)=>Na({button:["button",t.isMonthDisabled&&"disabled",t.isMonthSelected&&"selected"]},P$,e))(n,m);Kn(()=>{t&&p.current?.focus()},[t]);const b=u?.monthButton??j$,y=Fs({elementType:b,externalSlotProps:d?.monthButton,externalForwardedProps:f,additionalProps:{disabled:r,ref:p,type:"button",role:"radio","aria-checked":o,onClick:e=>a(e,i),onKeyDown:e=>s(e,i),onFocus:e=>l(e,i),onBlur:e=>c(e,i)},ownerState:m,className:g.button});return(0,le.jsx)(b,tr({},y))}),D$=["autoFocus","className","currentMonth","classes","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"],E$=(e,t,n,r,o)=>Boolean(e===t&&r&&o.isSameYear(n,r)),R$=Ka("div",{name:"MuiMonthCalendar",slot:"Root",shouldForwardProp:e=>Va(e)&&"monthsPerRow"!==e})({display:"flex",flexWrap:"wrap",justifyContent:"space-evenly",rowGap:16,padding:"8px 0",width:gL,boxSizing:"border-box",variants:[{props:{monthsPerRow:3},style:{columnGap:24}},{props:{monthsPerRow:4},style:{columnGap:0}}]}),A$=G.forwardRef(function(e,t){const n=function(e){const t=UE({props:e,name:"MuiMonthCalendar"});return tr({},t,kA(t),{monthsPerRow:t.monthsPerRow??3})}(e),{autoFocus:r,className:o,currentMonth:i,classes:a,value:s,defaultValue:l,referenceDate:c,disabled:u,disableFuture:d,disablePast:f,maxDate:p,minDate:h,onChange:m,shouldDisableMonth:g,readOnly:b,onMonthFocus:y,hasFocus:v,onFocusedViewChange:x,monthsPerRow:w,timezone:S,gridLabelId:k,slots:C,slotProps:M}=n,P=il(n,D$),{value:T,handleValueChange:O,timezone:j}=yF({name:"MonthCalendar",timezone:S,value:s,defaultValue:l,referenceDate:c,onChange:m,valueManager:IR}),_=xA(j),D=Hn(),E=dA(),{ownerState:R}=nA(),A=G.useMemo(()=>IR.getInitialReferenceValue({value:T,adapter:E,props:n,timezone:j,referenceDate:c,granularity:gR.month}),[]),I=(e=>Na({root:["root"]},P$,e))(a),F=G.useMemo(()=>E.getMonth(_),[E,_]),L=G.useMemo(()=>null!=T?E.getMonth(T):null,[T,E]),[N,z]=G.useState(()=>L||E.getMonth(A)),[$,V]=Pc({name:"MonthCalendar",state:"hasFocus",controlled:v,default:r??!1}),B=zl(e=>{V(e),x&&x(e)}),W=G.useCallback(e=>{const t=E.startOfMonth(f&&E.isAfter(_,h)?_:h),n=E.startOfMonth(d&&E.isBefore(_,p)?_:p),r=E.startOfMonth(e);return!!E.isBefore(r,t)||!!E.isAfter(r,n)||!!g&&g(r)},[d,f,p,h,_,g,E]),H=zl((e,t)=>{if(b)return;const n=(T&&i&&!E.isSameYear(T,i)?E.setYear(T,E.getYear(i)):T)??i??A,r=E.setMonth(n,t);O(r)}),q=zl(e=>{W(E.setMonth(T??i??A,e))||(z(e),B(!0),y&&y(e))});G.useEffect(()=>{z(e=>null!==L&&e!==L?L:e)},[L]);const Y=zl((e,t)=>{const n=12;switch(e.key){case"ArrowUp":q((n+t-3)%n),e.preventDefault();break;case"ArrowDown":q((n+t+3)%n),e.preventDefault();break;case"ArrowLeft":q((n+t+(D?1:-1))%n),e.preventDefault();break;case"ArrowRight":q((n+t+(D?-1:1))%n),e.preventDefault();break;case"Enter":case" ":H(e,t),e.preventDefault()}}),U=zl((e,t)=>{q(t)}),X=zl((e,t)=>{N===t&&B(!1)});return(0,le.jsx)(R$,tr({ref:t,className:Un(I.root,o),ownerState:R,role:"radiogroup","aria-labelledby":k,monthsPerRow:w},P,{children:tR(E,i??T??A).map(e=>{const t=E.getMonth(e),n=E.format(e,"monthShort"),r=E.format(e,"month"),o=E$(t,L,e,T,E),i=u||W(e);return(0,le.jsx)(_$,{selected:o,value:t,onClick:H,onKeyDown:Y,autoFocus:$&&t===N,disabled:i,tabIndex:t!==N||i?-1:0,onFocus:U,onBlur:X,"aria-current":E$(t,F,e,_,E)?"date":void 0,"aria-label":r,slots:C,slotProps:M,classes:a,children:n},n)})}))});function I$(e){return ss("MuiYearCalendar",e)}const F$=ls("MuiYearCalendar",["root","button","disabled","selected"]),L$=["autoFocus","classes","disabled","selected","value","onClick","onKeyDown","onFocus","onBlur","slots","slotProps"],N$=Ka("button",{name:"MuiYearCalendar",slot:"Button",overridesResolver:(e,t)=>[t.button,{[`&.${F$.disabled}`]:t.disabled},{[`&.${F$.selected}`]:t.selected}]})(({theme:e})=>tr({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.focusOpacity})`:ti(e.palette.action.active,e.palette.action.focusOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:ti(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${F$.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${F$.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),z$=G.memo(function(e){const{autoFocus:t,classes:n,disabled:r,selected:o,value:i,onClick:a,onKeyDown:s,onFocus:l,onBlur:c,slots:u,slotProps:d}=e,f=il(e,L$),p=G.useRef(null),{ownerState:h}=nA(),m=tr({},h,{isYearDisabled:r,isYearSelected:o}),g=((e,t)=>Na({button:["button",t.isYearDisabled&&"disabled",t.isYearSelected&&"selected"]},I$,e))(n,m);Kn(()=>{t&&p.current?.focus()},[t]);const b=u?.yearButton??N$,y=Fs({elementType:b,externalSlotProps:d?.yearButton,externalForwardedProps:f,additionalProps:{disabled:r,ref:p,type:"button",role:"radio","aria-checked":o,onClick:e=>a(e,i),onKeyDown:e=>s(e,i),onFocus:e=>l(e,i),onBlur:e=>c(e,i)},ownerState:m,className:g.button});return(0,le.jsx)(b,tr({},y))}),$$=["autoFocus","className","classes","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"],V$=Ka("div",{name:"MuiYearCalendar",slot:"Root",shouldForwardProp:e=>Va(e)&&"yearsPerRow"!==e})({display:"flex",flexWrap:"wrap",justifyContent:"space-evenly",rowGap:12,padding:"6px 0",overflowY:"auto",height:"100%",width:gL,maxHeight:280,boxSizing:"border-box",position:"relative",variants:[{props:{yearsPerRow:3},style:{columnGap:24}},{props:{yearsPerRow:4},style:{columnGap:0,padding:"0 2px"}}]}),B$=Ka("div",{name:"MuiYearCalendar",slot:"ButtonFiller"})({height:36,width:72}),W$=G.forwardRef(function(e,t){const n=function(e){const t=UE({props:e,name:"MuiYearCalendar"});return tr({},t,kA(t),{yearsPerRow:t.yearsPerRow??3,yearsOrder:t.yearsOrder??"asc"})}(e),{autoFocus:r,className:o,classes:i,value:a,defaultValue:s,referenceDate:l,disabled:c,disableFuture:u,disablePast:d,maxDate:f,minDate:p,onChange:h,readOnly:m,shouldDisableYear:g,onYearFocus:b,hasFocus:y,onFocusedViewChange:v,yearsOrder:x,yearsPerRow:w,timezone:S,gridLabelId:k,slots:C,slotProps:M}=n,P=il(n,$$),{value:T,handleValueChange:O,timezone:j}=yF({name:"YearCalendar",timezone:S,value:a,defaultValue:s,referenceDate:l,onChange:h,valueManager:IR}),_=xA(j),D=Hn(),E=dA(),{ownerState:R}=nA(),A=G.useMemo(()=>IR.getInitialReferenceValue({value:T,adapter:E,props:n,timezone:j,referenceDate:l,granularity:gR.year}),[]),I=(e=>Na({root:["root"]},I$,e))(i),F=G.useMemo(()=>E.getYear(_),[E,_]),L=G.useMemo(()=>null!=T?E.getYear(T):null,[T,E]),[N,z]=G.useState(()=>L||E.getYear(A)),[$,V]=Pc({name:"YearCalendar",state:"hasFocus",controlled:y,default:r??!1}),B=zl(e=>{V(e),v&&v(e)}),W=G.useCallback(e=>{if(d&&E.isBeforeYear(e,_))return!0;if(u&&E.isAfterYear(e,_))return!0;if(p&&E.isBeforeYear(e,p))return!0;if(f&&E.isAfterYear(e,f))return!0;if(!g)return!1;const t=E.startOfYear(e);return g(t)},[u,d,f,p,_,g,E]),H=zl((e,t)=>{if(m)return;const n=E.setYear(T??A,t);O(n)}),q=zl(e=>{W(E.setYear(T??A,e))||(z(e),B(!0),b?.(e))});G.useEffect(()=>{z(e=>null!==L&&e!==L?L:e)},[L]);const Y="desc"!==x?1*w:-1*w,U=D&&"asc"===x||!D&&"desc"===x?-1:1,X=zl((e,t)=>{switch(e.key){case"ArrowUp":q(t-Y),e.preventDefault();break;case"ArrowDown":q(t+Y),e.preventDefault();break;case"ArrowLeft":q(t-U),e.preventDefault();break;case"ArrowRight":q(t+U),e.preventDefault();break;case"Enter":case" ":H(e,t),e.preventDefault()}}),Q=zl((e,t)=>{q(t)}),K=zl((e,t)=>{N===t&&B(!1)}),Z=G.useRef(null),J=js(t,Z);G.useEffect(()=>{if(r||null===Z.current)return;const e=Z.current.querySelector('[tabindex="0"]');if(!e)return;const t=e.offsetHeight,n=e.offsetTop,o=Z.current.clientHeight,i=Z.current.scrollTop,a=n+t;t>o||n<i||(Z.current.scrollTop=a-o/2-t/2)},[r]);const ee=E.getYearRange([p,f]);"desc"===x&&ee.reverse();let te=w-ee.length%w;return te===w&&(te=0),(0,le.jsxs)(V$,tr({ref:J,className:Un(I.root,o),ownerState:R,role:"radiogroup","aria-labelledby":k,yearsPerRow:w},P,{children:[ee.map(e=>{const t=E.getYear(e),n=t===L,r=c||W(e);return(0,le.jsx)(z$,{selected:n,value:t,onClick:H,onKeyDown:X,autoFocus:$&&t===N,disabled:r,tabIndex:t!==N||r?-1:0,onFocus:Q,onBlur:K,"aria-current":F===t?"date":void 0,slots:C,slotProps:M,classes:i,children:E.format(e,"year")},E.format(e,"year"))}),Array.from({length:te},(e,t)=>(0,le.jsx)(B$,{},t))]}))});function H$(e){return ss("MuiPickersArrowSwitcher",e)}ls("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);const q$=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId","classes"],Y$=["ownerState"],U$=["ownerState"],G$=Ka("div",{name:"MuiPickersArrowSwitcher",slot:"Root"})({display:"flex"}),X$=Ka("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer"})(({theme:e})=>({width:e.spacing(3)})),Q$=Ka(fN,{name:"MuiPickersArrowSwitcher",slot:"Button"})({variants:[{props:{isButtonHidden:!0},style:{visibility:"hidden"}}]}),K$=G.forwardRef(function(e,t){const n=Hn(),r=UE({props:e,name:"MuiPickersArrowSwitcher"}),{children:o,className:i,slots:a,slotProps:s,isNextDisabled:l,isNextHidden:c,onGoToNext:u,nextLabel:d,isPreviousDisabled:f,isPreviousHidden:p,onGoToPrevious:h,previousLabel:m,labelId:g,classes:b}=r,y=il(r,q$),{ownerState:v}=nA(),x=(e=>Na({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},H$,e))(b),w={isDisabled:l,isHidden:c,goTo:u,label:d},S={isDisabled:f,isHidden:p,goTo:h,label:m},k=a?.previousIconButton??Q$,C=Fs({elementType:k,externalSlotProps:s?.previousIconButton,additionalProps:{size:"medium",title:S.label,"aria-label":S.label,disabled:S.isDisabled,edge:"end",onClick:S.goTo},ownerState:tr({},v,{isButtonHidden:S.isHidden??!1}),className:Un(x.button,x.previousIconButton)}),M=a?.nextIconButton??Q$,P=Fs({elementType:M,externalSlotProps:s?.nextIconButton,additionalProps:{size:"medium",title:w.label,"aria-label":w.label,disabled:w.isDisabled,edge:"start",onClick:w.goTo},ownerState:tr({},v,{isButtonHidden:w.isHidden??!1}),className:Un(x.button,x.nextIconButton)}),T=a?.leftArrowIcon??SN,O=il(Fs({elementType:T,externalSlotProps:s?.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:v,className:x.leftArrowIcon}),Y$),j=a?.rightArrowIcon??kN,_=il(Fs({elementType:j,externalSlotProps:s?.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:v,className:x.rightArrowIcon}),U$);return(0,le.jsxs)(G$,tr({ref:t,className:Un(x.root,i),ownerState:v},y,{children:[(0,le.jsx)(k,tr({},C,{children:n?(0,le.jsx)(j,tr({},_)):(0,le.jsx)(T,tr({},O))})),o?(0,le.jsx)(BR,{variant:"subtitle1",component:"span",id:g,children:o}):(0,le.jsx)(X$,{className:x.spacer,ownerState:v}),(0,le.jsx)(M,tr({},P,{children:n?(0,le.jsx)(T,tr({},O)):(0,le.jsx)(j,tr({},_))}))]}))});function Z$(e,t,n,r){const o=dA(),i=G.useMemo(()=>o.isValid(e)?e:null,[o,e]),a=((e,t)=>e?t.getHours(e)>=12?"pm":"am":null)(i,o),s=G.useCallback(e=>{const a=null==i?null:((e,t,n,r)=>{const o=fR(r.getHours(e),t,n);return r.setHours(e,o)})(i,e,Boolean(t),o);n(a,r??"partial")},[t,i,n,r,o]);return{meridiemMode:a,handleMeridiemChange:s}}const J$=e=>ss("MuiPickersCalendarHeader",e),eV=ls("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]),tV=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","classes","timezone","format"],nV=["ownerState"],rV=Ka("div",{name:"MuiPickersCalendarHeader",slot:"Root"})({display:"flex",alignItems:"center",marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),oV=Ka("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer"})(({theme:e})=>tr({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),iV=Ka("div",{name:"MuiPickersCalendarHeader",slot:"Label"})({marginRight:6}),aV=Ka(fN,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton"})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${eV.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),sV=Ka(wN,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon"})(({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"})),lV=G.forwardRef(function(e,t){const n=fA(),r=dA(),o=UE({props:e,name:"MuiPickersCalendarHeader"}),{slots:i,slotProps:a,currentMonth:s,disabled:l,disableFuture:c,disablePast:u,maxDate:d,minDate:f,onMonthChange:p,onViewChange:h,view:m,reduceAnimations:g,views:b,labelId:y,className:v,classes:x,timezone:w,format:S=`${r.formats.month} ${r.formats.year}`}=o,k=il(o,tV),{ownerState:C}=nA(),M=(e=>Na({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},J$,e))(x),P=i?.switchViewButton??aV,T=Fs({elementType:P,externalSlotProps:a?.switchViewButton,additionalProps:{size:"small","aria-label":n.calendarViewSwitchingButtonAriaLabel(m)},ownerState:tr({},C,{view:m}),className:M.switchViewButton}),O=i?.switchViewIcon??sV,j=il(Fs({elementType:O,externalSlotProps:a?.switchViewIcon,ownerState:C,className:M.switchViewIcon}),nV),_=function(e,{disableFuture:t,maxDate:n,timezone:r}){const o=dA();return G.useMemo(()=>{const i=o.date(void 0,r),a=o.startOfMonth(t&&o.isBefore(i,n)?i:n);return!o.isAfter(a,e)},[t,n,e,o,r])}(s,{disableFuture:c,maxDate:d,timezone:w}),D=function(e,{disablePast:t,minDate:n,timezone:r}){const o=dA();return G.useMemo(()=>{const i=o.date(void 0,r),a=o.startOfMonth(t&&o.isAfter(i,n)?i:n);return!o.isBefore(a,e)},[t,n,e,o,r])}(s,{disablePast:u,minDate:f,timezone:w});if(1===b.length&&"year"===b[0])return null;const E=r.formatByString(s,S);return(0,le.jsxs)(rV,tr({},k,{ownerState:C,className:Un(M.root,v),ref:t,children:[(0,le.jsxs)(oV,{role:"presentation",onClick:()=>{if(1!==b.length&&h&&!l)if(2===b.length)h(b.find(e=>e!==m)||b[0]);else{const e=0!==b.indexOf(m)?0:1;h(b[e])}},ownerState:C,"aria-live":"polite",className:M.labelContainer,children:[(0,le.jsx)(Yz,{reduceAnimations:g,transKey:E,children:(0,le.jsx)(iV,{id:y,ownerState:C,className:M.label,children:E})}),b.length>1&&!l&&(0,le.jsx)(P,tr({},T,{children:(0,le.jsx)(O,tr({},j))}))]}),(0,le.jsx)(Il,{in:"day"===m,appear:!g,enter:!g,children:(0,le.jsx)(K$,{slots:i,slotProps:a,onGoToPrevious:()=>p(r.addMonths(s,-1)),isPreviousDisabled:D,previousLabel:n.previousMonth,onGoToNext:()=>p(r.addMonths(s,1)),isNextDisabled:_,nextLabel:n.nextMonth})})]}))}),cV=Ka("div",{slot:"internal",shouldForwardProp:void 0})({overflow:"hidden",width:gL,maxHeight:bL,display:"flex",flexDirection:"column",margin:"0 auto"}),uV=e=>ss("MuiDateCalendar",e),dV=(ls("MuiDateCalendar",["root","viewTransitionContainer"]),["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","classes","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsOrder","yearsPerRow","monthsPerRow","timezone"]),fV=Ka(cV,{name:"MuiDateCalendar",slot:"Root"})({display:"flex",flexDirection:"column",height:bL}),pV=Ka(Yz,{name:"MuiDateCalendar",slot:"ViewTransitionContainer"})({}),hV=G.forwardRef(function(e,t){const n=dA(),{ownerState:r}=nA(),o=er(),i=function(e){const t=UE({props:e,name:"MuiDateCalendar"}),n=hF(t.reduceAnimations);return tr({},t,kA(t),{loading:t.loading??!1,openTo:t.openTo??"day",views:t.views??["year","day"],reduceAnimations:n,renderLoading:t.renderLoading??(()=>(0,le.jsx)("span",{children:"..."}))})}(e),{autoFocus:a,onViewChange:s,value:l,defaultValue:c,referenceDate:u,disableFuture:d,disablePast:f,onChange:p,onMonthChange:h,reduceAnimations:m,shouldDisableDate:g,shouldDisableMonth:b,shouldDisableYear:y,view:v,views:x,openTo:w,className:S,classes:k,disabled:C,readOnly:M,minDate:P,maxDate:T,disableHighlightToday:O,focusedView:j,onFocusedViewChange:_,showDaysOutsideCurrentMonth:D,fixedWeekNumber:E,dayOfWeekFormatter:R,slots:A,slotProps:I,loading:F,renderLoading:L,displayWeekNumber:N,yearsOrder:z,yearsPerRow:$,monthsPerRow:V,timezone:B}=i,W=il(i,dV),{value:H,handleValueChange:q,timezone:Y}=yF({name:"DateCalendar",timezone:B,value:l,defaultValue:c,referenceDate:u,onChange:p,valueManager:IR}),{view:U,setView:X,focusedView:Q,setFocusedView:K,goToNextView:Z,setValueAndGoToNextView:J}=gF({view:v,views:x,openTo:w,onChange:q,onViewChange:s,autoFocus:a,focusedView:j,onFocusedViewChange:_}),{referenceDate:ee,calendarState:te,setVisibleDate:ne,isDateDisabled:re,onMonthSwitchingAnimationEnd:oe}=(e=>{const{value:t,referenceDate:n,disableFuture:r,disablePast:o,maxDate:i,minDate:a,onMonthChange:s,onYearChange:l,reduceAnimations:c,shouldDisableDate:u,timezone:d,getCurrentMonthFromVisibleDate:f}=e,p=dA(),h=G.useRef(((e,t)=>(n,r)=>{switch(r.type){case"setVisibleDate":return tr({},n,{slideDirection:r.direction,currentMonth:r.month,isMonthSwitchingAnimating:!t.isSameMonth(r.month,n.currentMonth)&&!e&&!r.skipAnimation,focusedDay:r.focusedDay});case"changeMonthTimezone":{const e=r.newTimezone;if(t.getTimezone(n.currentMonth)===e)return n;let o=t.setTimezone(n.currentMonth,e);return t.getMonth(o)!==t.getMonth(n.currentMonth)&&(o=t.setMonth(o,t.getMonth(n.currentMonth))),tr({},n,{currentMonth:o})}case"finishMonthSwitchingAnimation":return tr({},n,{isMonthSwitchingAnimating:!1});default:throw new Error("missing support")}})(Boolean(c),p)).current,m=G.useMemo(()=>IR.getInitialReferenceValue({value:t,adapter:p,timezone:d,props:e,referenceDate:n,granularity:gR.day}),[n,d]),[g,b]=G.useReducer(h,{isMonthSwitchingAnimating:!1,focusedDay:m,currentMonth:p.setDate(m,1),slideDirection:"left"}),y=Bz({shouldDisableDate:u,minDate:a,maxDate:i,disableFuture:r,disablePast:o,timezone:d});G.useEffect(()=>{b({type:"changeMonthTimezone",newTimezone:p.getTimezone(m)})},[m,p]);const v=zl(({target:e,reason:t})=>{if("cell-interaction"===t&&null!=g.focusedDay&&p.isSameDay(e,g.focusedDay))return;const n="cell-interaction"===t;let c,u;if("cell-interaction"===t)c=f(e,g.currentMonth),u=e;else if(c=p.isSameMonth(e,g.currentMonth)?g.currentMonth:p.startOfMonth(e),u=e,y(u)){const t=p.startOfMonth(e),n=p.endOfMonth(e);u=JE({adapter:p,date:u,minDate:p.isBefore(a,t)?t:a,maxDate:p.isAfter(i,n)?n:i,disablePast:o,disableFuture:r,isDateDisabled:y,timezone:d})}const h=!p.isSameMonth(g.currentMonth,c),m=!p.isSameYear(g.currentMonth,c);h&&s?.(c),m&&l?.(p.startOfYear(c)),b({type:"setVisibleDate",month:c,direction:p.isAfterDay(c,g.currentMonth)?"left":"right",focusedDay:null!=g.focusedDay&&null!=u&&p.isSameDay(u,g.focusedDay)?g.focusedDay:u,skipAnimation:n})}),x=G.useCallback(()=>{b({type:"finishMonthSwitchingAnimation"})},[]);return{referenceDate:m,calendarState:g,setVisibleDate:v,isDateDisabled:y,onMonthSwitchingAnimationEnd:x}})({value:H,referenceDate:u,reduceAnimations:m,onMonthChange:h,minDate:P,maxDate:T,shouldDisableDate:g,disablePast:f,disableFuture:d,timezone:Y,getCurrentMonthFromVisibleDate:(e,t)=>n.isSameMonth(e,t)?t:n.startOfMonth(e)}),ie=C&&H||P,ae=C&&H||T,se=`${o}-grid-label`,ce=null!==Q,ue=A?.calendarHeader??lV,de=Fs({elementType:ue,externalSlotProps:I?.calendarHeader,additionalProps:{views:x,view:U,currentMonth:te.currentMonth,onViewChange:X,onMonthChange:e=>ne({target:e,reason:"header-navigation"}),minDate:ie,maxDate:ae,disabled:C,disablePast:f,disableFuture:d,reduceAnimations:m,timezone:Y,labelId:se},ownerState:r}),fe=zl(e=>{const t=n.startOfMonth(e),r=n.endOfMonth(e),o=re(e)?JE({adapter:n,date:e,minDate:n.isBefore(P,t)?t:P,maxDate:n.isAfter(T,r)?r:T,disablePast:f,disableFuture:d,isDateDisabled:re,timezone:Y}):e;o?(J(o,"finish"),ne({target:o,reason:"cell-interaction"})):(Z(),ne({target:t,reason:"cell-interaction"}))}),pe=zl(e=>{const t=n.startOfYear(e),r=n.endOfYear(e),o=re(e)?JE({adapter:n,date:e,minDate:n.isBefore(P,t)?t:P,maxDate:n.isAfter(T,r)?r:T,disablePast:f,disableFuture:d,isDateDisabled:re,timezone:Y}):e;o?(J(o,"finish"),ne({target:o,reason:"cell-interaction"})):(Z(),ne({target:t,reason:"cell-interaction"}))}),he=zl(e=>q(e?ZE(n,e,H??ee):e,"finish",U));G.useEffect(()=>{n.isValid(H)&&ne({target:H,reason:"controlled-value-change"})},[H]);const me=(e=>Na({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},uV,e))(k),ge={disablePast:f,disableFuture:d,maxDate:T,minDate:P},be={disableHighlightToday:O,readOnly:M,disabled:C,timezone:Y,gridLabelId:se,slots:A,slotProps:I},ye=G.useRef(U);G.useEffect(()=>{ye.current!==U&&(Q===ye.current&&K(U,!0),ye.current=U)},[Q,K,U]);const ve=G.useMemo(()=>[H],[H]);return(0,le.jsxs)(fV,tr({ref:t,className:Un(me.root,S),ownerState:r},W,{children:[(0,le.jsx)(ue,tr({},de,{slots:A,slotProps:I})),(0,le.jsx)(pV,{reduceAnimations:m,className:me.viewTransitionContainer,transKey:U,ownerState:r,children:(0,le.jsxs)("div",{children:["year"===U&&(0,le.jsx)(W$,tr({},ge,be,{value:H,onChange:pe,shouldDisableYear:y,hasFocus:ce,onFocusedViewChange:e=>K("year",e),yearsOrder:z,yearsPerRow:$,referenceDate:ee})),"month"===U&&(0,le.jsx)(A$,tr({},ge,be,{currentMonth:te.currentMonth,hasFocus:ce,className:S,value:H,onChange:fe,shouldDisableMonth:b,onFocusedViewChange:e=>K("month",e),monthsPerRow:V,referenceDate:ee})),"day"===U&&(0,le.jsx)(M$,tr({},te,ge,be,{onMonthSwitchingAnimationEnd:oe,hasFocus:ce,onFocusedDayChange:e=>ne({target:e,reason:"cell-interaction"}),reduceAnimations:m,selectedDays:ve,onSelectedDaysChange:he,shouldDisableDate:g,shouldDisableMonth:b,shouldDisableYear:y,onFocusedViewChange:e=>K("day",e),showDaysOutsideCurrentMonth:D,fixedWeekNumber:E,dayOfWeekFormatter:R,displayWeekNumber:N,loading:F,renderLoading:L}))]})})]}))}),mV=({view:e,onViewChange:t,views:n,focusedView:r,onFocusedViewChange:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minDate:p,maxDate:h,shouldDisableDate:m,shouldDisableMonth:g,shouldDisableYear:b,reduceAnimations:y,onMonthChange:v,monthsPerRow:x,onYearChange:w,yearsOrder:S,yearsPerRow:k,slots:C,slotProps:M,loading:P,renderLoading:T,disableHighlightToday:O,readOnly:j,disabled:_,showDaysOutsideCurrentMonth:D,dayOfWeekFormatter:E,sx:R,autoFocus:A,fixedWeekNumber:I,displayWeekNumber:F,timezone:L})=>(0,le.jsx)(hV,{view:e,onViewChange:t,views:n.filter(iR),focusedView:r&&iR(r)?r:null,onFocusedViewChange:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minDate:p,maxDate:h,shouldDisableDate:m,shouldDisableMonth:g,shouldDisableYear:b,reduceAnimations:y,onMonthChange:v,monthsPerRow:x,onYearChange:w,yearsOrder:S,yearsPerRow:k,slots:C,slotProps:M,loading:P,renderLoading:T,disableHighlightToday:O,readOnly:j,disabled:_,showDaysOutsideCurrentMonth:D,dayOfWeekFormatter:E,sx:R,autoFocus:A,fixedWeekNumber:I,displayWeekNumber:F,timezone:L}),gV=G.forwardRef(function(e,t){const n=dA(),r=CA(e,"MuiDesktopDatePicker"),o=tr({day:mV,month:mV,year:mV},r.viewRenderers),i=tr({},r,{closeOnSelect:r.closeOnSelect??!0,viewRenderers:o,format:aR(n,r,!1),yearsPerRow:r.yearsPerRow??4,slots:tr({field:Vz},r.slots),slotProps:tr({},r.slotProps,{field:e=>tr({},Is(r.slotProps?.field,e),jA(r)),toolbar:tr({hidden:!0},r.slotProps?.toolbar)})}),{renderPicker:a}=_L({ref:t,props:i,valueManager:IR,valueType:"date",validator:yA,steps:null});return a()});function bV(e){return ss("MuiDialogContent",e)}gV.propTypes={autoFocus:GE.bool,className:GE.string,closeOnSelect:GE.bool,dayOfWeekFormatter:GE.func,defaultValue:GE.object,disabled:GE.bool,disableFuture:GE.bool,disableHighlightToday:GE.bool,disableOpenPicker:GE.bool,disablePast:GE.bool,displayWeekNumber:GE.bool,enableAccessibleFieldDOMStructure:GE.any,fixedWeekNumber:GE.number,format:GE.string,formatDensity:GE.oneOf(["dense","spacious"]),inputRef:XE,label:GE.node,loading:GE.bool,localeText:GE.object,maxDate:GE.object,minDate:GE.object,monthsPerRow:GE.oneOf([3,4]),name:GE.string,onAccept:GE.func,onChange:GE.func,onClose:GE.func,onError:GE.func,onMonthChange:GE.func,onOpen:GE.func,onSelectedSectionsChange:GE.func,onViewChange:GE.func,onYearChange:GE.func,open:GE.bool,openTo:GE.oneOf(["day","month","year"]),orientation:GE.oneOf(["landscape","portrait"]),readOnly:GE.bool,reduceAnimations:GE.bool,referenceDate:GE.object,renderLoading:GE.func,selectedSections:GE.oneOfType([GE.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),GE.number]),shouldDisableDate:GE.func,shouldDisableMonth:GE.func,shouldDisableYear:GE.func,showDaysOutsideCurrentMonth:GE.bool,slotProps:GE.object,slots:GE.object,sx:GE.oneOfType([GE.arrayOf(GE.oneOfType([GE.func,GE.object,GE.bool])),GE.func,GE.object]),timezone:GE.string,value:GE.object,view:GE.oneOf(["day","month","year"]),viewRenderers:GE.shape({day:GE.func,month:GE.func,year:GE.func}),views:GE.arrayOf(GE.oneOf(["day","month","year"]).isRequired),yearsOrder:GE.oneOf(["asc","desc"]),yearsPerRow:GE.oneOf([3,4])},ls("MuiDialogContent",["root","dividers"]);const yV=ls("MuiDialogTitle",["root"]),vV=Ka("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(gs(({theme:e})=>({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:({ownerState:e})=>e.dividers,style:{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>!e.dividers,style:{[`.${yV.root} + &`]:{paddingTop:0}}}]}))),xV=G.forwardRef(function(e,t){const n=Za({props:e,name:"MuiDialogContent"}),{className:r,dividers:o=!1,...i}=n,a={...n,dividers:o},s=(e=>{const{classes:t,dividers:n}=e;return Na({root:["root",n&&"dividers"]},bV,t)})(a);return(0,le.jsx)(vV,{className:Un(s.root,r),ownerState:a,ref:t,...i})});function wV(e){return ss("MuiDialog",e)}const SV=ls("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),kV=G.createContext({}),CV=Ka(Nl,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),MV=Ka(Kl,{name:"MuiDialog",slot:"Root"})({"@media print":{position:"absolute !important"}}),PV=Ka("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${ts(n.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),TV=Ka(ec,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${ts(n.scroll)}`],t[`paperWidth${ts(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(gs(({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:e})=>!e.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:"px"===e.breakpoints.unit?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${SV.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(e.breakpoints.values).filter(e=>"xs"!==e).map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`,[`&.${SV.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t]+64)]:{maxWidth:"calc(100% - 64px)"}}}})),{props:({ownerState:e})=>e.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:e})=>e.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${SV.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),OV=G.forwardRef(function(e,t){const n=Za({props:e,name:"MuiDialog"}),r=yl(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{"aria-describedby":i,"aria-labelledby":a,"aria-modal":s=!0,BackdropComponent:l,BackdropProps:c,children:u,className:d,disableEscapeKeyDown:f=!1,fullScreen:p=!1,fullWidth:h=!1,maxWidth:m="sm",onClick:g,onClose:b,open:y,PaperComponent:v=ec,PaperProps:x={},scroll:w="paper",slots:S={},slotProps:k={},TransitionComponent:C=Il,transitionDuration:M=o,TransitionProps:P,...T}=n,O={...n,disableEscapeKeyDown:f,fullScreen:p,fullWidth:h,maxWidth:m,scroll:w},j=(e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:i}=e;return Na({root:["root"],container:["container",`scroll${ts(n)}`],paper:["paper",`paperScroll${ts(n)}`,`paperWidth${ts(String(r))}`,o&&"paperFullWidth",i&&"paperFullScreen"]},wV,t)})(O),_=G.useRef(),D=er(a),E=G.useMemo(()=>({titleId:D}),[D]),R={slots:{transition:C,...S},slotProps:{transition:P,paper:x,backdrop:c,...k}},[A,I]=El("root",{elementType:MV,shouldForwardComponentProp:!0,externalForwardedProps:R,ownerState:O,className:Un(j.root,d),ref:t}),[F,L]=El("backdrop",{elementType:CV,shouldForwardComponentProp:!0,externalForwardedProps:R,ownerState:O}),[N,z]=El("paper",{elementType:TV,shouldForwardComponentProp:!0,externalForwardedProps:R,ownerState:O,className:Un(j.paper,x.className)}),[$,V]=El("container",{elementType:PV,externalForwardedProps:R,ownerState:O,className:j.container}),[B,W]=El("transition",{elementType:Il,externalForwardedProps:R,ownerState:O,additionalProps:{appear:!0,in:y,timeout:M,role:"presentation"}});return(0,le.jsx)(A,{closeAfterTransition:!0,slots:{backdrop:F},slotProps:{backdrop:{transitionDuration:M,as:l,...L}},disableEscapeKeyDown:f,onClose:b,open:y,onClick:e=>{g&&g(e),_.current&&(_.current=null,b&&b(e,"backdropClick"))},...I,...T,children:(0,le.jsx)(B,{...W,children:(0,le.jsx)($,{onMouseDown:e=>{_.current=e.target===e.currentTarget},...V,children:(0,le.jsx)(N,{as:v,elevation:24,role:"dialog","aria-describedby":i,"aria-labelledby":D,"aria-modal":s,...z,children:(0,le.jsx)(kV.Provider,{value:E,children:u})})})})})}),jV=Ka(OV,{slot:"internal"})({[`& .${SV.container}`]:{outline:0},[`& .${SV.paper}`]:{outline:0,minWidth:gL}}),_V=Ka(xV,{slot:"internal"})({"&:first-of-type":{padding:0}});function DV(e){const{children:t,slots:n,slotProps:r}=e,{open:o}=ZR(),{dismissViews:i,onPopperExited:a}=nA(),s=n?.dialog??jV,l=n?.mobileTransition??Il;return(0,le.jsx)(s,tr({open:o,onClose:()=>{i(),a?.()}},r?.dialog,{TransitionComponent:l,TransitionProps:r?.mobileTransition,PaperComponent:n?.mobilePaper,PaperProps:r?.mobilePaper,children:(0,le.jsx)(_V,{children:t})}))}const EV=["props","steps"],RV=["ownerState"],AV=e=>{let{props:t,steps:n}=e,r=il(e,EV);const{slots:o,slotProps:i,label:a,inputRef:s,localeText:l}=t,c=TL({steps:n}),{providerProps:u,renderCurrentView:d,ownerState:f}=wF(tr({},r,{props:t,localeText:l,autoFocusView:!0,viewContainerRole:"dialog",variant:"mobile",getStepNavigation:c})),p=u.privateContextValue.labelId,h=i?.toolbar?.hidden??!1,m=o.field,g=il(Fs({elementType:m,externalSlotProps:i?.field,additionalProps:tr({},h&&{id:p}),ownerState:f}),RV),b=o.layout??PL;let y=p;h&&(y=a?`${p}-label`:void 0);const v=tr({},i,{toolbar:tr({},i?.toolbar,{titleId:p}),mobilePaper:tr({"aria-labelledby":y},i?.mobilePaper)});return{renderPicker:()=>(0,le.jsxs)(tA,tr({},u,{children:[(0,le.jsx)(m,tr({},g,{slots:tr({},o,g.slots),slotProps:tr({},v,g.slotProps),inputRef:s})),(0,le.jsx)(DV,{slots:o,slotProps:v,children:(0,le.jsx)(b,tr({},v?.layout,{slots:o,slotProps:v,children:d()}))})]}))}},IV=G.forwardRef(function(e,t){const n=dA(),r=CA(e,"MuiMobileDatePicker"),o=tr({day:mV,month:mV,year:mV},r.viewRenderers),i=tr({},r,{viewRenderers:o,format:aR(n,r,!1),slots:tr({field:Vz},r.slots),slotProps:tr({},r.slotProps,{field:e=>tr({},Is(r.slotProps?.field,e),jA(r)),toolbar:tr({hidden:!1},r.slotProps?.toolbar)})}),{renderPicker:a}=AV({ref:t,props:i,valueManager:IR,valueType:"date",validator:yA,steps:null});return a()});IV.propTypes={autoFocus:GE.bool,className:GE.string,closeOnSelect:GE.bool,dayOfWeekFormatter:GE.func,defaultValue:GE.object,disabled:GE.bool,disableFuture:GE.bool,disableHighlightToday:GE.bool,disableOpenPicker:GE.bool,disablePast:GE.bool,displayWeekNumber:GE.bool,enableAccessibleFieldDOMStructure:GE.any,fixedWeekNumber:GE.number,format:GE.string,formatDensity:GE.oneOf(["dense","spacious"]),inputRef:XE,label:GE.node,loading:GE.bool,localeText:GE.object,maxDate:GE.object,minDate:GE.object,monthsPerRow:GE.oneOf([3,4]),name:GE.string,onAccept:GE.func,onChange:GE.func,onClose:GE.func,onError:GE.func,onMonthChange:GE.func,onOpen:GE.func,onSelectedSectionsChange:GE.func,onViewChange:GE.func,onYearChange:GE.func,open:GE.bool,openTo:GE.oneOf(["day","month","year"]),orientation:GE.oneOf(["landscape","portrait"]),readOnly:GE.bool,reduceAnimations:GE.bool,referenceDate:GE.object,renderLoading:GE.func,selectedSections:GE.oneOfType([GE.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),GE.number]),shouldDisableDate:GE.func,shouldDisableMonth:GE.func,shouldDisableYear:GE.func,showDaysOutsideCurrentMonth:GE.bool,slotProps:GE.object,slots:GE.object,sx:GE.oneOfType([GE.arrayOf(GE.oneOfType([GE.func,GE.object,GE.bool])),GE.func,GE.object]),timezone:GE.string,value:GE.object,view:GE.oneOf(["day","month","year"]),viewRenderers:GE.shape({day:GE.func,month:GE.func,year:GE.func}),views:GE.arrayOf(GE.oneOf(["day","month","year"]).isRequired),yearsOrder:GE.oneOf(["asc","desc"]),yearsPerRow:GE.oneOf([3,4])};const FV=["desktopModeMediaQuery"],LV=G.forwardRef(function(e,t){const n=UE({props:e,name:"MuiDatePicker"}),{desktopModeMediaQuery:r=rF}=n,o=il(n,FV);return YE(r,{defaultMatches:!0})?(0,le.jsx)(gV,tr({ref:t},o)):(0,le.jsx)(IV,tr({ref:t},o))}),NV=({adapter:e,value:t,timezone:n,props:r})=>{if(null===t)return null;const{minTime:o,maxTime:i,minutesStep:a,shouldDisableTime:s,disableIgnoringDatePartForTimeValidation:l=!1,disablePast:c,disableFuture:u}=r,d=e.date(void 0,n),f=hR(l,e);switch(!0){case!e.isValid(t):return"invalidDate";case Boolean(o&&f(o,t)):return"minTime";case Boolean(i&&f(t,i)):return"maxTime";case Boolean(u&&e.isAfter(t,d)):return"disableFuture";case Boolean(c&&e.isBefore(t,d)):return"disablePast";case Boolean(s&&s(t,"hours")):return"shouldDisableTime-hours";case Boolean(s&&s(t,"minutes")):return"shouldDisableTime-minutes";case Boolean(s&&s(t,"seconds")):return"shouldDisableTime-seconds";case Boolean(a&&e.getMinutes(t)%a!==0):return"minutesStep";default:return null}};function zV(e){return function(t){const n=dA(),r=fA();return G.useMemo(()=>{const o=e??n.is12HourCycleInCurrentLocale()?"fullTime12h":"fullTime24h",i=n.isValid(t)?n.format(t,o):null;return r.openTimePickerDialogue(i)},[t,r,n])}}function $V(e){const t=dA(),n=VV(e),r=G.useMemo(()=>e.ampm??t.is12HourCycleInCurrentLocale(),[e.ampm,t]);return G.useMemo(()=>tr({},e,n,{format:e.format??(r?t.formats.fullTime12h:t.formats.fullTime24h)}),[e,n,r,t])}function VV(e){return G.useMemo(()=>({disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1}),[e.disablePast,e.disableFuture])}NV.valueManager=IR;const BV=["slots","slotProps","InputProps","inputProps"],WV=G.forwardRef(function(e,t){const n=UE({props:e,name:"MuiTimeField"}),{slots:r,slotProps:o}=n,i=il(n,BV),a=(e=>{const t=function(e={}){const{enableAccessibleFieldDOMStructure:t=!0,ampm:n}=e;return G.useMemo(()=>({valueType:"time",validator:NV,internal_valueManager:IR,internal_fieldValueManager:FR,internal_enableAccessibleFieldDOMStructure:t,internal_useApplyDefaultValuesToFieldInternalProps:$V,internal_useOpenPickerButtonAriaLabel:zV(n)}),[n,t])}(e);return KL({manager:t,props:e})})(Nz({slotProps:o,ref:t,externalForwardedProps:i}));return(0,le.jsx)(zz,{slots:r,slotProps:o,inputRef:i.inputRef,children:(0,le.jsx)(Fz,{fieldResponse:a,defaultOpenPickerIcon:MN})})});function HV(e){return ss("MuiPickersToolbarText",e)}const qV=ls("MuiPickersToolbarText",["root"]),YV=["className","classes","selected","value"],UV=Ka(BR,{name:"MuiPickersToolbarText",slot:"Root"})(({theme:e})=>({transition:e.transitions.create("color"),color:(e.vars||e).palette.text.secondary,"&[data-selected]":{color:(e.vars||e).palette.text.primary}})),GV=G.forwardRef(function(e,t){const n=UE({props:e,name:"MuiPickersToolbarText"}),{className:r,classes:o,selected:i,value:a}=n,s=il(n,YV),l=(e=>Na({root:["root"]},HV,e))(o);return(0,le.jsx)(UV,tr({ref:t,className:Un(l.root,r),component:"span",ownerState:n},i&&{"data-selected":!0},s,{children:a}))}),XV=["align","className","classes","selected","typographyClassName","value","variant","width"],QV=Ka(UF,{name:"MuiPickersToolbarButton",slot:"Root"})({padding:0,minWidth:16,textTransform:"none"}),KV=G.forwardRef(function(e,t){const n=UE({props:e,name:"MuiPickersToolbarButton"}),{align:r,className:o,classes:i,selected:a,typographyClassName:s,value:l,variant:c,width:u}=n,d=il(n,XV),f=(e=>Na({root:["root"]},WR,e))(i);return(0,le.jsx)(QV,tr({variant:"text",ref:t,className:Un(f.root,o),ownerState:n},u?{sx:{width:u}}:{},d,{children:(0,le.jsx)(GV,{align:r,className:s,variant:c,value:l,selected:a})}))});function ZV(e){return ss("MuiTimePickerToolbar",e)}const JV=ls("MuiTimePickerToolbar",["root","separator","hourMinuteLabel","hourMinuteLabelLandscape","hourMinuteLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),eB=["ampm","ampmInClock","className","classes"],tB=Ka(sA,{name:"MuiTimePickerToolbar",slot:"Root"})({}),nB=Ka(GV,{name:"MuiTimePickerToolbar",slot:"Separator"})({outline:0,margin:"0 4px 0 2px",cursor:"default"}),rB=Ka("div",{name:"MuiTimePickerToolbar",slot:"HourMinuteLabel",overridesResolver:(e,t)=>[{[`&.${JV.hourMinuteLabelLandscape}`]:t.hourMinuteLabelLandscape,[`&.${JV.hourMinuteLabelReverse}`]:t.hourMinuteLabelReverse},t.hourMinuteLabel]})({display:"flex",justifyContent:"flex-end",alignItems:"flex-end",variants:[{props:{toolbarDirection:"rtl"},style:{flexDirection:"row-reverse"}},{props:{pickerOrientation:"landscape"},style:{marginTop:"auto"}}]}),oB=Ka("div",{name:"MuiTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[`.${JV.ampmLabel}`]:t.ampmLabel},{[`&.${JV.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12,[`& .${JV.ampmLabel}`]:{fontSize:17},variants:[{props:{pickerOrientation:"landscape"},style:{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",flexBasis:"100%"}}]});function iB(e){const t=UE({props:e,name:"MuiTimePickerToolbar"}),{ampm:n,ampmInClock:r,className:o,classes:i}=t,a=il(t,eB),s=dA(),l=fA(),c=rA(),u=((e,t)=>{const{pickerOrientation:n,toolbarDirection:r}=t;return Na({root:["root"],separator:["separator"],hourMinuteLabel:["hourMinuteLabel","landscape"===n&&"hourMinuteLabelLandscape","rtl"===r&&"hourMinuteLabelReverse"],ampmSelection:["ampmSelection","landscape"===n&&"ampmLandscape"],ampmLabel:["ampmLabel"]},ZV,e)})(i,c),{value:d,setValue:f,disabled:p,readOnly:h,view:m,setView:g,views:b}=ZR(),y=Boolean(n&&!r&&b.includes("hours")),{meridiemMode:v,handleMeridiemChange:x}=Z$(d,n,e=>f(e,{changeImportance:"set",source:"view"})),w=e=>s.isValid(d)?s.format(d,e):"--",S=(0,le.jsx)(nB,{tabIndex:-1,value:":",variant:"h3",selected:!1,className:u.separator});return(0,le.jsxs)(tB,tr({landscapeDirection:"row",toolbarTitle:l.timePickerToolbarTitle,ownerState:c,className:Un(u.root,o)},a,{children:[(0,le.jsxs)(rB,{className:u.hourMinuteLabel,ownerState:c,children:[JI(b,"hours")&&(0,le.jsx)(KV,{tabIndex:-1,variant:"h3",onClick:()=>g("hours"),selected:"hours"===m,value:w(n?"hours12h":"hours24h")}),JI(b,["hours","minutes"])&&S,JI(b,"minutes")&&(0,le.jsx)(KV,{tabIndex:-1,variant:"h3",onClick:()=>g("minutes"),selected:"minutes"===m,value:w("minutes")}),JI(b,["minutes","seconds"])&&S,JI(b,"seconds")&&(0,le.jsx)(KV,{variant:"h3",onClick:()=>g("seconds"),selected:"seconds"===m,value:w("seconds")})]}),y&&(0,le.jsxs)(oB,{className:u.ampmSelection,ownerState:c,children:[(0,le.jsx)(KV,{disableRipple:!0,variant:"subtitle2",selected:"am"===v,typographyClassName:u.ampmLabel,value:rR(s,"am"),onClick:h?void 0:()=>x("am"),disabled:p}),(0,le.jsx)(KV,{disableRipple:!0,variant:"subtitle2",selected:"pm"===v,typographyClassName:u.ampmLabel,value:rR(s,"pm"),onClick:h?void 0:()=>x("pm"),disabled:p})]})]}))}function aB(e,t){const n=dA(),r=UE({props:e,name:t}),o=VV(r),i=r.ampm??n.is12HourCycleInCurrentLocale(),a=G.useMemo(()=>null==r.localeText?.toolbarTitle?r.localeText:tr({},r.localeText,{timePickerToolbarTitle:r.localeText.toolbarTitle}),[r.localeText]);return tr({},r,o,{ampm:i,localeText:a},KE({views:r.views,openTo:r.openTo,defaultViews:["hours","minutes"],defaultOpenTo:"hours"}),{slots:tr({toolbar:iB},r.slots),slotProps:tr({},r.slotProps,{toolbar:tr({ampm:i,ampmInClock:r.ampmInClock},r.slotProps?.toolbar)})})}function sB(e){return ss("MuiTimeClock",e)}ls("MuiTimeClock",["root","arrowSwitcher"]);const lB=110,cB=110,uB=lB-lB,dB=0-cB,fB=(e,t,n)=>{const r=t-lB,o=n-cB;let i=(Math.atan2(uB,dB)-Math.atan2(r,o))*(180/Math.PI);i=Math.round(i/e)*e,i%=360;const a=r**2+o**2;return{value:Math.floor(i/e)||0,distance:Math.sqrt(a)}};function pB(e){return ss("MuiClockPointer",e)}ls("MuiClockPointer",["root","thumb"]);const hB=["className","classes","isBetweenTwoClockValues","isInner","type","viewValue"],mB=Ka("div",{name:"MuiClockPointer",slot:"Root"})(({theme:e})=>({width:2,backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",left:"calc(50% - 1px)",bottom:"50%",transformOrigin:"center bottom 0px",variants:[{props:{isClockPointerAnimated:!0},style:{transition:e.transitions.create(["transform","height"])}}]})),gB=Ka("div",{name:"MuiClockPointer",slot:"Thumb"})(({theme:e})=>({width:4,height:4,backgroundColor:(e.vars||e).palette.primary.contrastText,borderRadius:"50%",position:"absolute",top:-21,left:"calc(50% - 18px)",border:`16px solid ${(e.vars||e).palette.primary.main}`,boxSizing:"content-box",variants:[{props:{isClockPointerBetweenTwoValues:!1},style:{backgroundColor:(e.vars||e).palette.primary.main}}]}));function bB(e){const t=UE({props:e,name:"MuiClockPointer"}),{className:n,classes:r,isBetweenTwoClockValues:o,isInner:i,type:a,viewValue:s}=t,l=il(t,hB),c=G.useRef(a);G.useEffect(()=>{c.current=a},[a]);const{ownerState:u}=nA(),d=tr({},u,{isClockPointerAnimated:c.current!==a,isClockPointerBetweenTwoValues:o}),f=(e=>Na({root:["root"],thumb:["thumb"]},pB,e))(r);return(0,le.jsx)(mB,tr({style:(()=>{let e=360/("hours"===a?12:60)*s;return"hours"===a&&s>12&&(e-=360),{height:Math.round(220*(i?.26:.4)),transform:`rotateZ(${e}deg)`}})(),className:Un(f.root,n),ownerState:d},l,{children:(0,le.jsx)(gB,{ownerState:d,className:f.thumb})}))}function yB(e){return ss("MuiClock",e)}ls("MuiClock",["root","clock","wrapper","squareMask","pin","amButton","pmButton","meridiemText","selected"]);const vB=Ka("div",{name:"MuiClock",slot:"Root"})(({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",margin:e.spacing(2)})),xB=Ka("div",{name:"MuiClock",slot:"Clock"})({backgroundColor:"rgba(0,0,0,.07)",borderRadius:"50%",height:220,width:220,flexShrink:0,position:"relative",pointerEvents:"none"}),wB=Ka("div",{name:"MuiClock",slot:"Wrapper"})({"&:focus":{outline:"none"}}),SB=Ka("div",{name:"MuiClock",slot:"SquareMask"})({width:"100%",height:"100%",position:"absolute",pointerEvents:"auto",outline:0,touchAction:"none",userSelect:"none",variants:[{props:{isClockDisabled:!1},style:{"@media (pointer: fine)":{cursor:"pointer",borderRadius:"50%"},"&:active":{cursor:"move"}}}]}),kB=Ka("div",{name:"MuiClock",slot:"Pin"})(({theme:e})=>({width:6,height:6,borderRadius:"50%",backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"})),CB=(e,t)=>({zIndex:1,bottom:8,paddingLeft:4,paddingRight:4,width:36,variants:[{props:{clockMeridiemMode:t},style:{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:hover":{backgroundColor:(e.vars||e).palette.primary.light}}}]}),MB=Ka(fN,{name:"MuiClock",slot:"AmButton"})(({theme:e})=>tr({},CB(e,"am"),{position:"absolute",left:8})),PB=Ka(fN,{name:"MuiClock",slot:"PmButton"})(({theme:e})=>tr({},CB(e,"pm"),{position:"absolute",right:8})),TB=Ka(BR,{name:"MuiClock",slot:"MeridiemText"})({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});function OB(e){const t=UE({props:e,name:"MuiClock"}),{ampm:n,ampmInClock:r,autoFocus:o,children:i,value:a,handleMeridiemChange:s,isTimeDisabled:l,meridiemMode:c,minutesStep:u=1,onChange:d,selectedId:f,type:p,viewValue:h,viewRange:[m,g],disabled:b=!1,readOnly:y,className:v,classes:x}=t,w=dA(),S=fA(),{ownerState:k}=nA(),C=tr({},k,{isClockDisabled:b,clockMeridiemMode:c}),M=G.useRef(!1),P=((e,t)=>Na({root:["root"],clock:["clock"],wrapper:["wrapper"],squareMask:["squareMask"],pin:["pin"],amButton:["amButton","am"===t.clockMeridiemMode&&"selected"],pmButton:["pmButton","pm"===t.clockMeridiemMode&&"selected"],meridiemText:["meridiemText"]},yB,e))(x,C),T=l(h,p),O=!n&&"hours"===p&&(h<1||h>12),j=(e,t)=>{b||y||l(e,p)||d(e,t)},_=(e,t)=>{let{offsetX:r,offsetY:o}=e;if(void 0===r){const t=e.target.getBoundingClientRect();r=e.changedTouches[0].clientX-t.left,o=e.changedTouches[0].clientY-t.top}const i="seconds"===p||"minutes"===p?((e,t,n=1)=>{const r=6*n;let{value:o}=fB(r,e,t);return o=o*n%60,o})(r,o,u):((e,t,n)=>{const{value:r,distance:o}=fB(30,e,t);let i=r||12;return n?i%=12:o<74&&(i+=12,i%=24),i})(r,o,Boolean(n));j(i,t)},D=e=>{M.current=!0,_(e,"shallow")},E="hours"!==p&&h%5!=0,R="minutes"===p?u:1,A=G.useRef(null);Kn(()=>{o&&A.current.focus()},[o]);const I=e=>Math.max(m,Math.min(g,e)),F=e=>(e+(g+1))%(g+1);return(0,le.jsxs)(vB,{className:Un(P.root,v),children:[(0,le.jsxs)(xB,{className:P.clock,children:[(0,le.jsx)(SB,{onTouchMove:D,onTouchStart:D,onTouchEnd:e=>{M.current&&(_(e,"finish"),M.current=!1),e.preventDefault()},onMouseUp:e=>{M.current&&(M.current=!1),_(e.nativeEvent,"finish")},onMouseMove:e=>{e.buttons>0&&_(e.nativeEvent,"shallow")},ownerState:C,className:P.squareMask}),!T&&(0,le.jsxs)(G.Fragment,{children:[(0,le.jsx)(kB,{className:P.pin}),null!=a&&(0,le.jsx)(bB,{type:p,viewValue:h,isInner:O,isBetweenTwoClockValues:E})]}),(0,le.jsx)(wB,{"aria-activedescendant":f,"aria-label":S.clockLabelText(p,null==a?null:w.format(a,n?"fullTime12h":"fullTime24h")),ref:A,role:"listbox",onKeyDown:e=>{if(!M.current)switch(e.key){case"Home":j(m,"partial"),e.preventDefault();break;case"End":j(g,"partial"),e.preventDefault();break;case"ArrowUp":j(F(h+R),"partial"),e.preventDefault();break;case"ArrowDown":j(F(h-R),"partial"),e.preventDefault();break;case"PageUp":j(I(h+5),"partial"),e.preventDefault();break;case"PageDown":j(I(h-5),"partial"),e.preventDefault();break;case"Enter":case" ":j(h,"finish"),e.preventDefault()}},tabIndex:0,className:P.wrapper,children:i})]}),n&&r&&(0,le.jsxs)(G.Fragment,{children:[(0,le.jsx)(MB,{onClick:y?void 0:()=>s("am"),disabled:b||null===c,ownerState:C,className:P.amButton,title:rR(w,"am"),children:(0,le.jsx)(TB,{variant:"caption",className:P.meridiemText,children:rR(w,"am")})}),(0,le.jsx)(PB,{disabled:b||null===c,onClick:y?void 0:()=>s("pm"),ownerState:C,className:P.pmButton,title:rR(w,"pm"),children:(0,le.jsx)(TB,{variant:"caption",className:P.meridiemText,children:rR(w,"pm")})})]})]})}function jB(e){return ss("MuiClockNumber",e)}const _B=ls("MuiClockNumber",["root","selected","disabled"]),DB=["className","classes","disabled","index","inner","label","selected"],EB=Ka("span",{name:"MuiClockNumber",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${_B.disabled}`]:t.disabled},{[`&.${_B.selected}`]:t.selected}]})(({theme:e})=>({height:36,width:36,position:"absolute",left:"calc((100% - 36px) / 2)",display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",color:(e.vars||e).palette.text.primary,fontFamily:e.typography.fontFamily,"&:focused":{backgroundColor:(e.vars||e).palette.background.paper},[`&.${_B.selected}`]:{color:(e.vars||e).palette.primary.contrastText},[`&.${_B.disabled}`]:{pointerEvents:"none",color:(e.vars||e).palette.text.disabled},variants:[{props:{isClockNumberInInnerRing:!0},style:tr({},e.typography.body2,{color:(e.vars||e).palette.text.secondary})}]}));function RB(e){const t=UE({props:e,name:"MuiClockNumber"}),{className:n,classes:r,disabled:o,index:i,inner:a,label:s,selected:l}=t,c=il(t,DB),{ownerState:u}=nA(),d=tr({},u,{isClockNumberInInnerRing:a,isClockNumberSelected:l,isClockNumberDisabled:o}),f=((e,t)=>Na({root:["root",t.isClockNumberSelected&&"selected",t.isClockNumberDisabled&&"disabled"]},jB,e))(r,d),p=i%12/12*Math.PI*2-Math.PI/2,h=91*(a?.65:1),m=Math.round(Math.cos(p)*h),g=Math.round(Math.sin(p)*h);return(0,le.jsx)(EB,tr({className:Un(f.root,n),"aria-disabled":!!o||void 0,"aria-selected":!!l||void 0,role:"option",style:{transform:`translate(${m}px, ${g+92}px`},ownerState:d},c,{children:s}))}const AB=({ampm:e,value:t,getClockNumberText:n,isDisabled:r,selectedId:o,adapter:i})=>{const a=t?i.getHours(t):null,s=[],l=e?12:23,c=t=>null!==a&&(e?12===t?12===a||0===a:a===t||a-12===t:a===t);for(let t=e?1:0;t<=l;t+=1){let a=t.toString();0===t&&(a="00");const l=!e&&(0===t||t>12);a=i.formatNumber(a);const u=c(t);s.push((0,le.jsx)(RB,{id:u?o:void 0,index:t,inner:l,selected:u,disabled:r(t),label:a,"aria-label":n(a)},t))}return s},IB=({adapter:e,value:t,isDisabled:n,getClockNumberText:r,selectedId:o})=>{const i=e.formatNumber;return[[5,i("05")],[10,i("10")],[15,i("15")],[20,i("20")],[25,i("25")],[30,i("30")],[35,i("35")],[40,i("40")],[45,i("45")],[50,i("50")],[55,i("55")],[0,i("00")]].map(([e,i],a)=>{const s=e===t;return(0,le.jsx)(RB,{label:i,id:s?o:void 0,index:a+1,inner:!1,disabled:n(e),selected:s,"aria-label":r(i)},e)})},FB=({value:e,referenceDate:t,adapter:n,props:r,timezone:o})=>{const i=G.useMemo(()=>IR.getInitialReferenceValue({value:e,adapter:n,props:r,referenceDate:t,granularity:gR.day,timezone:o,getTodayDate:()=>nR(n,o,"date")}),[t,o]);return e??i},LB=["ampm","ampmInClock","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","showViewSwitcher","onChange","view","views","openTo","onViewChange","focusedView","onFocusedViewChange","className","classes","disabled","readOnly","timezone"],NB=Ka(cV,{name:"MuiTimeClock",slot:"Root"})({display:"flex",flexDirection:"column",position:"relative"}),zB=Ka(K$,{name:"MuiTimeClock",slot:"ArrowSwitcher"})({position:"absolute",right:12,top:15}),$B=["hours","minutes"],VB=G.forwardRef(function(e,t){const n=dA(),r=UE({props:e,name:"MuiTimeClock"}),{ampm:o=n.is12HourCycleInCurrentLocale(),ampmInClock:i=!1,autoFocus:a,slots:s,slotProps:l,value:c,defaultValue:u,referenceDate:d,disableIgnoringDatePartForTimeValidation:f=!1,maxTime:p,minTime:h,disableFuture:m,disablePast:g,minutesStep:b=1,shouldDisableTime:y,showViewSwitcher:v,onChange:x,view:w,views:S=$B,openTo:k,onViewChange:C,focusedView:M,onFocusedViewChange:P,className:T,classes:O,disabled:j,readOnly:_,timezone:D}=r,E=il(r,LB),{value:R,handleValueChange:A,timezone:I}=yF({name:"TimeClock",timezone:D,value:c,defaultValue:u,referenceDate:d,onChange:x,valueManager:IR}),F=FB({value:R,referenceDate:d,adapter:n,props:r,timezone:I}),L=fA(),N=xA(I),z=er(),{ownerState:$}=nA(),{view:V,setView:B,previousView:W,nextView:H,setValueAndGoToNextView:q}=gF({view:w,views:S,openTo:k,onViewChange:C,onChange:A,focusedView:M,onFocusedViewChange:P}),{meridiemMode:Y,handleMeridiemChange:U}=Z$(F,o,q),X=G.useCallback((e,t)=>{const r=hR(f,n),i="hours"===t||"minutes"===t&&S.includes("seconds"),a=({start:e,end:t})=>!(h&&r(h,t)||p&&r(e,p)||m&&r(e,N)||g&&r(N,i?t:e)),s=(e,r=1)=>{if(e%r!==0)return!1;if(y)switch(t){case"hours":return!y(n.setHours(F,e),"hours");case"minutes":return!y(n.setMinutes(F,e),"minutes");case"seconds":return!y(n.setSeconds(F,e),"seconds");default:return!1}return!0};switch(t){case"hours":{const t=fR(e,Y,o),r=n.setHours(F,t);return n.getHours(r)!==t||(!a({start:n.setSeconds(n.setMinutes(r,0),0),end:n.setSeconds(n.setMinutes(r,59),59)})||!s(t))}case"minutes":{const t=n.setMinutes(F,e);return!a({start:n.setSeconds(t,0),end:n.setSeconds(t,59)})||!s(e,b)}case"seconds":{const t=n.setSeconds(F,e);return!a({start:t,end:t})||!s(e)}default:throw new Error("not supported")}},[o,F,f,p,Y,h,b,y,n,m,g,N,S]),Q=G.useMemo(()=>{switch(V){case"hours":{const e=(e,t)=>{const r=fR(e,Y,o);q(n.setHours(F,r),t,"hours")},t=n.getHours(F);let r;return r=o?t>12?[12,23]:[0,11]:[0,23],{onChange:e,viewValue:t,children:AB({value:R,adapter:n,ampm:o,onChange:e,getClockNumberText:L.hoursClockNumberText,isDisabled:e=>j||X(e,"hours"),selectedId:z}),viewRange:r}}case"minutes":{const e=n.getMinutes(F),t=(e,t)=>{q(n.setMinutes(F,e),t,"minutes")};return{viewValue:e,onChange:t,children:IB({adapter:n,value:e,onChange:t,getClockNumberText:L.minutesClockNumberText,isDisabled:e=>j||X(e,"minutes"),selectedId:z}),viewRange:[0,59]}}case"seconds":{const e=n.getSeconds(F),t=(e,t)=>{q(n.setSeconds(F,e),t,"seconds")};return{viewValue:e,onChange:t,children:IB({adapter:n,value:e,onChange:t,getClockNumberText:L.secondsClockNumberText,isDisabled:e=>j||X(e,"seconds"),selectedId:z}),viewRange:[0,59]}}default:throw new Error("You must provide the type for ClockView")}},[V,n,R,o,L.hoursClockNumberText,L.minutesClockNumberText,L.secondsClockNumberText,Y,q,F,X,z,j]),K=(e=>Na({root:["root"],arrowSwitcher:["arrowSwitcher"]},sB,e))(O);return(0,le.jsxs)(NB,tr({ref:t,className:Un(K.root,T),ownerState:$},E,{children:[(0,le.jsx)(OB,tr({autoFocus:a??!!M,ampmInClock:i&&S.includes("hours"),value:R,type:V,ampm:o,minutesStep:b,isTimeDisabled:X,meridiemMode:Y,handleMeridiemChange:U,selectedId:z,disabled:j,readOnly:_},Q)),v&&(0,le.jsx)(zB,{className:K.arrowSwitcher,slots:s,slotProps:l,onGoToPrevious:()=>B(W),isPreviousDisabled:!W,previousLabel:L.openPreviousView,onGoToNext:()=>B(H),isNextDisabled:!H,nextLabel:L.openNextView,ownerState:$})]}))});function BB(e){return ss("MuiDigitalClock",e)}const WB=ls("MuiDigitalClock",["root","list","item"]),HB=["ampm","timeStep","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","onChange","view","openTo","onViewChange","focusedView","onFocusedViewChange","className","classes","disabled","readOnly","views","skipDisabled","timezone"],qB=Ka(cV,{name:"MuiDigitalClock",slot:"Root"})({overflowY:"auto",width:"100%",scrollbarWidth:"thin","@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"auto"},maxHeight:232,variants:[{props:{hasDigitalClockAlreadyBeenRendered:!0},style:{"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"smooth"}}}]}),YB=Ka(Ks,{name:"MuiDigitalClock",slot:"List"})({padding:0}),UB=Ka(ud,{name:"MuiDigitalClock",slot:"Item",shouldForwardProp:e=>"itemValue"!==e&&"formattedValue"!==e})(({theme:e})=>({padding:"8px 16px",margin:"2px 4px","&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:ti(e.palette.primary.main,e.palette.action.hoverOpacity)},"&.Mui-selected":{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:focus-visible, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}},"&.Mui-focusVisible":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:ti(e.palette.primary.main,e.palette.action.focusOpacity)}})),GB=G.forwardRef(function(e,t){const n=dA(),r=G.useRef(null),o=js(t,r),i=G.useRef(null),a=UE({props:e,name:"MuiDigitalClock"}),{ampm:s=n.is12HourCycleInCurrentLocale(),timeStep:l=30,autoFocus:c,slots:u,slotProps:d,value:f,defaultValue:p,referenceDate:h,disableIgnoringDatePartForTimeValidation:m=!1,maxTime:g,minTime:b,disableFuture:y,disablePast:v,minutesStep:x=1,shouldDisableTime:w,onChange:S,view:k,openTo:C,onViewChange:M,focusedView:P,onFocusedViewChange:T,className:O,classes:j,disabled:_,readOnly:D,views:E=["hours"],skipDisabled:R=!1,timezone:A}=a,I=il(a,HB),{value:F,handleValueChange:L,timezone:N}=yF({name:"DigitalClock",timezone:A,value:f,defaultValue:p,referenceDate:h,onChange:S,valueManager:IR}),z=fA(),$=xA(N),{ownerState:V}=nA(),B=tr({},V,{hasDigitalClockAlreadyBeenRendered:!!r.current}),W=(e=>Na({root:["root"],list:["list"],item:["item"]},BB,e))(j),H=u?.digitalClockItem??UB,q=Fs({elementType:H,externalSlotProps:d?.digitalClockItem,ownerState:B,className:W.item}),Y=FB({value:F,referenceDate:h,adapter:n,props:a,timezone:N}),U=zl(e=>L(e,"finish","hours")),{setValueAndGoToNextView:X}=gF({view:k,views:E,openTo:C,onViewChange:M,onChange:U,focusedView:P,onFocusedViewChange:T}),Q=zl(e=>{X(e,"finish")});Kn(()=>{if(null===r.current)return;const e=r.current.querySelector('[role="listbox"] [role="option"][tabindex="0"], [role="listbox"] [role="option"][aria-selected="true"]');if(!e)return;const t=e.offsetTop;(c||P)&&e.focus(),r.current.scrollTop=t-4});const K=G.useCallback(e=>{const t=hR(m,n);return!!(b&&t(b,e)||g&&t(e,g)||y&&t(e,$)||v&&t($,e))||!!(n.getMinutes(e)%x!==0||w&&w(e,"hours"))},[m,n,b,g,y,$,v,x,w]),Z=G.useMemo(()=>{const e=[];let t=n.startOfDay(Y);for(;n.isSameDay(Y,t);)e.push(t),t=n.addMinutes(t,l);return e},[Y,l,n]),J=Z.findIndex(e=>n.isEqual(e,Y));return(0,le.jsx)(qB,tr({ref:o,className:Un(W.root,O),ownerState:B},I,{children:(0,le.jsx)(YB,{ref:i,role:"listbox","aria-label":z.timePickerToolbarTitle,className:W.list,onKeyDown:e=>{switch(e.key){case"PageUp":{const t=nF(i.current)-5,n=i.current.children[Math.max(0,t)];n&&n.focus(),e.preventDefault();break}case"PageDown":{const t=nF(i.current)+5,n=i.current.children,r=n[Math.min(n.length-1,t)];r&&r.focus(),e.preventDefault();break}}},children:Z.map((e,t)=>{const r=K(e);if(R&&r)return null;const o=n.isEqual(e,F),i=n.format(e,s?"fullTime12h":"fullTime24h"),a=J===t||-1===J&&0===t?0:-1;return(0,le.jsx)(H,tr({onClick:()=>!D&&Q(e),selected:o,disabled:_||r,disableRipple:D,role:"option","aria-disabled":D,"aria-selected":o,tabIndex:a,itemValue:e,formattedValue:i},q,{children:i}),`${e.valueOf()}-${i}`)})})}))});function XB(e){return ss("MuiMultiSectionDigitalClock",e)}const QB=ls("MuiMultiSectionDigitalClock",["root"]);function KB(e){return ss("MuiMultiSectionDigitalClockSection",e)}const ZB=ls("MuiMultiSectionDigitalClockSection",["root","item"]),JB=["autoFocus","onChange","className","classes","disabled","readOnly","items","active","slots","slotProps","skipDisabled"],eW=Ka(Ks,{name:"MuiMultiSectionDigitalClockSection",slot:"Root"})(({theme:e})=>({maxHeight:232,width:56,padding:0,overflow:"hidden",scrollbarWidth:"thin","@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"auto"},"@media (pointer: fine)":{"&:hover":{overflowY:"auto"}},"@media (pointer: none), (pointer: coarse)":{overflowY:"auto"},"&:not(:first-of-type)":{borderLeft:`1px solid ${(e.vars||e).palette.divider}`},variants:[{props:{hasDigitalClockAlreadyBeenRendered:!0},style:{"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"smooth"}}}]})),tW=Ka(ud,{name:"MuiMultiSectionDigitalClockSection",slot:"Item"})(({theme:e})=>({padding:8,margin:"2px 4px",width:48,justifyContent:"center","&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:ti(e.palette.primary.main,e.palette.action.hoverOpacity)},"&.Mui-selected":{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:focus-visible, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}},"&.Mui-focusVisible":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:ti(e.palette.primary.main,e.palette.action.focusOpacity)}})),nW=G.forwardRef(function(e,t){const n=G.useRef(null),r=js(t,n),o=G.useRef(null),i=UE({props:e,name:"MuiMultiSectionDigitalClockSection"}),{autoFocus:a,onChange:s,className:l,classes:c,disabled:u,readOnly:d,items:f,active:p,slots:h,slotProps:m,skipDisabled:g}=i,b=il(i,JB),{ownerState:y}=nA(),v=tr({},y,{hasDigitalClockAlreadyBeenRendered:!!n.current}),x=(e=>Na({root:["root"],item:["item"]},KB,e))(c),w=h?.digitalClockSectionItem??tW;Kn(()=>{if(null===n.current)return;const e=n.current.querySelector('[role="option"][tabindex="0"], [role="option"][aria-selected="true"]');if(p&&a&&e&&e.focus(),!e||o.current===e)return;o.current=e;const t=e.offsetTop,r=e.offsetHeight,i=n.current.clientHeight,s=t-i/2+r/2,l=n.current.scrollHeight-i,c=Math.min(s,l);n.current.scrollTop=Math.max(0,c)});const S=f.findIndex(e=>e.isFocused(e.value));return(0,le.jsx)(eW,tr({ref:r,className:Un(x.root,l),ownerState:v,autoFocusItem:a&&p,role:"listbox",onKeyDown:e=>{switch(e.key){case"PageUp":{const t=nF(n.current)-5,r=n.current.children[Math.max(0,t)];r&&r.focus(),e.preventDefault();break}case"PageDown":{const t=nF(n.current)+5,r=n.current.children,o=r[Math.min(r.length-1,t)];o&&o.focus(),e.preventDefault();break}}}},b,{children:f.map((e,t)=>{const n=e.isDisabled?.(e.value),r=u||n;if(g&&r)return null;const o=e.isSelected(e.value),i=S===t||-1===S&&0===t?0:-1;return(0,le.jsx)(w,tr({onClick:()=>!d&&s(e.value),selected:o,disabled:r,disableRipple:d,role:"option","aria-disabled":d||r||void 0,"aria-label":e.ariaLabel,"aria-selected":o,tabIndex:i,className:x.item},m?.digitalClockSectionItem,{children:e.label}),e.label)})}))}),rW=({now:e,value:t,adapter:n,ampm:r,isDisabled:o,resolveAriaLabel:i,timeStep:a,valueOrReferenceDate:s})=>{const l=t?n.getHours(t):null,c=[],u=(e,t)=>{const n=t??l;return null!==n&&(r?12===e?12===n||0===n:n===e||n-12===e:n===e)},d=e=>u(e,n.getHours(s)),f=r?11:23;for(let t=0;t<=f;t+=a){let a=n.format(n.setHours(e,t),r?"hours12h":"hours24h");const s=i(parseInt(a,10).toString());a=n.formatNumber(a),c.push({value:t,label:a,isSelected:u,isDisabled:o,isFocused:d,ariaLabel:s})}return c},oW=({value:e,adapter:t,isDisabled:n,timeStep:r,resolveLabel:o,resolveAriaLabel:i,hasValue:a=!0})=>{const s=t=>null!==e&&a&&e===t,l=t=>e===t;return[...Array.from({length:Math.ceil(60/r)},(e,a)=>{const c=r*a;return{value:c,label:t.formatNumber(o(c)),isDisabled:n,isSelected:s,isFocused:l,ariaLabel:i(c.toString())}})]},iW=["ampm","timeSteps","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","onChange","view","views","openTo","onViewChange","focusedView","onFocusedViewChange","className","classes","disabled","readOnly","skipDisabled","timezone"],aW=Ka(cV,{name:"MuiMultiSectionDigitalClock",slot:"Root"})(({theme:e})=>({flexDirection:"row",width:"100%",borderBottom:`1px solid ${(e.vars||e).palette.divider}`})),sW=G.forwardRef(function(e,t){const n=dA(),r=Hn(),o=UE({props:e,name:"MuiMultiSectionDigitalClock"}),{ampm:i=n.is12HourCycleInCurrentLocale(),timeSteps:a,autoFocus:s,slots:l,slotProps:c,value:u,defaultValue:d,referenceDate:f,disableIgnoringDatePartForTimeValidation:p=!1,maxTime:h,minTime:m,disableFuture:g,disablePast:b,minutesStep:y=1,shouldDisableTime:v,onChange:x,view:w,views:S=["hours","minutes"],openTo:k,onViewChange:C,focusedView:M,onFocusedViewChange:P,className:T,classes:O,disabled:j,readOnly:_,skipDisabled:D=!1,timezone:E}=o,R=il(o,iW),{value:A,handleValueChange:I,timezone:F}=yF({name:"MultiSectionDigitalClock",timezone:E,value:u,defaultValue:d,referenceDate:f,onChange:x,valueManager:IR}),L=fA(),N=xA(F),z=G.useMemo(()=>tr({hours:1,minutes:5,seconds:5},a),[a]),$=FB({value:A,referenceDate:f,adapter:n,props:o,timezone:F}),V=zl((e,t,n)=>I(e,t,n)),B=G.useMemo(()=>i&&S.includes("hours")?S.includes("meridiem")?S:[...S,"meridiem"]:S,[i,S]),{view:W,setValueAndGoToNextView:H,focusedView:q}=gF({view:w,views:B,openTo:k,onViewChange:C,onChange:V,focusedView:M,onFocusedViewChange:P}),Y=zl(e=>{H(e,"finish","meridiem")}),{meridiemMode:U,handleMeridiemChange:X}=Z$($,i,Y,"finish"),Q=G.useCallback((e,t)=>{const r=hR(p,n),o="hours"===t||"minutes"===t&&B.includes("seconds"),a=({start:e,end:t})=>!(m&&r(m,t)||h&&r(e,h)||g&&r(e,N)||b&&r(N,o?t:e)),s=(e,r=1)=>{if(e%r!==0)return!1;if(v)switch(t){case"hours":return!v(n.setHours($,e),"hours");case"minutes":return!v(n.setMinutes($,e),"minutes");case"seconds":return!v(n.setSeconds($,e),"seconds");default:return!1}return!0};switch(t){case"hours":{const t=fR(e,U,i),r=n.setHours($,t);return n.getHours(r)!==t||(!a({start:n.setSeconds(n.setMinutes(r,0),0),end:n.setSeconds(n.setMinutes(r,59),59)})||!s(t))}case"minutes":{const t=n.setMinutes($,e);return!a({start:n.setSeconds(t,0),end:n.setSeconds(t,59)})||!s(e,y)}case"seconds":{const t=n.setSeconds($,e);return!a({start:t,end:t})||!s(e)}default:throw new Error("not supported")}},[i,$,p,h,U,m,y,v,n,g,b,N,B]),K=G.useCallback(e=>{switch(e){case"hours":return{onChange:e=>{const t=fR(e,U,i);H(n.setHours($,t),"finish","hours")},items:rW({now:N,value:A,ampm:i,adapter:n,isDisabled:e=>Q(e,"hours"),timeStep:z.hours,resolveAriaLabel:L.hoursClockNumberText,valueOrReferenceDate:$})};case"minutes":return{onChange:e=>{H(n.setMinutes($,e),"finish","minutes")},items:oW({value:n.getMinutes($),adapter:n,isDisabled:e=>Q(e,"minutes"),resolveLabel:e=>n.format(n.setMinutes(N,e),"minutes"),timeStep:z.minutes,hasValue:!!A,resolveAriaLabel:L.minutesClockNumberText})};case"seconds":return{onChange:e=>{H(n.setSeconds($,e),"finish","seconds")},items:oW({value:n.getSeconds($),adapter:n,isDisabled:e=>Q(e,"seconds"),resolveLabel:e=>n.format(n.setSeconds(N,e),"seconds"),timeStep:z.seconds,hasValue:!!A,resolveAriaLabel:L.secondsClockNumberText})};case"meridiem":{const e=rR(n,"am"),t=rR(n,"pm");return{onChange:X,items:[{value:"am",label:e,isSelected:()=>!!A&&"am"===U,isFocused:()=>!!$&&"am"===U,ariaLabel:e},{value:"pm",label:t,isSelected:()=>!!A&&"pm"===U,isFocused:()=>!!$&&"pm"===U,ariaLabel:t}]}}default:throw new Error(`Unknown view: ${e} found.`)}},[N,A,i,n,z.hours,z.minutes,z.seconds,L.hoursClockNumberText,L.minutesClockNumberText,L.secondsClockNumberText,U,H,$,Q,X]),Z=G.useMemo(()=>{if(!r)return B;const e=B.filter(e=>"meridiem"!==e);return e.reverse(),B.includes("meridiem")&&e.push("meridiem"),e},[r,B]),J=G.useMemo(()=>B.reduce((e,t)=>tr({},e,{[t]:K(t)}),{}),[B,K]),{ownerState:ee}=nA(),te=(e=>Na({root:["root"]},XB,e))(O);return(0,le.jsx)(aW,tr({ref:t,className:Un(te.root,T),ownerState:ee,role:"group"},R,{children:Z.map(e=>(0,le.jsx)(nW,{items:J[e].items,onChange:J[e].onChange,active:W===e,autoFocus:s||q===e,disabled:j,readOnly:_,slots:l,slotProps:c,skipDisabled:D,"aria-label":L.selectViewText(e)},e))}))}),lW=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:h,shouldDisableTime:m,minutesStep:g,ampm:b,ampmInClock:y,slots:v,slotProps:x,readOnly:w,disabled:S,sx:k,autoFocus:C,showViewSwitcher:M,disableIgnoringDatePartForTimeValidation:P,timezone:T})=>(0,le.jsx)(VB,{view:e,onViewChange:t,focusedView:n&&uR(n)?n:null,onFocusedViewChange:r,views:o.filter(uR),value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:h,shouldDisableTime:m,minutesStep:g,ampm:b,ampmInClock:y,slots:v,slotProps:x,readOnly:w,disabled:S,sx:k,autoFocus:C,showViewSwitcher:M,disableIgnoringDatePartForTimeValidation:P,timezone:T}),cW=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:h,shouldDisableTime:m,minutesStep:g,ampm:b,slots:y,slotProps:v,readOnly:x,disabled:w,sx:S,autoFocus:k,disableIgnoringDatePartForTimeValidation:C,timeSteps:M,skipDisabled:P,timezone:T})=>(0,le.jsx)(GB,{view:e,onViewChange:t,focusedView:n&&uR(n)?n:null,onFocusedViewChange:r,views:o.filter(uR),value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:h,shouldDisableTime:m,minutesStep:g,ampm:b,slots:y,slotProps:v,readOnly:x,disabled:w,sx:S,autoFocus:k,disableIgnoringDatePartForTimeValidation:C,timeStep:M?.minutes,skipDisabled:P,timezone:T}),uW=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:h,shouldDisableTime:m,minutesStep:g,ampm:b,slots:y,slotProps:v,readOnly:x,disabled:w,sx:S,autoFocus:k,disableIgnoringDatePartForTimeValidation:C,timeSteps:M,skipDisabled:P,timezone:T})=>(0,le.jsx)(sW,{view:e,onViewChange:t,focusedView:n&&dR(n)?n:null,onFocusedViewChange:r,views:o.filter(uR),value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:h,shouldDisableTime:m,minutesStep:g,ampm:b,slots:y,slotProps:v,readOnly:x,disabled:w,sx:S,autoFocus:k,disableIgnoringDatePartForTimeValidation:C,timeSteps:M,skipDisabled:P,timezone:T}),dW=["views","format"],fW=(e,t,n)=>{let{views:r,format:o}=t,i=il(t,dW);if(o)return o;const a=[],s=[];if(r.forEach(e=>{uR(e)?s.push(e):iR(e)&&a.push(e)}),0===s.length)return aR(e,tr({views:a},i),!1);if(0===a.length)return mR(e,tr({views:s},i));const l=mR(e,tr({views:s},i));return`${n?e.formats.keyboardDate:aR(e,tr({views:a},i),!1)} ${l}`},pW=(e,t,n)=>n?t.filter(e=>!dR(e)||"hours"===e):e?[...t,"meridiem"]:t;function hW({thresholdToRenderTimeInASingleColumn:e,ampm:t,timeSteps:n,views:r}){const o=e??24,i=tr({hours:1,minutes:5,seconds:5},n),a=((e,t)=>1440/((e.hours??1)*(e.minutes??5))<=t)(i,o);return{thresholdToRenderTimeInASingleColumn:o,timeSteps:i,shouldRenderTimeInASingleColumn:a,views:pW(t,r,a)}}const mW=G.forwardRef(function(e,t){const n=dA(),r=aB(e,"MuiDesktopTimePicker"),{shouldRenderTimeInASingleColumn:o,views:i,timeSteps:a}=hW(r),s=o?cW:uW,l=tr({hours:s,minutes:s,seconds:s,meridiem:s},r.viewRenderers),c=r.ampmInClock??!0,u=l.hours?.name===uW.name?i:i.filter(e=>"meridiem"!==e),d=tr({},r,{ampmInClock:c,timeSteps:a,viewRenderers:l,format:mR(n,r),views:o?["hours"]:u,slots:tr({field:WV},r.slots),slotProps:tr({},r.slotProps,{field:e=>tr({},Is(r.slotProps?.field,e),jA(r)),toolbar:tr({hidden:!0,ampmInClock:c},r.slotProps?.toolbar)})}),{renderPicker:f}=_L({ref:t,props:d,valueManager:IR,valueType:"time",validator:NV,steps:null});return f()});mW.propTypes={ampm:GE.bool,ampmInClock:GE.bool,autoFocus:GE.bool,className:GE.string,closeOnSelect:GE.bool,defaultValue:GE.object,disabled:GE.bool,disableFuture:GE.bool,disableIgnoringDatePartForTimeValidation:GE.bool,disableOpenPicker:GE.bool,disablePast:GE.bool,enableAccessibleFieldDOMStructure:GE.any,format:GE.string,formatDensity:GE.oneOf(["dense","spacious"]),inputRef:XE,label:GE.node,localeText:GE.object,maxTime:GE.object,minTime:GE.object,minutesStep:GE.number,name:GE.string,onAccept:GE.func,onChange:GE.func,onClose:GE.func,onError:GE.func,onOpen:GE.func,onSelectedSectionsChange:GE.func,onViewChange:GE.func,open:GE.bool,openTo:GE.oneOf(["hours","meridiem","minutes","seconds"]),orientation:GE.oneOf(["landscape","portrait"]),readOnly:GE.bool,reduceAnimations:GE.bool,referenceDate:GE.object,selectedSections:GE.oneOfType([GE.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),GE.number]),shouldDisableTime:GE.func,skipDisabled:GE.bool,slotProps:GE.object,slots:GE.object,sx:GE.oneOfType([GE.arrayOf(GE.oneOfType([GE.func,GE.object,GE.bool])),GE.func,GE.object]),thresholdToRenderTimeInASingleColumn:GE.number,timeSteps:GE.shape({hours:GE.number,minutes:GE.number,seconds:GE.number}),timezone:GE.string,value:GE.object,view:GE.oneOf(["hours","meridiem","minutes","seconds"]),viewRenderers:GE.shape({hours:GE.func,meridiem:GE.func,minutes:GE.func,seconds:GE.func}),views:GE.arrayOf(GE.oneOf(["hours","minutes","seconds"]).isRequired)};const gW=G.forwardRef(function(e,t){const n=dA(),r=aB(e,"MuiMobileTimePicker"),o=tr({hours:lW,minutes:lW,seconds:lW},r.viewRenderers),i=r.ampmInClock??!1,a=tr({},r,{ampmInClock:i,viewRenderers:o,format:mR(n,r),slots:tr({field:WV},r.slots),slotProps:tr({},r.slotProps,{field:e=>tr({},Is(r.slotProps?.field,e),jA(r)),toolbar:tr({hidden:!1,ampmInClock:i},r.slotProps?.toolbar)})}),{renderPicker:s}=AV({ref:t,props:a,valueManager:IR,valueType:"time",validator:NV,steps:null});return s()});gW.propTypes={ampm:GE.bool,ampmInClock:GE.bool,autoFocus:GE.bool,className:GE.string,closeOnSelect:GE.bool,defaultValue:GE.object,disabled:GE.bool,disableFuture:GE.bool,disableIgnoringDatePartForTimeValidation:GE.bool,disableOpenPicker:GE.bool,disablePast:GE.bool,enableAccessibleFieldDOMStructure:GE.any,format:GE.string,formatDensity:GE.oneOf(["dense","spacious"]),inputRef:XE,label:GE.node,localeText:GE.object,maxTime:GE.object,minTime:GE.object,minutesStep:GE.number,name:GE.string,onAccept:GE.func,onChange:GE.func,onClose:GE.func,onError:GE.func,onOpen:GE.func,onSelectedSectionsChange:GE.func,onViewChange:GE.func,open:GE.bool,openTo:GE.oneOf(["hours","minutes","seconds"]),orientation:GE.oneOf(["landscape","portrait"]),readOnly:GE.bool,reduceAnimations:GE.bool,referenceDate:GE.object,selectedSections:GE.oneOfType([GE.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),GE.number]),shouldDisableTime:GE.func,slotProps:GE.object,slots:GE.object,sx:GE.oneOfType([GE.arrayOf(GE.oneOfType([GE.func,GE.object,GE.bool])),GE.func,GE.object]),timezone:GE.string,value:GE.object,view:GE.oneOf(["hours","minutes","seconds"]),viewRenderers:GE.shape({hours:GE.func,minutes:GE.func,seconds:GE.func}),views:GE.arrayOf(GE.oneOf(["hours","minutes","seconds"]).isRequired)};const bW=["desktopModeMediaQuery"],yW=G.forwardRef(function(e,t){const n=UE({props:e,name:"MuiTimePicker"}),{desktopModeMediaQuery:r=rF}=n,o=il(n,bW);return YE(r,{defaultMatches:!0})?(0,le.jsx)(mW,tr({ref:t},o)):(0,le.jsx)(gW,tr({ref:t},o))}),vW=Ka("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,"vertical"===n.orientation&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&"vertical"===n.orientation&&t.withChildrenVertical,"right"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignRight,"left"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignLeft]}})(gs(({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:e.alpha((e.vars||e).palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:e})=>!!e.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:e})=>e.children&&"vertical"!==e.orientation,style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:e})=>"vertical"===e.orientation&&e.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:e})=>"right"===e.textAlign&&"vertical"!==e.orientation,style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:e})=>"left"===e.textAlign&&"vertical"!==e.orientation,style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]}))),xW=Ka("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})(gs(({theme:e})=>({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}}]}))),wW=G.forwardRef(function(e,t){const n=Za({props:e,name:"MuiDivider"}),{absolute:r=!1,children:o,className:i,orientation:a="horizontal",component:s=(o||"vertical"===a?"div":"hr"),flexItem:l=!1,light:c=!1,role:u=("hr"!==s?"separator":void 0),textAlign:d="center",variant:f="fullWidth",...p}=n,h={...n,absolute:r,component:s,flexItem:l,light:c,orientation:a,role:u,textAlign:d,variant:f},m=(e=>{const{absolute:t,children:n,classes:r,flexItem:o,light:i,orientation:a,textAlign:s,variant:l}=e;return Na({root:["root",t&&"absolute",l,i&&"light","vertical"===a&&"vertical",o&&"flexItem",n&&"withChildren",n&&"vertical"===a&&"withChildrenVertical","right"===s&&"vertical"!==a&&"textAlignRight","left"===s&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]},rd,r)})(h);return(0,le.jsx)(vW,{as:s,className:Un(m.root,i),role:u,ref:t,ownerState:h,"aria-orientation":"separator"!==u||"hr"===s&&"vertical"!==a?void 0:a,...p,children:o?(0,le.jsx)(xW,{className:m.wrapper,ownerState:h,children:o}):null})});wW&&(wW.muiSkipListHighlight=!0);const SW=wW,kW=({adapter:e,value:t,timezone:n,props:r})=>{const o=yA({adapter:e,value:t,timezone:n,props:r});return null!==o?o:NV({adapter:e,value:t,timezone:n,props:r})};function CW(e){const t=dA(),n=fA();return G.useMemo(()=>{const r=t.isValid(e)?t.format(e,"fullDate"):null;return n.openDatePickerDialogue(r)},[e,n,t])}function MW(e){const t=dA(),n=PW(e),r=G.useMemo(()=>e.ampm??t.is12HourCycleInCurrentLocale(),[e.ampm,t]);return G.useMemo(()=>tr({},e,n,{format:e.format??(r?t.formats.keyboardDateTime12h:t.formats.keyboardDateTime24h)}),[e,n,r,t])}function PW(e){const t=dA(),n=vA();return G.useMemo(()=>({disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,disableIgnoringDatePartForTimeValidation:!!(e.minDateTime||e.maxDateTime||e.disableFuture||e.disablePast),minDate:eR(t,e.minDateTime??e.minDate,n.minDate),maxDate:eR(t,e.maxDateTime??e.maxDate,n.maxDate),minTime:e.minDateTime??e.minTime,maxTime:e.maxDateTime??e.maxTime}),[e.minDateTime,e.maxDateTime,e.minTime,e.maxTime,e.minDate,e.maxDate,e.disableFuture,e.disablePast,t,n])}kW.valueManager=IR;const TW=["slots","slotProps"],OW=G.forwardRef(function(e,t){const n=UE({props:e,name:"MuiDateTimeField"}),{slots:r,slotProps:o}=n,i=il(n,TW),a=(e=>{const t=function(e={}){const{enableAccessibleFieldDOMStructure:t=!0}=e;return G.useMemo(()=>({valueType:"date-time",validator:kW,internal_valueManager:IR,internal_fieldValueManager:FR,internal_enableAccessibleFieldDOMStructure:t,internal_useApplyDefaultValuesToFieldInternalProps:MW,internal_useOpenPickerButtonAriaLabel:CW}),[t])}(e);return KL({manager:t,props:e})})(Nz({slotProps:o,ref:t,externalForwardedProps:i}));return(0,le.jsx)(zz,{slots:r,slotProps:o,inputRef:i.inputRef,children:(0,le.jsx)(Fz,{fieldResponse:a,defaultOpenPickerIcon:CN})})});function jW(e){return ss("MuiTab",e)}const _W=ls("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper","icon"]),DW=Ka(nd,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${ts(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${_W.iconWrapper}`]:t.iconWrapper},{[`& .${_W.icon}`]:t.icon}]}})(gs(({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center",lineHeight:1.25,variants:[{props:({ownerState:e})=>e.label&&("top"===e.iconPosition||"bottom"===e.iconPosition),style:{flexDirection:"column"}},{props:({ownerState:e})=>e.label&&"top"!==e.iconPosition&&"bottom"!==e.iconPosition,style:{flexDirection:"row"}},{props:({ownerState:e})=>e.icon&&e.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"top"===t,style:{[`& > .${_W.icon}`]:{marginBottom:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"bottom"===t,style:{[`& > .${_W.icon}`]:{marginTop:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"start"===t,style:{[`& > .${_W.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"end"===t,style:{[`& > .${_W.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${_W.selected}`]:{opacity:1},[`&.${_W.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${_W.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${_W.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${_W.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${_W.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:e})=>e.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"}},{props:({ownerState:e})=>e.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]}))),EW=G.forwardRef(function(e,t){const n=Za({props:e,name:"MuiTab"}),{className:r,disabled:o=!1,disableFocusRipple:i=!1,fullWidth:a,icon:s,iconPosition:l="top",indicator:c,label:u,onChange:d,onClick:f,onFocus:p,selected:h,selectionFollowsFocus:m,textColor:g="inherit",value:b,wrapped:y=!1,...v}=n,x={...n,disabled:o,disableFocusRipple:i,selected:h,icon:!!s,iconPosition:l,label:!!u,fullWidth:a,textColor:g,wrapped:y},w=(e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:o,icon:i,label:a,selected:s,disabled:l}=e;return Na({root:["root",i&&a&&"labelIcon",`textColor${ts(n)}`,r&&"fullWidth",o&&"wrapped",s&&"selected",l&&"disabled"],icon:["iconWrapper","icon"]},jW,t)})(x),S=s&&u&&G.isValidElement(s)?G.cloneElement(s,{className:Un(w.icon,s.props.className)}):s;return(0,le.jsxs)(DW,{focusRipple:!i,className:Un(w.root,r),ref:t,role:"tab","aria-selected":h,disabled:o,onClick:e=>{!h&&d&&d(e,b),f&&f(e)},onFocus:e=>{m&&!h&&d&&d(e,b),p&&p(e)},ownerState:x,tabIndex:h?0:-1,...v,children:["top"===l||"start"===l?(0,le.jsxs)(G.Fragment,{children:[S,u]}):(0,le.jsxs)(G.Fragment,{children:[u,S]}),c]})}),RW=EW;function AW(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}const IW={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"},FW=Bc((0,le.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"})),LW=Bc((0,le.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}));function NW(e){return ss("MuiTabScrollButton",e)}const zW=ls("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),$W=Ka(nd,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${zW.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),VW=G.forwardRef(function(e,t){const n=Za({props:e,name:"MuiTabScrollButton"}),{className:r,slots:o={},slotProps:i={},direction:a,orientation:s,disabled:l,...c}=n,u=Hn(),d={isRtl:u,...n},f=(e=>{const{classes:t,orientation:n,disabled:r}=e;return Na({root:["root",n,r&&"disabled"]},NW,t)})(d),p=o.StartScrollButtonIcon??FW,h=o.EndScrollButtonIcon??LW,m=Fs({elementType:p,externalSlotProps:i.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:d}),g=Fs({elementType:h,externalSlotProps:i.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:d});return(0,le.jsx)($W,{component:"div",className:Un(f.root,r),ref:t,role:null,ownerState:d,tabIndex:null,...c,style:{...c.style,..."vertical"===s&&{"--TabScrollButton-svgRotate":`rotate(${u?-90:90}deg)`}},children:"left"===a?(0,le.jsx)(p,{...m}):(0,le.jsx)(h,{...g})})});function BW(e){return ss("MuiTabs",e)}const WW=ls("MuiTabs",["root","vertical","list","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),HW=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,qW=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,YW=(e,t,n)=>{let r=!1,o=n(e,t);for(;o;){if(o===e.firstChild){if(r)return;r=!0}const t=o.disabled||"true"===o.getAttribute("aria-disabled");if(o.hasAttribute("tabindex")&&!t)return void o.focus();o=n(e,o)}},UW=Ka("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${WW.scrollButtons}`]:t.scrollButtons},{[`& .${WW.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(gs(({theme:e})=>({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.scrollButtonsHideMobile,style:{[`& .${WW.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}}}]}))),GW=Ka("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap",variants:[{props:({ownerState:e})=>e.fixed,style:{overflowX:"hidden",width:"100%"}},{props:({ownerState:e})=>e.hideScrollbar,style:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},{props:({ownerState:e})=>e.scrollableX,style:{overflowX:"auto",overflowY:"hidden"}},{props:({ownerState:e})=>e.scrollableY,style:{overflowY:"auto",overflowX:"hidden"}}]}),XW=Ka("div",{name:"MuiTabs",slot:"List",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.list,t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})({display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.centered,style:{justifyContent:"center"}}]}),QW=Ka("span",{name:"MuiTabs",slot:"Indicator"})(gs(({theme:e})=>({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create(),variants:[{props:{indicatorColor:"primary"},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:"secondary"},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:e})=>e.vertical,style:{height:"100%",width:2,right:0}}]}))),KW=Ka(function(e){const{onChange:t,...n}=e,r=G.useRef(),o=G.useRef(null),i=()=>{r.current=o.current.offsetHeight-o.current.clientHeight};return Hs(()=>{const e=Js(()=>{const e=r.current;i(),e!==r.current&&t(r.current)}),n=Ys(o.current);return n.addEventListener("resize",e),()=>{e.clear(),n.removeEventListener("resize",e)}},[t]),G.useEffect(()=>{i(),t(r.current)},[t]),(0,le.jsx)("div",{style:IW,...n,ref:o})})({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),ZW={},JW=G.forwardRef(function(e,t){const n=Za({props:e,name:"MuiTabs"}),r=yl(),o=Hn(),{"aria-label":i,"aria-labelledby":a,action:s,centered:l=!1,children:c,className:u,component:d="div",allowScrollButtonsMobile:f=!1,indicatorColor:p="primary",onChange:h,orientation:m="horizontal",ScrollButtonComponent:g,scrollButtons:b="auto",selectionFollowsFocus:y,slots:v={},slotProps:x={},TabIndicatorProps:w={},TabScrollButtonProps:S={},textColor:k="primary",value:C,variant:M="standard",visibleScrollbar:P=!1,...T}=n,O="scrollable"===M,j="vertical"===m,_=j?"scrollTop":"scrollLeft",D=j?"top":"left",E=j?"bottom":"right",R=j?"clientHeight":"clientWidth",A=j?"height":"width",I={...n,component:d,allowScrollButtonsMobile:f,indicatorColor:p,orientation:m,vertical:j,scrollButtons:b,textColor:k,variant:M,visibleScrollbar:P,fixed:!O,hideScrollbar:O&&!P,scrollableX:O&&!j,scrollableY:O&&j,centered:l&&!O,scrollButtonsHideMobile:!f},F=(e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:o,scrollableY:i,centered:a,scrollButtonsHideMobile:s,classes:l}=e;return Na({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",o&&"scrollableX",i&&"scrollableY"],list:["list","flexContainer",t&&"flexContainerVertical",t&&"vertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",s&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},BW,l)})(I),L=Fs({elementType:v.StartScrollButtonIcon,externalSlotProps:x.startScrollButtonIcon,ownerState:I}),N=Fs({elementType:v.EndScrollButtonIcon,externalSlotProps:x.endScrollButtonIcon,ownerState:I}),[z,$]=G.useState(!1),[V,B]=G.useState(ZW),[W,H]=G.useState(!1),[q,Y]=G.useState(!1),[U,X]=G.useState(!1),[Q,K]=G.useState({overflow:"hidden",scrollbarWidth:0}),Z=new Map,J=G.useRef(null),ee=G.useRef(null),te={slots:v,slotProps:{indicator:w,scrollButton:S,...x}},ne=()=>{const e=J.current;let t,n;if(e){const n=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollWidth:e.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}if(e&&!1!==C){const e=ee.current.children;if(e.length>0){const t=e[Z.get(C)];n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},re=Fu(()=>{const{tabsMeta:e,tabMeta:t}=ne();let n,r=0;j?(n="top",t&&e&&(r=t.top-e.top+e.scrollTop)):(n=o?"right":"left",t&&e&&(r=(o?-1:1)*(t[n]-e[n]+e.scrollLeft)));const i={[n]:r,[A]:t?t[A]:0};if("number"!=typeof V[n]||"number"!=typeof V[A])B(i);else{const e=Math.abs(V[n]-i[n]),t=Math.abs(V[A]-i[A]);(e>=1||t>=1)&&B(i)}}),oe=(e,{animation:t=!0}={})=>{t?function(e,t,n,r={},o=()=>{}){const{ease:i=AW,duration:a=300}=r;let s=null;const l=t[e];let c=!1;const u=r=>{if(c)return void o(new Error("Animation cancelled"));null===s&&(s=r);const d=Math.min(1,(r-s)/a);t[e]=i(d)*(n-l)+l,d>=1?requestAnimationFrame(()=>{o(null)}):requestAnimationFrame(u)};l===n?o(new Error("Element already at target position")):requestAnimationFrame(u)}(_,J.current,e,{duration:r.transitions.duration.standard}):J.current[_]=e},ie=e=>{let t=J.current[_];t+=j?e:e*(o?-1:1),oe(t)},ae=()=>{const e=J.current[R];let t=0;const n=Array.from(ee.current.children);for(let r=0;r<n.length;r+=1){const o=n[r];if(t+o[R]>e){0===r&&(t=e);break}t+=o[R]}return t},se=()=>{ie(-1*ae())},ce=()=>{ie(ae())},[ue,{onChange:de,...fe}]=El("scrollbar",{className:Un(F.scrollableX,F.hideScrollbar),elementType:KW,shouldForwardComponentProp:!0,externalForwardedProps:te,ownerState:I}),pe=G.useCallback(e=>{de?.(e),K({overflow:null,scrollbarWidth:e})},[de]),[he,me]=El("scrollButtons",{className:Un(F.scrollButtons,S.className),elementType:VW,externalForwardedProps:te,ownerState:I,additionalProps:{orientation:m,slots:{StartScrollButtonIcon:v.startScrollButtonIcon||v.StartScrollButtonIcon,EndScrollButtonIcon:v.endScrollButtonIcon||v.EndScrollButtonIcon},slotProps:{startScrollButtonIcon:L,endScrollButtonIcon:N}}}),ge=Fu(e=>{const{tabsMeta:t,tabMeta:n}=ne();if(n&&t)if(n[D]<t[D]){const r=t[_]+(n[D]-t[D]);oe(r,{animation:e})}else if(n[E]>t[E]){const r=t[_]+(n[E]-t[E]);oe(r,{animation:e})}}),be=Fu(()=>{O&&!1!==b&&X(!U)});G.useEffect(()=>{const e=Js(()=>{J.current&&re()});let t;const n=Ys(J.current);let r;return n.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(t=new ResizeObserver(e),Array.from(ee.current.children).forEach(e=>{t.observe(e)})),"undefined"!=typeof MutationObserver&&(r=new MutationObserver(n=>{n.forEach(e=>{e.removedNodes.forEach(e=>{t?.unobserve(e)}),e.addedNodes.forEach(e=>{t?.observe(e)})}),e(),be()}),r.observe(ee.current,{childList:!0})),()=>{e.clear(),n.removeEventListener("resize",e),r?.disconnect(),t?.disconnect()}},[re,be]),G.useEffect(()=>{const e=Array.from(ee.current.children),t=e.length;if("undefined"!=typeof IntersectionObserver&&t>0&&O&&!1!==b){const n=e[0],r=e[t-1],o={root:J.current,threshold:.99},i=new IntersectionObserver(e=>{H(!e[0].isIntersecting)},o);i.observe(n);const a=new IntersectionObserver(e=>{Y(!e[0].isIntersecting)},o);return a.observe(r),()=>{i.disconnect(),a.disconnect()}}},[O,b,U,c?.length]),G.useEffect(()=>{$(!0)},[]),G.useEffect(()=>{re()}),G.useEffect(()=>{ge(ZW!==V)},[ge,V]),G.useImperativeHandle(s,()=>({updateIndicator:re,updateScrollButtons:be}),[re,be]);const[ye,ve]=El("indicator",{className:Un(F.indicator,w.className),elementType:QW,externalForwardedProps:te,ownerState:I,additionalProps:{style:V}}),xe=(0,le.jsx)(ye,{...ve});let we=0;const Se=G.Children.map(c,e=>{if(!G.isValidElement(e))return null;const t=void 0===e.props.value?we:e.props.value;Z.set(t,we);const n=t===C;return we+=1,G.cloneElement(e,{fullWidth:"fullWidth"===M,indicator:n&&!z&&xe,selected:n,selectionFollowsFocus:y,onChange:h,textColor:k,value:t,...1!==we||!1!==C||e.props.tabIndex?{}:{tabIndex:0}})}),ke=(()=>{const e={};e.scrollbarSizeListener=O?(0,le.jsx)(ue,{...fe,onChange:pe}):null;const t=O&&("auto"===b&&(W||q)||!0===b);return e.scrollButtonStart=t?(0,le.jsx)(he,{direction:o?"right":"left",onClick:se,disabled:!W,...me}):null,e.scrollButtonEnd=t?(0,le.jsx)(he,{direction:o?"left":"right",onClick:ce,disabled:!q,...me}):null,e})(),[Ce,Me]=El("root",{ref:t,className:Un(F.root,u),elementType:UW,externalForwardedProps:{...te,...T,component:d},ownerState:I}),[Pe,Te]=El("scroller",{ref:J,className:F.scroller,elementType:GW,externalForwardedProps:te,ownerState:I,additionalProps:{style:{overflow:Q.overflow,[j?"margin"+(o?"Left":"Right"):"marginBottom"]:P?void 0:-Q.scrollbarWidth}}}),[Oe,je]=El("list",{ref:ee,className:Un(F.list,F.flexContainer),elementType:XW,externalForwardedProps:te,ownerState:I,getSlotProps:e=>({...e,onKeyDown:t=>{(e=>{if(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey)return;const t=ee.current,n=Os(t).activeElement;if("tab"!==n.getAttribute("role"))return;let r="horizontal"===m?"ArrowLeft":"ArrowUp",i="horizontal"===m?"ArrowRight":"ArrowDown";switch("horizontal"===m&&o&&(r="ArrowRight",i="ArrowLeft"),e.key){case r:e.preventDefault(),YW(t,n,qW);break;case i:e.preventDefault(),YW(t,n,HW);break;case"Home":e.preventDefault(),YW(t,null,HW);break;case"End":e.preventDefault(),YW(t,null,qW)}})(t),e.onKeyDown?.(t)}})});return(0,le.jsxs)(Ce,{...Me,children:[ke.scrollButtonStart,ke.scrollbarSizeListener,(0,le.jsxs)(Pe,{...Te,children:[(0,le.jsx)(Oe,{"aria-label":i,"aria-labelledby":a,"aria-orientation":"vertical"===m?"vertical":null,role:"tablist",...je,children:Se}),z&&xe]}),ke.scrollButtonEnd]})}),eH=JW;function tH(e){return ss("MuiDateTimePickerTabs",e)}ls("MuiDateTimePickerTabs",["root"]);const nH=e=>iR(e)?"date":"time",rH=Ka(eH,{name:"MuiDateTimePickerTabs",slot:"Root"})(({theme:e})=>({boxShadow:`0 -1px 0 0 inset ${(e.vars||e).palette.divider}`,"&:last-child":{boxShadow:`0 1px 0 0 inset ${(e.vars||e).palette.divider}`,[`& .${WW.indicator}`]:{bottom:"auto",top:0}}})),oH=function(e){const t=UE({props:e,name:"MuiDateTimePickerTabs"}),{dateIcon:n=(0,le.jsx)(PN,{}),timeIcon:r=(0,le.jsx)(TN,{}),hidden:o="undefined"==typeof window||window.innerHeight<667,className:i,classes:a,sx:s}=t,l=fA(),{ownerState:c}=nA(),{view:u,setView:d}=ZR(),f=(e=>Na({root:["root"]},tH,e))(a);return o?null:(0,le.jsxs)(rH,{ownerState:c,variant:"fullWidth",value:nH(u),onChange:(e,t)=>{d("date"===t?"day":"hours")},className:Un(i,f.root),sx:s,children:[(0,le.jsx)(RW,{value:"date","aria-label":l.dateTableLabel,icon:(0,le.jsx)(G.Fragment,{children:n})}),(0,le.jsx)(RW,{value:"time","aria-label":l.timeTableLabel,icon:(0,le.jsx)(G.Fragment,{children:r})})]})};function iH(e){return ss("MuiDateTimePickerToolbar",e)}const aH=ls("MuiDateTimePickerToolbar",["root","dateContainer","timeContainer","timeDigitsContainer","separator","timeLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),sH=["ampm","ampmInClock","toolbarFormat","toolbarPlaceholder","toolbarTitle","className","classes"],lH=Ka(sA,{name:"MuiDateTimePickerToolbar",slot:"Root",shouldForwardProp:e=>Va(e)&&"toolbarVariant"!==e})(({theme:e})=>({paddingLeft:16,paddingRight:16,justifyContent:"space-around",position:"relative",variants:[{props:{toolbarVariant:"desktop"},style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,[`& .${HR.content} .${qV.root}[data-selected]`]:{color:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightBold}}},{props:{toolbarVariant:"desktop",pickerOrientation:"landscape"},style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:{toolbarVariant:"desktop",pickerOrientation:"portrait"},style:{paddingLeft:24,paddingRight:0}}]})),cH=Ka("div",{name:"MuiDateTimePickerToolbar",slot:"DateContainer"})({display:"flex",flexDirection:"column",alignItems:"flex-start"}),uH=Ka("div",{name:"MuiDateTimePickerToolbar",slot:"TimeContainer",shouldForwardProp:e=>Va(e)&&"toolbarVariant"!==e})({display:"flex",flexDirection:"row",variants:[{props:{toolbarDirection:"rtl"},style:{flexDirection:"row-reverse"}},{props:{toolbarVariant:"desktop",pickerOrientation:"portrait"},style:{gap:9,marginRight:4,alignSelf:"flex-end"}},{props:({pickerOrientation:e,toolbarVariant:t})=>"landscape"===e&&"desktop"!==t,style:{flexDirection:"column"}},{props:({pickerOrientation:e,toolbarVariant:t,toolbarDirection:n})=>"landscape"===e&&"desktop"!==t&&"rtl"===n,style:{flexDirection:"column-reverse"}}]}),dH=Ka("div",{name:"MuiDateTimePickerToolbar",slot:"TimeDigitsContainer",shouldForwardProp:e=>Va(e)&&"toolbarVariant"!==e})({display:"flex",variants:[{props:{toolbarDirection:"rtl"},style:{flexDirection:"row-reverse"}},{props:{toolbarVariant:"desktop"},style:{gap:1.5}}]}),fH=Ka(GV,{name:"MuiDateTimePickerToolbar",slot:"Separator",shouldForwardProp:e=>Va(e)&&"toolbarVariant"!==e})({margin:"0 4px 0 2px",cursor:"default",variants:[{props:{toolbarVariant:"desktop"},style:{margin:0}}]}),pH=Ka("div",{name:"MuiDateTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[`.${aH.ampmLabel}`]:t.ampmLabel},{[`&.${aH.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12,[`& .${aH.ampmLabel}`]:{fontSize:17},variants:[{props:{pickerOrientation:"landscape"},style:{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",width:"100%"}}]}),hH=G.createContext(null);function mH(e){const t=UE({props:e,name:"MuiDateTimePickerToolbar"}),{ampm:n,ampmInClock:r,toolbarFormat:o,toolbarPlaceholder:i="––",toolbarTitle:a,className:s,classes:l}=t,c=il(t,sH),{value:u,setValue:d,disabled:f,readOnly:p,variant:h,orientation:m,view:g,setView:b,views:y}=ZR(),v=fA(),x=rA(),w=((e,t)=>{const{pickerOrientation:n,toolbarDirection:r}=t;return Na({root:["root"],dateContainer:["dateContainer"],timeContainer:["timeContainer","rtl"===r&&"timeLabelReverse"],timeDigitsContainer:["timeDigitsContainer","rtl"===r&&"timeLabelReverse"],separator:["separator"],ampmSelection:["ampmSelection","landscape"===n&&"ampmLandscape"],ampmLabel:["ampmLabel"]},iH,e)})(l,x),S=dA(),k=G.useContext(hH),C=k?k.value:u,M=k?k.setValue:d,P=k?k.view:g,T=k?k.setView:b,{meridiemMode:O,handleMeridiemChange:j}=Z$(C,n,e=>M(e,{changeImportance:"set",source:"view"})),_=k?.forceDesktopVariant?"desktop":h,D="desktop"===_,E=Boolean(n&&!r),R=a??v.dateTimePickerToolbarTitle,A=G.useMemo(()=>S.isValid(C)?o?S.formatByString(C,o):S.format(C,"shortDate"):i,[C,o,i,S]),I=(e,t)=>S.isValid(C)?S.format(C,e):t;return(0,le.jsxs)(lH,tr({className:Un(w.root,s),toolbarTitle:R,toolbarVariant:_},c,{ownerState:x,children:[(0,le.jsxs)(cH,{className:w.dateContainer,ownerState:x,children:[y.includes("year")&&(0,le.jsx)(KV,{tabIndex:-1,variant:"subtitle1",onClick:()=>T("year"),selected:"year"===P,value:I("year","–")}),y.includes("day")&&(0,le.jsx)(KV,{tabIndex:-1,variant:D?"h5":"h4",onClick:()=>T("day"),selected:"day"===P,value:A})]}),(0,le.jsxs)(uH,{className:w.timeContainer,ownerState:x,toolbarVariant:_,children:[(0,le.jsxs)(dH,{className:w.timeDigitsContainer,ownerState:x,toolbarVariant:_,children:[y.includes("hours")&&(0,le.jsxs)(G.Fragment,{children:[(0,le.jsx)(KV,{variant:D?"h5":"h3",width:D&&"portrait"===m?48:void 0,onClick:()=>T("hours"),selected:"hours"===P,value:I(n?"hours12h":"hours24h","--")}),(0,le.jsx)(fH,{variant:D?"h5":"h3",value:":",className:w.separator,ownerState:x,toolbarVariant:_}),(0,le.jsx)(KV,{variant:D?"h5":"h3",width:D&&"portrait"===m?48:void 0,onClick:()=>T("minutes"),selected:"minutes"===P||!y.includes("minutes")&&"hours"===P,value:I("minutes","--"),disabled:!y.includes("minutes")})]}),y.includes("seconds")&&(0,le.jsxs)(G.Fragment,{children:[(0,le.jsx)(fH,{variant:D?"h5":"h3",value:":",className:w.separator,ownerState:x,toolbarVariant:_}),(0,le.jsx)(KV,{variant:D?"h5":"h3",width:D&&"portrait"===m?48:void 0,onClick:()=>T("seconds"),selected:"seconds"===P,value:I("seconds","--")})]})]}),E&&!D&&(0,le.jsxs)(pH,{className:w.ampmSelection,ownerState:x,children:[(0,le.jsx)(KV,{variant:"subtitle2",selected:"am"===O,typographyClassName:w.ampmLabel,value:rR(S,"am"),onClick:p?void 0:()=>j("am"),disabled:f}),(0,le.jsx)(KV,{variant:"subtitle2",selected:"pm"===O,typographyClassName:w.ampmLabel,value:rR(S,"pm"),onClick:p?void 0:()=>j("pm"),disabled:f})]}),n&&D&&(0,le.jsx)(KV,{variant:"h5",onClick:()=>T("meridiem"),selected:"meridiem"===P,value:C&&O?rR(S,O):"--",width:48})]})]}))}function gH(e,t){const n=dA(),r=UE({props:e,name:t}),o=PW(r),i=r.ampm??n.is12HourCycleInCurrentLocale(),a=G.useMemo(()=>null==r.localeText?.toolbarTitle?r.localeText:tr({},r.localeText,{dateTimePickerToolbarTitle:r.localeText.toolbarTitle}),[r.localeText]),{openTo:s,views:l}=KE({views:r.views,openTo:r.openTo,defaultViews:["year","day","hours","minutes"],defaultOpenTo:"day"}),{shouldRenderTimeInASingleColumn:c,thresholdToRenderTimeInASingleColumn:u,views:d,timeSteps:f}=hW({thresholdToRenderTimeInASingleColumn:r.thresholdToRenderTimeInASingleColumn,ampm:i,timeSteps:r.timeSteps,views:l}),p=i?[...l,"meridiem"]:l;return tr({},r,o,{timeSteps:f,openTo:s,shouldRenderTimeInASingleColumn:c,thresholdToRenderTimeInASingleColumn:u,views:d,viewsForFormatting:p,ampm:i,localeText:a,orientation:r.orientation??"portrait",slots:tr({toolbar:mH,tabs:oH},r.slots),slotProps:tr({},r.slotProps,{toolbar:tr({ampm:i},r.slotProps?.toolbar)})})}const bH=G.forwardRef(function(e,t){const{toolbar:n,tabs:r,content:o,actionBar:i,shortcuts:a,ownerState:s}=kL(e),{orientation:l}=ZR(),{sx:c,className:u,classes:d}=e,f=i&&(i.props.actions?.length??0)>0;return(0,le.jsxs)(CL,{ref:t,className:Un(kF.root,d?.root,u),sx:[{[`& .${kF.tabs}`]:{gridRow:4,gridColumn:"1 / 4"},[`& .${kF.actionBar}`]:{gridRow:5}},...Array.isArray(c)?c:[c]],ownerState:s,children:["landscape"===l?a:n,"landscape"===l?n:a,(0,le.jsxs)(ML,{className:Un(kF.contentWrapper,d?.contentWrapper),ownerState:s,sx:{display:"grid"},children:[o,r,f&&(0,le.jsx)(SW,{sx:{gridRow:3,gridColumn:"1 / 4"}})]}),i]})}),yH=["openTo","focusedView","timeViewsCount"],vH=function(e){const{viewRenderers:t,popperView:n,rendererProps:r}=e,{openTo:o,focusedView:i,timeViewsCount:a}=r,s=tr({},il(r,yH),{autoFocus:!1,focusedView:null,sx:[{[`&.${QB.root}`]:{borderBottom:0},[`&.${QB.root}, .${ZB.root}, &.${WB.root}`]:{maxHeight:bL}}]}),l=dR(n),c=l?"day":n,u=l?n:"hours";return(0,le.jsxs)(G.Fragment,{children:[t[c]?.(tr({},r,{view:l?"day":n,focusedView:i&&iR(i)?i:null,views:r.views.filter(iR),sx:[{gridColumn:1},...s.sx]})),a>0&&(0,le.jsxs)(G.Fragment,{children:[(0,le.jsx)(SW,{orientation:"vertical",sx:{gridColumn:2}}),t[u]?.(tr({},s,{view:l?n:"hours",focusedView:i&&dR(i)?i:null,openTo:dR(o)?o:"hours",views:r.views.filter(dR),sx:[{gridColumn:3},...s.sx]}))]})]})},xH=G.forwardRef(function(e,t){const n=dA(),r=gH(e,"MuiDesktopDateTimePicker"),o=r.shouldRenderTimeInASingleColumn?cW:uW,i=tr({day:mV,month:mV,year:mV,hours:o,minutes:o,seconds:o,meridiem:o},r.viewRenderers),a=r.ampmInClock??!0,s=i.hours?.name===uW.name?r.views:r.views.filter(e=>"meridiem"!==e),l=tr({},r,{viewRenderers:i,format:fW(n,tr({},r,{views:r.viewsForFormatting})),views:s,yearsPerRow:r.yearsPerRow??4,ampmInClock:a,slots:tr({field:OW,layout:bH},r.slots),slotProps:tr({},r.slotProps,{field:e=>tr({},Is(r.slotProps?.field,e),jA(r)),toolbar:tr({hidden:!0,ampmInClock:a},r.slotProps?.toolbar),tabs:tr({hidden:!0},r.slotProps?.tabs)})}),{renderPicker:c}=_L({ref:t,props:l,valueManager:IR,valueType:"date-time",validator:kW,rendererInterceptor:vH,steps:null});return c()});xH.propTypes={ampm:GE.bool,ampmInClock:GE.bool,autoFocus:GE.bool,className:GE.string,closeOnSelect:GE.bool,dayOfWeekFormatter:GE.func,defaultValue:GE.object,disabled:GE.bool,disableFuture:GE.bool,disableHighlightToday:GE.bool,disableIgnoringDatePartForTimeValidation:GE.bool,disableOpenPicker:GE.bool,disablePast:GE.bool,displayWeekNumber:GE.bool,enableAccessibleFieldDOMStructure:GE.any,fixedWeekNumber:GE.number,format:GE.string,formatDensity:GE.oneOf(["dense","spacious"]),inputRef:XE,label:GE.node,loading:GE.bool,localeText:GE.object,maxDate:GE.object,maxDateTime:GE.object,maxTime:GE.object,minDate:GE.object,minDateTime:GE.object,minTime:GE.object,minutesStep:GE.number,monthsPerRow:GE.oneOf([3,4]),name:GE.string,onAccept:GE.func,onChange:GE.func,onClose:GE.func,onError:GE.func,onMonthChange:GE.func,onOpen:GE.func,onSelectedSectionsChange:GE.func,onViewChange:GE.func,onYearChange:GE.func,open:GE.bool,openTo:GE.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),orientation:GE.oneOf(["landscape","portrait"]),readOnly:GE.bool,reduceAnimations:GE.bool,referenceDate:GE.object,renderLoading:GE.func,selectedSections:GE.oneOfType([GE.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),GE.number]),shouldDisableDate:GE.func,shouldDisableMonth:GE.func,shouldDisableTime:GE.func,shouldDisableYear:GE.func,showDaysOutsideCurrentMonth:GE.bool,skipDisabled:GE.bool,slotProps:GE.object,slots:GE.object,sx:GE.oneOfType([GE.arrayOf(GE.oneOfType([GE.func,GE.object,GE.bool])),GE.func,GE.object]),thresholdToRenderTimeInASingleColumn:GE.number,timeSteps:GE.shape({hours:GE.number,minutes:GE.number,seconds:GE.number}),timezone:GE.string,value:GE.object,view:GE.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),viewRenderers:GE.shape({day:GE.func,hours:GE.func,meridiem:GE.func,minutes:GE.func,month:GE.func,seconds:GE.func,year:GE.func}),views:GE.arrayOf(GE.oneOf(["day","hours","minutes","month","seconds","year"]).isRequired),yearsOrder:GE.oneOf(["asc","desc"]),yearsPerRow:GE.oneOf([3,4])};const wH=[{views:oR},{views:lR}],SH=G.forwardRef(function(e,t){const n=dA(),r=gH(e,"MuiMobileDateTimePicker"),o=r.shouldRenderTimeInASingleColumn?cW:uW,i=tr({day:mV,month:mV,year:mV,hours:o,minutes:o,seconds:o,meridiem:o},r.viewRenderers),a=r.ampmInClock??!1,s=i.hours?.name===uW.name?r.views:r.views.filter(e=>"meridiem"!==e),l=tr({},r,{viewRenderers:i,format:fW(n,tr({},r,{views:r.viewsForFormatting})),views:s,ampmInClock:a,slots:tr({field:OW},r.slots),slotProps:tr({},r.slotProps,{field:e=>tr({},Is(r.slotProps?.field,e),jA(r)),toolbar:tr({hidden:!1,ampmInClock:a},r.slotProps?.toolbar),tabs:tr({hidden:!1},r.slotProps?.tabs),layout:tr({},r.slotProps?.layout,{sx:oF([{[`& .${QB.root}`]:{width:gL},[`& .${ZB.root}`]:{flex:1,maxHeight:335,[`.${ZB.item}`]:{width:"auto"}},[`& .${WB.root}`]:{width:gL,maxHeight:bL,flex:1,[`.${WB.item}`]:{justifyContent:"center"}}}],r.slotProps?.layout?.sx)})})}),{renderPicker:c}=AV({ref:t,props:l,valueManager:IR,valueType:"date-time",validator:kW,steps:wH});return c()});SH.propTypes={ampm:GE.bool,ampmInClock:GE.bool,autoFocus:GE.bool,className:GE.string,closeOnSelect:GE.bool,dayOfWeekFormatter:GE.func,defaultValue:GE.object,disabled:GE.bool,disableFuture:GE.bool,disableHighlightToday:GE.bool,disableIgnoringDatePartForTimeValidation:GE.bool,disableOpenPicker:GE.bool,disablePast:GE.bool,displayWeekNumber:GE.bool,enableAccessibleFieldDOMStructure:GE.any,fixedWeekNumber:GE.number,format:GE.string,formatDensity:GE.oneOf(["dense","spacious"]),inputRef:XE,label:GE.node,loading:GE.bool,localeText:GE.object,maxDate:GE.object,maxDateTime:GE.object,maxTime:GE.object,minDate:GE.object,minDateTime:GE.object,minTime:GE.object,minutesStep:GE.number,monthsPerRow:GE.oneOf([3,4]),name:GE.string,onAccept:GE.func,onChange:GE.func,onClose:GE.func,onError:GE.func,onMonthChange:GE.func,onOpen:GE.func,onSelectedSectionsChange:GE.func,onViewChange:GE.func,onYearChange:GE.func,open:GE.bool,openTo:GE.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),orientation:GE.oneOf(["landscape","portrait"]),readOnly:GE.bool,reduceAnimations:GE.bool,referenceDate:GE.object,renderLoading:GE.func,selectedSections:GE.oneOfType([GE.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),GE.number]),shouldDisableDate:GE.func,shouldDisableMonth:GE.func,shouldDisableTime:GE.func,shouldDisableYear:GE.func,showDaysOutsideCurrentMonth:GE.bool,skipDisabled:GE.bool,slotProps:GE.object,slots:GE.object,sx:GE.oneOfType([GE.arrayOf(GE.oneOfType([GE.func,GE.object,GE.bool])),GE.func,GE.object]),thresholdToRenderTimeInASingleColumn:GE.number,timeSteps:GE.shape({hours:GE.number,minutes:GE.number,seconds:GE.number}),timezone:GE.string,value:GE.object,view:GE.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),viewRenderers:GE.shape({day:GE.func,hours:GE.func,meridiem:GE.func,minutes:GE.func,month:GE.func,seconds:GE.func,year:GE.func}),views:GE.arrayOf(GE.oneOf(["day","hours","minutes","month","seconds","year"]).isRequired),yearsOrder:GE.oneOf(["asc","desc"]),yearsPerRow:GE.oneOf([3,4])};const kH=["desktopModeMediaQuery"],CH=G.forwardRef(function(e,t){const n=UE({props:e,name:"MuiDateTimePicker"}),{desktopModeMediaQuery:r=rF}=n,o=il(n,kH);return YE(r,{defaultMatches:!0})?(0,le.jsx)(xH,tr({ref:t},o)):(0,le.jsx)(SH,tr({ref:t},o))});function MH(e,t,n){const r=Fd(e,n?.in);return isNaN(t)?Id(n?.in||e,NaN):t?(r.setDate(r.getDate()+t),r):r}function PH(e,t,n){return Id(n?.in||e,+Fd(e)+t)}function TH(e,t,n){const r=Fd(e,n?.in);if(isNaN(t))return Id(n?.in||e,NaN);if(!t)return r;const o=r.getDate(),i=Id(n?.in||e,r.getTime());return i.setMonth(r.getMonth()+t+1,0),o>=i.getDate()?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}function OH(e,t){const n=Fd(e,t?.in);return n.setHours(23,59,59,999),n}function jH(e,t){const n=Fd(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function _H(e,t){const n=Fd(e,t?.in),r=n.getFullYear(),o=n.getMonth(),i=Id(n,0);return i.setFullYear(r,o+1,0),i.setHours(0,0,0,0),i.getDate()}function DH(e,t){return+Fd(e)>+Fd(t)}function EH(e,t){return+Fd(e)<+Fd(t)}function RH(e,t){const n=Fd(e,t?.in);return n.setMinutes(0,0,0),n}class AH{subPriority=0;validate(e,t){return!0}}class IH extends AH{constructor(e,t,n,r,o){super(),this.value=e,this.validateValue=t,this.setValue=n,this.priority=r,o&&(this.subPriority=o)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,n){return this.setValue(e,t,this.value,n)}}class FH extends AH{priority=10;subPriority=-1;constructor(e,t){super(),this.context=e||(e=>Id(t,e))}set(e,t){return t.timestampIsSet?e:Id(e,function(e,t){const n=function(e){return"function"==typeof e&&e.prototype?.constructor===e}(t)?new t(0):Id(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}(e,this.context))}}class LH{run(e,t,n,r){const o=this.parse(e,t,n,r);return o?{setter:new IH(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(e,t,n){return!0}}const NH=/^(1[0-2]|0?\d)/,zH=/^(3[0-1]|[0-2]?\d)/,$H=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,VH=/^(5[0-3]|[0-4]?\d)/,BH=/^(2[0-3]|[0-1]?\d)/,WH=/^(2[0-4]|[0-1]?\d)/,HH=/^(1[0-1]|0?\d)/,qH=/^(1[0-2]|0?\d)/,YH=/^[0-5]?\d/,UH=/^[0-5]?\d/,GH=/^\d/,XH=/^\d{1,2}/,QH=/^\d{1,3}/,KH=/^\d{1,4}/,ZH=/^-?\d+/,JH=/^-?\d/,eq=/^-?\d{1,2}/,tq=/^-?\d{1,3}/,nq=/^-?\d{1,4}/,rq=/^([+-])(\d{2})(\d{2})?|Z/,oq=/^([+-])(\d{2})(\d{2})|Z/,iq=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,aq=/^([+-])(\d{2}):(\d{2})|Z/,sq=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function lq(e,t){return e?{value:t(e.value),rest:e.rest}:e}function cq(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function uq(e,t){const n=t.match(e);if(!n)return null;if("Z"===n[0])return{value:0,rest:t.slice(1)};const r="+"===n[1]?1:-1,o=n[2]?parseInt(n[2],10):0,i=n[3]?parseInt(n[3],10):0,a=n[5]?parseInt(n[5],10):0;return{value:r*(o*Rd+6e4*i+1e3*a),rest:t.slice(n[0].length)}}function dq(e){return cq(ZH,e)}function fq(e,t){switch(e){case 1:return cq(GH,t);case 2:return cq(XH,t);case 3:return cq(QH,t);case 4:return cq(KH,t);default:return cq(new RegExp("^\\d{1,"+e+"}"),t)}}function pq(e,t){switch(e){case 1:return cq(JH,t);case 2:return cq(eq,t);case 3:return cq(tq,t);case 4:return cq(nq,t);default:return cq(new RegExp("^-?\\d{1,"+e+"}"),t)}}function hq(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function mq(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const t=r+50;o=e+100*Math.trunc(t/100)-(e>=t%100?100:0)}return n?o:1-o}function gq(e){return e%400==0||e%4==0&&e%100!=0}const bq=[31,28,31,30,31,30,31,31,30,31,30,31],yq=[31,29,31,30,31,30,31,31,30,31,30,31];function vq(e,t,n){const r=Dd(),o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=Fd(e,n?.in),a=i.getDay(),s=7-o;return MH(i,t<0||t>6?t-(a+s)%7:((t%7+7)%7+s)%7-(a+s)%7,n)}function xq(e,t,n){const r=Fd(e,n?.in);return MH(r,t-function(e,t){const n=Fd(e,t?.in).getDay();return 0===n?7:n}(r,n),n)}const wq={G:new class extends LH{priority=140;parse(e,t,n){switch(t){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}}set(e,t,n){return t.era=n,e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]},y:new class extends LH{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,t,n){const r=e=>({year:e,isTwoDigitYear:"yy"===t});switch(t){case"y":return lq(fq(4,e),r);case"yo":return lq(n.ordinalNumber(e,{unit:"year"}),r);default:return lq(fq(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n){const r=e.getFullYear();if(n.isTwoDigitYear){const t=mq(n.year,r);return e.setFullYear(t,0,1),e.setHours(0,0,0,0),e}const o="era"in t&&1!==t.era?1-n.year:n.year;return e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}},Y:new class extends LH{priority=130;parse(e,t,n){const r=e=>({year:e,isTwoDigitYear:"YY"===t});switch(t){case"Y":return lq(fq(4,e),r);case"Yo":return lq(n.ordinalNumber(e,{unit:"year"}),r);default:return lq(fq(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n,r){const o=Yd(e,r);if(n.isTwoDigitYear){const t=mq(n.year,o);return e.setFullYear(t,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),Bd(e,r)}const i="era"in t&&1!==t.era?1-n.year:n.year;return e.setFullYear(i,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),Bd(e,r)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:new class extends LH{priority=130;parse(e,t){return pq("R"===t?4:t.length,e)}set(e,t,n){const r=Id(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Wd(r)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:new class extends LH{priority=130;parse(e,t){return pq("u"===t?4:t.length,e)}set(e,t,n){return e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]},Q:new class extends LH{priority=120;parse(e,t,n){switch(t){case"Q":case"QQ":return fq(t.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth(3*(n-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:new class extends LH{priority=120;parse(e,t,n){switch(t){case"q":case"qq":return fq(t.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth(3*(n-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:new class extends LH{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,t,n){const r=e=>e-1;switch(t){case"M":return lq(cq(NH,e),r);case"MM":return lq(fq(2,e),r);case"Mo":return lq(n.ordinalNumber(e,{unit:"month"}),r);case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}},L:new class extends LH{priority=110;parse(e,t,n){const r=e=>e-1;switch(t){case"L":return lq(cq(NH,e),r);case"LL":return lq(fq(2,e),r);case"Lo":return lq(n.ordinalNumber(e,{unit:"month"}),r);case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:new class extends LH{priority=100;parse(e,t,n){switch(t){case"w":return cq(VH,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return fq(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n,r){return Bd(function(e,t,n){const r=Fd(e,n?.in),o=Ud(r,n)-t;return r.setDate(r.getDate()-7*o),Fd(r,n?.in)}(e,n,r),r)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:new class extends LH{priority=100;parse(e,t,n){switch(t){case"I":return cq(VH,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return fq(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n){return Wd(function(e,t,n){const r=Fd(e,n?.in),o=qd(r,n)-t;return r.setDate(r.getDate()-7*o),r}(e,n))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:new class extends LH{priority=90;subPriority=1;parse(e,t,n){switch(t){case"d":return cq(zH,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return fq(t.length,e)}}validate(e,t){const n=gq(e.getFullYear()),r=e.getMonth();return n?t>=1&&t<=yq[r]:t>=1&&t<=bq[r]}set(e,t,n){return e.setDate(n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:new class extends LH{priority=90;subpriority=1;parse(e,t,n){switch(t){case"D":case"DD":return cq($H,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return fq(t.length,e)}}validate(e,t){return gq(e.getFullYear())?t>=1&&t<=366:t>=1&&t<=365}set(e,t,n){return e.setMonth(0,n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:new class extends LH{priority=90;parse(e,t,n){switch(t){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=vq(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]},e:new class extends LH{priority=90;parse(e,t,n,r){const o=e=>{const t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return lq(fq(t.length,e),o);case"eo":return lq(n.ordinalNumber(e,{unit:"day"}),o);case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=vq(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:new class extends LH{priority=90;parse(e,t,n,r){const o=e=>{const t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return lq(fq(t.length,e),o);case"co":return lq(n.ordinalNumber(e,{unit:"day"}),o);case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=vq(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:new class extends LH{priority=90;parse(e,t,n){const r=e=>0===e?7:e;switch(t){case"i":case"ii":return fq(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return lq(n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiii":return lq(n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiiii":return lq(n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);default:return lq(n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r)}}validate(e,t){return t>=1&&t<=7}set(e,t,n){return(e=xq(e,n)).setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:new class extends LH{priority=80;parse(e,t,n){switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(hq(n),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]},b:new class extends LH{priority=80;parse(e,t,n){switch(t){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(hq(n),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]},B:new class extends LH{priority=80;parse(e,t,n){switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(hq(n),0,0,0),e}incompatibleTokens=["a","b","t","T"]},h:new class extends LH{priority=70;parse(e,t,n){switch(t){case"h":return cq(qH,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return fq(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,n){const r=e.getHours()>=12;return r&&n<12?e.setHours(n+12,0,0,0):r||12!==n?e.setHours(n,0,0,0):e.setHours(0,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]},H:new class extends LH{priority=70;parse(e,t,n){switch(t){case"H":return cq(BH,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return fq(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,n){return e.setHours(n,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]},K:new class extends LH{priority=70;parse(e,t,n){switch(t){case"K":return cq(HH,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return fq(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.getHours()>=12&&n<12?e.setHours(n+12,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]},k:new class extends LH{priority=70;parse(e,t,n){switch(t){case"k":return cq(WH,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return fq(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,n){const r=n<=24?n%24:n;return e.setHours(r,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]},m:new class extends LH{priority=60;parse(e,t,n){switch(t){case"m":return cq(YH,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return fq(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setMinutes(n,0,0),e}incompatibleTokens=["t","T"]},s:new class extends LH{priority=50;parse(e,t,n){switch(t){case"s":return cq(UH,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return fq(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setSeconds(n,0),e}incompatibleTokens=["t","T"]},S:new class extends LH{priority=30;parse(e,t){return lq(fq(t.length,e),e=>Math.trunc(e*Math.pow(10,3-t.length)))}set(e,t,n){return e.setMilliseconds(n),e}incompatibleTokens=["t","T"]},X:new class extends LH{priority=10;parse(e,t){switch(t){case"X":return uq(rq,e);case"XX":return uq(oq,e);case"XXXX":return uq(iq,e);case"XXXXX":return uq(sq,e);default:return uq(aq,e)}}set(e,t,n){return t.timestampIsSet?e:Id(e,e.getTime()-Ld(e)-n)}incompatibleTokens=["t","T","x"]},x:new class extends LH{priority=10;parse(e,t){switch(t){case"x":return uq(rq,e);case"xx":return uq(oq,e);case"xxxx":return uq(iq,e);case"xxxxx":return uq(sq,e);default:return uq(aq,e)}}set(e,t,n){return t.timestampIsSet?e:Id(e,e.getTime()-Ld(e)-n)}incompatibleTokens=["t","T","X"]},t:new class extends LH{priority=40;parse(e){return dq(e)}set(e,t,n){return[Id(e,1e3*n),{timestampIsSet:!0}]}incompatibleTokens="*"},T:new class extends LH{priority=20;parse(e){return dq(e)}set(e,t,n){return[Id(e,n),{timestampIsSet:!0}]}incompatibleTokens="*"}},Sq=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,kq=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Cq=/^'([^]*?)'?$/,Mq=/''/g,Pq=/\S/,Tq=/[a-zA-Z]/;function Oq(e,t,n,r){const o=()=>Id(r?.in||n,NaN),i=Object.assign({},Dd()),a=r?.locale??i.locale??jd,s=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,l=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0;if(!t)return e?o():Fd(n,r?.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:a},u=[new FH(r?.in,n)],d=t.match(kq).map(e=>{const t=e[0];return t in nf?(0,nf[t])(e,a.formatLong):e}).join("").match(Sq),f=[];for(let n of d){!r?.useAdditionalWeekYearTokens&&lf(n)&&cf(n,t,e),!r?.useAdditionalDayOfYearTokens&&sf(n)&&cf(n,t,e);const i=n[0],s=wq[i];if(s){const{incompatibleTokens:t}=s;if(Array.isArray(t)){const e=f.find(e=>t.includes(e.token)||e.token===i);if(e)throw new RangeError(`The format string mustn't contain \`${e.fullToken}\` and \`${n}\` at the same time`)}else if("*"===s.incompatibleTokens&&f.length>0)throw new RangeError(`The format string mustn't contain \`${n}\` and any other token at the same time`);f.push({token:i,fullToken:n});const r=s.run(e,n,a.match,c);if(!r)return o();u.push(r.setter),e=r.rest}else{if(i.match(Tq))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");if("''"===n?n="'":"'"===i&&(n=jq(n)),0!==e.indexOf(n))return o();e=e.slice(n.length)}}if(e.length>0&&Pq.test(e))return o();const p=u.map(e=>e.priority).sort((e,t)=>t-e).filter((e,t,n)=>n.indexOf(e)===t).map(e=>u.filter(t=>t.priority===e).sort((e,t)=>t.subPriority-e.subPriority)).map(e=>e[0]);let h=Fd(n,r?.in);if(isNaN(+h))return o();const m={};for(const e of p){if(!e.validate(h,c))return o();const t=e.set(h,m,c);Array.isArray(t)?(h=t[0],Object.assign(m,t[1])):h=t}return h}function jq(e){return e.match(Cq)[1].replace(Mq,"'")}const _q={y:{sectionType:"year",contentType:"digit",maxLength:4},yy:"year",yyy:{sectionType:"year",contentType:"digit",maxLength:4},yyyy:"year",M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMMM:{sectionType:"month",contentType:"letter"},MMM:{sectionType:"month",contentType:"letter"},L:{sectionType:"month",contentType:"digit",maxLength:2},LL:"month",LLL:{sectionType:"month",contentType:"letter"},LLLL:{sectionType:"month",contentType:"letter"},d:{sectionType:"day",contentType:"digit",maxLength:2},dd:"day",do:{sectionType:"day",contentType:"digit-with-letter"},E:{sectionType:"weekDay",contentType:"letter"},EE:{sectionType:"weekDay",contentType:"letter"},EEE:{sectionType:"weekDay",contentType:"letter"},EEEE:{sectionType:"weekDay",contentType:"letter"},EEEEE:{sectionType:"weekDay",contentType:"letter"},i:{sectionType:"weekDay",contentType:"digit",maxLength:1},ii:"weekDay",iii:{sectionType:"weekDay",contentType:"letter"},iiii:{sectionType:"weekDay",contentType:"letter"},e:{sectionType:"weekDay",contentType:"digit",maxLength:1},ee:"weekDay",eee:{sectionType:"weekDay",contentType:"letter"},eeee:{sectionType:"weekDay",contentType:"letter"},eeeee:{sectionType:"weekDay",contentType:"letter"},eeeeee:{sectionType:"weekDay",contentType:"letter"},c:{sectionType:"weekDay",contentType:"digit",maxLength:1},cc:"weekDay",ccc:{sectionType:"weekDay",contentType:"letter"},cccc:{sectionType:"weekDay",contentType:"letter"},ccccc:{sectionType:"weekDay",contentType:"letter"},cccccc:{sectionType:"weekDay",contentType:"letter"},a:"meridiem",aa:"meridiem",aaa:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},Dq={year:"yyyy",month:"LLLL",monthShort:"MMM",dayOfMonth:"d",dayOfMonthFull:"do",weekday:"EEEE",weekdayShort:"EEEEEE",hours24h:"HH",hours12h:"hh",meridiem:"aa",minutes:"mm",seconds:"ss",fullDate:"PP",keyboardDate:"P",shortDate:"MMM d",normalDate:"d MMMM",normalDateWithWeekday:"EEE, MMM d",fullTime12h:"hh:mm aa",fullTime24h:"HH:mm",keyboardDateTime12h:"P hh:mm aa",keyboardDateTime24h:"P HH:mm"};class Eq{isMUIAdapter=!0;isTimezoneCompatible=!1;formatTokenMap=(()=>_q)();escapedCharacters={start:"'",end:"'"};constructor(e){const{locale:t,formats:n,longFormatters:r,lib:o}=e;this.locale=t,this.formats=tr({},Dq,n),this.longFormatters=r,this.lib=o||"date-fns"}date=e=>void 0===e?new Date:null===e?null:new Date(e);getInvalidDate=()=>new Date("Invalid Date");getTimezone=()=>"default";setTimezone=e=>e;toJsDate=e=>e;getCurrentLocaleCode=()=>this.locale.code;is12HourCycleInCurrentLocale=()=>/a/.test(this.locale.formatLong.time({width:"short"}));expandFormat=e=>e.match(/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g).map(e=>{const t=e[0];return"p"===t||"P"===t?(0,this.longFormatters[t])(e,this.locale.formatLong):e}).join("");formatNumber=e=>e;getDayOfWeek=e=>e.getDay()+1}class Rq extends Eq{constructor({locale:e,formats:t}={}){super({locale:e??jd,formats:t,longFormatters:nf})}parse=(e,t)=>""===e?null:Oq(e,t,new Date,{locale:this.locale});isValid=e=>null!=e&&uf(e);format=(e,t)=>this.formatByString(e,this.formats[t]);formatByString=(e,t)=>gf(e,t,{locale:this.locale});isEqual=(e,t)=>{return null===e&&null===t||null!==e&&null!==t&&(n=t,+Fd(e)===+Fd(n));var n};isSameYear=(e,t)=>function(e,t,n){const[r,o]=Nd(n?.in,e,t);return r.getFullYear()===o.getFullYear()}(e,t);isSameMonth=(e,t)=>function(e,t,n){const[r,o]=Nd(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}(e,t);isSameDay=(e,t)=>function(e,t,n){const[r,o]=Nd(n?.in,e,t);return+zd(r)===+zd(o)}(e,t);isSameHour=(e,t)=>function(e,t,n){const[r,o]=Nd(n?.in,e,t);return+RH(r)===+RH(o)}(e,t);isAfter=(e,t)=>DH(e,t);isAfterYear=(e,t)=>DH(e,jH(t));isAfterDay=(e,t)=>DH(e,OH(t));isBefore=(e,t)=>EH(e,t);isBeforeYear=(e,t)=>EH(e,this.startOfYear(t));isBeforeDay=(e,t)=>EH(e,this.startOfDay(t));isWithinRange=(e,[t,n])=>function(e,t,n){const r=+Fd(e,n?.in),[o,i]=[+Fd(t.start,n?.in),+Fd(t.end,n?.in)].sort((e,t)=>e-t);return r>=o&&r<=i}(e,{start:t,end:n});startOfYear=e=>$d(e);startOfMonth=e=>function(e,t){const n=Fd(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}(e);startOfWeek=e=>Bd(e,{locale:this.locale});startOfDay=e=>zd(e);endOfYear=e=>jH(e);endOfMonth=e=>function(e,t){const n=Fd(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}(e);endOfWeek=e=>function(e,t){const n=Dd(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Fd(e,t?.in),i=o.getDay(),a=6+(i<r?-7:0)-(i-r);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}(e,{locale:this.locale});endOfDay=e=>OH(e);addYears=(e,t)=>function(e,t,n){return TH(e,12*t,n)}(e,t);addMonths=(e,t)=>TH(e,t);addWeeks=(e,t)=>function(e,t,n){return MH(e,7*t,n)}(e,t);addDays=(e,t)=>MH(e,t);addHours=(e,t)=>function(e,t,n){return PH(e,t*Rd,n)}(e,t);addMinutes=(e,t)=>function(e,t,n){const r=Fd(e,n?.in);return r.setTime(r.getTime()+6e4*t),r}(e,t);addSeconds=(e,t)=>function(e,t,n){return PH(e,1e3*t,n)}(e,t);getYear=e=>function(e,t){return Fd(e,t?.in).getFullYear()}(e);getMonth=e=>function(e,t){return Fd(e,t?.in).getMonth()}(e);getDate=e=>function(e,t){return Fd(e,t?.in).getDate()}(e);getHours=e=>function(e,t){return Fd(e,t?.in).getHours()}(e);getMinutes=e=>function(e,t){return Fd(e,t?.in).getMinutes()}(e);getSeconds=e=>function(e){return Fd(e).getSeconds()}(e);getMilliseconds=e=>function(e){return Fd(e).getMilliseconds()}(e);setYear=(e,t)=>function(e,t,n){const r=Fd(e,n?.in);return isNaN(+r)?Id(n?.in||e,NaN):(r.setFullYear(t),r)}(e,t);setMonth=(e,t)=>function(e,t,n){const r=Fd(e,n?.in),o=r.getFullYear(),i=r.getDate(),a=Id(n?.in||e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const s=_H(a);return r.setMonth(t,Math.min(i,s)),r}(e,t);setDate=(e,t)=>function(e,t,n){const r=Fd(e,n?.in);return r.setDate(t),r}(e,t);setHours=(e,t)=>function(e,t,n){const r=Fd(e,n?.in);return r.setHours(t),r}(e,t);setMinutes=(e,t)=>function(e,t,n){const r=Fd(e,n?.in);return r.setMinutes(t),r}(e,t);setSeconds=(e,t)=>function(e,t,n){const r=Fd(e,n?.in);return r.setSeconds(t),r}(e,t);setMilliseconds=(e,t)=>function(e,t,n){const r=Fd(e,n?.in);return r.setMilliseconds(t),r}(e,t);getDaysInMonth=e=>_H(e);getWeekArray=e=>{const t=this.startOfWeek(this.startOfMonth(e)),n=this.endOfWeek(this.endOfMonth(e));let r=0,o=t;const i=[];for(;this.isBefore(o,n);){const e=Math.floor(r/7);i[e]=i[e]||[],i[e].push(o),o=this.addDays(o,1),r+=1}return i};getWeekNumber=e=>Ud(e,{locale:this.locale});getYearRange=([e,t])=>{const n=this.startOfYear(e),r=this.endOfYear(t),o=[];let i=n;for(;this.isBefore(i,r);)o.push(i),i=this.addYears(i,1);return o}}const Aq={code:"en-GB",formatDistance:vd,formatLong:{date:xd({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:xd({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:xd({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},formatRelative:kd,localize:Md,match:Td,options:{weekStartsOn:1,firstWeekContainsDate:4}},Iq=Ce("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);function Fq(e){return Fq="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fq(e)}function Lq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Nq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lq(Object(n),!0).forEach(function(t){zq(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lq(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function zq(e,t,n){return(t=function(e){var t=function(e){if("object"!=Fq(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Fq(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Fq(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $q(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Vq(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Vq(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vq(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Bq=new Date("1901-01-01"),Wq=new Date("2099-12-31"),Hq="Please enter a valid date",qq="From date must be earlier than To date",Yq=function(e){var t,n=e.subFieldType,r=e.isRange,o=e.value,i=e.onChange,a=e.disabled,s=void 0!==a&&a,l=$q(o,2),c=l[0],u=void 0===c?"":c,d=l[1],f=void 0===d?"":d,p=$q((0,G.useState)(u?new Date(u):null),2),h=p[0],m=p[1],g=$q((0,G.useState)(f?new Date(f):null),2),b=g[0],y=g[1],v=r&&h&&b&&h>b,x=$q((0,G.useState)(v?qq:null),2),w=x[0],S=x[1],k=(0,G.useId)(),C=null!==(t={date:LV,time:yW,datetime:CH}[n])&&void 0!==t?t:CH,M={size:"small",sx:{width:"100%"}},P=function(e){return"date"===n?e.toISOString().split("T")[0]:e.toISOString()},T=function(){return"datetime"===n?{start:{minDateTime:Bq,maxDateTime:Wq},end:{minDateTime:null!=h?h:Bq,maxDateTime:Wq}}:"date"===n?{start:{minDate:Bq,maxDate:Wq},end:{minDate:null!=h?h:Bq,maxDate:Wq}}:{start:{},end:{}}},O=function(e){if(!e)return S(null);S(r&&"invalidDate"!==e?qq:Hq)},j=function(e){return e>=Bq&&e<=Wq};return(0,le.jsxs)(UR,{dateAdapter:Rq,adapterLocale:Aq,children:[(0,le.jsx)(fs,{sx:{m:1,width:"100%"},size:"small",children:(0,le.jsx)(C,Nq({disabled:s,label:r?"From":"Value",value:h,onChange:r?function(e){m(e),e&&j(e)&&(b&&e>b?S(qq):(S(null),b&&e<=b&&i([P(e),P(b)])))}:function(e){m(e),e&&j(e)&&(S(null),i([P(e)]))},onError:O,slotProps:{textField:Nq(Nq({},M),{},{error:!!w,inputProps:{"aria-describedby":k},onBlur:function(){h||S(Hq)}})}},T().start))}),r&&(0,le.jsx)(fs,{sx:{m:1,width:"100%"},size:"small",children:(0,le.jsx)(C,Nq({disabled:s,label:"To",value:b,onChange:function(e){y(e),e&&j(e)&&(h&&h>e?S(qq):(S(null),h&&h<=e&&i([P(h),P(e)])))},onError:O,slotProps:{textField:Nq(Nq({},M),{},{error:!!w,inputProps:{"aria-describedby":k},onBlur:function(){b||S(Hq)}})}},T().end))}),w&&(0,le.jsxs)("p",{id:k,role:"alert","aria-live":"polite",className:"dashboard-filter-panel-popup-filter-option--error",children:[(0,le.jsx)(Iq,{size:12}),w]})]})};const Uq=ls("MuiBox",["root"]),Gq=Oa(),Xq=function(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:o}=e,i=cr("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(jo);return G.forwardRef(function(e,a){const s=Ro(n),{className:l,component:c="div",...u}=Xc(e);return(0,le.jsx)(i,{as:c,ref:a,className:Un(l,o?o(r):r),theme:t&&s[t]||s,...u})})}({themeId:zo,defaultTheme:Gq,defaultClassName:Uq.root,generateClassName:is.generate}),Qq=Xq;var Kq=function(e){var t=e.className;return(0,le.jsx)("div",{className:be()("loading-spinner",[t]),"aria-label":"Loading spinner",role:"img",children:(0,le.jsxs)("div",{className:"loading-spinner__inner",role:"presentation",children:[(0,le.jsx)("div",{className:"loading-spinner__circle loading-spinner__circle-left",role:"presentation"}),(0,le.jsx)("div",{className:"loading-spinner__circle loading-spinner__circle-top",role:"presentation"}),(0,le.jsx)("div",{className:"loading-spinner__circle loading-spinner__circle-right",role:"presentation"}),(0,le.jsx)("div",{className:"loading-spinner__circle loading-spinner__circle-bottom",role:"presentation"})]})})},Zq=function(e){var t=e.dimension,n=e.title,r=e.value,o=e.filterValues,i=e.isMultiSelect,a=e.onChange,s=e.disabled,l=void 0!==s&&s,c=e.isLoading;return void 0!==c&&c?(0,le.jsxs)("div",{className:"dashboard-filter-panel-popup-filter-dropdown-loading",children:[(0,le.jsx)(Kq,{className:"dashboard-filter-panel-popup-filter-dropdown-loading-spinner"}),(0,le.jsx)("span",{className:"dashboard-filter-panel-popup-filter-dropdown-loading-text",children:"Loading values..."})]}):(0,le.jsxs)(fs,{sx:{m:1,width:"100%"},size:"small",children:[(0,le.jsx)(Ms,{id:"filter-input-label-".concat(t,"-value"),sx:{fontSize:"16px"},children:"Value"}),(0,le.jsx)(Au,{disabled:l,labelId:"filter-input-label-".concat(t,"-value"),value:r,onChange:function(e){a(Array.isArray(e.target.value)?e.target.value:[e.target.value])},multiple:i,input:(0,le.jsx)(Ou,{id:"select-multiple-value-".concat(n),label:"Value",sx:{fontSize:"14px"}}),renderValue:function(e){return(0,le.jsx)(Qq,{sx:{display:"flex",overflow:"ellipsis",gap:.5},children:Array.isArray(e)?e.map(function(t,n){if(!(n>1||""===t))return(0,le.jsx)(mL,{label:0===n?t:"+"+(e.length-1),style:{maxHeight:20}},t)}):e&&(0,le.jsx)(mL,{label:e,style:{maxHeight:20}},e)})},children:o.map(function(e,t){return(0,le.jsx)(ud,{value:e,children:e},t)})})]})};function Jq(e){return Jq="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jq(e)}function eY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eY(Object(n),!0).forEach(function(t){nY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function nY(e,t,n){return(t=function(e){var t=function(e){if("object"!=Jq(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Jq(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Jq(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rY(e){return function(e){if(Array.isArray(e))return aY(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||iY(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function oY(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||iY(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function iY(e,t){if(e){if("string"==typeof e)return aY(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?aY(e,t):void 0}}function aY(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var sY=function(e){var t,n,r,o,i=e.filters,a=e.filter,s=e.updateFilters,l=e.filterCache,c=e.lockFilter,u=e.isDisabled,d=void 0!==u&&u,f=e.filterValuesQuery,p=oY((0,G.useState)(a),2),h=p[0],m=p[1],g=oY((0,G.useState)(a.dimension),2),b=g[0],y=g[1],v=oY((0,G.useState)(a.currentOperator),2),x=v[0],w=v[1],S=oY((0,G.useState)(a.currentValues),2),k=S[0],C=S[1],M=oY((0,G.useState)(!1),2),P=M[0],T=M[1],O=oY((0,G.useState)([]),2),j=O[0],_=O[1],D=structuredClone(l).sort(function(e,t){var n;return null===(n=e.title)||void 0===n?void 0:n.localeCompare(t.title)}),E=null===(t=(0,G.useContext)(AE))||void 0===t?void 0:t.lockedFilters,R=null===(n=(0,G.useContext)(AE))||void 0===n?void 0:n.filterValuesQuery,A=f||R;if(!A)throw new Error("No URL for fetching filter values");var I=["date","time","datetime"].includes(null!==(r=h.subFieldType)&&void 0!==r?r:""),F=qe({queryKey:["filterValues",b],queryFn:function(){return zE(A.url+"/"+b,{},{authToken:A.authToken})},enabled:!I}),L=F.data,N=F.isLoading;(0,G.useEffect)(function(){try{if(L){var e=L.sort(function(e,t){return e.localeCompare(t)}),t=[].concat(rY(k.filter(function(t){return e.includes(t)}).sort(function(e,t){return e.localeCompare(t)})),rY(e.filter(function(e){return!k.includes(e)})));_(t)}}catch(e){console.error("Error fetching filter values for dimension "+b,e),_([])}},[L,b,k]),(0,G.useEffect)(function(){if(E&&E.length>0){var e=E.some(function(e){return e.dimension===h.dimension});T(e)}},[E,h.dimension]),(0,G.useEffect)(function(){w(h.currentOperator),C(h.currentValues)},[h]);var z=function(e){s(function(t){return t.map(function(t){return t.dimension===e?tY(tY({},t),{},{active:!1,currentValues:[],currentOperator:""}):t})})},$=(null===(o=h.operators[h.currentOperator])||void 0===o?void 0:o.isMultiSelect)||!1,V="between"===x,B=function(e){_([].concat(rY(e),rY(j.filter(function(t){return!e.includes(t)})))),m(tY(tY({},h),{},{currentValues:e})),s(function(t){return t.map(function(t){return t.dimension===b?tY(tY({},t),{},{currentValues:e,active:e.length>0}):t})})};return(0,le.jsx)(La,{theme:$E,children:(0,le.jsxs)("div",{className:"dashboard-filter-panel-popup-filter-option".concat(V?" dashboard-filter-panel-popup-filter-option--date-range":""),children:[(0,le.jsx)("div",{className:"dashboard-filter-panel-popup-filter-dropdown",children:(0,le.jsxs)(fs,{sx:{m:1,width:"100%"},size:"small",children:[(0,le.jsx)(Ms,{id:"filter-input-label-".concat(h.dimension),sx:{fontSize:"var(--font-size-xl, 16px)"},children:"Filter on"}),(0,le.jsx)(Au,{disabled:d,input:(0,le.jsx)(Ou,{id:"select-multiple-chip",label:"Filter on",sx:{fontSize:"var(--font-size-md, 14px)"}}),labelId:"filter-input-label-".concat(h.dimension),onChange:function(e){var t=l.findIndex(function(t){return t.dimension===e.target.value}),n=l.findIndex(function(e){return e.dimension===b});z(b),s(function(r){return r.map(function(t){t.dimension===e.target.value&&(t.currentValues=[],t.currentOperator="",t.active=!0)}),o=t,i=n,s=(a=rY(r))[o],a[o]=a[i],a[i]=s,a;var o,i,a,s}),m(i[t]),y(e.target.value)},value:b,children:D.map(function(e,t){return(!e.active||e.dimension===b)&&(0,le.jsx)(ud,{value:e.dimension,children:e.title},t)})})]})}),(0,le.jsx)("div",{className:"dashboard-filter-panel-popup-filter-dropdown",children:(0,le.jsxs)(fs,{sx:{m:1,width:"100%"},size:"small",children:[(0,le.jsx)(Ms,{id:"filter-input-label-".concat(h.dimension,"-condition"),sx:{fontSize:"var(--font-size-md, 14px)"},children:"Condition"}),(0,le.jsx)(Au,{disabled:d,labelId:"filter-input-label-".concat(h.dimension,"-condition"),value:x,onChange:function(e){C([]),m(tY(tY({},h),{},{currentOperator:e.target.value,currentValues:[]})),s(function(t){return t.map(function(t){return t.dimension===b&&(t.currentOperator=e.target.value),t}),t})},input:(0,le.jsx)(Ou,{id:"select-multiple-condition-".concat(h.dimension),label:"Condition",sx:{fontSize:"var(--font-size-md, 14px)"}}),children:Object.keys(h.operators).map(function(e,t){return(0,le.jsx)(ud,{value:e,children:h.operators[e].title},t)})})]})}),(0,le.jsx)("div",{className:"dashboard-filter-panel-popup-filter-dropdown",children:I?(0,le.jsx)(Yq,{subFieldType:h.subFieldType,isRange:V,value:k,onChange:B,disabled:d},"".concat(b,"-").concat(x)):(0,le.jsx)(Zq,{dimension:h.dimension,title:h.title,value:k,filterValues:j,isMultiSelect:$,onChange:B,disabled:d,isLoading:N})}),(0,le.jsxs)("div",{children:[c&&(0,le.jsx)("button",{onClick:function(){return!d&&(T(!P),void(c&&c(h)))},className:"dashboard-filter-panel-popup-filter-option-action-button",children:(0,le.jsx)(Le,{content:d?"Filter is disabled":P?"Unlock filter":"Lock filter",side:"bottom",children:d?(0,le.jsx)(dd,{size:20,color:"#9e9e9e",strokeWidth:2}):P?(0,le.jsx)(dd,{size:20}):(0,le.jsx)(fd,{size:20})})}),(0,le.jsx)("button",{className:"dashboard-filter-panel-popup-filter-option-action-button",onClick:function(){return!d&&z(h.dimension)},children:(0,le.jsx)(Le,{content:d?"Filter is disabled":"Remove filter",side:"bottom",children:d?(0,le.jsx)(pd,{size:18,color:"#9e9e9e",strokeWidth:2,"aria-hidden":!0}):(0,le.jsx)(pd,{size:18,"aria-hidden":!0})})})]})]})})};const lY=Ce("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);function cY(e){return function(e){if(Array.isArray(e))return uY(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return uY(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?uY(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function uY(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function dY(e){return dY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dY(e)}function fY(e){return function(e){if(Array.isArray(e))return bY(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||gY(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function hY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pY(Object(n),!0).forEach(function(t){mY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function mY(e,t,n){return(t=function(e){var t=function(e){if("object"!=dY(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=dY(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==dY(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gY(e,t){if(e){if("string"==typeof e)return bY(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?bY(e,t):void 0}}function bY(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var yY=function(e){var t,n,r=e.title,o=void 0===r?"Global Filters":r,i=e.filters,a=e.onClose,s=e.refetchData,l=e.lockFilter,c=e.chartFilters,u=e.systemFilters,d=e.filterValuesQuery,f=(0,G.useState)(function(e,t){if(!t)return e;var n=t.map(function(e){return e.field}),r=e.filter(function(e){return n.includes(e.dimension)}),o=e.filter(function(e){return!n.includes(e.dimension)});return[].concat(cY(r),cY(o))}(c?i.map(function(e){var t=c.find(function(t){return t.dimension===e.dimension});return t?hY(hY({},e),{},{active:!0,currentOperator:t.currentOperator,currentValues:t.currentValues}):hY({},e)}):structuredClone(i),u)),p=(n=2,function(e){if(Array.isArray(e))return e}(t=f)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,n)||gY(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),h=p[0],m=p[1],g=(0,G.useRef)(null);return(0,G.useEffect)(function(){g.current&&g.current.scrollIntoView({behavior:"instant",block:"end"})},[h]),(0,le.jsxs)(ut,{onClose:function(){a()},title:o,children:[(0,le.jsxs)("div",{className:"dashboard-filter-panel-popup-filter-options",children:[h.map(function(e,t){var n=null==u?void 0:u.find(function(t){return t.field===e.dimension});return e.active&&(0,le.jsx)(sY,{filter:e,filters:i,filterCache:h,updateFilters:m,lockFilter:l,isDisabled:!!n,filterValuesQuery:d},t)}),(0,le.jsxs)("div",{onClick:function(){m(function(e){var t=fY(e),n=t.findIndex(function(e){return!e.active});-1!==n&&(t[n]=hY(hY({},t[n]),{},{active:!0}));var r=t.splice(n,1);return t.push(r[0]),t})},className:"dashboard-filter-panel-popup-add-button",children:[(0,le.jsx)(Le,{content:"Add filter",side:"bottom",children:(0,le.jsx)(lY,{size:20,"aria-hidden":!0})}),"Filter"]}),(0,le.jsx)("div",{ref:g})]}),(0,le.jsxs)("div",{className:"dashboard-filter-panel-popup-button-container",children:[(0,le.jsx)("button",{className:be()("dashboard-filter-panel-popup-button","dashboard-filter-panel-popup-button__cancel"),onClick:function(){a()},children:"Cancel"}),(0,le.jsx)("button",{className:be()("dashboard-filter-panel-popup-button","dashboard-filter-panel-popup-button__clear-all"),onClick:function(){m(function(e){return e.map(function(e){return(null==u?void 0:u.find(function(t){return t.field===e.dimension}))||(e.currentValues=[],e.currentOperator=""),e}),fY(e)})},children:"Clear All"}),(0,le.jsx)("button",{className:be()("dashboard-filter-panel-popup-button","dashboard-filter-panel-popup-button__save-changes"),onClick:function(){m(function(e){var t=e.map(function(e){return 0===e.currentValues.length&&(e.active=!1),e});return t}),s(h),a()},children:"Apply Filters"})]})]})};function vY(e){return vY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vY(e)}function xY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function wY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xY(Object(n),!0).forEach(function(t){SY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function SY(e,t,n){return(t=function(e){var t=function(e){if("object"!=vY(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=vY(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==vY(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kY(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return CY(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?CY(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function CY(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var MY=Fe(function(e){var t=e.onClick;return(0,le.jsx)("div",{onClick:function(){return t(!0)},children:(0,le.jsx)("div",{className:"dashboard-filter-panel-edit-button-text",children:"Edit"})})}),PY=Fe(mL),TY=Fe(function(e){var t=e.activeFilters;return(0,le.jsxs)("div",{className:be()("dashboard-filter-panel-filters-icon",{"dashboard-filter-panel-filters-icon__active":t&&t.length>0}),children:[(0,le.jsx)(Me,{size:18}),t?t.length:0]})}),OY=function(e){var t=e.updateActiveFilters,n=e.filtersUrl,r=e.activeFilters,o=e.queryClient,i=e.filterValuesQuery,a=qe({queryKey:["globalFilters"],queryFn:function(){return lt(n)}}),s=a.data,l=a.isLoading,c=fe(),u=kY((0,G.useState)(!1),2),d=u[0],f=u[1],p=kY((0,G.useState)(null),2),h=p[0],m=p[1];return(0,G.useEffect)(function(){s&&Array.isArray(s.filters)&&(t(s.filters.filter(function(e){return e.active})),m(s.filters))},[s]),l||c?(0,le.jsx)("div",{className:"dashboard-filter-panel-loading",children:(0,le.jsx)($f,{})}):(0,le.jsxs)("div",{className:be()("dashboard-filter-panel",{"dashboard-filter-panel__inactive":!r||0===r.length}),children:[(0,le.jsxs)("div",{className:"dashboard-filter-panel__content",children:[(0,le.jsx)(TY,{content:null!=r&&r.length?"Filters applied: ".concat(r.length):"No filters applied",side:"bottom",activeFilters:null!=r?r:void 0}),r&&0!==r.length?(0,le.jsxs)(le.Fragment,{children:[(0,le.jsx)("div",{className:"dashboard-filter-panel-status__active",children:"Filters Applied:"}),r.map(function(e,t){return t>2?null:t>1?(0,le.jsx)(PY,{label:"+ ".concat(r.length-2),className:be()("dashboard-filter-panel-filters-icon","dashboard-filter-panel-filters-icon__active"),content:null!=r&&r.length?(0,le.jsx)("div",{children:r.map(function(e){return(0,le.jsxs)("div",{children:[e.title,":"," ",yf(e.currentValues,e.subFieldType)]},e.title)})}):"",side:"bottom"},t):(0,le.jsxs)("span",{className:"dashboard-filter-panel__filter-option",children:[(0,le.jsx)("span",{className:"dashboard-filter-panel__filter-option__active",children:e.title+": "}),e.currentValues&&yf(e.currentValues,e.subFieldType)]},t)})]}):(0,le.jsx)(le.Fragment,{children:(0,le.jsx)("div",{className:"dashboard-filter-panel-status__inactive",children:"No Filters Applied..."})})]}),(0,le.jsx)("div",{className:"dashboard-filter-panel-edit-button",children:(0,le.jsx)(MY,{onClick:f,content:"Edit Filter",side:"bottom"})}),d&&h&&(0,le.jsx)(yY,{filters:h,onClose:function(){return f(!1)},refetchData:function(e){t(Array.isArray(e)?e.filter(function(e){return e.active}):[]),o.setQueryData(["globalFilters"],function(t){return t?wY(wY({},t),{},{filters:e}):t}),m(e)},filterValuesQuery:i})]})},jY=a(9258),_Y={};function DY(){}function EY(e,{interval:n=1e3,onError:r=DY}={}){if("function"!=typeof e)throw new Error("argument is not function.");let o=0,i=null,a=!1,s=!1;return async(...l)=>{if(i=l,!s){for(s=!0;a;)await new Promise(e=>t.setTimeout(e,n));for(;Date.now()<o;)await new Promise(e=>t.setTimeout(e,o-Date.now()));s=!1,a=!0;try{await e(...i)}catch(e){try{r(e)}catch{}}o=Date.now()+n,a=!1}}}_Y.styleTagTransform=Lf(),_Y.setAttributes=Rf(),_Y.insert=Df().bind(null,"head"),_Y.domAPI=jf(),_Y.insertStyleElement=If(),Tf()(jY.A,_Y),jY.A&&jY.A.locals&&jY.A.locals;const RY=Ce("pencil-off",[["path",{d:"m10 10-6.157 6.162a2 2 0 0 0-.5.833l-1.322 4.36a.5.5 0 0 0 .622.624l4.358-1.323a2 2 0 0 0 .83-.5L14 13.982",key:"bjo8r8"}],["path",{d:"m12.829 7.172 4.359-4.346a1 1 0 1 1 3.986 3.986l-4.353 4.353",key:"16h5ne"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]),AY=Ce("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);function IY(e){return IY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},IY(e)}function FY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function LY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?FY(Object(n),!0).forEach(function(t){NY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function NY(e,t,n){return(t=function(e){var t=function(e){if("object"!=IY(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=IY(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==IY(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zY(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return $Y(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$Y(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $Y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var VY=(0,me.WidthProvider)(me.Responsive),BY=new class{#H;#b;#f;#q;#Y;#U;#G;#X;constructor(e={}){this.#H=e.queryCache||new V,this.#b=e.mutationCache||new W,this.#f=e.defaultOptions||{},this.#q=new Map,this.#Y=new Map,this.#U=0}mount(){this.#U++,1===this.#U&&(this.#G=j.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#H.onFocus())}),this.#X=_.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#H.onOnline())}))}unmount(){this.#U--,0===this.#U&&(this.#G?.(),this.#G=void 0,this.#X?.(),this.#X=void 0)}isFetching(e){return this.#H.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#b.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#H.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#H.build(this,t),r=n.state.data;return void 0===r?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(l(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#H.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=this.#H.get(r.queryHash),i=o?.state.data,a=function(e,t){return"function"==typeof e?e(t):e}(t,i);if(void 0!==a)return this.#H.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return T.batch(()=>this.#H.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#H.get(t.queryHash)?.state}removeQueries(e){const t=this.#H;T.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){const n=this.#H;return T.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},o=T.batch(()=>this.#H.findAll(e).map(e=>e.cancel(n)));return Promise.all(o).then(r).catch(r)}invalidateQueries(e,t={}){return T.batch(()=>(this.#H.findAll(e).forEach(e=>{e.invalidate()}),"none"===e?.refetchType?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},o=T.batch(()=>this.#H.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(r)),"paused"===e.state.fetchStatus?Promise.resolve():t}));return Promise.all(o).then(r)}fetchQuery(e){const t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);const n=this.#H.build(this,t);return n.isStaleByTime(l(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(r).catch(r)}fetchInfiniteQuery(e){return e.behavior=q(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(r).catch(r)}ensureInfiniteQueryData(e){return e.behavior=q(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return _.isOnline()?this.#b.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#H}getMutationCache(){return this.#b}getDefaultOptions(){return this.#f}setDefaultOptions(e){this.#f=e}setQueryDefaults(e,t){this.#q.set(p(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#q.values()],n={};return t.forEach(t=>{h(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#Y.set(p(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#Y.values()],n={};return t.forEach(t=>{h(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#f.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=f(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===C&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#f.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#H.clear(),this.#b.clear()}}({defaultOptions:{queries:{gcTime:0,staleTime:0,refetchOnWindowFocus:!1,refetchOnMount:!1}}}),WY=function(e){var t=e.dashboardConfigJSON,n=e.authToken,r=e.showData,o=(({storage:e,key:t="REACT_QUERY_OFFLINE_CACHE",throttleTime:n=1e3,serialize:r=JSON.stringify,deserialize:o=JSON.parse,retry:i})=>{if(e){const a=async n=>{try{const o=await r(n);return void await e.setItem(t,o)}catch(e){return e}};return{persistClient:EY(async e=>{let t=e,n=await a(t),r=0;for(;n&&t;)r++,t=await(i?.({persistedClient:t,error:n,errorCount:r})),t&&(n=await a(t))},{interval:n}),restoreClient:async()=>{const n=await e.getItem(t);if(n)return await o(n)},removeClient:()=>e.removeItem(t)}}return{persistClient:DY,restoreClient:()=>Promise.resolve(void 0),removeClient:DY}})({storage:window.localStorage}),i=zY((0,G.useState)(!1),2),a=i[0],s=i[1],l=zY((0,G.useState)(null),2),c=l[0],u=l[1],d=JSON.parse(t),f=d.filtersUrl,p=d.filterValuesUrl,h=d.filterableCharts,m=d.filterLayout,g=d.charts,b=d.dashboards,y={url:p,authToken:n};return(0,le.jsx)(he,{client:BY,persistOptions:{persister:o},children:(0,le.jsxs)("div",{className:"dashboard-root",children:[(0,le.jsxs)("div",{className:"dashboard-header",children:[m&&(0,le.jsx)("div",{className:"dashboard-header__filter-panel-container","data-grid":m,children:(0,le.jsx)(OY,{activeFilters:c,updateActiveFilters:u,filtersUrl:f,queryClient:BY,filterValuesQuery:y})},m.i),(0,le.jsx)("div",{className:"dashboard-header__edit-layout-container",children:(0,le.jsx)("button",{onClick:function(){return s(!a)},className:be()("dashboard-edit-layout-button"),children:(0,le.jsx)(Le,{content:a?"Done editing layout":"Edit layout",side:"bottom",children:a?(0,le.jsx)(le.Fragment,{children:(0,le.jsx)(RY,{size:20,"aria-hidden":!0})}):(0,le.jsx)(le.Fragment,{children:(0,le.jsx)(AY,{size:20,"aria-hidden":!0})})})})})]}),(0,le.jsxs)(VY,{"test-id":"dashboard",className:"dashboard",maxHeight:"100%",breakpoints:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:{lg:12,md:12,sm:6,xs:4,xxs:2},rowHeight:140,maxRows:8,maxWidth:1900,width:"100%",isResizable:!1,draggableHandle:".draggable-handle",resizeHandles:["s","w","e","n","sw","nw","se","ne"],compactType:"vertical",autosize:!1,children:[h&&h.map(function(e){var t;if("queryType"in e.query.params&&"multi"===e.query.params.queryType){var o=e.query.params.queries.map(function(e){return LY(LY({},e),{},{filters:c?PE(c,e.filters):e.filters})});t=LY(LY({},e.query),{},{params:{queries:o}})}else{var i=e.query.params;t=LY(LY({},e.query),{},{params:LY(LY({},e.query.params),{},{filters:c?PE(c,i.filters):i.filters})})}var s=t.authToken?t:LY(LY({},t),{},{authToken:n});return(0,le.jsx)("div",{"data-grid":e.layout,children:(0,le.jsx)(IE,{item:e,editingLayout:a,showData:r,activeFilters:c,queryWithToken:s,filtersUrl:f,filterValuesQuery:y})},e.layout.i)}),g&&g.map(function(e){var t,o=LY(LY({},e.query),{},{params:LY({},e.query.params),authToken:null!==(t=e.query.authToken)&&void 0!==t?t:n});return(0,le.jsx)("div",{className:"dashboard-item","data-grid":e.layout,children:(0,le.jsx)(IE,{item:e,editingLayout:a,showData:r,activeFilters:c,queryWithToken:o,filtersUrl:f,filterValuesQuery:y})},e.layout.i)}),b&&b.map(function(e,t){return(0,le.jsx)("div",{"data-grid":e.dashboardLayout,children:(0,le.jsx)(WY,{dashboardConfigJSON:JSON.stringify(e),authToken:n})},t)})]})]})})}})(),s})());
|