@ceed/ads 0.0.156-0 → 0.0.157-0

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.
@@ -1,137 +1,23 @@
1
1
  import React, { ComponentProps, ReactNode } from "react";
2
- import { Link } from "@mui/joy";
3
2
  import { Table } from "../Table";
4
- import CurrencyInput from "../CurrencyInput";
5
- import DatePicker from "../DatePicker";
6
- import Input from "../Input";
7
- import Textarea from "../Textarea";
8
- import Chip from "../Chip";
9
- import Autocomplete from "../Autocomplete";
10
- import Select from "../Select";
11
- export type RenderCellHandler<T extends Record<string, V>, V = unknown> = (params: {
12
- row: T;
13
- value?: V;
14
- id: string;
15
- }) => ReactNode;
16
- export type CellEditStartEvent<T extends Record<string, V>, V = unknown> = (params: {
17
- originalRow: T;
18
- row: T;
19
- value?: V;
20
- id: string;
21
- }) => void;
22
- export type CellEditStopEvent<T extends Record<string, V>, V = unknown> = (params: {
23
- originalRow: T;
24
- row: T;
25
- value?: V;
26
- id: string;
27
- }) => void;
28
- type BaseColumnDef<T extends Record<string, V>, V = unknown> = {
3
+ export type ColumnDef<T extends Record<string, V>, V = unknown> = {
4
+ type?: "number" | "string" | "date";
29
5
  field: keyof T;
30
6
  headerName?: string;
31
7
  width?: string;
32
8
  minWidth?: string;
33
9
  maxWidth?: string;
34
10
  resizable?: boolean;
35
- renderCell?: RenderCellHandler<T, V>;
36
- isCellEditable?: ((params: {
11
+ renderCell?: (params: {
37
12
  row: T;
38
13
  value?: V;
39
14
  id: string;
40
- }) => boolean) | boolean;
41
- onCellEditStart?: CellEditStartEvent<T, V>;
42
- onCellEditStop?: CellEditStopEvent<T, V>;
15
+ }) => ReactNode;
43
16
  };
44
- type AutocompleteColumnDef<T extends Record<string, V>, V = unknown> = BaseColumnDef<T, V> & {
45
- type: "autocomplete";
46
- componentProps?: ComponentProps<typeof Autocomplete> | ((params: {
47
- row: T;
48
- value?: V;
49
- id: string;
50
- }) => ComponentProps<typeof Autocomplete>);
51
- };
52
- type CurrencyColumnDef<T extends Record<string, V>, V = unknown> = BaseColumnDef<T, V> & {
53
- type: "currency";
54
- componentProps?: ComponentProps<typeof CurrencyInput> | ((params: {
55
- row: T;
56
- value?: V;
57
- id: string;
58
- }) => ComponentProps<typeof CurrencyInput>);
59
- };
60
- type DateColumnDef<T extends Record<string, V>, V = unknown> = BaseColumnDef<T, V> & {
61
- type: "date";
62
- componentProps?: ComponentProps<typeof DatePicker> | ((params: {
63
- row: T;
64
- value?: V;
65
- id: string;
66
- }) => ComponentProps<typeof DatePicker>);
67
- };
68
- type NumberColumnDef<T extends Record<string, V>, V = unknown> = BaseColumnDef<T, V> & {
69
- type: "number";
70
- componentProps?: ComponentProps<typeof Input> | ((params: {
71
- row: T;
72
- value?: V;
73
- id: string;
74
- }) => ComponentProps<typeof Input>);
75
- };
76
- type TextColumnDef<T extends Record<string, V>, V = unknown> = BaseColumnDef<T, V> & {
77
- type: "text";
78
- componentProps?: ComponentProps<typeof Input> | ((params: {
79
- row: T;
80
- value?: V;
81
- id: string;
82
- }) => ComponentProps<typeof Input>);
83
- };
84
- type LongTextColumnDef<T extends Record<string, V>, V = unknown> = BaseColumnDef<T, V> & {
85
- type: "longText";
86
- componentProps?: ComponentProps<typeof Textarea> | ((params: {
87
- row: T;
88
- value?: V;
89
- id: string;
90
- }) => ComponentProps<typeof Textarea>);
91
- };
92
- type SelectColumnDef<T extends Record<string, V>, V = unknown> = BaseColumnDef<T, V> & {
93
- type: "select";
94
- componentProps?: ComponentProps<typeof Select<string, false>> | ((params: {
95
- row: T;
96
- value?: V;
97
- id: string;
98
- }) => ComponentProps<typeof Select<string, false>>);
99
- };
100
- type MultiSelectColumnDef<T extends Record<string, V>, V = unknown> = BaseColumnDef<T, V> & {
101
- type: "multiSelect";
102
- componentProps?: ComponentProps<typeof Select<string, true>> | ((params: {
103
- row: T;
104
- value?: V;
105
- id: string;
106
- }) => ComponentProps<typeof Select<string, true>>);
107
- };
108
- type LinkColumnDef<T extends Record<string, V>, V = unknown, C extends React.ElementType = typeof Link> = BaseColumnDef<T, V> & {
109
- type: "link";
110
- component?: C;
111
- componentProps?: ComponentProps<C> | ((params: {
112
- row: T;
113
- value?: V;
114
- id: string;
115
- }) => ComponentProps<C>);
116
- };
117
- type ChipColumnDef<T extends Record<string, V>, V = unknown> = BaseColumnDef<T, V> & {
118
- type: "chip";
119
- componentProps?: ComponentProps<typeof Chip> | ((params: {
120
- row: T;
121
- value?: V;
122
- id: string;
123
- }) => ComponentProps<typeof Chip>);
124
- };
125
- type OtherColumnDef<T extends Record<string, V>, V = unknown> = BaseColumnDef<T, V> & {
126
- type?: "string";
127
- componentProps?: {};
128
- };
129
- export type ColumnDef<T extends Record<string, V>, V = unknown> = AutocompleteColumnDef<T, V> | CurrencyColumnDef<T, V> | DateColumnDef<T, V> | NumberColumnDef<T, V> | TextColumnDef<T, V> | LongTextColumnDef<T, V> | LinkColumnDef<T, V> | ChipColumnDef<T, V> | SelectColumnDef<T, V> | MultiSelectColumnDef<T, V> | OtherColumnDef<T, V>;
130
17
  export type DataTableProps<T extends Record<string, unknown>> = {
131
18
  rows: T[];
132
19
  checkboxSelection?: boolean;
133
20
  columns: ColumnDef<T>[];
134
- editMode?: boolean;
135
21
  /**
136
22
  * 체크박스가 있는 경우, 체크박스를 클릭했을 때 선택된 row의 index를 지정한다.
137
23
  */
@@ -19,6 +19,6 @@ interface BaseDateRangePickerProps {
19
19
  disableFuture?: boolean;
20
20
  disablePast?: boolean;
21
21
  }
22
- type DateRangePickerProps = BaseDateRangePickerProps & Omit<React.ComponentProps<typeof Input>, 'onChange'>;
22
+ type DateRangePickerProps = BaseDateRangePickerProps & Omit<React.ComponentProps<typeof Input>, "onChange">;
23
23
  declare const DateRangePicker: React.ForwardRefExoticComponent<Omit<DateRangePickerProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
24
24
  export { DateRangePicker };
@@ -9,6 +9,7 @@ declare module "@mui/joy/styles" {
9
9
  };
10
10
  }
11
11
  }
12
+ export declare const theme: Theme;
12
13
  declare function ThemeProvider(props: {
13
14
  children?: React.ReactNode;
14
15
  }): React.JSX.Element;
@@ -7,6 +7,10 @@ declare const Uploader: React.MemoExoticComponent<(props: {
7
7
  };
8
8
  }) => void) | undefined;
9
9
  name?: string | undefined;
10
+ size?: "sm" | "md" | undefined;
11
+ label?: string | undefined;
12
+ helperText?: string | undefined;
13
+ error?: boolean | undefined;
10
14
  accept?: string | undefined;
11
15
  maxCount?: number | undefined;
12
16
  /**
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{useTheme as Sh,useColorScheme as Lh,useThemeProps as Eh,alertClasses as Hh,boxClasses as zh,buttonClasses as Oh,checkboxClasses as Jh,dividerClasses as Yh,iconButtonClasses as $h,inputClasses as Rh,menuClasses as Uh,menuButtonClasses as qh,menuItemClasses as Wh,optionClasses as Gh,radioClasses as _h,radioGroupClasses as jh,selectClasses as Zh,switchClasses as Xh,tableClasses as Qh,textareaClasses as Kh,typographyClasses as eC,formControlClasses as oC,formLabelClasses as tC,formHelperTextClasses as rC,gridClasses as nC,stackClasses as aC,sheetClasses as iC,modalClasses as lC,modalCloseClasses as sC,modalDialogClasses as pC,modalOverflowClasses as mC,dialogTitleClasses as dC,dialogContentClasses as cC,dialogActionsClasses as uC,tooltipClasses as gC,tabsClasses as fC,tabListClasses as hC,tabPanelClasses as CC,accordionClasses as yC,accordionDetailsClasses as bC,accordionGroupClasses as xC,accordionSummaryClasses as vC,AutocompleteListbox as DC,AutocompleteOption as kC,autocompleteClasses as MC,autocompleteListboxClasses as TC,autocompleteOptionClasses as PC,Avatar as wC,avatarClasses as IC,AvatarGroup as AC,avatarGroupClasses as FC,AspectRatio as BC,aspectRatioClasses as VC,Badge as NC,badgeClasses as SC,breadcrumbsClasses as LC,cardClasses as EC,cardActionsClasses as HC,cardContentClasses as zC,cardCoverClasses as OC,cardOverflowClasses as JC,chipClasses as YC,CircularProgress as $C,circularProgressClasses as RC,Drawer as UC,drawerClasses as qC,LinearProgress as WC,linearProgressClasses as GC,List as _C,listClasses as jC,ListDivider as ZC,listDividerClasses as XC,ListItem as QC,listItemClasses as KC,ListItemButton as ey,listItemButtonClasses as oy,ListItemContent as ty,listItemContentClasses as ry,ListItemDecorator as ny,listItemDecoratorClasses as ay,ListSubheader as iy,listSubheaderClasses as ly,Link as sy,linkClasses as py,Slider as my,sliderClasses as dy,Step as cy,stepClasses as uy,StepButton as gy,stepButtonClasses as fy,StepIndicator as hy,Stepper as Cy,stepperClasses as yy,Skeleton as by,skeletonClasses as xy}from"@mui/joy";import ie from"react";import{AccordionGroup as gr,Accordion as fr,AccordionSummary as hr,AccordionDetails as Cr}from"@mui/joy";import{motion as Ye}from"framer-motion";var yr=Ye(hr),$e=yr;$e.displayName="AccordionSummary";var br=Ye(Cr),Re=br;Re.displayName="AccordionDetails";var xr=Ye(fr);function Ue(e){let{summary:o,details:t,variant:n,color:i,...a}=e,r=n==="solid"?"solid":void 0;return ie.createElement(xr,{variant:r,color:i,...a},ie.createElement($e,{variant:r,color:i},o),ie.createElement(Re,{variant:r,color:i},t))}Ue.displayName="Accordion";var vr=Ye(gr);function go(e){let{variant:o,color:t,items:n,...i}=e;return ie.createElement(vr,{variant:o,color:t,...i},n.map((a,r)=>ie.createElement(Ue,{key:r,summary:a.summary,details:a.details,index:r,variant:o,color:t})))}go.displayName="Accordions";import qe from"react";import{Alert as Ar,styled as Fr}from"@mui/joy";import{motion as Br}from"framer-motion";import Dr from"react";import{Typography as kr}from"@mui/joy";import{motion as Mr}from"framer-motion";var Tr=Mr(kr),Y=e=>Dr.createElement(Tr,{...e});Y.displayName="Typography";var N=Y;import{Stack as Pr}from"@mui/joy";import{motion as wr}from"framer-motion";var Ir=wr(Pr),le=Ir;le.displayName="Stack";var z=le;var Vr=Fr(Br(Ar))({alignItems:"flex-start",fontWeight:"unset"});function fo(e){let{title:o,content:t,actions:n,color:i="primary",...a}=e,r=e.invertedColors||e.variant==="solid";return qe.createElement(Vr,{...a,color:i,endDecorator:n,invertedColors:r},qe.createElement(z,null,o&&qe.createElement(N,{level:"title-sm",color:i},o),qe.createElement(N,{level:"body-sm",color:i},t)))}fo.displayName="Alert";import V,{useCallback as Rr,useEffect as Ur,useMemo as de,useRef as qr,useState as Wr}from"react";import{Autocomplete as Gr,AutocompleteOption as _r,ListSubheader as jr,AutocompleteListbox as Zr,ListItemDecorator as pt,CircularProgress as Xr,styled as Qr}from"@mui/joy";import{useVirtualizer as Kr}from"@tanstack/react-virtual";import{Popper as en}from"@mui/base";import{FormControl as Nr,styled as Sr}from"@mui/joy";import{motion as Lr}from"framer-motion";var Er=Sr(Lr(Nr))({width:"100%"}),se=Er;se.displayName="FormControl";var A=se;import{FormLabel as Hr}from"@mui/joy";import{motion as zr}from"framer-motion";var Or=zr(Hr),pe=Or;pe.displayName="FormLabel";var B=pe;import{FormHelperText as Jr}from"@mui/joy";import{motion as Yr}from"framer-motion";var $r=Yr(Jr),me=$r;me.displayName="FormHelperText";var I=me;var on=Qr(en,{name:"Autocomplete",slot:"Popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),tn=V.forwardRef((e,o)=>{let{anchorEl:t,open:n,modifiers:i,children:a,ownerState:{loading:r,size:l="md"},...s}=e,d=qr(null),u=a[0].every(y=>y.hasOwnProperty("group")),c=r?[a[1]]:a[0].length===0?[a[2]]:u?a[0].flatMap(y=>[V.createElement(jr,{key:y.key,component:"li"},y.group),...y.children]):a[0],C=Kr({count:c.length,estimateSize:()=>36,getScrollElement:()=>d.current,overscan:5}),m=C.getVirtualItems();return Ur(()=>{n&&C.measure()},[n]),V.createElement(on,{ref:o,anchorEl:t,open:n,modifiers:i},V.createElement(Zr,{...s},V.createElement("div",{ref:d,style:{overflow:"auto"}},V.createElement("div",{style:{height:`${C.getTotalSize()}px`,position:"relative"}},m.map(({index:y,size:p,start:f})=>V.cloneElement(c[y],{style:{position:"absolute",top:0,left:0,width:"100%",fontSize:`var(--ceed-fontSize-${l})`,height:`${p}px`,transform:`translateY(${f}px)`},children:V.createElement("div",{style:{textOverflow:"ellipsis",textWrap:"nowrap",overflow:"hidden"}},c[y].props.children)}))))))});function We(e){let{label:o,error:t,helperText:n,color:i,size:a,disabled:r,required:l,onChange:s,onChangeComplete:d,...u}=e,[c,C]=Wr(e.value||e.defaultValue),m=de(()=>e.options.map(g=>typeof g!="object"?{value:g,label:g}:g),[e.options]),y=de(()=>new Set(m.map(g=>g.value)),[e.options]),p=de(()=>e.loading?{value:"",label:"",startDecorator:V.createElement(Xr,{size:"sm",color:"neutral",variant:"plain",thickness:3})}:typeof c=="string"?m.find(g=>g.value===c)??c:c,[c,e.options,e.loading]),f=Rr(g=>V.isValidElement(g)&&!e.loading?V.cloneElement(g,{size:a}):g,[a,e.loading]),v=de(()=>f(p?.startDecorator||e.startDecorator),[p,f]),T=de(()=>f(p?.endDecorator||e.endDecorator),[p,f]),k=V.createElement(Gr,{...u,required:l,onChange:(g,b)=>{C(b);let F=b;s?.({...g,target:{...g.target,value:F?.value}}),y.has(F.value)&&d?.({...g,target:{...g.target,value:F?.value}})},color:i,value:p,options:m,size:a,disabled:r,startDecorator:v,endDecorator:T,getOptionLabel:g=>`${g.value??""}`,slots:{listbox:tn},renderOption:(g,b)=>V.createElement(_r,{...g},b.startDecorator&&V.createElement(pt,{sx:{marginInlineEnd:"var(--Input-gap)"}},f(b.startDecorator)),f(b.label),b.endDecorator&&V.createElement(pt,{sx:{marginInlineStart:"var(--Input-gap)"}},f(b.endDecorator))),renderGroup:g=>g});return o?V.createElement(A,{required:l,color:i,size:a,error:t,disabled:r},V.createElement(B,null,o),k,n&&V.createElement(I,null,n)):k}var mt=We;import{Box as rn}from"@mui/joy";import{motion as nn}from"framer-motion";var an=nn(rn),ce=an;ce.displayName="Box";var Ge=ce;import $ from"react";import{Breadcrumbs as ut,Link as hn}from"@mui/joy";import ho from"react";import{Menu as ln,MenuButton as sn,MenuItem as pn}from"@mui/joy";import{motion as Co}from"framer-motion";var mn=Co(ln),ue=e=>ho.createElement(mn,{...e});ue.displayName="Menu";var dn=Co(sn),ge=e=>ho.createElement(dn,{...e});ge.displayName="MenuButton";var cn=Co(pn),fe=e=>ho.createElement(cn,{...e});fe.displayName="MenuItem";var dt=ue;import{Dropdown as un}from"@mui/joy";import{motion as gn}from"framer-motion";var fn=gn(un),he=fn;he.displayName="Dropdown";var ct=he;function yo(e){let{crumbs:o,size:t,startCrumbCount:n=1,endCrumbCount:i=3,slots:{link:a,...r}={link:hn},slotProps:{link:l,...s}={link:{color:"neutral"}},collapsed:d=!0,...u}=e,c=f=>f.type==="link"&&a?$.createElement(a,{to:f.linkHref,href:f.linkHref,...l},f.label):$.createElement(N,null,f.label);if(!d)return $.createElement(ut,{size:t,slots:r,slotProps:s,...u},o.map(f=>$.createElement(c,{...f})));let C=Math.max(1,i),m=o.slice(0,n).map(f=>$.createElement(c,{...f})),y=(n+C>o.length?o.slice(n):o.slice(-C)).map(f=>$.createElement(c,{...f})),p=o.slice(n,-C).map(f=>$.createElement(fe,null,$.createElement(c,{...f})));return $.createElement(ut,{size:t,slots:r,slotProps:s,...u},m,p.length&&$.createElement(ct,null,$.createElement(ge,{size:t,variant:"plain"},"..."),$.createElement(dt,{size:t},p)),y)}yo.displayName="Breadcrumbs";import Cn,{forwardRef as yn}from"react";import{Button as bn}from"@mui/joy";import{motion as xn}from"framer-motion";var vn=xn(bn),Ce=yn((e,o)=>Cn.createElement(vn,{ref:o,...e}));Ce.displayName="Button";var P=Ce;import x,{Fragment as be,forwardRef as Fn,useMemo as vt}from"react";import{styled as W}from"@mui/joy";import Bn from"@mui/icons-material/esm/ChevronLeft.js";import Vn from"@mui/icons-material/esm/ChevronRight.js";import{AnimatePresence as Dt,motion as Nn}from"framer-motion";var gt=e=>{let o=[],t=new Date(e.getFullYear(),e.getMonth(),1),n=new Date(e.getFullYear(),e.getMonth()+1,0),i=Math.ceil((t.getDay()+1)/7),a=Math.ceil((n.getDate()+t.getDay())/7),r=1;for(let l=1;l<=a;l++){let s=[];for(let d=1;d<=7;d++)l===i&&d<t.getDay()+1||r>n.getDate()?s.push(void 0):(s.push(r),r++);o.push(s)}return o},ft=(e,o)=>e.toLocaleString(o,{year:"numeric"}),bo=(e,o)=>e.toLocaleString(o,{year:"numeric",month:"long"}),ht=(e,o)=>new Date(0,e).toLocaleString(o,{month:"short"}),Ct=e=>{let o=new Date().getDay(),t=new Date;return t.setDate(t.getDate()-o),Array.from({length:7}).map(()=>{let n=t.toLocaleString(e,{weekday:"short"});return t.setDate(t.getDate()+1),n})},yt=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()},xo=(e,o)=>{let t=new Date(e),n=new Date(o);return t.setHours(0,0,0,0),n.setHours(0,0,0,0),t.getTime()===n.getTime()},j=(e,o,t)=>{let n=new Date(t);n.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 n>=i&&n<=a},_e=(e,o)=>e.getFullYear()===o.getFullYear()&&e.getMonth()===o.getMonth();import Dn from"react";import{IconButton as kn}from"@mui/joy";import{motion as Mn}from"framer-motion";var Tn=Mn(kn),ye=e=>Dn.createElement(Tn,{...e});ye.displayName="IconButton";var O=ye;import{useCallback as Pn,useMemo as wn,useState as je}from"react";import{useThemeProps as In}from"@mui/joy";var An=(e,o)=>o.includes(e)?e:o[0],bt=e=>{let[o,t]=je(()=>An(e.view||"day",e.views||["day","month"])),[n,i]=je(e.defaultValue),[a,r]=je(()=>{let p=new Date;return p.setDate(1),p.setHours(0,0,0,0),e.value?.[0]||e.defaultValue?.[0]||p}),[[l,s],d]=je([0,0]),u=e.view??o,c=p=>{d([l+p,p])},C=Pn(p=>{r(p),u==="month"?a.getFullYear()!==p.getFullYear()&&c(p>a?1:-1):c(p>a?1:-1),e.onMonthChange?.(p)},[e.onMonthChange,a,u]),m=In({props:{locale:"default",views:["day","month"],view:u,value:e.value??n,...e,onChange:e.value?e.onChange:p=>{i(p),e.onChange?.(p)},onMonthChange:C,onViewChange:()=>{let p=u==="month"?"day":"month";!(!e.views||e.views.includes(p))||e.view===p||(e.onViewChange?e.onViewChange(p):t(p))}},name:"Calendar"}),y=wn(()=>({...m,viewMonth:a,direction:s}),[m,a,s]);return[m,y]};import{useCallback as re,useState as xt}from"react";var Ze=e=>{let[o,t]=xt(null),[n,i]=xt(null);return{calendarTitle:e.view==="month"?ft(e.viewMonth,e.locale||"default"):bo(e.viewMonth,e.locale||"default"),onPrev:re(()=>{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:re(()=>{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:re(a=>{let r=new Date(e.viewMonth||new Date);r.setHours(0,0,0,0),r.setDate(a);let l=e.rangeSelection&&e.value&&e.value[0]&&(o&&j(e.value[0],o,r)||e.value[1]&&j(e.value[0],e.value[1],r));return{"aria-label":r.toLocaleDateString(),"aria-current":l?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,o]),getMonthCellProps:re(a=>{let r=new Date(e.viewMonth||new Date);r.setDate(1),r.setHours(0,0,0,0),r.setMonth(a);let s=!e.views?.find(d=>d==="day")&&e.rangeSelection&&e.value&&e.value[0]&&(n&&j(e.value[0],n,r)||e.value[1]&&j(e.value[0],e.value[1],r));return{"aria-label":r.toLocaleDateString(),"aria-current":s?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,n]),getPickerDayProps:re(a=>{let r=new Date(e.viewMonth||new Date);r.setHours(0,0,0,0),r.setDate(a);let l=!!e.value&&(xo(r,e.value[0])||e.value[1]&&xo(r,e.value[1])),s=e.rangeSelection&&e.value&&e.value[0]&&(o&&j(e.value[0],o,r)||e.value[1]&&j(e.value[0],e.value[1],r)),d=()=>{e.rangeSelection?e.value?e.value[0]&&!e.value[1]?e.onChange?.([new Date(Math.min(e.value[0].getTime(),r.getTime())),new Date(Math.max(e.value[0].getTime(),r.getTime()))]):e.onChange?.([r,void 0]):e.onChange?.([r,void 0]):e.onChange?.([r,void 0]),t(null)};return{isToday:yt(r),isSelected:l,onClick:d,onMouseEnter:e.rangeSelection&&e.value?.[0]&&!e.value?.[1]?()=>t(r):void 0,disabled:e.minDate&&r<e.minDate||e.maxDate&&r>e.maxDate||e.disableFuture&&r>new Date||e.disablePast&&r<(()=>{let u=new Date;return u.setHours(0,0,0,0),u})(),tabIndex:-1,"aria-label":r.toLocaleDateString(),"aria-selected":l?"true":void 0,"aria-current":s?"date":void 0}},[e.onChange,e.value,e.viewMonth,e.rangeSelection,e.minDate,e.maxDate,e.disableFuture,e.disablePast,o]),getPickerMonthProps:re(a=>{let r=new Date(e.viewMonth||new Date);r.setDate(1),r.setHours(0,0,0,0),r.setMonth(a);let l=!e.views?.find(C=>C==="day"),s=l&&e.rangeSelection,d=!!e.value&&(_e(r,e.value[0])||e.value[1]&&_e(r,e.value[1])),u=s&&e.value&&e.value[0]&&(n&&j(e.value[0],n,r)||e.value[1]&&j(e.value[0],e.value[1],r)),c=()=>{s?e.value?e.value[0]&&!e.value[1]?e.onChange?.([new Date(Math.min(e.value[0].getTime(),r.getTime())),new Date(Math.max(e.value[0].getTime(),r.getTime()))]):e.onChange?.([r,void 0]):e.onChange?.([r,void 0]):l?e.onChange?.([r,void 0]):(e.onViewChange?.("day"),e.onMonthChange?.(r)),i(null)};return{isSelected:d,onMouseEnter:s&&e.value?.[0]&&!e.value?.[1]?()=>i(r):void 0,disabled:e.minDate&&(()=>{let C=new Date(r);return C.setMonth(C.getMonth()+1),C.setDate(0),C<e.minDate})()||e.maxDate&&(()=>{let C=new Date(r);return C.setDate(0),C>e.maxDate})()||e.disableFuture&&r>new Date||e.disablePast&&r<new Date&&!_e(r,new Date),onClick:c,tabIndex:-1,"aria-label":bo(r,e.locale||"default"),"aria-selected":d?"true":void 0,"aria-current":u?"date":void 0}},[e.onMonthChange,e.onViewChange,e.onChange,e.viewMonth,e.locale,e.value,e.minDate,e.maxDate,e.disableFuture,e.disablePast,n])}};var Sn=W("div",{name:"Calendar",slot:"root"})({maxWidth:"264px"}),Ln=W("div",{name:"Calendar",slot:"calendarHeader"})(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",padding:e.spacing(1)})),kt=W("div",{name:"Calendar",slot:"viewContainer"})(({theme:e,calendarType:o})=>({paddingLeft:e.spacing(1),paddingRight:e.spacing(1),position:"relative",overflow:"hidden",minHeight:o==="datePicker"?"250px":"unset"})),Mt=W(Nn.table,{name:"Calendar",slot:"viewTable"})(({theme:e})=>({borderSpacing:0,"& td, & th":{padding:0},"& th":{paddingTop:e.spacing(1),paddingBottom:e.spacing(1)}})),En=W("thead",{name:"Calendar",slot:"weekHeaderContainer"})({}),Hn=W("tbody",{name:"Calendar",slot:"dayPickerContainer"})({}),zn=W(P,{name:"Calendar",slot:"switchViewButton"})(({ownerState:e})=>[e.view==="month"&&{pointerEvents:"none"}]),On=W("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}}})),Jn=W("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}}})),Yn=W(P,{name:"Calendar",slot:"month"})(({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}]),$n=W(P,{name:"Calendar",slot:"day"})(({theme:e,isToday:o,isSelected:t,disabled:n})=>[{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}},n&&{color:e.palette.neutral.solidDisabledColor,backgroundColor:e.palette.neutral.solidDisabledBg}]),Tt={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})},Xe=1e4,Pt=(e,o)=>Math.abs(e)*o,Rn=e=>{let{ownerState:o}=e,{getPickerDayProps:t,getDayCellProps:n}=Ze(o),i=vt(()=>gt(o.viewMonth),[o.viewMonth]),a=vt(()=>Ct(o.locale||"default"),[o.locale]);return x.createElement(kt,{calendarType:"datePicker"},x.createElement(Dt,{initial:!1,custom:o.direction},x.createElement(Mt,{key:`${o.viewMonth.toString()}_${o.direction}`,custom:o.direction,variants:Tt,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:(r,{offset:l,velocity:s})=>{let d=Pt(l.x,s.x);if(d<-Xe){let u=new Date(o.viewMonth||new Date);u.setMonth(u.getMonth()+1),o.onMonthChange?.(u)}else if(d>Xe){let u=new Date(o.viewMonth||new Date);u.setMonth(u.getMonth()-1),o.onMonthChange?.(u)}}},x.createElement(En,null,x.createElement("tr",null,a.map((r,l)=>x.createElement(x.Fragment,null,x.createElement("th",null,x.createElement(N,{level:"body-xs",textAlign:"center"},r)),l<6&&x.createElement("th",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"}))))),x.createElement(Hn,null,i.map((r,l)=>x.createElement(be,{key:`${o.viewMonth}_${l}`},x.createElement("tr",null,r.map((s,d)=>s?x.createElement(be,{key:d},x.createElement(On,{...n(s)},x.createElement($n,{size:"sm",variant:"plain",color:"neutral",...t(s)},s)),d<6&&x.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})):x.createElement(be,{key:d},x.createElement("td",null),d<6&&x.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})))),l<i.length-1&&x.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},x.createElement("td",{colSpan:13,style:{height:4}}))))))))},Un=e=>{let{ownerState:o}=e,{getPickerMonthProps:t,getMonthCellProps:n}=Ze(o),i=Array.from({length:12},(r,l)=>l).reduce((r,l)=>(r[r.length-1].length===4&&r.push([]),r[r.length-1].push(l),r),[[]]),a=!o.views?.find(r=>r==="day");return x.createElement(kt,{calendarType:a?"monthPicker":"datePicker"},x.createElement(Dt,{initial:!1,custom:o.direction},x.createElement(Mt,{key:`${o.viewMonth.getFullYear()}_${o.direction}`,custom:o.direction,variants:Tt,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:(r,{offset:l,velocity:s})=>{let d=Pt(l.x,s.x);if(d<-Xe){let u=new Date(o.viewMonth||new Date);u.setMonth(u.getMonth()+1),o.onMonthChange?.(u)}else if(d>Xe){let u=new Date(o.viewMonth||new Date);u.setMonth(u.getMonth()-1),o.onMonthChange?.(u)}}},x.createElement("tbody",null,i.map((r,l)=>x.createElement(be,{key:l},x.createElement("tr",null,r.map((s,d)=>x.createElement(be,{key:s},x.createElement(Jn,{...n(s)},x.createElement(Yn,{size:"sm",variant:"plain",color:"neutral",...t(s)},ht(s,o.locale))),d<3&&x.createElement("td",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"})))),l<i.length-1&&x.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},x.createElement("td",{colSpan:7,style:{height:4}}))))))))},xe=Fn((e,o)=>{let[t,n]=bt(e),{value:i,defaultValue:a,onChange:r,locale:l,onViewChange:s,onMonthChange:d,view:u,views:c,rangeSelection:C,...m}=t,{calendarTitle:y,onPrev:p,onNext:f}=Ze(n);return x.createElement(Sn,{ref:o,...m},x.createElement(Ln,null,x.createElement(O,{size:"sm",onClick:p},x.createElement(Bn,null)),x.createElement(zn,{ownerState:n,variant:"plain",color:"neutral",onClick:s},y),x.createElement(O,{size:"sm",onClick:f},x.createElement(Vn,null))),u==="day"&&x.createElement(Rn,{ownerState:n}),u==="month"&&x.createElement(Un,{ownerState:n}))});xe.displayName="Calendar";var Q=xe;import{Card as qn,CardContent as Wn,CardCover as Gn,CardActions as _n,CardOverflow as jn}from"@mui/joy";import{motion as ve}from"framer-motion";var Zn=ve(qn),De=Zn;De.displayName="Card";var Xn=ve(Wn),vo=Xn;vo.displayName="CardContent";var Qn=ve(Gn),Do=Qn;Do.displayName="CardCover";var Kn=ve(_n),ko=Kn;ko.displayName="CardActions";var ea=ve(jn),Mo=ea;Mo.displayName="CardOverflow";import oa from"react";import{Checkbox as ta}from"@mui/joy";import{motion as ra}from"framer-motion";var na=ra(ta),ke=e=>oa.createElement(na,{...e});ke.displayName="Checkbox";var Me=ke;import{Chip as aa}from"@mui/joy";import{motion as ia}from"framer-motion";var la=ia(aa),Te=la;Te.displayName="Chip";var wt=Te;import{styled as sa}from"@mui/joy";import pa,{forwardRef as ma}from"react";var da=sa("div",{name:"Container",slot:"root",shouldForwardProp:e=>e!=="maxWidth"})(({theme:e,maxWidth:o="lg"})=>({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block",paddingLeft:e.spacing(2),paddingRight:e.spacing(2),...o==="sm"&&{[e.breakpoints.up("xs")]:{maxWidth:e.breakpoints.values.sm}},...o==="md"&&{[e.breakpoints.up("sm")]:{maxWidth:e.breakpoints.values.md}},...o==="lg"&&{[e.breakpoints.up("md")]:{maxWidth:e.breakpoints.values.lg}},...o==="xl"&&{[e.breakpoints.up("lg")]:{maxWidth:e.breakpoints.values.xl}}})),To=ma(function(o,t){return pa.createElement(da,{ref:t,...o})});To.displayName="Container";import Z,{useCallback as fa,useMemo as ha,useState as Ft}from"react";import{IntlMessageFormat as Ca}from"intl-messageformat";import{NumericFormat as ya}from"react-number-format";import ba from"@mui/icons-material/esm/InfoOutlined.js";import Pe from"react";import{Input as ca}from"@mui/joy";import{motion as ua}from"framer-motion";var It=ua(ca),we=e=>{let{label:o,helperText:t,error:n,style:i,size:a,color:r,disabled:l,required:s,...d}=e;return o?Pe.createElement(A,{required:s,color:r,size:a,error:n,disabled:l},Pe.createElement(B,null,o),Pe.createElement(It,{...d}),t&&Pe.createElement(I,null,t)):Pe.createElement(It,{required:s,color:r,size:a,disabled:l,...d})};we.displayName="Input";var J=we;import ga from"intl-messageformat";var At=(e="usd")=>{let[o,t,n]=new ga(`{amount, number, ::currency/${e} unit-width-narrow}`).format({amount:1e3}).toString().replace(/\d/g,"").split("");return{symbol:`${o} `,thousandSeparator:t,decimalSeparator:n,placeholder:n?`${o} 0${n}00`:`${o} 0`,fixedDecimalScale:!!n}};var xa=Z.forwardRef(function(o,t){let{onChange:n,...i}=o;return Z.createElement(ya,{...i,onValueChange:({value:a})=>{n?.({target:{name:o.name,value:a}})},valueIsNumericString:!0,getInputRef:t,decimalScale:2})}),Qe=Z.forwardRef(function(o,t){let{currency:n="usd",max:i=1e5,name:a,onChange:r,label:l,error:s,helperText:d,required:u,disabled:c,useMinorUnit:C,...m}=o,{symbol:y,thousandSeparator:p,decimalSeparator:f,placeholder:v,fixedDecimalScale:T}=At(n),[D,k]=Ft(o.value),[g,b]=Ft(!!i&&!!o.value&&o.value>i),F=ha(()=>D&&C?D/100:D,[D,C]),M=fa(ne=>{let ee=Number(C?ne.target.value?.replace(f,""):ne.target.value);k(ee),r?.({...ne,target:{name:a,value:ee}}),i&&ee>i?b(!0):b(!1)},[]),q=Z.createElement(J,{...m,size:"sm",ref:t,value:F,placeholder:v,onChange:M,disabled:c,required:u,slotProps:{input:{component:xa,decimalSeparator:f,thousandSeparator:p,prefix:y,fixedDecimalScale:T}},sx:{fontFamily:"monospace"}});return l?Z.createElement(A,{size:"sm",disabled:c,required:u,error:s||g},Z.createElement(B,null,l),q,g?Z.createElement(I,null,Z.createElement(ba,null),new Ca(`limit: {amount, number, ::currency/${n} unit-width-narrow}`).format({amount:i})):d&&Z.createElement(I,null,d)):q});var Bt=Qe;import h,{useCallback as oe,useEffect as ro,useMemo as U,useRef as Za,useState as Fo}from"react";import{styled as Xa,LinearProgress as Qa,Link as Ka}from"@mui/joy";import ei from"@mui/icons-material/esm/ChevronLeft.js";import oi from"@mui/icons-material/esm/ChevronRight.js";import{Sheet as va}from"@mui/joy";import{motion as Da}from"framer-motion";var ka=Da(va),Ie=ka;Ie.displayName="Sheet";var R=Ie;import G from"react";import{Table as Ma}from"@mui/joy";var Ae=e=>{let{children:o,...t}=e;return G.createElement(Ma,{...t},o)};Ae.displayName="Table";function Po(e){let{headCells:o,showCheckbox:t,onCheckboxChange:n,slots:{checkbox:i=Me}={},slotProps:{checkbox:a={}}={}}=e;return G.createElement("thead",null,G.createElement("tr",null,t&&G.createElement("th",{style:{width:"40px",textAlign:"center"}},G.createElement(i,{onChange:n,...a})),o.map(r=>G.createElement("th",{key:r.label,style:{width:r.width,minWidth:r.minWidth,maxWidth:r.maxWidth,textAlign:r.numeric?"right":"left"}},r.label))))}Po.displayName="TableHead";function wo(e){let{rows:o,cellOrder:t,rowOptions:n,showCheckbox:i,onCheckboxChange:a,slots:{checkbox:r=Me}={},slotProps:{checkbox:l={}}={}}=e;return G.createElement("tbody",null,o.map((s,d)=>G.createElement("tr",{key:d},i&&G.createElement("td",{style:{textAlign:"center"}},G.createElement(r,{onChange:u=>a?.(u,d),...l})),t.map(u=>G.createElement("td",{key:u,style:{textAlign:n?.[u]?.numeric?"right":"left"}},s[u])))))}wo.displayName="TableBody";import S,{forwardRef as Fa,useCallback as Vt,useEffect as Ba,useImperativeHandle as Va,useRef as Na,useState as Nt}from"react";import{IMaskInput as Sa,IMask as Io}from"react-imask";import La from"@mui/icons-material/esm/CalendarToday.js";import{styled as St}from"@mui/joy";import{FocusTrap as Ea,ClickAwayListener as Ha,Popper as za}from"@mui/base";import{DialogActions as Ta,styled as Pa}from"@mui/joy";import{motion as wa}from"framer-motion";var Ia=wa(Ta),Aa=Pa(Ia)(({theme:e})=>({padding:e.spacing(1),gap:e.spacing(1),flexDirection:"row",justifyContent:"flex-end"})),Fe=Aa;Fe.displayName="DialogActions";var _=Fe;var Oa=St(za,{name:"DatePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Ja=St(R,{name:"DatePicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),Lt=e=>{let o=`${e.getDate()}`,t=`${e.getMonth()+1}`,n=e.getFullYear();return Number(o)<10&&(o="0"+o),Number(t)<10&&(t="0"+t),[n,t,o].join("/")},Ya=S.forwardRef(function(o,t){let{onChange:n,...i}=o;return S.createElement(Sa,{...i,inputRef:t,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/`m/`d",blocks:{d:{mask:Io.MaskedRange,from:1,to:31,maxLength:2},m:{mask:Io.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Io.MaskedRange,from:1900,to:9999}},format:Lt,parse:a=>{let r=a.split("/");return new Date(Number(r[0]),Number(r[1])-1,Number(r[2]))},autofix:"pad",overwrite:!0})}),Ke=Fa((e,o)=>{let{onChange:t,disabled:n,label:i,error:a,helperText:r,minDate:l,maxDate:s,disableFuture:d,disablePast:u,required:c,...C}=e,m=Na(null),[y,p]=Nt(e.value||""),[f,v]=Nt(null),T=!!f;Ba(()=>{p(e.value||"")},[e.value]),Va(o,()=>m.current,[m.current]);let D=Vt(b=>{p(b.target.value),t?.(b)},[]),k=Vt(b=>{v(f?null:b.currentTarget),m.current?.focus()},[f,v,m]),g=S.createElement(Ea,{open:!0},S.createElement(S.Fragment,null,S.createElement(J,{...C,ref:m,size:"sm",value:y,onChange:D,placeholder:"YYYY/MM/DD",disabled:n,required:c,slotProps:{input:{component:Ya,ref:m}},sx:{fontFamily:"monospace"},endDecorator:S.createElement(O,{variant:"plain",onClick:k},S.createElement(La,null))}),T&&S.createElement(Ha,{onClickAway:()=>v(null)},S.createElement(Oa,{id:"date-picker-popper",open:!0,anchorEl:f,placement:"bottom-end",onMouseDown:b=>b.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}]},S.createElement(Ja,{tabIndex:-1,role:"presentation"},S.createElement(Q,{value:Number.isNaN(new Date(y).getTime())?void 0:[new Date(y),void 0],onChange:([b])=>{D({target:{name:e.name,value:Lt(b)}}),v(null),m.current?.blur()},minDate:l?new Date(l):void 0,maxDate:s?new Date(s):void 0,disableFuture:d,disablePast:u}),S.createElement(_,{sx:{p:1}},S.createElement(P,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{D({target:{name:e.name,value:""}}),v(null),m.current?.blur()}},"Clear")))))));return i?S.createElement(A,{required:c,disabled:n,error:a,size:"sm"},S.createElement(B,null,i),g,r&&S.createElement(I,null,r)):g});var Et=Ke;import eo from"react";import{Textarea as $a}from"@mui/joy";import{motion as Ra}from"framer-motion";var Ua=Ra($a),Be=e=>{let{label:o,error:t,helperText:n,color:i,size:a,disabled:r,required:l,...s}=e,d=eo.createElement(Ua,{required:l,disabled:r,color:i,size:a,...s});return o?eo.createElement(A,{required:l,disabled:r,color:i,size:a,error:t},eo.createElement(B,null,o),d,n&&eo.createElement(I,null,n)):d};Be.displayName="Textarea";var Ht=Be;import Ve,{useMemo as qa}from"react";import{Select as Wa,Option as Ga}from"@mui/joy";import{motion as _a}from"framer-motion";var ja=_a(Ga),oo=ja;oo.displayName="Option";function Ne(e){let{label:o,helperText:t,error:n,size:i,color:a,disabled:r,required:l,onChange:s,...d}=e,u=qa(()=>e.options.map(m=>typeof m!="object"?{value:m,label:m}:m),[e.options]),C=Ve.createElement(Wa,{...d,required:l,disabled:r,size:i,color:a,onChange:(m,y)=>{let p=m||{target:{}},f={...p,target:{name:p.target?.name||e.name,value:y||void 0}};s?.(f)}},u.map(m=>Ve.createElement(oo,{key:m.value,value:m.value},m.label)));return o?Ve.createElement(A,{required:l,disabled:r,size:i,color:a,error:n},Ve.createElement(B,null,o),C,t&&Ve.createElement(I,null,t)):C}Ne.displayName="Select";var Ao=Ne;var zt=Xa("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"}}),to=e=>"Intl"in window?new Intl.NumberFormat().format(e):e;function ti(e){let{paginationModel:{page:o,pageSize:t},rowCount:n,onPageChange:i}=e,a=1,r=Math.ceil(n/t),l=[o-2,o-1].filter(c=>c>1),s=[o+1,o+2].filter(c=>c<=r-1),d=r>1&&o<r-3,u=r>1&&o>4;return h.createElement(z,{direction:"row",spacing:1,sx:{pt:1,pb:1},justifyContent:"end",alignItems:"center"},h.createElement(z,{direction:"row",spacing:.5,alignItems:"center"},h.createElement(O,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o-1),disabled:o===a,"aria-label":"Previous page"},h.createElement(ei,null)),o!==a&&h.createElement(P,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(a)},a),u&&h.createElement(P,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o-3)},"..."),l.map(c=>h.createElement(P,{key:c,size:"sm",variant:"plain",color:"neutral",onClick:()=>i(c)},c)),h.createElement(P,{variant:"soft",size:"sm"},o),s.map(c=>h.createElement(P,{key:c,size:"sm",variant:"plain",color:"neutral",onClick:()=>i(c)},c)),d&&h.createElement(P,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o+3)},"..."),o!==r&&h.createElement(P,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(r)},r),h.createElement(O,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o+1),disabled:o===r,"aria-label":"Next page"},h.createElement(oi,null))))}var ri=e=>h.createElement(Ge,{sx:{position:"absolute",top:0,right:0,bottom:0,width:"4px",cursor:"col-resize"},onMouseDown:o=>{let t=o.clientX,n=e.current?.getBoundingClientRect().width,i=r=>{n&&t&&(e.current.style.width=`${n+(r.clientX-t)}px`)},a=()=>{document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",a)};document.addEventListener("mousemove",i),document.addEventListener("mouseup",a)}}),ni=e=>{let o=Za(null),t={width:e.width,minWidth:e.minWidth??"50px",maxWidth:e.maxWidth,textAlign:e.type==="number"?"end":"start",position:e.stickyHeader?void 0:"relative"},n=e.resizable??!0?ri(o):null;return h.createElement("th",{ref:o,key:e.field,style:t},e.headerName??e.field,n)},ai=e=>{let{field:o,type:t,renderCell:n,isCellEditable:i,row:a,rowId:r}=e,[l,s]=Fo(a[o]),d=U(()=>({row:a,value:l,id:r}),[a,o,r,l]),u=U(()=>!!((typeof i=="function"&&i(d)||typeof i=="boolean"&&i)&&e.editMode),[e.editMode,i,a]),c=U(()=>({...typeof e.componentProps=="function"?e.componentProps(d):e.componentProps||{},size:"sm"}),[l,e.componentProps,d]),C=U(()=>({...c,onChange:p=>{c.onChange?.(p),s(p.target.value),t&&["select","multiSelect"].includes(t)&&e.onCellEditStop?.({...d,originalRow:a,row:{...d.row,[o]:p.target.value},value:p.target.value})},onFocus:p=>{c.onFocus?.(p),e.onCellEditStart?.({...d,originalRow:a,row:{...d.row,value:l},value:l})},onBlur:p=>{c.onBlur?.(p),t&&["number","text","longText","currency","date"].includes(t)&&e.onCellEditStop?.({...d,originalRow:a,row:{...d.row,[o]:l},value:l})},...t==="autocomplete"&&{onChangeComplete:p=>{c.onChangeComplete?.(p),s(p.target.value),e.onCellEditStop?.({...d,originalRow:a,row:{...d.row,[o]:p.target.value},value:p.target.value})}}}),[l,c]),m=U(()=>({date:h.createElement(Et,{...C,value:l}),currency:h.createElement(Bt,{...C,value:l}),number:h.createElement(J,{...C,value:l,type:"number"}),text:h.createElement(J,{...C,value:l,type:"text"}),longText:h.createElement(Ht,{...C,value:l}),autocomplete:h.createElement(mt,{...C,value:l,options:C.options||[l]}),select:h.createElement(Ao,{...C,value:l,options:C.options||[l]}),multiSelect:h.createElement(Ao,{...C,value:Array.isArray(l)?l:[l],options:C.options||[l],multiple:!0})})[t||"text"],[l,c]),y=U(()=>{if(n)return n(d);let p=l;return{chip:h.createElement(wt,{color:"primary",children:p,...c}),link:h.createElement(e.component||Ka,{children:p,...c})}[t||"text"]||p},[l,n,a]);return ro(()=>{s(a[o])},[a]),h.createElement("td",{key:o,style:{textAlign:t&&["number","date","currency"].includes(t)?"end":"start"}},u&&m?m:y)},ii=e=>{let{columns:o,rowId:t,editMode:n}=e,[i,a]=Fo(e.row),r=oe(({row:l})=>{a(l)},[]);return h.createElement(h.Fragment,null,o.map(l=>h.createElement(ai,{...l,row:i,rowId:t,editMode:n,onCellEditStop:s=>{l.onCellEditStop?.(s),r(s)}})))};function li({rows:e,columns:o,rowCount:t,pagination:n,paginationMode:i,paginationModel:a,onPaginationModelChange:r,selectionModel:l=[],onSelectionModelChange:s,getId:d,isTotalSelected:u}){let[c,C]=Fo(a?.page||1),m=a?.pageSize||20,y=oe((g,b)=>d?.(g)??g?.id??`${(b||0)+(c-1)*m}`,[d??c,m]),p=U(()=>new Set(l),[l]),f=U(()=>!n||i==="server"?e:e.slice((c-1)*m,(c-1)*m+m),[e,c,m,i,n]),v=U(()=>f.length>0&&f.every((g,b)=>p.has(y(g,b))),[f,p,c,m,y]),T=t||e.length,D=U(()=>u??(T>0&&l.length===T),[u,l,T]),k=oe(g=>{C(g),r?.({page:g,pageSize:m})},[r]);return ro(()=>{k(1)},[T]),ro(()=>{let g=Math.max(1,Math.ceil(T/m));c>g&&k(g)},[c,T,m]),ro(()=>{s?.([])},[c]),{rowCount:T,page:c,pageSize:m,onPaginationModelChange:k,getId:y,HeadCell:ni,BodyRow:ii,dataInPage:f,isAllSelected:v,isTotalSelected:D,isSelectedRow:oe(g=>p.has(g),[p]),onAllCheckboxChange:oe(()=>{s?.(v?[]:f.map(y))},[v,f,s]),onCheckboxChange:oe((g,b)=>{if(p.has(b)){let F=l.filter(M=>M!==b);s?.(F)}else{let F=[...l,b];s?.(F)}},[l,s]),columns:U(()=>o||Object.keys(e[0]||{}).map(g=>({field:g})),[e,o]),onTotalSelect:oe(()=>{s?.(D?[]:e.map(y),!D)},[D,e,s])}}function Bo(e){let{rows:o,checkboxSelection:t,editMode:n,selectionModel:i,onSelectionModelChange:a,rowCount:r,columns:l,onPaginationModelChange:s,pagination:d,paginationMode:u,paginationModel:c,loading:C,slots:{checkbox:m=Me,toolbar:y,footer:p,loadingOverlay:f=()=>h.createElement(Qa,{value:8,variant:"plain"})}={},slotProps:{checkbox:v={},toolbar:T,background:D={}}={},...k}=e,{columns:g,isAllSelected:b,isSelectedRow:F,onAllCheckboxChange:M,onCheckboxChange:q,getId:ne,rowCount:ee,page:at,pageSize:it,onPaginationModelChange:sr,dataInPage:pr,isTotalSelected:lt,onTotalSelect:st,HeadCell:mr,BodyRow:dr}=li(e),cr=U(()=>({page:at,pageSize:it}),[at,it]);return h.createElement(Ge,null,h.createElement(z,{direction:"row",sx:{pt:1,pb:1},justifyContent:"space-between",alignItems:"center"},!!t&&h.createElement(z,{direction:"row",spacing:1},!b&&h.createElement(N,{level:"body-xs"},to(i?.length||0)," items selected"),b&&!lt&&h.createElement(z,{direction:"row",spacing:1,alignItems:"center"},h.createElement(N,{level:"body-xs"},"All ",to(i?.length||0)," items on this page are selected."),h.createElement(P,{size:"sm",variant:"plain",onClick:st},"Select all ",to(ee??o.length)," items")),lt&&h.createElement(z,{direction:"row",spacing:1,alignItems:"center"},h.createElement(N,{level:"body-xs"},"All ",to(ee??o.length)," items are selected."),h.createElement(P,{size:"sm",variant:"plain",color:"danger",onClick:st},"Cancel"))),y&&h.createElement(y,{...T||{}})),h.createElement(R,{variant:"outlined",sx:{overflow:"auto",width:"100%",boxShadow:"sm",borderRadius:"sm"},...D},h.createElement(Ae,{...k},h.createElement("thead",null,h.createElement("tr",null,t&&h.createElement("th",{style:{width:"40px",textAlign:"center"}},h.createElement(m,{onChange:M,checked:b,indeterminate:(i||[]).length>0&&!b,...v})),g.map(ae=>h.createElement(mr,{key:ae.field,stickyHeader:e.stickyHeader,...ae})))),h.createElement("tbody",null,h.createElement(zt,null,!!C&&h.createElement("td",null,h.createElement(Ge,{sx:{position:"absolute",top:0,left:0,right:0}},h.createElement(f,null)))),h.createElement(zt,null),pr.map((ae,ur)=>{let te=ne(ae,ur);return h.createElement("tr",{key:te,role:t?"checkbox":void 0,tabIndex:t?-1:void 0,onClick:t?uo=>q(uo,te):void 0,"aria-checked":t?F(te):void 0},t&&h.createElement("th",{scope:"row",style:{textAlign:"center"}},h.createElement(m,{onChange:uo=>q(uo,te),checked:F(te),...v})),h.createElement(dr,{columns:g,row:ae,rowId:te,editMode:n}))})),p&&h.createElement(p,null))),d&&h.createElement(ti,{paginationModel:cr,rowCount:ee,onPageChange:sr}))}Bo.displayName="DataTable";import L,{forwardRef as si,useCallback as Vo,useEffect as pi,useImperativeHandle as mi,useMemo as di,useRef as ci,useState as Ot}from"react";import{IMaskInput as ui,IMask as No}from"react-imask";import gi from"@mui/icons-material/esm/CalendarToday.js";import{styled as Jt}from"@mui/joy";import{FocusTrap as fi,ClickAwayListener as hi,Popper as Ci}from"@mui/base";var yi=Jt(Ci,{name:"DateRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),bi=Jt(R,{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})),Yt=([e,o])=>{let t=n=>{let i=`${n.getDate()}`,a=`${n.getMonth()+1}`,r=n.getFullYear();return Number(i)<10&&(i="0"+i),Number(a)<10&&(a="0"+a),[r,a,i].join("/")};return[t(e),o?t(o):""].join(" - ")},$t=e=>{let o=e.split(" - ")[0]||"",t=e.split(" - ")[1]||"",n=o.split("/"),i=t.split("/");return[new Date(Number(n[0]),Number(n[1])-1,Number(n[2])),new Date(Number(i[0]),Number(i[1])-1,Number(i[2]))]},xi=L.forwardRef(function(o,t){let{onChange:n,...i}=o;return L.createElement(ui,{...i,inputRef:t,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/`m/`d - Y/`m/`d",blocks:{d:{mask:No.MaskedRange,from:1,to:31,maxLength:2},m:{mask:No.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:No.MaskedRange,from:1900,to:9999}},format:Yt,parse:$t,autofix:"pad",overwrite:!0})}),So=si((e,o)=>{let{onChange:t,disabled:n,label:i,error:a,helperText:r,minDate:l,maxDate:s,disableFuture:d,disablePast:u,required:c,...C}=e,m=ci(null),[y,p]=Ot(e.value||""),[f,v]=Ot(null),T=!!f,D=di(()=>y?$t(y):void 0,[y]);pi(()=>{p(e.value||"")},[e.value]),mi(o,()=>m.current,[m.current]);let k=Vo(M=>{p(M.target.value),t?.(M)},[t]),g=Vo(M=>{v(f?null:M.currentTarget),m.current?.focus()},[f,v,m]),b=Vo(([M,q])=>{!M||!q||(m.current?.blur(),p(Yt([M,q])),v(null))},[p,v,m]),F=L.createElement(fi,{open:!0},L.createElement(L.Fragment,null,L.createElement(J,{...C,ref:o,size:"sm",value:y,onChange:k,disabled:n,required:c,placeholder:"YYYY/MM/DD - YYYY/MM/DD",slotProps:{input:{component:xi,ref:m}},sx:{fontFamily:"monospace"},endDecorator:L.createElement(O,{variant:"plain",onClick:g},L.createElement(gi,null))}),T&&L.createElement(hi,{onClickAway:()=>v(null)},L.createElement(yi,{id:"date-range-picker-popper",open:!0,anchorEl:f,placement:"bottom-end",onMouseDown:M=>M.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}]},L.createElement(bi,{tabIndex:-1,role:"presentation"},L.createElement(Q,{rangeSelection:!0,defaultValue:D,onChange:b,minDate:l?new Date(l):void 0,maxDate:s?new Date(s):void 0,disableFuture:d,disablePast:u}),L.createElement(_,{sx:{p:1}},L.createElement(P,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{p(""),v(null),m.current?.blur()}},"Clear")))))));return i?L.createElement(A,{required:c,disabled:n,error:a,size:"sm"},L.createElement(B,null,i),F,r&&L.createElement(I,null,r)):F});So.displayName="DateRangePicker";import{DialogContent as vi,styled as Di}from"@mui/joy";import{motion as ki}from"framer-motion";var Mi=ki(vi),Ti=Di(Mi)(({theme:e})=>({padding:e.spacing(0,3,2.5)})),Se=Ti;Se.displayName="DialogContent";var no=Se;import{DialogTitle as Pi,styled as wi}from"@mui/joy";import{motion as Ii}from"framer-motion";var Ai=Ii(Pi),Fi=wi(Ai)(({theme:e})=>({padding:e.spacing(2,3)})),Le=Fi;Le.displayName="DialogTitle";var ao=Le;import He from"react";import io from"react";import{Modal as Bi,ModalDialog as Vi,ModalClose as Ni,ModalOverflow as Si,styled as Rt}from"@mui/joy";import{motion as lo}from"framer-motion";var Li=lo(Bi),Lo=Li;Lo.displayName="Modal";var Ei=lo(Vi),Ut=Rt(Ei)({padding:0}),Ee=Ut;Ee.displayName="ModalDialog";var Hi=Rt(lo(Ni))(({theme:e})=>({top:e.spacing(1.5),right:e.spacing(3)})),so=Hi;so.displayName="ModalClose";var zi=lo(Si),Eo=zi;Eo.displayName="ModalOverflow";function Ho(e){let{title:o,children:t,...n}=e;return io.createElement(Ut,{...n},io.createElement(so,null),io.createElement(ao,null,o),io.createElement(no,null,t))}Ho.displayName="ModalFrame";import{styled as Oi}from"@mui/joy";var Ji=Oi(Ee)(({theme:e})=>({padding:0})),zo=He.forwardRef((e,o)=>{let{title:t,children:n,actions:i,...a}=e;return He.createElement(Ji,{ref:o,...a},He.createElement(ao,null,t),He.createElement(no,null,n),He.createElement(_,null,i))});zo.displayName="DialogFrame";import Yi from"react";import{Divider as $i}from"@mui/joy";import{motion as Ri}from"framer-motion";var Ui=Ri($i),ze=e=>Yi.createElement(Ui,{...e});ze.displayName="Divider";import qi from"react";import{Drawer as Wi}from"@mui/joy";import{motion as Gi}from"framer-motion";var _i=Gi(Wi),Oo=e=>{let{children:o,...t}=e;return qi.createElement(_i,{...t,slotProps:{...t.slotProps,content:{...t.slotProps?.content,sx:{bgcolor:"transparent",p:{md:3,sm:0},boxShadow:"none"}}}},o)};Oo.displayName="InsetDrawer";import w,{useCallback as po,useEffect as ji,useMemo as Zi,useRef as qt,useState as Jo}from"react";import{styled as K}from"@mui/joy";import Xi from"@mui/icons-material/esm/FileUploadRounded.js";import Qi from"@mui/icons-material/esm/UploadFileRounded.js";import Ki from"@mui/icons-material/esm/ClearRounded.js";import{combine as el}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/combine.js";import{dropTargetForExternal as ol,monitorForExternal as tl}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/adapter.js";import{containsFiles as Wt,getFiles as rl}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/file.js";import{preventUnhandled as Gt}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/prevent-unhandled.js";var nl=K("input")({width:"1px",height:"1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",position:"absolute"}),al=K(z,{name:"Uploader",slot:"PreviewRoot"})({}),il=K(De,{name:"Uploader",slot:"UploadCard"})(({theme:e})=>({padding:e.spacing(1.25),border:`1px solid ${e.palette.neutral.outlinedBorder}`})),ll=K(Qi,{name:"Uploader",slot:"UploadFileIcon"})(({theme:e})=>({color:e.palette.neutral[400],width:"32px",height:"32px"})),sl=K(Ki,{name:"Uploader",slot:"ClearIcon"})(({theme:e})=>({color:e.palette.neutral.plainColor,width:"18px",height:"18px"})),pl=["byte","kilobyte","megabyte","gigabyte","terabyte","petabyte"],Yo=e=>{let o=e==0?0:Math.floor(Math.log(e)/Math.log(1024)),t=e/Math.pow(1024,o),n=pl[o];return Intl.NumberFormat("en-us",{style:"unit",unit:n,unitDisplay:"narrow"}).format(t)},ml=e=>e.replace(/image\/\*/g,"any image file").replace(/video\/\*/g,"any video file").replace(/audio\/\*/g,"any audio file").replace(/\./,"").split(",").join(", "),dl=e=>{let{files:o,onDelete:t}=e;return w.createElement(al,{gap:.5},o.map(n=>w.createElement(il,{key:n.name,size:"sm",color:"neutral"},w.createElement(z,{direction:"row",alignItems:"center",gap:1},w.createElement(ll,null),w.createElement(z,{flex:"1"},w.createElement(N,{level:"body-sm",textColor:"common.black"},n.name),w.createElement(N,{level:"body-xs",fontWeight:"300",lineHeight:"1.33",textColor:"text.tertiary"},Yo(n.size))),w.createElement(O,{onClick:()=>t?.(n)},w.createElement(sl,null))))))},cl=K(z,{name:"Uploader",slot:"root"})(({theme:e})=>({gap:e.spacing(1)})),ul=K(R,{name:"Uploader",slot:"dropZone"})(({theme:e,state:o})=>({width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",padding:e.spacing(5,2.5),gap:e.spacing(2),cursor:"pointer",backgroundColor:["idle","potential"].includes(o)?e.palette.background.surface:e.palette.primary.outlinedHoverBg,border:o==="idle"?`1px solid ${e.palette.neutral.outlinedBorder}`:`1px solid ${e.palette.primary.outlinedBorder}`})),gl=K(Xi,{name:"Uploader",slot:"iconContainer"})(({theme:e})=>({color:e.palette.neutral.outlinedBorder,width:"32px",height:"32px"})),$o=w.memo(e=>{let{accept:o,maxCount:t,name:n,maxSize:i,onChange:a}=e,r=qt(null),l=qt(null),[s,d]=Jo([]),[u,c]=Jo("idle"),[C,m]=Jo(),y=Zi(()=>[o&&`accepted file format: ${ml(o)}`,i&&`maximum size: ${Yo(i)}`,t&&`up to ${t} files`].filter(D=>!!D).join(", "),[o,i,t]),p=po(D=>{try{i&&D.forEach(g=>{if(g.size>i)throw new Error(`File size exceeds the limit: ${Yo(i)}`)});let k=[...s,...D];if(t&&k.length>t)throw new Error(`File count exceeds the limit: ${t}`);a?.({target:{name:n,value:k}}),m(void 0),d(k)}catch(k){m(k.message)}},[s]);ji(()=>{let D=r.current;if(D)return el(ol({element:D,canDrop:Wt,onDragEnter:()=>c("over"),onDragLeave:()=>c("potential"),onDrop:async({source:k})=>{let g=await rl({source:k});p(g)}}),tl({canMonitor:Wt,onDragStart:()=>{c("potential"),Gt.start()},onDrop:()=>{c("idle"),Gt.stop()}}))});let f=po(D=>{let k=Array.from(D.target.files||[]);p(k)},[p]),v=po(D=>{d(k=>(a?.({target:{name:n,value:k.filter(g=>g!==D)}}),k.filter(g=>g!==D)))},[]),T=po(()=>{l.current?.click()},[]);return w.createElement(cl,null,(!t||t&&s.length!==t)&&w.createElement(A,{error:!!C},w.createElement(ul,{state:u,ref:r,onClick:T},w.createElement(z,{alignItems:"center",gap:.5},w.createElement(gl,null),w.createElement(z,{direction:"row",gap:.5},w.createElement(N,{level:"body-md",color:"primary"},"Click to Upload"),w.createElement(N,{level:"body-md",textColor:"text.primary"},"or drag file here")),y!==""&&w.createElement(N,{level:"body-xs",textColor:"text.secondary"},y.charAt(0).toUpperCase()+y.slice(1))),w.createElement(nl,{type:"file",onChange:f,multiple:!0,accept:o,ref:l}),C&&w.createElement(I,null,C))),s.length>0&&w.createElement(dl,{files:s,onDelete:v}))});$o.displayName="Uploader";import{Grid as fl}from"@mui/joy";import{motion as hl}from"framer-motion";var Cl=hl(fl),Ro=Cl;Ro.displayName="Grid";import X from"react";import yl from"react-markdown";import{Link as bl}from"@mui/joy";var Uo=e=>{let{children:o,color:t,textColor:n,defaultLevel:i="body-md",markdownOptions:a,...r}=e;return X.createElement(Y,{color:t,textColor:n,...r},X.createElement(yl,{...a,children:o,components:{h1:({children:l})=>X.createElement(Y,{color:t,textColor:n,level:"h1"},l),h2:({children:l})=>X.createElement(Y,{color:t,textColor:n,level:"h2"},l),h3:({children:l})=>X.createElement(Y,{color:t,textColor:n,level:"h3"},l),h4:({children:l})=>X.createElement(Y,{color:t,textColor:n,level:"h4"},l),p:({children:l})=>X.createElement(Y,{color:t,textColor:n,level:i},l),a:({children:l,href:s})=>X.createElement(bl,{href:s},l),hr:()=>X.createElement(ze,null),...a?.components}}))};Uo.displayName="Markdown";import E,{forwardRef as xl,useCallback as _t,useEffect as vl,useImperativeHandle as Dl,useRef as kl,useState as jt}from"react";import{IMaskInput as Ml,IMask as Zt}from"react-imask";import Tl from"@mui/icons-material/esm/CalendarToday.js";import{styled as Xt}from"@mui/joy";import{FocusTrap as Pl,ClickAwayListener as wl,Popper as Il}from"@mui/base";var Al=Xt(Il,{name:"MonthPicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Fl=Xt(R,{name:"MonthPicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),Qt=e=>{let o=`${e.getMonth()+1}`,t=e.getFullYear();return Number(o)<10&&(o="0"+o),[t,o].join("/")},qo=e=>(t=>{if(!/^\d\d\d\d\/(0[1-9]|1[012])(\/(0[1-9]|[23][0-9]))?$/.test(t))return t;let n=t.split("/"),i=new Date(Number(n[0]),Number(n[1])-1);return Qt(i)})(e),Kt=e=>e.split(" - ")[0]||"",Bl=E.forwardRef(function(o,t){let{onChange:n,...i}=o;return E.createElement(Ml,{...i,inputRef:t,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/m",blocks:{m:{mask:Zt.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Zt.MaskedRange,from:1900,to:9999}},format:qo,parse:Kt})}),er=xl((e,o)=>{let{onChange:t,disabled:n,label:i,error:a,helperText:r,minDate:l,maxDate:s,disableFuture:d,disablePast:u,required:c,...C}=e,m=kl(null),[y,p]=jt(e.value||""),[f,v]=jt(null),T=!!f;vl(()=>{p(e.value?qo(Kt(e.value)):"")},[e.value]),Dl(o,()=>m.current,[m.current]);let D=_t(b=>{console.log(b.target.value),p(b.target.value),t?.(b)},[]),k=_t(b=>{v(f?null:b.currentTarget),m.current?.focus()},[f,v,m]),g=E.createElement(Pl,{open:!0},E.createElement(E.Fragment,null,E.createElement(J,{...C,ref:m,size:"sm",value:y,onChange:D,placeholder:"YYYY/MM",disabled:n,required:c,slotProps:{input:{component:Bl,ref:m}},sx:{fontFamily:"monospace"},endDecorator:E.createElement(O,{variant:"plain",onClick:k},E.createElement(Tl,null))}),T&&E.createElement(wl,{onClickAway:()=>v(null)},E.createElement(Al,{id:"date-picker-popper",open:!0,anchorEl:f,placement:"bottom-end",onMouseDown:b=>b.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}]},E.createElement(Fl,{tabIndex:-1,role:"presentation"},E.createElement(Q,{view:"month",views:["month"],value:Number.isNaN(new Date(y).getTime())?void 0:[new Date(y),void 0],onChange:([b])=>{D({target:{name:e.name,value:qo(Qt(b))}}),v(null),m.current?.blur()},minDate:l?new Date(l):void 0,maxDate:s?new Date(s):void 0,disableFuture:d,disablePast:u}),E.createElement(_,{sx:{p:1}},E.createElement(P,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{D({target:{name:e.name,value:""}}),v(null),m.current?.blur()}},"Clear")))))));return i?E.createElement(A,{required:c,disabled:n,error:a,size:"sm"},E.createElement(B,null,i),g,r&&E.createElement(I,null,r)):g});import H,{forwardRef as Vl,useCallback as Wo,useEffect as Nl,useImperativeHandle as Sl,useMemo as Ll,useRef as El,useState as or}from"react";import{IMaskInput as Hl,IMask as tr}from"react-imask";import zl from"@mui/icons-material/esm/CalendarToday.js";import{styled as rr}from"@mui/joy";import{FocusTrap as Ol,ClickAwayListener as Jl,Popper as Yl}from"@mui/base";var $l=rr(Yl,{name:"MonthRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Rl=rr(R,{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})),Go=e=>{let o=`${e.getMonth()+1}`,t=e.getFullYear();return Number(o)<10&&(o="0"+o),[t,o].join("/")},_o=([e,o])=>{let t=n=>{if(!/^\d\d\d\d\/(0[1-9]|1[012])(\/(0[1-9]|[23][0-9]))?$/.test(n))return n;let i=n.split("/"),a=new Date(Number(i[0]),Number(i[1])-1);return Go(a)};return[t(e),t(o)].join(" - ")},jo=e=>{let o=e.split(" - ")[0]||"",t=e.split(" - ")[1]||"";return[o,t]},Ul=H.forwardRef(function(o,t){let{onChange:n,...i}=o;return H.createElement(Hl,{...i,inputRef:t,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/m - Y/m",blocks:{m:{mask:tr.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:tr.MaskedRange,from:1900,to:9999}},format:_o,parse:jo})}),Zo=Vl((e,o)=>{let{onChange:t,disabled:n,label:i,error:a,helperText:r,minDate:l,maxDate:s,disableFuture:d,disablePast:u,required:c,...C}=e,m=El(null),[y,p]=or(""),[f,v]=or(null),T=!!f,D=Ll(()=>y?jo(y).map(M=>new Date(M)):void 0,[y]);Nl(()=>{p(e.value?_o(jo(e.value)):"")},[e.value]),Sl(o,()=>m.current,[m.current]);let k=Wo(M=>{p(M.target.value),t?.(M)},[t]),g=Wo(M=>{v(f?null:M.currentTarget),m.current?.focus()},[f,v,m]),b=Wo(([M,q])=>{!M||!q||(p(_o([Go(M),Go(q)])),v(null),m.current?.blur())},[p,v,m]),F=H.createElement(Ol,{open:!0},H.createElement(H.Fragment,null,H.createElement(J,{...C,ref:o,size:"sm",value:y,onChange:k,disabled:n,required:c,placeholder:"YYYY/MM - YYYY/MM",slotProps:{input:{component:Ul,ref:m}},sx:{fontFamily:"monospace"},endDecorator:H.createElement(O,{variant:"plain",onClick:g},H.createElement(zl,null))}),T&&H.createElement(Jl,{onClickAway:()=>v(null)},H.createElement($l,{id:"date-range-picker-popper",open:!0,anchorEl:f,placement:"bottom-end",onMouseDown:M=>M.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}]},H.createElement(Rl,{tabIndex:-1,role:"presentation"},H.createElement(Q,{view:"month",views:["month"],rangeSelection:!0,defaultValue:D,onChange:b,minDate:l?new Date(l):void 0,maxDate:s?new Date(s):void 0,disableFuture:d,disablePast:u}),H.createElement(_,{sx:{p:1}},H.createElement(P,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{p(""),v(null),m.current?.blur()}},"Clear")))))));return i?H.createElement(A,{required:c,disabled:n,error:a,size:"sm"},H.createElement(B,null,i),F,r&&H.createElement(I,null,r)):F});Zo.displayName="MonthRangePicker";import{Radio as ql,RadioGroup as Wl}from"@mui/joy";import{motion as nr}from"framer-motion";var Gl=nr(ql),Oe=Gl;Oe.displayName="Radio";var _l=nr(Wl),Je=_l;Je.displayName="RadioGroup";import ar from"react";function Xo(e){let{items:o,...t}=e;return ar.createElement(Je,{...t},o.map(n=>ar.createElement(Oe,{key:`${n.value}`,value:n.value,label:n.label})))}Xo.displayName="RadioList";import ir from"react";import{Switch as jl,styled as Zl,switchClasses as Xl}from"@mui/joy";import{motion as lr}from"framer-motion";var Ql=lr(jl),Kl=Zl(lr.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)",[`&.${Xl.checked}`]:{left:"unset",right:"var(--Switch-thumbOffset)"}}),es=e=>ir.createElement(Kl,{...e,layout:!0,transition:os}),os={type:"spring",stiffness:700,damping:30},Qo=e=>ir.createElement(Ql,{...e,slots:{thumb:es,...e.slots}});Qo.displayName="Switch";import{Tabs as ts,Tab as rs,TabList as ns,TabPanel as as,styled as is,tabClasses as ls}from"@mui/joy";import{motion as mo}from"framer-motion";var ss=mo(ts),Ko=ss;Ko.displayName="Tabs";var ps=is(mo(rs))(({theme:e})=>({[`&:not(.${ls.selected})`]:{color:e.palette.neutral[700]}})),et=ps;et.displayName="Tab";var ms=mo(ns),ot=ms;ot.displayName="TabList";var ds=mo(as),tt=ds;tt.displayName="TabPanel";import co from"react";import{CssBaseline as cs,CssVarsProvider as us,checkboxClasses as gs,extendTheme as fs}from"@mui/joy";var hs=fs({cssVarPrefix:"ceed",components:{JoyTable:{defaultProps:{size:"sm",borderAxis:"bothBetween"},styleOverrides:{root:({theme:e})=>({"--TableRow-stripeBackground":e.palette.background.level1,"--TableCell-selectedBackground":e.palette.background.level2,"--TableRow-hoverBackground":e.palette.background.level3,"& tbody tr[aria-checked=false] th":{"--TableCell-headBackground":"transparent"},"& tbody tr[aria-checked=true]:hover th":{"--TableCell-headBackground":"var(--TableRow-hoverBackground)"},"& tbody tr[aria-checked=true]:not(:hover) th":{"--TableCell-headBackground":"var(--TableCell-selectedBackground)"},"& tbody tr[aria-checked=true]:not(:hover) td":{"--TableCell-dataBackground":"var(--TableCell-selectedBackground)"},[`& .${gs.root}`]:{verticalAlign:"middle"}})}},JoyTooltip:{defaultProps:{size:"sm",placement:"top"}}}});function rt(e){return co.createElement(co.Fragment,null,co.createElement(us,{theme:hs},co.createElement(cs,null),e.children))}rt.displayName="ThemeProvider";import Cs from"react";import{Tooltip as ys}from"@mui/joy";import{motion as bs}from"framer-motion";var xs=bs(ys),nt=e=>Cs.createElement(xs,{...e});nt.displayName="Tooltip";export{Ue as Accordion,Re as AccordionDetails,$e as AccordionSummary,go as Accordions,fo as Alert,BC as AspectRatio,We as Autocomplete,DC as AutocompleteListbox,kC as AutocompleteOption,wC as Avatar,AC as AvatarGroup,NC as Badge,ce as Box,yo as Breadcrumbs,Ce as Button,xe as Calendar,De as Card,ko as CardActions,vo as CardContent,Do as CardCover,Mo as CardOverflow,ke as Checkbox,Te as Chip,$C as CircularProgress,To as Container,Qe as CurrencyInput,Bo as DataTable,Ke as DatePicker,So as DateRangePicker,Fe as DialogActions,Se as DialogContent,zo as DialogFrame,Le as DialogTitle,ze as Divider,UC as Drawer,he as Dropdown,se as FormControl,me as FormHelperText,pe as FormLabel,Ro as Grid,ye as IconButton,we as Input,Oo as InsetDrawer,WC as LinearProgress,sy as Link,_C as List,ZC as ListDivider,QC as ListItem,ey as ListItemButton,ty as ListItemContent,ny as ListItemDecorator,iy as ListSubheader,Uo as Markdown,ue as Menu,ge as MenuButton,fe as MenuItem,Lo as Modal,so as ModalClose,Ee as ModalDialog,Ho as ModalFrame,Eo as ModalOverflow,er as MonthPicker,Zo as MonthRangePicker,oo as Option,Oe as Radio,Je as RadioGroup,Xo as RadioList,Ne as Select,Ie as Sheet,by as Skeleton,my as Slider,le as Stack,cy as Step,gy as StepButton,hy as StepIndicator,Cy as Stepper,Qo as Switch,et as Tab,ot as TabList,tt as TabPanel,Ae as Table,wo as TableBody,Po as TableHead,Ko as Tabs,Be as Textarea,rt as ThemeProvider,nt as Tooltip,Y as Typography,$o as Uploader,yC as accordionClasses,bC as accordionDetailsClasses,vC as accordionSummaryClasses,xC as accordionsClasses,Hh as alertClasses,VC as aspectRatioClasses,MC as autocompleteClasses,TC as autocompleteListboxClasses,PC as autocompleteOptionClasses,IC as avatarClasses,FC as avatarGroupClasses,SC as badgeClasses,zh as boxClasses,LC as breadcrumbsClasses,Oh as buttonClasses,HC as cardActionsClasses,EC as cardClasses,zC as cardContentClasses,OC as cardCoverClasses,JC as cardOverflowClasses,Jh as checkboxClasses,YC as chipClasses,RC as circularProgressClasses,uC as dialogActionsClasses,cC as dialogContentClasses,dC as dialogTitleClasses,Yh as dividerClasses,qC as drawerClasses,oC as formControlClasses,rC as formHelperTextClasses,tC as formLabelClasses,nC as gridClasses,$h as iconButtonClasses,Rh as inputClasses,GC as linearProgressClasses,py as linkClasses,jC as listClasses,XC as listDividerClasses,oy as listItemButtonClasses,KC as listItemClasses,ry as listItemContentClasses,ay as listItemDecoratorClasses,ly as listSubheaderClasses,qh as menuButtonClasses,Uh as menuClasses,Wh as menuItemClasses,lC as modalClasses,sC as modalCloseClasses,pC as modalDialogClasses,mC as modalOverflowClasses,Gh as optionClasses,_h as radioClasses,jh as radioGroupClasses,Zh as selectClasses,iC as sheetClasses,xy as skeletonClasses,dy as sliderClasses,aC as stackClasses,fy as stepButtonClasses,uy as stepClasses,yy as stepperClasses,Xh as switchClasses,hC as tabListClasses,CC as tabPanelClasses,Qh as tableClasses,fC as tabsClasses,Kh as textareaClasses,gC as tooltipClasses,eC as typographyClasses,Lh as useColorScheme,Sh as useTheme,Eh as useThemeProps};
1
+ import{useTheme as nh,useColorScheme as ah,useThemeProps as ih,alertClasses as lh,boxClasses as sh,buttonClasses as mh,checkboxClasses as ph,dividerClasses as dh,iconButtonClasses as ch,inputClasses as uh,menuClasses as gh,menuButtonClasses as fh,menuItemClasses as hh,optionClasses as bh,radioClasses as Ch,radioGroupClasses as yh,selectClasses as xh,switchClasses as vh,tableClasses as Mh,textareaClasses as kh,typographyClasses as Dh,formControlClasses as Ph,formLabelClasses as Th,formHelperTextClasses as wh,gridClasses as Ih,stackClasses as Ah,sheetClasses as Fh,modalClasses as Bh,modalCloseClasses as Nh,modalDialogClasses as Lh,modalOverflowClasses as Sh,dialogTitleClasses as Hh,dialogContentClasses as Eh,dialogActionsClasses as zh,tooltipClasses as Oh,tabsClasses as Vh,tabListClasses as Jh,tabPanelClasses as Yh,accordionClasses as $h,accordionDetailsClasses as qh,accordionGroupClasses as Wh,accordionSummaryClasses as Uh,AutocompleteListbox as Gh,AutocompleteOption as _h,autocompleteClasses as Rh,autocompleteListboxClasses as jh,autocompleteOptionClasses as Zh,Avatar as Xh,avatarClasses as Qh,AvatarGroup as Kh,avatarGroupClasses as eb,AspectRatio as ob,aspectRatioClasses as tb,Badge as rb,badgeClasses as nb,breadcrumbsClasses as ab,cardClasses as ib,cardActionsClasses as lb,cardContentClasses as sb,cardCoverClasses as mb,cardOverflowClasses as pb,chipClasses as db,CircularProgress as cb,circularProgressClasses as ub,Drawer as gb,drawerClasses as fb,LinearProgress as hb,linearProgressClasses as bb,List as Cb,listClasses as yb,ListDivider as xb,listDividerClasses as vb,ListItem as Mb,listItemClasses as kb,ListItemButton as Db,listItemButtonClasses as Pb,ListItemContent as Tb,listItemContentClasses as wb,ListItemDecorator as Ib,listItemDecoratorClasses as Ab,ListSubheader as Fb,listSubheaderClasses as Bb,Link as Nb,linkClasses as Lb,Slider as Sb,sliderClasses as Hb,Step as Eb,stepClasses as zb,StepButton as Ob,stepButtonClasses as Vb,StepIndicator as Jb,Stepper as Yb,stepperClasses as $b,Skeleton as qb,skeletonClasses as Wb}from"@mui/joy";import le from"react";import{AccordionGroup as ir,Accordion as lr,AccordionSummary as sr,AccordionDetails as mr}from"@mui/joy";import{motion as Ve}from"framer-motion";var pr=Ve(sr),Je=pr;Je.displayName="AccordionSummary";var dr=Ve(mr),Ye=dr;Ye.displayName="AccordionDetails";var cr=Ve(lr);function $e(e){let{summary:o,details:t,variant:n,color:i,...a}=e,r=n==="solid"?"solid":void 0;return le.createElement(cr,{variant:r,color:i,...a},le.createElement(Je,{variant:r,color:i},o),le.createElement(Ye,{variant:r,color:i},t))}$e.displayName="Accordion";var ur=Ve(ir);function io(e){let{variant:o,color:t,items:n,...i}=e;return le.createElement(ur,{variant:o,color:t,...i},n.map((a,r)=>le.createElement($e,{key:r,summary:a.summary,details:a.details,index:r,variant:o,color:t})))}io.displayName="Accordions";import qe from"react";import{Alert as vr,styled as Mr}from"@mui/joy";import{motion as kr}from"framer-motion";import gr from"react";import{Typography as fr}from"@mui/joy";import{motion as hr}from"framer-motion";var br=hr(fr),$=e=>gr.createElement(br,{...e});$.displayName="Typography";var Y=$;import{Stack as Cr}from"@mui/joy";import{motion as yr}from"framer-motion";var xr=yr(Cr),se=xr;se.displayName="Stack";var J=se;var Dr=Mr(kr(vr))({alignItems:"flex-start",fontWeight:"unset"});function lo(e){let{title:o,content:t,actions:n,color:i="primary",...a}=e,r=e.invertedColors||e.variant==="solid";return qe.createElement(Dr,{...a,color:i,endDecorator:n,invertedColors:r},qe.createElement(J,null,o&&qe.createElement(Y,{level:"title-sm",color:i},o),qe.createElement(Y,{level:"body-sm",color:i},t)))}lo.displayName="Alert";import S,{useCallback as Hr,useEffect as Er,useMemo as ce,useRef as zr,useState as Or}from"react";import{Autocomplete as Vr,AutocompleteOption as Jr,ListSubheader as Yr,AutocompleteListbox as $r,ListItemDecorator as it,CircularProgress as qr,styled as Wr}from"@mui/joy";import{useVirtualizer as Ur}from"@tanstack/react-virtual";import{Popper as Gr}from"@mui/base";import{FormControl as Pr,styled as Tr}from"@mui/joy";import{motion as wr}from"framer-motion";var Ir=Tr(wr(Pr))({width:"100%"}),me=Ir;me.displayName="FormControl";var B=me;import{FormLabel as Ar}from"@mui/joy";import{motion as Fr}from"framer-motion";var Br=Fr(Ar),pe=Br;pe.displayName="FormLabel";var N=pe;import{FormHelperText as Nr}from"@mui/joy";import{motion as Lr}from"framer-motion";var Sr=Lr(Nr),de=Sr;de.displayName="FormHelperText";var T=de;var _r=Wr(Gr,{name:"Autocomplete",slot:"Popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Rr=S.forwardRef((e,o)=>{let{anchorEl:t,open:n,modifiers:i,children:a,ownerState:{loading:r,size:l="md"},...m}=e,u=zr(null),g=a[0].every(h=>h.hasOwnProperty("group")),d=r?[a[1]]:a[0].length===0?[a[2]]:g?a[0].flatMap(h=>[S.createElement(Yr,{key:h.key,component:"li"},h.group),...h.children]):a[0],y=Ur({count:d.length,estimateSize:()=>36,getScrollElement:()=>u.current,overscan:5}),s=y.getVirtualItems();return Er(()=>{n&&y.measure()},[n]),S.createElement(_r,{ref:o,anchorEl:t,open:n,modifiers:i},S.createElement($r,{...m},S.createElement("div",{ref:u,style:{overflow:"auto"}},S.createElement("div",{style:{height:`${y.getTotalSize()}px`,position:"relative"}},s.map(({index:h,size:p,start:c})=>S.cloneElement(d[h],{style:{position:"absolute",top:0,left:0,width:"100%",fontSize:`var(--ceed-fontSize-${l})`,height:`${p}px`,transform:`translateY(${c}px)`},children:S.createElement("div",{style:{textOverflow:"ellipsis",textWrap:"nowrap",overflow:"hidden"}},d[h].props.children)}))))))});function lt(e){let{label:o,error:t,helperText:n,color:i,size:a,disabled:r,required:l,onChange:m,onChangeComplete:u,...g}=e,[d,y]=Or(e.value||e.defaultValue),s=ce(()=>e.options.map(f=>typeof f!="object"?{value:f,label:f}:f),[e.options]),h=ce(()=>new Set(s.map(f=>f.value)),[e.options]),p=ce(()=>e.loading?{value:"",label:"",startDecorator:S.createElement(qr,{size:"sm",color:"neutral",variant:"plain",thickness:3})}:typeof d=="string"?s.find(f=>f.value===d)??d:d,[d,e.options,e.loading]),c=Hr(f=>S.isValidElement(f)&&!e.loading?S.cloneElement(f,{size:a}):f,[a,e.loading]),v=ce(()=>c(p?.startDecorator||e.startDecorator),[p,c]),D=ce(()=>c(p?.endDecorator||e.endDecorator),[p,c]),I=S.createElement(Vr,{...g,required:l,onChange:(f,b)=>{y(b);let F=b;m?.({...f,target:{...f.target,value:F?.value}}),h.has(F.value)&&u?.({...f,target:{...f.target,value:F?.value}})},color:i,value:p,options:s,size:a,disabled:r,startDecorator:v,endDecorator:D,getOptionLabel:f=>`${f.value??""}`,slots:{listbox:Rr},renderOption:(f,b)=>S.createElement(Jr,{...f},b.startDecorator&&S.createElement(it,{sx:{marginInlineEnd:"var(--Input-gap)"}},c(b.startDecorator)),c(b.label),b.endDecorator&&S.createElement(it,{sx:{marginInlineStart:"var(--Input-gap)"}},c(b.endDecorator))),renderGroup:f=>f});return o?S.createElement(B,{required:l,color:i,size:a,error:t,disabled:r},S.createElement(N,null,o),I,n&&S.createElement(T,null,n)):I}import{Box as jr}from"@mui/joy";import{motion as Zr}from"framer-motion";var Xr=Zr(jr),ue=Xr;ue.displayName="Box";var We=ue;import q from"react";import{Breadcrumbs as pt,Link as sn}from"@mui/joy";import so from"react";import{Menu as Qr,MenuButton as Kr,MenuItem as en}from"@mui/joy";import{motion as mo}from"framer-motion";var on=mo(Qr),ge=e=>so.createElement(on,{...e});ge.displayName="Menu";var tn=mo(Kr),fe=e=>so.createElement(tn,{...e});fe.displayName="MenuButton";var rn=mo(en),he=e=>so.createElement(rn,{...e});he.displayName="MenuItem";var st=ge;import{Dropdown as nn}from"@mui/joy";import{motion as an}from"framer-motion";var ln=an(nn),be=ln;be.displayName="Dropdown";var mt=be;function po(e){let{crumbs:o,size:t,startCrumbCount:n=1,endCrumbCount:i=3,slots:{link:a,...r}={link:sn},slotProps:{link:l,...m}={link:{color:"neutral"}},collapsed:u=!0,...g}=e,d=c=>c.type==="link"&&a?q.createElement(a,{to:c.linkHref,href:c.linkHref,...l},c.label):q.createElement(Y,null,c.label);if(!u)return q.createElement(pt,{size:t,slots:r,slotProps:m,...g},o.map(c=>q.createElement(d,{...c})));let y=Math.max(1,i),s=o.slice(0,n).map(c=>q.createElement(d,{...c})),h=(n+y>o.length?o.slice(n):o.slice(-y)).map(c=>q.createElement(d,{...c})),p=o.slice(n,-y).map(c=>q.createElement(he,null,q.createElement(d,{...c})));return q.createElement(pt,{size:t,slots:r,slotProps:m,...g},s,p.length&&q.createElement(mt,null,q.createElement(fe,{size:t,variant:"plain"},"..."),q.createElement(st,{size:t},p)),h)}po.displayName="Breadcrumbs";import mn,{forwardRef as pn}from"react";import{Button as dn}from"@mui/joy";import{motion as cn}from"framer-motion";var un=cn(dn),Ce=pn((e,o)=>mn.createElement(un,{ref:o,...e}));Ce.displayName="Button";var w=Ce;import x,{Fragment as xe,forwardRef as Mn,useMemo as Ct}from"react";import{styled as U}from"@mui/joy";import kn from"@mui/icons-material/esm/ChevronLeft.js";import Dn from"@mui/icons-material/esm/ChevronRight.js";import{AnimatePresence as yt,motion as Pn}from"framer-motion";var dt=e=>{let o=[],t=new Date(e.getFullYear(),e.getMonth(),1),n=new Date(e.getFullYear(),e.getMonth()+1,0),i=Math.ceil((t.getDay()+1)/7),a=Math.ceil((n.getDate()+t.getDay())/7),r=1;for(let l=1;l<=a;l++){let m=[];for(let u=1;u<=7;u++)l===i&&u<t.getDay()+1||r>n.getDate()?m.push(void 0):(m.push(r),r++);o.push(m)}return o},ct=(e,o)=>e.toLocaleString(o,{year:"numeric"}),co=(e,o)=>e.toLocaleString(o,{year:"numeric",month:"long"}),ut=(e,o)=>new Date(0,e).toLocaleString(o,{month:"short"}),gt=e=>{let o=new Date().getDay(),t=new Date;return t.setDate(t.getDate()-o),Array.from({length:7}).map(()=>{let n=t.toLocaleString(e,{weekday:"short"});return t.setDate(t.getDate()+1),n})},ft=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()},uo=(e,o)=>{let t=new Date(e),n=new Date(o);return t.setHours(0,0,0,0),n.setHours(0,0,0,0),t.getTime()===n.getTime()},Z=(e,o,t)=>{let n=new Date(t);n.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 n>=i&&n<=a},Ue=(e,o)=>e.getFullYear()===o.getFullYear()&&e.getMonth()===o.getMonth();import gn from"react";import{IconButton as fn}from"@mui/joy";import{motion as hn}from"framer-motion";var bn=hn(fn),ye=e=>gn.createElement(bn,{...e});ye.displayName="IconButton";var V=ye;import{useCallback as Cn,useMemo as yn,useState as Ge}from"react";import{useThemeProps as xn}from"@mui/joy";var vn=(e,o)=>o.includes(e)?e:o[0],ht=e=>{let[o,t]=Ge(()=>vn(e.view||"day",e.views||["day","month"])),[n,i]=Ge(e.defaultValue),[a,r]=Ge(()=>{let p=new Date;return p.setDate(1),p.setHours(0,0,0,0),e.value?.[0]||e.defaultValue?.[0]||p}),[[l,m],u]=Ge([0,0]),g=e.view??o,d=p=>{u([l+p,p])},y=Cn(p=>{r(p),g==="month"?a.getFullYear()!==p.getFullYear()&&d(p>a?1:-1):d(p>a?1:-1),e.onMonthChange?.(p)},[e.onMonthChange,a,g]),s=xn({props:{locale:"default",views:["day","month"],view:g,value:e.value??n,...e,onChange:e.value?e.onChange:p=>{i(p),e.onChange?.(p)},onMonthChange:y,onViewChange:()=>{let p=g==="month"?"day":"month";!(!e.views||e.views.includes(p))||e.view===p||(e.onViewChange?e.onViewChange(p):t(p))}},name:"Calendar"}),h=yn(()=>({...s,viewMonth:a,direction:m}),[s,a,m]);return[s,h]};import{useCallback as ne,useState as bt}from"react";var _e=e=>{let[o,t]=bt(null),[n,i]=bt(null);return{calendarTitle:e.view==="month"?ct(e.viewMonth,e.locale||"default"):co(e.viewMonth,e.locale||"default"),onPrev:ne(()=>{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:ne(()=>{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:ne(a=>{let r=new Date(e.viewMonth||new Date);r.setHours(0,0,0,0),r.setDate(a);let l=e.rangeSelection&&e.value&&e.value[0]&&(o&&Z(e.value[0],o,r)||e.value[1]&&Z(e.value[0],e.value[1],r));return{"aria-label":r.toLocaleDateString(),"aria-current":l?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,o]),getMonthCellProps:ne(a=>{let r=new Date(e.viewMonth||new Date);r.setDate(1),r.setHours(0,0,0,0),r.setMonth(a);let m=!e.views?.find(u=>u==="day")&&e.rangeSelection&&e.value&&e.value[0]&&(n&&Z(e.value[0],n,r)||e.value[1]&&Z(e.value[0],e.value[1],r));return{"aria-label":r.toLocaleDateString(),"aria-current":m?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,n]),getPickerDayProps:ne(a=>{let r=new Date(e.viewMonth||new Date);r.setHours(0,0,0,0),r.setDate(a);let l=!!e.value&&(uo(r,e.value[0])||e.value[1]&&uo(r,e.value[1])),m=e.rangeSelection&&e.value&&e.value[0]&&(o&&Z(e.value[0],o,r)||e.value[1]&&Z(e.value[0],e.value[1],r)),u=()=>{e.rangeSelection?e.value?e.value[0]&&!e.value[1]?e.onChange?.([new Date(Math.min(e.value[0].getTime(),r.getTime())),new Date(Math.max(e.value[0].getTime(),r.getTime()))]):e.onChange?.([r,void 0]):e.onChange?.([r,void 0]):e.onChange?.([r,void 0]),t(null)};return{isToday:ft(r),isSelected:l,onClick:u,onMouseEnter:e.rangeSelection&&e.value?.[0]&&!e.value?.[1]?()=>t(r):void 0,disabled:e.minDate&&r<e.minDate||e.maxDate&&r>e.maxDate||e.disableFuture&&r>new Date||e.disablePast&&r<(()=>{let g=new Date;return g.setHours(0,0,0,0),g})(),tabIndex:-1,"aria-label":r.toLocaleDateString(),"aria-selected":l?"true":void 0,"aria-current":m?"date":void 0}},[e.onChange,e.value,e.viewMonth,e.rangeSelection,e.minDate,e.maxDate,e.disableFuture,e.disablePast,o]),getPickerMonthProps:ne(a=>{let r=new Date(e.viewMonth||new Date);r.setDate(1),r.setHours(0,0,0,0),r.setMonth(a);let l=!e.views?.find(y=>y==="day"),m=l&&e.rangeSelection,u=!!e.value&&(Ue(r,e.value[0])||e.value[1]&&Ue(r,e.value[1])),g=m&&e.value&&e.value[0]&&(n&&Z(e.value[0],n,r)||e.value[1]&&Z(e.value[0],e.value[1],r)),d=()=>{m?e.value?e.value[0]&&!e.value[1]?e.onChange?.([new Date(Math.min(e.value[0].getTime(),r.getTime())),new Date(Math.max(e.value[0].getTime(),r.getTime()))]):e.onChange?.([r,void 0]):e.onChange?.([r,void 0]):l?e.onChange?.([r,void 0]):(e.onViewChange?.("day"),e.onMonthChange?.(r)),i(null)};return{isSelected:u,onMouseEnter:m&&e.value?.[0]&&!e.value?.[1]?()=>i(r):void 0,disabled:e.minDate&&(()=>{let y=new Date(r);return y.setMonth(y.getMonth()+1),y.setDate(0),y<e.minDate})()||e.maxDate&&(()=>{let y=new Date(r);return y.setDate(0),y>e.maxDate})()||e.disableFuture&&r>new Date||e.disablePast&&r<new Date&&!Ue(r,new Date),onClick:d,tabIndex:-1,"aria-label":co(r,e.locale||"default"),"aria-selected":u?"true":void 0,"aria-current":g?"date":void 0}},[e.onMonthChange,e.onViewChange,e.onChange,e.viewMonth,e.locale,e.value,e.minDate,e.maxDate,e.disableFuture,e.disablePast,n])}};var Tn=U("div",{name:"Calendar",slot:"root"})({maxWidth:"264px"}),wn=U("div",{name:"Calendar",slot:"calendarHeader"})(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",padding:e.spacing(2)})),xt=U("div",{name:"Calendar",slot:"viewContainer"})(({theme:e,calendarType:o})=>({paddingLeft:e.spacing(2),paddingRight:e.spacing(2),position:"relative",overflow:"hidden",minHeight:o==="datePicker"?"250px":"unset"})),vt=U(Pn.table,{name:"Calendar",slot:"viewTable"})(({theme:e})=>({borderSpacing:0,"& td, & th":{padding:0},"& th":{paddingTop:e.spacing(2),paddingBottom:e.spacing(2)}})),In=U("thead",{name:"Calendar",slot:"weekHeaderContainer"})({}),An=U("tbody",{name:"Calendar",slot:"dayPickerContainer"})({}),Fn=U(w,{name:"Calendar",slot:"switchViewButton"})(({ownerState:e})=>[e.view==="month"&&{pointerEvents:"none"}]),Bn=U("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}}})),Nn=U("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}}})),Ln=U(w,{name:"Calendar",slot:"month"})(({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}]),Sn=U(w,{name:"Calendar",slot:"day"})(({theme:e,isToday:o,isSelected:t,disabled:n})=>[{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}},n&&{color:e.palette.neutral.solidDisabledColor,backgroundColor:e.palette.neutral.solidDisabledBg}]),Mt={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})},Re=1e4,kt=(e,o)=>Math.abs(e)*o,Hn=e=>{let{ownerState:o}=e,{getPickerDayProps:t,getDayCellProps:n}=_e(o),i=Ct(()=>dt(o.viewMonth),[o.viewMonth]),a=Ct(()=>gt(o.locale||"default"),[o.locale]);return x.createElement(xt,{calendarType:"datePicker"},x.createElement(yt,{initial:!1,custom:o.direction},x.createElement(vt,{key:`${o.viewMonth.toString()}_${o.direction}`,custom:o.direction,variants:Mt,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:(r,{offset:l,velocity:m})=>{let u=kt(l.x,m.x);if(u<-Re){let g=new Date(o.viewMonth||new Date);g.setMonth(g.getMonth()+1),o.onMonthChange?.(g)}else if(u>Re){let g=new Date(o.viewMonth||new Date);g.setMonth(g.getMonth()-1),o.onMonthChange?.(g)}}},x.createElement(In,null,x.createElement("tr",null,a.map((r,l)=>x.createElement(x.Fragment,null,x.createElement("th",null,x.createElement(Y,{level:"body-xs",textAlign:"center"},r)),l<6&&x.createElement("th",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"}))))),x.createElement(An,null,i.map((r,l)=>x.createElement(xe,{key:`${o.viewMonth}_${l}`},x.createElement("tr",null,r.map((m,u)=>m?x.createElement(xe,{key:u},x.createElement(Bn,{...n(m)},x.createElement(Sn,{size:"sm",variant:"plain",color:"neutral",...t(m)},m)),u<6&&x.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})):x.createElement(xe,{key:u},x.createElement("td",null),u<6&&x.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})))),l<i.length-1&&x.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},x.createElement("td",{colSpan:13,style:{height:4}}))))))))},En=e=>{let{ownerState:o}=e,{getPickerMonthProps:t,getMonthCellProps:n}=_e(o),i=Array.from({length:12},(r,l)=>l).reduce((r,l)=>(r[r.length-1].length===4&&r.push([]),r[r.length-1].push(l),r),[[]]),a=!o.views?.find(r=>r==="day");return x.createElement(xt,{calendarType:a?"monthPicker":"datePicker"},x.createElement(yt,{initial:!1,custom:o.direction},x.createElement(vt,{key:`${o.viewMonth.getFullYear()}_${o.direction}`,custom:o.direction,variants:Mt,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:(r,{offset:l,velocity:m})=>{let u=kt(l.x,m.x);if(u<-Re){let g=new Date(o.viewMonth||new Date);g.setMonth(g.getMonth()+1),o.onMonthChange?.(g)}else if(u>Re){let g=new Date(o.viewMonth||new Date);g.setMonth(g.getMonth()-1),o.onMonthChange?.(g)}}},x.createElement("tbody",null,i.map((r,l)=>x.createElement(xe,{key:l},x.createElement("tr",null,r.map((m,u)=>x.createElement(xe,{key:m},x.createElement(Nn,{...n(m)},x.createElement(Ln,{size:"sm",variant:"plain",color:"neutral",...t(m)},ut(m,o.locale))),u<3&&x.createElement("td",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"})))),l<i.length-1&&x.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},x.createElement("td",{colSpan:7,style:{height:4}}))))))))},ve=Mn((e,o)=>{let[t,n]=ht(e),{value:i,defaultValue:a,onChange:r,locale:l,onViewChange:m,onMonthChange:u,view:g,views:d,rangeSelection:y,...s}=t,{calendarTitle:h,onPrev:p,onNext:c}=_e(n);return x.createElement(Tn,{ref:o,...s},x.createElement(wn,null,x.createElement(V,{size:"sm",onClick:p},x.createElement(kn,null)),x.createElement(Fn,{ownerState:n,variant:"plain",color:"neutral",onClick:m},h),x.createElement(V,{size:"sm",onClick:c},x.createElement(Dn,null))),g==="day"&&x.createElement(Hn,{ownerState:n}),g==="month"&&x.createElement(En,{ownerState:n}))});ve.displayName="Calendar";var K=ve;import{Card as zn,CardContent as On,CardCover as Vn,CardActions as Jn,CardOverflow as Yn}from"@mui/joy";import{motion as Me}from"framer-motion";var $n=Me(zn),ke=$n;ke.displayName="Card";var qn=Me(On),go=qn;go.displayName="CardContent";var Wn=Me(Vn),fo=Wn;fo.displayName="CardCover";var Un=Me(Jn),ho=Un;ho.displayName="CardActions";var Gn=Me(Yn),bo=Gn;bo.displayName="CardOverflow";import _n from"react";import{Checkbox as Rn}from"@mui/joy";import{motion as jn}from"framer-motion";var Zn=jn(Rn),De=e=>_n.createElement(Zn,{...e});De.displayName="Checkbox";var Pe=De;import{Chip as Xn}from"@mui/joy";import{motion as Qn}from"framer-motion";var Kn=Qn(Xn),Co=Kn;Co.displayName="Chip";import{styled as ea}from"@mui/joy";import oa,{forwardRef as ta}from"react";var ra=ea("div",{name:"Container",slot:"root",shouldForwardProp:e=>e!=="maxWidth"})(({theme:e,maxWidth:o="lg"})=>({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block",paddingLeft:e.spacing(4),paddingRight:e.spacing(4),...o==="sm"&&{[e.breakpoints.up("xs")]:{maxWidth:e.breakpoints.values.sm}},...o==="md"&&{[e.breakpoints.up("sm")]:{maxWidth:e.breakpoints.values.md}},...o==="lg"&&{[e.breakpoints.up("md")]:{maxWidth:e.breakpoints.values.lg}},...o==="xl"&&{[e.breakpoints.up("lg")]:{maxWidth:e.breakpoints.values.xl}}})),yo=ta(function(o,t){return oa.createElement(ra,{ref:t,...o})});yo.displayName="Container";import X,{useCallback as la,useMemo as sa,useState as Tt}from"react";import{IntlMessageFormat as ma}from"intl-messageformat";import{NumericFormat as pa}from"react-number-format";import da from"@mui/icons-material/esm/InfoOutlined.js";import Te from"react";import{Input as na}from"@mui/joy";import{motion as aa}from"framer-motion";var Dt=aa(na),we=e=>{let{label:o,helperText:t,error:n,style:i,size:a,color:r,disabled:l,required:m,...u}=e;return o?Te.createElement(B,{required:m,color:r,size:a,error:n,disabled:l},Te.createElement(N,null,o),Te.createElement(Dt,{...u}),t&&Te.createElement(T,null,t)):Te.createElement(Dt,{required:m,color:r,size:a,disabled:l,...u})};we.displayName="Input";var R=we;import ia from"intl-messageformat";var Pt=(e="usd")=>{let[o,t,n]=new ia(`{amount, number, ::currency/${e} unit-width-narrow}`).format({amount:1e3}).toString().replace(/\d/g,"").split("");return{symbol:`${o} `,thousandSeparator:t,decimalSeparator:n,placeholder:n?`${o} 0${n}00`:`${o} 0`,fixedDecimalScale:!!n}};var ca=X.forwardRef(function(o,t){let{onChange:n,...i}=o;return X.createElement(pa,{...i,onValueChange:({value:a})=>{n?.({target:{name:o.name,value:a}})},valueIsNumericString:!0,getInputRef:t,decimalScale:2})}),wt=X.forwardRef(function(o,t){let{currency:n="usd",max:i=1e5,name:a,onChange:r,label:l,error:m,helperText:u,required:g,disabled:d,useMinorUnit:y,...s}=o,{symbol:h,thousandSeparator:p,decimalSeparator:c,placeholder:v,fixedDecimalScale:D}=Pt(n),[k,I]=Tt(o.value),[f,b]=Tt(!!i&&!!o.value&&o.value>i),F=sa(()=>k&&y?k/100:k,[k,y]),M=la(L=>{let te=Number(y?L.target.value?.replace(c,""):L.target.value);I(te),r?.({...L,target:{name:a,value:te}}),i&&te>i?b(!0):b(!1)},[]),P=X.createElement(R,{...s,size:"sm",ref:t,value:F,placeholder:v,onChange:M,disabled:d,required:g,slotProps:{input:{component:ca,decimalSeparator:c,thousandSeparator:p,prefix:h,fixedDecimalScale:D}},sx:{fontFamily:"monospace"}});return l?X.createElement(B,{size:"sm",disabled:d,required:g,error:m||f},X.createElement(N,null,l),P,f?X.createElement(T,null,X.createElement(da,null),new ma(`limit: {amount, number, ::currency/${n} unit-width-narrow}`).format({amount:i})):u&&X.createElement(T,null,u)):P});import C,{useCallback as ae,useEffect as Mo,useMemo as ie,useRef as ba,useState as Ca}from"react";import{styled as ya,LinearProgress as xa}from"@mui/joy";import va from"@mui/icons-material/esm/ChevronLeft.js";import Ma from"@mui/icons-material/esm/ChevronRight.js";import{Sheet as ua}from"@mui/joy";import{motion as ga}from"framer-motion";var fa=ga(ua),Ie=fa;Ie.displayName="Sheet";var W=Ie;import G from"react";import{Table as ha}from"@mui/joy";var Ae=e=>{let{children:o,...t}=e;return G.createElement(ha,{...t},o)};Ae.displayName="Table";function xo(e){let{headCells:o,showCheckbox:t,onCheckboxChange:n,slots:{checkbox:i=Pe}={},slotProps:{checkbox:a={}}={}}=e;return G.createElement("thead",null,G.createElement("tr",null,t&&G.createElement("th",{style:{width:"40px",textAlign:"center"}},G.createElement(i,{onChange:n,...a})),o.map(r=>G.createElement("th",{key:r.label,style:{width:r.width,minWidth:r.minWidth,maxWidth:r.maxWidth,textAlign:r.numeric?"right":"left"}},r.label))))}xo.displayName="TableHead";function vo(e){let{rows:o,cellOrder:t,rowOptions:n,showCheckbox:i,onCheckboxChange:a,slots:{checkbox:r=Pe}={},slotProps:{checkbox:l={}}={}}=e;return G.createElement("tbody",null,o.map((m,u)=>G.createElement("tr",{key:u},i&&G.createElement("td",{style:{textAlign:"center"}},G.createElement(r,{onChange:g=>a?.(g,u),...l})),t.map(g=>G.createElement("td",{key:g,style:{textAlign:n?.[g]?.numeric?"right":"left"}},m[g])))))}vo.displayName="TableBody";var It=ya("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"}}),je=e=>"Intl"in window?new Intl.NumberFormat().format(e):e;function ka(e){let{paginationModel:{page:o,pageSize:t},rowCount:n,onPageChange:i}=e,a=1,r=Math.ceil(n/t),l=[o-2,o-1].filter(d=>d>1),m=[o+1,o+2].filter(d=>d<=r-1),u=r>1&&o<r-3,g=r>1&&o>4;return C.createElement(J,{direction:"row",spacing:1,sx:{pt:1,pb:1},justifyContent:"end",alignItems:"center"},C.createElement(J,{direction:"row",spacing:.5,alignItems:"center"},C.createElement(V,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o-1),disabled:o===a,"aria-label":"Previous page"},C.createElement(va,null)),o!==a&&C.createElement(w,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(a)},a),g&&C.createElement(w,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o-3)},"..."),l.map(d=>C.createElement(w,{key:d,size:"sm",variant:"plain",color:"neutral",onClick:()=>i(d)},d)),C.createElement(w,{variant:"soft",size:"sm"},o),m.map(d=>C.createElement(w,{key:d,size:"sm",variant:"plain",color:"neutral",onClick:()=>i(d)},d)),u&&C.createElement(w,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o+3)},"..."),o!==r&&C.createElement(w,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(r)},r),C.createElement(V,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o+1),disabled:o===r,"aria-label":"Next page"},C.createElement(Ma,null))))}var Da=e=>C.createElement(We,{sx:{position:"absolute",top:0,right:0,bottom:0,width:"4px",cursor:"col-resize"},onMouseDown:o=>{let t=o.clientX,n=e.current?.getBoundingClientRect().width,i=r=>{n&&t&&(e.current.style.width=`${n+(r.clientX-t)}px`)},a=()=>{document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",a)};document.addEventListener("mousemove",i),document.addEventListener("mouseup",a)}}),Pa=e=>{let o=ba(null),t={width:e.width,minWidth:e.minWidth??"50px",maxWidth:e.maxWidth,textAlign:e.type==="number"?"end":"start",position:e.stickyHeader?void 0:"relative"},n=e.resizable??!0?Da(o):null;return C.createElement("th",{ref:o,key:e.field,style:t},e.headerName??e.field,n)};function Ta({rows:e,columns:o,rowCount:t,pagination:n,paginationMode:i,paginationModel:a,onPaginationModelChange:r,selectionModel:l=[],onSelectionModelChange:m,getId:u,isTotalSelected:g}){let[d,y]=Ca(a?.page||1),s=a?.pageSize||20,h=ae((f,b)=>u?.(f)??f?.id??`${(b||0)+(d-1)*s}`,[u??d,s]),p=ie(()=>new Set(l),[l]),c=ie(()=>!n||i==="server"?e:e.slice((d-1)*s,(d-1)*s+s),[e,d,s,i,n]),v=ie(()=>c.length>0&&c.every((f,b)=>p.has(h(f,b))),[c,p,d,s,h]),D=t||e.length,k=ie(()=>g??(D>0&&l.length===D),[g,l,D]),I=ae(f=>{y(f),r?.({page:f,pageSize:s})},[r]);return Mo(()=>{I(1)},[D]),Mo(()=>{let f=Math.max(1,Math.ceil(D/s));d>f&&I(f)},[d,D,s]),Mo(()=>{m?.([])},[d]),{rowCount:D,page:d,pageSize:s,onPaginationModelChange:I,getId:h,HeadCell:Pa,dataInPage:c,isAllSelected:v,isTotalSelected:k,isSelectedRow:ae(f=>p.has(f),[p]),onAllCheckboxChange:ae(()=>{m?.(v?[]:c.map(h))},[v,c,m]),onCheckboxChange:ae((f,b)=>{if(p.has(b)){let F=l.filter(M=>M!==b);m?.(F)}else{let F=[...l,b];m?.(F)}},[l,m]),columns:ie(()=>o||Object.keys(e[0]||{}).map(f=>({field:f})),[e,o]),onTotalSelect:ae(()=>{m?.(k?[]:e.map(h),!k)},[k,e,m])}}function ko(e){let{rows:o,checkboxSelection:t,selectionModel:n,onSelectionModelChange:i,rowCount:a,columns:r,onPaginationModelChange:l,pagination:m,paginationMode:u,paginationModel:g,loading:d,slots:{checkbox:y=Pe,toolbar:s,footer:h,loadingOverlay:p=()=>C.createElement(xa,{value:8,variant:"plain"})}={},slotProps:{checkbox:c={},toolbar:v,background:D={}}={},...k}=e,{columns:I,isAllSelected:f,isSelectedRow:b,onAllCheckboxChange:F,onCheckboxChange:M,getId:P,rowCount:L,page:te,pageSize:rt,onPaginationModelChange:or,dataInPage:tr,isTotalSelected:nt,onTotalSelect:at,HeadCell:rr}=Ta(e),nr=ie(()=>({page:te,pageSize:rt}),[te,rt]);return C.createElement(We,null,C.createElement(J,{direction:"row",sx:{pt:1,pb:1},justifyContent:"space-between",alignItems:"center"},!!t&&C.createElement(J,{direction:"row",spacing:1},!f&&C.createElement(Y,{level:"body-xs"},je(n?.length||0)," items selected"),f&&!nt&&C.createElement(J,{direction:"row",spacing:1,alignItems:"center"},C.createElement(Y,{level:"body-xs"},"All ",je(n?.length||0)," items on this page are selected."),C.createElement(w,{size:"sm",variant:"plain",onClick:at},"Select all ",je(L??o.length)," items")),nt&&C.createElement(J,{direction:"row",spacing:1,alignItems:"center"},C.createElement(Y,{level:"body-xs"},"All ",je(L??o.length)," items are selected."),C.createElement(w,{size:"sm",variant:"plain",color:"danger",onClick:at},"Cancel"))),s&&C.createElement(s,{...v||{}})),C.createElement(W,{variant:"outlined",sx:{overflow:"auto",width:"100%",boxShadow:"sm",borderRadius:"sm"},...D},C.createElement(Ae,{...k},C.createElement("thead",null,C.createElement("tr",null,t&&C.createElement("th",{style:{width:"40px",textAlign:"center"}},C.createElement(y,{onChange:F,checked:f,indeterminate:(n||[]).length>0&&!f,...c})),I.map(oe=>C.createElement(rr,{key:oe.field,stickyHeader:e.stickyHeader,...oe})))),C.createElement("tbody",null,C.createElement(It,null,!!d&&C.createElement("td",null,C.createElement(We,{sx:{position:"absolute",top:0,left:0,right:0}},C.createElement(p,null)))),C.createElement(It,null),tr.map((oe,ar)=>{let re=P(oe,ar);return C.createElement("tr",{key:re,role:t?"checkbox":void 0,tabIndex:t?-1:void 0,onClick:t?_=>M(_,re):void 0,"aria-checked":t?b(re):void 0},t&&C.createElement("th",{scope:"row",style:{textAlign:"center"}},C.createElement(y,{onChange:_=>M(_,re),checked:b(re),...c})),I.map(_=>C.createElement("td",{key:_.field,style:{textAlign:_.type&&["number","date"].includes(_.type)?"end":"start"}},_.renderCell?.({row:oe,value:oe[_.field],id:re})??oe[_.field])))})),h&&C.createElement(h,null))),m&&C.createElement(ka,{paginationModel:nr,rowCount:L,onPageChange:or}))}ko.displayName="DataTable";import H,{forwardRef as Na,useCallback as At,useEffect as La,useImperativeHandle as Sa,useRef as Ha,useState as Ft}from"react";import{IMaskInput as Ea,IMask as Do}from"react-imask";import za from"@mui/icons-material/esm/CalendarToday.js";import{styled as Po}from"@mui/joy";import{FocusTrap as Oa,ClickAwayListener as Va,Popper as Ja}from"@mui/base";import{DialogActions as wa,styled as Ia}from"@mui/joy";import{motion as Aa}from"framer-motion";var Fa=Aa(wa),Ba=Ia(Fa)(({theme:e})=>({padding:e.spacing(2),gap:e.spacing(2),flexDirection:"row",justifyContent:"flex-end"})),Fe=Ba;Fe.displayName="DialogActions";var j=Fe;var Ya=Po(Ja,{name:"DatePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),$a=Po(W,{name:"DatePicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),qa=Po("div",{name:"DatePicker",slot:"container"})({}),Bt=e=>{let o=`${e.getDate()}`,t=`${e.getMonth()+1}`,n=e.getFullYear();return Number(o)<10&&(o="0"+o),Number(t)<10&&(t="0"+t),[n,t,o].join("/")},Wa=H.forwardRef(function(o,t){let{onChange:n,...i}=o;return H.createElement(Ea,{...i,inputRef:t,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/`m/`d",blocks:{d:{mask:Do.MaskedRange,from:1,to:31,maxLength:2},m:{mask:Do.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Do.MaskedRange,from:1900,to:9999}},format:Bt,parse:a=>{let r=a.split("/");return new Date(Number(r[0]),Number(r[1])-1,Number(r[2]))},autofix:"pad",overwrite:!0})}),Nt=Na((e,o)=>{let{onChange:t,disabled:n,label:i,error:a,helperText:r,minDate:l,maxDate:m,disableFuture:u,disablePast:g,required:d,...y}=e,s=Ha(null),[h,p]=Ft(e.value||""),[c,v]=Ft(null),D=!!c;La(()=>{p(e.value||"")},[e.value]),Sa(o,()=>s.current,[s.current]);let k=At(b=>{p(b.target.value),t?.(b)},[]),I=At(b=>{v(c?null:b.currentTarget),s.current?.focus()},[c,v,s]),f=H.createElement(qa,null,H.createElement(Oa,{open:!0},H.createElement(H.Fragment,null,H.createElement(R,{...y,ref:s,size:"sm",value:h,onChange:k,placeholder:"YYYY/MM/DD",disabled:n,required:d,slotProps:{input:{component:Wa,ref:s}},sx:{fontFamily:"monospace"},endDecorator:H.createElement(V,{variant:"plain",onClick:I},H.createElement(za,null))}),D&&H.createElement(Va,{onClickAway:()=>v(null)},H.createElement(Ya,{id:"date-picker-popper",open:!0,anchorEl:c,placement:"bottom-end",onMouseDown:b=>b.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}]},H.createElement($a,{tabIndex:-1,role:"presentation"},H.createElement(K,{value:Number.isNaN(new Date(h).getTime())?void 0:[new Date(h),void 0],onChange:([b])=>{k({target:{name:e.name,value:Bt(b)}}),v(null),s.current?.blur()},minDate:l?new Date(l):void 0,maxDate:m?new Date(m):void 0,disableFuture:u,disablePast:g}),H.createElement(j,{sx:{p:1}},H.createElement(w,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{k({target:{name:e.name,value:""}}),v(null),s.current?.blur()}},"Clear"))))))));return i?H.createElement(B,{required:d,disabled:n,error:a,size:"sm"},H.createElement(N,null,i),f,r&&H.createElement(T,null,r)):f});import E,{forwardRef as Ua,useCallback as To,useEffect as Ga,useImperativeHandle as _a,useMemo as Ra,useRef as ja,useState as Lt}from"react";import{IMaskInput as Za,IMask as wo}from"react-imask";import Xa from"@mui/icons-material/esm/CalendarToday.js";import{styled as Io}from"@mui/joy";import{FocusTrap as Qa,ClickAwayListener as Ka,Popper as ei}from"@mui/base";var oi=Io(ei,{name:"DateRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),ti=Io(W,{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})),ri=Io("div",{name:"DateRangePicker",slot:"container"})({}),St=([e,o])=>{let t=n=>{let i=`${n.getDate()}`,a=`${n.getMonth()+1}`,r=n.getFullYear();return Number(i)<10&&(i="0"+i),Number(a)<10&&(a="0"+a),[r,a,i].join("/")};return[t(e),o?t(o):""].join(" - ")},Ht=e=>{let o=e.split(" - ")[0]||"",t=e.split(" - ")[1]||"",n=o.split("/"),i=t.split("/");return[new Date(Number(n[0]),Number(n[1])-1,Number(n[2])),new Date(Number(i[0]),Number(i[1])-1,Number(i[2]))]},ni=E.forwardRef(function(o,t){let{onChange:n,...i}=o;return E.createElement(Za,{...i,inputRef:t,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/`m/`d - Y/`m/`d",blocks:{d:{mask:wo.MaskedRange,from:1,to:31,maxLength:2},m:{mask:wo.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:wo.MaskedRange,from:1900,to:9999}},format:St,parse:Ht,autofix:"pad",overwrite:!0})}),Ao=Ua((e,o)=>{let{onChange:t,disabled:n,label:i,error:a,helperText:r,minDate:l,maxDate:m,disableFuture:u,disablePast:g,required:d,...y}=e,s=ja(null),[h,p]=Lt(e.value||""),[c,v]=Lt(null),D=!!c,k=Ra(()=>h?Ht(h):void 0,[h]);Ga(()=>{p(e.value||"")},[e.value]),_a(o,()=>s.current,[s.current]);let I=To(M=>{p(M.target.value),t?.(M)},[t]),f=To(M=>{v(c?null:M.currentTarget),s.current?.focus()},[c,v,s]),b=To(([M,P])=>{!M||!P||(s.current?.blur(),p(St([M,P])),v(null))},[p,v,s]),F=E.createElement(ri,null,E.createElement(Qa,{open:!0},E.createElement(E.Fragment,null,E.createElement(R,{...y,ref:o,size:"sm",value:h,onChange:I,disabled:n,required:d,placeholder:"YYYY/MM/DD - YYYY/MM/DD",slotProps:{input:{component:ni,ref:s}},sx:{fontFamily:"monospace"},endDecorator:E.createElement(V,{variant:"plain",onClick:f},E.createElement(Xa,null))}),D&&E.createElement(Ka,{onClickAway:()=>v(null)},E.createElement(oi,{id:"date-range-picker-popper",open:!0,anchorEl:c,placement:"bottom-end",onMouseDown:M=>M.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}]},E.createElement(ti,{tabIndex:-1,role:"presentation"},E.createElement(K,{rangeSelection:!0,defaultValue:k,onChange:b,minDate:l?new Date(l):void 0,maxDate:m?new Date(m):void 0,disableFuture:u,disablePast:g}),E.createElement(j,{sx:{p:1}},E.createElement(w,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{p(""),v(null),s.current?.blur()}},"Clear"))))))));return i?E.createElement(B,{required:d,disabled:n,error:a,size:"sm"},E.createElement(N,null,i),F,r&&E.createElement(T,null,r)):F});Ao.displayName="DateRangePicker";import{DialogContent as ai,styled as ii}from"@mui/joy";import{motion as li}from"framer-motion";var si=li(ai),mi=ii(si)(({theme:e})=>({padding:e.spacing(0,6,5)})),Be=mi;Be.displayName="DialogContent";var Ze=Be;import{DialogTitle as pi,styled as di}from"@mui/joy";import{motion as ci}from"framer-motion";var ui=ci(pi),gi=di(ui)(({theme:e})=>({padding:e.spacing(4,6)})),Ne=gi;Ne.displayName="DialogTitle";var Xe=Ne;import Se from"react";import Qe from"react";import{Modal as fi,ModalDialog as hi,ModalClose as bi,ModalOverflow as Ci,styled as Et}from"@mui/joy";import{motion as Ke}from"framer-motion";var yi=Ke(fi),Fo=yi;Fo.displayName="Modal";var xi=Ke(hi),zt=Et(xi)({padding:0}),Le=zt;Le.displayName="ModalDialog";var vi=Et(Ke(bi))(({theme:e})=>({top:e.spacing(3),right:e.spacing(6)})),eo=vi;eo.displayName="ModalClose";var Mi=Ke(Ci),Bo=Mi;Bo.displayName="ModalOverflow";function No(e){let{title:o,children:t,...n}=e;return Qe.createElement(zt,{...n},Qe.createElement(eo,null),Qe.createElement(Xe,null,o),Qe.createElement(Ze,null,t))}No.displayName="ModalFrame";import{styled as ki}from"@mui/joy";var Di=ki(Le)(({theme:e})=>({padding:0})),Lo=Se.forwardRef((e,o)=>{let{title:t,children:n,actions:i,...a}=e;return Se.createElement(Di,{ref:o,...a},Se.createElement(Xe,null,t),Se.createElement(Ze,null,n),Se.createElement(j,null,i))});Lo.displayName="DialogFrame";import Pi from"react";import{Divider as Ti}from"@mui/joy";import{motion as wi}from"framer-motion";var Ii=wi(Ti),He=e=>Pi.createElement(Ii,{...e});He.displayName="Divider";import Ai from"react";import{Drawer as Fi}from"@mui/joy";import{motion as Bi}from"framer-motion";var Ni=Bi(Fi),So=e=>{let{children:o,...t}=e;return Ai.createElement(Ni,{...t,slotProps:{...t.slotProps,content:{...t.slotProps?.content,sx:{bgcolor:"transparent",p:{md:3,sm:0},boxShadow:"none"}}}},o)};So.displayName="InsetDrawer";import A,{useCallback as oo,useEffect as Li,useMemo as Ot,useRef as Vt,useState as Ho}from"react";import{styled as ee}from"@mui/joy";import Si from"@mui/icons-material/esm/InfoOutlined.js";import Hi from"@mui/icons-material/esm/CloudUploadRounded.js";import Ei from"@mui/icons-material/esm/UploadFileRounded.js";import zi from"@mui/icons-material/esm/ClearRounded.js";import{combine as Oi}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/combine.js";import{dropTargetForExternal as Vi,monitorForExternal as Ji}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/adapter.js";import{containsFiles as Jt,getFiles as Yi}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/file.js";import{preventUnhandled as Yt}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/prevent-unhandled.js";var $i=ee("input")({width:"1px",height:"1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",position:"absolute"}),qi=ee(J,{name:"Uploader",slot:"PreviewRoot"})({}),Wi=ee(ke,{name:"Uploader",slot:"UploadCard"})(({theme:e})=>({padding:e.spacing(2.5),border:`1px solid ${e.palette.neutral.outlinedBorder}`})),Ui=ee(Ei,{name:"Uploader",slot:"UploadFileIcon"})(({theme:e})=>({color:e.palette.neutral[400],width:"32px",height:"32px"})),Gi=ee(zi,{name:"Uploader",slot:"ClearIcon"})(({theme:e})=>({color:e.palette.neutral.plainColor,width:"18px",height:"18px"})),_i=["byte","kilobyte","megabyte","gigabyte","terabyte","petabyte"],$t=e=>{let o=e==0?0:Math.floor(Math.log(e)/Math.log(1024)),t=e/Math.pow(1024,o),n=_i[o];return Intl.NumberFormat("en-us",{style:"unit",unit:n,unitDisplay:"narrow"}).format(t)},Ri=e=>{let{files:o,onDelete:t}=e;return A.createElement(qi,{gap:1},o.map(n=>A.createElement(Wi,{key:n.name,size:"sm",color:"neutral"},A.createElement(J,{direction:"row",alignItems:"center",gap:2},A.createElement(Ui,null),A.createElement(J,{flex:"1"},A.createElement(Y,{level:"body-sm",textColor:"common.black"},n.name),A.createElement(Y,{level:"body-xs",fontWeight:"300",lineHeight:"1.33",textColor:"text.tertiary"},$t(n.size))),A.createElement(V,{onClick:()=>t?.(n)},A.createElement(Gi,null))))))},ji=ee(J,{name:"Uploader",slot:"root"})(({theme:e})=>({gap:e.spacing(2)})),Zi=ee(W,{name:"Uploader",slot:"dropZone"})(({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}`})),Xi=ee(Hi,{name:"Uploader",slot:"iconContainer"})(({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"})),Eo=A.memo(e=>{let{accept:o,maxCount:t,name:n,size:i,maxSize:a,onChange:r,label:l,helperText:m}=e,u=Vt(null),g=Vt(null),[d,y]=Ho(),[s,h]=Ho([]),[p,c]=Ho("idle"),v=Ot(()=>!!d||e.error,[e.error,d]),D=Ot(()=>!t||t&&s.length!==t,[s,t]),k=oo(M=>{try{a&&M.forEach(L=>{if(L.size>a)throw new Error(`File size exceeds the limit: ${$t(a)}`)});let P=[...s,...M];if(t&&P.length>t)throw new Error(`File count exceeds the limit: ${t}`);r?.({target:{name:n,value:P}}),h(P)}catch(P){let L=P;console.log(L.message),y(L.message)}},[s]);Li(()=>{let M=u.current;if(M)return Oi(Vi({element:M,canDrop:Jt,onDragEnter:()=>c("over"),onDragLeave:()=>c("potential"),onDrop:async({source:P})=>{let L=await Yi({source:P});k(L)}}),Ji({canMonitor:Jt,onDragStart:()=>{c("potential"),Yt.start()},onDrop:()=>{c("idle"),Yt.stop()}}))});let I=oo(M=>{let P=Array.from(M.target.files||[]);k(P)},[k]),f=oo(M=>{h(P=>(r?.({target:{name:n,value:P.filter(L=>L!==M)}}),P.filter(L=>L!==M)))},[]),b=oo(()=>{g.current?.click()},[]),F=A.createElement(Zi,{state:p,error:v,ref:u,onClick:b},A.createElement(J,{alignItems:"center",gap:1},A.createElement(Xi,{state:p,error:v})),A.createElement($i,{type:"file",onChange:I,multiple:!0,accept:o,ref:g}));return A.createElement(ji,null,D&&(l?A.createElement(B,{size:i,error:!!v},A.createElement(N,null,l),F,d?A.createElement(T,null,A.createElement(Si,null),d):m&&A.createElement(T,null,m)):F),s.length>0&&A.createElement(Ri,{files:s,onDelete:f}))});Eo.displayName="Uploader";import{Grid as Qi}from"@mui/joy";import{motion as Ki}from"framer-motion";var el=Ki(Qi),zo=el;zo.displayName="Grid";import Q from"react";import ol from"react-markdown";import{Link as tl}from"@mui/joy";var Oo=e=>{let{children:o,color:t,textColor:n,defaultLevel:i="body-md",markdownOptions:a,...r}=e;return Q.createElement($,{color:t,textColor:n,...r},Q.createElement(ol,{...a,children:o,components:{h1:({children:l})=>Q.createElement($,{color:t,textColor:n,level:"h1"},l),h2:({children:l})=>Q.createElement($,{color:t,textColor:n,level:"h2"},l),h3:({children:l})=>Q.createElement($,{color:t,textColor:n,level:"h3"},l),h4:({children:l})=>Q.createElement($,{color:t,textColor:n,level:"h4"},l),p:({children:l})=>Q.createElement($,{color:t,textColor:n,level:i},l),a:({children:l,href:m})=>Q.createElement(tl,{href:m},l),hr:()=>Q.createElement(He,null),...a?.components}}))};Oo.displayName="Markdown";import z,{forwardRef as rl,useCallback as qt,useEffect as nl,useImperativeHandle as al,useRef as il,useState as Wt}from"react";import{IMaskInput as ll,IMask as Ut}from"react-imask";import sl from"@mui/icons-material/esm/CalendarToday.js";import{styled as Jo}from"@mui/joy";import{FocusTrap as ml,ClickAwayListener as pl,Popper as dl}from"@mui/base";var cl=Jo(dl,{name:"MonthPicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),ul=Jo(W,{name:"MonthPicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),gl=Jo("div",{name:"MonthPicker",slot:"container"})({}),Gt=e=>{let o=`${e.getMonth()+1}`,t=e.getFullYear();return Number(o)<10&&(o="0"+o),[t,o].join("/")},Vo=e=>(t=>{if(!/^\d\d\d\d\/(0[1-9]|1[012])(\/(0[1-9]|[23][0-9]))?$/.test(t))return t;let n=t.split("/"),i=new Date(Number(n[0]),Number(n[1])-1);return Gt(i)})(e),_t=e=>e.split(" - ")[0]||"",fl=z.forwardRef(function(o,t){let{onChange:n,...i}=o;return z.createElement(ll,{...i,inputRef:t,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/m",blocks:{m:{mask:Ut.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Ut.MaskedRange,from:1900,to:9999}},format:Vo,parse:_t})}),Rt=rl((e,o)=>{let{onChange:t,disabled:n,label:i,error:a,helperText:r,minDate:l,maxDate:m,disableFuture:u,disablePast:g,required:d,...y}=e,s=il(null),[h,p]=Wt(e.value||""),[c,v]=Wt(null),D=!!c;nl(()=>{p(e.value?Vo(_t(e.value)):"")},[e.value]),al(o,()=>s.current,[s.current]);let k=qt(b=>{console.log(b.target.value),p(b.target.value),t?.(b)},[]),I=qt(b=>{v(c?null:b.currentTarget),s.current?.focus()},[c,v,s]),f=z.createElement(gl,null,z.createElement(ml,{open:!0},z.createElement(z.Fragment,null,z.createElement(R,{...y,ref:s,size:"sm",value:h,onChange:k,placeholder:"YYYY/MM",disabled:n,required:d,slotProps:{input:{component:fl,ref:s}},sx:{fontFamily:"monospace"},endDecorator:z.createElement(V,{variant:"plain",onClick:I},z.createElement(sl,null))}),D&&z.createElement(pl,{onClickAway:()=>v(null)},z.createElement(cl,{id:"date-picker-popper",open:!0,anchorEl:c,placement:"bottom-end",onMouseDown:b=>b.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}]},z.createElement(ul,{tabIndex:-1,role:"presentation"},z.createElement(K,{view:"month",views:["month"],value:Number.isNaN(new Date(h).getTime())?void 0:[new Date(h),void 0],onChange:([b])=>{k({target:{name:e.name,value:Vo(Gt(b))}}),v(null),s.current?.blur()},minDate:l?new Date(l):void 0,maxDate:m?new Date(m):void 0,disableFuture:u,disablePast:g}),z.createElement(j,{sx:{p:1}},z.createElement(w,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{k({target:{name:e.name,value:""}}),v(null),s.current?.blur()}},"Clear"))))))));return i?z.createElement(B,{required:d,disabled:n,error:a,size:"sm"},z.createElement(N,null,i),f,r&&z.createElement(T,null,r)):f});import O,{forwardRef as hl,useCallback as Yo,useEffect as bl,useImperativeHandle as Cl,useMemo as yl,useRef as xl,useState as jt}from"react";import{IMaskInput as vl,IMask as Zt}from"react-imask";import Ml from"@mui/icons-material/esm/CalendarToday.js";import{styled as Uo}from"@mui/joy";import{FocusTrap as kl,ClickAwayListener as Dl,Popper as Pl}from"@mui/base";var Tl=Uo(Pl,{name:"MonthRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),wl=Uo(W,{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})),Il=Uo("div",{name:"MonthRangePicker",slot:"container"})({}),$o=e=>{let o=`${e.getMonth()+1}`,t=e.getFullYear();return Number(o)<10&&(o="0"+o),[t,o].join("/")},qo=([e,o])=>{let t=n=>{if(!/^\d\d\d\d\/(0[1-9]|1[012])(\/(0[1-9]|[23][0-9]))?$/.test(n))return n;let i=n.split("/"),a=new Date(Number(i[0]),Number(i[1])-1);return $o(a)};return[t(e),t(o)].join(" - ")},Wo=e=>{let o=e.split(" - ")[0]||"",t=e.split(" - ")[1]||"";return[o,t]},Al=O.forwardRef(function(o,t){let{onChange:n,...i}=o;return O.createElement(vl,{...i,inputRef:t,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/m - Y/m",blocks:{m:{mask:Zt.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Zt.MaskedRange,from:1900,to:9999}},format:qo,parse:Wo})}),Go=hl((e,o)=>{let{onChange:t,disabled:n,label:i,error:a,helperText:r,minDate:l,maxDate:m,disableFuture:u,disablePast:g,required:d,...y}=e,s=xl(null),[h,p]=jt(""),[c,v]=jt(null),D=!!c,k=yl(()=>h?Wo(h).map(M=>new Date(M)):void 0,[h]);bl(()=>{p(e.value?qo(Wo(e.value)):"")},[e.value]),Cl(o,()=>s.current,[s.current]);let I=Yo(M=>{p(M.target.value),t?.(M)},[t]),f=Yo(M=>{v(c?null:M.currentTarget),s.current?.focus()},[c,v,s]),b=Yo(([M,P])=>{!M||!P||(p(qo([$o(M),$o(P)])),v(null),s.current?.blur())},[p,v,s]),F=O.createElement(Il,null,O.createElement(kl,{open:!0},O.createElement(O.Fragment,null,O.createElement(R,{...y,ref:o,size:"sm",value:h,onChange:I,disabled:n,required:d,placeholder:"YYYY/MM - YYYY/MM",slotProps:{input:{component:Al,ref:s}},sx:{fontFamily:"monospace"},endDecorator:O.createElement(V,{variant:"plain",onClick:f},O.createElement(Ml,null))}),D&&O.createElement(Dl,{onClickAway:()=>v(null)},O.createElement(Tl,{id:"date-range-picker-popper",open:!0,anchorEl:c,placement:"bottom-end",onMouseDown:M=>M.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}]},O.createElement(wl,{tabIndex:-1,role:"presentation"},O.createElement(K,{view:"month",views:["month"],rangeSelection:!0,defaultValue:k,onChange:b,minDate:l?new Date(l):void 0,maxDate:m?new Date(m):void 0,disableFuture:u,disablePast:g}),O.createElement(j,{sx:{p:1}},O.createElement(w,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{p(""),v(null),s.current?.blur()}},"Clear"))))))));return i?O.createElement(B,{required:d,disabled:n,error:a,size:"sm"},O.createElement(N,null,i),F,r&&O.createElement(T,null,r)):F});Go.displayName="MonthRangePicker";import{Radio as Fl,RadioGroup as Bl}from"@mui/joy";import{motion as Xt}from"framer-motion";var Nl=Xt(Fl),Ee=Nl;Ee.displayName="Radio";var Ll=Xt(Bl),ze=Ll;ze.displayName="RadioGroup";import Qt from"react";function _o(e){let{items:o,...t}=e;return Qt.createElement(ze,{...t},o.map(n=>Qt.createElement(Ee,{key:`${n.value}`,value:n.value,label:n.label})))}_o.displayName="RadioList";import Oe,{useMemo as Sl}from"react";import{Select as Hl,Option as El}from"@mui/joy";import{motion as zl}from"framer-motion";var Ol=zl(El),to=Ol;to.displayName="Option";function Ro(e){let{label:o,helperText:t,error:n,size:i,color:a,disabled:r,required:l,onChange:m,...u}=e,g=Sl(()=>e.options.map(s=>typeof s!="object"?{value:s,label:s}:s),[e.options]),y=Oe.createElement(Hl,{...u,required:l,disabled:r,size:i,color:a,onChange:(s,h)=>{let p=s||{target:{}},c={...p,target:{name:p.target?.name||e.name,value:h||void 0}};m?.(c)}},g.map(s=>Oe.createElement(to,{key:s.value,value:s.value},s.label)));return o?Oe.createElement(B,{required:l,disabled:r,size:i,color:a,error:n},Oe.createElement(N,null,o),y,t&&Oe.createElement(T,null,t)):y}Ro.displayName="Select";import Kt from"react";import{Switch as Vl,styled as Jl,switchClasses as Yl}from"@mui/joy";import{motion as er}from"framer-motion";var $l=er(Vl),ql=Jl(er.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)",[`&.${Yl.checked}`]:{left:"unset",right:"var(--Switch-thumbOffset)"}}),Wl=e=>Kt.createElement(ql,{...e,layout:!0,transition:Ul}),Ul={type:"spring",stiffness:700,damping:30},jo=e=>Kt.createElement($l,{...e,slots:{thumb:Wl,...e.slots}});jo.displayName="Switch";import{Tabs as Gl,Tab as _l,TabList as Rl,TabPanel as jl,styled as Zl,tabClasses as Xl}from"@mui/joy";import{motion as ro}from"framer-motion";var Ql=ro(Gl),Zo=Ql;Zo.displayName="Tabs";var Kl=Zl(ro(_l))(({theme:e})=>({[`&:not(.${Xl.selected})`]:{color:e.palette.neutral[700]}})),Xo=Kl;Xo.displayName="Tab";var es=ro(Rl),Qo=es;Qo.displayName="TabList";var os=ro(jl),Ko=os;Ko.displayName="TabPanel";import no from"react";import{Textarea as ts}from"@mui/joy";import{motion as rs}from"framer-motion";var ns=rs(ts),et=e=>{let{label:o,error:t,helperText:n,color:i,size:a,disabled:r,required:l,...m}=e,u=no.createElement(ns,{required:l,disabled:r,color:i,size:a,...m});return o?no.createElement(B,{required:l,disabled:r,color:i,size:a,error:t},no.createElement(N,null,o),u,n&&no.createElement(T,null,n)):u};et.displayName="Textarea";import ao from"react";import{CssBaseline as as,CssVarsProvider as is,checkboxClasses as ls,extendTheme as ss}from"@mui/joy";var ms=ss({cssVarPrefix:"ceed",spacing:4,components:{JoyTable:{defaultProps:{size:"sm",borderAxis:"bothBetween"},styleOverrides:{root:({theme:e})=>({"--TableRow-stripeBackground":e.palette.background.level1,"--TableCell-selectedBackground":e.palette.background.level2,"--TableRow-hoverBackground":e.palette.background.level3,"& tbody tr[aria-checked=false] th":{"--TableCell-headBackground":"transparent"},"& tbody tr[aria-checked=true]:hover th":{"--TableCell-headBackground":"var(--TableRow-hoverBackground)"},"& tbody tr[aria-checked=true]:not(:hover) th":{"--TableCell-headBackground":"var(--TableCell-selectedBackground)"},"& tbody tr[aria-checked=true]:not(:hover) td":{"--TableCell-dataBackground":"var(--TableCell-selectedBackground)"},[`& .${ls.root}`]:{verticalAlign:"middle"}})}},JoyTooltip:{defaultProps:{size:"sm",placement:"top"}}}});function ot(e){return ao.createElement(ao.Fragment,null,ao.createElement(is,{theme:ms},ao.createElement(as,null),e.children))}ot.displayName="ThemeProvider";import ps from"react";import{Tooltip as ds}from"@mui/joy";import{motion as cs}from"framer-motion";var us=cs(ds),tt=e=>ps.createElement(us,{...e});tt.displayName="Tooltip";export{$e as Accordion,Ye as AccordionDetails,Je as AccordionSummary,io as Accordions,lo as Alert,ob as AspectRatio,lt as Autocomplete,Gh as AutocompleteListbox,_h as AutocompleteOption,Xh as Avatar,Kh as AvatarGroup,rb as Badge,ue as Box,po as Breadcrumbs,Ce as Button,ve as Calendar,ke as Card,ho as CardActions,go as CardContent,fo as CardCover,bo as CardOverflow,De as Checkbox,Co as Chip,cb as CircularProgress,yo as Container,wt as CurrencyInput,ko as DataTable,Nt as DatePicker,Ao as DateRangePicker,Fe as DialogActions,Be as DialogContent,Lo as DialogFrame,Ne as DialogTitle,He as Divider,gb as Drawer,be as Dropdown,me as FormControl,de as FormHelperText,pe as FormLabel,zo as Grid,ye as IconButton,we as Input,So as InsetDrawer,hb as LinearProgress,Nb as Link,Cb as List,xb as ListDivider,Mb as ListItem,Db as ListItemButton,Tb as ListItemContent,Ib as ListItemDecorator,Fb as ListSubheader,Oo as Markdown,ge as Menu,fe as MenuButton,he as MenuItem,Fo as Modal,eo as ModalClose,Le as ModalDialog,No as ModalFrame,Bo as ModalOverflow,Rt as MonthPicker,Go as MonthRangePicker,to as Option,Ee as Radio,ze as RadioGroup,_o as RadioList,Ro as Select,Ie as Sheet,qb as Skeleton,Sb as Slider,se as Stack,Eb as Step,Ob as StepButton,Jb as StepIndicator,Yb as Stepper,jo as Switch,Xo as Tab,Qo as TabList,Ko as TabPanel,Ae as Table,vo as TableBody,xo as TableHead,Zo as Tabs,et as Textarea,ot as ThemeProvider,tt as Tooltip,$ as Typography,Eo as Uploader,$h as accordionClasses,qh as accordionDetailsClasses,Uh as accordionSummaryClasses,Wh as accordionsClasses,lh as alertClasses,tb as aspectRatioClasses,Rh as autocompleteClasses,jh as autocompleteListboxClasses,Zh as autocompleteOptionClasses,Qh as avatarClasses,eb as avatarGroupClasses,nb as badgeClasses,sh as boxClasses,ab as breadcrumbsClasses,mh as buttonClasses,lb as cardActionsClasses,ib as cardClasses,sb as cardContentClasses,mb as cardCoverClasses,pb as cardOverflowClasses,ph as checkboxClasses,db as chipClasses,ub as circularProgressClasses,zh as dialogActionsClasses,Eh as dialogContentClasses,Hh as dialogTitleClasses,dh as dividerClasses,fb as drawerClasses,Ph as formControlClasses,wh as formHelperTextClasses,Th as formLabelClasses,Ih as gridClasses,ch as iconButtonClasses,uh as inputClasses,bb as linearProgressClasses,Lb as linkClasses,yb as listClasses,vb as listDividerClasses,Pb as listItemButtonClasses,kb as listItemClasses,wb as listItemContentClasses,Ab as listItemDecoratorClasses,Bb as listSubheaderClasses,fh as menuButtonClasses,gh as menuClasses,hh as menuItemClasses,Bh as modalClasses,Nh as modalCloseClasses,Lh as modalDialogClasses,Sh as modalOverflowClasses,bh as optionClasses,Ch as radioClasses,yh as radioGroupClasses,xh as selectClasses,Fh as sheetClasses,Wb as skeletonClasses,Hb as sliderClasses,Ah as stackClasses,Vb as stepButtonClasses,zb as stepClasses,$b as stepperClasses,vh as switchClasses,Jh as tabListClasses,Yh as tabPanelClasses,Mh as tableClasses,Vh as tabsClasses,kh as textareaClasses,Oh as tooltipClasses,Dh as typographyClasses,ah as useColorScheme,nh as useTheme,ih as useThemeProps};