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