local-operator-ui 0.42.2 → 0.42.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/main/index.js +2344 -173
- package/out/preload/browser-approvals-overlay.js +15 -0
- package/out/preload/index.js +45 -1
- package/out/renderer/assets/{_basePickBy-BA9uepHv.js → _basePickBy-CvLnUv7q.js} +1 -1
- package/out/renderer/assets/{_baseUniq-CVACH15m.js → _baseUniq-BKrt6A4N.js} +1 -1
- package/out/renderer/assets/{agent-details-page-xNTNJ7kP.js → agent-details-page-BWSojjKJ.js} +2 -2
- package/out/renderer/assets/{agent-hub-page-B-zE3Ln0.js → agent-hub-page-aubDNr6m.js} +1 -1
- package/out/renderer/assets/agents-page-DeOCoJow.js +7 -0
- package/out/renderer/assets/{approvalsOverlay-BBr6f98F.css → approvalsOverlay-CX3DxhSv.css} +1 -1
- package/out/renderer/assets/approvalsOverlay-jdsSQYbC.js +1 -0
- package/out/renderer/assets/{arc-DYIy54Kn.js → arc-Bo9HqcA4.js} +1 -1
- package/out/renderer/assets/{architectureDiagram-IEHRJDOE-CmfaKw-J.js → architectureDiagram-IEHRJDOE-CjpgkGSs.js} +1 -1
- package/out/renderer/assets/{blockDiagram-JOT3LUYC-bQf90tJr.js → blockDiagram-JOT3LUYC-CkF9oOcr.js} +1 -1
- package/out/renderer/assets/{book-open-iGajLTwQ.js → book-open-CPvwVqAp.js} +1 -1
- package/out/renderer/assets/browser-page-DUwB_Shx.js +1 -0
- package/out/renderer/assets/{browser-webauthn-prompt-DX5l4JNA.js → browser-webauthn-prompt-D90b-ibP.js} +1 -1
- package/out/renderer/assets/{building-2-bjja6JTC.js → building-2-CTbbzJRN.js} +1 -1
- package/out/renderer/assets/{c4Diagram-VJAJSXHY-BxIFIYVW.js → c4Diagram-VJAJSXHY-Br-J2zii.js} +1 -1
- package/out/renderer/assets/channel-bs4gvJO_.js +1 -0
- package/out/renderer/assets/{chunk-4BMEZGHF-C2LQ_mlD.js → chunk-4BMEZGHF-Cch4oIqI.js} +1 -1
- package/out/renderer/assets/{chunk-A2AXSNBT-BKH53MbC.js → chunk-A2AXSNBT-BpTLsrEt.js} +1 -1
- package/out/renderer/assets/{chunk-AEK57VVT-CuB5dlAL.js → chunk-AEK57VVT-BA_p-1wW.js} +1 -1
- package/out/renderer/assets/{chunk-D6G4REZN-CECeg3Wn.js → chunk-D6G4REZN-C85KCEHq.js} +1 -1
- package/out/renderer/assets/{chunk-RZ5BOZE2-D-zkJWYc.js → chunk-RZ5BOZE2-Y0y4RocF.js} +1 -1
- package/out/renderer/assets/{chunk-XZIHB7SX-DstteBuH.js → chunk-XZIHB7SX-DK_cB1Vj.js} +1 -1
- package/out/renderer/assets/classDiagram-GIVACNV2-CEJVrd67.js +1 -0
- package/out/renderer/assets/classDiagram-v2-COTLJTTW-CEJVrd67.js +1 -0
- package/out/renderer/assets/clone-BAbNoxcV.js +1 -0
- package/out/renderer/assets/{console-mirror-gqAdwBWl.js → console-mirror-BiiClM8r.js} +1 -1
- package/out/renderer/assets/{consoleCapture-BQQVRcXT.js → consoleCapture-OAXBv_kp.js} +1 -1
- package/out/renderer/assets/{conversation-input-sync-grry80zS.js → conversation-input-sync-BXv32NfB.js} +253 -253
- package/out/renderer/assets/{dagre-OKDRZEBW-D6RBxeJd.js → dagre-OKDRZEBW-C9TMqwJP.js} +1 -1
- package/out/renderer/assets/{diagram-SSKATNLV--xUREIPn.js → diagram-SSKATNLV-SI8XWzeq.js} +1 -1
- package/out/renderer/assets/{diagram-VNBRO52H-BYjZ86BM.js → diagram-VNBRO52H-DnvHZL8L.js} +1 -1
- package/out/renderer/assets/{erDiagram-Q7BY3M3F-CmajcoOO.js → erDiagram-Q7BY3M3F-nWqxZ0l9.js} +1 -1
- package/out/renderer/assets/error-boundary-CqZRoe9S.js +126 -0
- package/out/renderer/assets/{flowDiagram-4HSFHLVR-CtQab7ap.js → flowDiagram-4HSFHLVR-DKJUboz2.js} +1 -1
- package/out/renderer/assets/{ganttDiagram-APWFNJXF-CuKez3d0.js → ganttDiagram-APWFNJXF-D0s8LZxz.js} +1 -1
- package/out/renderer/assets/{gitGraphDiagram-7IBYFJ6S-D9QOaWwN.js → gitGraphDiagram-7IBYFJ6S-DOu6eUhN.js} +1 -1
- package/out/renderer/assets/{graph-Ccifoj7G.js → graph-D4HJHitc.js} +1 -1
- package/out/renderer/assets/{hash-EZ0d40pW.js → hash-CzjTtP10.js} +1 -1
- package/out/renderer/assets/{heart-Bo3ZudoI.js → heart-B3mi-jou.js} +1 -1
- package/out/renderer/assets/{index-Dw4hyitu.js → index-CmbVW2m7.js} +1 -1
- package/out/renderer/assets/{index-CLJ4-1jd.js → index-D8glNEcT.js} +1 -1
- package/out/renderer/assets/index-UXcKfWo6.css +1 -0
- package/out/renderer/assets/index-wz2cjW5P.js +830 -0
- package/out/renderer/assets/infoDiagram-PH2N3AL5-DzTCSaMw.js +2 -0
- package/out/renderer/assets/{installer-B7DhTrnG.js → installer-DmYDl1Bg.js} +1 -1
- package/out/renderer/assets/{journeyDiagram-U35MCT3I-YTjOSo-b.js → journeyDiagram-U35MCT3I-BXdBmrLL.js} +1 -1
- package/out/renderer/assets/{kanban-definition-NDS4AKOZ-C1UmNEaT.js → kanban-definition-NDS4AKOZ-B-oT4qjy.js} +1 -1
- package/out/renderer/assets/{layout-CWPZ7noV.js → layout-C35xWGut.js} +1 -1
- package/out/renderer/assets/{legacy-agents-page-ikCownYN.js → legacy-agents-page-zQ2FJ-pr.js} +4 -4
- package/out/renderer/assets/library-page-CB9dDvmn.js +157 -0
- package/out/renderer/assets/{mermaid.core-B_nZt27J.js → mermaid.core-5QYeuhdV.js} +5 -5
- package/out/renderer/assets/mesh-page-SxvMrMpp.js +1 -0
- package/out/renderer/assets/messages-Cq_3N7VC.js +3 -0
- package/out/renderer/assets/{mindmap-definition-ALO5MXBD-D-Y3n0RT.js → mindmap-definition-ALO5MXBD-B-cLhV3I.js} +1 -1
- package/out/renderer/assets/{mini-BdCfujvn.js → mini-BH-IxQ6K.js} +1 -1
- package/out/renderer/assets/{notebook-pen-BvZPJ7Yv.js → notebook-pen-FphG2dMG.js} +1 -1
- package/out/renderer/assets/{org-access-C1u_2VVY.js → org-access-DVt3GFMX.js} +1 -1
- package/out/renderer/assets/{org-surface-gate-CyIC6H59.js → org-surface-gate-tHnRzD9A.js} +1 -1
- package/out/renderer/assets/{page-header-C9IFgiIB.js → page-header-B3bOo0UX.js} +1 -1
- package/out/renderer/assets/path-utils-BkJr3--b.js +58 -0
- package/out/renderer/assets/{pieDiagram-IB7DONF6-BJ2PZoWa.js → pieDiagram-IB7DONF6-CrHoOvO2.js} +1 -1
- package/out/renderer/assets/projects-page-ACh1mgoo.js +45 -0
- package/out/renderer/assets/{publication-validation-DAffiuLy.js → publication-validation-D2z_zWQT.js} +1 -1
- package/out/renderer/assets/{quadrantDiagram-7GDLP6J5-Dpr0N86G.js → quadrantDiagram-7GDLP6J5-DYDa1ECN.js} +1 -1
- package/out/renderer/assets/{radar-MK3ICKWK-CwLLK6fK.js → radar-MK3ICKWK-vDf2Es_C.js} +1 -1
- package/out/renderer/assets/{radient-auth-buttons-DN7K_uGZ.js → radient-auth-buttons-Di1zLV23.js} +1 -1
- package/out/renderer/assets/{requirementDiagram-KVF5MWMF-LI2fP6nJ.js → requirementDiagram-KVF5MWMF-ChyAHYwK.js} +1 -1
- package/out/renderer/assets/{sankeyDiagram-QLVOVGJD-uUOWgFO1.js → sankeyDiagram-QLVOVGJD-D9wd8zQP.js} +1 -1
- package/out/renderer/assets/{schedules-page-Cf1PQGDR.js → schedules-page-BA4nO5Tw.js} +2 -2
- package/out/renderer/assets/{sequenceDiagram-X6HHIX6F-DperbqVG.js → sequenceDiagram-X6HHIX6F-CBIVQtEP.js} +1 -1
- package/out/renderer/assets/{settings-page-CrnST8YF.js → settings-page-D5KhLQHE.js} +3 -3
- package/out/renderer/assets/{smartart-qEAWtDlk.js → smartart-58otsUWh.js} +1 -1
- package/out/renderer/assets/{stateDiagram-DGXRK772-RvRbNkSX.js → stateDiagram-DGXRK772-DxVyPUM2.js} +1 -1
- package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-BAggpoNG.js +1 -0
- package/out/renderer/assets/team-bridge-page-CJdJd9cs.js +16 -0
- package/out/renderer/assets/{timeline-definition-BDJGKUSR-CeQ3AsWj.js → timeline-definition-BDJGKUSR-DRQlSiWd.js} +1 -1
- package/out/renderer/assets/{use-download-agent-mutation-C_zDZ6-1.js → use-download-agent-mutation-BAzM19BL.js} +1 -1
- package/out/renderer/assets/{use-session-snapshot-BMDB4uZ0.js → use-session-snapshot-0k6Oot8j.js} +1 -1
- package/out/renderer/assets/{xychartDiagram-VJFVF3MP-C6-d6maF.js → xychartDiagram-VJFVF3MP-DbSrp_cQ.js} +1 -1
- package/out/renderer/browser-approvals-overlay.html +53 -15
- package/out/renderer/console-capture.html +6 -6
- package/out/renderer/index.html +8 -8
- package/out/renderer/installer.html +5 -5
- package/out/renderer/mini.html +8 -8
- package/package.json +3 -3
- package/out/renderer/assets/agents-page-BeZQ1S7f.js +0 -7
- package/out/renderer/assets/approvalsOverlay-BmSmF8Ga.js +0 -1
- package/out/renderer/assets/browser-page-B63Z8oE2.js +0 -1
- package/out/renderer/assets/channel-Blax8LQd.js +0 -1
- package/out/renderer/assets/classDiagram-GIVACNV2-DA1IQG_V.js +0 -1
- package/out/renderer/assets/classDiagram-v2-COTLJTTW-DA1IQG_V.js +0 -1
- package/out/renderer/assets/clone-mVVuLCMS.js +0 -1
- package/out/renderer/assets/error-boundary-DfTTKe65.js +0 -126
- package/out/renderer/assets/index-ByZv232u.css +0 -1
- package/out/renderer/assets/index-LBzSehKd.js +0 -830
- package/out/renderer/assets/infoDiagram-PH2N3AL5-DrTRSok5.js +0 -2
- package/out/renderer/assets/library-page-DBSSkZvn.js +0 -157
- package/out/renderer/assets/mesh-page-CgjL4HIw.js +0 -1
- package/out/renderer/assets/messages-Bswe4yCX.js +0 -3
- package/out/renderer/assets/path-utils-DC6z9Ymz.js +0 -58
- package/out/renderer/assets/projects-page-CwwrR-j7.js +0 -45
- package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-fK1yLl-v.js +0 -1
- package/out/renderer/assets/team-bridge-page-BgcLwc5M.js +0 -16
- /package/out/renderer/assets/{index-DXk6NfLu.js → index-DhltrflG.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as p,l as Ti,j as u,m as Ii,n as gu,o as Ys,h as Zr,f as ie,p as bu,b as Dt,q as ce,v as Re,w as qs,x as Ri,y as Jr,c as Le}from"./index-
|
|
1
|
+
import{r as p,l as Ti,j as u,m as Ii,n as gu,o as Ys,h as Zr,f as ie,p as bu,b as Dt,q as ce,v as Re,w as qs,x as Ri,y as Jr,c as Le}from"./index-DhltrflG.js";import{cX as yu,cY as vu,cZ as es,c_ as xu,c$ as wu,d0 as _i,d1 as Cu,d2 as ku,d3 as Su,d4 as Ei,d5 as Pu,d6 as Oi,d7 as Tt,d8 as yo,d9 as ts,da as Mu,db as Ct,dc as vo,dd as Fi,de as Ni,df as Du,cg as Tu,dg as Iu,S as Ru,s as Ai,dh as _u,di as $i,dj as Eu,dk as Ou,aL as _r,dl as Fu,dm as Nu,dn as Au,dp as $u,dq as ju,dr as Lu,aM as Vu,ds as Bu,dt as zu,cw as Hu,c2 as Wu,du as Uu,dv as Yu,dw as qu}from"./index-wz2cjW5P.js";import{h as ji,u as ns,q as Li,A as Ku,a as Gu,c as Qu}from"./path-utils-BkJr3--b.js";import{P as Xu}from"./page-header-B3bOo0UX.js";import{ai as _o,aj as Zu,l as Kt,B as yt,u as fn,S as os,a4 as Ks,L as bt,T as Vi,I as Wo,F as vn,G as xn,H as wn,J as Cn,K as et,M as Er,a5 as Ju,a6 as ed,x as td,a7 as nd,k as od,X as rd,A as Gs}from"./error-boundary-CqZRoe9S.js";import{t as B}from"./messages-Cq_3N7VC.js";import{a4 as nr,aq as Bi,dm as rs,dn as D,dp as sd,av as zi,aw as Hi,S as Wi,T as Pn,dq as ad,as as id,bn as ld,dr as cd,ds as ud,dt as dd,bT as Qs,du as pd,dv as fd,dw as md,dx as hd,dy as Xs,dz as gd,ar as Mn,dA as Lo,ax as bd,dB as yd,dC as vd,dD as xd,dE as wd}from"./conversation-input-sync-BXv32NfB.js";import{s as Or,g as Cd,b as Uo,c as Ui,d as Yi,e as kd,l as Fr,h as Sd,w as Zs,j as Pd,i as to,f as Md,k as Dd}from"./format-esAOn2VS.js";import{a as or,p as Js}from"./parseISO-BHJWTxrA.js";import{t as Ce,c as at,m as qi,a as Ki,n as rr,g as ss,k as Td,b as Gi,e as Qi}from"./en-US-CHJkXXr4.js";import"./console-mirror-BiiClM8r.js";var Id=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Rd=yu(function(e){return Id.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),_d=Rd,Ed=function(t){return t!=="theme"},ea=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?_d:Ed},ta=function(t,n,o){var r;if(n){var s=n.shouldForwardProp;r=t.__emotion_forwardProp&&s?function(a){return t.__emotion_forwardProp(a)&&s(a)}:s}return typeof r!="function"&&o&&(r=t.__emotion_forwardProp),r},Od=function(t){var n=t.cache,o=t.serialized,r=t.isStringTag;return Cu(n,o,r),ku(function(){return Su(n,o,r)}),null},Fd=function e(t,n){var o=t.__emotion_real===t,r=o&&t.__emotion_base||t,s,a;n!==void 0&&(s=n.label,a=n.target);var i=ta(t,n,o),l=i||ea(r),c=!l("as");return function(){var d=arguments,m=o&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(s!==void 0&&m.push("label:"+s+";"),d[0]==null||d[0].raw===void 0)m.push.apply(m,d);else{var y=d[0];m.push(y[0]);for(var g=d.length,h=1;h<g;h++)m.push(d[h],y[h])}var v=vu(function(f,b,C){var w=c&&f.as||r,x="",S=[],P=f;if(f.theme==null){P={};for(var k in f)P[k]=f[k];P.theme=p.useContext(xu)}typeof f.className=="string"?x=wu(b.registered,S,f.className):f.className!=null&&(x=f.className+" ");var R=_i(m.concat(S),b.registered,P);x+=b.key+"-"+R.name,a!==void 0&&(x+=" "+a);var _=c&&i===void 0?ea(w):l,O={};for(var $ in f)c&&$==="as"||_($)&&(O[$]=f[$]);return O.className=x,C&&(O.ref=C),p.createElement(p.Fragment,null,p.createElement(Od,{cache:b,serialized:R,isStringTag:typeof w=="string"}),p.createElement(w,O))});return v.displayName=s!==void 0?s:"Styled("+(typeof r=="string"?r:r.displayName||r.name||"Component")+")",v.defaultProps=t.defaultProps,v.__emotion_real=v,v.__emotion_base=r,v.__emotion_styles=m,v.__emotion_forwardProp=i,Object.defineProperty(v,"toString",{value:function(){return"."+a}}),v.withComponent=function(f,b){var C=e(f,es({},n,b,{shouldForwardProp:ta(v,b,!0)}));return C.apply(void 0,m)},v}},Nd=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],Nr=Fd.bind(null);Nd.forEach(function(e){Nr[e]=Nr(e)});/**
|
|
2
2
|
* @mui/styled-engine v6.4.11
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
@@ -112,4 +112,4 @@ import{r as p,l as Ti,j as u,m as Ii,n as gu,o as Ys,h as Zr,f as ie,p as bu,b a
|
|
|
112
112
|
`:null,Rb=e=>{const{classes:t,variant:n,color:o,disableShrink:r}=e,s={root:["root",n,`color${ce(o)}`],svg:["svg"],circle:["circle",`circle${ce(n)}`,r&&"circleDisableShrink"]};return Ee(s,Db,t)},_b=V("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${ce(n.color)}`]]}})(Be(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:Tb||{animation:`${Kr} 1.4s linear infinite`}},...Object.entries(e.palette).filter(ut()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),Eb=V("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),Ob=V("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${ce(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:Ib||{animation:`${Gr} 1.4s ease-in-out infinite`}}]}))),ic=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,g={...o,color:s,disableShrink:a,size:i,thickness:c,value:d,variant:m},h=Rb(g),v={},f={},b={};if(m==="determinate"){const C=2*Math.PI*((Ut-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(_b,{className:ie(h.root,r),style:{width:i,height:i,...f,...l},ownerState:g,ref:n,role:"progressbar",...b,...y,children:u.jsx(Eb,{className:h.svg,ownerState:g,viewBox:`${Ut/2} ${Ut/2} ${Ut} ${Ut}`,children:u.jsx(Ob,{className:h.circle,style:v,ownerState:g,cx:Ut,cy:Ut,r:(Ut-c)/2,fill:"none",strokeWidth:c})})})});function Fb(e){return _e("MuiButton",e)}const Zt=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"]),Nb=p.createContext({}),Ab=p.createContext(void 0),$b=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}${ce(t)}`,`size${ce(r)}`,`${s}Size${ce(r)}`,`color${ce(t)}`,n&&"disableElevation",o&&"fullWidth",a&&`loadingPosition${ce(i)}`],startIcon:["icon","startIcon",`iconSize${ce(r)}`],endIcon:["icon","endIcon",`iconSize${ce(r)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},d=Ee(c,Fb,l);return{...l,...d}},lc=[{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}}}],jb=V(Ln,{shouldForwardProp:e=>kt(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${ce(n.color)}`],t[`size${ce(n.size)}`],t[`${n.variant}Size${ce(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"},[`&.${Zt.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]},[`&.${Zt.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${Zt.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)",[`&.${Zt.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(ut()).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)`:Re(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})`:Re(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})`:Re(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})`:Re(e.palette.text.primary,e.palette.action.hoverOpacity),"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Re(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"},[`&.${Zt.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Zt.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}),[`&.${Zt.loading}`]:{color:"transparent"}}}]}})),Lb=V("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${ce(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}},...lc]})),Vb=V("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${ce(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}},...lc]})),Bb=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}}]})),Ya=V("span",{name:"MuiButton",slot:"LoadingIconPlaceholder",overridesResolver:(e,t)=>t.loadingIconPlaceholder})({display:"inline-block",width:"1em",height:"1em"}),Yt=p.forwardRef(function(t,n){const o=p.useContext(Nb),r=p.useContext(Ab),s=Oi(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:g=!1,endIcon:h,focusVisibleClassName:v,fullWidth:f=!1,id:b,loading:C=null,loadingIndicator:w,loadingPosition:x="center",size:S="medium",startIcon:P,type:k,variant:R="text",..._}=a,O=xo(b),$=w??u.jsx(ic,{"aria-labelledby":O,color:"inherit",size:16}),M={...a,color:l,component:c,disabled:m,disableElevation:y,disableFocusRipple:g,fullWidth:f,loading:C,loadingIndicator:$,loadingPosition:x,size:S,type:k,variant:R},A=$b(M),F=(P||C&&x==="start")&&u.jsx(Lb,{className:A.startIcon,ownerState:M,children:P||u.jsx(Ya,{className:A.loadingIconPlaceholder,ownerState:M})}),I=(h||C&&x==="end")&&u.jsx(Vb,{className:A.endIcon,ownerState:M,children:h||u.jsx(Ya,{className:A.loadingIconPlaceholder,ownerState:M})}),T=r||"",L=typeof C=="boolean"?u.jsx("span",{className:A.loadingWrapper,style:{display:"contents"},children:C&&u.jsx(Bb,{className:A.loadingIndicator,ownerState:M,children:$})}):null;return u.jsxs(jb,{ownerState:M,className:ie(o.className,A.root,d,T),component:c,disabled:m||C,focusRipple:!g,focusVisibleClassName:ie(A.focusVisible,v),ref:n,type:k,id:C?O:b,..._,classes:A,children:[F,x!=="end"&&L,i,x==="end"&&L,I]})});function zb(e){return _e("MuiDialogActions",e)}Se("MuiDialogActions",["root","spacing"]);const Hb=e=>{const{classes:t,disableSpacing:n}=e;return Ee({root:["root",!n&&"spacing"]},zb,t)},Wb=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}}}]}),Ub=p.forwardRef(function(t,n){const o=Fe({props:t,name:"MuiDialogActions"}),{className:r,disableSpacing:s=!1,...a}=o,i={...o,disableSpacing:s},l=Hb(i);return u.jsx(Wb,{className:ie(l.root,r),ownerState:i,ref:n,...a})}),Yb=["actions"],qb=V(Ub,{name:"MuiPickersLayout",slot:"ActionBar"})({});function Kb(e){const{actions:t}=e,n=he(e,Yb),o=ct(),{clearValue:r,setValueToToday:s,acceptValueChanges:a,cancelValueChanges:i,goToNextStep:l,hasNextStep:c}=mn();if(t==null||t.length===0)return null;const d=t?.map(m=>{switch(m){case"clear":return u.jsx(Yt,{onClick:r,children:o.clearButtonLabel},m);case"cancel":return u.jsx(Yt,{onClick:i,children:o.cancelButtonLabel},m);case"accept":return u.jsx(Yt,{onClick:a,children:o.okButtonLabel},m);case"today":return u.jsx(Yt,{onClick:s,children:o.todayButtonLabel},m);case"next":return u.jsx(Yt,{onClick:l,children:o.nextStepButtonLabel},m);case"nextOrAccept":return c?u.jsx(Yt,{onClick:l,children:o.nextStepButtonLabel},m):u.jsx(Yt,{onClick:a,children:o.okButtonLabel},m);default:return null}});return u.jsx(qb,E({},n,{children:d}))}const Gb=p.memo(Kb),ln=p.createContext({});function Qb(e){return _e("MuiList",e)}Se("MuiList",["root","padding","dense","subheader"]);const Xb=e=>{const{classes:t,disablePadding:n,dense:o,subheader:r}=e;return Ee({root:["root",!n&&"padding",o&&"dense",r&&"subheader"]},Qb,t)},Zb=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}}]}),cc=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},g=Xb(y);return u.jsx(ln.Provider,{value:m,children:u.jsxs(Zb,{as:a,className:ie(g.root,s),ref:n,ownerState:y,...d,children:[c,r]})})});function ho(e){return typeof e=="string"}function Jb(e){return _e("MuiListItem",e)}Se("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);const ey=Se("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function ty(e){return _e("MuiListItemSecondaryAction",e)}Se("MuiListItemSecondaryAction",["root","disableGutters"]);const ny=e=>{const{disableGutters:t,classes:n}=e;return Ee({root:["root",t&&"disableGutters"]},ty,n)},oy=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}}]}),uc=p.forwardRef(function(t,n){const o=Fe({props:t,name:"MuiListItemSecondaryAction"}),{className:r,...s}=o,a=p.useContext(ln),i={...o,disableGutters:a.disableGutters},l=ny(i);return u.jsx(oy,{className:ie(l.root,r),ownerState:i,ref:n,...s})});uc.muiName="ListItemSecondaryAction";const ry=(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]},sy=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"]},Jb,n)},ay=V("div",{name:"MuiListItem",slot:"Root",overridesResolver:ry})(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:{[`& > .${ey.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}}]}))),iy=V("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),ly=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:g=!1,disableGutters:h=!1,disablePadding:v=!1,divider:f=!1,secondaryAction:b,slotProps:C={},slots:w={},...x}=o,S=p.useContext(ln),P=p.useMemo(()=>({dense:g||S.dense||!1,alignItems:r,disableGutters:h}),[r,S.dense,g,h]),k=p.useRef(null),R=p.Children.toArray(s),_=R.length&&Bo(R[R.length-1],["ListItemSecondaryAction"]),O={...o,alignItems:r,dense:P.dense,disableGutters:h,disablePadding:v,divider:f,hasSecondaryAction:_},$=sy(O),M=Je(k,n),A=w.root||l.Root||ay,F=C.root||c.root||{},I={className:ie($.root,F.className,a),...x};let T=i||"li";return _?(T=!I.component&&!i?"div":T,d==="li"&&(T==="li"?T="div":I.component==="li"&&(I.component="div")),u.jsx(ln.Provider,{value:P,children:u.jsxs(iy,{as:d,className:ie($.container,m),ref:M,ownerState:O,...y,children:[u.jsx(A,{...F,...!ho(A)&&{as:T,ownerState:{...O,...F.ownerState}},...I,children:R}),R.pop()]})})):u.jsx(ln.Provider,{value:P,children:u.jsxs(A,{...F,as:T,ref:M,...!ho(A)&&{ownerState:{...O,...F.ownerState}},...I,children:[R,b&&u.jsx(uc,{children:b})]})})}),cy=$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 uy(e){return _e("MuiChip",e)}const Pe=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${ce(o)}`,`color${ce(r)}`,i&&"clickable",i&&`clickableColor${ce(r)}`,a&&"deletable",a&&`deletableColor${ce(r)}`,`${l}${ce(r)}`],label:["label",`label${ce(o)}`],avatar:["avatar",`avatar${ce(o)}`,`avatarColor${ce(r)}`],icon:["icon",`icon${ce(o)}`,`iconColor${ce(s)}`],deleteIcon:["deleteIcon",`deleteIcon${ce(o)}`,`deleteIconColor${ce(r)}`,`deleteIcon${ce(l)}Color${ce(r)}`]};return Ee(c,uy,t)},py=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[{[`& .${Pe.avatar}`]:t.avatar},{[`& .${Pe.avatar}`]:t[`avatar${ce(i)}`]},{[`& .${Pe.avatar}`]:t[`avatarColor${ce(o)}`]},{[`& .${Pe.icon}`]:t.icon},{[`& .${Pe.icon}`]:t[`icon${ce(i)}`]},{[`& .${Pe.icon}`]:t[`iconColor${ce(r)}`]},{[`& .${Pe.deleteIcon}`]:t.deleteIcon},{[`& .${Pe.deleteIcon}`]:t[`deleteIcon${ce(i)}`]},{[`& .${Pe.deleteIcon}`]:t[`deleteIconColor${ce(o)}`]},{[`& .${Pe.deleteIcon}`]:t[`deleteIcon${ce(l)}Color${ce(o)}`]},t.root,t[`size${ce(i)}`],t[`color${ce(o)}`],s&&t.clickable,s&&o!=="default"&&t[`clickableColor${ce(o)})`],a&&t.deletable,a&&o!=="default"&&t[`deletableColor${ce(o)}`],t[l],t[`${l}${ce(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",[`&.${Pe.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${Pe.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${Pe.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${Pe.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${Pe.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${Pe.icon}`]:{marginLeft:5,marginRight:-6},[`& .${Pe.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:Re(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)`:Re(e.palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${Pe.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${Pe.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(ut(["contrastText"])).map(([n])=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText,[`& .${Pe.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[n].contrastTextChannel} / 0.7)`:Re(e.palette[n].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].contrastText}}}})),{props:n=>n.iconColor===n.color,style:{[`& .${Pe.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:n=>n.iconColor===n.color&&n.color!=="default",style:{[`& .${Pe.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${Pe.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Re(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}},...Object.entries(e.palette).filter(ut(["dark"])).map(([n])=>({props:{color:n,onDelete:!0},style:{[`&.${Pe.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}))`:Re(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${Pe.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Re(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter(ut(["dark"])).map(([n])=>({props:{color:n,clickable:!0},style:{[`&:hover, &.${Pe.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]}`,[`&.${Pe.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Pe.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${Pe.avatar}`]:{marginLeft:4},[`& .${Pe.avatarSmall}`]:{marginLeft:2},[`& .${Pe.icon}`]:{marginLeft:4},[`& .${Pe.iconSmall}`]:{marginLeft:2},[`& .${Pe.deleteIcon}`]:{marginRight:5},[`& .${Pe.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter(ut()).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)`:Re(e.palette[n].main,.7)}`,[`&.${Pe.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[n].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Re(e.palette[n].main,e.palette.action.hoverOpacity)},[`&.${Pe.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[n].mainChannel} / ${e.vars.palette.action.focusOpacity})`:Re(e.palette[n].main,e.palette.action.focusOpacity)},[`& .${Pe.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[n].mainChannel} / 0.7)`:Re(e.palette[n].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].main}}}}))]}})),fy=V("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:o}=n;return[t.label,t[`label${ce(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 qa(e){return e.key==="Backspace"||e.key==="Delete"}const my=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:g,onDelete:h,onKeyDown:v,onKeyUp:f,size:b="medium",variant:C="filled",tabIndex:w,skipFocusWhenDisabled:x=!1,...S}=o,P=p.useRef(null),k=Je(P,n),R=N=>{N.stopPropagation(),h&&h(N)},_=N=>{N.currentTarget===N.target&&qa(N)&&N.preventDefault(),v&&v(N)},O=N=>{N.currentTarget===N.target&&h&&qa(N)&&h(N),f&&f(N)},$=a!==!1&&g?!0:a,M=$||h?Ln:l||"div",A={...o,component:M,disabled:d,size:b,color:i,iconColor:p.isValidElement(m)&&m.props.color||i,onDelete:!!h,clickable:$,variant:C},F=dy(A),I=M===Ln?{component:l||"div",focusVisibleClassName:F.focusVisible,...h&&{disableRipple:!0}}:{};let T=null;h&&(T=c&&p.isValidElement(c)?p.cloneElement(c,{className:ie(c.props.className,F.deleteIcon),onClick:R}):u.jsx(cy,{className:ie(F.deleteIcon),onClick:R}));let L=null;r&&p.isValidElement(r)&&(L=p.cloneElement(r,{className:ie(F.avatar,r.props.className)}));let Q=null;return m&&p.isValidElement(m)&&(Q=p.cloneElement(m,{className:ie(F.icon,m.props.className)})),u.jsxs(py,{as:M,className:ie(F.root,s),disabled:$&&d?!0:void 0,onClick:g,onKeyDown:_,onKeyUp:O,ref:k,tabIndex:x&&d?-1:w,ownerState:A,...I,...S,children:[L||Q,u.jsx(fy,{className:ie(F.label),ownerState:A,children:y}),T]})}),go=36,pr=2,fr=320,hy=280,Rs=336,dc=232,gy=48,by=["items","changeImportance"],yy=["getValue"],vy=V(cc,{name:"MuiPickersLayout",slot:"Shortcuts"})({});function xy(e){const{items:t,changeImportance:n="accept"}=e,o=he(e,by),{setValue:r}=dh(),s=Km();if(t==null||t.length===0)return null;const a=t.map(i=>{let{getValue:l}=i,c=he(i,yy);const d=l({isValid:s});return E({},c,{label:c.label,onClick:()=>{r(d,{changeImportance:n,shortcut:c})},disabled:!s(d)})});return u.jsx(vy,E({dense:!0,sx:[{maxHeight:Rs,maxWidth:200,overflow:"auto"},...Array.isArray(o.sx)?o.sx:[o.sx]]},o,{children:a.map(i=>u.jsx(ly,{children:u.jsx(my,E({},i))},i.id??i.label))}))}const wy=["ownerState"];function Cy(e){return e.view!==null}const ky=(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"]},ac,e)},Sy=e=>{const{ownerState:t,defaultActionBarActions:n}=We(),{view:o}=mn(),r=Ct(),{children:s,slots:a,slotProps:i,classes:l}=e,c=p.useMemo(()=>E({},t,{layoutDirection:r?"rtl":"ltr"}),[t,r]),d=ky(l,c),m=a?.actionBar??Gb,y=Ae({elementType:m,externalSlotProps:i?.actionBar,additionalProps:{actions:n},className:d.actionBar,ownerState:c}),g=he(y,wy),h=u.jsx(m,E({},g)),v=a?.toolbar,f=Ae({elementType:v,externalSlotProps:i?.toolbar,className:d.toolbar,ownerState:c}),b=Cy(f)&&v?u.jsx(v,E({},f)):null,C=s,w=a?.tabs,x=o&&w?u.jsx(w,E({className:d.tabs},i?.tabs)):null,S=a?.shortcuts??xy,P=Ae({elementType:S,externalSlotProps:i?.shortcuts,className:d.shortcuts,ownerState:c}),k=o&&S?u.jsx(S,E({},P)):null;return{toolbar:b,content:C,tabs:x,actionBar:h,shortcuts:k,ownerState:c}},Py=(e,t)=>{const{pickerOrientation:n}=t;return Oe({root:["root",n==="landscape"&&"landscape"],contentWrapper:["contentWrapper"]},ac,e)},My=V("div",{name:"MuiPickersLayout",slot:"Root"})({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${Xt.actionBar}`]:{gridColumn:"1 / 4",gridRow:3},variants:[{props:{pickerOrientation:"landscape"},style:{[`& .${Xt.toolbar}`]:{gridColumn:1,gridRow:"2 / 3"},[`.${Xt.shortcuts}`]:{gridColumn:"2 / 4",gridRow:1}}},{props:{pickerOrientation:"landscape",layoutDirection:"rtl"},style:{[`& .${Xt.toolbar}`]:{gridColumn:3}}},{props:{pickerOrientation:"portrait"},style:{[`& .${Xt.toolbar}`]:{gridColumn:"2 / 4",gridRow:1},[`& .${Xt.shortcuts}`]:{gridColumn:1,gridRow:"2 / 3"}}},{props:{pickerOrientation:"portrait",layoutDirection:"rtl"},style:{[`& .${Xt.shortcuts}`]:{gridColumn:3}}}]}),Dy=V("div",{name:"MuiPickersLayout",slot:"ContentWrapper"})({gridColumn:"2 / 4",gridRow:2,display:"flex",flexDirection:"column"}),pc=p.forwardRef(function(t,n){const o=Te({props:t,name:"MuiPickersLayout"}),{toolbar:r,content:s,tabs:a,actionBar:i,shortcuts:l,ownerState:c}=Sy(o),{orientation:d,variant:m}=mn(),{sx:y,className:g,classes:h}=o,v=Py(h,c);return u.jsxs(My,{ref:n,sx:y,className:ie(v.root,g),ownerState:c,children:[d==="landscape"?l:r,d==="landscape"?r:l,u.jsx(Dy,{className:v.contentWrapper,ownerState:c,children:m==="desktop"?u.jsxs(p.Fragment,{children:[s,a]}):u.jsxs(p.Fragment,{children:[a,s]})}),i]})});function Oo(e){return parseInt(e,10)||0}const Ty={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function Iy(e){for(const t in e)return!1;return!0}function Ka(e){return Iy(e)||e.outerHeightStyle===0&&!e.overflowing}const Ry=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=Je(n,d),y=p.useRef(null),g=p.useRef(null),h=p.useCallback(()=>{const w=d.current,x=g.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)===`
|
|
113
113
|
`&&(x.value+=" ");const k=P.boxSizing,R=Oo(P.paddingBottom)+Oo(P.paddingTop),_=Oo(P.borderBottomWidth)+Oo(P.borderTopWidth),O=x.scrollHeight;x.value="x";const $=x.scrollHeight;let M=O;s&&(M=Math.max(Number(s)*$,M)),r&&(M=Math.min(Number(r)*$,M)),M=Math.max(M,$);const A=M+(k==="border-box"?R+_:0),F=Math.abs(M-O)<=1;return{outerHeightStyle:A,overflowing:F}},[r,s,t.placeholder]),v=sn(()=>{const w=d.current,x=h();if(!w||!x||Ka(x))return!1;const S=x.outerHeightStyle;return y.current!=null&&y.current!==S}),f=p.useCallback(()=>{const w=d.current,x=h();if(!w||!x||Ka(x))return;const S=x.outerHeightStyle;y.current!==S&&(y.current=S,w.style.height=`${S}px`),w.style.overflow=x.overflowing?"hidden":""},[h]),b=p.useRef(-1);Tt(()=>{const w=nl(f),x=d?.current;if(!x)return;const S=Vt(x);S.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),S.removeEventListener("resize",w),P&&P.disconnect()}},[h,f,v]),Tt(()=>{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:g,tabIndex:-1,style:{...Ty.shadow,...a,paddingTop:0,paddingBottom:0}})]})});function Wn({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 mr=p.createContext(void 0);function Ht(){return p.useContext(mr)}function Ga(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function er(e,t=!1){return e&&(Ga(e.value)&&e.value!==""||t&&Ga(e.defaultValue)&&e.defaultValue!=="")}function _y(e){return e.startAdornment}function Ey(e){return _e("MuiInputBase",e)}const Vn=Se("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var Qa;const hr=(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${ce(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},gr=(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]},Oy=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:g,type:h}=e,v={root:["root",`color${ce(n)}`,o&&"disabled",r&&"error",l&&"fullWidth",a&&"focused",i&&"formControl",y&&y!=="medium"&&`size${ce(y)}`,d&&"multiline",g&&"adornedStart",s&&"adornedEnd",c&&"hiddenLabel",m&&"readOnly"],input:["input",o&&"disabled",h==="search"&&"inputTypeSearch",d&&"inputMultiline",y==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",g&&"inputAdornedStart",s&&"inputAdornedEnd",m&&"readOnly"]};return Ee(v,Ey,t)},br=V("div",{name:"MuiInputBase",slot:"Root",overridesResolver:hr})(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",[`&.${Vn.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%"}}]}))),yr=V("input",{name:"MuiInputBase",slot:"Input",overridesResolver:gr})(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] + .${Vn.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},[`&.${Vn.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"}}]}})),Xa=jm({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),_s=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:g,endAdornment:h,error:v,fullWidth:f=!1,id:b,inputComponent:C="input",inputProps:w={},inputRef:x,margin:S,maxRows:P,minRows:k,multiline:R=!1,name:_,onBlur:O,onChange:$,onClick:M,onFocus:A,onKeyDown:F,onKeyUp:I,placeholder:T,readOnly:L,renderSuffix:Q,rows:N,size:J,slotProps:z={},slots:oe={},startAdornment:ne,type:ae="text",value:Y,...re}=o,ue=w.value!=null?w.value:Y,{current:me}=p.useRef(ue!=null),se=p.useRef(),X=p.useCallback(ge=>{},[]),H=Je(se,x,w.ref,X),[K,Z]=p.useState(!1),G=Ht(),de=Wn({props:o,muiFormControl:G,states:["color","disabled","error","hiddenLabel","size","required","filled"]});de.focused=G?G.focused:K,p.useEffect(()=>{!G&&y&&K&&(Z(!1),O&&O())},[G,y,K,O]);const ee=G&&G.onFilled,q=G&&G.onEmpty,te=p.useCallback(ge=>{er(ge)?ee&&ee():q&&q()},[ee,q]);Tt(()=>{me&&te({value:ue})},[ue,te,me]);const le=ge=>{A&&A(ge),w.onFocus&&w.onFocus(ge),G&&G.onFocus?G.onFocus(ge):Z(!0)},W=ge=>{O&&O(ge),w.onBlur&&w.onBlur(ge),G&&G.onBlur?G.onBlur(ge):Z(!1)},j=(ge,...Ne)=>{if(!me){const Ye=ge.target||se.current;if(Ye==null)throw new Error(Ri(1));te({value:Ye.value})}w.onChange&&w.onChange(ge,...Ne),$&&$(ge,...Ne)};p.useEffect(()=>{te(se.current)},[]);const U=ge=>{se.current&&ge.currentTarget===ge.target&&se.current.focus(),M&&M(ge)};let be=C,ve=w;R&&be==="input"&&(N?ve={type:void 0,minRows:N,maxRows:N,...ve}:ve={type:void 0,maxRows:P,minRows:k,...ve},be=Ry);const je=ge=>{te(ge.animationName==="mui-auto-fill-cancel"?se.current:{value:"x"})};p.useEffect(()=>{G&&G.setAdornedStart(!!ne)},[G,ne]);const Me={...o,color:de.color||"primary",disabled:de.disabled,endAdornment:h,error:de.error,focused:de.focused,formControl:G,fullWidth:f,hiddenLabel:de.hiddenLabel,multiline:R,size:de.size,startAdornment:ne,type:ae},He=Oy(Me),Ke=oe.root||c.Root||br,ye=z.root||d.root||{},xe=oe.input||c.Input||yr;return ve={...ve,...z.input??d.input},u.jsxs(p.Fragment,{children:[!g&&typeof Xa=="function"&&(Qa||(Qa=u.jsx(Xa,{}))),u.jsxs(Ke,{...ye,ref:n,onClick:U,...re,...!ho(Ke)&&{ownerState:{...Me,...ye.ownerState}},className:ie(He.root,ye.className,i,L&&"MuiInputBase-readOnly"),children:[ne,u.jsx(mr.Provider,{value:null,children:u.jsx(xe,{"aria-invalid":de.error,"aria-describedby":r,autoComplete:s,autoFocus:a,defaultValue:m,disabled:de.disabled,id:b,onAnimationStart:je,name:_,placeholder:T,readOnly:L,required:de.required,rows:N,value:ue,onKeyDown:F,onKeyUp:I,type:ae,...ve,...!ho(xe)&&{as:be,ownerState:{...Me,...ve.ownerState}},ref:H,className:ie(He.input,ve.className,L&&"MuiInputBase-readOnly"),onBlur:W,onChange:j,onFocus:le})}),h,Q?Q({...de,startAdornment:ne}):null]})]})});function Fy(e){return _e("MuiInput",e)}const qn={...Vn,...Se("MuiInput",["root","underline","input"])},Ny=e=>{const{classes:t,disableUnderline:n}=e,r=Ee({root:["root",!n&&"underline"],input:["input"]},Fy,t);return{...t,...r}},Ay=V(br,{shouldForwardProp:e=>kt(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...hr(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(ut()).map(([o])=>({props:{color:o,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[o].main}`}}}))]}})),$y=V(yr,{name:"MuiInput",slot:"Input",overridesResolver:gr})({}),Es=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",...g}=o,h=Ny(o),f={root:{ownerState:{disableUnderline:r}}},b=d??a?Jr(d??a,f):f,C=m.root??s.Root??Ay,w=m.input??s.Input??$y;return u.jsx(_s,{slots:{root:C,input:w},slotProps:b,fullWidth:i,inputComponent:l,multiline:c,ref:n,type:y,...g,classes:h})});Es.muiName="Input";function jy(e){return _e("MuiFilledInput",e)}const Jt={...Vn,...Se("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},Ly=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${ce(s)}`,a&&"hiddenLabel",i&&"multiline"],input:["input"]},c=Ee(l,jy,t);return{...t,...c}},Vy=V(br,{shouldForwardProp:e=>kt(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...hr(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}},[`&.${Jt.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o},[`&.${Jt.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"},[`&.${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"}}},...Object.entries(e.palette).filter(ut()).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}}]}})),By=V(yr,{name:"MuiFilledInput",slot:"Input",overridesResolver:gr})(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}}]}))),Os=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:g="text",...h}=o,v={...o,disableUnderline:r,fullWidth:i,inputComponent:c,multiline:d,type:g},f=Ly(o),b={root:{ownerState:v},input:{ownerState:v}},C=m??a?Jr(b,m??a):b,w=y.root??s.Root??Vy,x=y.input??s.Input??By;return u.jsx(_s,{slots:{root:w,input:x},slotProps:C,fullWidth:i,inputComponent:c,multiline:d,ref:n,type:g,...h,classes:f})});Os.muiName="Input";var Za;const zy=V("fieldset",{shouldForwardProp:kt})({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%"}),Hy=V("legend",{shouldForwardProp:kt})(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 Wy(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(zy,{"aria-hidden":!0,className:o,ownerState:l,...a,children:u.jsx(Hy,{ownerState:l,children:i?u.jsx("span",{children:r}):Za||(Za=u.jsx("span",{className:"notranslate","aria-hidden":!0,children:""}))})})}function Uy(e){return _e("MuiOutlinedInput",e)}const Rt={...Vn,...Se("MuiOutlinedInput",["root","notchedOutline","input"])},Yy=e=>{const{classes:t}=e,o=Ee({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Uy,t);return{...t,...o}},qy=V(br,{shouldForwardProp:e=>kt(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:hr})(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 .${Rt.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Rt.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${Rt.focused} .${Rt.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(ut()).map(([n])=>({props:{color:n},style:{[`&.${Rt.focused} .${Rt.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}})),{props:{},style:{[`&.${Rt.error} .${Rt.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Rt.disabled} .${Rt.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"}}]}})),Ky=V(Wy,{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}})),Gy=V(yr,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:gr})(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}}]}))),Fs=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",...g}=r,h=Yy(r),v=Ht(),f=Wn({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??qy,w=m.input??s.Input??Gy;return u.jsx(_s,{slots:{root:C,input:w},renderSuffix:x=>u.jsx(Ky,{ownerState:b,className:h.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,...g,classes:{...h,notchedOutline:null}})});Fs.muiName="Input";function Qy(e){return _e("MuiFormLabel",e)}const ao=Se("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),Xy=e=>{const{classes:t,color:n,focused:o,disabled:r,error:s,filled:a,required:i}=e,l={root:["root",`color${ce(n)}`,r&&"disabled",s&&"error",a&&"filled",o&&"focused",i&&"required"],asterisk:["asterisk",s&&"error"]};return Ee(l,Qy,t)},Zy=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(ut()).map(([t])=>({props:{color:t},style:{[`&.${ao.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${ao.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${ao.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),Jy=V("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(Be(({theme:e})=>({[`&.${ao.error}`]:{color:(e.vars||e).palette.error.main}}))),ev=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,...g}=o,h=Ht(),v=Wn({props:o,muiFormControl:h,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=Xy(f);return u.jsxs(Zy,{as:i,ownerState:f,className:ie(b.root,s),ref:n,...g,children:[r,v.required&&u.jsxs(Jy,{ownerState:f,"aria-hidden":!0,className:b.asterisk,children:[" ","*"]})]})});function tv(e){return _e("MuiInputLabel",e)}Se("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const nv=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${ce(o)}`,a],asterisk:[i&&"asterisk"]},c=Ee(l,tv,t);return{...t,...c}},ov=V(ev,{shouldForwardProp:e=>kt(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${ao.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)"}}]}))),fc=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=Ht();let m=a;typeof m>"u"&&d&&(m=d.filled||d.focused||d.adornedStart);const y=Wn({props:o,muiFormControl:d,states:["size","variant","required","focused"]}),g={...o,disableAnimation:r,formControl:d,shrink:m,size:y.size,variant:y.variant,required:y.required,focused:y.focused},h=nv(g);return u.jsx(ov,{"data-shrink":m,ref:n,className:ie(h.root,l),...c,ownerState:g,classes:h})});function rv(e){return _e("MuiFormControl",e)}Se("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const sv=e=>{const{classes:t,margin:n,fullWidth:o}=e,r={root:["root",n!=="none"&&`margin${ce(n)}`,o&&"fullWidth"]};return Ee(r,rv,t)},av=V("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`margin${ce(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%"}}]}),mc=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:g="none",required:h=!1,size:v="medium",variant:f="outlined",...b}=o,C={...o,color:a,component:i,disabled:l,error:c,fullWidth:m,hiddenLabel:y,margin:g,required:h,size:v,variant:f},w=sv(C),[x,S]=p.useState(()=>{let I=!1;return r&&p.Children.forEach(r,T=>{if(!Bo(T,["Input","Select"]))return;const L=Bo(T,["Select"])?T.props.input:T;L&&_y(L.props)&&(I=!0)}),I}),[P,k]=p.useState(()=>{let I=!1;return r&&p.Children.forEach(r,T=>{Bo(T,["Input","Select"])&&(er(T.props,!0)||er(T.props.inputProps,!0))&&(I=!0)}),I}),[R,_]=p.useState(!1);l&&R&&_(!1);const O=d!==void 0&&!l?d:R;let $;p.useRef(!1);const M=p.useCallback(()=>{k(!0)},[]),A=p.useCallback(()=>{k(!1)},[]),F=p.useMemo(()=>({adornedStart:x,setAdornedStart:S,color:a,disabled:l,error:c,filled:P,focused:O,fullWidth:m,hiddenLabel:y,size:v,onBlur:()=>{_(!1)},onFocus:()=>{_(!0)},onEmpty:A,onFilled:M,registerEffect:$,required:h,variant:f}),[x,a,l,c,P,O,m,y,$,A,M,h,v,f]);return u.jsx(mr.Provider,{value:F,children:u.jsx(av,{as:i,ownerState:C,className:ie(w.root,s),ref:n,...b,children:r})})});function iv(e){return _e("MuiFormHelperText",e)}const Ja=Se("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var ei;const lv=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${ce(o)}`,n&&"contained",i&&"focused",a&&"filled",l&&"required"]};return Ee(c,iv,t)},cv=V("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${ce(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,[`&.${Ja.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${Ja.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}}]}))),hc=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:g,...h}=o,v=Ht(),f=Wn({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=lv(b);return u.jsx(cv,{as:a,className:ie(C.root,s),ref:n,...h,ownerState:b,children:r===" "?ei||(ei=u.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):r})});function Dr(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function ti(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function gc(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")||!gc(i,s)||l)i=r(e,i,n);else return i.focus(),!0}return!1}const Ns=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,g=p.useRef(null),h=p.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Tt(()=>{r&&g.current.focus()},[r]),p.useImperativeHandle(o,()=>({adjustStyleForScrollbar:(w,{direction:x})=>{const S=!g.current.style.width;if(w.clientHeight<g.current.clientHeight&&S){const P=`${al(Vt(w))}px`;g.current.style[x==="rtl"?"paddingLeft":"paddingRight"]=P,g.current.style.width=`calc(100% + ${P})`}return g.current}}),[]);const v=w=>{const x=g.current,S=w.key;if(w.ctrlKey||w.metaKey||w.altKey){d&&d(w);return}const k=dt(x).activeElement;if(S==="ArrowDown")w.preventDefault(),Kn(x,k,c,l,Dr);else if(S==="ArrowUp")w.preventDefault(),Kn(x,k,c,l,ti);else if(S==="Home")w.preventDefault(),Kn(x,null,c,l,Dr);else if(S==="End")w.preventDefault(),Kn(x,null,c,l,ti);else if(S.length===1){const R=h.current,_=S.toLowerCase(),O=performance.now();R.keys.length>0&&(O-R.lastTime>500?(R.keys=[],R.repeating=!0,R.previousKeyMatched=!0):R.repeating&&_!==R.keys[0]&&(R.repeating=!1)),R.lastTime=O,R.keys.push(_);const $=k&&!R.repeating&&gc(k,R);R.previousKeyMatched&&($||Kn(x,k,!1,l,Dr,R))?w.preventDefault():R.previousKeyMatched=!1}d&&d(w)},f=Je(g,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 S={};return s&&(S.autoFocus=!0),w.props.tabIndex===void 0&&m==="selectedMenu"&&(S.tabIndex=0),p.cloneElement(w,S)}return w});return u.jsx(cc,{role:"menu",ref:f,className:i,onKeyDown:v,tabIndex:r?0:-1,...y,children:C})});function uv(e){const t=dt(e);return t.body===e?Vt(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function io(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function ni(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 oi(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&&io(a,r)})}function Tr(e,t){let n=-1;return e.some((o,r)=>t(o)?(n=r,!0):!1),n}function pv(e,t){const n=[],o=e.container;if(!t.disableScrollLock){if(uv(o)){const a=al(Vt(o));n.push({value:o.style.paddingRight,property:"padding-right",el:o}),o.style.paddingRight=`${ni(o)+a}px`;const i=dt(o).querySelectorAll(".mui-fixed");[].forEach.call(i,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${ni(l)+a}px`})}let s;if(o.parentNode instanceof DocumentFragment)s=dt(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 fv(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class mv{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&&io(t.modalRef,!1);const r=fv(n);oi(n,t.mount,t.modalRef,r,!0);const s=Tr(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=Tr(this.containers,s=>s.modals.includes(t)),r=this.containers[o];r.restore||(r.restore=pv(r,n))}remove(t,n=!0){const o=this.modals.indexOf(t);if(o===-1)return o;const r=Tr(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&&io(t.modalRef,n),oi(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&&io(a.modalRef,!1)}return o}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function Ze(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,g=d[e]||o,h=ul(m[e],r),{props:{component:v,...f},internalRef:b}=cl({className:n,...l,externalForwardedProps:e==="root"?y:void 0,externalSlotProps:h}),C=Je(b,h?.ref,t.ref),w=e==="root"?v||c:v,x=il(g,{...e==="root"&&!c&&!d[e]&&a,...e!=="root"&&!d[e]&&a,...f,...w&&!i&&{as:w},...w&&i&&{component:w},ref:C},r);return[g,x]}function hv(e){return _e("MuiBackdrop",e)}Se("MuiBackdrop",["root","invisible"]);const gv=e=>{const{classes:t,invisible:n}=e;return Ee({root:["root",n&&"invisible"]},hv,t)},bv=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"}}]}),bc=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:g,transitionDuration:h,...v}=o,f={...o,component:a,invisible:i},b=gv(f),C={transition:g,root:c.Root,...y},w={...d,...m},x={slots:C,slotProps:w},[S,P]=Ze("root",{elementType:bv,externalForwardedProps:x,className:ie(b.root,s),ownerState:f}),[k,R]=Ze("transition",{elementType:dn,externalForwardedProps:x,ownerState:f});return u.jsx(k,{in:l,timeout:h,...v,...R,children:u.jsx(S,{"aria-hidden":!0,...P,classes:b,ref:n,children:r})})});function yv(e){return typeof e=="function"?e():e}function vv(e){return e?e.props.hasOwnProperty("in"):!1}const ri=()=>{},Fo=new mv;function xv(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),g=p.useRef(null),h=Je(g,d),[v,f]=p.useState(!c),b=vv(i);let C=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(C=!1);const w=()=>dt(y.current),x=()=>(m.current.modalRef=g.current,m.current.mount=y.current,m.current),S=()=>{Fo.mount(x(),{disableScrollLock:o}),g.current&&(g.current.scrollTop=0)},P=sn(()=>{const I=yv(t)||w().body;Fo.add(x(),I),g.current&&S()}),k=()=>Fo.isTopModal(x()),R=sn(I=>{y.current=I,I&&(c&&k()?S():g.current&&io(g.current,C))}),_=p.useCallback(()=>{Fo.remove(x(),C)},[C]);p.useEffect(()=>()=>{_()},[_]),p.useEffect(()=>{c?P():(!b||!r)&&_()},[c,_,b,r,P]);const O=I=>T=>{I.onKeyDown?.(T),!(T.key!=="Escape"||T.which===229||!k())&&(n||(T.stopPropagation(),l&&l(T,"escapeKeyDown")))},$=I=>T=>{I.onClick?.(T),T.target===T.currentTarget&&l&&l(T,"backdropClick")};return{getRootProps:(I={})=>{const T=ll(e);delete T.onTransitionEnter,delete T.onTransitionExited;const L={...T,...I};return{role:"presentation",...L,onKeyDown:O(L),ref:h}},getBackdropProps:(I={})=>{const T=I;return{"aria-hidden":!0,...T,onClick:$(T),open:c}},getTransitionProps:()=>{const I=()=>{f(!1),s&&s()},T=()=>{f(!0),a&&a(),r&&_()};return{onEnter:sa(I,i?.props.onEnter??ri),onExited:sa(T,i?.props.onExited??ri)}},rootRef:h,portalRef:R,isTopModal:k,exited:v,hasTransition:b}}function wv(e){return _e("MuiModal",e)}Se("MuiModal",["root","hidden","backdrop"]);const Cv=e=>{const{open:t,exited:n,classes:o}=e;return Ee({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},wv,o)},kv=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"}}]}))),Sv=V(bc,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),yc=p.forwardRef(function(t,n){const o=Fe({name:"MuiModal",props:t}),{BackdropComponent:r=Sv,BackdropProps:s,classes:a,className:i,closeAfterTransition:l=!1,children:c,container:d,component:m,components:y={},componentsProps:g={},disableAutoFocus:h=!1,disableEnforceFocus:v=!1,disableEscapeKeyDown:f=!1,disablePortal:b=!1,disableRestoreFocus:C=!1,disableScrollLock:w=!1,hideBackdrop:x=!1,keepMounted:S=!1,onBackdropClick:P,onClose:k,onTransitionEnter:R,onTransitionExited:_,open:O,slotProps:$={},slots:M={},theme:A,...F}=o,I={...o,closeAfterTransition:l,disableAutoFocus:h,disableEnforceFocus:v,disableEscapeKeyDown:f,disablePortal:b,disableRestoreFocus:C,disableScrollLock:w,hideBackdrop:x,keepMounted:S},{getRootProps:T,getBackdropProps:L,getTransitionProps:Q,portalRef:N,isTopModal:J,exited:z,hasTransition:oe}=xv({...I,rootRef:n}),ne={...I,exited:z},ae=Cv(ne),Y={};if(c.props.tabIndex===void 0&&(Y.tabIndex="-1"),oe){const{onEnter:H,onExited:K}=Q();Y.onEnter=H,Y.onExited=K}const re={slots:{root:y.Root,backdrop:y.Backdrop,...M},slotProps:{...g,...$}},[ue,me]=Ze("root",{ref:n,elementType:kv,externalForwardedProps:{...re,...F,component:m},getSlotProps:T,ownerState:ne,className:ie(i,ae?.root,!ne.open&&ne.exited&&ae?.hidden)}),[se,X]=Ze("backdrop",{ref:s?.ref,elementType:r,externalForwardedProps:re,shouldForwardComponentProp:!0,additionalProps:s,getSlotProps:H=>L({...H,onClick:K=>{P&&P(K),H?.onClick&&H.onClick(K)}}),className:ie(s?.className,ae?.backdrop),ownerState:ne});return!S&&!O&&(!oe||z)?null:u.jsx(ec,{ref:N,container:d,disablePortal:b,children:u.jsxs(ue,{...me,children:[!x&&r?u.jsx(se,{...X}):null,u.jsx(tc,{disableEnforceFocus:v,disableAutoFocus:h,disableRestoreFocus:C,isEnabled:J,open:O,children:p.cloneElement(c,Y)})]})})});function Pv(e){return _e("MuiPopover",e)}Se("MuiPopover",["root","paper"]);function si(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function ai(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function ii(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function No(e){return typeof e=="function"?e():e}const Mv=e=>{const{classes:t}=e;return Ee({root:["root"],paper:["paper"]},Pv,t)},Dv=V(yc,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),vc=V(ur,{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}),Tv=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:g=16,open:h,PaperProps:v={},slots:f={},slotProps:b={},transformOrigin:C={vertical:"top",horizontal:"left"},TransitionComponent:w,transitionDuration:x="auto",TransitionProps:S={},disableScrollLock:P=!1,...k}=o,R=p.useRef(),_={...o,anchorOrigin:a,anchorReference:l,elevation:y,marginThreshold:g,transformOrigin:C,TransitionComponent:w,transitionDuration:x,TransitionProps:S},O=Mv(_),$=p.useCallback(()=>{if(l==="anchorPosition")return i;const X=No(s),K=(X&&X.nodeType===1?X:dt(R.current).body).getBoundingClientRect();return{top:K.top+si(K,a.vertical),left:K.left+ai(K,a.horizontal)}},[s,a.horizontal,a.vertical,i,l]),M=p.useCallback(X=>({vertical:si(X,C.vertical),horizontal:ai(X,C.horizontal)}),[C.horizontal,C.vertical]),A=p.useCallback(X=>{const H={width:X.offsetWidth,height:X.offsetHeight},K=M(H);if(l==="none")return{top:null,left:null,transformOrigin:ii(K)};const Z=$();let G=Z.top-K.vertical,de=Z.left-K.horizontal;const ee=G+H.height,q=de+H.width,te=Vt(No(s)),le=te.innerHeight-g,W=te.innerWidth-g;if(g!==null&&G<g){const j=G-g;G-=j,K.vertical+=j}else if(g!==null&&ee>le){const j=ee-le;G-=j,K.vertical+=j}if(g!==null&&de<g){const j=de-g;de-=j,K.horizontal+=j}else if(q>W){const j=q-W;de-=j,K.horizontal+=j}return{top:`${Math.round(G)}px`,left:`${Math.round(de)}px`,transformOrigin:ii(K)}},[s,l,$,M,g]),[F,I]=p.useState(h),T=p.useCallback(()=>{const X=R.current;if(!X)return;const H=A(X);H.top!==null&&X.style.setProperty("top",H.top),H.left!==null&&(X.style.left=H.left),X.style.transformOrigin=H.transformOrigin,I(!0)},[A]);p.useEffect(()=>(P&&window.addEventListener("scroll",T),()=>window.removeEventListener("scroll",T)),[s,P,T]);const L=()=>{T()},Q=()=>{I(!1)};p.useEffect(()=>{h&&T()}),p.useImperativeHandle(r,()=>h?{updatePosition:()=>{T()}}:null,[h,T]),p.useEffect(()=>{if(!h)return;const X=nl(()=>{T()}),H=Vt(No(s));return H.addEventListener("resize",X),()=>{X.clear(),H.removeEventListener("resize",X)}},[s,h,T]);let N=x;const J={slots:{transition:w,...f},slotProps:{transition:S,paper:v,...b}},[z,oe]=Ze("transition",{elementType:Qo,externalForwardedProps:J,ownerState:_,getSlotProps:X=>({...X,onEntering:(H,K)=>{X.onEntering?.(H,K),L()},onExited:H=>{X.onExited?.(H),Q()}}),additionalProps:{appear:!0,in:h}});x==="auto"&&!z.muiSupportAuto&&(N=void 0);const ne=m||(s?dt(No(s)).body:void 0),[ae,{slots:Y,slotProps:re,...ue}]=Ze("root",{ref:n,elementType:Dv,externalForwardedProps:{...J,...k},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:f.backdrop},slotProps:{backdrop:pb(typeof b.backdrop=="function"?b.backdrop(_):b.backdrop,{invisible:!0})},container:ne,open:h},ownerState:_,className:ie(O.root,d)}),[me,se]=Ze("paper",{ref:R,className:O.paper,elementType:vc,externalForwardedProps:J,shouldForwardComponentProp:!0,additionalProps:{elevation:y,style:F?void 0:{opacity:0}},ownerState:_});return u.jsx(ae,{...ue,...!ho(ae)&&{slots:Y,slotProps:re,disableScrollLock:P},children:u.jsx(z,{...oe,timeout:N,children:u.jsx(me,{...se,children:c})})})});function Iv(e){return _e("MuiMenu",e)}Se("MuiMenu",["root","paper","list"]);const Rv={vertical:"top",horizontal:"right"},_v={vertical:"top",horizontal:"left"},Ev=e=>{const{classes:t}=e;return Ee({root:["root"],paper:["paper"],list:["list"]},Iv,t)},Ov=V(Tv,{shouldForwardProp:e=>kt(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Fv=V(vc,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),Nv=V(Ns,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),Av=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:g="auto",TransitionProps:{onEntering:h,...v}={},variant:f="selectedMenu",slots:b={},slotProps:C={},...w}=o,x=Ct(),S={...o,autoFocus:r,disableAutoFocusItem:i,MenuListProps:l,onEntering:h,PaperProps:m,transitionDuration:g,TransitionProps:v,variant:f},P=Ev(S),k=r&&!i&&d,R=p.useRef(null),_=(N,J)=>{R.current&&R.current.adjustStyleForScrollbar(N,{direction:x?"rtl":"ltr"}),h&&h(N,J)},O=N=>{N.key==="Tab"&&(N.preventDefault(),c&&c(N,"tabKeyDown"))};let $=-1;p.Children.map(s,(N,J)=>{p.isValidElement(N)&&(N.props.disabled||(f==="selectedMenu"&&N.props.selected||$===-1)&&($=J))});const M={slots:b,slotProps:{list:l,transition:v,paper:m,...C}},A=dl({elementType:b.root,externalSlotProps:C.root,ownerState:S,className:[P.root,a]}),[F,I]=Ze("paper",{className:P.paper,elementType:Fv,externalForwardedProps:M,shouldForwardComponentProp:!0,ownerState:S}),[T,L]=Ze("list",{className:ie(P.list,l.className),elementType:Nv,shouldForwardComponentProp:!0,externalForwardedProps:M,getSlotProps:N=>({...N,onKeyDown:J=>{O(J),N.onKeyDown?.(J)}}),ownerState:S}),Q=typeof M.slotProps.transition=="function"?M.slotProps.transition(S):M.slotProps.transition;return u.jsx(Ov,{onClose:c,anchorOrigin:{vertical:"bottom",horizontal:x?"right":"left"},transformOrigin:x?Rv:_v,slots:{root:b.root,paper:F,backdrop:b.backdrop,...b.transition&&{transition:b.transition}},slotProps:{root:A,paper:I,backdrop:typeof C.backdrop=="function"?C.backdrop(S):C.backdrop,transition:{...Q,onEntering:(...N)=>{_(...N),Q?.onEntering?.(...N)}}},open:d,ref:n,transitionDuration:g,ownerState:S,...w,classes:y,children:u.jsx(T,{actions:R,autoFocus:r&&($===-1||i),autoFocusItem:k,variant:f,...L,children:s})})});function $v(e){return _e("MuiNativeSelect",e)}const As=Se("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),jv=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${ce(n)}`,s&&"iconOpen",o&&"disabled"]};return Ee(i,$v,t)},xc=V("select")(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${As.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}}}]})),Lv=V(xc,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:kt,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${As.multiple}`]:t.multiple}]}})({}),wc=V("svg")(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${As.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}}]})),Vv=V(wc,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${ce(n.variant)}`],n.open&&t.iconOpen]}})({}),Bv=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=jv(d);return u.jsxs(p.Fragment,{children:[u.jsx(Lv,{ownerState:d,className:ie(m.select,o),disabled:r,ref:i||n,...c}),t.multiple?null:u.jsx(Vv,{as:a,ownerState:d,className:m.icon})]})});function Cc(e){return _e("MuiSelect",e)}const Gn=Se("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var li;const zv=V(xc,{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"}}),Hv=V(wc,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${ce(n.variant)}`],n.open&&t.iconOpen]}})({}),Wv=V("input",{shouldForwardProp:e=>pl(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 ci(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function Uv(e){return e==null||typeof e=="string"&&!e.trim()}const Yv=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${ce(n)}`,s&&"iconOpen",o&&"disabled"],nativeInput:["nativeInput"]};return Ee(i,Cc,t)},qv=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:g=!1,IconComponent:h,inputRef:v,labelId:f,MenuProps:b={},multiple:C,name:w,onBlur:x,onChange:S,onClose:P,onFocus:k,onOpen:R,open:_,readOnly:O,renderValue:$,required:M,SelectDisplayProps:A={},tabIndex:F,type:I,value:T,variant:L="standard",...Q}=t,[N,J]=ca({controlled:T,default:d,name:"Select"}),[z,oe]=ca({controlled:_,default:c,name:"Select"}),ne=p.useRef(null),ae=p.useRef(null),[Y,re]=p.useState(null),{current:ue}=p.useRef(_!=null),[me,se]=p.useState(),X=Je(n,v),H=p.useCallback(fe=>{ae.current=fe,fe&&re(fe)},[]),K=Y?.parentNode;p.useImperativeHandle(X,()=>({focus:()=>{ae.current.focus()},node:ne.current,value:N}),[N]),p.useEffect(()=>{c&&z&&Y&&!ue&&(se(a?null:K.clientWidth),ae.current.focus())},[Y,a]),p.useEffect(()=>{s&&ae.current.focus()},[s]),p.useEffect(()=>{if(!f)return;const fe=dt(ae.current).getElementById(f);if(fe){const ke=()=>{getSelection().isCollapsed&&ae.current.focus()};return fe.addEventListener("click",ke),()=>{fe.removeEventListener("click",ke)}}},[f]);const Z=(fe,ke)=>{fe?R&&R(ke):P&&P(ke),ue||(se(a?null:K.clientWidth),oe(fe))},G=fe=>{fe.button===0&&(fe.preventDefault(),ae.current.focus(),Z(!0,fe))},de=fe=>{Z(!1,fe)},ee=p.Children.toArray(i),q=fe=>{const ke=ee.find(De=>De.props.value===fe.target.value);ke!==void 0&&(J(ke.props.value),S&&S(fe,ke))},te=fe=>ke=>{let De;if(ke.currentTarget.hasAttribute("tabindex")){if(C){De=Array.isArray(N)?N.slice():[];const we=N.indexOf(fe.props.value);we===-1?De.push(fe.props.value):De.splice(we,1)}else De=fe.props.value;if(fe.props.onClick&&fe.props.onClick(ke),N!==De&&(J(De),S)){const we=ke.nativeEvent||ke,Ge=new we.constructor(we.type,we);Object.defineProperty(Ge,"target",{writable:!0,value:{value:De,name:w}}),S(Ge,fe)}C||Z(!1,ke)}},le=fe=>{O||[" ","ArrowUp","ArrowDown","Enter"].includes(fe.key)&&(fe.preventDefault(),Z(!0,fe))},W=Y!==null&&z,j=fe=>{!W&&x&&(Object.defineProperty(fe,"target",{writable:!0,value:{value:N,name:w}}),x(fe))};delete Q["aria-invalid"];let U,be;const ve=[];let je=!1;(er({value:N})||y)&&($?U=$(N):je=!0);const Me=ee.map(fe=>{if(!p.isValidElement(fe))return null;let ke;if(C){if(!Array.isArray(N))throw new Error(Ri(2));ke=N.some(De=>ci(De,fe.props.value)),ke&&je&&ve.push(fe.props.children)}else ke=ci(N,fe.props.value),ke&&je&&(be=fe.props.children);return p.cloneElement(fe,{"aria-selected":ke?"true":"false",onClick:te(fe),onKeyUp:De=>{De.key===" "&&De.preventDefault(),fe.props.onKeyUp&&fe.props.onKeyUp(De)},role:"option",selected:ke,value:void 0,"data-value":fe.props.value})});je&&(C?ve.length===0?U=null:U=ve.reduce((fe,ke,De)=>(fe.push(ke),De<ve.length-1&&fe.push(", "),fe),[]):U=be);let He=me;!a&&ue&&Y&&(He=K.clientWidth);let Ke;typeof F<"u"?Ke=F:Ke=m?null:0;const ye=A.id||(w?`mui-component-select-${w}`:void 0),xe={...t,variant:L,value:N,open:W,error:g},ge=Yv(xe),Ne={...b.PaperProps,...b.slotProps?.paper},Ye=xo();return u.jsxs(p.Fragment,{children:[u.jsx(zv,{as:"div",ref:H,tabIndex:Ke,role:"combobox","aria-controls":W?Ye:void 0,"aria-disabled":m?"true":void 0,"aria-expanded":W?"true":"false","aria-haspopup":"listbox","aria-label":r,"aria-labelledby":[f,ye].filter(Boolean).join(" ")||void 0,"aria-describedby":o,"aria-required":M?"true":void 0,"aria-invalid":g?"true":void 0,onKeyDown:le,onMouseDown:m||O?null:G,onBlur:j,onFocus:k,...A,ownerState:xe,className:ie(A.className,ge.select,l),id:ye,children:Uv(U)?li||(li=u.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):U}),u.jsx(Wv,{"aria-invalid":g,value:Array.isArray(N)?N.join(","):N,name:w,ref:ne,"aria-hidden":!0,onChange:q,tabIndex:-1,disabled:m,className:ge.nativeInput,autoFocus:s,required:M,...Q,ownerState:xe}),u.jsx(Hv,{as:h,className:ge.icon,ownerState:xe}),u.jsx(Av,{id:`menu-${w||""}`,anchorEl:K,open:W,onClose:de,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:Ye,...b.MenuListProps},paper:{...Ne,style:{minWidth:He,...Ne!=null?Ne.style:null}}},children:Me})]})}),Kv=$t(u.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),Gv=e=>{const{classes:t}=e,o=Ee({root:["root"]},Cc,t);return{...t,...o}},$s={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>kt(e)&&e!=="variant",slot:"Root"},Qv=V(Es,$s)(""),Xv=V(Fs,$s)(""),Zv=V(Os,$s)(""),kc=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=Kv,id:m,input:y,inputProps:g,label:h,labelId:v,MenuProps:f,multiple:b=!1,native:C=!1,onClose:w,onOpen:x,open:S,renderValue:P,SelectDisplayProps:k,variant:R="outlined",..._}=o,O=C?Bv:qv,$=Ht(),M=Wn({props:o,muiFormControl:$,states:["variant","error"]}),A=M.variant||R,F={...o,variant:A,classes:a},I=Gv(F),{root:T,...L}=I,Q=y||{standard:u.jsx(Qv,{ownerState:F}),outlined:u.jsx(Xv,{label:h,ownerState:F}),filled:u.jsx(Zv,{ownerState:F})}[A],N=Je(n,wo(Q));return u.jsx(p.Fragment,{children:p.cloneElement(Q,{inputComponent:O,inputProps:{children:s,error:M.error,IconComponent:d,variant:A,type:void 0,multiple:b,...C?{id:m}:{autoWidth:r,defaultOpen:l,displayEmpty:c,labelId:v,MenuProps:f,onClose:w,onOpen:x,open:S,renderValue:P,SelectDisplayProps:{id:m,...k}},...g,classes:g?Jr(L,g.classes):L,...y?y.props.inputProps:{}},...(b&&C||c)&&A==="outlined"?{notched:!0}:{},ref:N,className:ie(Q.props.className,i,I.root),...!y&&{variant:A},..._})})});kc.muiName="Select";function Jv(e){return _e("MuiTextField",e)}Se("MuiTextField",["root"]);const ex={standard:Es,filled:Os,outlined:Fs},tx=e=>{const{classes:t}=e;return Ee({root:["root"]},Jv,t)},nx=V(mc,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),ox=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:g=!1,helperText:h,id:v,InputLabelProps:f,inputProps:b,InputProps:C,inputRef:w,label:x,maxRows:S,minRows:P,multiline:k=!1,name:R,onBlur:_,onChange:O,onFocus:$,placeholder:M,required:A=!1,rows:F,select:I=!1,SelectProps:T,slots:L={},slotProps:Q={},type:N,value:J,variant:z="outlined",...oe}=o,ne={...o,autoFocus:s,color:l,disabled:d,error:m,fullWidth:g,multiline:k,required:A,select:I,variant:z},ae=tx(ne),Y=xo(v),re=h&&Y?`${Y}-helper-text`:void 0,ue=x&&Y?`${Y}-label`:void 0,me=ex[z],se={slots:L,slotProps:{input:C,inputLabel:f,htmlInput:b,formHelperText:y,select:T,...Q}},X={},H=se.slotProps.inputLabel;z==="outlined"&&(H&&typeof H.shrink<"u"&&(X.notched=H.shrink),X.label=x),I&&((!T||!T.native)&&(X.id=void 0),X["aria-describedby"]=void 0);const[K,Z]=Ze("root",{elementType:nx,shouldForwardComponentProp:!0,externalForwardedProps:{...se,...oe},ownerState:ne,className:ie(ae.root,i),ref:n,additionalProps:{disabled:d,error:m,fullWidth:g,required:A,color:l,variant:z}}),[G,de]=Ze("input",{elementType:me,externalForwardedProps:se,additionalProps:X,ownerState:ne}),[ee,q]=Ze("inputLabel",{elementType:fc,externalForwardedProps:se,ownerState:ne}),[te,le]=Ze("htmlInput",{elementType:"input",externalForwardedProps:se,ownerState:ne}),[W,j]=Ze("formHelperText",{elementType:hc,externalForwardedProps:se,ownerState:ne}),[U,be]=Ze("select",{elementType:kc,externalForwardedProps:se,ownerState:ne}),ve=u.jsx(G,{"aria-describedby":re,autoComplete:r,autoFocus:s,defaultValue:c,fullWidth:g,multiline:k,name:R,rows:F,maxRows:S,minRows:P,type:N,value:J,id:Y,inputRef:w,onBlur:_,onChange:O,onFocus:$,placeholder:M,inputProps:le,slots:{input:L.htmlInput?te:void 0},...de});return u.jsxs(K,{...Z,children:[x!=null&&x!==""&&u.jsx(ee,{htmlFor:Y,id:ue,...q,children:x}),I?u.jsx(U,{"aria-describedby":re,id:Y,labelId:ue,value:J,input:ve,...be,children:a}):ve,h&&u.jsx(W,{id:re,...j,children:h})]})});function rx(e){return _e("MuiIconButton",e)}const ui=Se("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),sx=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${ce(o)}`,r&&`edge${ce(r)}`,`size${ce(s)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return Ee(i,rx,t)},ax=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${ce(n.color)}`],n.edge&&t[`edge${ce(n.edge)}`],t[`size${ce(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})`:Re(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(ut()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(ut()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.vars?`rgba(${(e.vars||e).palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Re((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)}}],[`&.${ui.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${ui.loading}`]:{color:"transparent"}}))),ix=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"}}]})),Bn=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:g,...h}=o,v=xo(m),f=g??u.jsx(ic,{"aria-labelledby":v,color:"inherit",size:16}),b={...o,edge:r,color:i,disabled:l,disableFocusRipple:c,loading:y,loadingIndicator:f,size:d},C=sx(b);return u.jsxs(ax,{id:y?v:m,className:ie(C.root,a),centerRipple:!0,focusRipple:!c,disabled:l||y,ref:n,...h,ownerState:b,children:[typeof y=="boolean"&&u.jsx("span",{className:C.loadingWrapper,style:{display:"contents"},children:u.jsx(ix,{className:C.loadingIndicator,ownerState:b,children:y&&f})}),s]})});function lx(e){return _e("MuiInputAdornment",e)}const di=Se("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var pi;const cx=(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${ce(n.position)}`],n.disablePointerEvents===!0&&t.disablePointerEvents,t[n.variant]]},ux=e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:o,position:r,size:s,variant:a}=e,i={root:["root",n&&"disablePointerEvents",r&&`position${ce(r)}`,a,o&&"hiddenLabel",s&&`size${ce(s)}`]};return Ee(i,lx,t)},dx=V("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:cx})(Be(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${di.positionStart}&:not(.${di.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),px=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=Ht()||{};let g=d;d&&y.variant,y&&!g&&(g=y.variant);const h={...o,hiddenLabel:y.hiddenLabel,size:y.size,disablePointerEvents:i,position:c,variant:g},v=ux(h);return u.jsx(mr.Provider,{value:null,children:u.jsx(dx,{as:a,ownerState:h,className:ie(v.root,s),ref:n,...m,children:typeof r=="string"&&!l?u.jsx(zt,{color:"textSecondary",children:r}):u.jsxs(p.Fragment,{children:[c==="start"?pi||(pi=u.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):null,r]})})})});function js(e){const{ownerState:t}=We(),n=Ct();return p.useMemo(()=>E({},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 fx=$t(u.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),mx=$t(u.jsx("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),hx=$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"),gx=$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"),bx=$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 yx=$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 vx(e){return Ve("MuiPickersTextField",e)}ze("MuiPickersTextField",["root","focused","disabled","error","required"]);function xx(e){return Ve("MuiPickersInputBase",e)}const Rn=ze("MuiPickersInputBase",["root","focused","disabled","error","notchedOutline","sectionContent","sectionBefore","sectionAfter","adornedStart","adornedEnd","input","activeBar"]);function wx(e){return Ve("MuiPickersSectionList",e)}const Qn=ze("MuiPickersSectionList",["root","section","sectionContent"]),Cx=["slots","slotProps","elements","sectionListRef","classes"],Sc=V("div",{name:"MuiPickersSectionList",slot:"Root"})({direction:"ltr /*! @noflip */",outline:"none"}),Pc=V("span",{name:"MuiPickersSectionList",slot:"Section"})({}),Mc=V("span",{name:"MuiPickersSectionList",slot:"SectionSeparator"})({whiteSpace:"pre"}),Dc=V("span",{name:"MuiPickersSectionList",slot:"SectionContent"})({outline:"none"}),kx=e=>Oe({root:["root"],section:["section"],sectionContent:["sectionContent"]},wx,e);function Sx(e){const{slots:t,slotProps:n,element:o,classes:r}=e,{ownerState:s}=We(),a=t?.section??Pc,i=Ae({elementType:a,externalSlotProps:n?.section,externalForwardedProps:o.container,className:r.section,ownerState:s}),l=t?.sectionContent??Dc,c=Ae({elementType:l,externalSlotProps:n?.sectionContent,externalForwardedProps:o.content,additionalProps:{suppressContentEditableWarning:!0},className:r.sectionContent,ownerState:s}),d=t?.sectionSeparator??Mc,m=Ae({elementType:d,externalSlotProps:n?.sectionSeparator,externalForwardedProps:o.before,ownerState:E({},s,{separatorPosition:"before"})}),y=Ae({elementType:d,externalSlotProps:n?.sectionSeparator,externalForwardedProps:o.after,ownerState:E({},s,{separatorPosition:"after"})});return u.jsxs(a,E({},i,{children:[u.jsx(d,E({},m)),u.jsx(l,E({},c)),u.jsx(d,E({},y))]}))}const Px=p.forwardRef(function(t,n){const o=Te({props:t,name:"MuiPickersSectionList"}),{slots:r,slotProps:s,elements:a,sectionListRef:i,classes:l}=o,c=he(o,Cx),d=kx(l),{ownerState:m}=We(),y=p.useRef(null),g=rt(n,y),h=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 h("getRoot")},getSectionContainer(b){return h("getSectionContainer").querySelector(`.${Qn.section}[data-sectionindex="${b}"]`)},getSectionContent(b){return h("getSectionContent").querySelector(`.${Qn.section}[data-sectionindex="${b}"] .${Qn.sectionContent}`)},getSectionIndexFromDOMElement(b){const C=h("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??Sc,f=Ae({elementType:v,externalSlotProps:s?.root,externalForwardedProps:c,additionalProps:{ref:g,suppressContentEditableWarning:!0},className:d.root,ownerState:m});return u.jsx(v,E({},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(Sx,{slots:r,slotProps:s,element:b,classes:d},C))})}))}),Tc=p.createContext(null),vr=()=>{const e=p.useContext(Tc);if(e==null)throw new Error(["MUI X: The `usePickerTextFieldOwnerState` can only be called in components that are used inside a PickerTextField component"].join(`
|
|
114
114
|
`));return e},Mx=["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"],Dx=e=>Math.round(e*1e5)/1e5,xr=V("div",{name:"MuiPickersInputBase",slot:"Root"})(({theme:e})=>E({},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:`${Dx(.15/16)}em`,variants:[{props:{isInputInFullWidth:!0},style:{width:"100%"}}]})),Ls=V(Sc,{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}}]})),Tx=V(Pc,{name:"MuiPickersInputBase",slot:"Section"})(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit",letterSpacing:"inherit",lineHeight:"1.4375em",display:"inline-block",whiteSpace:"nowrap"})),Ix=V(Dc,{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"})),Rx=V(Mc,{name:"MuiPickersInputBase",slot:"Separator"})(()=>({whiteSpace:"pre",letterSpacing:"inherit"})),_x=V("input",{name:"MuiPickersInputBase",slot:"Input",overridesResolver:(e,t)=>t.hiddenInput})(E({},lm)),Ex=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]}})),Ox=(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${nm(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,xx,e)};function fi(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 Fx(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+=fi(e[r],t,r,"end");else for(let r=0;r<e.length/2;r+=1)n+=fi(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 Vs=p.forwardRef(function(t,n){const o=Te({props:t,name:"MuiPickersInputBase"}),{elements:r,areAllSectionsEmpty:s,value:a,onChange:i,id:l,endAdornment:c,startAdornment:d,renderSuffix:m,slots:y,slotProps:g,contentEditable:h,tabIndex:v,onInput:f,onPaste:b,onKeyDown:C,name:w,readOnly:x,inputProps:S,inputRef:P,sectionListRef:k,onFocus:R,onBlur:_,classes:O,ownerState:$}=o,M=he(o,Mx),A=vr(),F=p.useRef(null),I=p.useRef(null),T=p.useRef([]),L=rt(n,F),Q=rt(S?.ref,P),N=Ht();if(!N)throw new Error("MUI X: PickersInputBase should always be used inside a PickersTextField component");const J=$??A,z=X=>{N.onFocus?.(X),R?.(X)},oe=X=>{z(X)},ne=X=>{if(C?.(X),X.key==="Enter"&&!X.defaultMuiPrevented){if(F.current?.dataset.multiInput)return;const H=F.current?.closest("form"),K=H?.querySelector('[type="submit"]');if(!H||!K)return;X.preventDefault(),H.requestSubmit(K)}},ae=X=>{N.onBlur?.(X),_?.(X)};p.useEffect(()=>{N&&N.setAdornedStart(!!d)},[N,d]),p.useEffect(()=>{N&&(s?N.onEmpty():N.onFilled())},[N,s]);const Y=Ox(O,J),re=y?.root||xr,ue=Ae({elementType:re,externalSlotProps:g?.root,externalForwardedProps:M,additionalProps:{"aria-invalid":N.error,ref:L},className:Y.root,ownerState:J}),me=y?.input||Ls,se=r.some(X=>X.content["data-range-position"]!==void 0);return p.useEffect(()=>{if(!se||!J.isPickerOpen)return;const{activeBarWidth:X,sectionOffsets:H}=Fx(r,F);T.current=[H[0],H[1]],I.current&&(I.current.style.width=`${X}px`)},[r,se,J.isPickerOpen]),u.jsxs(re,E({},ue,{children:[d,u.jsx(Px,{sectionListRef:k,elements:r,contentEditable:h,tabIndex:v,className:Y.sectionsContainer,onFocus:z,onBlur:ae,onInput:f,onPaste:b,onKeyDown:ne,slots:{root:me,section:Tx,sectionContent:Ix,sectionSeparator:Rx},slotProps:{root:E({},g?.input,{ownerState:J}),sectionContent:{className:Rn.sectionContent},sectionSeparator:({separatorPosition:X})=>({className:X==="before"?Rn.sectionBefore:Rn.sectionAfter})}}),c,m?m(E({},N)):null,u.jsx(_x,E({name:w,className:Y.input,value:a,onChange:i,id:l,"aria-hidden":"true",tabIndex:-1,readOnly:x,required:N.required,disabled:N.disabled,onFocus:oe},S,{ref:Q})),se&&u.jsx(Ex,{className:Y.activeBar,ref:I,ownerState:{sectionOffsets:T.current}})]}))});function Nx(e){return Ve("MuiPickersOutlinedInput",e)}const Pt=E({},Rn,ze("MuiPickersOutlinedInput",["root","notchedOutline","input"])),Ax=["children","className","label","notched","shrink"],$x=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}}),mi=V("span")(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit"})),jx=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 Lx(e){const{className:t,label:n,notched:o}=e,r=he(e,Ax),s=vr();return u.jsx($x,E({"aria-hidden":!0,className:t},r,{ownerState:s,children:u.jsx(jx,{ownerState:s,notched:o,children:n?u.jsx(mi,{children:n}):u.jsx(mi,{className:"notranslate",children:""})})}))}const Vx=["label","autoFocus","ownerState","classes","notched"],Bx=V(xr,{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 .${Pt.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Pt.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${Pt.focused} .${Pt.notchedOutline}`]:{borderStyle:"solid",borderWidth:2},[`&.${Pt.disabled}`]:{[`& .${Pt.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled},"*":{color:(e.vars||e).palette.action.disabled}},[`&.${Pt.error} .${Pt.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:{[`&.${Pt.focused}:not(.${Pt.error}) .${Pt.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}}))}}),zx=V(Ls,{name:"MuiPickersOutlinedInput",slot:"SectionsContainer"})({padding:"16.5px 0",variants:[{props:{inputSize:"small"},style:{padding:"8.5px 0"}}]}),Hx=e=>{const n=Oe({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Nx,e);return E({},e,n)},Ic=p.forwardRef(function(t,n){const o=Te({props:t,name:"MuiPickersOutlinedInput"}),{label:r,classes:s,notched:a}=o,i=he(o,Vx),l=Ht(),c=Hx(s);return u.jsx(Vs,E({slots:{root:Bx,input:zx},renderSuffix:d=>u.jsx(Lx,{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}))});Ic.muiName="Input";function Wx(e){return Ve("MuiPickersFilledInput",e)}const en=E({},Rn,ze("MuiPickersFilledInput",["root","underline","input"])),Ux=["label","autoFocus","disableUnderline","hiddenLabel","classes"],Yx=V(xr,{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}},[`&.${en.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o},[`&.${en.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"},[`&.${en.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${en.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(.${en.disabled}, .${en.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${en.disabled}:before`]:{borderBottomStyle:"dotted"}}},{props:{hasStartAdornment:!0},style:{paddingLeft:12}},{props:{hasEndAdornment:!0},style:{paddingRight:12}}]}}),qx=V(Ls,{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}}]}),Kx=(e,t)=>{const{inputHasUnderline:n}=t,r=Oe({root:["root",n&&"underline"],input:["input"]},Wx,e);return E({},e,r)},Rc=p.forwardRef(function(t,n){const o=Te({props:t,name:"MuiPickersFilledInput"}),{label:r,disableUnderline:s=!1,hiddenLabel:a=!1,classes:i}=o,l=he(o,Ux),c=vr(),d=E({},c,{inputHasUnderline:!s}),m=Kx(i,d);return u.jsx(Vs,E({slots:{root:Yx,input:qx},slotProps:{root:{disableUnderline:s},input:{hiddenLabel:a}}},l,{label:r,classes:m,ref:n,ownerState:d}))});Rc.muiName="Input";function Gx(e){return Ve("MuiPickersFilledInput",e)}const Xn=E({},Rn,ze("MuiPickersInput",["root","underline","input"])),Qx=["label","autoFocus","disableUnderline","ownerState","classes"],Xx=V(xr,{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"}}}]}}),Zx=(e,t)=>{const{inputHasUnderline:n}=t,r=Oe({root:["root",!n&&"underline"],input:["input"]},Gx,e);return E({},e,r)},_c=p.forwardRef(function(t,n){const o=Te({props:t,name:"MuiPickersInput"}),{label:r,disableUnderline:s=!1,classes:a}=o,i=he(o,Qx),l=vr(),c=E({},l,{inputHasUnderline:!s}),d=Zx(a,c);return u.jsx(Vs,E({slots:{root:Xx},slotProps:{root:{disableUnderline:s}}},i,{label:r,classes:d,ref:n}))});_c.muiName="Input";const Jx=["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"],ew={standard:_c,filled:Rc,outlined:Ic},tw=V(mc,{name:"MuiPickersTextField",slot:"Root"})({}),nw=(e,t)=>{const{isFieldFocused:n,isFieldDisabled:o,isFieldRequired:r}=t;return Oe({root:["root",n&&!o&&"focused",o&&"disabled",r&&"required"]},vx,e)},Ec=p.forwardRef(function(t,n){const o=Te({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:g,inputProps:h,inputRef:v,sectionListRef:f,elements:b,areAllSectionsEmpty:C,onClick:w,onKeyDown:x,onKeyUp:S,onPaste:P,onInput:k,endAdornment:R,startAdornment:_,tabIndex:O,contentEditable:$,focused:M,value:A,onChange:F,fullWidth:I,id:T,name:L,helperText:Q,FormHelperTextProps:N,label:J,InputLabelProps:z,"data-active-range-position":oe}=o,ne=he(o,Jx),ae=p.useRef(null),Y=rt(n,ae),re=ko(T),ue=Q&&re?`${re}-helper-text`:void 0,me=J&&re?`${re}-label`:void 0,se=js({disabled:o.disabled,required:o.required,readOnly:g?.readOnly}),X=p.useMemo(()=>E({},se,{isFieldValueEmpty:C,isFieldFocused:M??!1,hasFieldError:d??!1,inputSize:o.size??"medium",inputColor:l??"primary",isInputInFullWidth:I??!1,hasStartAdornment:!!(_??g?.startAdornment),hasEndAdornment:!!(R??g?.endAdornment),inputHasLabel:!!J}),[se,C,M,d,o.size,l,I,_,R,g?.startAdornment,g?.endAdornment,J]),H=nw(i,X),K=ew[m],Z={};return m==="outlined"&&(z&&typeof z.shrink<"u"&&(Z.notched=z.shrink),Z.label=J),u.jsx(Tc.Provider,{value:X,children:u.jsxs(tw,E({className:ie(H.root,a),ref:Y,focused:M,disabled:c,variant:m,error:d,color:l,fullWidth:I,required:y,ownerState:X},ne,{children:[J!=null&&J!==""&&u.jsx(fc,E({htmlFor:re,id:me},z,{children:J})),u.jsx(K,E({elements:b,areAllSectionsEmpty:C,onClick:w,onKeyDown:x,onKeyUp:S,onInput:k,onPaste:P,onFocus:r,onBlur:s,endAdornment:R,startAdornment:_,tabIndex:O,contentEditable:$,value:A,onChange:F,id:re,fullWidth:I,inputProps:h,inputRef:v,sectionListRef:f,label:J,name:L,role:"group","aria-labelledby":me,"aria-describedby":ue,"aria-live":ue?"polite":void 0,"data-active-range-position":oe},Z,g)),Q&&u.jsx(hc,E({id:ue},N,{children:Q}))]}))})}),ow=["enableAccessibleFieldDOMStructure"],rw=["InputProps","readOnly","onClear","clearable","clearButtonPosition","openPickerButtonPosition","openPickerAriaLabel"],sw=["onPaste","onKeyDown","inputMode","readOnly","InputProps","inputProps","inputRef","onClear","clearable","clearButtonPosition","openPickerButtonPosition","openPickerAriaLabel"],aw=["ownerState"],iw=["ownerState"],lw=["ownerState"],cw=["ownerState"],uw=["InputProps","inputProps"],dw=e=>{let{enableAccessibleFieldDOMStructure:t}=e,n=he(e,ow);if(t){const{InputProps:f,readOnly:b,onClear:C,clearable:w,clearButtonPosition:x,openPickerButtonPosition:S,openPickerAriaLabel:P}=n,k=he(n,rw);return{clearable:w,onClear:C,clearButtonPosition:x,openPickerButtonPosition:S,openPickerAriaLabel:P,textFieldProps:E({},k,{InputProps:E({},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:g,openPickerAriaLabel:h}=n,v=he(n,sw);return{clearable:m,onClear:d,clearButtonPosition:y,openPickerButtonPosition:g,openPickerAriaLabel:h,textFieldProps:E({},v,{InputProps:E({},i??{},{readOnly:a}),inputProps:E({},l??{},{inputMode:s,onPaste:o,onKeyDown:r,ref:c})})}},Bs=p.createContext({slots:{},slotProps:{},inputRef:void 0});function Oc(e){const{slots:t,slotProps:n,fieldResponse:o,defaultOpenPickerIcon:r}=e,s=ct(),a=Cs(),i=p.useContext(Bs),{textFieldProps:l,onClear:c,clearable:d,openPickerAriaLabel:m,clearButtonPosition:y="end",openPickerButtonPosition:g="end"}=dw(o),h=js(l),v=pe(N=>{N.preventDefault(),a?.setOpen(J=>!J)}),f=a?a.triggerStatus:"hidden",b=d?y:null,C=f!=="hidden"?g:null,w=t?.textField??i.slots.textField??(o.enableAccessibleFieldDOMStructure===!1?ox:Ec),x=t?.inputAdornment??i.slots.inputAdornment??px,S=Ae({elementType:x,externalSlotProps:Ho(i.slotProps.inputAdornment,n?.inputAdornment),additionalProps:{position:"start"},ownerState:E({},h,{position:"start"})}),P=he(S,aw),k=Ae({elementType:x,externalSlotProps:n?.inputAdornment,additionalProps:{position:"end"},ownerState:E({},h,{position:"end"})}),R=he(k,iw),_=i.slots.openPickerButton??Bn,O=Ae({elementType:_,externalSlotProps:i.slotProps.openPickerButton,additionalProps:{disabled:f==="disabled",onClick:v,"aria-label":m,edge:l.variant!=="standard"?C:!1},ownerState:h}),$=he(O,lw),M=i.slots.openPickerIcon??r,A=Ae({elementType:M,externalSlotProps:i.slotProps.openPickerIcon,ownerState:h}),F=t?.clearButton??i.slots.clearButton??Bn,I=Ae({elementType:F,externalSlotProps:Ho(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:h}),T=he(I,cw),L=t?.clearIcon??i.slots.clearIcon??yx,Q=Ae({elementType:L,externalSlotProps:Ho(i.slotProps.clearIcon,n?.clearIcon),additionalProps:{fontSize:"small"},ownerState:h});return l.ref=rt(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,E({},P,{children:[C==="start"&&u.jsx(_,E({},$,{children:u.jsx(M,E({},A))})),b==="start"&&u.jsx(F,E({},T,{children:u.jsx(L,E({},Q))}))]}))),!l.InputProps?.endAdornment&&(b==="end"||C==="end")&&(l.InputProps.endAdornment=u.jsxs(x,E({},R,{children:[b==="end"&&u.jsx(F,E({},T,{children:u.jsx(L,E({},Q))})),C==="end"&&u.jsx(_,E({},$,{children:u.jsx(M,E({},A))}))]}))),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,E({},l))}function Ho(e,t){return e?t?n=>E({},cn(t,n),cn(e,n)):e:t}function Fc(e){const{ref:t,externalForwardedProps:n,slotProps:o}=e,r=p.useContext(Bs),s=Cs(),a=js(n),{InputProps:i,inputProps:l}=n,c=he(n,uw),d=Ae({elementType:Ec,externalSlotProps:Ho(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=E({},l,d.inputProps),d.InputProps=E({},i,d.InputProps),d}function Nc(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(Bs.Provider,{value:s,children:r})}function Ac(e){const{steps:t}=e;return sb({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 pw=["props","steps"],fw=["ownerState"],$c=e=>{let{props:t,steps:n}=e,o=he(e,pw);const{slots:r,slotProps:s,label:a,inputRef:i,localeText:l}=t,c=Ac({steps:n}),{providerProps:d,renderCurrentView:m,ownerState:y}=sc(E({},o,{props:t,localeText:l,autoFocusView:!0,viewContainerRole:"dialog",variant:"desktop",getStepNavigation:c})),g=d.privateContextValue.labelId,h=s?.toolbar?.hidden??!1,v=r.field,f=Ae({elementType:v,externalSlotProps:s?.field,additionalProps:E({},h&&{id:g}),ownerState:y}),b=he(f,fw),C=r.layout??pc;let w=g;h&&(a?w=`${g}-label`:w=void 0);const x=E({},s,{toolbar:E({},s?.toolbar,{titleId:g}),popper:E({"aria-labelledby":w},s?.popper)});return{renderPicker:()=>u.jsx($l,E({},d,{children:u.jsxs(Nc,{slots:r,slotProps:x,inputRef:i,children:[u.jsx(v,E({},b)),u.jsx(nb,{slots:r,slotProps:x,children:u.jsx(C,E({},x?.layout,{slots:r,slotProps:x,children:m()}))})]})}))}},yn=e=>e.saveQuery!=null,jc=({stateResponse:{localizedDigits:e,sectionsValueBoundaries:t,state:n,timezone:o,setCharacterQuery:r,setTempAndroidValueStr:s,updateSectionValue:a}})=>{const i=Ie(),l=({keyPressed:m,sectionIndex:y},g,h)=>{const v=m.toLowerCase(),f=n.sections[y];if(n.characterQuery!=null&&(!h||h(n.characterQuery.value))&&n.characterQuery.sectionIndex===y){const C=`${n.characterQuery.value}${v}`,w=g(C,f);if(!yn(w))return r({sectionIndex:y,value:C,sectionType:f.type}),w}const b=g(v,f);return yn(b)&&!b.saveQuery?(r(null),null):(r({sectionIndex:y,value:v,sectionType:f.type}),yn(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}},g=(v,f,b,C)=>{const w=x=>Ml(i,o,f.type,x);if(f.contentType==="letter")return y(f.format,w(f.format),v);if(b&&C!=null&&Pl(i,b).contentType==="letter"){const x=w(b),S=y(b,x,v);return yn(S)?{saveQuery:!1}:E({},S,{sectionValue:C(S.sectionValue,x)})}return{saveQuery:!1}};return l(m,(v,f)=>{switch(f.type){case"month":{const b=C=>Ia(i,C,i.formats.month,f.format);return g(v,f,i.formats.month,b)}case"weekDay":{const b=(C,w)=>w.indexOf(C).toString();return g(v,f,i.formats.weekday,b)}case"meridiem":return g(v,f);default:return{saveQuery:!1}}})},d=m=>{const y=(h,v)=>{const f=un(h,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:Dl(i,b,C,e,v),shouldGoToNextSection:w}};return l(m,(h,v)=>{if(v.contentType==="digit"||v.contentType==="digit-with-letter")return y(h,v);if(v.type==="month"){Tl(i,"digit","month","MM");const f=y(h,{type:v.type,format:"MM",hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(yn(f))return f;const b=Ia(i,f.sectionValue,"MM",v.format);return E({},f,{sectionValue:b})}if(v.type==="weekDay"){const f=y(h,v);if(yn(f))return f;const b=ir(i,v.format)[Number(f.sectionValue)-1];return E({},f,{sectionValue:b})}return{saveQuery:!1}},h=>Ta(h,e))};return pe(m=>{const y=n.sections[m.sectionIndex],h=Ta(m.keyPressed,e)?d(E({},m,{keyPressed:bs(m.keyPressed,e)})):c(m);if(h==null){s(null);return}a({section:y,newSectionValue:h.sectionValue,shouldGoToNextSection:h.shouldGoToNextSection})})},mw=5e3,Lc=e=>{const t=Ie(),n=ct(),o=hn(),r=Ct(),{manager:{validator:s,valueType:a,internal_valueManager:i,internal_fieldValueManager:l},internalPropsWithDefaults:c,internalPropsWithDefaults:{value:d,defaultValue:m,referenceDate:y,onChange:g,format:h,formatDensity:v="dense",selectedSections:f,onSelectedSectionsChange:b,shouldRespectLeadingZeros:C=!1,timezone:w,enableAccessibleFieldDOMStructure:x=!0},forwardedProps:{error:S}}=e,{value:P,handleValueChange:k,timezone:R}=Qt({name:"a field component",timezone:w,value:d,defaultValue:m,referenceDate:y,onChange:g,valueManager:i}),_=p.useRef(P);p.useEffect(()=>{_.current=P},[P]);const{hasValidationError:O}=zl({props:c,validator:s,timezone:R,value:P,onError:c.onError}),$=p.useMemo(()=>S!==void 0?S:O,[O,S]),M=p.useMemo(()=>Dm(t),[t]),A=p.useMemo(()=>Em(t,M,R),[t,M,R]),F=p.useCallback(q=>l.getSectionsFromValue(q,te=>Oa({utils:t,localeText:n,localizedDigits:M,format:h,date:te,formatDensity:v,shouldRespectLeadingZeros:C,enableAccessibleFieldDOMStructure:x,isRtl:r})),[l,h,n,M,r,C,t,v,x]),[I,T]=p.useState(()=>{const q=F(P),te={sections:q,lastExternalValue:P,lastSectionsDependencies:{format:h,isRtl:r,locale:t.locale},tempValueStrAndroid:null,characterQuery:null},le=Sm(q),W=i.getInitialReferenceValue({referenceDate:y,value:P,utils:t,props:c,granularity:le,timezone:R});return E({},te,{referenceValue:W})}),[L,Q]=On({controlled:f,default:null,name:"useField",state:"selectedSections"}),N=q=>{Q(q),b?.(q)},J=p.useMemo(()=>jr(L,I.sections),[L,I.sections]),z=J==="all"?0:J,oe=p.useMemo(()=>Nm(I.sections,r&&!x),[I.sections,r,x]),ne=p.useMemo(()=>I.sections.every(q=>q.value===""),[I.sections]),ae=q=>{const te={validationError:s({adapter:o,value:q,timezone:R,props:c})};k(q,te)},Y=(q,te)=>{const le=[...I.sections];return le[q]=E({},le[q],{value:te,modified:!0}),le},re=p.useRef(null),ue=Tn(),me=q=>{z!=null&&(re.current={sectionIndex:z,value:q},ue.start(0,()=>{re.current=null}))},se=()=>{i.areValuesEqual(t,P,i.emptyValue)?T(q=>E({},q,{sections:q.sections.map(te=>E({},te,{value:""})),tempValueStrAndroid:null,characterQuery:null})):(T(q=>E({},q,{characterQuery:null})),ae(i.emptyValue))},X=()=>{if(z==null)return;const q=I.sections[z];q.value!==""&&(me(""),l.getDateFromSection(P,q)===null?T(te=>E({},te,{sections:Y(z,""),tempValueStrAndroid:null,characterQuery:null})):(T(te=>E({},te,{characterQuery:null})),ae(l.updateDateInValue(P,q,null))))},H=q=>{const te=(W,j)=>{const U=t.parse(W,h);if(!t.isValid(U))return null;const be=Oa({utils:t,localeText:n,localizedDigits:M,format:h,date:U,formatDensity:v,shouldRespectLeadingZeros:C,enableAccessibleFieldDOMStructure:x,isRtl:r});return _a(t,U,be,j,!1)},le=l.parseValueStr(q,I.referenceValue,te);ae(le)},K=Tn(),Z=({section:q,newSectionValue:te,shouldGoToNextSection:le})=>{ue.clear(),K.clear();const W=l.getDateFromSection(P,q);le&&z<I.sections.length-1&&N(z+1);const j=Y(z,te),U=l.getDateSectionsFromValue(j,q),be=Im(t,U,M);if(t.isValid(be)){const ve=_a(t,be,U,l.getDateFromSection(I.referenceValue,q),!0);return W==null&&K.start(0,()=>{_.current===P&&T(je=>E({},je,{sections:l.clearDateSections(I.sections,q),tempValueStrAndroid:null}))}),ae(l.updateDateInValue(P,q,ve))}return U.every(ve=>ve.value!=="")?(me(te),ae(l.updateDateInValue(P,q,be))):W!=null?(me(te),ae(l.updateDateInValue(P,q,null))):T(ve=>E({},ve,{sections:j,tempValueStrAndroid:null}))},G=q=>T(te=>E({},te,{tempValueStrAndroid:q})),de=pe(q=>{T(te=>E({},te,{characterQuery:q}))});if(P!==I.lastExternalValue){let q;re.current!=null&&!t.isValid(l.getDateFromSection(P,I.sections[re.current.sectionIndex]))?q=Y(re.current.sectionIndex,re.current.value):q=F(P),T(te=>E({},te,{lastExternalValue:P,sections:q,sectionsDependencies:{format:h,isRtl:r,locale:t.locale},referenceValue:l.updateReferenceValue(t,P,te.referenceValue),tempValueStrAndroid:null}))}if(r!==I.lastSectionsDependencies.isRtl||h!==I.lastSectionsDependencies.format||t.locale!==I.lastSectionsDependencies.locale){const q=F(P);T(te=>E({},te,{lastSectionsDependencies:{format:h,isRtl:r,locale:t.locale},sections:q,tempValueStrAndroid:null,characterQuery:null}))}I.characterQuery!=null&&!$&&z==null&&de(null),I.characterQuery!=null&&I.sections[I.characterQuery.sectionIndex]?.type!==I.characterQuery.sectionType&&de(null),p.useEffect(()=>{re.current!=null&&(re.current=null)});const ee=Tn();return p.useEffect(()=>(I.characterQuery!=null&&ee.start(mw,()=>de(null)),()=>{}),[I.characterQuery,de,ee]),p.useEffect(()=>{I.tempValueStrAndroid!=null&&z!=null&&X()},[I.sections]),{activeSectionIndex:z,areAllSectionsEmpty:ne,error:$,localizedDigits:M,parsedSelectedSections:J,sectionOrder:oe,sectionsValueBoundaries:A,state:I,timezone:R,value:P,clearValue:se,clearActiveSection:X,setCharacterQuery:de,setSelectedSections:N,setTempAndroidValueStr:G,updateSectionValue:Z,updateValueFromValueStr:H,getSectionsFromValue:F}};function Vc(e){const{manager:{internal_useApplyDefaultValuesToFieldInternalProps:t},internalProps:n,skipContextFieldRefAssignment:o}=e,r=Cs(),s=Fl(),a=rt(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?E({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 zs(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(ot(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 Bc(e){const t=Ie(),{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:g,clearValue:h,clearActiveSection:v,setSelectedSections:f,updateSectionValue:b}}=e;return pe(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(g.startIndex);else if(c==="all")f(g.endIndex);else{const w=g.neighbors[c].rightIndex;w!==null&&f(w)}break}case C.key==="ArrowLeft":{if(C.preventDefault(),c==null)f(g.endIndex);else if(c==="all")f(g.startIndex);else{const w=g.neighbors[c].leftIndex;w!==null&&f(w)}break}case C.key==="Delete":{if(C.preventDefault(),s)break;c==null||c==="all"?h():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=gw(t,y,w,C.key,d,m,n.getDateFromSection(i,w),{minutesStep:o});b({section:w,newSectionValue:x,shouldGoToNextSection:!1});break}}})}function hw(e){switch(e){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}}function gw(e,t,n,o,r,s,a,i){const l=hw(o),c=o==="Home",d=o==="End",m=n.value===""||c||d,y=()=>{const h=r[n.type]({currentDate:a,format:n.format,contentType:n.contentType}),v=C=>Dl(e,C,h,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=h.minimum:b=h.maximum}else b=parseInt(un(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>h.maximum?v(h.minimum+(b-h.maximum-1)%(h.maximum-h.minimum+1)):b<h.minimum?v(h.maximum-(h.minimum-b-1)%(h.maximum-h.minimum+1)):v(b)},g=()=>{const h=Ml(e,t,n.type,n.format);if(h.length===0)return n.value;if(m)return l>0||c?h[0]:h[h.length-1];const b=((h.indexOf(n.value)+l)%h.length+h.length)%h.length;return h[b]};return n.contentType==="digit"||n.contentType==="digit-with-letter"?y():g()}function bw(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:g,updateValueFromValueStr:h},internalPropsWithDefaults:{disabled:v=!1,readOnly:f=!1}}=e,b=Bc({manager:t,internalPropsWithDefaults:i,stateResponse:s}),C=Tn(),w=pe(R=>{v||!r.isReady()||(o(!0),l==="all"?C.start(0,()=>{const _=document.getSelection().getRangeAt(0).startOffset;if(_===0){g(c.startIndex);return}let O=0,$=0;for(;$<_&&O<d.sections.length;){const M=d.sections[O];O+=1,$+=`${M.startSeparator}${M.value||M.placeholder}${M.endSeparator}`.length}g(O-1)}):n?r.getRoot().contains(R.target)||g(c.startIndex):(o(!0),g(c.startIndex)))}),x=pe(R=>{if(!r.isReady()||l!=="all")return;const O=R.target.textContent??"";r.getRoot().innerHTML=d.sections.map($=>`${$.startSeparator}${$.value||$.placeholder}${$.endSeparator}`).join(""),zs({focused:n,domGetters:r,stateResponse:s}),O.length===0||O.charCodeAt(0)===10?(m(),g("all")):O.length>1?h(O):(l==="all"&&g(0),a({keyPressed:O,sectionIndex:0}))}),S=pe(R=>{if(f||l!=="all"){R.preventDefault();return}const _=R.clipboardData.getData("text");R.preventDefault(),y(null),h(_)}),P=pe(()=>{if(n||v||!r.isReady())return;const R=ot(document);o(!0),r.getSectionIndexFromDOMElement(R)!=null||g(c.startIndex)}),k=pe(()=>{setTimeout(()=>{if(!r.isReady())return;const R=ot(document);!r.getRoot().contains(R)&&(o(!1),g(null))})});return{onKeyDown:b,onBlur:k,onFocus:P,onClick:w,onPaste:S,onInput:x,contentEditable:l==="all",tabIndex:l===0?-1:0}}function yw(e){const{manager:{internal_fieldValueManager:t},stateResponse:{areAllSectionsEmpty:n,state:o,updateValueFromValueStr:r}}=e,s=pe(i=>{r(i.target.value)});return{value:p.useMemo(()=>n?"":t.getV7HiddenInputValueFromSections(o.sections),[n,o.sections,t]),onChange:s}}function vw(e){const{stateResponse:{setSelectedSections:t},internalPropsWithDefaults:{disabled:n=!1}}=e,o=pe(r=>s=>{n||s.isDefaultPrevented()||t(r)});return p.useCallback(r=>({"data-sectionindex":r,onClick:o(r)}),[o])}function xw(e){const t=Ie(),n=ct(),o=ko(),{focused:r,domGetters:s,stateResponse:a,applyCharacterEditing:i,manager:{internal_fieldValueManager:l},stateResponse:{parsedSelectedSections:c,sectionsValueBoundaries:d,state:m,value:y,clearActiveSection:g,setCharacterQuery:h,setSelectedSections:v,updateSectionValue:f,updateValueFromValueStr:b},internalPropsWithDefaults:{disabled:C=!1,readOnly:w=!1}}=e,x=c==="all",S=!x&&!C&&!w,P=pe(M=>{if(!s.isReady())return;const A=m.sections[M];s.getSectionContent(M).innerHTML=A.value||A.placeholder,zs({focused:r,domGetters:s,stateResponse:a})}),k=pe(M=>{if(!s.isReady())return;const A=M.target,F=A.textContent??"",I=s.getSectionIndexFromDOMElement(A),T=m.sections[I];if(w){P(I);return}if(F.length===0){if(T.value===""){P(I);return}const L=M.nativeEvent.inputType;if(L==="insertParagraph"||L==="insertLineBreak"){P(I);return}P(I),g();return}i({keyPressed:F,sectionIndex:I}),P(I)}),R=pe(M=>{M.preventDefault()}),_=pe(M=>{if(M.preventDefault(),w||C||typeof c!="number")return;const A=m.sections[c],F=M.clipboardData.getData("text"),I=/^[a-zA-Z]+$/.test(F),T=/^[0-9]+$/.test(F),L=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(F);A.contentType==="letter"&&I||A.contentType==="digit"&&T||A.contentType==="digit-with-letter"&&L?(h(null),f({section:A,newSectionValue:F,shouldGoToNextSection:!0})):!I&&!T&&(h(null),b(F))}),O=pe(M=>{M.preventDefault(),M.dataTransfer.dropEffect="none"}),$=pe(M=>()=>{C||v(M)});return p.useCallback((M,A)=>{const F=d[M.type]({currentDate:l.getDateFromSection(y,M),contentType:M.contentType,format:M.format});return{onInput:k,onPaste:_,onMouseUp:R,onDragOver:O,onFocus:$(A),"aria-labelledby":`${o}-${M.type}`,"aria-readonly":w,"aria-valuenow":Cw(M,t),"aria-valuemin":F.minimum,"aria-valuemax":F.maximum,"aria-valuetext":M.value?ww(M,t):n.empty,"aria-label":n[M.type],"aria-disabled":C,tabIndex:x||A>0?-1:0,contentEditable:!x&&!C&&!w,role:"spinbutton",id:`${o}-${M.type}`,"data-range-position":M.dateName||void 0,spellCheck:S?!1:void 0,autoCapitalize:S?"off":void 0,autoCorrect:S?"off":void 0,children:M.value||M.placeholder,inputMode:M.contentType==="letter"?"text":"numeric"}},[d,o,x,C,w,S,n,t,k,_,R,O,$,l,y])}function ww(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 Cw(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 kw=e=>{const{props:t,manager:n,skipContextFieldRefAssignment:o,manager:{valueType:r,internal_useOpenPickerButtonAriaLabel:s}}=e,{internalProps:a,forwardedProps:i}=Bl(t,r),l=Vc({manager:n,internalProps:a,skipContextFieldRefAssignment:o}),{sectionListRef:c,onBlur:d,onClick:m,onFocus:y,onInput:g,onPaste:h,onKeyDown:v,onClear:f,clearable:b}=i,{disabled:C=!1,readOnly:w=!1,autoFocus:x=!1,focused:S,unstableFieldRef:P}=l,k=p.useRef(null),R=rt(c,k),_=p.useMemo(()=>({isReady:()=>k.current!=null,getRoot:()=>k.current.getRoot(),getSectionContainer:ee=>k.current.getSectionContainer(ee),getSectionContent:ee=>k.current.getSectionContent(ee),getSectionIndexFromDOMElement:ee=>k.current.getSectionIndexFromDOMElement(ee)}),[k]),O=Lc({manager:n,internalPropsWithDefaults:l,forwardedProps:i}),{areAllSectionsEmpty:$,error:M,parsedSelectedSections:A,sectionOrder:F,state:I,value:T,clearValue:L,setSelectedSections:Q}=O,N=jc({stateResponse:O}),J=s(T),[z,oe]=p.useState(!1);function ne(ee=0){if(C||!k.current||hi(k)!=null)return;const q=jr(ee,I.sections);oe(!0),k.current.getSectionContent(q).focus()}const ae=bw({manager:n,internalPropsWithDefaults:l,stateResponse:O,applyCharacterEditing:N,focused:z,setFocused:oe,domGetters:_}),Y=yw({manager:n,stateResponse:O}),re=vw({stateResponse:O,internalPropsWithDefaults:l}),ue=xw({manager:n,stateResponse:O,applyCharacterEditing:N,internalPropsWithDefaults:l,domGetters:_,focused:z}),me=pe(ee=>{v?.(ee),ae.onKeyDown(ee)}),se=pe(ee=>{d?.(ee),ae.onBlur(ee)}),X=pe(ee=>{y?.(ee),ae.onFocus(ee)}),H=pe(ee=>{ee.isDefaultPrevented()||(m?.(ee),ae.onClick(ee))}),K=pe(ee=>{h?.(ee),ae.onPaste(ee)}),Z=pe(ee=>{g?.(ee),ae.onInput(ee)}),G=pe((ee,...q)=>{ee.preventDefault(),f?.(ee,...q),L(),gi(k)?Q(F.startIndex):ne(0)}),de=p.useMemo(()=>I.sections.map((ee,q)=>{const te=ue(ee,q);return{container:re(q),content:ue(ee,q),before:{children:ee.startSeparator},after:{children:ee.endSeparator,"data-range-position":ee.isEndFormatSeparator?te["data-range-position"]:void 0}}}),[I.sections,re,ue]);return p.useEffect(()=>{if(k.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(`
|
|
115
|
-
`));x&&!C&&k.current&&k.current.getSectionContent(F.startIndex).focus()},[]),pt(()=>{if(!(!z||!k.current)){if(A==="all")k.current.getRoot().focus();else if(typeof A=="number"){const ee=k.current.getSectionContent(A);ee&&ee.focus()}}},[A,z]),pt(()=>{zs({focused:z,domGetters:_,stateResponse:O})}),p.useImperativeHandle(P,()=>({getSections:()=>I.sections,getActiveSectionIndex:()=>hi(k),setSelectedSections:ee=>{if(C||!k.current)return;const q=jr(ee,I.sections);oe((q==="all"?0:q)!==null),Q(ee)},focusField:ne,isFieldFocused:()=>gi(k)})),E({},i,ae,{onBlur:se,onClick:H,onFocus:X,onInput:Z,onPaste:K,onKeyDown:me,onClear:G},Y,{error:M,clearable:!!(b&&!$&&!w&&!C),focused:S??z,sectionListRef:R,enableAccessibleFieldDOMStructure:!0,elements:de,areAllSectionsEmpty:$,disabled:C,readOnly:w,autoFocus:x,openPickerAriaLabel:J})};function hi(e){const t=ot(document);return!t||!e.current||!e.current.getRoot().contains(t)?null:e.current.getSectionIndexFromDOMElement(t)}function gi(e){const t=ot(document);return!!e.current&&e.current.getRoot().contains(t)}const Dn=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),Sw=(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=vs(i,n?"input-rtl":"input-ltr",t),c=`${i.startSeparator}${l}${i.endSeparator}`,d=Dn(c).length,m=c.length,y=Dn(l),g=r+(y===""?0:l.indexOf(y[0]))+i.startSeparator.length,h=g+y.length;s.push(E({},i,{start:o,end:o+d,startInInput:g,endInInput:h})),o+=d,r+=m}return s},Pw=e=>{const t=Ct(),n=Tn(),o=Tn(),{props:r,manager:s,skipContextFieldRefAssignment:a,manager:{valueType:i,internal_valueManager:l,internal_fieldValueManager:c,internal_useOpenPickerButtonAriaLabel:d}}=e,{internalProps:m,forwardedProps:y}=Bl(r,i),g=Vc({manager:s,internalProps:m,skipContextFieldRefAssignment:a}),{onFocus:h,onClick:v,onPaste:f,onBlur:b,onKeyDown:C,onClear:w,clearable:x,inputRef:S,placeholder:P}=y,{readOnly:k=!1,disabled:R=!1,autoFocus:_=!1,focused:O,unstableFieldRef:$}=g,M=p.useRef(null),A=rt(S,M),F=Lc({manager:s,internalPropsWithDefaults:g,forwardedProps:y}),{activeSectionIndex:I,areAllSectionsEmpty:T,error:L,localizedDigits:Q,parsedSelectedSections:N,sectionOrder:J,state:z,value:oe,clearValue:ne,clearActiveSection:ae,setCharacterQuery:Y,setSelectedSections:re,setTempAndroidValueStr:ue,updateSectionValue:me,updateValueFromValueStr:se,getSectionsFromValue:X}=F,H=jc({stateResponse:F}),K=d(oe),Z=p.useMemo(()=>Sw(z.sections,Q,t),[z.sections,Q,t]);function G(){const ye=M.current.selectionStart??0;let xe;ye<=Z[0].startInInput||ye>=Z[Z.length-1].endInInput?xe=1:xe=Z.findIndex(Ne=>Ne.startInInput-Ne.startSeparator.length>ye);const ge=xe===-1?Z.length-1:xe-1;re(ge)}function de(ye=0){ot(document)!==M.current&&(M.current?.focus(),re(ye))}const ee=pe(ye=>{h?.(ye);const xe=M.current;n.start(0,()=>{!xe||xe!==M.current||I==null&&(xe.value.length&&Number(xe.selectionEnd)-Number(xe.selectionStart)===xe.value.length?re("all"):G())})}),q=pe((ye,...xe)=>{ye.isDefaultPrevented()||(v?.(ye,...xe),G())}),te=pe(ye=>{if(f?.(ye),ye.preventDefault(),k||R)return;const xe=ye.clipboardData.getData("text");if(typeof N=="number"){const ge=z.sections[N],Ne=/^[a-zA-Z]+$/.test(xe),Ye=/^[0-9]+$/.test(xe),fe=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(xe);if(ge.contentType==="letter"&&Ne||ge.contentType==="digit"&&Ye||ge.contentType==="digit-with-letter"&&fe){Y(null),me({section:ge,newSectionValue:xe,shouldGoToNextSection:!0});return}if(Ne||Ye)return}Y(null),se(xe)}),le=pe(ye=>{b?.(ye),re(null)}),W=pe(ye=>{if(k)return;const xe=ye.target.value;if(xe===""){ne();return}const ge=ye.nativeEvent.data,Ne=ge&&ge.length>1,Ye=Ne?ge:xe,fe=Dn(Ye);if(N==="all"&&re(I),I==null||Ne){se(Ne?ge:fe);return}let ke;if(N==="all"&&fe.length===1)ke=fe;else{const De=Dn(c.getV6InputValueFromSections(Z,Q,t));let we=-1,Ge=-1;for(let mt=0;mt<De.length;mt+=1)we===-1&&De[mt]!==fe[mt]&&(we=mt),Ge===-1&&De[De.length-mt-1]!==fe[fe.length-mt-1]&&(Ge=mt);const st=Z[I];if(we<st.start||De.length-Ge-1>st.end)return;const Ro=fe.length-De.length+st.end-Dn(st.endSeparator||"").length;ke=fe.slice(st.start+Dn(st.startSeparator||"").length,Ro)}if(ke.length===0){Fm()&&ue(Ye),ae();return}H({keyPressed:ke,sectionIndex:I})}),j=pe((ye,...xe)=>{ye.preventDefault(),w?.(ye,...xe),ne(),bi(M)?re(J.startIndex):de(0)}),U=Bc({manager:s,internalPropsWithDefaults:g,stateResponse:F}),be=pe(ye=>{C?.(ye),U(ye)}),ve=p.useMemo(()=>P!==void 0?P:c.getV6InputValueFromSections(X(l.emptyValue),Q,t),[P,c,X,l.emptyValue,Q,t]),je=p.useMemo(()=>z.tempValueStrAndroid??c.getV6InputValueFromSections(z.sections,Q,t),[z.sections,c,z.tempValueStrAndroid,Q,t]);p.useEffect(()=>{M.current&&M.current===ot(document)&&re("all")},[]),pt(()=>{function ye(){if(!M.current)return;if(N==null){M.current.scrollLeft&&(M.current.scrollLeft=0);return}if(M.current!==ot(document))return;const xe=M.current.scrollTop;if(N==="all")M.current.select();else{const ge=Z[N],Ne=ge.type==="empty"?ge.startInInput-ge.startSeparator.length:ge.startInInput,Ye=ge.type==="empty"?ge.endInInput+ge.endSeparator.length:ge.endInInput;(Ne!==M.current.selectionStart||Ye!==M.current.selectionEnd)&&M.current===ot(document)&&M.current.setSelectionRange(Ne,Ye),o.start(0,()=>{M.current&&M.current===ot(document)&&M.current.selectionStart===M.current.selectionEnd&&(M.current.selectionStart!==Ne||M.current.selectionEnd!==Ye)&&ye()})}M.current.scrollTop=xe}ye()});const Me=p.useMemo(()=>I==null||z.sections[I].contentType==="letter"?"text":"numeric",[I,z.sections]),Ke=!(M.current&&M.current===ot(document))&&T;return p.useImperativeHandle($,()=>({getSections:()=>z.sections,getActiveSectionIndex:()=>{const ye=M.current.selectionStart??0,xe=M.current.selectionEnd??0;if(ye===0&&xe===0)return null;const ge=ye<=Z[0].startInInput?1:Z.findIndex(Ne=>Ne.startInInput-Ne.startSeparator.length>ye);return ge===-1?Z.length-1:ge-1},setSelectedSections:ye=>re(ye),focusField:de,isFieldFocused:()=>bi(M)})),E({},y,{error:L,clearable:!!(x&&!T&&!k&&!R),onBlur:le,onClick:q,onFocus:ee,onPaste:te,onKeyDown:be,onClear:j,inputRef:A,enableAccessibleFieldDOMStructure:!1,placeholder:ve,inputMode:Me,autoComplete:"off",value:Ke?"":je,onChange:W,focused:O,disabled:R,readOnly:k,autoFocus:_,openPickerAriaLabel:K})};function bi(e){return e.current===ot(document)}const zc=e=>{const t=Fl();return(e.props.enableAccessibleFieldDOMStructure??t?.enableAccessibleFieldDOMStructure??!0?kw:Pw)(e)};function Mw(e={}){const{enableAccessibleFieldDOMStructure:t=!0,ampm:n}=e;return p.useMemo(()=>({valueType:"time",validator:cr,internal_valueManager:tt,internal_fieldValueManager:Il,internal_enableAccessibleFieldDOMStructure:t,internal_useApplyDefaultValuesToFieldInternalProps:Tw,internal_useOpenPickerButtonAriaLabel:Dw(n)}),[n,t])}function Dw(e){return function(n){const o=Ie(),r=ct();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 Tw(e){const t=Ie(),n=Hc(e),o=p.useMemo(()=>e.ampm??t.is12HourCycleInCurrentLocale(),[e.ampm,t]);return p.useMemo(()=>E({},e,n,{format:e.format??(o?t.formats.fullTime12h:t.formats.fullTime24h)}),[e,n,o,t])}function Hc(e){return p.useMemo(()=>({disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1}),[e.disablePast,e.disableFuture])}const Iw=e=>{const t=bh(e);return zc({manager:t,props:e})},Rw=["slots","slotProps"],Wc=p.forwardRef(function(t,n){const o=Te({props:t,name:"MuiDateField"}),{slots:r,slotProps:s}=o,a=he(o,Rw),i=Fc({slotProps:s,ref:n,externalForwardedProps:a}),l=Iw(i);return u.jsx(Oc,{slots:r,slotProps:s,fieldResponse:l,defaultOpenPickerIcon:gx})}),Uc=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:o,maxDate:r,disableFuture:s,disablePast:a,timezone:i})=>{const l=hn();return p.useCallback(c=>Po({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])},_w=(e,t)=>(n,o)=>{switch(o.type){case"setVisibleDate":return E({},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))),E({},n,{currentMonth:s})}case"finishMonthSwitchingAnimation":return E({},n,{isMonthSwitchingAnimating:!1});default:throw new Error("missing support")}},Ew=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,g=Ie(),h=p.useRef(_w(!!c,g)).current,v=p.useMemo(()=>tt.getInitialReferenceValue({value:t,utils:g,timezone:m,props:e,referenceDate:n,granularity:Mt.day}),[n,m]),[f,b]=p.useReducer(h,{isMonthSwitchingAnimating:!1,focusedDay:v,currentMonth:g.startOfMonth(v),slideDirection:"left"}),C=Uc({shouldDisableDate:d,minDate:a,maxDate:s,disableFuture:o,disablePast:r,timezone:m});p.useEffect(()=>{b({type:"changeMonthTimezone",newTimezone:g.getTimezone(v)})},[v,g]);const w=pe(({target:S,reason:P})=>{if(P==="cell-interaction"&&f.focusedDay!=null&&g.isSameDay(S,f.focusedDay))return;const k=P==="cell-interaction";let R,_;if(P==="cell-interaction")R=y(S,f.currentMonth),_=S;else if(R=g.isSameMonth(S,f.currentMonth)?f.currentMonth:g.startOfMonth(S),_=S,C(_)){const M=g.startOfMonth(S),A=g.endOfMonth(S);_=uo({utils:g,date:_,minDate:g.isBefore(a,M)?M:a,maxDate:g.isAfter(s,A)?A:s,disablePast:r,disableFuture:o,isDateDisabled:C,timezone:m})}const O=!g.isSameMonth(f.currentMonth,R),$=!g.isSameYear(f.currentMonth,R);O&&i?.(R),$&&l?.(g.startOfYear(R)),b({type:"setVisibleDate",month:R,direction:g.isAfterDay(R,f.currentMonth)?"left":"right",focusedDay:f.focusedDay!=null&&_!=null&&g.isSameDay(_,f.focusedDay)?f.focusedDay:_,skipAnimation:k})}),x=p.useCallback(()=>{b({type:"finishMonthSwitchingAnimation"})},[]);return{referenceDate:v,calendarState:f,setVisibleDate:w,isDateDisabled:C,onMonthSwitchingAnimationEnd:x}},Ow=e=>Ve("MuiPickersFadeTransitionGroup",e);ze("MuiPickersFadeTransitionGroup",["root"]);const Fw=["children"],Nw=e=>Oe({root:["root"]},Ow,e),Aw=V(Co,{name:"MuiPickersFadeTransitionGroup",slot:"Root"})({display:"block",position:"relative"});function Yc(e){const t=Te({props:e,name:"MuiPickersFadeTransitionGroup"}),{className:n,reduceAnimations:o,transKey:r,classes:s}=t,{children:a}=t,i=he(t,Fw),l=Nw(s),c=Hn();return o?a:u.jsx(Aw,{className:ie(l.root,n),ownerState:i,children:u.jsx(dn,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:c.transitions.duration.enteringScreen,enter:c.transitions.duration.enteringScreen,exit:0},children:a},r)})}function $w(e){return Ve("MuiPickersDay",e)}const tn=ze("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]);function qc(e){const{disabled:t,selected:n,today:o,outsideCurrentMonth:r,day:s,disableMargin:a,disableHighlightToday:i,showDaysOutsideCurrentMonth:l}=e,c=Ie(),{ownerState:d}=We();return p.useMemo(()=>E({},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 jw=["autoFocus","className","classes","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","children","isFirstVisibleCell","isLastVisibleCell","day","selected","disabled","today","outsideCurrentMonth","disableMargin","disableHighlightToday","showDaysOutsideCurrentMonth"],Lw=(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"]},$w,e)},Kc=({theme:e})=>E({},e.typography.caption,{width:go,height:go,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})`:Re(e.palette.primary.main,e.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:Re(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${tn.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${tn.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}},[`&.${tn.disabled}:not(.${tn.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${tn.disabled}&.${tn.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:`0 ${pr}px`}},{props:{isDayOutsideMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(e.vars||e).palette.text.secondary}},{props:{disableHighlightToday:!1,isDayCurrent:!0},style:{[`&:not(.${tn.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}}]}),Gc=(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]},Vw=V(Ln,{name:"MuiPickersDay",slot:"Root",overridesResolver:Gc})(Kc),Bw=V("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:Gc})(({theme:e})=>E({},Kc({theme:e}),{opacity:0,pointerEvents:"none"})),Zn=()=>{},zw=p.forwardRef(function(t,n){const o=Te({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:g=Zn,onMouseEnter:h=Zn,children:v,day:f,selected:b,disabled:C,today:w,outsideCurrentMonth:x,disableMargin:S,disableHighlightToday:P,showDaysOutsideCurrentMonth:k}=o,R=he(o,jw),_=qc({day:f,selected:b,disabled:C,today:w,outsideCurrentMonth:x,disableMargin:S,disableHighlightToday:P,showDaysOutsideCurrentMonth:k}),O=Lw(a,_),$=Ie(),M=p.useRef(null),A=rt(M,n);pt(()=>{r&&!C&&!i&&!x&&M.current.focus()},[r,C,i,x]);const F=T=>{g(T),x&&T.preventDefault()},I=T=>{C||c(f),x&&T.currentTarget.focus(),l&&l(T)};return x&&!k?u.jsx(Bw,{className:ie(O.root,O.hiddenDaySpacingFiller,s),ownerState:_,role:R.role}):u.jsx(Vw,E({className:ie(O.root,s),ref:A,centerRipple:!0,disabled:C,tabIndex:b?0:-1,onKeyDown:T=>y(T,f),onFocus:T=>d(T,f),onBlur:T=>m(T,f),onMouseEnter:T=>h(T,f),onClick:I,onMouseDown:F},R,{ownerState:_,children:v||$.format(f,"dayOfMonth")}))}),Hw=p.memo(zw),Ww=e=>Ve("MuiPickersSlideTransition",e),ht=ze("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),Uw=["children","className","reduceAnimations","slideDirection","transKey","classes"],Yw=(e,t)=>{const{slideDirection:n}=t,o={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return Oe(o,Ww,e)},qw=V(Co,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${ht["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${ht["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${ht.slideEnterActive}`]:t.slideEnterActive},{[`.${ht.slideExit}`]:t.slideExit},{[`.${ht["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${ht["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},[`& .${ht["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${ht["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${ht.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${ht.slideExit}`]:{transform:"translate(0%)"},[`& .${ht["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${ht["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}});function Kw(e){const t=Te({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:o,reduceAnimations:r,slideDirection:s,transKey:a,classes:i}=t,l=he(t,Uw),{ownerState:c}=We(),d=E({},c,{slideDirection:s}),m=Yw(i,d),y=Hn();if(r)return u.jsx("div",{className:ie(m.root,o),children:n});const g={exit:m.exit,enterActive:m.enterActive,enter:m.enter,exitActive:m.exitActive};return u.jsx(qw,{className:ie(m.root,o),childFactory:h=>p.cloneElement(h,{classNames:g}),role:"presentation",ownerState:d,children:u.jsx(us,E({mountOnEnter:!0,unmountOnExit:!0,timeout:y.transitions.duration.complex,classNames:g},l,{children:n}),a)})}const Gw=e=>Ve("MuiDayCalendar",e);ze("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);const Qw=["parentProps","day","focusedDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],Xw=["ownerState"],Zw=e=>Oe({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},Gw,e),Qc=(go+pr*2)*6,Jw=V("div",{name:"MuiDayCalendar",slot:"Root"})({}),eC=V("div",{name:"MuiDayCalendar",slot:"Header"})({display:"flex",justifyContent:"center",alignItems:"center"}),tC=V(zt,{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})),nC=V(zt,{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})),oC=V(zt,{name:"MuiDayCalendar",slot:"WeekNumber"})(({theme:e})=>E({},e.typography.caption,{width:go,height:go,padding:0,margin:`0 ${pr}px`,color:(e.vars||e).palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),rC=V("div",{name:"MuiDayCalendar",slot:"LoadingContainer"})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:Qc}),sC=V(Kw,{name:"MuiDayCalendar",slot:"SlideTransition"})({minHeight:Qc}),aC=V("div",{name:"MuiDayCalendar",slot:"MonthContainer"})({overflow:"hidden"}),iC=V("div",{name:"MuiDayCalendar",slot:"WeekContainer"})({margin:`${pr}px 0`,display:"flex",justifyContent:"center"});function lC(e){let{parentProps:t,day:n,focusedDay:o,selectedDays:r,isDateDisabled:s,currentMonthNumber:a,isViewFocused:i}=e,l=he(e,Qw);const{disabled:c,disableHighlightToday:d,isMonthSwitchingAnimating:m,showDaysOutsideCurrentMonth:y,slots:g,slotProps:h,timezone:v}=t,f=Ie(),b=gn(v),C=o!=null&&f.isSameDay(n,o),w=i&&C,x=r.some(F=>f.isSameDay(F,n)),S=f.isSameDay(n,b),P=p.useMemo(()=>c||s(n),[c,s,n]),k=p.useMemo(()=>f.getMonth(n)!==a,[f,n,a]),R=qc({day:n,selected:x,disabled:P,today:S,outsideCurrentMonth:k,disableMargin:void 0,disableHighlightToday:d,showDaysOutsideCurrentMonth:y}),_=g?.day??Hw,O=Ae({elementType:_,externalSlotProps:h?.day,additionalProps:E({disableHighlightToday:d,showDaysOutsideCurrentMonth:y,role:"gridcell",isAnimating:m,"data-timestamp":f.toJsDate(n).valueOf()},l),ownerState:E({},R,{day:n,isDayDisabled:P,isDaySelected:x})}),$=he(O,Xw),M=p.useMemo(()=>{const F=f.startOfMonth(f.setMonth(n,a));return y?f.isSameDay(n,f.startOfWeek(F)):f.isSameDay(n,F)},[a,n,y,f]),A=p.useMemo(()=>{const F=f.endOfMonth(f.setMonth(n,a));return y?f.isSameDay(n,f.endOfWeek(F)):f.isSameDay(n,F)},[a,n,y,f]);return u.jsx(_,E({},$,{day:n,disabled:P,autoFocus:!k&&w,today:S,outsideCurrentMonth:k,isFirstVisibleCell:M,isLastVisibleCell:A,selected:x,tabIndex:C?0:-1,"aria-selected":x,"aria-current":S?"date":void 0}))}function cC(e){const t=Te({props:e,name:"MuiDayCalendar"}),n=Ie(),{onFocusedDayChange:o,className:r,classes:s,currentMonth:a,selectedDays:i,focusedDay:l,loading:c,onSelectedDaysChange:d,onMonthSwitchingAnimationEnd:m,readOnly:y,reduceAnimations:g,renderLoading:h=()=>u.jsx("span",{children:"..."}),slideDirection:v,TransitionProps:f,disablePast:b,disableFuture:C,minDate:w,maxDate:x,shouldDisableDate:S,shouldDisableMonth:P,shouldDisableYear:k,dayOfWeekFormatter:R=H=>n.format(H,"weekdayShort").charAt(0).toUpperCase(),hasFocus:_,onFocusedViewChange:O,gridLabelId:$,displayWeekNumber:M,fixedWeekNumber:A,timezone:F}=t,I=gn(F),T=Zw(s),L=Ct(),Q=Uc({shouldDisableDate:S,shouldDisableMonth:P,shouldDisableYear:k,minDate:w,maxDate:x,disablePast:b,disableFuture:C,timezone:F}),N=ct(),J=pe(H=>{y||d(H)}),z=H=>{Q(H)||(o(H),O?.(!0))},oe=pe((H,K)=>{switch(H.key){case"ArrowUp":z(n.addDays(K,-7)),H.preventDefault();break;case"ArrowDown":z(n.addDays(K,7)),H.preventDefault();break;case"ArrowLeft":{const Z=n.addDays(K,L?1:-1),G=n.addMonths(K,L?1:-1),de=uo({utils:n,date:Z,minDate:L?Z:n.startOfMonth(G),maxDate:L?n.endOfMonth(G):Z,isDateDisabled:Q,timezone:F});z(de||Z),H.preventDefault();break}case"ArrowRight":{const Z=n.addDays(K,L?-1:1),G=n.addMonths(K,L?-1:1),de=uo({utils:n,date:Z,minDate:L?n.startOfMonth(G):Z,maxDate:L?Z:n.endOfMonth(G),isDateDisabled:Q,timezone:F});z(de||Z),H.preventDefault();break}case"Home":z(n.startOfWeek(K)),H.preventDefault();break;case"End":z(n.endOfWeek(K)),H.preventDefault();break;case"PageUp":z(n.addMonths(K,1)),H.preventDefault();break;case"PageDown":z(n.addMonths(K,-1)),H.preventDefault();break}}),ne=pe((H,K)=>z(K)),ae=pe((H,K)=>{l!=null&&n.isSameDay(l,K)&&O?.(!1)}),Y=n.getMonth(a),re=n.getYear(a),ue=p.useMemo(()=>i.filter(H=>!!H).map(H=>n.startOfDay(H)),[n,i]),me=`${re}-${Y}`,se=p.useMemo(()=>p.createRef(),[me]),X=p.useMemo(()=>{const H=n.getWeekArray(a);let K=n.addMonths(a,1);for(;A&&H.length<A;){const Z=n.getWeekArray(K),G=n.isSameDay(H[H.length-1][0],Z[0][0]);Z.slice(G?1:0).forEach(de=>{H.length<A&&H.push(de)}),K=n.addMonths(K,1)}return H},[a,A,n]);return u.jsxs(Jw,{role:"grid","aria-labelledby":$,className:T.root,children:[u.jsxs(eC,{role:"row",className:T.header,children:[M&&u.jsx(nC,{variant:"caption",role:"columnheader","aria-label":N.calendarWeekNumberHeaderLabel,className:T.weekNumberLabel,children:N.calendarWeekNumberHeaderText}),vm(n,I).map((H,K)=>u.jsx(tC,{variant:"caption",role:"columnheader","aria-label":n.format(H,"weekday"),className:T.weekDayLabel,children:R(H)},K.toString()))]}),c?u.jsx(rC,{className:T.loadingContainer,children:h()}):u.jsx(sC,E({transKey:me,onExited:m,reduceAnimations:g,slideDirection:v,className:ie(r,T.slideTransition)},f,{nodeRef:se,children:u.jsx(aC,{ref:se,role:"rowgroup",className:T.monthContainer,children:X.map((H,K)=>u.jsxs(iC,{role:"row",className:T.weekContainer,"aria-rowindex":K+1,children:[M&&u.jsx(oC,{className:T.weekNumber,role:"rowheader","aria-label":N.calendarWeekNumberAriaLabelText(n.getWeekNumber(H[0])),children:N.calendarWeekNumberText(n.getWeekNumber(H[0]))}),H.map((Z,G)=>u.jsx(lC,{parentProps:t,day:Z,selectedDays:ue,isViewFocused:_,focusedDay:l,onKeyDown:oe,onFocus:ne,onBlur:ae,onDaySelect:J,isDateDisabled:Q,currentMonthNumber:Y,"aria-colindex":G+1},Z.toString()))]},`week-${H[0]}`))})}))]})}function Xc(e){return Ve("MuiMonthCalendar",e)}const Ao=ze("MuiMonthCalendar",["root","button","disabled","selected"]),uC=["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,Xc,e)},pC=V("button",{name:"MuiMonthCalendar",slot:"Button",overridesResolver:(e,t)=>[t.button,{[`&.${Ao.disabled}`]:t.disabled},{[`&.${Ao.selected}`]:t.selected}]})(({theme:e})=>E({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})`:Re(e.palette.action.active,e.palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Re(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${Ao.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${Ao.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),fC=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,g=he(t,uC),h=p.useRef(null),{ownerState:v}=We(),f=E({},v,{isMonthDisabled:r,isMonthSelected:s}),b=dC(o,f);pt(()=>{n&&h.current?.focus()},[n]);const C=m?.monthButton??pC,w=Ae({elementType:C,externalSlotProps:y?.monthButton,externalForwardedProps:g,additionalProps:{disabled:r,ref:h,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,E({},w))}),mC=["autoFocus","className","classes","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"],hC=e=>Oe({root:["root"]},Xc,e);function gC(e,t){const n=Te({props:e,name:t}),o=Mo(n);return E({},n,o,{monthsPerRow:n.monthsPerRow??3})}const bC=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:fr,boxSizing:"border-box",variants:[{props:{monthsPerRow:3},style:{columnGap:24}},{props:{monthsPerRow:4},style:{columnGap:0}}]}),yC=p.forwardRef(function(t,n){const o=gC(t,"MuiMonthCalendar"),{autoFocus:r,className:s,classes:a,value:i,defaultValue:l,referenceDate:c,disabled:d,disableFuture:m,disablePast:y,maxDate:g,minDate:h,onChange:v,shouldDisableMonth:f,readOnly:b,onMonthFocus:C,hasFocus:w,onFocusedViewChange:x,monthsPerRow:S,timezone:P,gridLabelId:k,slots:R,slotProps:_}=o,O=he(o,mC),{value:$,handleValueChange:M,timezone:A}=Qt({name:"MonthCalendar",timezone:P,value:i,defaultValue:l,referenceDate:c,onChange:v,valueManager:tt}),F=gn(A),I=Ct(),T=Ie(),{ownerState:L}=We(),Q=p.useMemo(()=>tt.getInitialReferenceValue({value:$,utils:T,props:o,timezone:A,referenceDate:c,granularity:Mt.month}),[]),N=hC(a),J=p.useMemo(()=>T.getMonth(F),[T,F]),z=p.useMemo(()=>$!=null?T.getMonth($):null,[$,T]),[oe,ne]=p.useState(()=>z||T.getMonth(Q)),[ae,Y]=On({name:"MonthCalendar",state:"hasFocus",controlled:w,default:r??!1}),re=pe(Z=>{Y(Z),x&&x(Z)}),ue=p.useCallback(Z=>{const G=T.startOfMonth(y&&T.isAfter(F,h)?F:h),de=T.startOfMonth(m&&T.isBefore(F,g)?F:g),ee=T.startOfMonth(Z);return T.isBefore(ee,G)||T.isAfter(ee,de)?!0:f?f(ee):!1},[m,y,g,h,F,f,T]),me=pe((Z,G)=>{if(b)return;const de=T.setMonth($??Q,G);M(de)}),se=pe(Z=>{ue(T.setMonth($??Q,Z))||(ne(Z),re(!0),C&&C(Z))});p.useEffect(()=>{ne(Z=>z!==null&&Z!==z?z:Z)},[z]);const X=pe((Z,G)=>{switch(Z.key){case"ArrowUp":se((12+G-3)%12),Z.preventDefault();break;case"ArrowDown":se((12+G+3)%12),Z.preventDefault();break;case"ArrowLeft":se((12+G+(I?1:-1))%12),Z.preventDefault();break;case"ArrowRight":se((12+G+(I?-1:1))%12),Z.preventDefault();break}}),H=pe((Z,G)=>{se(G)}),K=pe((Z,G)=>{oe===G&&re(!1)});return u.jsx(bC,E({ref:n,className:ie(N.root,s),ownerState:L,role:"radiogroup","aria-labelledby":k,monthsPerRow:S},O,{children:ms(T,$??Q).map(Z=>{const G=T.getMonth(Z),de=T.format(Z,"monthShort"),ee=T.format(Z,"month"),q=G===z,te=d||ue(Z);return u.jsx(fC,{selected:q,value:G,onClick:me,onKeyDown:X,autoFocus:ae&&G===oe,disabled:te,tabIndex:G===oe&&!te?0:-1,onFocus:H,onBlur:K,"aria-current":J===G?"date":void 0,"aria-label":ee,slots:R,slotProps:_,classes:a,children:de},de)})}))});function Zc(e){return Ve("MuiYearCalendar",e)}const $o=ze("MuiYearCalendar",["root","button","disabled","selected"]),vC=["autoFocus","classes","disabled","selected","value","onClick","onKeyDown","onFocus","onBlur","slots","slotProps"],xC=(e,t)=>{const n={button:["button",t.isYearDisabled&&"disabled",t.isYearSelected&&"selected"]};return Oe(n,Zc,e)},wC=V("button",{name:"MuiYearCalendar",slot:"Button",overridesResolver:(e,t)=>[t.button,{[`&.${$o.disabled}`]:t.disabled},{[`&.${$o.selected}`]:t.selected}]})(({theme:e})=>E({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})`:Re(e.palette.action.active,e.palette.action.focusOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Re(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${$o.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${$o.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),CC=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,g=he(t,vC),h=p.useRef(null),{ownerState:v}=We(),f=E({},v,{isYearDisabled:r,isYearSelected:s}),b=xC(o,f);pt(()=>{n&&h.current?.focus()},[n]);const C=m?.yearButton??wC,w=Ae({elementType:C,externalSlotProps:y?.yearButton,externalForwardedProps:g,additionalProps:{disabled:r,ref:h,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,E({},w))}),kC=["autoFocus","className","classes","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"],SC=e=>Oe({root:["root"]},Zc,e);function PC(e,t){const n=Te({props:e,name:t}),o=Mo(n);return E({},n,o,{yearsPerRow:n.yearsPerRow??3,yearsOrder:n.yearsOrder??"asc"})}const MC=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:fr,maxHeight:hy,boxSizing:"border-box",position:"relative",variants:[{props:{yearsPerRow:3},style:{columnGap:24}},{props:{yearsPerRow:4},style:{columnGap:0,padding:"0 2px"}}]}),DC=V("div",{name:"MuiYearCalendar",slot:"ButtonFiller"})({height:36,width:72}),TC=p.forwardRef(function(t,n){const o=PC(t,"MuiYearCalendar"),{autoFocus:r,className:s,classes:a,value:i,defaultValue:l,referenceDate:c,disabled:d,disableFuture:m,disablePast:y,maxDate:g,minDate:h,onChange:v,readOnly:f,shouldDisableYear:b,onYearFocus:C,hasFocus:w,onFocusedViewChange:x,yearsOrder:S,yearsPerRow:P,timezone:k,gridLabelId:R,slots:_,slotProps:O}=o,$=he(o,kC),{value:M,handleValueChange:A,timezone:F}=Qt({name:"YearCalendar",timezone:k,value:i,defaultValue:l,referenceDate:c,onChange:v,valueManager:tt}),I=gn(F),T=Ct(),L=Ie(),{ownerState:Q}=We(),N=p.useMemo(()=>tt.getInitialReferenceValue({value:M,utils:L,props:o,timezone:F,referenceDate:c,granularity:Mt.year}),[]),J=SC(a),z=p.useMemo(()=>L.getYear(I),[L,I]),oe=p.useMemo(()=>M!=null?L.getYear(M):null,[M,L]),[ne,ae]=p.useState(()=>oe||L.getYear(N)),[Y,re]=On({name:"YearCalendar",state:"hasFocus",controlled:w,default:r??!1}),ue=pe(W=>{re(W),x&&x(W)}),me=p.useCallback(W=>{if(y&&L.isBeforeYear(W,I)||m&&L.isAfterYear(W,I)||h&&L.isBeforeYear(W,h)||g&&L.isAfterYear(W,g))return!0;if(!b)return!1;const j=L.startOfYear(W);return b(j)},[m,y,g,h,I,b,L]),se=pe((W,j)=>{if(f)return;const U=L.setYear(M??N,j);A(U)}),X=pe(W=>{me(L.setYear(M??N,W))||(ae(W),ue(!0),C?.(W))});p.useEffect(()=>{ae(W=>oe!==null&&W!==oe?oe:W)},[oe]);const H=S!=="desc"?P*1:P*-1,K=T&&S==="asc"||!T&&S==="desc"?-1:1,Z=pe((W,j)=>{switch(W.key){case"ArrowUp":X(j-H),W.preventDefault();break;case"ArrowDown":X(j+H),W.preventDefault();break;case"ArrowLeft":X(j-K),W.preventDefault();break;case"ArrowRight":X(j+K),W.preventDefault();break}}),G=pe((W,j)=>{X(j)}),de=pe((W,j)=>{ne===j&&ue(!1)}),ee=p.useRef(null),q=rt(n,ee);p.useEffect(()=>{if(r||ee.current===null)return;const W=ee.current.querySelector('[tabindex="0"]');if(!W)return;const j=W.offsetHeight,U=W.offsetTop,be=ee.current.clientHeight,ve=ee.current.scrollTop,je=U+j;j>be||U<ve||(ee.current.scrollTop=je-be/2-j/2)},[r]);const te=L.getYearRange([h,g]);S==="desc"&&te.reverse();let le=P-te.length%P;return le===P&&(le=0),u.jsxs(MC,E({ref:q,className:ie(J.root,s),ownerState:Q,role:"radiogroup","aria-labelledby":R,yearsPerRow:P},$,{children:[te.map(W=>{const j=L.getYear(W),U=j===oe,be=d||me(W);return u.jsx(CC,{selected:U,value:j,onClick:se,onKeyDown:Z,autoFocus:Y&&j===ne,disabled:be,tabIndex:j===ne&&!be?0:-1,onFocus:G,onBlur:de,"aria-current":z===j?"date":void 0,slots:_,slotProps:O,classes:a,children:L.format(W,"year")},L.format(W,"year"))}),Array.from({length:le},(W,j)=>u.jsx(DC,{},j))]}))}),IC=e=>Ve("MuiPickersCalendarHeader",e),RC=ze("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]);function _C(e){return Ve("MuiPickersArrowSwitcher",e)}ze("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);const EC=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId","classes"],OC=["ownerState"],FC=["ownerState"],NC=V("div",{name:"MuiPickersArrowSwitcher",slot:"Root"})({display:"flex"}),AC=V("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer"})(({theme:e})=>({width:e.spacing(3)})),yi=V(Bn,{name:"MuiPickersArrowSwitcher",slot:"Button"})({variants:[{props:{isButtonHidden:!0},style:{visibility:"hidden"}}]}),$C=e=>Oe({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},_C,e),Jc=p.forwardRef(function(t,n){const o=Ct(),r=Te({props:t,name:"MuiPickersArrowSwitcher"}),{children:s,className:a,slots:i,slotProps:l,isNextDisabled:c,isNextHidden:d,onGoToNext:m,nextLabel:y,isPreviousDisabled:g,isPreviousHidden:h,onGoToPrevious:v,previousLabel:f,labelId:b,classes:C}=r,w=he(r,EC),{ownerState:x}=We(),S=$C(C),P={isDisabled:c,isHidden:d,goTo:m,label:y},k={isDisabled:g,isHidden:h,goTo:v,label:f},R=i?.previousIconButton??yi,_=Ae({elementType:R,externalSlotProps:l?.previousIconButton,additionalProps:{size:"medium",title:k.label,"aria-label":k.label,disabled:k.isDisabled,edge:"end",onClick:k.goTo},ownerState:E({},x,{isButtonHidden:k.isHidden??!1}),className:ie(S.button,S.previousIconButton)}),O=i?.nextIconButton??yi,$=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:E({},x,{isButtonHidden:P.isHidden??!1}),className:ie(S.button,S.nextIconButton)}),M=i?.leftArrowIcon??mx,A=Ae({elementType:M,externalSlotProps:l?.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:x,className:S.leftArrowIcon}),F=he(A,OC),I=i?.rightArrowIcon??hx,T=Ae({elementType:I,externalSlotProps:l?.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:x,className:S.rightArrowIcon}),L=he(T,FC);return u.jsxs(NC,E({ref:n,className:ie(S.root,a),ownerState:x},w,{children:[u.jsx(R,E({},_,{children:o?u.jsx(I,E({},L)):u.jsx(M,E({},F))})),s?u.jsx(zt,{variant:"subtitle1",component:"span",id:b,children:s}):u.jsx(AC,{className:S.spacer,ownerState:x}),u.jsx(O,E({},$,{children:o?u.jsx(M,E({},F)):u.jsx(I,E({},L))}))]}))});function jC(e,{disableFuture:t,maxDate:n,timezone:o}){const r=Ie();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 LC(e,{disablePast:t,minDate:n,timezone:o}){const r=Ie();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 Hs(e,t,n,o){const r=Ie(),s=p.useMemo(()=>r.isValid(e)?e:null,[r,e]),a=Cm(s,r),i=p.useCallback(l=>{const c=s==null?null:km(s,l,!!t,r);n(c,o??"partial")},[t,s,n,o,r]);return{meridiemMode:a,handleMeridiemChange:i}}const VC=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","classes","timezone","format"],BC=["ownerState"],zC=e=>Oe({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},IC,e),HC=V("div",{name:"MuiPickersCalendarHeader",slot:"Root"})({display:"flex",alignItems:"center",marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),WC=V("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer"})(({theme:e})=>E({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),UC=V("div",{name:"MuiPickersCalendarHeader",slot:"Label"})({marginRight:6}),YC=V(Bn,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton"})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${RC.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),qC=V(fx,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon"})(({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"})),KC=p.forwardRef(function(t,n){const o=ct(),r=Ie(),s=Te({props:t,name:"MuiPickersCalendarHeader"}),{slots:a,slotProps:i,currentMonth:l,disabled:c,disableFuture:d,disablePast:m,maxDate:y,minDate:g,onMonthChange:h,onViewChange:v,view:f,reduceAnimations:b,views:C,labelId:w,className:x,classes:S,timezone:P,format:k=`${r.formats.month} ${r.formats.year}`}=s,R=he(s,VC),{ownerState:_}=We(),O=zC(S),$=a?.switchViewButton??YC,M=Ae({elementType:$,externalSlotProps:i?.switchViewButton,additionalProps:{size:"small","aria-label":o.calendarViewSwitchingButtonAriaLabel(f)},ownerState:_,className:O.switchViewButton}),A=a?.switchViewIcon??qC,F=Ae({elementType:A,externalSlotProps:i?.switchViewIcon,ownerState:_,className:O.switchViewIcon}),I=he(F,BC),T=()=>h(r.addMonths(l,1)),L=()=>h(r.addMonths(l,-1)),Q=jC(l,{disableFuture:d,maxDate:y,timezone:P}),N=LC(l,{disablePast:m,minDate:g,timezone:P}),J=()=>{if(!(C.length===1||!v||c))if(C.length===2)v(C.find(oe=>oe!==f)||C[0]);else{const oe=C.indexOf(f)!==0?0:1;v(C[oe])}};if(C.length===1&&C[0]==="year")return null;const z=r.formatByString(l,k);return u.jsxs(HC,E({},R,{ownerState:_,className:ie(O.root,x),ref:n,children:[u.jsxs(WC,{role:"presentation",onClick:J,ownerState:_,"aria-live":"polite",className:O.labelContainer,children:[u.jsx(Yc,{reduceAnimations:b,transKey:z,children:u.jsx(UC,{id:w,ownerState:_,className:O.label,children:z})}),C.length>1&&!c&&u.jsx($,E({},M,{children:u.jsx(A,E({},I))}))]}),u.jsx(dn,{in:f==="day",appear:!b,enter:!b,children:u.jsx(Jc,{slots:a,slotProps:i,onGoToPrevious:L,isPreviousDisabled:N,previousLabel:o.previousMonth,onGoToNext:T,isNextDisabled:Q,nextLabel:o.nextMonth})})]}))}),wr=V("div")({overflow:"hidden",width:fr,maxHeight:Rs,display:"flex",flexDirection:"column",margin:"0 auto"}),GC=e=>Ve("MuiDateCalendar",e);ze("MuiDateCalendar",["root","viewTransitionContainer"]);const QC=["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"],XC=e=>Oe({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},GC,e);function ZC(e,t){const n=Te({props:e,name:t}),o=oc(n.reduceAnimations),r=Mo(n);return E({},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 JC=V(wr,{name:"MuiDateCalendar",slot:"Root"})({display:"flex",flexDirection:"column",height:Rs}),ek=V(Yc,{name:"MuiDateCalendar",slot:"ViewTransitionContainer"})({}),tk=p.forwardRef(function(t,n){const o=Ie(),{ownerState:r}=We(),s=ko(),a=ZC(t,"MuiDateCalendar"),{autoFocus:i,onViewChange:l,value:c,defaultValue:d,referenceDate:m,disableFuture:y,disablePast:g,onChange:h,onMonthChange:v,reduceAnimations:f,shouldDisableDate:b,shouldDisableMonth:C,shouldDisableYear:w,view:x,views:S,openTo:P,className:k,classes:R,disabled:_,readOnly:O,minDate:$,maxDate:M,disableHighlightToday:A,focusedView:F,onFocusedViewChange:I,showDaysOutsideCurrentMonth:T,fixedWeekNumber:L,dayOfWeekFormatter:Q,slots:N,slotProps:J,loading:z,renderLoading:oe,displayWeekNumber:ne,yearsOrder:ae,yearsPerRow:Y,monthsPerRow:re,timezone:ue}=a,me=he(a,QC),{value:se,handleValueChange:X,timezone:H}=Qt({name:"DateCalendar",timezone:ue,value:c,defaultValue:d,referenceDate:m,onChange:h,valueManager:tt}),{view:K,setView:Z,focusedView:G,setFocusedView:de,goToNextView:ee,setValueAndGoToNextView:q}=Io({view:x,views:S,openTo:P,onChange:X,onViewChange:l,autoFocus:i,focusedView:F,onFocusedViewChange:I}),{referenceDate:te,calendarState:le,setVisibleDate:W,isDateDisabled:j,onMonthSwitchingAnimationEnd:U}=Ew({value:se,referenceDate:m,reduceAnimations:f,onMonthChange:v,minDate:$,maxDate:M,shouldDisableDate:b,disablePast:g,disableFuture:y,timezone:H,getCurrentMonthFromVisibleDate:(we,Ge)=>o.isSameMonth(we,Ge)?Ge:o.startOfMonth(we)}),be=_&&se||$,ve=_&&se||M,je=`${s}-grid-label`,Me=G!==null,He=N?.calendarHeader??KC,Ke=Ae({elementType:He,externalSlotProps:J?.calendarHeader,additionalProps:{views:S,view:K,currentMonth:le.currentMonth,onViewChange:Z,onMonthChange:we=>W({target:we,reason:"header-navigation"}),minDate:be,maxDate:ve,disabled:_,disablePast:g,disableFuture:y,reduceAnimations:f,timezone:H,labelId:je},ownerState:r}),ye=pe(we=>{const Ge=o.startOfMonth(we),st=o.endOfMonth(we),St=j(we)?uo({utils:o,date:we,minDate:o.isBefore($,Ge)?Ge:$,maxDate:o.isAfter(M,st)?st:M,disablePast:g,disableFuture:y,isDateDisabled:j,timezone:H}):we;St?(q(St,"finish"),W({target:St,reason:"cell-interaction"})):(ee(),W({target:Ge,reason:"cell-interaction"}))}),xe=pe(we=>{const Ge=o.startOfYear(we),st=o.endOfYear(we),St=j(we)?uo({utils:o,date:we,minDate:o.isBefore($,Ge)?Ge:$,maxDate:o.isAfter(M,st)?st:M,disablePast:g,disableFuture:y,isDateDisabled:j,timezone:H}):we;St?(q(St,"finish"),W({target:St,reason:"cell-interaction"})):(ee(),W({target:Ge,reason:"cell-interaction"}))}),ge=pe(we=>X(we&&Ko(o,we,se??te),"finish",K));p.useEffect(()=>{o.isValid(se)&&W({target:se,reason:"controlled-value-change"})},[se]);const Ne=XC(R),Ye={disablePast:g,disableFuture:y,maxDate:M,minDate:$},fe={disableHighlightToday:A,readOnly:O,disabled:_,timezone:H,gridLabelId:je,slots:N,slotProps:J},ke=p.useRef(K);p.useEffect(()=>{ke.current!==K&&(G===ke.current&&de(K,!0),ke.current=K)},[G,de,K]);const De=p.useMemo(()=>[se],[se]);return u.jsxs(JC,E({ref:n,className:ie(Ne.root,k),ownerState:r},me,{children:[u.jsx(He,E({},Ke,{slots:N,slotProps:J})),u.jsx(ek,{reduceAnimations:f,className:Ne.viewTransitionContainer,transKey:K,ownerState:r,children:u.jsxs("div",{children:[K==="year"&&u.jsx(TC,E({},Ye,fe,{value:se,onChange:xe,shouldDisableYear:w,hasFocus:Me,onFocusedViewChange:we=>de("year",we),yearsOrder:ae,yearsPerRow:Y,referenceDate:te})),K==="month"&&u.jsx(yC,E({},Ye,fe,{hasFocus:Me,className:k,value:se,onChange:ye,shouldDisableMonth:C,onFocusedViewChange:we=>de("month",we),monthsPerRow:re,referenceDate:te})),K==="day"&&u.jsx(cC,E({},le,Ye,fe,{onMonthSwitchingAnimationEnd:U,hasFocus:Me,onFocusedDayChange:we=>W({target:we,reason:"cell-interaction"}),reduceAnimations:f,selectedDays:De,onSelectedDaysChange:ge,shouldDisableDate:b,shouldDisableMonth:C,shouldDisableYear:w,onFocusedViewChange:we=>de("day",we),showDaysOutsideCurrentMonth:T,fixedWeekNumber:L,dayOfWeekFormatter:Q,displayWeekNumber:ne,loading:z,renderLoading:oe}))]})})]}))}),_n=({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:g,maxDate:h,shouldDisableDate:v,shouldDisableMonth:f,shouldDisableYear:b,reduceAnimations:C,onMonthChange:w,monthsPerRow:x,onYearChange:S,yearsOrder:P,yearsPerRow:k,slots:R,slotProps:_,loading:O,renderLoading:$,disableHighlightToday:M,readOnly:A,disabled:F,showDaysOutsideCurrentMonth:I,dayOfWeekFormatter:T,sx:L,autoFocus:Q,fixedWeekNumber:N,displayWeekNumber:J,timezone:z})=>u.jsx(tk,{view:e,onViewChange:t,views:n.filter(Pa),focusedView:o&&Pa(o)?o:null,onFocusedViewChange:r,value:s,defaultValue:a,referenceDate:i,onChange:l,className:c,classes:d,disableFuture:m,disablePast:y,minDate:g,maxDate:h,shouldDisableDate:v,shouldDisableMonth:f,shouldDisableYear:b,reduceAnimations:C,onMonthChange:w,monthsPerRow:x,onYearChange:S,yearsOrder:P,yearsPerRow:k,slots:R,slotProps:_,loading:O,renderLoading:$,disableHighlightToday:M,readOnly:A,disabled:F,showDaysOutsideCurrentMonth:I,dayOfWeekFormatter:T,sx:L,autoFocus:Q,fixedWeekNumber:N,displayWeekNumber:J,timezone:z}),eu=p.forwardRef(function(t,n){const o=Ie(),r=Hl(t,"MuiDesktopDatePicker"),s=E({day:_n,month:_n,year:_n},r.viewRenderers),a=E({},r,{closeOnSelect:r.closeOnSelect??!0,viewRenderers:s,format:gs(o,r,!1),yearsPerRow:r.yearsPerRow??4,slots:E({field:Wc},r.slots),slotProps:E({},r.slotProps,{field:l=>E({},cn(r.slotProps?.field,l),lr(r)),toolbar:E({hidden:!0},r.slotProps?.toolbar)})}),{renderPicker:i}=$c({ref:n,props:a,valueManager:tt,valueType:"date",validator:Po,steps:null});return i()});eu.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:ar,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 nk(e){return _e("MuiDialogContent",e)}Se("MuiDialogContent",["root","dividers"]);const ok=Se("MuiDialogTitle",["root"]),rk=e=>{const{classes:t,dividers:n}=e;return Ee({root:["root",n&&"dividers"]},nk,t)},sk=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:{[`.${ok.root} + &`]:{paddingTop:0}}}]}))),ak=p.forwardRef(function(t,n){const o=Fe({props:t,name:"MuiDialogContent"}),{className:r,dividers:s=!1,...a}=o,i={...o,dividers:s},l=rk(i);return u.jsx(sk,{className:ie(l.root,r),ownerState:i,ref:n,...a})});function ik(e){return _e("MuiDialog",e)}const lo=Se("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),lk=p.createContext({}),ck=V(bc,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),uk=e=>{const{classes:t,scroll:n,maxWidth:o,fullWidth:r,fullScreen:s}=e,a={root:["root"],container:["container",`scroll${ce(n)}`],paper:["paper",`paperScroll${ce(n)}`,`paperWidth${ce(String(o))}`,r&&"paperFullWidth",s&&"paperFullScreen"]};return Ee(a,ik,t)},dk=V(yc,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),pk=V("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${ce(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"}}}]}),fk=V(ur,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${ce(n.scroll)}`],t[`paperWidth${ce(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)`,[`&.${lo.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}`,[`&.${lo.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,[`&.${lo.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),mk=p.forwardRef(function(t,n){const o=Fe({props:t,name:"MuiDialog"}),r=Hn(),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:g=!1,fullScreen:h=!1,fullWidth:v=!1,maxWidth:f="sm",onBackdropClick:b,onClick:C,onClose:w,open:x,PaperComponent:S=ur,PaperProps:P={},scroll:k="paper",slots:R={},slotProps:_={},TransitionComponent:O=dn,transitionDuration:$=s,TransitionProps:M,...A}=o,F={...o,disableEscapeKeyDown:g,fullScreen:h,fullWidth:v,maxWidth:f,scroll:k},I=uk(F),T=p.useRef(),L=G=>{T.current=G.target===G.currentTarget},Q=G=>{C&&C(G),T.current&&(T.current=null,b&&b(G),w&&w(G,"backdropClick"))},N=xo(i),J=p.useMemo(()=>({titleId:N}),[N]),z={transition:O,...R},oe={transition:M,paper:P,backdrop:d,..._},ne={slots:z,slotProps:oe},[ae,Y]=Ze("root",{elementType:dk,shouldForwardComponentProp:!0,externalForwardedProps:ne,ownerState:F,className:ie(I.root,y),ref:n}),[re,ue]=Ze("backdrop",{elementType:ck,shouldForwardComponentProp:!0,externalForwardedProps:ne,ownerState:F}),[me,se]=Ze("paper",{elementType:fk,shouldForwardComponentProp:!0,externalForwardedProps:ne,ownerState:F,className:ie(I.paper,P.className)}),[X,H]=Ze("container",{elementType:pk,externalForwardedProps:ne,ownerState:F,className:ie(I.container)}),[K,Z]=Ze("transition",{elementType:dn,externalForwardedProps:ne,ownerState:F,additionalProps:{appear:!0,in:x,timeout:$,role:"presentation"}});return u.jsx(ae,{closeAfterTransition:!0,slots:{backdrop:re},slotProps:{backdrop:{transitionDuration:$,as:c,...ue}},disableEscapeKeyDown:g,onClose:w,open:x,onClick:Q,...Y,...A,children:u.jsx(K,{...Z,children:u.jsx(X,{onMouseDown:L,...H,children:u.jsx(me,{as:S,elevation:24,role:"dialog","aria-describedby":a,"aria-labelledby":N,"aria-modal":l,...se,children:u.jsx(lk.Provider,{value:J,children:m})})})})})}),hk=V(mk)({[`& .${lo.container}`]:{outline:0},[`& .${lo.paper}`]:{outline:0,minWidth:fr}}),gk=V(ak)({"&:first-of-type":{padding:0}});function bk(e){const{children:t,slots:n,slotProps:o}=e,{open:r}=mn(),{dismissViews:s,onPopperExited:a}=We(),i=n?.dialog??hk,l=n?.mobileTransition??dn;return u.jsx(i,E({open:r,onClose:()=>{s(),a?.()}},o?.dialog,{TransitionComponent:l,TransitionProps:o?.mobileTransition,PaperComponent:n?.mobilePaper,PaperProps:o?.mobilePaper,children:u.jsx(gk,{children:t})}))}const yk=["props","steps"],vk=["ownerState"],tu=e=>{let{props:t,steps:n}=e,o=he(e,yk);const{slots:r,slotProps:s,label:a,inputRef:i,localeText:l}=t,c=Ac({steps:n}),{providerProps:d,renderCurrentView:m,ownerState:y}=sc(E({},o,{props:t,localeText:l,autoFocusView:!0,viewContainerRole:"dialog",variant:"mobile",getStepNavigation:c})),g=d.privateContextValue.labelId,h=s?.toolbar?.hidden??!1,v=r.field,f=Ae({elementType:v,externalSlotProps:s?.field,additionalProps:E({},h&&{id:g}),ownerState:y}),b=he(f,vk),C=r.layout??pc;let w=g;h&&(a?w=`${g}-label`:w=void 0);const x=E({},s,{toolbar:E({},s?.toolbar,{titleId:g}),mobilePaper:E({"aria-labelledby":w},s?.mobilePaper)});return{renderPicker:()=>u.jsx($l,E({},d,{children:u.jsxs(Nc,{slots:r,slotProps:x,inputRef:i,children:[u.jsx(v,E({},b)),u.jsx(bk,{slots:r,slotProps:x,children:u.jsx(C,E({},x?.layout,{slots:r,slotProps:x,children:m()}))})]})}))}},nu=p.forwardRef(function(t,n){const o=Ie(),r=Hl(t,"MuiMobileDatePicker"),s=E({day:_n,month:_n,year:_n},r.viewRenderers),a=E({},r,{viewRenderers:s,format:gs(o,r,!1),slots:E({field:Wc},r.slots),slotProps:E({},r.slotProps,{field:l=>E({},cn(r.slotProps?.field,l),lr(r)),toolbar:E({hidden:!1},r.slotProps?.toolbar)})}),{renderPicker:i}=tu({ref:n,props:a,valueManager:tt,valueType:"date",validator:Po,steps:null});return i()});nu.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:ar,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 xk=["desktopModeMediaQuery"],wk=p.forwardRef(function(t,n){const o=Te({props:t,name:"MuiDatePicker"}),{desktopModeMediaQuery:r=nc}=o,s=he(o,xk);return ps(r,{defaultMatches:!0})?u.jsx(eu,E({ref:n},s)):u.jsx(nu,E({ref:n},s))}),Ck=e=>{const t=Mw(e);return zc({manager:t,props:e})},kk=["slots","slotProps","InputProps","inputProps"],ou=p.forwardRef(function(t,n){const o=Te({props:t,name:"MuiTimeField"}),{slots:r,slotProps:s}=o,a=he(o,kk),i=Fc({slotProps:s,ref:n,externalForwardedProps:a}),l=Ck(i);return u.jsx(Oc,{slots:r,slotProps:s,fieldResponse:l,defaultOpenPickerIcon:bx})});function Sk(e){return Ve("MuiPickersToolbarText",e)}ze("MuiPickersToolbarText",["root"]);const Pk=["className","classes","selected","value"],Mk=e=>Oe({root:["root"]},Sk,e),Dk=V(zt,{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}})),ru=p.forwardRef(function(t,n){const o=Te({props:t,name:"MuiPickersToolbarText"}),{className:r,classes:s,selected:a,value:i}=o,l=he(o,Pk),c=Mk(s);return u.jsx(Dk,E({ref:n,className:ie(c.root,r),component:"span",ownerState:o},a&&{"data-selected":!0},l,{children:i}))}),Tk=["align","className","classes","selected","typographyClassName","value","variant","width"],Ik=e=>Oe({root:["root"]},Rl,e),Rk=V(Yt,{name:"MuiPickersToolbarButton",slot:"Root"})({padding:0,minWidth:16,textTransform:"none"}),Jn=p.forwardRef(function(t,n){const o=Te({props:t,name:"MuiPickersToolbarButton"}),{align:r,className:s,classes:a,selected:i,typographyClassName:l,value:c,variant:d,width:m}=o,y=he(o,Tk),g=Ik(a);return u.jsx(Rk,E({variant:"text",ref:n,className:ie(g.root,s),ownerState:o},m?{sx:{width:m}}:{},y,{children:u.jsx(ru,{align:r,className:l,variant:d,value:c,selected:i})}))});function _k(e){return Ve("MuiTimePickerToolbar",e)}const co=ze("MuiTimePickerToolbar",["root","separator","hourMinuteLabel","hourMinuteLabelLandscape","hourMinuteLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),Ek=["ampm","ampmInClock","className","classes"],Ok=(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"]},_k,e)},Fk=V(jl,{name:"MuiTimePickerToolbar",slot:"Root"})({}),Nk=V(ru,{name:"MuiTimePickerToolbar",slot:"Separator"})({outline:0,margin:"0 4px 0 2px",cursor:"default"}),Ak=V("div",{name:"MuiTimePickerToolbar",slot:"HourMinuteLabel",overridesResolver:(e,t)=>[{[`&.${co.hourMinuteLabelLandscape}`]:t.hourMinuteLabelLandscape,[`&.${co.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"}}]}),$k=V("div",{name:"MuiTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[`.${co.ampmLabel}`]:t.ampmLabel},{[`&.${co.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12,[`& .${co.ampmLabel}`]:{fontSize:17},variants:[{props:{pickerOrientation:"landscape"},style:{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",flexBasis:"100%"}}]});function jk(e){const t=Te({props:e,name:"MuiTimePickerToolbar"}),{ampm:n,ampmInClock:o,className:r,classes:s}=t,a=he(t,Ek),i=Ie(),l=ct(),c=ws(),d=Ok(s,c),{value:m,setValue:y,disabled:g,readOnly:h,view:v,setView:f,views:b}=mn(),C=!!(n&&!o&&b.includes("hours")),{meridiemMode:w,handleMeridiemChange:x}=Hs(m,n,k=>y(k,{changeImportance:"set"})),S=k=>i.isValid(m)?i.format(m,k):"--",P=u.jsx(Nk,{tabIndex:-1,value:":",variant:"h3",selected:!1,className:d.separator});return u.jsxs(Fk,E({landscapeDirection:"row",toolbarTitle:l.timePickerToolbarTitle,ownerState:c,className:ie(d.root,r)},a,{children:[u.jsxs(Ak,{className:d.hourMinuteLabel,ownerState:c,children:[Sn(b,"hours")&&u.jsx(Jn,{tabIndex:-1,variant:"h3",onClick:()=>f("hours"),selected:v==="hours",value:S(n?"hours12h":"hours24h")}),Sn(b,["hours","minutes"])&&P,Sn(b,"minutes")&&u.jsx(Jn,{tabIndex:-1,variant:"h3",onClick:()=>f("minutes"),selected:v==="minutes",value:S("minutes")}),Sn(b,["minutes","seconds"])&&P,Sn(b,"seconds")&&u.jsx(Jn,{variant:"h3",onClick:()=>f("seconds"),selected:v==="seconds",value:S("seconds")})]}),C&&u.jsxs($k,{className:d.ampmSelection,ownerState:c,children:[u.jsx(Jn,{disableRipple:!0,variant:"subtitle2",selected:w==="am",typographyClassName:d.ampmLabel,value:qt(i,"am"),onClick:h?void 0:()=>x("am"),disabled:g}),u.jsx(Jn,{disableRipple:!0,variant:"subtitle2",selected:w==="pm",typographyClassName:d.ampmLabel,value:qt(i,"pm"),onClick:h?void 0:()=>x("pm"),disabled:g})]})]}))}function su(e,t){const n=Ie(),o=Te({props:e,name:t}),r=Hc(o),s=o.ampm??n.is12HourCycleInCurrentLocale(),a=p.useMemo(()=>o.localeText?.toolbarTitle==null?o.localeText:E({},o.localeText,{timePickerToolbarTitle:o.localeText.toolbarTitle}),[o.localeText]);return E({},o,r,{ampm:s,localeText:a},Cl({views:o.views,openTo:o.openTo,defaultViews:["hours","minutes"],defaultOpenTo:"hours"}),{slots:E({toolbar:jk},o.slots),slotProps:E({},o.slotProps,{toolbar:E({ampm:s,ampmInClock:o.ampmInClock},o.slotProps?.toolbar)})})}function Lk(e){return Ve("MuiTimeClock",e)}ze("MuiTimeClock",["root","arrowSwitcher"]);const zn=220,Lt=36,bo={x:zn/2,y:zn/2},au={x:bo.x,y:0},Vk=au.x-bo.x,Bk=au.y-bo.y,zk=e=>e*(180/Math.PI),iu=(e,t,n)=>{const o=t-bo.x,r=n-bo.y,s=Math.atan2(Vk,Bk)-Math.atan2(o,r);let a=zk(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}},Hk=(e,t,n=1)=>{const o=n*6;let{value:r}=iu(o,e,t);return r=r*n%60,r},Wk=(e,t,n)=>{const{value:o,distance:r}=iu(30,e,t);let s=o||12;return n?s%=12:r<zn/2-Lt&&(s+=12,s%=24),s};function Uk(e){return Ve("MuiClockPointer",e)}ze("MuiClockPointer",["root","thumb"]);const Yk=["className","classes","isBetweenTwoClockValues","isInner","type","viewValue"],qk=e=>Oe({root:["root"],thumb:["thumb"]},Uk,e),Kk=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"])}}]})),Gk=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% - ${Lt/2}px)`,border:`${(Lt-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 Qk(e){const t=Te({props:e,name:"MuiClockPointer"}),{className:n,classes:o,isBetweenTwoClockValues:r,isInner:s,type:a,viewValue:i}=t,l=he(t,Yk),c=p.useRef(a);p.useEffect(()=>{c.current=a},[a]);const{ownerState:d}=We(),m=E({},d,{isClockPointerAnimated:c.current!==a,isClockPointerBetweenTwoValues:r}),y=qk(o),g=()=>{let v=360/(a==="hours"?12:60)*i;return a==="hours"&&i>12&&(v-=360),{height:Math.round((s?.26:.4)*zn),transform:`rotateZ(${v}deg)`}};return u.jsx(Kk,E({style:g(),className:ie(y.root,n),ownerState:m},l,{children:u.jsx(Gk,{ownerState:m,className:y.thumb})}))}function Xk(e){return Ve("MuiClock",e)}ze("MuiClock",["root","clock","wrapper","squareMask","pin","amButton","pmButton","meridiemText","selected"]);const Zk=(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,Xk,e)},Jk=V("div",{name:"MuiClock",slot:"Root"})(({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",margin:e.spacing(2)})),eS=V("div",{name:"MuiClock",slot:"Clock"})({backgroundColor:"rgba(0,0,0,.07)",borderRadius:"50%",height:220,width:220,flexShrink:0,position:"relative",pointerEvents:"none"}),tS=V("div",{name:"MuiClock",slot:"Wrapper"})({"&:focus":{outline:"none"}}),nS=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"}}}]}),oS=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%)"})),lu=(e,t)=>({zIndex:1,bottom:8,paddingLeft:4,paddingRight:4,width:Lt,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}}}]}),rS=V(Bn,{name:"MuiClock",slot:"AmButton"})(({theme:e})=>E({},lu(e,"am"),{position:"absolute",left:8})),sS=V(Bn,{name:"MuiClock",slot:"PmButton"})(({theme:e})=>E({},lu(e,"pm"),{position:"absolute",right:8})),vi=V(zt,{name:"MuiClock",slot:"MeridiemText"})({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});function aS(e){const t=Te({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:g,viewValue:h,viewRange:[v,f],disabled:b=!1,readOnly:C,className:w,classes:x}=t,S=Ie(),P=ct(),{ownerState:k}=We(),R=E({},k,{isClockDisabled:b,clockMeridiemMode:c}),_=p.useRef(!1),O=Zk(x,R),$=l(h,g),M=!n&&g==="hours"&&(h<1||h>12),A=(Y,re)=>{b||C||l(Y,g)||m(Y,re)},F=(Y,re)=>{let{offsetX:ue,offsetY:me}=Y;if(ue===void 0){const X=Y.target.getBoundingClientRect();ue=Y.changedTouches[0].clientX-X.left,me=Y.changedTouches[0].clientY-X.top}const se=g==="seconds"||g==="minutes"?Hk(ue,me,d):Wk(ue,me,!!n);A(se,re)},I=Y=>{_.current=!0,F(Y,"shallow")},T=Y=>{_.current&&(F(Y,"finish"),_.current=!1),Y.preventDefault()},L=Y=>{Y.buttons>0&&F(Y.nativeEvent,"shallow")},Q=Y=>{_.current&&(_.current=!1),F(Y.nativeEvent,"finish")},N=g==="hours"?!1:h%5!==0,J=g==="minutes"?d:1,z=p.useRef(null);pt(()=>{r&&z.current.focus()},[r]);const oe=Y=>Math.max(v,Math.min(f,Y)),ne=Y=>(Y+(f+1))%(f+1),ae=Y=>{if(!_.current)switch(Y.key){case"Home":A(v,"partial"),Y.preventDefault();break;case"End":A(f,"partial"),Y.preventDefault();break;case"ArrowUp":A(ne(h+J),"partial"),Y.preventDefault();break;case"ArrowDown":A(ne(h-J),"partial"),Y.preventDefault();break;case"PageUp":A(oe(h+5),"partial"),Y.preventDefault();break;case"PageDown":A(oe(h-5),"partial"),Y.preventDefault();break;case"Enter":case" ":A(h,"finish"),Y.preventDefault();break}};return u.jsxs(Jk,{className:ie(O.root,w),children:[u.jsxs(eS,{className:O.clock,children:[u.jsx(nS,{onTouchMove:I,onTouchStart:I,onTouchEnd:T,onMouseUp:Q,onMouseMove:L,ownerState:R,className:O.squareMask}),!$&&u.jsxs(p.Fragment,{children:[u.jsx(oS,{className:O.pin}),a!=null&&u.jsx(Qk,{type:g,viewValue:h,isInner:M,isBetweenTwoClockValues:N})]}),u.jsx(tS,{"aria-activedescendant":y,"aria-label":P.clockLabelText(g,a==null?null:S.format(a,n?"fullTime12h":"fullTime24h")),ref:z,role:"listbox",onKeyDown:ae,tabIndex:0,className:O.wrapper,children:s})]}),n&&o&&u.jsxs(p.Fragment,{children:[u.jsx(rS,{onClick:C?void 0:()=>i("am"),disabled:b||c===null,ownerState:R,className:O.amButton,title:qt(S,"am"),children:u.jsx(vi,{variant:"caption",className:O.meridiemText,children:qt(S,"am")})}),u.jsx(sS,{disabled:b||c===null,onClick:C?void 0:()=>i("pm"),ownerState:R,className:O.pmButton,title:qt(S,"pm"),children:u.jsx(vi,{variant:"caption",className:O.meridiemText,children:qt(S,"pm")})})]})]})}function iS(e){return Ve("MuiClockNumber",e)}const jo=ze("MuiClockNumber",["root","selected","disabled"]),lS=["className","classes","disabled","index","inner","label","selected"],cS=(e,t)=>{const n={root:["root",t.isClockNumberSelected&&"selected",t.isClockNumberDisabled&&"disabled"]};return Oe(n,iS,e)},uS=V("span",{name:"MuiClockNumber",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${jo.disabled}`]:t.disabled},{[`&.${jo.selected}`]:t.selected}]})(({theme:e})=>({height:Lt,width:Lt,position:"absolute",left:`calc((100% - ${Lt}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},[`&.${jo.selected}`]:{color:(e.vars||e).palette.primary.contrastText},[`&.${jo.disabled}`]:{pointerEvents:"none",color:(e.vars||e).palette.text.disabled},variants:[{props:{isClockNumberInInnerRing:!0},style:E({},e.typography.body2,{color:(e.vars||e).palette.text.secondary})}]}));function cu(e){const t=Te({props:e,name:"MuiClockNumber"}),{className:n,classes:o,disabled:r,index:s,inner:a,label:i,selected:l}=t,c=he(t,lS),{ownerState:d}=We(),m=E({},d,{isClockNumberInInnerRing:a,isClockNumberSelected:l,isClockNumberDisabled:r}),y=cS(o,m),g=s%12/12*Math.PI*2-Math.PI/2,h=(zn-Lt-2)/2*(a?.65:1),v=Math.round(Math.cos(g)*h),f=Math.round(Math.sin(g)*h);return u.jsx(uS,E({className:ie(y.root,n),"aria-disabled":r?!0:void 0,"aria-selected":l?!0:void 0,role:"option",style:{transform:`translate(${v}px, ${f+(zn-Lt)/2}px`},ownerState:m},c,{children:i}))}const dS=({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 g=!e&&(m===0||m>12);y=s.formatNumber(y);const h=d(m);i.push(u.jsx(cu,{id:h?r:void 0,index:m,inner:g,selected:h,disabled:o(m),label:y,"aria-label":n(y)},m))}return i},xi=({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(cu,{label:i,id:c?r:void 0,index:l+1,inner:!1,disabled:n(a),selected:c,"aria-label":o(i)},a)})},Ws=({value:e,referenceDate:t,utils:n,props:o,timezone:r})=>{const s=p.useMemo(()=>tt.getInitialReferenceValue({value:e,utils:n,props:o,referenceDate:t,granularity:Mt.day,timezone:r,getTodayDate:()=>hs(n,r,"date")}),[]);return e??s},pS=["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"],fS=e=>Oe({root:["root"],arrowSwitcher:["arrowSwitcher"]},Lk,e),mS=V(wr,{name:"MuiTimeClock",slot:"Root"})({display:"flex",flexDirection:"column",position:"relative"}),hS=V(Jc,{name:"MuiTimeClock",slot:"ArrowSwitcher"})({position:"absolute",right:12,top:15}),gS=["hours","minutes"],bS=p.forwardRef(function(t,n){const o=Ie(),r=Te({props:t,name:"MuiTimeClock"}),{ampm:s=o.is12HourCycleInCurrentLocale(),ampmInClock:a=!1,autoFocus:i,slots:l,slotProps:c,value:d,defaultValue:m,referenceDate:y,disableIgnoringDatePartForTimeValidation:g=!1,maxTime:h,minTime:v,disableFuture:f,disablePast:b,minutesStep:C=1,shouldDisableTime:w,showViewSwitcher:x,onChange:S,view:P,views:k=gS,openTo:R,onViewChange:_,focusedView:O,onFocusedViewChange:$,className:M,classes:A,disabled:F,readOnly:I,timezone:T}=r,L=he(r,pS),{value:Q,handleValueChange:N,timezone:J}=Qt({name:"TimeClock",timezone:T,value:d,defaultValue:m,referenceDate:y,onChange:S,valueManager:tt}),z=Ws({value:Q,referenceDate:y,utils:o,props:r,timezone:J}),oe=ct(),ne=gn(J),ae=ko(),{ownerState:Y}=We(),{view:re,setView:ue,previousView:me,nextView:se,setValueAndGoToNextView:X}=Io({view:P,views:k,openTo:R,onViewChange:_,onChange:N,focusedView:O,onFocusedViewChange:$}),{meridiemMode:H,handleMeridiemChange:K}=Hs(z,s,X),Z=p.useCallback((ee,q)=>{const te=So(g,o),le=q==="hours"||q==="minutes"&&k.includes("seconds"),W=({start:U,end:be})=>!(v&&te(v,be)||h&&te(U,h)||f&&te(U,ne)||b&&te(ne,le?be:U)),j=(U,be=1)=>{if(U%be!==0)return!1;if(w)switch(q){case"hours":return!w(o.setHours(z,U),"hours");case"minutes":return!w(o.setMinutes(z,U),"minutes");case"seconds":return!w(o.setSeconds(z,U),"seconds");default:return!1}return!0};switch(q){case"hours":{const U=po(ee,H,s),be=o.setHours(z,U);if(o.getHours(be)!==U)return!0;const ve=o.setSeconds(o.setMinutes(be,0),0),je=o.setSeconds(o.setMinutes(be,59),59);return!W({start:ve,end:je})||!j(U)}case"minutes":{const U=o.setMinutes(z,ee),be=o.setSeconds(U,0),ve=o.setSeconds(U,59);return!W({start:be,end:ve})||!j(ee,C)}case"seconds":{const U=o.setSeconds(z,ee);return!W({start:U,end:U})||!j(ee)}default:throw new Error("not supported")}},[s,z,g,h,H,v,C,w,o,f,b,ne,k]),G=p.useMemo(()=>{switch(re){case"hours":{const ee=(le,W)=>{const j=po(le,H,s);X(o.setHours(z,j),W,"hours")},q=o.getHours(z);let te;return s?q>12?te=[12,23]:te=[0,11]:te=[0,23],{onChange:ee,viewValue:q,children:dS({value:Q,utils:o,ampm:s,getClockNumberText:oe.hoursClockNumberText,isDisabled:le=>F||Z(le,"hours"),selectedId:ae}),viewRange:te}}case"minutes":{const ee=o.getMinutes(z);return{viewValue:ee,onChange:(te,le)=>{X(o.setMinutes(z,te),le,"minutes")},children:xi({utils:o,value:ee,getClockNumberText:oe.minutesClockNumberText,isDisabled:te=>F||Z(te,"minutes"),selectedId:ae}),viewRange:[0,59]}}case"seconds":{const ee=o.getSeconds(z);return{viewValue:ee,onChange:(te,le)=>{X(o.setSeconds(z,te),le,"seconds")},children:xi({utils:o,value:ee,getClockNumberText:oe.secondsClockNumberText,isDisabled:te=>F||Z(te,"seconds"),selectedId:ae}),viewRange:[0,59]}}default:throw new Error("You must provide the type for ClockView")}},[re,o,Q,s,oe.hoursClockNumberText,oe.minutesClockNumberText,oe.secondsClockNumberText,H,X,z,Z,ae,F]),de=fS(A);return u.jsxs(mS,E({ref:n,className:ie(de.root,M),ownerState:Y},L,{children:[u.jsx(aS,E({autoFocus:i??!!O,ampmInClock:a&&k.includes("hours"),value:Q,type:re,ampm:s,minutesStep:C,isTimeDisabled:Z,meridiemMode:H,handleMeridiemChange:K,selectedId:ae,disabled:F,readOnly:I},G)),x&&u.jsx(hS,{className:de.arrowSwitcher,slots:l,slotProps:c,onGoToPrevious:()=>ue(me),isPreviousDisabled:!me,previousLabel:oe.openPreviousView,onGoToNext:()=>ue(se),isNextDisabled:!se,nextLabel:oe.openNextView,ownerState:Y})]}))}),wi=Se("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),Ci=Se("MuiListItemIcon",["root","alignItemsFlexStart"]),ki=Se("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function yS(e){return _e("MuiMenuItem",e)}const eo=Se("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),vS=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},xS=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"]},yS,a);return{...a,...l}},wS=V(Ln,{shouldForwardProp:e=>kt(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:vS})(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})`:Re(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}))`:Re(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}))`:Re(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})`:Re(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},[`& + .${wi.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${wi.inset}`]:{marginLeft:52},[`& .${ki.root}`]:{marginTop:0,marginBottom:0},[`& .${ki.inset}`]:{paddingLeft:36},[`& .${Ci.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,[`& .${Ci.root} svg`]:{fontSize:"1.25rem"}}}]}))),uu=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,...g}=o,h=p.useContext(ln),v=p.useMemo(()=>({dense:a||h.dense||!1,disableGutters:l}),[h.dense,a,l]),f=p.useRef(null);Tt(()=>{r&&f.current&&f.current.focus()},[r]);const b={...o,dense:v.dense,divider:i,disableGutters:l},C=xS(o),w=Je(f,n);let x;return o.disabled||(x=m!==void 0?m:-1),u.jsx(ln.Provider,{value:v,children:u.jsx(wS,{ref:w,role:d,tabIndex:x,component:s,focusVisibleClassName:ie(C.focusVisible,c),className:ie(C.root,y),...g,ownerState:b,classes:C})})});function CS(e){return Ve("MuiDigitalClock",e)}ze("MuiDigitalClock",["root","list","item"]);const kS=["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"],SS=e=>Oe({root:["root"],list:["list"],item:["item"]},CS,e),PS=V(wr,{name:"MuiDigitalClock",slot:"Root"})({overflowY:"auto",width:"100%",scrollbarWidth:"thin","@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"auto"},maxHeight:dc,variants:[{props:{hasDigitalClockAlreadyBeenRendered:!0},style:{"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"smooth"}}}]}),MS=V(Ns,{name:"MuiDigitalClock",slot:"List"})({padding:0}),DS=V(uu,{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})`:Re(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})`:Re(e.palette.primary.main,e.palette.action.focusOpacity)}})),TS=p.forwardRef(function(t,n){const o=Ie(),r=p.useRef(null),s=rt(n,r),a=p.useRef(null),i=Te({props:t,name:"MuiDigitalClock"}),{ampm:l=o.is12HourCycleInCurrentLocale(),timeStep:c=30,autoFocus:d,slots:m,slotProps:y,value:g,defaultValue:h,referenceDate:v,disableIgnoringDatePartForTimeValidation:f=!1,maxTime:b,minTime:C,disableFuture:w,disablePast:x,minutesStep:S=1,shouldDisableTime:P,onChange:k,view:R,openTo:_,onViewChange:O,focusedView:$,onFocusedViewChange:M,className:A,classes:F,disabled:I,readOnly:T,views:L=["hours"],skipDisabled:Q=!1,timezone:N}=i,J=he(i,kS),{value:z,handleValueChange:oe,timezone:ne}=Qt({name:"DigitalClock",timezone:N,value:g,defaultValue:h,referenceDate:v,onChange:k,valueManager:tt}),ae=ct(),Y=gn(ne),{ownerState:re}=We(),ue=E({},re,{hasDigitalClockAlreadyBeenRendered:!!r.current}),me=SS(F),se=m?.digitalClockItem??DS,X=Ae({elementType:se,externalSlotProps:y?.digitalClockItem,ownerState:ue,className:me.item}),H=Ws({value:z,referenceDate:v,utils:o,props:i,timezone:ne}),K=pe(le=>oe(le,"finish","hours")),{setValueAndGoToNextView:Z}=Io({view:R,views:L,openTo:_,onViewChange:O,onChange:K,focusedView:$,onFocusedViewChange:M}),G=pe(le=>{Z(le,"finish")});pt(()=>{if(r.current===null)return;const le=r.current.querySelector('[role="listbox"] [role="option"][tabindex="0"], [role="listbox"] [role="option"][aria-selected="true"]');if(!le)return;const W=le.offsetTop;(d||$)&&le.focus(),r.current.scrollTop=W-4});const de=p.useCallback(le=>{const W=So(f,o),j=()=>!(C&&W(C,le)||b&&W(le,b)||w&&W(le,Y)||x&&W(Y,le)),U=()=>o.getMinutes(le)%S!==0?!1:P?!P(le,"hours"):!0;return!j()||!U()},[f,o,C,b,w,Y,x,S,P]),ee=p.useMemo(()=>{const le=[];let j=o.startOfDay(H);for(;o.isSameDay(H,j);)le.push(j),j=o.addMinutes(j,c);return le},[H,c,o]),q=ee.findIndex(le=>o.isEqual(le,H)),te=le=>{switch(le.key){case"PageUp":{const W=Zo(a.current)-5,j=a.current.children,U=Math.max(0,W),be=j[U];be&&be.focus(),le.preventDefault();break}case"PageDown":{const W=Zo(a.current)+5,j=a.current.children,U=Math.min(j.length-1,W),be=j[U];be&&be.focus(),le.preventDefault();break}}};return u.jsx(PS,E({ref:s,className:ie(me.root,A),ownerState:ue},J,{children:u.jsx(MS,{ref:a,role:"listbox","aria-label":ae.timePickerToolbarTitle,className:me.list,onKeyDown:te,children:ee.map((le,W)=>{const j=de(le);if(Q&&j)return null;const U=o.isEqual(le,z),be=o.format(le,l?"fullTime12h":"fullTime24h"),je=q===W||q===-1&&W===0?0:-1;return u.jsx(se,E({onClick:()=>!T&&G(le),selected:U,disabled:I||j,disableRipple:T,role:"option","aria-disabled":T,"aria-selected":U,tabIndex:je,itemValue:le,formattedValue:be},X,{children:be}),`${le.valueOf()}-${be}`)})})}))});function IS(e){return Ve("MuiMultiSectionDigitalClock",e)}ze("MuiMultiSectionDigitalClock",["root"]);function RS(e){return Ve("MuiMultiSectionDigitalClockSection",e)}ze("MuiMultiSectionDigitalClockSection",["root","item"]);const _S=["autoFocus","onChange","className","classes","disabled","readOnly","items","active","slots","slotProps","skipDisabled"],ES=e=>Oe({root:["root"],item:["item"]},RS,e),OS=V(Ns,{name:"MuiMultiSectionDigitalClockSection",slot:"Root"})(({theme:e})=>({maxHeight:dc,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"}}}]})),FS=V(uu,{name:"MuiMultiSectionDigitalClockSection",slot:"Item"})(({theme:e})=>({padding:8,margin:"2px 4px",width:gy,justifyContent:"center","&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Re(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})`:Re(e.palette.primary.main,e.palette.action.focusOpacity)}})),NS=p.forwardRef(function(t,n){const o=p.useRef(null),r=rt(n,o),s=p.useRef(null),a=Te({props:t,name:"MuiMultiSectionDigitalClockSection"}),{autoFocus:i,onChange:l,className:c,classes:d,disabled:m,readOnly:y,items:g,active:h,slots:v,slotProps:f,skipDisabled:b}=a,C=he(a,_S),{ownerState:w}=We(),x=E({},w,{hasDigitalClockAlreadyBeenRendered:!!o.current}),S=ES(d),P=v?.digitalClockSectionItem??FS;pt(()=>{if(o.current===null)return;const _=o.current.querySelector('[role="option"][tabindex="0"], [role="option"][aria-selected="true"]');if(h&&i&&_&&_.focus(),!_||s.current===_)return;s.current=_;const O=_.offsetTop;o.current.scrollTop=O-4});const k=g.findIndex(_=>_.isFocused(_.value)),R=_=>{switch(_.key){case"PageUp":{const O=Zo(o.current)-5,$=o.current.children,M=Math.max(0,O),A=$[M];A&&A.focus(),_.preventDefault();break}case"PageDown":{const O=Zo(o.current)+5,$=o.current.children,M=Math.min($.length-1,O),A=$[M];A&&A.focus(),_.preventDefault();break}}};return u.jsx(OS,E({ref:r,className:ie(S.root,c),ownerState:x,autoFocusItem:i&&h,role:"listbox",onKeyDown:R},C,{children:g.map((_,O)=>{const $=_.isDisabled?.(_.value),M=m||$;if(b&&M)return null;const A=_.isSelected(_.value),F=k===O||k===-1&&O===0?0:-1;return u.jsx(P,E({onClick:()=>!y&&l(_.value),selected:A,disabled:M,disableRipple:y,role:"option","aria-disabled":y||M||void 0,"aria-label":_.ariaLabel,"aria-selected":A,tabIndex:F,className:S.item},f?.digitalClockSectionItem,{children:_.label}),_.label)})}))}),AS=({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=(g,h)=>{const v=h??l;return v===null?!1:o?g===12?v===12||v===0:v===g||v-12===g:v===g},m=g=>d(g,n.getHours(i)),y=o?11:23;for(let g=0;g<=y;g+=a){let h=n.format(n.setHours(e,g),o?"hours12h":"hours24h");const v=s(parseInt(h,10).toString());h=n.formatNumber(h),c.push({value:g,label:h,isSelected:d,isDisabled:r,isFocused:m,ariaLabel:v})}return c},Si=({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())}})]},$S=["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"],jS=e=>Oe({root:["root"]},IS,e),LS=V(wr,{name:"MuiMultiSectionDigitalClock",slot:"Root"})(({theme:e})=>({flexDirection:"row",width:"100%",borderBottom:`1px solid ${(e.vars||e).palette.divider}`})),VS=p.forwardRef(function(t,n){const o=Ie(),r=Ct(),s=Te({props:t,name:"MuiMultiSectionDigitalClock"}),{ampm:a=o.is12HourCycleInCurrentLocale(),timeSteps:i,autoFocus:l,slots:c,slotProps:d,value:m,defaultValue:y,referenceDate:g,disableIgnoringDatePartForTimeValidation:h=!1,maxTime:v,minTime:f,disableFuture:b,disablePast:C,minutesStep:w=1,shouldDisableTime:x,onChange:S,view:P,views:k=["hours","minutes"],openTo:R,onViewChange:_,focusedView:O,onFocusedViewChange:$,className:M,classes:A,disabled:F,readOnly:I,skipDisabled:T=!1,timezone:L}=s,Q=he(s,$S),{value:N,handleValueChange:J,timezone:z}=Qt({name:"MultiSectionDigitalClock",timezone:L,value:m,defaultValue:y,referenceDate:g,onChange:S,valueManager:tt}),oe=ct(),ne=gn(z),ae=p.useMemo(()=>E({hours:1,minutes:5,seconds:5},i),[i]),Y=Ws({value:N,referenceDate:g,utils:o,props:s,timezone:z}),re=pe((W,j,U)=>J(W,j,U)),ue=p.useMemo(()=>!a||!k.includes("hours")||k.includes("meridiem")?k:[...k,"meridiem"],[a,k]),{view:me,setValueAndGoToNextView:se,focusedView:X}=Io({view:P,views:ue,openTo:R,onViewChange:_,onChange:re,focusedView:O,onFocusedViewChange:$}),H=pe(W=>{se(W,"finish","meridiem")}),{meridiemMode:K,handleMeridiemChange:Z}=Hs(Y,a,H,"finish"),G=p.useCallback((W,j)=>{const U=So(h,o),be=j==="hours"||j==="minutes"&&ue.includes("seconds"),ve=({start:Me,end:He})=>!(f&&U(f,He)||v&&U(Me,v)||b&&U(Me,ne)||C&&U(ne,be?He:Me)),je=(Me,He=1)=>{if(Me%He!==0)return!1;if(x)switch(j){case"hours":return!x(o.setHours(Y,Me),"hours");case"minutes":return!x(o.setMinutes(Y,Me),"minutes");case"seconds":return!x(o.setSeconds(Y,Me),"seconds");default:return!1}return!0};switch(j){case"hours":{const Me=po(W,K,a),He=o.setHours(Y,Me);if(o.getHours(He)!==Me)return!0;const Ke=o.setSeconds(o.setMinutes(He,0),0),ye=o.setSeconds(o.setMinutes(He,59),59);return!ve({start:Ke,end:ye})||!je(Me)}case"minutes":{const Me=o.setMinutes(Y,W),He=o.setSeconds(Me,0),Ke=o.setSeconds(Me,59);return!ve({start:He,end:Ke})||!je(W,w)}case"seconds":{const Me=o.setSeconds(Y,W);return!ve({start:Me,end:Me})||!je(W)}default:throw new Error("not supported")}},[a,Y,h,v,K,f,w,x,o,b,C,ne,ue]),de=p.useCallback(W=>{switch(W){case"hours":return{onChange:j=>{const U=po(j,K,a);se(o.setHours(Y,U),"finish","hours")},items:AS({now:ne,value:N,ampm:a,utils:o,isDisabled:j=>G(j,"hours"),timeStep:ae.hours,resolveAriaLabel:oe.hoursClockNumberText,valueOrReferenceDate:Y})};case"minutes":return{onChange:j=>{se(o.setMinutes(Y,j),"finish","minutes")},items:Si({value:o.getMinutes(Y),utils:o,isDisabled:j=>G(j,"minutes"),resolveLabel:j=>o.format(o.setMinutes(ne,j),"minutes"),timeStep:ae.minutes,hasValue:!!N,resolveAriaLabel:oe.minutesClockNumberText})};case"seconds":return{onChange:j=>{se(o.setSeconds(Y,j),"finish","seconds")},items:Si({value:o.getSeconds(Y),utils:o,isDisabled:j=>G(j,"seconds"),resolveLabel:j=>o.format(o.setSeconds(ne,j),"seconds"),timeStep:ae.seconds,hasValue:!!N,resolveAriaLabel:oe.secondsClockNumberText})};case"meridiem":{const j=qt(o,"am"),U=qt(o,"pm");return{onChange:Z,items:[{value:"am",label:j,isSelected:()=>!!N&&K==="am",isFocused:()=>!!Y&&K==="am",ariaLabel:j},{value:"pm",label:U,isSelected:()=>!!N&&K==="pm",isFocused:()=>!!Y&&K==="pm",ariaLabel:U}]}}default:throw new Error(`Unknown view: ${W} found.`)}},[ne,N,a,o,ae.hours,ae.minutes,ae.seconds,oe.hoursClockNumberText,oe.minutesClockNumberText,oe.secondsClockNumberText,K,se,Y,G,Z]),ee=p.useMemo(()=>{if(!r)return ue;const W=ue.filter(j=>j!=="meridiem");return W.reverse(),ue.includes("meridiem")&&W.push("meridiem"),W},[r,ue]),q=p.useMemo(()=>ue.reduce((W,j)=>E({},W,{[j]:de(j)}),{}),[ue,de]),{ownerState:te}=We(),le=jS(A);return u.jsx(LS,E({ref:n,className:ie(le.root,M),ownerState:te,role:"group"},Q,{children:ee.map(W=>u.jsx(NS,{items:q[W].items,onChange:q[W].onChange,active:me===W,autoFocus:l||X===W,disabled:F,readOnly:I,slots:c,slotProps:d,skipDisabled:T,"aria-label":oe.selectViewText(W)},W))}))}),Ir=({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:g,maxTime:h,shouldDisableTime:v,minutesStep:f,ampm:b,ampmInClock:C,slots:w,slotProps:x,readOnly:S,disabled:P,sx:k,autoFocus:R,showViewSwitcher:_,disableIgnoringDatePartForTimeValidation:O,timezone:$})=>u.jsx(bS,{view:e,onViewChange:t,focusedView:n&&Fn(n)?n:null,onFocusedViewChange:o,views:r.filter(Fn),value:s,defaultValue:a,referenceDate:i,onChange:l,className:c,classes:d,disableFuture:m,disablePast:y,minTime:g,maxTime:h,shouldDisableTime:v,minutesStep:f,ampm:b,ampmInClock:C,slots:w,slotProps:x,readOnly:S,disabled:P,sx:k,autoFocus:R,showViewSwitcher:_,disableIgnoringDatePartForTimeValidation:O,timezone:$}),BS=({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:g,maxTime:h,shouldDisableTime:v,minutesStep:f,ampm:b,slots:C,slotProps:w,readOnly:x,disabled:S,sx:P,autoFocus:k,disableIgnoringDatePartForTimeValidation:R,timeSteps:_,skipDisabled:O,timezone:$})=>u.jsx(TS,{view:e,onViewChange:t,focusedView:n&&Fn(n)?n:null,onFocusedViewChange:o,views:r.filter(Fn),value:s,defaultValue:a,referenceDate:i,onChange:l,className:c,classes:d,disableFuture:m,disablePast:y,minTime:g,maxTime:h,shouldDisableTime:v,minutesStep:f,ampm:b,slots:C,slotProps:w,readOnly:x,disabled:S,sx:P,autoFocus:k,disableIgnoringDatePartForTimeValidation:R,timeStep:_?.minutes,skipDisabled:O,timezone:$}),Pi=({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:g,maxTime:h,shouldDisableTime:v,minutesStep:f,ampm:b,slots:C,slotProps:w,readOnly:x,disabled:S,sx:P,autoFocus:k,disableIgnoringDatePartForTimeValidation:R,timeSteps:_,skipDisabled:O,timezone:$})=>u.jsx(VS,{view:e,onViewChange:t,focusedView:n&&kl(n)?n:null,onFocusedViewChange:o,views:r.filter(Fn),value:s,defaultValue:a,referenceDate:i,onChange:l,className:c,classes:d,disableFuture:m,disablePast:y,minTime:g,maxTime:h,shouldDisableTime:v,minutesStep:f,ampm:b,slots:C,slotProps:w,readOnly:x,disabled:S,sx:P,autoFocus:k,disableIgnoringDatePartForTimeValidation:R,timeSteps:_,skipDisabled:O,timezone:$}),zS=(e,t,n)=>n?t.filter(o=>!kl(o)||o==="hours"):e?[...t,"meridiem"]:t,HS=(e,t)=>24*60/((e.hours??1)*(e.minutes??5))<=t;function WS({thresholdToRenderTimeInASingleColumn:e,ampm:t,timeSteps:n,views:o}){const r=e??24,s=E({hours:1,minutes:5,seconds:5},n),a=HS(s,r);return{thresholdToRenderTimeInASingleColumn:r,timeSteps:s,shouldRenderTimeInASingleColumn:a,views:zS(t,o,a)}}const du=p.forwardRef(function(t,n){const o=Ie(),r=su(t,"MuiDesktopTimePicker"),{shouldRenderTimeInASingleColumn:s,views:a,timeSteps:i}=WS(r),l=s?BS:Pi,c=E({hours:l,minutes:l,seconds:l,meridiem:l},r.viewRenderers),d=r.ampmInClock??!0,y=c.hours?.name===Pi.name?a:a.filter(v=>v!=="meridiem"),g=E({},r,{ampmInClock:d,timeSteps:i,viewRenderers:c,format:Sl(o,r),views:s?["hours"]:y,slots:E({field:ou},r.slots),slotProps:E({},r.slotProps,{field:v=>E({},cn(r.slotProps?.field,v),lr(r)),toolbar:E({hidden:!0,ampmInClock:d},r.slotProps?.toolbar)})}),{renderPicker:h}=$c({ref:n,props:g,valueManager:tt,valueType:"time",validator:cr,steps:null});return h()});du.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:ar,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 pu=p.forwardRef(function(t,n){const o=Ie(),r=su(t,"MuiMobileTimePicker"),s=E({hours:Ir,minutes:Ir,seconds:Ir},r.viewRenderers),a=r.ampmInClock??!1,i=E({},r,{ampmInClock:a,viewRenderers:s,format:Sl(o,r),slots:E({field:ou},r.slots),slotProps:E({},r.slotProps,{field:c=>E({},cn(r.slotProps?.field,c),lr(r)),toolbar:E({hidden:!1,ampmInClock:a},r.slotProps?.toolbar)})}),{renderPicker:l}=tu({ref:n,props:i,valueManager:tt,valueType:"time",validator:cr,steps:null});return l()});pu.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:ar,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 US=["desktopModeMediaQuery"],YS=p.forwardRef(function(t,n){const o=Te({props:t,name:"MuiTimePicker"}),{desktopModeMediaQuery:r=nc}=o,s=he(o,US);return ps(r,{defaultMatches:!0})?u.jsx(du,E({ref:n},s)):u.jsx(pu,E({ref:n},s))}),Rr=(e,t)=>{typeof e=="function"?e(t):e&&(e.current=t)},Qr=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:g,onFocus:h,onClick:v,InputProps:f,inputProps:b},C)=>u.jsxs("div",{ref:w=>{Rr(C,w),Rr(f?.ref,w)},onBlur:g,onFocus:h,onClick:v,className:Le("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=>{Rr(b?.ref,w),c&&w&&w.focus()},className:Le("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]}));Qr.displayName="PickerTextField";const tr=({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(Js(t))){const f=Js(t);i(f),c(f)}else i(null),c(null)},[t]);const g=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)},h=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(_l,{dateAdapter:em,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(wk,{value:a,onChange:g,disabled:r,open:o?d:void 0,disableHighlightToday:o,onOpen:()=>m(!0),onClose:()=>m(!1),enableAccessibleFieldDOMStructure:!1,slots:{textField:Qr,openPickerIcon:()=>u.jsx(Ni,{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(YS,{value:l,onChange:h,disabled:r,enableAccessibleFieldDOMStructure:!1,slots:{textField:Qr,openPickerIcon:()=>u.jsx(sd,{size:16})},slotProps:{textField:{id:`${y}-time-field`,placeholder:"Select time"},openPickerButton:{"aria-label":`Choose ${e} time`,size:"small"}}})}),u.jsx(Kt,{content:"Set to current time",children:u.jsx(yt,{variant:"ghost",size:"icon-sm",onClick:v,disabled:r,"aria-label":`Set ${e} to current time`,children:u.jsx(Du,{})})})]}),s&&u.jsx("p",{className:"mt-1 ml-0.5 text-ink-muted text-meta",children:s})]})})},Mi={selectedAgentId:null,prompt:"",interval:1,unit:"hours",is_active:!0,one_time:!1,start_time_utc:null,end_time_utc:null},qS=({options:e,selected:t,onSelect:n,onQueryChange:o,loading:r,invalid:s})=>{fn();const a=p.useId(),i=`${a}-input`,l=`${a}-listbox`,c=p.useRef(null),d=p.useRef([]),m=t?.name||(t?B("ui.schedules.schedule_form_dialog.agent_id_substring_0_8",{substring_0__8:String(t.id.substring(0,8))}):""),[y,g]=p.useState(m),[h,v]=p.useState(!1),[f,b]=p.useState(-1);p.useEffect(()=>{g(m)},[m]),d.current.length=e.length,p.useEffect(()=>{b(-1)},[e]),p.useEffect(()=>{!h||f<0||d.current[f]?.scrollIntoView({block:"nearest"})},[h,f]);const C=k=>{v(!1),g(k.name||B("ui.schedules.schedule_form_dialog.agent_id_substring_0_8",{substring_0__8:String(k.id.substring(0,8))})),n(k)},w=()=>{v(!1),g(m)},x=k=>{e.length!==0&&b(R=>{const _=R+k;return _<0?e.length-1:_>=e.length?0:_})},S=k=>{switch(k.key){case"ArrowDown":case"ArrowUp":{if(k.preventDefault(),!h){v(!0);return}x(k.key==="ArrowDown"?1:-1);return}case"Home":case"End":{if(!h||e.length===0)return;k.preventDefault(),b(k.key==="Home"?0:e.length-1);return}case"Enter":{k.preventDefault(),h&&f>=0&&C(e[f]);return}case"Escape":{if(!h)return;k.preventDefault(),k.stopPropagation(),w();return}}},P=h&&f>=0?`${a}-option-${f}`:void 0;return u.jsx("div",{className:"relative",children:u.jsxs(Ju,{open:h,onOpenChange:k=>{k?v(!0):w()},children:[u.jsx(ed,{asChild:!0,children:u.jsxs("div",{ref:c,className:"relative",children:[u.jsx(Wo,{id:i,role:"combobox","aria-expanded":h,"aria-controls":l,"aria-autocomplete":"list","aria-activedescendant":P,"aria-invalid":s||void 0,autoComplete:"off",className:"pr-8",placeholder:B("ui.schedules.schedule_form_dialog.search_agents"),value:y,onChange:k=>{g(k.target.value),o(k.target.value),v(!0)},onFocus:()=>v(!0),onClick:()=>v(!0),onBlur:w,onKeyDown:S}),u.jsx("span",{className:"pointer-events-none absolute top-1/2 right-2 flex -translate-y-1/2 items-center",children:r?u.jsx(os,{size:"sm",label:B("ui.schedules.schedule_form_dialog.loading_agents")}):u.jsx(td,{className:"size-4 text-ink-dim","aria-hidden":"true"})})]})}),u.jsx(nd,{align:"start",className:"w-(--radix-popover-trigger-width) p-1",onOpenAutoFocus:k=>k.preventDefault(),onCloseAutoFocus:k=>k.preventDefault(),onPointerDownOutside:k=>{c.current?.contains(k.target)&&k.preventDefault()},onFocusOutside:k=>{c.current?.contains(k.target)&&k.preventDefault()},onMouseDown:k=>k.preventDefault(),children:u.jsxs("ul",{id:l,role:"listbox","aria-label":B("ui.schedules.schedule_form_dialog.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?B("ui.schedules.schedule_form_dialog.loading_agents"):B("ui.schedules.schedule_form_dialog.no_matching_agents")}),e.map((k,R)=>u.jsx("li",{id:`${a}-option-${R}`,role:"option","aria-selected":k.id===t?.id,ref:_=>{d.current[R]=_},className:Le("cursor-pointer rounded-sm px-2 py-1.5","transition-colors duration-fast ease-out-quart",R===f&&"bg-accent-wash"),onMouseEnter:()=>b(R),onClick:()=>C(k),children:u.jsx("span",{className:"font-medium text-body-sm text-ink",children:k.name||B("ui.schedules.schedule_form_dialog.unnamed_agent")})},k.id))]})})]})})},KS=({open:e,onClose:t,onSubmit:n,initialData:o})=>{fn();const[r,s]=p.useState(Mi),[a,i]=p.useState(!1),[l,c]=p.useState(""),[d,m]=p.useState(""),[y,g]=p.useState(null),h=!!o;p.useEffect(()=>{const k=setTimeout(()=>{m(l)},300);return()=>clearTimeout(k)},[l]);const{data:v,isLoading:f,isError:b}=Tu(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 k=C.find(R=>R.id===o.agent_id);k&&g(k)}else s(Mi),g(null),c("")},[e,o,C]);const w=async()=>{i(!0);try{if(!h&&!r.selectedAgentId){console.error("Agent ID is required to create a schedule."),i(!1);return}const k={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};k.start_time_utc===""&&(k.start_time_utc=null),k.end_time_utc===""&&(k.end_time_utc=null);const R=h?o.agent_id:r.selectedAgentId;if(!R){console.error("Agent ID is missing for submission."),i(!1);return}await n(k,R),t()}catch(k){console.error("Failed to submit schedule:",k),Pn(B("ui.schedules.schedule_form_dialog.failed_to_save_schedule_unknown_error",{unknown_error:String(k instanceof Error?k.message:B("ui.schedules.schedule_form_dialog.unknown_error"))}))}finally{i(!1)}},x=h?B("ui.schedules.schedule_form_dialog.edit_schedule"):B("ui.schedules.schedule_form_dialog.new_schedule"),S=b||!h&&!r.selectedAgentId&&a,P=u.jsxs(u.Fragment,{children:[u.jsx(zi,{onClick:t,disabled:a,startIcon:u.jsx(Iu,{size:18}),"data-tour-tag":"create-schedule-dialog-cancel-button",children:B("ui.schedules.schedule_form_dialog.cancel")}),u.jsx(Hi,{onClick:w,disabled:a||!r.prompt||r.interval===""||r.interval<1||!h&&!r.selectedAgentId,startIcon:a?u.jsx(os,{size:"sm"}):u.jsx(Ru,{size:18}),children:a?B("ui.schedules.schedule_form_dialog.saving"):h?B("ui.schedules.schedule_form_dialog.save_changes"):B("ui.schedules.schedule_form_dialog.create_schedule")})]});return u.jsx(Wi,{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(Ks,{size:16,"aria-hidden":"true",className:"mt-0.5 shrink-0 text-info"}),u.jsx("p",{className:"text-body-sm text-ink-muted",children:B("ui.schedules.schedule_form_dialog.it_is_usually_quicker_to_ask_an_agent_in_chat_send_me_an_email_wi")})]}),!h&&u.jsxs("div",{className:"col-span-2 flex flex-col gap-1.5",children:[u.jsxs(bt,{htmlFor:"agent-select-for-schedule",children:[B("ui.schedules.schedule_form_dialog.agent"),u.jsx("span",{className:"text-danger",children:"*"})]}),u.jsx(qS,{options:C,selected:y,onSelect:k=>{g(k),s(R=>({...R,selectedAgentId:k?k.id:null}))},onQueryChange:c,loading:f,invalid:S}),S&&u.jsx("p",{className:"text-danger text-meta",children:b?B("ui.schedules.schedule_form_dialog.failed_to_load_agents"):B("ui.schedules.schedule_form_dialog.agent_selection_is_required")})]}),h&&o&&u.jsxs("p",{className:"col-span-2 text-body-sm text-ink-muted",children:[B("ui.schedules.schedule_form_dialog.runs_as")," ",u.jsx("span",{className:"font-medium text-ink",children:y?.name||`${o.agent_id.substring(0,8)}…`}),B("ui.schedules.schedule_form_dialog.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(bt,{htmlFor:"prompt",className:"items-center",children:[B("ui.schedules.schedule_form_dialog.prompt"),u.jsx("span",{className:"text-danger",children:"*"}),u.jsx(Kt,{side:"top",align:"start",content:u.jsxs("div",{className:"flex flex-col gap-1",children:[u.jsx("span",{children:B("ui.schedules.schedule_form_dialog.this_is_the_message_that_will_be_sent_to_the_agent_on_the_schedul")}),u.jsx("span",{children:B("ui.schedules.schedule_form_dialog.example_send_me_an_email_with_a_detailed_world_news_breakdown_wit")})]}),children:u.jsx(Ks,{size:14,"aria-hidden":"true",className:"text-info"})})]}),u.jsx(Vi,{id:"prompt",name:"prompt",value:r.prompt,onChange:k=>s(R=>({...R,prompt:k.target.value})),required:!0,rows:3,disabled:a,placeholder:B("ui.schedules.schedule_form_dialog.send_me_an_email_with_a_detailed_world_news_breakdown")})]}),u.jsxs("div",{className:"flex flex-col gap-1.5",children:[u.jsxs(bt,{htmlFor:"interval",children:[B("ui.schedules.schedule_form_dialog.interval"),u.jsx("span",{className:"text-danger",children:"*"})]}),u.jsx(Wo,{id:"interval",name:"interval",type:"number",min:1,value:r.interval,onChange:k=>{const R=k.target.value;s(_=>({..._,interval:R===""?"":Number.parseInt(R,10)}))},required:!0,disabled:a,placeholder:"1"})]}),u.jsxs("div",{className:"flex flex-col gap-1.5",children:[u.jsxs(bt,{htmlFor:"unit-select",children:[B("ui.schedules.schedule_form_dialog.unit"),u.jsx("span",{className:"text-danger",children:"*"})]}),u.jsxs(vn,{value:r.unit||"hours",onValueChange:k=>s(R=>({...R,unit:k})),disabled:a,children:[u.jsx(xn,{id:"unit-select",name:"unit",children:u.jsx(wn,{placeholder:B("ui.schedules.schedule_form_dialog.select_unit")})}),u.jsxs(Cn,{children:[u.jsx(et,{value:"minutes",children:B("ui.schedules.schedule_form_dialog.minutes")}),u.jsx(et,{value:"hours",children:B("ui.schedules.schedule_form_dialog.hours")}),u.jsx(et,{value:"days",children:B("ui.schedules.schedule_form_dialog.days")})]})]})]}),u.jsx(tr,{label:B("ui.schedules.schedule_form_dialog.start_time"),value:r.start_time_utc??null,onChange:k=>s(R=>({...R,start_time_utc:k})),disabled:a,helperText:B("ui.schedules.schedule_form_dialog.if_not_set_starts_immediately_or_on_next_interval")}),u.jsx(tr,{label:B("ui.schedules.schedule_form_dialog.end_time_optional"),value:r.end_time_utc??null,onChange:k=>s(R=>({...R,end_time_utc:k})),disabled:a,helperText:B("ui.schedules.schedule_form_dialog.if_not_set_schedule_runs_indefinitely")}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Er,{id:"is-active",checked:r.is_active||!1,onCheckedChange:k=>s(R=>({...R,is_active:k})),disabled:a}),u.jsx(bt,{htmlFor:"is-active",children:B("ui.schedules.schedule_form_dialog.active")})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Er,{id:"one-time",checked:r.one_time||!1,onCheckedChange:k=>s(R=>({...R,one_time:k})),disabled:a}),u.jsx(bt,{htmlFor:"one-time",children:B("ui.schedules.schedule_form_dialog.run_once")})]})]})})},GS=(e,t)=>ad(e,t),QS=e=>{const t=nr.baseUrl;return ji({queryKey:["agent-name",e,t],queryFn:async()=>t?(await ld.getAgent(t,e)).result?.name||B("ui.schedules.schedule_list_item.unknown_agent"):(console.warn("Base URL for Local Operator API is not configured."),B("ui.schedules.schedule_list_item.agent_id")),enabled:!!e&&!!t,staleTime:1e3*60*5})},XS=({schedule:e,onEdit:t,onDelete:n,onToggleActive:o,nowMs:r=Date.now()})=>{fn();const{data:s,isLoading:a}=QS(e.agent_id),i=p.useId();return u.jsxs("div",{title:B("ui.schedules.schedule_list_item.schedule_id_id",{id:String(e.id)}),className:Le("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:Le("flex min-w-0 flex-1 flex-col gap-1"),children:[u.jsx("p",{className:Le("min-w-0 break-words text-body-sm",e.is_active?"text-ink":"text-ink-muted"),children:e.prompt}),u.jsxs("p",{className:Le("flex flex-wrap items-center gap-x-1.5 text-meta"),children:[u.jsx("span",{className:Le("text-ink-muted"),children:GS(e,r)}),u.jsx("span",{"aria-hidden":"true",className:Le("text-ink-dim"),children:"·"}),a?u.jsx(od,{className:Le("h-3 w-24")}):u.jsx("span",{className:Le("truncate text-ink-dim"),children:s||e.agent_id.substring(0,8)})]})]}),u.jsxs("div",{className:Le("flex shrink-0 items-center gap-1"),children:[u.jsx(Kt,{content:e.is_active?B("ui.schedules.schedule_list_item.pause_schedule"):B("ui.schedules.schedule_list_item.resume_schedule"),children:u.jsx("span",{className:Le("flex items-center pr-1"),children:u.jsx(Er,{id:i,checked:e.is_active,onCheckedChange:()=>o(e),"aria-label":e.is_active?B("ui.schedules.schedule_list_item.pause_schedule"):B("ui.schedules.schedule_list_item.resume_schedule")})})}),u.jsxs("div",{className:Le("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(Kt,{content:B("ui.schedules.schedule_list_item.edit_schedule"),children:u.jsx(yt,{variant:"ghost",size:"icon-sm",onClick:()=>t(e),"aria-label":B("ui.schedules.schedule_list_item.edit_schedule"),children:u.jsx(Ai,{})})}),u.jsx(Kt,{content:B("ui.schedules.schedule_list_item.delete_schedule"),children:u.jsx(yt,{variant:"ghost",size:"icon-sm",onClick:()=>n(e.id),"aria-label":B("ui.schedules.schedule_list_item.delete_schedule"),className:Le("hover:bg-danger-wash hover:text-danger"),children:u.jsx(id,{})})})]})]})]})},ZS=20,JS=9,oo=6e4,eP=["minutes","hours","days","weeks"],tP={get minutes(){return B("ui.schedules.scheduled_task_dialog.minutes")},get hours(){return B("ui.schedules.scheduled_task_dialog.hours")},get days(){return B("ui.schedules.scheduled_task_dialog.days")},get weeks(){return B("ui.schedules.scheduled_task_dialog.weeks")}},nP={minutes:oo,hours:60*oo,days:24*60*oo,weeks:7*24*60*oo},oP=({open:e,onClose:t,nowMs:n=Date.now(),edit:o=null})=>{fn();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"),[g,h]=p.useState(null),[v,f]=p.useState("never"),[b,C]=p.useState("1"),[w,x]=p.useState("hours"),[S,P]=p.useState("never"),[k,R]=p.useState(null),[_,O]=p.useState(2),[$,M]=p.useState(()=>crypto.randomUUID()),A=_u(e),F=$i(),I=F.refetch;p.useEffect(()=>{e&&I()},[e,I]);const T=Eu(),L=Ou(),Q=Li(j=>j.cwd),N=T.isPending||L.isPending,J=p.useId();p.useEffect(()=>{e&&(a("new"),l(null),d(o?.message??""),y(r?"keep":"in-an-hour"),h(null),f(r?"keep":"never"),C("1"),x("hours"),P(r?"keep":"never"),R(null),O(2),M(crypto.randomUUID()))},[e,o,r]);const z=p.useMemo(()=>{const j=new Date(n);return j.setHours(ZS,0,0,0),j.getTime()>n+oo?j:null},[n]),oe=p.useMemo(()=>{const j=new Date(n);return j.setDate(j.getDate()+1),j.setHours(JS,0,0,0),j},[n]),ne=p.useMemo(()=>[...A.data??[]].sort((j,U)=>U.mtime-j.mtime),[A.data]),ae=ne.find(j=>j.id===i),Y=F.data?.entries.find(j=>j.session_id===i)?.schedules.length??0,re=cd(b),ue=v==="every"&&re!==null,me=ue&&gd(re),se=ue&&re!==null?re*nP[w]:null,X=!r&&s==="existing"&&!i,H=m==="pick"&&!g,K=S==="date"&&!k,Z=S==="runs"&&_==="",G=ud({message:c,needsConversation:X,hasConversationChoices:ne.length>0,repeatIntervalNotWhole:v==="every"&&re===null,repeatMs:se,endsRuns:S==="runs"&&_!==""?_:null,existingWakeCount:Y,alreadyRun:o?.wake.fired_count??0}),de=G.invalid||H||K||Z,ee=!r||c!==o.message||m!=="keep"||v!=="keep"||S!=="keep",q=dd(Q),te=()=>m==="keep"?null:m==="in-30-minutes"?{in:"30m"}:m==="in-an-hour"?{in:"1h"}:m==="tonight"?z?{at:z.toISOString()}:null:m==="tomorrow"?{at:oe.toISOString()}:g?{at:g}:null,le=async()=>{if(de)return;const j=te();try{if(o){await L.mutateAsync({sessionId:o.sessionId,wakeId:o.wakeId,message:c.trim(),...j?{firstRun:j}:{},...me&&re!==null?{every:Xs(re,w)}:{},...v==="every"&&S==="date"&&k?{until:k}:{},...v==="every"&&S==="runs"&&_!==""?{limit:_}:{}}),Mn(B("ui.schedules.scheduled_task_dialog.wake_updated_trim",{trim:String(Lo(c.trim()))})),t();return}const U=await T.mutateAsync({requestId:$,...i?{sessionId:i}:{cwd:Q},message:c.trim(),firstRun:j??{in:"1h"},...me&&re!==null?{every:Xs(re,w)}:{},...v==="every"&&S==="date"&&k?{until:k}:{},...v==="every"&&S==="runs"&&_!==""?{limit:_}:{}});Mn(U.index_written?B("ui.schedules.scheduled_task_dialog.scheduled_task_created_trim",{trim:String(Lo(c.trim()))}):B("ui.schedules.scheduled_task_dialog.scheduled_task_created_trim_the_list_may_lag_until_the_index_catc",{trim:String(Lo(c.trim()))})),t()}catch(U){Pn(U instanceof Error?B("ui.schedules.scheduled_task_dialog.value1_message",{value1:String(r?B("ui.schedules.scheduled_task_dialog.could_not_save_the_wake"):B("ui.schedules.scheduled_task_dialog.could_not_create_the_scheduled_task")),message:String(U.message)}):r?B("ui.schedules.scheduled_task_dialog.could_not_save_the_wake_490"):B("ui.schedules.scheduled_task_dialog.could_not_create_the_scheduled_task_491"))}},W=u.jsxs(u.Fragment,{children:[u.jsx(zi,{onClick:t,disabled:N,children:B("ui.schedules.scheduled_task_dialog.cancel")}),u.jsx(Hi,{onClick:le,disabled:de||N||!ee,startIcon:u.jsx(_r,{size:18}),children:r?N?B("ui.schedules.scheduled_task_dialog.saving"):B("ui.schedules.scheduled_task_dialog.save"):N?B("ui.schedules.scheduled_task_dialog.creating"):B("ui.schedules.scheduled_task_dialog.create")})]});return u.jsxs(Wi,{open:e,onClose:t,title:r?B("ui.schedules.scheduled_task_dialog.edit_wake"):B("ui.schedules.scheduled_task_dialog.new_scheduled_task"),actions:W,maxWidth:"sm",fullWidth:!0,dataTourTag:"create-scheduled-task-dialog",children:[o&&u.jsxs("p",{className:"text-body-sm text-ink-dim",children:[o.conversationName,B("ui.schedules.scheduled_task_dialog.wake"),Qs(o.position,{useGrouping:!1}),B("ui.schedules.scheduled_task_dialog.of"),Qs(o.count,{useGrouping:!1})]}),u.jsxs("div",{className:"flex flex-col gap-4",children:[u.jsxs("div",{className:"flex flex-col gap-1.5",children:[u.jsxs(bt,{htmlFor:`${J}-prompt`,children:[B("ui.schedules.scheduled_task_dialog.prompt"),u.jsx("span",{className:"text-danger",children:"*"})]}),u.jsx(Vi,{id:`${J}-prompt`,name:"prompt",value:c,onChange:j=>d(j.target.value),rows:3,disabled:N,placeholder:B("ui.schedules.scheduled_task_dialog.send_me_an_email_with_a_detailed_world_news_breakdown")}),u.jsx("p",{className:"text-body-sm text-ink-muted",children:B("ui.schedules.scheduled_task_dialog.this_is_the_message_the_conversation_receives_when_it_wakes_up")}),G.prompt&&u.jsx("p",{className:"text-meta text-danger",children:G.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:B("ui.schedules.scheduled_task_dialog.run_in")}),u.jsx(bt,{children:B("ui.schedules.scheduled_task_dialog.run_in")}),u.jsx("div",{className:"flex w-fit gap-0.5 rounded-md bg-sunken p-0.5",children:[["new",B("ui.schedules.scheduled_task_dialog.a_new_conversation")],["existing",B("ui.schedules.scheduled_task_dialog.an_existing_conversation")]].map(([j,U])=>u.jsx(yt,{variant:"ghost",size:"sm","aria-pressed":s===j,onClick:()=>a(j),disabled:N,className:Le(s===j&&"bg-surface text-ink hover:bg-surface"),children:U},j))})]}),!r&&s==="existing"&&u.jsxs("div",{className:"flex flex-col gap-1.5",children:[u.jsx(bt,{htmlFor:`${J}-conversation`,children:B("ui.schedules.scheduled_task_dialog.conversation")}),u.jsxs(vn,{value:i??"",onValueChange:l,disabled:N,children:[u.jsx(xn,{id:`${J}-conversation`,children:u.jsx(wn,{placeholder:B("ui.schedules.scheduled_task_dialog.pick_a_conversation")})}),u.jsx(Cn,{children:ne.map(j=>u.jsxs(et,{value:j.id,textValue:j.name||j.id.slice(0,8),children:[j.name||B("ui.schedules.scheduled_task_dialog.untitled_slice_0_8",{slice_0__8:String(j.id.slice(0,8))}),u.jsx("span",{className:"pl-2 text-ink-dim",children:pd(Math.max(0,n-j.mtime*1e3))})]},j.id))})]}),A.isLoading&&u.jsx("p",{className:"text-meta text-ink-dim",children:B("ui.schedules.scheduled_task_dialog.loading_conversations")}),A.error&&u.jsxs("p",{className:"text-meta text-danger",children:[B("ui.schedules.scheduled_task_dialog.could_not_read_your_conversations"),A.error.message]}),!A.isLoading&&!A.error&&ne.length===0&&u.jsxs("p",{className:"text-meta text-ink-dim",children:[B("ui.schedules.scheduled_task_dialog.no_conversations_yet_start_one_in_chat_or_choose")," ",u.jsx("em",{children:B("ui.schedules.scheduled_task_dialog.a_new_conversation")}),"."]})]}),!r&&s==="new"&&u.jsxs("p",{className:"text-body-sm text-ink-dim",children:[B("ui.schedules.scheduled_task_dialog.starts_in"),q,B("ui.schedules.scheduled_task_dialog.with_your_default_model")]}),!r&&s==="existing"&&ae&&u.jsxs("p",{className:"text-body-sm text-ink-dim",children:[B("ui.schedules.scheduled_task_dialog.runs_in"),ae.name,B("ui.schedules.scheduled_task_dialog.as_a_turn_in_that_conversation")]}),!r&&G.conversation&&u.jsx("p",{className:"text-meta text-danger",children:G.conversation}),u.jsxs("div",{className:"flex flex-col gap-1.5",children:[u.jsx(bt,{htmlFor:`${J}-first-run`,children:B("ui.schedules.scheduled_task_dialog.first_run")}),u.jsxs(vn,{value:m,onValueChange:j=>y(j),disabled:N,children:[u.jsx(xn,{id:`${J}-first-run`,children:u.jsx(wn,{})}),u.jsxs(Cn,{children:[r&&u.jsx(et,{value:"keep",children:fd(o.wake,n,o.parked)}),u.jsx(et,{value:"in-an-hour",children:B("ui.schedules.scheduled_task_dialog.in_an_hour")}),u.jsx(et,{value:"in-30-minutes",children:B("ui.schedules.scheduled_task_dialog.in_30_minutes")}),z&&u.jsx(et,{value:"tonight",children:B("ui.schedules.scheduled_task_dialog.tonight_at_8_00_pm")}),u.jsx(et,{value:"tomorrow",children:B("ui.schedules.scheduled_task_dialog.tomorrow_at_9_00_am")}),u.jsx(et,{value:"pick",children:B("ui.schedules.scheduled_task_dialog.pick_a_time")})]})]}),m==="pick"&&u.jsx(tr,{label:B("ui.schedules.scheduled_task_dialog.first_run_at"),value:g,onChange:h,disabled:N})]}),u.jsxs("div",{className:"flex flex-col gap-1.5",children:[u.jsx(bt,{htmlFor:`${J}-repeat`,children:B("ui.schedules.scheduled_task_dialog.repeat")}),u.jsxs(vn,{value:v,onValueChange:j=>f(j),disabled:N,children:[u.jsx(xn,{id:`${J}-repeat`,children:u.jsx(wn,{})}),u.jsxs(Cn,{children:[r&&u.jsx(et,{value:"keep",children:md(o.wake)}),u.jsx(et,{value:"never",children:B("ui.schedules.scheduled_task_dialog.don_t_repeat")}),u.jsx(et,{value:"every",children:B("ui.schedules.scheduled_task_dialog.every")})]})]}),v==="every"&&u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Wo,{type:"number",min:1,step:1,"aria-label":B("ui.schedules.scheduled_task_dialog.repeat_interval"),className:"w-24",value:b,onChange:j=>C(j.target.value),disabled:N}),u.jsxs(vn,{value:w,onValueChange:j=>x(j),disabled:N,children:[u.jsx(xn,{"aria-label":B("ui.schedules.scheduled_task_dialog.repeat_unit"),className:"w-36",children:u.jsx(wn,{})}),u.jsx(Cn,{children:eP.map(j=>u.jsx(et,{value:j,children:tP[j]},j))})]})]}),G.repeatInterval&&u.jsx("p",{className:"text-meta text-danger",children:G.repeatInterval}),G.repeat&&u.jsx("p",{className:"text-meta text-danger",children:G.repeat})]}),(v==="every"||S!=="never")&&u.jsxs("div",{className:"flex flex-col gap-1.5",children:[u.jsx(bt,{htmlFor:`${J}-ends`,children:B("ui.schedules.scheduled_task_dialog.ends")}),u.jsxs(vn,{value:S,onValueChange:j=>P(j),disabled:N,children:[u.jsx(xn,{id:`${J}-ends`,children:u.jsx(wn,{})}),u.jsxs(Cn,{children:[r&&u.jsx(et,{value:"keep",children:hd(o.wake,n)}),u.jsx(et,{value:"never",children:B("ui.schedules.scheduled_task_dialog.never")}),u.jsx(et,{value:"date",children:B("ui.schedules.scheduled_task_dialog.on_a_date")}),u.jsx(et,{value:"runs",children:B("ui.schedules.scheduled_task_dialog.after_n_runs")})]})]}),S==="date"&&u.jsx(tr,{label:B("ui.schedules.scheduled_task_dialog.last_run"),value:k,onChange:R,disabled:N}),S==="runs"&&u.jsx(Wo,{type:"number",min:1,"aria-label":B("ui.schedules.scheduled_task_dialog.number_of_runs"),className:"w-24",value:_,onChange:j=>O(j.target.value===""?"":Number.parseInt(j.target.value,10)),disabled:N}),G.ends&&u.jsx("p",{className:"text-meta text-danger",children:G.ends})]}),u.jsx("p",{className:"text-body-sm text-ink-dim",children:B("ui.schedules.scheduled_task_dialog.if_a_tool_needs_approval_the_wake_parks_and_waits_for_you_rather")}),r&&u.jsx("p",{className:"text-body-sm text-ink-dim",children:B("ui.schedules.scheduled_task_dialog.a_new_first_run_moves_the_next_wake_to_that_time_and_a_new_repeat")}),!r&&u.jsx("p",{className:"text-body-sm text-ink-dim",children:B("ui.schedules.scheduled_task_dialog.it_is_usually_quicker_to_ask_an_agent_in_chat_send_me_the_latest")})]})]})},Xr=["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"],Di=({wake:e,managedName:t,onCancel:n,onEdit:o})=>(fn(),u.jsx(Nu,{row:e,trailingClause:e.ranLabel||void 0,note:t===null?void 0:u.jsx($u,{name:t}),action:u.jsxs(u.Fragment,{children:[t!==null&&u.jsx(Au,{name:t}),u.jsx(Kt,{content:B("ui.schedules.wake_conversation_row.edit_wake"),children:u.jsx(yt,{variant:"ghost",size:"icon-sm","aria-label":B("ui.schedules.wake_conversation_row.edit_wake"),onClick:o,className:Le(...Xr,"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(Ai,{})})}),t===null&&u.jsx(Kt,{content:B("ui.schedules.wake_conversation_row.cancel_wake"),children:u.jsx(yt,{variant:"ghost",size:"icon-sm","aria-label":B("ui.schedules.wake_conversation_row.cancel_wake"),onClick:n,className:Le(...Xr,"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(rd,{})})})]})})),rP=({row:e,onOpen:t,onCancel:n,onEdit:o,identity:r})=>{fn();const[s,a]=p.useState(!1),i=e.wakes.slice(e.visibleWakes.length),l={sessionId:e.sessionId,wakeIds:e.wakes.map(d=>d.id),aida:r},c=d=>ju(d.id,l)==="managed"?r.name:null;return u.jsx("li",{"data-scheduled-task-row":e.sessionId,className:Le("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:Le("flex items-start gap-3"),children:[u.jsxs("div",{className:Le("flex min-w-0 flex-1 flex-col gap-1"),children:[u.jsxs("div",{className:Le("flex min-w-0 items-baseline justify-between gap-2"),children:[u.jsx("span",{className:Le("min-w-0 truncate text-body-sm text-ink"),title:e.cwd,children:e.name}),e.meta&&u.jsx("span",{className:Le("shrink-0 text-ink-muted text-meta"),children:e.meta})]}),u.jsx("ul",{className:Le("flex flex-col gap-1 pl-4"),children:e.visibleWakes.map(d=>u.jsx(Di,{wake:d,managedName:c(d),onCancel:()=>n(e,d),onEdit:()=>o(e,d)},d.id))}),i.length>0&&u.jsx(bd,{summary:s?B("ui.schedules.wake_conversation_row.show_fewer"):yd(i.length),onOpenChange:a,className:Le("pl-4"),triggerClassName:Le("text-ink-muted hover:text-ink"),children:u.jsx("ul",{className:Le("flex flex-col gap-1"),children:i.map(d=>u.jsx(Di,{wake:d,managedName:c(d),onCancel:()=>n(e,d),onEdit:()=>o(e,d)},d.id))})})]}),u.jsx("div",{className:Le("flex shrink-0 items-center gap-0.5",...Xr),children:u.jsx(Kt,{content:B("ui.schedules.wake_conversation_row.open_conversation"),children:u.jsx(yt,{variant:"ghost",size:"icon-sm","aria-label":B("ui.schedules.wake_conversation_row.open_conversation"),onClick:()=>t(e.sessionId),children:u.jsx(Fu,{})})})})]})})},yP=({nowMs:e=Date.now()})=>{fn();const t=Ku(),[n,o]=p.useState(null),[r,s]=p.useState(null),[a,i]=p.useState(null),l=$i(),c=ns(),d=Gu(),m=Qu(d.data,"aida",1),y=Lu(m),g=Vu(),h={capability:m,statusResolved:y.isSuccess,sessionId:y.data?.session_id??null,name:g},v=()=>{l.refetch(),qf(c)},f=Kf(),b=Bu(),C=Gf(),w=Qf(),x=f.data?.result?.schedules??[],S=l.data?.supervisor,P=S?.supported===!0&&S.running===!0&&S.verifiable!==!1,k=vd(l.data?.entries,e,{dueInstants:P}),R=I=>{Li.getState().openSession(I).then(T=>{T&&t(`/chat/${I}`)})},_=r!==null&&zu(r.row.sessionId,h),O=async()=>{if(!r)return;const{row:I,wake:T}=r;try{const L=I.sessionId;await b.mutateAsync({sessionId:L,wakeId:T.id}),Mn(B("ui.schedules.schedules_page.wake_cancelled"),{action:{get label(){return B("ui.schedules.schedules_page.open_conversation")},onClick:()=>R(L)}}),s(null)}catch(L){Pn(L instanceof Error?B("ui.schedules.schedules_page.could_not_cancel_the_wake_message",{message:String(L.message)}):B("ui.schedules.schedules_page.could_not_cancel_the_wake"))}},$=async I=>{if(a)try{await C.mutateAsync({scheduleId:a.id,scheduleData:I}),Mn(B("ui.schedules.schedules_page.schedule_updated")),i(null)}catch(T){Pn(T instanceof Error?B("ui.schedules.schedules_page.could_not_save_the_schedule_message",{message:String(T.message)}):B("ui.schedules.schedules_page.could_not_save_the_schedule"))}},M=async I=>{const T=x.find(L=>L.id===I);try{await w.mutateAsync({scheduleId:I,agentId:T?.agent_id}),Mn(B("ui.schedules.schedules_page.schedule_removed"))}catch(L){Pn(L instanceof Error?B("ui.schedules.schedules_page.could_not_remove_the_schedule_message",{message:String(L.message)}):B("ui.schedules.schedules_page.could_not_remove_the_schedule"))}},A=async I=>{try{await C.mutateAsync({scheduleId:I.id,scheduleData:{is_active:!I.is_active}}),Mn(I.is_active?B("ui.schedules.legacy.deactivated"):B("ui.schedules.legacy.activated"))}catch(T){Pn(T instanceof Error?B("ui.schedules.schedules_page.could_not_toggle_the_schedule_message",{message:String(T.message)}):B("ui.schedules.schedules_page.could_not_toggle_the_schedule"))}},F=xd({loading:l.isLoading,error:l.error!==null,readError:l.data?.read_error===!0,wakeRows:k.length,legacyLoading:f.isLoading,legacyRows:x.length});return u.jsxs("div",{className:"flex h-full flex-col gap-8 p-6",children:[u.jsx(Xu,{title:B("ui.schedules.schedules_page.schedules"),icon:Ni,subtitle:B("ui.schedules.schedules_page.work_your_conversations_do_on_a_schedule_repeating_or_once"),children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(yt,{variant:"secondary",size:"icon","aria-label":B("ui.schedules.schedules_page.refresh_scheduled_tasks"),title:B("ui.schedules.schedules_page.refresh_scheduled_tasks"),disabled:l.isFetching,onClick:v,"data-tour-tag":"refresh-schedules-button",children:u.jsx(Hu,{})}),u.jsxs(yt,{variant:"secondary",size:"md",onClick:()=>o({mode:"create"}),"data-tour-tag":"create-schedule-button",children:[u.jsx(_r,{}),B("ui.schedules.schedules_page.new_scheduled_task")]})]})}),u.jsxs("div",{"data-glass-region":"panel",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(os,{label:B("ui.schedules.schedules_page.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:B("ui.schedules.schedules_page.could_not_load_scheduled_tasks")}),u.jsx("p",{className:"text-body-sm text-ink-muted",children:l.error.message}),(k.length>0||x.length>0)&&u.jsx("p",{className:"text-body-sm text-ink-muted",children:B("ui.schedules.scheduled_task_model.the_list_below_is_the_last_one_that_loaded_so_it_may_be_out_of_da")}),u.jsx(yt,{variant:"secondary",size:"sm",onClick:v,children:B("ui.schedules.schedules_page.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(Gs,{variant:"warning",children:B("ui.schedules.schedules_page.could_not_read_this_machine_s_scheduled_tasks_so_the_list_below_m")}),u.jsx(yt,{variant:"secondary",size:"sm",onClick:v,children:B("ui.schedules.schedules_page.try_again")})]}),!l.isLoading&&S&&!P&&u.jsxs("div",{className:"border-hairline border-b p-4",children:[u.jsx(Gs,{variant:"warning",children:wd(S)}),S.detail&&u.jsx("p",{className:"mt-2 font-mono text-meta text-ink-dim",children:S.detail})]}),F&&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:B("ui.schedules.schedules_page.no_scheduled_tasks_yet")}),u.jsx("p",{className:"max-w-100 text-body-sm text-ink-muted",children:B("ui.schedules.schedules_page.ask_an_agent_in_chat_to_do_something_on_a_regular_basis_send_me_t")}),u.jsxs(yt,{variant:"secondary",size:"sm",onClick:()=>o({mode:"create"}),className:"mt-2",children:[u.jsx(_r,{}),B("ui.schedules.schedules_page.new_scheduled_task")]})]}),k.length>0&&u.jsx("ul",{className:"flex flex-col",children:k.map(I=>u.jsx(rP,{row:I,onOpen:R,identity:h,onCancel:(T,L)=>s({row:T,wake:L}),onEdit:(T,L)=>o({mode:"edit",sessionId:T.sessionId,wakeId:L.id,message:L.message,conversationName:T.name,position:L.position,count:T.wakes.length,wake:L.source,parked:T.parked})},I.sessionId))}),(x.length>0||f.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:B("ui.schedules.schedules_page.legacy_schedules")}),u.jsx("p",{className:"max-w-150 text-body-sm text-ink-muted",children:B("ui.schedules.schedules_page.these_run_on_the_older_agent_schedule_engine_new_scheduled_tasks")}),f.error&&u.jsxs("p",{className:"text-body-sm text-danger",children:[B("ui.schedules.schedules_page.could_not_load_legacy_schedules"),f.error.message]})]}),x.map(I=>u.jsx(XS,{schedule:I,nowMs:e,onEdit:()=>i(I),onDelete:M,onToggleActive:A},I.id))]}),!l.isLoading&&l.data?.truncated&&u.jsx("p",{className:"border-hairline border-t px-4 py-3 text-body-sm text-ink-dim",children:B("ui.schedules.count.list_truncated",{shown:l.data.entries.length,total:l.data.total})}),(k.length>0||x.length>0)&&u.jsxs("p",{className:"border-hairline border-t px-4 py-3 text-body-sm text-ink-dim",children:[P?B("ui.schedules.schedules_page.wakes_fire_whether_or_not_this_window_is_open"):"",B("ui.schedules.scheduled_task_model.a_terminal_stop_parks_a_conversation_s_wakes_until_its_next_turn")]})]}),u.jsx(oP,{open:n!==null,onClose:()=>o(null),nowMs:e,edit:n?.mode==="edit"?n:null}),u.jsx(KS,{open:a!==null,onClose:()=>i(null),onSubmit:I=>$(I),initialData:a}),u.jsx(Wu,{open:r!==null,title:qu(_,h.name),message:r?Yu({named:_,name:h.name,head:Lo(r.wake.message)}):"",confirmText:Uu(_),cancelText:B("ui.schedules.schedules_page.keep"),isDangerous:!0,onConfirm:()=>void O(),onCancel:()=>s(null)})]})};export{yP as SchedulesPage};
|
|
115
|
+
`));x&&!C&&k.current&&k.current.getSectionContent(F.startIndex).focus()},[]),pt(()=>{if(!(!z||!k.current)){if(A==="all")k.current.getRoot().focus();else if(typeof A=="number"){const ee=k.current.getSectionContent(A);ee&&ee.focus()}}},[A,z]),pt(()=>{zs({focused:z,domGetters:_,stateResponse:O})}),p.useImperativeHandle(P,()=>({getSections:()=>I.sections,getActiveSectionIndex:()=>hi(k),setSelectedSections:ee=>{if(C||!k.current)return;const q=jr(ee,I.sections);oe((q==="all"?0:q)!==null),Q(ee)},focusField:ne,isFieldFocused:()=>gi(k)})),E({},i,ae,{onBlur:se,onClick:H,onFocus:X,onInput:Z,onPaste:K,onKeyDown:me,onClear:G},Y,{error:M,clearable:!!(b&&!$&&!w&&!C),focused:S??z,sectionListRef:R,enableAccessibleFieldDOMStructure:!0,elements:de,areAllSectionsEmpty:$,disabled:C,readOnly:w,autoFocus:x,openPickerAriaLabel:J})};function hi(e){const t=ot(document);return!t||!e.current||!e.current.getRoot().contains(t)?null:e.current.getSectionIndexFromDOMElement(t)}function gi(e){const t=ot(document);return!!e.current&&e.current.getRoot().contains(t)}const Dn=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),Sw=(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=vs(i,n?"input-rtl":"input-ltr",t),c=`${i.startSeparator}${l}${i.endSeparator}`,d=Dn(c).length,m=c.length,y=Dn(l),g=r+(y===""?0:l.indexOf(y[0]))+i.startSeparator.length,h=g+y.length;s.push(E({},i,{start:o,end:o+d,startInInput:g,endInInput:h})),o+=d,r+=m}return s},Pw=e=>{const t=Ct(),n=Tn(),o=Tn(),{props:r,manager:s,skipContextFieldRefAssignment:a,manager:{valueType:i,internal_valueManager:l,internal_fieldValueManager:c,internal_useOpenPickerButtonAriaLabel:d}}=e,{internalProps:m,forwardedProps:y}=Bl(r,i),g=Vc({manager:s,internalProps:m,skipContextFieldRefAssignment:a}),{onFocus:h,onClick:v,onPaste:f,onBlur:b,onKeyDown:C,onClear:w,clearable:x,inputRef:S,placeholder:P}=y,{readOnly:k=!1,disabled:R=!1,autoFocus:_=!1,focused:O,unstableFieldRef:$}=g,M=p.useRef(null),A=rt(S,M),F=Lc({manager:s,internalPropsWithDefaults:g,forwardedProps:y}),{activeSectionIndex:I,areAllSectionsEmpty:T,error:L,localizedDigits:Q,parsedSelectedSections:N,sectionOrder:J,state:z,value:oe,clearValue:ne,clearActiveSection:ae,setCharacterQuery:Y,setSelectedSections:re,setTempAndroidValueStr:ue,updateSectionValue:me,updateValueFromValueStr:se,getSectionsFromValue:X}=F,H=jc({stateResponse:F}),K=d(oe),Z=p.useMemo(()=>Sw(z.sections,Q,t),[z.sections,Q,t]);function G(){const ye=M.current.selectionStart??0;let xe;ye<=Z[0].startInInput||ye>=Z[Z.length-1].endInInput?xe=1:xe=Z.findIndex(Ne=>Ne.startInInput-Ne.startSeparator.length>ye);const ge=xe===-1?Z.length-1:xe-1;re(ge)}function de(ye=0){ot(document)!==M.current&&(M.current?.focus(),re(ye))}const ee=pe(ye=>{h?.(ye);const xe=M.current;n.start(0,()=>{!xe||xe!==M.current||I==null&&(xe.value.length&&Number(xe.selectionEnd)-Number(xe.selectionStart)===xe.value.length?re("all"):G())})}),q=pe((ye,...xe)=>{ye.isDefaultPrevented()||(v?.(ye,...xe),G())}),te=pe(ye=>{if(f?.(ye),ye.preventDefault(),k||R)return;const xe=ye.clipboardData.getData("text");if(typeof N=="number"){const ge=z.sections[N],Ne=/^[a-zA-Z]+$/.test(xe),Ye=/^[0-9]+$/.test(xe),fe=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(xe);if(ge.contentType==="letter"&&Ne||ge.contentType==="digit"&&Ye||ge.contentType==="digit-with-letter"&&fe){Y(null),me({section:ge,newSectionValue:xe,shouldGoToNextSection:!0});return}if(Ne||Ye)return}Y(null),se(xe)}),le=pe(ye=>{b?.(ye),re(null)}),W=pe(ye=>{if(k)return;const xe=ye.target.value;if(xe===""){ne();return}const ge=ye.nativeEvent.data,Ne=ge&&ge.length>1,Ye=Ne?ge:xe,fe=Dn(Ye);if(N==="all"&&re(I),I==null||Ne){se(Ne?ge:fe);return}let ke;if(N==="all"&&fe.length===1)ke=fe;else{const De=Dn(c.getV6InputValueFromSections(Z,Q,t));let we=-1,Ge=-1;for(let mt=0;mt<De.length;mt+=1)we===-1&&De[mt]!==fe[mt]&&(we=mt),Ge===-1&&De[De.length-mt-1]!==fe[fe.length-mt-1]&&(Ge=mt);const st=Z[I];if(we<st.start||De.length-Ge-1>st.end)return;const Ro=fe.length-De.length+st.end-Dn(st.endSeparator||"").length;ke=fe.slice(st.start+Dn(st.startSeparator||"").length,Ro)}if(ke.length===0){Fm()&&ue(Ye),ae();return}H({keyPressed:ke,sectionIndex:I})}),j=pe((ye,...xe)=>{ye.preventDefault(),w?.(ye,...xe),ne(),bi(M)?re(J.startIndex):de(0)}),U=Bc({manager:s,internalPropsWithDefaults:g,stateResponse:F}),be=pe(ye=>{C?.(ye),U(ye)}),ve=p.useMemo(()=>P!==void 0?P:c.getV6InputValueFromSections(X(l.emptyValue),Q,t),[P,c,X,l.emptyValue,Q,t]),je=p.useMemo(()=>z.tempValueStrAndroid??c.getV6InputValueFromSections(z.sections,Q,t),[z.sections,c,z.tempValueStrAndroid,Q,t]);p.useEffect(()=>{M.current&&M.current===ot(document)&&re("all")},[]),pt(()=>{function ye(){if(!M.current)return;if(N==null){M.current.scrollLeft&&(M.current.scrollLeft=0);return}if(M.current!==ot(document))return;const xe=M.current.scrollTop;if(N==="all")M.current.select();else{const ge=Z[N],Ne=ge.type==="empty"?ge.startInInput-ge.startSeparator.length:ge.startInInput,Ye=ge.type==="empty"?ge.endInInput+ge.endSeparator.length:ge.endInInput;(Ne!==M.current.selectionStart||Ye!==M.current.selectionEnd)&&M.current===ot(document)&&M.current.setSelectionRange(Ne,Ye),o.start(0,()=>{M.current&&M.current===ot(document)&&M.current.selectionStart===M.current.selectionEnd&&(M.current.selectionStart!==Ne||M.current.selectionEnd!==Ye)&&ye()})}M.current.scrollTop=xe}ye()});const Me=p.useMemo(()=>I==null||z.sections[I].contentType==="letter"?"text":"numeric",[I,z.sections]),Ke=!(M.current&&M.current===ot(document))&&T;return p.useImperativeHandle($,()=>({getSections:()=>z.sections,getActiveSectionIndex:()=>{const ye=M.current.selectionStart??0,xe=M.current.selectionEnd??0;if(ye===0&&xe===0)return null;const ge=ye<=Z[0].startInInput?1:Z.findIndex(Ne=>Ne.startInInput-Ne.startSeparator.length>ye);return ge===-1?Z.length-1:ge-1},setSelectedSections:ye=>re(ye),focusField:de,isFieldFocused:()=>bi(M)})),E({},y,{error:L,clearable:!!(x&&!T&&!k&&!R),onBlur:le,onClick:q,onFocus:ee,onPaste:te,onKeyDown:be,onClear:j,inputRef:A,enableAccessibleFieldDOMStructure:!1,placeholder:ve,inputMode:Me,autoComplete:"off",value:Ke?"":je,onChange:W,focused:O,disabled:R,readOnly:k,autoFocus:_,openPickerAriaLabel:K})};function bi(e){return e.current===ot(document)}const zc=e=>{const t=Fl();return(e.props.enableAccessibleFieldDOMStructure??t?.enableAccessibleFieldDOMStructure??!0?kw:Pw)(e)};function Mw(e={}){const{enableAccessibleFieldDOMStructure:t=!0,ampm:n}=e;return p.useMemo(()=>({valueType:"time",validator:cr,internal_valueManager:tt,internal_fieldValueManager:Il,internal_enableAccessibleFieldDOMStructure:t,internal_useApplyDefaultValuesToFieldInternalProps:Tw,internal_useOpenPickerButtonAriaLabel:Dw(n)}),[n,t])}function Dw(e){return function(n){const o=Ie(),r=ct();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 Tw(e){const t=Ie(),n=Hc(e),o=p.useMemo(()=>e.ampm??t.is12HourCycleInCurrentLocale(),[e.ampm,t]);return p.useMemo(()=>E({},e,n,{format:e.format??(o?t.formats.fullTime12h:t.formats.fullTime24h)}),[e,n,o,t])}function Hc(e){return p.useMemo(()=>({disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1}),[e.disablePast,e.disableFuture])}const Iw=e=>{const t=bh(e);return zc({manager:t,props:e})},Rw=["slots","slotProps"],Wc=p.forwardRef(function(t,n){const o=Te({props:t,name:"MuiDateField"}),{slots:r,slotProps:s}=o,a=he(o,Rw),i=Fc({slotProps:s,ref:n,externalForwardedProps:a}),l=Iw(i);return u.jsx(Oc,{slots:r,slotProps:s,fieldResponse:l,defaultOpenPickerIcon:gx})}),Uc=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:o,maxDate:r,disableFuture:s,disablePast:a,timezone:i})=>{const l=hn();return p.useCallback(c=>Po({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])},_w=(e,t)=>(n,o)=>{switch(o.type){case"setVisibleDate":return E({},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))),E({},n,{currentMonth:s})}case"finishMonthSwitchingAnimation":return E({},n,{isMonthSwitchingAnimating:!1});default:throw new Error("missing support")}},Ew=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,g=Ie(),h=p.useRef(_w(!!c,g)).current,v=p.useMemo(()=>tt.getInitialReferenceValue({value:t,utils:g,timezone:m,props:e,referenceDate:n,granularity:Mt.day}),[n,m]),[f,b]=p.useReducer(h,{isMonthSwitchingAnimating:!1,focusedDay:v,currentMonth:g.startOfMonth(v),slideDirection:"left"}),C=Uc({shouldDisableDate:d,minDate:a,maxDate:s,disableFuture:o,disablePast:r,timezone:m});p.useEffect(()=>{b({type:"changeMonthTimezone",newTimezone:g.getTimezone(v)})},[v,g]);const w=pe(({target:S,reason:P})=>{if(P==="cell-interaction"&&f.focusedDay!=null&&g.isSameDay(S,f.focusedDay))return;const k=P==="cell-interaction";let R,_;if(P==="cell-interaction")R=y(S,f.currentMonth),_=S;else if(R=g.isSameMonth(S,f.currentMonth)?f.currentMonth:g.startOfMonth(S),_=S,C(_)){const M=g.startOfMonth(S),A=g.endOfMonth(S);_=uo({utils:g,date:_,minDate:g.isBefore(a,M)?M:a,maxDate:g.isAfter(s,A)?A:s,disablePast:r,disableFuture:o,isDateDisabled:C,timezone:m})}const O=!g.isSameMonth(f.currentMonth,R),$=!g.isSameYear(f.currentMonth,R);O&&i?.(R),$&&l?.(g.startOfYear(R)),b({type:"setVisibleDate",month:R,direction:g.isAfterDay(R,f.currentMonth)?"left":"right",focusedDay:f.focusedDay!=null&&_!=null&&g.isSameDay(_,f.focusedDay)?f.focusedDay:_,skipAnimation:k})}),x=p.useCallback(()=>{b({type:"finishMonthSwitchingAnimation"})},[]);return{referenceDate:v,calendarState:f,setVisibleDate:w,isDateDisabled:C,onMonthSwitchingAnimationEnd:x}},Ow=e=>Ve("MuiPickersFadeTransitionGroup",e);ze("MuiPickersFadeTransitionGroup",["root"]);const Fw=["children"],Nw=e=>Oe({root:["root"]},Ow,e),Aw=V(Co,{name:"MuiPickersFadeTransitionGroup",slot:"Root"})({display:"block",position:"relative"});function Yc(e){const t=Te({props:e,name:"MuiPickersFadeTransitionGroup"}),{className:n,reduceAnimations:o,transKey:r,classes:s}=t,{children:a}=t,i=he(t,Fw),l=Nw(s),c=Hn();return o?a:u.jsx(Aw,{className:ie(l.root,n),ownerState:i,children:u.jsx(dn,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:c.transitions.duration.enteringScreen,enter:c.transitions.duration.enteringScreen,exit:0},children:a},r)})}function $w(e){return Ve("MuiPickersDay",e)}const tn=ze("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]);function qc(e){const{disabled:t,selected:n,today:o,outsideCurrentMonth:r,day:s,disableMargin:a,disableHighlightToday:i,showDaysOutsideCurrentMonth:l}=e,c=Ie(),{ownerState:d}=We();return p.useMemo(()=>E({},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 jw=["autoFocus","className","classes","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","children","isFirstVisibleCell","isLastVisibleCell","day","selected","disabled","today","outsideCurrentMonth","disableMargin","disableHighlightToday","showDaysOutsideCurrentMonth"],Lw=(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"]},$w,e)},Kc=({theme:e})=>E({},e.typography.caption,{width:go,height:go,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})`:Re(e.palette.primary.main,e.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:Re(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${tn.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${tn.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}},[`&.${tn.disabled}:not(.${tn.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${tn.disabled}&.${tn.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:`0 ${pr}px`}},{props:{isDayOutsideMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(e.vars||e).palette.text.secondary}},{props:{disableHighlightToday:!1,isDayCurrent:!0},style:{[`&:not(.${tn.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}}]}),Gc=(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]},Vw=V(Ln,{name:"MuiPickersDay",slot:"Root",overridesResolver:Gc})(Kc),Bw=V("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:Gc})(({theme:e})=>E({},Kc({theme:e}),{opacity:0,pointerEvents:"none"})),Zn=()=>{},zw=p.forwardRef(function(t,n){const o=Te({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:g=Zn,onMouseEnter:h=Zn,children:v,day:f,selected:b,disabled:C,today:w,outsideCurrentMonth:x,disableMargin:S,disableHighlightToday:P,showDaysOutsideCurrentMonth:k}=o,R=he(o,jw),_=qc({day:f,selected:b,disabled:C,today:w,outsideCurrentMonth:x,disableMargin:S,disableHighlightToday:P,showDaysOutsideCurrentMonth:k}),O=Lw(a,_),$=Ie(),M=p.useRef(null),A=rt(M,n);pt(()=>{r&&!C&&!i&&!x&&M.current.focus()},[r,C,i,x]);const F=T=>{g(T),x&&T.preventDefault()},I=T=>{C||c(f),x&&T.currentTarget.focus(),l&&l(T)};return x&&!k?u.jsx(Bw,{className:ie(O.root,O.hiddenDaySpacingFiller,s),ownerState:_,role:R.role}):u.jsx(Vw,E({className:ie(O.root,s),ref:A,centerRipple:!0,disabled:C,tabIndex:b?0:-1,onKeyDown:T=>y(T,f),onFocus:T=>d(T,f),onBlur:T=>m(T,f),onMouseEnter:T=>h(T,f),onClick:I,onMouseDown:F},R,{ownerState:_,children:v||$.format(f,"dayOfMonth")}))}),Hw=p.memo(zw),Ww=e=>Ve("MuiPickersSlideTransition",e),ht=ze("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),Uw=["children","className","reduceAnimations","slideDirection","transKey","classes"],Yw=(e,t)=>{const{slideDirection:n}=t,o={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return Oe(o,Ww,e)},qw=V(Co,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${ht["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${ht["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${ht.slideEnterActive}`]:t.slideEnterActive},{[`.${ht.slideExit}`]:t.slideExit},{[`.${ht["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${ht["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},[`& .${ht["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${ht["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${ht.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${ht.slideExit}`]:{transform:"translate(0%)"},[`& .${ht["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${ht["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}});function Kw(e){const t=Te({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:o,reduceAnimations:r,slideDirection:s,transKey:a,classes:i}=t,l=he(t,Uw),{ownerState:c}=We(),d=E({},c,{slideDirection:s}),m=Yw(i,d),y=Hn();if(r)return u.jsx("div",{className:ie(m.root,o),children:n});const g={exit:m.exit,enterActive:m.enterActive,enter:m.enter,exitActive:m.exitActive};return u.jsx(qw,{className:ie(m.root,o),childFactory:h=>p.cloneElement(h,{classNames:g}),role:"presentation",ownerState:d,children:u.jsx(us,E({mountOnEnter:!0,unmountOnExit:!0,timeout:y.transitions.duration.complex,classNames:g},l,{children:n}),a)})}const Gw=e=>Ve("MuiDayCalendar",e);ze("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);const Qw=["parentProps","day","focusedDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],Xw=["ownerState"],Zw=e=>Oe({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},Gw,e),Qc=(go+pr*2)*6,Jw=V("div",{name:"MuiDayCalendar",slot:"Root"})({}),eC=V("div",{name:"MuiDayCalendar",slot:"Header"})({display:"flex",justifyContent:"center",alignItems:"center"}),tC=V(zt,{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})),nC=V(zt,{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})),oC=V(zt,{name:"MuiDayCalendar",slot:"WeekNumber"})(({theme:e})=>E({},e.typography.caption,{width:go,height:go,padding:0,margin:`0 ${pr}px`,color:(e.vars||e).palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),rC=V("div",{name:"MuiDayCalendar",slot:"LoadingContainer"})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:Qc}),sC=V(Kw,{name:"MuiDayCalendar",slot:"SlideTransition"})({minHeight:Qc}),aC=V("div",{name:"MuiDayCalendar",slot:"MonthContainer"})({overflow:"hidden"}),iC=V("div",{name:"MuiDayCalendar",slot:"WeekContainer"})({margin:`${pr}px 0`,display:"flex",justifyContent:"center"});function lC(e){let{parentProps:t,day:n,focusedDay:o,selectedDays:r,isDateDisabled:s,currentMonthNumber:a,isViewFocused:i}=e,l=he(e,Qw);const{disabled:c,disableHighlightToday:d,isMonthSwitchingAnimating:m,showDaysOutsideCurrentMonth:y,slots:g,slotProps:h,timezone:v}=t,f=Ie(),b=gn(v),C=o!=null&&f.isSameDay(n,o),w=i&&C,x=r.some(F=>f.isSameDay(F,n)),S=f.isSameDay(n,b),P=p.useMemo(()=>c||s(n),[c,s,n]),k=p.useMemo(()=>f.getMonth(n)!==a,[f,n,a]),R=qc({day:n,selected:x,disabled:P,today:S,outsideCurrentMonth:k,disableMargin:void 0,disableHighlightToday:d,showDaysOutsideCurrentMonth:y}),_=g?.day??Hw,O=Ae({elementType:_,externalSlotProps:h?.day,additionalProps:E({disableHighlightToday:d,showDaysOutsideCurrentMonth:y,role:"gridcell",isAnimating:m,"data-timestamp":f.toJsDate(n).valueOf()},l),ownerState:E({},R,{day:n,isDayDisabled:P,isDaySelected:x})}),$=he(O,Xw),M=p.useMemo(()=>{const F=f.startOfMonth(f.setMonth(n,a));return y?f.isSameDay(n,f.startOfWeek(F)):f.isSameDay(n,F)},[a,n,y,f]),A=p.useMemo(()=>{const F=f.endOfMonth(f.setMonth(n,a));return y?f.isSameDay(n,f.endOfWeek(F)):f.isSameDay(n,F)},[a,n,y,f]);return u.jsx(_,E({},$,{day:n,disabled:P,autoFocus:!k&&w,today:S,outsideCurrentMonth:k,isFirstVisibleCell:M,isLastVisibleCell:A,selected:x,tabIndex:C?0:-1,"aria-selected":x,"aria-current":S?"date":void 0}))}function cC(e){const t=Te({props:e,name:"MuiDayCalendar"}),n=Ie(),{onFocusedDayChange:o,className:r,classes:s,currentMonth:a,selectedDays:i,focusedDay:l,loading:c,onSelectedDaysChange:d,onMonthSwitchingAnimationEnd:m,readOnly:y,reduceAnimations:g,renderLoading:h=()=>u.jsx("span",{children:"..."}),slideDirection:v,TransitionProps:f,disablePast:b,disableFuture:C,minDate:w,maxDate:x,shouldDisableDate:S,shouldDisableMonth:P,shouldDisableYear:k,dayOfWeekFormatter:R=H=>n.format(H,"weekdayShort").charAt(0).toUpperCase(),hasFocus:_,onFocusedViewChange:O,gridLabelId:$,displayWeekNumber:M,fixedWeekNumber:A,timezone:F}=t,I=gn(F),T=Zw(s),L=Ct(),Q=Uc({shouldDisableDate:S,shouldDisableMonth:P,shouldDisableYear:k,minDate:w,maxDate:x,disablePast:b,disableFuture:C,timezone:F}),N=ct(),J=pe(H=>{y||d(H)}),z=H=>{Q(H)||(o(H),O?.(!0))},oe=pe((H,K)=>{switch(H.key){case"ArrowUp":z(n.addDays(K,-7)),H.preventDefault();break;case"ArrowDown":z(n.addDays(K,7)),H.preventDefault();break;case"ArrowLeft":{const Z=n.addDays(K,L?1:-1),G=n.addMonths(K,L?1:-1),de=uo({utils:n,date:Z,minDate:L?Z:n.startOfMonth(G),maxDate:L?n.endOfMonth(G):Z,isDateDisabled:Q,timezone:F});z(de||Z),H.preventDefault();break}case"ArrowRight":{const Z=n.addDays(K,L?-1:1),G=n.addMonths(K,L?-1:1),de=uo({utils:n,date:Z,minDate:L?n.startOfMonth(G):Z,maxDate:L?Z:n.endOfMonth(G),isDateDisabled:Q,timezone:F});z(de||Z),H.preventDefault();break}case"Home":z(n.startOfWeek(K)),H.preventDefault();break;case"End":z(n.endOfWeek(K)),H.preventDefault();break;case"PageUp":z(n.addMonths(K,1)),H.preventDefault();break;case"PageDown":z(n.addMonths(K,-1)),H.preventDefault();break}}),ne=pe((H,K)=>z(K)),ae=pe((H,K)=>{l!=null&&n.isSameDay(l,K)&&O?.(!1)}),Y=n.getMonth(a),re=n.getYear(a),ue=p.useMemo(()=>i.filter(H=>!!H).map(H=>n.startOfDay(H)),[n,i]),me=`${re}-${Y}`,se=p.useMemo(()=>p.createRef(),[me]),X=p.useMemo(()=>{const H=n.getWeekArray(a);let K=n.addMonths(a,1);for(;A&&H.length<A;){const Z=n.getWeekArray(K),G=n.isSameDay(H[H.length-1][0],Z[0][0]);Z.slice(G?1:0).forEach(de=>{H.length<A&&H.push(de)}),K=n.addMonths(K,1)}return H},[a,A,n]);return u.jsxs(Jw,{role:"grid","aria-labelledby":$,className:T.root,children:[u.jsxs(eC,{role:"row",className:T.header,children:[M&&u.jsx(nC,{variant:"caption",role:"columnheader","aria-label":N.calendarWeekNumberHeaderLabel,className:T.weekNumberLabel,children:N.calendarWeekNumberHeaderText}),vm(n,I).map((H,K)=>u.jsx(tC,{variant:"caption",role:"columnheader","aria-label":n.format(H,"weekday"),className:T.weekDayLabel,children:R(H)},K.toString()))]}),c?u.jsx(rC,{className:T.loadingContainer,children:h()}):u.jsx(sC,E({transKey:me,onExited:m,reduceAnimations:g,slideDirection:v,className:ie(r,T.slideTransition)},f,{nodeRef:se,children:u.jsx(aC,{ref:se,role:"rowgroup",className:T.monthContainer,children:X.map((H,K)=>u.jsxs(iC,{role:"row",className:T.weekContainer,"aria-rowindex":K+1,children:[M&&u.jsx(oC,{className:T.weekNumber,role:"rowheader","aria-label":N.calendarWeekNumberAriaLabelText(n.getWeekNumber(H[0])),children:N.calendarWeekNumberText(n.getWeekNumber(H[0]))}),H.map((Z,G)=>u.jsx(lC,{parentProps:t,day:Z,selectedDays:ue,isViewFocused:_,focusedDay:l,onKeyDown:oe,onFocus:ne,onBlur:ae,onDaySelect:J,isDateDisabled:Q,currentMonthNumber:Y,"aria-colindex":G+1},Z.toString()))]},`week-${H[0]}`))})}))]})}function Xc(e){return Ve("MuiMonthCalendar",e)}const Ao=ze("MuiMonthCalendar",["root","button","disabled","selected"]),uC=["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,Xc,e)},pC=V("button",{name:"MuiMonthCalendar",slot:"Button",overridesResolver:(e,t)=>[t.button,{[`&.${Ao.disabled}`]:t.disabled},{[`&.${Ao.selected}`]:t.selected}]})(({theme:e})=>E({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})`:Re(e.palette.action.active,e.palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Re(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${Ao.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${Ao.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),fC=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,g=he(t,uC),h=p.useRef(null),{ownerState:v}=We(),f=E({},v,{isMonthDisabled:r,isMonthSelected:s}),b=dC(o,f);pt(()=>{n&&h.current?.focus()},[n]);const C=m?.monthButton??pC,w=Ae({elementType:C,externalSlotProps:y?.monthButton,externalForwardedProps:g,additionalProps:{disabled:r,ref:h,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,E({},w))}),mC=["autoFocus","className","classes","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"],hC=e=>Oe({root:["root"]},Xc,e);function gC(e,t){const n=Te({props:e,name:t}),o=Mo(n);return E({},n,o,{monthsPerRow:n.monthsPerRow??3})}const bC=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:fr,boxSizing:"border-box",variants:[{props:{monthsPerRow:3},style:{columnGap:24}},{props:{monthsPerRow:4},style:{columnGap:0}}]}),yC=p.forwardRef(function(t,n){const o=gC(t,"MuiMonthCalendar"),{autoFocus:r,className:s,classes:a,value:i,defaultValue:l,referenceDate:c,disabled:d,disableFuture:m,disablePast:y,maxDate:g,minDate:h,onChange:v,shouldDisableMonth:f,readOnly:b,onMonthFocus:C,hasFocus:w,onFocusedViewChange:x,monthsPerRow:S,timezone:P,gridLabelId:k,slots:R,slotProps:_}=o,O=he(o,mC),{value:$,handleValueChange:M,timezone:A}=Qt({name:"MonthCalendar",timezone:P,value:i,defaultValue:l,referenceDate:c,onChange:v,valueManager:tt}),F=gn(A),I=Ct(),T=Ie(),{ownerState:L}=We(),Q=p.useMemo(()=>tt.getInitialReferenceValue({value:$,utils:T,props:o,timezone:A,referenceDate:c,granularity:Mt.month}),[]),N=hC(a),J=p.useMemo(()=>T.getMonth(F),[T,F]),z=p.useMemo(()=>$!=null?T.getMonth($):null,[$,T]),[oe,ne]=p.useState(()=>z||T.getMonth(Q)),[ae,Y]=On({name:"MonthCalendar",state:"hasFocus",controlled:w,default:r??!1}),re=pe(Z=>{Y(Z),x&&x(Z)}),ue=p.useCallback(Z=>{const G=T.startOfMonth(y&&T.isAfter(F,h)?F:h),de=T.startOfMonth(m&&T.isBefore(F,g)?F:g),ee=T.startOfMonth(Z);return T.isBefore(ee,G)||T.isAfter(ee,de)?!0:f?f(ee):!1},[m,y,g,h,F,f,T]),me=pe((Z,G)=>{if(b)return;const de=T.setMonth($??Q,G);M(de)}),se=pe(Z=>{ue(T.setMonth($??Q,Z))||(ne(Z),re(!0),C&&C(Z))});p.useEffect(()=>{ne(Z=>z!==null&&Z!==z?z:Z)},[z]);const X=pe((Z,G)=>{switch(Z.key){case"ArrowUp":se((12+G-3)%12),Z.preventDefault();break;case"ArrowDown":se((12+G+3)%12),Z.preventDefault();break;case"ArrowLeft":se((12+G+(I?1:-1))%12),Z.preventDefault();break;case"ArrowRight":se((12+G+(I?-1:1))%12),Z.preventDefault();break}}),H=pe((Z,G)=>{se(G)}),K=pe((Z,G)=>{oe===G&&re(!1)});return u.jsx(bC,E({ref:n,className:ie(N.root,s),ownerState:L,role:"radiogroup","aria-labelledby":k,monthsPerRow:S},O,{children:ms(T,$??Q).map(Z=>{const G=T.getMonth(Z),de=T.format(Z,"monthShort"),ee=T.format(Z,"month"),q=G===z,te=d||ue(Z);return u.jsx(fC,{selected:q,value:G,onClick:me,onKeyDown:X,autoFocus:ae&&G===oe,disabled:te,tabIndex:G===oe&&!te?0:-1,onFocus:H,onBlur:K,"aria-current":J===G?"date":void 0,"aria-label":ee,slots:R,slotProps:_,classes:a,children:de},de)})}))});function Zc(e){return Ve("MuiYearCalendar",e)}const $o=ze("MuiYearCalendar",["root","button","disabled","selected"]),vC=["autoFocus","classes","disabled","selected","value","onClick","onKeyDown","onFocus","onBlur","slots","slotProps"],xC=(e,t)=>{const n={button:["button",t.isYearDisabled&&"disabled",t.isYearSelected&&"selected"]};return Oe(n,Zc,e)},wC=V("button",{name:"MuiYearCalendar",slot:"Button",overridesResolver:(e,t)=>[t.button,{[`&.${$o.disabled}`]:t.disabled},{[`&.${$o.selected}`]:t.selected}]})(({theme:e})=>E({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})`:Re(e.palette.action.active,e.palette.action.focusOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Re(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${$o.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${$o.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),CC=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,g=he(t,vC),h=p.useRef(null),{ownerState:v}=We(),f=E({},v,{isYearDisabled:r,isYearSelected:s}),b=xC(o,f);pt(()=>{n&&h.current?.focus()},[n]);const C=m?.yearButton??wC,w=Ae({elementType:C,externalSlotProps:y?.yearButton,externalForwardedProps:g,additionalProps:{disabled:r,ref:h,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,E({},w))}),kC=["autoFocus","className","classes","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"],SC=e=>Oe({root:["root"]},Zc,e);function PC(e,t){const n=Te({props:e,name:t}),o=Mo(n);return E({},n,o,{yearsPerRow:n.yearsPerRow??3,yearsOrder:n.yearsOrder??"asc"})}const MC=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:fr,maxHeight:hy,boxSizing:"border-box",position:"relative",variants:[{props:{yearsPerRow:3},style:{columnGap:24}},{props:{yearsPerRow:4},style:{columnGap:0,padding:"0 2px"}}]}),DC=V("div",{name:"MuiYearCalendar",slot:"ButtonFiller"})({height:36,width:72}),TC=p.forwardRef(function(t,n){const o=PC(t,"MuiYearCalendar"),{autoFocus:r,className:s,classes:a,value:i,defaultValue:l,referenceDate:c,disabled:d,disableFuture:m,disablePast:y,maxDate:g,minDate:h,onChange:v,readOnly:f,shouldDisableYear:b,onYearFocus:C,hasFocus:w,onFocusedViewChange:x,yearsOrder:S,yearsPerRow:P,timezone:k,gridLabelId:R,slots:_,slotProps:O}=o,$=he(o,kC),{value:M,handleValueChange:A,timezone:F}=Qt({name:"YearCalendar",timezone:k,value:i,defaultValue:l,referenceDate:c,onChange:v,valueManager:tt}),I=gn(F),T=Ct(),L=Ie(),{ownerState:Q}=We(),N=p.useMemo(()=>tt.getInitialReferenceValue({value:M,utils:L,props:o,timezone:F,referenceDate:c,granularity:Mt.year}),[]),J=SC(a),z=p.useMemo(()=>L.getYear(I),[L,I]),oe=p.useMemo(()=>M!=null?L.getYear(M):null,[M,L]),[ne,ae]=p.useState(()=>oe||L.getYear(N)),[Y,re]=On({name:"YearCalendar",state:"hasFocus",controlled:w,default:r??!1}),ue=pe(W=>{re(W),x&&x(W)}),me=p.useCallback(W=>{if(y&&L.isBeforeYear(W,I)||m&&L.isAfterYear(W,I)||h&&L.isBeforeYear(W,h)||g&&L.isAfterYear(W,g))return!0;if(!b)return!1;const j=L.startOfYear(W);return b(j)},[m,y,g,h,I,b,L]),se=pe((W,j)=>{if(f)return;const U=L.setYear(M??N,j);A(U)}),X=pe(W=>{me(L.setYear(M??N,W))||(ae(W),ue(!0),C?.(W))});p.useEffect(()=>{ae(W=>oe!==null&&W!==oe?oe:W)},[oe]);const H=S!=="desc"?P*1:P*-1,K=T&&S==="asc"||!T&&S==="desc"?-1:1,Z=pe((W,j)=>{switch(W.key){case"ArrowUp":X(j-H),W.preventDefault();break;case"ArrowDown":X(j+H),W.preventDefault();break;case"ArrowLeft":X(j-K),W.preventDefault();break;case"ArrowRight":X(j+K),W.preventDefault();break}}),G=pe((W,j)=>{X(j)}),de=pe((W,j)=>{ne===j&&ue(!1)}),ee=p.useRef(null),q=rt(n,ee);p.useEffect(()=>{if(r||ee.current===null)return;const W=ee.current.querySelector('[tabindex="0"]');if(!W)return;const j=W.offsetHeight,U=W.offsetTop,be=ee.current.clientHeight,ve=ee.current.scrollTop,je=U+j;j>be||U<ve||(ee.current.scrollTop=je-be/2-j/2)},[r]);const te=L.getYearRange([h,g]);S==="desc"&&te.reverse();let le=P-te.length%P;return le===P&&(le=0),u.jsxs(MC,E({ref:q,className:ie(J.root,s),ownerState:Q,role:"radiogroup","aria-labelledby":R,yearsPerRow:P},$,{children:[te.map(W=>{const j=L.getYear(W),U=j===oe,be=d||me(W);return u.jsx(CC,{selected:U,value:j,onClick:se,onKeyDown:Z,autoFocus:Y&&j===ne,disabled:be,tabIndex:j===ne&&!be?0:-1,onFocus:G,onBlur:de,"aria-current":z===j?"date":void 0,slots:_,slotProps:O,classes:a,children:L.format(W,"year")},L.format(W,"year"))}),Array.from({length:le},(W,j)=>u.jsx(DC,{},j))]}))}),IC=e=>Ve("MuiPickersCalendarHeader",e),RC=ze("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]);function _C(e){return Ve("MuiPickersArrowSwitcher",e)}ze("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);const EC=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId","classes"],OC=["ownerState"],FC=["ownerState"],NC=V("div",{name:"MuiPickersArrowSwitcher",slot:"Root"})({display:"flex"}),AC=V("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer"})(({theme:e})=>({width:e.spacing(3)})),yi=V(Bn,{name:"MuiPickersArrowSwitcher",slot:"Button"})({variants:[{props:{isButtonHidden:!0},style:{visibility:"hidden"}}]}),$C=e=>Oe({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},_C,e),Jc=p.forwardRef(function(t,n){const o=Ct(),r=Te({props:t,name:"MuiPickersArrowSwitcher"}),{children:s,className:a,slots:i,slotProps:l,isNextDisabled:c,isNextHidden:d,onGoToNext:m,nextLabel:y,isPreviousDisabled:g,isPreviousHidden:h,onGoToPrevious:v,previousLabel:f,labelId:b,classes:C}=r,w=he(r,EC),{ownerState:x}=We(),S=$C(C),P={isDisabled:c,isHidden:d,goTo:m,label:y},k={isDisabled:g,isHidden:h,goTo:v,label:f},R=i?.previousIconButton??yi,_=Ae({elementType:R,externalSlotProps:l?.previousIconButton,additionalProps:{size:"medium",title:k.label,"aria-label":k.label,disabled:k.isDisabled,edge:"end",onClick:k.goTo},ownerState:E({},x,{isButtonHidden:k.isHidden??!1}),className:ie(S.button,S.previousIconButton)}),O=i?.nextIconButton??yi,$=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:E({},x,{isButtonHidden:P.isHidden??!1}),className:ie(S.button,S.nextIconButton)}),M=i?.leftArrowIcon??mx,A=Ae({elementType:M,externalSlotProps:l?.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:x,className:S.leftArrowIcon}),F=he(A,OC),I=i?.rightArrowIcon??hx,T=Ae({elementType:I,externalSlotProps:l?.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:x,className:S.rightArrowIcon}),L=he(T,FC);return u.jsxs(NC,E({ref:n,className:ie(S.root,a),ownerState:x},w,{children:[u.jsx(R,E({},_,{children:o?u.jsx(I,E({},L)):u.jsx(M,E({},F))})),s?u.jsx(zt,{variant:"subtitle1",component:"span",id:b,children:s}):u.jsx(AC,{className:S.spacer,ownerState:x}),u.jsx(O,E({},$,{children:o?u.jsx(M,E({},F)):u.jsx(I,E({},L))}))]}))});function jC(e,{disableFuture:t,maxDate:n,timezone:o}){const r=Ie();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 LC(e,{disablePast:t,minDate:n,timezone:o}){const r=Ie();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 Hs(e,t,n,o){const r=Ie(),s=p.useMemo(()=>r.isValid(e)?e:null,[r,e]),a=Cm(s,r),i=p.useCallback(l=>{const c=s==null?null:km(s,l,!!t,r);n(c,o??"partial")},[t,s,n,o,r]);return{meridiemMode:a,handleMeridiemChange:i}}const VC=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","classes","timezone","format"],BC=["ownerState"],zC=e=>Oe({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},IC,e),HC=V("div",{name:"MuiPickersCalendarHeader",slot:"Root"})({display:"flex",alignItems:"center",marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),WC=V("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer"})(({theme:e})=>E({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),UC=V("div",{name:"MuiPickersCalendarHeader",slot:"Label"})({marginRight:6}),YC=V(Bn,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton"})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${RC.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),qC=V(fx,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon"})(({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"})),KC=p.forwardRef(function(t,n){const o=ct(),r=Ie(),s=Te({props:t,name:"MuiPickersCalendarHeader"}),{slots:a,slotProps:i,currentMonth:l,disabled:c,disableFuture:d,disablePast:m,maxDate:y,minDate:g,onMonthChange:h,onViewChange:v,view:f,reduceAnimations:b,views:C,labelId:w,className:x,classes:S,timezone:P,format:k=`${r.formats.month} ${r.formats.year}`}=s,R=he(s,VC),{ownerState:_}=We(),O=zC(S),$=a?.switchViewButton??YC,M=Ae({elementType:$,externalSlotProps:i?.switchViewButton,additionalProps:{size:"small","aria-label":o.calendarViewSwitchingButtonAriaLabel(f)},ownerState:_,className:O.switchViewButton}),A=a?.switchViewIcon??qC,F=Ae({elementType:A,externalSlotProps:i?.switchViewIcon,ownerState:_,className:O.switchViewIcon}),I=he(F,BC),T=()=>h(r.addMonths(l,1)),L=()=>h(r.addMonths(l,-1)),Q=jC(l,{disableFuture:d,maxDate:y,timezone:P}),N=LC(l,{disablePast:m,minDate:g,timezone:P}),J=()=>{if(!(C.length===1||!v||c))if(C.length===2)v(C.find(oe=>oe!==f)||C[0]);else{const oe=C.indexOf(f)!==0?0:1;v(C[oe])}};if(C.length===1&&C[0]==="year")return null;const z=r.formatByString(l,k);return u.jsxs(HC,E({},R,{ownerState:_,className:ie(O.root,x),ref:n,children:[u.jsxs(WC,{role:"presentation",onClick:J,ownerState:_,"aria-live":"polite",className:O.labelContainer,children:[u.jsx(Yc,{reduceAnimations:b,transKey:z,children:u.jsx(UC,{id:w,ownerState:_,className:O.label,children:z})}),C.length>1&&!c&&u.jsx($,E({},M,{children:u.jsx(A,E({},I))}))]}),u.jsx(dn,{in:f==="day",appear:!b,enter:!b,children:u.jsx(Jc,{slots:a,slotProps:i,onGoToPrevious:L,isPreviousDisabled:N,previousLabel:o.previousMonth,onGoToNext:T,isNextDisabled:Q,nextLabel:o.nextMonth})})]}))}),wr=V("div")({overflow:"hidden",width:fr,maxHeight:Rs,display:"flex",flexDirection:"column",margin:"0 auto"}),GC=e=>Ve("MuiDateCalendar",e);ze("MuiDateCalendar",["root","viewTransitionContainer"]);const QC=["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"],XC=e=>Oe({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},GC,e);function ZC(e,t){const n=Te({props:e,name:t}),o=oc(n.reduceAnimations),r=Mo(n);return E({},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 JC=V(wr,{name:"MuiDateCalendar",slot:"Root"})({display:"flex",flexDirection:"column",height:Rs}),ek=V(Yc,{name:"MuiDateCalendar",slot:"ViewTransitionContainer"})({}),tk=p.forwardRef(function(t,n){const o=Ie(),{ownerState:r}=We(),s=ko(),a=ZC(t,"MuiDateCalendar"),{autoFocus:i,onViewChange:l,value:c,defaultValue:d,referenceDate:m,disableFuture:y,disablePast:g,onChange:h,onMonthChange:v,reduceAnimations:f,shouldDisableDate:b,shouldDisableMonth:C,shouldDisableYear:w,view:x,views:S,openTo:P,className:k,classes:R,disabled:_,readOnly:O,minDate:$,maxDate:M,disableHighlightToday:A,focusedView:F,onFocusedViewChange:I,showDaysOutsideCurrentMonth:T,fixedWeekNumber:L,dayOfWeekFormatter:Q,slots:N,slotProps:J,loading:z,renderLoading:oe,displayWeekNumber:ne,yearsOrder:ae,yearsPerRow:Y,monthsPerRow:re,timezone:ue}=a,me=he(a,QC),{value:se,handleValueChange:X,timezone:H}=Qt({name:"DateCalendar",timezone:ue,value:c,defaultValue:d,referenceDate:m,onChange:h,valueManager:tt}),{view:K,setView:Z,focusedView:G,setFocusedView:de,goToNextView:ee,setValueAndGoToNextView:q}=Io({view:x,views:S,openTo:P,onChange:X,onViewChange:l,autoFocus:i,focusedView:F,onFocusedViewChange:I}),{referenceDate:te,calendarState:le,setVisibleDate:W,isDateDisabled:j,onMonthSwitchingAnimationEnd:U}=Ew({value:se,referenceDate:m,reduceAnimations:f,onMonthChange:v,minDate:$,maxDate:M,shouldDisableDate:b,disablePast:g,disableFuture:y,timezone:H,getCurrentMonthFromVisibleDate:(we,Ge)=>o.isSameMonth(we,Ge)?Ge:o.startOfMonth(we)}),be=_&&se||$,ve=_&&se||M,je=`${s}-grid-label`,Me=G!==null,He=N?.calendarHeader??KC,Ke=Ae({elementType:He,externalSlotProps:J?.calendarHeader,additionalProps:{views:S,view:K,currentMonth:le.currentMonth,onViewChange:Z,onMonthChange:we=>W({target:we,reason:"header-navigation"}),minDate:be,maxDate:ve,disabled:_,disablePast:g,disableFuture:y,reduceAnimations:f,timezone:H,labelId:je},ownerState:r}),ye=pe(we=>{const Ge=o.startOfMonth(we),st=o.endOfMonth(we),St=j(we)?uo({utils:o,date:we,minDate:o.isBefore($,Ge)?Ge:$,maxDate:o.isAfter(M,st)?st:M,disablePast:g,disableFuture:y,isDateDisabled:j,timezone:H}):we;St?(q(St,"finish"),W({target:St,reason:"cell-interaction"})):(ee(),W({target:Ge,reason:"cell-interaction"}))}),xe=pe(we=>{const Ge=o.startOfYear(we),st=o.endOfYear(we),St=j(we)?uo({utils:o,date:we,minDate:o.isBefore($,Ge)?Ge:$,maxDate:o.isAfter(M,st)?st:M,disablePast:g,disableFuture:y,isDateDisabled:j,timezone:H}):we;St?(q(St,"finish"),W({target:St,reason:"cell-interaction"})):(ee(),W({target:Ge,reason:"cell-interaction"}))}),ge=pe(we=>X(we&&Ko(o,we,se??te),"finish",K));p.useEffect(()=>{o.isValid(se)&&W({target:se,reason:"controlled-value-change"})},[se]);const Ne=XC(R),Ye={disablePast:g,disableFuture:y,maxDate:M,minDate:$},fe={disableHighlightToday:A,readOnly:O,disabled:_,timezone:H,gridLabelId:je,slots:N,slotProps:J},ke=p.useRef(K);p.useEffect(()=>{ke.current!==K&&(G===ke.current&&de(K,!0),ke.current=K)},[G,de,K]);const De=p.useMemo(()=>[se],[se]);return u.jsxs(JC,E({ref:n,className:ie(Ne.root,k),ownerState:r},me,{children:[u.jsx(He,E({},Ke,{slots:N,slotProps:J})),u.jsx(ek,{reduceAnimations:f,className:Ne.viewTransitionContainer,transKey:K,ownerState:r,children:u.jsxs("div",{children:[K==="year"&&u.jsx(TC,E({},Ye,fe,{value:se,onChange:xe,shouldDisableYear:w,hasFocus:Me,onFocusedViewChange:we=>de("year",we),yearsOrder:ae,yearsPerRow:Y,referenceDate:te})),K==="month"&&u.jsx(yC,E({},Ye,fe,{hasFocus:Me,className:k,value:se,onChange:ye,shouldDisableMonth:C,onFocusedViewChange:we=>de("month",we),monthsPerRow:re,referenceDate:te})),K==="day"&&u.jsx(cC,E({},le,Ye,fe,{onMonthSwitchingAnimationEnd:U,hasFocus:Me,onFocusedDayChange:we=>W({target:we,reason:"cell-interaction"}),reduceAnimations:f,selectedDays:De,onSelectedDaysChange:ge,shouldDisableDate:b,shouldDisableMonth:C,shouldDisableYear:w,onFocusedViewChange:we=>de("day",we),showDaysOutsideCurrentMonth:T,fixedWeekNumber:L,dayOfWeekFormatter:Q,displayWeekNumber:ne,loading:z,renderLoading:oe}))]})})]}))}),_n=({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:g,maxDate:h,shouldDisableDate:v,shouldDisableMonth:f,shouldDisableYear:b,reduceAnimations:C,onMonthChange:w,monthsPerRow:x,onYearChange:S,yearsOrder:P,yearsPerRow:k,slots:R,slotProps:_,loading:O,renderLoading:$,disableHighlightToday:M,readOnly:A,disabled:F,showDaysOutsideCurrentMonth:I,dayOfWeekFormatter:T,sx:L,autoFocus:Q,fixedWeekNumber:N,displayWeekNumber:J,timezone:z})=>u.jsx(tk,{view:e,onViewChange:t,views:n.filter(Pa),focusedView:o&&Pa(o)?o:null,onFocusedViewChange:r,value:s,defaultValue:a,referenceDate:i,onChange:l,className:c,classes:d,disableFuture:m,disablePast:y,minDate:g,maxDate:h,shouldDisableDate:v,shouldDisableMonth:f,shouldDisableYear:b,reduceAnimations:C,onMonthChange:w,monthsPerRow:x,onYearChange:S,yearsOrder:P,yearsPerRow:k,slots:R,slotProps:_,loading:O,renderLoading:$,disableHighlightToday:M,readOnly:A,disabled:F,showDaysOutsideCurrentMonth:I,dayOfWeekFormatter:T,sx:L,autoFocus:Q,fixedWeekNumber:N,displayWeekNumber:J,timezone:z}),eu=p.forwardRef(function(t,n){const o=Ie(),r=Hl(t,"MuiDesktopDatePicker"),s=E({day:_n,month:_n,year:_n},r.viewRenderers),a=E({},r,{closeOnSelect:r.closeOnSelect??!0,viewRenderers:s,format:gs(o,r,!1),yearsPerRow:r.yearsPerRow??4,slots:E({field:Wc},r.slots),slotProps:E({},r.slotProps,{field:l=>E({},cn(r.slotProps?.field,l),lr(r)),toolbar:E({hidden:!0},r.slotProps?.toolbar)})}),{renderPicker:i}=$c({ref:n,props:a,valueManager:tt,valueType:"date",validator:Po,steps:null});return i()});eu.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:ar,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 nk(e){return _e("MuiDialogContent",e)}Se("MuiDialogContent",["root","dividers"]);const ok=Se("MuiDialogTitle",["root"]),rk=e=>{const{classes:t,dividers:n}=e;return Ee({root:["root",n&&"dividers"]},nk,t)},sk=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:{[`.${ok.root} + &`]:{paddingTop:0}}}]}))),ak=p.forwardRef(function(t,n){const o=Fe({props:t,name:"MuiDialogContent"}),{className:r,dividers:s=!1,...a}=o,i={...o,dividers:s},l=rk(i);return u.jsx(sk,{className:ie(l.root,r),ownerState:i,ref:n,...a})});function ik(e){return _e("MuiDialog",e)}const lo=Se("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),lk=p.createContext({}),ck=V(bc,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),uk=e=>{const{classes:t,scroll:n,maxWidth:o,fullWidth:r,fullScreen:s}=e,a={root:["root"],container:["container",`scroll${ce(n)}`],paper:["paper",`paperScroll${ce(n)}`,`paperWidth${ce(String(o))}`,r&&"paperFullWidth",s&&"paperFullScreen"]};return Ee(a,ik,t)},dk=V(yc,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),pk=V("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${ce(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"}}}]}),fk=V(ur,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${ce(n.scroll)}`],t[`paperWidth${ce(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)`,[`&.${lo.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}`,[`&.${lo.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,[`&.${lo.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),mk=p.forwardRef(function(t,n){const o=Fe({props:t,name:"MuiDialog"}),r=Hn(),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:g=!1,fullScreen:h=!1,fullWidth:v=!1,maxWidth:f="sm",onBackdropClick:b,onClick:C,onClose:w,open:x,PaperComponent:S=ur,PaperProps:P={},scroll:k="paper",slots:R={},slotProps:_={},TransitionComponent:O=dn,transitionDuration:$=s,TransitionProps:M,...A}=o,F={...o,disableEscapeKeyDown:g,fullScreen:h,fullWidth:v,maxWidth:f,scroll:k},I=uk(F),T=p.useRef(),L=G=>{T.current=G.target===G.currentTarget},Q=G=>{C&&C(G),T.current&&(T.current=null,b&&b(G),w&&w(G,"backdropClick"))},N=xo(i),J=p.useMemo(()=>({titleId:N}),[N]),z={transition:O,...R},oe={transition:M,paper:P,backdrop:d,..._},ne={slots:z,slotProps:oe},[ae,Y]=Ze("root",{elementType:dk,shouldForwardComponentProp:!0,externalForwardedProps:ne,ownerState:F,className:ie(I.root,y),ref:n}),[re,ue]=Ze("backdrop",{elementType:ck,shouldForwardComponentProp:!0,externalForwardedProps:ne,ownerState:F}),[me,se]=Ze("paper",{elementType:fk,shouldForwardComponentProp:!0,externalForwardedProps:ne,ownerState:F,className:ie(I.paper,P.className)}),[X,H]=Ze("container",{elementType:pk,externalForwardedProps:ne,ownerState:F,className:ie(I.container)}),[K,Z]=Ze("transition",{elementType:dn,externalForwardedProps:ne,ownerState:F,additionalProps:{appear:!0,in:x,timeout:$,role:"presentation"}});return u.jsx(ae,{closeAfterTransition:!0,slots:{backdrop:re},slotProps:{backdrop:{transitionDuration:$,as:c,...ue}},disableEscapeKeyDown:g,onClose:w,open:x,onClick:Q,...Y,...A,children:u.jsx(K,{...Z,children:u.jsx(X,{onMouseDown:L,...H,children:u.jsx(me,{as:S,elevation:24,role:"dialog","aria-describedby":a,"aria-labelledby":N,"aria-modal":l,...se,children:u.jsx(lk.Provider,{value:J,children:m})})})})})}),hk=V(mk)({[`& .${lo.container}`]:{outline:0},[`& .${lo.paper}`]:{outline:0,minWidth:fr}}),gk=V(ak)({"&:first-of-type":{padding:0}});function bk(e){const{children:t,slots:n,slotProps:o}=e,{open:r}=mn(),{dismissViews:s,onPopperExited:a}=We(),i=n?.dialog??hk,l=n?.mobileTransition??dn;return u.jsx(i,E({open:r,onClose:()=>{s(),a?.()}},o?.dialog,{TransitionComponent:l,TransitionProps:o?.mobileTransition,PaperComponent:n?.mobilePaper,PaperProps:o?.mobilePaper,children:u.jsx(gk,{children:t})}))}const yk=["props","steps"],vk=["ownerState"],tu=e=>{let{props:t,steps:n}=e,o=he(e,yk);const{slots:r,slotProps:s,label:a,inputRef:i,localeText:l}=t,c=Ac({steps:n}),{providerProps:d,renderCurrentView:m,ownerState:y}=sc(E({},o,{props:t,localeText:l,autoFocusView:!0,viewContainerRole:"dialog",variant:"mobile",getStepNavigation:c})),g=d.privateContextValue.labelId,h=s?.toolbar?.hidden??!1,v=r.field,f=Ae({elementType:v,externalSlotProps:s?.field,additionalProps:E({},h&&{id:g}),ownerState:y}),b=he(f,vk),C=r.layout??pc;let w=g;h&&(a?w=`${g}-label`:w=void 0);const x=E({},s,{toolbar:E({},s?.toolbar,{titleId:g}),mobilePaper:E({"aria-labelledby":w},s?.mobilePaper)});return{renderPicker:()=>u.jsx($l,E({},d,{children:u.jsxs(Nc,{slots:r,slotProps:x,inputRef:i,children:[u.jsx(v,E({},b)),u.jsx(bk,{slots:r,slotProps:x,children:u.jsx(C,E({},x?.layout,{slots:r,slotProps:x,children:m()}))})]})}))}},nu=p.forwardRef(function(t,n){const o=Ie(),r=Hl(t,"MuiMobileDatePicker"),s=E({day:_n,month:_n,year:_n},r.viewRenderers),a=E({},r,{viewRenderers:s,format:gs(o,r,!1),slots:E({field:Wc},r.slots),slotProps:E({},r.slotProps,{field:l=>E({},cn(r.slotProps?.field,l),lr(r)),toolbar:E({hidden:!1},r.slotProps?.toolbar)})}),{renderPicker:i}=tu({ref:n,props:a,valueManager:tt,valueType:"date",validator:Po,steps:null});return i()});nu.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:ar,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 xk=["desktopModeMediaQuery"],wk=p.forwardRef(function(t,n){const o=Te({props:t,name:"MuiDatePicker"}),{desktopModeMediaQuery:r=nc}=o,s=he(o,xk);return ps(r,{defaultMatches:!0})?u.jsx(eu,E({ref:n},s)):u.jsx(nu,E({ref:n},s))}),Ck=e=>{const t=Mw(e);return zc({manager:t,props:e})},kk=["slots","slotProps","InputProps","inputProps"],ou=p.forwardRef(function(t,n){const o=Te({props:t,name:"MuiTimeField"}),{slots:r,slotProps:s}=o,a=he(o,kk),i=Fc({slotProps:s,ref:n,externalForwardedProps:a}),l=Ck(i);return u.jsx(Oc,{slots:r,slotProps:s,fieldResponse:l,defaultOpenPickerIcon:bx})});function Sk(e){return Ve("MuiPickersToolbarText",e)}ze("MuiPickersToolbarText",["root"]);const Pk=["className","classes","selected","value"],Mk=e=>Oe({root:["root"]},Sk,e),Dk=V(zt,{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}})),ru=p.forwardRef(function(t,n){const o=Te({props:t,name:"MuiPickersToolbarText"}),{className:r,classes:s,selected:a,value:i}=o,l=he(o,Pk),c=Mk(s);return u.jsx(Dk,E({ref:n,className:ie(c.root,r),component:"span",ownerState:o},a&&{"data-selected":!0},l,{children:i}))}),Tk=["align","className","classes","selected","typographyClassName","value","variant","width"],Ik=e=>Oe({root:["root"]},Rl,e),Rk=V(Yt,{name:"MuiPickersToolbarButton",slot:"Root"})({padding:0,minWidth:16,textTransform:"none"}),Jn=p.forwardRef(function(t,n){const o=Te({props:t,name:"MuiPickersToolbarButton"}),{align:r,className:s,classes:a,selected:i,typographyClassName:l,value:c,variant:d,width:m}=o,y=he(o,Tk),g=Ik(a);return u.jsx(Rk,E({variant:"text",ref:n,className:ie(g.root,s),ownerState:o},m?{sx:{width:m}}:{},y,{children:u.jsx(ru,{align:r,className:l,variant:d,value:c,selected:i})}))});function _k(e){return Ve("MuiTimePickerToolbar",e)}const co=ze("MuiTimePickerToolbar",["root","separator","hourMinuteLabel","hourMinuteLabelLandscape","hourMinuteLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),Ek=["ampm","ampmInClock","className","classes"],Ok=(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"]},_k,e)},Fk=V(jl,{name:"MuiTimePickerToolbar",slot:"Root"})({}),Nk=V(ru,{name:"MuiTimePickerToolbar",slot:"Separator"})({outline:0,margin:"0 4px 0 2px",cursor:"default"}),Ak=V("div",{name:"MuiTimePickerToolbar",slot:"HourMinuteLabel",overridesResolver:(e,t)=>[{[`&.${co.hourMinuteLabelLandscape}`]:t.hourMinuteLabelLandscape,[`&.${co.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"}}]}),$k=V("div",{name:"MuiTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[`.${co.ampmLabel}`]:t.ampmLabel},{[`&.${co.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12,[`& .${co.ampmLabel}`]:{fontSize:17},variants:[{props:{pickerOrientation:"landscape"},style:{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",flexBasis:"100%"}}]});function jk(e){const t=Te({props:e,name:"MuiTimePickerToolbar"}),{ampm:n,ampmInClock:o,className:r,classes:s}=t,a=he(t,Ek),i=Ie(),l=ct(),c=ws(),d=Ok(s,c),{value:m,setValue:y,disabled:g,readOnly:h,view:v,setView:f,views:b}=mn(),C=!!(n&&!o&&b.includes("hours")),{meridiemMode:w,handleMeridiemChange:x}=Hs(m,n,k=>y(k,{changeImportance:"set"})),S=k=>i.isValid(m)?i.format(m,k):"--",P=u.jsx(Nk,{tabIndex:-1,value:":",variant:"h3",selected:!1,className:d.separator});return u.jsxs(Fk,E({landscapeDirection:"row",toolbarTitle:l.timePickerToolbarTitle,ownerState:c,className:ie(d.root,r)},a,{children:[u.jsxs(Ak,{className:d.hourMinuteLabel,ownerState:c,children:[Sn(b,"hours")&&u.jsx(Jn,{tabIndex:-1,variant:"h3",onClick:()=>f("hours"),selected:v==="hours",value:S(n?"hours12h":"hours24h")}),Sn(b,["hours","minutes"])&&P,Sn(b,"minutes")&&u.jsx(Jn,{tabIndex:-1,variant:"h3",onClick:()=>f("minutes"),selected:v==="minutes",value:S("minutes")}),Sn(b,["minutes","seconds"])&&P,Sn(b,"seconds")&&u.jsx(Jn,{variant:"h3",onClick:()=>f("seconds"),selected:v==="seconds",value:S("seconds")})]}),C&&u.jsxs($k,{className:d.ampmSelection,ownerState:c,children:[u.jsx(Jn,{disableRipple:!0,variant:"subtitle2",selected:w==="am",typographyClassName:d.ampmLabel,value:qt(i,"am"),onClick:h?void 0:()=>x("am"),disabled:g}),u.jsx(Jn,{disableRipple:!0,variant:"subtitle2",selected:w==="pm",typographyClassName:d.ampmLabel,value:qt(i,"pm"),onClick:h?void 0:()=>x("pm"),disabled:g})]})]}))}function su(e,t){const n=Ie(),o=Te({props:e,name:t}),r=Hc(o),s=o.ampm??n.is12HourCycleInCurrentLocale(),a=p.useMemo(()=>o.localeText?.toolbarTitle==null?o.localeText:E({},o.localeText,{timePickerToolbarTitle:o.localeText.toolbarTitle}),[o.localeText]);return E({},o,r,{ampm:s,localeText:a},Cl({views:o.views,openTo:o.openTo,defaultViews:["hours","minutes"],defaultOpenTo:"hours"}),{slots:E({toolbar:jk},o.slots),slotProps:E({},o.slotProps,{toolbar:E({ampm:s,ampmInClock:o.ampmInClock},o.slotProps?.toolbar)})})}function Lk(e){return Ve("MuiTimeClock",e)}ze("MuiTimeClock",["root","arrowSwitcher"]);const zn=220,Lt=36,bo={x:zn/2,y:zn/2},au={x:bo.x,y:0},Vk=au.x-bo.x,Bk=au.y-bo.y,zk=e=>e*(180/Math.PI),iu=(e,t,n)=>{const o=t-bo.x,r=n-bo.y,s=Math.atan2(Vk,Bk)-Math.atan2(o,r);let a=zk(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}},Hk=(e,t,n=1)=>{const o=n*6;let{value:r}=iu(o,e,t);return r=r*n%60,r},Wk=(e,t,n)=>{const{value:o,distance:r}=iu(30,e,t);let s=o||12;return n?s%=12:r<zn/2-Lt&&(s+=12,s%=24),s};function Uk(e){return Ve("MuiClockPointer",e)}ze("MuiClockPointer",["root","thumb"]);const Yk=["className","classes","isBetweenTwoClockValues","isInner","type","viewValue"],qk=e=>Oe({root:["root"],thumb:["thumb"]},Uk,e),Kk=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"])}}]})),Gk=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% - ${Lt/2}px)`,border:`${(Lt-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 Qk(e){const t=Te({props:e,name:"MuiClockPointer"}),{className:n,classes:o,isBetweenTwoClockValues:r,isInner:s,type:a,viewValue:i}=t,l=he(t,Yk),c=p.useRef(a);p.useEffect(()=>{c.current=a},[a]);const{ownerState:d}=We(),m=E({},d,{isClockPointerAnimated:c.current!==a,isClockPointerBetweenTwoValues:r}),y=qk(o),g=()=>{let v=360/(a==="hours"?12:60)*i;return a==="hours"&&i>12&&(v-=360),{height:Math.round((s?.26:.4)*zn),transform:`rotateZ(${v}deg)`}};return u.jsx(Kk,E({style:g(),className:ie(y.root,n),ownerState:m},l,{children:u.jsx(Gk,{ownerState:m,className:y.thumb})}))}function Xk(e){return Ve("MuiClock",e)}ze("MuiClock",["root","clock","wrapper","squareMask","pin","amButton","pmButton","meridiemText","selected"]);const Zk=(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,Xk,e)},Jk=V("div",{name:"MuiClock",slot:"Root"})(({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",margin:e.spacing(2)})),eS=V("div",{name:"MuiClock",slot:"Clock"})({backgroundColor:"rgba(0,0,0,.07)",borderRadius:"50%",height:220,width:220,flexShrink:0,position:"relative",pointerEvents:"none"}),tS=V("div",{name:"MuiClock",slot:"Wrapper"})({"&:focus":{outline:"none"}}),nS=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"}}}]}),oS=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%)"})),lu=(e,t)=>({zIndex:1,bottom:8,paddingLeft:4,paddingRight:4,width:Lt,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}}}]}),rS=V(Bn,{name:"MuiClock",slot:"AmButton"})(({theme:e})=>E({},lu(e,"am"),{position:"absolute",left:8})),sS=V(Bn,{name:"MuiClock",slot:"PmButton"})(({theme:e})=>E({},lu(e,"pm"),{position:"absolute",right:8})),vi=V(zt,{name:"MuiClock",slot:"MeridiemText"})({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});function aS(e){const t=Te({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:g,viewValue:h,viewRange:[v,f],disabled:b=!1,readOnly:C,className:w,classes:x}=t,S=Ie(),P=ct(),{ownerState:k}=We(),R=E({},k,{isClockDisabled:b,clockMeridiemMode:c}),_=p.useRef(!1),O=Zk(x,R),$=l(h,g),M=!n&&g==="hours"&&(h<1||h>12),A=(Y,re)=>{b||C||l(Y,g)||m(Y,re)},F=(Y,re)=>{let{offsetX:ue,offsetY:me}=Y;if(ue===void 0){const X=Y.target.getBoundingClientRect();ue=Y.changedTouches[0].clientX-X.left,me=Y.changedTouches[0].clientY-X.top}const se=g==="seconds"||g==="minutes"?Hk(ue,me,d):Wk(ue,me,!!n);A(se,re)},I=Y=>{_.current=!0,F(Y,"shallow")},T=Y=>{_.current&&(F(Y,"finish"),_.current=!1),Y.preventDefault()},L=Y=>{Y.buttons>0&&F(Y.nativeEvent,"shallow")},Q=Y=>{_.current&&(_.current=!1),F(Y.nativeEvent,"finish")},N=g==="hours"?!1:h%5!==0,J=g==="minutes"?d:1,z=p.useRef(null);pt(()=>{r&&z.current.focus()},[r]);const oe=Y=>Math.max(v,Math.min(f,Y)),ne=Y=>(Y+(f+1))%(f+1),ae=Y=>{if(!_.current)switch(Y.key){case"Home":A(v,"partial"),Y.preventDefault();break;case"End":A(f,"partial"),Y.preventDefault();break;case"ArrowUp":A(ne(h+J),"partial"),Y.preventDefault();break;case"ArrowDown":A(ne(h-J),"partial"),Y.preventDefault();break;case"PageUp":A(oe(h+5),"partial"),Y.preventDefault();break;case"PageDown":A(oe(h-5),"partial"),Y.preventDefault();break;case"Enter":case" ":A(h,"finish"),Y.preventDefault();break}};return u.jsxs(Jk,{className:ie(O.root,w),children:[u.jsxs(eS,{className:O.clock,children:[u.jsx(nS,{onTouchMove:I,onTouchStart:I,onTouchEnd:T,onMouseUp:Q,onMouseMove:L,ownerState:R,className:O.squareMask}),!$&&u.jsxs(p.Fragment,{children:[u.jsx(oS,{className:O.pin}),a!=null&&u.jsx(Qk,{type:g,viewValue:h,isInner:M,isBetweenTwoClockValues:N})]}),u.jsx(tS,{"aria-activedescendant":y,"aria-label":P.clockLabelText(g,a==null?null:S.format(a,n?"fullTime12h":"fullTime24h")),ref:z,role:"listbox",onKeyDown:ae,tabIndex:0,className:O.wrapper,children:s})]}),n&&o&&u.jsxs(p.Fragment,{children:[u.jsx(rS,{onClick:C?void 0:()=>i("am"),disabled:b||c===null,ownerState:R,className:O.amButton,title:qt(S,"am"),children:u.jsx(vi,{variant:"caption",className:O.meridiemText,children:qt(S,"am")})}),u.jsx(sS,{disabled:b||c===null,onClick:C?void 0:()=>i("pm"),ownerState:R,className:O.pmButton,title:qt(S,"pm"),children:u.jsx(vi,{variant:"caption",className:O.meridiemText,children:qt(S,"pm")})})]})]})}function iS(e){return Ve("MuiClockNumber",e)}const jo=ze("MuiClockNumber",["root","selected","disabled"]),lS=["className","classes","disabled","index","inner","label","selected"],cS=(e,t)=>{const n={root:["root",t.isClockNumberSelected&&"selected",t.isClockNumberDisabled&&"disabled"]};return Oe(n,iS,e)},uS=V("span",{name:"MuiClockNumber",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${jo.disabled}`]:t.disabled},{[`&.${jo.selected}`]:t.selected}]})(({theme:e})=>({height:Lt,width:Lt,position:"absolute",left:`calc((100% - ${Lt}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},[`&.${jo.selected}`]:{color:(e.vars||e).palette.primary.contrastText},[`&.${jo.disabled}`]:{pointerEvents:"none",color:(e.vars||e).palette.text.disabled},variants:[{props:{isClockNumberInInnerRing:!0},style:E({},e.typography.body2,{color:(e.vars||e).palette.text.secondary})}]}));function cu(e){const t=Te({props:e,name:"MuiClockNumber"}),{className:n,classes:o,disabled:r,index:s,inner:a,label:i,selected:l}=t,c=he(t,lS),{ownerState:d}=We(),m=E({},d,{isClockNumberInInnerRing:a,isClockNumberSelected:l,isClockNumberDisabled:r}),y=cS(o,m),g=s%12/12*Math.PI*2-Math.PI/2,h=(zn-Lt-2)/2*(a?.65:1),v=Math.round(Math.cos(g)*h),f=Math.round(Math.sin(g)*h);return u.jsx(uS,E({className:ie(y.root,n),"aria-disabled":r?!0:void 0,"aria-selected":l?!0:void 0,role:"option",style:{transform:`translate(${v}px, ${f+(zn-Lt)/2}px`},ownerState:m},c,{children:i}))}const dS=({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 g=!e&&(m===0||m>12);y=s.formatNumber(y);const h=d(m);i.push(u.jsx(cu,{id:h?r:void 0,index:m,inner:g,selected:h,disabled:o(m),label:y,"aria-label":n(y)},m))}return i},xi=({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(cu,{label:i,id:c?r:void 0,index:l+1,inner:!1,disabled:n(a),selected:c,"aria-label":o(i)},a)})},Ws=({value:e,referenceDate:t,utils:n,props:o,timezone:r})=>{const s=p.useMemo(()=>tt.getInitialReferenceValue({value:e,utils:n,props:o,referenceDate:t,granularity:Mt.day,timezone:r,getTodayDate:()=>hs(n,r,"date")}),[]);return e??s},pS=["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"],fS=e=>Oe({root:["root"],arrowSwitcher:["arrowSwitcher"]},Lk,e),mS=V(wr,{name:"MuiTimeClock",slot:"Root"})({display:"flex",flexDirection:"column",position:"relative"}),hS=V(Jc,{name:"MuiTimeClock",slot:"ArrowSwitcher"})({position:"absolute",right:12,top:15}),gS=["hours","minutes"],bS=p.forwardRef(function(t,n){const o=Ie(),r=Te({props:t,name:"MuiTimeClock"}),{ampm:s=o.is12HourCycleInCurrentLocale(),ampmInClock:a=!1,autoFocus:i,slots:l,slotProps:c,value:d,defaultValue:m,referenceDate:y,disableIgnoringDatePartForTimeValidation:g=!1,maxTime:h,minTime:v,disableFuture:f,disablePast:b,minutesStep:C=1,shouldDisableTime:w,showViewSwitcher:x,onChange:S,view:P,views:k=gS,openTo:R,onViewChange:_,focusedView:O,onFocusedViewChange:$,className:M,classes:A,disabled:F,readOnly:I,timezone:T}=r,L=he(r,pS),{value:Q,handleValueChange:N,timezone:J}=Qt({name:"TimeClock",timezone:T,value:d,defaultValue:m,referenceDate:y,onChange:S,valueManager:tt}),z=Ws({value:Q,referenceDate:y,utils:o,props:r,timezone:J}),oe=ct(),ne=gn(J),ae=ko(),{ownerState:Y}=We(),{view:re,setView:ue,previousView:me,nextView:se,setValueAndGoToNextView:X}=Io({view:P,views:k,openTo:R,onViewChange:_,onChange:N,focusedView:O,onFocusedViewChange:$}),{meridiemMode:H,handleMeridiemChange:K}=Hs(z,s,X),Z=p.useCallback((ee,q)=>{const te=So(g,o),le=q==="hours"||q==="minutes"&&k.includes("seconds"),W=({start:U,end:be})=>!(v&&te(v,be)||h&&te(U,h)||f&&te(U,ne)||b&&te(ne,le?be:U)),j=(U,be=1)=>{if(U%be!==0)return!1;if(w)switch(q){case"hours":return!w(o.setHours(z,U),"hours");case"minutes":return!w(o.setMinutes(z,U),"minutes");case"seconds":return!w(o.setSeconds(z,U),"seconds");default:return!1}return!0};switch(q){case"hours":{const U=po(ee,H,s),be=o.setHours(z,U);if(o.getHours(be)!==U)return!0;const ve=o.setSeconds(o.setMinutes(be,0),0),je=o.setSeconds(o.setMinutes(be,59),59);return!W({start:ve,end:je})||!j(U)}case"minutes":{const U=o.setMinutes(z,ee),be=o.setSeconds(U,0),ve=o.setSeconds(U,59);return!W({start:be,end:ve})||!j(ee,C)}case"seconds":{const U=o.setSeconds(z,ee);return!W({start:U,end:U})||!j(ee)}default:throw new Error("not supported")}},[s,z,g,h,H,v,C,w,o,f,b,ne,k]),G=p.useMemo(()=>{switch(re){case"hours":{const ee=(le,W)=>{const j=po(le,H,s);X(o.setHours(z,j),W,"hours")},q=o.getHours(z);let te;return s?q>12?te=[12,23]:te=[0,11]:te=[0,23],{onChange:ee,viewValue:q,children:dS({value:Q,utils:o,ampm:s,getClockNumberText:oe.hoursClockNumberText,isDisabled:le=>F||Z(le,"hours"),selectedId:ae}),viewRange:te}}case"minutes":{const ee=o.getMinutes(z);return{viewValue:ee,onChange:(te,le)=>{X(o.setMinutes(z,te),le,"minutes")},children:xi({utils:o,value:ee,getClockNumberText:oe.minutesClockNumberText,isDisabled:te=>F||Z(te,"minutes"),selectedId:ae}),viewRange:[0,59]}}case"seconds":{const ee=o.getSeconds(z);return{viewValue:ee,onChange:(te,le)=>{X(o.setSeconds(z,te),le,"seconds")},children:xi({utils:o,value:ee,getClockNumberText:oe.secondsClockNumberText,isDisabled:te=>F||Z(te,"seconds"),selectedId:ae}),viewRange:[0,59]}}default:throw new Error("You must provide the type for ClockView")}},[re,o,Q,s,oe.hoursClockNumberText,oe.minutesClockNumberText,oe.secondsClockNumberText,H,X,z,Z,ae,F]),de=fS(A);return u.jsxs(mS,E({ref:n,className:ie(de.root,M),ownerState:Y},L,{children:[u.jsx(aS,E({autoFocus:i??!!O,ampmInClock:a&&k.includes("hours"),value:Q,type:re,ampm:s,minutesStep:C,isTimeDisabled:Z,meridiemMode:H,handleMeridiemChange:K,selectedId:ae,disabled:F,readOnly:I},G)),x&&u.jsx(hS,{className:de.arrowSwitcher,slots:l,slotProps:c,onGoToPrevious:()=>ue(me),isPreviousDisabled:!me,previousLabel:oe.openPreviousView,onGoToNext:()=>ue(se),isNextDisabled:!se,nextLabel:oe.openNextView,ownerState:Y})]}))}),wi=Se("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),Ci=Se("MuiListItemIcon",["root","alignItemsFlexStart"]),ki=Se("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function yS(e){return _e("MuiMenuItem",e)}const eo=Se("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),vS=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},xS=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"]},yS,a);return{...a,...l}},wS=V(Ln,{shouldForwardProp:e=>kt(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:vS})(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})`:Re(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}))`:Re(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}))`:Re(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})`:Re(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},[`& + .${wi.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${wi.inset}`]:{marginLeft:52},[`& .${ki.root}`]:{marginTop:0,marginBottom:0},[`& .${ki.inset}`]:{paddingLeft:36},[`& .${Ci.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,[`& .${Ci.root} svg`]:{fontSize:"1.25rem"}}}]}))),uu=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,...g}=o,h=p.useContext(ln),v=p.useMemo(()=>({dense:a||h.dense||!1,disableGutters:l}),[h.dense,a,l]),f=p.useRef(null);Tt(()=>{r&&f.current&&f.current.focus()},[r]);const b={...o,dense:v.dense,divider:i,disableGutters:l},C=xS(o),w=Je(f,n);let x;return o.disabled||(x=m!==void 0?m:-1),u.jsx(ln.Provider,{value:v,children:u.jsx(wS,{ref:w,role:d,tabIndex:x,component:s,focusVisibleClassName:ie(C.focusVisible,c),className:ie(C.root,y),...g,ownerState:b,classes:C})})});function CS(e){return Ve("MuiDigitalClock",e)}ze("MuiDigitalClock",["root","list","item"]);const kS=["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"],SS=e=>Oe({root:["root"],list:["list"],item:["item"]},CS,e),PS=V(wr,{name:"MuiDigitalClock",slot:"Root"})({overflowY:"auto",width:"100%",scrollbarWidth:"thin","@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"auto"},maxHeight:dc,variants:[{props:{hasDigitalClockAlreadyBeenRendered:!0},style:{"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"smooth"}}}]}),MS=V(Ns,{name:"MuiDigitalClock",slot:"List"})({padding:0}),DS=V(uu,{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})`:Re(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})`:Re(e.palette.primary.main,e.palette.action.focusOpacity)}})),TS=p.forwardRef(function(t,n){const o=Ie(),r=p.useRef(null),s=rt(n,r),a=p.useRef(null),i=Te({props:t,name:"MuiDigitalClock"}),{ampm:l=o.is12HourCycleInCurrentLocale(),timeStep:c=30,autoFocus:d,slots:m,slotProps:y,value:g,defaultValue:h,referenceDate:v,disableIgnoringDatePartForTimeValidation:f=!1,maxTime:b,minTime:C,disableFuture:w,disablePast:x,minutesStep:S=1,shouldDisableTime:P,onChange:k,view:R,openTo:_,onViewChange:O,focusedView:$,onFocusedViewChange:M,className:A,classes:F,disabled:I,readOnly:T,views:L=["hours"],skipDisabled:Q=!1,timezone:N}=i,J=he(i,kS),{value:z,handleValueChange:oe,timezone:ne}=Qt({name:"DigitalClock",timezone:N,value:g,defaultValue:h,referenceDate:v,onChange:k,valueManager:tt}),ae=ct(),Y=gn(ne),{ownerState:re}=We(),ue=E({},re,{hasDigitalClockAlreadyBeenRendered:!!r.current}),me=SS(F),se=m?.digitalClockItem??DS,X=Ae({elementType:se,externalSlotProps:y?.digitalClockItem,ownerState:ue,className:me.item}),H=Ws({value:z,referenceDate:v,utils:o,props:i,timezone:ne}),K=pe(le=>oe(le,"finish","hours")),{setValueAndGoToNextView:Z}=Io({view:R,views:L,openTo:_,onViewChange:O,onChange:K,focusedView:$,onFocusedViewChange:M}),G=pe(le=>{Z(le,"finish")});pt(()=>{if(r.current===null)return;const le=r.current.querySelector('[role="listbox"] [role="option"][tabindex="0"], [role="listbox"] [role="option"][aria-selected="true"]');if(!le)return;const W=le.offsetTop;(d||$)&&le.focus(),r.current.scrollTop=W-4});const de=p.useCallback(le=>{const W=So(f,o),j=()=>!(C&&W(C,le)||b&&W(le,b)||w&&W(le,Y)||x&&W(Y,le)),U=()=>o.getMinutes(le)%S!==0?!1:P?!P(le,"hours"):!0;return!j()||!U()},[f,o,C,b,w,Y,x,S,P]),ee=p.useMemo(()=>{const le=[];let j=o.startOfDay(H);for(;o.isSameDay(H,j);)le.push(j),j=o.addMinutes(j,c);return le},[H,c,o]),q=ee.findIndex(le=>o.isEqual(le,H)),te=le=>{switch(le.key){case"PageUp":{const W=Zo(a.current)-5,j=a.current.children,U=Math.max(0,W),be=j[U];be&&be.focus(),le.preventDefault();break}case"PageDown":{const W=Zo(a.current)+5,j=a.current.children,U=Math.min(j.length-1,W),be=j[U];be&&be.focus(),le.preventDefault();break}}};return u.jsx(PS,E({ref:s,className:ie(me.root,A),ownerState:ue},J,{children:u.jsx(MS,{ref:a,role:"listbox","aria-label":ae.timePickerToolbarTitle,className:me.list,onKeyDown:te,children:ee.map((le,W)=>{const j=de(le);if(Q&&j)return null;const U=o.isEqual(le,z),be=o.format(le,l?"fullTime12h":"fullTime24h"),je=q===W||q===-1&&W===0?0:-1;return u.jsx(se,E({onClick:()=>!T&&G(le),selected:U,disabled:I||j,disableRipple:T,role:"option","aria-disabled":T,"aria-selected":U,tabIndex:je,itemValue:le,formattedValue:be},X,{children:be}),`${le.valueOf()}-${be}`)})})}))});function IS(e){return Ve("MuiMultiSectionDigitalClock",e)}ze("MuiMultiSectionDigitalClock",["root"]);function RS(e){return Ve("MuiMultiSectionDigitalClockSection",e)}ze("MuiMultiSectionDigitalClockSection",["root","item"]);const _S=["autoFocus","onChange","className","classes","disabled","readOnly","items","active","slots","slotProps","skipDisabled"],ES=e=>Oe({root:["root"],item:["item"]},RS,e),OS=V(Ns,{name:"MuiMultiSectionDigitalClockSection",slot:"Root"})(({theme:e})=>({maxHeight:dc,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"}}}]})),FS=V(uu,{name:"MuiMultiSectionDigitalClockSection",slot:"Item"})(({theme:e})=>({padding:8,margin:"2px 4px",width:gy,justifyContent:"center","&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Re(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})`:Re(e.palette.primary.main,e.palette.action.focusOpacity)}})),NS=p.forwardRef(function(t,n){const o=p.useRef(null),r=rt(n,o),s=p.useRef(null),a=Te({props:t,name:"MuiMultiSectionDigitalClockSection"}),{autoFocus:i,onChange:l,className:c,classes:d,disabled:m,readOnly:y,items:g,active:h,slots:v,slotProps:f,skipDisabled:b}=a,C=he(a,_S),{ownerState:w}=We(),x=E({},w,{hasDigitalClockAlreadyBeenRendered:!!o.current}),S=ES(d),P=v?.digitalClockSectionItem??FS;pt(()=>{if(o.current===null)return;const _=o.current.querySelector('[role="option"][tabindex="0"], [role="option"][aria-selected="true"]');if(h&&i&&_&&_.focus(),!_||s.current===_)return;s.current=_;const O=_.offsetTop;o.current.scrollTop=O-4});const k=g.findIndex(_=>_.isFocused(_.value)),R=_=>{switch(_.key){case"PageUp":{const O=Zo(o.current)-5,$=o.current.children,M=Math.max(0,O),A=$[M];A&&A.focus(),_.preventDefault();break}case"PageDown":{const O=Zo(o.current)+5,$=o.current.children,M=Math.min($.length-1,O),A=$[M];A&&A.focus(),_.preventDefault();break}}};return u.jsx(OS,E({ref:r,className:ie(S.root,c),ownerState:x,autoFocusItem:i&&h,role:"listbox",onKeyDown:R},C,{children:g.map((_,O)=>{const $=_.isDisabled?.(_.value),M=m||$;if(b&&M)return null;const A=_.isSelected(_.value),F=k===O||k===-1&&O===0?0:-1;return u.jsx(P,E({onClick:()=>!y&&l(_.value),selected:A,disabled:M,disableRipple:y,role:"option","aria-disabled":y||M||void 0,"aria-label":_.ariaLabel,"aria-selected":A,tabIndex:F,className:S.item},f?.digitalClockSectionItem,{children:_.label}),_.label)})}))}),AS=({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=(g,h)=>{const v=h??l;return v===null?!1:o?g===12?v===12||v===0:v===g||v-12===g:v===g},m=g=>d(g,n.getHours(i)),y=o?11:23;for(let g=0;g<=y;g+=a){let h=n.format(n.setHours(e,g),o?"hours12h":"hours24h");const v=s(parseInt(h,10).toString());h=n.formatNumber(h),c.push({value:g,label:h,isSelected:d,isDisabled:r,isFocused:m,ariaLabel:v})}return c},Si=({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())}})]},$S=["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"],jS=e=>Oe({root:["root"]},IS,e),LS=V(wr,{name:"MuiMultiSectionDigitalClock",slot:"Root"})(({theme:e})=>({flexDirection:"row",width:"100%",borderBottom:`1px solid ${(e.vars||e).palette.divider}`})),VS=p.forwardRef(function(t,n){const o=Ie(),r=Ct(),s=Te({props:t,name:"MuiMultiSectionDigitalClock"}),{ampm:a=o.is12HourCycleInCurrentLocale(),timeSteps:i,autoFocus:l,slots:c,slotProps:d,value:m,defaultValue:y,referenceDate:g,disableIgnoringDatePartForTimeValidation:h=!1,maxTime:v,minTime:f,disableFuture:b,disablePast:C,minutesStep:w=1,shouldDisableTime:x,onChange:S,view:P,views:k=["hours","minutes"],openTo:R,onViewChange:_,focusedView:O,onFocusedViewChange:$,className:M,classes:A,disabled:F,readOnly:I,skipDisabled:T=!1,timezone:L}=s,Q=he(s,$S),{value:N,handleValueChange:J,timezone:z}=Qt({name:"MultiSectionDigitalClock",timezone:L,value:m,defaultValue:y,referenceDate:g,onChange:S,valueManager:tt}),oe=ct(),ne=gn(z),ae=p.useMemo(()=>E({hours:1,minutes:5,seconds:5},i),[i]),Y=Ws({value:N,referenceDate:g,utils:o,props:s,timezone:z}),re=pe((W,j,U)=>J(W,j,U)),ue=p.useMemo(()=>!a||!k.includes("hours")||k.includes("meridiem")?k:[...k,"meridiem"],[a,k]),{view:me,setValueAndGoToNextView:se,focusedView:X}=Io({view:P,views:ue,openTo:R,onViewChange:_,onChange:re,focusedView:O,onFocusedViewChange:$}),H=pe(W=>{se(W,"finish","meridiem")}),{meridiemMode:K,handleMeridiemChange:Z}=Hs(Y,a,H,"finish"),G=p.useCallback((W,j)=>{const U=So(h,o),be=j==="hours"||j==="minutes"&&ue.includes("seconds"),ve=({start:Me,end:He})=>!(f&&U(f,He)||v&&U(Me,v)||b&&U(Me,ne)||C&&U(ne,be?He:Me)),je=(Me,He=1)=>{if(Me%He!==0)return!1;if(x)switch(j){case"hours":return!x(o.setHours(Y,Me),"hours");case"minutes":return!x(o.setMinutes(Y,Me),"minutes");case"seconds":return!x(o.setSeconds(Y,Me),"seconds");default:return!1}return!0};switch(j){case"hours":{const Me=po(W,K,a),He=o.setHours(Y,Me);if(o.getHours(He)!==Me)return!0;const Ke=o.setSeconds(o.setMinutes(He,0),0),ye=o.setSeconds(o.setMinutes(He,59),59);return!ve({start:Ke,end:ye})||!je(Me)}case"minutes":{const Me=o.setMinutes(Y,W),He=o.setSeconds(Me,0),Ke=o.setSeconds(Me,59);return!ve({start:He,end:Ke})||!je(W,w)}case"seconds":{const Me=o.setSeconds(Y,W);return!ve({start:Me,end:Me})||!je(W)}default:throw new Error("not supported")}},[a,Y,h,v,K,f,w,x,o,b,C,ne,ue]),de=p.useCallback(W=>{switch(W){case"hours":return{onChange:j=>{const U=po(j,K,a);se(o.setHours(Y,U),"finish","hours")},items:AS({now:ne,value:N,ampm:a,utils:o,isDisabled:j=>G(j,"hours"),timeStep:ae.hours,resolveAriaLabel:oe.hoursClockNumberText,valueOrReferenceDate:Y})};case"minutes":return{onChange:j=>{se(o.setMinutes(Y,j),"finish","minutes")},items:Si({value:o.getMinutes(Y),utils:o,isDisabled:j=>G(j,"minutes"),resolveLabel:j=>o.format(o.setMinutes(ne,j),"minutes"),timeStep:ae.minutes,hasValue:!!N,resolveAriaLabel:oe.minutesClockNumberText})};case"seconds":return{onChange:j=>{se(o.setSeconds(Y,j),"finish","seconds")},items:Si({value:o.getSeconds(Y),utils:o,isDisabled:j=>G(j,"seconds"),resolveLabel:j=>o.format(o.setSeconds(ne,j),"seconds"),timeStep:ae.seconds,hasValue:!!N,resolveAriaLabel:oe.secondsClockNumberText})};case"meridiem":{const j=qt(o,"am"),U=qt(o,"pm");return{onChange:Z,items:[{value:"am",label:j,isSelected:()=>!!N&&K==="am",isFocused:()=>!!Y&&K==="am",ariaLabel:j},{value:"pm",label:U,isSelected:()=>!!N&&K==="pm",isFocused:()=>!!Y&&K==="pm",ariaLabel:U}]}}default:throw new Error(`Unknown view: ${W} found.`)}},[ne,N,a,o,ae.hours,ae.minutes,ae.seconds,oe.hoursClockNumberText,oe.minutesClockNumberText,oe.secondsClockNumberText,K,se,Y,G,Z]),ee=p.useMemo(()=>{if(!r)return ue;const W=ue.filter(j=>j!=="meridiem");return W.reverse(),ue.includes("meridiem")&&W.push("meridiem"),W},[r,ue]),q=p.useMemo(()=>ue.reduce((W,j)=>E({},W,{[j]:de(j)}),{}),[ue,de]),{ownerState:te}=We(),le=jS(A);return u.jsx(LS,E({ref:n,className:ie(le.root,M),ownerState:te,role:"group"},Q,{children:ee.map(W=>u.jsx(NS,{items:q[W].items,onChange:q[W].onChange,active:me===W,autoFocus:l||X===W,disabled:F,readOnly:I,slots:c,slotProps:d,skipDisabled:T,"aria-label":oe.selectViewText(W)},W))}))}),Ir=({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:g,maxTime:h,shouldDisableTime:v,minutesStep:f,ampm:b,ampmInClock:C,slots:w,slotProps:x,readOnly:S,disabled:P,sx:k,autoFocus:R,showViewSwitcher:_,disableIgnoringDatePartForTimeValidation:O,timezone:$})=>u.jsx(bS,{view:e,onViewChange:t,focusedView:n&&Fn(n)?n:null,onFocusedViewChange:o,views:r.filter(Fn),value:s,defaultValue:a,referenceDate:i,onChange:l,className:c,classes:d,disableFuture:m,disablePast:y,minTime:g,maxTime:h,shouldDisableTime:v,minutesStep:f,ampm:b,ampmInClock:C,slots:w,slotProps:x,readOnly:S,disabled:P,sx:k,autoFocus:R,showViewSwitcher:_,disableIgnoringDatePartForTimeValidation:O,timezone:$}),BS=({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:g,maxTime:h,shouldDisableTime:v,minutesStep:f,ampm:b,slots:C,slotProps:w,readOnly:x,disabled:S,sx:P,autoFocus:k,disableIgnoringDatePartForTimeValidation:R,timeSteps:_,skipDisabled:O,timezone:$})=>u.jsx(TS,{view:e,onViewChange:t,focusedView:n&&Fn(n)?n:null,onFocusedViewChange:o,views:r.filter(Fn),value:s,defaultValue:a,referenceDate:i,onChange:l,className:c,classes:d,disableFuture:m,disablePast:y,minTime:g,maxTime:h,shouldDisableTime:v,minutesStep:f,ampm:b,slots:C,slotProps:w,readOnly:x,disabled:S,sx:P,autoFocus:k,disableIgnoringDatePartForTimeValidation:R,timeStep:_?.minutes,skipDisabled:O,timezone:$}),Pi=({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:g,maxTime:h,shouldDisableTime:v,minutesStep:f,ampm:b,slots:C,slotProps:w,readOnly:x,disabled:S,sx:P,autoFocus:k,disableIgnoringDatePartForTimeValidation:R,timeSteps:_,skipDisabled:O,timezone:$})=>u.jsx(VS,{view:e,onViewChange:t,focusedView:n&&kl(n)?n:null,onFocusedViewChange:o,views:r.filter(Fn),value:s,defaultValue:a,referenceDate:i,onChange:l,className:c,classes:d,disableFuture:m,disablePast:y,minTime:g,maxTime:h,shouldDisableTime:v,minutesStep:f,ampm:b,slots:C,slotProps:w,readOnly:x,disabled:S,sx:P,autoFocus:k,disableIgnoringDatePartForTimeValidation:R,timeSteps:_,skipDisabled:O,timezone:$}),zS=(e,t,n)=>n?t.filter(o=>!kl(o)||o==="hours"):e?[...t,"meridiem"]:t,HS=(e,t)=>24*60/((e.hours??1)*(e.minutes??5))<=t;function WS({thresholdToRenderTimeInASingleColumn:e,ampm:t,timeSteps:n,views:o}){const r=e??24,s=E({hours:1,minutes:5,seconds:5},n),a=HS(s,r);return{thresholdToRenderTimeInASingleColumn:r,timeSteps:s,shouldRenderTimeInASingleColumn:a,views:zS(t,o,a)}}const du=p.forwardRef(function(t,n){const o=Ie(),r=su(t,"MuiDesktopTimePicker"),{shouldRenderTimeInASingleColumn:s,views:a,timeSteps:i}=WS(r),l=s?BS:Pi,c=E({hours:l,minutes:l,seconds:l,meridiem:l},r.viewRenderers),d=r.ampmInClock??!0,y=c.hours?.name===Pi.name?a:a.filter(v=>v!=="meridiem"),g=E({},r,{ampmInClock:d,timeSteps:i,viewRenderers:c,format:Sl(o,r),views:s?["hours"]:y,slots:E({field:ou},r.slots),slotProps:E({},r.slotProps,{field:v=>E({},cn(r.slotProps?.field,v),lr(r)),toolbar:E({hidden:!0,ampmInClock:d},r.slotProps?.toolbar)})}),{renderPicker:h}=$c({ref:n,props:g,valueManager:tt,valueType:"time",validator:cr,steps:null});return h()});du.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:ar,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 pu=p.forwardRef(function(t,n){const o=Ie(),r=su(t,"MuiMobileTimePicker"),s=E({hours:Ir,minutes:Ir,seconds:Ir},r.viewRenderers),a=r.ampmInClock??!1,i=E({},r,{ampmInClock:a,viewRenderers:s,format:Sl(o,r),slots:E({field:ou},r.slots),slotProps:E({},r.slotProps,{field:c=>E({},cn(r.slotProps?.field,c),lr(r)),toolbar:E({hidden:!1,ampmInClock:a},r.slotProps?.toolbar)})}),{renderPicker:l}=tu({ref:n,props:i,valueManager:tt,valueType:"time",validator:cr,steps:null});return l()});pu.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:ar,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 US=["desktopModeMediaQuery"],YS=p.forwardRef(function(t,n){const o=Te({props:t,name:"MuiTimePicker"}),{desktopModeMediaQuery:r=nc}=o,s=he(o,US);return ps(r,{defaultMatches:!0})?u.jsx(du,E({ref:n},s)):u.jsx(pu,E({ref:n},s))}),Rr=(e,t)=>{typeof e=="function"?e(t):e&&(e.current=t)},Qr=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:g,onFocus:h,onClick:v,InputProps:f,inputProps:b},C)=>u.jsxs("div",{ref:w=>{Rr(C,w),Rr(f?.ref,w)},onBlur:g,onFocus:h,onClick:v,className:Le("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=>{Rr(b?.ref,w),c&&w&&w.focus()},className:Le("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]}));Qr.displayName="PickerTextField";const tr=({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(Js(t))){const f=Js(t);i(f),c(f)}else i(null),c(null)},[t]);const g=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)},h=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(_l,{dateAdapter:em,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(wk,{value:a,onChange:g,disabled:r,open:o?d:void 0,disableHighlightToday:o,onOpen:()=>m(!0),onClose:()=>m(!1),enableAccessibleFieldDOMStructure:!1,slots:{textField:Qr,openPickerIcon:()=>u.jsx(Ni,{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(YS,{value:l,onChange:h,disabled:r,enableAccessibleFieldDOMStructure:!1,slots:{textField:Qr,openPickerIcon:()=>u.jsx(sd,{size:16})},slotProps:{textField:{id:`${y}-time-field`,placeholder:"Select time"},openPickerButton:{"aria-label":`Choose ${e} time`,size:"small"}}})}),u.jsx(Kt,{content:"Set to current time",children:u.jsx(yt,{variant:"ghost",size:"icon-sm",onClick:v,disabled:r,"aria-label":`Set ${e} to current time`,children:u.jsx(Du,{})})})]}),s&&u.jsx("p",{className:"mt-1 ms-0.5 text-ink-muted text-meta",children:s})]})})},Mi={selectedAgentId:null,prompt:"",interval:1,unit:"hours",is_active:!0,one_time:!1,start_time_utc:null,end_time_utc:null},qS=({options:e,selected:t,onSelect:n,onQueryChange:o,loading:r,invalid:s})=>{fn();const a=p.useId(),i=`${a}-input`,l=`${a}-listbox`,c=p.useRef(null),d=p.useRef([]),m=t?.name||(t?B("ui.schedules.schedule_form_dialog.agent_id_substring_0_8",{substring_0__8:String(t.id.substring(0,8))}):""),[y,g]=p.useState(m),[h,v]=p.useState(!1),[f,b]=p.useState(-1);p.useEffect(()=>{g(m)},[m]),d.current.length=e.length,p.useEffect(()=>{b(-1)},[e]),p.useEffect(()=>{!h||f<0||d.current[f]?.scrollIntoView({block:"nearest"})},[h,f]);const C=k=>{v(!1),g(k.name||B("ui.schedules.schedule_form_dialog.agent_id_substring_0_8",{substring_0__8:String(k.id.substring(0,8))})),n(k)},w=()=>{v(!1),g(m)},x=k=>{e.length!==0&&b(R=>{const _=R+k;return _<0?e.length-1:_>=e.length?0:_})},S=k=>{switch(k.key){case"ArrowDown":case"ArrowUp":{if(k.preventDefault(),!h){v(!0);return}x(k.key==="ArrowDown"?1:-1);return}case"Home":case"End":{if(!h||e.length===0)return;k.preventDefault(),b(k.key==="Home"?0:e.length-1);return}case"Enter":{k.preventDefault(),h&&f>=0&&C(e[f]);return}case"Escape":{if(!h)return;k.preventDefault(),k.stopPropagation(),w();return}}},P=h&&f>=0?`${a}-option-${f}`:void 0;return u.jsx("div",{className:"relative",children:u.jsxs(Ju,{open:h,onOpenChange:k=>{k?v(!0):w()},children:[u.jsx(ed,{asChild:!0,children:u.jsxs("div",{ref:c,className:"relative",children:[u.jsx(Wo,{id:i,role:"combobox","aria-expanded":h,"aria-controls":l,"aria-autocomplete":"list","aria-activedescendant":P,"aria-invalid":s||void 0,autoComplete:"off",className:"pr-8",placeholder:B("ui.schedules.schedule_form_dialog.search_agents"),value:y,onChange:k=>{g(k.target.value),o(k.target.value),v(!0)},onFocus:()=>v(!0),onClick:()=>v(!0),onBlur:w,onKeyDown:S}),u.jsx("span",{className:"pointer-events-none absolute top-1/2 right-2 flex -translate-y-1/2 items-center",children:r?u.jsx(os,{size:"sm",label:B("ui.schedules.schedule_form_dialog.loading_agents")}):u.jsx(td,{className:"size-4 text-ink-dim","aria-hidden":"true"})})]})}),u.jsx(nd,{align:"start",className:"w-(--radix-popover-trigger-width) p-1",onOpenAutoFocus:k=>k.preventDefault(),onCloseAutoFocus:k=>k.preventDefault(),onPointerDownOutside:k=>{c.current?.contains(k.target)&&k.preventDefault()},onFocusOutside:k=>{c.current?.contains(k.target)&&k.preventDefault()},onMouseDown:k=>k.preventDefault(),children:u.jsxs("ul",{id:l,role:"listbox","aria-label":B("ui.schedules.schedule_form_dialog.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?B("ui.schedules.schedule_form_dialog.loading_agents"):B("ui.schedules.schedule_form_dialog.no_matching_agents")}),e.map((k,R)=>u.jsx("li",{id:`${a}-option-${R}`,role:"option","aria-selected":k.id===t?.id,ref:_=>{d.current[R]=_},className:Le("cursor-pointer rounded-sm px-2 py-1.5","transition-colors duration-fast ease-out-quart",R===f&&"bg-accent-wash"),onMouseEnter:()=>b(R),onClick:()=>C(k),children:u.jsx("span",{className:"font-medium text-body-sm text-ink",children:k.name||B("ui.schedules.schedule_form_dialog.unnamed_agent")})},k.id))]})})]})})},KS=({open:e,onClose:t,onSubmit:n,initialData:o})=>{fn();const[r,s]=p.useState(Mi),[a,i]=p.useState(!1),[l,c]=p.useState(""),[d,m]=p.useState(""),[y,g]=p.useState(null),h=!!o;p.useEffect(()=>{const k=setTimeout(()=>{m(l)},300);return()=>clearTimeout(k)},[l]);const{data:v,isLoading:f,isError:b}=Tu(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 k=C.find(R=>R.id===o.agent_id);k&&g(k)}else s(Mi),g(null),c("")},[e,o,C]);const w=async()=>{i(!0);try{if(!h&&!r.selectedAgentId){console.error("Agent ID is required to create a schedule."),i(!1);return}const k={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};k.start_time_utc===""&&(k.start_time_utc=null),k.end_time_utc===""&&(k.end_time_utc=null);const R=h?o.agent_id:r.selectedAgentId;if(!R){console.error("Agent ID is missing for submission."),i(!1);return}await n(k,R),t()}catch(k){console.error("Failed to submit schedule:",k),Pn(B("ui.schedules.schedule_form_dialog.failed_to_save_schedule_unknown_error",{unknown_error:String(k instanceof Error?k.message:B("ui.schedules.schedule_form_dialog.unknown_error"))}))}finally{i(!1)}},x=h?B("ui.schedules.schedule_form_dialog.edit_schedule"):B("ui.schedules.schedule_form_dialog.new_schedule"),S=b||!h&&!r.selectedAgentId&&a,P=u.jsxs(u.Fragment,{children:[u.jsx(zi,{onClick:t,disabled:a,startIcon:u.jsx(Iu,{size:18}),"data-tour-tag":"create-schedule-dialog-cancel-button",children:B("ui.schedules.schedule_form_dialog.cancel")}),u.jsx(Hi,{onClick:w,disabled:a||!r.prompt||r.interval===""||r.interval<1||!h&&!r.selectedAgentId,startIcon:a?u.jsx(os,{size:"sm"}):u.jsx(Ru,{size:18}),children:a?B("ui.schedules.schedule_form_dialog.saving"):h?B("ui.schedules.schedule_form_dialog.save_changes"):B("ui.schedules.schedule_form_dialog.create_schedule")})]});return u.jsx(Wi,{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(Ks,{size:16,"aria-hidden":"true",className:"mt-0.5 shrink-0 text-info"}),u.jsx("p",{className:"text-body-sm text-ink-muted",children:B("ui.schedules.schedule_form_dialog.it_is_usually_quicker_to_ask_an_agent_in_chat_send_me_an_email_wi")})]}),!h&&u.jsxs("div",{className:"col-span-2 flex flex-col gap-1.5",children:[u.jsxs(bt,{htmlFor:"agent-select-for-schedule",children:[B("ui.schedules.schedule_form_dialog.agent"),u.jsx("span",{className:"text-danger",children:"*"})]}),u.jsx(qS,{options:C,selected:y,onSelect:k=>{g(k),s(R=>({...R,selectedAgentId:k?k.id:null}))},onQueryChange:c,loading:f,invalid:S}),S&&u.jsx("p",{className:"text-danger text-meta",children:b?B("ui.schedules.schedule_form_dialog.failed_to_load_agents"):B("ui.schedules.schedule_form_dialog.agent_selection_is_required")})]}),h&&o&&u.jsxs("p",{className:"col-span-2 text-body-sm text-ink-muted",children:[B("ui.schedules.schedule_form_dialog.runs_as")," ",u.jsx("span",{className:"font-medium text-ink",children:y?.name||`${o.agent_id.substring(0,8)}…`}),B("ui.schedules.schedule_form_dialog.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(bt,{htmlFor:"prompt",className:"items-center",children:[B("ui.schedules.schedule_form_dialog.prompt"),u.jsx("span",{className:"text-danger",children:"*"}),u.jsx(Kt,{side:"top",align:"start",content:u.jsxs("div",{className:"flex flex-col gap-1",children:[u.jsx("span",{children:B("ui.schedules.schedule_form_dialog.this_is_the_message_that_will_be_sent_to_the_agent_on_the_schedul")}),u.jsx("span",{children:B("ui.schedules.schedule_form_dialog.example_send_me_an_email_with_a_detailed_world_news_breakdown_wit")})]}),children:u.jsx(Ks,{size:14,"aria-hidden":"true",className:"text-info"})})]}),u.jsx(Vi,{id:"prompt",name:"prompt",value:r.prompt,onChange:k=>s(R=>({...R,prompt:k.target.value})),required:!0,rows:3,disabled:a,placeholder:B("ui.schedules.schedule_form_dialog.send_me_an_email_with_a_detailed_world_news_breakdown")})]}),u.jsxs("div",{className:"flex flex-col gap-1.5",children:[u.jsxs(bt,{htmlFor:"interval",children:[B("ui.schedules.schedule_form_dialog.interval"),u.jsx("span",{className:"text-danger",children:"*"})]}),u.jsx(Wo,{id:"interval",name:"interval",type:"number",min:1,value:r.interval,onChange:k=>{const R=k.target.value;s(_=>({..._,interval:R===""?"":Number.parseInt(R,10)}))},required:!0,disabled:a,placeholder:"1"})]}),u.jsxs("div",{className:"flex flex-col gap-1.5",children:[u.jsxs(bt,{htmlFor:"unit-select",children:[B("ui.schedules.schedule_form_dialog.unit"),u.jsx("span",{className:"text-danger",children:"*"})]}),u.jsxs(vn,{value:r.unit||"hours",onValueChange:k=>s(R=>({...R,unit:k})),disabled:a,children:[u.jsx(xn,{id:"unit-select",name:"unit",children:u.jsx(wn,{placeholder:B("ui.schedules.schedule_form_dialog.select_unit")})}),u.jsxs(Cn,{children:[u.jsx(et,{value:"minutes",children:B("ui.schedules.schedule_form_dialog.minutes")}),u.jsx(et,{value:"hours",children:B("ui.schedules.schedule_form_dialog.hours")}),u.jsx(et,{value:"days",children:B("ui.schedules.schedule_form_dialog.days")})]})]})]}),u.jsx(tr,{label:B("ui.schedules.schedule_form_dialog.start_time"),value:r.start_time_utc??null,onChange:k=>s(R=>({...R,start_time_utc:k})),disabled:a,helperText:B("ui.schedules.schedule_form_dialog.if_not_set_starts_immediately_or_on_next_interval")}),u.jsx(tr,{label:B("ui.schedules.schedule_form_dialog.end_time_optional"),value:r.end_time_utc??null,onChange:k=>s(R=>({...R,end_time_utc:k})),disabled:a,helperText:B("ui.schedules.schedule_form_dialog.if_not_set_schedule_runs_indefinitely")}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Er,{id:"is-active",checked:r.is_active||!1,onCheckedChange:k=>s(R=>({...R,is_active:k})),disabled:a}),u.jsx(bt,{htmlFor:"is-active",children:B("ui.schedules.schedule_form_dialog.active")})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Er,{id:"one-time",checked:r.one_time||!1,onCheckedChange:k=>s(R=>({...R,one_time:k})),disabled:a}),u.jsx(bt,{htmlFor:"one-time",children:B("ui.schedules.schedule_form_dialog.run_once")})]})]})})},GS=(e,t)=>ad(e,t),QS=e=>{const t=nr.baseUrl;return ji({queryKey:["agent-name",e,t],queryFn:async()=>t?(await ld.getAgent(t,e)).result?.name||B("ui.schedules.schedule_list_item.unknown_agent"):(console.warn("Base URL for Local Operator API is not configured."),B("ui.schedules.schedule_list_item.agent_id")),enabled:!!e&&!!t,staleTime:1e3*60*5})},XS=({schedule:e,onEdit:t,onDelete:n,onToggleActive:o,nowMs:r=Date.now()})=>{fn();const{data:s,isLoading:a}=QS(e.agent_id),i=p.useId();return u.jsxs("div",{title:B("ui.schedules.schedule_list_item.schedule_id_id",{id:String(e.id)}),className:Le("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:Le("flex min-w-0 flex-1 flex-col gap-1"),children:[u.jsx("p",{className:Le("min-w-0 break-words text-body-sm",e.is_active?"text-ink":"text-ink-muted"),children:e.prompt}),u.jsxs("p",{className:Le("flex flex-wrap items-center gap-x-1.5 text-meta"),children:[u.jsx("span",{className:Le("text-ink-muted"),children:GS(e,r)}),u.jsx("span",{"aria-hidden":"true",className:Le("text-ink-dim"),children:"·"}),a?u.jsx(od,{className:Le("h-3 w-24")}):u.jsx("span",{className:Le("truncate text-ink-dim"),children:s||e.agent_id.substring(0,8)})]})]}),u.jsxs("div",{className:Le("flex shrink-0 items-center gap-1"),children:[u.jsx(Kt,{content:e.is_active?B("ui.schedules.schedule_list_item.pause_schedule"):B("ui.schedules.schedule_list_item.resume_schedule"),children:u.jsx("span",{className:Le("flex items-center pr-1"),children:u.jsx(Er,{id:i,checked:e.is_active,onCheckedChange:()=>o(e),"aria-label":e.is_active?B("ui.schedules.schedule_list_item.pause_schedule"):B("ui.schedules.schedule_list_item.resume_schedule")})})}),u.jsxs("div",{className:Le("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(Kt,{content:B("ui.schedules.schedule_list_item.edit_schedule"),children:u.jsx(yt,{variant:"ghost",size:"icon-sm",onClick:()=>t(e),"aria-label":B("ui.schedules.schedule_list_item.edit_schedule"),children:u.jsx(Ai,{})})}),u.jsx(Kt,{content:B("ui.schedules.schedule_list_item.delete_schedule"),children:u.jsx(yt,{variant:"ghost",size:"icon-sm",onClick:()=>n(e.id),"aria-label":B("ui.schedules.schedule_list_item.delete_schedule"),className:Le("hover:bg-danger-wash hover:text-danger"),children:u.jsx(id,{})})})]})]})]})},ZS=20,JS=9,oo=6e4,eP=["minutes","hours","days","weeks"],tP={get minutes(){return B("ui.schedules.scheduled_task_dialog.minutes")},get hours(){return B("ui.schedules.scheduled_task_dialog.hours")},get days(){return B("ui.schedules.scheduled_task_dialog.days")},get weeks(){return B("ui.schedules.scheduled_task_dialog.weeks")}},nP={minutes:oo,hours:60*oo,days:24*60*oo,weeks:7*24*60*oo},oP=({open:e,onClose:t,nowMs:n=Date.now(),edit:o=null})=>{fn();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"),[g,h]=p.useState(null),[v,f]=p.useState("never"),[b,C]=p.useState("1"),[w,x]=p.useState("hours"),[S,P]=p.useState("never"),[k,R]=p.useState(null),[_,O]=p.useState(2),[$,M]=p.useState(()=>crypto.randomUUID()),A=_u(e),F=$i(),I=F.refetch;p.useEffect(()=>{e&&I()},[e,I]);const T=Eu(),L=Ou(),Q=Li(j=>j.cwd),N=T.isPending||L.isPending,J=p.useId();p.useEffect(()=>{e&&(a("new"),l(null),d(o?.message??""),y(r?"keep":"in-an-hour"),h(null),f(r?"keep":"never"),C("1"),x("hours"),P(r?"keep":"never"),R(null),O(2),M(crypto.randomUUID()))},[e,o,r]);const z=p.useMemo(()=>{const j=new Date(n);return j.setHours(ZS,0,0,0),j.getTime()>n+oo?j:null},[n]),oe=p.useMemo(()=>{const j=new Date(n);return j.setDate(j.getDate()+1),j.setHours(JS,0,0,0),j},[n]),ne=p.useMemo(()=>[...A.data??[]].sort((j,U)=>U.mtime-j.mtime),[A.data]),ae=ne.find(j=>j.id===i),Y=F.data?.entries.find(j=>j.session_id===i)?.schedules.length??0,re=cd(b),ue=v==="every"&&re!==null,me=ue&&gd(re),se=ue&&re!==null?re*nP[w]:null,X=!r&&s==="existing"&&!i,H=m==="pick"&&!g,K=S==="date"&&!k,Z=S==="runs"&&_==="",G=ud({message:c,needsConversation:X,hasConversationChoices:ne.length>0,repeatIntervalNotWhole:v==="every"&&re===null,repeatMs:se,endsRuns:S==="runs"&&_!==""?_:null,existingWakeCount:Y,alreadyRun:o?.wake.fired_count??0}),de=G.invalid||H||K||Z,ee=!r||c!==o.message||m!=="keep"||v!=="keep"||S!=="keep",q=dd(Q),te=()=>m==="keep"?null:m==="in-30-minutes"?{in:"30m"}:m==="in-an-hour"?{in:"1h"}:m==="tonight"?z?{at:z.toISOString()}:null:m==="tomorrow"?{at:oe.toISOString()}:g?{at:g}:null,le=async()=>{if(de)return;const j=te();try{if(o){await L.mutateAsync({sessionId:o.sessionId,wakeId:o.wakeId,message:c.trim(),...j?{firstRun:j}:{},...me&&re!==null?{every:Xs(re,w)}:{},...v==="every"&&S==="date"&&k?{until:k}:{},...v==="every"&&S==="runs"&&_!==""?{limit:_}:{}}),Mn(B("ui.schedules.scheduled_task_dialog.wake_updated_trim",{trim:String(Lo(c.trim()))})),t();return}const U=await T.mutateAsync({requestId:$,...i?{sessionId:i}:{cwd:Q},message:c.trim(),firstRun:j??{in:"1h"},...me&&re!==null?{every:Xs(re,w)}:{},...v==="every"&&S==="date"&&k?{until:k}:{},...v==="every"&&S==="runs"&&_!==""?{limit:_}:{}});Mn(U.index_written?B("ui.schedules.scheduled_task_dialog.scheduled_task_created_trim",{trim:String(Lo(c.trim()))}):B("ui.schedules.scheduled_task_dialog.scheduled_task_created_trim_the_list_may_lag_until_the_index_catc",{trim:String(Lo(c.trim()))})),t()}catch(U){Pn(U instanceof Error?B("ui.schedules.scheduled_task_dialog.value1_message",{value1:String(r?B("ui.schedules.scheduled_task_dialog.could_not_save_the_wake"):B("ui.schedules.scheduled_task_dialog.could_not_create_the_scheduled_task")),message:String(U.message)}):r?B("ui.schedules.scheduled_task_dialog.could_not_save_the_wake_490"):B("ui.schedules.scheduled_task_dialog.could_not_create_the_scheduled_task_491"))}},W=u.jsxs(u.Fragment,{children:[u.jsx(zi,{onClick:t,disabled:N,children:B("ui.schedules.scheduled_task_dialog.cancel")}),u.jsx(Hi,{onClick:le,disabled:de||N||!ee,startIcon:u.jsx(_r,{size:18}),children:r?N?B("ui.schedules.scheduled_task_dialog.saving"):B("ui.schedules.scheduled_task_dialog.save"):N?B("ui.schedules.scheduled_task_dialog.creating"):B("ui.schedules.scheduled_task_dialog.create")})]});return u.jsxs(Wi,{open:e,onClose:t,title:r?B("ui.schedules.scheduled_task_dialog.edit_wake"):B("ui.schedules.scheduled_task_dialog.new_scheduled_task"),actions:W,maxWidth:"sm",fullWidth:!0,dataTourTag:"create-scheduled-task-dialog",children:[o&&u.jsxs("p",{className:"text-body-sm text-ink-dim",children:[o.conversationName,B("ui.schedules.scheduled_task_dialog.wake"),Qs(o.position,{useGrouping:!1}),B("ui.schedules.scheduled_task_dialog.of"),Qs(o.count,{useGrouping:!1})]}),u.jsxs("div",{className:"flex flex-col gap-4",children:[u.jsxs("div",{className:"flex flex-col gap-1.5",children:[u.jsxs(bt,{htmlFor:`${J}-prompt`,children:[B("ui.schedules.scheduled_task_dialog.prompt"),u.jsx("span",{className:"text-danger",children:"*"})]}),u.jsx(Vi,{id:`${J}-prompt`,name:"prompt",value:c,onChange:j=>d(j.target.value),rows:3,disabled:N,placeholder:B("ui.schedules.scheduled_task_dialog.send_me_an_email_with_a_detailed_world_news_breakdown")}),u.jsx("p",{className:"text-body-sm text-ink-muted",children:B("ui.schedules.scheduled_task_dialog.this_is_the_message_the_conversation_receives_when_it_wakes_up")}),G.prompt&&u.jsx("p",{className:"text-meta text-danger",children:G.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:B("ui.schedules.scheduled_task_dialog.run_in")}),u.jsx(bt,{children:B("ui.schedules.scheduled_task_dialog.run_in")}),u.jsx("div",{className:"flex w-fit gap-0.5 rounded-md bg-sunken p-0.5",children:[["new",B("ui.schedules.scheduled_task_dialog.a_new_conversation")],["existing",B("ui.schedules.scheduled_task_dialog.an_existing_conversation")]].map(([j,U])=>u.jsx(yt,{variant:"ghost",size:"sm","aria-pressed":s===j,onClick:()=>a(j),disabled:N,className:Le(s===j&&"bg-surface text-ink hover:bg-surface"),children:U},j))})]}),!r&&s==="existing"&&u.jsxs("div",{className:"flex flex-col gap-1.5",children:[u.jsx(bt,{htmlFor:`${J}-conversation`,children:B("ui.schedules.scheduled_task_dialog.conversation")}),u.jsxs(vn,{value:i??"",onValueChange:l,disabled:N,children:[u.jsx(xn,{id:`${J}-conversation`,children:u.jsx(wn,{placeholder:B("ui.schedules.scheduled_task_dialog.pick_a_conversation")})}),u.jsx(Cn,{children:ne.map(j=>u.jsxs(et,{value:j.id,textValue:j.name||j.id.slice(0,8),children:[j.name||B("ui.schedules.scheduled_task_dialog.untitled_slice_0_8",{slice_0__8:String(j.id.slice(0,8))}),u.jsx("span",{className:"pl-2 text-ink-dim",children:pd(Math.max(0,n-j.mtime*1e3))})]},j.id))})]}),A.isLoading&&u.jsx("p",{className:"text-meta text-ink-dim",children:B("ui.schedules.scheduled_task_dialog.loading_conversations")}),A.error&&u.jsxs("p",{className:"text-meta text-danger",children:[B("ui.schedules.scheduled_task_dialog.could_not_read_your_conversations"),A.error.message]}),!A.isLoading&&!A.error&&ne.length===0&&u.jsxs("p",{className:"text-meta text-ink-dim",children:[B("ui.schedules.scheduled_task_dialog.no_conversations_yet_start_one_in_chat_or_choose")," ",u.jsx("em",{children:B("ui.schedules.scheduled_task_dialog.a_new_conversation")}),"."]})]}),!r&&s==="new"&&u.jsxs("p",{className:"text-body-sm text-ink-dim",children:[B("ui.schedules.scheduled_task_dialog.starts_in"),q,B("ui.schedules.scheduled_task_dialog.with_your_default_model")]}),!r&&s==="existing"&&ae&&u.jsxs("p",{className:"text-body-sm text-ink-dim",children:[B("ui.schedules.scheduled_task_dialog.runs_in"),ae.name,B("ui.schedules.scheduled_task_dialog.as_a_turn_in_that_conversation")]}),!r&&G.conversation&&u.jsx("p",{className:"text-meta text-danger",children:G.conversation}),u.jsxs("div",{className:"flex flex-col gap-1.5",children:[u.jsx(bt,{htmlFor:`${J}-first-run`,children:B("ui.schedules.scheduled_task_dialog.first_run")}),u.jsxs(vn,{value:m,onValueChange:j=>y(j),disabled:N,children:[u.jsx(xn,{id:`${J}-first-run`,children:u.jsx(wn,{})}),u.jsxs(Cn,{children:[r&&u.jsx(et,{value:"keep",children:fd(o.wake,n,o.parked)}),u.jsx(et,{value:"in-an-hour",children:B("ui.schedules.scheduled_task_dialog.in_an_hour")}),u.jsx(et,{value:"in-30-minutes",children:B("ui.schedules.scheduled_task_dialog.in_30_minutes")}),z&&u.jsx(et,{value:"tonight",children:B("ui.schedules.scheduled_task_dialog.tonight_at_8_00_pm")}),u.jsx(et,{value:"tomorrow",children:B("ui.schedules.scheduled_task_dialog.tomorrow_at_9_00_am")}),u.jsx(et,{value:"pick",children:B("ui.schedules.scheduled_task_dialog.pick_a_time")})]})]}),m==="pick"&&u.jsx(tr,{label:B("ui.schedules.scheduled_task_dialog.first_run_at"),value:g,onChange:h,disabled:N})]}),u.jsxs("div",{className:"flex flex-col gap-1.5",children:[u.jsx(bt,{htmlFor:`${J}-repeat`,children:B("ui.schedules.scheduled_task_dialog.repeat")}),u.jsxs(vn,{value:v,onValueChange:j=>f(j),disabled:N,children:[u.jsx(xn,{id:`${J}-repeat`,children:u.jsx(wn,{})}),u.jsxs(Cn,{children:[r&&u.jsx(et,{value:"keep",children:md(o.wake)}),u.jsx(et,{value:"never",children:B("ui.schedules.scheduled_task_dialog.don_t_repeat")}),u.jsx(et,{value:"every",children:B("ui.schedules.scheduled_task_dialog.every")})]})]}),v==="every"&&u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Wo,{type:"number",min:1,step:1,"aria-label":B("ui.schedules.scheduled_task_dialog.repeat_interval"),className:"w-24",value:b,onChange:j=>C(j.target.value),disabled:N}),u.jsxs(vn,{value:w,onValueChange:j=>x(j),disabled:N,children:[u.jsx(xn,{"aria-label":B("ui.schedules.scheduled_task_dialog.repeat_unit"),className:"w-36",children:u.jsx(wn,{})}),u.jsx(Cn,{children:eP.map(j=>u.jsx(et,{value:j,children:tP[j]},j))})]})]}),G.repeatInterval&&u.jsx("p",{className:"text-meta text-danger",children:G.repeatInterval}),G.repeat&&u.jsx("p",{className:"text-meta text-danger",children:G.repeat})]}),(v==="every"||S!=="never")&&u.jsxs("div",{className:"flex flex-col gap-1.5",children:[u.jsx(bt,{htmlFor:`${J}-ends`,children:B("ui.schedules.scheduled_task_dialog.ends")}),u.jsxs(vn,{value:S,onValueChange:j=>P(j),disabled:N,children:[u.jsx(xn,{id:`${J}-ends`,children:u.jsx(wn,{})}),u.jsxs(Cn,{children:[r&&u.jsx(et,{value:"keep",children:hd(o.wake,n)}),u.jsx(et,{value:"never",children:B("ui.schedules.scheduled_task_dialog.never")}),u.jsx(et,{value:"date",children:B("ui.schedules.scheduled_task_dialog.on_a_date")}),u.jsx(et,{value:"runs",children:B("ui.schedules.scheduled_task_dialog.after_n_runs")})]})]}),S==="date"&&u.jsx(tr,{label:B("ui.schedules.scheduled_task_dialog.last_run"),value:k,onChange:R,disabled:N}),S==="runs"&&u.jsx(Wo,{type:"number",min:1,"aria-label":B("ui.schedules.scheduled_task_dialog.number_of_runs"),className:"w-24",value:_,onChange:j=>O(j.target.value===""?"":Number.parseInt(j.target.value,10)),disabled:N}),G.ends&&u.jsx("p",{className:"text-meta text-danger",children:G.ends})]}),u.jsx("p",{className:"text-body-sm text-ink-dim",children:B("ui.schedules.scheduled_task_dialog.if_a_tool_needs_approval_the_wake_parks_and_waits_for_you_rather")}),r&&u.jsx("p",{className:"text-body-sm text-ink-dim",children:B("ui.schedules.scheduled_task_dialog.a_new_first_run_moves_the_next_wake_to_that_time_and_a_new_repeat")}),!r&&u.jsx("p",{className:"text-body-sm text-ink-dim",children:B("ui.schedules.scheduled_task_dialog.it_is_usually_quicker_to_ask_an_agent_in_chat_send_me_the_latest")})]})]})},Xr=["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"],Di=({wake:e,managedName:t,onCancel:n,onEdit:o})=>(fn(),u.jsx(Nu,{row:e,trailingClause:e.ranLabel||void 0,note:t===null?void 0:u.jsx($u,{name:t}),action:u.jsxs(u.Fragment,{children:[t!==null&&u.jsx(Au,{name:t}),u.jsx(Kt,{content:B("ui.schedules.wake_conversation_row.edit_wake"),children:u.jsx(yt,{variant:"ghost",size:"icon-sm","aria-label":B("ui.schedules.wake_conversation_row.edit_wake"),onClick:o,className:Le(...Xr,"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(Ai,{})})}),t===null&&u.jsx(Kt,{content:B("ui.schedules.wake_conversation_row.cancel_wake"),children:u.jsx(yt,{variant:"ghost",size:"icon-sm","aria-label":B("ui.schedules.wake_conversation_row.cancel_wake"),onClick:n,className:Le(...Xr,"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(rd,{})})})]})})),rP=({row:e,onOpen:t,onCancel:n,onEdit:o,identity:r})=>{fn();const[s,a]=p.useState(!1),i=e.wakes.slice(e.visibleWakes.length),l={sessionId:e.sessionId,wakeIds:e.wakes.map(d=>d.id),aida:r},c=d=>ju(d.id,l)==="managed"?r.name:null;return u.jsx("li",{"data-scheduled-task-row":e.sessionId,className:Le("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:Le("flex items-start gap-3"),children:[u.jsxs("div",{className:Le("flex min-w-0 flex-1 flex-col gap-1"),children:[u.jsxs("div",{className:Le("flex min-w-0 items-baseline justify-between gap-2"),children:[u.jsx("span",{className:Le("min-w-0 truncate text-body-sm text-ink"),title:e.cwd,children:e.name}),e.meta&&u.jsx("span",{className:Le("shrink-0 text-ink-muted text-meta"),children:e.meta})]}),u.jsx("ul",{className:Le("flex flex-col gap-1 pl-4"),children:e.visibleWakes.map(d=>u.jsx(Di,{wake:d,managedName:c(d),onCancel:()=>n(e,d),onEdit:()=>o(e,d)},d.id))}),i.length>0&&u.jsx(bd,{summary:s?B("ui.schedules.wake_conversation_row.show_fewer"):yd(i.length),onOpenChange:a,className:Le("pl-4"),triggerClassName:Le("text-ink-muted hover:text-ink"),children:u.jsx("ul",{className:Le("flex flex-col gap-1"),children:i.map(d=>u.jsx(Di,{wake:d,managedName:c(d),onCancel:()=>n(e,d),onEdit:()=>o(e,d)},d.id))})})]}),u.jsx("div",{className:Le("flex shrink-0 items-center gap-0.5",...Xr),children:u.jsx(Kt,{content:B("ui.schedules.wake_conversation_row.open_conversation"),children:u.jsx(yt,{variant:"ghost",size:"icon-sm","aria-label":B("ui.schedules.wake_conversation_row.open_conversation"),onClick:()=>t(e.sessionId),children:u.jsx(Fu,{})})})})]})})},yP=({nowMs:e=Date.now()})=>{fn();const t=Ku(),[n,o]=p.useState(null),[r,s]=p.useState(null),[a,i]=p.useState(null),l=$i(),c=ns(),d=Gu(),m=Qu(d.data,"aida",1),y=Lu(m),g=Vu(),h={capability:m,statusResolved:y.isSuccess,sessionId:y.data?.session_id??null,name:g},v=()=>{l.refetch(),qf(c)},f=Kf(),b=Bu(),C=Gf(),w=Qf(),x=f.data?.result?.schedules??[],S=l.data?.supervisor,P=S?.supported===!0&&S.running===!0&&S.verifiable!==!1,k=vd(l.data?.entries,e,{dueInstants:P}),R=I=>{Li.getState().openSession(I).then(T=>{T&&t(`/chat/${I}`)})},_=r!==null&&zu(r.row.sessionId,h),O=async()=>{if(!r)return;const{row:I,wake:T}=r;try{const L=I.sessionId;await b.mutateAsync({sessionId:L,wakeId:T.id}),Mn(B("ui.schedules.schedules_page.wake_cancelled"),{action:{get label(){return B("ui.schedules.schedules_page.open_conversation")},onClick:()=>R(L)}}),s(null)}catch(L){Pn(L instanceof Error?B("ui.schedules.schedules_page.could_not_cancel_the_wake_message",{message:String(L.message)}):B("ui.schedules.schedules_page.could_not_cancel_the_wake"))}},$=async I=>{if(a)try{await C.mutateAsync({scheduleId:a.id,scheduleData:I}),Mn(B("ui.schedules.schedules_page.schedule_updated")),i(null)}catch(T){Pn(T instanceof Error?B("ui.schedules.schedules_page.could_not_save_the_schedule_message",{message:String(T.message)}):B("ui.schedules.schedules_page.could_not_save_the_schedule"))}},M=async I=>{const T=x.find(L=>L.id===I);try{await w.mutateAsync({scheduleId:I,agentId:T?.agent_id}),Mn(B("ui.schedules.schedules_page.schedule_removed"))}catch(L){Pn(L instanceof Error?B("ui.schedules.schedules_page.could_not_remove_the_schedule_message",{message:String(L.message)}):B("ui.schedules.schedules_page.could_not_remove_the_schedule"))}},A=async I=>{try{await C.mutateAsync({scheduleId:I.id,scheduleData:{is_active:!I.is_active}}),Mn(I.is_active?B("ui.schedules.legacy.deactivated"):B("ui.schedules.legacy.activated"))}catch(T){Pn(T instanceof Error?B("ui.schedules.schedules_page.could_not_toggle_the_schedule_message",{message:String(T.message)}):B("ui.schedules.schedules_page.could_not_toggle_the_schedule"))}},F=xd({loading:l.isLoading,error:l.error!==null,readError:l.data?.read_error===!0,wakeRows:k.length,legacyLoading:f.isLoading,legacyRows:x.length});return u.jsxs("div",{className:"flex h-full flex-col gap-8 p-6",children:[u.jsx(Xu,{title:B("ui.schedules.schedules_page.schedules"),icon:Ni,subtitle:B("ui.schedules.schedules_page.work_your_conversations_do_on_a_schedule_repeating_or_once"),children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(yt,{variant:"secondary",size:"icon","aria-label":B("ui.schedules.schedules_page.refresh_scheduled_tasks"),title:B("ui.schedules.schedules_page.refresh_scheduled_tasks"),disabled:l.isFetching,onClick:v,"data-tour-tag":"refresh-schedules-button",children:u.jsx(Hu,{})}),u.jsxs(yt,{variant:"secondary",size:"md",onClick:()=>o({mode:"create"}),"data-tour-tag":"create-schedule-button",children:[u.jsx(_r,{}),B("ui.schedules.schedules_page.new_scheduled_task")]})]})}),u.jsxs("div",{"data-glass-region":"panel",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(os,{label:B("ui.schedules.schedules_page.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:B("ui.schedules.schedules_page.could_not_load_scheduled_tasks")}),u.jsx("p",{className:"text-body-sm text-ink-muted",children:l.error.message}),(k.length>0||x.length>0)&&u.jsx("p",{className:"text-body-sm text-ink-muted",children:B("ui.schedules.scheduled_task_model.the_list_below_is_the_last_one_that_loaded_so_it_may_be_out_of_da")}),u.jsx(yt,{variant:"secondary",size:"sm",onClick:v,children:B("ui.schedules.schedules_page.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(Gs,{variant:"warning",children:B("ui.schedules.schedules_page.could_not_read_this_machine_s_scheduled_tasks_so_the_list_below_m")}),u.jsx(yt,{variant:"secondary",size:"sm",onClick:v,children:B("ui.schedules.schedules_page.try_again")})]}),!l.isLoading&&S&&!P&&u.jsxs("div",{className:"border-hairline border-b p-4",children:[u.jsx(Gs,{variant:"warning",children:wd(S)}),S.detail&&u.jsx("p",{className:"mt-2 font-mono text-meta text-ink-dim",children:S.detail})]}),F&&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:B("ui.schedules.schedules_page.no_scheduled_tasks_yet")}),u.jsx("p",{className:"max-w-100 text-body-sm text-ink-muted",children:B("ui.schedules.schedules_page.ask_an_agent_in_chat_to_do_something_on_a_regular_basis_send_me_t")}),u.jsxs(yt,{variant:"secondary",size:"sm",onClick:()=>o({mode:"create"}),className:"mt-2",children:[u.jsx(_r,{}),B("ui.schedules.schedules_page.new_scheduled_task")]})]}),k.length>0&&u.jsx("ul",{className:"flex flex-col",children:k.map(I=>u.jsx(rP,{row:I,onOpen:R,identity:h,onCancel:(T,L)=>s({row:T,wake:L}),onEdit:(T,L)=>o({mode:"edit",sessionId:T.sessionId,wakeId:L.id,message:L.message,conversationName:T.name,position:L.position,count:T.wakes.length,wake:L.source,parked:T.parked})},I.sessionId))}),(x.length>0||f.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:B("ui.schedules.schedules_page.legacy_schedules")}),u.jsx("p",{className:"max-w-150 text-body-sm text-ink-muted",children:B("ui.schedules.schedules_page.these_run_on_the_older_agent_schedule_engine_new_scheduled_tasks")}),f.error&&u.jsxs("p",{className:"text-body-sm text-danger",children:[B("ui.schedules.schedules_page.could_not_load_legacy_schedules"),f.error.message]})]}),x.map(I=>u.jsx(XS,{schedule:I,nowMs:e,onEdit:()=>i(I),onDelete:M,onToggleActive:A},I.id))]}),!l.isLoading&&l.data?.truncated&&u.jsx("p",{className:"border-hairline border-t px-4 py-3 text-body-sm text-ink-dim",children:B("ui.schedules.count.list_truncated",{shown:l.data.entries.length,total:l.data.total})}),(k.length>0||x.length>0)&&u.jsxs("p",{className:"border-hairline border-t px-4 py-3 text-body-sm text-ink-dim",children:[P?B("ui.schedules.schedules_page.wakes_fire_whether_or_not_this_window_is_open"):"",B("ui.schedules.scheduled_task_model.a_terminal_stop_parks_a_conversation_s_wakes_until_its_next_turn")]})]}),u.jsx(oP,{open:n!==null,onClose:()=>o(null),nowMs:e,edit:n?.mode==="edit"?n:null}),u.jsx(KS,{open:a!==null,onClose:()=>i(null),onSubmit:I=>$(I),initialData:a}),u.jsx(Wu,{open:r!==null,title:qu(_,h.name),message:r?Yu({named:_,name:h.name,head:Lo(r.wake.message)}):"",confirmText:Uu(_),cancelText:B("ui.schedules.schedules_page.keep"),isDangerous:!0,onConfirm:()=>void O(),onCancel:()=>s(null)})]})};export{yP as SchedulesPage};
|