local-operator-ui 0.31.12 → 0.31.13
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/out/renderer/assets/{_basePickBy-BmRJBnL9.js → _basePickBy-DjjQEvSb.js} +1 -1
- package/out/renderer/assets/{_baseUniq-7Lo40p8f.js → _baseUniq-BqECYZsi.js} +1 -1
- package/out/renderer/assets/{agent-details-page-Dr0_4VXU.js → agent-details-page-DWSkiNxw.js} +2 -2
- package/out/renderer/assets/agent-hub-page-D_c8J10-.js +6 -0
- package/out/renderer/assets/{agents-page-CfRvRbxk.js → agents-page-GjfdafAi.js} +2 -2
- package/out/renderer/assets/{arc-BzsVSHwA.js → arc-DLAhhRoh.js} +1 -1
- package/out/renderer/assets/{architectureDiagram-IEHRJDOE-Bw5-VATM.js → architectureDiagram-IEHRJDOE-Dz9DJe6U.js} +1 -1
- package/out/renderer/assets/{blockDiagram-JOT3LUYC-BGagYddg.js → blockDiagram-JOT3LUYC-B1abEmJ8.js} +1 -1
- package/out/renderer/assets/{book-open-6gMxcFCn.js → book-open-4wp9tz_T.js} +1 -1
- package/out/renderer/assets/browser-page-O2yUi_D9.js +1 -0
- package/out/renderer/assets/{browser-webauthn-prompt-7nbHSC-s.js → browser-webauthn-prompt-DIxt4Z0f.js} +1 -1
- package/out/renderer/assets/{c4Diagram-VJAJSXHY-baq7nLZj.js → c4Diagram-VJAJSXHY-DFUTE5Ky.js} +1 -1
- package/out/renderer/assets/channel-DwtjXPiQ.js +1 -0
- package/out/renderer/assets/{chunk-4BMEZGHF-g1gXYo4V.js → chunk-4BMEZGHF-BwRplWr0.js} +1 -1
- package/out/renderer/assets/{chunk-A2AXSNBT--A5WU7y8.js → chunk-A2AXSNBT-CojVy5BF.js} +1 -1
- package/out/renderer/assets/{chunk-AEK57VVT-DzJ3UVbN.js → chunk-AEK57VVT-BbTJ2nr6.js} +1 -1
- package/out/renderer/assets/{chunk-D6G4REZN-C-t_FTD9.js → chunk-D6G4REZN-Rb5cgSb4.js} +1 -1
- package/out/renderer/assets/{chunk-RZ5BOZE2-BYlLeO8W.js → chunk-RZ5BOZE2-B04F7M_0.js} +1 -1
- package/out/renderer/assets/{chunk-XZIHB7SX-lFzFuHTM.js → chunk-XZIHB7SX-tjI4W2Za.js} +1 -1
- package/out/renderer/assets/classDiagram-GIVACNV2-I8f9T0d1.js +1 -0
- package/out/renderer/assets/classDiagram-v2-COTLJTTW-I8f9T0d1.js +1 -0
- package/out/renderer/assets/clone-WON5xoYU.js +1 -0
- package/out/renderer/assets/{console-mirror-Dw_ms9Pv.js → console-mirror-Cp8JlE_x.js} +1 -1
- package/out/renderer/assets/{consoleCapture-BSLdNXhT.js → consoleCapture-BuuG2eYo.js} +1 -1
- package/out/renderer/assets/{dagre-OKDRZEBW-BVSzUiqR.js → dagre-OKDRZEBW-Yr1p9tqE.js} +1 -1
- package/out/renderer/assets/{diagram-SSKATNLV-B2vAnmRK.js → diagram-SSKATNLV-CUK31Gls.js} +1 -1
- package/out/renderer/assets/{diagram-VNBRO52H-DWMJqgBu.js → diagram-VNBRO52H-DIjVl2yr.js} +1 -1
- package/out/renderer/assets/{erDiagram-Q7BY3M3F-CUzlaIt5.js → erDiagram-Q7BY3M3F-DfFyzWJt.js} +1 -1
- package/out/renderer/assets/{error-boundary-CAHYSCjh.js → error-boundary-BxKgKUoO.js} +1 -1
- package/out/renderer/assets/{flowDiagram-4HSFHLVR-DD5CmZz9.js → flowDiagram-4HSFHLVR-DcwqvGRJ.js} +1 -1
- package/out/renderer/assets/{ganttDiagram-APWFNJXF-C1VcnkEW.js → ganttDiagram-APWFNJXF-CYwBjlHW.js} +1 -1
- package/out/renderer/assets/{gitGraphDiagram-7IBYFJ6S-hEwYc4s_.js → gitGraphDiagram-7IBYFJ6S-Do6CcWt4.js} +1 -1
- package/out/renderer/assets/{graph-iFEIY46g.js → graph-CQQogzkE.js} +1 -1
- package/out/renderer/assets/{index-BZY6SC3C.js → index-BGpQvlC-.js} +393 -393
- package/out/renderer/assets/{index-Ci5ykqkd.js → index-Biw7WGBF.js} +5 -5
- package/out/renderer/assets/{index-Dws1_64y.js → index-BwDDMKpx.js} +1 -1
- package/out/renderer/assets/index-C9VwzLl-.css +1 -0
- package/out/renderer/assets/{index-xYgenPjE.js → index-Go5S7QEQ.js} +1 -1
- package/out/renderer/assets/{infoDiagram-PH2N3AL5-Fb3LRSKa.js → infoDiagram-PH2N3AL5-DO8p7Ibe.js} +1 -1
- package/out/renderer/assets/{installer-CzcDRHum.js → installer-iwJK_r4X.js} +1 -1
- package/out/renderer/assets/{journeyDiagram-U35MCT3I-CQoYP1F8.js → journeyDiagram-U35MCT3I-BzyoDXz6.js} +1 -1
- package/out/renderer/assets/{kanban-definition-NDS4AKOZ-CteRmk-W.js → kanban-definition-NDS4AKOZ-C5KJJD3f.js} +1 -1
- package/out/renderer/assets/{layout-DYvIW0gu.js → layout-DBWsZr1z.js} +1 -1
- package/out/renderer/assets/{legacy-agents-page-1fM02PQU.js → legacy-agents-page-BDjH2h53.js} +1 -1
- package/out/renderer/assets/{mermaid.core-CF1Z-P7X.js → mermaid.core-DjEcfQ2P.js} +5 -5
- package/out/renderer/assets/{mesh-page-DI8M-fjS.js → mesh-page-sfL6urAN.js} +1 -1
- package/out/renderer/assets/{mindmap-definition-ALO5MXBD-DndDQMdO.js → mindmap-definition-ALO5MXBD-DbBMNkp2.js} +1 -1
- package/out/renderer/assets/{org-surface-gate-BfrGIWSX.js → org-surface-gate-BDsBqFdT.js} +1 -1
- package/out/renderer/assets/{page-header-DuARVVAM.js → page-header-7eTvlPad.js} +1 -1
- package/out/renderer/assets/{pieDiagram-IB7DONF6-CBrJnfZ7.js → pieDiagram-IB7DONF6-BOUMap4K.js} +1 -1
- package/out/renderer/assets/projects-page-CjiztSuz.js +11 -0
- package/out/renderer/assets/{quadrantDiagram-7GDLP6J5-BVP2IC46.js → quadrantDiagram-7GDLP6J5-KVdqTwJk.js} +1 -1
- package/out/renderer/assets/{radar-MK3ICKWK-DjZTeeh9.js → radar-MK3ICKWK-CTQEOe3H.js} +1 -1
- package/out/renderer/assets/{radient-auth-buttons-D7orNp3U.js → radient-auth-buttons-BazI7e18.js} +1 -1
- package/out/renderer/assets/{requirementDiagram-KVF5MWMF-lJJAXVZZ.js → requirementDiagram-KVF5MWMF-CpsfwkBd.js} +1 -1
- package/out/renderer/assets/{sankeyDiagram-QLVOVGJD-LQXNh0UX.js → sankeyDiagram-QLVOVGJD-2Z-78WfE.js} +1 -1
- package/out/renderer/assets/{schedules-page-CtMM9uV6.js → schedules-page-Ban3orsO.js} +2 -2
- package/out/renderer/assets/{sequenceDiagram-X6HHIX6F-1jw8SEPO.js → sequenceDiagram-X6HHIX6F-C2dIRuZz.js} +1 -1
- package/out/renderer/assets/{settings-page-DRypESjz.js → settings-page-DhuCeNKV.js} +1 -1
- package/out/renderer/assets/{settings-section-j4eB5zEy.js → settings-section-JVdUSFVI.js} +1 -1
- package/out/renderer/assets/{stateDiagram-DGXRK772-B0lcRZrZ.js → stateDiagram-DGXRK772-soqNXJ79.js} +1 -1
- package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-Bn8yI4B0.js +1 -0
- package/out/renderer/assets/{timeline-definition-BDJGKUSR-TbB_U2GW.js → timeline-definition-BDJGKUSR-DFPF4fnf.js} +1 -1
- package/out/renderer/assets/{use-download-agent-mutation-BdgO7Jmf.js → use-download-agent-mutation-BJVETEyg.js} +1 -1
- package/out/renderer/assets/{use-memberships-query-f3E2Ca39.js → use-memberships-query-CIdgBOGr.js} +1 -1
- package/out/renderer/assets/{xychartDiagram-VJFVF3MP-CGIvaGsN.js → xychartDiagram-VJFVF3MP---VkBu3L.js} +1 -1
- package/out/renderer/console-capture.html +4 -4
- package/out/renderer/index.html +5 -5
- package/out/renderer/installer.html +4 -4
- package/package.json +2 -2
- package/out/renderer/assets/agent-hub-page-CWhlINHl.js +0 -6
- package/out/renderer/assets/browser-page-B6fHPjNZ.js +0 -1
- package/out/renderer/assets/channel-DwqaTZnF.js +0 -1
- package/out/renderer/assets/classDiagram-GIVACNV2-D8nKB_Ad.js +0 -1
- package/out/renderer/assets/classDiagram-v2-COTLJTTW-D8nKB_Ad.js +0 -1
- package/out/renderer/assets/clone-C2OvbMzz.js +0 -1
- package/out/renderer/assets/index-DLdCxgd4.css +0 -1
- package/out/renderer/assets/projects-page-MsZOyOOD.js +0 -11
- package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-BfR0vu7W.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as p,h as Ni,j as u,i as Ai,k as Cu,s as Zs,f as ns,e as ae,l as Su,b as Mt,m as le,n as Ie,o as Js,p as $i,q as os,c as je}from"./index-
|
|
1
|
+
import{r as p,h as Ni,j as u,i as Ai,k as Cu,s as Zs,f as ns,e as ae,l as Su,b as Mt,m as le,n as Ie,o as Js,p as $i,q as os,c as je}from"./index-Biw7WGBF.js";import{dC as ku,dD as Pu,dE as rs,dF as Mu,dG as Du,dH as Li,dI as Tu,dJ as Iu,dK as Ru,dL as ji,dM as Eu,dN as Vi,dO as Dt,dP as vo,dQ as ss,be as Wn,h as as,g as _n,as as xo,dR as is,k as Fo,dS as Ou,dT as Bi,dU as Fu,dV as ro,dW as Pr,dX as Nu,dY as Au,dZ as $u,d_ as D,d$ as Lu,e0 as wt,e1 as wo,e2 as Wi,e3 as _i,e4 as ju,e5 as Vu,cs as Bu,aB as zi,e6 as Wu,aC as Hi,au as _u,ac as Ui,ad as Sn,av as Yi,aw as zu,bf as Hu,j as qi,e7 as Uu,P as Ar,at as kn,cN as Yu,e8 as qu,i as Ku,b_ as Gu,ca as Qu}from"./index-BGpQvlC-.js";import{P as Xu}from"./page-header-7eTvlPad.js";import{c as Zu,a4 as No,a5 as Ju,f as qt,B as bt,S as ls,$ as ea,L as gt,T as Ki,I as qo,p as bn,q as yn,r as vn,s as xn,t as Je,a2 as $r,P as ed,a0 as td,_ as nd,Q as od,e as rd,X as sd,A as ta}from"./error-boundary-BxKgKUoO.js";import{b as sr,s as Lr,g as ad,c as Ko,d as Gi,e as Qi,h as id,l as jr,j as ld,w as na,k as cd,i as to,f as ud,m as dd,p as oa}from"./parseISO-BWtr7JL9.js";import{t as we,c as st,d as Xi,f as Zi,n as ar,g as cs,k as pd,a as Ji,e as el}from"./en-US-BkS8Ixxl.js";import"./console-mirror-Cp8JlE_x.js";/**
|
|
2
2
|
* @license lucide-react v0.507.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -117,4 +117,4 @@ import{r as p,h as Ni,j as u,i as Ai,k as Cu,s as Zs,f as ns,e as ae,l as Su,b a
|
|
|
117
117
|
`:null,Yb=e=>{const{classes:t,variant:n,color:o,disableShrink:r}=e,s={root:["root",n,`color${le(o)}`],svg:["svg"],circle:["circle",`circle${le(n)}`,r&&"circleDisableShrink"]};return Ee(s,zb,t)},qb=V("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${le(n.color)}`]]}})(Be(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:Hb||{animation:`${Zr} 1.4s linear infinite`}},...Object.entries(e.palette).filter(ct()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),Kb=V("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),Gb=V("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${le(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(Be(({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:t})=>t.variant==="indeterminate"&&!t.disableShrink,style:Ub||{animation:`${Jr} 1.4s ease-in-out infinite`}}]}))),fc=p.forwardRef(function(t,n){const o=Fe({props:t,name:"MuiCircularProgress"}),{className:r,color:s="primary",disableShrink:a=!1,size:i=40,style:l,thickness:c=3.6,value:d=0,variant:m="indeterminate",...y}=o,h={...o,color:s,disableShrink:a,size:i,thickness:c,value:d,variant:m},g=Yb(h),v={},f={},b={};if(m==="determinate"){const C=2*Math.PI*((Ht-c)/2);v.strokeDasharray=C.toFixed(3),b["aria-valuenow"]=Math.round(d),v.strokeDashoffset=`${((100-d)/100*C).toFixed(3)}px`,f.transform="rotate(-90deg)"}return u.jsx(qb,{className:ae(g.root,r),style:{width:i,height:i,...f,...l},ownerState:h,ref:n,role:"progressbar",...b,...y,children:u.jsx(Kb,{className:g.svg,ownerState:h,viewBox:`${Ht/2} ${Ht/2} ${Ht} ${Ht}`,children:u.jsx(Gb,{className:g.circle,style:v,ownerState:h,cx:Ht,cy:Ht,r:(Ht-c)/2,fill:"none",strokeWidth:c})})})});function Qb(e){return Re("MuiButton",e)}const Xt=Se("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"]),Xb=p.createContext({}),Zb=p.createContext(void 0),Jb=e=>{const{color:t,disableElevation:n,fullWidth:o,size:r,variant:s,loading:a,loadingPosition:i,classes:l}=e,c={root:["root",a&&"loading",s,`${s}${le(t)}`,`size${le(r)}`,`${s}Size${le(r)}`,`color${le(t)}`,n&&"disableElevation",o&&"fullWidth",a&&`loadingPosition${le(i)}`],startIcon:["icon","startIcon",`iconSize${le(r)}`],endIcon:["icon","endIcon",`iconSize${le(r)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},d=Ee(c,Qb,l);return{...l,...d}},mc=[{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}}}],ey=V(Ln,{shouldForwardProp:e=>Ct(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${le(n.color)}`],t[`size${le(n.size)}`],t[`${n.variant}Size${le(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(Be(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode==="light"?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"},[`&.${Xt.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]},[`&.${Xt.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${Xt.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)",[`&.${Xt.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(ct()).map(([o])=>({props:{color:o},style:{"--variant-textColor":(e.vars||e).palette[o].main,"--variant-outlinedColor":(e.vars||e).palette[o].main,"--variant-outlinedBorder":e.vars?`rgba(${e.vars.palette[o].mainChannel} / 0.5)`:Ie(e.palette[o].main,.5),"--variant-containedColor":(e.vars||e).palette[o].contrastText,"--variant-containedBg":(e.vars||e).palette[o].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[o].dark,"--variant-textBg":e.vars?`rgba(${e.vars.palette[o].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Ie(e.palette[o].main,e.palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[o].main,"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette[o].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Ie(e.palette[o].main,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.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Ie(e.palette.text.primary,e.palette.action.hoverOpacity),"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Ie(e.palette.text.primary,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"},[`&.${Xt.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Xt.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}),[`&.${Xt.loading}`]:{color:"transparent"}}}]}})),ty=V("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${le(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}},...mc]})),ny=V("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${le(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}},...mc]})),oy=V("span",{name:"MuiButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.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}}]})),Za=V("span",{name:"MuiButton",slot:"LoadingIconPlaceholder",overridesResolver:(e,t)=>t.loadingIconPlaceholder})({display:"inline-block",width:"1em",height:"1em"}),Ut=p.forwardRef(function(t,n){const o=p.useContext(Xb),r=p.useContext(Zb),s=Vi(o,t),a=Fe({props:s,name:"MuiButton"}),{children:i,color:l="primary",component:c="button",className:d,disabled:m=!1,disableElevation:y=!1,disableFocusRipple:h=!1,endIcon:g,focusVisibleClassName:v,fullWidth:f=!1,id:b,loading:C=null,loadingIndicator:w,loadingPosition:x="center",size:k="medium",startIcon:P,type:S,variant:I="text",...T}=a,O=Co(b),N=w??u.jsx(fc,{"aria-labelledby":O,color:"inherit",size:16}),M={...a,color:l,component:c,disabled:m,disableElevation:y,disableFocusRipple:h,fullWidth:f,loading:C,loadingIndicator:N,loadingPosition:x,size:k,type:S,variant:I},L=Jb(M),A=(P||C&&x==="start")&&u.jsx(ty,{className:L.startIcon,ownerState:M,children:P||u.jsx(Za,{className:L.loadingIconPlaceholder,ownerState:M})}),F=(g||C&&x==="end")&&u.jsx(ny,{className:L.endIcon,ownerState:M,children:g||u.jsx(Za,{className:L.loadingIconPlaceholder,ownerState:M})}),E=r||"",B=typeof C=="boolean"?u.jsx("span",{className:L.loadingWrapper,style:{display:"contents"},children:C&&u.jsx(oy,{className:L.loadingIndicator,ownerState:M,children:N})}):null;return u.jsxs(ey,{ownerState:M,className:ae(o.className,L.root,d,E),component:c,disabled:m||C,focusRipple:!h,focusVisibleClassName:ae(L.focusVisible,v),ref:n,type:S,id:C?O:b,...T,classes:L,children:[A,x!=="end"&&B,i,x==="end"&&B,F]})});function ry(e){return Re("MuiDialogActions",e)}Se("MuiDialogActions",["root","spacing"]);const sy=e=>{const{classes:t,disableSpacing:n}=e;return Ee({root:["root",!n&&"spacing"]},ry,t)},ay=V("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}}}]}),iy=p.forwardRef(function(t,n){const o=Fe({props:t,name:"MuiDialogActions"}),{className:r,disableSpacing:s=!1,...a}=o,i={...o,disableSpacing:s},l=sy(i);return u.jsx(ay,{className:ae(l.root,r),ownerState:i,ref:n,...a})}),ly=["actions"],cy=V(iy,{name:"MuiPickersLayout",slot:"ActionBar"})({});function uy(e){const{actions:t}=e,n=me(e,ly),o=lt(),{clearValue:r,setValueToToday:s,acceptValueChanges:a,cancelValueChanges:i,goToNextStep:l,hasNextStep:c}=pn();if(t==null||t.length===0)return null;const d=t?.map(m=>{switch(m){case"clear":return u.jsx(Ut,{onClick:r,children:o.clearButtonLabel},m);case"cancel":return u.jsx(Ut,{onClick:i,children:o.cancelButtonLabel},m);case"accept":return u.jsx(Ut,{onClick:a,children:o.okButtonLabel},m);case"today":return u.jsx(Ut,{onClick:s,children:o.todayButtonLabel},m);case"next":return u.jsx(Ut,{onClick:l,children:o.nextStepButtonLabel},m);case"nextOrAccept":return c?u.jsx(Ut,{onClick:l,children:o.nextStepButtonLabel},m):u.jsx(Ut,{onClick:a,children:o.okButtonLabel},m);default:return null}});return u.jsx(cy,R({},n,{children:d}))}const dy=p.memo(uy),an=p.createContext({});function py(e){return Re("MuiList",e)}Se("MuiList",["root","padding","dense","subheader"]);const fy=e=>{const{classes:t,disablePadding:n,dense:o,subheader:r}=e;return Ee({root:["root",!n&&"padding",o&&"dense",r&&"subheader"]},py,t)},my=V("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),hc=p.forwardRef(function(t,n){const o=Fe({props:t,name:"MuiList"}),{children:r,className:s,component:a="ul",dense:i=!1,disablePadding:l=!1,subheader:c,...d}=o,m=p.useMemo(()=>({dense:i}),[i]),y={...o,component:a,dense:i,disablePadding:l},h=fy(y);return u.jsx(an.Provider,{value:m,children:u.jsxs(my,{as:a,className:ae(h.root,s),ref:n,ownerState:y,...d,children:[c,r]})})});function go(e){return typeof e=="string"}function hy(e){return Re("MuiListItem",e)}Se("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);const gy=Se("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function by(e){return Re("MuiListItemSecondaryAction",e)}Se("MuiListItemSecondaryAction",["root","disableGutters"]);const yy=e=>{const{disableGutters:t,classes:n}=e;return Ee({root:["root",t&&"disableGutters"]},by,n)},vy=V("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}}]}),gc=p.forwardRef(function(t,n){const o=Fe({props:t,name:"MuiListItemSecondaryAction"}),{className:r,...s}=o,a=p.useContext(an),i={...o,disableGutters:a.disableGutters},l=yy(i);return u.jsx(vy,{className:ae(l.root,r),ownerState:i,ref:n,...s})});gc.muiName="ListItemSecondaryAction";const xy=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.hasSecondaryAction&&t.secondaryAction]},wy=e=>{const{alignItems:t,classes:n,dense:o,disableGutters:r,disablePadding:s,divider:a,hasSecondaryAction:i}=e;return Ee({root:["root",o&&"dense",!r&&"gutters",!s&&"padding",a&&"divider",t==="flex-start"&&"alignItemsFlexStart",i&&"secondaryAction"],container:["container"]},hy,n)},Cy=V("div",{name:"MuiListItem",slot:"Root",overridesResolver:xy})(Be(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",variants:[{props:({ownerState:t})=>!t.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:t})=>!t.disablePadding&&t.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:t})=>!t.disablePadding&&!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>!t.disablePadding&&!!t.secondaryAction,style:{paddingRight:48}},{props:({ownerState:t})=>!!t.secondaryAction,style:{[`& > .${gy.root}`]:{paddingRight:48}}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>t.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:t})=>t.hasSecondaryAction,style:{paddingRight:48}}]}))),Sy=V("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),ky=p.forwardRef(function(t,n){const o=Fe({props:t,name:"MuiListItem"}),{alignItems:r="center",children:s,className:a,component:i,components:l={},componentsProps:c={},ContainerComponent:d="li",ContainerProps:{className:m,...y}={},dense:h=!1,disableGutters:g=!1,disablePadding:v=!1,divider:f=!1,secondaryAction:b,slotProps:C={},slots:w={},...x}=o,k=p.useContext(an),P=p.useMemo(()=>({dense:h||k.dense||!1,alignItems:r,disableGutters:g}),[r,k.dense,h,g]),S=p.useRef(null),I=p.Children.toArray(s),T=I.length&&zo(I[I.length-1],["ListItemSecondaryAction"]),O={...o,alignItems:r,dense:P.dense,disableGutters:g,disablePadding:v,divider:f,hasSecondaryAction:T},N=wy(O),M=Ze(S,n),L=w.root||l.Root||Cy,A=C.root||c.root||{},F={className:ae(N.root,A.className,a),...x};let E=i||"li";return T?(E=!F.component&&!i?"div":E,d==="li"&&(E==="li"?E="div":F.component==="li"&&(F.component="div")),u.jsx(an.Provider,{value:P,children:u.jsxs(Sy,{as:d,className:ae(N.container,m),ref:M,ownerState:O,...y,children:[u.jsx(L,{...A,...!go(L)&&{as:E,ownerState:{...O,...A.ownerState}},...F,children:I}),I.pop()]})})):u.jsx(an.Provider,{value:P,children:u.jsxs(L,{...A,as:E,ref:M,...!go(L)&&{ownerState:{...O,...A.ownerState}},...F,children:[I,b&&u.jsx(gc,{children:b})]})})}),Py=$t(u.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"}),"Cancel");function My(e){return Re("MuiChip",e)}const ke=Se("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"]),Dy=e=>{const{classes:t,disabled:n,size:o,color:r,iconColor:s,onDelete:a,clickable:i,variant:l}=e,c={root:["root",l,n&&"disabled",`size${le(o)}`,`color${le(r)}`,i&&"clickable",i&&`clickableColor${le(r)}`,a&&"deletable",a&&`deletableColor${le(r)}`,`${l}${le(r)}`],label:["label",`label${le(o)}`],avatar:["avatar",`avatar${le(o)}`,`avatarColor${le(r)}`],icon:["icon",`icon${le(o)}`,`iconColor${le(s)}`],deleteIcon:["deleteIcon",`deleteIcon${le(o)}`,`deleteIconColor${le(r)}`,`deleteIcon${le(l)}Color${le(r)}`]};return Ee(c,My,t)},Ty=V("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:o,iconColor:r,clickable:s,onDelete:a,size:i,variant:l}=n;return[{[`& .${ke.avatar}`]:t.avatar},{[`& .${ke.avatar}`]:t[`avatar${le(i)}`]},{[`& .${ke.avatar}`]:t[`avatarColor${le(o)}`]},{[`& .${ke.icon}`]:t.icon},{[`& .${ke.icon}`]:t[`icon${le(i)}`]},{[`& .${ke.icon}`]:t[`iconColor${le(r)}`]},{[`& .${ke.deleteIcon}`]:t.deleteIcon},{[`& .${ke.deleteIcon}`]:t[`deleteIcon${le(i)}`]},{[`& .${ke.deleteIcon}`]:t[`deleteIconColor${le(o)}`]},{[`& .${ke.deleteIcon}`]:t[`deleteIcon${le(l)}Color${le(o)}`]},t.root,t[`size${le(i)}`],t[`color${le(o)}`],s&&t.clickable,s&&o!=="default"&&t[`clickableColor${le(o)})`],a&&t.deletable,a&&o!=="default"&&t[`deletableColor${le(o)}`],t[l],t[`${l}${le(o)}`]]}})(Be(({theme:e})=>{const t=e.palette.mode==="light"?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,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,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",[`&.${ke.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${ke.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${ke.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${ke.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${ke.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${ke.icon}`]:{marginLeft:5,marginRight:-6},[`& .${ke.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:Ie(e.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:Ie(e.palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${ke.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${ke.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(ct(["contrastText"])).map(([n])=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText,[`& .${ke.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[n].contrastTextChannel} / 0.7)`:Ie(e.palette[n].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].contrastText}}}})),{props:n=>n.iconColor===n.color,style:{[`& .${ke.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:n=>n.iconColor===n.color&&n.color!=="default",style:{[`& .${ke.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${ke.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Ie(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}},...Object.entries(e.palette).filter(ct(["dark"])).map(([n])=>({props:{color:n,onDelete:!0},style:{[`&.${ke.focusVisible}`]:{background:(e.vars||e).palette[n].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Ie(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${ke.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Ie(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter(ct(["dark"])).map(([n])=>({props:{color:n,clickable:!0},style:{[`&:hover, &.${ke.focusVisible}`]:{backgroundColor:(e.vars||e).palette[n].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${ke.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${ke.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${ke.avatar}`]:{marginLeft:4},[`& .${ke.avatarSmall}`]:{marginLeft:2},[`& .${ke.icon}`]:{marginLeft:4},[`& .${ke.iconSmall}`]:{marginLeft:2},[`& .${ke.deleteIcon}`]:{marginRight:5},[`& .${ke.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter(ct()).map(([n])=>({props:{variant:"outlined",color:n},style:{color:(e.vars||e).palette[n].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[n].mainChannel} / 0.7)`:Ie(e.palette[n].main,.7)}`,[`&.${ke.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[n].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Ie(e.palette[n].main,e.palette.action.hoverOpacity)},[`&.${ke.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[n].mainChannel} / ${e.vars.palette.action.focusOpacity})`:Ie(e.palette[n].main,e.palette.action.focusOpacity)},[`& .${ke.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[n].mainChannel} / 0.7)`:Ie(e.palette[n].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].main}}}}))]}})),Iy=V("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:o}=n;return[t.label,t[`label${le(o)}`]]}})({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 Ja(e){return e.key==="Backspace"||e.key==="Delete"}const Ry=p.forwardRef(function(t,n){const o=Fe({props:t,name:"MuiChip"}),{avatar:r,className:s,clickable:a,color:i="default",component:l,deleteIcon:c,disabled:d=!1,icon:m,label:y,onClick:h,onDelete:g,onKeyDown:v,onKeyUp:f,size:b="medium",variant:C="filled",tabIndex:w,skipFocusWhenDisabled:x=!1,...k}=o,P=p.useRef(null),S=Ze(P,n),I=$=>{$.stopPropagation(),g&&g($)},T=$=>{$.currentTarget===$.target&&Ja($)&&$.preventDefault(),v&&v($)},O=$=>{$.currentTarget===$.target&&g&&Ja($)&&g($),f&&f($)},N=a!==!1&&h?!0:a,M=N||g?Ln:l||"div",L={...o,component:M,disabled:d,size:b,color:i,iconColor:p.isValidElement(m)&&m.props.color||i,onDelete:!!g,clickable:N,variant:C},A=Dy(L),F=M===Ln?{component:l||"div",focusVisibleClassName:A.focusVisible,...g&&{disableRipple:!0}}:{};let E=null;g&&(E=c&&p.isValidElement(c)?p.cloneElement(c,{className:ae(c.props.className,A.deleteIcon),onClick:I}):u.jsx(Py,{className:ae(A.deleteIcon),onClick:I}));let B=null;r&&p.isValidElement(r)&&(B=p.cloneElement(r,{className:ae(A.avatar,r.props.className)}));let G=null;return m&&p.isValidElement(m)&&(G=p.cloneElement(m,{className:ae(A.icon,m.props.className)})),u.jsxs(Ty,{as:M,className:ae(A.root,s),disabled:N&&d?!0:void 0,onClick:h,onKeyDown:T,onKeyUp:O,ref:S,tabIndex:x&&d?-1:w,ownerState:L,...F,...k,children:[B||G,u.jsx(Iy,{className:ae(A.label),ownerState:L,children:y}),E]})}),bo=36,hr=2,gr=320,Ey=280,$s=336,bc=232,Oy=48,Fy=["items","changeImportance"],Ny=["getValue"],Ay=V(hc,{name:"MuiPickersLayout",slot:"Shortcuts"})({});function $y(e){const{items:t,changeImportance:n="accept"}=e,o=me(e,Fy),{setValue:r}=Dh(),s=uh();if(t==null||t.length===0)return null;const a=t.map(i=>{let{getValue:l}=i,c=me(i,Ny);const d=l({isValid:s});return R({},c,{label:c.label,onClick:()=>{r(d,{changeImportance:n,shortcut:c})},disabled:!s(d)})});return u.jsx(Ay,R({dense:!0,sx:[{maxHeight:$s,maxWidth:200,overflow:"auto"},...Array.isArray(o.sx)?o.sx:[o.sx]]},o,{children:a.map(i=>u.jsx(ky,{children:u.jsx(Ry,R({},i))},i.id??i.label))}))}const Ly=["ownerState"];function jy(e){return e.view!==null}const Vy=(e,t)=>{const{pickerOrientation:n}=t;return Oe({root:["root",n==="landscape"&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},pc,e)},By=e=>{const{ownerState:t,defaultActionBarActions:n}=ze(),{view:o}=pn(),r=wt(),{children:s,slots:a,slotProps:i,classes:l}=e,c=p.useMemo(()=>R({},t,{layoutDirection:r?"rtl":"ltr"}),[t,r]),d=Vy(l,c),m=a?.actionBar??dy,y=Ae({elementType:m,externalSlotProps:i?.actionBar,additionalProps:{actions:n},className:d.actionBar,ownerState:c}),h=me(y,Ly),g=u.jsx(m,R({},h)),v=a?.toolbar,f=Ae({elementType:v,externalSlotProps:i?.toolbar,className:d.toolbar,ownerState:c}),b=jy(f)&&v?u.jsx(v,R({},f)):null,C=s,w=a?.tabs,x=o&&w?u.jsx(w,R({className:d.tabs},i?.tabs)):null,k=a?.shortcuts??$y,P=Ae({elementType:k,externalSlotProps:i?.shortcuts,className:d.shortcuts,ownerState:c}),S=o&&k?u.jsx(k,R({},P)):null;return{toolbar:b,content:C,tabs:x,actionBar:g,shortcuts:S,ownerState:c}},Wy=(e,t)=>{const{pickerOrientation:n}=t;return Oe({root:["root",n==="landscape"&&"landscape"],contentWrapper:["contentWrapper"]},pc,e)},_y=V("div",{name:"MuiPickersLayout",slot:"Root"})({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${Qt.actionBar}`]:{gridColumn:"1 / 4",gridRow:3},variants:[{props:{pickerOrientation:"landscape"},style:{[`& .${Qt.toolbar}`]:{gridColumn:1,gridRow:"2 / 3"},[`.${Qt.shortcuts}`]:{gridColumn:"2 / 4",gridRow:1}}},{props:{pickerOrientation:"landscape",layoutDirection:"rtl"},style:{[`& .${Qt.toolbar}`]:{gridColumn:3}}},{props:{pickerOrientation:"portrait"},style:{[`& .${Qt.toolbar}`]:{gridColumn:"2 / 4",gridRow:1},[`& .${Qt.shortcuts}`]:{gridColumn:1,gridRow:"2 / 3"}}},{props:{pickerOrientation:"portrait",layoutDirection:"rtl"},style:{[`& .${Qt.shortcuts}`]:{gridColumn:3}}}]}),zy=V("div",{name:"MuiPickersLayout",slot:"ContentWrapper"})({gridColumn:"2 / 4",gridRow:2,display:"flex",flexDirection:"column"}),yc=p.forwardRef(function(t,n){const o=De({props:t,name:"MuiPickersLayout"}),{toolbar:r,content:s,tabs:a,actionBar:i,shortcuts:l,ownerState:c}=By(o),{orientation:d,variant:m}=pn(),{sx:y,className:h,classes:g}=o,v=Wy(g,c);return u.jsxs(_y,{ref:n,sx:y,className:ae(v.root,h),ownerState:c,children:[d==="landscape"?l:r,d==="landscape"?r:l,u.jsx(zy,{className:v.contentWrapper,ownerState:c,children:m==="desktop"?u.jsxs(p.Fragment,{children:[s,a]}):u.jsxs(p.Fragment,{children:[a,s]})}),i]})});function $o(e){return parseInt(e,10)||0}const Hy={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function Uy(e){for(const t in e)return!1;return!0}function ei(e){return Uy(e)||e.outerHeightStyle===0&&!e.overflowing}const Yy=p.forwardRef(function(t,n){const{onChange:o,maxRows:r,minRows:s=1,style:a,value:i,...l}=t,{current:c}=p.useRef(i!=null),d=p.useRef(null),m=Ze(n,d),y=p.useRef(null),h=p.useRef(null),g=p.useCallback(()=>{const w=d.current,x=h.current;if(!w||!x)return;const P=Vt(w).getComputedStyle(w);if(P.width==="0px")return{outerHeightStyle:0,overflowing:!1};x.style.width=P.width,x.value=w.value||t.placeholder||"x",x.value.slice(-1)===`
|
|
118
118
|
`&&(x.value+=" ");const S=P.boxSizing,I=$o(P.paddingBottom)+$o(P.paddingTop),T=$o(P.borderBottomWidth)+$o(P.borderTopWidth),O=x.scrollHeight;x.value="x";const N=x.scrollHeight;let M=O;s&&(M=Math.max(Number(s)*N,M)),r&&(M=Math.min(Number(r)*N,M)),M=Math.max(M,N);const L=M+(S==="border-box"?I+T:0),A=Math.abs(M-O)<=1;return{outerHeightStyle:L,overflowing:A}},[r,s,t.placeholder]),v=rn(()=>{const w=d.current,x=g();if(!w||!x||ei(x))return!1;const k=x.outerHeightStyle;return y.current!=null&&y.current!==k}),f=p.useCallback(()=>{const w=d.current,x=g();if(!w||!x||ei(x))return;const k=x.outerHeightStyle;y.current!==k&&(y.current=k,w.style.height=`${k}px`),w.style.overflow=x.overflowing?"hidden":""},[g]),b=p.useRef(-1);Dt(()=>{const w=al(f),x=d?.current;if(!x)return;const k=Vt(x);k.addEventListener("resize",w);let P;return typeof ResizeObserver<"u"&&(P=new ResizeObserver(()=>{v()&&(P.unobserve(x),cancelAnimationFrame(b.current),f(),b.current=requestAnimationFrame(()=>{P.observe(x)}))}),P.observe(x)),()=>{w.clear(),cancelAnimationFrame(b.current),k.removeEventListener("resize",w),P&&P.disconnect()}},[g,f,v]),Dt(()=>{f()});const C=w=>{c||f(),o&&o(w)};return u.jsxs(p.Fragment,{children:[u.jsx("textarea",{value:i,onChange:C,ref:m,rows:s,style:a,...l}),u.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:h,tabIndex:-1,style:{...Hy.shadow,...a,paddingTop:0,paddingBottom:0}})]})});function Hn({props:e,states:t,muiFormControl:n}){return t.reduce((o,r)=>(o[r]=e[r],n&&typeof e[r]>"u"&&(o[r]=n[r]),o),{})}const br=p.createContext(void 0);function _t(){return p.useContext(br)}function ti(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function or(e,t=!1){return e&&(ti(e.value)&&e.value!==""||t&&ti(e.defaultValue)&&e.defaultValue!=="")}function qy(e){return e.startAdornment}function Ky(e){return Re("MuiInputBase",e)}const jn=Se("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var ni;const yr=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${le(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},vr=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},Gy=e=>{const{classes:t,color:n,disabled:o,error:r,endAdornment:s,focused:a,formControl:i,fullWidth:l,hiddenLabel:c,multiline:d,readOnly:m,size:y,startAdornment:h,type:g}=e,v={root:["root",`color${le(n)}`,o&&"disabled",r&&"error",l&&"fullWidth",a&&"focused",i&&"formControl",y&&y!=="medium"&&`size${le(y)}`,d&&"multiline",h&&"adornedStart",s&&"adornedEnd",c&&"hiddenLabel",m&&"readOnly"],input:["input",o&&"disabled",g==="search"&&"inputTypeSearch",d&&"inputMultiline",y==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",h&&"inputAdornedStart",s&&"inputAdornedEnd",m&&"readOnly"]};return Ee(v,Ky,t)},xr=V("div",{name:"MuiInputBase",slot:"Root",overridesResolver:yr})(Be(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${jn.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:t})=>t.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:t,size:n})=>t.multiline&&n==="small",style:{paddingTop:1}},{props:({ownerState:t})=>t.fullWidth,style:{width:"100%"}}]}))),wr=V("input",{name:"MuiInputBase",slot:"Input",overridesResolver:vr})(Be(({theme:e})=>{const t=e.palette.mode==="light",n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},o={opacity:"0 !important"},r=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${jn.formControl} &`]:{"&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&::-ms-input-placeholder":o,"&:focus::-webkit-input-placeholder":r,"&:focus::-moz-placeholder":r,"&:focus::-ms-input-placeholder":r},[`&.${jn.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:s})=>!s.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:s})=>s.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),oi=eh({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),Ls=p.forwardRef(function(t,n){const o=Fe({props:t,name:"MuiInputBase"}),{"aria-describedby":r,autoComplete:s,autoFocus:a,className:i,color:l,components:c={},componentsProps:d={},defaultValue:m,disabled:y,disableInjectingGlobalStyles:h,endAdornment:g,error:v,fullWidth:f=!1,id:b,inputComponent:C="input",inputProps:w={},inputRef:x,margin:k,maxRows:P,minRows:S,multiline:I=!1,name:T,onBlur:O,onChange:N,onClick:M,onFocus:L,onKeyDown:A,onKeyUp:F,placeholder:E,readOnly:B,renderSuffix:G,rows:$,size:Z,slotProps:W={},slots:ne={},startAdornment:te,type:se="text",value:U,...oe}=o,ce=w.value!=null?w.value:U,{current:fe}=p.useRef(ce!=null),re=p.useRef(),Q=p.useCallback(he=>{},[]),_=Ze(re,x,w.ref,Q),[q,X]=p.useState(!1),K=_t(),ue=Hn({props:o,muiFormControl:K,states:["color","disabled","error","hiddenLabel","size","required","filled"]});ue.focused=K?K.focused:q,p.useEffect(()=>{!K&&y&&q&&(X(!1),O&&O())},[K,y,q,O]);const J=K&&K.onFilled,Y=K&&K.onEmpty,ee=p.useCallback(he=>{or(he)?J&&J():Y&&Y()},[J,Y]);Dt(()=>{fe&&ee({value:ce})},[ce,ee,fe]);const ie=he=>{L&&L(he),w.onFocus&&w.onFocus(he),K&&K.onFocus?K.onFocus(he):X(!0)},z=he=>{O&&O(he),w.onBlur&&w.onBlur(he),K&&K.onBlur?K.onBlur(he):X(!1)},j=(he,...Ne)=>{if(!fe){const Ue=he.target||re.current;if(Ue==null)throw new Error($i(1));ee({value:Ue.value})}w.onChange&&w.onChange(he,...Ne),N&&N(he,...Ne)};p.useEffect(()=>{ee(re.current)},[]);const H=he=>{re.current&&he.currentTarget===he.target&&re.current.focus(),M&&M(he)};let ge=C,ye=w;I&&ge==="input"&&($?ye={type:void 0,minRows:$,maxRows:$,...ye}:ye={type:void 0,maxRows:P,minRows:S,...ye},ge=Yy);const Le=he=>{ee(he.animationName==="mui-auto-fill-cancel"?re.current:{value:"x"})};p.useEffect(()=>{K&&K.setAdornedStart(!!te)},[K,te]);const Pe={...o,color:ue.color||"primary",disabled:ue.disabled,endAdornment:g,error:ue.error,focused:ue.focused,formControl:K,fullWidth:f,hiddenLabel:ue.hiddenLabel,multiline:I,size:ue.size,startAdornment:te,type:se},_e=Gy(Pe),qe=ne.root||c.Root||xr,be=W.root||d.root||{},ve=ne.input||c.Input||wr;return ye={...ye,...W.input??d.input},u.jsxs(p.Fragment,{children:[!h&&typeof oi=="function"&&(ni||(ni=u.jsx(oi,{}))),u.jsxs(qe,{...be,ref:n,onClick:H,...oe,...!go(qe)&&{ownerState:{...Pe,...be.ownerState}},className:ae(_e.root,be.className,i,B&&"MuiInputBase-readOnly"),children:[te,u.jsx(br.Provider,{value:null,children:u.jsx(ve,{"aria-invalid":ue.error,"aria-describedby":r,autoComplete:s,autoFocus:a,defaultValue:m,disabled:ue.disabled,id:b,onAnimationStart:Le,name:T,placeholder:E,readOnly:B,required:ue.required,rows:$,value:ce,onKeyDown:A,onKeyUp:F,type:se,...ye,...!go(ve)&&{as:ge,ownerState:{...Pe,...ye.ownerState}},ref:_,className:ae(_e.input,ye.className,B&&"MuiInputBase-readOnly"),onBlur:z,onChange:j,onFocus:ie})}),g,G?G({...ue,startAdornment:te}):null]})]})});function Qy(e){return Re("MuiInput",e)}const qn={...jn,...Se("MuiInput",["root","underline","input"])},Xy=e=>{const{classes:t,disableUnderline:n}=e,r=Ee({root:["root",!n&&"underline"],input:["input"]},Qy,t);return{...t,...r}},Zy=V(xr,{shouldForwardProp:e=>Ct(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...yr(e,t),!n.disableUnderline&&t.underline]}})(Be(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{position:"relative",variants:[{props:({ownerState:o})=>o.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:o})=>!o.disableUnderline,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"},[`&.${qn.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${qn.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${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(.${qn.disabled}, .${qn.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${qn.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(ct()).map(([o])=>({props:{color:o,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[o].main}`}}}))]}})),Jy=V(wr,{name:"MuiInput",slot:"Input",overridesResolver:vr})({}),js=p.forwardRef(function(t,n){const o=Fe({props:t,name:"MuiInput"}),{disableUnderline:r=!1,components:s={},componentsProps:a,fullWidth:i=!1,inputComponent:l="input",multiline:c=!1,slotProps:d,slots:m={},type:y="text",...h}=o,g=Xy(o),f={root:{ownerState:{disableUnderline:r}}},b=d??a?os(d??a,f):f,C=m.root??s.Root??Zy,w=m.input??s.Input??Jy;return u.jsx(Ls,{slots:{root:C,input:w},slotProps:b,fullWidth:i,inputComponent:l,multiline:c,ref:n,type:y,...h,classes:g})});js.muiName="Input";function ev(e){return Re("MuiFilledInput",e)}const Zt={...jn,...Se("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},tv=e=>{const{classes:t,disableUnderline:n,startAdornment:o,endAdornment:r,size:s,hiddenLabel:a,multiline:i}=e,l={root:["root",!n&&"underline",o&&"adornedStart",r&&"adornedEnd",s==="small"&&`size${le(s)}`,a&&"hiddenLabel",i&&"multiline"],input:["input"]},c=Ee(l,ev,t);return{...t,...c}},nv=V(xr,{shouldForwardProp:e=>Ct(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...yr(e,t),!n.disableUnderline&&t.underline]}})(Be(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",o=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",r=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",s=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o,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:r,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o}},[`&.${Zt.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o},[`&.${Zt.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:s},variants:[{props:({ownerState:a})=>!a.disableUnderline,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"},[`&.${Zt.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Zt.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(.${Zt.disabled}, .${Zt.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Zt.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(ct()).map(([a])=>({props:{disableUnderline:!1,color:a},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[a]?.main}`}}})),{props:({ownerState:a})=>a.startAdornment,style:{paddingLeft:12}},{props:({ownerState:a})=>a.endAdornment,style:{paddingRight:12}},{props:({ownerState:a})=>a.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:a,size:i})=>a.multiline&&i==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel&&a.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),ov=V(wr,{name:"MuiFilledInput",slot:"Input",overridesResolver:vr})(Be(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:t})=>t.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}},{props:({ownerState:t})=>t.hiddenLabel&&t.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:t})=>t.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),Vs=p.forwardRef(function(t,n){const o=Fe({props:t,name:"MuiFilledInput"}),{disableUnderline:r=!1,components:s={},componentsProps:a,fullWidth:i=!1,hiddenLabel:l,inputComponent:c="input",multiline:d=!1,slotProps:m,slots:y={},type:h="text",...g}=o,v={...o,disableUnderline:r,fullWidth:i,inputComponent:c,multiline:d,type:h},f=tv(o),b={root:{ownerState:v},input:{ownerState:v}},C=m??a?os(b,m??a):b,w=y.root??s.Root??nv,x=y.input??s.Input??ov;return u.jsx(Ls,{slots:{root:w,input:x},slotProps:C,fullWidth:i,inputComponent:c,multiline:d,ref:n,type:h,...g,classes:f})});Vs.muiName="Input";var ri;const rv=V("fieldset",{shouldForwardProp:Ct})({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%"}),sv=V("legend",{shouldForwardProp:Ct})(Be(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:t})=>!t.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:t})=>t.withLabel,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:({ownerState:t})=>t.withLabel&&t.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function av(e){const{children:t,classes:n,className:o,label:r,notched:s,...a}=e,i=r!=null&&r!=="",l={...e,notched:s,withLabel:i};return u.jsx(rv,{"aria-hidden":!0,className:o,ownerState:l,...a,children:u.jsx(sv,{ownerState:l,children:i?u.jsx("span",{children:r}):ri||(ri=u.jsx("span",{className:"notranslate","aria-hidden":!0,children:""}))})})}function iv(e){return Re("MuiOutlinedInput",e)}const It={...jn,...Se("MuiOutlinedInput",["root","notchedOutline","input"])},lv=e=>{const{classes:t}=e,o=Ee({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},iv,t);return{...t,...o}},cv=V(xr,{shouldForwardProp:e=>Ct(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:yr})(Be(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${It.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${It.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${It.focused} .${It.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(ct()).map(([n])=>({props:{color:n},style:{[`&.${It.focused} .${It.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}})),{props:{},style:{[`&.${It.error} .${It.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${It.disabled} .${It.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:n})=>n.startAdornment,style:{paddingLeft:14}},{props:({ownerState:n})=>n.endAdornment,style:{paddingRight:14}},{props:({ownerState:n})=>n.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:n,size:o})=>n.multiline&&o==="small",style:{padding:"8.5px 14px"}}]}})),uv=V(av,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(Be(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}})),dv=V(wr,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:vr})(Be(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:t})=>t.multiline,style:{padding:0}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}}]}))),Bs=p.forwardRef(function(t,n){var o;const r=Fe({props:t,name:"MuiOutlinedInput"}),{components:s={},fullWidth:a=!1,inputComponent:i="input",label:l,multiline:c=!1,notched:d,slots:m={},type:y="text",...h}=r,g=lv(r),v=_t(),f=Hn({props:r,muiFormControl:v,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),b={...r,color:f.color||"primary",disabled:f.disabled,error:f.error,focused:f.focused,formControl:v,fullWidth:a,hiddenLabel:f.hiddenLabel,multiline:c,size:f.size,type:y},C=m.root??s.Root??cv,w=m.input??s.Input??dv;return u.jsx(Ls,{slots:{root:C,input:w},renderSuffix:x=>u.jsx(uv,{ownerState:b,className:g.notchedOutline,label:l!=null&&l!==""&&f.required?o||(o=u.jsxs(p.Fragment,{children:[l," ","*"]})):l,notched:typeof d<"u"?d:!!(x.startAdornment||x.filled||x.focused)}),fullWidth:a,inputComponent:i,multiline:c,ref:n,type:y,...h,classes:{...g,notchedOutline:null}})});Bs.muiName="Input";function pv(e){return Re("MuiFormLabel",e)}const io=Se("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),fv=e=>{const{classes:t,color:n,focused:o,disabled:r,error:s,filled:a,required:i}=e,l={root:["root",`color${le(n)}`,r&&"disabled",s&&"error",a&&"filled",o&&"focused",i&&"required"],asterisk:["asterisk",s&&"error"]};return Ee(l,pv,t)},mv=V("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color==="secondary"&&t.colorSecondary,n.filled&&t.filled]}})(Be(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter(ct()).map(([t])=>({props:{color:t},style:{[`&.${io.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${io.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${io.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),hv=V("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(Be(({theme:e})=>({[`&.${io.error}`]:{color:(e.vars||e).palette.error.main}}))),gv=p.forwardRef(function(t,n){const o=Fe({props:t,name:"MuiFormLabel"}),{children:r,className:s,color:a,component:i="label",disabled:l,error:c,filled:d,focused:m,required:y,...h}=o,g=_t(),v=Hn({props:o,muiFormControl:g,states:["color","required","focused","disabled","error","filled"]}),f={...o,color:v.color||"primary",component:i,disabled:v.disabled,error:v.error,filled:v.filled,focused:v.focused,required:v.required},b=fv(f);return u.jsxs(mv,{as:i,ownerState:f,className:ae(b.root,s),ref:n,...h,children:[r,v.required&&u.jsxs(hv,{ownerState:f,"aria-hidden":!0,className:b.asterisk,children:[" ","*"]})]})});function bv(e){return Re("MuiInputLabel",e)}Se("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const yv=e=>{const{classes:t,formControl:n,size:o,shrink:r,disableAnimation:s,variant:a,required:i}=e,l={root:["root",n&&"formControl",!s&&"animated",r&&"shrink",o&&o!=="normal"&&`size${le(o)}`,a],asterisk:[i&&"asterisk"]},c=Ee(l,bv,t);return{...t,...c}},vv=V(gv,{shouldForwardProp:e=>Ct(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${io.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size==="small"&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(Be(({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:t})=>t.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:t})=>t.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:t})=>!t.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="filled"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:t,ownerState:n,size:o})=>t==="filled"&&n.shrink&&o==="small",style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="outlined"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),vc=p.forwardRef(function(t,n){const o=Fe({name:"MuiInputLabel",props:t}),{disableAnimation:r=!1,margin:s,shrink:a,variant:i,className:l,...c}=o,d=_t();let m=a;typeof m>"u"&&d&&(m=d.filled||d.focused||d.adornedStart);const y=Hn({props:o,muiFormControl:d,states:["size","variant","required","focused"]}),h={...o,disableAnimation:r,formControl:d,shrink:m,size:y.size,variant:y.variant,required:y.required,focused:y.focused},g=yv(h);return u.jsx(vv,{"data-shrink":m,ref:n,className:ae(g.root,l),...c,ownerState:h,classes:g})});function xv(e){return Re("MuiFormControl",e)}Se("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const wv=e=>{const{classes:t,margin:n,fullWidth:o}=e,r={root:["root",n!=="none"&&`margin${le(n)}`,o&&"fullWidth"]};return Ee(r,xv,t)},Cv=V("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`margin${le(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),xc=p.forwardRef(function(t,n){const o=Fe({props:t,name:"MuiFormControl"}),{children:r,className:s,color:a="primary",component:i="div",disabled:l=!1,error:c=!1,focused:d,fullWidth:m=!1,hiddenLabel:y=!1,margin:h="none",required:g=!1,size:v="medium",variant:f="outlined",...b}=o,C={...o,color:a,component:i,disabled:l,error:c,fullWidth:m,hiddenLabel:y,margin:h,required:g,size:v,variant:f},w=wv(C),[x,k]=p.useState(()=>{let F=!1;return r&&p.Children.forEach(r,E=>{if(!zo(E,["Input","Select"]))return;const B=zo(E,["Select"])?E.props.input:E;B&&qy(B.props)&&(F=!0)}),F}),[P,S]=p.useState(()=>{let F=!1;return r&&p.Children.forEach(r,E=>{zo(E,["Input","Select"])&&(or(E.props,!0)||or(E.props.inputProps,!0))&&(F=!0)}),F}),[I,T]=p.useState(!1);l&&I&&T(!1);const O=d!==void 0&&!l?d:I;let N;p.useRef(!1);const M=p.useCallback(()=>{S(!0)},[]),L=p.useCallback(()=>{S(!1)},[]),A=p.useMemo(()=>({adornedStart:x,setAdornedStart:k,color:a,disabled:l,error:c,filled:P,focused:O,fullWidth:m,hiddenLabel:y,size:v,onBlur:()=>{T(!1)},onFocus:()=>{T(!0)},onEmpty:L,onFilled:M,registerEffect:N,required:g,variant:f}),[x,a,l,c,P,O,m,y,N,L,M,g,v,f]);return u.jsx(br.Provider,{value:A,children:u.jsx(Cv,{as:i,ownerState:C,className:ae(w.root,s),ref:n,...b,children:r})})});function Sv(e){return Re("MuiFormHelperText",e)}const si=Se("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var ai;const kv=e=>{const{classes:t,contained:n,size:o,disabled:r,error:s,filled:a,focused:i,required:l}=e,c={root:["root",r&&"disabled",s&&"error",o&&`size${le(o)}`,n&&"contained",i&&"focused",a&&"filled",l&&"required"]};return Ee(c,Sv,t)},Pv=V("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${le(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(Be(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${si.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${si.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:t})=>t.contained,style:{marginLeft:14,marginRight:14}}]}))),wc=p.forwardRef(function(t,n){const o=Fe({props:t,name:"MuiFormHelperText"}),{children:r,className:s,component:a="p",disabled:i,error:l,filled:c,focused:d,margin:m,required:y,variant:h,...g}=o,v=_t(),f=Hn({props:o,muiFormControl:v,states:["variant","size","disabled","error","filled","focused","required"]}),b={...o,component:a,contained:f.variant==="filled"||f.variant==="outlined",variant:f.variant,size:f.size,disabled:f.disabled,error:f.error,filled:f.filled,focused:f.focused,required:f.required};delete b.ownerState;const C=kv(b);return u.jsx(Pv,{as:a,className:ae(C.root,s),ref:n,...g,ownerState:b,children:r===" "?ai||(ai=u.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):r})});function Er(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function ii(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function Cc(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(""))}function Kn(e,t,n,o,r,s){let a=!1,i=r(e,t,t?n:!1);for(;i;){if(i===e.firstChild){if(a)return!1;a=!0}const l=o?!1:i.disabled||i.getAttribute("aria-disabled")==="true";if(!i.hasAttribute("tabindex")||!Cc(i,s)||l)i=r(e,i,n);else return i.focus(),!0}return!1}const Ws=p.forwardRef(function(t,n){const{actions:o,autoFocus:r=!1,autoFocusItem:s=!1,children:a,className:i,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:d,variant:m="selectedMenu",...y}=t,h=p.useRef(null),g=p.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Dt(()=>{r&&h.current.focus()},[r]),p.useImperativeHandle(o,()=>({adjustStyleForScrollbar:(w,{direction:x})=>{const k=!h.current.style.width;if(w.clientHeight<h.current.clientHeight&&k){const P=`${ul(Vt(w))}px`;h.current.style[x==="rtl"?"paddingLeft":"paddingRight"]=P,h.current.style.width=`calc(100% + ${P})`}return h.current}}),[]);const v=w=>{const x=h.current,k=w.key;if(w.ctrlKey||w.metaKey||w.altKey){d&&d(w);return}const S=ut(x).activeElement;if(k==="ArrowDown")w.preventDefault(),Kn(x,S,c,l,Er);else if(k==="ArrowUp")w.preventDefault(),Kn(x,S,c,l,ii);else if(k==="Home")w.preventDefault(),Kn(x,null,c,l,Er);else if(k==="End")w.preventDefault(),Kn(x,null,c,l,ii);else if(k.length===1){const I=g.current,T=k.toLowerCase(),O=performance.now();I.keys.length>0&&(O-I.lastTime>500?(I.keys=[],I.repeating=!0,I.previousKeyMatched=!0):I.repeating&&T!==I.keys[0]&&(I.repeating=!1)),I.lastTime=O,I.keys.push(T);const N=S&&!I.repeating&&Cc(S,I);I.previousKeyMatched&&(N||Kn(x,S,!1,l,Er,I))?w.preventDefault():I.previousKeyMatched=!1}d&&d(w)},f=Ze(h,n);let b=-1;p.Children.forEach(a,(w,x)=>{if(!p.isValidElement(w)){b===x&&(b+=1,b>=a.length&&(b=-1));return}w.props.disabled||(m==="selectedMenu"&&w.props.selected||b===-1)&&(b=x),b===x&&(w.props.disabled||w.props.muiSkipListHighlight||w.type.muiSkipListHighlight)&&(b+=1,b>=a.length&&(b=-1))});const C=p.Children.map(a,(w,x)=>{if(x===b){const k={};return s&&(k.autoFocus=!0),w.props.tabIndex===void 0&&m==="selectedMenu"&&(k.tabIndex=0),p.cloneElement(w,k)}return w});return u.jsx(hc,{role:"menu",ref:f,className:i,onKeyDown:v,tabIndex:r?0:-1,...y,children:C})});function Mv(e){const t=ut(e);return t.body===e?Vt(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function lo(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function li(e){return parseInt(Vt(e).getComputedStyle(e).paddingRight,10)||0}function Dv(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),o=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||o}function ci(e,t,n,o,r){const s=[t,n,...o];[].forEach.call(e.children,a=>{const i=!s.includes(a),l=!Dv(a);i&&l&&lo(a,r)})}function Or(e,t){let n=-1;return e.some((o,r)=>t(o)?(n=r,!0):!1),n}function Tv(e,t){const n=[],o=e.container;if(!t.disableScrollLock){if(Mv(o)){const a=ul(Vt(o));n.push({value:o.style.paddingRight,property:"padding-right",el:o}),o.style.paddingRight=`${li(o)+a}px`;const i=ut(o).querySelectorAll(".mui-fixed");[].forEach.call(i,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${li(l)+a}px`})}let s;if(o.parentNode instanceof DocumentFragment)s=ut(o).body;else{const a=o.parentElement,i=Vt(o);s=a?.nodeName==="HTML"&&i.getComputedStyle(a).overflowY==="scroll"?a:o}n.push({value:s.style.overflow,property:"overflow",el:s},{value:s.style.overflowX,property:"overflow-x",el:s},{value:s.style.overflowY,property:"overflow-y",el:s}),s.style.overflow="hidden"}return()=>{n.forEach(({value:s,el:a,property:i})=>{s?a.style.setProperty(i,s):a.style.removeProperty(i)})}}function Iv(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class Rv{constructor(){this.modals=[],this.containers=[]}add(t,n){let o=this.modals.indexOf(t);if(o!==-1)return o;o=this.modals.length,this.modals.push(t),t.modalRef&&lo(t.modalRef,!1);const r=Iv(n);ci(n,t.mount,t.modalRef,r,!0);const s=Or(this.containers,a=>a.container===n);return s!==-1?(this.containers[s].modals.push(t),o):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:r}),o)}mount(t,n){const o=Or(this.containers,s=>s.modals.includes(t)),r=this.containers[o];r.restore||(r.restore=Tv(r,n))}remove(t,n=!0){const o=this.modals.indexOf(t);if(o===-1)return o;const r=Or(this.containers,a=>a.modals.includes(t)),s=this.containers[r];if(s.modals.splice(s.modals.indexOf(t),1),this.modals.splice(o,1),s.modals.length===0)s.restore&&s.restore(),t.modalRef&&lo(t.modalRef,n),ci(s.container,t.mount,t.modalRef,s.hiddenSiblings,!1),this.containers.splice(r,1);else{const a=s.modals[s.modals.length-1];a.modalRef&&lo(a.modalRef,!1)}return o}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function Xe(e,t){const{className:n,elementType:o,ownerState:r,externalForwardedProps:s,internalForwardedProps:a,shouldForwardComponentProp:i=!1,...l}=t,{component:c,slots:d={[e]:void 0},slotProps:m={[e]:void 0},...y}=s,h=d[e]||o,g=ml(m[e],r),{props:{component:v,...f},internalRef:b}=fl({className:n,...l,externalForwardedProps:e==="root"?y:void 0,externalSlotProps:g}),C=Ze(b,g?.ref,t.ref),w=e==="root"?v||c:v,x=dl(h,{...e==="root"&&!c&&!d[e]&&a,...e!=="root"&&!d[e]&&a,...f,...w&&!i&&{as:w},...w&&i&&{component:w},ref:C},r);return[h,x]}function Ev(e){return Re("MuiBackdrop",e)}Se("MuiBackdrop",["root","invisible"]);const Ov=e=>{const{classes:t,invisible:n}=e;return Ee({root:["root",n&&"invisible"]},Ev,t)},Fv=V("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),Sc=p.forwardRef(function(t,n){const o=Fe({props:t,name:"MuiBackdrop"}),{children:r,className:s,component:a="div",invisible:i=!1,open:l,components:c={},componentsProps:d={},slotProps:m={},slots:y={},TransitionComponent:h,transitionDuration:g,...v}=o,f={...o,component:a,invisible:i},b=Ov(f),C={transition:h,root:c.Root,...y},w={...d,...m},x={slots:C,slotProps:w},[k,P]=Xe("root",{elementType:Fv,externalForwardedProps:x,className:ae(b.root,s),ownerState:f}),[S,I]=Xe("transition",{elementType:un,externalForwardedProps:x,ownerState:f});return u.jsx(S,{in:l,timeout:g,...v,...I,children:u.jsx(k,{"aria-hidden":!0,...P,classes:b,ref:n,children:r})})});function Nv(e){return typeof e=="function"?e():e}function Av(e){return e?e.props.hasOwnProperty("in"):!1}const ui=()=>{},Lo=new Rv;function $v(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:o=!1,closeAfterTransition:r=!1,onTransitionEnter:s,onTransitionExited:a,children:i,onClose:l,open:c,rootRef:d}=e,m=p.useRef({}),y=p.useRef(null),h=p.useRef(null),g=Ze(h,d),[v,f]=p.useState(!c),b=Av(i);let C=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(C=!1);const w=()=>ut(y.current),x=()=>(m.current.modalRef=h.current,m.current.mount=y.current,m.current),k=()=>{Lo.mount(x(),{disableScrollLock:o}),h.current&&(h.current.scrollTop=0)},P=rn(()=>{const F=Nv(t)||w().body;Lo.add(x(),F),h.current&&k()}),S=()=>Lo.isTopModal(x()),I=rn(F=>{y.current=F,F&&(c&&S()?k():h.current&&lo(h.current,C))}),T=p.useCallback(()=>{Lo.remove(x(),C)},[C]);p.useEffect(()=>()=>{T()},[T]),p.useEffect(()=>{c?P():(!b||!r)&&T()},[c,T,b,r,P]);const O=F=>E=>{F.onKeyDown?.(E),!(E.key!=="Escape"||E.which===229||!S())&&(n||(E.stopPropagation(),l&&l(E,"escapeKeyDown")))},N=F=>E=>{F.onClick?.(E),E.target===E.currentTarget&&l&&l(E,"backdropClick")};return{getRootProps:(F={})=>{const E=pl(e);delete E.onTransitionEnter,delete E.onTransitionExited;const B={...E,...F};return{role:"presentation",...B,onKeyDown:O(B),ref:g}},getBackdropProps:(F={})=>{const E=F;return{"aria-hidden":!0,...E,onClick:N(E),open:c}},getTransitionProps:()=>{const F=()=>{f(!1),s&&s()},E=()=>{f(!0),a&&a(),r&&T()};return{onEnter:ca(F,i?.props.onEnter??ui),onExited:ca(E,i?.props.onExited??ui)}},rootRef:g,portalRef:I,isTopModal:S,exited:v,hasTransition:b}}function Lv(e){return Re("MuiModal",e)}Se("MuiModal",["root","hidden","backdrop"]);const jv=e=>{const{open:t,exited:n,classes:o}=e;return Ee({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},Lv,o)},Vv=V("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(Be(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:t})=>!t.open&&t.exited,style:{visibility:"hidden"}}]}))),Bv=V(Sc,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),kc=p.forwardRef(function(t,n){const o=Fe({name:"MuiModal",props:t}),{BackdropComponent:r=Bv,BackdropProps:s,classes:a,className:i,closeAfterTransition:l=!1,children:c,container:d,component:m,components:y={},componentsProps:h={},disableAutoFocus:g=!1,disableEnforceFocus:v=!1,disableEscapeKeyDown:f=!1,disablePortal:b=!1,disableRestoreFocus:C=!1,disableScrollLock:w=!1,hideBackdrop:x=!1,keepMounted:k=!1,onBackdropClick:P,onClose:S,onTransitionEnter:I,onTransitionExited:T,open:O,slotProps:N={},slots:M={},theme:L,...A}=o,F={...o,closeAfterTransition:l,disableAutoFocus:g,disableEnforceFocus:v,disableEscapeKeyDown:f,disablePortal:b,disableRestoreFocus:C,disableScrollLock:w,hideBackdrop:x,keepMounted:k},{getRootProps:E,getBackdropProps:B,getTransitionProps:G,portalRef:$,isTopModal:Z,exited:W,hasTransition:ne}=$v({...F,rootRef:n}),te={...F,exited:W},se=jv(te),U={};if(c.props.tabIndex===void 0&&(U.tabIndex="-1"),ne){const{onEnter:_,onExited:q}=G();U.onEnter=_,U.onExited=q}const oe={slots:{root:y.Root,backdrop:y.Backdrop,...M},slotProps:{...h,...N}},[ce,fe]=Xe("root",{ref:n,elementType:Vv,externalForwardedProps:{...oe,...A,component:m},getSlotProps:E,ownerState:te,className:ae(i,se?.root,!te.open&&te.exited&&se?.hidden)}),[re,Q]=Xe("backdrop",{ref:s?.ref,elementType:r,externalForwardedProps:oe,shouldForwardComponentProp:!0,additionalProps:s,getSlotProps:_=>B({..._,onClick:q=>{P&&P(q),_?.onClick&&_.onClick(q)}}),className:ae(s?.className,se?.backdrop),ownerState:te});return!k&&!O&&(!ne||W)?null:u.jsx(ac,{ref:$,container:d,disablePortal:b,children:u.jsxs(ce,{...fe,children:[!x&&r?u.jsx(re,{...Q}):null,u.jsx(ic,{disableEnforceFocus:v,disableAutoFocus:g,disableRestoreFocus:C,isEnabled:Z,open:O,children:p.cloneElement(c,U)})]})})});function Wv(e){return Re("MuiPopover",e)}Se("MuiPopover",["root","paper"]);function di(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function pi(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function fi(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function jo(e){return typeof e=="function"?e():e}const _v=e=>{const{classes:t}=e;return Ee({root:["root"],paper:["paper"]},Wv,t)},zv=V(kc,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Pc=V(fr,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),Hv=p.forwardRef(function(t,n){const o=Fe({props:t,name:"MuiPopover"}),{action:r,anchorEl:s,anchorOrigin:a={vertical:"top",horizontal:"left"},anchorPosition:i,anchorReference:l="anchorEl",children:c,className:d,container:m,elevation:y=8,marginThreshold:h=16,open:g,PaperProps:v={},slots:f={},slotProps:b={},transformOrigin:C={vertical:"top",horizontal:"left"},TransitionComponent:w,transitionDuration:x="auto",TransitionProps:k={},disableScrollLock:P=!1,...S}=o,I=p.useRef(),T={...o,anchorOrigin:a,anchorReference:l,elevation:y,marginThreshold:h,transformOrigin:C,TransitionComponent:w,transitionDuration:x,TransitionProps:k},O=_v(T),N=p.useCallback(()=>{if(l==="anchorPosition")return i;const Q=jo(s),q=(Q&&Q.nodeType===1?Q:ut(I.current).body).getBoundingClientRect();return{top:q.top+di(q,a.vertical),left:q.left+pi(q,a.horizontal)}},[s,a.horizontal,a.vertical,i,l]),M=p.useCallback(Q=>({vertical:di(Q,C.vertical),horizontal:pi(Q,C.horizontal)}),[C.horizontal,C.vertical]),L=p.useCallback(Q=>{const _={width:Q.offsetWidth,height:Q.offsetHeight},q=M(_);if(l==="none")return{top:null,left:null,transformOrigin:fi(q)};const X=N();let K=X.top-q.vertical,ue=X.left-q.horizontal;const J=K+_.height,Y=ue+_.width,ee=Vt(jo(s)),ie=ee.innerHeight-h,z=ee.innerWidth-h;if(h!==null&&K<h){const j=K-h;K-=j,q.vertical+=j}else if(h!==null&&J>ie){const j=J-ie;K-=j,q.vertical+=j}if(h!==null&&ue<h){const j=ue-h;ue-=j,q.horizontal+=j}else if(Y>z){const j=Y-z;ue-=j,q.horizontal+=j}return{top:`${Math.round(K)}px`,left:`${Math.round(ue)}px`,transformOrigin:fi(q)}},[s,l,N,M,h]),[A,F]=p.useState(g),E=p.useCallback(()=>{const Q=I.current;if(!Q)return;const _=L(Q);_.top!==null&&Q.style.setProperty("top",_.top),_.left!==null&&(Q.style.left=_.left),Q.style.transformOrigin=_.transformOrigin,F(!0)},[L]);p.useEffect(()=>(P&&window.addEventListener("scroll",E),()=>window.removeEventListener("scroll",E)),[s,P,E]);const B=()=>{E()},G=()=>{F(!1)};p.useEffect(()=>{g&&E()}),p.useImperativeHandle(r,()=>g?{updatePosition:()=>{E()}}:null,[g,E]),p.useEffect(()=>{if(!g)return;const Q=al(()=>{E()}),_=Vt(jo(s));return _.addEventListener("resize",Q),()=>{Q.clear(),_.removeEventListener("resize",Q)}},[s,g,E]);let $=x;const Z={slots:{transition:w,...f},slotProps:{transition:k,paper:v,...b}},[W,ne]=Xe("transition",{elementType:Jo,externalForwardedProps:Z,ownerState:T,getSlotProps:Q=>({...Q,onEntering:(_,q)=>{Q.onEntering?.(_,q),B()},onExited:_=>{Q.onExited?.(_),G()}}),additionalProps:{appear:!0,in:g}});x==="auto"&&!W.muiSupportAuto&&($=void 0);const te=m||(s?ut(jo(s)).body:void 0),[se,{slots:U,slotProps:oe,...ce}]=Xe("root",{ref:n,elementType:zv,externalForwardedProps:{...Z,...S},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:f.backdrop},slotProps:{backdrop:Tb(typeof b.backdrop=="function"?b.backdrop(T):b.backdrop,{invisible:!0})},container:te,open:g},ownerState:T,className:ae(O.root,d)}),[fe,re]=Xe("paper",{ref:I,className:O.paper,elementType:Pc,externalForwardedProps:Z,shouldForwardComponentProp:!0,additionalProps:{elevation:y,style:A?void 0:{opacity:0}},ownerState:T});return u.jsx(se,{...ce,...!go(se)&&{slots:U,slotProps:oe,disableScrollLock:P},children:u.jsx(W,{...ne,timeout:$,children:u.jsx(fe,{...re,children:c})})})});function Uv(e){return Re("MuiMenu",e)}Se("MuiMenu",["root","paper","list"]);const Yv={vertical:"top",horizontal:"right"},qv={vertical:"top",horizontal:"left"},Kv=e=>{const{classes:t}=e;return Ee({root:["root"],paper:["paper"],list:["list"]},Uv,t)},Gv=V(Hv,{shouldForwardProp:e=>Ct(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Qv=V(Pc,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),Xv=V(Ws,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),Zv=p.forwardRef(function(t,n){const o=Fe({props:t,name:"MuiMenu"}),{autoFocus:r=!0,children:s,className:a,disableAutoFocusItem:i=!1,MenuListProps:l={},onClose:c,open:d,PaperProps:m={},PopoverClasses:y,transitionDuration:h="auto",TransitionProps:{onEntering:g,...v}={},variant:f="selectedMenu",slots:b={},slotProps:C={},...w}=o,x=wt(),k={...o,autoFocus:r,disableAutoFocusItem:i,MenuListProps:l,onEntering:g,PaperProps:m,transitionDuration:h,TransitionProps:v,variant:f},P=Kv(k),S=r&&!i&&d,I=p.useRef(null),T=($,Z)=>{I.current&&I.current.adjustStyleForScrollbar($,{direction:x?"rtl":"ltr"}),g&&g($,Z)},O=$=>{$.key==="Tab"&&($.preventDefault(),c&&c($,"tabKeyDown"))};let N=-1;p.Children.map(s,($,Z)=>{p.isValidElement($)&&($.props.disabled||(f==="selectedMenu"&&$.props.selected||N===-1)&&(N=Z))});const M={slots:b,slotProps:{list:l,transition:v,paper:m,...C}},L=hl({elementType:b.root,externalSlotProps:C.root,ownerState:k,className:[P.root,a]}),[A,F]=Xe("paper",{className:P.paper,elementType:Qv,externalForwardedProps:M,shouldForwardComponentProp:!0,ownerState:k}),[E,B]=Xe("list",{className:ae(P.list,l.className),elementType:Xv,shouldForwardComponentProp:!0,externalForwardedProps:M,getSlotProps:$=>({...$,onKeyDown:Z=>{O(Z),$.onKeyDown?.(Z)}}),ownerState:k}),G=typeof M.slotProps.transition=="function"?M.slotProps.transition(k):M.slotProps.transition;return u.jsx(Gv,{onClose:c,anchorOrigin:{vertical:"bottom",horizontal:x?"right":"left"},transformOrigin:x?Yv:qv,slots:{root:b.root,paper:A,backdrop:b.backdrop,...b.transition&&{transition:b.transition}},slotProps:{root:L,paper:F,backdrop:typeof C.backdrop=="function"?C.backdrop(k):C.backdrop,transition:{...G,onEntering:(...$)=>{T(...$),G?.onEntering?.(...$)}}},open:d,ref:n,transitionDuration:h,ownerState:k,...w,classes:y,children:u.jsx(E,{actions:I,autoFocus:r&&(N===-1||i),autoFocusItem:S,variant:f,...B,children:s})})});function Jv(e){return Re("MuiNativeSelect",e)}const _s=Se("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),ex=e=>{const{classes:t,variant:n,disabled:o,multiple:r,open:s,error:a}=e,i={select:["select",n,o&&"disabled",r&&"multiple",a&&"error"],icon:["icon",`icon${le(n)}`,s&&"iconOpen",o&&"disabled"]};return Ee(i,Jv,t)},Mc=V("select")(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${_s.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:t})=>t.variant!=="filled"&&t.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),tx=V(Mc,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Ct,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${_s.multiple}`]:t.multiple}]}})({}),Dc=V("svg")(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${_s.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:t})=>t.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),nx=V(Dc,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${le(n.variant)}`],n.open&&t.iconOpen]}})({}),ox=p.forwardRef(function(t,n){const{className:o,disabled:r,error:s,IconComponent:a,inputRef:i,variant:l="standard",...c}=t,d={...t,disabled:r,variant:l,error:s},m=ex(d);return u.jsxs(p.Fragment,{children:[u.jsx(tx,{ownerState:d,className:ae(m.select,o),disabled:r,ref:i||n,...c}),t.multiple?null:u.jsx(nx,{as:a,ownerState:d,className:m.icon})]})});function Tc(e){return Re("MuiSelect",e)}const Gn=Se("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var mi;const rx=V(Mc,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${Gn.select}`]:t.select},{[`&.${Gn.select}`]:t[n.variant]},{[`&.${Gn.error}`]:t.error},{[`&.${Gn.multiple}`]:t.multiple}]}})({[`&.${Gn.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),sx=V(Dc,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${le(n.variant)}`],n.open&&t.iconOpen]}})({}),ax=V("input",{shouldForwardProp:e=>gl(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function hi(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function ix(e){return e==null||typeof e=="string"&&!e.trim()}const lx=e=>{const{classes:t,variant:n,disabled:o,multiple:r,open:s,error:a}=e,i={select:["select",n,o&&"disabled",r&&"multiple",a&&"error"],icon:["icon",`icon${le(n)}`,s&&"iconOpen",o&&"disabled"],nativeInput:["nativeInput"]};return Ee(i,Tc,t)},cx=p.forwardRef(function(t,n){const{"aria-describedby":o,"aria-label":r,autoFocus:s,autoWidth:a,children:i,className:l,defaultOpen:c,defaultValue:d,disabled:m,displayEmpty:y,error:h=!1,IconComponent:g,inputRef:v,labelId:f,MenuProps:b={},multiple:C,name:w,onBlur:x,onChange:k,onClose:P,onFocus:S,onOpen:I,open:T,readOnly:O,renderValue:N,required:M,SelectDisplayProps:L={},tabIndex:A,type:F,value:E,variant:B="standard",...G}=t,[$,Z]=fa({controlled:E,default:d,name:"Select"}),[W,ne]=fa({controlled:T,default:c,name:"Select"}),te=p.useRef(null),se=p.useRef(null),[U,oe]=p.useState(null),{current:ce}=p.useRef(T!=null),[fe,re]=p.useState(),Q=Ze(n,v),_=p.useCallback(pe=>{se.current=pe,pe&&oe(pe)},[]),q=U?.parentNode;p.useImperativeHandle(Q,()=>({focus:()=>{se.current.focus()},node:te.current,value:$}),[$]),p.useEffect(()=>{c&&W&&U&&!ce&&(re(a?null:q.clientWidth),se.current.focus())},[U,a]),p.useEffect(()=>{s&&se.current.focus()},[s]),p.useEffect(()=>{if(!f)return;const pe=ut(se.current).getElementById(f);if(pe){const Ce=()=>{getSelection().isCollapsed&&se.current.focus()};return pe.addEventListener("click",Ce),()=>{pe.removeEventListener("click",Ce)}}},[f]);const X=(pe,Ce)=>{pe?I&&I(Ce):P&&P(Ce),ce||(re(a?null:q.clientWidth),ne(pe))},K=pe=>{pe.button===0&&(pe.preventDefault(),se.current.focus(),X(!0,pe))},ue=pe=>{X(!1,pe)},J=p.Children.toArray(i),Y=pe=>{const Ce=J.find(Me=>Me.props.value===pe.target.value);Ce!==void 0&&(Z(Ce.props.value),k&&k(pe,Ce))},ee=pe=>Ce=>{let Me;if(Ce.currentTarget.hasAttribute("tabindex")){if(C){Me=Array.isArray($)?$.slice():[];const xe=$.indexOf(pe.props.value);xe===-1?Me.push(pe.props.value):Me.splice(xe,1)}else Me=pe.props.value;if(pe.props.onClick&&pe.props.onClick(Ce),$!==Me&&(Z(Me),k)){const xe=Ce.nativeEvent||Ce,Ke=new xe.constructor(xe.type,xe);Object.defineProperty(Ke,"target",{writable:!0,value:{value:Me,name:w}}),k(Ke,pe)}C||X(!1,Ce)}},ie=pe=>{O||[" ","ArrowUp","ArrowDown","Enter"].includes(pe.key)&&(pe.preventDefault(),X(!0,pe))},z=U!==null&&W,j=pe=>{!z&&x&&(Object.defineProperty(pe,"target",{writable:!0,value:{value:$,name:w}}),x(pe))};delete G["aria-invalid"];let H,ge;const ye=[];let Le=!1;(or({value:$})||y)&&(N?H=N($):Le=!0);const Pe=J.map(pe=>{if(!p.isValidElement(pe))return null;let Ce;if(C){if(!Array.isArray($))throw new Error($i(2));Ce=$.some(Me=>hi(Me,pe.props.value)),Ce&&Le&&ye.push(pe.props.children)}else Ce=hi($,pe.props.value),Ce&&Le&&(ge=pe.props.children);return p.cloneElement(pe,{"aria-selected":Ce?"true":"false",onClick:ee(pe),onKeyUp:Me=>{Me.key===" "&&Me.preventDefault(),pe.props.onKeyUp&&pe.props.onKeyUp(Me)},role:"option",selected:Ce,value:void 0,"data-value":pe.props.value})});Le&&(C?ye.length===0?H=null:H=ye.reduce((pe,Ce,Me)=>(pe.push(Ce),Me<ye.length-1&&pe.push(", "),pe),[]):H=ge);let _e=fe;!a&&ce&&U&&(_e=q.clientWidth);let qe;typeof A<"u"?qe=A:qe=m?null:0;const be=L.id||(w?`mui-component-select-${w}`:void 0),ve={...t,variant:B,value:$,open:z,error:h},he=lx(ve),Ne={...b.PaperProps,...b.slotProps?.paper},Ue=Co();return u.jsxs(p.Fragment,{children:[u.jsx(rx,{as:"div",ref:_,tabIndex:qe,role:"combobox","aria-controls":z?Ue:void 0,"aria-disabled":m?"true":void 0,"aria-expanded":z?"true":"false","aria-haspopup":"listbox","aria-label":r,"aria-labelledby":[f,be].filter(Boolean).join(" ")||void 0,"aria-describedby":o,"aria-required":M?"true":void 0,"aria-invalid":h?"true":void 0,onKeyDown:ie,onMouseDown:m||O?null:K,onBlur:j,onFocus:S,...L,ownerState:ve,className:ae(L.className,he.select,l),id:be,children:ix(H)?mi||(mi=u.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):H}),u.jsx(ax,{"aria-invalid":h,value:Array.isArray($)?$.join(","):$,name:w,ref:te,"aria-hidden":!0,onChange:Y,tabIndex:-1,disabled:m,className:he.nativeInput,autoFocus:s,required:M,...G,ownerState:ve}),u.jsx(sx,{as:g,className:he.icon,ownerState:ve}),u.jsx(Zv,{id:`menu-${w||""}`,anchorEl:q,open:z,onClose:ue,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...b,slotProps:{...b.slotProps,list:{"aria-labelledby":f,role:"listbox","aria-multiselectable":C?"true":void 0,disableListWrap:!0,id:Ue,...b.MenuListProps},paper:{...Ne,style:{minWidth:_e,...Ne!=null?Ne.style:null}}},children:Pe})]})}),ux=$t(u.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),dx=e=>{const{classes:t}=e,o=Ee({root:["root"]},Tc,t);return{...t,...o}},zs={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>Ct(e)&&e!=="variant",slot:"Root"},px=V(js,zs)(""),fx=V(Bs,zs)(""),mx=V(Vs,zs)(""),Ic=p.forwardRef(function(t,n){const o=Fe({name:"MuiSelect",props:t}),{autoWidth:r=!1,children:s,classes:a={},className:i,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:d=ux,id:m,input:y,inputProps:h,label:g,labelId:v,MenuProps:f,multiple:b=!1,native:C=!1,onClose:w,onOpen:x,open:k,renderValue:P,SelectDisplayProps:S,variant:I="outlined",...T}=o,O=C?ox:cx,N=_t(),M=Hn({props:o,muiFormControl:N,states:["variant","error"]}),L=M.variant||I,A={...o,variant:L,classes:a},F=dx(A),{root:E,...B}=F,G=y||{standard:u.jsx(px,{ownerState:A}),outlined:u.jsx(fx,{label:g,ownerState:A}),filled:u.jsx(mx,{ownerState:A})}[L],$=Ze(n,So(G));return u.jsx(p.Fragment,{children:p.cloneElement(G,{inputComponent:O,inputProps:{children:s,error:M.error,IconComponent:d,variant:L,type:void 0,multiple:b,...C?{id:m}:{autoWidth:r,defaultOpen:l,displayEmpty:c,labelId:v,MenuProps:f,onClose:w,onOpen:x,open:k,renderValue:P,SelectDisplayProps:{id:m,...S}},...h,classes:h?os(B,h.classes):B,...y?y.props.inputProps:{}},...(b&&C||c)&&L==="outlined"?{notched:!0}:{},ref:$,className:ae(G.props.className,i,F.root),...!y&&{variant:L},...T})})});Ic.muiName="Select";function hx(e){return Re("MuiTextField",e)}Se("MuiTextField",["root"]);const gx={standard:js,filled:Vs,outlined:Bs},bx=e=>{const{classes:t}=e;return Ee({root:["root"]},hx,t)},yx=V(xc,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),vx=p.forwardRef(function(t,n){const o=Fe({props:t,name:"MuiTextField"}),{autoComplete:r,autoFocus:s=!1,children:a,className:i,color:l="primary",defaultValue:c,disabled:d=!1,error:m=!1,FormHelperTextProps:y,fullWidth:h=!1,helperText:g,id:v,InputLabelProps:f,inputProps:b,InputProps:C,inputRef:w,label:x,maxRows:k,minRows:P,multiline:S=!1,name:I,onBlur:T,onChange:O,onFocus:N,placeholder:M,required:L=!1,rows:A,select:F=!1,SelectProps:E,slots:B={},slotProps:G={},type:$,value:Z,variant:W="outlined",...ne}=o,te={...o,autoFocus:s,color:l,disabled:d,error:m,fullWidth:h,multiline:S,required:L,select:F,variant:W},se=bx(te),U=Co(v),oe=g&&U?`${U}-helper-text`:void 0,ce=x&&U?`${U}-label`:void 0,fe=gx[W],re={slots:B,slotProps:{input:C,inputLabel:f,htmlInput:b,formHelperText:y,select:E,...G}},Q={},_=re.slotProps.inputLabel;W==="outlined"&&(_&&typeof _.shrink<"u"&&(Q.notched=_.shrink),Q.label=x),F&&((!E||!E.native)&&(Q.id=void 0),Q["aria-describedby"]=void 0);const[q,X]=Xe("root",{elementType:yx,shouldForwardComponentProp:!0,externalForwardedProps:{...re,...ne},ownerState:te,className:ae(se.root,i),ref:n,additionalProps:{disabled:d,error:m,fullWidth:h,required:L,color:l,variant:W}}),[K,ue]=Xe("input",{elementType:fe,externalForwardedProps:re,additionalProps:Q,ownerState:te}),[J,Y]=Xe("inputLabel",{elementType:vc,externalForwardedProps:re,ownerState:te}),[ee,ie]=Xe("htmlInput",{elementType:"input",externalForwardedProps:re,ownerState:te}),[z,j]=Xe("formHelperText",{elementType:wc,externalForwardedProps:re,ownerState:te}),[H,ge]=Xe("select",{elementType:Ic,externalForwardedProps:re,ownerState:te}),ye=u.jsx(K,{"aria-describedby":oe,autoComplete:r,autoFocus:s,defaultValue:c,fullWidth:h,multiline:S,name:I,rows:A,maxRows:k,minRows:P,type:$,value:Z,id:U,inputRef:w,onBlur:T,onChange:O,onFocus:N,placeholder:M,inputProps:ie,slots:{input:B.htmlInput?ee:void 0},...ue});return u.jsxs(q,{...X,children:[x!=null&&x!==""&&u.jsx(J,{htmlFor:U,id:ce,...Y,children:x}),F?u.jsx(H,{"aria-describedby":oe,id:U,labelId:ce,value:Z,input:ye,...ge,children:a}):ye,g&&u.jsx(z,{id:oe,...j,children:g})]})});function xx(e){return Re("MuiIconButton",e)}const gi=Se("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),wx=e=>{const{classes:t,disabled:n,color:o,edge:r,size:s,loading:a}=e,i={root:["root",a&&"loading",n&&"disabled",o!=="default"&&`color${le(o)}`,r&&`edge${le(r)}`,`size${le(s)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return Ee(i,xx,t)},Cx=V(Ln,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!=="default"&&t[`color${le(n.color)}`],n.edge&&t[`edge${le(n.edge)}`],t[`size${le(n.size)}`]]}})(Be(({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:t=>!t.disableRipple,style:{"--IconButton-hoverBg":e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Ie(e.palette.action.active,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}}]})),Be(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(ct()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(ct()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.vars?`rgba(${(e.vars||e).palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Ie((e.vars||e).palette[t].main,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)}}],[`&.${gi.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${gi.loading}`]:{color:"transparent"}}))),Sx=V("span",{name:"MuiIconButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.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"}}]})),Vn=p.forwardRef(function(t,n){const o=Fe({props:t,name:"MuiIconButton"}),{edge:r=!1,children:s,className:a,color:i="default",disabled:l=!1,disableFocusRipple:c=!1,size:d="medium",id:m,loading:y=null,loadingIndicator:h,...g}=o,v=Co(m),f=h??u.jsx(fc,{"aria-labelledby":v,color:"inherit",size:16}),b={...o,edge:r,color:i,disabled:l,disableFocusRipple:c,loading:y,loadingIndicator:f,size:d},C=wx(b);return u.jsxs(Cx,{id:y?v:m,className:ae(C.root,a),centerRipple:!0,focusRipple:!c,disabled:l||y,ref:n,...g,ownerState:b,children:[typeof y=="boolean"&&u.jsx("span",{className:C.loadingWrapper,style:{display:"contents"},children:u.jsx(Sx,{className:C.loadingIndicator,ownerState:b,children:y&&f})}),s]})});function kx(e){return Re("MuiInputAdornment",e)}const bi=Se("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var yi;const Px=(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${le(n.position)}`],n.disablePointerEvents===!0&&t.disablePointerEvents,t[n.variant]]},Mx=e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:o,position:r,size:s,variant:a}=e,i={root:["root",n&&"disablePointerEvents",r&&`position${le(r)}`,a,o&&"hiddenLabel",s&&`size${le(s)}`]};return Ee(i,kx,t)},Dx=V("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:Px})(Be(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${bi.positionStart}&:not(.${bi.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),Tx=p.forwardRef(function(t,n){const o=Fe({props:t,name:"MuiInputAdornment"}),{children:r,className:s,component:a="div",disablePointerEvents:i=!1,disableTypography:l=!1,position:c,variant:d,...m}=o,y=_t()||{};let h=d;d&&y.variant,y&&!h&&(h=y.variant);const g={...o,hiddenLabel:y.hiddenLabel,size:y.size,disablePointerEvents:i,position:c,variant:h},v=Mx(g);return u.jsx(br.Provider,{value:null,children:u.jsx(Dx,{as:a,ownerState:g,className:ae(v.root,s),ref:n,...m,children:typeof r=="string"&&!l?u.jsx(Wt,{color:"textSecondary",children:r}):u.jsxs(p.Fragment,{children:[c==="start"?yi||(yi=u.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):null,r]})})})});function Hs(e){const{ownerState:t}=ze(),n=wt();return p.useMemo(()=>R({},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])}const Ix=$t(u.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),Rx=$t(u.jsx("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),Ex=$t(u.jsx("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),Ox=$t(u.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"}),"Calendar"),Fx=$t(u.jsxs(p.Fragment,{children:[u.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"}),u.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock");$t(u.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"}),"DateRange");$t(u.jsxs(p.Fragment,{children:[u.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"}),u.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time");const Nx=$t(u.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"}),"Clear");function Ax(e){return Ve("MuiPickersTextField",e)}We("MuiPickersTextField",["root","focused","disabled","error","required"]);function $x(e){return Ve("MuiPickersInputBase",e)}const Tn=We("MuiPickersInputBase",["root","focused","disabled","error","notchedOutline","sectionContent","sectionBefore","sectionAfter","adornedStart","adornedEnd","input","activeBar"]);function Lx(e){return Ve("MuiPickersSectionList",e)}const Qn=We("MuiPickersSectionList",["root","section","sectionContent"]),jx=["slots","slotProps","elements","sectionListRef","classes"],Rc=V("div",{name:"MuiPickersSectionList",slot:"Root"})({direction:"ltr /*! @noflip */",outline:"none"}),Ec=V("span",{name:"MuiPickersSectionList",slot:"Section"})({}),Oc=V("span",{name:"MuiPickersSectionList",slot:"SectionSeparator"})({whiteSpace:"pre"}),Fc=V("span",{name:"MuiPickersSectionList",slot:"SectionContent"})({outline:"none"}),Vx=e=>Oe({root:["root"],section:["section"],sectionContent:["sectionContent"]},Lx,e);function Bx(e){const{slots:t,slotProps:n,element:o,classes:r}=e,{ownerState:s}=ze(),a=t?.section??Ec,i=Ae({elementType:a,externalSlotProps:n?.section,externalForwardedProps:o.container,className:r.section,ownerState:s}),l=t?.sectionContent??Fc,c=Ae({elementType:l,externalSlotProps:n?.sectionContent,externalForwardedProps:o.content,additionalProps:{suppressContentEditableWarning:!0},className:r.sectionContent,ownerState:s}),d=t?.sectionSeparator??Oc,m=Ae({elementType:d,externalSlotProps:n?.sectionSeparator,externalForwardedProps:o.before,ownerState:R({},s,{separatorPosition:"before"})}),y=Ae({elementType:d,externalSlotProps:n?.sectionSeparator,externalForwardedProps:o.after,ownerState:R({},s,{separatorPosition:"after"})});return u.jsxs(a,R({},i,{children:[u.jsx(d,R({},m)),u.jsx(l,R({},c)),u.jsx(d,R({},y))]}))}const Wx=p.forwardRef(function(t,n){const o=De({props:t,name:"MuiPickersSectionList"}),{slots:r,slotProps:s,elements:a,sectionListRef:i,classes:l}=o,c=me(o,jx),d=Vx(l),{ownerState:m}=ze(),y=p.useRef(null),h=ot(n,y),g=b=>{if(!y.current)throw new Error(`MUI X: Cannot call sectionListRef.${b} before the mount of the component.`);return y.current};p.useImperativeHandle(i,()=>({getRoot(){return g("getRoot")},getSectionContainer(b){return g("getSectionContainer").querySelector(`.${Qn.section}[data-sectionindex="${b}"]`)},getSectionContent(b){return g("getSectionContent").querySelector(`.${Qn.section}[data-sectionindex="${b}"] .${Qn.sectionContent}`)},getSectionIndexFromDOMElement(b){const C=g("getSectionIndexFromDOMElement");if(b==null||!C.contains(b))return null;let w=null;return b.classList.contains(Qn.section)?w=b:b.classList.contains(Qn.sectionContent)&&(w=b.parentElement),w==null?null:Number(w.dataset.sectionindex)}}));const v=r?.root??Rc,f=Ae({elementType:v,externalSlotProps:s?.root,externalForwardedProps:c,additionalProps:{ref:h,suppressContentEditableWarning:!0},className:d.root,ownerState:m});return u.jsx(v,R({},f,{children:f.contentEditable?a.map(({content:b,before:C,after:w})=>`${C.children}${b.children}${w.children}`).join(""):u.jsx(p.Fragment,{children:a.map((b,C)=>u.jsx(Bx,{slots:r,slotProps:s,element:b,classes:d},C))})}))}),Nc=p.createContext(null),Cr=()=>{const e=p.useContext(Nc);if(e==null)throw new Error(["MUI X: The `usePickerTextFieldOwnerState` can only be called in components that are used inside a PickerTextField component"].join(`
|
|
119
119
|
`));return e},_x=["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"],zx=e=>Math.round(e*1e5)/1e5,Sr=V("div",{name:"MuiPickersInputBase",slot:"Root"})(({theme:e})=>R({},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:`${zx(.15/16)}em`,variants:[{props:{isInputInFullWidth:!0},style:{width:"100%"}}]})),Us=V(Rc,{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:{textAlign:"right /*! @noflip */"}},{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:e.palette.mode==="light"?.42:.5}}]})),Hx=V(Ec,{name:"MuiPickersInputBase",slot:"Section"})(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit",letterSpacing:"inherit",lineHeight:"1.4375em",display:"inline-block",whiteSpace:"nowrap"})),Ux=V(Fc,{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"})),Yx=V(Oc,{name:"MuiPickersInputBase",slot:"Separator"})(()=>({whiteSpace:"pre",letterSpacing:"inherit"})),qx=V("input",{name:"MuiPickersInputBase",slot:"Input",overridesResolver:(e,t)=>t.hiddenInput})(R({},km)),Kx=V("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]}})),Gx=(e,t)=>{const{isFieldFocused:n,isFieldDisabled:o,isFieldReadOnly:r,hasFieldError:s,inputSize:a,isInputInFullWidth:i,inputColor:l,hasStartAdornment:c,hasEndAdornment:d}=t,m={root:["root",n&&!o&&"focused",o&&"disabled",r&&"readOnly",s&&"error",i&&"fullWidth",`color${ym(l)}`,a==="small"&&"inputSizeSmall",c&&"adornedStart",d&&"adornedEnd"],notchedOutline:["notchedOutline"],input:["input"],sectionsContainer:["sectionsContainer"],sectionContent:["sectionContent"],sectionBefore:["sectionBefore"],sectionAfter:["sectionAfter"],activeBar:["activeBar"]};return Oe(m,$x,e)};function vi(e,t,n,o){if(e.content.id){const r=t.current?.querySelectorAll(`[data-sectionindex="${n}"] [data-range-position="${o}"]`);if(r)return Array.from(r).reduce((s,a)=>s+a.offsetWidth,0)}return 0}function Qx(e,t){let n=0;if(t.current?.getAttribute("data-active-range-position")==="end")for(let r=e.length-1;r>=e.length/2;r-=1)n+=vi(e[r],t,r,"end");else for(let r=0;r<e.length/2;r+=1)n+=vi(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]}}const Ys=p.forwardRef(function(t,n){const o=De({props:t,name:"MuiPickersInputBase"}),{elements:r,areAllSectionsEmpty:s,value:a,onChange:i,id:l,endAdornment:c,startAdornment:d,renderSuffix:m,slots:y,slotProps:h,contentEditable:g,tabIndex:v,onInput:f,onPaste:b,onKeyDown:C,name:w,readOnly:x,inputProps:k,inputRef:P,sectionListRef:S,onFocus:I,onBlur:T,classes:O,ownerState:N}=o,M=me(o,_x),L=Cr(),A=p.useRef(null),F=p.useRef(null),E=p.useRef([]),B=ot(n,A),G=ot(k?.ref,P),$=_t();if(!$)throw new Error("MUI X: PickersInputBase should always be used inside a PickersTextField component");const Z=N??L,W=Q=>{$.onFocus?.(Q),I?.(Q)},ne=Q=>{W(Q)},te=Q=>{if(C?.(Q),Q.key==="Enter"&&!Q.defaultMuiPrevented){if(A.current?.dataset.multiInput)return;const _=A.current?.closest("form"),q=_?.querySelector('[type="submit"]');if(!_||!q)return;Q.preventDefault(),_.requestSubmit(q)}},se=Q=>{$.onBlur?.(Q),T?.(Q)};p.useEffect(()=>{$&&$.setAdornedStart(!!d)},[$,d]),p.useEffect(()=>{$&&(s?$.onEmpty():$.onFilled())},[$,s]);const U=Gx(O,Z),oe=y?.root||Sr,ce=Ae({elementType:oe,externalSlotProps:h?.root,externalForwardedProps:M,additionalProps:{"aria-invalid":$.error,ref:B},className:U.root,ownerState:Z}),fe=y?.input||Us,re=r.some(Q=>Q.content["data-range-position"]!==void 0);return p.useEffect(()=>{if(!re||!Z.isPickerOpen)return;const{activeBarWidth:Q,sectionOffsets:_}=Qx(r,A);E.current=[_[0],_[1]],F.current&&(F.current.style.width=`${Q}px`)},[r,re,Z.isPickerOpen]),u.jsxs(oe,R({},ce,{children:[d,u.jsx(Wx,{sectionListRef:S,elements:r,contentEditable:g,tabIndex:v,className:U.sectionsContainer,onFocus:W,onBlur:se,onInput:f,onPaste:b,onKeyDown:te,slots:{root:fe,section:Hx,sectionContent:Ux,sectionSeparator:Yx},slotProps:{root:R({},h?.input,{ownerState:Z}),sectionContent:{className:Tn.sectionContent},sectionSeparator:({separatorPosition:Q})=>({className:Q==="before"?Tn.sectionBefore:Tn.sectionAfter})}}),c,m?m(R({},$)):null,u.jsx(qx,R({name:w,className:U.input,value:a,onChange:i,id:l,"aria-hidden":"true",tabIndex:-1,readOnly:x,required:$.required,disabled:$.disabled,onFocus:ne},k,{ref:G})),re&&u.jsx(Kx,{className:U.activeBar,ref:F,ownerState:{sectionOffsets:E.current}})]}))});function Xx(e){return Ve("MuiPickersOutlinedInput",e)}const kt=R({},Tn,We("MuiPickersOutlinedInput",["root","notchedOutline","input"])),Zx=["children","className","label","notched","shrink"],Jx=V("fieldset",{name:"MuiPickersOutlinedInput",slot:"NotchedOutline"})(({theme:e})=>{const t=e.palette.mode==="light"?"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}}),xi=V("span")(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit"})),ew=V("legend",{shouldForwardProp:e=>Ft(e)&&e!=="notched"})(({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 tw(e){const{className:t,label:n,notched:o}=e,r=me(e,Zx),s=Cr();return u.jsx(Jx,R({"aria-hidden":!0,className:t},r,{ownerState:s,children:u.jsx(ew,{ownerState:s,notched:o,children:n?u.jsx(xi,{children:n}):u.jsx(xi,{className:"notranslate",children:""})})}))}const nw=["label","autoFocus","ownerState","classes","notched"],ow=V(Sr,{name:"MuiPickersOutlinedInput",slot:"Root"})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{padding:"0 14px",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${kt.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${kt.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${kt.focused} .${kt.notchedOutline}`]:{borderStyle:"solid",borderWidth:2},[`&.${kt.disabled}`]:{[`& .${kt.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled},"*":{color:(e.vars||e).palette.action.disabled}},[`&.${kt.error} .${kt.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},variants:Object.keys((e.vars??e).palette).filter(n=>(e.vars??e).palette[n]?.main??!1).map(n=>({props:{inputColor:n},style:{[`&.${kt.focused}:not(.${kt.error}) .${kt.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}}))}}),rw=V(Us,{name:"MuiPickersOutlinedInput",slot:"SectionsContainer"})({padding:"16.5px 0",variants:[{props:{inputSize:"small"},style:{padding:"8.5px 0"}}]}),sw=e=>{const n=Oe({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Xx,e);return R({},e,n)},Ac=p.forwardRef(function(t,n){const o=De({props:t,name:"MuiPickersOutlinedInput"}),{label:r,classes:s,notched:a}=o,i=me(o,nw),l=_t(),c=sw(s);return u.jsx(Ys,R({slots:{root:ow,input:rw},renderSuffix:d=>u.jsx(tw,{shrink:!!(a||d.adornedStart||d.focused||d.filled),notched:!!(a||d.adornedStart||d.focused||d.filled),className:c.notchedOutline,label:r!=null&&r!==""&&l?.required?u.jsxs(p.Fragment,{children:[r," ","*"]}):r})},i,{label:r,classes:c,ref:n}))});Ac.muiName="Input";function aw(e){return Ve("MuiPickersFilledInput",e)}const Jt=R({},Tn,We("MuiPickersFilledInput",["root","underline","input"])),iw=["label","autoFocus","disableUnderline","hiddenLabel","classes"],lw=V(Sr,{name:"MuiPickersFilledInput",slot:"Root",shouldForwardProp:e=>Ft(e)&&e!=="disableUnderline"})(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",o=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",r=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",s=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o,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:r,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o}},[`&.${Jt.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o},[`&.${Jt.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:s},variants:[...Object.keys((e.vars??e).palette).filter(a=>(e.vars??e).palette[a].main).map(a=>({props:{inputColor:a,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[a]?.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"},[`&.${Jt.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Jt.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(.${Jt.disabled}, .${Jt.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Jt.disabled}:before`]:{borderBottomStyle:"dotted"}}},{props:{hasStartAdornment:!0},style:{paddingLeft:12}},{props:{hasEndAdornment:!0},style:{paddingRight:12}}]}}),cw=V(Us,{name:"MuiPickersFilledInput",slot:"sectionsContainer",shouldForwardProp:e=>Ft(e)&&e!=="hiddenLabel"})({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}}]}),uw=(e,t)=>{const{inputHasUnderline:n}=t,r=Oe({root:["root",n&&"underline"],input:["input"]},aw,e);return R({},e,r)},$c=p.forwardRef(function(t,n){const o=De({props:t,name:"MuiPickersFilledInput"}),{label:r,disableUnderline:s=!1,hiddenLabel:a=!1,classes:i}=o,l=me(o,iw),c=Cr(),d=R({},c,{inputHasUnderline:!s}),m=uw(i,d);return u.jsx(Ys,R({slots:{root:lw,input:cw},slotProps:{root:{disableUnderline:s},input:{hiddenLabel:a}}},l,{label:r,classes:m,ref:n,ownerState:d}))});$c.muiName="Input";function dw(e){return Ve("MuiPickersFilledInput",e)}const Xn=R({},Tn,We("MuiPickersInput",["root","underline","input"])),pw=["label","autoFocus","disableUnderline","ownerState","classes"],fw=V(Sr,{name:"MuiPickersInput",slot:"Root",shouldForwardProp:e=>Ft(e)&&e!=="disableUnderline"})(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{"label + &":{marginTop:16},variants:[...Object.keys((e.vars??e).palette).filter(o=>(e.vars??e).palette[o].main).map(o=>({props:{inputColor:o},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[o].main}`}}})),{props:{disableUnderline:!1},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"},[`&.${Xn.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Xn.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${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(.${Xn.disabled}, .${Xn.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${Xn.disabled}:before`]:{borderBottomStyle:"dotted"}}}]}}),mw=(e,t)=>{const{inputHasUnderline:n}=t,r=Oe({root:["root",!n&&"underline"],input:["input"]},dw,e);return R({},e,r)},Lc=p.forwardRef(function(t,n){const o=De({props:t,name:"MuiPickersInput"}),{label:r,disableUnderline:s=!1,classes:a}=o,i=me(o,pw),l=Cr(),c=R({},l,{inputHasUnderline:!s}),d=mw(a,c);return u.jsx(Ys,R({slots:{root:fw},slotProps:{root:{disableUnderline:s}}},i,{label:r,classes:d,ref:n}))});Lc.muiName="Input";const hw=["onFocus","onBlur","className","classes","color","disabled","error","variant","required","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"],gw={standard:Lc,filled:$c,outlined:Ac},bw=V(xc,{name:"MuiPickersTextField",slot:"Root"})({}),yw=(e,t)=>{const{isFieldFocused:n,isFieldDisabled:o,isFieldRequired:r}=t;return Oe({root:["root",n&&!o&&"focused",o&&"disabled",r&&"required"]},Ax,e)},jc=p.forwardRef(function(t,n){const o=De({props:t,name:"MuiPickersTextField"}),{onFocus:r,onBlur:s,className:a,classes:i,color:l="primary",disabled:c=!1,error:d=!1,variant:m="outlined",required:y=!1,InputProps:h,inputProps:g,inputRef:v,sectionListRef:f,elements:b,areAllSectionsEmpty:C,onClick:w,onKeyDown:x,onKeyUp:k,onPaste:P,onInput:S,endAdornment:I,startAdornment:T,tabIndex:O,contentEditable:N,focused:M,value:L,onChange:A,fullWidth:F,id:E,name:B,helperText:G,FormHelperTextProps:$,label:Z,InputLabelProps:W,"data-active-range-position":ne}=o,te=me(o,hw),se=p.useRef(null),U=ot(n,se),oe=Po(E),ce=G&&oe?`${oe}-helper-text`:void 0,fe=Z&&oe?`${oe}-label`:void 0,re=Hs({disabled:o.disabled,required:o.required,readOnly:h?.readOnly}),Q=p.useMemo(()=>R({},re,{isFieldValueEmpty:C,isFieldFocused:M??!1,hasFieldError:d??!1,inputSize:o.size??"medium",inputColor:l??"primary",isInputInFullWidth:F??!1,hasStartAdornment:!!(T??h?.startAdornment),hasEndAdornment:!!(I??h?.endAdornment),inputHasLabel:!!Z}),[re,C,M,d,o.size,l,F,T,I,h?.startAdornment,h?.endAdornment,Z]),_=yw(i,Q),q=gw[m],X={};return m==="outlined"&&(W&&typeof W.shrink<"u"&&(X.notched=W.shrink),X.label=Z),u.jsx(Nc.Provider,{value:Q,children:u.jsxs(bw,R({className:ae(_.root,a),ref:U,focused:M,disabled:c,variant:m,error:d,color:l,fullWidth:F,required:y,ownerState:Q},te,{children:[Z!=null&&Z!==""&&u.jsx(vc,R({htmlFor:oe,id:fe},W,{children:Z})),u.jsx(q,R({elements:b,areAllSectionsEmpty:C,onClick:w,onKeyDown:x,onKeyUp:k,onInput:S,onPaste:P,onFocus:r,onBlur:s,endAdornment:I,startAdornment:T,tabIndex:O,contentEditable:N,value:L,onChange:A,id:oe,fullWidth:F,inputProps:g,inputRef:v,sectionListRef:f,label:Z,name:B,role:"group","aria-labelledby":fe,"aria-describedby":ce,"aria-live":ce?"polite":void 0,"data-active-range-position":ne},X,h)),G&&u.jsx(wc,R({id:ce},$,{children:G}))]}))})}),vw=["enableAccessibleFieldDOMStructure"],xw=["InputProps","readOnly","onClear","clearable","clearButtonPosition","openPickerButtonPosition","openPickerAriaLabel"],ww=["onPaste","onKeyDown","inputMode","readOnly","InputProps","inputProps","inputRef","onClear","clearable","clearButtonPosition","openPickerButtonPosition","openPickerAriaLabel"],Cw=["ownerState"],Sw=["ownerState"],kw=["ownerState"],Pw=["ownerState"],Mw=["InputProps","inputProps"],Dw=e=>{let{enableAccessibleFieldDOMStructure:t}=e,n=me(e,vw);if(t){const{InputProps:f,readOnly:b,onClear:C,clearable:w,clearButtonPosition:x,openPickerButtonPosition:k,openPickerAriaLabel:P}=n,S=me(n,xw);return{clearable:w,onClear:C,clearButtonPosition:x,openPickerButtonPosition:k,openPickerAriaLabel:P,textFieldProps:R({},S,{InputProps:R({},f??{},{readOnly:b})})}}const{onPaste:o,onKeyDown:r,inputMode:s,readOnly:a,InputProps:i,inputProps:l,inputRef:c,onClear:d,clearable:m,clearButtonPosition:y,openPickerButtonPosition:h,openPickerAriaLabel:g}=n,v=me(n,ww);return{clearable:m,onClear:d,clearButtonPosition:y,openPickerButtonPosition:h,openPickerAriaLabel:g,textFieldProps:R({},v,{InputProps:R({},i??{},{readOnly:a}),inputProps:R({},l??{},{inputMode:s,onPaste:o,onKeyDown:r,ref:c})})}},qs=p.createContext({slots:{},slotProps:{},inputRef:void 0});function Vc(e){const{slots:t,slotProps:n,fieldResponse:o,defaultOpenPickerIcon:r}=e,s=lt(),a=Ts(),i=p.useContext(qs),{textFieldProps:l,onClear:c,clearable:d,openPickerAriaLabel:m,clearButtonPosition:y="end",openPickerButtonPosition:h="end"}=Dw(o),g=Hs(l),v=de($=>{$.preventDefault(),a?.setOpen(Z=>!Z)}),f=a?a.triggerStatus:"hidden",b=d?y:null,C=f!=="hidden"?h:null,w=t?.textField??i.slots.textField??(o.enableAccessibleFieldDOMStructure===!1?vx:jc),x=t?.inputAdornment??i.slots.inputAdornment??Tx,k=Ae({elementType:x,externalSlotProps:Yo(i.slotProps.inputAdornment,n?.inputAdornment),additionalProps:{position:"start"},ownerState:R({},g,{position:"start"})}),P=me(k,Cw),S=Ae({elementType:x,externalSlotProps:n?.inputAdornment,additionalProps:{position:"end"},ownerState:R({},g,{position:"end"})}),I=me(S,Sw),T=i.slots.openPickerButton??Vn,O=Ae({elementType:T,externalSlotProps:i.slotProps.openPickerButton,additionalProps:{disabled:f==="disabled",onClick:v,"aria-label":m,edge:l.variant!=="standard"?C:!1},ownerState:g}),N=me(O,kw),M=i.slots.openPickerIcon??r,L=Ae({elementType:M,externalSlotProps:i.slotProps.openPickerIcon,ownerState:g}),A=t?.clearButton??i.slots.clearButton??Vn,F=Ae({elementType:A,externalSlotProps:Yo(i.slotProps.clearButton,n?.clearButton),className:"clearButton",additionalProps:{title:s.fieldClearLabel,tabIndex:-1,onClick:c,disabled:o.disabled||o.readOnly,edge:l.variant!=="standard"&&b!==C?b:!1},ownerState:g}),E=me(F,Pw),B=t?.clearIcon??i.slots.clearIcon??Nx,G=Ae({elementType:B,externalSlotProps:Yo(i.slotProps.clearIcon,n?.clearIcon),additionalProps:{fontSize:"small"},ownerState:g});return l.ref=ot(l.ref,a?.rootRef),l.InputProps||(l.InputProps={}),a&&(l.InputProps.ref=a.triggerRef),!l.InputProps?.startAdornment&&(b==="start"||C==="start")&&(l.InputProps.startAdornment=u.jsxs(x,R({},P,{children:[C==="start"&&u.jsx(T,R({},N,{children:u.jsx(M,R({},L))})),b==="start"&&u.jsx(A,R({},E,{children:u.jsx(B,R({},G))}))]}))),!l.InputProps?.endAdornment&&(b==="end"||C==="end")&&(l.InputProps.endAdornment=u.jsxs(x,R({},I,{children:[b==="end"&&u.jsx(A,R({},E,{children:u.jsx(B,R({},G))})),C==="end"&&u.jsx(T,R({},N,{children:u.jsx(M,R({},L))}))]}))),b!=null&&(l.sx=[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(l.sx)?l.sx:[l.sx]]),u.jsx(w,R({},l))}function Yo(e,t){return e?t?n=>R({},ln(t,n),ln(e,n)):e:t}function Bc(e){const{ref:t,externalForwardedProps:n,slotProps:o}=e,r=p.useContext(qs),s=Ts(),a=Hs(n),{InputProps:i,inputProps:l}=n,c=me(n,Mw),d=Ae({elementType:jc,externalSlotProps:Yo(r.slotProps.textField,o?.textField),externalForwardedProps:c,additionalProps:{ref:t,sx:s?.rootSx,label:s?.label,name:s?.name,className:s?.rootClassName,inputRef:r.inputRef},ownerState:a});return d.inputProps=R({},l,d.inputProps),d.InputProps=R({},i,d.InputProps),d}function Wc(e){const{slots:t={},slotProps:n={},inputRef:o,children:r}=e,s=p.useMemo(()=>({inputRef:o,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}}),[o,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 u.jsx(qs.Provider,{value:s,children:r})}function _c(e){const{steps:t}=e;return wb({steps:t,isViewMatchingStep:(n,o)=>o.views==null||o.views.includes(n),onStepChange:({step:n,defaultView:o,setView:r,view:s,views:a})=>{const i=n.views==null?o:n.views.find(l=>a.includes(l));i!==s&&r(i)}})}const Tw=["props","steps"],Iw=["ownerState"],zc=e=>{let{props:t,steps:n}=e,o=me(e,Tw);const{slots:r,slotProps:s,label:a,inputRef:i,localeText:l}=t,c=_c({steps:n}),{providerProps:d,renderCurrentView:m,ownerState:y}=dc(R({},o,{props:t,localeText:l,autoFocusView:!0,viewContainerRole:"dialog",variant:"desktop",getStepNavigation:c})),h=d.privateContextValue.labelId,g=s?.toolbar?.hidden??!1,v=r.field,f=Ae({elementType:v,externalSlotProps:s?.field,additionalProps:R({},g&&{id:h}),ownerState:y}),b=me(f,Iw),C=r.layout??yc;let w=h;g&&(a?w=`${h}-label`:w=void 0);const x=R({},s,{toolbar:R({},s?.toolbar,{titleId:h}),popper:R({"aria-labelledby":w},s?.popper)});return{renderPicker:()=>u.jsx(zl,R({},d,{children:u.jsxs(Wc,{slots:r,slotProps:x,inputRef:i,children:[u.jsx(v,R({},b)),u.jsx(yb,{slots:r,slotProps:x,children:u.jsx(C,R({},x?.layout,{slots:r,slotProps:x,children:m()}))})]})}))}},gn=e=>e.saveQuery!=null,Hc=({stateResponse:{localizedDigits:e,sectionsValueBoundaries:t,state:n,timezone:o,setCharacterQuery:r,setTempAndroidValueStr:s,updateSectionValue:a}})=>{const i=Te(),l=({keyPressed:m,sectionIndex:y},h,g)=>{const v=m.toLowerCase(),f=n.sections[y];if(n.characterQuery!=null&&(!g||g(n.characterQuery.value))&&n.characterQuery.sectionIndex===y){const C=`${n.characterQuery.value}${v}`,w=h(C,f);if(!gn(w))return r({sectionIndex:y,value:C,sectionType:f.type}),w}const b=h(v,f);return gn(b)&&!b.saveQuery?(r(null),null):(r({sectionIndex:y,value:v,sectionType:f.type}),gn(b)?null:b)},c=m=>{const y=(v,f,b)=>{const C=f.filter(w=>w.toLowerCase().startsWith(b));return C.length===0?{saveQuery:!1}:{sectionValue:C[0],shouldGoToNextSection:C.length===1}},h=(v,f,b,C)=>{const w=x=>Ol(i,o,f.type,x);if(f.contentType==="letter")return y(f.format,w(f.format),v);if(b&&C!=null&&El(i,b).contentType==="letter"){const x=w(b),k=y(b,x,v);return gn(k)?{saveQuery:!1}:R({},k,{sectionValue:C(k.sectionValue,x)})}return{saveQuery:!1}};return l(m,(v,f)=>{switch(f.type){case"month":{const b=C=>Aa(i,C,i.formats.month,f.format);return h(v,f,i.formats.month,b)}case"weekDay":{const b=(C,w)=>w.indexOf(C).toString();return h(v,f,i.formats.weekday,b)}case"meridiem":return h(v,f);default:return{saveQuery:!1}}})},d=m=>{const y=(g,v)=>{const f=cn(g,e),b=Number(f),C=t[v.type]({currentDate:null,format:v.format,contentType:v.contentType});if(b>C.maximum)return{saveQuery:!1};if(b<C.minimum)return{saveQuery:!0};const w=b*10>C.maximum||f.length===C.maximum.toString().length;return{sectionValue:Fl(i,b,C,e,v),shouldGoToNextSection:w}};return l(m,(g,v)=>{if(v.contentType==="digit"||v.contentType==="digit-with-letter")return y(g,v);if(v.type==="month"){Nl(i,"digit","month","MM");const f=y(g,{type:v.type,format:"MM",hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(gn(f))return f;const b=Aa(i,f.sectionValue,"MM",v.format);return R({},f,{sectionValue:b})}if(v.type==="weekDay"){const f=y(g,v);if(gn(f))return f;const b=ur(i,v.format)[Number(f.sectionValue)-1];return R({},f,{sectionValue:b})}return{saveQuery:!1}},g=>Na(g,e))};return de(m=>{const y=n.sections[m.sectionIndex],g=Na(m.keyPressed,e)?d(R({},m,{keyPressed:Ss(m.keyPressed,e)})):c(m);if(g==null){s(null);return}a({section:y,newSectionValue:g.sectionValue,shouldGoToNextSection:g.shouldGoToNextSection})})},Rw=5e3,Uc=e=>{const t=Te(),n=lt(),o=fn(),r=wt(),{manager:{validator:s,valueType:a,internal_valueManager:i,internal_fieldValueManager:l},internalPropsWithDefaults:c,internalPropsWithDefaults:{value:d,defaultValue:m,referenceDate:y,onChange:h,format:g,formatDensity:v="dense",selectedSections:f,onSelectedSectionsChange:b,shouldRespectLeadingZeros:C=!1,timezone:w,enableAccessibleFieldDOMStructure:x=!0},forwardedProps:{error:k}}=e,{value:P,handleValueChange:S,timezone:I}=Gt({name:"a field component",timezone:w,value:d,defaultValue:m,referenceDate:y,onChange:h,valueManager:i}),T=p.useRef(P);p.useEffect(()=>{T.current=P},[P]);const{hasValidationError:O}=Kl({props:c,validator:s,timezone:I,value:P,onError:c.onError}),N=p.useMemo(()=>k!==void 0?k:O,[O,k]),M=p.useMemo(()=>zm(t),[t]),L=p.useMemo(()=>Km(t,M,I),[t,M,I]),A=p.useCallback(Y=>l.getSectionsFromValue(Y,ee=>Va({utils:t,localeText:n,localizedDigits:M,format:g,date:ee,formatDensity:v,shouldRespectLeadingZeros:C,enableAccessibleFieldDOMStructure:x,isRtl:r})),[l,g,n,M,r,C,t,v,x]),[F,E]=p.useState(()=>{const Y=A(P),ee={sections:Y,lastExternalValue:P,lastSectionsDependencies:{format:g,isRtl:r,locale:t.locale},tempValueStrAndroid:null,characterQuery:null},ie=Bm(Y),z=i.getInitialReferenceValue({referenceDate:y,value:P,utils:t,props:c,granularity:ie,timezone:I});return R({},ee,{referenceValue:z})}),[B,G]=En({controlled:f,default:null,name:"useField",state:"selectedSections"}),$=Y=>{G(Y),b?.(Y)},Z=p.useMemo(()=>_r(B,F.sections),[B,F.sections]),W=Z==="all"?0:Z,ne=p.useMemo(()=>Xm(F.sections,r&&!x),[F.sections,r,x]),te=p.useMemo(()=>F.sections.every(Y=>Y.value===""),[F.sections]),se=Y=>{const ee={validationError:s({adapter:o,value:Y,timezone:I,props:c})};S(Y,ee)},U=(Y,ee)=>{const ie=[...F.sections];return ie[Y]=R({},ie[Y],{value:ee,modified:!0}),ie},oe=p.useRef(null),ce=Mn(),fe=Y=>{W!=null&&(oe.current={sectionIndex:W,value:Y},ce.start(0,()=>{oe.current=null}))},re=()=>{i.areValuesEqual(t,P,i.emptyValue)?E(Y=>R({},Y,{sections:Y.sections.map(ee=>R({},ee,{value:""})),tempValueStrAndroid:null,characterQuery:null})):(E(Y=>R({},Y,{characterQuery:null})),se(i.emptyValue))},Q=()=>{if(W==null)return;const Y=F.sections[W];Y.value!==""&&(fe(""),l.getDateFromSection(P,Y)===null?E(ee=>R({},ee,{sections:U(W,""),tempValueStrAndroid:null,characterQuery:null})):(E(ee=>R({},ee,{characterQuery:null})),se(l.updateDateInValue(P,Y,null))))},_=Y=>{const ee=(z,j)=>{const H=t.parse(z,g);if(!t.isValid(H))return null;const ge=Va({utils:t,localeText:n,localizedDigits:M,format:g,date:H,formatDensity:v,shouldRespectLeadingZeros:C,enableAccessibleFieldDOMStructure:x,isRtl:r});return La(t,H,ge,j,!1)},ie=l.parseValueStr(Y,F.referenceValue,ee);se(ie)},q=Mn(),X=({section:Y,newSectionValue:ee,shouldGoToNextSection:ie})=>{ce.clear(),q.clear();const z=l.getDateFromSection(P,Y);ie&&W<F.sections.length-1&&$(W+1);const j=U(W,ee),H=l.getDateSectionsFromValue(j,Y),ge=Um(t,H,M);if(t.isValid(ge)){const ye=La(t,ge,H,l.getDateFromSection(F.referenceValue,Y),!0);return z==null&&q.start(0,()=>{T.current===P&&E(Le=>R({},Le,{sections:l.clearDateSections(F.sections,Y),tempValueStrAndroid:null}))}),se(l.updateDateInValue(P,Y,ye))}return H.every(ye=>ye.value!=="")?(fe(ee),se(l.updateDateInValue(P,Y,ge))):z!=null?(fe(ee),se(l.updateDateInValue(P,Y,null))):E(ye=>R({},ye,{sections:j,tempValueStrAndroid:null}))},K=Y=>E(ee=>R({},ee,{tempValueStrAndroid:Y})),ue=de(Y=>{E(ee=>R({},ee,{characterQuery:Y}))});if(P!==F.lastExternalValue){let Y;oe.current!=null&&!t.isValid(l.getDateFromSection(P,F.sections[oe.current.sectionIndex]))?Y=U(oe.current.sectionIndex,oe.current.value):Y=A(P),E(ee=>R({},ee,{lastExternalValue:P,sections:Y,sectionsDependencies:{format:g,isRtl:r,locale:t.locale},referenceValue:l.updateReferenceValue(t,P,ee.referenceValue),tempValueStrAndroid:null}))}if(r!==F.lastSectionsDependencies.isRtl||g!==F.lastSectionsDependencies.format||t.locale!==F.lastSectionsDependencies.locale){const Y=A(P);E(ee=>R({},ee,{lastSectionsDependencies:{format:g,isRtl:r,locale:t.locale},sections:Y,tempValueStrAndroid:null,characterQuery:null}))}F.characterQuery!=null&&!N&&W==null&&ue(null),F.characterQuery!=null&&F.sections[F.characterQuery.sectionIndex]?.type!==F.characterQuery.sectionType&&ue(null),p.useEffect(()=>{oe.current!=null&&(oe.current=null)});const J=Mn();return p.useEffect(()=>(F.characterQuery!=null&&J.start(Rw,()=>ue(null)),()=>{}),[F.characterQuery,ue,J]),p.useEffect(()=>{F.tempValueStrAndroid!=null&&W!=null&&Q()},[F.sections]),{activeSectionIndex:W,areAllSectionsEmpty:te,error:N,localizedDigits:M,parsedSelectedSections:Z,sectionOrder:ne,sectionsValueBoundaries:L,state:F,timezone:I,value:P,clearValue:re,clearActiveSection:Q,setCharacterQuery:ue,setSelectedSections:$,setTempAndroidValueStr:K,updateSectionValue:X,updateValueFromValueStr:_,getSectionsFromValue:A}};function Yc(e){const{manager:{internal_useApplyDefaultValuesToFieldInternalProps:t},internalProps:n,skipContextFieldRefAssignment:o}=e,r=Ts(),s=Bl(),a=ot(n.unstableFieldRef,o?null:s?.fieldRef),i=r?.setValue,l=p.useCallback((d,m)=>i?.(d,{validationError:m.validationError,shouldClose:!1}),[i]),c=p.useMemo(()=>s!=null&&r!=null?R({value:r.value,onChange:l,timezone:r.timezone,disabled:r.disabled,readOnly:r.readOnly,autoFocus:r.autoFocus&&!r.open,focused:r.open?!0:void 0,format:r.fieldFormat,formatDensity:s.formatDensity,enableAccessibleFieldDOMStructure:s.enableAccessibleFieldDOMStructure,selectedSections:s.selectedSections,onSelectedSectionsChange:s.onSelectedSectionsChange,unstableFieldRef:a},n):n,[r,s,n,l,a]);return t(c)}function Ks(e){const{focused:t,domGetters:n,stateResponse:{parsedSelectedSections:o,state:r}}=e;if(!n.isReady())return;const s=document.getSelection();if(!s)return;if(o==null){s.rangeCount>0&&n.getRoot().contains(s.getRangeAt(0).startContainer)&&s.removeAllRanges(),t&&n.getRoot().blur();return}if(!n.getRoot().contains(nt(document)))return;const a=new window.Range;let i;o==="all"?i=n.getRoot():r.sections[o].type==="empty"?i=n.getSectionContainer(o):i=n.getSectionContent(o),a.selectNodeContents(i),i.focus(),s.removeAllRanges(),s.addRange(a)}function qc(e){const t=Te(),{manager:{internal_fieldValueManager:n},internalPropsWithDefaults:{minutesStep:o,disabled:r,readOnly:s},stateResponse:{state:a,value:i,activeSectionIndex:l,parsedSelectedSections:c,sectionsValueBoundaries:d,localizedDigits:m,timezone:y,sectionOrder:h,clearValue:g,clearActiveSection:v,setSelectedSections:f,updateSectionValue:b}}=e;return de(C=>{if(!r)switch(!0){case((C.ctrlKey||C.metaKey)&&String.fromCharCode(C.keyCode)==="A"&&!C.shiftKey&&!C.altKey):{C.preventDefault(),f("all");break}case C.key==="ArrowRight":{if(C.preventDefault(),c==null)f(h.startIndex);else if(c==="all")f(h.endIndex);else{const w=h.neighbors[c].rightIndex;w!==null&&f(w)}break}case C.key==="ArrowLeft":{if(C.preventDefault(),c==null)f(h.endIndex);else if(c==="all")f(h.startIndex);else{const w=h.neighbors[c].leftIndex;w!==null&&f(w)}break}case C.key==="Delete":{if(C.preventDefault(),s)break;c==null||c==="all"?g():v();break}case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(C.key):{if(C.preventDefault(),s||l==null)break;c==="all"&&f(l);const w=a.sections[l],x=Ow(t,y,w,C.key,d,m,n.getDateFromSection(i,w),{minutesStep:o});b({section:w,newSectionValue:x,shouldGoToNextSection:!1});break}}})}function Ew(e){switch(e){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}}function Ow(e,t,n,o,r,s,a,i){const l=Ew(o),c=o==="Home",d=o==="End",m=n.value===""||c||d,y=()=>{const g=r[n.type]({currentDate:a,format:n.format,contentType:n.contentType}),v=C=>Fl(e,C,g,s,n),f=n.type==="minutes"&&i?.minutesStep?i.minutesStep:1;let b;if(m){if(n.type==="year"&&!d&&!c)return e.formatByString(e.date(void 0,t),n.format);l>0||c?b=g.minimum:b=g.maximum}else b=parseInt(cn(n.value,s),10)+l*f;return b%f!==0&&((l<0||c)&&(b+=f-(f+b)%f),(l>0||d)&&(b-=b%f)),b>g.maximum?v(g.minimum+(b-g.maximum-1)%(g.maximum-g.minimum+1)):b<g.minimum?v(g.maximum-(g.minimum-b-1)%(g.maximum-g.minimum+1)):v(b)},h=()=>{const g=Ol(e,t,n.type,n.format);if(g.length===0)return n.value;if(m)return l>0||c?g[0]:g[g.length-1];const b=((g.indexOf(n.value)+l)%g.length+g.length)%g.length;return g[b]};return n.contentType==="digit"||n.contentType==="digit-with-letter"?y():h()}function Fw(e){const{manager:t,focused:n,setFocused:o,domGetters:r,stateResponse:s,applyCharacterEditing:a,internalPropsWithDefaults:i,stateResponse:{parsedSelectedSections:l,sectionOrder:c,state:d,clearValue:m,setCharacterQuery:y,setSelectedSections:h,updateValueFromValueStr:g},internalPropsWithDefaults:{disabled:v=!1,readOnly:f=!1}}=e,b=qc({manager:t,internalPropsWithDefaults:i,stateResponse:s}),C=Mn(),w=de(I=>{v||!r.isReady()||(o(!0),l==="all"?C.start(0,()=>{const T=document.getSelection().getRangeAt(0).startOffset;if(T===0){h(c.startIndex);return}let O=0,N=0;for(;N<T&&O<d.sections.length;){const M=d.sections[O];O+=1,N+=`${M.startSeparator}${M.value||M.placeholder}${M.endSeparator}`.length}h(O-1)}):n?r.getRoot().contains(I.target)||h(c.startIndex):(o(!0),h(c.startIndex)))}),x=de(I=>{if(!r.isReady()||l!=="all")return;const O=I.target.textContent??"";r.getRoot().innerHTML=d.sections.map(N=>`${N.startSeparator}${N.value||N.placeholder}${N.endSeparator}`).join(""),Ks({focused:n,domGetters:r,stateResponse:s}),O.length===0||O.charCodeAt(0)===10?(m(),h("all")):O.length>1?g(O):(l==="all"&&h(0),a({keyPressed:O,sectionIndex:0}))}),k=de(I=>{if(f||l!=="all"){I.preventDefault();return}const T=I.clipboardData.getData("text");I.preventDefault(),y(null),g(T)}),P=de(()=>{if(n||v||!r.isReady())return;const I=nt(document);o(!0),r.getSectionIndexFromDOMElement(I)!=null||h(c.startIndex)}),S=de(()=>{setTimeout(()=>{if(!r.isReady())return;const I=nt(document);!r.getRoot().contains(I)&&(o(!1),h(null))})});return{onKeyDown:b,onBlur:S,onFocus:P,onClick:w,onPaste:k,onInput:x,contentEditable:l==="all",tabIndex:l===0?-1:0}}function Nw(e){const{manager:{internal_fieldValueManager:t},stateResponse:{areAllSectionsEmpty:n,state:o,updateValueFromValueStr:r}}=e,s=de(i=>{r(i.target.value)});return{value:p.useMemo(()=>n?"":t.getV7HiddenInputValueFromSections(o.sections),[n,o.sections,t]),onChange:s}}function Aw(e){const{stateResponse:{setSelectedSections:t},internalPropsWithDefaults:{disabled:n=!1}}=e,o=de(r=>s=>{n||s.isDefaultPrevented()||t(r)});return p.useCallback(r=>({"data-sectionindex":r,onClick:o(r)}),[o])}function $w(e){const t=Te(),n=lt(),o=Po(),{focused:r,domGetters:s,stateResponse:a,applyCharacterEditing:i,manager:{internal_fieldValueManager:l},stateResponse:{parsedSelectedSections:c,sectionsValueBoundaries:d,state:m,value:y,clearActiveSection:h,setCharacterQuery:g,setSelectedSections:v,updateSectionValue:f,updateValueFromValueStr:b},internalPropsWithDefaults:{disabled:C=!1,readOnly:w=!1}}=e,x=c==="all",k=!x&&!C&&!w,P=de(M=>{if(!s.isReady())return;const L=m.sections[M];s.getSectionContent(M).innerHTML=L.value||L.placeholder,Ks({focused:r,domGetters:s,stateResponse:a})}),S=de(M=>{if(!s.isReady())return;const L=M.target,A=L.textContent??"",F=s.getSectionIndexFromDOMElement(L),E=m.sections[F];if(w){P(F);return}if(A.length===0){if(E.value===""){P(F);return}const B=M.nativeEvent.inputType;if(B==="insertParagraph"||B==="insertLineBreak"){P(F);return}P(F),h();return}i({keyPressed:A,sectionIndex:F}),P(F)}),I=de(M=>{M.preventDefault()}),T=de(M=>{if(M.preventDefault(),w||C||typeof c!="number")return;const L=m.sections[c],A=M.clipboardData.getData("text"),F=/^[a-zA-Z]+$/.test(A),E=/^[0-9]+$/.test(A),B=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(A);L.contentType==="letter"&&F||L.contentType==="digit"&&E||L.contentType==="digit-with-letter"&&B?(g(null),f({section:L,newSectionValue:A,shouldGoToNextSection:!0})):!F&&!E&&(g(null),b(A))}),O=de(M=>{M.preventDefault(),M.dataTransfer.dropEffect="none"}),N=de(M=>()=>{C||v(M)});return p.useCallback((M,L)=>{const A=d[M.type]({currentDate:l.getDateFromSection(y,M),contentType:M.contentType,format:M.format});return{onInput:S,onPaste:T,onMouseUp:I,onDragOver:O,onFocus:N(L),"aria-labelledby":`${o}-${M.type}`,"aria-readonly":w,"aria-valuenow":jw(M,t),"aria-valuemin":A.minimum,"aria-valuemax":A.maximum,"aria-valuetext":M.value?Lw(M,t):n.empty,"aria-label":n[M.type],"aria-disabled":C,tabIndex:x||L>0?-1:0,contentEditable:!x&&!C&&!w,role:"spinbutton",id:`${o}-${M.type}`,"data-range-position":M.dateName||void 0,spellCheck:k?!1:void 0,autoCapitalize:k?"off":void 0,autoCorrect:k?"off":void 0,children:M.value||M.placeholder,inputMode:M.contentType==="letter"?"text":"numeric"}},[d,o,x,C,w,k,n,t,S,T,I,O,N,l,y])}function Lw(e,t){if(e.value)switch(e.type){case"month":{if(e.contentType==="digit")return t.format(t.setMonth(t.date(),Number(e.value)-1),"month");const n=t.parse(e.value,e.format);return n?t.format(n,"month"):void 0}case"day":return e.contentType==="digit"?t.format(t.setDate(t.startOfYear(t.date()),Number(e.value)),"dayOfMonthFull"):e.value;case"weekDay":return;default:return}}function jw(e,t){if(e.value)switch(e.type){case"weekDay":return e.contentType==="letter"?void 0: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 e.contentType==="digit-with-letter"?parseInt(e.value,10):Number(e.value);case"month":{if(e.contentType==="digit")return Number(e.value);const n=t.parse(e.value,e.format);return n?t.getMonth(n)+1:void 0}default:return e.contentType!=="letter"?Number(e.value):void 0}}const Vw=e=>{const{props:t,manager:n,skipContextFieldRefAssignment:o,manager:{valueType:r,internal_useOpenPickerButtonAriaLabel:s}}=e,{internalProps:a,forwardedProps:i}=ql(t,r),l=Yc({manager:n,internalProps:a,skipContextFieldRefAssignment:o}),{sectionListRef:c,onBlur:d,onClick:m,onFocus:y,onInput:h,onPaste:g,onKeyDown:v,onClear:f,clearable:b}=i,{disabled:C=!1,readOnly:w=!1,autoFocus:x=!1,focused:k,unstableFieldRef:P}=l,S=p.useRef(null),I=ot(c,S),T=p.useMemo(()=>({isReady:()=>S.current!=null,getRoot:()=>S.current.getRoot(),getSectionContainer:J=>S.current.getSectionContainer(J),getSectionContent:J=>S.current.getSectionContent(J),getSectionIndexFromDOMElement:J=>S.current.getSectionIndexFromDOMElement(J)}),[S]),O=Uc({manager:n,internalPropsWithDefaults:l,forwardedProps:i}),{areAllSectionsEmpty:N,error:M,parsedSelectedSections:L,sectionOrder:A,state:F,value:E,clearValue:B,setSelectedSections:G}=O,$=Hc({stateResponse:O}),Z=s(E),[W,ne]=p.useState(!1);function te(J=0){if(C||!S.current||wi(S)!=null)return;const Y=_r(J,F.sections);ne(!0),S.current.getSectionContent(Y).focus()}const se=Fw({manager:n,internalPropsWithDefaults:l,stateResponse:O,applyCharacterEditing:$,focused:W,setFocused:ne,domGetters:T}),U=Nw({manager:n,stateResponse:O}),oe=Aw({stateResponse:O,internalPropsWithDefaults:l}),ce=$w({manager:n,stateResponse:O,applyCharacterEditing:$,internalPropsWithDefaults:l,domGetters:T,focused:W}),fe=de(J=>{v?.(J),se.onKeyDown(J)}),re=de(J=>{d?.(J),se.onBlur(J)}),Q=de(J=>{y?.(J),se.onFocus(J)}),_=de(J=>{J.isDefaultPrevented()||(m?.(J),se.onClick(J))}),q=de(J=>{g?.(J),se.onPaste(J)}),X=de(J=>{h?.(J),se.onInput(J)}),K=de((J,...Y)=>{J.preventDefault(),f?.(J,...Y),B(),Ci(S)?G(A.startIndex):te(0)}),ue=p.useMemo(()=>F.sections.map((J,Y)=>{const ee=ce(J,Y);return{container:oe(Y),content:ce(J,Y),before:{children:J.startSeparator},after:{children:J.endSeparator,"data-range-position":J.isEndFormatSeparator?ee["data-range-position"]:void 0}}}),[F.sections,oe,ce]);return p.useEffect(()=>{if(S.current==null)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(`
|
|
120
|
-
`));x&&!C&&S.current&&S.current.getSectionContent(A.startIndex).focus()},[]),dt(()=>{if(!(!W||!S.current)){if(L==="all")S.current.getRoot().focus();else if(typeof L=="number"){const J=S.current.getSectionContent(L);J&&J.focus()}}},[L,W]),dt(()=>{Ks({focused:W,domGetters:T,stateResponse:O})}),p.useImperativeHandle(P,()=>({getSections:()=>F.sections,getActiveSectionIndex:()=>wi(S),setSelectedSections:J=>{if(C||!S.current)return;const Y=_r(J,F.sections);ne((Y==="all"?0:Y)!==null),G(J)},focusField:te,isFieldFocused:()=>Ci(S)})),R({},i,se,{onBlur:re,onClick:_,onFocus:Q,onInput:X,onPaste:q,onKeyDown:fe,onClear:K},U,{error:M,clearable:!!(b&&!N&&!w&&!C),focused:k??W,sectionListRef:I,enableAccessibleFieldDOMStructure:!0,elements:ue,areAllSectionsEmpty:N,disabled:C,readOnly:w,autoFocus:x,openPickerAriaLabel:Z})};function wi(e){const t=nt(document);return!t||!e.current||!e.current.getRoot().contains(t)?null:e.current.getSectionIndexFromDOMElement(t)}function Ci(e){const t=nt(document);return!!e.current&&e.current.getRoot().contains(t)}const Pn=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),Bw=(e,t,n)=>{let o=0,r=n?1:0;const s=[];for(let a=0;a<e.length;a+=1){const i=e[a],l=Ps(i,n?"input-rtl":"input-ltr",t),c=`${i.startSeparator}${l}${i.endSeparator}`,d=Pn(c).length,m=c.length,y=Pn(l),h=r+(y===""?0:l.indexOf(y[0]))+i.startSeparator.length,g=h+y.length;s.push(R({},i,{start:o,end:o+d,startInInput:h,endInInput:g})),o+=d,r+=m}return s},Ww=e=>{const t=wt(),n=Mn(),o=Mn(),{props:r,manager:s,skipContextFieldRefAssignment:a,manager:{valueType:i,internal_valueManager:l,internal_fieldValueManager:c,internal_useOpenPickerButtonAriaLabel:d}}=e,{internalProps:m,forwardedProps:y}=ql(r,i),h=Yc({manager:s,internalProps:m,skipContextFieldRefAssignment:a}),{onFocus:g,onClick:v,onPaste:f,onBlur:b,onKeyDown:C,onClear:w,clearable:x,inputRef:k,placeholder:P}=y,{readOnly:S=!1,disabled:I=!1,autoFocus:T=!1,focused:O,unstableFieldRef:N}=h,M=p.useRef(null),L=ot(k,M),A=Uc({manager:s,internalPropsWithDefaults:h,forwardedProps:y}),{activeSectionIndex:F,areAllSectionsEmpty:E,error:B,localizedDigits:G,parsedSelectedSections:$,sectionOrder:Z,state:W,value:ne,clearValue:te,clearActiveSection:se,setCharacterQuery:U,setSelectedSections:oe,setTempAndroidValueStr:ce,updateSectionValue:fe,updateValueFromValueStr:re,getSectionsFromValue:Q}=A,_=Hc({stateResponse:A}),q=d(ne),X=p.useMemo(()=>Bw(W.sections,G,t),[W.sections,G,t]);function K(){const be=M.current.selectionStart??0;let ve;be<=X[0].startInInput||be>=X[X.length-1].endInInput?ve=1:ve=X.findIndex(Ne=>Ne.startInInput-Ne.startSeparator.length>be);const he=ve===-1?X.length-1:ve-1;oe(he)}function ue(be=0){nt(document)!==M.current&&(M.current?.focus(),oe(be))}const J=de(be=>{g?.(be);const ve=M.current;n.start(0,()=>{!ve||ve!==M.current||F==null&&(ve.value.length&&Number(ve.selectionEnd)-Number(ve.selectionStart)===ve.value.length?oe("all"):K())})}),Y=de((be,...ve)=>{be.isDefaultPrevented()||(v?.(be,...ve),K())}),ee=de(be=>{if(f?.(be),be.preventDefault(),S||I)return;const ve=be.clipboardData.getData("text");if(typeof $=="number"){const he=W.sections[$],Ne=/^[a-zA-Z]+$/.test(ve),Ue=/^[0-9]+$/.test(ve),pe=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(ve);if(he.contentType==="letter"&&Ne||he.contentType==="digit"&&Ue||he.contentType==="digit-with-letter"&&pe){U(null),fe({section:he,newSectionValue:ve,shouldGoToNextSection:!0});return}if(Ne||Ue)return}U(null),re(ve)}),ie=de(be=>{b?.(be),oe(null)}),z=de(be=>{if(S)return;const ve=be.target.value;if(ve===""){te();return}const he=be.nativeEvent.data,Ne=he&&he.length>1,Ue=Ne?he:ve,pe=Pn(Ue);if($==="all"&&oe(F),F==null||Ne){re(Ne?he:pe);return}let Ce;if($==="all"&&pe.length===1)Ce=pe;else{const Me=Pn(c.getV6InputValueFromSections(X,G,t));let xe=-1,Ke=-1;for(let ft=0;ft<Me.length;ft+=1)xe===-1&&Me[ft]!==pe[ft]&&(xe=ft),Ke===-1&&Me[Me.length-ft-1]!==pe[pe.length-ft-1]&&(Ke=ft);const rt=X[F];if(xe<rt.start||Me.length-Ke-1>rt.end)return;const Oo=pe.length-Me.length+rt.end-Pn(rt.endSeparator||"").length;Ce=pe.slice(rt.start+Pn(rt.startSeparator||"").length,Oo)}if(Ce.length===0){Qm()&&ce(Ue),se();return}_({keyPressed:Ce,sectionIndex:F})}),j=de((be,...ve)=>{be.preventDefault(),w?.(be,...ve),te(),Si(M)?oe(Z.startIndex):ue(0)}),H=qc({manager:s,internalPropsWithDefaults:h,stateResponse:A}),ge=de(be=>{C?.(be),H(be)}),ye=p.useMemo(()=>P!==void 0?P:c.getV6InputValueFromSections(Q(l.emptyValue),G,t),[P,c,Q,l.emptyValue,G,t]),Le=p.useMemo(()=>W.tempValueStrAndroid??c.getV6InputValueFromSections(W.sections,G,t),[W.sections,c,W.tempValueStrAndroid,G,t]);p.useEffect(()=>{M.current&&M.current===nt(document)&&oe("all")},[]),dt(()=>{function be(){if(!M.current)return;if($==null){M.current.scrollLeft&&(M.current.scrollLeft=0);return}if(M.current!==nt(document))return;const ve=M.current.scrollTop;if($==="all")M.current.select();else{const he=X[$],Ne=he.type==="empty"?he.startInInput-he.startSeparator.length:he.startInInput,Ue=he.type==="empty"?he.endInInput+he.endSeparator.length:he.endInInput;(Ne!==M.current.selectionStart||Ue!==M.current.selectionEnd)&&M.current===nt(document)&&M.current.setSelectionRange(Ne,Ue),o.start(0,()=>{M.current&&M.current===nt(document)&&M.current.selectionStart===M.current.selectionEnd&&(M.current.selectionStart!==Ne||M.current.selectionEnd!==Ue)&&be()})}M.current.scrollTop=ve}be()});const Pe=p.useMemo(()=>F==null||W.sections[F].contentType==="letter"?"text":"numeric",[F,W.sections]),qe=!(M.current&&M.current===nt(document))&&E;return p.useImperativeHandle(N,()=>({getSections:()=>W.sections,getActiveSectionIndex:()=>{const be=M.current.selectionStart??0,ve=M.current.selectionEnd??0;if(be===0&&ve===0)return null;const he=be<=X[0].startInInput?1:X.findIndex(Ne=>Ne.startInInput-Ne.startSeparator.length>be);return he===-1?X.length-1:he-1},setSelectedSections:be=>oe(be),focusField:ue,isFieldFocused:()=>Si(M)})),R({},y,{error:B,clearable:!!(x&&!E&&!S&&!I),onBlur:ie,onClick:Y,onFocus:J,onPaste:ee,onKeyDown:ge,onClear:j,inputRef:L,enableAccessibleFieldDOMStructure:!1,placeholder:ye,inputMode:Pe,autoComplete:"off",value:qe?"":Le,onChange:z,focused:O,disabled:I,readOnly:S,autoFocus:T,openPickerAriaLabel:q})};function Si(e){return e.current===nt(document)}const Kc=e=>{const t=Bl();return(e.props.enableAccessibleFieldDOMStructure??t?.enableAccessibleFieldDOMStructure??!0?Vw:Ww)(e)};function _w(e={}){const{enableAccessibleFieldDOMStructure:t=!0,ampm:n}=e;return p.useMemo(()=>({valueType:"time",validator:pr,internal_valueManager:et,internal_fieldValueManager:Al,internal_enableAccessibleFieldDOMStructure:t,internal_useApplyDefaultValuesToFieldInternalProps:Hw,internal_useOpenPickerButtonAriaLabel:zw(n)}),[n,t])}function zw(e){return function(n){const o=Te(),r=lt();return p.useMemo(()=>{const s=e??o.is12HourCycleInCurrentLocale()?"fullTime12h":"fullTime24h",a=o.isValid(n)?o.format(n,s):null;return r.openTimePickerDialogue(a)},[n,r,o])}}function Hw(e){const t=Te(),n=Gc(e),o=p.useMemo(()=>e.ampm??t.is12HourCycleInCurrentLocale(),[e.ampm,t]);return p.useMemo(()=>R({},e,n,{format:e.format??(o?t.formats.fullTime12h:t.formats.fullTime24h)}),[e,n,o,t])}function Gc(e){return p.useMemo(()=>({disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1}),[e.disablePast,e.disableFuture])}const Uw=e=>{const t=Fh(e);return Kc({manager:t,props:e})},Yw=["slots","slotProps"],Qc=p.forwardRef(function(t,n){const o=De({props:t,name:"MuiDateField"}),{slots:r,slotProps:s}=o,a=me(o,Yw),i=Bc({slotProps:s,ref:n,externalForwardedProps:a}),l=Uw(i);return u.jsx(Vc,{slots:r,slotProps:s,fieldResponse:l,defaultOpenPickerIcon:Ox})}),Xc=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:o,maxDate:r,disableFuture:s,disablePast:a,timezone:i})=>{const l=fn();return p.useCallback(c=>Do({adapter:l,value:c,timezone:i,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:o,maxDate:r,disableFuture:s,disablePast:a}})!==null,[l,e,t,n,o,r,s,a,i])},qw=(e,t)=>(n,o)=>{switch(o.type){case"setVisibleDate":return R({},n,{slideDirection:o.direction,currentMonth:o.month,isMonthSwitchingAnimating:!t.isSameMonth(o.month,n.currentMonth)&&!e&&!o.skipAnimation,focusedDay:o.focusedDay});case"changeMonthTimezone":{const r=o.newTimezone;if(t.getTimezone(n.currentMonth)===r)return n;let s=t.setTimezone(n.currentMonth,r);return t.getMonth(s)!==t.getMonth(n.currentMonth)&&(s=t.setMonth(s,t.getMonth(n.currentMonth))),R({},n,{currentMonth:s})}case"finishMonthSwitchingAnimation":return R({},n,{isMonthSwitchingAnimating:!1});default:throw new Error("missing support")}},Kw=e=>{const{value:t,referenceDate:n,disableFuture:o,disablePast:r,maxDate:s,minDate:a,onMonthChange:i,onYearChange:l,reduceAnimations:c,shouldDisableDate:d,timezone:m,getCurrentMonthFromVisibleDate:y}=e,h=Te(),g=p.useRef(qw(!!c,h)).current,v=p.useMemo(()=>et.getInitialReferenceValue({value:t,utils:h,timezone:m,props:e,referenceDate:n,granularity:Pt.day}),[n,m]),[f,b]=p.useReducer(g,{isMonthSwitchingAnimating:!1,focusedDay:v,currentMonth:h.startOfMonth(v),slideDirection:"left"}),C=Xc({shouldDisableDate:d,minDate:a,maxDate:s,disableFuture:o,disablePast:r,timezone:m});p.useEffect(()=>{b({type:"changeMonthTimezone",newTimezone:h.getTimezone(v)})},[v,h]);const w=de(({target:k,reason:P})=>{if(P==="cell-interaction"&&f.focusedDay!=null&&h.isSameDay(k,f.focusedDay))return;const S=P==="cell-interaction";let I,T;if(P==="cell-interaction")I=y(k,f.currentMonth),T=k;else if(I=h.isSameMonth(k,f.currentMonth)?f.currentMonth:h.startOfMonth(k),T=k,C(T)){const M=h.startOfMonth(k),L=h.endOfMonth(k);T=po({utils:h,date:T,minDate:h.isBefore(a,M)?M:a,maxDate:h.isAfter(s,L)?L:s,disablePast:r,disableFuture:o,isDateDisabled:C,timezone:m})}const O=!h.isSameMonth(f.currentMonth,I),N=!h.isSameYear(f.currentMonth,I);O&&i?.(I),N&&l?.(h.startOfYear(I)),b({type:"setVisibleDate",month:I,direction:h.isAfterDay(I,f.currentMonth)?"left":"right",focusedDay:f.focusedDay!=null&&T!=null&&h.isSameDay(T,f.focusedDay)?f.focusedDay:T,skipAnimation:S})}),x=p.useCallback(()=>{b({type:"finishMonthSwitchingAnimation"})},[]);return{referenceDate:v,calendarState:f,setVisibleDate:w,isDateDisabled:C,onMonthSwitchingAnimationEnd:x}},Gw=e=>Ve("MuiPickersFadeTransitionGroup",e);We("MuiPickersFadeTransitionGroup",["root"]);const Qw=["children"],Xw=e=>Oe({root:["root"]},Gw,e),Zw=V(ko,{name:"MuiPickersFadeTransitionGroup",slot:"Root"})({display:"block",position:"relative"});function Zc(e){const t=De({props:e,name:"MuiPickersFadeTransitionGroup"}),{className:n,reduceAnimations:o,transKey:r,classes:s}=t,{children:a}=t,i=me(t,Qw),l=Xw(s),c=zn();return o?a:u.jsx(Zw,{className:ae(l.root,n),ownerState:i,children:u.jsx(un,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:c.transitions.duration.enteringScreen,enter:c.transitions.duration.enteringScreen,exit:0},children:a},r)})}function Jw(e){return Ve("MuiPickersDay",e)}const en=We("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]);function Jc(e){const{disabled:t,selected:n,today:o,outsideCurrentMonth:r,day:s,disableMargin:a,disableHighlightToday:i,showDaysOutsideCurrentMonth:l}=e,c=Te(),{ownerState:d}=ze();return p.useMemo(()=>R({},d,{day:s,isDaySelected:n??!1,isDayDisabled:t??!1,isDayCurrent:o??!1,isDayOutsideMonth:r??!1,isDayStartOfWeek:c.isSameDay(s,c.startOfWeek(s)),isDayEndOfWeek:c.isSameDay(s,c.endOfWeek(s)),disableMargin:a??!1,disableHighlightToday:i??!1,showDaysOutsideCurrentMonth:l??!1}),[c,d,s,n,t,o,r,a,i,l])}const eC=["autoFocus","className","classes","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","children","isFirstVisibleCell","isLastVisibleCell","day","selected","disabled","today","outsideCurrentMonth","disableMargin","disableHighlightToday","showDaysOutsideCurrentMonth"],tC=(e,t)=>{const{isDaySelected:n,isDayDisabled:o,isDayCurrent:r,isDayOutsideMonth:s,disableMargin:a,disableHighlightToday:i,showDaysOutsideCurrentMonth:l}=t,c=s&&!l;return Oe({root:["root",n&&!c&&"selected",o&&"disabled",!a&&"dayWithMargin",!i&&r&&"today",s&&l&&"dayOutsideMonth",c&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},Jw,e)},eu=({theme:e})=>R({},e.typography.caption,{width:bo,height:bo,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})`:Ie(e.palette.primary.main,e.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:Ie(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${en.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${en.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}},[`&.${en.disabled}:not(.${en.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${en.disabled}&.${en.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:`0 ${hr}px`}},{props:{isDayOutsideMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(e.vars||e).palette.text.secondary}},{props:{disableHighlightToday:!1,isDayCurrent:!0},style:{[`&:not(.${en.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}}]}),tu=(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]},nC=V(Ln,{name:"MuiPickersDay",slot:"Root",overridesResolver:tu})(eu),oC=V("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:tu})(({theme:e})=>R({},eu({theme:e}),{opacity:0,pointerEvents:"none"})),Zn=()=>{},rC=p.forwardRef(function(t,n){const o=De({props:t,name:"MuiPickersDay"}),{autoFocus:r=!1,className:s,classes:a,isAnimating:i,onClick:l,onDaySelect:c,onFocus:d=Zn,onBlur:m=Zn,onKeyDown:y=Zn,onMouseDown:h=Zn,onMouseEnter:g=Zn,children:v,day:f,selected:b,disabled:C,today:w,outsideCurrentMonth:x,disableMargin:k,disableHighlightToday:P,showDaysOutsideCurrentMonth:S}=o,I=me(o,eC),T=Jc({day:f,selected:b,disabled:C,today:w,outsideCurrentMonth:x,disableMargin:k,disableHighlightToday:P,showDaysOutsideCurrentMonth:S}),O=tC(a,T),N=Te(),M=p.useRef(null),L=ot(M,n);dt(()=>{r&&!C&&!i&&!x&&M.current.focus()},[r,C,i,x]);const A=E=>{h(E),x&&E.preventDefault()},F=E=>{C||c(f),x&&E.currentTarget.focus(),l&&l(E)};return x&&!S?u.jsx(oC,{className:ae(O.root,O.hiddenDaySpacingFiller,s),ownerState:T,role:I.role}):u.jsx(nC,R({className:ae(O.root,s),ref:L,centerRipple:!0,disabled:C,tabIndex:b?0:-1,onKeyDown:E=>y(E,f),onFocus:E=>d(E,f),onBlur:E=>m(E,f),onMouseEnter:E=>g(E,f),onClick:F,onMouseDown:A},I,{ownerState:T,children:v||N.format(f,"dayOfMonth")}))}),sC=p.memo(rC),aC=e=>Ve("MuiPickersSlideTransition",e),mt=We("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),iC=["children","className","reduceAnimations","slideDirection","transKey","classes"],lC=(e,t)=>{const{slideDirection:n}=t,o={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return Oe(o,aC,e)},cC=V(ko,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${mt["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${mt["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${mt.slideEnterActive}`]:t.slideEnterActive},{[`.${mt.slideExit}`]:t.slideExit},{[`.${mt["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${mt["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},[`& .${mt["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${mt["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${mt.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${mt.slideExit}`]:{transform:"translate(0%)"},[`& .${mt["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${mt["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}});function uC(e){const t=De({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:o,reduceAnimations:r,slideDirection:s,transKey:a,classes:i}=t,l=me(t,iC),{ownerState:c}=ze(),d=R({},c,{slideDirection:s}),m=lC(i,d),y=zn();if(r)return u.jsx("div",{className:ae(m.root,o),children:n});const h={exit:m.exit,enterActive:m.enterActive,enter:m.enter,exitActive:m.exitActive};return u.jsx(cC,{className:ae(m.root,o),childFactory:g=>p.cloneElement(g,{classNames:h}),role:"presentation",ownerState:d,children:u.jsx(ps,R({mountOnEnter:!0,unmountOnExit:!0,timeout:y.transitions.duration.complex,classNames:h},l,{children:n}),a)})}const dC=e=>Ve("MuiDayCalendar",e);We("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);const pC=["parentProps","day","focusedDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],fC=["ownerState"],mC=e=>Oe({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},dC,e),nu=(bo+hr*2)*6,hC=V("div",{name:"MuiDayCalendar",slot:"Root"})({}),gC=V("div",{name:"MuiDayCalendar",slot:"Header"})({display:"flex",justifyContent:"center",alignItems:"center"}),bC=V(Wt,{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})),yC=V(Wt,{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})),vC=V(Wt,{name:"MuiDayCalendar",slot:"WeekNumber"})(({theme:e})=>R({},e.typography.caption,{width:bo,height:bo,padding:0,margin:`0 ${hr}px`,color:(e.vars||e).palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),xC=V("div",{name:"MuiDayCalendar",slot:"LoadingContainer"})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:nu}),wC=V(uC,{name:"MuiDayCalendar",slot:"SlideTransition"})({minHeight:nu}),CC=V("div",{name:"MuiDayCalendar",slot:"MonthContainer"})({overflow:"hidden"}),SC=V("div",{name:"MuiDayCalendar",slot:"WeekContainer"})({margin:`${hr}px 0`,display:"flex",justifyContent:"center"});function kC(e){let{parentProps:t,day:n,focusedDay:o,selectedDays:r,isDateDisabled:s,currentMonthNumber:a,isViewFocused:i}=e,l=me(e,pC);const{disabled:c,disableHighlightToday:d,isMonthSwitchingAnimating:m,showDaysOutsideCurrentMonth:y,slots:h,slotProps:g,timezone:v}=t,f=Te(),b=mn(v),C=o!=null&&f.isSameDay(n,o),w=i&&C,x=r.some(A=>f.isSameDay(A,n)),k=f.isSameDay(n,b),P=p.useMemo(()=>c||s(n),[c,s,n]),S=p.useMemo(()=>f.getMonth(n)!==a,[f,n,a]),I=Jc({day:n,selected:x,disabled:P,today:k,outsideCurrentMonth:S,disableMargin:void 0,disableHighlightToday:d,showDaysOutsideCurrentMonth:y}),T=h?.day??sC,O=Ae({elementType:T,externalSlotProps:g?.day,additionalProps:R({disableHighlightToday:d,showDaysOutsideCurrentMonth:y,role:"gridcell",isAnimating:m,"data-timestamp":f.toJsDate(n).valueOf()},l),ownerState:R({},I,{day:n,isDayDisabled:P,isDaySelected:x})}),N=me(O,fC),M=p.useMemo(()=>{const A=f.startOfMonth(f.setMonth(n,a));return y?f.isSameDay(n,f.startOfWeek(A)):f.isSameDay(n,A)},[a,n,y,f]),L=p.useMemo(()=>{const A=f.endOfMonth(f.setMonth(n,a));return y?f.isSameDay(n,f.endOfWeek(A)):f.isSameDay(n,A)},[a,n,y,f]);return u.jsx(T,R({},N,{day:n,disabled:P,autoFocus:!S&&w,today:k,outsideCurrentMonth:S,isFirstVisibleCell:M,isLastVisibleCell:L,selected:x,tabIndex:C?0:-1,"aria-selected":x,"aria-current":k?"date":void 0}))}function PC(e){const t=De({props:e,name:"MuiDayCalendar"}),n=Te(),{onFocusedDayChange:o,className:r,classes:s,currentMonth:a,selectedDays:i,focusedDay:l,loading:c,onSelectedDaysChange:d,onMonthSwitchingAnimationEnd:m,readOnly:y,reduceAnimations:h,renderLoading:g=()=>u.jsx("span",{children:"..."}),slideDirection:v,TransitionProps:f,disablePast:b,disableFuture:C,minDate:w,maxDate:x,shouldDisableDate:k,shouldDisableMonth:P,shouldDisableYear:S,dayOfWeekFormatter:I=_=>n.format(_,"weekdayShort").charAt(0).toUpperCase(),hasFocus:T,onFocusedViewChange:O,gridLabelId:N,displayWeekNumber:M,fixedWeekNumber:L,timezone:A}=t,F=mn(A),E=mC(s),B=wt(),G=Xc({shouldDisableDate:k,shouldDisableMonth:P,shouldDisableYear:S,minDate:w,maxDate:x,disablePast:b,disableFuture:C,timezone:A}),$=lt(),Z=de(_=>{y||d(_)}),W=_=>{G(_)||(o(_),O?.(!0))},ne=de((_,q)=>{switch(_.key){case"ArrowUp":W(n.addDays(q,-7)),_.preventDefault();break;case"ArrowDown":W(n.addDays(q,7)),_.preventDefault();break;case"ArrowLeft":{const X=n.addDays(q,B?1:-1),K=n.addMonths(q,B?1:-1),ue=po({utils:n,date:X,minDate:B?X:n.startOfMonth(K),maxDate:B?n.endOfMonth(K):X,isDateDisabled:G,timezone:A});W(ue||X),_.preventDefault();break}case"ArrowRight":{const X=n.addDays(q,B?-1:1),K=n.addMonths(q,B?-1:1),ue=po({utils:n,date:X,minDate:B?n.startOfMonth(K):X,maxDate:B?X:n.endOfMonth(K),isDateDisabled:G,timezone:A});W(ue||X),_.preventDefault();break}case"Home":W(n.startOfWeek(q)),_.preventDefault();break;case"End":W(n.endOfWeek(q)),_.preventDefault();break;case"PageUp":W(n.addMonths(q,1)),_.preventDefault();break;case"PageDown":W(n.addMonths(q,-1)),_.preventDefault();break}}),te=de((_,q)=>W(q)),se=de((_,q)=>{l!=null&&n.isSameDay(l,q)&&O?.(!1)}),U=n.getMonth(a),oe=n.getYear(a),ce=p.useMemo(()=>i.filter(_=>!!_).map(_=>n.startOfDay(_)),[n,i]),fe=`${oe}-${U}`,re=p.useMemo(()=>p.createRef(),[fe]),Q=p.useMemo(()=>{const _=n.getWeekArray(a);let q=n.addMonths(a,1);for(;L&&_.length<L;){const X=n.getWeekArray(q),K=n.isSameDay(_[_.length-1][0],X[0][0]);X.slice(K?1:0).forEach(ue=>{_.length<L&&_.push(ue)}),q=n.addMonths(q,1)}return _},[a,L,n]);return u.jsxs(hC,{role:"grid","aria-labelledby":N,className:E.root,children:[u.jsxs(gC,{role:"row",className:E.header,children:[M&&u.jsx(yC,{variant:"caption",role:"columnheader","aria-label":$.calendarWeekNumberHeaderLabel,className:E.weekNumberLabel,children:$.calendarWeekNumberHeaderText}),Am(n,F).map((_,q)=>u.jsx(bC,{variant:"caption",role:"columnheader","aria-label":n.format(_,"weekday"),className:E.weekDayLabel,children:I(_)},q.toString()))]}),c?u.jsx(xC,{className:E.loadingContainer,children:g()}):u.jsx(wC,R({transKey:fe,onExited:m,reduceAnimations:h,slideDirection:v,className:ae(r,E.slideTransition)},f,{nodeRef:re,children:u.jsx(CC,{ref:re,role:"rowgroup",className:E.monthContainer,children:Q.map((_,q)=>u.jsxs(SC,{role:"row",className:E.weekContainer,"aria-rowindex":q+1,children:[M&&u.jsx(vC,{className:E.weekNumber,role:"rowheader","aria-label":$.calendarWeekNumberAriaLabelText(n.getWeekNumber(_[0])),children:$.calendarWeekNumberText(n.getWeekNumber(_[0]))}),_.map((X,K)=>u.jsx(kC,{parentProps:t,day:X,selectedDays:ce,isViewFocused:T,focusedDay:l,onKeyDown:ne,onFocus:te,onBlur:se,onDaySelect:Z,isDateDisabled:G,currentMonthNumber:U,"aria-colindex":K+1},X.toString()))]},`week-${_[0]}`))})}))]})}function ou(e){return Ve("MuiMonthCalendar",e)}const Vo=We("MuiMonthCalendar",["root","button","disabled","selected"]),MC=["autoFocus","classes","disabled","selected","value","onClick","onKeyDown","onFocus","onBlur","slots","slotProps"],DC=(e,t)=>{const n={button:["button",t.isMonthDisabled&&"disabled",t.isMonthSelected&&"selected"]};return Oe(n,ou,e)},TC=V("button",{name:"MuiMonthCalendar",slot:"Button",overridesResolver:(e,t)=>[t.button,{[`&.${Vo.disabled}`]:t.disabled},{[`&.${Vo.selected}`]:t.selected}]})(({theme:e})=>R({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})`:Ie(e.palette.action.active,e.palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Ie(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${Vo.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${Vo.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),IC=p.memo(function(t){const{autoFocus:n,classes:o,disabled:r,selected:s,value:a,onClick:i,onKeyDown:l,onFocus:c,onBlur:d,slots:m,slotProps:y}=t,h=me(t,MC),g=p.useRef(null),{ownerState:v}=ze(),f=R({},v,{isMonthDisabled:r,isMonthSelected:s}),b=DC(o,f);dt(()=>{n&&g.current?.focus()},[n]);const C=m?.monthButton??TC,w=Ae({elementType:C,externalSlotProps:y?.monthButton,externalForwardedProps:h,additionalProps:{disabled:r,ref:g,type:"button",role:"radio","aria-checked":s,onClick:x=>i(x,a),onKeyDown:x=>l(x,a),onFocus:x=>c(x,a),onBlur:x=>d(x,a)},ownerState:f,className:b.button});return u.jsx(C,R({},w))}),RC=["autoFocus","className","classes","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"],EC=e=>Oe({root:["root"]},ou,e);function OC(e,t){const n=De({props:e,name:t}),o=To(n);return R({},n,o,{monthsPerRow:n.monthsPerRow??3})}const FC=V("div",{name:"MuiMonthCalendar",slot:"Root",shouldForwardProp:e=>Ft(e)&&e!=="monthsPerRow"})({display:"flex",flexWrap:"wrap",justifyContent:"space-evenly",rowGap:16,padding:"8px 0",width:gr,boxSizing:"border-box",variants:[{props:{monthsPerRow:3},style:{columnGap:24}},{props:{monthsPerRow:4},style:{columnGap:0}}]}),NC=p.forwardRef(function(t,n){const o=OC(t,"MuiMonthCalendar"),{autoFocus:r,className:s,classes:a,value:i,defaultValue:l,referenceDate:c,disabled:d,disableFuture:m,disablePast:y,maxDate:h,minDate:g,onChange:v,shouldDisableMonth:f,readOnly:b,onMonthFocus:C,hasFocus:w,onFocusedViewChange:x,monthsPerRow:k,timezone:P,gridLabelId:S,slots:I,slotProps:T}=o,O=me(o,RC),{value:N,handleValueChange:M,timezone:L}=Gt({name:"MonthCalendar",timezone:P,value:i,defaultValue:l,referenceDate:c,onChange:v,valueManager:et}),A=mn(L),F=wt(),E=Te(),{ownerState:B}=ze(),G=p.useMemo(()=>et.getInitialReferenceValue({value:N,utils:E,props:o,timezone:L,referenceDate:c,granularity:Pt.month}),[]),$=EC(a),Z=p.useMemo(()=>E.getMonth(A),[E,A]),W=p.useMemo(()=>N!=null?E.getMonth(N):null,[N,E]),[ne,te]=p.useState(()=>W||E.getMonth(G)),[se,U]=En({name:"MonthCalendar",state:"hasFocus",controlled:w,default:r??!1}),oe=de(X=>{U(X),x&&x(X)}),ce=p.useCallback(X=>{const K=E.startOfMonth(y&&E.isAfter(A,g)?A:g),ue=E.startOfMonth(m&&E.isBefore(A,h)?A:h),J=E.startOfMonth(X);return E.isBefore(J,K)||E.isAfter(J,ue)?!0:f?f(J):!1},[m,y,h,g,A,f,E]),fe=de((X,K)=>{if(b)return;const ue=E.setMonth(N??G,K);M(ue)}),re=de(X=>{ce(E.setMonth(N??G,X))||(te(X),oe(!0),C&&C(X))});p.useEffect(()=>{te(X=>W!==null&&X!==W?W:X)},[W]);const Q=de((X,K)=>{switch(X.key){case"ArrowUp":re((12+K-3)%12),X.preventDefault();break;case"ArrowDown":re((12+K+3)%12),X.preventDefault();break;case"ArrowLeft":re((12+K+(F?1:-1))%12),X.preventDefault();break;case"ArrowRight":re((12+K+(F?-1:1))%12),X.preventDefault();break}}),_=de((X,K)=>{re(K)}),q=de((X,K)=>{ne===K&&oe(!1)});return u.jsx(FC,R({ref:n,className:ae($.root,s),ownerState:B,role:"radiogroup","aria-labelledby":S,monthsPerRow:k},O,{children:xs(E,N??G).map(X=>{const K=E.getMonth(X),ue=E.format(X,"monthShort"),J=E.format(X,"month"),Y=K===W,ee=d||ce(X);return u.jsx(IC,{selected:Y,value:K,onClick:fe,onKeyDown:Q,autoFocus:se&&K===ne,disabled:ee,tabIndex:K===ne&&!ee?0:-1,onFocus:_,onBlur:q,"aria-current":Z===K?"date":void 0,"aria-label":J,slots:I,slotProps:T,classes:a,children:ue},ue)})}))});function ru(e){return Ve("MuiYearCalendar",e)}const Bo=We("MuiYearCalendar",["root","button","disabled","selected"]),AC=["autoFocus","classes","disabled","selected","value","onClick","onKeyDown","onFocus","onBlur","slots","slotProps"],$C=(e,t)=>{const n={button:["button",t.isYearDisabled&&"disabled",t.isYearSelected&&"selected"]};return Oe(n,ru,e)},LC=V("button",{name:"MuiYearCalendar",slot:"Button",overridesResolver:(e,t)=>[t.button,{[`&.${Bo.disabled}`]:t.disabled},{[`&.${Bo.selected}`]:t.selected}]})(({theme:e})=>R({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})`:Ie(e.palette.action.active,e.palette.action.focusOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Ie(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${Bo.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${Bo.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),jC=p.memo(function(t){const{autoFocus:n,classes:o,disabled:r,selected:s,value:a,onClick:i,onKeyDown:l,onFocus:c,onBlur:d,slots:m,slotProps:y}=t,h=me(t,AC),g=p.useRef(null),{ownerState:v}=ze(),f=R({},v,{isYearDisabled:r,isYearSelected:s}),b=$C(o,f);dt(()=>{n&&g.current?.focus()},[n]);const C=m?.yearButton??LC,w=Ae({elementType:C,externalSlotProps:y?.yearButton,externalForwardedProps:h,additionalProps:{disabled:r,ref:g,type:"button",role:"radio","aria-checked":s,onClick:x=>i(x,a),onKeyDown:x=>l(x,a),onFocus:x=>c(x,a),onBlur:x=>d(x,a)},ownerState:f,className:b.button});return u.jsx(C,R({},w))}),VC=["autoFocus","className","classes","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"],BC=e=>Oe({root:["root"]},ru,e);function WC(e,t){const n=De({props:e,name:t}),o=To(n);return R({},n,o,{yearsPerRow:n.yearsPerRow??3,yearsOrder:n.yearsOrder??"asc"})}const _C=V("div",{name:"MuiYearCalendar",slot:"Root",shouldForwardProp:e=>Ft(e)&&e!=="yearsPerRow"})({display:"flex",flexWrap:"wrap",justifyContent:"space-evenly",rowGap:12,padding:"6px 0",overflowY:"auto",height:"100%",width:gr,maxHeight:Ey,boxSizing:"border-box",position:"relative",variants:[{props:{yearsPerRow:3},style:{columnGap:24}},{props:{yearsPerRow:4},style:{columnGap:0,padding:"0 2px"}}]}),zC=V("div",{name:"MuiYearCalendar",slot:"ButtonFiller"})({height:36,width:72}),HC=p.forwardRef(function(t,n){const o=WC(t,"MuiYearCalendar"),{autoFocus:r,className:s,classes:a,value:i,defaultValue:l,referenceDate:c,disabled:d,disableFuture:m,disablePast:y,maxDate:h,minDate:g,onChange:v,readOnly:f,shouldDisableYear:b,onYearFocus:C,hasFocus:w,onFocusedViewChange:x,yearsOrder:k,yearsPerRow:P,timezone:S,gridLabelId:I,slots:T,slotProps:O}=o,N=me(o,VC),{value:M,handleValueChange:L,timezone:A}=Gt({name:"YearCalendar",timezone:S,value:i,defaultValue:l,referenceDate:c,onChange:v,valueManager:et}),F=mn(A),E=wt(),B=Te(),{ownerState:G}=ze(),$=p.useMemo(()=>et.getInitialReferenceValue({value:M,utils:B,props:o,timezone:A,referenceDate:c,granularity:Pt.year}),[]),Z=BC(a),W=p.useMemo(()=>B.getYear(F),[B,F]),ne=p.useMemo(()=>M!=null?B.getYear(M):null,[M,B]),[te,se]=p.useState(()=>ne||B.getYear($)),[U,oe]=En({name:"YearCalendar",state:"hasFocus",controlled:w,default:r??!1}),ce=de(z=>{oe(z),x&&x(z)}),fe=p.useCallback(z=>{if(y&&B.isBeforeYear(z,F)||m&&B.isAfterYear(z,F)||g&&B.isBeforeYear(z,g)||h&&B.isAfterYear(z,h))return!0;if(!b)return!1;const j=B.startOfYear(z);return b(j)},[m,y,h,g,F,b,B]),re=de((z,j)=>{if(f)return;const H=B.setYear(M??$,j);L(H)}),Q=de(z=>{fe(B.setYear(M??$,z))||(se(z),ce(!0),C?.(z))});p.useEffect(()=>{se(z=>ne!==null&&z!==ne?ne:z)},[ne]);const _=k!=="desc"?P*1:P*-1,q=E&&k==="asc"||!E&&k==="desc"?-1:1,X=de((z,j)=>{switch(z.key){case"ArrowUp":Q(j-_),z.preventDefault();break;case"ArrowDown":Q(j+_),z.preventDefault();break;case"ArrowLeft":Q(j-q),z.preventDefault();break;case"ArrowRight":Q(j+q),z.preventDefault();break}}),K=de((z,j)=>{Q(j)}),ue=de((z,j)=>{te===j&&ce(!1)}),J=p.useRef(null),Y=ot(n,J);p.useEffect(()=>{if(r||J.current===null)return;const z=J.current.querySelector('[tabindex="0"]');if(!z)return;const j=z.offsetHeight,H=z.offsetTop,ge=J.current.clientHeight,ye=J.current.scrollTop,Le=H+j;j>ge||H<ye||(J.current.scrollTop=Le-ge/2-j/2)},[r]);const ee=B.getYearRange([g,h]);k==="desc"&&ee.reverse();let ie=P-ee.length%P;return ie===P&&(ie=0),u.jsxs(_C,R({ref:Y,className:ae(Z.root,s),ownerState:G,role:"radiogroup","aria-labelledby":I,yearsPerRow:P},N,{children:[ee.map(z=>{const j=B.getYear(z),H=j===ne,ge=d||fe(z);return u.jsx(jC,{selected:H,value:j,onClick:re,onKeyDown:X,autoFocus:U&&j===te,disabled:ge,tabIndex:j===te&&!ge?0:-1,onFocus:K,onBlur:ue,"aria-current":W===j?"date":void 0,slots:T,slotProps:O,classes:a,children:B.format(z,"year")},B.format(z,"year"))}),Array.from({length:ie},(z,j)=>u.jsx(zC,{},j))]}))}),UC=e=>Ve("MuiPickersCalendarHeader",e),YC=We("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]);function qC(e){return Ve("MuiPickersArrowSwitcher",e)}We("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);const KC=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId","classes"],GC=["ownerState"],QC=["ownerState"],XC=V("div",{name:"MuiPickersArrowSwitcher",slot:"Root"})({display:"flex"}),ZC=V("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer"})(({theme:e})=>({width:e.spacing(3)})),ki=V(Vn,{name:"MuiPickersArrowSwitcher",slot:"Button"})({variants:[{props:{isButtonHidden:!0},style:{visibility:"hidden"}}]}),JC=e=>Oe({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},qC,e),su=p.forwardRef(function(t,n){const o=wt(),r=De({props:t,name:"MuiPickersArrowSwitcher"}),{children:s,className:a,slots:i,slotProps:l,isNextDisabled:c,isNextHidden:d,onGoToNext:m,nextLabel:y,isPreviousDisabled:h,isPreviousHidden:g,onGoToPrevious:v,previousLabel:f,labelId:b,classes:C}=r,w=me(r,KC),{ownerState:x}=ze(),k=JC(C),P={isDisabled:c,isHidden:d,goTo:m,label:y},S={isDisabled:h,isHidden:g,goTo:v,label:f},I=i?.previousIconButton??ki,T=Ae({elementType:I,externalSlotProps:l?.previousIconButton,additionalProps:{size:"medium",title:S.label,"aria-label":S.label,disabled:S.isDisabled,edge:"end",onClick:S.goTo},ownerState:R({},x,{isButtonHidden:S.isHidden??!1}),className:ae(k.button,k.previousIconButton)}),O=i?.nextIconButton??ki,N=Ae({elementType:O,externalSlotProps:l?.nextIconButton,additionalProps:{size:"medium",title:P.label,"aria-label":P.label,disabled:P.isDisabled,edge:"start",onClick:P.goTo},ownerState:R({},x,{isButtonHidden:P.isHidden??!1}),className:ae(k.button,k.nextIconButton)}),M=i?.leftArrowIcon??Rx,L=Ae({elementType:M,externalSlotProps:l?.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:x,className:k.leftArrowIcon}),A=me(L,GC),F=i?.rightArrowIcon??Ex,E=Ae({elementType:F,externalSlotProps:l?.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:x,className:k.rightArrowIcon}),B=me(E,QC);return u.jsxs(XC,R({ref:n,className:ae(k.root,a),ownerState:x},w,{children:[u.jsx(I,R({},T,{children:o?u.jsx(F,R({},B)):u.jsx(M,R({},A))})),s?u.jsx(Wt,{variant:"subtitle1",component:"span",id:b,children:s}):u.jsx(ZC,{className:k.spacer,ownerState:x}),u.jsx(O,R({},N,{children:o?u.jsx(M,R({},A)):u.jsx(F,R({},B))}))]}))});function eS(e,{disableFuture:t,maxDate:n,timezone:o}){const r=Te();return p.useMemo(()=>{const s=r.date(void 0,o),a=r.startOfMonth(t&&r.isBefore(s,n)?s:n);return!r.isAfter(a,e)},[t,n,e,r,o])}function tS(e,{disablePast:t,minDate:n,timezone:o}){const r=Te();return p.useMemo(()=>{const s=r.date(void 0,o),a=r.startOfMonth(t&&r.isAfter(s,n)?s:n);return!r.isBefore(a,e)},[t,n,e,r,o])}function Gs(e,t,n,o){const r=Te(),s=p.useMemo(()=>r.isValid(e)?e:null,[r,e]),a=jm(s,r),i=p.useCallback(l=>{const c=s==null?null:Vm(s,l,!!t,r);n(c,o??"partial")},[t,s,n,o,r]);return{meridiemMode:a,handleMeridiemChange:i}}const nS=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","classes","timezone","format"],oS=["ownerState"],rS=e=>Oe({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},UC,e),sS=V("div",{name:"MuiPickersCalendarHeader",slot:"Root"})({display:"flex",alignItems:"center",marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),aS=V("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer"})(({theme:e})=>R({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),iS=V("div",{name:"MuiPickersCalendarHeader",slot:"Label"})({marginRight:6}),lS=V(Vn,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton"})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${YC.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),cS=V(Ix,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon"})(({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"})),uS=p.forwardRef(function(t,n){const o=lt(),r=Te(),s=De({props:t,name:"MuiPickersCalendarHeader"}),{slots:a,slotProps:i,currentMonth:l,disabled:c,disableFuture:d,disablePast:m,maxDate:y,minDate:h,onMonthChange:g,onViewChange:v,view:f,reduceAnimations:b,views:C,labelId:w,className:x,classes:k,timezone:P,format:S=`${r.formats.month} ${r.formats.year}`}=s,I=me(s,nS),{ownerState:T}=ze(),O=rS(k),N=a?.switchViewButton??lS,M=Ae({elementType:N,externalSlotProps:i?.switchViewButton,additionalProps:{size:"small","aria-label":o.calendarViewSwitchingButtonAriaLabel(f)},ownerState:T,className:O.switchViewButton}),L=a?.switchViewIcon??cS,A=Ae({elementType:L,externalSlotProps:i?.switchViewIcon,ownerState:T,className:O.switchViewIcon}),F=me(A,oS),E=()=>g(r.addMonths(l,1)),B=()=>g(r.addMonths(l,-1)),G=eS(l,{disableFuture:d,maxDate:y,timezone:P}),$=tS(l,{disablePast:m,minDate:h,timezone:P}),Z=()=>{if(!(C.length===1||!v||c))if(C.length===2)v(C.find(ne=>ne!==f)||C[0]);else{const ne=C.indexOf(f)!==0?0:1;v(C[ne])}};if(C.length===1&&C[0]==="year")return null;const W=r.formatByString(l,S);return u.jsxs(sS,R({},I,{ownerState:T,className:ae(O.root,x),ref:n,children:[u.jsxs(aS,{role:"presentation",onClick:Z,ownerState:T,"aria-live":"polite",className:O.labelContainer,children:[u.jsx(Zc,{reduceAnimations:b,transKey:W,children:u.jsx(iS,{id:w,ownerState:T,className:O.label,children:W})}),C.length>1&&!c&&u.jsx(N,R({},M,{children:u.jsx(L,R({},F))}))]}),u.jsx(un,{in:f==="day",appear:!b,enter:!b,children:u.jsx(su,{slots:a,slotProps:i,onGoToPrevious:B,isPreviousDisabled:$,previousLabel:o.previousMonth,onGoToNext:E,isNextDisabled:G,nextLabel:o.nextMonth})})]}))}),kr=V("div")({overflow:"hidden",width:gr,maxHeight:$s,display:"flex",flexDirection:"column",margin:"0 auto"}),dS=e=>Ve("MuiDateCalendar",e);We("MuiDateCalendar",["root","viewTransitionContainer"]);const pS=["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"],fS=e=>Oe({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},dS,e);function mS(e,t){const n=De({props:e,name:t}),o=cc(n.reduceAnimations),r=To(n);return R({},n,r,{loading:n.loading??!1,openTo:n.openTo??"day",views:n.views??["year","day"],reduceAnimations:o,renderLoading:n.renderLoading??(()=>u.jsx("span",{children:"..."}))})}const hS=V(kr,{name:"MuiDateCalendar",slot:"Root"})({display:"flex",flexDirection:"column",height:$s}),gS=V(Zc,{name:"MuiDateCalendar",slot:"ViewTransitionContainer"})({}),bS=p.forwardRef(function(t,n){const o=Te(),{ownerState:r}=ze(),s=Po(),a=mS(t,"MuiDateCalendar"),{autoFocus:i,onViewChange:l,value:c,defaultValue:d,referenceDate:m,disableFuture:y,disablePast:h,onChange:g,onMonthChange:v,reduceAnimations:f,shouldDisableDate:b,shouldDisableMonth:C,shouldDisableYear:w,view:x,views:k,openTo:P,className:S,classes:I,disabled:T,readOnly:O,minDate:N,maxDate:M,disableHighlightToday:L,focusedView:A,onFocusedViewChange:F,showDaysOutsideCurrentMonth:E,fixedWeekNumber:B,dayOfWeekFormatter:G,slots:$,slotProps:Z,loading:W,renderLoading:ne,displayWeekNumber:te,yearsOrder:se,yearsPerRow:U,monthsPerRow:oe,timezone:ce}=a,fe=me(a,pS),{value:re,handleValueChange:Q,timezone:_}=Gt({name:"DateCalendar",timezone:ce,value:c,defaultValue:d,referenceDate:m,onChange:g,valueManager:et}),{view:q,setView:X,focusedView:K,setFocusedView:ue,goToNextView:J,setValueAndGoToNextView:Y}=Eo({view:x,views:k,openTo:P,onChange:Q,onViewChange:l,autoFocus:i,focusedView:A,onFocusedViewChange:F}),{referenceDate:ee,calendarState:ie,setVisibleDate:z,isDateDisabled:j,onMonthSwitchingAnimationEnd:H}=Kw({value:re,referenceDate:m,reduceAnimations:f,onMonthChange:v,minDate:N,maxDate:M,shouldDisableDate:b,disablePast:h,disableFuture:y,timezone:_,getCurrentMonthFromVisibleDate:(xe,Ke)=>o.isSameMonth(xe,Ke)?Ke:o.startOfMonth(xe)}),ge=T&&re||N,ye=T&&re||M,Le=`${s}-grid-label`,Pe=K!==null,_e=$?.calendarHeader??uS,qe=Ae({elementType:_e,externalSlotProps:Z?.calendarHeader,additionalProps:{views:k,view:q,currentMonth:ie.currentMonth,onViewChange:X,onMonthChange:xe=>z({target:xe,reason:"header-navigation"}),minDate:ge,maxDate:ye,disabled:T,disablePast:h,disableFuture:y,reduceAnimations:f,timezone:_,labelId:Le},ownerState:r}),be=de(xe=>{const Ke=o.startOfMonth(xe),rt=o.endOfMonth(xe),St=j(xe)?po({utils:o,date:xe,minDate:o.isBefore(N,Ke)?Ke:N,maxDate:o.isAfter(M,rt)?rt:M,disablePast:h,disableFuture:y,isDateDisabled:j,timezone:_}):xe;St?(Y(St,"finish"),z({target:St,reason:"cell-interaction"})):(J(),z({target:Ke,reason:"cell-interaction"}))}),ve=de(xe=>{const Ke=o.startOfYear(xe),rt=o.endOfYear(xe),St=j(xe)?po({utils:o,date:xe,minDate:o.isBefore(N,Ke)?Ke:N,maxDate:o.isAfter(M,rt)?rt:M,disablePast:h,disableFuture:y,isDateDisabled:j,timezone:_}):xe;St?(Y(St,"finish"),z({target:St,reason:"cell-interaction"})):(J(),z({target:Ke,reason:"cell-interaction"}))}),he=de(xe=>Q(xe&&Xo(o,xe,re??ee),"finish",q));p.useEffect(()=>{o.isValid(re)&&z({target:re,reason:"controlled-value-change"})},[re]);const Ne=fS(I),Ue={disablePast:h,disableFuture:y,maxDate:M,minDate:N},pe={disableHighlightToday:L,readOnly:O,disabled:T,timezone:_,gridLabelId:Le,slots:$,slotProps:Z},Ce=p.useRef(q);p.useEffect(()=>{Ce.current!==q&&(K===Ce.current&&ue(q,!0),Ce.current=q)},[K,ue,q]);const Me=p.useMemo(()=>[re],[re]);return u.jsxs(hS,R({ref:n,className:ae(Ne.root,S),ownerState:r},fe,{children:[u.jsx(_e,R({},qe,{slots:$,slotProps:Z})),u.jsx(gS,{reduceAnimations:f,className:Ne.viewTransitionContainer,transKey:q,ownerState:r,children:u.jsxs("div",{children:[q==="year"&&u.jsx(HC,R({},Ue,pe,{value:re,onChange:ve,shouldDisableYear:w,hasFocus:Pe,onFocusedViewChange:xe=>ue("year",xe),yearsOrder:se,yearsPerRow:U,referenceDate:ee})),q==="month"&&u.jsx(NC,R({},Ue,pe,{hasFocus:Pe,className:S,value:re,onChange:be,shouldDisableMonth:C,onFocusedViewChange:xe=>ue("month",xe),monthsPerRow:oe,referenceDate:ee})),q==="day"&&u.jsx(PC,R({},ie,Ue,pe,{onMonthSwitchingAnimationEnd:H,hasFocus:Pe,onFocusedDayChange:xe=>z({target:xe,reason:"cell-interaction"}),reduceAnimations:f,selectedDays:Me,onSelectedDaysChange:he,shouldDisableDate:b,shouldDisableMonth:C,shouldDisableYear:w,onFocusedViewChange:xe=>ue("day",xe),showDaysOutsideCurrentMonth:E,fixedWeekNumber:B,dayOfWeekFormatter:G,displayWeekNumber:te,loading:W,renderLoading:ne}))]})})]}))}),In=({view:e,onViewChange:t,views:n,focusedView:o,onFocusedViewChange:r,value:s,defaultValue:a,referenceDate:i,onChange:l,className:c,classes:d,disableFuture:m,disablePast:y,minDate:h,maxDate:g,shouldDisableDate:v,shouldDisableMonth:f,shouldDisableYear:b,reduceAnimations:C,onMonthChange:w,monthsPerRow:x,onYearChange:k,yearsOrder:P,yearsPerRow:S,slots:I,slotProps:T,loading:O,renderLoading:N,disableHighlightToday:M,readOnly:L,disabled:A,showDaysOutsideCurrentMonth:F,dayOfWeekFormatter:E,sx:B,autoFocus:G,fixedWeekNumber:$,displayWeekNumber:Z,timezone:W})=>u.jsx(bS,{view:e,onViewChange:t,views:n.filter(Ea),focusedView:o&&Ea(o)?o:null,onFocusedViewChange:r,value:s,defaultValue:a,referenceDate:i,onChange:l,className:c,classes:d,disableFuture:m,disablePast:y,minDate:h,maxDate:g,shouldDisableDate:v,shouldDisableMonth:f,shouldDisableYear:b,reduceAnimations:C,onMonthChange:w,monthsPerRow:x,onYearChange:k,yearsOrder:P,yearsPerRow:S,slots:I,slotProps:T,loading:O,renderLoading:N,disableHighlightToday:M,readOnly:L,disabled:A,showDaysOutsideCurrentMonth:F,dayOfWeekFormatter:E,sx:B,autoFocus:G,fixedWeekNumber:$,displayWeekNumber:Z,timezone:W}),au=p.forwardRef(function(t,n){const o=Te(),r=Gl(t,"MuiDesktopDatePicker"),s=R({day:In,month:In,year:In},r.viewRenderers),a=R({},r,{closeOnSelect:r.closeOnSelect??!0,viewRenderers:s,format:Cs(o,r,!1),yearsPerRow:r.yearsPerRow??4,slots:R({field:Qc},r.slots),slotProps:R({},r.slotProps,{field:l=>R({},ln(r.slotProps?.field,l),dr(r)),toolbar:R({hidden:!0},r.slotProps?.toolbar)})}),{renderPicker:i}=zc({ref:n,props:a,valueManager:et,valueType:"date",validator:Do,steps:null});return i()});au.propTypes={autoFocus:D.bool,className:D.string,closeOnSelect:D.bool,dayOfWeekFormatter:D.func,defaultValue:D.object,disabled:D.bool,disableFuture:D.bool,disableHighlightToday:D.bool,disableOpenPicker:D.bool,disablePast:D.bool,displayWeekNumber:D.bool,enableAccessibleFieldDOMStructure:D.any,fixedWeekNumber:D.number,format:D.string,formatDensity:D.oneOf(["dense","spacious"]),inputRef:cr,label:D.node,loading:D.bool,localeText:D.object,maxDate:D.object,minDate:D.object,monthsPerRow:D.oneOf([3,4]),name:D.string,onAccept:D.func,onChange:D.func,onClose:D.func,onError:D.func,onMonthChange:D.func,onOpen:D.func,onSelectedSectionsChange:D.func,onViewChange:D.func,onYearChange:D.func,open:D.bool,openTo:D.oneOf(["day","month","year"]),orientation:D.oneOf(["landscape","portrait"]),readOnly:D.bool,reduceAnimations:D.bool,referenceDate:D.object,renderLoading:D.func,selectedSections:D.oneOfType([D.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),D.number]),shouldDisableDate:D.func,shouldDisableMonth:D.func,shouldDisableYear:D.func,showDaysOutsideCurrentMonth:D.bool,slotProps:D.object,slots:D.object,sx:D.oneOfType([D.arrayOf(D.oneOfType([D.func,D.object,D.bool])),D.func,D.object]),timezone:D.string,value:D.object,view:D.oneOf(["day","month","year"]),viewRenderers:D.shape({day:D.func,month:D.func,year:D.func}),views:D.arrayOf(D.oneOf(["day","month","year"]).isRequired),yearsOrder:D.oneOf(["asc","desc"]),yearsPerRow:D.oneOf([3,4])};function yS(e){return Re("MuiDialogContent",e)}Se("MuiDialogContent",["root","dividers"]);const vS=Se("MuiDialogTitle",["root"]),xS=e=>{const{classes:t,dividers:n}=e;return Ee({root:["root",n&&"dividers"]},yS,t)},wS=V("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(Be(({theme:e})=>({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:({ownerState:t})=>t.dividers,style:{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>!t.dividers,style:{[`.${vS.root} + &`]:{paddingTop:0}}}]}))),CS=p.forwardRef(function(t,n){const o=Fe({props:t,name:"MuiDialogContent"}),{className:r,dividers:s=!1,...a}=o,i={...o,dividers:s},l=xS(i);return u.jsx(wS,{className:ae(l.root,r),ownerState:i,ref:n,...a})});function SS(e){return Re("MuiDialog",e)}const co=Se("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),kS=p.createContext({}),PS=V(Sc,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),MS=e=>{const{classes:t,scroll:n,maxWidth:o,fullWidth:r,fullScreen:s}=e,a={root:["root"],container:["container",`scroll${le(n)}`],paper:["paper",`paperScroll${le(n)}`,`paperWidth${le(String(o))}`,r&&"paperFullWidth",s&&"paperFullScreen"]};return Ee(a,SS,t)},DS=V(kc,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),TS=V("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${le(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"}}}]}),IS=V(fr,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${le(n.scroll)}`],t[`paperWidth${le(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(Be(({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:t})=>!t.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${co.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(e.breakpoints.values).filter(t=>t!=="xs").map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`,[`&.${co.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t]+32*2)]:{maxWidth:"calc(100% - 64px)"}}}})),{props:({ownerState:t})=>t.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:t})=>t.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${co.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),RS=p.forwardRef(function(t,n){const o=Fe({props:t,name:"MuiDialog"}),r=zn(),s={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":i,"aria-modal":l=!0,BackdropComponent:c,BackdropProps:d,children:m,className:y,disableEscapeKeyDown:h=!1,fullScreen:g=!1,fullWidth:v=!1,maxWidth:f="sm",onBackdropClick:b,onClick:C,onClose:w,open:x,PaperComponent:k=fr,PaperProps:P={},scroll:S="paper",slots:I={},slotProps:T={},TransitionComponent:O=un,transitionDuration:N=s,TransitionProps:M,...L}=o,A={...o,disableEscapeKeyDown:h,fullScreen:g,fullWidth:v,maxWidth:f,scroll:S},F=MS(A),E=p.useRef(),B=K=>{E.current=K.target===K.currentTarget},G=K=>{C&&C(K),E.current&&(E.current=null,b&&b(K),w&&w(K,"backdropClick"))},$=Co(i),Z=p.useMemo(()=>({titleId:$}),[$]),W={transition:O,...I},ne={transition:M,paper:P,backdrop:d,...T},te={slots:W,slotProps:ne},[se,U]=Xe("root",{elementType:DS,shouldForwardComponentProp:!0,externalForwardedProps:te,ownerState:A,className:ae(F.root,y),ref:n}),[oe,ce]=Xe("backdrop",{elementType:PS,shouldForwardComponentProp:!0,externalForwardedProps:te,ownerState:A}),[fe,re]=Xe("paper",{elementType:IS,shouldForwardComponentProp:!0,externalForwardedProps:te,ownerState:A,className:ae(F.paper,P.className)}),[Q,_]=Xe("container",{elementType:TS,externalForwardedProps:te,ownerState:A,className:ae(F.container)}),[q,X]=Xe("transition",{elementType:un,externalForwardedProps:te,ownerState:A,additionalProps:{appear:!0,in:x,timeout:N,role:"presentation"}});return u.jsx(se,{closeAfterTransition:!0,slots:{backdrop:oe},slotProps:{backdrop:{transitionDuration:N,as:c,...ce}},disableEscapeKeyDown:h,onClose:w,open:x,onClick:G,...U,...L,children:u.jsx(q,{...X,children:u.jsx(Q,{onMouseDown:B,..._,children:u.jsx(fe,{as:k,elevation:24,role:"dialog","aria-describedby":a,"aria-labelledby":$,"aria-modal":l,...re,children:u.jsx(kS.Provider,{value:Z,children:m})})})})})}),ES=V(RS)({[`& .${co.container}`]:{outline:0},[`& .${co.paper}`]:{outline:0,minWidth:gr}}),OS=V(CS)({"&:first-of-type":{padding:0}});function FS(e){const{children:t,slots:n,slotProps:o}=e,{open:r}=pn(),{dismissViews:s,onPopperExited:a}=ze(),i=n?.dialog??ES,l=n?.mobileTransition??un;return u.jsx(i,R({open:r,onClose:()=>{s(),a?.()}},o?.dialog,{TransitionComponent:l,TransitionProps:o?.mobileTransition,PaperComponent:n?.mobilePaper,PaperProps:o?.mobilePaper,children:u.jsx(OS,{children:t})}))}const NS=["props","steps"],AS=["ownerState"],iu=e=>{let{props:t,steps:n}=e,o=me(e,NS);const{slots:r,slotProps:s,label:a,inputRef:i,localeText:l}=t,c=_c({steps:n}),{providerProps:d,renderCurrentView:m,ownerState:y}=dc(R({},o,{props:t,localeText:l,autoFocusView:!0,viewContainerRole:"dialog",variant:"mobile",getStepNavigation:c})),h=d.privateContextValue.labelId,g=s?.toolbar?.hidden??!1,v=r.field,f=Ae({elementType:v,externalSlotProps:s?.field,additionalProps:R({},g&&{id:h}),ownerState:y}),b=me(f,AS),C=r.layout??yc;let w=h;g&&(a?w=`${h}-label`:w=void 0);const x=R({},s,{toolbar:R({},s?.toolbar,{titleId:h}),mobilePaper:R({"aria-labelledby":w},s?.mobilePaper)});return{renderPicker:()=>u.jsx(zl,R({},d,{children:u.jsxs(Wc,{slots:r,slotProps:x,inputRef:i,children:[u.jsx(v,R({},b)),u.jsx(FS,{slots:r,slotProps:x,children:u.jsx(C,R({},x?.layout,{slots:r,slotProps:x,children:m()}))})]})}))}},lu=p.forwardRef(function(t,n){const o=Te(),r=Gl(t,"MuiMobileDatePicker"),s=R({day:In,month:In,year:In},r.viewRenderers),a=R({},r,{viewRenderers:s,format:Cs(o,r,!1),slots:R({field:Qc},r.slots),slotProps:R({},r.slotProps,{field:l=>R({},ln(r.slotProps?.field,l),dr(r)),toolbar:R({hidden:!1},r.slotProps?.toolbar)})}),{renderPicker:i}=iu({ref:n,props:a,valueManager:et,valueType:"date",validator:Do,steps:null});return i()});lu.propTypes={autoFocus:D.bool,className:D.string,closeOnSelect:D.bool,dayOfWeekFormatter:D.func,defaultValue:D.object,disabled:D.bool,disableFuture:D.bool,disableHighlightToday:D.bool,disableOpenPicker:D.bool,disablePast:D.bool,displayWeekNumber:D.bool,enableAccessibleFieldDOMStructure:D.any,fixedWeekNumber:D.number,format:D.string,formatDensity:D.oneOf(["dense","spacious"]),inputRef:cr,label:D.node,loading:D.bool,localeText:D.object,maxDate:D.object,minDate:D.object,monthsPerRow:D.oneOf([3,4]),name:D.string,onAccept:D.func,onChange:D.func,onClose:D.func,onError:D.func,onMonthChange:D.func,onOpen:D.func,onSelectedSectionsChange:D.func,onViewChange:D.func,onYearChange:D.func,open:D.bool,openTo:D.oneOf(["day","month","year"]),orientation:D.oneOf(["landscape","portrait"]),readOnly:D.bool,reduceAnimations:D.bool,referenceDate:D.object,renderLoading:D.func,selectedSections:D.oneOfType([D.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),D.number]),shouldDisableDate:D.func,shouldDisableMonth:D.func,shouldDisableYear:D.func,showDaysOutsideCurrentMonth:D.bool,slotProps:D.object,slots:D.object,sx:D.oneOfType([D.arrayOf(D.oneOfType([D.func,D.object,D.bool])),D.func,D.object]),timezone:D.string,value:D.object,view:D.oneOf(["day","month","year"]),viewRenderers:D.shape({day:D.func,month:D.func,year:D.func}),views:D.arrayOf(D.oneOf(["day","month","year"]).isRequired),yearsOrder:D.oneOf(["asc","desc"]),yearsPerRow:D.oneOf([3,4])};const $S=["desktopModeMediaQuery"],LS=p.forwardRef(function(t,n){const o=De({props:t,name:"MuiDatePicker"}),{desktopModeMediaQuery:r=lc}=o,s=me(o,$S);return ys(r,{defaultMatches:!0})?u.jsx(au,R({ref:n},s)):u.jsx(lu,R({ref:n},s))}),jS=e=>{const t=_w(e);return Kc({manager:t,props:e})},VS=["slots","slotProps","InputProps","inputProps"],cu=p.forwardRef(function(t,n){const o=De({props:t,name:"MuiTimeField"}),{slots:r,slotProps:s}=o,a=me(o,VS),i=Bc({slotProps:s,ref:n,externalForwardedProps:a}),l=jS(i);return u.jsx(Vc,{slots:r,slotProps:s,fieldResponse:l,defaultOpenPickerIcon:Fx})});function BS(e){return Ve("MuiPickersToolbarText",e)}We("MuiPickersToolbarText",["root"]);const WS=["className","classes","selected","value"],_S=e=>Oe({root:["root"]},BS,e),zS=V(Wt,{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}})),uu=p.forwardRef(function(t,n){const o=De({props:t,name:"MuiPickersToolbarText"}),{className:r,classes:s,selected:a,value:i}=o,l=me(o,WS),c=_S(s);return u.jsx(zS,R({ref:n,className:ae(c.root,r),component:"span",ownerState:o},a&&{"data-selected":!0},l,{children:i}))}),HS=["align","className","classes","selected","typographyClassName","value","variant","width"],US=e=>Oe({root:["root"]},$l,e),YS=V(Ut,{name:"MuiPickersToolbarButton",slot:"Root"})({padding:0,minWidth:16,textTransform:"none"}),Jn=p.forwardRef(function(t,n){const o=De({props:t,name:"MuiPickersToolbarButton"}),{align:r,className:s,classes:a,selected:i,typographyClassName:l,value:c,variant:d,width:m}=o,y=me(o,HS),h=US(a);return u.jsx(YS,R({variant:"text",ref:n,className:ae(h.root,s),ownerState:o},m?{sx:{width:m}}:{},y,{children:u.jsx(uu,{align:r,className:l,variant:d,value:c,selected:i})}))});function qS(e){return Ve("MuiTimePickerToolbar",e)}const uo=We("MuiTimePickerToolbar",["root","separator","hourMinuteLabel","hourMinuteLabelLandscape","hourMinuteLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),KS=["ampm","ampmInClock","className","classes"],GS=(e,t)=>{const{pickerOrientation:n,toolbarDirection:o}=t;return Oe({root:["root"],separator:["separator"],hourMinuteLabel:["hourMinuteLabel",n==="landscape"&&"hourMinuteLabelLandscape",o==="rtl"&&"hourMinuteLabelReverse"],ampmSelection:["ampmSelection",n==="landscape"&&"ampmLandscape"],ampmLabel:["ampmLabel"]},qS,e)},QS=V(Hl,{name:"MuiTimePickerToolbar",slot:"Root"})({}),XS=V(uu,{name:"MuiTimePickerToolbar",slot:"Separator"})({outline:0,margin:"0 4px 0 2px",cursor:"default"}),ZS=V("div",{name:"MuiTimePickerToolbar",slot:"HourMinuteLabel",overridesResolver:(e,t)=>[{[`&.${uo.hourMinuteLabelLandscape}`]:t.hourMinuteLabelLandscape,[`&.${uo.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"}}]}),JS=V("div",{name:"MuiTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[`.${uo.ampmLabel}`]:t.ampmLabel},{[`&.${uo.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12,[`& .${uo.ampmLabel}`]:{fontSize:17},variants:[{props:{pickerOrientation:"landscape"},style:{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",flexBasis:"100%"}}]});function ek(e){const t=De({props:e,name:"MuiTimePickerToolbar"}),{ampm:n,ampmInClock:o,className:r,classes:s}=t,a=me(t,KS),i=Te(),l=lt(),c=Ds(),d=GS(s,c),{value:m,setValue:y,disabled:h,readOnly:g,view:v,setView:f,views:b}=pn(),C=!!(n&&!o&&b.includes("hours")),{meridiemMode:w,handleMeridiemChange:x}=Gs(m,n,S=>y(S,{changeImportance:"set"})),k=S=>i.isValid(m)?i.format(m,S):"--",P=u.jsx(XS,{tabIndex:-1,value:":",variant:"h3",selected:!1,className:d.separator});return u.jsxs(QS,R({landscapeDirection:"row",toolbarTitle:l.timePickerToolbarTitle,ownerState:c,className:ae(d.root,r)},a,{children:[u.jsxs(ZS,{className:d.hourMinuteLabel,ownerState:c,children:[Cn(b,"hours")&&u.jsx(Jn,{tabIndex:-1,variant:"h3",onClick:()=>f("hours"),selected:v==="hours",value:k(n?"hours12h":"hours24h")}),Cn(b,["hours","minutes"])&&P,Cn(b,"minutes")&&u.jsx(Jn,{tabIndex:-1,variant:"h3",onClick:()=>f("minutes"),selected:v==="minutes",value:k("minutes")}),Cn(b,["minutes","seconds"])&&P,Cn(b,"seconds")&&u.jsx(Jn,{variant:"h3",onClick:()=>f("seconds"),selected:v==="seconds",value:k("seconds")})]}),C&&u.jsxs(JS,{className:d.ampmSelection,ownerState:c,children:[u.jsx(Jn,{disableRipple:!0,variant:"subtitle2",selected:w==="am",typographyClassName:d.ampmLabel,value:Yt(i,"am"),onClick:g?void 0:()=>x("am"),disabled:h}),u.jsx(Jn,{disableRipple:!0,variant:"subtitle2",selected:w==="pm",typographyClassName:d.ampmLabel,value:Yt(i,"pm"),onClick:g?void 0:()=>x("pm"),disabled:h})]})]}))}function du(e,t){const n=Te(),o=De({props:e,name:t}),r=Gc(o),s=o.ampm??n.is12HourCycleInCurrentLocale(),a=p.useMemo(()=>o.localeText?.toolbarTitle==null?o.localeText:R({},o.localeText,{timePickerToolbarTitle:o.localeText.toolbarTitle}),[o.localeText]);return R({},o,r,{ampm:s,localeText:a},Tl({views:o.views,openTo:o.openTo,defaultViews:["hours","minutes"],defaultOpenTo:"hours"}),{slots:R({toolbar:ek},o.slots),slotProps:R({},o.slotProps,{toolbar:R({ampm:s,ampmInClock:o.ampmInClock},o.slotProps?.toolbar)})})}function tk(e){return Ve("MuiTimeClock",e)}We("MuiTimeClock",["root","arrowSwitcher"]);const Bn=220,jt=36,yo={x:Bn/2,y:Bn/2},pu={x:yo.x,y:0},nk=pu.x-yo.x,ok=pu.y-yo.y,rk=e=>e*(180/Math.PI),fu=(e,t,n)=>{const o=t-yo.x,r=n-yo.y,s=Math.atan2(nk,ok)-Math.atan2(o,r);let a=rk(s);a=Math.round(a/e)*e,a%=360;const i=Math.floor(a/e)||0,l=o**2+r**2,c=Math.sqrt(l);return{value:i,distance:c}},sk=(e,t,n=1)=>{const o=n*6;let{value:r}=fu(o,e,t);return r=r*n%60,r},ak=(e,t,n)=>{const{value:o,distance:r}=fu(30,e,t);let s=o||12;return n?s%=12:r<Bn/2-jt&&(s+=12,s%=24),s};function ik(e){return Ve("MuiClockPointer",e)}We("MuiClockPointer",["root","thumb"]);const lk=["className","classes","isBetweenTwoClockValues","isInner","type","viewValue"],ck=e=>Oe({root:["root"],thumb:["thumb"]},ik,e),uk=V("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"])}}]})),dk=V("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% - ${jt/2}px)`,border:`${(jt-4)/2}px solid ${(e.vars||e).palette.primary.main}`,boxSizing:"content-box",variants:[{props:{isClockPointerBetweenTwoValues:!1},style:{backgroundColor:(e.vars||e).palette.primary.main}}]}));function pk(e){const t=De({props:e,name:"MuiClockPointer"}),{className:n,classes:o,isBetweenTwoClockValues:r,isInner:s,type:a,viewValue:i}=t,l=me(t,lk),c=p.useRef(a);p.useEffect(()=>{c.current=a},[a]);const{ownerState:d}=ze(),m=R({},d,{isClockPointerAnimated:c.current!==a,isClockPointerBetweenTwoValues:r}),y=ck(o),h=()=>{let v=360/(a==="hours"?12:60)*i;return a==="hours"&&i>12&&(v-=360),{height:Math.round((s?.26:.4)*Bn),transform:`rotateZ(${v}deg)`}};return u.jsx(uk,R({style:h(),className:ae(y.root,n),ownerState:m},l,{children:u.jsx(dk,{ownerState:m,className:y.thumb})}))}function fk(e){return Ve("MuiClock",e)}We("MuiClock",["root","clock","wrapper","squareMask","pin","amButton","pmButton","meridiemText","selected"]);const mk=(e,t)=>{const n={root:["root"],clock:["clock"],wrapper:["wrapper"],squareMask:["squareMask"],pin:["pin"],amButton:["amButton",t.clockMeridiemMode==="am"&&"selected"],pmButton:["pmButton",t.clockMeridiemMode==="pm"&&"selected"],meridiemText:["meridiemText"]};return Oe(n,fk,e)},hk=V("div",{name:"MuiClock",slot:"Root"})(({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",margin:e.spacing(2)})),gk=V("div",{name:"MuiClock",slot:"Clock"})({backgroundColor:"rgba(0,0,0,.07)",borderRadius:"50%",height:220,width:220,flexShrink:0,position:"relative",pointerEvents:"none"}),bk=V("div",{name:"MuiClock",slot:"Wrapper"})({"&:focus":{outline:"none"}}),yk=V("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"}}}]}),vk=V("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%)"})),mu=(e,t)=>({zIndex:1,bottom:8,paddingLeft:4,paddingRight:4,width:jt,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}}}]}),xk=V(Vn,{name:"MuiClock",slot:"AmButton"})(({theme:e})=>R({},mu(e,"am"),{position:"absolute",left:8})),wk=V(Vn,{name:"MuiClock",slot:"PmButton"})(({theme:e})=>R({},mu(e,"pm"),{position:"absolute",right:8})),Pi=V(Wt,{name:"MuiClock",slot:"MeridiemText"})({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});function Ck(e){const t=De({props:e,name:"MuiClock"}),{ampm:n,ampmInClock:o,autoFocus:r,children:s,value:a,handleMeridiemChange:i,isTimeDisabled:l,meridiemMode:c,minutesStep:d=1,onChange:m,selectedId:y,type:h,viewValue:g,viewRange:[v,f],disabled:b=!1,readOnly:C,className:w,classes:x}=t,k=Te(),P=lt(),{ownerState:S}=ze(),I=R({},S,{isClockDisabled:b,clockMeridiemMode:c}),T=p.useRef(!1),O=mk(x,I),N=l(g,h),M=!n&&h==="hours"&&(g<1||g>12),L=(U,oe)=>{b||C||l(U,h)||m(U,oe)},A=(U,oe)=>{let{offsetX:ce,offsetY:fe}=U;if(ce===void 0){const Q=U.target.getBoundingClientRect();ce=U.changedTouches[0].clientX-Q.left,fe=U.changedTouches[0].clientY-Q.top}const re=h==="seconds"||h==="minutes"?sk(ce,fe,d):ak(ce,fe,!!n);L(re,oe)},F=U=>{T.current=!0,A(U,"shallow")},E=U=>{T.current&&(A(U,"finish"),T.current=!1),U.preventDefault()},B=U=>{U.buttons>0&&A(U.nativeEvent,"shallow")},G=U=>{T.current&&(T.current=!1),A(U.nativeEvent,"finish")},$=h==="hours"?!1:g%5!==0,Z=h==="minutes"?d:1,W=p.useRef(null);dt(()=>{r&&W.current.focus()},[r]);const ne=U=>Math.max(v,Math.min(f,U)),te=U=>(U+(f+1))%(f+1),se=U=>{if(!T.current)switch(U.key){case"Home":L(v,"partial"),U.preventDefault();break;case"End":L(f,"partial"),U.preventDefault();break;case"ArrowUp":L(te(g+Z),"partial"),U.preventDefault();break;case"ArrowDown":L(te(g-Z),"partial"),U.preventDefault();break;case"PageUp":L(ne(g+5),"partial"),U.preventDefault();break;case"PageDown":L(ne(g-5),"partial"),U.preventDefault();break;case"Enter":case" ":L(g,"finish"),U.preventDefault();break}};return u.jsxs(hk,{className:ae(O.root,w),children:[u.jsxs(gk,{className:O.clock,children:[u.jsx(yk,{onTouchMove:F,onTouchStart:F,onTouchEnd:E,onMouseUp:G,onMouseMove:B,ownerState:I,className:O.squareMask}),!N&&u.jsxs(p.Fragment,{children:[u.jsx(vk,{className:O.pin}),a!=null&&u.jsx(pk,{type:h,viewValue:g,isInner:M,isBetweenTwoClockValues:$})]}),u.jsx(bk,{"aria-activedescendant":y,"aria-label":P.clockLabelText(h,a==null?null:k.format(a,n?"fullTime12h":"fullTime24h")),ref:W,role:"listbox",onKeyDown:se,tabIndex:0,className:O.wrapper,children:s})]}),n&&o&&u.jsxs(p.Fragment,{children:[u.jsx(xk,{onClick:C?void 0:()=>i("am"),disabled:b||c===null,ownerState:I,className:O.amButton,title:Yt(k,"am"),children:u.jsx(Pi,{variant:"caption",className:O.meridiemText,children:Yt(k,"am")})}),u.jsx(wk,{disabled:b||c===null,onClick:C?void 0:()=>i("pm"),ownerState:I,className:O.pmButton,title:Yt(k,"pm"),children:u.jsx(Pi,{variant:"caption",className:O.meridiemText,children:Yt(k,"pm")})})]})]})}function Sk(e){return Ve("MuiClockNumber",e)}const Wo=We("MuiClockNumber",["root","selected","disabled"]),kk=["className","classes","disabled","index","inner","label","selected"],Pk=(e,t)=>{const n={root:["root",t.isClockNumberSelected&&"selected",t.isClockNumberDisabled&&"disabled"]};return Oe(n,Sk,e)},Mk=V("span",{name:"MuiClockNumber",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${Wo.disabled}`]:t.disabled},{[`&.${Wo.selected}`]:t.selected}]})(({theme:e})=>({height:jt,width:jt,position:"absolute",left:`calc((100% - ${jt}px) / 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},[`&.${Wo.selected}`]:{color:(e.vars||e).palette.primary.contrastText},[`&.${Wo.disabled}`]:{pointerEvents:"none",color:(e.vars||e).palette.text.disabled},variants:[{props:{isClockNumberInInnerRing:!0},style:R({},e.typography.body2,{color:(e.vars||e).palette.text.secondary})}]}));function hu(e){const t=De({props:e,name:"MuiClockNumber"}),{className:n,classes:o,disabled:r,index:s,inner:a,label:i,selected:l}=t,c=me(t,kk),{ownerState:d}=ze(),m=R({},d,{isClockNumberInInnerRing:a,isClockNumberSelected:l,isClockNumberDisabled:r}),y=Pk(o,m),h=s%12/12*Math.PI*2-Math.PI/2,g=(Bn-jt-2)/2*(a?.65:1),v=Math.round(Math.cos(h)*g),f=Math.round(Math.sin(h)*g);return u.jsx(Mk,R({className:ae(y.root,n),"aria-disabled":r?!0:void 0,"aria-selected":l?!0:void 0,role:"option",style:{transform:`translate(${v}px, ${f+(Bn-jt)/2}px`},ownerState:m},c,{children:i}))}const Dk=({ampm:e,value:t,getClockNumberText:n,isDisabled:o,selectedId:r,utils:s})=>{const a=t?s.getHours(t):null,i=[],l=e?1:0,c=e?12:23,d=m=>a===null?!1:e?m===12?a===12||a===0:a===m||a-12===m:a===m;for(let m=l;m<=c;m+=1){let y=m.toString();m===0&&(y="00");const h=!e&&(m===0||m>12);y=s.formatNumber(y);const g=d(m);i.push(u.jsx(hu,{id:g?r:void 0,index:m,inner:h,selected:g,disabled:o(m),label:y,"aria-label":n(y)},m))}return i},Mi=({utils:e,value:t,isDisabled:n,getClockNumberText:o,selectedId:r})=>{const s=e.formatNumber;return[[5,s("05")],[10,s("10")],[15,s("15")],[20,s("20")],[25,s("25")],[30,s("30")],[35,s("35")],[40,s("40")],[45,s("45")],[50,s("50")],[55,s("55")],[0,s("00")]].map(([a,i],l)=>{const c=a===t;return u.jsx(hu,{label:i,id:c?r:void 0,index:l+1,inner:!1,disabled:n(a),selected:c,"aria-label":o(i)},a)})},Qs=({value:e,referenceDate:t,utils:n,props:o,timezone:r})=>{const s=p.useMemo(()=>et.getInitialReferenceValue({value:e,utils:n,props:o,referenceDate:t,granularity:Pt.day,timezone:r,getTodayDate:()=>ws(n,r,"date")}),[]);return e??s},Tk=["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"],Ik=e=>Oe({root:["root"],arrowSwitcher:["arrowSwitcher"]},tk,e),Rk=V(kr,{name:"MuiTimeClock",slot:"Root"})({display:"flex",flexDirection:"column",position:"relative"}),Ek=V(su,{name:"MuiTimeClock",slot:"ArrowSwitcher"})({position:"absolute",right:12,top:15}),Ok=["hours","minutes"],Fk=p.forwardRef(function(t,n){const o=Te(),r=De({props:t,name:"MuiTimeClock"}),{ampm:s=o.is12HourCycleInCurrentLocale(),ampmInClock:a=!1,autoFocus:i,slots:l,slotProps:c,value:d,defaultValue:m,referenceDate:y,disableIgnoringDatePartForTimeValidation:h=!1,maxTime:g,minTime:v,disableFuture:f,disablePast:b,minutesStep:C=1,shouldDisableTime:w,showViewSwitcher:x,onChange:k,view:P,views:S=Ok,openTo:I,onViewChange:T,focusedView:O,onFocusedViewChange:N,className:M,classes:L,disabled:A,readOnly:F,timezone:E}=r,B=me(r,Tk),{value:G,handleValueChange:$,timezone:Z}=Gt({name:"TimeClock",timezone:E,value:d,defaultValue:m,referenceDate:y,onChange:k,valueManager:et}),W=Qs({value:G,referenceDate:y,utils:o,props:r,timezone:Z}),ne=lt(),te=mn(Z),se=Po(),{ownerState:U}=ze(),{view:oe,setView:ce,previousView:fe,nextView:re,setValueAndGoToNextView:Q}=Eo({view:P,views:S,openTo:I,onViewChange:T,onChange:$,focusedView:O,onFocusedViewChange:N}),{meridiemMode:_,handleMeridiemChange:q}=Gs(W,s,Q),X=p.useCallback((J,Y)=>{const ee=Mo(h,o),ie=Y==="hours"||Y==="minutes"&&S.includes("seconds"),z=({start:H,end:ge})=>!(v&&ee(v,ge)||g&&ee(H,g)||f&&ee(H,te)||b&&ee(te,ie?ge:H)),j=(H,ge=1)=>{if(H%ge!==0)return!1;if(w)switch(Y){case"hours":return!w(o.setHours(W,H),"hours");case"minutes":return!w(o.setMinutes(W,H),"minutes");case"seconds":return!w(o.setSeconds(W,H),"seconds");default:return!1}return!0};switch(Y){case"hours":{const H=fo(J,_,s),ge=o.setHours(W,H);if(o.getHours(ge)!==H)return!0;const ye=o.setSeconds(o.setMinutes(ge,0),0),Le=o.setSeconds(o.setMinutes(ge,59),59);return!z({start:ye,end:Le})||!j(H)}case"minutes":{const H=o.setMinutes(W,J),ge=o.setSeconds(H,0),ye=o.setSeconds(H,59);return!z({start:ge,end:ye})||!j(J,C)}case"seconds":{const H=o.setSeconds(W,J);return!z({start:H,end:H})||!j(J)}default:throw new Error("not supported")}},[s,W,h,g,_,v,C,w,o,f,b,te,S]),K=p.useMemo(()=>{switch(oe){case"hours":{const J=(ie,z)=>{const j=fo(ie,_,s);Q(o.setHours(W,j),z,"hours")},Y=o.getHours(W);let ee;return s?Y>12?ee=[12,23]:ee=[0,11]:ee=[0,23],{onChange:J,viewValue:Y,children:Dk({value:G,utils:o,ampm:s,getClockNumberText:ne.hoursClockNumberText,isDisabled:ie=>A||X(ie,"hours"),selectedId:se}),viewRange:ee}}case"minutes":{const J=o.getMinutes(W);return{viewValue:J,onChange:(ee,ie)=>{Q(o.setMinutes(W,ee),ie,"minutes")},children:Mi({utils:o,value:J,getClockNumberText:ne.minutesClockNumberText,isDisabled:ee=>A||X(ee,"minutes"),selectedId:se}),viewRange:[0,59]}}case"seconds":{const J=o.getSeconds(W);return{viewValue:J,onChange:(ee,ie)=>{Q(o.setSeconds(W,ee),ie,"seconds")},children:Mi({utils:o,value:J,getClockNumberText:ne.secondsClockNumberText,isDisabled:ee=>A||X(ee,"seconds"),selectedId:se}),viewRange:[0,59]}}default:throw new Error("You must provide the type for ClockView")}},[oe,o,G,s,ne.hoursClockNumberText,ne.minutesClockNumberText,ne.secondsClockNumberText,_,Q,W,X,se,A]),ue=Ik(L);return u.jsxs(Rk,R({ref:n,className:ae(ue.root,M),ownerState:U},B,{children:[u.jsx(Ck,R({autoFocus:i??!!O,ampmInClock:a&&S.includes("hours"),value:G,type:oe,ampm:s,minutesStep:C,isTimeDisabled:X,meridiemMode:_,handleMeridiemChange:q,selectedId:se,disabled:A,readOnly:F},K)),x&&u.jsx(Ek,{className:ue.arrowSwitcher,slots:l,slotProps:c,onGoToPrevious:()=>ce(fe),isPreviousDisabled:!fe,previousLabel:ne.openPreviousView,onGoToNext:()=>ce(re),isNextDisabled:!re,nextLabel:ne.openNextView,ownerState:U})]}))}),Di=Se("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),Ti=Se("MuiListItemIcon",["root","alignItemsFlexStart"]),Ii=Se("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function Nk(e){return Re("MuiMenuItem",e)}const eo=Se("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),Ak=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},$k=e=>{const{disabled:t,dense:n,divider:o,disableGutters:r,selected:s,classes:a}=e,l=Ee({root:["root",n&&"dense",t&&"disabled",!r&&"gutters",o&&"divider",s&&"selected"]},Nk,a);return{...a,...l}},Lk=V(Ln,{shouldForwardProp:e=>Ct(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:Ak})(Be(({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"}},[`&.${eo.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Ie(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${eo.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Ie(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${eo.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Ie(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Ie(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${eo.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${eo.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${Di.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${Di.inset}`]:{marginLeft:52},[`& .${Ii.root}`]:{marginTop:0,marginBottom:0},[`& .${Ii.inset}`]:{paddingLeft:36},[`& .${Ti.root}`]:{minWidth:36},variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>!t.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:t})=>t.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${Ti.root} svg`]:{fontSize:"1.25rem"}}}]}))),gu=p.forwardRef(function(t,n){const o=Fe({props:t,name:"MuiMenuItem"}),{autoFocus:r=!1,component:s="li",dense:a=!1,divider:i=!1,disableGutters:l=!1,focusVisibleClassName:c,role:d="menuitem",tabIndex:m,className:y,...h}=o,g=p.useContext(an),v=p.useMemo(()=>({dense:a||g.dense||!1,disableGutters:l}),[g.dense,a,l]),f=p.useRef(null);Dt(()=>{r&&f.current&&f.current.focus()},[r]);const b={...o,dense:v.dense,divider:i,disableGutters:l},C=$k(o),w=Ze(f,n);let x;return o.disabled||(x=m!==void 0?m:-1),u.jsx(an.Provider,{value:v,children:u.jsx(Lk,{ref:w,role:d,tabIndex:x,component:s,focusVisibleClassName:ae(C.focusVisible,c),className:ae(C.root,y),...h,ownerState:b,classes:C})})});function jk(e){return Ve("MuiDigitalClock",e)}We("MuiDigitalClock",["root","list","item"]);const Vk=["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"],Bk=e=>Oe({root:["root"],list:["list"],item:["item"]},jk,e),Wk=V(kr,{name:"MuiDigitalClock",slot:"Root"})({overflowY:"auto",width:"100%",scrollbarWidth:"thin","@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"auto"},maxHeight:bc,variants:[{props:{hasDigitalClockAlreadyBeenRendered:!0},style:{"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"smooth"}}}]}),_k=V(Ws,{name:"MuiDigitalClock",slot:"List"})({padding:0}),zk=V(gu,{name:"MuiDigitalClock",slot:"Item",shouldForwardProp:e=>e!=="itemValue"&&e!=="formattedValue"})(({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})`:Ie(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})`:Ie(e.palette.primary.main,e.palette.action.focusOpacity)}})),Hk=p.forwardRef(function(t,n){const o=Te(),r=p.useRef(null),s=ot(n,r),a=p.useRef(null),i=De({props:t,name:"MuiDigitalClock"}),{ampm:l=o.is12HourCycleInCurrentLocale(),timeStep:c=30,autoFocus:d,slots:m,slotProps:y,value:h,defaultValue:g,referenceDate:v,disableIgnoringDatePartForTimeValidation:f=!1,maxTime:b,minTime:C,disableFuture:w,disablePast:x,minutesStep:k=1,shouldDisableTime:P,onChange:S,view:I,openTo:T,onViewChange:O,focusedView:N,onFocusedViewChange:M,className:L,classes:A,disabled:F,readOnly:E,views:B=["hours"],skipDisabled:G=!1,timezone:$}=i,Z=me(i,Vk),{value:W,handleValueChange:ne,timezone:te}=Gt({name:"DigitalClock",timezone:$,value:h,defaultValue:g,referenceDate:v,onChange:S,valueManager:et}),se=lt(),U=mn(te),{ownerState:oe}=ze(),ce=R({},oe,{hasDigitalClockAlreadyBeenRendered:!!r.current}),fe=Bk(A),re=m?.digitalClockItem??zk,Q=Ae({elementType:re,externalSlotProps:y?.digitalClockItem,ownerState:ce,className:fe.item}),_=Qs({value:W,referenceDate:v,utils:o,props:i,timezone:te}),q=de(ie=>ne(ie,"finish","hours")),{setValueAndGoToNextView:X}=Eo({view:I,views:B,openTo:T,onViewChange:O,onChange:q,focusedView:N,onFocusedViewChange:M}),K=de(ie=>{X(ie,"finish")});dt(()=>{if(r.current===null)return;const ie=r.current.querySelector('[role="listbox"] [role="option"][tabindex="0"], [role="listbox"] [role="option"][aria-selected="true"]');if(!ie)return;const z=ie.offsetTop;(d||N)&&ie.focus(),r.current.scrollTop=z-4});const ue=p.useCallback(ie=>{const z=Mo(f,o),j=()=>!(C&&z(C,ie)||b&&z(ie,b)||w&&z(ie,U)||x&&z(U,ie)),H=()=>o.getMinutes(ie)%k!==0?!1:P?!P(ie,"hours"):!0;return!j()||!H()},[f,o,C,b,w,U,x,k,P]),J=p.useMemo(()=>{const ie=[];let j=o.startOfDay(_);for(;o.isSameDay(_,j);)ie.push(j),j=o.addMinutes(j,c);return ie},[_,c,o]),Y=J.findIndex(ie=>o.isEqual(ie,_)),ee=ie=>{switch(ie.key){case"PageUp":{const z=tr(a.current)-5,j=a.current.children,H=Math.max(0,z),ge=j[H];ge&&ge.focus(),ie.preventDefault();break}case"PageDown":{const z=tr(a.current)+5,j=a.current.children,H=Math.min(j.length-1,z),ge=j[H];ge&&ge.focus(),ie.preventDefault();break}}};return u.jsx(Wk,R({ref:s,className:ae(fe.root,L),ownerState:ce},Z,{children:u.jsx(_k,{ref:a,role:"listbox","aria-label":se.timePickerToolbarTitle,className:fe.list,onKeyDown:ee,children:J.map((ie,z)=>{const j=ue(ie);if(G&&j)return null;const H=o.isEqual(ie,W),ge=o.format(ie,l?"fullTime12h":"fullTime24h"),Le=Y===z||Y===-1&&z===0?0:-1;return u.jsx(re,R({onClick:()=>!E&&K(ie),selected:H,disabled:F||j,disableRipple:E,role:"option","aria-disabled":E,"aria-selected":H,tabIndex:Le,itemValue:ie,formattedValue:ge},Q,{children:ge}),`${ie.valueOf()}-${ge}`)})})}))});function Uk(e){return Ve("MuiMultiSectionDigitalClock",e)}We("MuiMultiSectionDigitalClock",["root"]);function Yk(e){return Ve("MuiMultiSectionDigitalClockSection",e)}We("MuiMultiSectionDigitalClockSection",["root","item"]);const qk=["autoFocus","onChange","className","classes","disabled","readOnly","items","active","slots","slotProps","skipDisabled"],Kk=e=>Oe({root:["root"],item:["item"]},Yk,e),Gk=V(Ws,{name:"MuiMultiSectionDigitalClockSection",slot:"Root"})(({theme:e})=>({maxHeight:bc,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}`},"&::after":{display:"block",content:'""',height:"calc(100% - 40px - 6px)"},variants:[{props:{hasDigitalClockAlreadyBeenRendered:!0},style:{"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"smooth"}}}]})),Qk=V(gu,{name:"MuiMultiSectionDigitalClockSection",slot:"Item"})(({theme:e})=>({padding:8,margin:"2px 4px",width:Oy,justifyContent:"center","&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Ie(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})`:Ie(e.palette.primary.main,e.palette.action.focusOpacity)}})),Xk=p.forwardRef(function(t,n){const o=p.useRef(null),r=ot(n,o),s=p.useRef(null),a=De({props:t,name:"MuiMultiSectionDigitalClockSection"}),{autoFocus:i,onChange:l,className:c,classes:d,disabled:m,readOnly:y,items:h,active:g,slots:v,slotProps:f,skipDisabled:b}=a,C=me(a,qk),{ownerState:w}=ze(),x=R({},w,{hasDigitalClockAlreadyBeenRendered:!!o.current}),k=Kk(d),P=v?.digitalClockSectionItem??Qk;dt(()=>{if(o.current===null)return;const T=o.current.querySelector('[role="option"][tabindex="0"], [role="option"][aria-selected="true"]');if(g&&i&&T&&T.focus(),!T||s.current===T)return;s.current=T;const O=T.offsetTop;o.current.scrollTop=O-4});const S=h.findIndex(T=>T.isFocused(T.value)),I=T=>{switch(T.key){case"PageUp":{const O=tr(o.current)-5,N=o.current.children,M=Math.max(0,O),L=N[M];L&&L.focus(),T.preventDefault();break}case"PageDown":{const O=tr(o.current)+5,N=o.current.children,M=Math.min(N.length-1,O),L=N[M];L&&L.focus(),T.preventDefault();break}}};return u.jsx(Gk,R({ref:r,className:ae(k.root,c),ownerState:x,autoFocusItem:i&&g,role:"listbox",onKeyDown:I},C,{children:h.map((T,O)=>{const N=T.isDisabled?.(T.value),M=m||N;if(b&&M)return null;const L=T.isSelected(T.value),A=S===O||S===-1&&O===0?0:-1;return u.jsx(P,R({onClick:()=>!y&&l(T.value),selected:L,disabled:M,disableRipple:y,role:"option","aria-disabled":y||M||void 0,"aria-label":T.ariaLabel,"aria-selected":L,tabIndex:A,className:k.item},f?.digitalClockSectionItem,{children:T.label}),T.label)})}))}),Zk=({now:e,value:t,utils:n,ampm:o,isDisabled:r,resolveAriaLabel:s,timeStep:a,valueOrReferenceDate:i})=>{const l=t?n.getHours(t):null,c=[],d=(h,g)=>{const v=g??l;return v===null?!1:o?h===12?v===12||v===0:v===h||v-12===h:v===h},m=h=>d(h,n.getHours(i)),y=o?11:23;for(let h=0;h<=y;h+=a){let g=n.format(n.setHours(e,h),o?"hours12h":"hours24h");const v=s(parseInt(g,10).toString());g=n.formatNumber(g),c.push({value:h,label:g,isSelected:d,isDisabled:r,isFocused:m,ariaLabel:v})}return c},Ri=({value:e,utils:t,isDisabled:n,timeStep:o,resolveLabel:r,resolveAriaLabel:s,hasValue:a=!0})=>{const i=c=>e===null?!1:a&&e===c,l=c=>e===c;return[...Array.from({length:Math.ceil(60/o)},(c,d)=>{const m=o*d;return{value:m,label:t.formatNumber(r(m)),isDisabled:n,isSelected:i,isFocused:l,ariaLabel:s(m.toString())}})]},Jk=["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"],eP=e=>Oe({root:["root"]},Uk,e),tP=V(kr,{name:"MuiMultiSectionDigitalClock",slot:"Root"})(({theme:e})=>({flexDirection:"row",width:"100%",borderBottom:`1px solid ${(e.vars||e).palette.divider}`})),nP=p.forwardRef(function(t,n){const o=Te(),r=wt(),s=De({props:t,name:"MuiMultiSectionDigitalClock"}),{ampm:a=o.is12HourCycleInCurrentLocale(),timeSteps:i,autoFocus:l,slots:c,slotProps:d,value:m,defaultValue:y,referenceDate:h,disableIgnoringDatePartForTimeValidation:g=!1,maxTime:v,minTime:f,disableFuture:b,disablePast:C,minutesStep:w=1,shouldDisableTime:x,onChange:k,view:P,views:S=["hours","minutes"],openTo:I,onViewChange:T,focusedView:O,onFocusedViewChange:N,className:M,classes:L,disabled:A,readOnly:F,skipDisabled:E=!1,timezone:B}=s,G=me(s,Jk),{value:$,handleValueChange:Z,timezone:W}=Gt({name:"MultiSectionDigitalClock",timezone:B,value:m,defaultValue:y,referenceDate:h,onChange:k,valueManager:et}),ne=lt(),te=mn(W),se=p.useMemo(()=>R({hours:1,minutes:5,seconds:5},i),[i]),U=Qs({value:$,referenceDate:h,utils:o,props:s,timezone:W}),oe=de((z,j,H)=>Z(z,j,H)),ce=p.useMemo(()=>!a||!S.includes("hours")||S.includes("meridiem")?S:[...S,"meridiem"],[a,S]),{view:fe,setValueAndGoToNextView:re,focusedView:Q}=Eo({view:P,views:ce,openTo:I,onViewChange:T,onChange:oe,focusedView:O,onFocusedViewChange:N}),_=de(z=>{re(z,"finish","meridiem")}),{meridiemMode:q,handleMeridiemChange:X}=Gs(U,a,_,"finish"),K=p.useCallback((z,j)=>{const H=Mo(g,o),ge=j==="hours"||j==="minutes"&&ce.includes("seconds"),ye=({start:Pe,end:_e})=>!(f&&H(f,_e)||v&&H(Pe,v)||b&&H(Pe,te)||C&&H(te,ge?_e:Pe)),Le=(Pe,_e=1)=>{if(Pe%_e!==0)return!1;if(x)switch(j){case"hours":return!x(o.setHours(U,Pe),"hours");case"minutes":return!x(o.setMinutes(U,Pe),"minutes");case"seconds":return!x(o.setSeconds(U,Pe),"seconds");default:return!1}return!0};switch(j){case"hours":{const Pe=fo(z,q,a),_e=o.setHours(U,Pe);if(o.getHours(_e)!==Pe)return!0;const qe=o.setSeconds(o.setMinutes(_e,0),0),be=o.setSeconds(o.setMinutes(_e,59),59);return!ye({start:qe,end:be})||!Le(Pe)}case"minutes":{const Pe=o.setMinutes(U,z),_e=o.setSeconds(Pe,0),qe=o.setSeconds(Pe,59);return!ye({start:_e,end:qe})||!Le(z,w)}case"seconds":{const Pe=o.setSeconds(U,z);return!ye({start:Pe,end:Pe})||!Le(z)}default:throw new Error("not supported")}},[a,U,g,v,q,f,w,x,o,b,C,te,ce]),ue=p.useCallback(z=>{switch(z){case"hours":return{onChange:j=>{const H=fo(j,q,a);re(o.setHours(U,H),"finish","hours")},items:Zk({now:te,value:$,ampm:a,utils:o,isDisabled:j=>K(j,"hours"),timeStep:se.hours,resolveAriaLabel:ne.hoursClockNumberText,valueOrReferenceDate:U})};case"minutes":return{onChange:j=>{re(o.setMinutes(U,j),"finish","minutes")},items:Ri({value:o.getMinutes(U),utils:o,isDisabled:j=>K(j,"minutes"),resolveLabel:j=>o.format(o.setMinutes(te,j),"minutes"),timeStep:se.minutes,hasValue:!!$,resolveAriaLabel:ne.minutesClockNumberText})};case"seconds":return{onChange:j=>{re(o.setSeconds(U,j),"finish","seconds")},items:Ri({value:o.getSeconds(U),utils:o,isDisabled:j=>K(j,"seconds"),resolveLabel:j=>o.format(o.setSeconds(te,j),"seconds"),timeStep:se.seconds,hasValue:!!$,resolveAriaLabel:ne.secondsClockNumberText})};case"meridiem":{const j=Yt(o,"am"),H=Yt(o,"pm");return{onChange:X,items:[{value:"am",label:j,isSelected:()=>!!$&&q==="am",isFocused:()=>!!U&&q==="am",ariaLabel:j},{value:"pm",label:H,isSelected:()=>!!$&&q==="pm",isFocused:()=>!!U&&q==="pm",ariaLabel:H}]}}default:throw new Error(`Unknown view: ${z} found.`)}},[te,$,a,o,se.hours,se.minutes,se.seconds,ne.hoursClockNumberText,ne.minutesClockNumberText,ne.secondsClockNumberText,q,re,U,K,X]),J=p.useMemo(()=>{if(!r)return ce;const z=ce.filter(j=>j!=="meridiem");return z.reverse(),ce.includes("meridiem")&&z.push("meridiem"),z},[r,ce]),Y=p.useMemo(()=>ce.reduce((z,j)=>R({},z,{[j]:ue(j)}),{}),[ce,ue]),{ownerState:ee}=ze(),ie=eP(L);return u.jsx(tP,R({ref:n,className:ae(ie.root,M),ownerState:ee,role:"group"},G,{children:J.map(z=>u.jsx(Xk,{items:Y[z].items,onChange:Y[z].onChange,active:fe===z,autoFocus:l||Q===z,disabled:A,readOnly:F,slots:c,slotProps:d,skipDisabled:E,"aria-label":ne.selectViewText(z)},z))}))}),Fr=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:o,views:r,value:s,defaultValue:a,referenceDate:i,onChange:l,className:c,classes:d,disableFuture:m,disablePast:y,minTime:h,maxTime:g,shouldDisableTime:v,minutesStep:f,ampm:b,ampmInClock:C,slots:w,slotProps:x,readOnly:k,disabled:P,sx:S,autoFocus:I,showViewSwitcher:T,disableIgnoringDatePartForTimeValidation:O,timezone:N})=>u.jsx(Fk,{view:e,onViewChange:t,focusedView:n&&On(n)?n:null,onFocusedViewChange:o,views:r.filter(On),value:s,defaultValue:a,referenceDate:i,onChange:l,className:c,classes:d,disableFuture:m,disablePast:y,minTime:h,maxTime:g,shouldDisableTime:v,minutesStep:f,ampm:b,ampmInClock:C,slots:w,slotProps:x,readOnly:k,disabled:P,sx:S,autoFocus:I,showViewSwitcher:T,disableIgnoringDatePartForTimeValidation:O,timezone:N}),oP=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:o,views:r,value:s,defaultValue:a,referenceDate:i,onChange:l,className:c,classes:d,disableFuture:m,disablePast:y,minTime:h,maxTime:g,shouldDisableTime:v,minutesStep:f,ampm:b,slots:C,slotProps:w,readOnly:x,disabled:k,sx:P,autoFocus:S,disableIgnoringDatePartForTimeValidation:I,timeSteps:T,skipDisabled:O,timezone:N})=>u.jsx(Hk,{view:e,onViewChange:t,focusedView:n&&On(n)?n:null,onFocusedViewChange:o,views:r.filter(On),value:s,defaultValue:a,referenceDate:i,onChange:l,className:c,classes:d,disableFuture:m,disablePast:y,minTime:h,maxTime:g,shouldDisableTime:v,minutesStep:f,ampm:b,slots:C,slotProps:w,readOnly:x,disabled:k,sx:P,autoFocus:S,disableIgnoringDatePartForTimeValidation:I,timeStep:T?.minutes,skipDisabled:O,timezone:N}),Ei=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:o,views:r,value:s,defaultValue:a,referenceDate:i,onChange:l,className:c,classes:d,disableFuture:m,disablePast:y,minTime:h,maxTime:g,shouldDisableTime:v,minutesStep:f,ampm:b,slots:C,slotProps:w,readOnly:x,disabled:k,sx:P,autoFocus:S,disableIgnoringDatePartForTimeValidation:I,timeSteps:T,skipDisabled:O,timezone:N})=>u.jsx(nP,{view:e,onViewChange:t,focusedView:n&&Il(n)?n:null,onFocusedViewChange:o,views:r.filter(On),value:s,defaultValue:a,referenceDate:i,onChange:l,className:c,classes:d,disableFuture:m,disablePast:y,minTime:h,maxTime:g,shouldDisableTime:v,minutesStep:f,ampm:b,slots:C,slotProps:w,readOnly:x,disabled:k,sx:P,autoFocus:S,disableIgnoringDatePartForTimeValidation:I,timeSteps:T,skipDisabled:O,timezone:N}),rP=(e,t,n)=>n?t.filter(o=>!Il(o)||o==="hours"):e?[...t,"meridiem"]:t,sP=(e,t)=>24*60/((e.hours??1)*(e.minutes??5))<=t;function aP({thresholdToRenderTimeInASingleColumn:e,ampm:t,timeSteps:n,views:o}){const r=e??24,s=R({hours:1,minutes:5,seconds:5},n),a=sP(s,r);return{thresholdToRenderTimeInASingleColumn:r,timeSteps:s,shouldRenderTimeInASingleColumn:a,views:rP(t,o,a)}}const bu=p.forwardRef(function(t,n){const o=Te(),r=du(t,"MuiDesktopTimePicker"),{shouldRenderTimeInASingleColumn:s,views:a,timeSteps:i}=aP(r),l=s?oP:Ei,c=R({hours:l,minutes:l,seconds:l,meridiem:l},r.viewRenderers),d=r.ampmInClock??!0,y=c.hours?.name===Ei.name?a:a.filter(v=>v!=="meridiem"),h=R({},r,{ampmInClock:d,timeSteps:i,viewRenderers:c,format:Rl(o,r),views:s?["hours"]:y,slots:R({field:cu},r.slots),slotProps:R({},r.slotProps,{field:v=>R({},ln(r.slotProps?.field,v),dr(r)),toolbar:R({hidden:!0,ampmInClock:d},r.slotProps?.toolbar)})}),{renderPicker:g}=zc({ref:n,props:h,valueManager:et,valueType:"time",validator:pr,steps:null});return g()});bu.propTypes={ampm:D.bool,ampmInClock:D.bool,autoFocus:D.bool,className:D.string,closeOnSelect:D.bool,defaultValue:D.object,disabled:D.bool,disableFuture:D.bool,disableIgnoringDatePartForTimeValidation:D.bool,disableOpenPicker:D.bool,disablePast:D.bool,enableAccessibleFieldDOMStructure:D.any,format:D.string,formatDensity:D.oneOf(["dense","spacious"]),inputRef:cr,label:D.node,localeText:D.object,maxTime:D.object,minTime:D.object,minutesStep:D.number,name:D.string,onAccept:D.func,onChange:D.func,onClose:D.func,onError:D.func,onOpen:D.func,onSelectedSectionsChange:D.func,onViewChange:D.func,open:D.bool,openTo:D.oneOf(["hours","meridiem","minutes","seconds"]),orientation:D.oneOf(["landscape","portrait"]),readOnly:D.bool,reduceAnimations:D.bool,referenceDate:D.object,selectedSections:D.oneOfType([D.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),D.number]),shouldDisableTime:D.func,skipDisabled:D.bool,slotProps:D.object,slots:D.object,sx:D.oneOfType([D.arrayOf(D.oneOfType([D.func,D.object,D.bool])),D.func,D.object]),thresholdToRenderTimeInASingleColumn:D.number,timeSteps:D.shape({hours:D.number,minutes:D.number,seconds:D.number}),timezone:D.string,value:D.object,view:D.oneOf(["hours","meridiem","minutes","seconds"]),viewRenderers:D.shape({hours:D.func,meridiem:D.func,minutes:D.func,seconds:D.func}),views:D.arrayOf(D.oneOf(["hours","minutes","seconds"]).isRequired)};const yu=p.forwardRef(function(t,n){const o=Te(),r=du(t,"MuiMobileTimePicker"),s=R({hours:Fr,minutes:Fr,seconds:Fr},r.viewRenderers),a=r.ampmInClock??!1,i=R({},r,{ampmInClock:a,viewRenderers:s,format:Rl(o,r),slots:R({field:cu},r.slots),slotProps:R({},r.slotProps,{field:c=>R({},ln(r.slotProps?.field,c),dr(r)),toolbar:R({hidden:!1,ampmInClock:a},r.slotProps?.toolbar)})}),{renderPicker:l}=iu({ref:n,props:i,valueManager:et,valueType:"time",validator:pr,steps:null});return l()});yu.propTypes={ampm:D.bool,ampmInClock:D.bool,autoFocus:D.bool,className:D.string,closeOnSelect:D.bool,defaultValue:D.object,disabled:D.bool,disableFuture:D.bool,disableIgnoringDatePartForTimeValidation:D.bool,disableOpenPicker:D.bool,disablePast:D.bool,enableAccessibleFieldDOMStructure:D.any,format:D.string,formatDensity:D.oneOf(["dense","spacious"]),inputRef:cr,label:D.node,localeText:D.object,maxTime:D.object,minTime:D.object,minutesStep:D.number,name:D.string,onAccept:D.func,onChange:D.func,onClose:D.func,onError:D.func,onOpen:D.func,onSelectedSectionsChange:D.func,onViewChange:D.func,open:D.bool,openTo:D.oneOf(["hours","minutes","seconds"]),orientation:D.oneOf(["landscape","portrait"]),readOnly:D.bool,reduceAnimations:D.bool,referenceDate:D.object,selectedSections:D.oneOfType([D.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),D.number]),shouldDisableTime:D.func,slotProps:D.object,slots:D.object,sx:D.oneOfType([D.arrayOf(D.oneOfType([D.func,D.object,D.bool])),D.func,D.object]),timezone:D.string,value:D.object,view:D.oneOf(["hours","minutes","seconds"]),viewRenderers:D.shape({hours:D.func,minutes:D.func,seconds:D.func}),views:D.arrayOf(D.oneOf(["hours","minutes","seconds"]).isRequired)};const iP=["desktopModeMediaQuery"],lP=p.forwardRef(function(t,n){const o=De({props:t,name:"MuiTimePicker"}),{desktopModeMediaQuery:r=lc}=o,s=me(o,iP);return ys(r,{defaultMatches:!0})?u.jsx(bu,R({ref:n},s)):u.jsx(yu,R({ref:n},s))}),Nr=(e,t)=>{typeof e=="function"?e(t):e&&(e.current=t)},es=p.forwardRef(({id:e,className:t,placeholder:n,value:o,disabled:r,readOnly:s,required:a,name:i,autoComplete:l,autoFocus:c,error:d,focused:m,onChange:y,onBlur:h,onFocus:g,onClick:v,InputProps:f,inputProps:b},C)=>u.jsxs("div",{ref:w=>{Nr(C,w),Nr(f?.ref,w)},onBlur:h,onFocus:g,onClick:v,className:je("flex h-9 items-center gap-1 rounded-md border border-control bg-surface px-3","transition-colors duration-fast ease-out-quart","has-[input:focus-visible]:outline-solid has-[input:focus-visible]:outline-2","has-[input:focus-visible]:outline-accent has-[input:focus-visible]:outline-offset-2",d&&"border-danger",r&&"border-hairline bg-sunken",t),children:[f?.startAdornment,u.jsx("input",{id:e,name:i,placeholder:n,value:o??"",disabled:r,readOnly:s,required:a,autoComplete:l,"aria-invalid":d||void 0,onChange:y,...b,ref:w=>{Nr(b?.ref,w),c&&w&&w.focus()},className:je("h-full min-w-0 flex-1 bg-transparent outline-none","text-body-sm text-ink placeholder:text-ink-dim","disabled:text-ink-disabled disabled:placeholder:text-ink-disabled")}),f?.endAdornment]}));es.displayName="PickerTextField";const rr=({label:e,value:t,onChange:n,initialOpen:o=!1,disabled:r,helperText:s})=>{const[a,i]=p.useState(null),[l,c]=p.useState(null),[d,m]=p.useState(o),y=p.useId();p.useEffect(()=>{if(t&&to(oa(t))){const f=oa(t);i(f),c(f)}else i(null),c(null)},[t]);const h=f=>{if(i(f),f&&to(f)){const b=new Date(f);l&&to(l)?(b.setHours(l.getHours()),b.setMinutes(l.getMinutes()),b.setSeconds(l.getSeconds())):b.setHours(0,0,0,0),n(b.toISOString())}else n(null)},g=f=>{if(c(f),f&&to(f)){const b=a?new Date(a):new Date;b.setHours(f.getHours()),b.setMinutes(f.getMinutes()),b.setSeconds(f.getSeconds()),a||i(new Date(b.getFullYear(),b.getMonth(),b.getDate())),n(b.toISOString())}else if(f===null&&a){const b=new Date(a);b.setHours(0,0,0,0),c(b),n(b.toISOString())}else n(null)},v=()=>{const f=new Date;i(f),c(f),n(f.toISOString())};return u.jsx(Ll,{dateAdapter:gm,children:u.jsxs("div",{children:[u.jsx("label",{htmlFor:`${y}-date-field`,className:"mb-1.5 block font-medium text-body-sm text-ink-muted",children:e}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("div",{className:"min-w-0 flex-1",children:u.jsx(LS,{value:a,onChange:h,disabled:r,open:o?d:void 0,disableHighlightToday:o,onOpen:()=>m(!0),onClose:()=>m(!1),enableAccessibleFieldDOMStructure:!1,slots:{textField:es,openPickerIcon:()=>u.jsx(_i,{size:16})},slotProps:{textField:{id:`${y}-date-field`,placeholder:"Select date"},openPickerButton:{"aria-label":`Choose ${e} date`,size:"small"}}})}),u.jsx("div",{className:"min-w-0 flex-1",children:u.jsx(lP,{value:l,onChange:g,disabled:r,enableAccessibleFieldDOMStructure:!1,slots:{textField:es,openPickerIcon:()=>u.jsx(ju,{size:16})},slotProps:{textField:{id:`${y}-time-field`,placeholder:"Select time"},openPickerButton:{"aria-label":`Choose ${e} time`,size:"small"}}})}),u.jsx(qt,{content:"Set to current time",children:u.jsx(bt,{variant:"ghost",size:"icon-sm",onClick:v,disabled:r,"aria-label":`Set ${e} to current time`,children:u.jsx(Vu,{})})})]}),s&&u.jsx("p",{className:"mt-1 ml-0.5 text-ink-muted text-meta",children:s})]})})},Oi={selectedAgentId:null,prompt:"",interval:1,unit:"hours",is_active:!0,one_time:!1,start_time_utc:null,end_time_utc:null},cP=({options:e,selected:t,onSelect:n,onQueryChange:o,loading:r,invalid:s})=>{const a=p.useId(),i=`${a}-input`,l=`${a}-listbox`,c=p.useRef(null),d=p.useRef([]),m=t?.name||(t?`Agent ID: ${t.id.substring(0,8)}...`:""),[y,h]=p.useState(m),[g,v]=p.useState(!1),[f,b]=p.useState(-1);p.useEffect(()=>{h(m)},[m]),d.current.length=e.length,p.useEffect(()=>{b(-1)},[e]),p.useEffect(()=>{!g||f<0||d.current[f]?.scrollIntoView({block:"nearest"})},[g,f]);const C=S=>{v(!1),h(S.name||`Agent ID: ${S.id.substring(0,8)}...`),n(S)},w=()=>{v(!1),h(m)},x=S=>{e.length!==0&&b(I=>{const T=I+S;return T<0?e.length-1:T>=e.length?0:T})},k=S=>{switch(S.key){case"ArrowDown":case"ArrowUp":{if(S.preventDefault(),!g){v(!0);return}x(S.key==="ArrowDown"?1:-1);return}case"Home":case"End":{if(!g||e.length===0)return;S.preventDefault(),b(S.key==="Home"?0:e.length-1);return}case"Enter":{S.preventDefault(),g&&f>=0&&C(e[f]);return}case"Escape":{if(!g)return;S.preventDefault(),S.stopPropagation(),w();return}}},P=g&&f>=0?`${a}-option-${f}`:void 0;return u.jsx("div",{className:"relative",children:u.jsxs(ed,{open:g,onOpenChange:S=>{S?v(!0):w()},children:[u.jsx(td,{asChild:!0,children:u.jsxs("div",{ref:c,className:"relative",children:[u.jsx(qo,{id:i,role:"combobox","aria-expanded":g,"aria-controls":l,"aria-autocomplete":"list","aria-activedescendant":P,"aria-invalid":s||void 0,autoComplete:"off",className:"pr-8",placeholder:"Search agents",value:y,onChange:S=>{h(S.target.value),o(S.target.value),v(!0)},onFocus:()=>v(!0),onClick:()=>v(!0),onBlur:w,onKeyDown:k}),u.jsx("span",{className:"pointer-events-none absolute top-1/2 right-2 flex -translate-y-1/2 items-center",children:r?u.jsx(ls,{size:"sm",label:"Loading agents"}):u.jsx(nd,{className:"size-4 text-ink-dim","aria-hidden":"true"})})]})}),u.jsx(od,{align:"start",className:"w-(--radix-popover-trigger-width) p-1",onOpenAutoFocus:S=>S.preventDefault(),onCloseAutoFocus:S=>S.preventDefault(),onPointerDownOutside:S=>{c.current?.contains(S.target)&&S.preventDefault()},onFocusOutside:S=>{c.current?.contains(S.target)&&S.preventDefault()},onMouseDown:S=>S.preventDefault(),children:u.jsxs("ul",{id:l,role:"listbox","aria-label":"Select agent",className:"max-h-72 overflow-y-auto",children:[e.length===0&&u.jsx("li",{role:"presentation",className:"px-2 py-1.5 text-body-sm text-ink-dim",children:r?"Loading agents":"No matching agents"}),e.map((S,I)=>u.jsx("li",{id:`${a}-option-${I}`,role:"option","aria-selected":S.id===t?.id,ref:T=>{d.current[I]=T},className:je("cursor-pointer rounded-sm px-2 py-1.5","transition-colors duration-fast ease-out-quart",I===f&&"bg-accent-wash"),onMouseEnter:()=>b(I),onClick:()=>C(S),children:u.jsx("span",{className:"font-medium text-body-sm text-ink",children:S.name||"Unnamed agent"})},S.id))]})})]})})},uP=({open:e,onClose:t,onSubmit:n,initialData:o})=>{const[r,s]=p.useState(Oi),[a,i]=p.useState(!1),[l,c]=p.useState(""),[d,m]=p.useState(""),[y,h]=p.useState(null),g=!!o;p.useEffect(()=>{const S=setTimeout(()=>{m(l)},300);return()=>clearTimeout(S)},[l]);const{data:v,isLoading:f,isError:b}=Bu(1,50,0,d||void 0),C=p.useMemo(()=>v?.agents||[],[v]);p.useEffect(()=>{if(e)if(o){s({selectedAgentId:o.agent_id,prompt:o.prompt,interval:o.interval,unit:o.unit,is_active:o.is_active,one_time:o.one_time,start_time_utc:o.start_time_utc?new Date(o.start_time_utc).toISOString():null,end_time_utc:o.end_time_utc?new Date(o.end_time_utc).toISOString():null});const S=C.find(I=>I.id===o.agent_id);S&&h(S)}else s(Oi),h(null),c("")},[e,o,C]);const w=async()=>{i(!0);try{if(!g&&!r.selectedAgentId){console.error("Agent ID is required to create a schedule."),i(!1);return}const S={prompt:r.prompt,interval:Number(r.interval),unit:r.unit,is_active:r.is_active,one_time:r.one_time,start_time_utc:r.start_time_utc||null,end_time_utc:r.end_time_utc||null};S.start_time_utc===""&&(S.start_time_utc=null),S.end_time_utc===""&&(S.end_time_utc=null);const I=g?o.agent_id:r.selectedAgentId;if(!I){console.error("Agent ID is missing for submission."),i(!1);return}await n(S,I),t()}catch(S){console.error("Failed to submit schedule:",S),Sn(`Failed to save schedule: ${S instanceof Error?S.message:"Unknown error"}`)}finally{i(!1)}},x=g?"Edit schedule":"New schedule",k=b||!g&&!r.selectedAgentId&&a,P=u.jsxs(u.Fragment,{children:[u.jsx(zi,{onClick:t,disabled:a,startIcon:u.jsx(Wu,{size:18}),"data-tour-tag":"create-schedule-dialog-cancel-button",children:"Cancel"}),u.jsx(Hi,{onClick:w,disabled:a||!r.prompt||r.interval===""||r.interval<1||!g&&!r.selectedAgentId,startIcon:a?u.jsx(ls,{size:"sm"}):u.jsx(_u,{size:18}),children:a?"Saving":g?"Save changes":"Create schedule"})]});return u.jsx(Ui,{open:e,onClose:t,title:x,actions:P,maxWidth:"sm",fullWidth:!0,dataTourTag:"create-schedule-dialog",children:u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs("div",{className:"col-span-2 flex items-start gap-2",children:[u.jsx(ea,{size:16,"aria-hidden":"true",className:"mt-0.5 shrink-0 text-info"}),u.jsx("p",{className:"text-body-sm text-ink-muted",children:'It is usually quicker to ask an agent in chat — "send me an email with the latest news at 8am every day" — and it will set this up for you.'})]}),!g&&u.jsxs("div",{className:"col-span-2 flex flex-col gap-1.5",children:[u.jsxs(gt,{htmlFor:"agent-select-for-schedule",children:["Agent ",u.jsx("span",{className:"text-danger",children:"*"})]}),u.jsx(cP,{options:C,selected:y,onSelect:S=>{h(S),s(I=>({...I,selectedAgentId:S?S.id:null}))},onQueryChange:c,loading:f,invalid:k}),k&&u.jsx("p",{className:"text-danger text-meta",children:b?"Failed to load agents.":"Agent selection is required."})]}),g&&o&&u.jsxs("p",{className:"col-span-2 text-body-sm text-ink-muted",children:["Runs as"," ",u.jsx("span",{className:"font-medium text-ink",children:y?.name||`${o.agent_id.substring(0,8)}…`}),". The agent cannot be changed after a schedule is created."]}),u.jsxs("div",{className:"col-span-2 flex flex-col gap-1.5",children:[u.jsxs(gt,{htmlFor:"prompt",className:"items-center",children:["Prompt ",u.jsx("span",{className:"text-danger",children:"*"}),u.jsx(qt,{side:"top",align:"start",content:u.jsxs("div",{className:"flex flex-col gap-1",children:[u.jsx("span",{children:"This is the message that will be sent to the agent on the schedule."}),u.jsx("span",{children:'Example: "Send me an email with a detailed world news breakdown with key events"'})]}),children:u.jsx(ea,{size:14,"aria-hidden":"true",className:"text-info"})})]}),u.jsx(Ki,{id:"prompt",name:"prompt",value:r.prompt,onChange:S=>s(I=>({...I,prompt:S.target.value})),required:!0,rows:3,disabled:a,placeholder:"Send me an email with a detailed world news breakdown"})]}),u.jsxs("div",{className:"flex flex-col gap-1.5",children:[u.jsxs(gt,{htmlFor:"interval",children:["Interval ",u.jsx("span",{className:"text-danger",children:"*"})]}),u.jsx(qo,{id:"interval",name:"interval",type:"number",min:1,value:r.interval,onChange:S=>{const I=S.target.value;s(T=>({...T,interval:I===""?"":Number.parseInt(I,10)}))},required:!0,disabled:a,placeholder:"1"})]}),u.jsxs("div",{className:"flex flex-col gap-1.5",children:[u.jsxs(gt,{htmlFor:"unit-select",children:["Unit ",u.jsx("span",{className:"text-danger",children:"*"})]}),u.jsxs(bn,{value:r.unit||"hours",onValueChange:S=>s(I=>({...I,unit:S})),disabled:a,children:[u.jsx(yn,{id:"unit-select",name:"unit",children:u.jsx(vn,{placeholder:"Select unit"})}),u.jsxs(xn,{children:[u.jsx(Je,{value:"minutes",children:"Minutes"}),u.jsx(Je,{value:"hours",children:"Hours"}),u.jsx(Je,{value:"days",children:"Days"})]})]})]}),u.jsx(rr,{label:"Start time",value:r.start_time_utc??null,onChange:S=>s(I=>({...I,start_time_utc:S})),disabled:a,helperText:"If not set, starts immediately or on next interval."}),u.jsx(rr,{label:"End time (optional)",value:r.end_time_utc??null,onChange:S=>s(I=>({...I,end_time_utc:S})),disabled:a,helperText:"If not set, schedule runs indefinitely."}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx($r,{id:"is-active",checked:r.is_active||!1,onCheckedChange:S=>s(I=>({...I,is_active:S})),disabled:a}),u.jsx(gt,{htmlFor:"is-active",children:"Active"})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx($r,{id:"one-time",checked:r.one_time||!1,onCheckedChange:S=>s(I=>({...I,one_time:S})),disabled:a}),u.jsx(gt,{htmlFor:"one-time",children:"Run once"})]})]})})},dP=(e,t)=>om(e,t),pP=e=>{const t=Wn.baseUrl;return as({queryKey:["agent-name",e,t],queryFn:async()=>t?(await Hu.getAgent(t,e)).result?.name||"Unknown agent":(console.warn("Base URL for Local Operator API is not configured."),"Agent ID"),enabled:!!e&&!!t,staleTime:1e3*60*5})},fP=({schedule:e,onEdit:t,onDelete:n,onToggleActive:o,nowMs:r=Date.now()})=>{const{data:s,isLoading:a}=pP(e.agent_id),i=p.useId();return u.jsxs("div",{title:`Schedule ID: ${e.id}`,className:je("group flex items-start gap-3 border-hairline border-b px-4 py-3 last:border-b-0","transition-colors duration-fast ease-out-quart hover:bg-row-hover"),children:[u.jsxs("div",{className:je("flex min-w-0 flex-1 flex-col gap-1"),children:[u.jsx("p",{className:je("min-w-0 break-words text-body-sm",e.is_active?"text-ink":"text-ink-muted"),children:e.prompt}),u.jsxs("p",{className:je("flex flex-wrap items-center gap-x-1.5 text-meta"),children:[u.jsx("span",{className:je("text-ink-muted"),children:dP(e,r)}),u.jsx("span",{"aria-hidden":"true",className:je("text-ink-dim"),children:"·"}),a?u.jsx(rd,{className:je("h-3 w-24")}):u.jsx("span",{className:je("truncate text-ink-dim"),children:s||e.agent_id.substring(0,8)})]})]}),u.jsxs("div",{className:je("flex shrink-0 items-center gap-1"),children:[u.jsx(qt,{content:e.is_active?"Pause schedule":"Resume schedule",children:u.jsx("span",{className:je("flex items-center pr-1"),children:u.jsx($r,{id:i,checked:e.is_active,onCheckedChange:()=>o(e),"aria-label":e.is_active?"Pause schedule":"Resume schedule"})})}),u.jsxs("div",{className:je("flex items-center gap-0.5","pointer-events-none opacity-0","group-hover:pointer-events-auto group-hover:opacity-100","group-focus-within:pointer-events-auto group-focus-within:opacity-100"),children:[u.jsx(qt,{content:"Edit schedule",children:u.jsx(bt,{variant:"ghost",size:"icon-sm",onClick:()=>t(e),"aria-label":"Edit schedule",children:u.jsx(Yi,{})})}),u.jsx(qt,{content:"Delete schedule",children:u.jsx(bt,{variant:"ghost",size:"icon-sm",onClick:()=>n(e.id),"aria-label":"Delete schedule",className:je("hover:bg-danger-wash hover:text-danger"),children:u.jsx(zu,{})})})]})]})]})},mP=20,hP=9,oo=6e4,gP=["minutes","hours","days","weeks"],bP={minutes:"Minutes",hours:"Hours",days:"Days",weeks:"Weeks"},yP={minutes:oo,hours:60*oo,days:24*60*oo,weeks:7*24*60*oo},vP=({open:e,onClose:t,nowMs:n=Date.now(),edit:o=null})=>{const r=o!==null,[s,a]=p.useState("new"),[i,l]=p.useState(null),[c,d]=p.useState(""),[m,y]=p.useState("in-an-hour"),[h,g]=p.useState(null),[v,f]=p.useState("never"),[b,C]=p.useState("1"),[w,x]=p.useState("hours"),[k,P]=p.useState("never"),[S,I]=p.useState(null),[T,O]=p.useState(2),[N,M]=p.useState(()=>crypto.randomUUID()),L=cm(e),A=Dl(),F=A.refetch;p.useEffect(()=>{e&&F()},[e,F]);const E=um(),B=dm(),G=qi(j=>j.cwd),$=E.isPending||B.isPending,Z=p.useId();p.useEffect(()=>{e&&(a("new"),l(null),d(o?.message??""),y(r?"keep":"in-an-hour"),g(null),f(r?"keep":"never"),C("1"),x("hours"),P(r?"keep":"never"),I(null),O(2),M(crypto.randomUUID()))},[e,o,r]);const W=p.useMemo(()=>{const j=new Date(n);return j.setHours(mP,0,0,0),j.getTime()>n+oo?j:null},[n]),ne=p.useMemo(()=>{const j=new Date(n);return j.setDate(j.getDate()+1),j.setHours(hP,0,0,0),j},[n]),te=p.useMemo(()=>[...L.data??[]].sort((j,H)=>H.mtime-j.mtime),[L.data]),se=te.find(j=>j.id===i),U=A.data?.entries.find(j=>j.session_id===i)?.schedules.length??0,oe=sm(b),ce=v==="every"&&oe!==null,fe=ce&&am(oe),re=ce&&oe!==null?oe*yP[w]:null,Q=!r&&s==="existing"&&!i,_=m==="pick"&&!h,q=k==="date"&&!S,X=k==="runs"&&T==="",K=Zf({message:c,needsConversation:Q,hasConversationChoices:te.length>0,repeatIntervalNotWhole:v==="every"&&oe===null,repeatMs:re,endsRuns:k==="runs"&&T!==""?T:null,existingWakeCount:U,alreadyRun:o?.wake.fired_count??0}),ue=K.invalid||_||q||X,J=!r||c!==o.message||m!=="keep"||v!=="keep"||k!=="keep",Y=Qf(G),ee=()=>m==="keep"?null:m==="in-30-minutes"?{in:"30m"}:m==="in-an-hour"?{in:"1h"}:m==="tonight"?W?{at:W.toISOString()}:null:m==="tomorrow"?{at:ne.toISOString()}:h?{at:h}:null,ie=async()=>{if(ue)return;const j=ee();try{if(o){await B.mutateAsync({sessionId:o.sessionId,wakeId:o.wakeId,message:c.trim(),...j?{firstRun:j}:{},...fe&&oe!==null?{every:ka(oe,w)}:{},...v==="every"&&k==="date"&&S?{until:S}:{},...v==="every"&&k==="runs"&&T!==""?{limit:T}:{}}),kn(`Wake updated — ${Ho(c.trim())}`),t();return}const H=await E.mutateAsync({requestId:N,...i?{sessionId:i}:{cwd:G},message:c.trim(),firstRun:j??{in:"1h"},...fe&&oe!==null?{every:ka(oe,w)}:{},...v==="every"&&k==="date"&&S?{until:S}:{},...v==="every"&&k==="runs"&&T!==""?{limit:T}:{}});kn(H.index_written?`Scheduled task created — ${Ho(c.trim())}`:`Scheduled task created — ${Ho(c.trim())}. The list may lag until the index catches up.`),t()}catch(H){Sn(H instanceof Error?`${r?"Could not save the wake":"Could not create the scheduled task"}: ${H.message}`:r?"Could not save the wake.":"Could not create the scheduled task.")}},z=u.jsxs(u.Fragment,{children:[u.jsx(zi,{onClick:t,disabled:$,children:"Cancel"}),u.jsx(Hi,{onClick:ie,disabled:ue||$||!J,startIcon:u.jsx(Ar,{size:18}),children:r?$?"Saving":"Save":$?"Creating":"Create"})]});return u.jsxs(Ui,{open:e,onClose:t,title:r?"Edit wake":"New scheduled task",actions:z,maxWidth:"sm",fullWidth:!0,dataTourTag:"create-scheduled-task-dialog",children:[o&&u.jsxs("p",{className:"text-body-sm text-ink-dim",children:[o.conversationName," · wake ",o.position," of ",o.count]}),u.jsxs("div",{className:"flex flex-col gap-4",children:[u.jsxs("div",{className:"flex flex-col gap-1.5",children:[u.jsxs(gt,{htmlFor:`${Z}-prompt`,children:["Prompt ",u.jsx("span",{className:"text-danger",children:"*"})]}),u.jsx(Ki,{id:`${Z}-prompt`,name:"prompt",value:c,onChange:j=>d(j.target.value),rows:3,disabled:$,placeholder:"Send me an email with a detailed world news breakdown"}),u.jsx("p",{className:"text-body-sm text-ink-muted",children:"This is the message the conversation receives when it wakes up."}),K.prompt&&u.jsx("p",{className:"text-meta text-danger",children:K.prompt})]}),!r&&u.jsxs("fieldset",{className:"m-0 flex flex-col gap-1.5 border-0 p-0",children:[u.jsx("legend",{className:"sr-only",children:"Run in"}),u.jsx(gt,{children:"Run in"}),u.jsx("div",{className:"flex w-fit gap-0.5 rounded-md bg-sunken p-0.5",children:[["new","A new conversation"],["existing","An existing conversation"]].map(([j,H])=>u.jsx(bt,{variant:"ghost",size:"sm","aria-pressed":s===j,onClick:()=>a(j),disabled:$,className:je(s===j&&"bg-surface text-ink hover:bg-surface"),children:H},j))})]}),!r&&s==="existing"&&u.jsxs("div",{className:"flex flex-col gap-1.5",children:[u.jsx(gt,{htmlFor:`${Z}-conversation`,children:"Conversation"}),u.jsxs(bn,{value:i??"",onValueChange:l,disabled:$,children:[u.jsx(yn,{id:`${Z}-conversation`,children:u.jsx(vn,{placeholder:"Pick a conversation"})}),u.jsx(xn,{children:te.map(j=>u.jsxs(Je,{value:j.id,textValue:j.name||j.id.slice(0,8),children:[j.name||`Untitled ${j.id.slice(0,8)}`,u.jsx("span",{className:"pl-2 text-ink-dim",children:Uu(Math.max(0,n-j.mtime*1e3))})]},j.id))})]}),L.isLoading&&u.jsx("p",{className:"text-meta text-ink-dim",children:"Loading conversations…"}),L.error&&u.jsxs("p",{className:"text-meta text-danger",children:["Could not read your conversations: ",L.error.message]}),!L.isLoading&&!L.error&&te.length===0&&u.jsxs("p",{className:"text-meta text-ink-dim",children:["No conversations yet — start one in chat, or choose"," ",u.jsx("em",{children:"A new conversation"}),"."]})]}),!r&&s==="new"&&u.jsxs("p",{className:"text-body-sm text-ink-dim",children:["Starts in ",Y," with your default model."]}),!r&&s==="existing"&&se&&u.jsxs("p",{className:"text-body-sm text-ink-dim",children:["Runs in ",se.name,", as a turn in that conversation."]}),!r&&K.conversation&&u.jsx("p",{className:"text-meta text-danger",children:K.conversation}),u.jsxs("div",{className:"flex flex-col gap-1.5",children:[u.jsx(gt,{htmlFor:`${Z}-first-run`,children:"First run"}),u.jsxs(bn,{value:m,onValueChange:j=>y(j),disabled:$,children:[u.jsx(yn,{id:`${Z}-first-run`,children:u.jsx(vn,{})}),u.jsxs(xn,{children:[r&&u.jsx(Je,{value:"keep",children:Hf(o.wake,n,o.parked)}),u.jsx(Je,{value:"in-an-hour",children:"In an hour"}),u.jsx(Je,{value:"in-30-minutes",children:"In 30 minutes"}),W&&u.jsx(Je,{value:"tonight",children:"Tonight at 8:00 PM"}),u.jsx(Je,{value:"tomorrow",children:"Tomorrow at 9:00 AM"}),u.jsx(Je,{value:"pick",children:"Pick a time…"})]})]}),m==="pick"&&u.jsx(rr,{label:"First run at",value:h,onChange:g,disabled:$})]}),u.jsxs("div",{className:"flex flex-col gap-1.5",children:[u.jsx(gt,{htmlFor:`${Z}-repeat`,children:"Repeat"}),u.jsxs(bn,{value:v,onValueChange:j=>f(j),disabled:$,children:[u.jsx(yn,{id:`${Z}-repeat`,children:u.jsx(vn,{})}),u.jsxs(xn,{children:[r&&u.jsx(Je,{value:"keep",children:Uf(o.wake)}),u.jsx(Je,{value:"never",children:"Don't repeat"}),u.jsx(Je,{value:"every",children:"Every"})]})]}),v==="every"&&u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(qo,{type:"number",min:1,step:1,"aria-label":"Repeat interval",className:"w-24",value:b,onChange:j=>C(j.target.value),disabled:$}),u.jsxs(bn,{value:w,onValueChange:j=>x(j),disabled:$,children:[u.jsx(yn,{"aria-label":"Repeat unit",className:"w-36",children:u.jsx(vn,{})}),u.jsx(xn,{children:gP.map(j=>u.jsx(Je,{value:j,children:bP[j]},j))})]})]}),K.repeatInterval&&u.jsx("p",{className:"text-meta text-danger",children:K.repeatInterval}),K.repeat&&u.jsx("p",{className:"text-meta text-danger",children:K.repeat})]}),(v==="every"||k!=="never")&&u.jsxs("div",{className:"flex flex-col gap-1.5",children:[u.jsx(gt,{htmlFor:`${Z}-ends`,children:"Ends"}),u.jsxs(bn,{value:k,onValueChange:j=>P(j),disabled:$,children:[u.jsx(yn,{id:`${Z}-ends`,children:u.jsx(vn,{})}),u.jsxs(xn,{children:[r&&u.jsx(Je,{value:"keep",children:Yf(o.wake,n)}),u.jsx(Je,{value:"never",children:"Never"}),u.jsx(Je,{value:"date",children:"On a date…"}),u.jsx(Je,{value:"runs",children:"After N runs"})]})]}),k==="date"&&u.jsx(rr,{label:"Last run",value:S,onChange:I,disabled:$}),k==="runs"&&u.jsx(qo,{type:"number",min:1,"aria-label":"Number of runs",className:"w-24",value:T,onChange:j=>O(j.target.value===""?"":Number.parseInt(j.target.value,10)),disabled:$}),K.ends&&u.jsx("p",{className:"text-meta text-danger",children:K.ends})]}),u.jsx("p",{className:"text-body-sm text-ink-dim",children:"If a tool needs approval, the wake parks and waits for you rather than acting on its own; a wait that runs out stops the turn without running the tool."}),r&&u.jsx("p",{className:"text-body-sm text-ink-dim",children:"A new first run moves the next wake to that time, and a new repeat carries on from it. Runs already made still count, and the wake keeps its place in the conversation."}),!r&&u.jsx("p",{className:"text-body-sm text-ink-dim",children:'It is usually quicker to ask an agent in chat — "send me the latest news at 8am every day" — and it will set this up for you.'})]})]})},ts=["pointer-events-none opacity-0","group-hover:pointer-events-auto group-hover:opacity-100","group-focus-within:pointer-events-auto group-focus-within:opacity-100"],Fi=({wake:e,onCancel:t,onEdit:n})=>u.jsx(qu,{row:e,trailingClause:e.ranLabel||void 0,action:u.jsxs(u.Fragment,{children:[u.jsx(qt,{content:"Edit wake",children:u.jsx(bt,{variant:"ghost",size:"icon-sm","aria-label":"Edit wake",onClick:n,className:je(...ts,"group-hover/wake:pointer-events-auto group-hover/wake:opacity-100","group-focus-within/wake:pointer-events-auto group-focus-within/wake:opacity-100"),children:u.jsx(Yi,{})})}),u.jsx(qt,{content:"Cancel wake",children:u.jsx(bt,{variant:"ghost",size:"icon-sm","aria-label":"Cancel wake",onClick:t,className:je(...ts,"group-hover/wake:pointer-events-auto group-hover/wake:opacity-100","group-focus-within/wake:pointer-events-auto group-focus-within/wake:opacity-100","hover:bg-danger-wash hover:text-danger"),children:u.jsx(sd,{})})})]})}),xP=({row:e,onOpen:t,onCancel:n,onEdit:o})=>{const[r,s]=p.useState(!1),a=e.wakes.slice(e.visibleWakes.length);return u.jsx("li",{"data-scheduled-task-row":e.sessionId,className:je("group border-hairline border-b px-4 py-3 last:border-b-0","transition-colors duration-fast ease-out-quart hover:bg-row-hover"),children:u.jsxs("div",{className:je("flex items-start gap-3"),children:[u.jsxs("div",{className:je("flex min-w-0 flex-1 flex-col gap-1"),children:[u.jsxs("div",{className:je("flex min-w-0 items-baseline justify-between gap-2"),children:[u.jsx("span",{className:je("min-w-0 truncate text-body-sm text-ink"),title:e.cwd,children:e.name}),e.meta&&u.jsx("span",{className:je("shrink-0 text-ink-muted text-meta"),children:e.meta})]}),u.jsx("ul",{className:je("flex flex-col gap-1 pl-4"),children:e.visibleWakes.map(i=>u.jsx(Fi,{wake:i,onCancel:()=>n(e,i),onEdit:()=>o(e,i)},i.id))}),a.length>0&&u.jsx(Yu,{summary:r?"Show fewer":zf(a.length),onOpenChange:s,className:je("pl-4"),triggerClassName:je("text-ink-muted hover:text-ink"),children:u.jsx("ul",{className:je("flex flex-col gap-1"),children:a.map(i=>u.jsx(Fi,{wake:i,onCancel:()=>n(e,i),onEdit:()=>o(e,i)},i.id))})})]}),u.jsx("div",{className:je("flex shrink-0 items-center gap-0.5",...ts),children:u.jsx(qt,{content:"Open conversation",children:u.jsx(bt,{variant:"ghost",size:"icon-sm","aria-label":"Open conversation",onClick:()=>t(e.sessionId),children:u.jsx(md,{})})})})]})})},RP=({nowMs:e=Date.now()})=>{const t=Ku(),[n,o]=p.useState(null),[r,s]=p.useState(null),[a,i]=p.useState(null),l=Dl(),c=_n(),d=()=>{l.refetch(),Ff(c)},m=Nf(),y=pm(),h=Af(),g=$f(),v=m.data?.result?.schedules??[],f=l.data?.supervisor,b=f?.supported===!0&&f.running===!0&&f.verifiable!==!1,C=nm(l.data?.entries,e,{dueInstants:b}),w=T=>{qi.getState().openSession(T).then(O=>{O&&t(`/chat/${T}`)})},x=async()=>{if(!r)return;const{row:T,wake:O}=r;try{const N=T.sessionId;await y.mutateAsync({sessionId:N,wakeId:O.id}),kn("Wake cancelled",{action:{label:"Open conversation",onClick:()=>w(N)}}),s(null)}catch(N){Sn(N instanceof Error?`Could not cancel the wake: ${N.message}`:"Could not cancel the wake.")}},k=async T=>{if(a)try{await h.mutateAsync({scheduleId:a.id,scheduleData:T}),kn("Schedule updated"),i(null)}catch(O){Sn(O instanceof Error?`Could not save the schedule: ${O.message}`:"Could not save the schedule.")}},P=async T=>{const O=v.find(N=>N.id===T);try{await g.mutateAsync({scheduleId:T,agentId:O?.agent_id}),kn("Schedule removed")}catch(N){Sn(N instanceof Error?`Could not remove the schedule: ${N.message}`:"Could not remove the schedule.")}},S=async T=>{try{await h.mutateAsync({scheduleId:T.id,scheduleData:{is_active:!T.is_active}}),kn(`Schedule ${T.is_active?"deactivated":"activated"}.`)}catch(O){Sn(O instanceof Error?`Could not toggle the schedule: ${O.message}`:"Could not toggle the schedule.")}},I=Xf({loading:l.isLoading,error:l.error!==null,readError:l.data?.read_error===!0,wakeRows:C.length,legacyLoading:m.isLoading,legacyRows:v.length});return u.jsxs("div",{className:"flex h-full flex-col gap-8 p-6",children:[u.jsx(Xu,{title:"Schedules",icon:_i,subtitle:"Work your conversations do on a schedule, repeating or once.",children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(bt,{variant:"secondary",size:"icon","aria-label":"Refresh scheduled tasks",title:"Refresh scheduled tasks",disabled:l.isFetching,onClick:d,"data-tour-tag":"refresh-schedules-button",children:u.jsx(Gu,{})}),u.jsxs(bt,{variant:"secondary",size:"md",onClick:()=>o({mode:"create"}),"data-tour-tag":"create-schedule-button",children:[u.jsx(Ar,{}),"New scheduled task"]})]})}),u.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto rounded-lg border border-hairline bg-surface",children:[l.isLoading&&u.jsx("div",{className:"flex justify-center py-16",children:u.jsx(ls,{label:"Loading scheduled tasks"})}),l.error&&u.jsxs("div",{className:"flex flex-col items-start gap-2 border-hairline border-b p-4",children:[u.jsx("p",{className:"text-body text-ink",children:"Could not load scheduled tasks."}),u.jsx("p",{className:"text-body-sm text-ink-muted",children:l.error.message}),(C.length>0||v.length>0)&&u.jsx("p",{className:"text-body-sm text-ink-muted",children:Gf}),u.jsx(bt,{variant:"secondary",size:"sm",onClick:d,children:"Try again"})]}),!l.isLoading&&l.data?.read_error&&u.jsxs("div",{className:"flex flex-col items-start gap-2 border-hairline border-b p-4",children:[u.jsx(ta,{variant:"warning",children:"Could not read this machine's scheduled tasks, so the list below may be incomplete."}),u.jsx(bt,{variant:"secondary",size:"sm",onClick:d,children:"Try again"})]}),!l.isLoading&&f&&!b&&u.jsxs("div",{className:"border-hairline border-b p-4",children:[u.jsx(ta,{variant:"warning",children:qf(f)}),f.detail&&u.jsx("p",{className:"mt-2 font-mono text-meta text-ink-dim",children:f.detail})]}),I&&u.jsxs("div",{className:"flex flex-col items-center gap-2 px-6 py-16 text-center",children:[u.jsx("p",{className:"text-heading text-ink",children:"No scheduled tasks yet"}),u.jsx("p",{className:"max-w-100 text-body-sm text-ink-muted",children:"Ask an agent in chat to do something on a regular basis — “send me the news at 8am every day” — and it will appear here. You can also set one up by hand."}),u.jsxs(bt,{variant:"secondary",size:"sm",onClick:()=>o({mode:"create"}),className:"mt-2",children:[u.jsx(Ar,{}),"New scheduled task"]})]}),C.length>0&&u.jsx("ul",{className:"flex flex-col",children:C.map(T=>u.jsx(xP,{row:T,onOpen:w,onCancel:(O,N)=>s({row:O,wake:N}),onEdit:(O,N)=>o({mode:"edit",sessionId:O.sessionId,wakeId:N.id,message:N.message,conversationName:O.name,position:N.position,count:O.wakes.length,wake:N.source,parked:O.parked})},T.sessionId))}),(v.length>0||m.error)&&u.jsxs("section",{className:"border-hairline border-t bg-sunken",children:[u.jsxs("div",{className:"flex flex-col gap-1 px-4 py-3",children:[u.jsx("h2",{className:"text-heading text-ink",children:"Legacy schedules"}),u.jsx("p",{className:"max-w-150 text-body-sm text-ink-muted",children:"These run on the older agent-schedule engine. New scheduled tasks are created as wakes, in a conversation."}),m.error&&u.jsxs("p",{className:"text-body-sm text-danger",children:["Could not load legacy schedules. ",m.error.message]})]}),v.map(T=>u.jsx(fP,{schedule:T,nowMs:e,onEdit:()=>i(T),onDelete:P,onToggleActive:S},T.id))]}),!l.isLoading&&l.data?.truncated&&u.jsxs("p",{className:"border-hairline border-t px-4 py-3 text-body-sm text-ink-dim",children:["Showing ",l.data.entries.length," of ",l.data.total," ","conversations with wakes."]}),(C.length>0||v.length>0)&&u.jsxs("p",{className:"border-hairline border-t px-4 py-3 text-body-sm text-ink-dim",children:[b?"Wakes fire whether or not this window is open. ":"",Kf]})]}),u.jsx(vP,{open:n!==null,onClose:()=>o(null),nowMs:e,edit:n?.mode==="edit"?n:null}),u.jsx(uP,{open:a!==null,onClose:()=>i(null),onSubmit:T=>k(T),initialData:a}),u.jsx(Qu,{open:r!==null,title:"Cancel this wake?",message:r?`“${Ho(r.wake.message)}” will not fire again. The conversation stays.`:"",confirmText:"Cancel wake",cancelText:"Keep",isDangerous:!0,onConfirm:()=>void x(),onCancel:()=>s(null)})]})};export{RP as SchedulesPage};
|
|
120
|
+
`));x&&!C&&S.current&&S.current.getSectionContent(A.startIndex).focus()},[]),dt(()=>{if(!(!W||!S.current)){if(L==="all")S.current.getRoot().focus();else if(typeof L=="number"){const J=S.current.getSectionContent(L);J&&J.focus()}}},[L,W]),dt(()=>{Ks({focused:W,domGetters:T,stateResponse:O})}),p.useImperativeHandle(P,()=>({getSections:()=>F.sections,getActiveSectionIndex:()=>wi(S),setSelectedSections:J=>{if(C||!S.current)return;const Y=_r(J,F.sections);ne((Y==="all"?0:Y)!==null),G(J)},focusField:te,isFieldFocused:()=>Ci(S)})),R({},i,se,{onBlur:re,onClick:_,onFocus:Q,onInput:X,onPaste:q,onKeyDown:fe,onClear:K},U,{error:M,clearable:!!(b&&!N&&!w&&!C),focused:k??W,sectionListRef:I,enableAccessibleFieldDOMStructure:!0,elements:ue,areAllSectionsEmpty:N,disabled:C,readOnly:w,autoFocus:x,openPickerAriaLabel:Z})};function wi(e){const t=nt(document);return!t||!e.current||!e.current.getRoot().contains(t)?null:e.current.getSectionIndexFromDOMElement(t)}function Ci(e){const t=nt(document);return!!e.current&&e.current.getRoot().contains(t)}const Pn=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),Bw=(e,t,n)=>{let o=0,r=n?1:0;const s=[];for(let a=0;a<e.length;a+=1){const i=e[a],l=Ps(i,n?"input-rtl":"input-ltr",t),c=`${i.startSeparator}${l}${i.endSeparator}`,d=Pn(c).length,m=c.length,y=Pn(l),h=r+(y===""?0:l.indexOf(y[0]))+i.startSeparator.length,g=h+y.length;s.push(R({},i,{start:o,end:o+d,startInInput:h,endInInput:g})),o+=d,r+=m}return s},Ww=e=>{const t=wt(),n=Mn(),o=Mn(),{props:r,manager:s,skipContextFieldRefAssignment:a,manager:{valueType:i,internal_valueManager:l,internal_fieldValueManager:c,internal_useOpenPickerButtonAriaLabel:d}}=e,{internalProps:m,forwardedProps:y}=ql(r,i),h=Yc({manager:s,internalProps:m,skipContextFieldRefAssignment:a}),{onFocus:g,onClick:v,onPaste:f,onBlur:b,onKeyDown:C,onClear:w,clearable:x,inputRef:k,placeholder:P}=y,{readOnly:S=!1,disabled:I=!1,autoFocus:T=!1,focused:O,unstableFieldRef:N}=h,M=p.useRef(null),L=ot(k,M),A=Uc({manager:s,internalPropsWithDefaults:h,forwardedProps:y}),{activeSectionIndex:F,areAllSectionsEmpty:E,error:B,localizedDigits:G,parsedSelectedSections:$,sectionOrder:Z,state:W,value:ne,clearValue:te,clearActiveSection:se,setCharacterQuery:U,setSelectedSections:oe,setTempAndroidValueStr:ce,updateSectionValue:fe,updateValueFromValueStr:re,getSectionsFromValue:Q}=A,_=Hc({stateResponse:A}),q=d(ne),X=p.useMemo(()=>Bw(W.sections,G,t),[W.sections,G,t]);function K(){const be=M.current.selectionStart??0;let ve;be<=X[0].startInInput||be>=X[X.length-1].endInInput?ve=1:ve=X.findIndex(Ne=>Ne.startInInput-Ne.startSeparator.length>be);const he=ve===-1?X.length-1:ve-1;oe(he)}function ue(be=0){nt(document)!==M.current&&(M.current?.focus(),oe(be))}const J=de(be=>{g?.(be);const ve=M.current;n.start(0,()=>{!ve||ve!==M.current||F==null&&(ve.value.length&&Number(ve.selectionEnd)-Number(ve.selectionStart)===ve.value.length?oe("all"):K())})}),Y=de((be,...ve)=>{be.isDefaultPrevented()||(v?.(be,...ve),K())}),ee=de(be=>{if(f?.(be),be.preventDefault(),S||I)return;const ve=be.clipboardData.getData("text");if(typeof $=="number"){const he=W.sections[$],Ne=/^[a-zA-Z]+$/.test(ve),Ue=/^[0-9]+$/.test(ve),pe=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(ve);if(he.contentType==="letter"&&Ne||he.contentType==="digit"&&Ue||he.contentType==="digit-with-letter"&&pe){U(null),fe({section:he,newSectionValue:ve,shouldGoToNextSection:!0});return}if(Ne||Ue)return}U(null),re(ve)}),ie=de(be=>{b?.(be),oe(null)}),z=de(be=>{if(S)return;const ve=be.target.value;if(ve===""){te();return}const he=be.nativeEvent.data,Ne=he&&he.length>1,Ue=Ne?he:ve,pe=Pn(Ue);if($==="all"&&oe(F),F==null||Ne){re(Ne?he:pe);return}let Ce;if($==="all"&&pe.length===1)Ce=pe;else{const Me=Pn(c.getV6InputValueFromSections(X,G,t));let xe=-1,Ke=-1;for(let ft=0;ft<Me.length;ft+=1)xe===-1&&Me[ft]!==pe[ft]&&(xe=ft),Ke===-1&&Me[Me.length-ft-1]!==pe[pe.length-ft-1]&&(Ke=ft);const rt=X[F];if(xe<rt.start||Me.length-Ke-1>rt.end)return;const Oo=pe.length-Me.length+rt.end-Pn(rt.endSeparator||"").length;Ce=pe.slice(rt.start+Pn(rt.startSeparator||"").length,Oo)}if(Ce.length===0){Qm()&&ce(Ue),se();return}_({keyPressed:Ce,sectionIndex:F})}),j=de((be,...ve)=>{be.preventDefault(),w?.(be,...ve),te(),Si(M)?oe(Z.startIndex):ue(0)}),H=qc({manager:s,internalPropsWithDefaults:h,stateResponse:A}),ge=de(be=>{C?.(be),H(be)}),ye=p.useMemo(()=>P!==void 0?P:c.getV6InputValueFromSections(Q(l.emptyValue),G,t),[P,c,Q,l.emptyValue,G,t]),Le=p.useMemo(()=>W.tempValueStrAndroid??c.getV6InputValueFromSections(W.sections,G,t),[W.sections,c,W.tempValueStrAndroid,G,t]);p.useEffect(()=>{M.current&&M.current===nt(document)&&oe("all")},[]),dt(()=>{function be(){if(!M.current)return;if($==null){M.current.scrollLeft&&(M.current.scrollLeft=0);return}if(M.current!==nt(document))return;const ve=M.current.scrollTop;if($==="all")M.current.select();else{const he=X[$],Ne=he.type==="empty"?he.startInInput-he.startSeparator.length:he.startInInput,Ue=he.type==="empty"?he.endInInput+he.endSeparator.length:he.endInInput;(Ne!==M.current.selectionStart||Ue!==M.current.selectionEnd)&&M.current===nt(document)&&M.current.setSelectionRange(Ne,Ue),o.start(0,()=>{M.current&&M.current===nt(document)&&M.current.selectionStart===M.current.selectionEnd&&(M.current.selectionStart!==Ne||M.current.selectionEnd!==Ue)&&be()})}M.current.scrollTop=ve}be()});const Pe=p.useMemo(()=>F==null||W.sections[F].contentType==="letter"?"text":"numeric",[F,W.sections]),qe=!(M.current&&M.current===nt(document))&&E;return p.useImperativeHandle(N,()=>({getSections:()=>W.sections,getActiveSectionIndex:()=>{const be=M.current.selectionStart??0,ve=M.current.selectionEnd??0;if(be===0&&ve===0)return null;const he=be<=X[0].startInInput?1:X.findIndex(Ne=>Ne.startInInput-Ne.startSeparator.length>be);return he===-1?X.length-1:he-1},setSelectedSections:be=>oe(be),focusField:ue,isFieldFocused:()=>Si(M)})),R({},y,{error:B,clearable:!!(x&&!E&&!S&&!I),onBlur:ie,onClick:Y,onFocus:J,onPaste:ee,onKeyDown:ge,onClear:j,inputRef:L,enableAccessibleFieldDOMStructure:!1,placeholder:ye,inputMode:Pe,autoComplete:"off",value:qe?"":Le,onChange:z,focused:O,disabled:I,readOnly:S,autoFocus:T,openPickerAriaLabel:q})};function Si(e){return e.current===nt(document)}const Kc=e=>{const t=Bl();return(e.props.enableAccessibleFieldDOMStructure??t?.enableAccessibleFieldDOMStructure??!0?Vw:Ww)(e)};function _w(e={}){const{enableAccessibleFieldDOMStructure:t=!0,ampm:n}=e;return p.useMemo(()=>({valueType:"time",validator:pr,internal_valueManager:et,internal_fieldValueManager:Al,internal_enableAccessibleFieldDOMStructure:t,internal_useApplyDefaultValuesToFieldInternalProps:Hw,internal_useOpenPickerButtonAriaLabel:zw(n)}),[n,t])}function zw(e){return function(n){const o=Te(),r=lt();return p.useMemo(()=>{const s=e??o.is12HourCycleInCurrentLocale()?"fullTime12h":"fullTime24h",a=o.isValid(n)?o.format(n,s):null;return r.openTimePickerDialogue(a)},[n,r,o])}}function Hw(e){const t=Te(),n=Gc(e),o=p.useMemo(()=>e.ampm??t.is12HourCycleInCurrentLocale(),[e.ampm,t]);return p.useMemo(()=>R({},e,n,{format:e.format??(o?t.formats.fullTime12h:t.formats.fullTime24h)}),[e,n,o,t])}function Gc(e){return p.useMemo(()=>({disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1}),[e.disablePast,e.disableFuture])}const Uw=e=>{const t=Fh(e);return Kc({manager:t,props:e})},Yw=["slots","slotProps"],Qc=p.forwardRef(function(t,n){const o=De({props:t,name:"MuiDateField"}),{slots:r,slotProps:s}=o,a=me(o,Yw),i=Bc({slotProps:s,ref:n,externalForwardedProps:a}),l=Uw(i);return u.jsx(Vc,{slots:r,slotProps:s,fieldResponse:l,defaultOpenPickerIcon:Ox})}),Xc=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:o,maxDate:r,disableFuture:s,disablePast:a,timezone:i})=>{const l=fn();return p.useCallback(c=>Do({adapter:l,value:c,timezone:i,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:o,maxDate:r,disableFuture:s,disablePast:a}})!==null,[l,e,t,n,o,r,s,a,i])},qw=(e,t)=>(n,o)=>{switch(o.type){case"setVisibleDate":return R({},n,{slideDirection:o.direction,currentMonth:o.month,isMonthSwitchingAnimating:!t.isSameMonth(o.month,n.currentMonth)&&!e&&!o.skipAnimation,focusedDay:o.focusedDay});case"changeMonthTimezone":{const r=o.newTimezone;if(t.getTimezone(n.currentMonth)===r)return n;let s=t.setTimezone(n.currentMonth,r);return t.getMonth(s)!==t.getMonth(n.currentMonth)&&(s=t.setMonth(s,t.getMonth(n.currentMonth))),R({},n,{currentMonth:s})}case"finishMonthSwitchingAnimation":return R({},n,{isMonthSwitchingAnimating:!1});default:throw new Error("missing support")}},Kw=e=>{const{value:t,referenceDate:n,disableFuture:o,disablePast:r,maxDate:s,minDate:a,onMonthChange:i,onYearChange:l,reduceAnimations:c,shouldDisableDate:d,timezone:m,getCurrentMonthFromVisibleDate:y}=e,h=Te(),g=p.useRef(qw(!!c,h)).current,v=p.useMemo(()=>et.getInitialReferenceValue({value:t,utils:h,timezone:m,props:e,referenceDate:n,granularity:Pt.day}),[n,m]),[f,b]=p.useReducer(g,{isMonthSwitchingAnimating:!1,focusedDay:v,currentMonth:h.startOfMonth(v),slideDirection:"left"}),C=Xc({shouldDisableDate:d,minDate:a,maxDate:s,disableFuture:o,disablePast:r,timezone:m});p.useEffect(()=>{b({type:"changeMonthTimezone",newTimezone:h.getTimezone(v)})},[v,h]);const w=de(({target:k,reason:P})=>{if(P==="cell-interaction"&&f.focusedDay!=null&&h.isSameDay(k,f.focusedDay))return;const S=P==="cell-interaction";let I,T;if(P==="cell-interaction")I=y(k,f.currentMonth),T=k;else if(I=h.isSameMonth(k,f.currentMonth)?f.currentMonth:h.startOfMonth(k),T=k,C(T)){const M=h.startOfMonth(k),L=h.endOfMonth(k);T=po({utils:h,date:T,minDate:h.isBefore(a,M)?M:a,maxDate:h.isAfter(s,L)?L:s,disablePast:r,disableFuture:o,isDateDisabled:C,timezone:m})}const O=!h.isSameMonth(f.currentMonth,I),N=!h.isSameYear(f.currentMonth,I);O&&i?.(I),N&&l?.(h.startOfYear(I)),b({type:"setVisibleDate",month:I,direction:h.isAfterDay(I,f.currentMonth)?"left":"right",focusedDay:f.focusedDay!=null&&T!=null&&h.isSameDay(T,f.focusedDay)?f.focusedDay:T,skipAnimation:S})}),x=p.useCallback(()=>{b({type:"finishMonthSwitchingAnimation"})},[]);return{referenceDate:v,calendarState:f,setVisibleDate:w,isDateDisabled:C,onMonthSwitchingAnimationEnd:x}},Gw=e=>Ve("MuiPickersFadeTransitionGroup",e);We("MuiPickersFadeTransitionGroup",["root"]);const Qw=["children"],Xw=e=>Oe({root:["root"]},Gw,e),Zw=V(ko,{name:"MuiPickersFadeTransitionGroup",slot:"Root"})({display:"block",position:"relative"});function Zc(e){const t=De({props:e,name:"MuiPickersFadeTransitionGroup"}),{className:n,reduceAnimations:o,transKey:r,classes:s}=t,{children:a}=t,i=me(t,Qw),l=Xw(s),c=zn();return o?a:u.jsx(Zw,{className:ae(l.root,n),ownerState:i,children:u.jsx(un,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:c.transitions.duration.enteringScreen,enter:c.transitions.duration.enteringScreen,exit:0},children:a},r)})}function Jw(e){return Ve("MuiPickersDay",e)}const en=We("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]);function Jc(e){const{disabled:t,selected:n,today:o,outsideCurrentMonth:r,day:s,disableMargin:a,disableHighlightToday:i,showDaysOutsideCurrentMonth:l}=e,c=Te(),{ownerState:d}=ze();return p.useMemo(()=>R({},d,{day:s,isDaySelected:n??!1,isDayDisabled:t??!1,isDayCurrent:o??!1,isDayOutsideMonth:r??!1,isDayStartOfWeek:c.isSameDay(s,c.startOfWeek(s)),isDayEndOfWeek:c.isSameDay(s,c.endOfWeek(s)),disableMargin:a??!1,disableHighlightToday:i??!1,showDaysOutsideCurrentMonth:l??!1}),[c,d,s,n,t,o,r,a,i,l])}const eC=["autoFocus","className","classes","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","children","isFirstVisibleCell","isLastVisibleCell","day","selected","disabled","today","outsideCurrentMonth","disableMargin","disableHighlightToday","showDaysOutsideCurrentMonth"],tC=(e,t)=>{const{isDaySelected:n,isDayDisabled:o,isDayCurrent:r,isDayOutsideMonth:s,disableMargin:a,disableHighlightToday:i,showDaysOutsideCurrentMonth:l}=t,c=s&&!l;return Oe({root:["root",n&&!c&&"selected",o&&"disabled",!a&&"dayWithMargin",!i&&r&&"today",s&&l&&"dayOutsideMonth",c&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},Jw,e)},eu=({theme:e})=>R({},e.typography.caption,{width:bo,height:bo,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})`:Ie(e.palette.primary.main,e.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:Ie(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${en.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${en.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}},[`&.${en.disabled}:not(.${en.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${en.disabled}&.${en.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:`0 ${hr}px`}},{props:{isDayOutsideMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(e.vars||e).palette.text.secondary}},{props:{disableHighlightToday:!1,isDayCurrent:!0},style:{[`&:not(.${en.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}}]}),tu=(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]},nC=V(Ln,{name:"MuiPickersDay",slot:"Root",overridesResolver:tu})(eu),oC=V("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:tu})(({theme:e})=>R({},eu({theme:e}),{opacity:0,pointerEvents:"none"})),Zn=()=>{},rC=p.forwardRef(function(t,n){const o=De({props:t,name:"MuiPickersDay"}),{autoFocus:r=!1,className:s,classes:a,isAnimating:i,onClick:l,onDaySelect:c,onFocus:d=Zn,onBlur:m=Zn,onKeyDown:y=Zn,onMouseDown:h=Zn,onMouseEnter:g=Zn,children:v,day:f,selected:b,disabled:C,today:w,outsideCurrentMonth:x,disableMargin:k,disableHighlightToday:P,showDaysOutsideCurrentMonth:S}=o,I=me(o,eC),T=Jc({day:f,selected:b,disabled:C,today:w,outsideCurrentMonth:x,disableMargin:k,disableHighlightToday:P,showDaysOutsideCurrentMonth:S}),O=tC(a,T),N=Te(),M=p.useRef(null),L=ot(M,n);dt(()=>{r&&!C&&!i&&!x&&M.current.focus()},[r,C,i,x]);const A=E=>{h(E),x&&E.preventDefault()},F=E=>{C||c(f),x&&E.currentTarget.focus(),l&&l(E)};return x&&!S?u.jsx(oC,{className:ae(O.root,O.hiddenDaySpacingFiller,s),ownerState:T,role:I.role}):u.jsx(nC,R({className:ae(O.root,s),ref:L,centerRipple:!0,disabled:C,tabIndex:b?0:-1,onKeyDown:E=>y(E,f),onFocus:E=>d(E,f),onBlur:E=>m(E,f),onMouseEnter:E=>g(E,f),onClick:F,onMouseDown:A},I,{ownerState:T,children:v||N.format(f,"dayOfMonth")}))}),sC=p.memo(rC),aC=e=>Ve("MuiPickersSlideTransition",e),mt=We("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),iC=["children","className","reduceAnimations","slideDirection","transKey","classes"],lC=(e,t)=>{const{slideDirection:n}=t,o={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return Oe(o,aC,e)},cC=V(ko,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${mt["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${mt["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${mt.slideEnterActive}`]:t.slideEnterActive},{[`.${mt.slideExit}`]:t.slideExit},{[`.${mt["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${mt["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},[`& .${mt["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${mt["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${mt.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${mt.slideExit}`]:{transform:"translate(0%)"},[`& .${mt["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${mt["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}});function uC(e){const t=De({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:o,reduceAnimations:r,slideDirection:s,transKey:a,classes:i}=t,l=me(t,iC),{ownerState:c}=ze(),d=R({},c,{slideDirection:s}),m=lC(i,d),y=zn();if(r)return u.jsx("div",{className:ae(m.root,o),children:n});const h={exit:m.exit,enterActive:m.enterActive,enter:m.enter,exitActive:m.exitActive};return u.jsx(cC,{className:ae(m.root,o),childFactory:g=>p.cloneElement(g,{classNames:h}),role:"presentation",ownerState:d,children:u.jsx(ps,R({mountOnEnter:!0,unmountOnExit:!0,timeout:y.transitions.duration.complex,classNames:h},l,{children:n}),a)})}const dC=e=>Ve("MuiDayCalendar",e);We("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);const pC=["parentProps","day","focusedDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],fC=["ownerState"],mC=e=>Oe({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},dC,e),nu=(bo+hr*2)*6,hC=V("div",{name:"MuiDayCalendar",slot:"Root"})({}),gC=V("div",{name:"MuiDayCalendar",slot:"Header"})({display:"flex",justifyContent:"center",alignItems:"center"}),bC=V(Wt,{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})),yC=V(Wt,{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})),vC=V(Wt,{name:"MuiDayCalendar",slot:"WeekNumber"})(({theme:e})=>R({},e.typography.caption,{width:bo,height:bo,padding:0,margin:`0 ${hr}px`,color:(e.vars||e).palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),xC=V("div",{name:"MuiDayCalendar",slot:"LoadingContainer"})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:nu}),wC=V(uC,{name:"MuiDayCalendar",slot:"SlideTransition"})({minHeight:nu}),CC=V("div",{name:"MuiDayCalendar",slot:"MonthContainer"})({overflow:"hidden"}),SC=V("div",{name:"MuiDayCalendar",slot:"WeekContainer"})({margin:`${hr}px 0`,display:"flex",justifyContent:"center"});function kC(e){let{parentProps:t,day:n,focusedDay:o,selectedDays:r,isDateDisabled:s,currentMonthNumber:a,isViewFocused:i}=e,l=me(e,pC);const{disabled:c,disableHighlightToday:d,isMonthSwitchingAnimating:m,showDaysOutsideCurrentMonth:y,slots:h,slotProps:g,timezone:v}=t,f=Te(),b=mn(v),C=o!=null&&f.isSameDay(n,o),w=i&&C,x=r.some(A=>f.isSameDay(A,n)),k=f.isSameDay(n,b),P=p.useMemo(()=>c||s(n),[c,s,n]),S=p.useMemo(()=>f.getMonth(n)!==a,[f,n,a]),I=Jc({day:n,selected:x,disabled:P,today:k,outsideCurrentMonth:S,disableMargin:void 0,disableHighlightToday:d,showDaysOutsideCurrentMonth:y}),T=h?.day??sC,O=Ae({elementType:T,externalSlotProps:g?.day,additionalProps:R({disableHighlightToday:d,showDaysOutsideCurrentMonth:y,role:"gridcell",isAnimating:m,"data-timestamp":f.toJsDate(n).valueOf()},l),ownerState:R({},I,{day:n,isDayDisabled:P,isDaySelected:x})}),N=me(O,fC),M=p.useMemo(()=>{const A=f.startOfMonth(f.setMonth(n,a));return y?f.isSameDay(n,f.startOfWeek(A)):f.isSameDay(n,A)},[a,n,y,f]),L=p.useMemo(()=>{const A=f.endOfMonth(f.setMonth(n,a));return y?f.isSameDay(n,f.endOfWeek(A)):f.isSameDay(n,A)},[a,n,y,f]);return u.jsx(T,R({},N,{day:n,disabled:P,autoFocus:!S&&w,today:k,outsideCurrentMonth:S,isFirstVisibleCell:M,isLastVisibleCell:L,selected:x,tabIndex:C?0:-1,"aria-selected":x,"aria-current":k?"date":void 0}))}function PC(e){const t=De({props:e,name:"MuiDayCalendar"}),n=Te(),{onFocusedDayChange:o,className:r,classes:s,currentMonth:a,selectedDays:i,focusedDay:l,loading:c,onSelectedDaysChange:d,onMonthSwitchingAnimationEnd:m,readOnly:y,reduceAnimations:h,renderLoading:g=()=>u.jsx("span",{children:"..."}),slideDirection:v,TransitionProps:f,disablePast:b,disableFuture:C,minDate:w,maxDate:x,shouldDisableDate:k,shouldDisableMonth:P,shouldDisableYear:S,dayOfWeekFormatter:I=_=>n.format(_,"weekdayShort").charAt(0).toUpperCase(),hasFocus:T,onFocusedViewChange:O,gridLabelId:N,displayWeekNumber:M,fixedWeekNumber:L,timezone:A}=t,F=mn(A),E=mC(s),B=wt(),G=Xc({shouldDisableDate:k,shouldDisableMonth:P,shouldDisableYear:S,minDate:w,maxDate:x,disablePast:b,disableFuture:C,timezone:A}),$=lt(),Z=de(_=>{y||d(_)}),W=_=>{G(_)||(o(_),O?.(!0))},ne=de((_,q)=>{switch(_.key){case"ArrowUp":W(n.addDays(q,-7)),_.preventDefault();break;case"ArrowDown":W(n.addDays(q,7)),_.preventDefault();break;case"ArrowLeft":{const X=n.addDays(q,B?1:-1),K=n.addMonths(q,B?1:-1),ue=po({utils:n,date:X,minDate:B?X:n.startOfMonth(K),maxDate:B?n.endOfMonth(K):X,isDateDisabled:G,timezone:A});W(ue||X),_.preventDefault();break}case"ArrowRight":{const X=n.addDays(q,B?-1:1),K=n.addMonths(q,B?-1:1),ue=po({utils:n,date:X,minDate:B?n.startOfMonth(K):X,maxDate:B?X:n.endOfMonth(K),isDateDisabled:G,timezone:A});W(ue||X),_.preventDefault();break}case"Home":W(n.startOfWeek(q)),_.preventDefault();break;case"End":W(n.endOfWeek(q)),_.preventDefault();break;case"PageUp":W(n.addMonths(q,1)),_.preventDefault();break;case"PageDown":W(n.addMonths(q,-1)),_.preventDefault();break}}),te=de((_,q)=>W(q)),se=de((_,q)=>{l!=null&&n.isSameDay(l,q)&&O?.(!1)}),U=n.getMonth(a),oe=n.getYear(a),ce=p.useMemo(()=>i.filter(_=>!!_).map(_=>n.startOfDay(_)),[n,i]),fe=`${oe}-${U}`,re=p.useMemo(()=>p.createRef(),[fe]),Q=p.useMemo(()=>{const _=n.getWeekArray(a);let q=n.addMonths(a,1);for(;L&&_.length<L;){const X=n.getWeekArray(q),K=n.isSameDay(_[_.length-1][0],X[0][0]);X.slice(K?1:0).forEach(ue=>{_.length<L&&_.push(ue)}),q=n.addMonths(q,1)}return _},[a,L,n]);return u.jsxs(hC,{role:"grid","aria-labelledby":N,className:E.root,children:[u.jsxs(gC,{role:"row",className:E.header,children:[M&&u.jsx(yC,{variant:"caption",role:"columnheader","aria-label":$.calendarWeekNumberHeaderLabel,className:E.weekNumberLabel,children:$.calendarWeekNumberHeaderText}),Am(n,F).map((_,q)=>u.jsx(bC,{variant:"caption",role:"columnheader","aria-label":n.format(_,"weekday"),className:E.weekDayLabel,children:I(_)},q.toString()))]}),c?u.jsx(xC,{className:E.loadingContainer,children:g()}):u.jsx(wC,R({transKey:fe,onExited:m,reduceAnimations:h,slideDirection:v,className:ae(r,E.slideTransition)},f,{nodeRef:re,children:u.jsx(CC,{ref:re,role:"rowgroup",className:E.monthContainer,children:Q.map((_,q)=>u.jsxs(SC,{role:"row",className:E.weekContainer,"aria-rowindex":q+1,children:[M&&u.jsx(vC,{className:E.weekNumber,role:"rowheader","aria-label":$.calendarWeekNumberAriaLabelText(n.getWeekNumber(_[0])),children:$.calendarWeekNumberText(n.getWeekNumber(_[0]))}),_.map((X,K)=>u.jsx(kC,{parentProps:t,day:X,selectedDays:ce,isViewFocused:T,focusedDay:l,onKeyDown:ne,onFocus:te,onBlur:se,onDaySelect:Z,isDateDisabled:G,currentMonthNumber:U,"aria-colindex":K+1},X.toString()))]},`week-${_[0]}`))})}))]})}function ou(e){return Ve("MuiMonthCalendar",e)}const Vo=We("MuiMonthCalendar",["root","button","disabled","selected"]),MC=["autoFocus","classes","disabled","selected","value","onClick","onKeyDown","onFocus","onBlur","slots","slotProps"],DC=(e,t)=>{const n={button:["button",t.isMonthDisabled&&"disabled",t.isMonthSelected&&"selected"]};return Oe(n,ou,e)},TC=V("button",{name:"MuiMonthCalendar",slot:"Button",overridesResolver:(e,t)=>[t.button,{[`&.${Vo.disabled}`]:t.disabled},{[`&.${Vo.selected}`]:t.selected}]})(({theme:e})=>R({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})`:Ie(e.palette.action.active,e.palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Ie(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${Vo.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${Vo.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),IC=p.memo(function(t){const{autoFocus:n,classes:o,disabled:r,selected:s,value:a,onClick:i,onKeyDown:l,onFocus:c,onBlur:d,slots:m,slotProps:y}=t,h=me(t,MC),g=p.useRef(null),{ownerState:v}=ze(),f=R({},v,{isMonthDisabled:r,isMonthSelected:s}),b=DC(o,f);dt(()=>{n&&g.current?.focus()},[n]);const C=m?.monthButton??TC,w=Ae({elementType:C,externalSlotProps:y?.monthButton,externalForwardedProps:h,additionalProps:{disabled:r,ref:g,type:"button",role:"radio","aria-checked":s,onClick:x=>i(x,a),onKeyDown:x=>l(x,a),onFocus:x=>c(x,a),onBlur:x=>d(x,a)},ownerState:f,className:b.button});return u.jsx(C,R({},w))}),RC=["autoFocus","className","classes","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"],EC=e=>Oe({root:["root"]},ou,e);function OC(e,t){const n=De({props:e,name:t}),o=To(n);return R({},n,o,{monthsPerRow:n.monthsPerRow??3})}const FC=V("div",{name:"MuiMonthCalendar",slot:"Root",shouldForwardProp:e=>Ft(e)&&e!=="monthsPerRow"})({display:"flex",flexWrap:"wrap",justifyContent:"space-evenly",rowGap:16,padding:"8px 0",width:gr,boxSizing:"border-box",variants:[{props:{monthsPerRow:3},style:{columnGap:24}},{props:{monthsPerRow:4},style:{columnGap:0}}]}),NC=p.forwardRef(function(t,n){const o=OC(t,"MuiMonthCalendar"),{autoFocus:r,className:s,classes:a,value:i,defaultValue:l,referenceDate:c,disabled:d,disableFuture:m,disablePast:y,maxDate:h,minDate:g,onChange:v,shouldDisableMonth:f,readOnly:b,onMonthFocus:C,hasFocus:w,onFocusedViewChange:x,monthsPerRow:k,timezone:P,gridLabelId:S,slots:I,slotProps:T}=o,O=me(o,RC),{value:N,handleValueChange:M,timezone:L}=Gt({name:"MonthCalendar",timezone:P,value:i,defaultValue:l,referenceDate:c,onChange:v,valueManager:et}),A=mn(L),F=wt(),E=Te(),{ownerState:B}=ze(),G=p.useMemo(()=>et.getInitialReferenceValue({value:N,utils:E,props:o,timezone:L,referenceDate:c,granularity:Pt.month}),[]),$=EC(a),Z=p.useMemo(()=>E.getMonth(A),[E,A]),W=p.useMemo(()=>N!=null?E.getMonth(N):null,[N,E]),[ne,te]=p.useState(()=>W||E.getMonth(G)),[se,U]=En({name:"MonthCalendar",state:"hasFocus",controlled:w,default:r??!1}),oe=de(X=>{U(X),x&&x(X)}),ce=p.useCallback(X=>{const K=E.startOfMonth(y&&E.isAfter(A,g)?A:g),ue=E.startOfMonth(m&&E.isBefore(A,h)?A:h),J=E.startOfMonth(X);return E.isBefore(J,K)||E.isAfter(J,ue)?!0:f?f(J):!1},[m,y,h,g,A,f,E]),fe=de((X,K)=>{if(b)return;const ue=E.setMonth(N??G,K);M(ue)}),re=de(X=>{ce(E.setMonth(N??G,X))||(te(X),oe(!0),C&&C(X))});p.useEffect(()=>{te(X=>W!==null&&X!==W?W:X)},[W]);const Q=de((X,K)=>{switch(X.key){case"ArrowUp":re((12+K-3)%12),X.preventDefault();break;case"ArrowDown":re((12+K+3)%12),X.preventDefault();break;case"ArrowLeft":re((12+K+(F?1:-1))%12),X.preventDefault();break;case"ArrowRight":re((12+K+(F?-1:1))%12),X.preventDefault();break}}),_=de((X,K)=>{re(K)}),q=de((X,K)=>{ne===K&&oe(!1)});return u.jsx(FC,R({ref:n,className:ae($.root,s),ownerState:B,role:"radiogroup","aria-labelledby":S,monthsPerRow:k},O,{children:xs(E,N??G).map(X=>{const K=E.getMonth(X),ue=E.format(X,"monthShort"),J=E.format(X,"month"),Y=K===W,ee=d||ce(X);return u.jsx(IC,{selected:Y,value:K,onClick:fe,onKeyDown:Q,autoFocus:se&&K===ne,disabled:ee,tabIndex:K===ne&&!ee?0:-1,onFocus:_,onBlur:q,"aria-current":Z===K?"date":void 0,"aria-label":J,slots:I,slotProps:T,classes:a,children:ue},ue)})}))});function ru(e){return Ve("MuiYearCalendar",e)}const Bo=We("MuiYearCalendar",["root","button","disabled","selected"]),AC=["autoFocus","classes","disabled","selected","value","onClick","onKeyDown","onFocus","onBlur","slots","slotProps"],$C=(e,t)=>{const n={button:["button",t.isYearDisabled&&"disabled",t.isYearSelected&&"selected"]};return Oe(n,ru,e)},LC=V("button",{name:"MuiYearCalendar",slot:"Button",overridesResolver:(e,t)=>[t.button,{[`&.${Bo.disabled}`]:t.disabled},{[`&.${Bo.selected}`]:t.selected}]})(({theme:e})=>R({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})`:Ie(e.palette.action.active,e.palette.action.focusOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Ie(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${Bo.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${Bo.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),jC=p.memo(function(t){const{autoFocus:n,classes:o,disabled:r,selected:s,value:a,onClick:i,onKeyDown:l,onFocus:c,onBlur:d,slots:m,slotProps:y}=t,h=me(t,AC),g=p.useRef(null),{ownerState:v}=ze(),f=R({},v,{isYearDisabled:r,isYearSelected:s}),b=$C(o,f);dt(()=>{n&&g.current?.focus()},[n]);const C=m?.yearButton??LC,w=Ae({elementType:C,externalSlotProps:y?.yearButton,externalForwardedProps:h,additionalProps:{disabled:r,ref:g,type:"button",role:"radio","aria-checked":s,onClick:x=>i(x,a),onKeyDown:x=>l(x,a),onFocus:x=>c(x,a),onBlur:x=>d(x,a)},ownerState:f,className:b.button});return u.jsx(C,R({},w))}),VC=["autoFocus","className","classes","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"],BC=e=>Oe({root:["root"]},ru,e);function WC(e,t){const n=De({props:e,name:t}),o=To(n);return R({},n,o,{yearsPerRow:n.yearsPerRow??3,yearsOrder:n.yearsOrder??"asc"})}const _C=V("div",{name:"MuiYearCalendar",slot:"Root",shouldForwardProp:e=>Ft(e)&&e!=="yearsPerRow"})({display:"flex",flexWrap:"wrap",justifyContent:"space-evenly",rowGap:12,padding:"6px 0",overflowY:"auto",height:"100%",width:gr,maxHeight:Ey,boxSizing:"border-box",position:"relative",variants:[{props:{yearsPerRow:3},style:{columnGap:24}},{props:{yearsPerRow:4},style:{columnGap:0,padding:"0 2px"}}]}),zC=V("div",{name:"MuiYearCalendar",slot:"ButtonFiller"})({height:36,width:72}),HC=p.forwardRef(function(t,n){const o=WC(t,"MuiYearCalendar"),{autoFocus:r,className:s,classes:a,value:i,defaultValue:l,referenceDate:c,disabled:d,disableFuture:m,disablePast:y,maxDate:h,minDate:g,onChange:v,readOnly:f,shouldDisableYear:b,onYearFocus:C,hasFocus:w,onFocusedViewChange:x,yearsOrder:k,yearsPerRow:P,timezone:S,gridLabelId:I,slots:T,slotProps:O}=o,N=me(o,VC),{value:M,handleValueChange:L,timezone:A}=Gt({name:"YearCalendar",timezone:S,value:i,defaultValue:l,referenceDate:c,onChange:v,valueManager:et}),F=mn(A),E=wt(),B=Te(),{ownerState:G}=ze(),$=p.useMemo(()=>et.getInitialReferenceValue({value:M,utils:B,props:o,timezone:A,referenceDate:c,granularity:Pt.year}),[]),Z=BC(a),W=p.useMemo(()=>B.getYear(F),[B,F]),ne=p.useMemo(()=>M!=null?B.getYear(M):null,[M,B]),[te,se]=p.useState(()=>ne||B.getYear($)),[U,oe]=En({name:"YearCalendar",state:"hasFocus",controlled:w,default:r??!1}),ce=de(z=>{oe(z),x&&x(z)}),fe=p.useCallback(z=>{if(y&&B.isBeforeYear(z,F)||m&&B.isAfterYear(z,F)||g&&B.isBeforeYear(z,g)||h&&B.isAfterYear(z,h))return!0;if(!b)return!1;const j=B.startOfYear(z);return b(j)},[m,y,h,g,F,b,B]),re=de((z,j)=>{if(f)return;const H=B.setYear(M??$,j);L(H)}),Q=de(z=>{fe(B.setYear(M??$,z))||(se(z),ce(!0),C?.(z))});p.useEffect(()=>{se(z=>ne!==null&&z!==ne?ne:z)},[ne]);const _=k!=="desc"?P*1:P*-1,q=E&&k==="asc"||!E&&k==="desc"?-1:1,X=de((z,j)=>{switch(z.key){case"ArrowUp":Q(j-_),z.preventDefault();break;case"ArrowDown":Q(j+_),z.preventDefault();break;case"ArrowLeft":Q(j-q),z.preventDefault();break;case"ArrowRight":Q(j+q),z.preventDefault();break}}),K=de((z,j)=>{Q(j)}),ue=de((z,j)=>{te===j&&ce(!1)}),J=p.useRef(null),Y=ot(n,J);p.useEffect(()=>{if(r||J.current===null)return;const z=J.current.querySelector('[tabindex="0"]');if(!z)return;const j=z.offsetHeight,H=z.offsetTop,ge=J.current.clientHeight,ye=J.current.scrollTop,Le=H+j;j>ge||H<ye||(J.current.scrollTop=Le-ge/2-j/2)},[r]);const ee=B.getYearRange([g,h]);k==="desc"&&ee.reverse();let ie=P-ee.length%P;return ie===P&&(ie=0),u.jsxs(_C,R({ref:Y,className:ae(Z.root,s),ownerState:G,role:"radiogroup","aria-labelledby":I,yearsPerRow:P},N,{children:[ee.map(z=>{const j=B.getYear(z),H=j===ne,ge=d||fe(z);return u.jsx(jC,{selected:H,value:j,onClick:re,onKeyDown:X,autoFocus:U&&j===te,disabled:ge,tabIndex:j===te&&!ge?0:-1,onFocus:K,onBlur:ue,"aria-current":W===j?"date":void 0,slots:T,slotProps:O,classes:a,children:B.format(z,"year")},B.format(z,"year"))}),Array.from({length:ie},(z,j)=>u.jsx(zC,{},j))]}))}),UC=e=>Ve("MuiPickersCalendarHeader",e),YC=We("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]);function qC(e){return Ve("MuiPickersArrowSwitcher",e)}We("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);const KC=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId","classes"],GC=["ownerState"],QC=["ownerState"],XC=V("div",{name:"MuiPickersArrowSwitcher",slot:"Root"})({display:"flex"}),ZC=V("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer"})(({theme:e})=>({width:e.spacing(3)})),ki=V(Vn,{name:"MuiPickersArrowSwitcher",slot:"Button"})({variants:[{props:{isButtonHidden:!0},style:{visibility:"hidden"}}]}),JC=e=>Oe({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},qC,e),su=p.forwardRef(function(t,n){const o=wt(),r=De({props:t,name:"MuiPickersArrowSwitcher"}),{children:s,className:a,slots:i,slotProps:l,isNextDisabled:c,isNextHidden:d,onGoToNext:m,nextLabel:y,isPreviousDisabled:h,isPreviousHidden:g,onGoToPrevious:v,previousLabel:f,labelId:b,classes:C}=r,w=me(r,KC),{ownerState:x}=ze(),k=JC(C),P={isDisabled:c,isHidden:d,goTo:m,label:y},S={isDisabled:h,isHidden:g,goTo:v,label:f},I=i?.previousIconButton??ki,T=Ae({elementType:I,externalSlotProps:l?.previousIconButton,additionalProps:{size:"medium",title:S.label,"aria-label":S.label,disabled:S.isDisabled,edge:"end",onClick:S.goTo},ownerState:R({},x,{isButtonHidden:S.isHidden??!1}),className:ae(k.button,k.previousIconButton)}),O=i?.nextIconButton??ki,N=Ae({elementType:O,externalSlotProps:l?.nextIconButton,additionalProps:{size:"medium",title:P.label,"aria-label":P.label,disabled:P.isDisabled,edge:"start",onClick:P.goTo},ownerState:R({},x,{isButtonHidden:P.isHidden??!1}),className:ae(k.button,k.nextIconButton)}),M=i?.leftArrowIcon??Rx,L=Ae({elementType:M,externalSlotProps:l?.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:x,className:k.leftArrowIcon}),A=me(L,GC),F=i?.rightArrowIcon??Ex,E=Ae({elementType:F,externalSlotProps:l?.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:x,className:k.rightArrowIcon}),B=me(E,QC);return u.jsxs(XC,R({ref:n,className:ae(k.root,a),ownerState:x},w,{children:[u.jsx(I,R({},T,{children:o?u.jsx(F,R({},B)):u.jsx(M,R({},A))})),s?u.jsx(Wt,{variant:"subtitle1",component:"span",id:b,children:s}):u.jsx(ZC,{className:k.spacer,ownerState:x}),u.jsx(O,R({},N,{children:o?u.jsx(M,R({},A)):u.jsx(F,R({},B))}))]}))});function eS(e,{disableFuture:t,maxDate:n,timezone:o}){const r=Te();return p.useMemo(()=>{const s=r.date(void 0,o),a=r.startOfMonth(t&&r.isBefore(s,n)?s:n);return!r.isAfter(a,e)},[t,n,e,r,o])}function tS(e,{disablePast:t,minDate:n,timezone:o}){const r=Te();return p.useMemo(()=>{const s=r.date(void 0,o),a=r.startOfMonth(t&&r.isAfter(s,n)?s:n);return!r.isBefore(a,e)},[t,n,e,r,o])}function Gs(e,t,n,o){const r=Te(),s=p.useMemo(()=>r.isValid(e)?e:null,[r,e]),a=jm(s,r),i=p.useCallback(l=>{const c=s==null?null:Vm(s,l,!!t,r);n(c,o??"partial")},[t,s,n,o,r]);return{meridiemMode:a,handleMeridiemChange:i}}const nS=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","classes","timezone","format"],oS=["ownerState"],rS=e=>Oe({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},UC,e),sS=V("div",{name:"MuiPickersCalendarHeader",slot:"Root"})({display:"flex",alignItems:"center",marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),aS=V("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer"})(({theme:e})=>R({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),iS=V("div",{name:"MuiPickersCalendarHeader",slot:"Label"})({marginRight:6}),lS=V(Vn,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton"})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${YC.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),cS=V(Ix,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon"})(({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"})),uS=p.forwardRef(function(t,n){const o=lt(),r=Te(),s=De({props:t,name:"MuiPickersCalendarHeader"}),{slots:a,slotProps:i,currentMonth:l,disabled:c,disableFuture:d,disablePast:m,maxDate:y,minDate:h,onMonthChange:g,onViewChange:v,view:f,reduceAnimations:b,views:C,labelId:w,className:x,classes:k,timezone:P,format:S=`${r.formats.month} ${r.formats.year}`}=s,I=me(s,nS),{ownerState:T}=ze(),O=rS(k),N=a?.switchViewButton??lS,M=Ae({elementType:N,externalSlotProps:i?.switchViewButton,additionalProps:{size:"small","aria-label":o.calendarViewSwitchingButtonAriaLabel(f)},ownerState:T,className:O.switchViewButton}),L=a?.switchViewIcon??cS,A=Ae({elementType:L,externalSlotProps:i?.switchViewIcon,ownerState:T,className:O.switchViewIcon}),F=me(A,oS),E=()=>g(r.addMonths(l,1)),B=()=>g(r.addMonths(l,-1)),G=eS(l,{disableFuture:d,maxDate:y,timezone:P}),$=tS(l,{disablePast:m,minDate:h,timezone:P}),Z=()=>{if(!(C.length===1||!v||c))if(C.length===2)v(C.find(ne=>ne!==f)||C[0]);else{const ne=C.indexOf(f)!==0?0:1;v(C[ne])}};if(C.length===1&&C[0]==="year")return null;const W=r.formatByString(l,S);return u.jsxs(sS,R({},I,{ownerState:T,className:ae(O.root,x),ref:n,children:[u.jsxs(aS,{role:"presentation",onClick:Z,ownerState:T,"aria-live":"polite",className:O.labelContainer,children:[u.jsx(Zc,{reduceAnimations:b,transKey:W,children:u.jsx(iS,{id:w,ownerState:T,className:O.label,children:W})}),C.length>1&&!c&&u.jsx(N,R({},M,{children:u.jsx(L,R({},F))}))]}),u.jsx(un,{in:f==="day",appear:!b,enter:!b,children:u.jsx(su,{slots:a,slotProps:i,onGoToPrevious:B,isPreviousDisabled:$,previousLabel:o.previousMonth,onGoToNext:E,isNextDisabled:G,nextLabel:o.nextMonth})})]}))}),kr=V("div")({overflow:"hidden",width:gr,maxHeight:$s,display:"flex",flexDirection:"column",margin:"0 auto"}),dS=e=>Ve("MuiDateCalendar",e);We("MuiDateCalendar",["root","viewTransitionContainer"]);const pS=["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"],fS=e=>Oe({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},dS,e);function mS(e,t){const n=De({props:e,name:t}),o=cc(n.reduceAnimations),r=To(n);return R({},n,r,{loading:n.loading??!1,openTo:n.openTo??"day",views:n.views??["year","day"],reduceAnimations:o,renderLoading:n.renderLoading??(()=>u.jsx("span",{children:"..."}))})}const hS=V(kr,{name:"MuiDateCalendar",slot:"Root"})({display:"flex",flexDirection:"column",height:$s}),gS=V(Zc,{name:"MuiDateCalendar",slot:"ViewTransitionContainer"})({}),bS=p.forwardRef(function(t,n){const o=Te(),{ownerState:r}=ze(),s=Po(),a=mS(t,"MuiDateCalendar"),{autoFocus:i,onViewChange:l,value:c,defaultValue:d,referenceDate:m,disableFuture:y,disablePast:h,onChange:g,onMonthChange:v,reduceAnimations:f,shouldDisableDate:b,shouldDisableMonth:C,shouldDisableYear:w,view:x,views:k,openTo:P,className:S,classes:I,disabled:T,readOnly:O,minDate:N,maxDate:M,disableHighlightToday:L,focusedView:A,onFocusedViewChange:F,showDaysOutsideCurrentMonth:E,fixedWeekNumber:B,dayOfWeekFormatter:G,slots:$,slotProps:Z,loading:W,renderLoading:ne,displayWeekNumber:te,yearsOrder:se,yearsPerRow:U,monthsPerRow:oe,timezone:ce}=a,fe=me(a,pS),{value:re,handleValueChange:Q,timezone:_}=Gt({name:"DateCalendar",timezone:ce,value:c,defaultValue:d,referenceDate:m,onChange:g,valueManager:et}),{view:q,setView:X,focusedView:K,setFocusedView:ue,goToNextView:J,setValueAndGoToNextView:Y}=Eo({view:x,views:k,openTo:P,onChange:Q,onViewChange:l,autoFocus:i,focusedView:A,onFocusedViewChange:F}),{referenceDate:ee,calendarState:ie,setVisibleDate:z,isDateDisabled:j,onMonthSwitchingAnimationEnd:H}=Kw({value:re,referenceDate:m,reduceAnimations:f,onMonthChange:v,minDate:N,maxDate:M,shouldDisableDate:b,disablePast:h,disableFuture:y,timezone:_,getCurrentMonthFromVisibleDate:(xe,Ke)=>o.isSameMonth(xe,Ke)?Ke:o.startOfMonth(xe)}),ge=T&&re||N,ye=T&&re||M,Le=`${s}-grid-label`,Pe=K!==null,_e=$?.calendarHeader??uS,qe=Ae({elementType:_e,externalSlotProps:Z?.calendarHeader,additionalProps:{views:k,view:q,currentMonth:ie.currentMonth,onViewChange:X,onMonthChange:xe=>z({target:xe,reason:"header-navigation"}),minDate:ge,maxDate:ye,disabled:T,disablePast:h,disableFuture:y,reduceAnimations:f,timezone:_,labelId:Le},ownerState:r}),be=de(xe=>{const Ke=o.startOfMonth(xe),rt=o.endOfMonth(xe),St=j(xe)?po({utils:o,date:xe,minDate:o.isBefore(N,Ke)?Ke:N,maxDate:o.isAfter(M,rt)?rt:M,disablePast:h,disableFuture:y,isDateDisabled:j,timezone:_}):xe;St?(Y(St,"finish"),z({target:St,reason:"cell-interaction"})):(J(),z({target:Ke,reason:"cell-interaction"}))}),ve=de(xe=>{const Ke=o.startOfYear(xe),rt=o.endOfYear(xe),St=j(xe)?po({utils:o,date:xe,minDate:o.isBefore(N,Ke)?Ke:N,maxDate:o.isAfter(M,rt)?rt:M,disablePast:h,disableFuture:y,isDateDisabled:j,timezone:_}):xe;St?(Y(St,"finish"),z({target:St,reason:"cell-interaction"})):(J(),z({target:Ke,reason:"cell-interaction"}))}),he=de(xe=>Q(xe&&Xo(o,xe,re??ee),"finish",q));p.useEffect(()=>{o.isValid(re)&&z({target:re,reason:"controlled-value-change"})},[re]);const Ne=fS(I),Ue={disablePast:h,disableFuture:y,maxDate:M,minDate:N},pe={disableHighlightToday:L,readOnly:O,disabled:T,timezone:_,gridLabelId:Le,slots:$,slotProps:Z},Ce=p.useRef(q);p.useEffect(()=>{Ce.current!==q&&(K===Ce.current&&ue(q,!0),Ce.current=q)},[K,ue,q]);const Me=p.useMemo(()=>[re],[re]);return u.jsxs(hS,R({ref:n,className:ae(Ne.root,S),ownerState:r},fe,{children:[u.jsx(_e,R({},qe,{slots:$,slotProps:Z})),u.jsx(gS,{reduceAnimations:f,className:Ne.viewTransitionContainer,transKey:q,ownerState:r,children:u.jsxs("div",{children:[q==="year"&&u.jsx(HC,R({},Ue,pe,{value:re,onChange:ve,shouldDisableYear:w,hasFocus:Pe,onFocusedViewChange:xe=>ue("year",xe),yearsOrder:se,yearsPerRow:U,referenceDate:ee})),q==="month"&&u.jsx(NC,R({},Ue,pe,{hasFocus:Pe,className:S,value:re,onChange:be,shouldDisableMonth:C,onFocusedViewChange:xe=>ue("month",xe),monthsPerRow:oe,referenceDate:ee})),q==="day"&&u.jsx(PC,R({},ie,Ue,pe,{onMonthSwitchingAnimationEnd:H,hasFocus:Pe,onFocusedDayChange:xe=>z({target:xe,reason:"cell-interaction"}),reduceAnimations:f,selectedDays:Me,onSelectedDaysChange:he,shouldDisableDate:b,shouldDisableMonth:C,shouldDisableYear:w,onFocusedViewChange:xe=>ue("day",xe),showDaysOutsideCurrentMonth:E,fixedWeekNumber:B,dayOfWeekFormatter:G,displayWeekNumber:te,loading:W,renderLoading:ne}))]})})]}))}),In=({view:e,onViewChange:t,views:n,focusedView:o,onFocusedViewChange:r,value:s,defaultValue:a,referenceDate:i,onChange:l,className:c,classes:d,disableFuture:m,disablePast:y,minDate:h,maxDate:g,shouldDisableDate:v,shouldDisableMonth:f,shouldDisableYear:b,reduceAnimations:C,onMonthChange:w,monthsPerRow:x,onYearChange:k,yearsOrder:P,yearsPerRow:S,slots:I,slotProps:T,loading:O,renderLoading:N,disableHighlightToday:M,readOnly:L,disabled:A,showDaysOutsideCurrentMonth:F,dayOfWeekFormatter:E,sx:B,autoFocus:G,fixedWeekNumber:$,displayWeekNumber:Z,timezone:W})=>u.jsx(bS,{view:e,onViewChange:t,views:n.filter(Ea),focusedView:o&&Ea(o)?o:null,onFocusedViewChange:r,value:s,defaultValue:a,referenceDate:i,onChange:l,className:c,classes:d,disableFuture:m,disablePast:y,minDate:h,maxDate:g,shouldDisableDate:v,shouldDisableMonth:f,shouldDisableYear:b,reduceAnimations:C,onMonthChange:w,monthsPerRow:x,onYearChange:k,yearsOrder:P,yearsPerRow:S,slots:I,slotProps:T,loading:O,renderLoading:N,disableHighlightToday:M,readOnly:L,disabled:A,showDaysOutsideCurrentMonth:F,dayOfWeekFormatter:E,sx:B,autoFocus:G,fixedWeekNumber:$,displayWeekNumber:Z,timezone:W}),au=p.forwardRef(function(t,n){const o=Te(),r=Gl(t,"MuiDesktopDatePicker"),s=R({day:In,month:In,year:In},r.viewRenderers),a=R({},r,{closeOnSelect:r.closeOnSelect??!0,viewRenderers:s,format:Cs(o,r,!1),yearsPerRow:r.yearsPerRow??4,slots:R({field:Qc},r.slots),slotProps:R({},r.slotProps,{field:l=>R({},ln(r.slotProps?.field,l),dr(r)),toolbar:R({hidden:!0},r.slotProps?.toolbar)})}),{renderPicker:i}=zc({ref:n,props:a,valueManager:et,valueType:"date",validator:Do,steps:null});return i()});au.propTypes={autoFocus:D.bool,className:D.string,closeOnSelect:D.bool,dayOfWeekFormatter:D.func,defaultValue:D.object,disabled:D.bool,disableFuture:D.bool,disableHighlightToday:D.bool,disableOpenPicker:D.bool,disablePast:D.bool,displayWeekNumber:D.bool,enableAccessibleFieldDOMStructure:D.any,fixedWeekNumber:D.number,format:D.string,formatDensity:D.oneOf(["dense","spacious"]),inputRef:cr,label:D.node,loading:D.bool,localeText:D.object,maxDate:D.object,minDate:D.object,monthsPerRow:D.oneOf([3,4]),name:D.string,onAccept:D.func,onChange:D.func,onClose:D.func,onError:D.func,onMonthChange:D.func,onOpen:D.func,onSelectedSectionsChange:D.func,onViewChange:D.func,onYearChange:D.func,open:D.bool,openTo:D.oneOf(["day","month","year"]),orientation:D.oneOf(["landscape","portrait"]),readOnly:D.bool,reduceAnimations:D.bool,referenceDate:D.object,renderLoading:D.func,selectedSections:D.oneOfType([D.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),D.number]),shouldDisableDate:D.func,shouldDisableMonth:D.func,shouldDisableYear:D.func,showDaysOutsideCurrentMonth:D.bool,slotProps:D.object,slots:D.object,sx:D.oneOfType([D.arrayOf(D.oneOfType([D.func,D.object,D.bool])),D.func,D.object]),timezone:D.string,value:D.object,view:D.oneOf(["day","month","year"]),viewRenderers:D.shape({day:D.func,month:D.func,year:D.func}),views:D.arrayOf(D.oneOf(["day","month","year"]).isRequired),yearsOrder:D.oneOf(["asc","desc"]),yearsPerRow:D.oneOf([3,4])};function yS(e){return Re("MuiDialogContent",e)}Se("MuiDialogContent",["root","dividers"]);const vS=Se("MuiDialogTitle",["root"]),xS=e=>{const{classes:t,dividers:n}=e;return Ee({root:["root",n&&"dividers"]},yS,t)},wS=V("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(Be(({theme:e})=>({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:({ownerState:t})=>t.dividers,style:{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>!t.dividers,style:{[`.${vS.root} + &`]:{paddingTop:0}}}]}))),CS=p.forwardRef(function(t,n){const o=Fe({props:t,name:"MuiDialogContent"}),{className:r,dividers:s=!1,...a}=o,i={...o,dividers:s},l=xS(i);return u.jsx(wS,{className:ae(l.root,r),ownerState:i,ref:n,...a})});function SS(e){return Re("MuiDialog",e)}const co=Se("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),kS=p.createContext({}),PS=V(Sc,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),MS=e=>{const{classes:t,scroll:n,maxWidth:o,fullWidth:r,fullScreen:s}=e,a={root:["root"],container:["container",`scroll${le(n)}`],paper:["paper",`paperScroll${le(n)}`,`paperWidth${le(String(o))}`,r&&"paperFullWidth",s&&"paperFullScreen"]};return Ee(a,SS,t)},DS=V(kc,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),TS=V("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${le(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"}}}]}),IS=V(fr,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${le(n.scroll)}`],t[`paperWidth${le(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(Be(({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:t})=>!t.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${co.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(e.breakpoints.values).filter(t=>t!=="xs").map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`,[`&.${co.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t]+32*2)]:{maxWidth:"calc(100% - 64px)"}}}})),{props:({ownerState:t})=>t.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:t})=>t.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${co.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),RS=p.forwardRef(function(t,n){const o=Fe({props:t,name:"MuiDialog"}),r=zn(),s={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":i,"aria-modal":l=!0,BackdropComponent:c,BackdropProps:d,children:m,className:y,disableEscapeKeyDown:h=!1,fullScreen:g=!1,fullWidth:v=!1,maxWidth:f="sm",onBackdropClick:b,onClick:C,onClose:w,open:x,PaperComponent:k=fr,PaperProps:P={},scroll:S="paper",slots:I={},slotProps:T={},TransitionComponent:O=un,transitionDuration:N=s,TransitionProps:M,...L}=o,A={...o,disableEscapeKeyDown:h,fullScreen:g,fullWidth:v,maxWidth:f,scroll:S},F=MS(A),E=p.useRef(),B=K=>{E.current=K.target===K.currentTarget},G=K=>{C&&C(K),E.current&&(E.current=null,b&&b(K),w&&w(K,"backdropClick"))},$=Co(i),Z=p.useMemo(()=>({titleId:$}),[$]),W={transition:O,...I},ne={transition:M,paper:P,backdrop:d,...T},te={slots:W,slotProps:ne},[se,U]=Xe("root",{elementType:DS,shouldForwardComponentProp:!0,externalForwardedProps:te,ownerState:A,className:ae(F.root,y),ref:n}),[oe,ce]=Xe("backdrop",{elementType:PS,shouldForwardComponentProp:!0,externalForwardedProps:te,ownerState:A}),[fe,re]=Xe("paper",{elementType:IS,shouldForwardComponentProp:!0,externalForwardedProps:te,ownerState:A,className:ae(F.paper,P.className)}),[Q,_]=Xe("container",{elementType:TS,externalForwardedProps:te,ownerState:A,className:ae(F.container)}),[q,X]=Xe("transition",{elementType:un,externalForwardedProps:te,ownerState:A,additionalProps:{appear:!0,in:x,timeout:N,role:"presentation"}});return u.jsx(se,{closeAfterTransition:!0,slots:{backdrop:oe},slotProps:{backdrop:{transitionDuration:N,as:c,...ce}},disableEscapeKeyDown:h,onClose:w,open:x,onClick:G,...U,...L,children:u.jsx(q,{...X,children:u.jsx(Q,{onMouseDown:B,..._,children:u.jsx(fe,{as:k,elevation:24,role:"dialog","aria-describedby":a,"aria-labelledby":$,"aria-modal":l,...re,children:u.jsx(kS.Provider,{value:Z,children:m})})})})})}),ES=V(RS)({[`& .${co.container}`]:{outline:0},[`& .${co.paper}`]:{outline:0,minWidth:gr}}),OS=V(CS)({"&:first-of-type":{padding:0}});function FS(e){const{children:t,slots:n,slotProps:o}=e,{open:r}=pn(),{dismissViews:s,onPopperExited:a}=ze(),i=n?.dialog??ES,l=n?.mobileTransition??un;return u.jsx(i,R({open:r,onClose:()=>{s(),a?.()}},o?.dialog,{TransitionComponent:l,TransitionProps:o?.mobileTransition,PaperComponent:n?.mobilePaper,PaperProps:o?.mobilePaper,children:u.jsx(OS,{children:t})}))}const NS=["props","steps"],AS=["ownerState"],iu=e=>{let{props:t,steps:n}=e,o=me(e,NS);const{slots:r,slotProps:s,label:a,inputRef:i,localeText:l}=t,c=_c({steps:n}),{providerProps:d,renderCurrentView:m,ownerState:y}=dc(R({},o,{props:t,localeText:l,autoFocusView:!0,viewContainerRole:"dialog",variant:"mobile",getStepNavigation:c})),h=d.privateContextValue.labelId,g=s?.toolbar?.hidden??!1,v=r.field,f=Ae({elementType:v,externalSlotProps:s?.field,additionalProps:R({},g&&{id:h}),ownerState:y}),b=me(f,AS),C=r.layout??yc;let w=h;g&&(a?w=`${h}-label`:w=void 0);const x=R({},s,{toolbar:R({},s?.toolbar,{titleId:h}),mobilePaper:R({"aria-labelledby":w},s?.mobilePaper)});return{renderPicker:()=>u.jsx(zl,R({},d,{children:u.jsxs(Wc,{slots:r,slotProps:x,inputRef:i,children:[u.jsx(v,R({},b)),u.jsx(FS,{slots:r,slotProps:x,children:u.jsx(C,R({},x?.layout,{slots:r,slotProps:x,children:m()}))})]})}))}},lu=p.forwardRef(function(t,n){const o=Te(),r=Gl(t,"MuiMobileDatePicker"),s=R({day:In,month:In,year:In},r.viewRenderers),a=R({},r,{viewRenderers:s,format:Cs(o,r,!1),slots:R({field:Qc},r.slots),slotProps:R({},r.slotProps,{field:l=>R({},ln(r.slotProps?.field,l),dr(r)),toolbar:R({hidden:!1},r.slotProps?.toolbar)})}),{renderPicker:i}=iu({ref:n,props:a,valueManager:et,valueType:"date",validator:Do,steps:null});return i()});lu.propTypes={autoFocus:D.bool,className:D.string,closeOnSelect:D.bool,dayOfWeekFormatter:D.func,defaultValue:D.object,disabled:D.bool,disableFuture:D.bool,disableHighlightToday:D.bool,disableOpenPicker:D.bool,disablePast:D.bool,displayWeekNumber:D.bool,enableAccessibleFieldDOMStructure:D.any,fixedWeekNumber:D.number,format:D.string,formatDensity:D.oneOf(["dense","spacious"]),inputRef:cr,label:D.node,loading:D.bool,localeText:D.object,maxDate:D.object,minDate:D.object,monthsPerRow:D.oneOf([3,4]),name:D.string,onAccept:D.func,onChange:D.func,onClose:D.func,onError:D.func,onMonthChange:D.func,onOpen:D.func,onSelectedSectionsChange:D.func,onViewChange:D.func,onYearChange:D.func,open:D.bool,openTo:D.oneOf(["day","month","year"]),orientation:D.oneOf(["landscape","portrait"]),readOnly:D.bool,reduceAnimations:D.bool,referenceDate:D.object,renderLoading:D.func,selectedSections:D.oneOfType([D.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),D.number]),shouldDisableDate:D.func,shouldDisableMonth:D.func,shouldDisableYear:D.func,showDaysOutsideCurrentMonth:D.bool,slotProps:D.object,slots:D.object,sx:D.oneOfType([D.arrayOf(D.oneOfType([D.func,D.object,D.bool])),D.func,D.object]),timezone:D.string,value:D.object,view:D.oneOf(["day","month","year"]),viewRenderers:D.shape({day:D.func,month:D.func,year:D.func}),views:D.arrayOf(D.oneOf(["day","month","year"]).isRequired),yearsOrder:D.oneOf(["asc","desc"]),yearsPerRow:D.oneOf([3,4])};const $S=["desktopModeMediaQuery"],LS=p.forwardRef(function(t,n){const o=De({props:t,name:"MuiDatePicker"}),{desktopModeMediaQuery:r=lc}=o,s=me(o,$S);return ys(r,{defaultMatches:!0})?u.jsx(au,R({ref:n},s)):u.jsx(lu,R({ref:n},s))}),jS=e=>{const t=_w(e);return Kc({manager:t,props:e})},VS=["slots","slotProps","InputProps","inputProps"],cu=p.forwardRef(function(t,n){const o=De({props:t,name:"MuiTimeField"}),{slots:r,slotProps:s}=o,a=me(o,VS),i=Bc({slotProps:s,ref:n,externalForwardedProps:a}),l=jS(i);return u.jsx(Vc,{slots:r,slotProps:s,fieldResponse:l,defaultOpenPickerIcon:Fx})});function BS(e){return Ve("MuiPickersToolbarText",e)}We("MuiPickersToolbarText",["root"]);const WS=["className","classes","selected","value"],_S=e=>Oe({root:["root"]},BS,e),zS=V(Wt,{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}})),uu=p.forwardRef(function(t,n){const o=De({props:t,name:"MuiPickersToolbarText"}),{className:r,classes:s,selected:a,value:i}=o,l=me(o,WS),c=_S(s);return u.jsx(zS,R({ref:n,className:ae(c.root,r),component:"span",ownerState:o},a&&{"data-selected":!0},l,{children:i}))}),HS=["align","className","classes","selected","typographyClassName","value","variant","width"],US=e=>Oe({root:["root"]},$l,e),YS=V(Ut,{name:"MuiPickersToolbarButton",slot:"Root"})({padding:0,minWidth:16,textTransform:"none"}),Jn=p.forwardRef(function(t,n){const o=De({props:t,name:"MuiPickersToolbarButton"}),{align:r,className:s,classes:a,selected:i,typographyClassName:l,value:c,variant:d,width:m}=o,y=me(o,HS),h=US(a);return u.jsx(YS,R({variant:"text",ref:n,className:ae(h.root,s),ownerState:o},m?{sx:{width:m}}:{},y,{children:u.jsx(uu,{align:r,className:l,variant:d,value:c,selected:i})}))});function qS(e){return Ve("MuiTimePickerToolbar",e)}const uo=We("MuiTimePickerToolbar",["root","separator","hourMinuteLabel","hourMinuteLabelLandscape","hourMinuteLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),KS=["ampm","ampmInClock","className","classes"],GS=(e,t)=>{const{pickerOrientation:n,toolbarDirection:o}=t;return Oe({root:["root"],separator:["separator"],hourMinuteLabel:["hourMinuteLabel",n==="landscape"&&"hourMinuteLabelLandscape",o==="rtl"&&"hourMinuteLabelReverse"],ampmSelection:["ampmSelection",n==="landscape"&&"ampmLandscape"],ampmLabel:["ampmLabel"]},qS,e)},QS=V(Hl,{name:"MuiTimePickerToolbar",slot:"Root"})({}),XS=V(uu,{name:"MuiTimePickerToolbar",slot:"Separator"})({outline:0,margin:"0 4px 0 2px",cursor:"default"}),ZS=V("div",{name:"MuiTimePickerToolbar",slot:"HourMinuteLabel",overridesResolver:(e,t)=>[{[`&.${uo.hourMinuteLabelLandscape}`]:t.hourMinuteLabelLandscape,[`&.${uo.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"}}]}),JS=V("div",{name:"MuiTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[`.${uo.ampmLabel}`]:t.ampmLabel},{[`&.${uo.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12,[`& .${uo.ampmLabel}`]:{fontSize:17},variants:[{props:{pickerOrientation:"landscape"},style:{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",flexBasis:"100%"}}]});function ek(e){const t=De({props:e,name:"MuiTimePickerToolbar"}),{ampm:n,ampmInClock:o,className:r,classes:s}=t,a=me(t,KS),i=Te(),l=lt(),c=Ds(),d=GS(s,c),{value:m,setValue:y,disabled:h,readOnly:g,view:v,setView:f,views:b}=pn(),C=!!(n&&!o&&b.includes("hours")),{meridiemMode:w,handleMeridiemChange:x}=Gs(m,n,S=>y(S,{changeImportance:"set"})),k=S=>i.isValid(m)?i.format(m,S):"--",P=u.jsx(XS,{tabIndex:-1,value:":",variant:"h3",selected:!1,className:d.separator});return u.jsxs(QS,R({landscapeDirection:"row",toolbarTitle:l.timePickerToolbarTitle,ownerState:c,className:ae(d.root,r)},a,{children:[u.jsxs(ZS,{className:d.hourMinuteLabel,ownerState:c,children:[Cn(b,"hours")&&u.jsx(Jn,{tabIndex:-1,variant:"h3",onClick:()=>f("hours"),selected:v==="hours",value:k(n?"hours12h":"hours24h")}),Cn(b,["hours","minutes"])&&P,Cn(b,"minutes")&&u.jsx(Jn,{tabIndex:-1,variant:"h3",onClick:()=>f("minutes"),selected:v==="minutes",value:k("minutes")}),Cn(b,["minutes","seconds"])&&P,Cn(b,"seconds")&&u.jsx(Jn,{variant:"h3",onClick:()=>f("seconds"),selected:v==="seconds",value:k("seconds")})]}),C&&u.jsxs(JS,{className:d.ampmSelection,ownerState:c,children:[u.jsx(Jn,{disableRipple:!0,variant:"subtitle2",selected:w==="am",typographyClassName:d.ampmLabel,value:Yt(i,"am"),onClick:g?void 0:()=>x("am"),disabled:h}),u.jsx(Jn,{disableRipple:!0,variant:"subtitle2",selected:w==="pm",typographyClassName:d.ampmLabel,value:Yt(i,"pm"),onClick:g?void 0:()=>x("pm"),disabled:h})]})]}))}function du(e,t){const n=Te(),o=De({props:e,name:t}),r=Gc(o),s=o.ampm??n.is12HourCycleInCurrentLocale(),a=p.useMemo(()=>o.localeText?.toolbarTitle==null?o.localeText:R({},o.localeText,{timePickerToolbarTitle:o.localeText.toolbarTitle}),[o.localeText]);return R({},o,r,{ampm:s,localeText:a},Tl({views:o.views,openTo:o.openTo,defaultViews:["hours","minutes"],defaultOpenTo:"hours"}),{slots:R({toolbar:ek},o.slots),slotProps:R({},o.slotProps,{toolbar:R({ampm:s,ampmInClock:o.ampmInClock},o.slotProps?.toolbar)})})}function tk(e){return Ve("MuiTimeClock",e)}We("MuiTimeClock",["root","arrowSwitcher"]);const Bn=220,jt=36,yo={x:Bn/2,y:Bn/2},pu={x:yo.x,y:0},nk=pu.x-yo.x,ok=pu.y-yo.y,rk=e=>e*(180/Math.PI),fu=(e,t,n)=>{const o=t-yo.x,r=n-yo.y,s=Math.atan2(nk,ok)-Math.atan2(o,r);let a=rk(s);a=Math.round(a/e)*e,a%=360;const i=Math.floor(a/e)||0,l=o**2+r**2,c=Math.sqrt(l);return{value:i,distance:c}},sk=(e,t,n=1)=>{const o=n*6;let{value:r}=fu(o,e,t);return r=r*n%60,r},ak=(e,t,n)=>{const{value:o,distance:r}=fu(30,e,t);let s=o||12;return n?s%=12:r<Bn/2-jt&&(s+=12,s%=24),s};function ik(e){return Ve("MuiClockPointer",e)}We("MuiClockPointer",["root","thumb"]);const lk=["className","classes","isBetweenTwoClockValues","isInner","type","viewValue"],ck=e=>Oe({root:["root"],thumb:["thumb"]},ik,e),uk=V("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"])}}]})),dk=V("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% - ${jt/2}px)`,border:`${(jt-4)/2}px solid ${(e.vars||e).palette.primary.main}`,boxSizing:"content-box",variants:[{props:{isClockPointerBetweenTwoValues:!1},style:{backgroundColor:(e.vars||e).palette.primary.main}}]}));function pk(e){const t=De({props:e,name:"MuiClockPointer"}),{className:n,classes:o,isBetweenTwoClockValues:r,isInner:s,type:a,viewValue:i}=t,l=me(t,lk),c=p.useRef(a);p.useEffect(()=>{c.current=a},[a]);const{ownerState:d}=ze(),m=R({},d,{isClockPointerAnimated:c.current!==a,isClockPointerBetweenTwoValues:r}),y=ck(o),h=()=>{let v=360/(a==="hours"?12:60)*i;return a==="hours"&&i>12&&(v-=360),{height:Math.round((s?.26:.4)*Bn),transform:`rotateZ(${v}deg)`}};return u.jsx(uk,R({style:h(),className:ae(y.root,n),ownerState:m},l,{children:u.jsx(dk,{ownerState:m,className:y.thumb})}))}function fk(e){return Ve("MuiClock",e)}We("MuiClock",["root","clock","wrapper","squareMask","pin","amButton","pmButton","meridiemText","selected"]);const mk=(e,t)=>{const n={root:["root"],clock:["clock"],wrapper:["wrapper"],squareMask:["squareMask"],pin:["pin"],amButton:["amButton",t.clockMeridiemMode==="am"&&"selected"],pmButton:["pmButton",t.clockMeridiemMode==="pm"&&"selected"],meridiemText:["meridiemText"]};return Oe(n,fk,e)},hk=V("div",{name:"MuiClock",slot:"Root"})(({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",margin:e.spacing(2)})),gk=V("div",{name:"MuiClock",slot:"Clock"})({backgroundColor:"rgba(0,0,0,.07)",borderRadius:"50%",height:220,width:220,flexShrink:0,position:"relative",pointerEvents:"none"}),bk=V("div",{name:"MuiClock",slot:"Wrapper"})({"&:focus":{outline:"none"}}),yk=V("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"}}}]}),vk=V("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%)"})),mu=(e,t)=>({zIndex:1,bottom:8,paddingLeft:4,paddingRight:4,width:jt,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}}}]}),xk=V(Vn,{name:"MuiClock",slot:"AmButton"})(({theme:e})=>R({},mu(e,"am"),{position:"absolute",left:8})),wk=V(Vn,{name:"MuiClock",slot:"PmButton"})(({theme:e})=>R({},mu(e,"pm"),{position:"absolute",right:8})),Pi=V(Wt,{name:"MuiClock",slot:"MeridiemText"})({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});function Ck(e){const t=De({props:e,name:"MuiClock"}),{ampm:n,ampmInClock:o,autoFocus:r,children:s,value:a,handleMeridiemChange:i,isTimeDisabled:l,meridiemMode:c,minutesStep:d=1,onChange:m,selectedId:y,type:h,viewValue:g,viewRange:[v,f],disabled:b=!1,readOnly:C,className:w,classes:x}=t,k=Te(),P=lt(),{ownerState:S}=ze(),I=R({},S,{isClockDisabled:b,clockMeridiemMode:c}),T=p.useRef(!1),O=mk(x,I),N=l(g,h),M=!n&&h==="hours"&&(g<1||g>12),L=(U,oe)=>{b||C||l(U,h)||m(U,oe)},A=(U,oe)=>{let{offsetX:ce,offsetY:fe}=U;if(ce===void 0){const Q=U.target.getBoundingClientRect();ce=U.changedTouches[0].clientX-Q.left,fe=U.changedTouches[0].clientY-Q.top}const re=h==="seconds"||h==="minutes"?sk(ce,fe,d):ak(ce,fe,!!n);L(re,oe)},F=U=>{T.current=!0,A(U,"shallow")},E=U=>{T.current&&(A(U,"finish"),T.current=!1),U.preventDefault()},B=U=>{U.buttons>0&&A(U.nativeEvent,"shallow")},G=U=>{T.current&&(T.current=!1),A(U.nativeEvent,"finish")},$=h==="hours"?!1:g%5!==0,Z=h==="minutes"?d:1,W=p.useRef(null);dt(()=>{r&&W.current.focus()},[r]);const ne=U=>Math.max(v,Math.min(f,U)),te=U=>(U+(f+1))%(f+1),se=U=>{if(!T.current)switch(U.key){case"Home":L(v,"partial"),U.preventDefault();break;case"End":L(f,"partial"),U.preventDefault();break;case"ArrowUp":L(te(g+Z),"partial"),U.preventDefault();break;case"ArrowDown":L(te(g-Z),"partial"),U.preventDefault();break;case"PageUp":L(ne(g+5),"partial"),U.preventDefault();break;case"PageDown":L(ne(g-5),"partial"),U.preventDefault();break;case"Enter":case" ":L(g,"finish"),U.preventDefault();break}};return u.jsxs(hk,{className:ae(O.root,w),children:[u.jsxs(gk,{className:O.clock,children:[u.jsx(yk,{onTouchMove:F,onTouchStart:F,onTouchEnd:E,onMouseUp:G,onMouseMove:B,ownerState:I,className:O.squareMask}),!N&&u.jsxs(p.Fragment,{children:[u.jsx(vk,{className:O.pin}),a!=null&&u.jsx(pk,{type:h,viewValue:g,isInner:M,isBetweenTwoClockValues:$})]}),u.jsx(bk,{"aria-activedescendant":y,"aria-label":P.clockLabelText(h,a==null?null:k.format(a,n?"fullTime12h":"fullTime24h")),ref:W,role:"listbox",onKeyDown:se,tabIndex:0,className:O.wrapper,children:s})]}),n&&o&&u.jsxs(p.Fragment,{children:[u.jsx(xk,{onClick:C?void 0:()=>i("am"),disabled:b||c===null,ownerState:I,className:O.amButton,title:Yt(k,"am"),children:u.jsx(Pi,{variant:"caption",className:O.meridiemText,children:Yt(k,"am")})}),u.jsx(wk,{disabled:b||c===null,onClick:C?void 0:()=>i("pm"),ownerState:I,className:O.pmButton,title:Yt(k,"pm"),children:u.jsx(Pi,{variant:"caption",className:O.meridiemText,children:Yt(k,"pm")})})]})]})}function Sk(e){return Ve("MuiClockNumber",e)}const Wo=We("MuiClockNumber",["root","selected","disabled"]),kk=["className","classes","disabled","index","inner","label","selected"],Pk=(e,t)=>{const n={root:["root",t.isClockNumberSelected&&"selected",t.isClockNumberDisabled&&"disabled"]};return Oe(n,Sk,e)},Mk=V("span",{name:"MuiClockNumber",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${Wo.disabled}`]:t.disabled},{[`&.${Wo.selected}`]:t.selected}]})(({theme:e})=>({height:jt,width:jt,position:"absolute",left:`calc((100% - ${jt}px) / 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},[`&.${Wo.selected}`]:{color:(e.vars||e).palette.primary.contrastText},[`&.${Wo.disabled}`]:{pointerEvents:"none",color:(e.vars||e).palette.text.disabled},variants:[{props:{isClockNumberInInnerRing:!0},style:R({},e.typography.body2,{color:(e.vars||e).palette.text.secondary})}]}));function hu(e){const t=De({props:e,name:"MuiClockNumber"}),{className:n,classes:o,disabled:r,index:s,inner:a,label:i,selected:l}=t,c=me(t,kk),{ownerState:d}=ze(),m=R({},d,{isClockNumberInInnerRing:a,isClockNumberSelected:l,isClockNumberDisabled:r}),y=Pk(o,m),h=s%12/12*Math.PI*2-Math.PI/2,g=(Bn-jt-2)/2*(a?.65:1),v=Math.round(Math.cos(h)*g),f=Math.round(Math.sin(h)*g);return u.jsx(Mk,R({className:ae(y.root,n),"aria-disabled":r?!0:void 0,"aria-selected":l?!0:void 0,role:"option",style:{transform:`translate(${v}px, ${f+(Bn-jt)/2}px`},ownerState:m},c,{children:i}))}const Dk=({ampm:e,value:t,getClockNumberText:n,isDisabled:o,selectedId:r,utils:s})=>{const a=t?s.getHours(t):null,i=[],l=e?1:0,c=e?12:23,d=m=>a===null?!1:e?m===12?a===12||a===0:a===m||a-12===m:a===m;for(let m=l;m<=c;m+=1){let y=m.toString();m===0&&(y="00");const h=!e&&(m===0||m>12);y=s.formatNumber(y);const g=d(m);i.push(u.jsx(hu,{id:g?r:void 0,index:m,inner:h,selected:g,disabled:o(m),label:y,"aria-label":n(y)},m))}return i},Mi=({utils:e,value:t,isDisabled:n,getClockNumberText:o,selectedId:r})=>{const s=e.formatNumber;return[[5,s("05")],[10,s("10")],[15,s("15")],[20,s("20")],[25,s("25")],[30,s("30")],[35,s("35")],[40,s("40")],[45,s("45")],[50,s("50")],[55,s("55")],[0,s("00")]].map(([a,i],l)=>{const c=a===t;return u.jsx(hu,{label:i,id:c?r:void 0,index:l+1,inner:!1,disabled:n(a),selected:c,"aria-label":o(i)},a)})},Qs=({value:e,referenceDate:t,utils:n,props:o,timezone:r})=>{const s=p.useMemo(()=>et.getInitialReferenceValue({value:e,utils:n,props:o,referenceDate:t,granularity:Pt.day,timezone:r,getTodayDate:()=>ws(n,r,"date")}),[]);return e??s},Tk=["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"],Ik=e=>Oe({root:["root"],arrowSwitcher:["arrowSwitcher"]},tk,e),Rk=V(kr,{name:"MuiTimeClock",slot:"Root"})({display:"flex",flexDirection:"column",position:"relative"}),Ek=V(su,{name:"MuiTimeClock",slot:"ArrowSwitcher"})({position:"absolute",right:12,top:15}),Ok=["hours","minutes"],Fk=p.forwardRef(function(t,n){const o=Te(),r=De({props:t,name:"MuiTimeClock"}),{ampm:s=o.is12HourCycleInCurrentLocale(),ampmInClock:a=!1,autoFocus:i,slots:l,slotProps:c,value:d,defaultValue:m,referenceDate:y,disableIgnoringDatePartForTimeValidation:h=!1,maxTime:g,minTime:v,disableFuture:f,disablePast:b,minutesStep:C=1,shouldDisableTime:w,showViewSwitcher:x,onChange:k,view:P,views:S=Ok,openTo:I,onViewChange:T,focusedView:O,onFocusedViewChange:N,className:M,classes:L,disabled:A,readOnly:F,timezone:E}=r,B=me(r,Tk),{value:G,handleValueChange:$,timezone:Z}=Gt({name:"TimeClock",timezone:E,value:d,defaultValue:m,referenceDate:y,onChange:k,valueManager:et}),W=Qs({value:G,referenceDate:y,utils:o,props:r,timezone:Z}),ne=lt(),te=mn(Z),se=Po(),{ownerState:U}=ze(),{view:oe,setView:ce,previousView:fe,nextView:re,setValueAndGoToNextView:Q}=Eo({view:P,views:S,openTo:I,onViewChange:T,onChange:$,focusedView:O,onFocusedViewChange:N}),{meridiemMode:_,handleMeridiemChange:q}=Gs(W,s,Q),X=p.useCallback((J,Y)=>{const ee=Mo(h,o),ie=Y==="hours"||Y==="minutes"&&S.includes("seconds"),z=({start:H,end:ge})=>!(v&&ee(v,ge)||g&&ee(H,g)||f&&ee(H,te)||b&&ee(te,ie?ge:H)),j=(H,ge=1)=>{if(H%ge!==0)return!1;if(w)switch(Y){case"hours":return!w(o.setHours(W,H),"hours");case"minutes":return!w(o.setMinutes(W,H),"minutes");case"seconds":return!w(o.setSeconds(W,H),"seconds");default:return!1}return!0};switch(Y){case"hours":{const H=fo(J,_,s),ge=o.setHours(W,H);if(o.getHours(ge)!==H)return!0;const ye=o.setSeconds(o.setMinutes(ge,0),0),Le=o.setSeconds(o.setMinutes(ge,59),59);return!z({start:ye,end:Le})||!j(H)}case"minutes":{const H=o.setMinutes(W,J),ge=o.setSeconds(H,0),ye=o.setSeconds(H,59);return!z({start:ge,end:ye})||!j(J,C)}case"seconds":{const H=o.setSeconds(W,J);return!z({start:H,end:H})||!j(J)}default:throw new Error("not supported")}},[s,W,h,g,_,v,C,w,o,f,b,te,S]),K=p.useMemo(()=>{switch(oe){case"hours":{const J=(ie,z)=>{const j=fo(ie,_,s);Q(o.setHours(W,j),z,"hours")},Y=o.getHours(W);let ee;return s?Y>12?ee=[12,23]:ee=[0,11]:ee=[0,23],{onChange:J,viewValue:Y,children:Dk({value:G,utils:o,ampm:s,getClockNumberText:ne.hoursClockNumberText,isDisabled:ie=>A||X(ie,"hours"),selectedId:se}),viewRange:ee}}case"minutes":{const J=o.getMinutes(W);return{viewValue:J,onChange:(ee,ie)=>{Q(o.setMinutes(W,ee),ie,"minutes")},children:Mi({utils:o,value:J,getClockNumberText:ne.minutesClockNumberText,isDisabled:ee=>A||X(ee,"minutes"),selectedId:se}),viewRange:[0,59]}}case"seconds":{const J=o.getSeconds(W);return{viewValue:J,onChange:(ee,ie)=>{Q(o.setSeconds(W,ee),ie,"seconds")},children:Mi({utils:o,value:J,getClockNumberText:ne.secondsClockNumberText,isDisabled:ee=>A||X(ee,"seconds"),selectedId:se}),viewRange:[0,59]}}default:throw new Error("You must provide the type for ClockView")}},[oe,o,G,s,ne.hoursClockNumberText,ne.minutesClockNumberText,ne.secondsClockNumberText,_,Q,W,X,se,A]),ue=Ik(L);return u.jsxs(Rk,R({ref:n,className:ae(ue.root,M),ownerState:U},B,{children:[u.jsx(Ck,R({autoFocus:i??!!O,ampmInClock:a&&S.includes("hours"),value:G,type:oe,ampm:s,minutesStep:C,isTimeDisabled:X,meridiemMode:_,handleMeridiemChange:q,selectedId:se,disabled:A,readOnly:F},K)),x&&u.jsx(Ek,{className:ue.arrowSwitcher,slots:l,slotProps:c,onGoToPrevious:()=>ce(fe),isPreviousDisabled:!fe,previousLabel:ne.openPreviousView,onGoToNext:()=>ce(re),isNextDisabled:!re,nextLabel:ne.openNextView,ownerState:U})]}))}),Di=Se("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),Ti=Se("MuiListItemIcon",["root","alignItemsFlexStart"]),Ii=Se("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function Nk(e){return Re("MuiMenuItem",e)}const eo=Se("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),Ak=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},$k=e=>{const{disabled:t,dense:n,divider:o,disableGutters:r,selected:s,classes:a}=e,l=Ee({root:["root",n&&"dense",t&&"disabled",!r&&"gutters",o&&"divider",s&&"selected"]},Nk,a);return{...a,...l}},Lk=V(Ln,{shouldForwardProp:e=>Ct(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:Ak})(Be(({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"}},[`&.${eo.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Ie(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${eo.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Ie(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${eo.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Ie(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Ie(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${eo.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${eo.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${Di.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${Di.inset}`]:{marginLeft:52},[`& .${Ii.root}`]:{marginTop:0,marginBottom:0},[`& .${Ii.inset}`]:{paddingLeft:36},[`& .${Ti.root}`]:{minWidth:36},variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>!t.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:t})=>t.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${Ti.root} svg`]:{fontSize:"1.25rem"}}}]}))),gu=p.forwardRef(function(t,n){const o=Fe({props:t,name:"MuiMenuItem"}),{autoFocus:r=!1,component:s="li",dense:a=!1,divider:i=!1,disableGutters:l=!1,focusVisibleClassName:c,role:d="menuitem",tabIndex:m,className:y,...h}=o,g=p.useContext(an),v=p.useMemo(()=>({dense:a||g.dense||!1,disableGutters:l}),[g.dense,a,l]),f=p.useRef(null);Dt(()=>{r&&f.current&&f.current.focus()},[r]);const b={...o,dense:v.dense,divider:i,disableGutters:l},C=$k(o),w=Ze(f,n);let x;return o.disabled||(x=m!==void 0?m:-1),u.jsx(an.Provider,{value:v,children:u.jsx(Lk,{ref:w,role:d,tabIndex:x,component:s,focusVisibleClassName:ae(C.focusVisible,c),className:ae(C.root,y),...h,ownerState:b,classes:C})})});function jk(e){return Ve("MuiDigitalClock",e)}We("MuiDigitalClock",["root","list","item"]);const Vk=["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"],Bk=e=>Oe({root:["root"],list:["list"],item:["item"]},jk,e),Wk=V(kr,{name:"MuiDigitalClock",slot:"Root"})({overflowY:"auto",width:"100%",scrollbarWidth:"thin","@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"auto"},maxHeight:bc,variants:[{props:{hasDigitalClockAlreadyBeenRendered:!0},style:{"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"smooth"}}}]}),_k=V(Ws,{name:"MuiDigitalClock",slot:"List"})({padding:0}),zk=V(gu,{name:"MuiDigitalClock",slot:"Item",shouldForwardProp:e=>e!=="itemValue"&&e!=="formattedValue"})(({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})`:Ie(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})`:Ie(e.palette.primary.main,e.palette.action.focusOpacity)}})),Hk=p.forwardRef(function(t,n){const o=Te(),r=p.useRef(null),s=ot(n,r),a=p.useRef(null),i=De({props:t,name:"MuiDigitalClock"}),{ampm:l=o.is12HourCycleInCurrentLocale(),timeStep:c=30,autoFocus:d,slots:m,slotProps:y,value:h,defaultValue:g,referenceDate:v,disableIgnoringDatePartForTimeValidation:f=!1,maxTime:b,minTime:C,disableFuture:w,disablePast:x,minutesStep:k=1,shouldDisableTime:P,onChange:S,view:I,openTo:T,onViewChange:O,focusedView:N,onFocusedViewChange:M,className:L,classes:A,disabled:F,readOnly:E,views:B=["hours"],skipDisabled:G=!1,timezone:$}=i,Z=me(i,Vk),{value:W,handleValueChange:ne,timezone:te}=Gt({name:"DigitalClock",timezone:$,value:h,defaultValue:g,referenceDate:v,onChange:S,valueManager:et}),se=lt(),U=mn(te),{ownerState:oe}=ze(),ce=R({},oe,{hasDigitalClockAlreadyBeenRendered:!!r.current}),fe=Bk(A),re=m?.digitalClockItem??zk,Q=Ae({elementType:re,externalSlotProps:y?.digitalClockItem,ownerState:ce,className:fe.item}),_=Qs({value:W,referenceDate:v,utils:o,props:i,timezone:te}),q=de(ie=>ne(ie,"finish","hours")),{setValueAndGoToNextView:X}=Eo({view:I,views:B,openTo:T,onViewChange:O,onChange:q,focusedView:N,onFocusedViewChange:M}),K=de(ie=>{X(ie,"finish")});dt(()=>{if(r.current===null)return;const ie=r.current.querySelector('[role="listbox"] [role="option"][tabindex="0"], [role="listbox"] [role="option"][aria-selected="true"]');if(!ie)return;const z=ie.offsetTop;(d||N)&&ie.focus(),r.current.scrollTop=z-4});const ue=p.useCallback(ie=>{const z=Mo(f,o),j=()=>!(C&&z(C,ie)||b&&z(ie,b)||w&&z(ie,U)||x&&z(U,ie)),H=()=>o.getMinutes(ie)%k!==0?!1:P?!P(ie,"hours"):!0;return!j()||!H()},[f,o,C,b,w,U,x,k,P]),J=p.useMemo(()=>{const ie=[];let j=o.startOfDay(_);for(;o.isSameDay(_,j);)ie.push(j),j=o.addMinutes(j,c);return ie},[_,c,o]),Y=J.findIndex(ie=>o.isEqual(ie,_)),ee=ie=>{switch(ie.key){case"PageUp":{const z=tr(a.current)-5,j=a.current.children,H=Math.max(0,z),ge=j[H];ge&&ge.focus(),ie.preventDefault();break}case"PageDown":{const z=tr(a.current)+5,j=a.current.children,H=Math.min(j.length-1,z),ge=j[H];ge&&ge.focus(),ie.preventDefault();break}}};return u.jsx(Wk,R({ref:s,className:ae(fe.root,L),ownerState:ce},Z,{children:u.jsx(_k,{ref:a,role:"listbox","aria-label":se.timePickerToolbarTitle,className:fe.list,onKeyDown:ee,children:J.map((ie,z)=>{const j=ue(ie);if(G&&j)return null;const H=o.isEqual(ie,W),ge=o.format(ie,l?"fullTime12h":"fullTime24h"),Le=Y===z||Y===-1&&z===0?0:-1;return u.jsx(re,R({onClick:()=>!E&&K(ie),selected:H,disabled:F||j,disableRipple:E,role:"option","aria-disabled":E,"aria-selected":H,tabIndex:Le,itemValue:ie,formattedValue:ge},Q,{children:ge}),`${ie.valueOf()}-${ge}`)})})}))});function Uk(e){return Ve("MuiMultiSectionDigitalClock",e)}We("MuiMultiSectionDigitalClock",["root"]);function Yk(e){return Ve("MuiMultiSectionDigitalClockSection",e)}We("MuiMultiSectionDigitalClockSection",["root","item"]);const qk=["autoFocus","onChange","className","classes","disabled","readOnly","items","active","slots","slotProps","skipDisabled"],Kk=e=>Oe({root:["root"],item:["item"]},Yk,e),Gk=V(Ws,{name:"MuiMultiSectionDigitalClockSection",slot:"Root"})(({theme:e})=>({maxHeight:bc,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}`},"&::after":{display:"block",content:'""',height:"calc(100% - 40px - 6px)"},variants:[{props:{hasDigitalClockAlreadyBeenRendered:!0},style:{"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"smooth"}}}]})),Qk=V(gu,{name:"MuiMultiSectionDigitalClockSection",slot:"Item"})(({theme:e})=>({padding:8,margin:"2px 4px",width:Oy,justifyContent:"center","&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Ie(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})`:Ie(e.palette.primary.main,e.palette.action.focusOpacity)}})),Xk=p.forwardRef(function(t,n){const o=p.useRef(null),r=ot(n,o),s=p.useRef(null),a=De({props:t,name:"MuiMultiSectionDigitalClockSection"}),{autoFocus:i,onChange:l,className:c,classes:d,disabled:m,readOnly:y,items:h,active:g,slots:v,slotProps:f,skipDisabled:b}=a,C=me(a,qk),{ownerState:w}=ze(),x=R({},w,{hasDigitalClockAlreadyBeenRendered:!!o.current}),k=Kk(d),P=v?.digitalClockSectionItem??Qk;dt(()=>{if(o.current===null)return;const T=o.current.querySelector('[role="option"][tabindex="0"], [role="option"][aria-selected="true"]');if(g&&i&&T&&T.focus(),!T||s.current===T)return;s.current=T;const O=T.offsetTop;o.current.scrollTop=O-4});const S=h.findIndex(T=>T.isFocused(T.value)),I=T=>{switch(T.key){case"PageUp":{const O=tr(o.current)-5,N=o.current.children,M=Math.max(0,O),L=N[M];L&&L.focus(),T.preventDefault();break}case"PageDown":{const O=tr(o.current)+5,N=o.current.children,M=Math.min(N.length-1,O),L=N[M];L&&L.focus(),T.preventDefault();break}}};return u.jsx(Gk,R({ref:r,className:ae(k.root,c),ownerState:x,autoFocusItem:i&&g,role:"listbox",onKeyDown:I},C,{children:h.map((T,O)=>{const N=T.isDisabled?.(T.value),M=m||N;if(b&&M)return null;const L=T.isSelected(T.value),A=S===O||S===-1&&O===0?0:-1;return u.jsx(P,R({onClick:()=>!y&&l(T.value),selected:L,disabled:M,disableRipple:y,role:"option","aria-disabled":y||M||void 0,"aria-label":T.ariaLabel,"aria-selected":L,tabIndex:A,className:k.item},f?.digitalClockSectionItem,{children:T.label}),T.label)})}))}),Zk=({now:e,value:t,utils:n,ampm:o,isDisabled:r,resolveAriaLabel:s,timeStep:a,valueOrReferenceDate:i})=>{const l=t?n.getHours(t):null,c=[],d=(h,g)=>{const v=g??l;return v===null?!1:o?h===12?v===12||v===0:v===h||v-12===h:v===h},m=h=>d(h,n.getHours(i)),y=o?11:23;for(let h=0;h<=y;h+=a){let g=n.format(n.setHours(e,h),o?"hours12h":"hours24h");const v=s(parseInt(g,10).toString());g=n.formatNumber(g),c.push({value:h,label:g,isSelected:d,isDisabled:r,isFocused:m,ariaLabel:v})}return c},Ri=({value:e,utils:t,isDisabled:n,timeStep:o,resolveLabel:r,resolveAriaLabel:s,hasValue:a=!0})=>{const i=c=>e===null?!1:a&&e===c,l=c=>e===c;return[...Array.from({length:Math.ceil(60/o)},(c,d)=>{const m=o*d;return{value:m,label:t.formatNumber(r(m)),isDisabled:n,isSelected:i,isFocused:l,ariaLabel:s(m.toString())}})]},Jk=["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"],eP=e=>Oe({root:["root"]},Uk,e),tP=V(kr,{name:"MuiMultiSectionDigitalClock",slot:"Root"})(({theme:e})=>({flexDirection:"row",width:"100%",borderBottom:`1px solid ${(e.vars||e).palette.divider}`})),nP=p.forwardRef(function(t,n){const o=Te(),r=wt(),s=De({props:t,name:"MuiMultiSectionDigitalClock"}),{ampm:a=o.is12HourCycleInCurrentLocale(),timeSteps:i,autoFocus:l,slots:c,slotProps:d,value:m,defaultValue:y,referenceDate:h,disableIgnoringDatePartForTimeValidation:g=!1,maxTime:v,minTime:f,disableFuture:b,disablePast:C,minutesStep:w=1,shouldDisableTime:x,onChange:k,view:P,views:S=["hours","minutes"],openTo:I,onViewChange:T,focusedView:O,onFocusedViewChange:N,className:M,classes:L,disabled:A,readOnly:F,skipDisabled:E=!1,timezone:B}=s,G=me(s,Jk),{value:$,handleValueChange:Z,timezone:W}=Gt({name:"MultiSectionDigitalClock",timezone:B,value:m,defaultValue:y,referenceDate:h,onChange:k,valueManager:et}),ne=lt(),te=mn(W),se=p.useMemo(()=>R({hours:1,minutes:5,seconds:5},i),[i]),U=Qs({value:$,referenceDate:h,utils:o,props:s,timezone:W}),oe=de((z,j,H)=>Z(z,j,H)),ce=p.useMemo(()=>!a||!S.includes("hours")||S.includes("meridiem")?S:[...S,"meridiem"],[a,S]),{view:fe,setValueAndGoToNextView:re,focusedView:Q}=Eo({view:P,views:ce,openTo:I,onViewChange:T,onChange:oe,focusedView:O,onFocusedViewChange:N}),_=de(z=>{re(z,"finish","meridiem")}),{meridiemMode:q,handleMeridiemChange:X}=Gs(U,a,_,"finish"),K=p.useCallback((z,j)=>{const H=Mo(g,o),ge=j==="hours"||j==="minutes"&&ce.includes("seconds"),ye=({start:Pe,end:_e})=>!(f&&H(f,_e)||v&&H(Pe,v)||b&&H(Pe,te)||C&&H(te,ge?_e:Pe)),Le=(Pe,_e=1)=>{if(Pe%_e!==0)return!1;if(x)switch(j){case"hours":return!x(o.setHours(U,Pe),"hours");case"minutes":return!x(o.setMinutes(U,Pe),"minutes");case"seconds":return!x(o.setSeconds(U,Pe),"seconds");default:return!1}return!0};switch(j){case"hours":{const Pe=fo(z,q,a),_e=o.setHours(U,Pe);if(o.getHours(_e)!==Pe)return!0;const qe=o.setSeconds(o.setMinutes(_e,0),0),be=o.setSeconds(o.setMinutes(_e,59),59);return!ye({start:qe,end:be})||!Le(Pe)}case"minutes":{const Pe=o.setMinutes(U,z),_e=o.setSeconds(Pe,0),qe=o.setSeconds(Pe,59);return!ye({start:_e,end:qe})||!Le(z,w)}case"seconds":{const Pe=o.setSeconds(U,z);return!ye({start:Pe,end:Pe})||!Le(z)}default:throw new Error("not supported")}},[a,U,g,v,q,f,w,x,o,b,C,te,ce]),ue=p.useCallback(z=>{switch(z){case"hours":return{onChange:j=>{const H=fo(j,q,a);re(o.setHours(U,H),"finish","hours")},items:Zk({now:te,value:$,ampm:a,utils:o,isDisabled:j=>K(j,"hours"),timeStep:se.hours,resolveAriaLabel:ne.hoursClockNumberText,valueOrReferenceDate:U})};case"minutes":return{onChange:j=>{re(o.setMinutes(U,j),"finish","minutes")},items:Ri({value:o.getMinutes(U),utils:o,isDisabled:j=>K(j,"minutes"),resolveLabel:j=>o.format(o.setMinutes(te,j),"minutes"),timeStep:se.minutes,hasValue:!!$,resolveAriaLabel:ne.minutesClockNumberText})};case"seconds":return{onChange:j=>{re(o.setSeconds(U,j),"finish","seconds")},items:Ri({value:o.getSeconds(U),utils:o,isDisabled:j=>K(j,"seconds"),resolveLabel:j=>o.format(o.setSeconds(te,j),"seconds"),timeStep:se.seconds,hasValue:!!$,resolveAriaLabel:ne.secondsClockNumberText})};case"meridiem":{const j=Yt(o,"am"),H=Yt(o,"pm");return{onChange:X,items:[{value:"am",label:j,isSelected:()=>!!$&&q==="am",isFocused:()=>!!U&&q==="am",ariaLabel:j},{value:"pm",label:H,isSelected:()=>!!$&&q==="pm",isFocused:()=>!!U&&q==="pm",ariaLabel:H}]}}default:throw new Error(`Unknown view: ${z} found.`)}},[te,$,a,o,se.hours,se.minutes,se.seconds,ne.hoursClockNumberText,ne.minutesClockNumberText,ne.secondsClockNumberText,q,re,U,K,X]),J=p.useMemo(()=>{if(!r)return ce;const z=ce.filter(j=>j!=="meridiem");return z.reverse(),ce.includes("meridiem")&&z.push("meridiem"),z},[r,ce]),Y=p.useMemo(()=>ce.reduce((z,j)=>R({},z,{[j]:ue(j)}),{}),[ce,ue]),{ownerState:ee}=ze(),ie=eP(L);return u.jsx(tP,R({ref:n,className:ae(ie.root,M),ownerState:ee,role:"group"},G,{children:J.map(z=>u.jsx(Xk,{items:Y[z].items,onChange:Y[z].onChange,active:fe===z,autoFocus:l||Q===z,disabled:A,readOnly:F,slots:c,slotProps:d,skipDisabled:E,"aria-label":ne.selectViewText(z)},z))}))}),Fr=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:o,views:r,value:s,defaultValue:a,referenceDate:i,onChange:l,className:c,classes:d,disableFuture:m,disablePast:y,minTime:h,maxTime:g,shouldDisableTime:v,minutesStep:f,ampm:b,ampmInClock:C,slots:w,slotProps:x,readOnly:k,disabled:P,sx:S,autoFocus:I,showViewSwitcher:T,disableIgnoringDatePartForTimeValidation:O,timezone:N})=>u.jsx(Fk,{view:e,onViewChange:t,focusedView:n&&On(n)?n:null,onFocusedViewChange:o,views:r.filter(On),value:s,defaultValue:a,referenceDate:i,onChange:l,className:c,classes:d,disableFuture:m,disablePast:y,minTime:h,maxTime:g,shouldDisableTime:v,minutesStep:f,ampm:b,ampmInClock:C,slots:w,slotProps:x,readOnly:k,disabled:P,sx:S,autoFocus:I,showViewSwitcher:T,disableIgnoringDatePartForTimeValidation:O,timezone:N}),oP=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:o,views:r,value:s,defaultValue:a,referenceDate:i,onChange:l,className:c,classes:d,disableFuture:m,disablePast:y,minTime:h,maxTime:g,shouldDisableTime:v,minutesStep:f,ampm:b,slots:C,slotProps:w,readOnly:x,disabled:k,sx:P,autoFocus:S,disableIgnoringDatePartForTimeValidation:I,timeSteps:T,skipDisabled:O,timezone:N})=>u.jsx(Hk,{view:e,onViewChange:t,focusedView:n&&On(n)?n:null,onFocusedViewChange:o,views:r.filter(On),value:s,defaultValue:a,referenceDate:i,onChange:l,className:c,classes:d,disableFuture:m,disablePast:y,minTime:h,maxTime:g,shouldDisableTime:v,minutesStep:f,ampm:b,slots:C,slotProps:w,readOnly:x,disabled:k,sx:P,autoFocus:S,disableIgnoringDatePartForTimeValidation:I,timeStep:T?.minutes,skipDisabled:O,timezone:N}),Ei=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:o,views:r,value:s,defaultValue:a,referenceDate:i,onChange:l,className:c,classes:d,disableFuture:m,disablePast:y,minTime:h,maxTime:g,shouldDisableTime:v,minutesStep:f,ampm:b,slots:C,slotProps:w,readOnly:x,disabled:k,sx:P,autoFocus:S,disableIgnoringDatePartForTimeValidation:I,timeSteps:T,skipDisabled:O,timezone:N})=>u.jsx(nP,{view:e,onViewChange:t,focusedView:n&&Il(n)?n:null,onFocusedViewChange:o,views:r.filter(On),value:s,defaultValue:a,referenceDate:i,onChange:l,className:c,classes:d,disableFuture:m,disablePast:y,minTime:h,maxTime:g,shouldDisableTime:v,minutesStep:f,ampm:b,slots:C,slotProps:w,readOnly:x,disabled:k,sx:P,autoFocus:S,disableIgnoringDatePartForTimeValidation:I,timeSteps:T,skipDisabled:O,timezone:N}),rP=(e,t,n)=>n?t.filter(o=>!Il(o)||o==="hours"):e?[...t,"meridiem"]:t,sP=(e,t)=>24*60/((e.hours??1)*(e.minutes??5))<=t;function aP({thresholdToRenderTimeInASingleColumn:e,ampm:t,timeSteps:n,views:o}){const r=e??24,s=R({hours:1,minutes:5,seconds:5},n),a=sP(s,r);return{thresholdToRenderTimeInASingleColumn:r,timeSteps:s,shouldRenderTimeInASingleColumn:a,views:rP(t,o,a)}}const bu=p.forwardRef(function(t,n){const o=Te(),r=du(t,"MuiDesktopTimePicker"),{shouldRenderTimeInASingleColumn:s,views:a,timeSteps:i}=aP(r),l=s?oP:Ei,c=R({hours:l,minutes:l,seconds:l,meridiem:l},r.viewRenderers),d=r.ampmInClock??!0,y=c.hours?.name===Ei.name?a:a.filter(v=>v!=="meridiem"),h=R({},r,{ampmInClock:d,timeSteps:i,viewRenderers:c,format:Rl(o,r),views:s?["hours"]:y,slots:R({field:cu},r.slots),slotProps:R({},r.slotProps,{field:v=>R({},ln(r.slotProps?.field,v),dr(r)),toolbar:R({hidden:!0,ampmInClock:d},r.slotProps?.toolbar)})}),{renderPicker:g}=zc({ref:n,props:h,valueManager:et,valueType:"time",validator:pr,steps:null});return g()});bu.propTypes={ampm:D.bool,ampmInClock:D.bool,autoFocus:D.bool,className:D.string,closeOnSelect:D.bool,defaultValue:D.object,disabled:D.bool,disableFuture:D.bool,disableIgnoringDatePartForTimeValidation:D.bool,disableOpenPicker:D.bool,disablePast:D.bool,enableAccessibleFieldDOMStructure:D.any,format:D.string,formatDensity:D.oneOf(["dense","spacious"]),inputRef:cr,label:D.node,localeText:D.object,maxTime:D.object,minTime:D.object,minutesStep:D.number,name:D.string,onAccept:D.func,onChange:D.func,onClose:D.func,onError:D.func,onOpen:D.func,onSelectedSectionsChange:D.func,onViewChange:D.func,open:D.bool,openTo:D.oneOf(["hours","meridiem","minutes","seconds"]),orientation:D.oneOf(["landscape","portrait"]),readOnly:D.bool,reduceAnimations:D.bool,referenceDate:D.object,selectedSections:D.oneOfType([D.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),D.number]),shouldDisableTime:D.func,skipDisabled:D.bool,slotProps:D.object,slots:D.object,sx:D.oneOfType([D.arrayOf(D.oneOfType([D.func,D.object,D.bool])),D.func,D.object]),thresholdToRenderTimeInASingleColumn:D.number,timeSteps:D.shape({hours:D.number,minutes:D.number,seconds:D.number}),timezone:D.string,value:D.object,view:D.oneOf(["hours","meridiem","minutes","seconds"]),viewRenderers:D.shape({hours:D.func,meridiem:D.func,minutes:D.func,seconds:D.func}),views:D.arrayOf(D.oneOf(["hours","minutes","seconds"]).isRequired)};const yu=p.forwardRef(function(t,n){const o=Te(),r=du(t,"MuiMobileTimePicker"),s=R({hours:Fr,minutes:Fr,seconds:Fr},r.viewRenderers),a=r.ampmInClock??!1,i=R({},r,{ampmInClock:a,viewRenderers:s,format:Rl(o,r),slots:R({field:cu},r.slots),slotProps:R({},r.slotProps,{field:c=>R({},ln(r.slotProps?.field,c),dr(r)),toolbar:R({hidden:!1,ampmInClock:a},r.slotProps?.toolbar)})}),{renderPicker:l}=iu({ref:n,props:i,valueManager:et,valueType:"time",validator:pr,steps:null});return l()});yu.propTypes={ampm:D.bool,ampmInClock:D.bool,autoFocus:D.bool,className:D.string,closeOnSelect:D.bool,defaultValue:D.object,disabled:D.bool,disableFuture:D.bool,disableIgnoringDatePartForTimeValidation:D.bool,disableOpenPicker:D.bool,disablePast:D.bool,enableAccessibleFieldDOMStructure:D.any,format:D.string,formatDensity:D.oneOf(["dense","spacious"]),inputRef:cr,label:D.node,localeText:D.object,maxTime:D.object,minTime:D.object,minutesStep:D.number,name:D.string,onAccept:D.func,onChange:D.func,onClose:D.func,onError:D.func,onOpen:D.func,onSelectedSectionsChange:D.func,onViewChange:D.func,open:D.bool,openTo:D.oneOf(["hours","minutes","seconds"]),orientation:D.oneOf(["landscape","portrait"]),readOnly:D.bool,reduceAnimations:D.bool,referenceDate:D.object,selectedSections:D.oneOfType([D.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),D.number]),shouldDisableTime:D.func,slotProps:D.object,slots:D.object,sx:D.oneOfType([D.arrayOf(D.oneOfType([D.func,D.object,D.bool])),D.func,D.object]),timezone:D.string,value:D.object,view:D.oneOf(["hours","minutes","seconds"]),viewRenderers:D.shape({hours:D.func,minutes:D.func,seconds:D.func}),views:D.arrayOf(D.oneOf(["hours","minutes","seconds"]).isRequired)};const iP=["desktopModeMediaQuery"],lP=p.forwardRef(function(t,n){const o=De({props:t,name:"MuiTimePicker"}),{desktopModeMediaQuery:r=lc}=o,s=me(o,iP);return ys(r,{defaultMatches:!0})?u.jsx(bu,R({ref:n},s)):u.jsx(yu,R({ref:n},s))}),Nr=(e,t)=>{typeof e=="function"?e(t):e&&(e.current=t)},es=p.forwardRef(({id:e,className:t,placeholder:n,value:o,disabled:r,readOnly:s,required:a,name:i,autoComplete:l,autoFocus:c,error:d,focused:m,onChange:y,onBlur:h,onFocus:g,onClick:v,InputProps:f,inputProps:b},C)=>u.jsxs("div",{ref:w=>{Nr(C,w),Nr(f?.ref,w)},onBlur:h,onFocus:g,onClick:v,className:je("flex h-9 items-center gap-1 rounded-md border border-control bg-surface px-3","transition-colors duration-fast ease-out-quart","has-[input:focus-visible]:outline-solid has-[input:focus-visible]:outline-2","has-[input:focus-visible]:outline-accent has-[input:focus-visible]:outline-offset-2",d&&"border-danger",r&&"border-hairline bg-sunken",t),children:[f?.startAdornment,u.jsx("input",{id:e,name:i,placeholder:n,value:o??"",disabled:r,readOnly:s,required:a,autoComplete:l,"aria-invalid":d||void 0,onChange:y,...b,ref:w=>{Nr(b?.ref,w),c&&w&&w.focus()},className:je("h-full min-w-0 flex-1 bg-transparent outline-none","text-body-sm text-ink placeholder:text-ink-dim","disabled:text-ink-disabled disabled:placeholder:text-ink-disabled")}),f?.endAdornment]}));es.displayName="PickerTextField";const rr=({label:e,value:t,onChange:n,initialOpen:o=!1,disabled:r,helperText:s})=>{const[a,i]=p.useState(null),[l,c]=p.useState(null),[d,m]=p.useState(o),y=p.useId();p.useEffect(()=>{if(t&&to(oa(t))){const f=oa(t);i(f),c(f)}else i(null),c(null)},[t]);const h=f=>{if(i(f),f&&to(f)){const b=new Date(f);l&&to(l)?(b.setHours(l.getHours()),b.setMinutes(l.getMinutes()),b.setSeconds(l.getSeconds())):b.setHours(0,0,0,0),n(b.toISOString())}else n(null)},g=f=>{if(c(f),f&&to(f)){const b=a?new Date(a):new Date;b.setHours(f.getHours()),b.setMinutes(f.getMinutes()),b.setSeconds(f.getSeconds()),a||i(new Date(b.getFullYear(),b.getMonth(),b.getDate())),n(b.toISOString())}else if(f===null&&a){const b=new Date(a);b.setHours(0,0,0,0),c(b),n(b.toISOString())}else n(null)},v=()=>{const f=new Date;i(f),c(f),n(f.toISOString())};return u.jsx(Ll,{dateAdapter:gm,children:u.jsxs("div",{children:[u.jsx("label",{htmlFor:`${y}-date-field`,className:"mb-1.5 block font-medium text-body-sm text-ink-muted",children:e}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("div",{className:"min-w-0 flex-1",children:u.jsx(LS,{value:a,onChange:h,disabled:r,open:o?d:void 0,disableHighlightToday:o,onOpen:()=>m(!0),onClose:()=>m(!1),enableAccessibleFieldDOMStructure:!1,slots:{textField:es,openPickerIcon:()=>u.jsx(_i,{size:16})},slotProps:{textField:{id:`${y}-date-field`,placeholder:"Select date"},openPickerButton:{"aria-label":`Choose ${e} date`,size:"small"}}})}),u.jsx("div",{className:"min-w-0 flex-1",children:u.jsx(lP,{value:l,onChange:g,disabled:r,enableAccessibleFieldDOMStructure:!1,slots:{textField:es,openPickerIcon:()=>u.jsx(ju,{size:16})},slotProps:{textField:{id:`${y}-time-field`,placeholder:"Select time"},openPickerButton:{"aria-label":`Choose ${e} time`,size:"small"}}})}),u.jsx(qt,{content:"Set to current time",children:u.jsx(bt,{variant:"ghost",size:"icon-sm",onClick:v,disabled:r,"aria-label":`Set ${e} to current time`,children:u.jsx(Vu,{})})})]}),s&&u.jsx("p",{className:"mt-1 ml-0.5 text-ink-muted text-meta",children:s})]})})},Oi={selectedAgentId:null,prompt:"",interval:1,unit:"hours",is_active:!0,one_time:!1,start_time_utc:null,end_time_utc:null},cP=({options:e,selected:t,onSelect:n,onQueryChange:o,loading:r,invalid:s})=>{const a=p.useId(),i=`${a}-input`,l=`${a}-listbox`,c=p.useRef(null),d=p.useRef([]),m=t?.name||(t?`Agent ID: ${t.id.substring(0,8)}...`:""),[y,h]=p.useState(m),[g,v]=p.useState(!1),[f,b]=p.useState(-1);p.useEffect(()=>{h(m)},[m]),d.current.length=e.length,p.useEffect(()=>{b(-1)},[e]),p.useEffect(()=>{!g||f<0||d.current[f]?.scrollIntoView({block:"nearest"})},[g,f]);const C=S=>{v(!1),h(S.name||`Agent ID: ${S.id.substring(0,8)}...`),n(S)},w=()=>{v(!1),h(m)},x=S=>{e.length!==0&&b(I=>{const T=I+S;return T<0?e.length-1:T>=e.length?0:T})},k=S=>{switch(S.key){case"ArrowDown":case"ArrowUp":{if(S.preventDefault(),!g){v(!0);return}x(S.key==="ArrowDown"?1:-1);return}case"Home":case"End":{if(!g||e.length===0)return;S.preventDefault(),b(S.key==="Home"?0:e.length-1);return}case"Enter":{S.preventDefault(),g&&f>=0&&C(e[f]);return}case"Escape":{if(!g)return;S.preventDefault(),S.stopPropagation(),w();return}}},P=g&&f>=0?`${a}-option-${f}`:void 0;return u.jsx("div",{className:"relative",children:u.jsxs(ed,{open:g,onOpenChange:S=>{S?v(!0):w()},children:[u.jsx(td,{asChild:!0,children:u.jsxs("div",{ref:c,className:"relative",children:[u.jsx(qo,{id:i,role:"combobox","aria-expanded":g,"aria-controls":l,"aria-autocomplete":"list","aria-activedescendant":P,"aria-invalid":s||void 0,autoComplete:"off",className:"pr-8",placeholder:"Search agents",value:y,onChange:S=>{h(S.target.value),o(S.target.value),v(!0)},onFocus:()=>v(!0),onClick:()=>v(!0),onBlur:w,onKeyDown:k}),u.jsx("span",{className:"pointer-events-none absolute top-1/2 right-2 flex -translate-y-1/2 items-center",children:r?u.jsx(ls,{size:"sm",label:"Loading agents"}):u.jsx(nd,{className:"size-4 text-ink-dim","aria-hidden":"true"})})]})}),u.jsx(od,{align:"start",className:"w-(--radix-popover-trigger-width) p-1",onOpenAutoFocus:S=>S.preventDefault(),onCloseAutoFocus:S=>S.preventDefault(),onPointerDownOutside:S=>{c.current?.contains(S.target)&&S.preventDefault()},onFocusOutside:S=>{c.current?.contains(S.target)&&S.preventDefault()},onMouseDown:S=>S.preventDefault(),children:u.jsxs("ul",{id:l,role:"listbox","aria-label":"Select agent",className:"max-h-72 overflow-y-auto",children:[e.length===0&&u.jsx("li",{role:"presentation",className:"px-2 py-1.5 text-body-sm text-ink-dim",children:r?"Loading agents":"No matching agents"}),e.map((S,I)=>u.jsx("li",{id:`${a}-option-${I}`,role:"option","aria-selected":S.id===t?.id,ref:T=>{d.current[I]=T},className:je("cursor-pointer rounded-sm px-2 py-1.5","transition-colors duration-fast ease-out-quart",I===f&&"bg-accent-wash"),onMouseEnter:()=>b(I),onClick:()=>C(S),children:u.jsx("span",{className:"font-medium text-body-sm text-ink",children:S.name||"Unnamed agent"})},S.id))]})})]})})},uP=({open:e,onClose:t,onSubmit:n,initialData:o})=>{const[r,s]=p.useState(Oi),[a,i]=p.useState(!1),[l,c]=p.useState(""),[d,m]=p.useState(""),[y,h]=p.useState(null),g=!!o;p.useEffect(()=>{const S=setTimeout(()=>{m(l)},300);return()=>clearTimeout(S)},[l]);const{data:v,isLoading:f,isError:b}=Bu(1,50,0,d||void 0),C=p.useMemo(()=>v?.agents||[],[v]);p.useEffect(()=>{if(e)if(o){s({selectedAgentId:o.agent_id,prompt:o.prompt,interval:o.interval,unit:o.unit,is_active:o.is_active,one_time:o.one_time,start_time_utc:o.start_time_utc?new Date(o.start_time_utc).toISOString():null,end_time_utc:o.end_time_utc?new Date(o.end_time_utc).toISOString():null});const S=C.find(I=>I.id===o.agent_id);S&&h(S)}else s(Oi),h(null),c("")},[e,o,C]);const w=async()=>{i(!0);try{if(!g&&!r.selectedAgentId){console.error("Agent ID is required to create a schedule."),i(!1);return}const S={prompt:r.prompt,interval:Number(r.interval),unit:r.unit,is_active:r.is_active,one_time:r.one_time,start_time_utc:r.start_time_utc||null,end_time_utc:r.end_time_utc||null};S.start_time_utc===""&&(S.start_time_utc=null),S.end_time_utc===""&&(S.end_time_utc=null);const I=g?o.agent_id:r.selectedAgentId;if(!I){console.error("Agent ID is missing for submission."),i(!1);return}await n(S,I),t()}catch(S){console.error("Failed to submit schedule:",S),Sn(`Failed to save schedule: ${S instanceof Error?S.message:"Unknown error"}`)}finally{i(!1)}},x=g?"Edit schedule":"New schedule",k=b||!g&&!r.selectedAgentId&&a,P=u.jsxs(u.Fragment,{children:[u.jsx(zi,{onClick:t,disabled:a,startIcon:u.jsx(Wu,{size:18}),"data-tour-tag":"create-schedule-dialog-cancel-button",children:"Cancel"}),u.jsx(Hi,{onClick:w,disabled:a||!r.prompt||r.interval===""||r.interval<1||!g&&!r.selectedAgentId,startIcon:a?u.jsx(ls,{size:"sm"}):u.jsx(_u,{size:18}),children:a?"Saving":g?"Save changes":"Create schedule"})]});return u.jsx(Ui,{open:e,onClose:t,title:x,actions:P,maxWidth:"sm",fullWidth:!0,dataTourTag:"create-schedule-dialog",children:u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs("div",{className:"col-span-2 flex items-start gap-2",children:[u.jsx(ea,{size:16,"aria-hidden":"true",className:"mt-0.5 shrink-0 text-info"}),u.jsx("p",{className:"text-body-sm text-ink-muted",children:'It is usually quicker to ask an agent in chat — "send me an email with the latest news at 8am every day" — and it will set this up for you.'})]}),!g&&u.jsxs("div",{className:"col-span-2 flex flex-col gap-1.5",children:[u.jsxs(gt,{htmlFor:"agent-select-for-schedule",children:["Agent ",u.jsx("span",{className:"text-danger",children:"*"})]}),u.jsx(cP,{options:C,selected:y,onSelect:S=>{h(S),s(I=>({...I,selectedAgentId:S?S.id:null}))},onQueryChange:c,loading:f,invalid:k}),k&&u.jsx("p",{className:"text-danger text-meta",children:b?"Failed to load agents.":"Agent selection is required."})]}),g&&o&&u.jsxs("p",{className:"col-span-2 text-body-sm text-ink-muted",children:["Runs as"," ",u.jsx("span",{className:"font-medium text-ink",children:y?.name||`${o.agent_id.substring(0,8)}…`}),". The agent cannot be changed after a schedule is created."]}),u.jsxs("div",{className:"col-span-2 flex flex-col gap-1.5",children:[u.jsxs(gt,{htmlFor:"prompt",className:"items-center",children:["Prompt ",u.jsx("span",{className:"text-danger",children:"*"}),u.jsx(qt,{side:"top",align:"start",content:u.jsxs("div",{className:"flex flex-col gap-1",children:[u.jsx("span",{children:"This is the message that will be sent to the agent on the schedule."}),u.jsx("span",{children:'Example: "Send me an email with a detailed world news breakdown with key events"'})]}),children:u.jsx(ea,{size:14,"aria-hidden":"true",className:"text-info"})})]}),u.jsx(Ki,{id:"prompt",name:"prompt",value:r.prompt,onChange:S=>s(I=>({...I,prompt:S.target.value})),required:!0,rows:3,disabled:a,placeholder:"Send me an email with a detailed world news breakdown"})]}),u.jsxs("div",{className:"flex flex-col gap-1.5",children:[u.jsxs(gt,{htmlFor:"interval",children:["Interval ",u.jsx("span",{className:"text-danger",children:"*"})]}),u.jsx(qo,{id:"interval",name:"interval",type:"number",min:1,value:r.interval,onChange:S=>{const I=S.target.value;s(T=>({...T,interval:I===""?"":Number.parseInt(I,10)}))},required:!0,disabled:a,placeholder:"1"})]}),u.jsxs("div",{className:"flex flex-col gap-1.5",children:[u.jsxs(gt,{htmlFor:"unit-select",children:["Unit ",u.jsx("span",{className:"text-danger",children:"*"})]}),u.jsxs(bn,{value:r.unit||"hours",onValueChange:S=>s(I=>({...I,unit:S})),disabled:a,children:[u.jsx(yn,{id:"unit-select",name:"unit",children:u.jsx(vn,{placeholder:"Select unit"})}),u.jsxs(xn,{children:[u.jsx(Je,{value:"minutes",children:"Minutes"}),u.jsx(Je,{value:"hours",children:"Hours"}),u.jsx(Je,{value:"days",children:"Days"})]})]})]}),u.jsx(rr,{label:"Start time",value:r.start_time_utc??null,onChange:S=>s(I=>({...I,start_time_utc:S})),disabled:a,helperText:"If not set, starts immediately or on next interval."}),u.jsx(rr,{label:"End time (optional)",value:r.end_time_utc??null,onChange:S=>s(I=>({...I,end_time_utc:S})),disabled:a,helperText:"If not set, schedule runs indefinitely."}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx($r,{id:"is-active",checked:r.is_active||!1,onCheckedChange:S=>s(I=>({...I,is_active:S})),disabled:a}),u.jsx(gt,{htmlFor:"is-active",children:"Active"})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx($r,{id:"one-time",checked:r.one_time||!1,onCheckedChange:S=>s(I=>({...I,one_time:S})),disabled:a}),u.jsx(gt,{htmlFor:"one-time",children:"Run once"})]})]})})},dP=(e,t)=>om(e,t),pP=e=>{const t=Wn.baseUrl;return as({queryKey:["agent-name",e,t],queryFn:async()=>t?(await Hu.getAgent(t,e)).result?.name||"Unknown agent":(console.warn("Base URL for Local Operator API is not configured."),"Agent ID"),enabled:!!e&&!!t,staleTime:1e3*60*5})},fP=({schedule:e,onEdit:t,onDelete:n,onToggleActive:o,nowMs:r=Date.now()})=>{const{data:s,isLoading:a}=pP(e.agent_id),i=p.useId();return u.jsxs("div",{title:`Schedule ID: ${e.id}`,className:je("group flex items-start gap-3 border-hairline border-b px-4 py-3 last:border-b-0","transition-colors duration-fast ease-out-quart hover:bg-row-hover"),children:[u.jsxs("div",{className:je("flex min-w-0 flex-1 flex-col gap-1"),children:[u.jsx("p",{className:je("min-w-0 break-words text-body-sm",e.is_active?"text-ink":"text-ink-muted"),children:e.prompt}),u.jsxs("p",{className:je("flex flex-wrap items-center gap-x-1.5 text-meta"),children:[u.jsx("span",{className:je("text-ink-muted"),children:dP(e,r)}),u.jsx("span",{"aria-hidden":"true",className:je("text-ink-dim"),children:"·"}),a?u.jsx(rd,{className:je("h-3 w-24")}):u.jsx("span",{className:je("truncate text-ink-dim"),children:s||e.agent_id.substring(0,8)})]})]}),u.jsxs("div",{className:je("flex shrink-0 items-center gap-1"),children:[u.jsx(qt,{content:e.is_active?"Pause schedule":"Resume schedule",children:u.jsx("span",{className:je("flex items-center pr-1"),children:u.jsx($r,{id:i,checked:e.is_active,onCheckedChange:()=>o(e),"aria-label":e.is_active?"Pause schedule":"Resume schedule"})})}),u.jsxs("div",{className:je("flex items-center gap-0.5","pointer-events-none opacity-0","group-hover:pointer-events-auto group-hover:opacity-100","group-focus-within:pointer-events-auto group-focus-within:opacity-100"),children:[u.jsx(qt,{content:"Edit schedule",children:u.jsx(bt,{variant:"ghost",size:"icon-sm",onClick:()=>t(e),"aria-label":"Edit schedule",children:u.jsx(Yi,{})})}),u.jsx(qt,{content:"Delete schedule",children:u.jsx(bt,{variant:"ghost",size:"icon-sm",onClick:()=>n(e.id),"aria-label":"Delete schedule",className:je("hover:bg-danger-wash hover:text-danger"),children:u.jsx(zu,{})})})]})]})]})},mP=20,hP=9,oo=6e4,gP=["minutes","hours","days","weeks"],bP={minutes:"Minutes",hours:"Hours",days:"Days",weeks:"Weeks"},yP={minutes:oo,hours:60*oo,days:24*60*oo,weeks:7*24*60*oo},vP=({open:e,onClose:t,nowMs:n=Date.now(),edit:o=null})=>{const r=o!==null,[s,a]=p.useState("new"),[i,l]=p.useState(null),[c,d]=p.useState(""),[m,y]=p.useState("in-an-hour"),[h,g]=p.useState(null),[v,f]=p.useState("never"),[b,C]=p.useState("1"),[w,x]=p.useState("hours"),[k,P]=p.useState("never"),[S,I]=p.useState(null),[T,O]=p.useState(2),[N,M]=p.useState(()=>crypto.randomUUID()),L=cm(e),A=Dl(),F=A.refetch;p.useEffect(()=>{e&&F()},[e,F]);const E=um(),B=dm(),G=qi(j=>j.cwd),$=E.isPending||B.isPending,Z=p.useId();p.useEffect(()=>{e&&(a("new"),l(null),d(o?.message??""),y(r?"keep":"in-an-hour"),g(null),f(r?"keep":"never"),C("1"),x("hours"),P(r?"keep":"never"),I(null),O(2),M(crypto.randomUUID()))},[e,o,r]);const W=p.useMemo(()=>{const j=new Date(n);return j.setHours(mP,0,0,0),j.getTime()>n+oo?j:null},[n]),ne=p.useMemo(()=>{const j=new Date(n);return j.setDate(j.getDate()+1),j.setHours(hP,0,0,0),j},[n]),te=p.useMemo(()=>[...L.data??[]].sort((j,H)=>H.mtime-j.mtime),[L.data]),se=te.find(j=>j.id===i),U=A.data?.entries.find(j=>j.session_id===i)?.schedules.length??0,oe=sm(b),ce=v==="every"&&oe!==null,fe=ce&&am(oe),re=ce&&oe!==null?oe*yP[w]:null,Q=!r&&s==="existing"&&!i,_=m==="pick"&&!h,q=k==="date"&&!S,X=k==="runs"&&T==="",K=Zf({message:c,needsConversation:Q,hasConversationChoices:te.length>0,repeatIntervalNotWhole:v==="every"&&oe===null,repeatMs:re,endsRuns:k==="runs"&&T!==""?T:null,existingWakeCount:U,alreadyRun:o?.wake.fired_count??0}),ue=K.invalid||_||q||X,J=!r||c!==o.message||m!=="keep"||v!=="keep"||k!=="keep",Y=Qf(G),ee=()=>m==="keep"?null:m==="in-30-minutes"?{in:"30m"}:m==="in-an-hour"?{in:"1h"}:m==="tonight"?W?{at:W.toISOString()}:null:m==="tomorrow"?{at:ne.toISOString()}:h?{at:h}:null,ie=async()=>{if(ue)return;const j=ee();try{if(o){await B.mutateAsync({sessionId:o.sessionId,wakeId:o.wakeId,message:c.trim(),...j?{firstRun:j}:{},...fe&&oe!==null?{every:ka(oe,w)}:{},...v==="every"&&k==="date"&&S?{until:S}:{},...v==="every"&&k==="runs"&&T!==""?{limit:T}:{}}),kn(`Wake updated — ${Ho(c.trim())}`),t();return}const H=await E.mutateAsync({requestId:N,...i?{sessionId:i}:{cwd:G},message:c.trim(),firstRun:j??{in:"1h"},...fe&&oe!==null?{every:ka(oe,w)}:{},...v==="every"&&k==="date"&&S?{until:S}:{},...v==="every"&&k==="runs"&&T!==""?{limit:T}:{}});kn(H.index_written?`Scheduled task created — ${Ho(c.trim())}`:`Scheduled task created — ${Ho(c.trim())}. The list may lag until the index catches up.`),t()}catch(H){Sn(H instanceof Error?`${r?"Could not save the wake":"Could not create the scheduled task"}: ${H.message}`:r?"Could not save the wake.":"Could not create the scheduled task.")}},z=u.jsxs(u.Fragment,{children:[u.jsx(zi,{onClick:t,disabled:$,children:"Cancel"}),u.jsx(Hi,{onClick:ie,disabled:ue||$||!J,startIcon:u.jsx(Ar,{size:18}),children:r?$?"Saving":"Save":$?"Creating":"Create"})]});return u.jsxs(Ui,{open:e,onClose:t,title:r?"Edit wake":"New scheduled task",actions:z,maxWidth:"sm",fullWidth:!0,dataTourTag:"create-scheduled-task-dialog",children:[o&&u.jsxs("p",{className:"text-body-sm text-ink-dim",children:[o.conversationName," · wake ",o.position," of ",o.count]}),u.jsxs("div",{className:"flex flex-col gap-4",children:[u.jsxs("div",{className:"flex flex-col gap-1.5",children:[u.jsxs(gt,{htmlFor:`${Z}-prompt`,children:["Prompt ",u.jsx("span",{className:"text-danger",children:"*"})]}),u.jsx(Ki,{id:`${Z}-prompt`,name:"prompt",value:c,onChange:j=>d(j.target.value),rows:3,disabled:$,placeholder:"Send me an email with a detailed world news breakdown"}),u.jsx("p",{className:"text-body-sm text-ink-muted",children:"This is the message the conversation receives when it wakes up."}),K.prompt&&u.jsx("p",{className:"text-meta text-danger",children:K.prompt})]}),!r&&u.jsxs("fieldset",{className:"m-0 flex flex-col gap-1.5 border-0 p-0",children:[u.jsx("legend",{className:"sr-only",children:"Run in"}),u.jsx(gt,{children:"Run in"}),u.jsx("div",{className:"flex w-fit gap-0.5 rounded-md bg-sunken p-0.5",children:[["new","A new conversation"],["existing","An existing conversation"]].map(([j,H])=>u.jsx(bt,{variant:"ghost",size:"sm","aria-pressed":s===j,onClick:()=>a(j),disabled:$,className:je(s===j&&"bg-surface text-ink hover:bg-surface"),children:H},j))})]}),!r&&s==="existing"&&u.jsxs("div",{className:"flex flex-col gap-1.5",children:[u.jsx(gt,{htmlFor:`${Z}-conversation`,children:"Conversation"}),u.jsxs(bn,{value:i??"",onValueChange:l,disabled:$,children:[u.jsx(yn,{id:`${Z}-conversation`,children:u.jsx(vn,{placeholder:"Pick a conversation"})}),u.jsx(xn,{children:te.map(j=>u.jsxs(Je,{value:j.id,textValue:j.name||j.id.slice(0,8),children:[j.name||`Untitled ${j.id.slice(0,8)}`,u.jsx("span",{className:"pl-2 text-ink-dim",children:Uu(Math.max(0,n-j.mtime*1e3))})]},j.id))})]}),L.isLoading&&u.jsx("p",{className:"text-meta text-ink-dim",children:"Loading conversations…"}),L.error&&u.jsxs("p",{className:"text-meta text-danger",children:["Could not read your conversations: ",L.error.message]}),!L.isLoading&&!L.error&&te.length===0&&u.jsxs("p",{className:"text-meta text-ink-dim",children:["No conversations yet — start one in chat, or choose"," ",u.jsx("em",{children:"A new conversation"}),"."]})]}),!r&&s==="new"&&u.jsxs("p",{className:"text-body-sm text-ink-dim",children:["Starts in ",Y," with your default model."]}),!r&&s==="existing"&&se&&u.jsxs("p",{className:"text-body-sm text-ink-dim",children:["Runs in ",se.name,", as a turn in that conversation."]}),!r&&K.conversation&&u.jsx("p",{className:"text-meta text-danger",children:K.conversation}),u.jsxs("div",{className:"flex flex-col gap-1.5",children:[u.jsx(gt,{htmlFor:`${Z}-first-run`,children:"First run"}),u.jsxs(bn,{value:m,onValueChange:j=>y(j),disabled:$,children:[u.jsx(yn,{id:`${Z}-first-run`,children:u.jsx(vn,{})}),u.jsxs(xn,{children:[r&&u.jsx(Je,{value:"keep",children:Hf(o.wake,n,o.parked)}),u.jsx(Je,{value:"in-an-hour",children:"In an hour"}),u.jsx(Je,{value:"in-30-minutes",children:"In 30 minutes"}),W&&u.jsx(Je,{value:"tonight",children:"Tonight at 8:00 PM"}),u.jsx(Je,{value:"tomorrow",children:"Tomorrow at 9:00 AM"}),u.jsx(Je,{value:"pick",children:"Pick a time…"})]})]}),m==="pick"&&u.jsx(rr,{label:"First run at",value:h,onChange:g,disabled:$})]}),u.jsxs("div",{className:"flex flex-col gap-1.5",children:[u.jsx(gt,{htmlFor:`${Z}-repeat`,children:"Repeat"}),u.jsxs(bn,{value:v,onValueChange:j=>f(j),disabled:$,children:[u.jsx(yn,{id:`${Z}-repeat`,children:u.jsx(vn,{})}),u.jsxs(xn,{children:[r&&u.jsx(Je,{value:"keep",children:Uf(o.wake)}),u.jsx(Je,{value:"never",children:"Don't repeat"}),u.jsx(Je,{value:"every",children:"Every"})]})]}),v==="every"&&u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(qo,{type:"number",min:1,step:1,"aria-label":"Repeat interval",className:"w-24",value:b,onChange:j=>C(j.target.value),disabled:$}),u.jsxs(bn,{value:w,onValueChange:j=>x(j),disabled:$,children:[u.jsx(yn,{"aria-label":"Repeat unit",className:"w-36",children:u.jsx(vn,{})}),u.jsx(xn,{children:gP.map(j=>u.jsx(Je,{value:j,children:bP[j]},j))})]})]}),K.repeatInterval&&u.jsx("p",{className:"text-meta text-danger",children:K.repeatInterval}),K.repeat&&u.jsx("p",{className:"text-meta text-danger",children:K.repeat})]}),(v==="every"||k!=="never")&&u.jsxs("div",{className:"flex flex-col gap-1.5",children:[u.jsx(gt,{htmlFor:`${Z}-ends`,children:"Ends"}),u.jsxs(bn,{value:k,onValueChange:j=>P(j),disabled:$,children:[u.jsx(yn,{id:`${Z}-ends`,children:u.jsx(vn,{})}),u.jsxs(xn,{children:[r&&u.jsx(Je,{value:"keep",children:Yf(o.wake,n)}),u.jsx(Je,{value:"never",children:"Never"}),u.jsx(Je,{value:"date",children:"On a date…"}),u.jsx(Je,{value:"runs",children:"After N runs"})]})]}),k==="date"&&u.jsx(rr,{label:"Last run",value:S,onChange:I,disabled:$}),k==="runs"&&u.jsx(qo,{type:"number",min:1,"aria-label":"Number of runs",className:"w-24",value:T,onChange:j=>O(j.target.value===""?"":Number.parseInt(j.target.value,10)),disabled:$}),K.ends&&u.jsx("p",{className:"text-meta text-danger",children:K.ends})]}),u.jsx("p",{className:"text-body-sm text-ink-dim",children:"If a tool needs approval, the wake parks and waits for you rather than acting on its own; a wait that runs out stops the turn without running the tool."}),r&&u.jsx("p",{className:"text-body-sm text-ink-dim",children:"A new first run moves the next wake to that time, and a new repeat carries on from it. Runs already made still count, and the wake keeps its place in the conversation."}),!r&&u.jsx("p",{className:"text-body-sm text-ink-dim",children:'It is usually quicker to ask an agent in chat — "send me the latest news at 8am every day" — and it will set this up for you.'})]})]})},ts=["pointer-events-none opacity-0","group-hover:pointer-events-auto group-hover:opacity-100","group-focus-within:pointer-events-auto group-focus-within:opacity-100"],Fi=({wake:e,onCancel:t,onEdit:n})=>u.jsx(qu,{row:e,trailingClause:e.ranLabel||void 0,action:u.jsxs(u.Fragment,{children:[u.jsx(qt,{content:"Edit wake",children:u.jsx(bt,{variant:"ghost",size:"icon-sm","aria-label":"Edit wake",onClick:n,className:je(...ts,"group-hover/wake:pointer-events-auto group-hover/wake:opacity-100","group-focus-within/wake:pointer-events-auto group-focus-within/wake:opacity-100"),children:u.jsx(Yi,{})})}),u.jsx(qt,{content:"Cancel wake",children:u.jsx(bt,{variant:"ghost",size:"icon-sm","aria-label":"Cancel wake",onClick:t,className:je(...ts,"group-hover/wake:pointer-events-auto group-hover/wake:opacity-100","group-focus-within/wake:pointer-events-auto group-focus-within/wake:opacity-100","hover:bg-danger-wash hover:text-danger"),children:u.jsx(sd,{})})})]})}),xP=({row:e,onOpen:t,onCancel:n,onEdit:o})=>{const[r,s]=p.useState(!1),a=e.wakes.slice(e.visibleWakes.length);return u.jsx("li",{"data-scheduled-task-row":e.sessionId,className:je("group border-hairline border-b px-4 py-3 last:border-b-0","transition-colors duration-fast ease-out-quart hover:bg-row-hover"),children:u.jsxs("div",{className:je("flex items-start gap-3"),children:[u.jsxs("div",{className:je("flex min-w-0 flex-1 flex-col gap-1"),children:[u.jsxs("div",{className:je("flex min-w-0 items-baseline justify-between gap-2"),children:[u.jsx("span",{className:je("min-w-0 truncate text-body-sm text-ink"),title:e.cwd,children:e.name}),e.meta&&u.jsx("span",{className:je("shrink-0 text-ink-muted text-meta"),children:e.meta})]}),u.jsx("ul",{className:je("flex flex-col gap-1 pl-4"),children:e.visibleWakes.map(i=>u.jsx(Fi,{wake:i,onCancel:()=>n(e,i),onEdit:()=>o(e,i)},i.id))}),a.length>0&&u.jsx(Yu,{summary:r?"Show fewer":zf(a.length),onOpenChange:s,className:je("pl-4"),triggerClassName:je("text-ink-muted hover:text-ink"),children:u.jsx("ul",{className:je("flex flex-col gap-1"),children:a.map(i=>u.jsx(Fi,{wake:i,onCancel:()=>n(e,i),onEdit:()=>o(e,i)},i.id))})})]}),u.jsx("div",{className:je("flex shrink-0 items-center gap-0.5",...ts),children:u.jsx(qt,{content:"Open conversation",children:u.jsx(bt,{variant:"ghost",size:"icon-sm","aria-label":"Open conversation",onClick:()=>t(e.sessionId),children:u.jsx(md,{})})})})]})})},RP=({nowMs:e=Date.now()})=>{const t=Ku(),[n,o]=p.useState(null),[r,s]=p.useState(null),[a,i]=p.useState(null),l=Dl(),c=_n(),d=()=>{l.refetch(),Ff(c)},m=Nf(),y=pm(),h=Af(),g=$f(),v=m.data?.result?.schedules??[],f=l.data?.supervisor,b=f?.supported===!0&&f.running===!0&&f.verifiable!==!1,C=nm(l.data?.entries,e,{dueInstants:b}),w=T=>{qi.getState().openSession(T).then(O=>{O&&t(`/chat/${T}`)})},x=async()=>{if(!r)return;const{row:T,wake:O}=r;try{const N=T.sessionId;await y.mutateAsync({sessionId:N,wakeId:O.id}),kn("Wake cancelled",{action:{label:"Open conversation",onClick:()=>w(N)}}),s(null)}catch(N){Sn(N instanceof Error?`Could not cancel the wake: ${N.message}`:"Could not cancel the wake.")}},k=async T=>{if(a)try{await h.mutateAsync({scheduleId:a.id,scheduleData:T}),kn("Schedule updated"),i(null)}catch(O){Sn(O instanceof Error?`Could not save the schedule: ${O.message}`:"Could not save the schedule.")}},P=async T=>{const O=v.find(N=>N.id===T);try{await g.mutateAsync({scheduleId:T,agentId:O?.agent_id}),kn("Schedule removed")}catch(N){Sn(N instanceof Error?`Could not remove the schedule: ${N.message}`:"Could not remove the schedule.")}},S=async T=>{try{await h.mutateAsync({scheduleId:T.id,scheduleData:{is_active:!T.is_active}}),kn(`Schedule ${T.is_active?"deactivated":"activated"}.`)}catch(O){Sn(O instanceof Error?`Could not toggle the schedule: ${O.message}`:"Could not toggle the schedule.")}},I=Xf({loading:l.isLoading,error:l.error!==null,readError:l.data?.read_error===!0,wakeRows:C.length,legacyLoading:m.isLoading,legacyRows:v.length});return u.jsxs("div",{className:"flex h-full flex-col gap-8 p-6",children:[u.jsx(Xu,{title:"Schedules",icon:_i,subtitle:"Work your conversations do on a schedule, repeating or once.",children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(bt,{variant:"secondary",size:"icon","aria-label":"Refresh scheduled tasks",title:"Refresh scheduled tasks",disabled:l.isFetching,onClick:d,"data-tour-tag":"refresh-schedules-button",children:u.jsx(Gu,{})}),u.jsxs(bt,{variant:"secondary",size:"md",onClick:()=>o({mode:"create"}),"data-tour-tag":"create-schedule-button",children:[u.jsx(Ar,{}),"New scheduled task"]})]})}),u.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto rounded-md bg-surface",children:[l.isLoading&&u.jsx("div",{className:"flex justify-center py-16",children:u.jsx(ls,{label:"Loading scheduled tasks"})}),l.error&&u.jsxs("div",{className:"flex flex-col items-start gap-2 border-hairline border-b p-4",children:[u.jsx("p",{className:"text-body text-ink",children:"Could not load scheduled tasks."}),u.jsx("p",{className:"text-body-sm text-ink-muted",children:l.error.message}),(C.length>0||v.length>0)&&u.jsx("p",{className:"text-body-sm text-ink-muted",children:Gf}),u.jsx(bt,{variant:"secondary",size:"sm",onClick:d,children:"Try again"})]}),!l.isLoading&&l.data?.read_error&&u.jsxs("div",{className:"flex flex-col items-start gap-2 border-hairline border-b p-4",children:[u.jsx(ta,{variant:"warning",children:"Could not read this machine's scheduled tasks, so the list below may be incomplete."}),u.jsx(bt,{variant:"secondary",size:"sm",onClick:d,children:"Try again"})]}),!l.isLoading&&f&&!b&&u.jsxs("div",{className:"border-hairline border-b p-4",children:[u.jsx(ta,{variant:"warning",children:qf(f)}),f.detail&&u.jsx("p",{className:"mt-2 font-mono text-meta text-ink-dim",children:f.detail})]}),I&&u.jsxs("div",{className:"flex flex-col items-center gap-2 px-6 py-16 text-center",children:[u.jsx("p",{className:"text-heading text-ink",children:"No scheduled tasks yet"}),u.jsx("p",{className:"max-w-100 text-body-sm text-ink-muted",children:"Ask an agent in chat to do something on a regular basis — “send me the news at 8am every day” — and it will appear here. You can also set one up by hand."}),u.jsxs(bt,{variant:"secondary",size:"sm",onClick:()=>o({mode:"create"}),className:"mt-2",children:[u.jsx(Ar,{}),"New scheduled task"]})]}),C.length>0&&u.jsx("ul",{className:"flex flex-col",children:C.map(T=>u.jsx(xP,{row:T,onOpen:w,onCancel:(O,N)=>s({row:O,wake:N}),onEdit:(O,N)=>o({mode:"edit",sessionId:O.sessionId,wakeId:N.id,message:N.message,conversationName:O.name,position:N.position,count:O.wakes.length,wake:N.source,parked:O.parked})},T.sessionId))}),(v.length>0||m.error)&&u.jsxs("section",{className:"border-hairline border-t bg-sunken",children:[u.jsxs("div",{className:"flex flex-col gap-1 px-4 py-3",children:[u.jsx("h2",{className:"text-heading text-ink",children:"Legacy schedules"}),u.jsx("p",{className:"max-w-150 text-body-sm text-ink-muted",children:"These run on the older agent-schedule engine. New scheduled tasks are created as wakes, in a conversation."}),m.error&&u.jsxs("p",{className:"text-body-sm text-danger",children:["Could not load legacy schedules. ",m.error.message]})]}),v.map(T=>u.jsx(fP,{schedule:T,nowMs:e,onEdit:()=>i(T),onDelete:P,onToggleActive:S},T.id))]}),!l.isLoading&&l.data?.truncated&&u.jsxs("p",{className:"border-hairline border-t px-4 py-3 text-body-sm text-ink-dim",children:["Showing ",l.data.entries.length," of ",l.data.total," ","conversations with wakes."]}),(C.length>0||v.length>0)&&u.jsxs("p",{className:"border-hairline border-t px-4 py-3 text-body-sm text-ink-dim",children:[b?"Wakes fire whether or not this window is open. ":"",Kf]})]}),u.jsx(vP,{open:n!==null,onClose:()=>o(null),nowMs:e,edit:n?.mode==="edit"?n:null}),u.jsx(uP,{open:a!==null,onClose:()=>i(null),onSubmit:T=>k(T),initialData:a}),u.jsx(Qu,{open:r!==null,title:"Cancel this wake?",message:r?`“${Ho(r.wake.message)}” will not fire again. The conversation stays.`:"",confirmText:"Cancel wake",cancelText:"Keep",isDangerous:!0,onConfirm:()=>void x(),onCancel:()=>s(null)})]})};export{RP as SchedulesPage};
|