@trii/components 2.0.74 → 2.0.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/index.js
CHANGED
|
@@ -17,5 +17,5 @@ React keys must be passed directly to JSX without using spread:
|
|
|
17
17
|
display: 'flex',
|
|
18
18
|
flexDirection: 'column',
|
|
19
19
|
gap: 1,
|
|
20
|
-
`,Uc=Z(v)(()=>({display:"flex",justifyContent:"space-between",alignItems:"baseline",userSelect:"none"})),Mc=({notificationsField:e,disabled:a})=>{const n=_e(),{addNotification:r,deleteNotification:i,handleReminderChange:s,handleTimeFieldChange:o,handleTimePeriodChange:l}=e.action,d=e.notifications.length>0;return t.jsxs($c,{children:[t.jsxs(Uc,{children:[t.jsx(V,{variant:"subtitle2",sx:{userSelect:"none"},children:n("calendarView.reminders.title")}),!a&&t.jsx(Re,{disabled:a,startIcon:t.jsx(Pn,{}),size:"small",variant:"outlined",onClick:r,color:"secondary",children:n("calendarView.reminders.addReminder")})]}),t.jsx(v,{sx:{pt:1,px:.5},children:d?e.notifications.map(p=>t.jsx(Fc,{data:p,deleteHandler:i,sendToContactHandler:s,timePeriodHandler:l,timeValueHandler:o},p.id)):a?t.jsx(V,{variant:"body1",sx:{py:.5},children:"-"}):null})]})},Dr=({descriptionField:e,disabled:a})=>{const n=_e(),{value:r,type:i,...s}=e.attributes,o=r||"";return a?t.jsx(Je,{title:n("global.description"),children:t.jsx(V,{variant:"body2",sx:{py:.5,whiteSpace:"pre-wrap",color:l=>l.palette.text.secondary,fontSize:"0.9rem"},children:o||"-"})}):t.jsx(Je,{title:n("global.description"),children:t.jsx(je,{...s,value:o,disabled:a,size:"small",multiline:!0,maxRows:5,fullWidth:!0,variant:"outlined"})})},Pc=({onPlaceSelected:e})=>{const a=he(null),n=he(null),r=he(null),i=he(null),[s,o]=x([]),[l,d]=x(!1),p=_e();H(()=>{if(!a.current)return;const f=()=>{if(!window.google?.maps?.places)return console.warn("Google Places API no est\xE1 disponible a\xFAn"),!1;n.current=new window.google.maps.places.AutocompleteService;const c=document.createElement("div");return r.current=new window.google.maps.places.PlacesService(c),i.current=new window.google.maps.places.AutocompleteSessionToken,!0};if(!f()){const c=setTimeout(()=>{f()},500);return()=>clearTimeout(c)}},[]);const h=f=>{const c=f.target.value;if(!c||c.length<3||!n.current){o([]),d(!1);return}n.current.getPlacePredictions({input:c,types:["geocode"],sessionToken:i.current||void 0},(b,j)=>{j===window.google.maps.places.PlacesServiceStatus.OK&&b?(o(b),d(!0)):(o([]),d(!1))})},m=(f,c)=>{r.current&&r.current.getDetails({placeId:f,fields:["geometry","formatted_address"],sessionToken:i.current||void 0},(b,j)=>{if(j===window.google.maps.places.PlacesServiceStatus.OK&&b?.geometry?.location){const y=b.geometry.location.lat(),I=b.geometry.location.lng(),C=b.formatted_address??c;e({lat:y,lng:I},C),a.current&&(a.current.value=C),d(!1),o([]),i.current=new window.google.maps.places.AutocompleteSessionToken}})};return H(()=>{const f=c=>{a.current&&!a.current.contains(c.target)&&d(!1)};return document.addEventListener("mousedown",f),()=>document.removeEventListener("mousedown",f)},[]),t.jsxs("div",{style:{position:"absolute",width:"100%",maxWidth:300,margin:"0 auto",zIndex:13e3,top:"10px",left:"10px"},children:[t.jsx("input",{ref:a,placeholder:p("global.searchLocation","Buscar en Google Maps"),onChange:h,onFocus:()=>s.length>0&&d(!0),style:{width:"100%",padding:"12px 16px 5px",borderRadius:"24px",border:"1px solid #ccc",backgroundColor:"white",fontSize:"15px",boxShadow:"0 1px 4px rgba(0,0,0,0.3)",outline:"none",position:"relative",zIndex:13e3}}),l&&s.length>0&&t.jsx("div",{style:{position:"absolute",top:"100%",left:0,right:0,backgroundColor:"white",borderRadius:"8px",boxShadow:"0 2px 8px rgba(0,0,0,0.15)",marginTop:"4px",maxHeight:"300px",overflowY:"auto",zIndex:13001},children:s.map(f=>t.jsxs("div",{onClick:()=>m(f.place_id,f.description),style:{padding:"12px 16px",cursor:"pointer",borderBottom:"1px solid #f0f0f0",fontSize:"14px",transition:"background-color 0.2s"},onMouseEnter:c=>{c.currentTarget.style.backgroundColor="#f5f5f5"},onMouseLeave:c=>{c.currentTarget.style.backgroundColor="white"},children:[t.jsx("div",{style:{fontWeight:500},children:f.structured_formatting.main_text}),t.jsx("div",{style:{fontSize:"12px",color:"#666",marginTop:"2px"},children:f.structured_formatting.secondary_text})]},f.place_id))})]})},Ar="AIzaSyAQ1bUt3y6UoAhbi5-HAwYwaFx71pAiaKU",Fr=["places"],yn={apiKey:Ar,libraries:Fr,loading:"async"},Ua=()=>!!(window.google?.maps?.Map&&window.google?.maps?.Marker&&window.google?.maps?.Geocoder&&window.google?.maps?.places),$r=(e=Ar,a=Fr)=>{if(Ua())return Promise.resolve();const n=()=>{document.querySelectorAll('script[src*="maps.googleapis.com"]').forEach(r=>{r.parentNode?.removeChild(r)})};return document.getElementById("google-maps-script")?new Promise((r,i)=>{let s=0;const o=100,l=setInterval(()=>{s++,Ua()?(clearInterval(l),r()):s>=o&&(clearInterval(l),n(),$r(e,a).then(r).catch(i))},100)}):new Promise((r,i)=>{try{n();const s="initGoogleMaps";window[s]=()=>{Ua()?r():setTimeout(()=>{Ua()||console.warn("Google Maps API se carg\xF3 pero algunos componentes no est\xE1n disponibles"),r()},500)};const o=document.createElement("script");o.id="google-maps-script",o.type="text/javascript";const l=Array.isArray(a)?a.join(","):a;o.src=`https://maps.googleapis.com/maps/api/js?key=${e}&libraries=${l}&callback=${s}&loading=async`,o.async=!0,o.defer=!0,o.onerror=()=>{delete window[s],i(new Error("Error al cargar Google Maps API"))},document.head.appendChild(o)}catch(s){i(s)}})},ta=(e,a,n=18,r=400,i=400,s="red",o=yn.apiKey)=>`https://maps.googleapis.com/maps/api/staticmap?center=${e},${a}&zoom=${n}&size=${r}x${i}&markers=color:${s}%7Clabel:A%7C${e},${a}&key=${o}`,Nc=({onLocationChange:e,initialLocation:a})=>{const n=he(null),r=he(null),i=he(null),s=he(null),[o,l]=x(!0),[d,p]=x(!1),[h,m]=x(a||null),f=18,c=se(C=>{m(C),e(C)},[e]);H(()=>{let C=!0;(async()=>{try{if(await $r(yn.apiKey,yn.libraries),!window.google?.maps?.Map||!window.google?.maps?.Geocoder){console.error("Google Maps APIs no est\xE1n completamente disponibles"),l(!1);return}window.google?.maps?.Geocoder&&(s.current=new window.google.maps.Geocoder),l(!1)}catch(S){console.error("Error al cargar Google Maps:",S),l(!1)}})(),a||navigator.geolocation.getCurrentPosition(S=>{const w=S.coords.latitude,W=S.coords.longitude,E=w.toString(),$=W.toString(),A=ta(w,W,f);c({lat:E,lng:$,title:"",description:"",url:A})},S=>{console.error("Error getting location:",S);const w=-34.6037,W=-58.3816;c({lat:w.toString(),lng:W.toString(),title:"",description:"",url:ta(w,W,f)})})},[a,c,f]),H(()=>{if(o||r.current)return;const C=setTimeout(()=>{r.current||b()},50);return()=>clearTimeout(C)},[o]),H(()=>{d&&h&&y()},[d,h]),H(()=>()=>{i.current&&(i.current.setMap(null),i.current=null)},[]);const b=()=>{if(!n.current){console.warn("Contenedor del mapa no disponible");return}if(!window.google?.maps){console.warn("Google Maps API no disponible a\xFAn");return}try{const C={zoom:f,disableDefaultUI:!1,zoomControl:!0,mapTypeControl:!1,streetViewControl:!1,fullscreenControl:!1};r.current=new window.google.maps.Map(n.current,C),r.current.addListener("click",S=>{j(S)}),p(!0)}catch(C){console.error("Error inicializando mapa:",C)}},j=C=>{if(!C.latLng||!s.current)return;const S={lat:C.latLng.lat(),lng:C.latLng.lng()};i.current?i.current.setPosition(S):r.current&&(i.current=new window.google.maps.Marker({position:S,map:r.current})),s.current.geocode({location:S},(w,W)=>{if(W==="OK"&&w&&w[0]){const E=w[0].formatted_address,$=ta(S.lat,S.lng,f);c({lat:S.lat.toString(),lng:S.lng.toString(),title:E||"",description:"",url:$})}else{const E=ta(S.lat,S.lng,f);c({lat:S.lat.toString(),lng:S.lng.toString(),title:`${S.lat.toFixed(6)}, ${S.lng.toFixed(6)}`,description:"",url:E})}})},y=()=>{if(!(!r.current||!h))try{const C={lat:parseFloat(h.lat),lng:parseFloat(h.lng)};r.current.setCenter(C),i.current?i.current.setPosition(C):i.current=new window.google.maps.Marker({position:C,map:r.current})}catch(C){console.error("Error actualizando mapa:",C)}},I=(C,S)=>{const w=ta(C.lat,C.lng,f);c({lat:C.lat.toString(),lng:C.lng.toString(),title:S||"",description:"",url:w})};return o?t.jsx(v,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"},children:t.jsx(Ze,{})}):t.jsxs(v,{sx:{position:"relative",height:"calc(100vh - 305px)"},children:[t.jsx(Pc,{onPlaceSelected:I}),t.jsx("div",{style:{height:"100%"},ref:n})]})},Rc=({open:e,onClose:a,onSelectLocation:n,initialAddress:r})=>{const i=_e(),[s,o]=x(null),l=he(null);H(()=>{e||o(null)},[e]),H(()=>{l.current&&s&&(l.current.scrollTop=l.current.scrollHeight/4)},[s]);const d=se(h=>{o(h)},[]),p=se(()=>{s&&(n(s.title||`${s.lat}, ${s.lng}`,s.lat,s.lng),a())},[s,n,a]);return t.jsxs(ha,{open:e,onClose:a,maxWidth:"md",fullWidth:!0,disableEnforceFocus:!0,disableAutoFocus:!0,PaperProps:{sx:{maxHeight:"80vh",height:"80vh"}},sx:{"& .MuiDialog-paper":{backgroundColor:h=>h.palette.background.panel}},children:[t.jsxs(v,{sx:{position:"relative",display:"flex",alignItems:"center",p:2},children:[t.jsx(V,{variant:"body1",sx:{flex:1},children:i("global.selectLocation","Seleccionar ubicaci\xF3n")}),t.jsx(xe,{"aria-label":"close",onClick:a,size:"small",children:t.jsx(Fn,{fontSize:"small"})})]}),t.jsx(ba,{sx:{p:0,display:"flex",flexDirection:"column",height:"100%"},children:t.jsxs(v,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",overflow:"hidden",width:"100%",height:"100%",position:"relative"},children:[t.jsx(v,{ref:l,sx:{width:"100%",flex:1,overflow:"auto",zIndex:1},children:t.jsx(Nc,{onLocationChange:d,initialLocation:void 0})}),t.jsx(Sn,{sx:{width:"100%",padding:0}}),t.jsxs(v,{sx:{width:"100%",display:"flex",justifyContent:"flex-end",gap:".5rem",p:2},children:[t.jsx(Re,{variant:"outlined",color:"error",size:"small",sx:{borderRadius:"0.5rem"},onClick:a,children:i("global.cancel","Cancelar")}),t.jsx(Re,{variant:"outlined",color:"secondary",size:"small",sx:{borderRadius:"0.5rem"},onClick:p,disabled:!s,children:i("global.selectLocation","Seleccionar ubicaci\xF3n")})]})]})})]})},Oc=({locationField:e,disabled:a})=>{const n=_e(),[r,i]=x(!1),{value:s,type:o,...l}=e.attributes,d=s||"",p=()=>{a||i(!0)},h=()=>{i(!1)},m=f=>{e.actions.changeValue(f)};return a?t.jsx(v,{children:t.jsx(Je,{title:n("global.location","Ubicaci\xF3n"),children:t.jsxs(v,{sx:{display:"flex",alignItems:"center",gap:1,py:.5},children:[d&&t.jsx(Rn,{sx:{opacity:.5},fontSize:"small"}),t.jsx(V,{variant:"body1",sx:{color:f=>f.palette.text.secondary,fontSize:"0.9rem"},children:d||"-"})]})})}):t.jsxs(v,{children:[t.jsx(Je,{title:n("global.location","Ubicaci\xF3n"),children:t.jsx(je,{...l,value:d,disabled:a,size:"small",fullWidth:!0,variant:"outlined",placeholder:n("global.addLocation","Agregar ubicaci\xF3n"),onClick:p,InputProps:{startAdornment:t.jsx(Rn,{sx:{mr:1,opacity:.5},fontSize:"small"}),readOnly:!0},sx:{cursor:a?"default":"pointer","& .MuiInputBase-input":{cursor:a?"default":"pointer"}}})}),t.jsx(Rc,{open:r,onClose:h,onSelectLocation:m,initialAddress:d})]})},Bc=({handleScroll:e,contactList:a,handleSelectContact:n,selectedContactIds:r,search:i})=>{const s=_e(),o=Tn();return t.jsx(os,{sx:{width:"100%",height:"100%",overflow:"auto",border:`1px solid ${o.palette.divider}`,borderTop:"none",backgroundColor:o.palette.background.panel,backgroundImage:"linear-gradient(rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12))"},onScroll:e,children:i&&a?.map(l=>t.jsxs(ls,{sx:{width:"100%"},onClick:()=>n(l),selected:r.includes(l.id),children:[t.jsx(ma,{children:t.jsx(Cs,{sx:{color:d=>d.palette.text.disabled}})}),t.jsx(ga,{primary:s(l.name),secondary:l?.phone})]},l.id))})},zc={format:"IContact",total:0,lastPage:1,perPage:10,order:"ASC",orderColumn:"Id"};function Lc(e){const a=he(null),n=he(null),[r,i]=x([]),[s,o]=x(!1),[l,d]=x(!1),[p,h]=x(!1),[m,f]=x(!1),[c,b]=x(1),[j,y]=x(!1),I=se(()=>{n.current?.abort(),n.current=null,a.current&&(clearTimeout(a.current),a.current=null),o(!1),y(!1),b(1),f(!1),i([])},[]),C=E=>E.filter($=>!!$?.id),S=se(async({query:E,page:$})=>{if(!e)return;n.current?.abort();const A=new AbortController;n.current=A,d(!0);try{const T={...zc,currentPage:$,filter:[{value:E,column:"name",condition:""}]},z=await Cc({baseUrl:e.baseUrl,spaceId:e.spaceId,pagination:T,signal:A.signal});if(A.signal.aborted)return;const G=C(z?.contactos??[]);o(!0);const _=z?.paginacion?.total??0;i(q=>{const U=$===1?G:(()=>{const ne=new Map;for(const J of q)ne.set(J.id,J);for(const J of G)ne.set(J.id,J);return Array.from(ne.values())})();return _&&U.length>=_&&y(!0),U})}finally{d(!1),h(!1),f(!1)}},[e]),w=se(E=>{I(),E&&(a.current&&(clearTimeout(a.current),a.current=null),h(!0),a.current=setTimeout(()=>{S({query:E,page:1})},800))},[S,I]),W=se((E,$)=>{const A=E.target;if(!(A.scrollHeight-A.scrollTop-A.clientHeight<1)||j||l||!$)return;const T=c+1;f(!0),b(T),S({query:$,page:T})},[j,l,c,S]);return{contactList:r,hasSearched:s,isLoading:l,isLoadingTimer:p,isNextPage:m,handleQueryChanged:w,handleScroll:W,resetSearchState:I}}const Ur=({linkContactsHandler:e,disabled:a=!1})=>{const n=_e(),r=vr(),i=he(null),[s,o]=x(null),{action:{handleSearchChange:l,handleSelectContact:d,handleRemoveContact:p},state:{search:h,selectedContacts:m}}=e,{contactList:f,hasSearched:c,isLoading:b,isLoadingTimer:j,handleQueryChanged:y,handleScroll:I,resetSearchState:C}=Lc(r),S=h||"",w=!!s&&S.length>0&&!a,W=m.map(T=>T.id);H(()=>{S?y(S):C()},[S,y,C]);const E=T=>{l(T),T&&!s?o(i.current):T||o(null)},$=T=>{d(T),o(null),C()},A=()=>{o(null)};return a?t.jsx(Je,{title:n("global.linkContacts"),children:m.length>0?t.jsx(v,{sx:{display:"flex",flexWrap:"wrap",gap:.5,pt:.5},children:m.map(T=>t.jsx(jt,{icon:t.jsx(Za,{fontSize:"small"}),label:T.name,size:"small",variant:"outlined"},T.id))}):t.jsx(V,{variant:"body1",sx:{py:.5},children:"-"})}):t.jsx(wn,{onClickAway:A,children:t.jsxs(v,{children:[t.jsxs(Je,{title:n("global.linkContacts"),children:[t.jsx(je,{ref:i,fullWidth:!0,size:"small",placeholder:n("global.searchContacts"),value:S,onChange:T=>E(T.target.value),onFocus:()=>{S&&o(i.current)},InputProps:{startAdornment:t.jsx(Za,{sx:{mr:1,opacity:.5},fontSize:"small"}),endAdornment:b||j?t.jsx(Ze,{size:18,sx:{mr:1}}):null}}),m.length>0&&t.jsx(v,{sx:{display:"flex",flexWrap:"wrap",gap:.5,mt:1},children:m.map(T=>t.jsx(jt,{icon:t.jsx(Za,{fontSize:"small"}),label:T.name,size:"small",onDelete:()=>p(T.id)},T.id))})]}),t.jsx(jn,{open:w,anchorEl:s,placement:"bottom-start",style:{width:s?.offsetWidth||"auto",zIndex:1300},children:t.jsxs(ds,{elevation:8,sx:{mt:.5,maxHeight:300,overflow:"hidden"},children:[c&&f.length>0&&t.jsx(Bc,{handleScroll:T=>I(T,S),contactList:f,handleSelectContact:$,selectedContactIds:W,search:S}),c&&f.length===0&&t.jsx(v,{sx:{p:2,textAlign:"center",color:"text.secondary"},children:t.jsx(V,{variant:"body2",children:n("global.noResults","No se encontraron resultados")})})]})})]})})},Wc=({isFinalized:e})=>{const{eventDialog:{handleClose:a},handleCreateEvent:n,dialogMode:r,handleStartEditingEvent:i,handleSaveUpdatedEvent:s,handleEndEvent:o,dialogType:l,handleCreateTask:d,handleSaveUpdatedTask:p,selectedTask:h,handleToggleTaskCompleted:m}=lt(pn),f=_e(),c=l==="event",b=!1,j=!1,y=!1,I=()=>{c?n():d()},C=(()=>{if(r==="view")return i;if(r==="edit")return c?()=>s?.():()=>p?.();if(r==="create")return I})(),S=f(r==="view"?c?"global.editEvent":"global.editTask":r==="edit"?c?"global.saveEvent":"global.saveTask":c?"global.createEvent":"global.createTask"),w=c?b:y,W=e,E=!c&&r==="view",$=h?.isCompleted||!1;return E?t.jsx(Bt,{children:t.jsx(ut,{startIcon:t.jsx(js,{}),size:"small",loading:y,disabled:y,onClick:m,variant:"contained",color:$?"inherit":"primary",children:$?f("global.markAsIncomplete","Marcar como incompleta"):f("global.markAsCompleted","Marcar como completada")})}):t.jsxs(Bt,{children:[t.jsx(Re,{variant:"outlined",size:"small",onClick:a,color:"secondary",children:f("global.cancel")}),c&&(r==="edit"||r==="view")&&t.jsx(ut,{startIcon:t.jsx(ws,{}),size:"small",disabled:e,loading:j,onClick:o,variant:"contained",children:f("global.finalizeEvent")}),t.jsx(ut,{startIcon:t.jsx(Ss,{}),size:"small",loading:w,disabled:W,onClick:C,variant:"contained",children:S})]})},Mr={textTransform:"none",borderRadius:2,minHeight:34,px:1.5,fontSize:13,fontWeight:500,lineHeight:1.1},_c=({value:e,onChange:a,labels:n})=>t.jsxs(v,{sx:{display:"flex",gap:1},children:[t.jsx(Re,{size:"small",onClick:()=>a("event"),variant:e==="event"?"contained":"text",disableElevation:!0,color:"primary",sx:{...Mr},children:n.event}),t.jsx(Re,{size:"small",onClick:()=>a("task"),variant:e==="task"?"contained":"text",disableElevation:!0,sx:{...Mr},color:"primary",children:n.task})]}),Vc="DD/MM/YYYY",Hc="HH:mm",Gc=({selectedDateTime:e,handleSelect:a,disabled:n,isError:r=!1,hideLabel:i=!1})=>{const s=_e(),o=d=>{if(!d)return;const p=d.hour(e.hour()).minute(e.minute());a(p)},l=d=>{if(!d)return;const p=e.hour(d.hour()).minute(d.minute());a(p)};return n?t.jsxs(Fa,{children:[!i&&t.jsx("span",{style:{userSelect:"none",marginBottom:10},children:s("global.date")}),t.jsxs(v,{children:[t.jsx(V,{variant:"body1",sx:{mb:1},children:e.format(Vc)}),t.jsx(V,{variant:"body1",children:e.format(Hc)})]})]}):t.jsxs(Fa,{children:[!i&&t.jsx("span",{style:{userSelect:"none",marginBottom:10},children:s("global.date")}),t.jsx(gn,{children:t.jsxs(Mn,{dateAdapter:Nn,children:[t.jsx(va,{disabled:n,value:e,onChange:o,slotProps:{textField:()=>({label:s("global.date"),size:"small",className:"smallInput"}),popper:{sx:{"& .MuiPaper-root":{backgroundColor:d=>d.palette.background.panel}}}},sx:{alignSelf:"baseline",flex:1},minDate:X()}),t.jsx(hn,{variant:"body1",children:"_"}),t.jsx(Xa,{disabled:n,value:e,onChange:l,ampm:!1,slotProps:{textField:()=>({label:s("global.time"),size:"small",className:"smallInput"}),popper:{sx:{"& .MuiPaper-root":{backgroundColor:d=>d.palette.background.panel}}}},sx:{alignSelf:"baseline",flex:1}})]})}),t.jsx(ct,{in:r,children:t.jsx(V,{color:"red",variant:"caption",children:s("conversations.sidebar.events.errorDate")})})]})},Pr=({disabled:e,calendars:a,userId:n,value:r,onChange:i})=>{const s=_e(),o=ae(()=>a??[],[a]),l=ae(()=>o.find(d=>d.id===r)??null,[o,r]);return e?t.jsx(Je,{title:s("global.calendar"),children:t.jsxs(v,{sx:{display:"flex",alignItems:"center",gap:1,py:.5},children:[l&&t.jsx(qs,{sx:{opacity:.5,color:d=>d.palette.text.secondary},fontSize:"small"}),t.jsx(V,{variant:"subtitle2",sx:{color:d=>d.palette.text.secondary,fontSize:"0.9rem"},children:l?.title||"-"})]})}):t.jsx(Je,{title:s("global.calendar"),children:t.jsx(Ga,{disabled:e,size:"small",fullWidth:!0,options:o,value:l,onChange:(d,p)=>i(p?.id??""),getOptionLabel:d=>d?.title??"",isOptionEqualToValue:(d,p)=>d.id===p.id,groupBy:n?d=>d.userId===n?s("calendarView.myCalendars"):s("calendarView.othersCalendars"):void 0,renderGroup:d=>t.jsxs("li",{children:[t.jsx(cs,{component:"div",sx:{lineHeight:"32px",fontSize:"0.75rem",fontWeight:600,color:"text.secondary",backgroundColor:p=>p.palette.background.panel},children:d.group}),t.jsx("ul",{style:{padding:0},children:d.children})]},d.key),slotProps:{popper:{sx:{zIndex:1400}},paper:{sx:{backgroundColor:d=>d.palette.background.panel}}},renderInput:d=>t.jsx(je,{...d,placeholder:s("global.selectCalendar")})})})},Yc=({checked:e,onChange:a,disabled:n})=>{const r=_e();return t.jsx(v,{sx:{display:"flex",alignItems:"center"},children:t.jsx(Dt,{control:t.jsx(kn,{checked:e,onChange:i=>a(i.target.checked),disabled:n,color:"secondary"}),label:r("global.allDay","Todo el d\xEDa")})})},Kc=({colorField:e,disabled:a,onColorChange:n})=>{const r=_e(),i=e.attributes.value||"#1976d2",s=(l=>{if(l.startsWith("#"))return l;const d=l.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);if(d&&d[1]&&d[2]&&d[3]){const p=parseInt(d[1]),h=parseInt(d[2]),m=parseInt(d[3]),f=c=>{const b=c.toString(16);return b.length===1?"0"+b:b};return`#${f(p)}${f(h)}${f(m)}`}return"#1976d2"})(i),o=l=>{const d=l.target.value;n?n(d):e.actions.changeValue(d)};return a?t.jsx(Je,{title:r("global.color","Color"),children:t.jsxs(v,{sx:{display:"flex",gap:1,alignItems:"center"},children:[t.jsx(v,{sx:{width:40,height:40,backgroundColor:s,border:"1px solid rgba(0, 0, 0, 0.23)",borderRadius:1}}),t.jsx(V,{variant:"body2",sx:{color:"text.secondary"},children:s})]})}):t.jsx(Je,{title:r("global.color","Color"),children:t.jsx(v,{sx:{display:"flex",gap:1,alignItems:"center"},children:t.jsx("input",{type:"color",value:s,onChange:o,disabled:a,style:{width:60,height:40,border:"1px solid rgba(0, 0, 0, 0.23)",borderRadius:4,cursor:a?"not-allowed":"pointer"}})})})},Nr=[{value:"",label:"global.noRepeat"},{value:"FREQ=DAILY",label:"global.everyDay"},{value:"FREQ=WEEKLY",label:"global.everyWeek"},{value:"FREQ=MONTHLY",label:"global.everyMonth"},{value:"FREQ=YEARLY",label:"global.everyYear"},{value:"FREQ=DAILY;INTERVAL=2",label:"global.everyTwoDays"},{value:"FREQ=WEEKLY;INTERVAL=2",label:"global.everyTwoWeeks"},{value:"FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR",label:"global.everyWeekday"}],qc=({value:e,onChange:a,disabled:n,hideLabel:r=!1})=>{const i=_e(),s=p=>{a(p.target.value)},o=ae(()=>Nr.map(p=>t.jsx(dt,{value:p.value,children:i(p.label,p.label)},p.value)),[i]),l=ae(()=>{const p=Nr.find(h=>h.value===e);return p?i(p.label,p.label):i("global.noRepeat")},[e,i]);if(n)return r?t.jsxs(v,{sx:{display:"flex",alignItems:"center",gap:1},children:[t.jsx(en,{sx:{opacity:.5},fontSize:"small"}),t.jsx(V,{variant:"body2",children:l})]}):t.jsx(Je,{title:i("global.recurrence","Recurrencia"),children:t.jsxs(v,{sx:{display:"flex",alignItems:"center",gap:1,py:.5},children:[t.jsx(en,{sx:{opacity:.5},fontSize:"small"}),t.jsx(V,{variant:"body1",children:l})]})});const d=t.jsx(fa,{disabled:n,size:"small",variant:"outlined",fullWidth:!0,value:e||"",onChange:s,startAdornment:t.jsx(en,{sx:{mr:1,ml:1,opacity:.5},fontSize:"small"}),MenuProps:{PaperProps:{sx:{backgroundColor:p=>p.palette.background.panel}}},children:o});return r?d:t.jsx(Je,{title:i("global.recurrence","Recurrencia"),children:d})},Jc=({open:e,onClose:a,onConfirm:n,itemTitle:r,itemType:i})=>{const{t:s}=St(),o=()=>{n(),a()},l=i==="event"?s("calendar.deleteEvent","Eliminar evento"):s("calendar.deleteTask","Eliminar tarea"),d=i==="event"?s("calendar.confirmDeleteEvent","\xBFEst\xE1s seguro de que quer\xE9s eliminar este evento?"):s("calendar.confirmDeleteTask","\xBFEst\xE1s seguro de que quer\xE9s eliminar esta tarea?");return t.jsxs(ha,{open:e,onClose:a,maxWidth:"xs",fullWidth:!0,PaperProps:{sx:{backgroundColor:p=>p.palette.background.panel}},children:[t.jsxs(qa,{sx:{display:"flex",alignItems:"center",gap:1},children:[t.jsx(Js,{color:"warning"}),l]}),t.jsxs(ba,{children:[t.jsx(V,{variant:"body2",sx:{mb:2},children:d}),r&&t.jsx(v,{sx:{p:1.5,bgcolor:"action.hover",borderRadius:1,borderLeft:3,borderColor:"warning.main"},children:t.jsxs(V,{variant:"body2",sx:{fontWeight:500},children:['"',r,'"']})})]}),t.jsxs(Bt,{sx:{px:3,pb:2},children:[t.jsx(Re,{onClick:a,variant:"outlined",color:"inherit",sx:{borderRadius:"8px"},children:s("global.cancel","Cancelar")}),t.jsx(Re,{onClick:o,variant:"contained",color:"error",sx:{borderRadius:"8px"},children:s("global.delete","Eliminar")})]})]})},Qc=({open:e,onClose:a,onConfirm:n,eventTitle:r})=>{const{t:i}=St(),[s,o]=x("single"),l=()=>{n(s==="all"),a()},d=()=>{o("single"),a()};return t.jsxs(ha,{open:e,onClose:d,maxWidth:"xs",fullWidth:!0,PaperProps:{sx:{backgroundColor:p=>p.palette.background.panel}},children:[t.jsx(qa,{children:i("calendar.deleteRecurringEvent","Borrar evento recurrente")}),t.jsxs(ba,{children:[r&&t.jsxs(v,{sx:{mb:2,color:"text.secondary",fontSize:"0.875rem"},children:['"',r,'"']}),t.jsx(Ya,{component:"fieldset",fullWidth:!0,children:t.jsxs(En,{value:s,onChange:p=>o(p.target.value),children:[t.jsx(Dt,{value:"single",control:t.jsx(ya,{color:"secondary"}),label:i("calendar.deleteThisEvent","Este evento"),sx:{mb:1}}),t.jsx(Dt,{value:"all",control:t.jsx(ya,{color:"secondary"}),label:i("calendar.deleteAllEvents","Todos los eventos")})]})})]}),t.jsxs(Bt,{sx:{px:3,pb:2},children:[t.jsx(Re,{onClick:d,variant:"outlined",color:"inherit",sx:{borderRadius:"8px"},children:i("global.cancel","Cancelar")}),t.jsx(Re,{onClick:l,variant:"contained",color:"error",sx:{borderRadius:"8px"},children:i("global.delete","Eliminar")})]})]})},Xc=({open:e,onClose:a,onConfirm:n,eventTitle:r})=>{const{t:i}=St(),[s,o]=x("single"),l=()=>{n(s==="all"),a()},d=()=>{o("single"),a()};return t.jsxs(ha,{open:e,onClose:d,maxWidth:"xs",fullWidth:!0,PaperProps:{sx:{backgroundColor:p=>p.palette.background.panel}},children:[t.jsx(qa,{children:i("calendar.editRecurringEvent","Editar evento recurrente")}),t.jsxs(ba,{children:[r&&t.jsxs(v,{sx:{mb:2,color:"text.secondary",fontSize:"0.875rem"},children:['"',r,'"']}),t.jsx(Ya,{component:"fieldset",fullWidth:!0,children:t.jsxs(En,{value:s,onChange:p=>o(p.target.value),children:[t.jsx(Dt,{value:"single",control:t.jsx(ya,{color:"secondary"}),label:i("calendar.editThisEvent","Este evento"),sx:{mb:1}}),t.jsx(Dt,{value:"all",control:t.jsx(ya,{color:"secondary"}),label:i("calendar.editAllEvents","Todos los eventos")})]})})]}),t.jsxs(Bt,{sx:{px:3,pb:2},children:[t.jsx(Re,{onClick:d,variant:"outlined",color:"inherit",sx:{borderRadius:"8px"},children:i("global.cancel","Cancelar")}),t.jsx(Re,{onClick:l,variant:"contained",color:"secondary",sx:{borderRadius:"8px"},children:i("global.save","Guardar")})]})]})},Zc=()=>{const e=_e(),{event:a,task:n,dialogMode:r,selectedEvent:i,handleDeleteEvent:s,handleStartEditingEvent:o,handleDuplicateItem:l,dialogType:d,setDialogType:p,selectedTask:h,taskCalendarId:m,setTaskCalendarId:f,eventCalendarId:c,setEventCalendarId:b,myCalendars:j,otherCalendars:y,handleDeleteTask:I,userManuallyChangedColor:C,setUserManuallyChangedColor:S,eventDialog:{open:w,handleClose:W},confirmDeleteDialog:E,handleConfirmDelete:$,deleteRecurringDialog:A,handleConfirmDeleteRecurring:T,editRecurringDialog:z,handleConfirmEditRecurring:G,hiddenTabs:_}=lt(pn);if(!a||!n)return t.jsx(Ot,{open:w,onClose:W,closeAfterTransition:!0,slots:{backdrop:Ka},slotProps:{backdrop:{timeout:200}},children:t.jsx(ct,{in:w,timeout:200,children:t.jsx(v,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"min(640px, calc(100vw - 32px))",height:"min(560px, calc(100vh - 64px))",bgcolor:O=>O.palette.background.panel,borderRadius:3,boxShadow:24,outline:0,p:3,overflow:"visible"}})})});const q=d==="event",U=q?a:n,ne=q?i:h,J=he(null),B=he(null);H(()=>{w||(J.current=null,B.current=null)},[w]);const{titleField:k,descriptionField:M,date:P,linkContact:R}=U,Y=q?a.notifications:null,K=q?{locationField:a.locationField,colorField:a.colorField,allDay:a.allDay,setAllDay:a.setAllDay,isPrivate:a.isPrivate,setIsPrivate:a.setIsPrivate,recurrenceRule:a.recurrenceRule,setRecurrenceRule:a.setRecurrenceRule}:null,ie=e(r==="edit"?q?"global.editEvent":"global.editTask":r==="create"?q?"global.createEvent":"global.createTask":q?"global.showEvent":"global.showTask"),me=(r==="edit"||r==="view")&&!!ne?.id,ye=r==="view";H(()=>{if(r!=="create"||d!=="event"||!w||C||!c)return;const O=j.find(Ae=>Ae.id===c);O?.color&&a.colorField.actions.changeValue(O.color)},[r,d,w,c,C,j]),H(()=>{if(!w||d!=="event"||r!=="edit")return;const O=P.state.selectedStartDate.isAfter(P.state.selectedEndDate)&&!P.state.selectedStartDate.isSame(P.state.selectedEndDate,"minute");B.current!==O&&(B.current=O,P.action.setError(O))},[w,d,r,P.state.selectedStartDate.valueOf(),P.state.selectedEndDate.valueOf()]),H(()=>{if(!w||r==="create")return;const O=ne?.relatedContact;O?.id&&J.current!==O.id&&(J.current=O.id,R.action.resetField(),R.action.handleSelectContact({id:O.id,name:O.name}))},[w,r,ne?.id]);const Ee=O=>{if(O==="task"){const Ae=a.date.state.selectedStartDate;n.date.action.setSelectedStartDate(Ae),n.date.action.setSelectedEndDate(Ae),n.date.action.setError(!1),a.date.action.setError(!1)}else{const Ae=n.date.state.selectedStartDate;a.date.action.setSelectedStartDate(Ae),a.date.action.setError(!1),n.date.action.setError(!1)}p(O)},Ie=O=>{a.colorField.actions.changeValue(O),S(!0)};return t.jsxs(t.Fragment,{children:[t.jsx(Ot,{open:w,onClose:W,closeAfterTransition:!0,slots:{backdrop:Ka},slotProps:{backdrop:{timeout:200}},children:t.jsx(ct,{in:w,timeout:200,children:t.jsxs(v,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"min(640px, calc(100vw - 32px))",maxHeight:"calc(100vh - 64px)",bgcolor:O=>O.palette.background.panel,borderRadius:3,boxShadow:24,outline:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:[t.jsxs(v,{sx:{display:"flex",flexDirection:"column",gap:2,p:3,pt:4,overflowY:"auto",flex:1},children:[t.jsxs(v,{sx:{display:"flex",alignItems:"center",justifyContent:r==="create"?"flex-end":"space-between",gap:1,mb:.5},children:[r!=="create"&&t.jsx(V,{sx:{fontWeight:600},children:ie}),t.jsxs(v,{sx:{display:"flex",gap:1},children:[ye&&t.jsx(xe,{size:"small",onClick:o,"aria-label":e("global.edit","Editar"),children:t.jsx(zt,{fontSize:"small"})}),me&&t.jsx(xe,{size:"small",onClick:q?s:I,color:"error","aria-label":e("global.delete","Eliminar"),children:t.jsx(xa,{fontSize:"small"})}),ye&&t.jsx(xe,{size:"small",onClick:l,"aria-label":e("global.duplicate","Duplicar"),children:t.jsx(Qs,{fontSize:"small"})})]})]}),r==="create"&&t.jsxs(t.Fragment,{children:[t.jsx(bn,{disabled:!1,titleField:k,variantMode:"inline"}),!_&&t.jsx(_c,{value:d,onChange:Ee,labels:{event:e("global.event","Evento"),task:e("global.task","Tarea")}})]}),d==="event"?t.jsxs(t.Fragment,{children:[r!=="create"&&t.jsx(bn,{disabled:r==="view",titleField:k}),t.jsx(Dr,{disabled:r==="view",descriptionField:M}),t.jsx(Pr,{disabled:r==="view",calendars:[...j,...y],userId:j[0]?.userId,value:c,onChange:O=>b(O)}),t.jsxs(v,{sx:{display:"flex",flexDirection:"column",gap:1.5,borderRadius:1,padding:"15px",bgcolor:O=>O.palette.mode==="dark"?"rgba(255, 255, 255, 0.05)":"rgba(0, 0, 0, 0.02)"},children:[t.jsx(v,{sx:{display:"flex",gap:1.5,alignItems:"flex-start"},children:t.jsx(v,{sx:{flex:1},children:t.jsx(wc,{disabled:r==="view",selectedStartDate:P.state.selectedStartDate,selectedEndDate:P.state.selectedEndDate,handleSelectStart:P.action.handleSelect(P.action.setSelectedStartDate),handleSelectEnd:P.action.handleSelect(P.action.setSelectedEndDate),isError:P.state.error,hideLabel:!0,allDay:K?.allDay??!1})})}),K&&t.jsxs(v,{sx:{display:"flex",gap:2,alignItems:"center"},children:[t.jsx(Yc,{checked:K.allDay,onChange:K.setAllDay,disabled:r==="view"}),t.jsx(v,{sx:{flex:1},children:t.jsx(qc,{disabled:r==="view",value:K.recurrenceRule,onChange:K.setRecurrenceRule,hideLabel:!0})})]})]}),K&&t.jsx(t.Fragment,{children:t.jsx(Kc,{disabled:r==="view",colorField:K.colorField,onColorChange:r==="create"?Ie:void 0})}),Y&&t.jsx(Mc,{disabled:r==="view",notificationsField:Y}),t.jsx(Ur,{linkContactsHandler:R,disabled:r==="view"}),K&&t.jsx(Oc,{disabled:r==="view",locationField:K.locationField})]}):t.jsxs(t.Fragment,{children:[r!=="create"&&t.jsx(bn,{disabled:r==="view",titleField:k}),t.jsx(Dr,{disabled:r==="view",descriptionField:M}),t.jsx(Pr,{disabled:r==="view",calendars:[...j,...y],userId:j[0]?.userId,value:m,onChange:O=>f(O)}),t.jsx(v,{sx:{display:"flex",flexDirection:"column",gap:1.5,p:2,borderRadius:1,bgcolor:O=>O.palette.mode==="dark"?"rgba(255, 255, 255, 0.05)":"rgba(0, 0, 0, 0.02)"},children:t.jsxs(v,{sx:{display:"flex",gap:1.5,alignItems:"flex-start"},children:[t.jsx(Xs,{sx:{mt:.5,color:"text.secondary",fontSize:"1.25rem"}}),t.jsx(v,{sx:{flex:1},children:t.jsx(Gc,{disabled:r==="view",selectedDateTime:P.state.selectedStartDate,handleSelect:O=>{P.action.setSelectedStartDate(O),P.action.setSelectedEndDate(O),P.action.setError(!1)},isError:P.state.error,hideLabel:!0})})]})}),t.jsx(Ur,{linkContactsHandler:R,disabled:r==="view"})]})]}),t.jsx(v,{sx:{borderTop:1,borderColor:"divider",p:2},children:t.jsx(Wc,{isFinalized:i?.finalized})})]})})}),t.jsx(Jc,{open:E.open,onClose:E.handleClose,onConfirm:$,itemTitle:E.itemType==="event"?i?.title:h?.title,itemType:E.itemType}),t.jsx(Qc,{open:A.open,onClose:A.handleClose,onConfirm:T,eventTitle:i?.title}),t.jsx(Xc,{open:z.open,onClose:z.handleClose,onConfirm:G,eventTitle:i?.title})]})},Rr=e=>{const a=e.palette.background;return Le({...e,components:{MuiSelect:{defaultProps:{MenuProps:{PaperProps:{sx:{backgroundColor:a.panel,backgroundImage:"linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05))"}}}}},MuiAutocomplete:{styleOverrides:{popper:{zIndex:11,"& div":{backgroundColor:a.panel}}}},MuiPaper:{styleOverrides:{root:{backgroundColor:a.panel,backgroundImage:"linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05))"}}},MuiMenu:{styleOverrides:{paper:{backgroundColor:a.panel,backgroundImage:"linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05))"}}},MuiList:{styleOverrides:{root:{padding:0}}},MuiModal:{styleOverrides:{root:{}}},MuiTypography:{styleOverrides:{root:{color:e.palette.text.primary}}},MuiChip:{styleOverrides:{root:{color:e.palette.text.primary,border:"1px solid rgba(0, 0, 0, 0.1)",borderRadius:"4px",height:"20px",fontSize:"0.7125rem"}}},MuiListSubheader:{styleOverrides:{root:{backgroundColor:a.accordionHeader}}},MuiButton:{styleOverrides:{outlined:{color:e.palette.mode==="light"?e.palette.primary.dark:e.palette.info.dark,borderColor:e.palette.mode==="light"?e.palette.primary.dark:e.palette.info.dark,"&:hover":{borderColor:e.palette.mode==="light"?e.palette.primary.main:e.palette.info.main,color:e.palette.mode==="light"?e.palette.primary.main:e.palette.info.main}}}}}})},eu=e=>{const{open:a,onClose:n,baseUrl:r,spaceId:i,language:s="en",mode:o="create",type:l="event",eventCalendarId:d,taskCalendarId:p,selectedEvent:h,selectedTask:m,hiddenTabs:f=!1,onActionComplete:c,contactId:b}=e,{i18n:j}=St();return H(()=>{s&&j.changeLanguage(s)},[s,j]),t.jsx(Md,{value:{baseUrl:r,spaceId:i},children:t.jsx(jc,{externalOpen:a,externalOnClose:n,externalMode:o,externalType:l,externalEventCalendarId:d,externalTaskCalendarId:p,externalSelectedEvent:h,externalSelectedTask:m,hiddenTabs:f,externalOnActionComplete:c,externalContactId:b,children:t.jsx(Zc,{})})})},tu=e=>{const a=Tn(),n=a?.palette?a:Le(),r=Rr(n);return t.jsx(us,{theme:r,children:t.jsx(Ja,{i18n:Gt,children:t.jsx(eu,{...e})})})},Ma=Le({name:"lightBlueIndigo",palette:{mode:"light",background:{default:"#ffffff",mainCenter:"#ebf6fd",mainGradient:"linear-gradient(270deg, #215c97, #1976d2)",navMenu:"#1976d2",dropdownMenu:"#f5f5f5",panel:"#ffffff",tooltip:"#1976d2",accordionHeader:"#F3F4F6",panelHeader:"#F3F4F6",panelCenter:"#ffffff",paper:"#ffffff"},primary:{main:"#1976d2",light:"#42a5f5",dark:"#1565c0",contrastText:"#fff"},secondary:{main:"#1976d2",light:"#ba68c8",dark:"#7b1fa2",contrastText:"rgba(0, 0, 0, 0.87)"},error:{main:"#d32f2f",light:"#ef5350",dark:"#c62828"},warning:{main:"#ed6c02",light:"#ff9800",dark:"#e65100"},info:{main:"#0288d1",light:"#03a9f4",dark:"#01579b"},success:{main:"#2e7d32",light:"#4caf50",dark:"#1b5e20"},containerBox:{default:"#ffffff",main:"#f5f5f5"},action:{active:"rgba(0, 0, 0, 0.10)",hover:"rgba(0, 0, 0, 0.05)",selected:"#ebf6fd",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(255, 255, 255, 0.12)"},text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.58)",colorMain:"#1976d2"},divider:"rgba(0, 0, 0, 0.12)",dropdownBox:"#ffffff",color:{icons:"#1976d2"},cellHeader:"#d3d3d3",Skeleton:{bg:"#f5f5f5"},messageBox:"#d3e6fd",boxShadow:"rgba(0, 0, 0, 0.1)",disabled:"rgba(0, 0, 0, 0.26)"}}),Or=Le({name:"lightBlue",palette:{mode:"light",background:{default:"#ffffff",mainCenter:"#e3f2fd",mainGradient:"linear-gradient(270deg, #005cb2, #1e88e5)",navMenu:"#4fc354",dropdownMenu:"#f5f5f5",panel:"#ffffff",tooltip:"#1e88e5",accordionHeader:"#F3F4F6",panelHeader:"#F3F4F6",panelCenter:"#ffffff",paper:"#ffffff"},primary:{main:"#1e88e5",light:"#6ab7ff",dark:"#005cb2",contrastText:"#fff"},secondary:{main:"#1e88e5",light:"#ba68c8",dark:"#7b1fa2",contrastText:"rgba(0, 0, 0, 0.87)"},error:{main:"#d32f2f",light:"#ef5350",dark:"#c62828"},warning:{main:"#ed6c02",light:"#ff9800",dark:"#e65100"},info:{main:"#0288d1",light:"#03a9f4",dark:"#01579b"},success:{main:"#2e7d32",light:"#4caf50",dark:"#1b5e20"},containerBox:{default:"#ffffff",main:"#f5f5f5"},action:{active:"rgba(0, 0, 0, 0.10)",hover:"rgba(0, 0, 0, 0.05)",selected:"#e3f2fd",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(255, 255, 255, 0.12)"},text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.58)",colorMain:"#1e88e5"},divider:"rgba(0, 0, 0, 0.12)",dropdownBox:"#ffffff",color:{icons:"#1e88e5"},cellHeader:"#d3d3d3",Skeleton:{bg:"#f5f5f5"},messageBox:"#d3e6fd",boxShadow:"rgba(0, 0, 0, 0.1)",disabled:"rgba(0, 0, 0, 0.26)"}}),Br=Le({name:"lightRed",palette:{mode:"light",background:{default:"#ffffff",mainCenter:"#ffebee",mainGradient:"linear-gradient(270deg, #b61827, #ef5350)",navMenu:"#f44336",dropdownMenu:"#f5f5f5",panel:"#ffffff",tooltip:"#ef5350",accordionHeader:"#F3F4F6",panelHeader:"#F3F4F6",panelCenter:"#ffffff",paper:"#ffffff"},primary:{main:"#ef5350",light:"#ff867c",dark:"#b61827",contrastText:"#fff"},secondary:{main:"#ef5350",light:"#ba68c8",dark:"#7b1fa2",contrastText:"rgba(0, 0, 0, 0.87)"},error:{main:"#d32f2f",light:"#ef5350",dark:"#c62828"},warning:{main:"#ed6c02",light:"#ff9800",dark:"#e65100"},info:{main:"#0288d1",light:"#03a9f4",dark:"#01579b"},success:{main:"#2e7d32",light:"#4caf50",dark:"#1b5e20"},containerBox:{default:"#ffffff",main:"#f5f5f5"},action:{active:"rgba(0, 0, 0, 0.10)",hover:"rgba(0, 0, 0, 0.05)",selected:"#ffebee",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(255, 255, 255, 0.12)"},text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.58)",colorMain:"#ef5350"},divider:"rgba(0, 0, 0, 0.12)",dropdownBox:"#ffffff",color:{icons:"#ef5350"},cellHeader:"#d3d3d3",Skeleton:{bg:"#f5f5f5"},messageBox:"#d3e6fd",boxShadow:"rgba(0, 0, 0, 0.1)",disabled:"rgba(0, 0, 0, 0.26)"}}),zr=Le({name:"lightGreen",palette:{mode:"light",background:{default:"#ffffff",mainCenter:"#e8f5e9",mainGradient:"linear-gradient(270deg, #087f23, #4caf50)",navMenu:"#4fc354",dropdownMenu:"#f5f5f5",panel:"#ffffff",tooltip:"#4caf50",accordionHeader:"#F3F4F6",panelHeader:"#F3F4F6",panelCenter:"#ffffff",paper:"#ffffff"},primary:{main:"#4caf50",light:"#80e27e",dark:"#087f23",contrastText:"#fff"},secondary:{main:"#4caf50",light:"#ba68c8",dark:"#7b1fa2",contrastText:"rgba(0, 0, 0, 0.87)"},error:{main:"#d32f2f",light:"#ef5350",dark:"#c62828"},warning:{main:"#ed6c02",light:"#ff9800",dark:"#e65100"},info:{main:"#0288d1",light:"#03a9f4",dark:"#01579b"},success:{main:"#2e7d32",light:"#4caf50",dark:"#1b5e20"},containerBox:{default:"#ffffff",main:"#f5f5f5"},action:{active:"rgba(0, 0, 0, 0.10)",hover:"rgba(0, 0, 0, 0.05)",selected:"#e8f5e9",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(255, 255, 255, 0.12)"},text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.58)",colorMain:"#4caf50"},divider:"rgba(0, 0, 0, 0.12)",dropdownBox:"#ffffff",color:{icons:"#4caf50"},cellHeader:"#d3d3d3",Skeleton:{bg:"#f5f5f5"},messageBox:"#d3e6fd",boxShadow:"rgba(0, 0, 0, 0.1)",disabled:"rgba(0, 0, 0, 0.26)"}}),Lr=Le({name:"lightPink",palette:{mode:"light",background:{default:"#ffffff",mainCenter:"#fce4ec",mainGradient:"linear-gradient(270deg, #b0003a, #e91e63)",navMenu:"#e91e63",dropdownMenu:"#f5f5f5",panel:"#ffffff",tooltip:"#e91e63",accordionHeader:"#F3F4F6",panelHeader:"#F3F4F6",panelCenter:"#ffffff",paper:"#ffffff"},primary:{main:"#e91e63",light:"#ff6090",dark:"#b0003a",contrastText:"#fff"},secondary:{main:"#9c27b0",light:"#ba68c8",dark:"#7b1fa2",contrastText:"rgba(0, 0, 0, 0.87)"},error:{main:"#d32f2f",light:"#ef5350",dark:"#c62828"},warning:{main:"#ed6c02",light:"#ff9800",dark:"#e65100"},info:{main:"#0288d1",light:"#03a9f4",dark:"#01579b"},success:{main:"#2e7d32",light:"#4caf50",dark:"#1b5e20"},containerBox:{default:"#ffffff",main:"#f5f5f5"},action:{active:"rgba(0, 0, 0, 0.10)",hover:"rgba(0, 0, 0, 0.05)",selected:"#fce4ec",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(255, 255, 255, 0.12)"},text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.58)",colorMain:"#e91e63"},divider:"rgba(0, 0, 0, 0.12)",dropdownBox:"#ffffff",color:{icons:"#e91e63"},cellHeader:"#d3d3d3",Skeleton:{bg:"#f5f5f5"},messageBox:"#d3e6fd",boxShadow:"rgba(0, 0, 0, 0.1)",disabled:"rgba(0, 0, 0, 0.26)"}}),Wr=Le({name:"lightPurple",palette:{mode:"light",background:{default:"#ffffff",mainCenter:"#f3e5f5",mainGradient:"linear-gradient(270deg, #6a0080, #9c27b0)",navMenu:"#f8bbd0",dropdownMenu:"#f5f5f5",panel:"#ffffff",tooltip:"#9c27b0",accordionHeader:"#F3F4F6",panelHeader:"#F3F4F6",panelCenter:"#ffffff",paper:"#ffffff"},primary:{main:"#9c27b0",light:"#d05ce3",dark:"#6a0080",contrastText:"#fff"},secondary:{main:"#9c27b0",light:"#ba68c8",dark:"#7b1fa2",contrastText:"rgba(0, 0, 0, 0.87)"},error:{main:"#d32f2f",light:"#ef5350",dark:"#c62828"},warning:{main:"#ed6c02",light:"#ff9800",dark:"#e65100"},info:{main:"#0288d1",light:"#03a9f4",dark:"#01579b"},success:{main:"#2e7d32",light:"#4caf50",dark:"#1b5e20"},containerBox:{default:"#ffffff",main:"#f5f5f5"},action:{active:"rgba(0, 0, 0, 0.10)",hover:"rgba(0, 0, 0, 0.05)",selected:"#f3e5f5",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(255, 255, 255, 0.12)"},text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.58)",colorMain:"#9c27b0"},divider:"rgba(0, 0, 0, 0.12)",dropdownBox:"#ffffff",color:{icons:"#9c27b0"},cellHeader:"#d3d3d3",Skeleton:{bg:"#f5f5f5"},messageBox:"#d3e6fd",boxShadow:"rgba(0, 0, 0, 0.1)",disabled:"rgba(0, 0, 0, 0.26)"}}),_r=Le({name:"lightTeal",palette:{mode:"light",background:{default:"#ffffff",mainCenter:"#e0f2f1",mainGradient:"linear-gradient(270deg, #00675b, #009688)",navMenu:"#f8bbd0",dropdownMenu:"#f5f5f5",panel:"#ffffff",tooltip:"#009688",accordionHeader:"#F3F4F6",panelHeader:"#F3F4F6",panelCenter:"#ffffff",paper:"#ffffff"},primary:{main:"#009688",light:"#52c7b8",dark:"#00675b",contrastText:"#fff"},secondary:{main:"#009688",light:"#ba68c8",dark:"#7b1fa2",contrastText:"rgba(0, 0, 0, 0.87)"},error:{main:"#d32f2f",light:"#ef5350",dark:"#c62828"},warning:{main:"#ed6c02",light:"#ff9800",dark:"#e65100"},info:{main:"#0288d1",light:"#03a9f4",dark:"#01579b"},success:{main:"#2e7d32",light:"#4caf50",dark:"#1b5e20"},containerBox:{default:"#ffffff",main:"#f5f5f5"},action:{active:"rgba(0, 0, 0, 0.10)",hover:"rgba(0, 0, 0, 0.05)",selected:"#e0f2f1",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(255, 255, 255, 0.12)"},text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.58)",colorMain:"#009688"},divider:"rgba(0, 0, 0, 0.12)",dropdownBox:"#ffffff",color:{icons:"#009688"},cellHeader:"#d3d3d3",Skeleton:{bg:"#f5f5f5"},messageBox:"#d3e6fd",boxShadow:"rgba(0, 0, 0, 0.1)",disabled:"rgba(0, 0, 0, 0.26)"}}),Vr=Le({name:"lightLime",palette:{mode:"light",background:{default:"#ffffff",mainCenter:"#f9fbe7",mainGradient:"linear-gradient(270deg, #99aa00, #cddc39)",navMenu:"#f8bbd0",dropdownMenu:"#f5f5f5",panel:"#ffffff",tooltip:"#cddc39",accordionHeader:"#F3F4F6",panelHeader:"#F3F4F6",panelCenter:"#ffffff",paper:"#ffffff"},primary:{main:"#cddc39",light:"#ffff6e",dark:"#99aa00",contrastText:"#fff"},secondary:{main:"#cddc39",light:"#ba68c8",dark:"#7b1fa2",contrastText:"rgba(0, 0, 0, 0.87)"},error:{main:"#d32f2f",light:"#ef5350",dark:"#c62828"},warning:{main:"#ed6c02",light:"#ff9800",dark:"#e65100"},info:{main:"#0288d1",light:"#03a9f4",dark:"#01579b"},success:{main:"#2e7d32",light:"#4caf50",dark:"#1b5e20"},containerBox:{default:"#ffffff",main:"#f5f5f5"},action:{active:"rgba(0, 0, 0, 0.10)",hover:"rgba(0, 0, 0, 0.05)",selected:"#f9fbe7",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(255, 255, 255, 0.12)"},text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.58)",colorMain:"#cddc39"},divider:"rgba(0, 0, 0, 0.12)",dropdownBox:"#ffffff",color:{icons:"#cddc39"},cellHeader:"#d3d3d3",Skeleton:{bg:"#f5f5f5"},messageBox:"#d3e6fd",boxShadow:"rgba(0, 0, 0, 0.1)",disabled:"rgba(0, 0, 0, 0.26)"}}),Hr=Le({name:"lightYellow",palette:{mode:"light",background:{default:"#ffffff",mainCenter:"#fffde7",mainGradient:"linear-gradient(270deg, #c8b900, #ffeb3b)",navMenu:"#f8bbd0",dropdownMenu:"#f5f5f5",panel:"#ffffff",tooltip:"#ffeb3b",accordionHeader:"#F3F4F6",panelHeader:"#F3F4F6",panelCenter:"#ffffff",paper:"#ffffff"},primary:{main:"#ffeb3b",light:"#ffff72",dark:"#c8b900",contrastText:"#fff"},secondary:{main:"#ffeb3b",light:"#ba68c8",dark:"#7b1fa2",contrastText:"rgba(0, 0, 0, 0.87)"},error:{main:"#d32f2f",light:"#ef5350",dark:"#c62828"},warning:{main:"#ed6c02",light:"#ff9800",dark:"#e65100"},info:{main:"#0288d1",light:"#03a9f4",dark:"#01579b"},success:{main:"#2e7d32",light:"#4caf50",dark:"#1b5e20"},containerBox:{default:"#ffffff",main:"#f5f5f5"},action:{active:"rgba(0, 0, 0, 0.10)",hover:"rgba(0, 0, 0, 0.05)",selected:"#fffde7",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(255, 255, 255, 0.12)"},text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.58)",colorMain:"#ffeb3b"},divider:"rgba(0, 0, 0, 0.12)",dropdownBox:"#ffffff",color:{icons:"#ffeb3b"},cellHeader:"#d3d3d3",Skeleton:{bg:"#f5f5f5"},messageBox:"#d3e6fd",boxShadow:"rgba(0, 0, 0, 0.1)",disabled:"rgba(0, 0, 0, 0.26)"}}),Gr=Le({name:"lightAmber",palette:{mode:"light",background:{default:"#ffffff",mainCenter:"#fff8e1",mainGradient:"linear-gradient(270deg, #c68400, #ffb300)",navMenu:"#f8bbd0",dropdownMenu:"#f5f5f5",panel:"#ffffff",tooltip:"#ffb300",accordionHeader:"#F3F4F6",panelHeader:"#F3F4F6",panelCenter:"#ffffff",paper:"#ffffff"},primary:{main:"#ffb300",light:"#ffe54c",dark:"#c68400",contrastText:"#fff"},secondary:{main:"#ffb300",light:"#ba68c8",dark:"#7b1fa2",contrastText:"rgba(0, 0, 0, 0.87)"},error:{main:"#d32f2f",light:"#ef5350",dark:"#c62828"},warning:{main:"#ed6c02",light:"#ff9800",dark:"#e65100"},info:{main:"#0288d1",light:"#03a9f4",dark:"#01579b"},success:{main:"#2e7d32",light:"#4caf50",dark:"#1b5e20"},containerBox:{default:"#ffffff",main:"#f5f5f5"},action:{active:"rgba(0, 0, 0, 0.10)",hover:"rgba(0, 0, 0, 0.05)",selected:"#fff8e1",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(255, 255, 255, 0.12)"},text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.58)",colorMain:"#ffb300"},divider:"rgba(0, 0, 0, 0.12)",dropdownBox:"#ffffff",color:{icons:"#ffb300"},cellHeader:"#d3d3d3",Skeleton:{bg:"#f5f5f5"},messageBox:"#d3e6fd",boxShadow:"rgba(0, 0, 0, 0.1)",disabled:"rgba(0, 0, 0, 0.26)"}}),Yr=Le({name:"lightOrange",palette:{mode:"light",background:{default:"#ffffff",mainCenter:"#fff3e0",mainGradient:"linear-gradient(270deg, #c66900, #ff9800)",navMenu:"#f8bbd0",dropdownMenu:"#f5f5f5",panel:"#ffffff",tooltip:"#ff9800",accordionHeader:"#F3F4F6",panelHeader:"#F3F4F6",panelCenter:"#ffffff",paper:"#ffffff"},primary:{main:"#ff9800",light:"#ffc947",dark:"#c66900",contrastText:"#fff"},secondary:{main:"#ff9800",light:"#ba68c8",dark:"#7b1fa2",contrastText:"rgba(0, 0, 0, 0.87)"},error:{main:"#d32f2f",light:"#ef5350",dark:"#c62828"},warning:{main:"#ed6c02",light:"#ff9800",dark:"#e65100"},info:{main:"#0288d1",light:"#03a9f4",dark:"#01579b"},success:{main:"#2e7d32",light:"#4caf50",dark:"#1b5e20"},containerBox:{default:"#ffffff",main:"#f5f5f5"},action:{active:"rgba(0, 0, 0, 0.10)",hover:"rgba(0, 0, 0, 0.05)",selected:"#fff3e0",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(255, 255, 255, 0.12)"},text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.58)",colorMain:"#ff9800"},divider:"rgba(0, 0, 0, 0.12)",dropdownBox:"#ffffff",color:{icons:"#ff9800"},cellHeader:"#d3d3d3",Skeleton:{bg:"#f5f5f5"},messageBox:"#d3e6fd",boxShadow:"rgba(0, 0, 0, 0.1)",disabled:"rgba(0, 0, 0, 0.26)"}}),Kr=Le({name:"lightBrown",palette:{mode:"light",background:{default:"#ffffff",mainCenter:"#efebe9",mainGradient:"linear-gradient(270deg, #4b2c20, #795548)",navMenu:"#f8bbd0",dropdownMenu:"#f5f5f5",panel:"#ffffff",tooltip:"#795548",accordionHeader:"#F3F4F6",panelHeader:"#F3F4F6",panelCenter:"#ffffff",paper:"#ffffff"},primary:{main:"#795548",light:"#a98274",dark:"#4b2c20",contrastText:"#fff"},secondary:{main:"#795548",light:"#ba68c8",dark:"#7b1fa2",contrastText:"rgba(0, 0, 0, 0.87)"},error:{main:"#d32f2f",light:"#ef5350",dark:"#c62828"},warning:{main:"#ed6c02",light:"#ff9800",dark:"#e65100"},info:{main:"#0288d1",light:"#03a9f4",dark:"#01579b"},success:{main:"#2e7d32",light:"#4caf50",dark:"#1b5e20"},containerBox:{default:"#ffffff",main:"#f5f5f5"},action:{active:"rgba(0, 0, 0, 0.10)",hover:"rgba(0, 0, 0, 0.05)",selected:"#efebe9",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(255, 255, 255, 0.12)"},text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.58)",colorMain:"#795548"},divider:"rgba(0, 0, 0, 0.12)",dropdownBox:"#ffffff",color:{icons:"#795548"},cellHeader:"#d3d3d3",Skeleton:{bg:"#f5f5f5"},messageBox:"#d3e6fd",boxShadow:"rgba(0, 0, 0, 0.1)",disabled:"rgba(0, 0, 0, 0.26)"}}),qr=Le({name:"lightGray",palette:{mode:"light",background:{default:"#ffffff",mainCenter:"#fafafa",mainGradient:"linear-gradient(270deg, #707070, #9e9e9e)",navMenu:"#f8bbd0",dropdownMenu:"#f5f5f5",panel:"#ffffff",tooltip:"#9e9e9e",accordionHeader:"#F3F4F6",panelHeader:"#F3F4F6",panelCenter:"#ffffff",paper:"#ffffff"},primary:{main:"#9e9e9e",light:"#cfcfcf",dark:"#707070",contrastText:"#fff"},secondary:{main:"#9e9e9e",light:"#ba68c8",dark:"#7b1fa2",contrastText:"rgba(0, 0, 0, 0.87)"},error:{main:"#d32f2f",light:"#ef5350",dark:"#c62828"},warning:{main:"#ed6c02",light:"#ff9800",dark:"#e65100"},info:{main:"#0288d1",light:"#03a9f4",dark:"#01579b"},success:{main:"#2e7d32",light:"#4caf50",dark:"#1b5e20"},containerBox:{default:"#ffffff",main:"#f5f5f5"},action:{active:"rgba(0, 0, 0, 0.10)",hover:"rgba(0, 0, 0, 0.05)",selected:"#fafafa",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(255, 255, 255, 0.12)"},text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.58)",colorMain:"#9e9e9e"},divider:"rgba(0, 0, 0, 0.12)",dropdownBox:"#ffffff",color:{icons:"#9e9e9e"},cellHeader:"#d3d3d3",Skeleton:{bg:"#f5f5f5"},messageBox:"#d3e6fd",boxShadow:"rgba(0, 0, 0, 0.1)",disabled:"rgba(0, 0, 0, 0.26)"}}),Jr=Le({name:"darkBlue",palette:{mode:"dark",primary:{main:"#1f5c8e",light:"#2196f3",dark:"#0d47a1",contrastText:"#fff"},secondary:{light:"#FFEA41",main:"#90caf9",dark:"#DBBE01",contrastText:"rgba(0, 0, 0, 0.87)"},error:{main:"#f44336",light:"#e57373",dark:"#d32f2f"},warning:{main:"#ffa726",light:"#ffb74d",dark:"#f57c00"},info:{main:"#29b6f6",light:"#4fc3f7",dark:"#0288d1"},success:{main:"#66bb6a",light:"#81c784",dark:"#388e3c"},background:{default:"#222B45",mainGradient:"linear-gradient(270deg, #222B45, #222B45)",mainCenter:"#28324e",navMenu:"#222B45",panel:"#2d364e",dropdownMenu:"#484f65",tooltip:"#484f65",accordionHeader:"#2a3249e3",panelHeader:"#2a3249e3",panelCenter:"#484f65",paper:"#2d364e"},containerBox:{default:"#2d354e",main:"#2d354e"},action:{active:"rgba(255, 255, 255, 0.2)",hover:"rgba(255, 255, 255, 0.08)",selected:"rgba(255, 255, 255, 0.16)",disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)"},text:{primary:"#EEEEEF",secondary:"#AEB0B4",disabled:"rgba(255, 255, 255, 0.5)",colorMain:"#EEEEEF"},divider:"rgba(255, 255, 255, 0.12)",dropdownBox:"#2d354e",color:{icons:"#fff"},cellHeader:"#505050",Skeleton:{bg:"#f5f5f5"},messageBox:"#1f5c8e",boxShadow:"rgba(0, 0, 0, 0.1)",disabled:"rgba(0, 0, 0, 0.26)"}}),Qr=Le({name:"darkBlack",palette:{mode:"dark",background:{default:"#201f1e",mainGradient:"linear-gradient(270deg, #201f1e, #201f1e)",mainCenter:"#252423",navMenu:"#201f1e",panel:"#3B3A39",dropdownMenu:"#585858",tooltip:"#616161eb",accordionHeader:"#25242369",panelHeader:"#3b3a39ba",panelCenter:"#585858",paper:"#3B3A39"},primary:{main:"#1976d2",light:"#2196f3",dark:"#42a5f5",contrastText:"#fff"},secondary:{light:"#FFEA41",main:"#90caf9",dark:"#DBBE01",contrastText:"rgba(0, 0, 0, 0.87)"},error:{main:"#f44336",light:"#e57373",dark:"#d32f2f"},warning:{main:"#ffa726",light:"#ffb74d",dark:"#f57c00"},info:{main:"#29b6f6",light:"#4fc3f7",dark:"#0288d1"},success:{main:"#66bb6a",light:"#81c784",dark:"#388e3c"},containerBox:{main:"#ffffffb3",default:"#3B3A39"},action:{active:"rgba(255, 255, 255, 0.2)",hover:"rgba(255, 255, 255, 0.08)",selected:"rgba(255, 255, 255, 0.16)",disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)"},text:{primary:"#EEEEEF",secondary:"#AEB0B4",disabled:"rgba(255, 255, 255, 0.5)",colorMain:"#EEEEEF"},divider:"rgba(255, 255, 255, 0.12)",dropdownBox:"#3B3A39",color:{icons:"#fff"},cellHeader:"#505050",Skeleton:{bg:"#f5f5f5"},messageBox:"#1f5c8e",boxShadow:"rgba(0, 0, 0, 0.1)",disabled:"rgba(0, 0, 0, 0.26)"}}),au="https://agent-api.trii.app/api/v1/settings/user/setTheme",nu={themeSelected:Ma,darkMode:!1,toggleStatus:"idle"},Xr=Zs("Theme/updateTheme",async(e,{getState:a})=>{const{uid:n}=a().User.user,r=JSON.stringify({theme:e,uid:n});return(await ti.put(au,r)).data}),Zr=ei({name:"Theme",initialState:nu,reducers:{toggleTheme:(e,a)=>{const n=es(a.payload);Object.assign(e,{themeSelected:n,toggleStatus:"toggled"})},toggleModeTheme:e=>{e.darkMode=!e.darkMode}},extraReducers:e=>{e.addCase(Xr.fulfilled,(a,n)=>{const r=es(n.payload.theme);Object.assign(a,{themeSelected:r})})}}),es=e=>{switch(e){case"lightBlueIndigo":return Ma;case"darkBlack":return Qr;case"darkBlue":return Jr;case"lightAmber":return Gr;case"lightBlue":return Or;case"lightBrown":return Kr;case"lightGray":return qr;case"lightGreen":return zr;case"lightLime":return Vr;case"lightOrange":return Yr;case"lightPink":return Lr;case"lightPurple":return Wr;case"lightRed":return Br;case"lightTeal":return _r;case"lightYellow":return Hr;default:return Ma}},ru=e=>["lightBlueIndigo","darkBlack","darkBlue","lightAmber","lightBlue","lightBrown","lightGray","lightGreen","lightLime","lightOrange","lightPink","lightPurple","lightRed","lightTeal","lightYellow"].includes(e),{toggleTheme:su,toggleModeTheme:iu}=Zr.actions,ou=e=>e.Theme.toggleStatus,lu=e=>e.Theme.themeSelected,du=e=>e.Theme.darkMode;Zr.reducer;export{_n as ContactInfoPopup,Ud as EditContactModal,tu as EventsDialog,Rr as MuiComponentsConfig,Qr as darkBlack,Jr as darkBlue,Gt as i18n,ru as isValidThemeName,Gr as lightAmber,Or as lightBlue,Ma as lightBlueIndigo,Kr as lightBrown,qr as lightGray,zr as lightGreen,Vr as lightLime,Yr as lightOrange,Lr as lightPink,Wr as lightPurple,Br as lightRed,_r as lightTeal,Hr as lightYellow,ou as selectThemeToggleStatus,du as selectedDarkTheme,lu as selectedTheme,iu as toggleModeTheme,su as toggleTheme,Xr as updateTheme};
|
|
20
|
+
`,Uc=Z(v)(()=>({display:"flex",justifyContent:"space-between",alignItems:"baseline",userSelect:"none"})),Mc=({notificationsField:e,disabled:a})=>{const n=_e(),{addNotification:r,deleteNotification:i,handleReminderChange:s,handleTimeFieldChange:o,handleTimePeriodChange:l}=e.action,d=e.notifications.length>0;return t.jsxs($c,{children:[t.jsxs(Uc,{children:[t.jsx(V,{variant:"subtitle2",sx:{userSelect:"none"},children:n("calendarView.reminders.title")}),!a&&t.jsx(Re,{disabled:a,startIcon:t.jsx(Pn,{}),size:"small",variant:"outlined",onClick:r,color:"secondary",children:n("calendarView.reminders.addReminder")})]}),t.jsx(v,{sx:{pt:1,px:.5},children:d?e.notifications.map(p=>t.jsx(Fc,{data:p,deleteHandler:i,sendToContactHandler:s,timePeriodHandler:l,timeValueHandler:o},p.id)):a?t.jsx(V,{variant:"body1",sx:{py:.5},children:"-"}):null})]})},Dr=({descriptionField:e,disabled:a})=>{const n=_e(),{value:r,type:i,...s}=e.attributes,o=r||"";return a?t.jsx(Je,{title:n("global.description"),children:t.jsx(V,{variant:"body2",sx:{py:.5,whiteSpace:"pre-wrap",color:l=>l.palette.text.secondary,fontSize:"0.9rem"},children:o||"-"})}):t.jsx(Je,{title:n("global.description"),children:t.jsx(je,{...s,value:o,disabled:a,size:"small",multiline:!0,maxRows:5,fullWidth:!0,variant:"outlined"})})},Pc=({onPlaceSelected:e})=>{const a=he(null),n=he(null),r=he(null),i=he(null),[s,o]=x([]),[l,d]=x(!1),p=_e();H(()=>{if(!a.current)return;const f=()=>{if(!window.google?.maps?.places)return console.warn("Google Places API no est\xE1 disponible a\xFAn"),!1;n.current=new window.google.maps.places.AutocompleteService;const c=document.createElement("div");return r.current=new window.google.maps.places.PlacesService(c),i.current=new window.google.maps.places.AutocompleteSessionToken,!0};if(!f()){const c=setTimeout(()=>{f()},500);return()=>clearTimeout(c)}},[]);const h=f=>{const c=f.target.value;if(!c||c.length<3||!n.current){o([]),d(!1);return}n.current.getPlacePredictions({input:c,types:["geocode"],sessionToken:i.current||void 0},(b,j)=>{j===window.google.maps.places.PlacesServiceStatus.OK&&b?(o(b),d(!0)):(o([]),d(!1))})},m=(f,c)=>{r.current&&r.current.getDetails({placeId:f,fields:["geometry","formatted_address"],sessionToken:i.current||void 0},(b,j)=>{if(j===window.google.maps.places.PlacesServiceStatus.OK&&b?.geometry?.location){const y=b.geometry.location.lat(),I=b.geometry.location.lng(),C=b.formatted_address??c;e({lat:y,lng:I},C),a.current&&(a.current.value=C),d(!1),o([]),i.current=new window.google.maps.places.AutocompleteSessionToken}})};return H(()=>{const f=c=>{a.current&&!a.current.contains(c.target)&&d(!1)};return document.addEventListener("mousedown",f),()=>document.removeEventListener("mousedown",f)},[]),t.jsxs("div",{style:{position:"absolute",width:"100%",maxWidth:300,margin:"0 auto",zIndex:13e3,top:"10px",left:"10px"},children:[t.jsx("input",{ref:a,placeholder:p("global.searchLocation","Buscar en Google Maps"),onChange:h,onFocus:()=>s.length>0&&d(!0),style:{width:"100%",padding:"12px 16px 5px",borderRadius:"24px",border:"1px solid #ccc",backgroundColor:"white",fontSize:"15px",boxShadow:"0 1px 4px rgba(0,0,0,0.3)",outline:"none",position:"relative",zIndex:13e3}}),l&&s.length>0&&t.jsx("div",{style:{position:"absolute",top:"100%",left:0,right:0,backgroundColor:"white",borderRadius:"8px",boxShadow:"0 2px 8px rgba(0,0,0,0.15)",marginTop:"4px",maxHeight:"300px",overflowY:"auto",zIndex:13001},children:s.map(f=>t.jsxs("div",{onClick:()=>m(f.place_id,f.description),style:{padding:"12px 16px",cursor:"pointer",borderBottom:"1px solid #f0f0f0",fontSize:"14px",transition:"background-color 0.2s"},onMouseEnter:c=>{c.currentTarget.style.backgroundColor="#f5f5f5"},onMouseLeave:c=>{c.currentTarget.style.backgroundColor="white"},children:[t.jsx("div",{style:{fontWeight:500},children:f.structured_formatting.main_text}),t.jsx("div",{style:{fontSize:"12px",color:"#666",marginTop:"2px"},children:f.structured_formatting.secondary_text})]},f.place_id))})]})},Ar="AIzaSyAQ1bUt3y6UoAhbi5-HAwYwaFx71pAiaKU",Fr=["places"],yn={apiKey:Ar,libraries:Fr,loading:"async"},Ua=()=>!!(window.google?.maps?.Map&&window.google?.maps?.Marker&&window.google?.maps?.Geocoder&&window.google?.maps?.places),$r=(e=Ar,a=Fr)=>{if(Ua())return Promise.resolve();const n=()=>{document.querySelectorAll('script[src*="maps.googleapis.com"]').forEach(r=>{r.parentNode?.removeChild(r)})};return document.getElementById("google-maps-script")?new Promise((r,i)=>{let s=0;const o=100,l=setInterval(()=>{s++,Ua()?(clearInterval(l),r()):s>=o&&(clearInterval(l),n(),$r(e,a).then(r).catch(i))},100)}):new Promise((r,i)=>{try{n();const s="initGoogleMaps";window[s]=()=>{Ua()?r():setTimeout(()=>{Ua()||console.warn("Google Maps API se carg\xF3 pero algunos componentes no est\xE1n disponibles"),r()},500)};const o=document.createElement("script");o.id="google-maps-script",o.type="text/javascript";const l=Array.isArray(a)?a.join(","):a;o.src=`https://maps.googleapis.com/maps/api/js?key=${e}&libraries=${l}&callback=${s}&loading=async`,o.async=!0,o.defer=!0,o.onerror=()=>{delete window[s],i(new Error("Error al cargar Google Maps API"))},document.head.appendChild(o)}catch(s){i(s)}})},ta=(e,a,n=18,r=400,i=400,s="red",o=yn.apiKey)=>`https://maps.googleapis.com/maps/api/staticmap?center=${e},${a}&zoom=${n}&size=${r}x${i}&markers=color:${s}%7Clabel:A%7C${e},${a}&key=${o}`,Nc=({onLocationChange:e,initialLocation:a})=>{const n=he(null),r=he(null),i=he(null),s=he(null),[o,l]=x(!0),[d,p]=x(!1),[h,m]=x(a||null),f=18,c=se(C=>{m(C),e(C)},[e]);H(()=>{let C=!0;(async()=>{try{if(await $r(yn.apiKey,yn.libraries),!window.google?.maps?.Map||!window.google?.maps?.Geocoder){console.error("Google Maps APIs no est\xE1n completamente disponibles"),l(!1);return}window.google?.maps?.Geocoder&&(s.current=new window.google.maps.Geocoder),l(!1)}catch(S){console.error("Error al cargar Google Maps:",S),l(!1)}})(),a||navigator.geolocation.getCurrentPosition(S=>{const w=S.coords.latitude,W=S.coords.longitude,E=w.toString(),$=W.toString(),A=ta(w,W,f);c({lat:E,lng:$,title:"",description:"",url:A})},S=>{console.error("Error getting location:",S);const w=-34.6037,W=-58.3816;c({lat:w.toString(),lng:W.toString(),title:"",description:"",url:ta(w,W,f)})})},[a,c,f]),H(()=>{if(o||r.current)return;const C=setTimeout(()=>{r.current||b()},50);return()=>clearTimeout(C)},[o]),H(()=>{d&&h&&y()},[d,h]),H(()=>()=>{i.current&&(i.current.setMap(null),i.current=null)},[]);const b=()=>{if(!n.current){console.warn("Contenedor del mapa no disponible");return}if(!window.google?.maps){console.warn("Google Maps API no disponible a\xFAn");return}try{const C={zoom:f,disableDefaultUI:!1,zoomControl:!0,mapTypeControl:!1,streetViewControl:!1,fullscreenControl:!1};r.current=new window.google.maps.Map(n.current,C),r.current.addListener("click",S=>{j(S)}),p(!0)}catch(C){console.error("Error inicializando mapa:",C)}},j=C=>{if(!C.latLng||!s.current)return;const S={lat:C.latLng.lat(),lng:C.latLng.lng()};i.current?i.current.setPosition(S):r.current&&(i.current=new window.google.maps.Marker({position:S,map:r.current})),s.current.geocode({location:S},(w,W)=>{if(W==="OK"&&w&&w[0]){const E=w[0].formatted_address,$=ta(S.lat,S.lng,f);c({lat:S.lat.toString(),lng:S.lng.toString(),title:E||"",description:"",url:$})}else{const E=ta(S.lat,S.lng,f);c({lat:S.lat.toString(),lng:S.lng.toString(),title:`${S.lat.toFixed(6)}, ${S.lng.toFixed(6)}`,description:"",url:E})}})},y=()=>{if(!(!r.current||!h))try{const C={lat:parseFloat(h.lat),lng:parseFloat(h.lng)};r.current.setCenter(C),i.current?i.current.setPosition(C):i.current=new window.google.maps.Marker({position:C,map:r.current})}catch(C){console.error("Error actualizando mapa:",C)}},I=(C,S)=>{const w=ta(C.lat,C.lng,f);c({lat:C.lat.toString(),lng:C.lng.toString(),title:S||"",description:"",url:w})};return o?t.jsx(v,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"},children:t.jsx(Ze,{})}):t.jsxs(v,{sx:{position:"relative",height:"calc(100vh - 305px)"},children:[t.jsx(Pc,{onPlaceSelected:I}),t.jsx("div",{style:{height:"100%"},ref:n})]})},Rc=({open:e,onClose:a,onSelectLocation:n,initialAddress:r})=>{const i=_e(),[s,o]=x(null),l=he(null);H(()=>{e||o(null)},[e]),H(()=>{l.current&&s&&(l.current.scrollTop=l.current.scrollHeight/4)},[s]);const d=se(h=>{o(h)},[]),p=se(()=>{s&&(n(s.title||`${s.lat}, ${s.lng}`,s.lat,s.lng),a())},[s,n,a]);return t.jsxs(ha,{open:e,onClose:a,maxWidth:"md",fullWidth:!0,disableEnforceFocus:!0,disableAutoFocus:!0,PaperProps:{sx:{maxHeight:"80vh",height:"80vh"}},sx:{"& .MuiDialog-paper":{backgroundColor:h=>h.palette.background.panel}},children:[t.jsxs(v,{sx:{position:"relative",display:"flex",alignItems:"center",p:2},children:[t.jsx(V,{variant:"body1",sx:{flex:1},children:i("global.selectLocation","Seleccionar ubicaci\xF3n")}),t.jsx(xe,{"aria-label":"close",onClick:a,size:"small",children:t.jsx(Fn,{fontSize:"small"})})]}),t.jsx(ba,{sx:{p:0,display:"flex",flexDirection:"column",height:"100%"},children:t.jsxs(v,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",overflow:"hidden",width:"100%",height:"100%",position:"relative"},children:[t.jsx(v,{ref:l,sx:{width:"100%",flex:1,overflow:"auto",zIndex:1},children:t.jsx(Nc,{onLocationChange:d,initialLocation:void 0})}),t.jsx(Sn,{sx:{width:"100%",padding:0}}),t.jsxs(v,{sx:{width:"100%",display:"flex",justifyContent:"flex-end",gap:".5rem",p:2},children:[t.jsx(Re,{variant:"outlined",color:"error",size:"small",sx:{borderRadius:"0.5rem"},onClick:a,children:i("global.cancel","Cancelar")}),t.jsx(Re,{variant:"outlined",color:"secondary",size:"small",sx:{borderRadius:"0.5rem"},onClick:p,disabled:!s,children:i("global.selectLocation","Seleccionar ubicaci\xF3n")})]})]})})]})},Oc=({locationField:e,disabled:a})=>{const n=_e(),[r,i]=x(!1),{value:s,type:o,...l}=e.attributes,d=s||"",p=()=>{a||i(!0)},h=()=>{i(!1)},m=f=>{e.actions.changeValue(f)};return a?t.jsx(v,{children:t.jsx(Je,{title:n("global.location","Ubicaci\xF3n"),children:t.jsxs(v,{sx:{display:"flex",alignItems:"center",gap:1,py:.5},children:[d&&t.jsx(Rn,{sx:{opacity:.5},fontSize:"small"}),t.jsx(V,{variant:"body1",sx:{color:f=>f.palette.text.secondary,fontSize:"0.9rem"},children:d||"-"})]})})}):t.jsxs(v,{children:[t.jsx(Je,{title:n("global.location","Ubicaci\xF3n"),children:t.jsx(je,{...l,value:d,disabled:a,size:"small",fullWidth:!0,variant:"outlined",placeholder:n("global.addLocation","Agregar ubicaci\xF3n"),onClick:p,InputProps:{startAdornment:t.jsx(Rn,{sx:{mr:1,opacity:.5},fontSize:"small"}),readOnly:!0},sx:{cursor:a?"default":"pointer","& .MuiInputBase-input":{cursor:a?"default":"pointer"}}})}),t.jsx(Rc,{open:r,onClose:h,onSelectLocation:m,initialAddress:d})]})},Bc=({handleScroll:e,contactList:a,handleSelectContact:n,selectedContactIds:r,search:i})=>{const s=_e(),o=Tn();return t.jsx(os,{sx:{width:"100%",height:"100%",overflow:"auto",border:`1px solid ${o.palette.divider}`,borderTop:"none",backgroundColor:o.palette.background.panel,backgroundImage:"linear-gradient(rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12))"},onScroll:e,children:i&&a?.map(l=>t.jsxs(ls,{sx:{width:"100%"},onClick:()=>n(l),selected:r.includes(l.id),children:[t.jsx(ma,{children:t.jsx(Cs,{sx:{color:d=>d.palette.text.disabled}})}),t.jsx(ga,{primary:s(l.name),secondary:l?.phone})]},l.id))})},zc={format:"IContact",total:0,lastPage:1,perPage:10,order:"ASC",orderColumn:"Id"};function Lc(e){const a=he(null),n=he(null),[r,i]=x([]),[s,o]=x(!1),[l,d]=x(!1),[p,h]=x(!1),[m,f]=x(!1),[c,b]=x(1),[j,y]=x(!1),I=se(()=>{n.current?.abort(),n.current=null,a.current&&(clearTimeout(a.current),a.current=null),o(!1),y(!1),b(1),f(!1),i([])},[]),C=E=>E.filter($=>!!$?.id),S=se(async({query:E,page:$})=>{if(!e)return;n.current?.abort();const A=new AbortController;n.current=A,d(!0);try{const T={...zc,currentPage:$,filter:[{value:E,column:"name",condition:""}]},z=await Cc({baseUrl:e.baseUrl,spaceId:e.spaceId,pagination:T,signal:A.signal});if(A.signal.aborted)return;const G=C(z?.contactos??[]);o(!0);const _=z?.paginacion?.total??0;i(q=>{const U=$===1?G:(()=>{const ne=new Map;for(const J of q)ne.set(J.id,J);for(const J of G)ne.set(J.id,J);return Array.from(ne.values())})();return _&&U.length>=_&&y(!0),U})}finally{d(!1),h(!1),f(!1)}},[e]),w=se(E=>{I(),E&&(a.current&&(clearTimeout(a.current),a.current=null),h(!0),a.current=setTimeout(()=>{S({query:E,page:1})},800))},[S,I]),W=se((E,$)=>{const A=E.target;if(!(A.scrollHeight-A.scrollTop-A.clientHeight<1)||j||l||!$)return;const T=c+1;f(!0),b(T),S({query:$,page:T})},[j,l,c,S]);return{contactList:r,hasSearched:s,isLoading:l,isLoadingTimer:p,isNextPage:m,handleQueryChanged:w,handleScroll:W,resetSearchState:I}}const Ur=({linkContactsHandler:e,disabled:a=!1})=>{const n=_e(),r=vr(),i=he(null),[s,o]=x(null),{action:{handleSearchChange:l,handleSelectContact:d,handleRemoveContact:p},state:{search:h,selectedContacts:m}}=e,{contactList:f,hasSearched:c,isLoading:b,isLoadingTimer:j,handleQueryChanged:y,handleScroll:I,resetSearchState:C}=Lc(r),S=h||"",w=!!s&&S.length>0&&!a,W=m.map(T=>T.id);H(()=>{S?y(S):C()},[S,y,C]);const E=T=>{l(T),T&&!s?o(i.current):T||o(null)},$=T=>{d(T),o(null),C()},A=()=>{o(null)};return a?t.jsx(Je,{title:n("global.linkContacts"),children:m.length>0?t.jsx(v,{sx:{display:"flex",flexWrap:"wrap",gap:.5,pt:.5},children:m.map(T=>t.jsx(jt,{icon:t.jsx(Za,{fontSize:"small"}),label:T.name,size:"small",variant:"outlined"},T.id))}):t.jsx(V,{variant:"body1",sx:{py:.5},children:"-"})}):t.jsx(wn,{onClickAway:A,children:t.jsxs(v,{children:[t.jsxs(Je,{title:n("global.linkContacts"),children:[t.jsx(je,{ref:i,fullWidth:!0,size:"small",placeholder:n("global.searchContacts"),value:S,onChange:T=>E(T.target.value),onFocus:()=>{S&&o(i.current)},InputProps:{startAdornment:t.jsx(Za,{sx:{mr:1,opacity:.5},fontSize:"small"}),endAdornment:b||j?t.jsx(Ze,{size:18,sx:{mr:1}}):null}}),m.length>0&&t.jsx(v,{sx:{display:"flex",flexWrap:"wrap",gap:.5,mt:1},children:m.map(T=>t.jsx(jt,{icon:t.jsx(Za,{fontSize:"small"}),label:T.name,size:"small",onDelete:()=>p(T.id)},T.id))})]}),t.jsx(jn,{open:w,anchorEl:s,placement:"bottom-start",style:{width:s?.offsetWidth||"auto",zIndex:1300},children:t.jsxs(ds,{elevation:8,sx:{mt:.5,maxHeight:300,overflow:"hidden"},children:[c&&f.length>0&&t.jsx(Bc,{handleScroll:T=>I(T,S),contactList:f,handleSelectContact:$,selectedContactIds:W,search:S}),c&&f.length===0&&t.jsx(v,{sx:{p:2,textAlign:"center",color:"text.secondary"},children:t.jsx(V,{variant:"body2",children:n("global.noResults","No se encontraron resultados")})})]})})]})})},Wc=({isFinalized:e})=>{const{eventDialog:{handleClose:a},handleCreateEvent:n,dialogMode:r,handleStartEditingEvent:i,handleSaveUpdatedEvent:s,handleEndEvent:o,dialogType:l,handleCreateTask:d,handleSaveUpdatedTask:p,selectedTask:h,handleToggleTaskCompleted:m}=lt(pn),f=_e(),c=l==="event",b=!1,j=!1,y=!1,I=()=>{c?n():d()},C=(()=>{if(r==="view")return i;if(r==="edit")return c?()=>s?.():()=>p?.();if(r==="create")return I})(),S=f(r==="view"?c?"global.editEvent":"global.editTask":r==="edit"?c?"global.saveEvent":"global.saveTask":c?"global.createEvent":"global.createTask"),w=c?b:y,W=e,E=!c&&r==="view",$=h?.isCompleted||!1;return E?t.jsx(Bt,{children:t.jsx(ut,{startIcon:t.jsx(js,{}),size:"small",loading:y,disabled:y,onClick:m,variant:"contained",color:$?"inherit":"primary",children:$?f("global.markAsIncomplete","Marcar como incompleta"):f("global.markAsCompleted","Marcar como completada")})}):t.jsxs(Bt,{children:[t.jsx(Re,{variant:"outlined",size:"small",onClick:a,color:"secondary",children:f("global.cancel")}),c&&(r==="edit"||r==="view")&&t.jsx(ut,{startIcon:t.jsx(ws,{}),size:"small",disabled:e,loading:j,onClick:o,variant:"contained",children:f("global.finalizeEvent")}),t.jsx(ut,{startIcon:t.jsx(Ss,{}),size:"small",loading:w,disabled:W,onClick:C,variant:"contained",children:S})]})},Mr={textTransform:"none",borderRadius:2,minHeight:34,px:1.5,fontSize:13,fontWeight:500,lineHeight:1.1},_c=({value:e,onChange:a,labels:n})=>t.jsxs(v,{sx:{display:"flex",gap:1},children:[t.jsx(Re,{size:"small",onClick:()=>a("event"),variant:e==="event"?"contained":"text",disableElevation:!0,color:"primary",sx:{...Mr},children:n.event}),t.jsx(Re,{size:"small",onClick:()=>a("task"),variant:e==="task"?"contained":"text",disableElevation:!0,sx:{...Mr},color:"primary",children:n.task})]}),Vc="DD/MM/YYYY",Hc="HH:mm",Gc=({selectedDateTime:e,handleSelect:a,disabled:n,isError:r=!1,hideLabel:i=!1})=>{const s=_e(),o=d=>{if(!d)return;const p=d.hour(e.hour()).minute(e.minute());a(p)},l=d=>{if(!d)return;const p=e.hour(d.hour()).minute(d.minute());a(p)};return n?t.jsxs(Fa,{children:[!i&&t.jsx("span",{style:{userSelect:"none",marginBottom:10},children:s("global.date")}),t.jsxs(v,{children:[t.jsx(V,{variant:"body1",sx:{mb:1},children:e.format(Vc)}),t.jsx(V,{variant:"body1",children:e.format(Hc)})]})]}):t.jsxs(Fa,{children:[!i&&t.jsx("span",{style:{userSelect:"none",marginBottom:10},children:s("global.date")}),t.jsx(gn,{children:t.jsxs(Mn,{dateAdapter:Nn,children:[t.jsx(va,{disabled:n,value:e,onChange:o,slotProps:{textField:()=>({label:s("global.date"),size:"small",className:"smallInput"}),popper:{sx:{"& .MuiPaper-root":{backgroundColor:d=>d.palette.background.panel}}}},sx:{alignSelf:"baseline",flex:1},minDate:X()}),t.jsx(hn,{variant:"body1",children:"_"}),t.jsx(Xa,{disabled:n,value:e,onChange:l,ampm:!1,slotProps:{textField:()=>({label:s("global.time"),size:"small",className:"smallInput"}),popper:{sx:{"& .MuiPaper-root":{backgroundColor:d=>d.palette.background.panel}}}},sx:{alignSelf:"baseline",flex:1}})]})}),t.jsx(ct,{in:r,children:t.jsx(V,{color:"red",variant:"caption",children:s("conversations.sidebar.events.errorDate")})})]})},Pr=({disabled:e,calendars:a,userId:n,value:r,onChange:i})=>{const s=_e(),o=ae(()=>a??[],[a]),l=ae(()=>o.find(d=>d.id===r)??null,[o,r]);return e?t.jsx(Je,{title:s("global.calendar"),children:t.jsxs(v,{sx:{display:"flex",alignItems:"center",gap:1,py:.5},children:[l&&t.jsx(qs,{sx:{opacity:.5,color:d=>d.palette.text.secondary},fontSize:"small"}),t.jsx(V,{variant:"subtitle2",sx:{color:d=>d.palette.text.secondary,fontSize:"0.9rem"},children:l?.title||"-"})]})}):t.jsx(Je,{title:s("global.calendar"),children:t.jsx(Ga,{disabled:e,size:"small",fullWidth:!0,options:o,value:l,onChange:(d,p)=>i(p?.id??""),getOptionLabel:d=>d?.title??"",isOptionEqualToValue:(d,p)=>d.id===p.id,groupBy:n?d=>d.userId===n?s("calendarView.myCalendars"):s("calendarView.othersCalendars"):void 0,renderGroup:d=>t.jsxs("li",{children:[t.jsx(cs,{component:"div",sx:{lineHeight:"32px",fontSize:"0.75rem",fontWeight:600,color:"text.secondary",backgroundColor:p=>p.palette.background.panel},children:d.group}),t.jsx("ul",{style:{padding:0},children:d.children})]},d.key),slotProps:{popper:{sx:{zIndex:1400}},paper:{sx:{backgroundColor:d=>d.palette.background.panel}}},renderInput:d=>t.jsx(je,{...d,placeholder:s("global.selectCalendar")})})})},Yc=({checked:e,onChange:a,disabled:n})=>{const r=_e();return t.jsx(v,{sx:{display:"flex",alignItems:"center"},children:t.jsx(Dt,{control:t.jsx(kn,{checked:e,onChange:i=>a(i.target.checked),disabled:n,color:"secondary"}),label:r("global.allDay","Todo el d\xEDa")})})},Kc=({colorField:e,disabled:a,onColorChange:n})=>{const r=_e(),i=e.attributes.value||"#1976d2",s=(l=>{if(l.startsWith("#"))return l;const d=l.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);if(d&&d[1]&&d[2]&&d[3]){const p=parseInt(d[1]),h=parseInt(d[2]),m=parseInt(d[3]),f=c=>{const b=c.toString(16);return b.length===1?"0"+b:b};return`#${f(p)}${f(h)}${f(m)}`}return"#1976d2"})(i),o=l=>{const d=l.target.value;n?n(d):e.actions.changeValue(d)};return a?t.jsx(Je,{title:r("global.color","Color"),children:t.jsxs(v,{sx:{display:"flex",gap:1,alignItems:"center"},children:[t.jsx(v,{sx:{width:40,height:40,backgroundColor:s,border:"1px solid rgba(0, 0, 0, 0.23)",borderRadius:1}}),t.jsx(V,{variant:"body2",sx:{color:"text.secondary"},children:s})]})}):t.jsx(Je,{title:r("global.color","Color"),children:t.jsx(v,{sx:{display:"flex",gap:1,alignItems:"center"},children:t.jsx("input",{type:"color",value:s,onChange:o,disabled:a,style:{width:60,height:40,border:"1px solid rgba(0, 0, 0, 0.23)",borderRadius:4,cursor:a?"not-allowed":"pointer"}})})})},Nr=[{value:"",label:"global.noRepeat"},{value:"FREQ=DAILY",label:"global.everyDay"},{value:"FREQ=WEEKLY",label:"global.everyWeek"},{value:"FREQ=MONTHLY",label:"global.everyMonth"},{value:"FREQ=YEARLY",label:"global.everyYear"},{value:"FREQ=DAILY;INTERVAL=2",label:"global.everyTwoDays"},{value:"FREQ=WEEKLY;INTERVAL=2",label:"global.everyTwoWeeks"},{value:"FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR",label:"global.everyWeekday"}],qc=({value:e,onChange:a,disabled:n,hideLabel:r=!1})=>{const i=_e(),s=p=>{a(p.target.value)},o=ae(()=>Nr.map(p=>t.jsx(dt,{value:p.value,children:i(p.label,p.label)},p.value)),[i]),l=ae(()=>{const p=Nr.find(h=>h.value===e);return p?i(p.label,p.label):i("global.noRepeat")},[e,i]);if(n)return r?t.jsxs(v,{sx:{display:"flex",alignItems:"center",gap:1},children:[t.jsx(en,{sx:{opacity:.5},fontSize:"small"}),t.jsx(V,{variant:"body2",children:l})]}):t.jsx(Je,{title:i("global.recurrence","Recurrencia"),children:t.jsxs(v,{sx:{display:"flex",alignItems:"center",gap:1,py:.5},children:[t.jsx(en,{sx:{opacity:.5},fontSize:"small"}),t.jsx(V,{variant:"body1",children:l})]})});const d=t.jsx(fa,{disabled:n,size:"small",variant:"outlined",fullWidth:!0,value:e||"",onChange:s,startAdornment:t.jsx(en,{sx:{mr:1,ml:1,opacity:.5},fontSize:"small"}),MenuProps:{PaperProps:{sx:{backgroundColor:p=>p.palette.background.panel}}},children:o});return r?d:t.jsx(Je,{title:i("global.recurrence","Recurrencia"),children:d})},Jc=({open:e,onClose:a,onConfirm:n,itemTitle:r,itemType:i})=>{const{t:s}=St(),o=()=>{n(),a()},l=i==="event"?s("calendar.deleteEvent","Eliminar evento"):s("calendar.deleteTask","Eliminar tarea"),d=i==="event"?s("calendar.confirmDeleteEvent","\xBFEst\xE1s seguro de que quer\xE9s eliminar este evento?"):s("calendar.confirmDeleteTask","\xBFEst\xE1s seguro de que quer\xE9s eliminar esta tarea?");return t.jsxs(ha,{open:e,onClose:a,maxWidth:"xs",fullWidth:!0,PaperProps:{sx:{backgroundColor:p=>p.palette.background.panel}},children:[t.jsxs(qa,{sx:{display:"flex",alignItems:"center",gap:1},children:[t.jsx(Js,{color:"warning"}),l]}),t.jsxs(ba,{children:[t.jsx(V,{variant:"body2",sx:{mb:2},children:d}),r&&t.jsx(v,{sx:{p:1.5,bgcolor:"action.hover",borderRadius:1,borderLeft:3,borderColor:"warning.main"},children:t.jsxs(V,{variant:"body2",sx:{fontWeight:500},children:['"',r,'"']})})]}),t.jsxs(Bt,{sx:{px:3,pb:2},children:[t.jsx(Re,{onClick:a,variant:"outlined",color:"inherit",sx:{borderRadius:"8px"},children:s("global.cancel","Cancelar")}),t.jsx(Re,{onClick:o,variant:"contained",color:"error",sx:{borderRadius:"8px"},children:s("global.delete","Eliminar")})]})]})},Qc=({open:e,onClose:a,onConfirm:n,eventTitle:r})=>{const{t:i}=St(),[s,o]=x("single"),l=()=>{n(s==="all"),a()},d=()=>{o("single"),a()};return t.jsxs(ha,{open:e,onClose:d,maxWidth:"xs",fullWidth:!0,PaperProps:{sx:{backgroundColor:p=>p.palette.background.panel}},children:[t.jsx(qa,{children:i("calendar.deleteRecurringEvent","Borrar evento recurrente")}),t.jsxs(ba,{children:[r&&t.jsxs(v,{sx:{mb:2,color:"text.secondary",fontSize:"0.875rem"},children:['"',r,'"']}),t.jsx(Ya,{component:"fieldset",fullWidth:!0,children:t.jsxs(En,{value:s,onChange:p=>o(p.target.value),children:[t.jsx(Dt,{value:"single",control:t.jsx(ya,{color:"secondary"}),label:i("calendar.deleteThisEvent","Este evento"),sx:{mb:1}}),t.jsx(Dt,{value:"all",control:t.jsx(ya,{color:"secondary"}),label:i("calendar.deleteAllEvents","Todos los eventos")})]})})]}),t.jsxs(Bt,{sx:{px:3,pb:2},children:[t.jsx(Re,{onClick:d,variant:"outlined",color:"inherit",sx:{borderRadius:"8px"},children:i("global.cancel","Cancelar")}),t.jsx(Re,{onClick:l,variant:"contained",color:"error",sx:{borderRadius:"8px"},children:i("global.delete","Eliminar")})]})]})},Xc=({open:e,onClose:a,onConfirm:n,eventTitle:r})=>{const{t:i}=St(),[s,o]=x("single"),l=()=>{n(s==="all"),a()},d=()=>{o("single"),a()};return t.jsxs(ha,{open:e,onClose:d,maxWidth:"xs",fullWidth:!0,PaperProps:{sx:{backgroundColor:p=>p.palette.background.panel}},children:[t.jsx(qa,{children:i("calendar.editRecurringEvent","Editar evento recurrente")}),t.jsxs(ba,{children:[r&&t.jsxs(v,{sx:{mb:2,color:"text.secondary",fontSize:"0.875rem"},children:['"',r,'"']}),t.jsx(Ya,{component:"fieldset",fullWidth:!0,children:t.jsxs(En,{value:s,onChange:p=>o(p.target.value),children:[t.jsx(Dt,{value:"single",control:t.jsx(ya,{color:"secondary"}),label:i("calendar.editThisEvent","Este evento"),sx:{mb:1}}),t.jsx(Dt,{value:"all",control:t.jsx(ya,{color:"secondary"}),label:i("calendar.editAllEvents","Todos los eventos")})]})})]}),t.jsxs(Bt,{sx:{px:3,pb:2},children:[t.jsx(Re,{onClick:d,variant:"outlined",color:"inherit",sx:{borderRadius:"8px"},children:i("global.cancel","Cancelar")}),t.jsx(Re,{onClick:l,variant:"contained",color:"secondary",sx:{borderRadius:"8px"},children:i("global.save","Guardar")})]})]})},Zc=()=>{const e=_e(),{event:a,task:n,dialogMode:r,selectedEvent:i,handleDeleteEvent:s,handleStartEditingEvent:o,handleDuplicateItem:l,dialogType:d,setDialogType:p,selectedTask:h,taskCalendarId:m,setTaskCalendarId:f,eventCalendarId:c,setEventCalendarId:b,myCalendars:j,otherCalendars:y,handleDeleteTask:I,userManuallyChangedColor:C,setUserManuallyChangedColor:S,eventDialog:{open:w,handleClose:W},confirmDeleteDialog:E,handleConfirmDelete:$,deleteRecurringDialog:A,handleConfirmDeleteRecurring:T,editRecurringDialog:z,handleConfirmEditRecurring:G,hiddenTabs:_}=lt(pn);if(!a||!n)return t.jsx(Ot,{open:w,onClose:W,closeAfterTransition:!0,slots:{backdrop:Ka},slotProps:{backdrop:{timeout:200}},children:t.jsx(ct,{in:w,timeout:200,children:t.jsx(v,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"min(640px, calc(100vw - 32px))",height:"min(560px, calc(100vh - 64px))",bgcolor:O=>O.palette.background.panel,borderRadius:3,boxShadow:24,outline:0,p:3,overflow:"visible"}})})});const q=d==="event",U=q?a:n,ne=q?i:h,J=he(null),B=he(null);H(()=>{w||(J.current=null,B.current=null)},[w]);const{titleField:k,descriptionField:M,date:P,linkContact:R}=U,Y=q?a.notifications:null,K=q?{locationField:a.locationField,colorField:a.colorField,allDay:a.allDay,setAllDay:a.setAllDay,isPrivate:a.isPrivate,setIsPrivate:a.setIsPrivate,recurrenceRule:a.recurrenceRule,setRecurrenceRule:a.setRecurrenceRule}:null,ie=e(r==="edit"?q?"global.editEvent":"global.editTask":r==="create"?q?"global.createEvent":"global.createTask":q?"global.showEvent":"global.showTask"),me=(r==="edit"||r==="view")&&!!ne?.id,ye=r==="view";H(()=>{if(r!=="create"||d!=="event"||!w||C||!c)return;const O=j.find(Ae=>Ae.id===c);O?.color&&a.colorField.actions.changeValue(O.color)},[r,d,w,c,C,j]),H(()=>{if(!w||d!=="event"||r!=="edit")return;const O=P.state.selectedStartDate.isAfter(P.state.selectedEndDate)&&!P.state.selectedStartDate.isSame(P.state.selectedEndDate,"minute");B.current!==O&&(B.current=O,P.action.setError(O))},[w,d,r,P.state.selectedStartDate.valueOf(),P.state.selectedEndDate.valueOf()]),H(()=>{if(!w||r==="create")return;const O=ne?.relatedContact;O?.id&&J.current!==O.id&&(J.current=O.id,R.action.resetField(),R.action.handleSelectContact({id:O.id,name:O.name}))},[w,r,ne?.id]);const Ee=O=>{if(O==="task"){const Ae=a.date.state.selectedStartDate;n.date.action.setSelectedStartDate(Ae),n.date.action.setSelectedEndDate(Ae),n.date.action.setError(!1),a.date.action.setError(!1)}else{const Ae=n.date.state.selectedStartDate;a.date.action.setSelectedStartDate(Ae),a.date.action.setError(!1),n.date.action.setError(!1)}p(O)},Ie=O=>{a.colorField.actions.changeValue(O),S(!0)};return t.jsxs(t.Fragment,{children:[t.jsx(Ot,{open:w,onClose:W,closeAfterTransition:!0,slots:{backdrop:Ka},slotProps:{backdrop:{timeout:200}},children:t.jsx(ct,{in:w,timeout:200,children:t.jsxs(v,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"min(640px, calc(100vw - 32px))",maxHeight:"calc(100vh - 64px)",bgcolor:O=>O.palette.background.panel,borderRadius:3,boxShadow:24,outline:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:[t.jsxs(v,{sx:{display:"flex",flexDirection:"column",gap:2,p:3,pt:4,overflowY:"auto",flex:1},children:[t.jsxs(v,{sx:{display:"flex",alignItems:"center",justifyContent:r==="create"?"flex-end":"space-between",gap:1,mb:.5},children:[r!=="create"&&t.jsx(V,{sx:{fontWeight:600},children:ie}),t.jsxs(v,{sx:{display:"flex",gap:1},children:[ye&&t.jsx(xe,{size:"small",onClick:o,"aria-label":e("global.edit","Editar"),children:t.jsx(zt,{fontSize:"small"})}),me&&t.jsx(xe,{size:"small",onClick:q?s:I,color:"error","aria-label":e("global.delete","Eliminar"),children:t.jsx(xa,{fontSize:"small"})}),ye&&t.jsx(xe,{size:"small",onClick:l,"aria-label":e("global.duplicate","Duplicar"),children:t.jsx(Qs,{fontSize:"small"})})]})]}),r==="create"&&t.jsxs(t.Fragment,{children:[t.jsx(bn,{disabled:!1,titleField:k,variantMode:"inline"}),!_&&t.jsx(_c,{value:d,onChange:Ee,labels:{event:e("global.event","Evento"),task:e("global.task","Tarea")}})]}),d==="event"?t.jsxs(t.Fragment,{children:[r!=="create"&&t.jsx(bn,{disabled:r==="view",titleField:k}),t.jsx(Dr,{disabled:r==="view",descriptionField:M}),t.jsx(Pr,{disabled:r==="view",calendars:[...j,...y],userId:j[0]?.userId,value:c,onChange:O=>b(O)}),t.jsxs(v,{sx:{display:"flex",flexDirection:"column",gap:1.5,borderRadius:1,padding:"15px",bgcolor:O=>O.palette.mode==="dark"?"rgba(255, 255, 255, 0.05)":"rgba(0, 0, 0, 0.02)"},children:[t.jsx(v,{sx:{display:"flex",gap:1.5,alignItems:"flex-start"},children:t.jsx(v,{sx:{flex:1},children:t.jsx(wc,{disabled:r==="view",selectedStartDate:P.state.selectedStartDate,selectedEndDate:P.state.selectedEndDate,handleSelectStart:P.action.handleSelect(P.action.setSelectedStartDate),handleSelectEnd:P.action.handleSelect(P.action.setSelectedEndDate),isError:P.state.error,hideLabel:!0,allDay:K?.allDay??!1})})}),K&&t.jsxs(v,{sx:{display:"flex",gap:2,alignItems:"center"},children:[t.jsx(Yc,{checked:K.allDay,onChange:K.setAllDay,disabled:r==="view"}),t.jsx(v,{sx:{flex:1},children:t.jsx(qc,{disabled:r==="view",value:K.recurrenceRule,onChange:K.setRecurrenceRule,hideLabel:!0})})]})]}),K&&t.jsx(t.Fragment,{children:t.jsx(Kc,{disabled:r==="view",colorField:K.colorField,onColorChange:r==="create"?Ie:void 0})}),Y&&t.jsx(Mc,{disabled:r==="view",notificationsField:Y}),t.jsx(Ur,{linkContactsHandler:R,disabled:r==="view"}),K&&t.jsx(Oc,{disabled:r==="view",locationField:K.locationField})]}):t.jsxs(t.Fragment,{children:[r!=="create"&&t.jsx(bn,{disabled:r==="view",titleField:k}),t.jsx(Dr,{disabled:r==="view",descriptionField:M}),t.jsx(Pr,{disabled:r==="view",calendars:[...j,...y],userId:j[0]?.userId,value:m,onChange:O=>f(O)}),t.jsx(v,{sx:{display:"flex",flexDirection:"column",gap:1.5,p:2,borderRadius:1,bgcolor:O=>O.palette.mode==="dark"?"rgba(255, 255, 255, 0.05)":"rgba(0, 0, 0, 0.02)"},children:t.jsxs(v,{sx:{display:"flex",gap:1.5,alignItems:"flex-start"},children:[t.jsx(Xs,{sx:{mt:.5,color:"text.secondary",fontSize:"1.25rem"}}),t.jsx(v,{sx:{flex:1},children:t.jsx(Gc,{disabled:r==="view",selectedDateTime:P.state.selectedStartDate,handleSelect:O=>{P.action.setSelectedStartDate(O),P.action.setSelectedEndDate(O),P.action.setError(!1)},isError:P.state.error,hideLabel:!0})})]})}),t.jsx(Ur,{linkContactsHandler:R,disabled:r==="view"})]})]}),t.jsx(v,{sx:{borderTop:1,borderColor:"divider",p:2},children:t.jsx(Wc,{isFinalized:i?.finalized})})]})})}),t.jsx(Jc,{open:E.open,onClose:E.handleClose,onConfirm:$,itemTitle:E.itemType==="event"?i?.title:h?.title,itemType:E.itemType}),t.jsx(Qc,{open:A.open,onClose:A.handleClose,onConfirm:T,eventTitle:i?.title}),t.jsx(Xc,{open:z.open,onClose:z.handleClose,onConfirm:G,eventTitle:i?.title})]})},Rr=e=>{const a=e.palette.background;return Le({...e,components:{MuiSelect:{defaultProps:{MenuProps:{PaperProps:{sx:{backgroundColor:a.panel,backgroundImage:"linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05))"}}}}},MuiAutocomplete:{styleOverrides:{popper:{zIndex:11,"& div":{backgroundColor:a.panel}}}},MuiPaper:{styleOverrides:{root:{backgroundColor:a.panel,backgroundImage:"linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05))"}}},MuiMenu:{styleOverrides:{paper:{backgroundColor:a.panel,backgroundImage:"linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05))"}}},MuiList:{styleOverrides:{root:{padding:0}}},MuiModal:{styleOverrides:{root:{}}},MuiTypography:{styleOverrides:{root:{color:e.palette.text.primary}}},MuiChip:{styleOverrides:{root:{color:e.palette.text.primary,border:"1px solid rgba(0, 0, 0, 0.1)",borderRadius:"4px",height:"20px",fontSize:"0.7125rem"}}},MuiListSubheader:{styleOverrides:{root:{backgroundColor:a.accordionHeader}}},MuiButton:{styleOverrides:{outlined:{color:e.palette.mode==="light"?e.palette.primary.dark:e.palette.info.dark,borderColor:e.palette.mode==="light"?e.palette.primary.dark:e.palette.info.dark,"&:hover":{borderColor:e.palette.mode==="light"?e.palette.primary.main:e.palette.info.main,color:e.palette.mode==="light"?e.palette.primary.main:e.palette.info.main}}}}}})},eu=e=>{const{open:a,onClose:n,baseUrl:r,spaceId:i,language:s="en",mode:o="create",type:l="event",eventCalendarId:d,taskCalendarId:p,selectedEvent:h,selectedTask:m,hiddenTabs:f=!1,onActionComplete:c,contactId:b}=e,{i18n:j}=St();return H(()=>{s&&j.changeLanguage(s)},[s,j]),t.jsx(Md,{value:{baseUrl:r,spaceId:i},children:t.jsx(jc,{externalOpen:a,externalOnClose:n,externalMode:o,externalType:l,externalEventCalendarId:d,externalTaskCalendarId:p,externalSelectedEvent:h,externalSelectedTask:m,hiddenTabs:f,externalOnActionComplete:c,externalContactId:b,children:t.jsx(Zc,{})})})},tu=e=>{const a=Tn(),n=a?.palette?a:Le(),r=Rr(n);return t.jsx(us,{theme:r,children:t.jsx(Ja,{i18n:Gt,children:t.jsx(eu,{...e})})})},Ma=Le({name:"lightBlueIndigo",palette:{mode:"light",background:{default:"#ffffff",mainCenter:"#ebf6fd",mainGradient:"linear-gradient(270deg, #215c97, #1976d2)",navMenu:"#1976d2",dropdownMenu:"#f5f5f5",panel:"#ffffff",tooltip:"#1976d2",accordionHeader:"#F3F4F6",panelHeader:"#F3F4F6",panelCenter:"#ffffff",panelGradient:"#ffffff",paper:"#ffffff"},primary:{main:"#1976d2",light:"#42a5f5",dark:"#1565c0",contrastText:"#fff"},secondary:{main:"#1976d2",light:"#ba68c8",dark:"#7b1fa2",contrastText:"rgba(0, 0, 0, 0.87)"},error:{main:"#d32f2f",light:"#ef5350",dark:"#c62828"},warning:{main:"#ed6c02",light:"#ff9800",dark:"#e65100"},info:{main:"#0288d1",light:"#03a9f4",dark:"#01579b"},success:{main:"#2e7d32",light:"#4caf50",dark:"#1b5e20"},containerBox:{default:"#ffffff",main:"#f5f5f5"},action:{active:"rgba(0, 0, 0, 0.10)",hover:"rgba(0, 0, 0, 0.05)",selected:"#ebf6fd",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(255, 255, 255, 0.12)"},text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.58)",colorMain:"#1976d2"},divider:"rgba(0, 0, 0, 0.12)",dropdownBox:"#ffffff",color:{icons:"#1976d2"},cellHeader:"#d3d3d3",Skeleton:{bg:"#f5f5f5"},messageBox:"#d3e6fd",boxShadow:"rgba(0, 0, 0, 0.1)",disabled:"rgba(0, 0, 0, 0.26)"}}),Or=Le({name:"lightBlue",palette:{mode:"light",background:{default:"#ffffff",mainCenter:"#e3f2fd",mainGradient:"linear-gradient(270deg, #005cb2, #1e88e5)",navMenu:"#4fc354",dropdownMenu:"#f5f5f5",panel:"#ffffff",tooltip:"#1e88e5",accordionHeader:"#F3F4F6",panelHeader:"#F3F4F6",panelCenter:"#ffffff",panelGradient:"#ffffff",paper:"#ffffff"},primary:{main:"#1e88e5",light:"#6ab7ff",dark:"#005cb2",contrastText:"#fff"},secondary:{main:"#1e88e5",light:"#ba68c8",dark:"#7b1fa2",contrastText:"rgba(0, 0, 0, 0.87)"},error:{main:"#d32f2f",light:"#ef5350",dark:"#c62828"},warning:{main:"#ed6c02",light:"#ff9800",dark:"#e65100"},info:{main:"#0288d1",light:"#03a9f4",dark:"#01579b"},success:{main:"#2e7d32",light:"#4caf50",dark:"#1b5e20"},containerBox:{default:"#ffffff",main:"#f5f5f5"},action:{active:"rgba(0, 0, 0, 0.10)",hover:"rgba(0, 0, 0, 0.05)",selected:"#e3f2fd",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(255, 255, 255, 0.12)"},text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.58)",colorMain:"#1e88e5"},divider:"rgba(0, 0, 0, 0.12)",dropdownBox:"#ffffff",color:{icons:"#1e88e5"},cellHeader:"#d3d3d3",Skeleton:{bg:"#f5f5f5"},messageBox:"#d3e6fd",boxShadow:"rgba(0, 0, 0, 0.1)",disabled:"rgba(0, 0, 0, 0.26)"}}),Br=Le({name:"lightRed",palette:{mode:"light",background:{default:"#ffffff",mainCenter:"#ffebee",mainGradient:"linear-gradient(270deg, #b61827, #ef5350)",navMenu:"#f44336",dropdownMenu:"#f5f5f5",panel:"#ffffff",tooltip:"#ef5350",accordionHeader:"#F3F4F6",panelHeader:"#F3F4F6",panelCenter:"#ffffff",panelGradient:"#ffffff",paper:"#ffffff"},primary:{main:"#ef5350",light:"#ff867c",dark:"#b61827",contrastText:"#fff"},secondary:{main:"#ef5350",light:"#ba68c8",dark:"#7b1fa2",contrastText:"rgba(0, 0, 0, 0.87)"},error:{main:"#d32f2f",light:"#ef5350",dark:"#c62828"},warning:{main:"#ed6c02",light:"#ff9800",dark:"#e65100"},info:{main:"#0288d1",light:"#03a9f4",dark:"#01579b"},success:{main:"#2e7d32",light:"#4caf50",dark:"#1b5e20"},containerBox:{default:"#ffffff",main:"#f5f5f5"},action:{active:"rgba(0, 0, 0, 0.10)",hover:"rgba(0, 0, 0, 0.05)",selected:"#ffebee",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(255, 255, 255, 0.12)"},text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.58)",colorMain:"#ef5350"},divider:"rgba(0, 0, 0, 0.12)",dropdownBox:"#ffffff",color:{icons:"#ef5350"},cellHeader:"#d3d3d3",Skeleton:{bg:"#f5f5f5"},messageBox:"#d3e6fd",boxShadow:"rgba(0, 0, 0, 0.1)",disabled:"rgba(0, 0, 0, 0.26)"}}),zr=Le({name:"lightGreen",palette:{mode:"light",background:{default:"#ffffff",mainCenter:"#e8f5e9",mainGradient:"linear-gradient(270deg, #087f23, #4caf50)",navMenu:"#4fc354",dropdownMenu:"#f5f5f5",panel:"#ffffff",tooltip:"#4caf50",accordionHeader:"#F3F4F6",panelHeader:"#F3F4F6",panelCenter:"#ffffff",panelGradient:"#ffffff",paper:"#ffffff"},primary:{main:"#4caf50",light:"#80e27e",dark:"#087f23",contrastText:"#fff"},secondary:{main:"#4caf50",light:"#ba68c8",dark:"#7b1fa2",contrastText:"rgba(0, 0, 0, 0.87)"},error:{main:"#d32f2f",light:"#ef5350",dark:"#c62828"},warning:{main:"#ed6c02",light:"#ff9800",dark:"#e65100"},info:{main:"#0288d1",light:"#03a9f4",dark:"#01579b"},success:{main:"#2e7d32",light:"#4caf50",dark:"#1b5e20"},containerBox:{default:"#ffffff",main:"#f5f5f5"},action:{active:"rgba(0, 0, 0, 0.10)",hover:"rgba(0, 0, 0, 0.05)",selected:"#e8f5e9",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(255, 255, 255, 0.12)"},text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.58)",colorMain:"#4caf50"},divider:"rgba(0, 0, 0, 0.12)",dropdownBox:"#ffffff",color:{icons:"#4caf50"},cellHeader:"#d3d3d3",Skeleton:{bg:"#f5f5f5"},messageBox:"#d3e6fd",boxShadow:"rgba(0, 0, 0, 0.1)",disabled:"rgba(0, 0, 0, 0.26)"}}),Lr=Le({name:"lightPink",palette:{mode:"light",background:{default:"#ffffff",mainCenter:"#fce4ec",mainGradient:"linear-gradient(270deg, #b0003a, #e91e63)",navMenu:"#e91e63",dropdownMenu:"#f5f5f5",panel:"#ffffff",tooltip:"#e91e63",accordionHeader:"#F3F4F6",panelHeader:"#F3F4F6",panelCenter:"#ffffff",panelGradient:"#ffffff",paper:"#ffffff"},primary:{main:"#e91e63",light:"#ff6090",dark:"#b0003a",contrastText:"#fff"},secondary:{main:"#9c27b0",light:"#ba68c8",dark:"#7b1fa2",contrastText:"rgba(0, 0, 0, 0.87)"},error:{main:"#d32f2f",light:"#ef5350",dark:"#c62828"},warning:{main:"#ed6c02",light:"#ff9800",dark:"#e65100"},info:{main:"#0288d1",light:"#03a9f4",dark:"#01579b"},success:{main:"#2e7d32",light:"#4caf50",dark:"#1b5e20"},containerBox:{default:"#ffffff",main:"#f5f5f5"},action:{active:"rgba(0, 0, 0, 0.10)",hover:"rgba(0, 0, 0, 0.05)",selected:"#fce4ec",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(255, 255, 255, 0.12)"},text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.58)",colorMain:"#e91e63"},divider:"rgba(0, 0, 0, 0.12)",dropdownBox:"#ffffff",color:{icons:"#e91e63"},cellHeader:"#d3d3d3",Skeleton:{bg:"#f5f5f5"},messageBox:"#d3e6fd",boxShadow:"rgba(0, 0, 0, 0.1)",disabled:"rgba(0, 0, 0, 0.26)"}}),Wr=Le({name:"lightPurple",palette:{mode:"light",background:{default:"#ffffff",mainCenter:"#f3e5f5",mainGradient:"linear-gradient(270deg, #6a0080, #9c27b0)",navMenu:"#f8bbd0",dropdownMenu:"#f5f5f5",panel:"#ffffff",tooltip:"#9c27b0",accordionHeader:"#F3F4F6",panelHeader:"#F3F4F6",panelCenter:"#ffffff",panelGradient:"#ffffff",paper:"#ffffff"},primary:{main:"#9c27b0",light:"#d05ce3",dark:"#6a0080",contrastText:"#fff"},secondary:{main:"#9c27b0",light:"#ba68c8",dark:"#7b1fa2",contrastText:"rgba(0, 0, 0, 0.87)"},error:{main:"#d32f2f",light:"#ef5350",dark:"#c62828"},warning:{main:"#ed6c02",light:"#ff9800",dark:"#e65100"},info:{main:"#0288d1",light:"#03a9f4",dark:"#01579b"},success:{main:"#2e7d32",light:"#4caf50",dark:"#1b5e20"},containerBox:{default:"#ffffff",main:"#f5f5f5"},action:{active:"rgba(0, 0, 0, 0.10)",hover:"rgba(0, 0, 0, 0.05)",selected:"#f3e5f5",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(255, 255, 255, 0.12)"},text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.58)",colorMain:"#9c27b0"},divider:"rgba(0, 0, 0, 0.12)",dropdownBox:"#ffffff",color:{icons:"#9c27b0"},cellHeader:"#d3d3d3",Skeleton:{bg:"#f5f5f5"},messageBox:"#d3e6fd",boxShadow:"rgba(0, 0, 0, 0.1)",disabled:"rgba(0, 0, 0, 0.26)"}}),_r=Le({name:"lightTeal",palette:{mode:"light",background:{default:"#ffffff",mainCenter:"#e0f2f1",mainGradient:"linear-gradient(270deg, #00675b, #009688)",navMenu:"#f8bbd0",dropdownMenu:"#f5f5f5",panel:"#ffffff",tooltip:"#009688",accordionHeader:"#F3F4F6",panelHeader:"#F3F4F6",panelCenter:"#ffffff",panelGradient:"#ffffff",paper:"#ffffff"},primary:{main:"#009688",light:"#52c7b8",dark:"#00675b",contrastText:"#fff"},secondary:{main:"#009688",light:"#ba68c8",dark:"#7b1fa2",contrastText:"rgba(0, 0, 0, 0.87)"},error:{main:"#d32f2f",light:"#ef5350",dark:"#c62828"},warning:{main:"#ed6c02",light:"#ff9800",dark:"#e65100"},info:{main:"#0288d1",light:"#03a9f4",dark:"#01579b"},success:{main:"#2e7d32",light:"#4caf50",dark:"#1b5e20"},containerBox:{default:"#ffffff",main:"#f5f5f5"},action:{active:"rgba(0, 0, 0, 0.10)",hover:"rgba(0, 0, 0, 0.05)",selected:"#e0f2f1",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(255, 255, 255, 0.12)"},text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.58)",colorMain:"#009688"},divider:"rgba(0, 0, 0, 0.12)",dropdownBox:"#ffffff",color:{icons:"#009688"},cellHeader:"#d3d3d3",Skeleton:{bg:"#f5f5f5"},messageBox:"#d3e6fd",boxShadow:"rgba(0, 0, 0, 0.1)",disabled:"rgba(0, 0, 0, 0.26)"}}),Vr=Le({name:"lightLime",palette:{mode:"light",background:{default:"#ffffff",mainCenter:"#f9fbe7",mainGradient:"linear-gradient(270deg, #99aa00, #cddc39)",navMenu:"#f8bbd0",dropdownMenu:"#f5f5f5",panel:"#ffffff",tooltip:"#cddc39",accordionHeader:"#F3F4F6",panelHeader:"#F3F4F6",panelCenter:"#ffffff",panelGradient:"#ffffff",paper:"#ffffff"},primary:{main:"#cddc39",light:"#ffff6e",dark:"#99aa00",contrastText:"#fff"},secondary:{main:"#cddc39",light:"#ba68c8",dark:"#7b1fa2",contrastText:"rgba(0, 0, 0, 0.87)"},error:{main:"#d32f2f",light:"#ef5350",dark:"#c62828"},warning:{main:"#ed6c02",light:"#ff9800",dark:"#e65100"},info:{main:"#0288d1",light:"#03a9f4",dark:"#01579b"},success:{main:"#2e7d32",light:"#4caf50",dark:"#1b5e20"},containerBox:{default:"#ffffff",main:"#f5f5f5"},action:{active:"rgba(0, 0, 0, 0.10)",hover:"rgba(0, 0, 0, 0.05)",selected:"#f9fbe7",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(255, 255, 255, 0.12)"},text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.58)",colorMain:"#cddc39"},divider:"rgba(0, 0, 0, 0.12)",dropdownBox:"#ffffff",color:{icons:"#cddc39"},cellHeader:"#d3d3d3",Skeleton:{bg:"#f5f5f5"},messageBox:"#d3e6fd",boxShadow:"rgba(0, 0, 0, 0.1)",disabled:"rgba(0, 0, 0, 0.26)"}}),Hr=Le({name:"lightYellow",palette:{mode:"light",background:{default:"#ffffff",mainCenter:"#fffde7",mainGradient:"linear-gradient(270deg, #c8b900, #ffeb3b)",navMenu:"#f8bbd0",dropdownMenu:"#f5f5f5",panel:"#ffffff",tooltip:"#ffeb3b",accordionHeader:"#F3F4F6",panelHeader:"#F3F4F6",panelCenter:"#ffffff",panelGradient:"#ffffff",paper:"#ffffff"},primary:{main:"#ffeb3b",light:"#ffff72",dark:"#c8b900",contrastText:"#fff"},secondary:{main:"#ffeb3b",light:"#ba68c8",dark:"#7b1fa2",contrastText:"rgba(0, 0, 0, 0.87)"},error:{main:"#d32f2f",light:"#ef5350",dark:"#c62828"},warning:{main:"#ed6c02",light:"#ff9800",dark:"#e65100"},info:{main:"#0288d1",light:"#03a9f4",dark:"#01579b"},success:{main:"#2e7d32",light:"#4caf50",dark:"#1b5e20"},containerBox:{default:"#ffffff",main:"#f5f5f5"},action:{active:"rgba(0, 0, 0, 0.10)",hover:"rgba(0, 0, 0, 0.05)",selected:"#fffde7",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(255, 255, 255, 0.12)"},text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.58)",colorMain:"#ffeb3b"},divider:"rgba(0, 0, 0, 0.12)",dropdownBox:"#ffffff",color:{icons:"#ffeb3b"},cellHeader:"#d3d3d3",Skeleton:{bg:"#f5f5f5"},messageBox:"#d3e6fd",boxShadow:"rgba(0, 0, 0, 0.1)",disabled:"rgba(0, 0, 0, 0.26)"}}),Gr=Le({name:"lightAmber",palette:{mode:"light",background:{default:"#ffffff",mainCenter:"#fff8e1",mainGradient:"linear-gradient(270deg, #c68400, #ffb300)",navMenu:"#f8bbd0",dropdownMenu:"#f5f5f5",panel:"#ffffff",tooltip:"#ffb300",accordionHeader:"#F3F4F6",panelHeader:"#F3F4F6",panelCenter:"#ffffff",panelGradient:"#ffffff",paper:"#ffffff"},primary:{main:"#ffb300",light:"#ffe54c",dark:"#c68400",contrastText:"#fff"},secondary:{main:"#ffb300",light:"#ba68c8",dark:"#7b1fa2",contrastText:"rgba(0, 0, 0, 0.87)"},error:{main:"#d32f2f",light:"#ef5350",dark:"#c62828"},warning:{main:"#ed6c02",light:"#ff9800",dark:"#e65100"},info:{main:"#0288d1",light:"#03a9f4",dark:"#01579b"},success:{main:"#2e7d32",light:"#4caf50",dark:"#1b5e20"},containerBox:{default:"#ffffff",main:"#f5f5f5"},action:{active:"rgba(0, 0, 0, 0.10)",hover:"rgba(0, 0, 0, 0.05)",selected:"#fff8e1",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(255, 255, 255, 0.12)"},text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.58)",colorMain:"#ffb300"},divider:"rgba(0, 0, 0, 0.12)",dropdownBox:"#ffffff",color:{icons:"#ffb300"},cellHeader:"#d3d3d3",Skeleton:{bg:"#f5f5f5"},messageBox:"#d3e6fd",boxShadow:"rgba(0, 0, 0, 0.1)",disabled:"rgba(0, 0, 0, 0.26)"}}),Yr=Le({name:"lightOrange",palette:{mode:"light",background:{default:"#ffffff",mainCenter:"#fff3e0",mainGradient:"linear-gradient(270deg, #c66900, #ff9800)",navMenu:"#f8bbd0",dropdownMenu:"#f5f5f5",panel:"#ffffff",tooltip:"#ff9800",accordionHeader:"#F3F4F6",panelHeader:"#F3F4F6",panelCenter:"#ffffff",panelGradient:"#ffffff",paper:"#ffffff"},primary:{main:"#ff9800",light:"#ffc947",dark:"#c66900",contrastText:"#fff"},secondary:{main:"#ff9800",light:"#ba68c8",dark:"#7b1fa2",contrastText:"rgba(0, 0, 0, 0.87)"},error:{main:"#d32f2f",light:"#ef5350",dark:"#c62828"},warning:{main:"#ed6c02",light:"#ff9800",dark:"#e65100"},info:{main:"#0288d1",light:"#03a9f4",dark:"#01579b"},success:{main:"#2e7d32",light:"#4caf50",dark:"#1b5e20"},containerBox:{default:"#ffffff",main:"#f5f5f5"},action:{active:"rgba(0, 0, 0, 0.10)",hover:"rgba(0, 0, 0, 0.05)",selected:"#fff3e0",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(255, 255, 255, 0.12)"},text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.58)",colorMain:"#ff9800"},divider:"rgba(0, 0, 0, 0.12)",dropdownBox:"#ffffff",color:{icons:"#ff9800"},cellHeader:"#d3d3d3",Skeleton:{bg:"#f5f5f5"},messageBox:"#d3e6fd",boxShadow:"rgba(0, 0, 0, 0.1)",disabled:"rgba(0, 0, 0, 0.26)"}}),Kr=Le({name:"lightBrown",palette:{mode:"light",background:{default:"#ffffff",mainCenter:"#efebe9",mainGradient:"linear-gradient(270deg, #4b2c20, #795548)",navMenu:"#f8bbd0",dropdownMenu:"#f5f5f5",panel:"#ffffff",tooltip:"#795548",accordionHeader:"#F3F4F6",panelHeader:"#F3F4F6",panelCenter:"#ffffff",panelGradient:"#ffffff",paper:"#ffffff"},primary:{main:"#795548",light:"#a98274",dark:"#4b2c20",contrastText:"#fff"},secondary:{main:"#795548",light:"#ba68c8",dark:"#7b1fa2",contrastText:"rgba(0, 0, 0, 0.87)"},error:{main:"#d32f2f",light:"#ef5350",dark:"#c62828"},warning:{main:"#ed6c02",light:"#ff9800",dark:"#e65100"},info:{main:"#0288d1",light:"#03a9f4",dark:"#01579b"},success:{main:"#2e7d32",light:"#4caf50",dark:"#1b5e20"},containerBox:{default:"#ffffff",main:"#f5f5f5"},action:{active:"rgba(0, 0, 0, 0.10)",hover:"rgba(0, 0, 0, 0.05)",selected:"#efebe9",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(255, 255, 255, 0.12)"},text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.58)",colorMain:"#795548"},divider:"rgba(0, 0, 0, 0.12)",dropdownBox:"#ffffff",color:{icons:"#795548"},cellHeader:"#d3d3d3",Skeleton:{bg:"#f5f5f5"},messageBox:"#d3e6fd",boxShadow:"rgba(0, 0, 0, 0.1)",disabled:"rgba(0, 0, 0, 0.26)"}}),qr=Le({name:"lightGray",palette:{mode:"light",background:{default:"#ffffff",mainCenter:"#fafafa",mainGradient:"linear-gradient(270deg, #707070, #9e9e9e)",navMenu:"#f8bbd0",dropdownMenu:"#f5f5f5",panel:"#ffffff",tooltip:"#9e9e9e",accordionHeader:"#F3F4F6",panelHeader:"#F3F4F6",panelCenter:"#ffffff",panelGradient:"#ffffff",paper:"#ffffff"},primary:{main:"#9e9e9e",light:"#cfcfcf",dark:"#707070",contrastText:"#fff"},secondary:{main:"#9e9e9e",light:"#ba68c8",dark:"#7b1fa2",contrastText:"rgba(0, 0, 0, 0.87)"},error:{main:"#d32f2f",light:"#ef5350",dark:"#c62828"},warning:{main:"#ed6c02",light:"#ff9800",dark:"#e65100"},info:{main:"#0288d1",light:"#03a9f4",dark:"#01579b"},success:{main:"#2e7d32",light:"#4caf50",dark:"#1b5e20"},containerBox:{default:"#ffffff",main:"#f5f5f5"},action:{active:"rgba(0, 0, 0, 0.10)",hover:"rgba(0, 0, 0, 0.05)",selected:"#fafafa",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(255, 255, 255, 0.12)"},text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.58)",colorMain:"#9e9e9e"},divider:"rgba(0, 0, 0, 0.12)",dropdownBox:"#ffffff",color:{icons:"#9e9e9e"},cellHeader:"#d3d3d3",Skeleton:{bg:"#f5f5f5"},messageBox:"#d3e6fd",boxShadow:"rgba(0, 0, 0, 0.1)",disabled:"rgba(0, 0, 0, 0.26)"}}),Jr=Le({name:"darkBlue",palette:{mode:"dark",primary:{main:"#1f5c8e",light:"#2196f3",dark:"#0d47a1",contrastText:"#fff"},secondary:{light:"#FFEA41",main:"#90caf9",dark:"#DBBE01",contrastText:"rgba(0, 0, 0, 0.87)"},error:{main:"#f44336",light:"#e57373",dark:"#d32f2f"},warning:{main:"#ffa726",light:"#ffb74d",dark:"#f57c00"},info:{main:"#29b6f6",light:"#4fc3f7",dark:"#0288d1"},success:{main:"#66bb6a",light:"#81c784",dark:"#388e3c"},background:{default:"#222B45",mainGradient:"linear-gradient(270deg, #222B45, #222B45)",mainCenter:"#28324e",navMenu:"#222B45",panel:"#2d364e",dropdownMenu:"#484f65",tooltip:"#484f65",accordionHeader:"#2a3249e3",panelHeader:"#2a3249e3",panelCenter:"#484f65",panelGradient:"#384057",paper:"#2d364e"},containerBox:{default:"#2d354e",main:"#2d354e"},action:{active:"rgba(255, 255, 255, 0.2)",hover:"rgba(255, 255, 255, 0.08)",selected:"rgba(255, 255, 255, 0.16)",disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)"},text:{primary:"#EEEEEF",secondary:"#AEB0B4",disabled:"rgba(255, 255, 255, 0.5)",colorMain:"#EEEEEF"},divider:"rgba(255, 255, 255, 0.12)",dropdownBox:"#2d354e",color:{icons:"#fff"},cellHeader:"#505050",Skeleton:{bg:"#f5f5f5"},messageBox:"#1f5c8e",boxShadow:"rgba(0, 0, 0, 0.1)",disabled:"rgba(0, 0, 0, 0.26)"}}),Qr=Le({name:"darkBlack",palette:{mode:"dark",background:{default:"#201f1e",mainGradient:"linear-gradient(270deg, #201f1e, #201f1e)",mainCenter:"#252423",navMenu:"#201f1e",panel:"#3B3A39",dropdownMenu:"#585858",tooltip:"#616161eb",accordionHeader:"#25242369",panelHeader:"#3b3a39ba",panelCenter:"#585858",panelGradient:"#454443",paper:"#3B3A39"},primary:{main:"#1976d2",light:"#2196f3",dark:"#42a5f5",contrastText:"#fff"},secondary:{light:"#FFEA41",main:"#90caf9",dark:"#DBBE01",contrastText:"rgba(0, 0, 0, 0.87)"},error:{main:"#f44336",light:"#e57373",dark:"#d32f2f"},warning:{main:"#ffa726",light:"#ffb74d",dark:"#f57c00"},info:{main:"#29b6f6",light:"#4fc3f7",dark:"#0288d1"},success:{main:"#66bb6a",light:"#81c784",dark:"#388e3c"},containerBox:{main:"#ffffffb3",default:"#3B3A39"},action:{active:"rgba(255, 255, 255, 0.2)",hover:"rgba(255, 255, 255, 0.08)",selected:"rgba(255, 255, 255, 0.16)",disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)"},text:{primary:"#EEEEEF",secondary:"#AEB0B4",disabled:"rgba(255, 255, 255, 0.5)",colorMain:"#EEEEEF"},divider:"rgba(255, 255, 255, 0.12)",dropdownBox:"#3B3A39",color:{icons:"#fff"},cellHeader:"#505050",Skeleton:{bg:"#f5f5f5"},messageBox:"#1f5c8e",boxShadow:"rgba(0, 0, 0, 0.1)",disabled:"rgba(0, 0, 0, 0.26)"}}),au="https://agent-api.trii.app/api/v1/settings/user/setTheme",nu={themeSelected:Ma,darkMode:!1,toggleStatus:"idle"},Xr=Zs("Theme/updateTheme",async(e,{getState:a})=>{const{uid:n}=a().User.user,r=JSON.stringify({theme:e,uid:n});return(await ti.put(au,r)).data}),Zr=ei({name:"Theme",initialState:nu,reducers:{toggleTheme:(e,a)=>{const n=es(a.payload);Object.assign(e,{themeSelected:n,toggleStatus:"toggled"})},toggleModeTheme:e=>{e.darkMode=!e.darkMode}},extraReducers:e=>{e.addCase(Xr.fulfilled,(a,n)=>{const r=es(n.payload.theme);Object.assign(a,{themeSelected:r})})}}),es=e=>{switch(e){case"lightBlueIndigo":return Ma;case"darkBlack":return Qr;case"darkBlue":return Jr;case"lightAmber":return Gr;case"lightBlue":return Or;case"lightBrown":return Kr;case"lightGray":return qr;case"lightGreen":return zr;case"lightLime":return Vr;case"lightOrange":return Yr;case"lightPink":return Lr;case"lightPurple":return Wr;case"lightRed":return Br;case"lightTeal":return _r;case"lightYellow":return Hr;default:return Ma}},ru=e=>["lightBlueIndigo","darkBlack","darkBlue","lightAmber","lightBlue","lightBrown","lightGray","lightGreen","lightLime","lightOrange","lightPink","lightPurple","lightRed","lightTeal","lightYellow"].includes(e),{toggleTheme:su,toggleModeTheme:iu}=Zr.actions,ou=e=>e.Theme.toggleStatus,lu=e=>e.Theme.themeSelected,du=e=>e.Theme.darkMode;Zr.reducer;export{_n as ContactInfoPopup,Ud as EditContactModal,tu as EventsDialog,Rr as MuiComponentsConfig,Qr as darkBlack,Jr as darkBlue,Gt as i18n,ru as isValidThemeName,Gr as lightAmber,Or as lightBlue,Ma as lightBlueIndigo,Kr as lightBrown,qr as lightGray,zr as lightGreen,Vr as lightLime,Yr as lightOrange,Lr as lightPink,Wr as lightPurple,Br as lightRed,_r as lightTeal,Hr as lightYellow,ou as selectThemeToggleStatus,du as selectedDarkTheme,lu as selectedTheme,iu as toggleModeTheme,su as toggleTheme,Xr as updateTheme};
|
|
21
21
|
//# sourceMappingURL=index.js.map
|