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