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