@ceed/ads 1.0.0 → 1.1.0-next.1

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.
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import { TooltipProps as JoyTooltipProps } from "@mui/joy";
3
+ import { MotionProps } from "framer-motion";
4
+ declare function InfoSign(props: {
5
+ message: string;
6
+ } & Pick<JoyTooltipProps, "placement"> & MotionProps): React.JSX.Element;
7
+ export { InfoSign };
@@ -0,0 +1,3 @@
1
+ import { InfoSign } from "./InfoSign";
2
+ export * from "./InfoSign";
3
+ export default InfoSign;
@@ -27,6 +27,7 @@ export { FormHelperText } from "./FormHelperText";
27
27
  export { FormLabel } from "./FormLabel";
28
28
  export { Grid } from "./Grid";
29
29
  export { IconButton } from "./IconButton";
30
+ export { InfoSign } from "./InfoSign";
30
31
  export { Input } from "./Input";
31
32
  export { Markdown } from "./Markdown";
32
33
  export { Menu, MenuItem } from "./Menu";
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  export { useTheme, useColorScheme, useThemeProps, ButtonGroup, alertClasses, boxClasses, buttonClasses, checkboxClasses, dividerClasses, iconButtonClasses, inputClasses, menuClasses, menuButtonClasses, menuItemClasses, optionClasses, radioClasses, radioGroupClasses, selectClasses, switchClasses, tableClasses, textareaClasses, typographyClasses, formControlClasses, formLabelClasses, formHelperTextClasses, gridClasses, stackClasses, sheetClasses, modalClasses, modalCloseClasses, modalDialogClasses, modalOverflowClasses, dialogTitleClasses, dialogContentClasses, dialogActionsClasses, tooltipClasses, tabsClasses, tabListClasses, tabPanelClasses, accordionClasses, accordionDetailsClasses, accordionGroupClasses as accordionsClasses, accordionSummaryClasses, AutocompleteListbox, AutocompleteOption, autocompleteClasses, autocompleteListboxClasses, autocompleteOptionClasses, avatarClasses, avatarGroupClasses, AspectRatio, aspectRatioClasses, Badge, badgeClasses, breadcrumbsClasses, cardClasses, cardActionsClasses, cardContentClasses, cardCoverClasses, cardOverflowClasses, chipClasses, CircularProgress, circularProgressClasses, Drawer, drawerClasses, LinearProgress, linearProgressClasses, List, listClasses, ListDivider, listDividerClasses, ListItem, listItemClasses, ListItemButton, listItemButtonClasses, ListItemContent, listItemContentClasses, ListItemDecorator, listItemDecoratorClasses, ListSubheader, listSubheaderClasses, Link, linkClasses, Slider, sliderClasses, stepClasses, StepButton, stepButtonClasses, stepperClasses, Skeleton, skeletonClasses, } from "@mui/joy";
2
- export { Accordion, Accordions, Alert, Autocomplete, AccordionDetails, AccordionSummary, Avatar, AvatarGroup, Box, Breadcrumbs, Button, Calendar, Card, CardActions, CardContent, CardCover, CardOverflow, Checkbox, Chip, Container, CssBaseline, CurrencyInput, DataTable, DatePicker, DateRangePicker, DialogActions, DialogContent, DialogTitle, DialogFrame, Divider, Dropdown, extendTheme, InsetDrawer, Uploader, FormControl, FormHelperText, FormLabel, Grid, IconButton, Input, Markdown, Menu, MenuButton, MenuItem, Modal, ModalClose, ModalDialog, ModalOverflow, ModalFrame, MonthPicker, MonthRangePicker, PercentageInput, ProfileMenu, Pagination, NavigationGroup, NavigationItem, Navigator, Radio, RadioGroup, RadioList, Select, Option, Sheet, Stack, Step, StepIndicator, Stepper, Switch, theme, Table, TableHead, TableBody, Tabs, Tab, TabList, TabPanel, Textarea, ThemeProvider, Tooltip, Typography, } from "./components";
2
+ export { Accordion, Accordions, Alert, Autocomplete, AccordionDetails, AccordionSummary, Avatar, AvatarGroup, Box, Breadcrumbs, Button, Calendar, Card, CardActions, CardContent, CardCover, CardOverflow, Checkbox, Chip, Container, CssBaseline, CurrencyInput, DataTable, DatePicker, DateRangePicker, DialogActions, DialogContent, DialogTitle, DialogFrame, Divider, Dropdown, extendTheme, InsetDrawer, Uploader, FormControl, FormHelperText, FormLabel, Grid, IconButton, InfoSign, Input, Markdown, Menu, MenuButton, MenuItem, Modal, ModalClose, ModalDialog, ModalOverflow, ModalFrame, MonthPicker, MonthRangePicker, PercentageInput, ProfileMenu, Pagination, NavigationGroup, NavigationItem, Navigator, Radio, RadioGroup, RadioList, Select, Option, Sheet, Stack, Step, StepIndicator, Stepper, Switch, theme, Table, TableHead, TableBody, Tabs, Tab, TabList, TabPanel, Textarea, ThemeProvider, Tooltip, Typography, } from "./components";
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import{useTheme as ex,useColorScheme as ox,useThemeProps as tx,ButtonGroup as rx,alertClasses as nx,boxClasses as ax,buttonClasses as ix,checkboxClasses as lx,dividerClasses as sx,iconButtonClasses as px,inputClasses as dx,menuClasses as mx,menuButtonClasses as cx,menuItemClasses as ux,optionClasses as gx,radioClasses as fx,radioGroupClasses as hx,selectClasses as yx,switchClasses as Cx,tableClasses as bx,textareaClasses as vx,typographyClasses as xx,formControlClasses as Dx,formLabelClasses as Px,formHelperTextClasses as Mx,gridClasses as Tx,stackClasses as kx,sheetClasses as wx,modalClasses as Ix,modalCloseClasses as Ax,modalDialogClasses as Sx,modalOverflowClasses as Bx,dialogTitleClasses as Nx,dialogContentClasses as Ex,dialogActionsClasses as Fx,tooltipClasses as Ox,tabsClasses as Lx,tabListClasses as zx,tabPanelClasses as Rx,accordionClasses as Vx,accordionDetailsClasses as Hx,accordionGroupClasses as $x,accordionSummaryClasses as Yx,AutocompleteListbox as Jx,AutocompleteOption as _x,autocompleteClasses as Ux,autocompleteListboxClasses as Gx,autocompleteOptionClasses as Wx,avatarClasses as qx,avatarGroupClasses as jx,AspectRatio as Kx,aspectRatioClasses as Zx,Badge as Xx,badgeClasses as Qx,breadcrumbsClasses as eD,cardClasses as oD,cardActionsClasses as tD,cardContentClasses as rD,cardCoverClasses as nD,cardOverflowClasses as aD,chipClasses as iD,CircularProgress as lD,circularProgressClasses as sD,Drawer as pD,drawerClasses as dD,LinearProgress as mD,linearProgressClasses as cD,List as uD,listClasses as gD,ListDivider as fD,listDividerClasses as hD,ListItem as yD,listItemClasses as CD,ListItemButton as bD,listItemButtonClasses as vD,ListItemContent as xD,listItemContentClasses as DD,ListItemDecorator as PD,listItemDecoratorClasses as MD,ListSubheader as TD,listSubheaderClasses as kD,Link as wD,linkClasses as ID,Slider as AD,sliderClasses as SD,stepClasses as BD,StepButton as ND,stepButtonClasses as ED,stepperClasses as FD,Skeleton as OD,skeletonClasses as LD}from"@mui/joy";import Ve from"react";import{AccordionGroup as Fn,Accordion as On,AccordionSummary as Ln,AccordionDetails as zn}from"@mui/joy";import{motion as Po}from"framer-motion";var Rn=Po(Ln),Mo=Rn;Mo.displayName="AccordionSummary";var Vn=Po(zn),To=Vn;To.displayName="AccordionDetails";var Hn=Po(On);function ko(e){let{summary:o,details:t,variant:r,color:i,...a}=e,n=r==="solid"?"solid":void 0;return Ve.createElement(Hn,{variant:n,color:i,...a},Ve.createElement(Mo,{variant:n,color:i},o),Ve.createElement(To,{variant:n,color:i},t))}ko.displayName="Accordion";var $n=Po(Fn);function gt(e){let{variant:o,color:t,items:r,...i}=e;return Ve.createElement($n,{variant:o,color:t,...i},r.map((a,n)=>Ve.createElement(ko,{key:n,summary:a.summary,details:a.details,index:n,variant:o,color:t})))}gt.displayName="Accordions";import wo from"react";import{Alert as Gn,styled as Wn}from"@mui/joy";import{motion as qn}from"framer-motion";import Yn from"react";import{Typography as Jn}from"@mui/joy";import{motion as _n}from"framer-motion";var Un=_n(Jn),U=e=>Yn.createElement(Un,{...e});U.displayName="Typography";var G=U;import{Stack as Ie}from"@mui/joy";var z=Ie;var jn=Wn(qn(Gn))({alignItems:"flex-start",fontWeight:"unset"});function ft(e){let{title:o,content:t,actions:r,color:i="primary",...a}=e,n=e.invertedColors||e.variant==="solid";return wo.createElement(jn,{...a,color:i,endDecorator:r,invertedColors:n},wo.createElement(z,null,o&&wo.createElement(G,{level:"title-sm",color:i},o),wo.createElement(G,{level:"body-sm",color:i},t)))}ft.displayName="Alert";import V,{useCallback as ht,useEffect as Ca,useMemo as _e,useRef as ba}from"react";import{Autocomplete as va,AutocompleteOption as xa,ListSubheader as Da,AutocompleteListbox as Pa,ListItemDecorator as cr,CircularProgress as Ma,styled as ur}from"@mui/joy";import Ta from"@mui/icons-material/Close";import{useVirtualizer as ka}from"@tanstack/react-virtual";import{Popper as wa}from"@mui/base";import{FormControl as Kn,styled as Zn}from"@mui/joy";import{motion as Xn}from"framer-motion";var Qn=Zn(Xn(Kn))({width:"100%"}),He=Qn;He.displayName="FormControl";var ue=He;import{FormLabel as ea}from"@mui/joy";import{motion as oa}from"framer-motion";var ta=oa(ea),$e=ta;$e.displayName="FormLabel";var ge=$e;import{FormHelperText as ra}from"@mui/joy";import{motion as na}from"framer-motion";var aa=na(ra),Ye=aa;Ye.displayName="FormHelperText";var fe=Ye;import{Chip as ia}from"@mui/joy";import{motion as la}from"framer-motion";var sa=la(ia),Ae=sa;Ae.displayName="Chip";var mr=Ae;import pa,{forwardRef as da}from"react";import{IconButton as ma}from"@mui/joy";import{motion as ca}from"framer-motion";var ua=ca(ma),Je=da(({...e},o)=>pa.createElement(ua,{ref:o,...e}));Je.displayName="IconButton";var $=Je;import{useState as ga,useCallback as fa,useEffect as ha,useRef as ya}from"react";function R(e,o,t,r){let{current:i}=ya(e!==void 0),[a,n]=ga(e??o);ha(()=>{i&&n(e??o)},[e,o,i]);let l=fa(p=>{let d=typeof p=="function"?p(a):p;(r?.disableStrict||!i)&&n(d),t?.(d)},[i,t,a,r]);return[a,l]}var Ia=ur(wa,{name:"Autocomplete",slot:"Popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Aa=V.forwardRef((e,o)=>{let{anchorEl:t,open:r,modifiers:i,children:a,ownerState:{loading:n,size:l="md"},...p}=e,d=ba(null),s=a[0].every(x=>x.hasOwnProperty("group")),u=n?[a[1]]:a[0].length===0?[a[2]]:s?a[0].flatMap(x=>[V.createElement(Da,{key:x.key,component:"li"},x.group),...x.children]):a[0],f=ka({count:u.length,estimateSize:()=>36,getScrollElement:()=>d.current,measureElement:x=>x.clientHeight,overscan:5}),C=f.getVirtualItems();return Ca(()=>{r&&f.measure()},[r,f]),V.createElement(Ia,{ref:o,anchorEl:t,open:r,modifiers:i},V.createElement(Pa,{...p},V.createElement("div",{ref:d,style:{overflow:"auto"}},V.createElement("div",{style:{height:`${f.getTotalSize()}px`,position:"relative"}},C.map(({index:x,size:c,start:m,key:h})=>V.cloneElement(u[x],{key:h,style:{position:"absolute",top:0,left:0,width:"100%",fontSize:`var(--ceed-fontSize-${l})`,height:`${c}px`,transform:`translateY(${m}px)`,overflow:"visible"},children:V.createElement("div",{style:{textOverflow:"ellipsis",textWrap:"nowrap",overflow:"hidden",width:"100%"}},u[x].props.children)}))))))}),Io={sm:"20px",md:"24px",lg:"28px"},Sa=ur($,{name:"Autocomplete",slot:"tagDelete"})(({theme:e,size:o="md"})=>({width:Io[o],height:Io[o],minWidth:Io[o],minHeight:Io[o],borderRadius:"50%"}));function Ue(e){let{label:o,error:t,helperText:r,color:i,size:a,disabled:n,required:l,onChange:p,onChangeComplete:d,sx:s,className:u,...f}=e,[C,x]=R(e.value,e.defaultValue||"",ht(b=>p?.({target:{value:b,name:e.name}}),[p,e.name])),c=_e(()=>e.options.map(b=>typeof b!="object"?{value:b,label:b}:b),[e.options]),m=_e(()=>{let b=new Map;return c.forEach(v=>{b.set(v.value,v)}),b},[c]),h=_e(()=>e.loading?{value:"",label:"",startDecorator:V.createElement(Ma,{size:"sm",color:"neutral",variant:"plain",thickness:3})}:Array.isArray(C)?C.filter(b=>m.has(b)).map(b=>m.get(b||"")):m.get(C),[C,m,e.loading]),g=ht(b=>V.isValidElement(b)&&!e.loading?V.cloneElement(b,{size:a}):b,[a,e.loading]),S=_e(()=>g(h?.startDecorator||e.startDecorator),[h,g,e.startDecorator]),k=_e(()=>g(h?.endDecorator||e.endDecorator),[h,g,e.endDecorator]),y=ht((b,v)=>{let M=v,T=Array.isArray(M)?M.map(F=>F.value):M?.value;x(T),(Array.isArray(M)&&M.map(F=>m.get(F.value))||m.get(M?.value))&&d?.({...b,target:{...b.target,value:T}})},[d,x,m]),D=V.createElement(va,{...f,required:l,onChange:y,color:t?"danger":i,value:h||null,options:c,size:a,disabled:n,startDecorator:S,endDecorator:k,getOptionLabel:b=>`${b.label??""}`,renderTags:(b,v)=>b.map((M,T)=>{let{onClick:F,...O}=v({index:T});return g(V.createElement(mr,{color:"primary",...O},V.createElement(z,{direction:"row",alignItems:"center",gap:2,py:.5},M.value,g(V.createElement(Sa,{color:"primary",variant:"soft",onClick:F},V.createElement(Ta,null))))))}),slots:{listbox:Aa},renderOption:(b,v)=>V.createElement(xa,{...b},v.startDecorator&&V.createElement(cr,{sx:M=>({marginInlineEnd:`var(--Input-gap, ${M.spacing(1)})`})},g(v.startDecorator)),g(v.label),v.endDecorator&&V.createElement(cr,{sx:M=>({marginInlineStart:`var(--Input-gap, ${M.spacing(1)})`})},g(v.endDecorator))),renderGroup:b=>b});return V.createElement(ue,{required:l,color:i,size:a,error:t,disabled:n,sx:s,className:u},o&&V.createElement(ge,null,o),D,r&&V.createElement(fe,null,r))}Ue.displayName="Autocomplete";var gr=Ue;import Ba,{forwardRef as Na,useMemo as Ea}from"react";import{Avatar as Fa,AvatarGroup as fr,styled as Oa,useThemeProps as La}from"@mui/joy";var za=Oa(Fa,{name:"Avatar",slot:"Root",overridesResolver:(e,o)=>o.root})({}),Ra=e=>{if(/[ㄱ-ㅎ|ㅏ-ㅣ|가-힣]/.test(e))return e[0];{let t=e.trim().split(/\s+/);if(t.length===0)return;if(t.length===1)return t[0].charAt(0).toUpperCase();let r=t[0],i=t[t.length-1];return(r.charAt(0)+i.charAt(0)).toUpperCase()}},Ao=Na(function(o,t){let r=La({props:o,name:"Avatar"}),{children:i,getInitial:a=Ra,...n}=r,l=Ea(()=>typeof i=="string"?a?.(i)??"":i,[i,a]);return Ba.createElement(za,{...n,children:l,ref:t})});import{Box as Va}from"@mui/joy";import{motion as Ha}from"framer-motion";var $a=Ha(Va),Ge=$a;Ge.displayName="Box";var So=Ge;import le from"react";import{Breadcrumbs as br,Link as ja,MenuButton as Ka}from"@mui/joy";import hr from"react";import{Menu as Ya,MenuItem as Ja}from"@mui/joy";import{motion as yr}from"framer-motion";var _a=yr(Ya),be=e=>hr.createElement(_a,{...e});be.displayName="Menu";var Ua=yr(Ja),ve=e=>hr.createElement(Ua,{...e});ve.displayName="MenuItem";var Cr=be;import{Dropdown as Ga}from"@mui/joy";import{motion as Wa}from"framer-motion";var qa=Wa(Ga),We=qa;We.displayName="Dropdown";var Bo=We;function yt(e){let{crumbs:o,size:t,startCrumbCount:r=1,endCrumbCount:i=3,slots:{link:a,...n}={link:ja},slotProps:{link:l,...p}={link:{color:"neutral"}},collapsed:d=!0,...s}=e,u=m=>m.type==="link"&&a?le.createElement(a,{to:m.linkHref,href:m.linkHref,...l},m.label):le.createElement(G,null,m.label);if(!d)return le.createElement(br,{size:t,slots:n,slotProps:p,...s},o.map(m=>le.createElement(u,{...m})));let f=Math.max(1,i),C=o.slice(0,r).map(m=>le.createElement(u,{...m})),x=(r+f>o.length?o.slice(r):o.slice(-f)).map(m=>le.createElement(u,{...m})),c=o.slice(r,-f).map(m=>le.createElement(ve,null,le.createElement(u,{...m})));return le.createElement(br,{size:t,slots:n,slotProps:p,...s},C,c.length&&le.createElement(Bo,null,le.createElement(Ka,{size:t,variant:"plain"},"..."),le.createElement(Cr,{size:t},c)),x)}yt.displayName="Breadcrumbs";import Za,{forwardRef as Xa}from"react";import{Button as Qa}from"@mui/joy";import{motion as ei}from"framer-motion";var oi=ei(Qa),qe=Xa(({...e},o)=>Za.createElement(oi,{ref:o,...e}));qe.displayName="Button";var W=qe;import A,{Fragment as Le,forwardRef as ni,useMemo as Ir}from"react";import{styled as de}from"@mui/joy";import ai from"@mui/icons-material/ChevronLeft";import ii from"@mui/icons-material/ChevronRight";import{AnimatePresence as Ar,motion as li}from"framer-motion";var vr=e=>{let o=[],t=new Date(e.getFullYear(),e.getMonth(),1),r=new Date(e.getFullYear(),e.getMonth()+1,0),i=Math.ceil((t.getDay()+1)/7),a=Math.ceil((r.getDate()+t.getDay())/7),n=1;for(let l=1;l<=a;l++){let p=[];for(let d=1;d<=7;d++)l===i&&d<t.getDay()+1||n>r.getDate()?p.push(void 0):(p.push(n),n++);o.push(p)}return o},xr=(e,o)=>e.toLocaleString(o,{year:"numeric"}),Ct=(e,o)=>e.toLocaleString(o,{year:"numeric",month:"long"}),Dr=(e,o)=>new Date(0,e).toLocaleString(o,{month:"short"}),Pr=e=>{let o=new Date().getDay(),t=new Date;return t.setDate(t.getDate()-o),Array.from({length:7}).map(()=>{let r=t.toLocaleString(e,{weekday:"short"});return t.setDate(t.getDate()+1),r})},Mr=e=>{let o=new Date,t=new Date(e);return t.setHours(0,0,0,0),o.setHours(0,0,0,0),t.getTime()===o.getTime()},bt=(e,o)=>{let t=new Date(e),r=new Date(o);return t.setHours(0,0,0,0),r.setHours(0,0,0,0),t.getTime()===r.getTime()},xe=(e,o,t)=>{let r=new Date(t);r.setHours(0,0,0,0);let i=new Date(Math.min(e.getTime(),o.getTime())),a=new Date(Math.max(e.getTime(),o.getTime()));return r>=i&&r<=a},No=(e,o)=>e.getFullYear()===o.getFullYear()&&e.getMonth()===o.getMonth();import{useCallback as Tr,useMemo as vt,useState as Eo}from"react";import{useThemeProps as ti}from"@mui/joy";var ri=(e,o)=>o.includes(e)?e:o[0],kr=e=>{let[o,t]=Eo(()=>ri(e.view||"day",e.views||["day","month"])),[r,i]=Eo(e.defaultValue),[a,n]=Eo(()=>{let h=new Date;return h.setDate(1),h.setHours(0,0,0,0),e.value?.[0]||e.defaultValue?.[0]||h}),[[l,p],d]=Eo([0,0]),s=e.view??o,u=vt(()=>{let h=e.minDate||new Date(0);return h.setHours(0,0,0,0),h},[e.minDate]),f=vt(()=>{let h=e.maxDate||new Date(864e13);return h.setHours(0,0,0,0),h},[e.maxDate]),C=Tr(h=>{d([l+h,h])},[l]),x=Tr(h=>{n(h),s==="month"?a.getFullYear()!==h.getFullYear()&&C(h>a?1:-1):C(h>a?1:-1),e.onMonthChange?.(h)},[s,e,a,C]),c=ti({props:{locale:"default",views:["day","month"],view:s,value:e.value??r,...e,minDate:u,maxDate:f,onChange:e.value?e.onChange:h=>{i(h),e.onChange?.(h)},onMonthChange:x,onViewChange:()=>{let h=s==="month"?"day":"month";!(!e.views||e.views.includes(h))||e.view===h||(e.onViewChange?e.onViewChange(h):t(h))}},name:"Calendar"}),m=vt(()=>({...c,viewMonth:a,direction:p}),[c,a,p]);return[c,m]};import{useCallback as Oe,useState as wr}from"react";var Fo=e=>{let[o,t]=wr(null),[r,i]=wr(null);return{calendarTitle:e.view==="month"?xr(e.viewMonth,e.locale||"default"):Ct(e.viewMonth,e.locale||"default"),onPrev:Oe(()=>{if(e.view==="day"){let a=new Date(e.viewMonth||new Date);a.setMonth(a.getMonth()-1),e.onMonthChange?.(a)}else if(e.view==="month"){let a=new Date(e.viewMonth||new Date);a.setFullYear(a.getFullYear()-1),e.onMonthChange?.(a)}},[e.onMonthChange,e.viewMonth,e.view]),onNext:Oe(()=>{if(e.view==="day"){let a=new Date(e.viewMonth||new Date);a.setMonth(a.getMonth()+1),e.onMonthChange?.(a)}else if(e.view==="month"){let a=new Date(e.viewMonth||new Date);a.setFullYear(a.getFullYear()+1),e.onMonthChange?.(a)}},[e.onMonthChange,e.viewMonth,e.view]),getDayCellProps:Oe(a=>{let n=new Date(e.viewMonth||new Date);n.setHours(0,0,0,0),n.setDate(a);let l=e.rangeSelection&&e.value&&e.value[0]&&(o&&xe(e.value[0],o,n)||e.value[1]&&xe(e.value[0],e.value[1],n));return{"aria-label":n.toLocaleDateString(),"aria-current":l?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,o]),getMonthCellProps:Oe(a=>{let n=new Date(e.viewMonth||new Date);n.setDate(1),n.setHours(0,0,0,0),n.setMonth(a);let p=!e.views?.find(d=>d==="day")&&e.rangeSelection&&e.value&&e.value[0]&&(r&&xe(e.value[0],r,n)||e.value[1]&&xe(e.value[0],e.value[1],n));return{"aria-label":n.toLocaleDateString(),"aria-current":p?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,r]),getPickerDayProps:Oe(a=>{let n=new Date(e.viewMonth||new Date);n.setHours(0,0,0,0),n.setDate(a);let l=!!e.value&&(bt(n,e.value[0])||e.value[1]&&bt(n,e.value[1])),p=e.rangeSelection&&e.value&&e.value[0]&&(o&&xe(e.value[0],o,n)||e.value[1]&&xe(e.value[0],e.value[1],n)),d=()=>{e.rangeSelection?e.value?e.value[0]&&!e.value[1]?e.onChange?.([new Date(Math.min(e.value[0].getTime(),n.getTime())),new Date(Math.max(e.value[0].getTime(),n.getTime()))]):e.onChange?.([n,void 0]):e.onChange?.([n,void 0]):e.onChange?.([n,void 0]),t(null)};return{isToday:Mr(n),isSelected:l,onClick:d,onMouseEnter:e.rangeSelection&&e.value?.[0]&&!e.value?.[1]?()=>t(n):void 0,disabled:e.minDate&&n<e.minDate||e.maxDate&&n>e.maxDate||e.disableFuture&&n>new Date||e.disablePast&&n<(()=>{let s=new Date;return s.setHours(0,0,0,0),s})(),tabIndex:-1,"aria-label":n.toLocaleDateString(),"aria-selected":l?"true":void 0,"aria-current":p?"date":void 0}},[e.onChange,e.value,e.viewMonth,e.rangeSelection,e.minDate,e.maxDate,e.disableFuture,e.disablePast,o]),getPickerMonthProps:Oe(a=>{let n=new Date(e.viewMonth||new Date);n.setDate(1),n.setHours(0,0,0,0),n.setMonth(a);let l=!e.views?.find(f=>f==="day"),p=l&&e.rangeSelection,d=!!e.value&&(No(n,e.value[0])||e.value[1]&&No(n,e.value[1])),s=p&&e.value&&e.value[0]&&(r&&xe(e.value[0],r,n)||e.value[1]&&xe(e.value[0],e.value[1],n)),u=()=>{p?e.value?e.value[0]&&!e.value[1]?e.onChange?.([new Date(Math.min(e.value[0].getTime(),n.getTime())),new Date(Math.max(e.value[0].getTime(),n.getTime()))]):e.onChange?.([n,void 0]):e.onChange?.([n,void 0]):l?e.onChange?.([n,void 0]):(e.onViewChange?.("day"),e.onMonthChange?.(n)),i(null)};return{isSelected:d,onMouseEnter:p&&e.value?.[0]&&!e.value?.[1]?()=>i(n):void 0,disabled:e.minDate&&(()=>{let f=new Date(n);return f.setMonth(f.getMonth()+1),f.setDate(0),f<e.minDate})()||e.maxDate&&(()=>{let f=new Date(n);return f.setDate(0),f>e.maxDate})()||e.disableFuture&&n>new Date||e.disablePast&&n<new Date&&!No(n,new Date),onClick:u,tabIndex:-1,"aria-label":Ct(n,e.locale||"default"),"aria-selected":d?"true":void 0,"aria-current":s?"date":void 0}},[e.onMonthChange,e.onViewChange,e.onChange,e.viewMonth,e.locale,e.value,e.minDate,e.maxDate,e.disableFuture,e.disablePast,r])}};var si=de("div",{name:"Calendar",slot:"root"})({maxWidth:"264px"}),pi=de("div",{name:"Calendar",slot:"calendarHeader"})(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",padding:e.spacing(2)})),Sr=de("div",{name:"Calendar",slot:"viewContainer",shouldForwardProp:e=>e!=="calendarType"})(({theme:e,calendarType:o})=>({paddingLeft:e.spacing(2),paddingRight:e.spacing(2),position:"relative",overflow:"hidden",minHeight:o==="datePicker"?"250px":"unset"})),Br=de(li.table,{name:"Calendar",slot:"viewTable"})(({theme:e})=>({borderSpacing:0,"& td, & th":{padding:0},"& th":{paddingTop:e.spacing(2),paddingBottom:e.spacing(2)}})),di=de("thead",{name:"Calendar",slot:"weekHeaderContainer"})({}),mi=de("tbody",{name:"Calendar",slot:"dayPickerContainer"})({}),ci=de(W,{name:"Calendar",slot:"switchViewButton"})(({ownerState:e})=>[e.view==="month"&&{pointerEvents:"none"}]),ui=de("td",{name:"Calendar",slot:"dayCell"})(({theme:e})=>({"&[aria-current=date]":{position:"relative","& button[aria-current=date]:not([aria-selected=true]):not(:hover):not(:active)":{backgroundColor:`rgb(${e.palette.primary.lightChannel})`},'& + td[aria-hidden] + td[aria-current="date"]::before':{content:'""',position:"absolute",top:0,left:"-10px",bottom:0,width:"16px",backgroundColor:`rgb(${e.palette.primary.lightChannel})`,zIndex:-1}}})),gi=de("td",{name:"Calendar",slot:"monthCell"})(({theme:e})=>({"&[aria-current=date]":{position:"relative","& button[aria-current=date]:not([aria-selected=true]):not(:hover):not(:active)":{backgroundColor:`rgb(${e.palette.primary.lightChannel})`},'& + td[aria-hidden] + td[aria-current="date"]::before':{content:'""',position:"absolute",top:0,left:"-10px",bottom:0,width:"16px",backgroundColor:`rgb(${e.palette.primary.lightChannel})`,zIndex:-1}}})),fi=de(W,{name:"Calendar",slot:"month",shouldForwardProp:e=>e!=="isSelected"})(({theme:e,isSelected:o,disabled:t})=>[{width:"59px",textAlign:"center","&:hover":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softHoverBg},"&:active":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softActiveBg}},o&&{backgroundColor:e.palette.primary.solidBg,color:e.palette.primary.solidColor,"&:hover":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidHoverBg},"&:active":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidActiveBg}},t&&{color:e.palette.neutral.solidDisabledColor,backgroundColor:e.palette.neutral.solidDisabledBg}]),hi=de(W,{name:"Calendar",slot:"day",shouldForwardProp:e=>!["isToday","isSelected"].includes(e)})(({theme:e,isToday:o,isSelected:t,disabled:r})=>[{width:"32px",height:"32px",textAlign:"center","&:hover":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softHoverBg},"&:active":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softActiveBg}},o&&!t&&{"&:not([aria-current=date]):not(:hover)":{border:`1px solid ${e.palette.neutral.outlinedBorder}`}},t&&{backgroundColor:e.palette.primary.solidBg,color:e.palette.primary.solidColor,"&:hover":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidHoverBg},"&:active":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidActiveBg}},r&&{color:e.palette.neutral.solidDisabledColor,backgroundColor:e.palette.neutral.solidDisabledBg}]),Nr={enter:e=>({x:e>0?300:-300,opacity:0}),center:{position:"relative",zIndex:1,x:0,opacity:1},exit:e=>({position:"absolute",zIndex:0,x:e<0?300:-300,opacity:0})},Oo=1e4,Er=(e,o)=>Math.abs(e)*o,yi=e=>{let{ownerState:o}=e,{getPickerDayProps:t,getDayCellProps:r}=Fo(o),i=Ir(()=>vr(o.viewMonth),[o.viewMonth]),a=Ir(()=>Pr(o.locale||"default"),[o.locale]);return A.createElement(Sr,{calendarType:"datePicker"},A.createElement(Ar,{initial:!1,custom:o.direction},A.createElement(Br,{key:`${o.viewMonth.toString()}_${o.direction}`,custom:o.direction,variants:Nr,initial:"enter",animate:"center",exit:"exit",transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}},drag:"x",dragConstraints:{left:0,right:0},dragElastic:1,onDragEnd:(n,{offset:l,velocity:p})=>{let d=Er(l.x,p.x);if(d<-Oo){let s=new Date(o.viewMonth||new Date);s.setMonth(s.getMonth()+1),o.onMonthChange?.(s)}else if(d>Oo){let s=new Date(o.viewMonth||new Date);s.setMonth(s.getMonth()-1),o.onMonthChange?.(s)}}},A.createElement(di,null,A.createElement("tr",null,a.map((n,l)=>A.createElement(Le,{key:`${o.viewMonth}_${n}_${l}`},A.createElement("th",null,A.createElement(G,{level:"body-xs",textAlign:"center"},n)),l<6&&A.createElement("th",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"}))))),A.createElement(mi,null,i.map((n,l)=>A.createElement(Le,{key:`${o.viewMonth}_${l}`},A.createElement("tr",null,n.map((p,d)=>p?A.createElement(Le,{key:d},A.createElement(ui,{...r(p)},A.createElement(hi,{size:"sm",variant:"plain",color:"neutral",...t(p)},p)),d<6&&A.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})):A.createElement(Le,{key:d},A.createElement("td",null),d<6&&A.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})))),l<i.length-1&&A.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},A.createElement("td",{colSpan:13,style:{height:4}}))))))))},Ci=e=>{let{ownerState:o}=e,{getPickerMonthProps:t,getMonthCellProps:r}=Fo(o),i=Array.from({length:12},(n,l)=>l).reduce((n,l)=>(n[n.length-1].length===4&&n.push([]),n[n.length-1].push(l),n),[[]]),a=!o.views?.find(n=>n==="day");return A.createElement(Sr,{calendarType:a?"monthPicker":"datePicker"},A.createElement(Ar,{initial:!1,custom:o.direction},A.createElement(Br,{key:`${o.viewMonth.getFullYear()}_${o.direction}`,custom:o.direction,variants:Nr,initial:"enter",animate:"center",exit:"exit",transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}},drag:"x",dragConstraints:{left:0,right:0},dragElastic:1,onDragEnd:(n,{offset:l,velocity:p})=>{let d=Er(l.x,p.x);if(d<-Oo){let s=new Date(o.viewMonth||new Date);s.setMonth(s.getMonth()+1),o.onMonthChange?.(s)}else if(d>Oo){let s=new Date(o.viewMonth||new Date);s.setMonth(s.getMonth()-1),o.onMonthChange?.(s)}}},A.createElement("tbody",null,i.map((n,l)=>A.createElement(Le,{key:l},A.createElement("tr",null,n.map((p,d)=>A.createElement(Le,{key:p},A.createElement(gi,{...r(p)},A.createElement(fi,{size:"sm",variant:"plain",color:"neutral",...t(p)},Dr(p,o.locale))),d<3&&A.createElement("td",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"})))),l<i.length-1&&A.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},A.createElement("td",{colSpan:7,style:{height:4}}))))))))},je=ni((e,o)=>{let[t,r]=kr(e),{value:i,defaultValue:a,onChange:n,locale:l,onViewChange:p,onMonthChange:d,view:s,views:u,rangeSelection:f,minDate:C,maxDate:x,disableFuture:c,disablePast:m,...h}=t,{calendarTitle:g,onPrev:S,onNext:k}=Fo(r);return A.createElement(si,{ref:o,...h},A.createElement(pi,null,A.createElement($,{size:"sm",onClick:S,"aria-label":`Previous ${s==="day"?"Month":"Year"}`},A.createElement(ai,null)),A.createElement(ci,{ownerState:r,variant:"plain",color:"neutral",onClick:p,"aria-label":"Switch Calendar View"},g),A.createElement($,{size:"sm",onClick:k,"aria-label":`Next ${s==="day"?"Month":"Year"}`},A.createElement(ii,null))),s==="day"&&A.createElement(yi,{ownerState:r}),s==="month"&&A.createElement(Ci,{ownerState:r}))});je.displayName="Calendar";var Me=je;import{Card as bi,CardContent as vi,CardCover as xi,CardActions as Di,CardOverflow as Pi}from"@mui/joy";import{motion as Ke}from"framer-motion";var Mi=Ke(bi),Ze=Mi;Ze.displayName="Card";var Ti=Ke(vi),xt=Ti;xt.displayName="CardContent";var ki=Ke(xi),Dt=ki;Dt.displayName="CardCover";var wi=Ke(Di),Pt=wi;Pt.displayName="CardActions";var Ii=Ke(Pi),Mt=Ii;Mt.displayName="CardOverflow";import Ai from"react";import{Checkbox as Si}from"@mui/joy";import{motion as Bi}from"framer-motion";var Ni=Bi(Si),Xe=e=>Ai.createElement(Ni,{...e});Xe.displayName="Checkbox";var Qe=Xe;import{styled as Ei}from"@mui/joy";import Fi,{forwardRef as Oi}from"react";var Li=Ei("div",{name:"Container",slot:"root",shouldForwardProp:e=>e!=="maxWidth"&&e!=="overrideBreakpoint"})(({theme:e,maxWidth:o="lg",overrideBreakpoint:t})=>[{width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block",paddingLeft:e.spacing(4),paddingRight:e.spacing(4),[e.breakpoints.up("lg")]:{paddingLeft:e.spacing(8),paddingRight:e.spacing(8)},maxWidth:e.breakpoints.values[o]},t?{paddingLeft:e.breakpoints.values[t]>=e.breakpoints.values.lg?e.spacing(8):e.spacing(4),paddingRight:e.breakpoints.values[t]>=e.breakpoints.values.lg?e.spacing(8):e.spacing(4)}:null]),Tt=Oi(function(o,t){return Fi.createElement(Li,{ref:t,...o})});Tt.displayName="Container";import Lo,{useCallback as Or,useMemo as Lr,useState as _i}from"react";import{IntlMessageFormat as Ui}from"intl-messageformat";import{NumericFormat as Gi}from"react-number-format";import Te,{useCallback as zi}from"react";import{Input as Ri}from"@mui/joy";import{motion as Vi}from"framer-motion";import Hi from"@mui/icons-material/Close";var $i=Vi(Ri),eo=Te.forwardRef((e,o)=>{let{label:t,helperText:r,error:i,style:a,size:n,color:l,disabled:p,required:d,onChange:s,name:u,sx:f,className:C,enableClearable:x,...c}=e,[m,h]=R(e.value,e.defaultValue,zi(y=>{s?.({target:{value:y?.toString()||"",name:u||""}})},[s,u])),g=y=>{h(y.target.value)},S=()=>{h(e.defaultValue||"")},k=Te.createElement($i,{value:m,name:u,onChange:g,required:d,color:i?"danger":l,disabled:p,slotProps:{input:{ref:o,...c.slotProps?.input},...c.slotProps},...c,endDecorator:x?Te.createElement(z,{gap:1,direction:"row"},c.endDecorator,m&&Te.createElement($,{onMouseDown:y=>y.preventDefault(),onClick:S,"aria-label":"Clear"},Te.createElement(Hi,null))):c.endDecorator});return Te.createElement(ue,{required:d,color:l,size:n,error:i,disabled:p,sx:f,className:C},t&&Te.createElement(ge,null,t),k,r&&Te.createElement(fe,null,r))});eo.displayName="Input";var X=eo;import{styled as Wi,useThemeProps as qi}from"@mui/joy";import Yi from"intl-messageformat";var Ji={AED:2,ALL:2,AMD:2,ANG:2,AOA:2,ARS:2,AUD:2,AWG:2,AZN:2,BAM:2,BBD:2,BDT:2,BGN:2,BHD:3,BMD:2,BND:2,BOB:2,BRL:2,BSD:2,BWP:2,BYN:2,BZD:2,CAD:2,CHF:2,CLP:2,CNH:2,CNY:2,COP:2,CRC:2,CUP:2,CVE:0,CZK:2,DJF:0,DKK:2,DOP:2,DZD:2,EGP:2,ETB:2,EUR:2,FJD:2,FKP:2,GBP:2,GEL:2,GHS:2,GIP:2,GMD:2,GNF:0,GTQ:2,GYD:2,HKD:2,HNL:2,HTG:2,HUF:2,IDR:0,ILS:2,INR:2,IQD:3,ISK:2,JMD:2,JOD:3,JPY:0,KES:2,KGS:2,KHR:2,KMF:0,KRW:0,KWD:3,KYD:2,KZT:2,LAK:2,LBP:2,LKR:2,LYD:3,MAD:2,MDL:2,MKD:2,MMK:2,MNT:2,MOP:2,MRU:2,MUR:2,MVR:2,MWK:2,MXN:2,MYR:2,MZN:2,NAD:2,NGN:2,NIO:2,NOK:2,NPR:2,NZD:2,OMR:3,PAB:2,PEN:2,PGK:2,PHP:2,PKR:2,PLN:2,PYG:0,QAR:2,RON:2,RSD:2,RUB:2,RWF:0,SAR:2,SBD:2,SCR:2,SEK:2,SGD:2,SHP:2,SLE:2,SOS:2,SRD:2,STN:2,SVC:2,SZL:2,THB:2,TND:3,TOP:2,TRY:2,TTD:2,TWD:2,TZS:2,UAH:2,UGX:0,USD:2,UYU:2,UZS:2,VEF:2,VND:0,VUV:0,WST:2,XAF:0,XCD:2,XOF:0,XPF:0,YER:2,ZAR:2,ZMW:2},Fr=(e="USD")=>{let[o,t,r,...i]=new Yi(`{amount, number, ::currency/${e} unit-width-narrow}`).format({amount:1e3}).toString().replace(/\d/g,"").split(""),a=Ji[e];return{symbol:`${o} `,thousandSeparator:t,decimalSeparator:r,placeholder:r?`${o} 0${r}${Array.from(Array(a)).map(()=>0).join("")}`:`${o} 0`,fixedDecimalScale:!!r,decimalScale:a}};var ji=Lo.forwardRef(function(o,t){let{onChange:r,...i}=o;return Lo.createElement(Gi,{...i,onValueChange:({value:a})=>{r?.({target:{name:o.name,value:a}})},valueIsNumericString:!0,getInputRef:t,allowNegative:!1})}),Ki=Wi(X,{name:"CurrencyInput",slot:"root",overridesResolver:(e,o)=>o.root})({}),zo=Lo.forwardRef(function(o,t){let r=qi({props:o,name:"CurrencyInput"}),{currency:i="USD",name:a,onChange:n,label:l,error:p,helperText:d,required:s,disabled:u,useMinorUnit:f,sx:C,className:x,...c}=r,{symbol:m,thousandSeparator:h,decimalSeparator:g,placeholder:S,fixedDecimalScale:k,decimalScale:y}=Fr(i),[D,b]=R(r.value,r.defaultValue,Or(L=>n?.({target:{name:a,value:L}}),[n,a])),v=Lr(()=>D&&f?D/Math.pow(10,y):D,[D,f,y]),M=Lr(()=>r.max&&f?r.max/Math.pow(10,y):r.max,[r.max,f,y]),[T,F]=_i(!!M&&!!v&&v>M),O=Or(L=>{if(L.target.value===""){b(void 0);return}let q=Number(f?L.target.value?.replace(g,""):L.target.value);M&&Number(L.target.value)>M?F(!0):F(!1),b(q)},[g,M,f,b]);return Lo.createElement(Ki,{...c,ref:t,value:v,placeholder:S,onChange:O,error:p||T,disabled:u,required:s,color:p||T?"danger":r.color,label:l,helperText:T?new Ui(`limit: {amount, number, ::currency/${i} unit-width-narrow}`).format({amount:M}):d,slotProps:{input:{component:ji,decimalSeparator:g,thousandSeparator:h,prefix:m,fixedDecimalScale:k,decimalScale:y,"aria-label":c["aria-label"]}},sx:{...C},className:x})});var zr=zo;import P,{useCallback as ye,useEffect as Go,useMemo as _,useRef as Wo,useState as St,useId as Rl,forwardRef as Vl,useImperativeHandle as Hl}from"react";import{useVirtualizer as $l}from"@tanstack/react-virtual";import{styled as qo,LinearProgress as Yl,Link as Jl}from"@mui/joy";import _l from"@mui/icons-material/ArrowUpwardRounded";import Ul from"@mui/icons-material/Info";import{Sheet as Zi}from"@mui/joy";import{motion as Xi}from"framer-motion";var Qi=Xi(Zi),oo=Qi;oo.displayName="Sheet";var se=oo;import me from"react";import{Table as el}from"@mui/joy";var to=e=>{let{children:o,...t}=e;return me.createElement(el,{...t},o)};to.displayName="Table";function kt(e){let{headCells:o,showCheckbox:t,onCheckboxChange:r,slots:{checkbox:i=Qe}={},slotProps:{checkbox:a={}}={}}=e;return me.createElement("thead",null,me.createElement("tr",null,t&&me.createElement("th",{style:{width:"40px",textAlign:"center"}},me.createElement(i,{onChange:r,...a})),o.map(n=>me.createElement("th",{key:n.label,style:{width:n.width,minWidth:n.minWidth,maxWidth:n.maxWidth,textAlign:n.numeric?"right":"left"}},n.label))))}kt.displayName="TableHead";function wt(e){let{rows:o,cellOrder:t,rowOptions:r,showCheckbox:i,onCheckboxChange:a,slots:{checkbox:n=Qe}={},slotProps:{checkbox:l={}}={}}=e;return me.createElement("tbody",null,o.map((p,d)=>me.createElement("tr",{key:d},i&&me.createElement("td",{style:{textAlign:"center"}},me.createElement(n,{onChange:s=>a?.(s,d),...l})),t.map(s=>me.createElement("td",{key:s,style:{textAlign:r?.[s]?.numeric?"right":"left"}},p[s])))))}wt.displayName="TableBody";import Q,{forwardRef as il,useCallback as Ro,useEffect as Rr,useImperativeHandle as ll,useRef as Vr,useState as Hr}from"react";import{IMaskInput as sl,IMask as It}from"react-imask";import pl from"@mui/icons-material/CalendarToday";import{styled as Ho,useThemeProps as dl}from"@mui/joy";import{FocusTrap as ml,ClickAwayListener as cl,Popper as ul}from"@mui/base";import{DialogActions as ol,styled as tl}from"@mui/joy";import{motion as rl}from"framer-motion";var nl=rl(ol),al=tl(nl)(({theme:e})=>({padding:e.spacing(2),gap:e.spacing(2),flexDirection:"row",justifyContent:"flex-end"})),ro=al;ro.displayName="DialogActions";var he=ro;var gl=Ho($,{name:"DatePicker",slot:"calendarButton"})(({theme:e})=>({"&:focus":{"--Icon-color":"currentColor",outlineOffset:`${e.getCssVar("focus-thickness")}`,outline:`${e.getCssVar("focus-thickness")} solid ${e.getCssVar("palette-focusVisible")}`}})),fl=Ho(ul,{name:"DatePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),hl=Ho(se,{name:"DatePicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),yl=Ho("div",{name:"DatePicker",slot:"root",overridesResolver:(e,o)=>o.root})({width:"100%"}),$r=(e,o)=>{try{let t=Vo(e,o);return t.toString()==="Invalid Date"||e!==no(t,o)?!1:new RegExp(`^${o.replace(/Y/g,"\\d").replace(/M/g,"\\d").replace(/D/g,"\\d")}$`).test(e)}catch{return!1}},no=(e,o)=>{let t=`${e.getDate()}`,r=`${e.getMonth()+1}`,i=e.getFullYear();return Number(t)<10&&(t="0"+t),Number(r)<10&&(r="0"+r),o.replace(/YYYY/g,i.toString()).replace(/MM/g,r).replace(/DD/g,t)};function Vo(e,o){let t=o.split(/[-./\s]/),r=e.split(/[-./\s]/);if(t.length!==r.length)throw new Error("Invalid date string or format");let i,a,n;for(let p=0;p<t.length;p++){let d=parseInt(r[p],10);switch(t[p]){case"DD":i=d;break;case"MM":a=d-1;break;case"YYYY":n=d;break}}return new Date(n,a,i)}var Cl=e=>e.replace(/YYYY/g,"Y").replace(/MM/g,"M").replace(/DD/g,"D").replace(/[^YMD\s]/g,o=>`${o}\``),bl=Q.forwardRef(function(o,t){let{onChange:r,format:i,...a}=o;return Q.createElement(sl,{...a,inputRef:t,onAccept:n=>r({target:{name:o.name,value:n}}),mask:Date,pattern:Cl(i),blocks:{D:{mask:It.MaskedRange,from:1,to:31,maxLength:2},M:{mask:It.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:It.MaskedRange,from:1900,to:9999,maxLength:4}},format:n=>no(n,i),parse:n=>Vo(n,i),autofix:"pad",overwrite:!0})}),$o=il((e,o)=>{let t=dl({props:e,name:"DatePicker"}),{onChange:r,disabled:i,label:a,error:n,helperText:l,minDate:p,maxDate:d,disableFuture:s,disablePast:u,required:f,sx:C,className:x,format:c="YYYY/MM/DD",displayFormat:m="YYYY/MM/DD",size:h,inputReadOnly:g,hideClearButton:S,readOnly:k,...y}=t,D=Vr(null),b=Vr(null),[v,M]=R(t.value,t.defaultValue||"",Ro(I=>r?.({target:{name:t.name,value:I}}),[t.name,r]),{disableStrict:!0}),[T,F]=Hr(v),[O,L]=Hr(null),q=!!O;Rr(()=>{O||D.current?.blur()},[O,D]),Rr(()=>{if(!$r(T,m))return;if(v===""){F("");return}let Z=no(Vo(v,c),m);F(Z)},[m,T,c,v]),ll(o,()=>D.current,[D]);let Y=Ro(I=>{if(F(I.target.value),I.target.value===""){M("");return}if($r(I.target.value,m)){let B=Vo(I.target.value,m),w=no(B,c);M(w)}},[m,c,M]),N=Ro(I=>{L(O?null:I.currentTarget),setTimeout(()=>{D.current?.focus()},0)},[O,L,D]),E=Ro(I=>{g&&(I.preventDefault(),b.current?.focus())},[g,b]);return Q.createElement(yl,null,Q.createElement(ml,{open:!0},Q.createElement(Q.Fragment,null,Q.createElement(X,{...y,color:n?"danger":y.color,ref:D,size:h,value:T,onChange:Y,placeholder:m,disabled:i,required:f,error:n,slotProps:{input:{component:bl,ref:D,format:m,sx:{"&:hover":{cursor:g||k?"default":"text"}},onMouseDown:E}},className:x,sx:C,endDecorator:Q.createElement(gl,{ref:b,variant:"plain",onClick:k?void 0:N,"aria-label":"Toggle Calendar","aria-controls":"date-picker-popper","aria-haspopup":"dialog","aria-expanded":q,disabled:i},Q.createElement(pl,null)),label:a,helperText:l,readOnly:k||g}),q&&Q.createElement(cl,{onClickAway:()=>L(null)},Q.createElement(fl,{id:"date-picker-popper",open:!0,anchorEl:O,placement:"bottom-end",onMouseDown:I=>I.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":q},Q.createElement(hl,{tabIndex:-1,role:"presentation"},Q.createElement(Me,{value:Number.isNaN(new Date(v).getTime())?void 0:[new Date(v),void 0],onChange:([I])=>{Y({target:{name:t.name,value:no(I,c)}}),L(null)},minDate:p?new Date(p):void 0,maxDate:d?new Date(d):void 0,disableFuture:s,disablePast:u}),!S&&Q.createElement(he,{sx:{p:1}},Q.createElement(W,{size:h,variant:"plain",color:"neutral",onClick:()=>{Y({target:{name:t.name,value:""}}),L(null)}},"Clear"))))))))});var Yr=$o;import Yo from"react";import{Textarea as vl}from"@mui/joy";import{motion as xl}from"framer-motion";var Dl=xl(vl),ao=e=>{let{label:o,error:t,helperText:r,color:i,size:a,disabled:n,required:l,minRows:p=2,maxRows:d=4,sx:s,className:u,...f}=e,C=Yo.createElement(Dl,{required:l,disabled:n,color:t?"danger":i,size:a,minRows:p,maxRows:d,...f});return Yo.createElement(ue,{required:l,disabled:n,color:i,size:a,error:t,sx:s,className:u},o&&Yo.createElement(ge,null,o),C,r&&Yo.createElement(fe,null,r))};ao.displayName="Textarea";var Jr=ao;import io,{useMemo as Pl}from"react";import{Select as Ml,Option as Tl}from"@mui/joy";import{motion as kl}from"framer-motion";var wl=kl(Tl),Jo=wl;Jo.displayName="Option";function lo(e){let{label:o,helperText:t,error:r,size:i,color:a,disabled:n,required:l,onChange:p,sx:d,className:s,...u}=e,f=Pl(()=>e.options.map(c=>"value"in c?c:{value:c,label:c}),[e.options]),x=io.createElement(Ml,{...u,required:l,disabled:n,size:i,color:r?"danger":a,onChange:(c,m)=>{let h=c||{target:{}},g={...h,target:{name:h.target?.name||e.name,value:m||void 0}};p?.(g)}},f.map(c=>io.createElement(Jo,{key:c.value,value:c.value},c.label)));return io.createElement(ue,{required:l,disabled:n,size:i,color:a,error:r,sx:d,className:s},o&&io.createElement(ge,null,o),x,t&&io.createElement(fe,null,t))}lo.displayName="Select";var _r=lo;import Il from"react";import{Tooltip as Al}from"@mui/joy";import{motion as Sl}from"framer-motion";var Bl=Sl(Al),so=e=>Il.createElement(Bl,{...e});so.displayName="Tooltip";var At=so;import{motion as Wr}from"framer-motion";import ae,{useCallback as Nl,useEffect as El}from"react";import Fl from"@mui/icons-material/ChevronLeft";import Ol from"@mui/icons-material/ChevronRight";import{styled as _o}from"@mui/joy";var Se=_o(W,{name:"Pagination",slot:"button"})(({theme:e,active:o,size:t})=>({"--Button-size":{sm:"32px",md:"40px",lg:"48px"}[t],width:"var(--Button-size)",height:"var(--Button-size)",backgroundColor:o?e.vars.palette.primary.softHoverBg:"transparent",color:o?e.vars.palette.primary.softColor:e.vars.palette.neutral.plainColor,"&:hover":{color:o?e.vars.palette.primary.softColor:e.vars.palette.neutral.softColor,backgroundColor:o?e.vars.palette.primary.softActiveBg:e.vars.palette.neutral.softHoverBg}})),Ur=_o($,{name:"Pagination",slot:"button"})(({theme:e,size:o})=>({"--IconButton-size":{sm:"32px",md:"40px",lg:"48px"}[o],"--Icon-fontSize":"20px",width:"var(--IconButton-size)",height:"var(--IconButton-size)",color:e.vars.palette.neutral.plainColor,"&:hover":{color:e.vars.palette.neutral.softColor,backgroundColor:e.vars.palette.neutral.softHoverBg}})),Ll=_o(z,{name:"Pagination",slot:"root"})({}),zl=_o(z,{name:"Pagination",slot:"container"})(({theme:e,size:o})=>({gap:{sm:e.spacing(1),md:e.spacing(1.5),lg:e.spacing(2)}[o]}));function po(e){let{paginationModel:o,defaultPaginationModel:t={page:1,pageSize:25},onPageChange:r,rowCount:i,size:a="md",...n}=e,[l,p]=R(o,t,Nl(m=>{r(m.page)},[r])),d=m=>{p({...l,page:m})},s=1,u=Math.max(s,Math.ceil(i/l.pageSize)),f=[l.page-2,l.page-1].filter(m=>m>1),C=[l.page+1,l.page+2].filter(m=>m<=u-1),x=u>1&&l.page<u-3,c=u>1&&l.page>4;return El(()=>{l.page>u&&p({...l,page:u})},[i,l,u,p]),ae.createElement(Ll,{...n},ae.createElement(zl,{direction:"row",size:a,alignItems:"center"},ae.createElement(Ur,{size:a,variant:"plain",color:"neutral",onClick:()=>d(l.page-1),disabled:l.page===s,"aria-label":"Previous page"},ae.createElement(Fl,null)),l.page!==s&&ae.createElement(Se,{size:a,variant:"plain",color:"neutral",onClick:()=>d(s)},s),c&&ae.createElement(Se,{size:a,variant:"plain",color:"neutral",onClick:()=>d(l.page-3),"aria-label":"More previous pages"},"..."),f.map(m=>ae.createElement(Se,{key:m,size:a,variant:"plain",color:"neutral",onClick:()=>d(m)},m)),ae.createElement(Se,{active:!0,size:a,"aria-current":"page"},l.page),C.map(m=>ae.createElement(Se,{key:m,size:a,variant:"plain",color:"neutral",onClick:()=>d(m)},m)),x&&ae.createElement(Se,{size:a,variant:"plain",color:"neutral","aria-label":"More next pages",onClick:()=>d(l.page+3)},"..."),l.page!==u&&ae.createElement(Se,{size:a,variant:"plain",color:"neutral",onClick:()=>d(u)},u),ae.createElement(Ur,{size:a,variant:"plain",color:"neutral",onClick:()=>d(l.page+1),disabled:l.page===u,"aria-label":"Next page"},ae.createElement(Ol,null))))}po.displayName="Pagination";var Gr=po;function qr(e){return!e.editMode&&["number","date","currency"].includes(e.type||"")?"end":"start"}var Gl=qo("tr",{name:"DataTable",slot:"overlayWrapper"})({position:"sticky",top:"calc(var(--unstable_TableCell-height, 32px))",left:0,right:0,zIndex:1,"& > td":{height:0,padding:0,border:"none !important"}}),Uo=e=>"Intl"in window?new Intl.NumberFormat().format(e):e,Wl=e=>P.createElement(So,{sx:{position:"absolute",top:0,right:0,bottom:0,width:"4px",cursor:"col-resize"},onClick:o=>o.stopPropagation(),onMouseDown:o=>{let t=o.clientX,r=e.current?.getBoundingClientRect().width,i=n=>{r&&t&&(e.current.style.width=`${r+(n.clientX-t)}px`)},a=()=>{document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",a)};document.addEventListener("mousemove",i),document.addEventListener("mouseup",a)}}),ql=qo("tbody",{name:"DataTable",slot:"tableBody"})({"&::after":{content:"''",display:"block",height:"0.01em"}}),jl=qo("tr",{name:"DataTable",slot:"tableRow",shouldForwardProp:e=>e!=="striped"})(({striped:e})=>({...e&&{background:"var(--TableRow-stripeBackground, var(--ceed-palette-background-level2))",color:"var(--ceed-palette-text-primary)"},"&:hover":{background:"var(--TableRow-hoverBackground, var(--ceed-palette-background-level3))"}})),Kl=qo("span",{name:"DataTable",slot:"headCellAsterisk"})(({theme:e})=>({color:"var(--ceed-palette-danger-500)",marginLeft:e.spacing(.5)})),Zl=Wr(_l),Xl=e=>{let{width:o,maxWidth:t,minWidth:r,stickyHeader:i,resizable:a,field:n,tableId:l,headerName:p,required:d,editMode:s,sort:u,onSortChange:f,sortable:C=!0,sortOrder:x,description:c}=e,m=Wo(null),h=_(()=>`${l}_header_${p??n}`.trim(),[l,p,n]),g=a??!0?Wl(m):null,S={width:o,minWidth:r??"50px",maxWidth:t,position:i?void 0:"relative",cursor:C?"pointer":"default",userSelect:"none"},k=qr(e),y=x[0],D=C&&P.createElement(Zl,{style:{width:"16px",height:"16px"},role:"img","aria-labelledby":h,"aria-description":(u??y)==="desc"?"descending":"ascending","data-testid":void 0,variants:{hover:{opacity:1},initial:{opacity:0}},animate:{color:u?"var(--ceed-palette-text-secondary)":"var(--ceed-palette-primary-solidDisabledColor)",rotate:(u??y)==="desc"?180:0,opacity:u?1:0},transition:{duration:0,rotate:{duration:.2,ease:"easeOut"},color:{duration:.2,ease:"easeInOut"},opacity:{duration:.2,ease:"easeInOut"}}}),b=c?P.createElement(At,{onClick:v=>v.stopPropagation(),title:P.createElement(P.Fragment,null,c?.split(`
2
- `).map((v,M)=>P.createElement("div",{key:M},v))),placement:"top"},P.createElement(Ul,{fontSize:"small"})):null;return P.createElement(Wr.th,{id:h,"aria-label":p??n,"aria-sort":u?{asc:"ascending",desc:"descending"}[u]:"none",ref:m,key:n,style:S,onClick:v=>C&&f?.({field:n,currentSort:u,multiple:v.shiftKey}),whileHover:"hover",initial:"initial"},P.createElement(z,{gap:1,direction:"row",justifyContent:k,alignItems:"center"},k==="end"&&D,k==="end"&&b,P.createElement("div",null,p??n,s&&d&&P.createElement(Kl,null,"*")),k==="start"&&b,k==="start"&&D),g)},Ql=e=>{let{tableId:o,field:t,type:r,renderCell:i,renderEditCell:a,isCellEditable:n,noWrap:l,row:p,rowId:d}=e,[s,u]=St(p[t]),f=Wo(null),C=_(()=>({row:p,value:s,id:d}),[p,d,s]),x=_(()=>!!(e.editMode&&(typeof n=="function"?n(C):n??!0)),[e.editMode,n,C]),c=_(()=>({...typeof e.componentProps=="function"?e.componentProps(C):e.componentProps||{},size:"sm"}),[e,C]),m=_(()=>({...c,onChange:y=>{c.onChange?.(y),u(y.target.value),r==="select"&&e.onCellEditStop?.({...C,originalRow:p,row:{...C.row,[t]:y.target.value},value:y.target.value})},onFocus:y=>{c.onFocus?.(y),e.onCellEditStart?.({...C,originalRow:p,row:{...C.row,value:s},value:s})},onBlur:y=>{c.onBlur?.(y),r&&["number","text","longText","currency","date"].includes(r)&&e.onCellEditStop?.({...C,originalRow:p,row:{...C.row,[t]:s},value:s})},...r==="autocomplete"&&{onChangeComplete:y=>{c.onChangeComplete?.(y),u(y.target.value),e.onCellEditStop?.({...C,originalRow:p,row:{...C.row,[t]:y.target.value},value:y.target.value})}}}),[C,p,t,s,c,r,e]),h=_(()=>a?a(C):{date:P.createElement(Yr,{value:s,...m}),currency:P.createElement(zr,{value:s,...m}),number:P.createElement(X,{value:s,type:"number",...m}),text:P.createElement(X,{value:s,type:"text",...m}),longText:P.createElement(Jr,{value:s,...m}),autocomplete:P.createElement(gr,{value:s,options:m.options||[s],...m}),select:P.createElement(_r,{value:s,options:m.options||[s],...m})}[r||"text"],[s,m,r]),g=_(()=>{if(i)return i(C);let y=s;return{link:P.createElement(e.component||Jl,{children:y,...c})}[r||"text"]||y},[s,i,C,r,c,e]),S=_(()=>x&&h?h:g,[x,h,g]),k=_(()=>l&&e.type==="longText",[l,e.type]);return Go(()=>{u(p[t])},[p,t]),P.createElement("td",{ref:f,key:t,headers:`${o}_header_${e.headerName??t}`,style:{textAlign:qr({type:r}),verticalAlign:x?"top":"middle"}},k?P.createElement(At,{title:s,placement:"bottom",style:{maxWidth:"100%"},enterDelay:1500,enterNextDelay:1500},P.createElement("div",{style:{overflow:"hidden",textOverflow:"ellipsis"}},S)):S)},es=e=>{let{tableId:o,columns:t,rowId:r,editMode:i,noWrap:a,row:n}=e;return P.createElement(P.Fragment,null,t.map((l,p)=>P.createElement(Ql,{...l,tableId:o,key:`${r}_${l.field.toString()}_${p}`,row:n,rowId:r,editMode:i,noWrap:a})))};function os({rows:e,columns:o,rowCount:t,initialState:r,pagination:i,paginationMode:a,paginationModel:n,onPaginationModelChange:l,sortModel:p,sortOrder:d=["asc","desc",null],selectionModel:s=[],onSortModelChange:u,onSelectionModelChange:f,editMode:C,getId:x,isTotalSelected:c}){let[m,h]=St(null),[g,S]=R(p,r?.sorting?.sortModel??[],ye(B=>u?.(B),[u])),k=_(()=>o.reduce((B,w)=>({...B,[w.field]:w}),{}),[o]),y=ye((B,w)=>{for(let J of g){let{field:ie,sort:Re}=J,re=B[ie],pe=w[ie],De=k[ie],ne=0;if(De.sortComparator?ne=De.sortComparator({rowA:B,rowB:w}):typeof re=="string"&&typeof pe=="string"?ne=re.localeCompare(pe):typeof re=="number"&&typeof pe=="number"?ne=re-pe:re instanceof Date&&pe instanceof Date&&(ne=re.getTime()-pe.getTime()),ne!==0)return Re==="asc"?ne:-ne}return 0},[g,k]),D=_(()=>g.length?[...e].sort(y):e,[e,g,y]),b=_(()=>Array.from(new Set(d)),[d]),[v,M]=St(n?.page||1),T=n?.pageSize||20,F=ye((B,w)=>x?.(B)??B.id??`${(w||0)+(v-1)*T}`,[x,v,T]),O=_(()=>new Set(s),[s]),L=_(()=>!i||a==="server"?D:D.slice((v-1)*T,(v-1)*T+T),[D,v,T,a,i]),q=_(()=>L.length>0&&L.every((B,w)=>O.has(F(B,w))),[L,O,F]),Y=t||D.length,N=_(()=>c??(Y>0&&s.length===Y),[c,s,Y]),E=_(()=>(o||Object.keys(D[0]||{}).map(w=>({field:w}))).map(w=>({...w,isCellEditable:C&&(typeof w.isCellEditable=="function"?w.isCellEditable:w.isCellEditable??!0),sort:g.find(J=>J.field===w.field)?.sort,sortOrder:k[w.field]?.sortOrder||b})),[D,o,C,g,k,b]),I=ye(B=>{M(B),l?.({page:B,pageSize:T})},[l,T]),Z=ye(B=>{let{field:w,currentSort:J,multiple:ie}=B,re=k[w].sortOrder||b;if(J!==void 0){let De=(re.indexOf(J)+1)%re.length,ne=re[De];if(!ne){let Ee=ie?g.filter(xo=>xo.field!==w):[];S(Ee);return}let ct=ie?g.map(Ee=>Ee.field===w?{field:w,sort:ne}:Ee):[{field:w,sort:ne}];S(ct)}else{let pe=ie?[...g,{field:w,sort:re[0]}]:[{field:w,sort:re[0]}];S(pe)}},[b,k,g,S]);return Go(()=>{n||I(1)},[Y,I,n]),Go(()=>{let B=Math.max(1,Math.ceil(Y/T));v>B&&I(B)},[v,Y,T,I]),Go(()=>{f?.([])},[v]),{rowCount:Y,page:v,pageSize:T,onPaginationModelChange:I,getId:F,HeadCell:Xl,BodyRow:es,dataInPage:L,handleSortChange:Z,isAllSelected:q,isTotalSelected:N,isSelectedRow:ye(B=>O.has(B),[O]),focusedRowId:m,onRowFocus:ye(B=>{h(B)},[]),onAllCheckboxChange:ye(()=>{f?.(q?[]:L.map(F))},[q,L,f,F]),onCheckboxChange:ye((B,w)=>{if(O.has(w)){let J=s.filter(ie=>ie!==w);f?.(J)}else{let J=[...s,w];f?.(J)}},[s,f,O]),columns:E,onTotalSelect:ye(()=>{f?.(N?[]:D.map(F),!N)},[N,D,f,F])}}function ts(e,o){let{rows:t,checkboxSelection:r,editMode:i,selectionModel:a,onSelectionModelChange:n,disableSelectionOnClick:l,onRowClick:p,rowCount:d,columns:s,onPaginationModelChange:u,pagination:f,paginationMode:C,paginationModel:x,sortModel:c,sortOrder:m,onSortModelChange:h,initialState:g,loading:S,slots:{checkbox:k=Qe,toolbar:y,footer:D,loadingOverlay:b=()=>P.createElement(Yl,{value:8,variant:"plain"})}={},slotProps:{checkbox:v={},toolbar:M,background:T={}}={},stripe:F,...O}=e,L=Rl(),q=Wo(null),Y=Wo(null),{columns:N,isAllSelected:E,isSelectedRow:I,onAllCheckboxChange:Z,onCheckboxChange:B,getId:w,rowCount:J,page:ie,pageSize:Re,onPaginationModelChange:re,handleSortChange:pe,dataInPage:De,isTotalSelected:ne,focusedRowId:ct,onRowFocus:Ee,onTotalSelect:xo,HeadCell:In,BodyRow:An}=os(e),Do=$l({count:De.length,getScrollElement:()=>q.current,estimateSize:()=>32,measureElement:j=>j.clientHeight,overscan:20}),Sn=_(()=>({page:ie,pageSize:Re}),[ie,Re]),Bn=Do.getTotalSize(),Nn=Do.getVirtualItems();return Hl(o,()=>({getRowIndexRelativeToVisibleRows(j){return De.findIndex(Pe=>String(w(Pe))===j)},setCellFocus(j){let Pe=this.getRowIndexRelativeToVisibleRows(j),we=e.stickyHeader&&Do.getOffsetForIndex(Pe)?.[1]==="start"?0:1;Do.scrollToIndex(Pe+we),requestAnimationFrame(()=>{Y.current?.querySelector(`[data-row-id='${j}']`)?.focus()})}})),P.createElement(So,{sx:{maxHeight:"100%",overflow:"auto",display:"flex",flexDirection:"column"}},(!!r||!!y)&&P.createElement(z,{direction:"row",sx:{pt:1,pb:1},justifyContent:"space-between",alignItems:"center"},!!r&&P.createElement(z,{direction:"row",spacing:1},!E&&P.createElement(G,{level:"body-xs"},Uo(a?.length||0)," items selected"),E&&!ne&&P.createElement(z,{direction:"row",spacing:1,alignItems:"center"},P.createElement(G,{level:"body-xs"},"All ",Uo(a?.length||0)," items on this page are selected."),P.createElement(W,{size:"sm",variant:"plain",onClick:xo},"Select all ",Uo(J??t.length)," items")),ne&&P.createElement(z,{direction:"row",spacing:1,alignItems:"center"},P.createElement(G,{level:"body-xs"},"All ",Uo(J??t.length)," items are selected."),P.createElement(W,{size:"sm",variant:"plain",color:"danger",onClick:xo},"Cancel"))),y&&P.createElement(y,{...M||{}})),P.createElement(se,{variant:"outlined",sx:{height:"100%",overflow:"auto",width:"100%",boxShadow:"sm",borderRadius:"sm"},ref:q,...T},P.createElement(to,{...O},P.createElement("thead",null,P.createElement("tr",null,r&&P.createElement("th",{style:{width:"40px",textAlign:"center"}},P.createElement(k,{onChange:Z,checked:E,indeterminate:(a||[]).length>0&&!E,...v})),N.map((j,Pe)=>P.createElement(In,{tableId:L,key:`${j.field.toString()}_${Pe}`,stickyHeader:e.stickyHeader,editMode:!!j.isCellEditable,onSortChange:pe,...j})))),P.createElement(ql,{ref:Y,style:{height:`${Bn}px`}},!!S&&P.createElement(Gl,null,P.createElement("td",null,P.createElement(So,{sx:{position:"absolute",top:0,left:0,right:0}},P.createElement(b,null)))),Nn.map((j,Pe)=>{let we=j.index,ut=De[we],Ce=w(ut,we),En=F&&(F==="even"&&(we+1)%2===0||F==="odd"&&(we+1)%2===1);return P.createElement(jl,{key:j.key,"data-row-id":Ce,"data-index":we,role:r&&!l?"checkbox":void 0,tabIndex:ct===Ce?0:-1,onClick:Fe=>{p?.({row:ut,rowId:Ce},Fe),r&&!l&&B(Fe,Ce)},onFocus:()=>Ee(Ce),"aria-checked":r&&!l?I(Ce):void 0,striped:En,style:{height:`${j.size}px`,transform:`translateY(${j.start-Pe*j.size}px)`}},r&&P.createElement("th",{scope:"row",style:{textAlign:"center"}},P.createElement(k,{onClick:Fe=>Fe.stopPropagation(),onChange:Fe=>B(Fe,Ce),checked:I(Ce),...v})),P.createElement(An,{tableId:L,columns:N,row:ut,rowId:Ce,editMode:i,noWrap:e.noWrap}))})),D&&P.createElement(D,null))),f&&P.createElement(Gr,{py:2,size:"sm",alignItems:"flex-end",paginationModel:Sn,rowCount:J,onPageChange:re}))}var Bt=Vl(ts);Bt.displayName="DataTable";import ee,{forwardRef as rs,useCallback as mo,useEffect as ns,useImperativeHandle as as,useMemo as is,useRef as jr,useState as ls}from"react";import{IMaskInput as ss,IMask as Nt}from"react-imask";import ps from"@mui/icons-material/CalendarToday";import{styled as jo,useThemeProps as ds}from"@mui/joy";import{FocusTrap as ms,ClickAwayListener as cs,Popper as us}from"@mui/base";var gs=jo($,{name:"DateRangePicker",slot:"calendarButton"})(({theme:e})=>({"&:focus":{"--Icon-color":"currentColor",outlineOffset:`${e.getCssVar("focus-thickness")}`,outline:`${e.getCssVar("focus-thickness")} solid ${e.getCssVar("palette-focusVisible")}`}})),fs=jo(us,{name:"DateRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),hs=jo(se,{name:"DateRangePicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({zIndex:e.zIndex.tooltip,width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),ys=jo("div",{name:"DateRangePicker",slot:"root",overridesResolver:(e,o)=>o.root})({width:"100%"}),Zr=([e,o],t)=>{let r=i=>{let a=`${i.getDate()}`,n=`${i.getMonth()+1}`,l=i.getFullYear();return Number(a)<10&&(a="0"+a),Number(n)<10&&(n="0"+n),t.replace(/YYYY/g,l.toString()).replace(/MM/g,n).replace(/DD/g,a)};return[r(e),o?r(o):""].join(" - ")};function Kr(e,o){let t=o.split(/[-./\s]/),r=e.split(/[-./\s]/),i,a,n;for(let p=0;p<t.length;p++){let d=parseInt(r[p],10);switch(t[p]){case"DD":i=d;break;case"MM":a=d-1;break;case"YYYY":n=d;break}}return new Date(n,a,i)}var Xr=(e,o)=>{let t=e.split(" - ")[0]||"",r=e.split(" - ")[1]||"";return[Kr(t,o),Kr(r,o)]},Cs=e=>`${e} - ${e}`.replace(/YYYY/g,"Y").replace(/MM/g,"M").replace(/DD/g,"D").replace(/[^YMD\s]/g,o=>`${o}\``),bs=ee.forwardRef(function(o,t){let{onChange:r,format:i,...a}=o;return ee.createElement(ss,{...a,inputRef:t,onAccept:n=>r({target:{name:o.name,value:n}}),mask:Date,pattern:Cs(i),blocks:{D:{mask:Nt.MaskedRange,from:1,to:31,maxLength:2},M:{mask:Nt.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Nt.MaskedRange,from:1900,to:9999}},format:n=>Zr(n,i),parse:n=>Xr(n,i),autofix:"pad",overwrite:!0})}),Et=rs((e,o)=>{let t=ds({props:e,name:"DateRangePicker"}),{onChange:r,disabled:i,label:a,error:n,helperText:l,minDate:p,maxDate:d,disableFuture:s,disablePast:u,required:f,sx:C,className:x,format:c="YYYY/MM/DD",size:m,inputReadOnly:h,hideClearButton:g,readOnly:S,...k}=t,y=jr(null),D=jr(null),[b,v]=R(t.value,t.defaultValue||"",mo(E=>r?.({target:{name:t.name,value:E}}),[t.name,r]),{disableStrict:!0}),[M,T]=ls(null),F=!!M,O=is(()=>b?Xr(b,c):void 0,[b,c]);ns(()=>{M||y.current?.blur()},[M,y]),as(o,()=>y.current,[y]);let L=mo(E=>{v(E.target.value)},[v]),q=mo(E=>{T(M?null:E.currentTarget),y.current?.focus()},[M,T,y]),Y=mo(([E,I])=>{!E||!I||(v(Zr([E,I],c)),T(null))},[v,T,c]),N=mo(E=>{h&&(E.preventDefault(),D.current?.focus())},[h,D]);return ee.createElement(ys,null,ee.createElement(ms,{open:!0},ee.createElement(ee.Fragment,null,ee.createElement(X,{...k,color:n?"danger":k.color,ref:o,size:m,value:b,onChange:L,disabled:i,required:f,placeholder:`${c} - ${c}`,slotProps:{input:{component:bs,ref:y,format:c,sx:{"&:hover":{cursor:h||S?"default":"text"}},onMouseDown:N}},error:n,className:x,sx:C,endDecorator:ee.createElement(gs,{ref:D,variant:"plain",onClick:S?void 0:q,"aria-label":"Toggle Calendar","aria-controls":"date-range-picker-popper","aria-haspopup":"dialog","aria-expanded":F,disabled:i},ee.createElement(ps,null)),label:a,helperText:l,readOnly:S||h}),F&&ee.createElement(cs,{onClickAway:()=>T(null)},ee.createElement(fs,{id:"date-range-picker-popper",open:!0,anchorEl:M,placement:"bottom-end",onMouseDown:E=>E.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":F},ee.createElement(hs,{tabIndex:-1,role:"presentation"},ee.createElement(Me,{rangeSelection:!0,defaultValue:O,onChange:Y,minDate:p?new Date(p):void 0,maxDate:d?new Date(d):void 0,disableFuture:s,disablePast:u}),!g&&ee.createElement(he,{sx:{p:1}},ee.createElement(W,{size:m,variant:"plain",color:"neutral",onClick:()=>{v(""),T(null)}},"Clear"))))))))});Et.displayName="DateRangePicker";import{DialogContent as vs,styled as xs}from"@mui/joy";import{motion as Ds}from"framer-motion";var Ps=Ds(vs),Ms=xs(Ps)(({theme:e})=>({padding:e.spacing(0,6,5)})),co=Ms;co.displayName="DialogContent";var Ko=co;import{DialogTitle as Ts,styled as ks}from"@mui/joy";import{motion as ws}from"framer-motion";var Is=ws(Ts),As=ks(Is)(({theme:e})=>({padding:e.spacing(4,6)})),uo=As;uo.displayName="DialogTitle";var Zo=uo;import fo from"react";import Xo from"react";import{Modal as Ss,ModalDialog as Bs,ModalClose as Ns,ModalOverflow as Es,styled as Qr}from"@mui/joy";import{motion as Ft}from"framer-motion";var Fs=Ft(Ss),Ot=Fs;Ot.displayName="Modal";var en=Qr(Bs)({padding:0}),go=en;go.displayName="ModalDialog";var Os=Qr(Ft(Ns))(({theme:e})=>({top:e.spacing(3),right:e.spacing(6)})),Qo=Os;Qo.displayName="ModalClose";var Ls=Ft(Es),Lt=Ls;Lt.displayName="ModalOverflow";function zt(e){let{title:o,children:t,titleStartDecorator:r,...i}=e;return Xo.createElement(en,{...i},Xo.createElement(Qo,null),Xo.createElement(Zo,null,r,o),Xo.createElement(Ko,null,t))}zt.displayName="ModalFrame";import{styled as zs}from"@mui/joy";var Rs=zs(go,{name:"Dialog",slot:"Root"})({padding:0}),Rt=fo.forwardRef((e,o)=>{let{title:t,children:r,actions:i,fullscreen:a,...n}=e;return fo.createElement(Rs,{layout:a?"fullscreen":"center",ref:o,...n},fo.createElement(Zo,null,t),fo.createElement(Ko,null,r),fo.createElement(he,null,i))});Rt.displayName="DialogFrame";import Vs from"react";import{Divider as Hs}from"@mui/joy";import{motion as $s}from"framer-motion";var Ys=$s(Hs),ho=e=>Vs.createElement(Ys,{...e});ho.displayName="Divider";import Js from"react";import{Drawer as _s}from"@mui/joy";import{motion as Us}from"framer-motion";var Gs=Us(_s),Vt=e=>{let{children:o,...t}=e;return Js.createElement(Gs,{...t,slotProps:{...t.slotProps,content:{...t.slotProps?.content,sx:{bgcolor:"transparent",p:{md:3,sm:0},boxShadow:"none"}}}},o)};Vt.displayName="InsetDrawer";import H,{useCallback as et,useEffect as on,useMemo as yo,useRef as tn,useState as ot}from"react";import{styled as ke}from"@mui/joy";import Ws from"@mui/icons-material/CloudUploadRounded";import qs from"@mui/icons-material/UploadFileRounded";import js from"@mui/icons-material/ClearRounded";import{combine as Ks}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/combine.js";import{dropTargetForExternal as Zs,monitorForExternal as Xs}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/adapter.js";import{containsFiles as rn,getFiles as Qs}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/file.js";import{preventUnhandled as nn}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/prevent-unhandled.js";import{Input as ep}from"@mui/joy";var op=ke(ep)({width:"1px",height:"1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",position:"absolute"}),tp=ke(z,{name:"Uploader",slot:"PreviewRoot"})({}),rp=ke(Ze,{name:"Uploader",slot:"UploadCard"})(({theme:e})=>({padding:e.spacing(2.5),border:`1px solid ${e.palette.neutral.outlinedBorder}`})),np=ke(qs,{name:"Uploader",slot:"UploadFileIcon"})(({theme:e})=>({color:e.palette.neutral[400],width:"32px",height:"32px"})),ap=ke(js,{name:"Uploader",slot:"ClearIcon"})(({theme:e})=>({color:e.palette.neutral.plainColor,width:"18px",height:"18px"})),ip=["byte","kilobyte","megabyte","gigabyte","terabyte","petabyte"],lp={"image/*":[".jpeg",".jpg",".png",".gif",".bmp",".tiff",".svg",".webp",".heic",".ico"],"audio/*":[".mp3",".wav",".flac",".aac",".ogg",".m4a",".wma",".aiff",".alac",".midi",".mp4"],"video/*":[".mp4",".avi",".mkv",".mov",".wmv",".flv",".webm",".mpeg",".3gp",".m4v"]},Ht=e=>{let o=e==0?0:Math.floor(Math.log(e)/Math.log(1024)),t=e/Math.pow(1024,o),r=ip[o];return Intl.NumberFormat("en-us",{style:"unit",unit:r,unitDisplay:"narrow"}).format(t)},sp=e=>{let{files:o,uploaded:t,onDelete:r}=e;return H.createElement(tp,{gap:1},[...t,...o].map(i=>H.createElement(rp,{key:i.name,size:"sm",color:"neutral"},H.createElement(z,{direction:"row",alignItems:"center",gap:2},H.createElement(np,null),H.createElement(z,{flex:"1"},H.createElement(G,{level:"body-sm",textColor:"common.black"},i.name),!!i.size&&H.createElement(G,{level:"body-xs",fontWeight:"300",lineHeight:"1.33",textColor:"text.tertiary"},Ht(i.size))),H.createElement($,{onClick:()=>r?.(i)},H.createElement(ap,null))))))},pp=ke(z,{name:"Uploader",slot:"root"})(({theme:e})=>({gap:e.spacing(2)})),dp=ke(se,{name:"Uploader",slot:"dropZone",shouldForwardProp:e=>e!=="error"})(({theme:e,state:o,error:t})=>({width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",padding:e.spacing(5),gap:e.spacing(4),cursor:"pointer",backgroundColor:e.palette.background.surface,border:t?`1px solid ${e.palette.danger.outlinedBorder}`:o==="idle"?`1px solid ${e.palette.neutral.outlinedBorder}`:`1px solid ${e.palette.primary.outlinedBorder}`})),mp=ke(Ws,{name:"Uploader",slot:"iconContainer",shouldForwardProp:e=>e!=="error"})(({theme:e,state:o,error:t})=>({color:t?`rgba(${e.vars.palette.danger.mainChannel} / 0.6)`:o==="over"?`rgba(${e.palette.primary.mainChannel} / 0.6)`:e.palette.neutral.softActiveBg,width:"32px",height:"32px"})),an=H.memo(e=>{let{accept:o,minCount:t,maxCount:r,name:i,size:a,maxFileSize:n,maxFileTotalSize:l,onChange:p,label:d,disabled:s,onDelete:u}=e,f=tn(null),C=tn(null),[x,c]=ot(),[m,h]=ot([]),[g,S]=ot(e.uploaded||[]),[k,y]=ot("idle"),D=yo(()=>o.split(",").map(N=>N.trim()),[o]),b=yo(()=>D.flatMap(N=>["image/*","video/*","audio/*"].includes(N)?lp[N]:N),[D]),v=yo(()=>{let[N,E]=[D.filter(Z=>["image/*","video/*","audio/*"].includes(Z)).map(Z=>{let[B]=Z.split("/");return B.toLowerCase()}),D.filter(Z=>!["image/*","video/*","audio/*"].includes(Z)).map(Z=>{let[B,w]=Z.split("/");return w?w.toUpperCase():B.toUpperCase().replace(".","")})],I=[];return N.length>0&&I.push(`Any ${N.join(", ")} file`),E.length>0&&I.push(E.join(", ")),I.push(`Maximum ${Ht(l)}`),r&&I.push(`Up to ${r} ${r===1?"file":"files"}`),I.join(", ")},[D,l,r]),M=yo(()=>!!x||e.error,[e.error,x]),T=yo(()=>!r||r&&[...g,...m].length!==r,[m,r,g]),F=et(N=>{try{let E=b.map(w=>w.replace(".",""))||[],I=new RegExp(`${E.join("|")}`);if(N.forEach(w=>{let J=w.name.split(".").pop()||"";if(!I.test(J))throw new Error("Please upload acceptable file type.")}),n&&N.forEach(w=>{if(w.size>n)throw new Error(`One or more File size exceeded the maximum limit. Each file size must be ${Ht(n)} or less.`)}),[...m,...N].reduce((w,J)=>w+J.size,0)>l)throw new Error("Total File size exceeded the maximum limit.");let B=[...m,...N];if(r&&[...g,...B].length>r)throw new Error("Exceeded the maximum number of files.");p?.({target:{name:i,value:B}}),h(B),c(void 0)}catch(E){c(E.message)}},[m,g,r,b,n,l,i,p]);on(()=>{let N=f.current;if(!(!N||s))return Ks(Zs({element:N,canDrop:rn,onDragEnter:()=>y("over"),onDragLeave:()=>y("potential"),onDrop:async({source:E})=>{let I=await Qs({source:E});F(I)}}),Xs({canMonitor:rn,onDragStart:()=>{y("potential"),nn.start()},onDrop:()=>{y("idle"),nn.stop()}}))}),on(()=>{C.current&&t&&(m.length<t?C.current.setCustomValidity(`At least ${t} files are required.`):C.current.setCustomValidity(""))},[C,m,t]);let O=et(N=>{let E=Array.from(N.target.files||[]);F(E)},[F]),L=et(N=>{N instanceof File?h(E=>(p?.({target:{name:i,value:E.filter(I=>I!==N)}}),E.filter(I=>I!==N))):(S(E=>E.filter(I=>I.id!==N.id)),u?.(N)),c(void 0)},[i,p,u]),q=et(()=>{C.current?.click()},[]),Y=H.createElement(dp,{state:k,error:!!(M||x),ref:f,onClick:q},H.createElement(z,{alignItems:"center",gap:1},H.createElement(mp,{state:k,error:!!(M||x)})),H.createElement(op,{disabled:s,required:!!t,onInvalid:N=>{t&&m.length<t&&c(`Please choose ${t} ${t===1?"file":"files"} to upload.`)},slotProps:{input:{multiple:!0,accept:b.join(","),type:"file",ref:C,role:"button",onChange:O}}}));return H.createElement(pp,null,T&&H.createElement(ue,{size:a,error:!!(M||x),disabled:s,required:!!t},d&&H.createElement(ge,null,d),Y,H.createElement(fe,null,H.createElement(z,null,x&&H.createElement("div",null,x),H.createElement("div",null,v)))),[...g,...m].length>0&&H.createElement(sp,{files:m,uploaded:g,onDelete:L}))});import{Grid as ln}from"@mui/joy";import ce from"react";import up from"react-markdown";import{Link as gp}from"@mui/joy";import{visit as cp}from"unist-util-visit";function sn(e){let{accentColor:o}=e;return t=>{cp(t,"text",(r,i,a)=>{let n=r.value,l=/\|\|.*?\|\|/g,p,d=0,s=[];for(;(p=l.exec(n))!==null;){p.index>d&&s.push({type:"text",value:n.slice(d,p.index)});let u=p[0].split("||")[1];s.push({type:"element",tagName:"p",properties:{textColor:o},children:[{type:"text",value:u}]}),d=p.index+p[0].length}d<n.length&&s.push({type:"text",value:n.slice(d)}),s.length&&a.children.splice(i,1,...s)})}}var $t=e=>{let{color:o,textColor:t,defaultLevel:r="body-md",accentColor:i="danger.500",defaultLinkAction:a="_self",markdownOptions:n,boldFontWeight:l,content:p,...d}=e;return ce.createElement(U,{component:"div",color:o,textColor:t,level:r,...d},ce.createElement(up,{...n,children:p,rehypePlugins:[[sn,{accentColor:i}]],components:{h1:({children:s})=>ce.createElement(U,{color:o,textColor:t,level:"h1"},s),h2:({children:s})=>ce.createElement(U,{color:o,textColor:t,level:"h2"},s),h3:({children:s})=>ce.createElement(U,{color:o,textColor:t,level:"h3"},s),h4:({children:s})=>ce.createElement(U,{color:o,textColor:t,level:"h4"},s),p:({children:s,node:u})=>ce.createElement(U,{color:o,textColor:t,level:r,...u?.properties},s),a:({children:s,href:u})=>ce.createElement(gp,{href:u,target:a},s),hr:()=>ce.createElement(ho,null),b:({children:s})=>ce.createElement(U,{fontWeight:l},s),strong:({children:s})=>ce.createElement(U,{fontWeight:l},s),...n?.components}}))};$t.displayName="Markdown";import Be from"react";import{MenuButton as fp,Button as hp}from"@mui/joy";import pn from"@mui/icons-material/ExpandMore";function Yt(e){let{size:o,buttonText:t,items:r=[],showIcon:i}=e;return r.length?Be.createElement(Bo,null,Be.createElement(fp,{component:e.buttonComponent??"button",size:o,variant:"plain",endDecorator:i?Be.createElement(pn,null):void 0,...e.buttonComponentProps??{}},t),Be.createElement(be,{size:o},r.map(a=>Be.createElement(ve,{key:a.text,component:a.component,...a.componentProps??{}},a.text)))):Be.createElement(hp,{component:e.buttonComponent??"button",size:o,variant:"plain",color:"neutral",endDecorator:i?Be.createElement(pn,null):void 0,...e.buttonComponentProps??{}},t)}Yt.displayName="MenuButton";import oe,{forwardRef as yp,useCallback as Jt,useEffect as Cp,useImperativeHandle as bp,useRef as vp,useState as xp}from"react";import{IMaskInput as Dp,IMask as dn}from"react-imask";import Pp from"@mui/icons-material/CalendarToday";import{styled as _t,useThemeProps as Mp}from"@mui/joy";import{FocusTrap as Tp,ClickAwayListener as kp,Popper as wp}from"@mui/base";var Ip=_t(wp,{name:"MonthPicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Ap=_t(se,{name:"MonthPicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),Sp=_t("div",{name:"MonthPicker",slot:"root",overridesResolver:(e,o)=>o.root})({width:"100%"}),mn=(e,o)=>{let t=`${e.getMonth()+1}`,r=e.getFullYear();return Number(t)<10&&(t="0"+t),o.replace(/YYYY/g,r.toString()).replace(/MM/g,t)},Bp=e=>e.replace(/YYYY/g,"Y").replace(/MM/g,"M").replace(/[^YM\s]/g,o=>`${o}\``);function Np(e){let o,t,r=e.replace(/[^\d]/g,"");return e.match(/\d{1,2}.\d{4}/)?(o=r.slice(0,2),t=r.slice(2)):e.match(/\d{4}.\d{1,2}/)&&(t=r.slice(0,4),o=r.slice(4)),new Date(`${t}/${o}`)}var Ep=oe.forwardRef(function(o,t){let{onChange:r,format:i,...a}=o;return oe.createElement(Dp,{...a,inputRef:t,onAccept:n=>r({target:{name:o.name,value:n}}),mask:Date,pattern:Bp(i),blocks:{M:{mask:dn.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:dn.MaskedRange,from:1900,to:9999}},format:n=>mn(n,i),parse:Np,autofix:"pad",overwrite:!0})}),cn=yp((e,o)=>{let t=Mp({props:e,name:"MonthPicker"}),{onChange:r,disabled:i,label:a,error:n,helperText:l,minDate:p,maxDate:d,disableFuture:s,disablePast:u,required:f,sx:C,className:x,format:c="YYYY/MM",size:m,...h}=t,g=vp(null),[S,k]=R(t.value,t.defaultValue||"",Jt(T=>r?.({target:{name:t.name,value:T}}),[t.name,r]),{disableStrict:!0}),[y,D]=xp(null),b=!!y;Cp(()=>{y||g.current?.blur()},[y,g]),bp(o,()=>g.current,[g]);let v=Jt(T=>{k(T.target.value)},[k]),M=Jt(T=>{D(y?null:T.currentTarget),g.current?.focus()},[y,D,g]);return oe.createElement(Sp,null,oe.createElement(Tp,{open:!0},oe.createElement(oe.Fragment,null,oe.createElement(X,{...h,color:n?"danger":h.color,ref:g,size:m,value:S,onChange:v,placeholder:c,disabled:i,required:f,slotProps:{input:{component:Ep,ref:g,format:c}},error:n,className:x,sx:{...C,fontFamily:"monospace"},endDecorator:oe.createElement($,{variant:"plain",onClick:M,"aria-label":"Toggle Calendar","aria-controls":"month-picker-popper","aria-haspopup":"dialog","aria-expanded":b},oe.createElement(Pp,null)),label:a,helperText:l}),b&&oe.createElement(kp,{onClickAway:()=>D(null)},oe.createElement(Ip,{id:"month-picker-popper",open:!0,anchorEl:y,placement:"bottom-end",onMouseDown:T=>T.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":b},oe.createElement(Ap,{tabIndex:-1,role:"presentation"},oe.createElement(Me,{view:"month",views:["month"],value:Number.isNaN(new Date(S).getTime())?void 0:[new Date(S),void 0],onChange:([T])=>{v({target:{name:t.name,value:mn(T,c)}}),D(null)},minDate:p?new Date(p):void 0,maxDate:d?new Date(d):void 0,disableFuture:s,disablePast:u}),oe.createElement(he,{sx:{p:1}},oe.createElement(W,{size:m,variant:"plain",color:"neutral",onClick:()=>{v({target:{name:t.name,value:""}}),D(null)}},"Clear"))))))))});import te,{forwardRef as Fp,useCallback as tt,useEffect as Op,useImperativeHandle as Lp,useMemo as zp,useRef as Rp,useState as Vp}from"react";import{IMaskInput as Hp,IMask as un}from"react-imask";import $p from"@mui/icons-material/CalendarToday";import{styled as Ut,useThemeProps as Yp}from"@mui/joy";import{FocusTrap as Jp,ClickAwayListener as _p,Popper as Up}from"@mui/base";var Gp=Ut(Up,{name:"MonthRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Wp=Ut(se,{name:"MonthRangePicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({zIndex:e.zIndex.tooltip,width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),qp=Ut("div",{name:"MonthRangePicker",slot:"root",overridesResolver:(e,o)=>o.root})({width:"100%"}),fn=([e,o],t)=>{let r=i=>{let a=`${i.getMonth()+1}`,n=i.getFullYear();return Number(a)<10&&(a="0"+a),t.replace(/YYYY/g,n.toString()).replace(/MM/g,a)};return[r(e),o?r(o):""].join(" - ")};function gn(e){let o,t,r=e.replace(/[^\d]/g,"");return e.match(/\d{1,2}.\d{4}/)?(o=r.slice(0,2),t=r.slice(2)):e.match(/\d{4}.\d{1,2}/)&&(t=r.slice(0,4),o=r.slice(4)),new Date(`${t}/${o}`)}var hn=e=>{let o=e.split(" - ")[0]||"",t=e.split(" - ")[1]||"";return[gn(o),gn(t)]},jp=e=>`${e} - ${e}`.replace(/YYYY/g,"Y").replace(/MM/g,"m").replace(/[^YMm\s]/g,o=>`${o}\``),Kp=te.forwardRef(function(o,t){let{onChange:r,format:i,...a}=o;return te.createElement(Hp,{...a,inputRef:t,onAccept:n=>r({target:{name:o.name,value:n}}),mask:Date,pattern:jp(i),blocks:{m:{mask:un.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:un.MaskedRange,from:1900,to:9999}},format:n=>fn(n,i),parse:hn,autofix:"pad",overwrite:!0})}),Gt=Fp((e,o)=>{let t=Yp({props:e,name:"MonthRangePicker"}),{onChange:r,disabled:i,label:a,error:n,helperText:l,minDate:p,maxDate:d,disableFuture:s,disablePast:u,required:f,sx:C,className:x,format:c="YYYY/MM",size:m,...h}=t,g=Rp(null),[S,k]=R(t.value,t.defaultValue||"",tt(O=>r?.({target:{name:t.name,value:O}}),[t.name,r]),{disableStrict:!0}),[y,D]=Vp(null),b=!!y,v=zp(()=>S?hn(S):void 0,[S]);Op(()=>{y||g.current?.blur()},[y,g]),Lp(o,()=>g.current,[g]);let M=tt(O=>{k(O.target.value)},[k]),T=tt(O=>{D(y?null:O.currentTarget),g.current?.focus()},[y,D,g]),F=tt(([O,L])=>{!O||!L||(k(fn([O,L],c)),D(null))},[k,D,c]);return te.createElement(qp,null,te.createElement(Jp,{open:!0},te.createElement(te.Fragment,null,te.createElement(X,{...h,color:n?"danger":h.color,ref:o,size:m,value:S,onChange:M,disabled:i,required:f,placeholder:`${c} - ${c}`,slotProps:{input:{component:Kp,ref:g,format:c}},error:n,className:x,sx:{...C,fontFamily:"monospace"},endDecorator:te.createElement($,{variant:"plain",onClick:T,"aria-label":"Toggle Calendar","aria-controls":"month-range-picker-popper","aria-haspopup":"dialog","aria-expanded":b},te.createElement($p,null)),label:a,helperText:l}),b&&te.createElement(_p,{onClickAway:()=>D(null)},te.createElement(Gp,{id:"month-range-picker-popper",open:!0,anchorEl:y,placement:"bottom-end",onMouseDown:O=>O.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":b},te.createElement(Wp,{tabIndex:-1,role:"presentation"},te.createElement(Me,{view:"month",views:["month"],rangeSelection:!0,defaultValue:v,onChange:F,minDate:p?new Date(p):void 0,maxDate:d?new Date(d):void 0,disableFuture:s,disablePast:u}),te.createElement(he,{sx:{p:1}},te.createElement(W,{size:m,variant:"plain",color:"neutral",onClick:()=>{k(""),D(null)}},"Clear"))))))))});Gt.displayName="MonthRangePicker";import rt from"react";import{Accordion as Zp,AccordionSummary as Xp,AccordionDetails as Qp,styled as Cn,accordionSummaryClasses as yn,Stack as ed}from"@mui/joy";var od=Cn(Xp,{name:"NavigationGroup",slot:"Summary",shouldForwardProp:e=>e!=="useIcon"&&e!=="level"})(({theme:e,useIcon:o,level:t})=>({[`& .${yn.button}`]:{padding:e.spacing(4,6,4,(o?6:8)+(t||0)*8),[`&.${yn.expanded}`]:{color:e.palette.primary.plainColor,"--Icon-color":e.palette.primary.plainColor}}})),td=Cn(Qp,{name:"NavigationGroup",slot:"Details"})(({theme:e})=>({"--AccordionDetails-transition":"grid-template-rows 0.2s ease, padding-block 0.2s ease",backgroundColor:e.palette.background.level1}));function nt(e){let{title:o,children:t,startDecorator:r,level:i,...a}=e;return rt.createElement(Zp,{...a},rt.createElement(od,{useIcon:!!r,level:i},rt.createElement(ed,{direction:"row",gap:4},r,o)),rt.createElement(td,null,t))}import Wt from"react";import{ListItem as rd,ListItemButton as nd,ListItemDecorator as ad,styled as id,listItemButtonClasses as ld}from"@mui/joy";var sd=id(nd,{name:"NavigationItem",slot:"Button",shouldForwardProp:e=>e!=="useIcon"&&e!=="level"})(({theme:e,useIcon:o,level:t})=>({padding:e.spacing(4,6,4,(o?6:8)+(t||0)*8),gap:e.spacing(4),fontWeight:500,"&:hover":{backgroundColor:e.palette.neutral.plainHoverBg},"&:active":{backgroundColor:e.palette.neutral.plainActiveBg},[`&.${ld.selected}`]:{color:e.palette.primary.plainColor,"--Icon-color":e.palette.primary.plainColor,"&:not(:hover):not(:active)":{backgroundColor:e.palette.background.surface}}}));function at(e){let{children:o,startDecorator:t,level:r,selected:i,id:a,onClick:n,...l}=e,p=()=>{n?.(a)};return Wt.createElement(rd,{...l},Wt.createElement(sd,{level:r,useIcon:!!t,selected:i,"aria-current":i,onClick:p},t&&Wt.createElement(ad,null,t),o))}import qt from"react";function jt(e){let{items:o,level:t=0,onSelect:r}=e,i=a=>{r?.(a)};return qt.createElement("div",null,o.map((a,n)=>a.type==="item"?qt.createElement(at,{key:a.id,id:a.id,startDecorator:a.startDecorator,selected:a.selected,level:t,onClick:i},a.title):a.type==="group"?qt.createElement(nt,{key:n,title:a.title,startDecorator:a.startDecorator,level:t,defaultExpanded:a.expanded},a.content):null))}jt.displayName="Navigator";import it,{useCallback as bn,useMemo as pd,useState as dd}from"react";import{NumericFormat as md}from"react-number-format";import{styled as cd,useThemeProps as ud}from"@mui/joy";var gd=(e,o)=>{let[t,r=""]=`${e}`.split(".");return+`${t}${r.padEnd(o,"0")}`},fd=it.forwardRef(function(o,t){let{onChange:r,min:i,max:a,...n}=o;return it.createElement(md,{...n,onValueChange:({value:l})=>{r?.({target:{name:o.name,value:l}})},valueIsNumericString:!0,thousandSeparator:!0,suffix:"%",getInputRef:t,allowNegative:!0})}),hd=cd(X,{name:"PercentageInput",slot:"Root",overridesResolver:(e,o)=>o.root})({}),Kt=it.forwardRef(function(o,t){let r=ud({props:o,name:"PercentageInput"}),{name:i,onChange:a,label:n,error:l,helperText:p,required:d,disabled:s,useMinorUnit:u,maxDecimalScale:f=0,min:C,max:x,sx:c,className:m,...h}=r,[g,S]=R(r.value,r.defaultValue,bn(v=>a?.({target:{name:i,value:v}}),[a,i])),[k,y]=dd(x&&g&&g>x||C&&g&&g<C),D=pd(()=>g&&u?g/Math.pow(10,f):g,[g,u,f]),b=bn(v=>{if(v.target.value===""){S(void 0);return}let M=Number(v.target.value);C&&M<C||x&&M>x?y(!0):y(!1);let T=u?gd(M,f):M;S(T)},[S,u,f,C,x]);return it.createElement(hd,{...h,ref:t,value:D,onChange:b,error:k||l,disabled:s,required:d,color:k||l?"danger":r.color,label:n,helperText:p,slotProps:{input:{component:fd,"aria-label":h["aria-label"],decimalScale:f}},sx:{...c},className:m})});Kt.displayName="PercentageInput";import K,{useCallback as yd,useMemo as vn}from"react";import{Dropdown as Cd,ListDivider as bd,menuItemClasses as vd,styled as Zt,MenuButton as xd}from"@mui/joy";import{ClickAwayListener as Dd}from"@mui/base";import Pd from"@mui/icons-material/ArrowDropDown";var Md=Zt(Ie,{name:"ProfileMenu",slot:"item"})({});function xn(e){let{children:o,chip:t,caption:r,size:i}=e,a=vn(()=>i==="sm"?"body-xs":"body-sm",[i]),n=vn(()=>i==="sm"?"body-sm":"body-md",[i]);return K.createElement(Md,{px:4,py:2},K.createElement(Ie,{direction:"row",gap:2},K.createElement(U,{level:n,fontWeight:"bold",textColor:"text.primary"},o),t&&K.createElement(Ae,{size:i,color:"neutral",variant:"outlined"},t)),r&&K.createElement(U,{level:a,textColor:"text.tertiary"},r))}xn.displayName="ProfileCard";var Td=Zt(xd,{name:"ProfileMenu",slot:"button"})(({theme:e})=>({padding:e.spacing(1),"--Button-gap":e.spacing(1)}));function Dn(e){let{size:o="md",src:t,alt:r,children:i,getInitial:a,...n}=e;return K.createElement(Td,{variant:"plain",color:"neutral",size:o,endDecorator:K.createElement(Pd,null),...n},K.createElement(Ao,{variant:"soft",color:"primary",size:o,src:t,alt:r,getInitial:a},i))}Dn.displayName="ProfileMenuButton";var kd=Zt(be,{name:"ProfileMenu",slot:"root"})(({theme:e})=>({border:"none","--ListItem-paddingX":e.spacing(4),[`.${vd.root}`]:{border:"none"}}));function lt(e){let{open:o,defaultOpen:t,onOpenChange:r,profile:i,getInitial:a,menuItems:n,size:l,...p}=e,[d,s]=R(o,t??!1,yd(u=>r?.(u),[r]));return K.createElement(Dd,{onClickAway:()=>s(!1)},K.createElement("div",null,K.createElement(Cd,{open:d},K.createElement(Dn,{size:l,src:i.image?.src,alt:i.image?.alt,onClick:()=>s(!d),getInitial:a},i.name),K.createElement(kd,{size:l,placement:"bottom-end",...p,onClose:()=>s(!1)},K.createElement(xn,{size:l,caption:i.caption,chip:i.chip},i.name),!!n.length&&K.createElement(bd,null),n.map(({label:u,...f})=>K.createElement(ve,{...f,onClick:C=>{f.onClick?.(C),s(!1)}},u))))))}lt.displayName="ProfileMenu";import{Radio as wd,RadioGroup as Id}from"@mui/joy";import{motion as Pn}from"framer-motion";var Ad=Pn(wd),Co=Ad;Co.displayName="Radio";var Sd=Pn(Id),bo=Sd;bo.displayName="RadioGroup";import Mn from"react";function Xt(e){let{items:o,...t}=e;return Mn.createElement(bo,{...t},o.map(r=>Mn.createElement(Co,{key:`${r.value}`,value:r.value,label:r.label})))}Xt.displayName="RadioList";import Ne from"react";import{Stepper as Bd,Step as Nd,StepIndicator as Ed,stepClasses as Qt,stepIndicatorClasses as vo,styled as er}from"@mui/joy";import Fd from"@mui/icons-material/Check";import{motion as Od}from"framer-motion";var st=er(Nd)({});st.displayName="Step";var pt=er(Ed)({});pt.displayName="StepIndicator";var Ld=er(Bd)(({theme:e})=>({"--StepIndicator-size":"24px","--Step-gap":e.spacing(2),"--joy-palette-success-solidBg":"var(--joy-palette-success-400)",[`& .${vo.root}`]:{fontSize:"var(--ceed-fontSize-xs)"}})),zd=Od(Ld);function or(e){let{steps:o,activeColor:t="primary.500",inactiveColor:r="neutral.400",activeLineColor:i="primary.500",inactiveLineColor:a="neutral.300",activeStep:n}=e;return Ne.createElement(zd,{sx:l=>({"--StepIndicator-size":"24px","--Step-gap":l.spacing(2),[`& .${vo.root}`]:{fontSize:"var(--ceed-fontSize-xs)"},[`& .${Qt.completed}`]:{"&::after":{bgcolor:i},[`& .${vo.root}`]:{bgcolor:t}},[`& .${Qt.active}`]:{"&::after":{bgcolor:a},[`& .${vo.root}`]:{bgcolor:t}},[`& .${Qt.disabled}`]:{"&::after":{bgcolor:a},[`& .${vo.root}`]:{bgcolor:r}}})},o.map((l,p)=>{let d=n===p+1,s=n>p+1,u=n<p+1,f=l.label||l.extraContent;return Ne.createElement(st,{indicator:Ne.createElement(pt,{variant:"solid",color:"primary"},s?Ne.createElement(Fd,null):l.indicatorContent),active:d,completed:s,disabled:u},f&&Ne.createElement(z,null,l.label&&Ne.createElement(G,{level:"title-sm"},l.label),l.extraContent&&Ne.createElement(G,{level:"body-xs"},l.extraContent)))}))}or.displayName="Stepper";import Tn from"react";import{Switch as Rd,styled as Vd,switchClasses as Hd}from"@mui/joy";import{motion as kn}from"framer-motion";var $d=kn(Rd),Yd=Vd(kn.div)({"--Icon-fontSize":"calc(var(--Switch-thumbSize) * 0.75)",display:"inline-flex",justifyContent:"center",alignItems:"center",position:"absolute",left:"var(--Switch-thumbOffset)",width:"var(--Switch-thumbWidth)",height:"var(--Switch-thumbSize)",borderRadius:"var(--Switch-thumbRadius)",boxShadow:"var(--Switch-thumbShadow)",color:"var(--Switch-thumbColor)",backgroundColor:"var(--Switch-thumbBackground)",[`&.${Hd.checked}`]:{left:"unset",right:"var(--Switch-thumbOffset)"}}),Jd=e=>Tn.createElement(Yd,{...e,layout:!0,transition:_d}),_d={type:"spring",stiffness:700,damping:30},tr=e=>Tn.createElement($d,{...e,slots:{thumb:Jd,...e.slots}});tr.displayName="Switch";import{Tabs as Ud,Tab as Gd,TabList as Wd,TabPanel as qd,styled as jd,tabClasses as Kd}from"@mui/joy";import{motion as dt}from"framer-motion";var Zd=dt(Ud),rr=Zd;rr.displayName="Tabs";var Xd=jd(dt(Gd))(({theme:e})=>({[`&:not(.${Kd.selected})`]:{color:e.palette.neutral[700]}})),nr=Xd;nr.displayName="Tab";var Qd=dt(Wd),ar=Qd;ar.displayName="TabList";var em=dt(qd),ir=em;ir.displayName="TabPanel";import mt from"react";import{CssBaseline as lr,CssVarsProvider as om,checkboxClasses as tm,extendTheme as sr,inputClasses as ze}from"@mui/joy";var wn={palette:{danger:{50:"#FEF3F2",100:"#FDE6E5",200:"#FBC7C4",300:"#F89E99",400:"#F46E66",500:"#DC0D00",600:"#AB0F00",700:"#791000",800:"#430A0A",900:"#240505"},neutral:{50:"#FAFBFC",100:"#F3F5F7",200:"#EBECF0",300:"#D1D5DB",400:"#A2AAB8",500:"#5E6C83",600:"#505E79",700:"#253858",800:"#071B36",900:"#0B0D0E"},primary:{50:"#F2F7FE",100:"#E8F0FD",200:"#CCDFFC",300:"#9DC1F9",400:"#4D8EF3",500:"#015DEE",600:"#0154D6",700:"#0141A7",800:"#00255F",900:"#000F26"},warning:{50:"#FEF8F2",100:"#FEF1E5",200:"#FCE1C4",300:"#FABD7F",400:"#F57C00",500:"#AF5100",600:"#843600",700:"#672600",800:"#421400",900:"#1d1002"}}},pr=sr({cssVarPrefix:"ceed",spacing:4,breakpoints:{values:{xs:0,sm:600,md:900,lg:1280,xl:1920}},zIndex:{popup:1500},colorSchemes:{light:wn,dark:wn},components:{CurrencyInput:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${ze.root}`]:{"font-family":"monospace"}}}},DatePicker:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${ze.root}`]:{"font-family":"monospace"}}}},DateRangePicker:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${ze.root}`]:{"font-family":"monospace"}}}},MonthPicker:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${ze.root}`]:{"font-family":"monospace"}}}},MonthRangePicker:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${ze.root}`]:{"font-family":"monospace"}}}},PercentageInput:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${ze.root}`]:{"font-family":"monospace"}}}},JoySelect:{defaultProps:{size:"sm"}},JoyInput:{defaultProps:{size:"sm"}},JoyCheckbox:{defaultProps:{size:"sm"}},JoyRadio:{defaultProps:{size:"sm"}},JoySwitch:{defaultProps:{size:"sm"}},JoyAutocomplete:{defaultProps:{size:"sm"}},JoyTextarea:{defaultProps:{size:"sm"}},JoyTable:{defaultProps:{size:"sm",borderAxis:"bothBetween"},styleOverrides:{root:({theme:e})=>({"--TableRow-stripeBackground":e.palette.background.level1,"--TableCell-selectedBackground":e.palette.primary.plainActiveBg,"--TableRow-hoverBackground":e.palette.background.level3,"& tbody tr:has([type=checkbox]:not(:checked)) th":{"--TableCell-headBackground":"transparent"},"& tbody tr:has([type=checkbox]:checked):hover th":{"--TableCell-headBackground":"var(--TableRow-hoverBackground)"},"& tbody tr:has([type=checkbox]:checked):not(:hover) th":{"--TableCell-headBackground":"var(--TableCell-selectedBackground)"},"& tbody tr:has([type=checkbox]:checked):not(:hover) td":{"--TableCell-dataBackground":"var(--TableCell-selectedBackground)"},"& tbody tr:focus":{outline:`${e.palette.primary[500]} solid 2px`,outlineOffset:"-2px"},[`& .${tm.root}`]:{verticalAlign:"middle"}})}},JoyTooltip:{defaultProps:{size:"sm",placement:"top"},styleOverrides:{root:({ownerState:e,theme:o})=>({"--joy-spacing":o.spacing(1),...e.size==="sm"&&{padding:"calc(0.5 * var(--joy-spacing)) calc(1.25 * var(--joy-spacing))"},...e.size==="md"&&{padding:"calc(1 * var(--joy-spacing)) calc(1.5 * var(--joy-spacing))"},...e.size==="lg"&&{padding:"calc(1.5 * var(--joy-spacing)) calc(2 * var(--joy-spacing))"}})}},JoyAvatar:{styleOverrides:{root:({ownerState:e})=>({...e.size==="xs"&&{width:"24px",height:"24px",fontSize:"12px"}})}},JoyDialogTitle:{styleOverrides:{root:{fontWeight:"var(--ceed-fontWeight-xl, 700)"}}}}});function dr(e){let o=e.theme||pr;return mt.createElement(mt.Fragment,null,mt.createElement(om,{theme:o},mt.createElement(lr,null),e.children))}dr.displayName="ThemeProvider";export{ko as Accordion,To as AccordionDetails,Mo as AccordionSummary,gt as Accordions,ft as Alert,Kx as AspectRatio,Ue as Autocomplete,Jx as AutocompleteListbox,_x as AutocompleteOption,Ao as Avatar,fr as AvatarGroup,Xx as Badge,Ge as Box,yt as Breadcrumbs,qe as Button,rx as ButtonGroup,je as Calendar,Ze as Card,Pt as CardActions,xt as CardContent,Dt as CardCover,Mt as CardOverflow,Xe as Checkbox,Ae as Chip,lD as CircularProgress,Tt as Container,lr as CssBaseline,zo as CurrencyInput,Bt as DataTable,$o as DatePicker,Et as DateRangePicker,ro as DialogActions,co as DialogContent,Rt as DialogFrame,uo as DialogTitle,ho as Divider,pD as Drawer,We as Dropdown,He as FormControl,Ye as FormHelperText,$e as FormLabel,ln as Grid,Je as IconButton,eo as Input,Vt as InsetDrawer,mD as LinearProgress,wD as Link,uD as List,fD as ListDivider,yD as ListItem,bD as ListItemButton,xD as ListItemContent,PD as ListItemDecorator,TD as ListSubheader,$t as Markdown,be as Menu,Yt as MenuButton,ve as MenuItem,Ot as Modal,Qo as ModalClose,go as ModalDialog,zt as ModalFrame,Lt as ModalOverflow,cn as MonthPicker,Gt as MonthRangePicker,nt as NavigationGroup,at as NavigationItem,jt as Navigator,Jo as Option,po as Pagination,Kt as PercentageInput,lt as ProfileMenu,Co as Radio,bo as RadioGroup,Xt as RadioList,lo as Select,oo as Sheet,OD as Skeleton,AD as Slider,Ie as Stack,st as Step,ND as StepButton,pt as StepIndicator,or as Stepper,tr as Switch,nr as Tab,ar as TabList,ir as TabPanel,to as Table,wt as TableBody,kt as TableHead,rr as Tabs,ao as Textarea,dr as ThemeProvider,so as Tooltip,U as Typography,an as Uploader,Vx as accordionClasses,Hx as accordionDetailsClasses,Yx as accordionSummaryClasses,$x as accordionsClasses,nx as alertClasses,Zx as aspectRatioClasses,Ux as autocompleteClasses,Gx as autocompleteListboxClasses,Wx as autocompleteOptionClasses,qx as avatarClasses,jx as avatarGroupClasses,Qx as badgeClasses,ax as boxClasses,eD as breadcrumbsClasses,ix as buttonClasses,tD as cardActionsClasses,oD as cardClasses,rD as cardContentClasses,nD as cardCoverClasses,aD as cardOverflowClasses,lx as checkboxClasses,iD as chipClasses,sD as circularProgressClasses,Fx as dialogActionsClasses,Ex as dialogContentClasses,Nx as dialogTitleClasses,sx as dividerClasses,dD as drawerClasses,sr as extendTheme,Dx as formControlClasses,Mx as formHelperTextClasses,Px as formLabelClasses,Tx as gridClasses,px as iconButtonClasses,dx as inputClasses,cD as linearProgressClasses,ID as linkClasses,gD as listClasses,hD as listDividerClasses,vD as listItemButtonClasses,CD as listItemClasses,DD as listItemContentClasses,MD as listItemDecoratorClasses,kD as listSubheaderClasses,cx as menuButtonClasses,mx as menuClasses,ux as menuItemClasses,Ix as modalClasses,Ax as modalCloseClasses,Sx as modalDialogClasses,Bx as modalOverflowClasses,gx as optionClasses,fx as radioClasses,hx as radioGroupClasses,yx as selectClasses,wx as sheetClasses,LD as skeletonClasses,SD as sliderClasses,kx as stackClasses,ED as stepButtonClasses,BD as stepClasses,FD as stepperClasses,Cx as switchClasses,zx as tabListClasses,Rx as tabPanelClasses,bx as tableClasses,Lx as tabsClasses,vx as textareaClasses,pr as theme,Ox as tooltipClasses,xx as typographyClasses,ox as useColorScheme,ex as useTheme,tx as useThemeProps};
1
+ import{useTheme as fx,useColorScheme as hx,useThemeProps as yx,ButtonGroup as Cx,alertClasses as bx,boxClasses as vx,buttonClasses as xx,checkboxClasses as Dx,dividerClasses as Px,iconButtonClasses as Mx,inputClasses as Tx,menuClasses as kx,menuButtonClasses as Ix,menuItemClasses as wx,optionClasses as Ax,radioClasses as Sx,radioGroupClasses as Bx,selectClasses as Nx,switchClasses as Ex,tableClasses as Fx,textareaClasses as Ox,typographyClasses as Lx,formControlClasses as zx,formLabelClasses as Rx,formHelperTextClasses as Vx,gridClasses as Hx,stackClasses as $x,sheetClasses as Yx,modalClasses as Jx,modalCloseClasses as _x,modalDialogClasses as Ux,modalOverflowClasses as Gx,dialogTitleClasses as Wx,dialogContentClasses as qx,dialogActionsClasses as jx,tooltipClasses as Kx,tabsClasses as Zx,tabListClasses as Xx,tabPanelClasses as Qx,accordionClasses as eD,accordionDetailsClasses as oD,accordionGroupClasses as tD,accordionSummaryClasses as rD,AutocompleteListbox as nD,AutocompleteOption as aD,autocompleteClasses as iD,autocompleteListboxClasses as lD,autocompleteOptionClasses as sD,avatarClasses as pD,avatarGroupClasses as dD,AspectRatio as mD,aspectRatioClasses as cD,Badge as uD,badgeClasses as gD,breadcrumbsClasses as fD,cardClasses as hD,cardActionsClasses as yD,cardContentClasses as CD,cardCoverClasses as bD,cardOverflowClasses as vD,chipClasses as xD,CircularProgress as DD,circularProgressClasses as PD,Drawer as MD,drawerClasses as TD,LinearProgress as kD,linearProgressClasses as ID,List as wD,listClasses as AD,ListDivider as SD,listDividerClasses as BD,ListItem as ND,listItemClasses as ED,ListItemButton as FD,listItemButtonClasses as OD,ListItemContent as LD,listItemContentClasses as zD,ListItemDecorator as RD,listItemDecoratorClasses as VD,ListSubheader as HD,listSubheaderClasses as $D,Link as YD,linkClasses as JD,Slider as _D,sliderClasses as UD,stepClasses as GD,StepButton as WD,stepButtonClasses as qD,stepperClasses as jD,Skeleton as KD,skeletonClasses as ZD}from"@mui/joy";import Ve from"react";import{AccordionGroup as zn,Accordion as Rn,AccordionSummary as Vn,AccordionDetails as Hn}from"@mui/joy";import{motion as Po}from"framer-motion";var $n=Po(Vn),Mo=$n;Mo.displayName="AccordionSummary";var Yn=Po(Hn),To=Yn;To.displayName="AccordionDetails";var Jn=Po(Rn);function ko(e){let{summary:o,details:t,variant:r,color:i,...a}=e,n=r==="solid"?"solid":void 0;return Ve.createElement(Jn,{variant:n,color:i,...a},Ve.createElement(Mo,{variant:n,color:i},o),Ve.createElement(To,{variant:n,color:i},t))}ko.displayName="Accordion";var _n=Po(zn);function ht(e){let{variant:o,color:t,items:r,...i}=e;return Ve.createElement(_n,{variant:o,color:t,...i},r.map((a,n)=>Ve.createElement(ko,{key:n,summary:a.summary,details:a.details,index:n,variant:o,color:t})))}ht.displayName="Accordions";import Io from"react";import{Alert as jn,styled as Kn}from"@mui/joy";import{motion as Zn}from"framer-motion";import Un from"react";import{Typography as Gn}from"@mui/joy";import{motion as Wn}from"framer-motion";var qn=Wn(Gn),U=e=>Un.createElement(qn,{...e});U.displayName="Typography";var G=U;import{Stack as we}from"@mui/joy";var z=we;var Xn=Kn(Zn(jn))({alignItems:"flex-start",fontWeight:"unset"});function yt(e){let{title:o,content:t,actions:r,color:i="primary",...a}=e,n=e.invertedColors||e.variant==="solid";return Io.createElement(Xn,{...a,color:i,endDecorator:r,invertedColors:n},Io.createElement(z,null,o&&Io.createElement(G,{level:"title-sm",color:i},o),Io.createElement(G,{level:"body-sm",color:i},t)))}yt.displayName="Alert";import V,{useCallback as Ct,useEffect as xa,useMemo as _e,useRef as Da}from"react";import{Autocomplete as Pa,AutocompleteOption as Ma,ListSubheader as Ta,AutocompleteListbox as ka,ListItemDecorator as gr,CircularProgress as Ia,styled as fr}from"@mui/joy";import wa from"@mui/icons-material/Close";import{useVirtualizer as Aa}from"@tanstack/react-virtual";import{Popper as Sa}from"@mui/base";import{FormControl as Qn,styled as ea}from"@mui/joy";import{motion as oa}from"framer-motion";var ta=ea(oa(Qn))({width:"100%"}),He=ta;He.displayName="FormControl";var ue=He;import{FormLabel as ra}from"@mui/joy";import{motion as na}from"framer-motion";var aa=na(ra),$e=aa;$e.displayName="FormLabel";var ge=$e;import{FormHelperText as ia}from"@mui/joy";import{motion as la}from"framer-motion";var sa=la(ia),Ye=sa;Ye.displayName="FormHelperText";var fe=Ye;import{Chip as pa}from"@mui/joy";import{motion as da}from"framer-motion";var ma=da(pa),Ae=ma;Ae.displayName="Chip";var ur=Ae;import ca,{forwardRef as ua}from"react";import{IconButton as ga}from"@mui/joy";import{motion as fa}from"framer-motion";var ha=fa(ga),Je=ua(({...e},o)=>ca.createElement(ha,{ref:o,...e}));Je.displayName="IconButton";var $=Je;import{useState as ya,useCallback as Ca,useEffect as ba,useRef as va}from"react";function R(e,o,t,r){let{current:i}=va(e!==void 0),[a,n]=ya(e??o);ba(()=>{i&&n(e??o)},[e,o,i]);let l=Ca(p=>{let d=typeof p=="function"?p(a):p;(r?.disableStrict||!i)&&n(d),t?.(d)},[i,t,a,r]);return[a,l]}var Ba=fr(Sa,{name:"Autocomplete",slot:"Popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Na=V.forwardRef((e,o)=>{let{anchorEl:t,open:r,modifiers:i,children:a,ownerState:{loading:n,size:l="md"},...p}=e,d=Da(null),s=a[0].every(v=>v.hasOwnProperty("group")),u=n?[a[1]]:a[0].length===0?[a[2]]:s?a[0].flatMap(v=>[V.createElement(Ta,{key:v.key,component:"li"},v.group),...v.children]):a[0],f=Aa({count:u.length,estimateSize:()=>36,getScrollElement:()=>d.current,measureElement:v=>v.clientHeight,overscan:5}),C=f.getVirtualItems();return xa(()=>{r&&f.measure()},[r,f]),V.createElement(Ba,{ref:o,anchorEl:t,open:r,modifiers:i},V.createElement(ka,{...p},V.createElement("div",{ref:d,style:{overflow:"auto"}},V.createElement("div",{style:{height:`${f.getTotalSize()}px`,position:"relative"}},C.map(({index:v,size:c,start:m,key:h})=>V.cloneElement(u[v],{key:h,style:{position:"absolute",top:0,left:0,width:"100%",fontSize:`var(--ceed-fontSize-${l})`,height:`${c}px`,transform:`translateY(${m}px)`,overflow:"visible"},children:V.createElement("div",{style:{textOverflow:"ellipsis",textWrap:"nowrap",overflow:"hidden",width:"100%"}},u[v].props.children)}))))))}),wo={sm:"20px",md:"24px",lg:"28px"},Ea=fr($,{name:"Autocomplete",slot:"tagDelete"})(({theme:e,size:o="md"})=>({width:wo[o],height:wo[o],minWidth:wo[o],minHeight:wo[o],borderRadius:"50%"}));function Ue(e){let{label:o,error:t,helperText:r,color:i,size:a,disabled:n,required:l,onChange:p,onChangeComplete:d,sx:s,className:u,...f}=e,[C,v]=R(e.value,e.defaultValue||"",Ct(b=>p?.({target:{value:b,name:e.name}}),[p,e.name])),c=_e(()=>e.options.map(b=>typeof b!="object"?{value:b,label:b}:b),[e.options]),m=_e(()=>{let b=new Map;return c.forEach(x=>{b.set(x.value,x)}),b},[c]),h=_e(()=>e.loading?{value:"",label:"",startDecorator:V.createElement(Ia,{size:"sm",color:"neutral",variant:"plain",thickness:3})}:Array.isArray(C)?C.filter(b=>m.has(b)).map(b=>m.get(b||"")):m.get(C),[C,m,e.loading]),g=Ct(b=>V.isValidElement(b)&&!e.loading?V.cloneElement(b,{size:a}):b,[a,e.loading]),S=_e(()=>g(h?.startDecorator||e.startDecorator),[h,g,e.startDecorator]),T=_e(()=>g(h?.endDecorator||e.endDecorator),[h,g,e.endDecorator]),y=Ct((b,x)=>{let k=x,M=Array.isArray(k)?k.map(F=>F.value):k?.value;v(M),(Array.isArray(k)&&k.map(F=>m.get(F.value))||m.get(k?.value))&&d?.({...b,target:{...b.target,value:M}})},[d,v,m]),D=V.createElement(Pa,{...f,required:l,onChange:y,color:t?"danger":i,value:h||null,options:c,size:a,disabled:n,startDecorator:S,endDecorator:T,getOptionLabel:b=>`${b.label??""}`,renderTags:(b,x)=>b.map((k,M)=>{let{onClick:F,...O}=x({index:M});return g(V.createElement(ur,{color:"primary",...O},V.createElement(z,{direction:"row",alignItems:"center",gap:2,py:.5},k.value,g(V.createElement(Ea,{color:"primary",variant:"soft",onClick:F},V.createElement(wa,null))))))}),slots:{listbox:Na},renderOption:(b,x)=>V.createElement(Ma,{...b},x.startDecorator&&V.createElement(gr,{sx:k=>({marginInlineEnd:`var(--Input-gap, ${k.spacing(1)})`})},g(x.startDecorator)),g(x.label),x.endDecorator&&V.createElement(gr,{sx:k=>({marginInlineStart:`var(--Input-gap, ${k.spacing(1)})`})},g(x.endDecorator))),renderGroup:b=>b});return V.createElement(ue,{required:l,color:i,size:a,error:t,disabled:n,sx:s,className:u},o&&V.createElement(ge,null,o),D,r&&V.createElement(fe,null,r))}Ue.displayName="Autocomplete";var hr=Ue;import Fa,{forwardRef as Oa,useMemo as La}from"react";import{Avatar as za,AvatarGroup as yr,styled as Ra,useThemeProps as Va}from"@mui/joy";var Ha=Ra(za,{name:"Avatar",slot:"Root",overridesResolver:(e,o)=>o.root})({}),$a=e=>{if(/[ㄱ-ㅎ|ㅏ-ㅣ|가-힣]/.test(e))return e[0];{let t=e.trim().split(/\s+/);if(t.length===0)return;if(t.length===1)return t[0].charAt(0).toUpperCase();let r=t[0],i=t[t.length-1];return(r.charAt(0)+i.charAt(0)).toUpperCase()}},Ao=Oa(function(o,t){let r=Va({props:o,name:"Avatar"}),{children:i,getInitial:a=$a,...n}=r,l=La(()=>typeof i=="string"?a?.(i)??"":i,[i,a]);return Fa.createElement(Ha,{...n,children:l,ref:t})});import{Box as Ya}from"@mui/joy";import{motion as Ja}from"framer-motion";var _a=Ja(Ya),Ge=_a;Ge.displayName="Box";var So=Ge;import le from"react";import{Breadcrumbs as xr,Link as Xa,MenuButton as Qa}from"@mui/joy";import Cr from"react";import{Menu as Ua,MenuItem as Ga}from"@mui/joy";import{motion as br}from"framer-motion";var Wa=br(Ua),be=e=>Cr.createElement(Wa,{...e});be.displayName="Menu";var qa=br(Ga),ve=e=>Cr.createElement(qa,{...e});ve.displayName="MenuItem";var vr=be;import{Dropdown as ja}from"@mui/joy";import{motion as Ka}from"framer-motion";var Za=Ka(ja),We=Za;We.displayName="Dropdown";var Bo=We;function bt(e){let{crumbs:o,size:t,startCrumbCount:r=1,endCrumbCount:i=3,slots:{link:a,...n}={link:Xa},slotProps:{link:l,...p}={link:{color:"neutral"}},collapsed:d=!0,...s}=e,u=m=>m.type==="link"&&a?le.createElement(a,{to:m.linkHref,href:m.linkHref,...l},m.label):le.createElement(G,null,m.label);if(!d)return le.createElement(xr,{size:t,slots:n,slotProps:p,...s},o.map(m=>le.createElement(u,{...m})));let f=Math.max(1,i),C=o.slice(0,r).map(m=>le.createElement(u,{...m})),v=(r+f>o.length?o.slice(r):o.slice(-f)).map(m=>le.createElement(u,{...m})),c=o.slice(r,-f).map(m=>le.createElement(ve,null,le.createElement(u,{...m})));return le.createElement(xr,{size:t,slots:n,slotProps:p,...s},C,c.length&&le.createElement(Bo,null,le.createElement(Qa,{size:t,variant:"plain"},"..."),le.createElement(vr,{size:t},c)),v)}bt.displayName="Breadcrumbs";import ei,{forwardRef as oi}from"react";import{Button as ti}from"@mui/joy";import{motion as ri}from"framer-motion";var ni=ri(ti),qe=oi(({...e},o)=>ei.createElement(ni,{ref:o,...e}));qe.displayName="Button";var W=qe;import A,{Fragment as Le,forwardRef as li,useMemo as Sr}from"react";import{styled as de}from"@mui/joy";import si from"@mui/icons-material/ChevronLeft";import pi from"@mui/icons-material/ChevronRight";import{AnimatePresence as Br,motion as di}from"framer-motion";var Dr=e=>{let o=[],t=new Date(e.getFullYear(),e.getMonth(),1),r=new Date(e.getFullYear(),e.getMonth()+1,0),i=Math.ceil((t.getDay()+1)/7),a=Math.ceil((r.getDate()+t.getDay())/7),n=1;for(let l=1;l<=a;l++){let p=[];for(let d=1;d<=7;d++)l===i&&d<t.getDay()+1||n>r.getDate()?p.push(void 0):(p.push(n),n++);o.push(p)}return o},Pr=(e,o)=>e.toLocaleString(o,{year:"numeric"}),vt=(e,o)=>e.toLocaleString(o,{year:"numeric",month:"long"}),Mr=(e,o)=>new Date(0,e).toLocaleString(o,{month:"short"}),Tr=e=>{let o=new Date().getDay(),t=new Date;return t.setDate(t.getDate()-o),Array.from({length:7}).map(()=>{let r=t.toLocaleString(e,{weekday:"short"});return t.setDate(t.getDate()+1),r})},kr=e=>{let o=new Date,t=new Date(e);return t.setHours(0,0,0,0),o.setHours(0,0,0,0),t.getTime()===o.getTime()},xt=(e,o)=>{let t=new Date(e),r=new Date(o);return t.setHours(0,0,0,0),r.setHours(0,0,0,0),t.getTime()===r.getTime()},xe=(e,o,t)=>{let r=new Date(t);r.setHours(0,0,0,0);let i=new Date(Math.min(e.getTime(),o.getTime())),a=new Date(Math.max(e.getTime(),o.getTime()));return r>=i&&r<=a},No=(e,o)=>e.getFullYear()===o.getFullYear()&&e.getMonth()===o.getMonth();import{useCallback as Ir,useMemo as Dt,useState as Eo}from"react";import{useThemeProps as ai}from"@mui/joy";var ii=(e,o)=>o.includes(e)?e:o[0],wr=e=>{let[o,t]=Eo(()=>ii(e.view||"day",e.views||["day","month"])),[r,i]=Eo(e.defaultValue),[a,n]=Eo(()=>{let h=new Date;return h.setDate(1),h.setHours(0,0,0,0),e.value?.[0]||e.defaultValue?.[0]||h}),[[l,p],d]=Eo([0,0]),s=e.view??o,u=Dt(()=>{let h=e.minDate||new Date(0);return h.setHours(0,0,0,0),h},[e.minDate]),f=Dt(()=>{let h=e.maxDate||new Date(864e13);return h.setHours(0,0,0,0),h},[e.maxDate]),C=Ir(h=>{d([l+h,h])},[l]),v=Ir(h=>{n(h),s==="month"?a.getFullYear()!==h.getFullYear()&&C(h>a?1:-1):C(h>a?1:-1),e.onMonthChange?.(h)},[s,e,a,C]),c=ai({props:{locale:"default",views:["day","month"],view:s,value:e.value??r,...e,minDate:u,maxDate:f,onChange:e.value?e.onChange:h=>{i(h),e.onChange?.(h)},onMonthChange:v,onViewChange:()=>{let h=s==="month"?"day":"month";!(!e.views||e.views.includes(h))||e.view===h||(e.onViewChange?e.onViewChange(h):t(h))}},name:"Calendar"}),m=Dt(()=>({...c,viewMonth:a,direction:p}),[c,a,p]);return[c,m]};import{useCallback as Oe,useState as Ar}from"react";var Fo=e=>{let[o,t]=Ar(null),[r,i]=Ar(null);return{calendarTitle:e.view==="month"?Pr(e.viewMonth,e.locale||"default"):vt(e.viewMonth,e.locale||"default"),onPrev:Oe(()=>{if(e.view==="day"){let a=new Date(e.viewMonth||new Date);a.setMonth(a.getMonth()-1),e.onMonthChange?.(a)}else if(e.view==="month"){let a=new Date(e.viewMonth||new Date);a.setFullYear(a.getFullYear()-1),e.onMonthChange?.(a)}},[e.onMonthChange,e.viewMonth,e.view]),onNext:Oe(()=>{if(e.view==="day"){let a=new Date(e.viewMonth||new Date);a.setMonth(a.getMonth()+1),e.onMonthChange?.(a)}else if(e.view==="month"){let a=new Date(e.viewMonth||new Date);a.setFullYear(a.getFullYear()+1),e.onMonthChange?.(a)}},[e.onMonthChange,e.viewMonth,e.view]),getDayCellProps:Oe(a=>{let n=new Date(e.viewMonth||new Date);n.setHours(0,0,0,0),n.setDate(a);let l=e.rangeSelection&&e.value&&e.value[0]&&(o&&xe(e.value[0],o,n)||e.value[1]&&xe(e.value[0],e.value[1],n));return{"aria-label":n.toLocaleDateString(),"aria-current":l?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,o]),getMonthCellProps:Oe(a=>{let n=new Date(e.viewMonth||new Date);n.setDate(1),n.setHours(0,0,0,0),n.setMonth(a);let p=!e.views?.find(d=>d==="day")&&e.rangeSelection&&e.value&&e.value[0]&&(r&&xe(e.value[0],r,n)||e.value[1]&&xe(e.value[0],e.value[1],n));return{"aria-label":n.toLocaleDateString(),"aria-current":p?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,r]),getPickerDayProps:Oe(a=>{let n=new Date(e.viewMonth||new Date);n.setHours(0,0,0,0),n.setDate(a);let l=!!e.value&&(xt(n,e.value[0])||e.value[1]&&xt(n,e.value[1])),p=e.rangeSelection&&e.value&&e.value[0]&&(o&&xe(e.value[0],o,n)||e.value[1]&&xe(e.value[0],e.value[1],n)),d=()=>{e.rangeSelection?e.value?e.value[0]&&!e.value[1]?e.onChange?.([new Date(Math.min(e.value[0].getTime(),n.getTime())),new Date(Math.max(e.value[0].getTime(),n.getTime()))]):e.onChange?.([n,void 0]):e.onChange?.([n,void 0]):e.onChange?.([n,void 0]),t(null)};return{isToday:kr(n),isSelected:l,onClick:d,onMouseEnter:e.rangeSelection&&e.value?.[0]&&!e.value?.[1]?()=>t(n):void 0,disabled:e.minDate&&n<e.minDate||e.maxDate&&n>e.maxDate||e.disableFuture&&n>new Date||e.disablePast&&n<(()=>{let s=new Date;return s.setHours(0,0,0,0),s})(),tabIndex:-1,"aria-label":n.toLocaleDateString(),"aria-selected":l?"true":void 0,"aria-current":p?"date":void 0}},[e.onChange,e.value,e.viewMonth,e.rangeSelection,e.minDate,e.maxDate,e.disableFuture,e.disablePast,o]),getPickerMonthProps:Oe(a=>{let n=new Date(e.viewMonth||new Date);n.setDate(1),n.setHours(0,0,0,0),n.setMonth(a);let l=!e.views?.find(f=>f==="day"),p=l&&e.rangeSelection,d=!!e.value&&(No(n,e.value[0])||e.value[1]&&No(n,e.value[1])),s=p&&e.value&&e.value[0]&&(r&&xe(e.value[0],r,n)||e.value[1]&&xe(e.value[0],e.value[1],n)),u=()=>{p?e.value?e.value[0]&&!e.value[1]?e.onChange?.([new Date(Math.min(e.value[0].getTime(),n.getTime())),new Date(Math.max(e.value[0].getTime(),n.getTime()))]):e.onChange?.([n,void 0]):e.onChange?.([n,void 0]):l?e.onChange?.([n,void 0]):(e.onViewChange?.("day"),e.onMonthChange?.(n)),i(null)};return{isSelected:d,onMouseEnter:p&&e.value?.[0]&&!e.value?.[1]?()=>i(n):void 0,disabled:e.minDate&&(()=>{let f=new Date(n);return f.setMonth(f.getMonth()+1),f.setDate(0),f<e.minDate})()||e.maxDate&&(()=>{let f=new Date(n);return f.setDate(0),f>e.maxDate})()||e.disableFuture&&n>new Date||e.disablePast&&n<new Date&&!No(n,new Date),onClick:u,tabIndex:-1,"aria-label":vt(n,e.locale||"default"),"aria-selected":d?"true":void 0,"aria-current":s?"date":void 0}},[e.onMonthChange,e.onViewChange,e.onChange,e.viewMonth,e.locale,e.value,e.minDate,e.maxDate,e.disableFuture,e.disablePast,r])}};var mi=de("div",{name:"Calendar",slot:"root"})({maxWidth:"264px"}),ci=de("div",{name:"Calendar",slot:"calendarHeader"})(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",padding:e.spacing(2)})),Nr=de("div",{name:"Calendar",slot:"viewContainer",shouldForwardProp:e=>e!=="calendarType"})(({theme:e,calendarType:o})=>({paddingLeft:e.spacing(2),paddingRight:e.spacing(2),position:"relative",overflow:"hidden",minHeight:o==="datePicker"?"250px":"unset"})),Er=de(di.table,{name:"Calendar",slot:"viewTable"})(({theme:e})=>({borderSpacing:0,"& td, & th":{padding:0},"& th":{paddingTop:e.spacing(2),paddingBottom:e.spacing(2)}})),ui=de("thead",{name:"Calendar",slot:"weekHeaderContainer"})({}),gi=de("tbody",{name:"Calendar",slot:"dayPickerContainer"})({}),fi=de(W,{name:"Calendar",slot:"switchViewButton"})(({ownerState:e})=>[e.view==="month"&&{pointerEvents:"none"}]),hi=de("td",{name:"Calendar",slot:"dayCell"})(({theme:e})=>({"&[aria-current=date]":{position:"relative","& button[aria-current=date]:not([aria-selected=true]):not(:hover):not(:active)":{backgroundColor:`rgb(${e.palette.primary.lightChannel})`},'& + td[aria-hidden] + td[aria-current="date"]::before':{content:'""',position:"absolute",top:0,left:"-10px",bottom:0,width:"16px",backgroundColor:`rgb(${e.palette.primary.lightChannel})`,zIndex:-1}}})),yi=de("td",{name:"Calendar",slot:"monthCell"})(({theme:e})=>({"&[aria-current=date]":{position:"relative","& button[aria-current=date]:not([aria-selected=true]):not(:hover):not(:active)":{backgroundColor:`rgb(${e.palette.primary.lightChannel})`},'& + td[aria-hidden] + td[aria-current="date"]::before':{content:'""',position:"absolute",top:0,left:"-10px",bottom:0,width:"16px",backgroundColor:`rgb(${e.palette.primary.lightChannel})`,zIndex:-1}}})),Ci=de(W,{name:"Calendar",slot:"month",shouldForwardProp:e=>e!=="isSelected"})(({theme:e,isSelected:o,disabled:t})=>[{width:"59px",textAlign:"center","&:hover":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softHoverBg},"&:active":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softActiveBg}},o&&{backgroundColor:e.palette.primary.solidBg,color:e.palette.primary.solidColor,"&:hover":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidHoverBg},"&:active":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidActiveBg}},t&&{color:e.palette.neutral.solidDisabledColor,backgroundColor:e.palette.neutral.solidDisabledBg}]),bi=de(W,{name:"Calendar",slot:"day",shouldForwardProp:e=>!["isToday","isSelected"].includes(e)})(({theme:e,isToday:o,isSelected:t,disabled:r})=>[{width:"32px",height:"32px",textAlign:"center","&:hover":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softHoverBg},"&:active":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softActiveBg}},o&&!t&&{"&:not([aria-current=date]):not(:hover)":{border:`1px solid ${e.palette.neutral.outlinedBorder}`}},t&&{backgroundColor:e.palette.primary.solidBg,color:e.palette.primary.solidColor,"&:hover":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidHoverBg},"&:active":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidActiveBg}},r&&{color:e.palette.neutral.solidDisabledColor,backgroundColor:e.palette.neutral.solidDisabledBg}]),Fr={enter:e=>({x:e>0?300:-300,opacity:0}),center:{position:"relative",zIndex:1,x:0,opacity:1},exit:e=>({position:"absolute",zIndex:0,x:e<0?300:-300,opacity:0})},Oo=1e4,Or=(e,o)=>Math.abs(e)*o,vi=e=>{let{ownerState:o}=e,{getPickerDayProps:t,getDayCellProps:r}=Fo(o),i=Sr(()=>Dr(o.viewMonth),[o.viewMonth]),a=Sr(()=>Tr(o.locale||"default"),[o.locale]);return A.createElement(Nr,{calendarType:"datePicker"},A.createElement(Br,{initial:!1,custom:o.direction},A.createElement(Er,{key:`${o.viewMonth.toString()}_${o.direction}`,custom:o.direction,variants:Fr,initial:"enter",animate:"center",exit:"exit",transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}},drag:"x",dragConstraints:{left:0,right:0},dragElastic:1,onDragEnd:(n,{offset:l,velocity:p})=>{let d=Or(l.x,p.x);if(d<-Oo){let s=new Date(o.viewMonth||new Date);s.setMonth(s.getMonth()+1),o.onMonthChange?.(s)}else if(d>Oo){let s=new Date(o.viewMonth||new Date);s.setMonth(s.getMonth()-1),o.onMonthChange?.(s)}}},A.createElement(ui,null,A.createElement("tr",null,a.map((n,l)=>A.createElement(Le,{key:`${o.viewMonth}_${n}_${l}`},A.createElement("th",null,A.createElement(G,{level:"body-xs",textAlign:"center"},n)),l<6&&A.createElement("th",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"}))))),A.createElement(gi,null,i.map((n,l)=>A.createElement(Le,{key:`${o.viewMonth}_${l}`},A.createElement("tr",null,n.map((p,d)=>p?A.createElement(Le,{key:d},A.createElement(hi,{...r(p)},A.createElement(bi,{size:"sm",variant:"plain",color:"neutral",...t(p)},p)),d<6&&A.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})):A.createElement(Le,{key:d},A.createElement("td",null),d<6&&A.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})))),l<i.length-1&&A.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},A.createElement("td",{colSpan:13,style:{height:4}}))))))))},xi=e=>{let{ownerState:o}=e,{getPickerMonthProps:t,getMonthCellProps:r}=Fo(o),i=Array.from({length:12},(n,l)=>l).reduce((n,l)=>(n[n.length-1].length===4&&n.push([]),n[n.length-1].push(l),n),[[]]),a=!o.views?.find(n=>n==="day");return A.createElement(Nr,{calendarType:a?"monthPicker":"datePicker"},A.createElement(Br,{initial:!1,custom:o.direction},A.createElement(Er,{key:`${o.viewMonth.getFullYear()}_${o.direction}`,custom:o.direction,variants:Fr,initial:"enter",animate:"center",exit:"exit",transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}},drag:"x",dragConstraints:{left:0,right:0},dragElastic:1,onDragEnd:(n,{offset:l,velocity:p})=>{let d=Or(l.x,p.x);if(d<-Oo){let s=new Date(o.viewMonth||new Date);s.setMonth(s.getMonth()+1),o.onMonthChange?.(s)}else if(d>Oo){let s=new Date(o.viewMonth||new Date);s.setMonth(s.getMonth()-1),o.onMonthChange?.(s)}}},A.createElement("tbody",null,i.map((n,l)=>A.createElement(Le,{key:l},A.createElement("tr",null,n.map((p,d)=>A.createElement(Le,{key:p},A.createElement(yi,{...r(p)},A.createElement(Ci,{size:"sm",variant:"plain",color:"neutral",...t(p)},Mr(p,o.locale))),d<3&&A.createElement("td",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"})))),l<i.length-1&&A.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},A.createElement("td",{colSpan:7,style:{height:4}}))))))))},je=li((e,o)=>{let[t,r]=wr(e),{value:i,defaultValue:a,onChange:n,locale:l,onViewChange:p,onMonthChange:d,view:s,views:u,rangeSelection:f,minDate:C,maxDate:v,disableFuture:c,disablePast:m,...h}=t,{calendarTitle:g,onPrev:S,onNext:T}=Fo(r);return A.createElement(mi,{ref:o,...h},A.createElement(ci,null,A.createElement($,{size:"sm",onClick:S,"aria-label":`Previous ${s==="day"?"Month":"Year"}`},A.createElement(si,null)),A.createElement(fi,{ownerState:r,variant:"plain",color:"neutral",onClick:p,"aria-label":"Switch Calendar View"},g),A.createElement($,{size:"sm",onClick:T,"aria-label":`Next ${s==="day"?"Month":"Year"}`},A.createElement(pi,null))),s==="day"&&A.createElement(vi,{ownerState:r}),s==="month"&&A.createElement(xi,{ownerState:r}))});je.displayName="Calendar";var Me=je;import{Card as Di,CardContent as Pi,CardCover as Mi,CardActions as Ti,CardOverflow as ki}from"@mui/joy";import{motion as Ke}from"framer-motion";var Ii=Ke(Di),Ze=Ii;Ze.displayName="Card";var wi=Ke(Pi),Pt=wi;Pt.displayName="CardContent";var Ai=Ke(Mi),Mt=Ai;Mt.displayName="CardCover";var Si=Ke(Ti),Tt=Si;Tt.displayName="CardActions";var Bi=Ke(ki),kt=Bi;kt.displayName="CardOverflow";import Ni from"react";import{Checkbox as Ei}from"@mui/joy";import{motion as Fi}from"framer-motion";var Oi=Fi(Ei),Xe=e=>Ni.createElement(Oi,{...e});Xe.displayName="Checkbox";var Qe=Xe;import{styled as Li}from"@mui/joy";import zi,{forwardRef as Ri}from"react";var Vi=Li("div",{name:"Container",slot:"root",shouldForwardProp:e=>e!=="maxWidth"&&e!=="overrideBreakpoint"})(({theme:e,maxWidth:o="lg",overrideBreakpoint:t})=>[{width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block",paddingLeft:e.spacing(4),paddingRight:e.spacing(4),[e.breakpoints.up("lg")]:{paddingLeft:e.spacing(8),paddingRight:e.spacing(8)},maxWidth:e.breakpoints.values[o]},t?{paddingLeft:e.breakpoints.values[t]>=e.breakpoints.values.lg?e.spacing(8):e.spacing(4),paddingRight:e.breakpoints.values[t]>=e.breakpoints.values.lg?e.spacing(8):e.spacing(4)}:null]),It=Ri(function(o,t){return zi.createElement(Vi,{ref:t,...o})});It.displayName="Container";import Lo,{useCallback as zr,useMemo as Rr,useState as Wi}from"react";import{IntlMessageFormat as qi}from"intl-messageformat";import{NumericFormat as ji}from"react-number-format";import Te,{useCallback as Hi}from"react";import{Input as $i}from"@mui/joy";import{motion as Yi}from"framer-motion";import Ji from"@mui/icons-material/Close";var _i=Yi($i),eo=Te.forwardRef((e,o)=>{let{label:t,helperText:r,error:i,style:a,size:n,color:l,disabled:p,required:d,onChange:s,name:u,sx:f,className:C,enableClearable:v,...c}=e,[m,h]=R(e.value,e.defaultValue,Hi(y=>{s?.({target:{value:y?.toString()||"",name:u||""}})},[s,u])),g=y=>{h(y.target.value)},S=()=>{h(e.defaultValue||"")},T=Te.createElement(_i,{value:m,name:u,onChange:g,required:d,color:i?"danger":l,disabled:p,slotProps:{input:{ref:o,...c.slotProps?.input},...c.slotProps},...c,endDecorator:v?Te.createElement(z,{gap:1,direction:"row"},c.endDecorator,m&&Te.createElement($,{onMouseDown:y=>y.preventDefault(),onClick:S,"aria-label":"Clear"},Te.createElement(Ji,null))):c.endDecorator});return Te.createElement(ue,{required:d,color:l,size:n,error:i,disabled:p,sx:f,className:C},t&&Te.createElement(ge,null,t),T,r&&Te.createElement(fe,null,r))});eo.displayName="Input";var X=eo;import{styled as Ki,useThemeProps as Zi}from"@mui/joy";import Ui from"intl-messageformat";var Gi={AED:2,ALL:2,AMD:2,ANG:2,AOA:2,ARS:2,AUD:2,AWG:2,AZN:2,BAM:2,BBD:2,BDT:2,BGN:2,BHD:3,BMD:2,BND:2,BOB:2,BRL:2,BSD:2,BWP:2,BYN:2,BZD:2,CAD:2,CHF:2,CLP:2,CNH:2,CNY:2,COP:2,CRC:2,CUP:2,CVE:0,CZK:2,DJF:0,DKK:2,DOP:2,DZD:2,EGP:2,ETB:2,EUR:2,FJD:2,FKP:2,GBP:2,GEL:2,GHS:2,GIP:2,GMD:2,GNF:0,GTQ:2,GYD:2,HKD:2,HNL:2,HTG:2,HUF:2,IDR:0,ILS:2,INR:2,IQD:3,ISK:2,JMD:2,JOD:3,JPY:0,KES:2,KGS:2,KHR:2,KMF:0,KRW:0,KWD:3,KYD:2,KZT:2,LAK:2,LBP:2,LKR:2,LYD:3,MAD:2,MDL:2,MKD:2,MMK:2,MNT:2,MOP:2,MRU:2,MUR:2,MVR:2,MWK:2,MXN:2,MYR:2,MZN:2,NAD:2,NGN:2,NIO:2,NOK:2,NPR:2,NZD:2,OMR:3,PAB:2,PEN:2,PGK:2,PHP:2,PKR:2,PLN:2,PYG:0,QAR:2,RON:2,RSD:2,RUB:2,RWF:0,SAR:2,SBD:2,SCR:2,SEK:2,SGD:2,SHP:2,SLE:2,SOS:2,SRD:2,STN:2,SVC:2,SZL:2,THB:2,TND:3,TOP:2,TRY:2,TTD:2,TWD:2,TZS:2,UAH:2,UGX:0,USD:2,UYU:2,UZS:2,VEF:2,VND:0,VUV:0,WST:2,XAF:0,XCD:2,XOF:0,XPF:0,YER:2,ZAR:2,ZMW:2},Lr=(e="USD")=>{let[o,t,r,...i]=new Ui(`{amount, number, ::currency/${e} unit-width-narrow}`).format({amount:1e3}).toString().replace(/\d/g,"").split(""),a=Gi[e];return{symbol:`${o} `,thousandSeparator:t,decimalSeparator:r,placeholder:r?`${o} 0${r}${Array.from(Array(a)).map(()=>0).join("")}`:`${o} 0`,fixedDecimalScale:!!r,decimalScale:a}};var Xi=Lo.forwardRef(function(o,t){let{onChange:r,...i}=o;return Lo.createElement(ji,{...i,onValueChange:({value:a})=>{r?.({target:{name:o.name,value:a}})},valueIsNumericString:!0,getInputRef:t,allowNegative:!1})}),Qi=Ki(X,{name:"CurrencyInput",slot:"root",overridesResolver:(e,o)=>o.root})({}),zo=Lo.forwardRef(function(o,t){let r=Zi({props:o,name:"CurrencyInput"}),{currency:i="USD",name:a,onChange:n,label:l,error:p,helperText:d,required:s,disabled:u,useMinorUnit:f,sx:C,className:v,...c}=r,{symbol:m,thousandSeparator:h,decimalSeparator:g,placeholder:S,fixedDecimalScale:T,decimalScale:y}=Lr(i),[D,b]=R(r.value,r.defaultValue,zr(L=>n?.({target:{name:a,value:L}}),[n,a])),x=Rr(()=>D&&f?D/Math.pow(10,y):D,[D,f,y]),k=Rr(()=>r.max&&f?r.max/Math.pow(10,y):r.max,[r.max,f,y]),[M,F]=Wi(!!k&&!!x&&x>k),O=zr(L=>{if(L.target.value===""){b(void 0);return}let q=Number(f?L.target.value?.replace(g,""):L.target.value);k&&Number(L.target.value)>k?F(!0):F(!1),b(q)},[g,k,f,b]);return Lo.createElement(Qi,{...c,ref:t,value:x,placeholder:S,onChange:O,error:p||M,disabled:u,required:s,color:p||M?"danger":r.color,label:l,helperText:M?new qi(`limit: {amount, number, ::currency/${i} unit-width-narrow}`).format({amount:k}):d,slotProps:{input:{component:Xi,decimalSeparator:g,thousandSeparator:h,prefix:m,fixedDecimalScale:T,decimalScale:y,"aria-label":c["aria-label"]}},sx:{...C},className:v})});var Vr=zo;import P,{useCallback as ye,useEffect as qo,useMemo as _,useRef as jo,useState as Nt,useId as _l,forwardRef as Ul,useImperativeHandle as Gl}from"react";import{useVirtualizer as Wl}from"@tanstack/react-virtual";import{styled as Ko,LinearProgress as ql,Link as jl}from"@mui/joy";import Kl from"@mui/icons-material/ArrowUpwardRounded";import{Sheet as el}from"@mui/joy";import{motion as ol}from"framer-motion";var tl=ol(el),oo=tl;oo.displayName="Sheet";var se=oo;import me from"react";import{Table as rl}from"@mui/joy";var to=e=>{let{children:o,...t}=e;return me.createElement(rl,{...t},o)};to.displayName="Table";function wt(e){let{headCells:o,showCheckbox:t,onCheckboxChange:r,slots:{checkbox:i=Qe}={},slotProps:{checkbox:a={}}={}}=e;return me.createElement("thead",null,me.createElement("tr",null,t&&me.createElement("th",{style:{width:"40px",textAlign:"center"}},me.createElement(i,{onChange:r,...a})),o.map(n=>me.createElement("th",{key:n.label,style:{width:n.width,minWidth:n.minWidth,maxWidth:n.maxWidth,textAlign:n.numeric?"right":"left"}},n.label))))}wt.displayName="TableHead";function At(e){let{rows:o,cellOrder:t,rowOptions:r,showCheckbox:i,onCheckboxChange:a,slots:{checkbox:n=Qe}={},slotProps:{checkbox:l={}}={}}=e;return me.createElement("tbody",null,o.map((p,d)=>me.createElement("tr",{key:d},i&&me.createElement("td",{style:{textAlign:"center"}},me.createElement(n,{onChange:s=>a?.(s,d),...l})),t.map(s=>me.createElement("td",{key:s,style:{textAlign:r?.[s]?.numeric?"right":"left"}},p[s])))))}At.displayName="TableBody";import Q,{forwardRef as pl,useCallback as Ro,useEffect as Hr,useImperativeHandle as dl,useRef as $r,useState as Yr}from"react";import{IMaskInput as ml,IMask as St}from"react-imask";import cl from"@mui/icons-material/CalendarToday";import{styled as Ho,useThemeProps as ul}from"@mui/joy";import{FocusTrap as gl,ClickAwayListener as fl,Popper as hl}from"@mui/base";import{DialogActions as nl,styled as al}from"@mui/joy";import{motion as il}from"framer-motion";var ll=il(nl),sl=al(ll)(({theme:e})=>({padding:e.spacing(2),gap:e.spacing(2),flexDirection:"row",justifyContent:"flex-end"})),ro=sl;ro.displayName="DialogActions";var he=ro;var yl=Ho($,{name:"DatePicker",slot:"calendarButton"})(({theme:e})=>({"&:focus":{"--Icon-color":"currentColor",outlineOffset:`${e.getCssVar("focus-thickness")}`,outline:`${e.getCssVar("focus-thickness")} solid ${e.getCssVar("palette-focusVisible")}`}})),Cl=Ho(hl,{name:"DatePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),bl=Ho(se,{name:"DatePicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),vl=Ho("div",{name:"DatePicker",slot:"root",overridesResolver:(e,o)=>o.root})({width:"100%"}),Jr=(e,o)=>{try{let t=Vo(e,o);return t.toString()==="Invalid Date"||e!==no(t,o)?!1:new RegExp(`^${o.replace(/Y/g,"\\d").replace(/M/g,"\\d").replace(/D/g,"\\d")}$`).test(e)}catch{return!1}},no=(e,o)=>{let t=`${e.getDate()}`,r=`${e.getMonth()+1}`,i=e.getFullYear();return Number(t)<10&&(t="0"+t),Number(r)<10&&(r="0"+r),o.replace(/YYYY/g,i.toString()).replace(/MM/g,r).replace(/DD/g,t)};function Vo(e,o){let t=o.split(/[-./\s]/),r=e.split(/[-./\s]/);if(t.length!==r.length)throw new Error("Invalid date string or format");let i,a,n;for(let p=0;p<t.length;p++){let d=parseInt(r[p],10);switch(t[p]){case"DD":i=d;break;case"MM":a=d-1;break;case"YYYY":n=d;break}}return new Date(n,a,i)}var xl=e=>e.replace(/YYYY/g,"Y").replace(/MM/g,"M").replace(/DD/g,"D").replace(/[^YMD\s]/g,o=>`${o}\``),Dl=Q.forwardRef(function(o,t){let{onChange:r,format:i,...a}=o;return Q.createElement(ml,{...a,inputRef:t,onAccept:n=>r({target:{name:o.name,value:n}}),mask:Date,pattern:xl(i),blocks:{D:{mask:St.MaskedRange,from:1,to:31,maxLength:2},M:{mask:St.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:St.MaskedRange,from:1900,to:9999,maxLength:4}},format:n=>no(n,i),parse:n=>Vo(n,i),autofix:"pad",overwrite:!0})}),$o=pl((e,o)=>{let t=ul({props:e,name:"DatePicker"}),{onChange:r,disabled:i,label:a,error:n,helperText:l,minDate:p,maxDate:d,disableFuture:s,disablePast:u,required:f,sx:C,className:v,format:c="YYYY/MM/DD",displayFormat:m="YYYY/MM/DD",size:h,inputReadOnly:g,hideClearButton:S,readOnly:T,...y}=t,D=$r(null),b=$r(null),[x,k]=R(t.value,t.defaultValue||"",Ro(w=>r?.({target:{name:t.name,value:w}}),[t.name,r]),{disableStrict:!0}),[M,F]=Yr(x),[O,L]=Yr(null),q=!!O;Hr(()=>{O||D.current?.blur()},[O,D]),Hr(()=>{if(!Jr(M,m))return;if(x===""){F("");return}let Z=no(Vo(x,c),m);F(Z)},[m,M,c,x]),dl(o,()=>D.current,[D]);let Y=Ro(w=>{if(F(w.target.value),w.target.value===""){k("");return}if(Jr(w.target.value,m)){let B=Vo(w.target.value,m),I=no(B,c);k(I)}},[m,c,k]),N=Ro(w=>{L(O?null:w.currentTarget),setTimeout(()=>{D.current?.focus()},0)},[O,L,D]),E=Ro(w=>{g&&(w.preventDefault(),b.current?.focus())},[g,b]);return Q.createElement(vl,null,Q.createElement(gl,{open:!0},Q.createElement(Q.Fragment,null,Q.createElement(X,{...y,color:n?"danger":y.color,ref:D,size:h,value:M,onChange:Y,placeholder:m,disabled:i,required:f,error:n,slotProps:{input:{component:Dl,ref:D,format:m,sx:{"&:hover":{cursor:g||T?"default":"text"}},onMouseDown:E}},className:v,sx:C,endDecorator:Q.createElement(yl,{ref:b,variant:"plain",onClick:T?void 0:N,"aria-label":"Toggle Calendar","aria-controls":"date-picker-popper","aria-haspopup":"dialog","aria-expanded":q,disabled:i},Q.createElement(cl,null)),label:a,helperText:l,readOnly:T||g}),q&&Q.createElement(fl,{onClickAway:()=>L(null)},Q.createElement(Cl,{id:"date-picker-popper",open:!0,anchorEl:O,placement:"bottom-end",onMouseDown:w=>w.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":q},Q.createElement(bl,{tabIndex:-1,role:"presentation"},Q.createElement(Me,{value:Number.isNaN(new Date(x).getTime())?void 0:[new Date(x),void 0],onChange:([w])=>{Y({target:{name:t.name,value:no(w,c)}}),L(null)},minDate:p?new Date(p):void 0,maxDate:d?new Date(d):void 0,disableFuture:s,disablePast:u}),!S&&Q.createElement(he,{sx:{p:1}},Q.createElement(W,{size:h,variant:"plain",color:"neutral",onClick:()=>{Y({target:{name:t.name,value:""}}),L(null)}},"Clear"))))))))});var _r=$o;import Yo from"react";import{Textarea as Pl}from"@mui/joy";import{motion as Ml}from"framer-motion";var Tl=Ml(Pl),ao=e=>{let{label:o,error:t,helperText:r,color:i,size:a,disabled:n,required:l,minRows:p=2,maxRows:d=4,sx:s,className:u,...f}=e,C=Yo.createElement(Tl,{required:l,disabled:n,color:t?"danger":i,size:a,minRows:p,maxRows:d,...f});return Yo.createElement(ue,{required:l,disabled:n,color:i,size:a,error:t,sx:s,className:u},o&&Yo.createElement(ge,null,o),C,r&&Yo.createElement(fe,null,r))};ao.displayName="Textarea";var Ur=ao;import io,{useMemo as kl}from"react";import{Select as Il,Option as wl}from"@mui/joy";import{motion as Al}from"framer-motion";var Sl=Al(wl),Jo=Sl;Jo.displayName="Option";function lo(e){let{label:o,helperText:t,error:r,size:i,color:a,disabled:n,required:l,onChange:p,sx:d,className:s,...u}=e,f=kl(()=>e.options.map(c=>"value"in c?c:{value:c,label:c}),[e.options]),v=io.createElement(Il,{...u,required:l,disabled:n,size:i,color:r?"danger":a,onChange:(c,m)=>{let h=c||{target:{}},g={...h,target:{name:h.target?.name||e.name,value:m||void 0}};p?.(g)}},f.map(c=>io.createElement(Jo,{key:c.value,value:c.value},c.label)));return io.createElement(ue,{required:l,disabled:n,size:i,color:a,error:r,sx:d,className:s},o&&io.createElement(ge,null,o),v,t&&io.createElement(fe,null,t))}lo.displayName="Select";var Gr=lo;import Bl from"react";import{Tooltip as Nl}from"@mui/joy";import{motion as El}from"framer-motion";var Fl=El(Nl),so=e=>Bl.createElement(Fl,{...e});so.displayName="Tooltip";var _o=so;import{motion as Kr}from"framer-motion";import ae,{useCallback as Ol,useEffect as Ll}from"react";import zl from"@mui/icons-material/ChevronLeft";import Rl from"@mui/icons-material/ChevronRight";import{styled as Uo}from"@mui/joy";var Se=Uo(W,{name:"Pagination",slot:"button"})(({theme:e,active:o,size:t})=>({"--Button-size":{sm:"32px",md:"40px",lg:"48px"}[t],width:"var(--Button-size)",height:"var(--Button-size)",backgroundColor:o?e.vars.palette.primary.softHoverBg:"transparent",color:o?e.vars.palette.primary.softColor:e.vars.palette.neutral.plainColor,"&:hover":{color:o?e.vars.palette.primary.softColor:e.vars.palette.neutral.softColor,backgroundColor:o?e.vars.palette.primary.softActiveBg:e.vars.palette.neutral.softHoverBg}})),Wr=Uo($,{name:"Pagination",slot:"button"})(({theme:e,size:o})=>({"--IconButton-size":{sm:"32px",md:"40px",lg:"48px"}[o],"--Icon-fontSize":"20px",width:"var(--IconButton-size)",height:"var(--IconButton-size)",color:e.vars.palette.neutral.plainColor,"&:hover":{color:e.vars.palette.neutral.softColor,backgroundColor:e.vars.palette.neutral.softHoverBg}})),Vl=Uo(z,{name:"Pagination",slot:"root"})({}),Hl=Uo(z,{name:"Pagination",slot:"container"})(({theme:e,size:o})=>({gap:{sm:e.spacing(1),md:e.spacing(1.5),lg:e.spacing(2)}[o]}));function po(e){let{paginationModel:o,defaultPaginationModel:t={page:1,pageSize:25},onPageChange:r,rowCount:i,size:a="md",...n}=e,[l,p]=R(o,t,Ol(m=>{r(m.page)},[r])),d=m=>{p({...l,page:m})},s=1,u=Math.max(s,Math.ceil(i/l.pageSize)),f=[l.page-2,l.page-1].filter(m=>m>1),C=[l.page+1,l.page+2].filter(m=>m<=u-1),v=u>1&&l.page<u-3,c=u>1&&l.page>4;return Ll(()=>{l.page>u&&p({...l,page:u})},[i,l,u,p]),ae.createElement(Vl,{...n},ae.createElement(Hl,{direction:"row",size:a,alignItems:"center"},ae.createElement(Wr,{size:a,variant:"plain",color:"neutral",onClick:()=>d(l.page-1),disabled:l.page===s,"aria-label":"Previous page"},ae.createElement(zl,null)),l.page!==s&&ae.createElement(Se,{size:a,variant:"plain",color:"neutral",onClick:()=>d(s)},s),c&&ae.createElement(Se,{size:a,variant:"plain",color:"neutral",onClick:()=>d(l.page-3),"aria-label":"More previous pages"},"..."),f.map(m=>ae.createElement(Se,{key:m,size:a,variant:"plain",color:"neutral",onClick:()=>d(m)},m)),ae.createElement(Se,{active:!0,size:a,"aria-current":"page"},l.page),C.map(m=>ae.createElement(Se,{key:m,size:a,variant:"plain",color:"neutral",onClick:()=>d(m)},m)),v&&ae.createElement(Se,{size:a,variant:"plain",color:"neutral","aria-label":"More next pages",onClick:()=>d(l.page+3)},"..."),l.page!==u&&ae.createElement(Se,{size:a,variant:"plain",color:"neutral",onClick:()=>d(u)},u),ae.createElement(Wr,{size:a,variant:"plain",color:"neutral",onClick:()=>d(l.page+1),disabled:l.page===u,"aria-label":"Next page"},ae.createElement(Rl,null))))}po.displayName="Pagination";var qr=po;import Bt from"react";import{styled as $l}from"@mui/joy";import Yl from"@mui/icons-material/Info";var Jl=$l(Yl,{name:"InfoSign",slot:"InfoSign"})(({theme:e})=>({color:e.palette.neutral[500],width:"14px",height:"14px"}));function Go(e){let{message:o,placement:t}=e;return Bt.createElement(_o,{arrow:!0,placement:t,sx:{maxWidth:"320px"},title:o?.split(`
2
+ `).map((r,i)=>Bt.createElement("div",{key:i},r))},Bt.createElement(Jl,null))}var jr=Go;function Zr(e){return!e.editMode&&["number","date","currency"].includes(e.type||"")?"end":"start"}var Zl=Ko("tr",{name:"DataTable",slot:"overlayWrapper"})({position:"sticky",top:"calc(var(--unstable_TableCell-height, 32px))",left:0,right:0,zIndex:1,"& > td":{height:0,padding:0,border:"none !important"}}),Wo=e=>"Intl"in window?new Intl.NumberFormat().format(e):e,Xl=e=>P.createElement(So,{sx:{position:"absolute",top:0,right:0,bottom:0,width:"4px",cursor:"col-resize"},onClick:o=>o.stopPropagation(),onMouseDown:o=>{let t=o.clientX,r=e.current?.getBoundingClientRect().width,i=n=>{r&&t&&(e.current.style.width=`${r+(n.clientX-t)}px`)},a=()=>{document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",a)};document.addEventListener("mousemove",i),document.addEventListener("mouseup",a)}}),Ql=Ko("tbody",{name:"DataTable",slot:"tableBody"})({"&::after":{content:"''",display:"block",height:"0.01em"}}),es=Ko("tr",{name:"DataTable",slot:"tableRow",shouldForwardProp:e=>e!=="striped"})(({striped:e})=>({...e&&{background:"var(--TableRow-stripeBackground, var(--ceed-palette-background-level2))",color:"var(--ceed-palette-text-primary)"},"&:hover":{background:"var(--TableRow-hoverBackground, var(--ceed-palette-background-level3))"}})),os=Ko("span",{name:"DataTable",slot:"headCellAsterisk"})(({theme:e})=>({color:"var(--ceed-palette-danger-500)",marginLeft:e.spacing(.5)})),ts=Kr(Kl),rs=e=>{let{width:o,maxWidth:t,minWidth:r,stickyHeader:i,resizable:a,field:n,tableId:l,headerName:p,required:d,editMode:s,sort:u,onSortChange:f,sortable:C=!0,sortOrder:v,description:c}=e,m=jo(null),h=_(()=>`${l}_header_${p??n}`.trim(),[l,p,n]),g=a??!0?Xl(m):null,S={width:o,minWidth:r??"50px",maxWidth:t,position:i?void 0:"relative",cursor:C?"pointer":"default",userSelect:"none"},T=Zr(e),y=v[0],D=C&&P.createElement(ts,{style:{width:"16px",height:"16px"},role:"img","aria-labelledby":h,"aria-description":(u??y)==="desc"?"descending":"ascending","data-testid":void 0,variants:{hover:{opacity:1},initial:{opacity:0}},animate:{color:u?"var(--ceed-palette-text-secondary)":"var(--ceed-palette-primary-solidDisabledColor)",rotate:(u??y)==="desc"?180:0,opacity:u?1:0},transition:{duration:0,rotate:{duration:.2,ease:"easeOut"},color:{duration:.2,ease:"easeInOut"},opacity:{duration:.2,ease:"easeInOut"}}}),b=c?P.createElement(jr,{message:c,placement:"bottom"}):null;return P.createElement(Kr.th,{id:h,"aria-label":p??n,"aria-sort":u?{asc:"ascending",desc:"descending"}[u]:"none",ref:m,key:n,style:S,onClick:x=>C&&f?.({field:n,currentSort:u,multiple:x.shiftKey}),whileHover:"hover",initial:"initial"},P.createElement(z,{gap:1,direction:"row",justifyContent:T,alignItems:"center"},T==="end"&&D,T==="end"&&b,P.createElement("div",null,p??n,s&&d&&P.createElement(os,null,"*")),T==="start"&&b,T==="start"&&D),g)},ns=e=>{let{tableId:o,field:t,type:r,renderCell:i,renderEditCell:a,isCellEditable:n,noWrap:l,row:p,rowId:d}=e,[s,u]=Nt(p[t]),f=jo(null),C=_(()=>({row:p,value:s,id:d}),[p,d,s]),v=_(()=>!!(e.editMode&&(typeof n=="function"?n(C):n??!0)),[e.editMode,n,C]),c=_(()=>({...typeof e.componentProps=="function"?e.componentProps(C):e.componentProps||{},size:"sm"}),[e,C]),m=_(()=>({...c,onChange:y=>{c.onChange?.(y),u(y.target.value),r==="select"&&e.onCellEditStop?.({...C,originalRow:p,row:{...C.row,[t]:y.target.value},value:y.target.value})},onFocus:y=>{c.onFocus?.(y),e.onCellEditStart?.({...C,originalRow:p,row:{...C.row,value:s},value:s})},onBlur:y=>{c.onBlur?.(y),r&&["number","text","longText","currency","date"].includes(r)&&e.onCellEditStop?.({...C,originalRow:p,row:{...C.row,[t]:s},value:s})},...r==="autocomplete"&&{onChangeComplete:y=>{c.onChangeComplete?.(y),u(y.target.value),e.onCellEditStop?.({...C,originalRow:p,row:{...C.row,[t]:y.target.value},value:y.target.value})}}}),[C,p,t,s,c,r,e]),h=_(()=>a?a(C):{date:P.createElement(_r,{value:s,...m}),currency:P.createElement(Vr,{value:s,...m}),number:P.createElement(X,{value:s,type:"number",...m}),text:P.createElement(X,{value:s,type:"text",...m}),longText:P.createElement(Ur,{value:s,...m}),autocomplete:P.createElement(hr,{value:s,options:m.options||[s],...m}),select:P.createElement(Gr,{value:s,options:m.options||[s],...m})}[r||"text"],[s,m,r]),g=_(()=>{if(i)return i(C);let y=s;return{link:P.createElement(e.component||jl,{children:y,...c})}[r||"text"]||y},[s,i,C,r,c,e]),S=_(()=>v&&h?h:g,[v,h,g]),T=_(()=>l&&e.type==="longText",[l,e.type]);return qo(()=>{u(p[t])},[p,t]),P.createElement("td",{ref:f,key:t,headers:`${o}_header_${e.headerName??t}`,style:{textAlign:Zr({type:r}),verticalAlign:v?"top":"middle"}},T?P.createElement(_o,{title:s,placement:"bottom",style:{maxWidth:"100%"},enterDelay:1500,enterNextDelay:1500},P.createElement("div",{style:{overflow:"hidden",textOverflow:"ellipsis"}},S)):S)},as=e=>{let{tableId:o,columns:t,rowId:r,editMode:i,noWrap:a,row:n}=e;return P.createElement(P.Fragment,null,t.map((l,p)=>P.createElement(ns,{...l,tableId:o,key:`${r}_${l.field.toString()}_${p}`,row:n,rowId:r,editMode:i,noWrap:a})))};function is({rows:e,columns:o,rowCount:t,initialState:r,pagination:i,paginationMode:a,paginationModel:n,onPaginationModelChange:l,sortModel:p,sortOrder:d=["asc","desc",null],selectionModel:s=[],onSortModelChange:u,onSelectionModelChange:f,editMode:C,getId:v,isTotalSelected:c}){let[m,h]=Nt(null),[g,S]=R(p,r?.sorting?.sortModel??[],ye(B=>u?.(B),[u])),T=_(()=>o.reduce((B,I)=>({...B,[I.field]:I}),{}),[o]),y=ye((B,I)=>{for(let J of g){let{field:ie,sort:Re}=J,re=B[ie],pe=I[ie],De=T[ie],ne=0;if(De.sortComparator?ne=De.sortComparator({rowA:B,rowB:I}):typeof re=="string"&&typeof pe=="string"?ne=re.localeCompare(pe):typeof re=="number"&&typeof pe=="number"?ne=re-pe:re instanceof Date&&pe instanceof Date&&(ne=re.getTime()-pe.getTime()),ne!==0)return Re==="asc"?ne:-ne}return 0},[g,T]),D=_(()=>g.length?[...e].sort(y):e,[e,g,y]),b=_(()=>Array.from(new Set(d)),[d]),[x,k]=Nt(n?.page||1),M=n?.pageSize||20,F=ye((B,I)=>v?.(B)??B.id??`${(I||0)+(x-1)*M}`,[v,x,M]),O=_(()=>new Set(s),[s]),L=_(()=>!i||a==="server"?D:D.slice((x-1)*M,(x-1)*M+M),[D,x,M,a,i]),q=_(()=>L.length>0&&L.every((B,I)=>O.has(F(B,I))),[L,O,F]),Y=t||D.length,N=_(()=>c??(Y>0&&s.length===Y),[c,s,Y]),E=_(()=>(o||Object.keys(D[0]||{}).map(I=>({field:I}))).map(I=>({...I,isCellEditable:C&&(typeof I.isCellEditable=="function"?I.isCellEditable:I.isCellEditable??!0),sort:g.find(J=>J.field===I.field)?.sort,sortOrder:T[I.field]?.sortOrder||b})),[D,o,C,g,T,b]),w=ye(B=>{k(B),l?.({page:B,pageSize:M})},[l,M]),Z=ye(B=>{let{field:I,currentSort:J,multiple:ie}=B,re=T[I].sortOrder||b;if(J!==void 0){let De=(re.indexOf(J)+1)%re.length,ne=re[De];if(!ne){let Ee=ie?g.filter(xo=>xo.field!==I):[];S(Ee);return}let gt=ie?g.map(Ee=>Ee.field===I?{field:I,sort:ne}:Ee):[{field:I,sort:ne}];S(gt)}else{let pe=ie?[...g,{field:I,sort:re[0]}]:[{field:I,sort:re[0]}];S(pe)}},[b,T,g,S]);return qo(()=>{n||w(1)},[Y,w,n]),qo(()=>{let B=Math.max(1,Math.ceil(Y/M));x>B&&w(B)},[x,Y,M,w]),qo(()=>{f?.([])},[x]),{rowCount:Y,page:x,pageSize:M,onPaginationModelChange:w,getId:F,HeadCell:rs,BodyRow:as,dataInPage:L,handleSortChange:Z,isAllSelected:q,isTotalSelected:N,isSelectedRow:ye(B=>O.has(B),[O]),focusedRowId:m,onRowFocus:ye(B=>{h(B)},[]),onAllCheckboxChange:ye(()=>{f?.(q?[]:L.map(F))},[q,L,f,F]),onCheckboxChange:ye((B,I)=>{if(O.has(I)){let J=s.filter(ie=>ie!==I);f?.(J)}else{let J=[...s,I];f?.(J)}},[s,f,O]),columns:E,onTotalSelect:ye(()=>{f?.(N?[]:D.map(F),!N)},[N,D,f,F])}}function ls(e,o){let{rows:t,checkboxSelection:r,editMode:i,selectionModel:a,onSelectionModelChange:n,disableSelectionOnClick:l,onRowClick:p,rowCount:d,columns:s,onPaginationModelChange:u,pagination:f,paginationMode:C,paginationModel:v,sortModel:c,sortOrder:m,onSortModelChange:h,initialState:g,loading:S,slots:{checkbox:T=Qe,toolbar:y,footer:D,loadingOverlay:b=()=>P.createElement(ql,{value:8,variant:"plain"})}={},slotProps:{checkbox:x={},toolbar:k,background:M={}}={},stripe:F,...O}=e,L=_l(),q=jo(null),Y=jo(null),{columns:N,isAllSelected:E,isSelectedRow:w,onAllCheckboxChange:Z,onCheckboxChange:B,getId:I,rowCount:J,page:ie,pageSize:Re,onPaginationModelChange:re,handleSortChange:pe,dataInPage:De,isTotalSelected:ne,focusedRowId:gt,onRowFocus:Ee,onTotalSelect:xo,HeadCell:Bn,BodyRow:Nn}=is(e),Do=Wl({count:De.length,getScrollElement:()=>q.current,estimateSize:()=>32,measureElement:j=>j.clientHeight,overscan:20}),En=_(()=>({page:ie,pageSize:Re}),[ie,Re]),Fn=Do.getTotalSize(),On=Do.getVirtualItems();return Gl(o,()=>({getRowIndexRelativeToVisibleRows(j){return De.findIndex(Pe=>String(I(Pe))===j)},setCellFocus(j){let Pe=this.getRowIndexRelativeToVisibleRows(j),Ie=e.stickyHeader&&Do.getOffsetForIndex(Pe)?.[1]==="start"?0:1;Do.scrollToIndex(Pe+Ie),requestAnimationFrame(()=>{Y.current?.querySelector(`[data-row-id='${j}']`)?.focus()})}})),P.createElement(So,{sx:{maxHeight:"100%",overflow:"auto",display:"flex",flexDirection:"column"}},(!!r||!!y)&&P.createElement(z,{direction:"row",sx:{pt:1,pb:1},justifyContent:"space-between",alignItems:"center"},!!r&&P.createElement(z,{direction:"row",spacing:1},!E&&P.createElement(G,{level:"body-xs"},Wo(a?.length||0)," items selected"),E&&!ne&&P.createElement(z,{direction:"row",spacing:1,alignItems:"center"},P.createElement(G,{level:"body-xs"},"All ",Wo(a?.length||0)," items on this page are selected."),P.createElement(W,{size:"sm",variant:"plain",onClick:xo},"Select all ",Wo(J??t.length)," items")),ne&&P.createElement(z,{direction:"row",spacing:1,alignItems:"center"},P.createElement(G,{level:"body-xs"},"All ",Wo(J??t.length)," items are selected."),P.createElement(W,{size:"sm",variant:"plain",color:"danger",onClick:xo},"Cancel"))),y&&P.createElement(y,{...k||{}})),P.createElement(se,{variant:"outlined",sx:{height:"100%",overflow:"auto",width:"100%",boxShadow:"sm",borderRadius:"sm"},ref:q,...M},P.createElement(to,{...O},P.createElement("thead",null,P.createElement("tr",null,r&&P.createElement("th",{style:{width:"40px",textAlign:"center"}},P.createElement(T,{onChange:Z,checked:E,indeterminate:(a||[]).length>0&&!E,...x})),N.map((j,Pe)=>P.createElement(Bn,{tableId:L,key:`${j.field.toString()}_${Pe}`,stickyHeader:e.stickyHeader,editMode:!!j.isCellEditable,onSortChange:pe,...j})))),P.createElement(Ql,{ref:Y,style:{height:`${Fn}px`}},!!S&&P.createElement(Zl,null,P.createElement("td",null,P.createElement(So,{sx:{position:"absolute",top:0,left:0,right:0}},P.createElement(b,null)))),On.map((j,Pe)=>{let Ie=j.index,ft=De[Ie],Ce=I(ft,Ie),Ln=F&&(F==="even"&&(Ie+1)%2===0||F==="odd"&&(Ie+1)%2===1);return P.createElement(es,{key:j.key,"data-row-id":Ce,"data-index":Ie,role:r&&!l?"checkbox":void 0,tabIndex:gt===Ce?0:-1,onClick:Fe=>{p?.({row:ft,rowId:Ce},Fe),r&&!l&&B(Fe,Ce)},onFocus:()=>Ee(Ce),"aria-checked":r&&!l?w(Ce):void 0,striped:Ln,style:{height:`${j.size}px`,transform:`translateY(${j.start-Pe*j.size}px)`}},r&&P.createElement("th",{scope:"row",style:{textAlign:"center"}},P.createElement(T,{onClick:Fe=>Fe.stopPropagation(),onChange:Fe=>B(Fe,Ce),checked:w(Ce),...x})),P.createElement(Nn,{tableId:L,columns:N,row:ft,rowId:Ce,editMode:i,noWrap:e.noWrap}))})),D&&P.createElement(D,null))),f&&P.createElement(qr,{py:2,size:"sm",alignItems:"flex-end",paginationModel:En,rowCount:J,onPageChange:re}))}var Et=Ul(ls);Et.displayName="DataTable";import ee,{forwardRef as ss,useCallback as mo,useEffect as ps,useImperativeHandle as ds,useMemo as ms,useRef as Xr,useState as cs}from"react";import{IMaskInput as us,IMask as Ft}from"react-imask";import gs from"@mui/icons-material/CalendarToday";import{styled as Zo,useThemeProps as fs}from"@mui/joy";import{FocusTrap as hs,ClickAwayListener as ys,Popper as Cs}from"@mui/base";var bs=Zo($,{name:"DateRangePicker",slot:"calendarButton"})(({theme:e})=>({"&:focus":{"--Icon-color":"currentColor",outlineOffset:`${e.getCssVar("focus-thickness")}`,outline:`${e.getCssVar("focus-thickness")} solid ${e.getCssVar("palette-focusVisible")}`}})),vs=Zo(Cs,{name:"DateRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),xs=Zo(se,{name:"DateRangePicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({zIndex:e.zIndex.tooltip,width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),Ds=Zo("div",{name:"DateRangePicker",slot:"root",overridesResolver:(e,o)=>o.root})({width:"100%"}),en=([e,o],t)=>{let r=i=>{let a=`${i.getDate()}`,n=`${i.getMonth()+1}`,l=i.getFullYear();return Number(a)<10&&(a="0"+a),Number(n)<10&&(n="0"+n),t.replace(/YYYY/g,l.toString()).replace(/MM/g,n).replace(/DD/g,a)};return[r(e),o?r(o):""].join(" - ")};function Qr(e,o){let t=o.split(/[-./\s]/),r=e.split(/[-./\s]/),i,a,n;for(let p=0;p<t.length;p++){let d=parseInt(r[p],10);switch(t[p]){case"DD":i=d;break;case"MM":a=d-1;break;case"YYYY":n=d;break}}return new Date(n,a,i)}var on=(e,o)=>{let t=e.split(" - ")[0]||"",r=e.split(" - ")[1]||"";return[Qr(t,o),Qr(r,o)]},Ps=e=>`${e} - ${e}`.replace(/YYYY/g,"Y").replace(/MM/g,"M").replace(/DD/g,"D").replace(/[^YMD\s]/g,o=>`${o}\``),Ms=ee.forwardRef(function(o,t){let{onChange:r,format:i,...a}=o;return ee.createElement(us,{...a,inputRef:t,onAccept:n=>r({target:{name:o.name,value:n}}),mask:Date,pattern:Ps(i),blocks:{D:{mask:Ft.MaskedRange,from:1,to:31,maxLength:2},M:{mask:Ft.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Ft.MaskedRange,from:1900,to:9999}},format:n=>en(n,i),parse:n=>on(n,i),autofix:"pad",overwrite:!0})}),Ot=ss((e,o)=>{let t=fs({props:e,name:"DateRangePicker"}),{onChange:r,disabled:i,label:a,error:n,helperText:l,minDate:p,maxDate:d,disableFuture:s,disablePast:u,required:f,sx:C,className:v,format:c="YYYY/MM/DD",size:m,inputReadOnly:h,hideClearButton:g,readOnly:S,...T}=t,y=Xr(null),D=Xr(null),[b,x]=R(t.value,t.defaultValue||"",mo(E=>r?.({target:{name:t.name,value:E}}),[t.name,r]),{disableStrict:!0}),[k,M]=cs(null),F=!!k,O=ms(()=>b?on(b,c):void 0,[b,c]);ps(()=>{k||y.current?.blur()},[k,y]),ds(o,()=>y.current,[y]);let L=mo(E=>{x(E.target.value)},[x]),q=mo(E=>{M(k?null:E.currentTarget),y.current?.focus()},[k,M,y]),Y=mo(([E,w])=>{!E||!w||(x(en([E,w],c)),M(null))},[x,M,c]),N=mo(E=>{h&&(E.preventDefault(),D.current?.focus())},[h,D]);return ee.createElement(Ds,null,ee.createElement(hs,{open:!0},ee.createElement(ee.Fragment,null,ee.createElement(X,{...T,color:n?"danger":T.color,ref:o,size:m,value:b,onChange:L,disabled:i,required:f,placeholder:`${c} - ${c}`,slotProps:{input:{component:Ms,ref:y,format:c,sx:{"&:hover":{cursor:h||S?"default":"text"}},onMouseDown:N}},error:n,className:v,sx:C,endDecorator:ee.createElement(bs,{ref:D,variant:"plain",onClick:S?void 0:q,"aria-label":"Toggle Calendar","aria-controls":"date-range-picker-popper","aria-haspopup":"dialog","aria-expanded":F,disabled:i},ee.createElement(gs,null)),label:a,helperText:l,readOnly:S||h}),F&&ee.createElement(ys,{onClickAway:()=>M(null)},ee.createElement(vs,{id:"date-range-picker-popper",open:!0,anchorEl:k,placement:"bottom-end",onMouseDown:E=>E.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":F},ee.createElement(xs,{tabIndex:-1,role:"presentation"},ee.createElement(Me,{rangeSelection:!0,defaultValue:O,onChange:Y,minDate:p?new Date(p):void 0,maxDate:d?new Date(d):void 0,disableFuture:s,disablePast:u}),!g&&ee.createElement(he,{sx:{p:1}},ee.createElement(W,{size:m,variant:"plain",color:"neutral",onClick:()=>{x(""),M(null)}},"Clear"))))))))});Ot.displayName="DateRangePicker";import{DialogContent as Ts,styled as ks}from"@mui/joy";import{motion as Is}from"framer-motion";var ws=Is(Ts),As=ks(ws)(({theme:e})=>({padding:e.spacing(0,6,5)})),co=As;co.displayName="DialogContent";var Xo=co;import{DialogTitle as Ss,styled as Bs}from"@mui/joy";import{motion as Ns}from"framer-motion";var Es=Ns(Ss),Fs=Bs(Es)(({theme:e})=>({padding:e.spacing(4,6)})),uo=Fs;uo.displayName="DialogTitle";var Qo=uo;import fo from"react";import et from"react";import{Modal as Os,ModalDialog as Ls,ModalClose as zs,ModalOverflow as Rs,styled as tn}from"@mui/joy";import{motion as Lt}from"framer-motion";var Vs=Lt(Os),zt=Vs;zt.displayName="Modal";var rn=tn(Ls)({padding:0}),go=rn;go.displayName="ModalDialog";var Hs=tn(Lt(zs))(({theme:e})=>({top:e.spacing(3),right:e.spacing(6)})),ot=Hs;ot.displayName="ModalClose";var $s=Lt(Rs),Rt=$s;Rt.displayName="ModalOverflow";function Vt(e){let{title:o,children:t,titleStartDecorator:r,...i}=e;return et.createElement(rn,{...i},et.createElement(ot,null),et.createElement(Qo,null,r,o),et.createElement(Xo,null,t))}Vt.displayName="ModalFrame";import{styled as Ys}from"@mui/joy";var Js=Ys(go,{name:"Dialog",slot:"Root"})({padding:0}),Ht=fo.forwardRef((e,o)=>{let{title:t,children:r,actions:i,fullscreen:a,...n}=e;return fo.createElement(Js,{layout:a?"fullscreen":"center",ref:o,...n},fo.createElement(Qo,null,t),fo.createElement(Xo,null,r),fo.createElement(he,null,i))});Ht.displayName="DialogFrame";import _s from"react";import{Divider as Us}from"@mui/joy";import{motion as Gs}from"framer-motion";var Ws=Gs(Us),ho=e=>_s.createElement(Ws,{...e});ho.displayName="Divider";import qs from"react";import{Drawer as js}from"@mui/joy";import{motion as Ks}from"framer-motion";var Zs=Ks(js),$t=e=>{let{children:o,...t}=e;return qs.createElement(Zs,{...t,slotProps:{...t.slotProps,content:{...t.slotProps?.content,sx:{bgcolor:"transparent",p:{md:3,sm:0},boxShadow:"none"}}}},o)};$t.displayName="InsetDrawer";import H,{useCallback as tt,useEffect as nn,useMemo as yo,useRef as an,useState as rt}from"react";import{styled as ke}from"@mui/joy";import Xs from"@mui/icons-material/CloudUploadRounded";import Qs from"@mui/icons-material/UploadFileRounded";import ep from"@mui/icons-material/ClearRounded";import{combine as op}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/combine.js";import{dropTargetForExternal as tp,monitorForExternal as rp}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/adapter.js";import{containsFiles as ln,getFiles as np}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/file.js";import{preventUnhandled as sn}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/prevent-unhandled.js";import{Input as ap}from"@mui/joy";var ip=ke(ap)({width:"1px",height:"1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",position:"absolute"}),lp=ke(z,{name:"Uploader",slot:"PreviewRoot"})({}),sp=ke(Ze,{name:"Uploader",slot:"UploadCard"})(({theme:e})=>({padding:e.spacing(2.5),border:`1px solid ${e.palette.neutral.outlinedBorder}`})),pp=ke(Qs,{name:"Uploader",slot:"UploadFileIcon"})(({theme:e})=>({color:e.palette.neutral[400],width:"32px",height:"32px"})),dp=ke(ep,{name:"Uploader",slot:"ClearIcon"})(({theme:e})=>({color:e.palette.neutral.plainColor,width:"18px",height:"18px"})),mp=["byte","kilobyte","megabyte","gigabyte","terabyte","petabyte"],cp={"image/*":[".jpeg",".jpg",".png",".gif",".bmp",".tiff",".svg",".webp",".heic",".ico"],"audio/*":[".mp3",".wav",".flac",".aac",".ogg",".m4a",".wma",".aiff",".alac",".midi",".mp4"],"video/*":[".mp4",".avi",".mkv",".mov",".wmv",".flv",".webm",".mpeg",".3gp",".m4v"]},Yt=e=>{let o=e==0?0:Math.floor(Math.log(e)/Math.log(1024)),t=e/Math.pow(1024,o),r=mp[o];return Intl.NumberFormat("en-us",{style:"unit",unit:r,unitDisplay:"narrow"}).format(t)},up=e=>{let{files:o,uploaded:t,onDelete:r}=e;return H.createElement(lp,{gap:1},[...t,...o].map(i=>H.createElement(sp,{key:i.name,size:"sm",color:"neutral"},H.createElement(z,{direction:"row",alignItems:"center",gap:2},H.createElement(pp,null),H.createElement(z,{flex:"1"},H.createElement(G,{level:"body-sm",textColor:"common.black"},i.name),!!i.size&&H.createElement(G,{level:"body-xs",fontWeight:"300",lineHeight:"1.33",textColor:"text.tertiary"},Yt(i.size))),H.createElement($,{onClick:()=>r?.(i)},H.createElement(dp,null))))))},gp=ke(z,{name:"Uploader",slot:"root"})(({theme:e})=>({gap:e.spacing(2)})),fp=ke(se,{name:"Uploader",slot:"dropZone",shouldForwardProp:e=>e!=="error"})(({theme:e,state:o,error:t})=>({width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",padding:e.spacing(5),gap:e.spacing(4),cursor:"pointer",backgroundColor:e.palette.background.surface,border:t?`1px solid ${e.palette.danger.outlinedBorder}`:o==="idle"?`1px solid ${e.palette.neutral.outlinedBorder}`:`1px solid ${e.palette.primary.outlinedBorder}`})),hp=ke(Xs,{name:"Uploader",slot:"iconContainer",shouldForwardProp:e=>e!=="error"})(({theme:e,state:o,error:t})=>({color:t?`rgba(${e.vars.palette.danger.mainChannel} / 0.6)`:o==="over"?`rgba(${e.palette.primary.mainChannel} / 0.6)`:e.palette.neutral.softActiveBg,width:"32px",height:"32px"})),pn=H.memo(e=>{let{accept:o,minCount:t,maxCount:r,name:i,size:a,maxFileSize:n,maxFileTotalSize:l,onChange:p,label:d,disabled:s,onDelete:u}=e,f=an(null),C=an(null),[v,c]=rt(),[m,h]=rt([]),[g,S]=rt(e.uploaded||[]),[T,y]=rt("idle"),D=yo(()=>o.split(",").map(N=>N.trim()),[o]),b=yo(()=>D.flatMap(N=>["image/*","video/*","audio/*"].includes(N)?cp[N]:N),[D]),x=yo(()=>{let[N,E]=[D.filter(Z=>["image/*","video/*","audio/*"].includes(Z)).map(Z=>{let[B]=Z.split("/");return B.toLowerCase()}),D.filter(Z=>!["image/*","video/*","audio/*"].includes(Z)).map(Z=>{let[B,I]=Z.split("/");return I?I.toUpperCase():B.toUpperCase().replace(".","")})],w=[];return N.length>0&&w.push(`Any ${N.join(", ")} file`),E.length>0&&w.push(E.join(", ")),w.push(`Maximum ${Yt(l)}`),r&&w.push(`Up to ${r} ${r===1?"file":"files"}`),w.join(", ")},[D,l,r]),k=yo(()=>!!v||e.error,[e.error,v]),M=yo(()=>!r||r&&[...g,...m].length!==r,[m,r,g]),F=tt(N=>{try{let E=b.map(I=>I.replace(".",""))||[],w=new RegExp(`${E.join("|")}`);if(N.forEach(I=>{let J=I.name.split(".").pop()||"";if(!w.test(J))throw new Error("Please upload acceptable file type.")}),n&&N.forEach(I=>{if(I.size>n)throw new Error(`One or more File size exceeded the maximum limit. Each file size must be ${Yt(n)} or less.`)}),[...m,...N].reduce((I,J)=>I+J.size,0)>l)throw new Error("Total File size exceeded the maximum limit.");let B=[...m,...N];if(r&&[...g,...B].length>r)throw new Error("Exceeded the maximum number of files.");p?.({target:{name:i,value:B}}),h(B),c(void 0)}catch(E){c(E.message)}},[m,g,r,b,n,l,i,p]);nn(()=>{let N=f.current;if(!(!N||s))return op(tp({element:N,canDrop:ln,onDragEnter:()=>y("over"),onDragLeave:()=>y("potential"),onDrop:async({source:E})=>{let w=await np({source:E});F(w)}}),rp({canMonitor:ln,onDragStart:()=>{y("potential"),sn.start()},onDrop:()=>{y("idle"),sn.stop()}}))}),nn(()=>{C.current&&t&&(m.length<t?C.current.setCustomValidity(`At least ${t} files are required.`):C.current.setCustomValidity(""))},[C,m,t]);let O=tt(N=>{let E=Array.from(N.target.files||[]);F(E)},[F]),L=tt(N=>{N instanceof File?h(E=>(p?.({target:{name:i,value:E.filter(w=>w!==N)}}),E.filter(w=>w!==N))):(S(E=>E.filter(w=>w.id!==N.id)),u?.(N)),c(void 0)},[i,p,u]),q=tt(()=>{C.current?.click()},[]),Y=H.createElement(fp,{state:T,error:!!(k||v),ref:f,onClick:q},H.createElement(z,{alignItems:"center",gap:1},H.createElement(hp,{state:T,error:!!(k||v)})),H.createElement(ip,{disabled:s,required:!!t,onInvalid:N=>{t&&m.length<t&&c(`Please choose ${t} ${t===1?"file":"files"} to upload.`)},slotProps:{input:{multiple:!0,accept:b.join(","),type:"file",ref:C,role:"button",onChange:O}}}));return H.createElement(gp,null,M&&H.createElement(ue,{size:a,error:!!(k||v),disabled:s,required:!!t},d&&H.createElement(ge,null,d),Y,H.createElement(fe,null,H.createElement(z,null,v&&H.createElement("div",null,v),H.createElement("div",null,x)))),[...g,...m].length>0&&H.createElement(up,{files:m,uploaded:g,onDelete:L}))});import{Grid as dn}from"@mui/joy";import ce from"react";import Cp from"react-markdown";import{Link as bp}from"@mui/joy";import{visit as yp}from"unist-util-visit";function mn(e){let{accentColor:o}=e;return t=>{yp(t,"text",(r,i,a)=>{let n=r.value,l=/\|\|.*?\|\|/g,p,d=0,s=[];for(;(p=l.exec(n))!==null;){p.index>d&&s.push({type:"text",value:n.slice(d,p.index)});let u=p[0].split("||")[1];s.push({type:"element",tagName:"p",properties:{textColor:o},children:[{type:"text",value:u}]}),d=p.index+p[0].length}d<n.length&&s.push({type:"text",value:n.slice(d)}),s.length&&a.children.splice(i,1,...s)})}}var Jt=e=>{let{color:o,textColor:t,defaultLevel:r="body-md",accentColor:i="danger.500",defaultLinkAction:a="_self",markdownOptions:n,boldFontWeight:l,content:p,...d}=e;return ce.createElement(U,{component:"div",color:o,textColor:t,level:r,...d},ce.createElement(Cp,{...n,children:p,rehypePlugins:[[mn,{accentColor:i}]],components:{h1:({children:s})=>ce.createElement(U,{color:o,textColor:t,level:"h1"},s),h2:({children:s})=>ce.createElement(U,{color:o,textColor:t,level:"h2"},s),h3:({children:s})=>ce.createElement(U,{color:o,textColor:t,level:"h3"},s),h4:({children:s})=>ce.createElement(U,{color:o,textColor:t,level:"h4"},s),p:({children:s,node:u})=>ce.createElement(U,{color:o,textColor:t,level:r,...u?.properties},s),a:({children:s,href:u})=>ce.createElement(bp,{href:u,target:a},s),hr:()=>ce.createElement(ho,null),b:({children:s})=>ce.createElement(U,{fontWeight:l},s),strong:({children:s})=>ce.createElement(U,{fontWeight:l},s),...n?.components}}))};Jt.displayName="Markdown";import Be from"react";import{MenuButton as vp,Button as xp}from"@mui/joy";import cn from"@mui/icons-material/ExpandMore";function _t(e){let{size:o,buttonText:t,items:r=[],showIcon:i}=e;return r.length?Be.createElement(Bo,null,Be.createElement(vp,{component:e.buttonComponent??"button",size:o,variant:"plain",endDecorator:i?Be.createElement(cn,null):void 0,...e.buttonComponentProps??{}},t),Be.createElement(be,{size:o},r.map(a=>Be.createElement(ve,{key:a.text,component:a.component,...a.componentProps??{}},a.text)))):Be.createElement(xp,{component:e.buttonComponent??"button",size:o,variant:"plain",color:"neutral",endDecorator:i?Be.createElement(cn,null):void 0,...e.buttonComponentProps??{}},t)}_t.displayName="MenuButton";import oe,{forwardRef as Dp,useCallback as Ut,useEffect as Pp,useImperativeHandle as Mp,useRef as Tp,useState as kp}from"react";import{IMaskInput as Ip,IMask as un}from"react-imask";import wp from"@mui/icons-material/CalendarToday";import{styled as Gt,useThemeProps as Ap}from"@mui/joy";import{FocusTrap as Sp,ClickAwayListener as Bp,Popper as Np}from"@mui/base";var Ep=Gt(Np,{name:"MonthPicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Fp=Gt(se,{name:"MonthPicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),Op=Gt("div",{name:"MonthPicker",slot:"root",overridesResolver:(e,o)=>o.root})({width:"100%"}),gn=(e,o)=>{let t=`${e.getMonth()+1}`,r=e.getFullYear();return Number(t)<10&&(t="0"+t),o.replace(/YYYY/g,r.toString()).replace(/MM/g,t)},Lp=e=>e.replace(/YYYY/g,"Y").replace(/MM/g,"M").replace(/[^YM\s]/g,o=>`${o}\``);function zp(e){let o,t,r=e.replace(/[^\d]/g,"");return e.match(/\d{1,2}.\d{4}/)?(o=r.slice(0,2),t=r.slice(2)):e.match(/\d{4}.\d{1,2}/)&&(t=r.slice(0,4),o=r.slice(4)),new Date(`${t}/${o}`)}var Rp=oe.forwardRef(function(o,t){let{onChange:r,format:i,...a}=o;return oe.createElement(Ip,{...a,inputRef:t,onAccept:n=>r({target:{name:o.name,value:n}}),mask:Date,pattern:Lp(i),blocks:{M:{mask:un.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:un.MaskedRange,from:1900,to:9999}},format:n=>gn(n,i),parse:zp,autofix:"pad",overwrite:!0})}),fn=Dp((e,o)=>{let t=Ap({props:e,name:"MonthPicker"}),{onChange:r,disabled:i,label:a,error:n,helperText:l,minDate:p,maxDate:d,disableFuture:s,disablePast:u,required:f,sx:C,className:v,format:c="YYYY/MM",size:m,...h}=t,g=Tp(null),[S,T]=R(t.value,t.defaultValue||"",Ut(M=>r?.({target:{name:t.name,value:M}}),[t.name,r]),{disableStrict:!0}),[y,D]=kp(null),b=!!y;Pp(()=>{y||g.current?.blur()},[y,g]),Mp(o,()=>g.current,[g]);let x=Ut(M=>{T(M.target.value)},[T]),k=Ut(M=>{D(y?null:M.currentTarget),g.current?.focus()},[y,D,g]);return oe.createElement(Op,null,oe.createElement(Sp,{open:!0},oe.createElement(oe.Fragment,null,oe.createElement(X,{...h,color:n?"danger":h.color,ref:g,size:m,value:S,onChange:x,placeholder:c,disabled:i,required:f,slotProps:{input:{component:Rp,ref:g,format:c}},error:n,className:v,sx:{...C,fontFamily:"monospace"},endDecorator:oe.createElement($,{variant:"plain",onClick:k,"aria-label":"Toggle Calendar","aria-controls":"month-picker-popper","aria-haspopup":"dialog","aria-expanded":b},oe.createElement(wp,null)),label:a,helperText:l}),b&&oe.createElement(Bp,{onClickAway:()=>D(null)},oe.createElement(Ep,{id:"month-picker-popper",open:!0,anchorEl:y,placement:"bottom-end",onMouseDown:M=>M.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":b},oe.createElement(Fp,{tabIndex:-1,role:"presentation"},oe.createElement(Me,{view:"month",views:["month"],value:Number.isNaN(new Date(S).getTime())?void 0:[new Date(S),void 0],onChange:([M])=>{x({target:{name:t.name,value:gn(M,c)}}),D(null)},minDate:p?new Date(p):void 0,maxDate:d?new Date(d):void 0,disableFuture:s,disablePast:u}),oe.createElement(he,{sx:{p:1}},oe.createElement(W,{size:m,variant:"plain",color:"neutral",onClick:()=>{x({target:{name:t.name,value:""}}),D(null)}},"Clear"))))))))});import te,{forwardRef as Vp,useCallback as nt,useEffect as Hp,useImperativeHandle as $p,useMemo as Yp,useRef as Jp,useState as _p}from"react";import{IMaskInput as Up,IMask as hn}from"react-imask";import Gp from"@mui/icons-material/CalendarToday";import{styled as Wt,useThemeProps as Wp}from"@mui/joy";import{FocusTrap as qp,ClickAwayListener as jp,Popper as Kp}from"@mui/base";var Zp=Wt(Kp,{name:"MonthRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Xp=Wt(se,{name:"MonthRangePicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({zIndex:e.zIndex.tooltip,width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),Qp=Wt("div",{name:"MonthRangePicker",slot:"root",overridesResolver:(e,o)=>o.root})({width:"100%"}),Cn=([e,o],t)=>{let r=i=>{let a=`${i.getMonth()+1}`,n=i.getFullYear();return Number(a)<10&&(a="0"+a),t.replace(/YYYY/g,n.toString()).replace(/MM/g,a)};return[r(e),o?r(o):""].join(" - ")};function yn(e){let o,t,r=e.replace(/[^\d]/g,"");return e.match(/\d{1,2}.\d{4}/)?(o=r.slice(0,2),t=r.slice(2)):e.match(/\d{4}.\d{1,2}/)&&(t=r.slice(0,4),o=r.slice(4)),new Date(`${t}/${o}`)}var bn=e=>{let o=e.split(" - ")[0]||"",t=e.split(" - ")[1]||"";return[yn(o),yn(t)]},ed=e=>`${e} - ${e}`.replace(/YYYY/g,"Y").replace(/MM/g,"m").replace(/[^YMm\s]/g,o=>`${o}\``),od=te.forwardRef(function(o,t){let{onChange:r,format:i,...a}=o;return te.createElement(Up,{...a,inputRef:t,onAccept:n=>r({target:{name:o.name,value:n}}),mask:Date,pattern:ed(i),blocks:{m:{mask:hn.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:hn.MaskedRange,from:1900,to:9999}},format:n=>Cn(n,i),parse:bn,autofix:"pad",overwrite:!0})}),qt=Vp((e,o)=>{let t=Wp({props:e,name:"MonthRangePicker"}),{onChange:r,disabled:i,label:a,error:n,helperText:l,minDate:p,maxDate:d,disableFuture:s,disablePast:u,required:f,sx:C,className:v,format:c="YYYY/MM",size:m,...h}=t,g=Jp(null),[S,T]=R(t.value,t.defaultValue||"",nt(O=>r?.({target:{name:t.name,value:O}}),[t.name,r]),{disableStrict:!0}),[y,D]=_p(null),b=!!y,x=Yp(()=>S?bn(S):void 0,[S]);Hp(()=>{y||g.current?.blur()},[y,g]),$p(o,()=>g.current,[g]);let k=nt(O=>{T(O.target.value)},[T]),M=nt(O=>{D(y?null:O.currentTarget),g.current?.focus()},[y,D,g]),F=nt(([O,L])=>{!O||!L||(T(Cn([O,L],c)),D(null))},[T,D,c]);return te.createElement(Qp,null,te.createElement(qp,{open:!0},te.createElement(te.Fragment,null,te.createElement(X,{...h,color:n?"danger":h.color,ref:o,size:m,value:S,onChange:k,disabled:i,required:f,placeholder:`${c} - ${c}`,slotProps:{input:{component:od,ref:g,format:c}},error:n,className:v,sx:{...C,fontFamily:"monospace"},endDecorator:te.createElement($,{variant:"plain",onClick:M,"aria-label":"Toggle Calendar","aria-controls":"month-range-picker-popper","aria-haspopup":"dialog","aria-expanded":b},te.createElement(Gp,null)),label:a,helperText:l}),b&&te.createElement(jp,{onClickAway:()=>D(null)},te.createElement(Zp,{id:"month-range-picker-popper",open:!0,anchorEl:y,placement:"bottom-end",onMouseDown:O=>O.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":b},te.createElement(Xp,{tabIndex:-1,role:"presentation"},te.createElement(Me,{view:"month",views:["month"],rangeSelection:!0,defaultValue:x,onChange:F,minDate:p?new Date(p):void 0,maxDate:d?new Date(d):void 0,disableFuture:s,disablePast:u}),te.createElement(he,{sx:{p:1}},te.createElement(W,{size:m,variant:"plain",color:"neutral",onClick:()=>{T(""),D(null)}},"Clear"))))))))});qt.displayName="MonthRangePicker";import at from"react";import{Accordion as td,AccordionSummary as rd,AccordionDetails as nd,styled as xn,accordionSummaryClasses as vn,Stack as ad}from"@mui/joy";var id=xn(rd,{name:"NavigationGroup",slot:"Summary",shouldForwardProp:e=>e!=="useIcon"&&e!=="level"})(({theme:e,useIcon:o,level:t})=>({[`& .${vn.button}`]:{padding:e.spacing(4,6,4,(o?6:8)+(t||0)*8),[`&.${vn.expanded}`]:{color:e.palette.primary.plainColor,"--Icon-color":e.palette.primary.plainColor}}})),ld=xn(nd,{name:"NavigationGroup",slot:"Details"})(({theme:e})=>({"--AccordionDetails-transition":"grid-template-rows 0.2s ease, padding-block 0.2s ease",backgroundColor:e.palette.background.level1}));function it(e){let{title:o,children:t,startDecorator:r,level:i,...a}=e;return at.createElement(td,{...a},at.createElement(id,{useIcon:!!r,level:i},at.createElement(ad,{direction:"row",gap:4},r,o)),at.createElement(ld,null,t))}import jt from"react";import{ListItem as sd,ListItemButton as pd,ListItemDecorator as dd,styled as md,listItemButtonClasses as cd}from"@mui/joy";var ud=md(pd,{name:"NavigationItem",slot:"Button",shouldForwardProp:e=>e!=="useIcon"&&e!=="level"})(({theme:e,useIcon:o,level:t})=>({padding:e.spacing(4,6,4,(o?6:8)+(t||0)*8),gap:e.spacing(4),fontWeight:500,"&:hover":{backgroundColor:e.palette.neutral.plainHoverBg},"&:active":{backgroundColor:e.palette.neutral.plainActiveBg},[`&.${cd.selected}`]:{color:e.palette.primary.plainColor,"--Icon-color":e.palette.primary.plainColor,"&:not(:hover):not(:active)":{backgroundColor:e.palette.background.surface}}}));function lt(e){let{children:o,startDecorator:t,level:r,selected:i,id:a,onClick:n,...l}=e,p=()=>{n?.(a)};return jt.createElement(sd,{...l},jt.createElement(ud,{level:r,useIcon:!!t,selected:i,"aria-current":i,onClick:p},t&&jt.createElement(dd,null,t),o))}import Kt from"react";function Zt(e){let{items:o,level:t=0,onSelect:r}=e,i=a=>{r?.(a)};return Kt.createElement("div",null,o.map((a,n)=>a.type==="item"?Kt.createElement(lt,{key:a.id,id:a.id,startDecorator:a.startDecorator,selected:a.selected,level:t,onClick:i},a.title):a.type==="group"?Kt.createElement(it,{key:n,title:a.title,startDecorator:a.startDecorator,level:t,defaultExpanded:a.expanded},a.content):null))}Zt.displayName="Navigator";import st,{useCallback as Dn,useMemo as gd,useState as fd}from"react";import{NumericFormat as hd}from"react-number-format";import{styled as yd,useThemeProps as Cd}from"@mui/joy";var bd=(e,o)=>{let[t,r=""]=`${e}`.split(".");return+`${t}${r.padEnd(o,"0")}`},vd=st.forwardRef(function(o,t){let{onChange:r,min:i,max:a,...n}=o;return st.createElement(hd,{...n,onValueChange:({value:l})=>{r?.({target:{name:o.name,value:l}})},valueIsNumericString:!0,thousandSeparator:!0,suffix:"%",getInputRef:t,allowNegative:!0})}),xd=yd(X,{name:"PercentageInput",slot:"Root",overridesResolver:(e,o)=>o.root})({}),Xt=st.forwardRef(function(o,t){let r=Cd({props:o,name:"PercentageInput"}),{name:i,onChange:a,label:n,error:l,helperText:p,required:d,disabled:s,useMinorUnit:u,maxDecimalScale:f=0,min:C,max:v,sx:c,className:m,...h}=r,[g,S]=R(r.value,r.defaultValue,Dn(x=>a?.({target:{name:i,value:x}}),[a,i])),[T,y]=fd(v&&g&&g>v||C&&g&&g<C),D=gd(()=>g&&u?g/Math.pow(10,f):g,[g,u,f]),b=Dn(x=>{if(x.target.value===""){S(void 0);return}let k=Number(x.target.value);C&&k<C||v&&k>v?y(!0):y(!1);let M=u?bd(k,f):k;S(M)},[S,u,f,C,v]);return st.createElement(xd,{...h,ref:t,value:D,onChange:b,error:T||l,disabled:s,required:d,color:T||l?"danger":r.color,label:n,helperText:p,slotProps:{input:{component:vd,"aria-label":h["aria-label"],decimalScale:f}},sx:{...c},className:m})});Xt.displayName="PercentageInput";import K,{useCallback as Dd,useMemo as Pn}from"react";import{Dropdown as Pd,ListDivider as Md,menuItemClasses as Td,styled as Qt,MenuButton as kd}from"@mui/joy";import{ClickAwayListener as Id}from"@mui/base";import wd from"@mui/icons-material/ArrowDropDown";var Ad=Qt(we,{name:"ProfileMenu",slot:"item"})({});function Mn(e){let{children:o,chip:t,caption:r,size:i}=e,a=Pn(()=>i==="sm"?"body-xs":"body-sm",[i]),n=Pn(()=>i==="sm"?"body-sm":"body-md",[i]);return K.createElement(Ad,{px:4,py:2},K.createElement(we,{direction:"row",gap:2},K.createElement(U,{level:n,fontWeight:"bold",textColor:"text.primary"},o),t&&K.createElement(Ae,{size:i,color:"neutral",variant:"outlined"},t)),r&&K.createElement(U,{level:a,textColor:"text.tertiary"},r))}Mn.displayName="ProfileCard";var Sd=Qt(kd,{name:"ProfileMenu",slot:"button"})(({theme:e})=>({padding:e.spacing(1),"--Button-gap":e.spacing(1)}));function Tn(e){let{size:o="md",src:t,alt:r,children:i,getInitial:a,...n}=e;return K.createElement(Sd,{variant:"plain",color:"neutral",size:o,endDecorator:K.createElement(wd,null),...n},K.createElement(Ao,{variant:"soft",color:"primary",size:o,src:t,alt:r,getInitial:a},i))}Tn.displayName="ProfileMenuButton";var Bd=Qt(be,{name:"ProfileMenu",slot:"root"})(({theme:e})=>({border:"none","--ListItem-paddingX":e.spacing(4),[`.${Td.root}`]:{border:"none"}}));function pt(e){let{open:o,defaultOpen:t,onOpenChange:r,profile:i,getInitial:a,menuItems:n,size:l,...p}=e,[d,s]=R(o,t??!1,Dd(u=>r?.(u),[r]));return K.createElement(Id,{onClickAway:()=>s(!1)},K.createElement("div",null,K.createElement(Pd,{open:d},K.createElement(Tn,{size:l,src:i.image?.src,alt:i.image?.alt,onClick:()=>s(!d),getInitial:a},i.name),K.createElement(Bd,{size:l,placement:"bottom-end",...p,onClose:()=>s(!1)},K.createElement(Mn,{size:l,caption:i.caption,chip:i.chip},i.name),!!n.length&&K.createElement(Md,null),n.map(({label:u,...f})=>K.createElement(ve,{...f,onClick:C=>{f.onClick?.(C),s(!1)}},u))))))}pt.displayName="ProfileMenu";import{Radio as Nd,RadioGroup as Ed}from"@mui/joy";import{motion as kn}from"framer-motion";var Fd=kn(Nd),Co=Fd;Co.displayName="Radio";var Od=kn(Ed),bo=Od;bo.displayName="RadioGroup";import In from"react";function er(e){let{items:o,...t}=e;return In.createElement(bo,{...t},o.map(r=>In.createElement(Co,{key:`${r.value}`,value:r.value,label:r.label})))}er.displayName="RadioList";import Ne from"react";import{Stepper as Ld,Step as zd,StepIndicator as Rd,stepClasses as or,stepIndicatorClasses as vo,styled as tr}from"@mui/joy";import Vd from"@mui/icons-material/Check";import{motion as Hd}from"framer-motion";var dt=tr(zd)({});dt.displayName="Step";var mt=tr(Rd)({});mt.displayName="StepIndicator";var $d=tr(Ld)(({theme:e})=>({"--StepIndicator-size":"24px","--Step-gap":e.spacing(2),"--joy-palette-success-solidBg":"var(--joy-palette-success-400)",[`& .${vo.root}`]:{fontSize:"var(--ceed-fontSize-xs)"}})),Yd=Hd($d);function rr(e){let{steps:o,activeColor:t="primary.500",inactiveColor:r="neutral.400",activeLineColor:i="primary.500",inactiveLineColor:a="neutral.300",activeStep:n}=e;return Ne.createElement(Yd,{sx:l=>({"--StepIndicator-size":"24px","--Step-gap":l.spacing(2),[`& .${vo.root}`]:{fontSize:"var(--ceed-fontSize-xs)"},[`& .${or.completed}`]:{"&::after":{bgcolor:i},[`& .${vo.root}`]:{bgcolor:t}},[`& .${or.active}`]:{"&::after":{bgcolor:a},[`& .${vo.root}`]:{bgcolor:t}},[`& .${or.disabled}`]:{"&::after":{bgcolor:a},[`& .${vo.root}`]:{bgcolor:r}}})},o.map((l,p)=>{let d=n===p+1,s=n>p+1,u=n<p+1,f=l.label||l.extraContent;return Ne.createElement(dt,{indicator:Ne.createElement(mt,{variant:"solid",color:"primary"},s?Ne.createElement(Vd,null):l.indicatorContent),active:d,completed:s,disabled:u},f&&Ne.createElement(z,null,l.label&&Ne.createElement(G,{level:"title-sm"},l.label),l.extraContent&&Ne.createElement(G,{level:"body-xs"},l.extraContent)))}))}rr.displayName="Stepper";import wn from"react";import{Switch as Jd,styled as _d,switchClasses as Ud}from"@mui/joy";import{motion as An}from"framer-motion";var Gd=An(Jd),Wd=_d(An.div)({"--Icon-fontSize":"calc(var(--Switch-thumbSize) * 0.75)",display:"inline-flex",justifyContent:"center",alignItems:"center",position:"absolute",left:"var(--Switch-thumbOffset)",width:"var(--Switch-thumbWidth)",height:"var(--Switch-thumbSize)",borderRadius:"var(--Switch-thumbRadius)",boxShadow:"var(--Switch-thumbShadow)",color:"var(--Switch-thumbColor)",backgroundColor:"var(--Switch-thumbBackground)",[`&.${Ud.checked}`]:{left:"unset",right:"var(--Switch-thumbOffset)"}}),qd=e=>wn.createElement(Wd,{...e,layout:!0,transition:jd}),jd={type:"spring",stiffness:700,damping:30},nr=e=>wn.createElement(Gd,{...e,slots:{thumb:qd,...e.slots}});nr.displayName="Switch";import{Tabs as Kd,Tab as Zd,TabList as Xd,TabPanel as Qd,styled as em,tabClasses as om}from"@mui/joy";import{motion as ct}from"framer-motion";var tm=ct(Kd),ar=tm;ar.displayName="Tabs";var rm=em(ct(Zd))(({theme:e})=>({[`&:not(.${om.selected})`]:{color:e.palette.neutral[700]}})),ir=rm;ir.displayName="Tab";var nm=ct(Xd),lr=nm;lr.displayName="TabList";var am=ct(Qd),sr=am;sr.displayName="TabPanel";import ut from"react";import{CssBaseline as pr,CssVarsProvider as im,checkboxClasses as lm,extendTheme as dr,inputClasses as ze}from"@mui/joy";var Sn={palette:{danger:{50:"#FEF3F2",100:"#FDE6E5",200:"#FBC7C4",300:"#F89E99",400:"#F46E66",500:"#DC0D00",600:"#AB0F00",700:"#791000",800:"#430A0A",900:"#240505"},neutral:{50:"#FAFBFC",100:"#F3F5F7",200:"#EBECF0",300:"#D1D5DB",400:"#A2AAB8",500:"#5E6C83",600:"#505E79",700:"#253858",800:"#071B36",900:"#0B0D0E"},primary:{50:"#F2F7FE",100:"#E8F0FD",200:"#CCDFFC",300:"#9DC1F9",400:"#4D8EF3",500:"#015DEE",600:"#0154D6",700:"#0141A7",800:"#00255F",900:"#000F26"},warning:{50:"#FEF8F2",100:"#FEF1E5",200:"#FCE1C4",300:"#FABD7F",400:"#F57C00",500:"#AF5100",600:"#843600",700:"#672600",800:"#421400",900:"#1d1002"}}},mr=dr({cssVarPrefix:"ceed",spacing:4,breakpoints:{values:{xs:0,sm:600,md:900,lg:1280,xl:1920}},zIndex:{popup:1500},colorSchemes:{light:Sn,dark:Sn},components:{CurrencyInput:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${ze.root}`]:{"font-family":"monospace"}}}},DatePicker:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${ze.root}`]:{"font-family":"monospace"}}}},DateRangePicker:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${ze.root}`]:{"font-family":"monospace"}}}},MonthPicker:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${ze.root}`]:{"font-family":"monospace"}}}},MonthRangePicker:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${ze.root}`]:{"font-family":"monospace"}}}},PercentageInput:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${ze.root}`]:{"font-family":"monospace"}}}},JoySelect:{defaultProps:{size:"sm"}},JoyInput:{defaultProps:{size:"sm"}},JoyCheckbox:{defaultProps:{size:"sm"}},JoyRadio:{defaultProps:{size:"sm"}},JoySwitch:{defaultProps:{size:"sm"}},JoyAutocomplete:{defaultProps:{size:"sm"}},JoyTextarea:{defaultProps:{size:"sm"}},JoyTable:{defaultProps:{size:"sm",borderAxis:"bothBetween"},styleOverrides:{root:({theme:e})=>({"--TableRow-stripeBackground":e.palette.background.level1,"--TableCell-selectedBackground":e.palette.primary.plainActiveBg,"--TableRow-hoverBackground":e.palette.background.level3,"& tbody tr:has([type=checkbox]:not(:checked)) th":{"--TableCell-headBackground":"transparent"},"& tbody tr:has([type=checkbox]:checked):hover th":{"--TableCell-headBackground":"var(--TableRow-hoverBackground)"},"& tbody tr:has([type=checkbox]:checked):not(:hover) th":{"--TableCell-headBackground":"var(--TableCell-selectedBackground)"},"& tbody tr:has([type=checkbox]:checked):not(:hover) td":{"--TableCell-dataBackground":"var(--TableCell-selectedBackground)"},"& tbody tr:focus":{outline:`${e.palette.primary[500]} solid 2px`,outlineOffset:"-2px"},[`& .${lm.root}`]:{verticalAlign:"middle"}})}},JoyTooltip:{defaultProps:{size:"sm",placement:"top"},styleOverrides:{root:({ownerState:e,theme:o})=>({"--joy-spacing":o.spacing(1),...e.size==="sm"&&{padding:"calc(0.5 * var(--joy-spacing)) calc(1.25 * var(--joy-spacing))"},...e.size==="md"&&{padding:"calc(1 * var(--joy-spacing)) calc(1.5 * var(--joy-spacing))"},...e.size==="lg"&&{padding:"calc(1.5 * var(--joy-spacing)) calc(2 * var(--joy-spacing))"}})}},JoyAvatar:{styleOverrides:{root:({ownerState:e})=>({...e.size==="xs"&&{width:"24px",height:"24px",fontSize:"12px"}})}},JoyDialogTitle:{styleOverrides:{root:{fontWeight:"var(--ceed-fontWeight-xl, 700)"}}}}});function cr(e){let o=e.theme||mr;return ut.createElement(ut.Fragment,null,ut.createElement(im,{theme:o},ut.createElement(pr,null),e.children))}cr.displayName="ThemeProvider";export{ko as Accordion,To as AccordionDetails,Mo as AccordionSummary,ht as Accordions,yt as Alert,mD as AspectRatio,Ue as Autocomplete,nD as AutocompleteListbox,aD as AutocompleteOption,Ao as Avatar,yr as AvatarGroup,uD as Badge,Ge as Box,bt as Breadcrumbs,qe as Button,Cx as ButtonGroup,je as Calendar,Ze as Card,Tt as CardActions,Pt as CardContent,Mt as CardCover,kt as CardOverflow,Xe as Checkbox,Ae as Chip,DD as CircularProgress,It as Container,pr as CssBaseline,zo as CurrencyInput,Et as DataTable,$o as DatePicker,Ot as DateRangePicker,ro as DialogActions,co as DialogContent,Ht as DialogFrame,uo as DialogTitle,ho as Divider,MD as Drawer,We as Dropdown,He as FormControl,Ye as FormHelperText,$e as FormLabel,dn as Grid,Je as IconButton,Go as InfoSign,eo as Input,$t as InsetDrawer,kD as LinearProgress,YD as Link,wD as List,SD as ListDivider,ND as ListItem,FD as ListItemButton,LD as ListItemContent,RD as ListItemDecorator,HD as ListSubheader,Jt as Markdown,be as Menu,_t as MenuButton,ve as MenuItem,zt as Modal,ot as ModalClose,go as ModalDialog,Vt as ModalFrame,Rt as ModalOverflow,fn as MonthPicker,qt as MonthRangePicker,it as NavigationGroup,lt as NavigationItem,Zt as Navigator,Jo as Option,po as Pagination,Xt as PercentageInput,pt as ProfileMenu,Co as Radio,bo as RadioGroup,er as RadioList,lo as Select,oo as Sheet,KD as Skeleton,_D as Slider,we as Stack,dt as Step,WD as StepButton,mt as StepIndicator,rr as Stepper,nr as Switch,ir as Tab,lr as TabList,sr as TabPanel,to as Table,At as TableBody,wt as TableHead,ar as Tabs,ao as Textarea,cr as ThemeProvider,so as Tooltip,U as Typography,pn as Uploader,eD as accordionClasses,oD as accordionDetailsClasses,rD as accordionSummaryClasses,tD as accordionsClasses,bx as alertClasses,cD as aspectRatioClasses,iD as autocompleteClasses,lD as autocompleteListboxClasses,sD as autocompleteOptionClasses,pD as avatarClasses,dD as avatarGroupClasses,gD as badgeClasses,vx as boxClasses,fD as breadcrumbsClasses,xx as buttonClasses,yD as cardActionsClasses,hD as cardClasses,CD as cardContentClasses,bD as cardCoverClasses,vD as cardOverflowClasses,Dx as checkboxClasses,xD as chipClasses,PD as circularProgressClasses,jx as dialogActionsClasses,qx as dialogContentClasses,Wx as dialogTitleClasses,Px as dividerClasses,TD as drawerClasses,dr as extendTheme,zx as formControlClasses,Vx as formHelperTextClasses,Rx as formLabelClasses,Hx as gridClasses,Mx as iconButtonClasses,Tx as inputClasses,ID as linearProgressClasses,JD as linkClasses,AD as listClasses,BD as listDividerClasses,OD as listItemButtonClasses,ED as listItemClasses,zD as listItemContentClasses,VD as listItemDecoratorClasses,$D as listSubheaderClasses,Ix as menuButtonClasses,kx as menuClasses,wx as menuItemClasses,Jx as modalClasses,_x as modalCloseClasses,Ux as modalDialogClasses,Gx as modalOverflowClasses,Ax as optionClasses,Sx as radioClasses,Bx as radioGroupClasses,Nx as selectClasses,Yx as sheetClasses,ZD as skeletonClasses,UD as sliderClasses,$x as stackClasses,qD as stepButtonClasses,GD as stepClasses,jD as stepperClasses,Ex as switchClasses,Xx as tabListClasses,Qx as tabPanelClasses,Fx as tableClasses,Zx as tabsClasses,Ox as textareaClasses,mr as theme,Kx as tooltipClasses,Lx as typographyClasses,hx as useColorScheme,fx as useTheme,yx as useThemeProps};