@ceed/ads 0.0.134 → 0.0.136
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 +1 -0
- package/dist/index.js +1 -1
- package/framer/index.js +17 -17
- package/package.json +1 -1
|
@@ -28,6 +28,7 @@ export type DataTableProps<T extends Record<string, unknown>> = {
|
|
|
28
28
|
* MUI에는 없는 인터페이스지만 Total Select 기능이 추가되었기 때문에 추가해야했다.
|
|
29
29
|
*/
|
|
30
30
|
isTotalSelected?: boolean) => void;
|
|
31
|
+
pagination?: boolean;
|
|
31
32
|
paginationMode?: "client" | "server";
|
|
32
33
|
paginationModel?: {
|
|
33
34
|
page: number;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useTheme as Vg,useColorScheme as Jg,useThemeProps as Yg,alertClasses as $g,boxClasses as Wg,buttonClasses as qg,checkboxClasses as Gg,dividerClasses as Ug,iconButtonClasses as jg,inputClasses as _g,menuClasses as Zg,menuButtonClasses as Xg,menuItemClasses as Qg,optionClasses as Rg,radioClasses as Kg,radioGroupClasses as ef,selectClasses as of,switchClasses as tf,tableClasses as rf,textareaClasses as nf,typographyClasses as af,formControlClasses as lf,formLabelClasses as sf,formHelperTextClasses as mf,gridClasses as df,stackClasses as pf,sheetClasses as cf,modalClasses as uf,modalCloseClasses as gf,modalDialogClasses as ff,modalOverflowClasses as hf,dialogTitleClasses as Cf,dialogContentClasses as bf,dialogActionsClasses as yf,tooltipClasses as xf,tabsClasses as vf,tabListClasses as Df,tabPanelClasses as Mf,accordionClasses as kf,accordionDetailsClasses as Tf,accordionGroupClasses as Pf,accordionSummaryClasses as wf,AutocompleteListbox as Ff,AutocompleteOption as Af,autocompleteClasses as If,autocompleteListboxClasses as Bf,autocompleteOptionClasses as Nf,Avatar as Lf,avatarClasses as Sf,AvatarGroup as Hf,avatarGroupClasses as zf,AspectRatio as Ef,aspectRatioClasses as Of,Badge as Vf,badgeClasses as Jf,breadcrumbsClasses as Yf,cardClasses as $f,cardActionsClasses as Wf,cardContentClasses as qf,cardCoverClasses as Gf,cardOverflowClasses as Uf,Chip as jf,chipClasses as _f,CircularProgress as Zf,circularProgressClasses as Xf,Drawer as Qf,drawerClasses as Rf,LinearProgress as Kf,linearProgressClasses as eh,List as oh,listClasses as th,ListDivider as rh,listDividerClasses as nh,ListItem as ah,listItemClasses as ih,ListItemButton as lh,listItemButtonClasses as sh,ListItemContent as mh,listItemContentClasses as dh,ListItemDecorator as ph,listItemDecoratorClasses as ch,ListSubheader as uh,listSubheaderClasses as gh,Link as fh,linkClasses as hh,Slider as Ch,sliderClasses as bh,Step as yh,stepClasses as xh,StepButton as vh,stepButtonClasses as Dh,StepIndicator as Mh,Stepper as kh,stepperClasses as Th,Skeleton as Ph,skeletonClasses as wh}from"@mui/joy";import ne from"react";import{AccordionGroup as jt,Accordion as _t,AccordionSummary as Zt,AccordionDetails as Xt}from"@mui/joy";import{motion as Se}from"framer-motion";var Qt=Se(Zt),He=Qt;He.displayName="AccordionSummary";var Rt=Se(Xt),ze=Rt;ze.displayName="AccordionDetails";var Kt=Se(_t);function Ee(e){let{summary:o,details:r,variant:n,color:i,...a}=e,t=n==="solid"?"solid":void 0;return ne.createElement(Kt,{variant:t,color:i,...a},ne.createElement(He,{variant:t,color:i},o),ne.createElement(ze,{variant:t,color:i},r))}Ee.displayName="Accordion";var er=Se(jt);function to(e){let{variant:o,color:r,items:n,...i}=e;return ne.createElement(er,{variant:o,color:r,...i},n.map((a,t)=>ne.createElement(Ee,{key:t,summary:a.summary,details:a.details,index:t,variant:o,color:r})))}to.displayName="Accordions";import Oe from"react";import{Alert as sr,styled as mr}from"@mui/joy";import{motion as dr}from"framer-motion";import or from"react";import{Typography as tr}from"@mui/joy";import{motion as rr}from"framer-motion";var nr=rr(tr),V=e=>or.createElement(nr,{...e});V.displayName="Typography";var L=V;import{Stack as ar}from"@mui/joy";import{motion as ir}from"framer-motion";var lr=ir(ar),ae=lr;ae.displayName="Stack";var z=ae;var pr=mr(dr(sr))({alignItems:"flex-start",fontWeight:"unset"});function ro(e){let{title:o,content:r,actions:n,color:i="primary",...a}=e,t=e.invertedColors||e.variant==="solid";return Oe.createElement(pr,{...a,color:i,endDecorator:n,invertedColors:t},Oe.createElement(z,null,o&&Oe.createElement(L,{level:"title-sm",color:i},o),Oe.createElement(L,{level:"body-sm",color:i},r)))}ro.displayName="Alert";import A,{useMemo as Ve,useState as Dr}from"react";import{Autocomplete as Mr,AutocompleteOption as kr,ListSubheader as Tr,AutocompleteListbox as Pr,ListItemDecorator as et,CircularProgress as wr,styled as Fr}from"@mui/joy";import{Popper as Ar}from"@mui/base";import{FixedSizeList as Ir}from"react-window";import{FormControl as cr,styled as ur}from"@mui/joy";import{motion as gr}from"framer-motion";var fr=ur(gr(cr))({width:"100%"}),ie=fr;ie.displayName="FormControl";var F=ie;import{FormLabel as hr}from"@mui/joy";import{motion as Cr}from"framer-motion";var br=Cr(hr),le=br;le.displayName="FormLabel";var S=le;import{FormHelperText as yr}from"@mui/joy";import{motion as xr}from"framer-motion";var vr=xr(yr),se=vr;se.displayName="FormHelperText";var w=se;var Br=Fr(Ar,{name:"Autocomplete",slot:"Popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip}));function Nr(e){let{data:o,index:r,style:n}=e,i=o[r],a={...n},t=i.props;if(i.hasOwnProperty("group"))return A.createElement(Tr,{key:i.key,component:"li"},i.group);let l=t["data-option-index"],s=t.ownerState.options[l];return A.createElement(kr,{...t},s.startDecorator&&A.createElement(et,{sx:{marginInlineEnd:"var(--Input-gap)"}},s.startDecorator),s.label,s.endDecorator&&A.createElement(et,{sx:{marginInlineStart:"var(--Input-gap)"}},s.endDecorator))}var ot=A.createContext({}),Lr=A.forwardRef((e,o)=>{let r=A.useContext(ot);return A.createElement(Pr,{...e,...r,component:"div",ref:o,sx:{"& ul":{padding:0,margin:0,flexShrink:0}}})}),Sr=A.forwardRef(function(o,r){let{children:n,anchorEl:i,open:a,modifiers:t,...l}=o,s=[];n[0].forEach(c=>{c&&(s.push(c),s.push(...c.children||[]))});let d=s.length,m=36;return A.createElement(Br,{ref:r,anchorEl:i,open:a,modifiers:t},A.createElement(ot.Provider,{value:l},A.createElement(Ir,{itemData:s,height:m*8,width:"100%",outerElementType:Lr,innerElementType:"ul",itemSize:m,overscanCount:5,itemCount:d},Nr)))});function no(e){let{label:o,error:r,helperText:n,color:i,size:a,disabled:t,required:l,onChange:s,...d}=e,[m,c]=Dr(e.value||e.defaultValue),b=Ve(()=>e.options.map(v=>typeof v!="object"?{value:v,label:v}:v),[e.options]),f=Ve(()=>e.loading?{value:"",label:"",startDecorator:A.createElement(wr,{size:"sm",color:"neutral",variant:"plain",thickness:3})}:typeof m=="string"&&b.find(v=>v.value===m)||m,[m,e.options,e.loading]),y=Ve(()=>f?.startDecorator||e.startDecorator,[f]),p=Ve(()=>f?.endDecorator||e.endDecorator,[f]),k=A.createElement(Mr,{...d,required:l,onChange:(v,D)=>{c(D);let h=D;s?.({...v,target:{...v.target,value:h?.value}})},color:i,value:f,options:b,size:a,disabled:t,startDecorator:y,endDecorator:p,slots:{listbox:Sr},getOptionLabel:v=>`${v.value||""}`,renderGroup:v=>v});return o?A.createElement(F,{required:l,color:i,size:a,error:r,disabled:t},A.createElement(S,null,o),k,n&&A.createElement(w,null,n)):k}no.displayName="Autocomplete";import{Box as Hr}from"@mui/joy";import{motion as zr}from"framer-motion";var Er=zr(Hr),me=Er;me.displayName="Box";var Je=me;import O from"react";import{Breadcrumbs as nt,Link as jr}from"@mui/joy";import ao from"react";import{Menu as Or,MenuButton as Vr,MenuItem as Jr}from"@mui/joy";import{motion as io}from"framer-motion";var Yr=io(Or),de=e=>ao.createElement(Yr,{...e});de.displayName="Menu";var $r=io(Vr),pe=e=>ao.createElement($r,{...e});pe.displayName="MenuButton";var Wr=io(Jr),ce=e=>ao.createElement(Wr,{...e});ce.displayName="MenuItem";var tt=de;import{Dropdown as qr}from"@mui/joy";import{motion as Gr}from"framer-motion";var Ur=Gr(qr),ue=Ur;ue.displayName="Dropdown";var rt=ue;function lo(e){let{crumbs:o,size:r,startCrumbCount:n=1,endCrumbCount:i=3,slots:{link:a,...t}={link:jr},slotProps:{link:l,...s}={link:{color:"neutral"}},collapsed:d=!0,...m}=e,c=u=>u.type==="link"&&a?O.createElement(a,{to:u.linkHref,href:u.linkHref,...l},u.label):O.createElement(L,null,u.label);if(!d)return O.createElement(nt,{size:r,slots:t,slotProps:s,...m},o.map(u=>O.createElement(c,{...u})));let b=Math.max(1,i),f=o.slice(0,n).map(u=>O.createElement(c,{...u})),y=(n+b>o.length?o.slice(n):o.slice(-b)).map(u=>O.createElement(c,{...u})),p=o.slice(n,-b).map(u=>O.createElement(ce,null,O.createElement(c,{...u})));return O.createElement(nt,{size:r,slots:t,slotProps:s,...m},f,p.length&&O.createElement(rt,null,O.createElement(pe,{size:r,variant:"plain"},"..."),O.createElement(tt,{size:r},p)),y)}lo.displayName="Breadcrumbs";import _r,{forwardRef as Zr}from"react";import{Button as Xr}from"@mui/joy";import{motion as Qr}from"framer-motion";var Rr=Qr(Xr),ge=Zr((e,o)=>_r.createElement(Rr,{ref:o,...e}));ge.displayName="Button";var T=ge;import C,{Fragment as he,forwardRef as sn,useMemo as ct}from"react";import{styled as J}from"@mui/joy";import mn from"@mui/icons-material/esm/ChevronLeft.js";import dn from"@mui/icons-material/esm/ChevronRight.js";import{AnimatePresence as ut,motion as pn}from"framer-motion";var at=e=>{let o=[],r=new Date(e.getFullYear(),e.getMonth(),1),n=new Date(e.getFullYear(),e.getMonth()+1,0),i=Math.ceil((r.getDay()+1)/7),a=Math.ceil((n.getDate()+r.getDay())/7),t=1;for(let l=1;l<=a;l++){let s=[];for(let d=1;d<=7;d++)l===i&&d<r.getDay()+1||t>n.getDate()?s.push(void 0):(s.push(t),t++);o.push(s)}return o},it=(e,o)=>e.toLocaleString(o,{year:"numeric"}),so=(e,o)=>e.toLocaleString(o,{year:"numeric",month:"long"}),lt=(e,o)=>new Date(0,e).toLocaleString(o,{month:"short"}),st=e=>{let o=new Date().getDay(),r=new Date;return r.setDate(r.getDate()-o),Array.from({length:7}).map(()=>{let n=r.toLocaleString(e,{weekday:"short"});return r.setDate(r.getDate()+1),n})},mt=e=>{let o=new Date,r=new Date(e);return r.setHours(0,0,0,0),o.setHours(0,0,0,0),r.getTime()===o.getTime()},mo=(e,o)=>{let r=new Date(e),n=new Date(o);return r.setHours(0,0,0,0),n.setHours(0,0,0,0),r.getTime()===n.getTime()},q=(e,o,r)=>{let n=new Date(r);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},Ye=(e,o)=>e.getFullYear()===o.getFullYear()&&e.getMonth()===o.getMonth();import Kr from"react";import{IconButton as en}from"@mui/joy";import{motion as on}from"framer-motion";var tn=on(en),fe=e=>Kr.createElement(tn,{...e});fe.displayName="IconButton";var E=fe;import{useCallback as rn,useMemo as nn,useState as $e}from"react";import{useThemeProps as an}from"@mui/joy";var ln=(e,o)=>o.includes(e)?e:o[0],dt=e=>{let[o,r]=$e(()=>ln(e.view||"day",e.views||["day","month"])),[n,i]=$e(e.defaultValue),[a,t]=$e(()=>{let p=new Date;return p.setDate(1),p.setHours(0,0,0,0),e.value?.[0]||e.defaultValue?.[0]||p}),[[l,s],d]=$e([0,0]),m=e.view??o,c=p=>{d([l+p,p])},b=rn(p=>{t(p),m==="month"?a.getFullYear()!==p.getFullYear()&&c(p>a?1:-1):c(p>a?1:-1),e.onMonthChange?.(p)},[e.onMonthChange,a,m]),f=an({props:{locale:"default",views:["day","month"],view:m,value:e.value??n,...e,onChange:e.value?e.onChange:p=>{i(p),e.onChange?.(p)},onMonthChange:b,onViewChange:()=>{let p=m==="month"?"day":"month";!(!e.views||e.views.includes(p))||e.view===p||(e.onViewChange?e.onViewChange(p):r(p))}},name:"Calendar"}),y=nn(()=>({...f,viewMonth:a,direction:s}),[f,a,s]);return[f,y]};import{useCallback as K,useState as pt}from"react";var We=e=>{let[o,r]=pt(null),[n,i]=pt(null);return{calendarTitle:e.view==="month"?it(e.viewMonth,e.locale||"default"):so(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 t=new Date(e.viewMonth||new Date);t.setHours(0,0,0,0),t.setDate(a);let l=e.rangeSelection&&e.value&&e.value[0]&&(o&&q(e.value[0],o,t)||e.value[1]&&q(e.value[0],e.value[1],t));return{"aria-label":t.toLocaleDateString(),"aria-current":l?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,o]),getMonthCellProps:K(a=>{let t=new Date(e.viewMonth||new Date);t.setDate(1),t.setHours(0,0,0,0),t.setMonth(a);let s=!e.views?.find(d=>d==="day")&&e.rangeSelection&&e.value&&e.value[0]&&(n&&q(e.value[0],n,t)||e.value[1]&&q(e.value[0],e.value[1],t));return{"aria-label":t.toLocaleDateString(),"aria-current":s?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,n]),getPickerDayProps:K(a=>{let t=new Date(e.viewMonth||new Date);t.setHours(0,0,0,0),t.setDate(a);let l=!!e.value&&(mo(t,e.value[0])||e.value[1]&&mo(t,e.value[1])),s=e.rangeSelection&&e.value&&e.value[0]&&(o&&q(e.value[0],o,t)||e.value[1]&&q(e.value[0],e.value[1],t)),d=()=>{e.rangeSelection?e.value?e.value[0]&&!e.value[1]?e.onChange?.([new Date(Math.min(e.value[0].getTime(),t.getTime())),new Date(Math.max(e.value[0].getTime(),t.getTime()))]):e.onChange?.([t,void 0]):e.onChange?.([t,void 0]):e.onChange?.([t,void 0]),r(null)};return{isToday:mt(t),isSelected:l,onClick:d,onMouseEnter:e.rangeSelection&&e.value?.[0]&&!e.value?.[1]?()=>r(t):void 0,disabled:e.minDate&&t<e.minDate||e.maxDate&&t>e.maxDate||e.disableFuture&&t>new Date||e.disablePast&&t<(()=>{let m=new Date;return m.setHours(0,0,0,0),m})(),tabIndex:-1,"aria-label":t.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 t=new Date(e.viewMonth||new Date);t.setDate(1),t.setHours(0,0,0,0),t.setMonth(a);let l=!e.views?.find(c=>c==="day")&&e.rangeSelection,s=!!e.value&&(Ye(t,e.value[0])||e.value[1]&&Ye(t,e.value[1])),d=l&&e.value&&e.value[0]&&(n&&q(e.value[0],n,t)||e.value[1]&&q(e.value[0],e.value[1],t)),m=()=>{l?e.value?e.value[0]&&!e.value[1]?e.onChange?.([new Date(Math.min(e.value[0].getTime(),t.getTime())),new Date(Math.max(e.value[0].getTime(),t.getTime()))]):e.onChange?.([t,void 0]):e.onChange?.([t,void 0]):(e.onViewChange?.("day"),e.onMonthChange?.(t)),i(null)};return{isSelected:s,onMouseEnter:l&&e.value?.[0]&&!e.value?.[1]?()=>i(t):void 0,disabled:e.minDate&&(()=>{let c=new Date(t);return c.setMonth(c.getMonth()+1),c.setDate(0),c<e.minDate})()||e.maxDate&&(()=>{let c=new Date(t);return c.setDate(0),c>e.maxDate})()||e.disableFuture&&t>new Date||e.disablePast&&t<new Date&&!Ye(t,new Date),onClick:m,tabIndex:-1,"aria-label":so(t,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 cn=J("div",{name:"Calendar",slot:"root"})({maxWidth:"264px"}),un=J("div",{name:"Calendar",slot:"calendarHeader"})(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",padding:e.spacing(1)})),gt=J("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"})),ft=J(pn.table,{name:"Calendar",slot:"viewTable"})(({theme:e})=>({borderSpacing:0,"& td, & th":{padding:0},"& th":{paddingTop:e.spacing(1),paddingBottom:e.spacing(1)}})),gn=J("thead",{name:"Calendar",slot:"weekHeaderContainer"})({}),fn=J("tbody",{name:"Calendar",slot:"dayPickerContainer"})({}),hn=J(T,{name:"Calendar",slot:"switchViewButton"})(({ownerState:e})=>[e.view==="month"&&{pointerEvents:"none"}]),Cn=J("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=J("td",{name:"Calendar",slot:"monthCell"})(({theme:e})=>({"&[aria-current=date]":{position:"relative","& button[aria-current=date]:not([aria-selected=true]):not(:hover):not(:active)":{backgroundColor:`rgb(${e.palette.primary.lightChannel})`},'& + td[aria-hidden] + td[aria-current="date"]::before':{content:'""',position:"absolute",top:0,left:"-10px",bottom:0,width:"16px",backgroundColor:`rgb(${e.palette.primary.lightChannel})`,zIndex:-1}}})),yn=J(T,{name:"Calendar",slot:"month"})(({theme:e,isSelected:o,disabled:r})=>[{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}},r&&{color:e.palette.neutral.solidDisabledColor,backgroundColor:e.palette.neutral.solidDisabledBg}]),xn=J(T,{name:"Calendar",slot:"day"})(({theme:e,isToday:o,isSelected:r,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&&!r&&{"&:not([aria-current=date]):not(:hover)":{border:`1px solid ${e.palette.neutral.outlinedBorder}`}},r&&{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}]),ht={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,Ct=(e,o)=>Math.abs(e)*o,vn=e=>{let{ownerState:o}=e,{getPickerDayProps:r,getDayCellProps:n}=We(o),i=ct(()=>at(o.viewMonth),[o.viewMonth]),a=ct(()=>st(o.locale||"default"),[o.locale]);return C.createElement(gt,{calendarType:"datePicker"},C.createElement(ut,{initial:!1,custom:o.direction},C.createElement(ft,{key:`${o.viewMonth.toString()}_${o.direction}`,custom:o.direction,variants:ht,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:(t,{offset:l,velocity:s})=>{let d=Ct(l.x,s.x);if(d<-qe){let m=new Date(o.viewMonth||new Date);m.setMonth(m.getMonth()+1),o.onMonthChange?.(m)}else if(d>qe){let m=new Date(o.viewMonth||new Date);m.setMonth(m.getMonth()-1),o.onMonthChange?.(m)}}},C.createElement(gn,null,C.createElement("tr",null,a.map((t,l)=>C.createElement(C.Fragment,null,C.createElement("th",null,C.createElement(L,{level:"body-xs",textAlign:"center"},t)),l<6&&C.createElement("th",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"}))))),C.createElement(fn,null,i.map((t,l)=>C.createElement(he,{key:`${o.viewMonth}_${l}`},C.createElement("tr",null,t.map((s,d)=>s?C.createElement(he,{key:d},C.createElement(Cn,{...n(s)},C.createElement(xn,{size:"sm",variant:"plain",color:"neutral",...r(s)},s)),d<6&&C.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})):C.createElement(he,{key:d},C.createElement("td",null),d<6&&C.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})))),l<i.length-1&&C.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},C.createElement("td",{colSpan:13,style:{height:4}}))))))))},Dn=e=>{let{ownerState:o}=e,{getPickerMonthProps:r,getMonthCellProps:n}=We(o),i=Array.from({length:12},(t,l)=>l).reduce((t,l)=>(t[t.length-1].length===4&&t.push([]),t[t.length-1].push(l),t),[[]]),a=!o.views?.find(t=>t==="day")&&o.rangeSelection;return C.createElement(gt,{calendarType:a?"monthPicker":"datePicker"},C.createElement(ut,{initial:!1,custom:o.direction},C.createElement(ft,{key:`${o.viewMonth.getFullYear()}_${o.direction}`,custom:o.direction,variants:ht,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:(t,{offset:l,velocity:s})=>{let d=Ct(l.x,s.x);if(d<-qe){let m=new Date(o.viewMonth||new Date);m.setMonth(m.getMonth()+1),o.onMonthChange?.(m)}else if(d>qe){let m=new Date(o.viewMonth||new Date);m.setMonth(m.getMonth()-1),o.onMonthChange?.(m)}}},C.createElement("tbody",null,i.map((t,l)=>C.createElement(he,{key:l},C.createElement("tr",null,t.map((s,d)=>C.createElement(he,{key:s},C.createElement(bn,{...n(s)},C.createElement(yn,{size:"sm",variant:"plain",color:"neutral",...r(s)},lt(s,o.locale))),d<3&&C.createElement("td",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"})))),l<i.length-1&&C.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},C.createElement("td",{colSpan:7,style:{height:4}}))))))))},Ce=sn((e,o)=>{let[r,n]=dt(e),{value:i,defaultValue:a,onChange:t,locale:l,onViewChange:s,onMonthChange:d,view:m,views:c,rangeSelection:b,...f}=r,{calendarTitle:y,onPrev:p,onNext:u}=We(n);return C.createElement(cn,{ref:o,...f},C.createElement(un,null,C.createElement(E,{size:"sm",onClick:p},C.createElement(mn,null)),C.createElement(hn,{ownerState:n,variant:"plain",color:"neutral",onClick:s},y),C.createElement(E,{size:"sm",onClick:u},C.createElement(dn,null))),m==="day"&&C.createElement(vn,{ownerState:n}),m==="month"&&C.createElement(Dn,{ownerState:n}))});Ce.displayName="Calendar";var ee=Ce;import{Card as Mn,CardContent as kn,CardCover as Tn,CardActions as Pn,CardOverflow as wn}from"@mui/joy";import{motion as be}from"framer-motion";var Fn=be(Mn),ye=Fn;ye.displayName="Card";var An=be(kn),po=An;po.displayName="CardContent";var In=be(Tn),co=In;co.displayName="CardCover";var Bn=be(Pn),uo=Bn;uo.displayName="CardActions";var Nn=be(wn),go=Nn;go.displayName="CardOverflow";import Ln from"react";import{Checkbox as Sn}from"@mui/joy";import{motion as Hn}from"framer-motion";var zn=Hn(Sn),xe=e=>Ln.createElement(zn,{...e});xe.displayName="Checkbox";var ve=xe;import{styled as En}from"@mui/joy";import On,{forwardRef as Vn}from"react";var Jn=En("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}}})),fo=Vn(function(o,r){return On.createElement(Jn,{ref:r,...o})});fo.displayName="Container";import G,{useCallback as qn,useState as xt}from"react";import{IntlMessageFormat as Gn}from"intl-messageformat";import{NumericFormat as Un}from"react-number-format";import jn from"@mui/icons-material/esm/InfoOutlined.js";import De from"react";import{Input as Yn}from"@mui/joy";import{motion as $n}from"framer-motion";var bt=$n(Yn),Me=e=>{let{label:o,helperText:r,error:n,style:i,size:a,color:t,disabled:l,required:s,...d}=e;return o?De.createElement(F,{required:s,color:t,size:a,error:n,disabled:l},De.createElement(S,null,o),De.createElement(bt,{...d}),r&&De.createElement(w,null,r)):De.createElement(bt,{required:s,color:t,size:a,disabled:l,...d})};Me.displayName="Input";var U=Me;import Wn from"intl-messageformat";var yt=(e="usd")=>{let[o,r,n]=new Wn(`{amount, number, ::currency/${e} unit-width-narrow}`).format({amount:1e3}).toString().replace(/\d/g,"").split("");return{symbol:`${o} `,thousandSeparator:r,decimalSeparator:n,placeholder:n?`${o} 0${n}00`:`${o} 0`,fixedDecimalScale:!!n}};var _n=G.forwardRef(function(o,r){let{onChange:n,...i}=o;return G.createElement(Un,{...i,onValueChange:({floatValue:a})=>{n?.({target:{name:o.name,value:a?.toString()}})},valueIsNumericString:!0,getInputRef:r,decimalScale:2})}),vt=G.forwardRef(function(o,r){let{currency:n="usd",max:i=1e5,name:a,onChange:t,label:l,error:s,helperText:d,required:m,disabled:c,...b}=o,{symbol:f,thousandSeparator:y,decimalSeparator:p,placeholder:u,fixedDecimalScale:k}=yt(n),[v,D]=xt(o.value),[h,x]=xt(!!i&&!!o.value&&o.value>i),H=qn($=>{let X=Number($.target.value);D(X),t?.({...$,target:{name:a,value:X}}),i&&X>i?x(!0):x(!1)},[]),M=G.createElement(U,{...b,size:"sm",ref:r,value:v,placeholder:u,onChange:H,disabled:c,required:m,slotProps:{input:{component:_n,decimalSeparator:p,thousandSeparator:y,prefix:f,fixedDecimalScale:k}},sx:{fontFamily:"monospace"}});return l?G.createElement(F,{size:"sm",disabled:c,required:m,error:s||h},G.createElement(S,null,l),M,h?G.createElement(w,null,G.createElement(jn,null),new Gn(`limit: {amount, number, ::currency/${n} unit-width-narrow}`).format({amount:i})):d&&G.createElement(w,null,d)):M});import g,{useCallback as oe,useEffect as bo,useMemo as te,useRef as Kn,useState as ea}from"react";import{styled as oa,LinearProgress as ta}from"@mui/joy";import ra from"@mui/icons-material/esm/ChevronLeft.js";import na from"@mui/icons-material/esm/ChevronRight.js";import{Sheet as Zn}from"@mui/joy";import{motion as Xn}from"framer-motion";var Qn=Xn(Zn),ke=Qn;ke.displayName="Sheet";var j=ke;import Y from"react";import{Table as Rn}from"@mui/joy";var Te=e=>{let{children:o,...r}=e;return Y.createElement(Rn,{...r},o)};Te.displayName="Table";function ho(e){let{headCells:o,showCheckbox:r,onCheckboxChange:n,slots:{checkbox:i=ve}={},slotProps:{checkbox:a={}}={}}=e;return Y.createElement("thead",null,Y.createElement("tr",null,r&&Y.createElement("th",{style:{width:"40px",textAlign:"center"}},Y.createElement(i,{onChange:n,...a})),o.map(t=>Y.createElement("th",{key:t.label,style:{width:t.width,minWidth:t.minWidth,maxWidth:t.maxWidth,textAlign:t.numeric?"right":"left"}},t.label))))}ho.displayName="TableHead";function Co(e){let{rows:o,cellOrder:r,rowOptions:n,showCheckbox:i,onCheckboxChange:a,slots:{checkbox:t=ve}={},slotProps:{checkbox:l={}}={}}=e;return Y.createElement("tbody",null,o.map((s,d)=>Y.createElement("tr",{key:d},i&&Y.createElement("td",{style:{textAlign:"center"}},Y.createElement(t,{onChange:m=>a?.(m,d),...l})),r.map(m=>Y.createElement("td",{key:m,style:{textAlign:n?.[m]?.numeric?"right":"left"}},s[m])))))}Co.displayName="TableBody";var Dt=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"}}),Ge=e=>"Intl"in window?new Intl.NumberFormat().format(e):e;function aa(e){let{paginationModel:{page:o,pageSize:r},rowCount:n,onPageChange:i}=e,a=1,t=Math.ceil(n/r),l=[o-2,o-1].filter(c=>c>1),s=[o+1,o+2].filter(c=>c<=t-1),d=t>1&&o<t-3,m=t>1&&o>4;return g.createElement(z,{direction:"row",spacing:1,sx:{pt:1,pb:1},justifyContent:"end",alignItems:"center"},g.createElement(z,{direction:"row",spacing:.5,alignItems:"center"},g.createElement(E,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o-1),disabled:o===a,"aria-label":"Previous page"},g.createElement(ra,null)),o!==a&&g.createElement(T,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(a)},a),m&&g.createElement(T,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o-3)},"..."),l.map(c=>g.createElement(T,{key:c,size:"sm",variant:"plain",color:"neutral",onClick:()=>i(c)},c)),g.createElement(T,{variant:"soft",size:"sm"},o),s.map(c=>g.createElement(T,{key:c,size:"sm",variant:"plain",color:"neutral",onClick:()=>i(c)},c)),d&&g.createElement(T,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o+3)},"..."),o!==t&&g.createElement(T,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(t)},t),g.createElement(E,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o+1),disabled:o===t,"aria-label":"Next page"},g.createElement(na,null))))}var ia=e=>g.createElement(Je,{sx:{position:"absolute",top:0,right:0,bottom:0,width:"4px",cursor:"col-resize"},onMouseDown:o=>{let r=o.clientX,n=e.current?.getBoundingClientRect().width,i=t=>{n&&r&&(e.current.style.width=`${n+(t.clientX-r)}px`)},a=()=>{document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",a)};document.addEventListener("mousemove",i),document.addEventListener("mouseup",a)}}),la=e=>{let o=Kn(null),r={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?ia(o):null;return g.createElement("th",{ref:o,key:e.field,style:r},e.headerName??e.field,n)};function sa({rows:e,columns:o,rowCount:r,paginationMode:n,paginationModel:i,onPaginationModelChange:a,selectionModel:t=[],onSelectionModelChange:l,getId:s,isTotalSelected:d}){let[m,c]=ea(i?.page||1),b=i?.pageSize||20,f=oe((h,x)=>s?.(h)??h?.id??`${(x||0)+(m-1)*b}`,[s??m,b]),y=te(()=>new Set(t),[t]),p=te(()=>n==="server"?e:e.slice((m-1)*b,(m-1)*b+b),[e,m,b,n]),u=te(()=>p.length>0&&p.every((h,x)=>y.has(f(h,x))),[p,y,m,b,f]),k=r||e.length,v=te(()=>d??(k>0&&t.length===k),[d,t,k]),D=oe(h=>{c(h),a?.({page:h,pageSize:b})},[a]);return bo(()=>{D(1)},[k]),bo(()=>{m>Math.ceil(k/b)&&D(Math.ceil(k/b))},[k,b]),bo(()=>{l?.([])},[m]),{rowCount:k,page:m,pageSize:b,onPaginationModelChange:D,getId:f,HeadCell:la,dataInPage:p,isAllSelected:u,isTotalSelected:v,isSelectedRow:oe(h=>y.has(h),[y]),onAllCheckboxChange:oe(()=>{l?.(u?[]:p.map(f))},[u,p,l]),onCheckboxChange:oe((h,x)=>{if(y.has(x)){let H=t.filter(M=>M!==x);l?.(H)}else{let H=[...t,x];l?.(H)}},[t,l]),columns:te(()=>o||Object.keys(e[0]||{}).map(h=>({field:h})),[e,o]),onTotalSelect:oe(()=>{l?.(v?[]:e.map(f),!v)},[v,e,l])}}function yo(e){let{rows:o,checkboxSelection:r,selectionModel:n,onSelectionModelChange:i,rowCount:a,columns:t,onPaginationModelChange:l,paginationMode:s,paginationModel:d,loading:m,slots:{checkbox:c=ve,toolbar:b,footer:f,loadingOverlay:y=()=>g.createElement(ta,{value:8,variant:"plain"})}={},slotProps:{checkbox:p={},toolbar:u,background:k={}}={},...v}=e,{columns:D,isAllSelected:h,isSelectedRow:x,onAllCheckboxChange:H,onCheckboxChange:M,getId:$,rowCount:X,page:Xo,pageSize:Qo,onPaginationModelChange:Wt,dataInPage:qt,isTotalSelected:Ro,onTotalSelect:Ko,HeadCell:Gt}=sa(e);return g.createElement(Je,null,g.createElement(z,{direction:"row",sx:{pt:1,pb:1},justifyContent:"space-between",alignItems:"center"},!!r&&g.createElement(z,{direction:"row",spacing:1},!h&&g.createElement(L,{level:"body-xs"},Ge(n?.length||0)," items selected"),h&&!Ro&&g.createElement(z,{direction:"row",spacing:1,alignItems:"center"},g.createElement(L,{level:"body-xs"},"All ",Ge(n?.length||0)," items on this page are selected."),g.createElement(T,{size:"sm",variant:"plain",onClick:Ko},"Select all ",Ge(X??o.length)," items")),Ro&&g.createElement(z,{direction:"row",spacing:1,alignItems:"center"},g.createElement(L,{level:"body-xs"},"All ",Ge(X??o.length)," items are selected."),g.createElement(T,{size:"sm",variant:"plain",color:"danger",onClick:Ko},"Cancel"))),b&&g.createElement(b,{...u||{}})),g.createElement(j,{variant:"outlined",sx:{overflow:"auto",width:"100%",boxShadow:"sm",borderRadius:"sm"},...k},g.createElement(Te,{...v},g.createElement("thead",null,g.createElement("tr",null,r&&g.createElement("th",{style:{width:"40px",textAlign:"center"}},g.createElement(c,{onChange:H,checked:h,indeterminate:(n||[]).length>0&&!h,...p})),D.map(Q=>g.createElement(Gt,{key:Q.field,stickyHeader:e.stickyHeader,...Q})))),g.createElement("tbody",null,g.createElement(Dt,null,!!m&&g.createElement("td",null,g.createElement(Je,{sx:{position:"absolute",top:0,left:0,right:0}},g.createElement(y,null)))),g.createElement(Dt,null),qt.map((Q,Ut)=>{let R=$(Q,Ut);return g.createElement("tr",{key:R,role:r?"checkbox":void 0,tabIndex:r?-1:void 0,onClick:r?W=>M(W,R):void 0,"aria-checked":r?x(R):void 0},r&&g.createElement("th",{scope:"row",style:{textAlign:"center"}},g.createElement(c,{onChange:W=>M(W,R),checked:x(R),...p})),D.map(W=>g.createElement("td",{key:W.field,style:{textAlign:W.type==="number"?"end":"start"}},W.renderCell?.({row:Q,value:Q[W.field],id:R})??Q[W.field])))})),f&&g.createElement(f,null))),g.createElement(aa,{paginationModel:te(()=>({page:Xo,pageSize:Qo}),[Xo,Qo]),rowCount:X,onPageChange:Wt}))}yo.displayName="DataTable";import I,{forwardRef as ga,useCallback as Mt,useEffect as fa,useState as kt}from"react";import{IMaskInput as ha,IMask as xo}from"react-imask";import Ca from"@mui/icons-material/esm/CalendarToday.js";import{styled as Tt}from"@mui/joy";import{FocusTrap as ba,ClickAwayListener as ya,Popper as xa}from"@mui/base";import{DialogActions as ma,styled as da}from"@mui/joy";import{motion as pa}from"framer-motion";var ca=pa(ma),ua=da(ca)(({theme:e})=>({padding:e.spacing(1),gap:e.spacing(1),flexDirection:"row",justifyContent:"flex-end"})),Pe=ua;Pe.displayName="DialogActions";var _=Pe;var va=Tt(xa,{name:"DatePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Da=Tt(j,{name:"DatePicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),Pt=e=>{let o=`${e.getDate()}`,r=`${e.getMonth()+1}`,n=e.getFullYear();return Number(o)<10&&(o="0"+o),Number(r)<10&&(r="0"+r),[n,r,o].join("/")},Ma=I.forwardRef(function(o,r){let{onChange:n,...i}=o;return I.createElement(ha,{...i,inputRef:r,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/`m/`d",blocks:{d:{mask:xo.MaskedRange,from:1,to:31,maxLength:2},m:{mask:xo.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:xo.MaskedRange,from:1900,to:9999}},format:Pt,parse:a=>{let t=a.split("/");return new Date(Number(t[0]),Number(t[1])-1,Number(t[2]))},autofix:"pad",overwrite:!0})}),vo=ga((e,o)=>{let{onChange:r,disabled:n,label:i,error:a,helperText:t,minDate:l,maxDate:s,disableFuture:d,disablePast:m,required:c,...b}=e,[f,y]=kt(e.value||""),[p,u]=kt(null),k=!!p;fa(()=>{y(e.value||"")},[e.value]);let v=Mt(x=>{y(x.target.value),r?.(x)},[]),D=Mt(x=>{u(p?null:x.currentTarget)},[p,u]),h=I.createElement(I.Fragment,null,I.createElement(U,{...b,ref:o,size:"sm",value:f,onChange:v,placeholder:"YYYY/MM/DD",disabled:n,required:c,slotProps:{input:{component:Ma}},sx:{fontFamily:"monospace"},endDecorator:I.createElement(E,{variant:"plain",onClick:D},I.createElement(Ca,null))}),k&&I.createElement(ya,{onClickAway:()=>u(null)},I.createElement(va,{id:"date-picker-popper",open:!0,anchorEl:p,placement:"bottom-end",modifiers:[{name:"offset",options:{offset:[4,4]}}]},I.createElement(ba,{open:!0},I.createElement(Da,{tabIndex:-1,role:"presentation"},I.createElement(ee,{value:Number.isNaN(new Date(f).getTime())?void 0:[new Date(f),void 0],onChange:([x])=>{y(Pt(x)),u(null)},minDate:l?new Date(l):void 0,maxDate:s?new Date(s):void 0,disableFuture:d,disablePast:m}),I.createElement(_,{sx:{p:1}},I.createElement(T,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{y(""),u(null)}},"Clear")))))));return i?I.createElement(F,{required:c,disabled:n,error:a,size:"sm"},I.createElement(S,null,i),h,t&&I.createElement(w,null,t)):h});vo.displayName="DatePicker";import B,{forwardRef as ka,useCallback as Do,useEffect as Ta,useMemo as Pa,useState as wt}from"react";import{IMaskInput as wa,IMask as Mo}from"react-imask";import Fa from"@mui/icons-material/esm/CalendarToday.js";import{styled as Ft}from"@mui/joy";import{FocusTrap as Aa,ClickAwayListener as Ia,Popper as Ba}from"@mui/base";var Na=Ft(Ba,{name:"DateRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),La=Ft(j,{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})),At=([e,o])=>{let r=n=>{let i=`${n.getDate()}`,a=`${n.getMonth()+1}`,t=n.getFullYear();return Number(i)<10&&(i="0"+i),Number(a)<10&&(a="0"+a),[t,a,i].join("/")};return[r(e),o?r(o):""].join(" - ")},It=e=>{let o=e.split(" - ")[0]||"",r=e.split(" - ")[1]||"",n=o.split("/"),i=r.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]))]},Sa=B.forwardRef(function(o,r){let{onChange:n,...i}=o;return B.createElement(wa,{...i,inputRef:r,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/`m/`d - 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:It,autofix:"pad",overwrite:!0})}),ko=ka((e,o)=>{let{onChange:r,disabled:n,label:i,error:a,helperText:t,minDate:l,maxDate:s,disableFuture:d,disablePast:m,required:c,...b}=e,[f,y]=wt(e.value||""),[p,u]=wt(null),k=!!p,v=Pa(()=>f?It(f):void 0,[f]);Ta(()=>{y(e.value||"")},[e.value]);let D=Do(M=>{y(M.target.value),r?.(M)},[r]),h=Do(M=>{u(p?null:M.currentTarget)},[p,u]),x=Do(([M,$])=>{!M||!$||(y(At([M,$])),u(null))},[y,u]),H=B.createElement(B.Fragment,null,B.createElement(U,{...b,ref:o,size:"sm",value:f,onChange:D,disabled:n,required:c,placeholder:"YYYY/MM/DD - YYYY/MM/DD",slotProps:{input:{component:Sa}},sx:{fontFamily:"monospace"},endDecorator:B.createElement(E,{variant:"plain",onClick:h},B.createElement(Fa,null))}),k&&B.createElement(Ia,{onClickAway:()=>u(null)},B.createElement(Na,{id:"date-range-picker-popper",open:!0,anchorEl:p,placement:"bottom-end",modifiers:[{name:"offset",options:{offset:[4,4]}}]},B.createElement(Aa,{open:!0},B.createElement(La,{tabIndex:-1,role:"presentation"},B.createElement(ee,{rangeSelection:!0,defaultValue:v,onChange:x,minDate:l?new Date(l):void 0,maxDate:s?new Date(s):void 0,disableFuture:d,disablePast:m}),B.createElement(_,{sx:{p:1}},B.createElement(T,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{y(""),u(null)}},"Clear")))))));return i?B.createElement(F,{required:c,disabled:n,error:a,size:"sm"},B.createElement(S,null,i),H,t&&B.createElement(w,null,t)):H});ko.displayName="DateRangePicker";import{DialogContent as Ha,styled as za}from"@mui/joy";import{motion as Ea}from"framer-motion";var Oa=Ea(Ha),Va=za(Oa)(({theme:e})=>({padding:e.spacing(0,3,2.5)})),we=Va;we.displayName="DialogContent";var Ue=we;import{DialogTitle as Ja,styled as Ya}from"@mui/joy";import{motion as $a}from"framer-motion";var Wa=$a(Ja),qa=Ya(Wa)(({theme:e})=>({padding:e.spacing(2,3)})),Fe=qa;Fe.displayName="DialogTitle";var je=Fe;import Ie from"react";import _e from"react";import{Modal as Ga,ModalDialog as Ua,ModalClose as ja,ModalOverflow as _a,styled as Bt}from"@mui/joy";import{motion as Ze}from"framer-motion";var Za=Ze(Ga),To=Za;To.displayName="Modal";var Xa=Ze(Ua),Nt=Bt(Xa)({padding:0}),Ae=Nt;Ae.displayName="ModalDialog";var Qa=Bt(Ze(ja))(({theme:e})=>({top:e.spacing(1.5),right:e.spacing(3)})),Xe=Qa;Xe.displayName="ModalClose";var Ra=Ze(_a),Po=Ra;Po.displayName="ModalOverflow";function wo(e){let{title:o,children:r,...n}=e;return _e.createElement(Nt,{...n},_e.createElement(Xe,null),_e.createElement(je,null,o),_e.createElement(Ue,null,r))}wo.displayName="ModalFrame";import{styled as Ka}from"@mui/joy";var ei=Ka(Ae)(({theme:e})=>({padding:0})),Fo=Ie.forwardRef((e,o)=>{let{title:r,children:n,actions:i,...a}=e;return Ie.createElement(ei,{ref:o,...a},Ie.createElement(je,null,r),Ie.createElement(Ue,null,n),Ie.createElement(_,null,i))});Fo.displayName="DialogFrame";import oi from"react";import{Divider as ti}from"@mui/joy";import{motion as ri}from"framer-motion";var ni=ri(ti),Be=e=>oi.createElement(ni,{...e});Be.displayName="Divider";import ai from"react";import{Drawer as ii}from"@mui/joy";import{motion as li}from"framer-motion";var si=li(ii),Ao=e=>{let{children:o,...r}=e;return ai.createElement(si,{...r,slotProps:{...r.slotProps,content:{...r.slotProps?.content,sx:{bgcolor:"transparent",p:{md:3,sm:0},boxShadow:"none"}}}},o)};Ao.displayName="InsetDrawer";import P,{useCallback as Qe,useEffect as mi,useRef as Lt,useState as Io}from"react";import{styled as re}from"@mui/joy";import di from"@mui/icons-material/esm/Delete.js";import{combine as pi}from"@atlaskit/pragmatic-drag-and-drop/combine";import{dropTargetForExternal as ci,monitorForExternal as ui}from"@atlaskit/pragmatic-drag-and-drop/external/adapter";import{containsFiles as St,getFiles as gi}from"@atlaskit/pragmatic-drag-and-drop/external/file";import{preventUnhandled as Ht}from"@atlaskit/pragmatic-drag-and-drop/prevent-unhandled";var fi=re("input")({width:"1px",height:"1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",position:"absolute"}),hi=re("div",{name:"FileUpload",slot:"PreviewRoot"})(({theme:e})=>({display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(300px, auto))",gap:"8px"})),Ci=e=>{let{files:o,onDelete:r}=e;return P.createElement(hi,null,o.map(n=>P.createElement(ye,{key:n.name},P.createElement(z,{style:{aspectRatio:"4/3",height:"200px"},alignItems:"center",justifyContent:"center"},n.type.startsWith("image/")?P.createElement("img",{style:{width:"100%",height:"100%",objectFit:"cover"},src:URL.createObjectURL(n),alt:n.name}):P.createElement(L,{level:"title-md",textColor:"neutral.400"},n.type)),P.createElement(z,{direction:"row",justifyContent:"space-between",gap:"8px"},P.createElement(z,null,P.createElement(L,{level:"title-sm",textColor:"common.black"},n.name),P.createElement(L,{level:"body-sm",textColor:"neutral.600"},(n.size/1e3).toFixed(2),"KB")),P.createElement(E,{onClick:()=>r?.(n)},P.createElement(di,null))))))},bi=re(z,{name:"FileUpload",slot:"root"})(({theme:e})=>({gap:e.spacing(1)})),yi=re("label",{name:"FileUpload",slot:"label"})({}),xi=re("div",{name:"FileUpload",slot:"dropZone"})(({theme:e,state:o})=>({width:"100%",backgroundColor:o==="over"?e.palette.background.level2:e.palette.background.backdrop,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",padding:e.spacing(3),gap:e.spacing(2),border:o==="idle"?"2px solid rgba(0,0,0,0)":`2px dashed ${e.palette.primary[400]}`})),vi=re(T,{name:"FileUpload",slot:"button"})({}),Bo=P.memo(e=>{let{accept:o,maxCount:r,name:n,maxTotalSize:i,maxSizePerFile:a,onChange:t}=e,l=Lt(null),s=Lt(null),[d,m]=Io([]),[c,b]=Io("idle"),[f,y]=Io(),p=Qe(D=>{try{a&&D.forEach(x=>{if(x.size>a)throw new Error(`File size exceeds the limit: ${a}`)});let h=[...d,...D];if(r&&h.length>r)throw new Error(`File count exceeds the limit: ${r}`);if(i&&h.reduce((x,H)=>x+H.size,0)>i)throw new Error(`Total file size exceeds the limit: ${i}`);t?.({target:{name:n,value:h}}),y(void 0),m(h)}catch(h){y(h.message)}},[d]);mi(()=>{let D=l.current;if(!D)throw new Error("Drop zone ref is not set");return pi(ci({element:D,canDrop:St,onDragEnter:()=>b("over"),onDragLeave:()=>b("potential"),onDrop:async({source:h})=>{let x=await gi({source:h});p(x)}}),ui({canMonitor:St,onDragStart:()=>{b("potential"),Ht.start()},onDrop:()=>{b("idle"),Ht.stop()}}))});let u=Qe(D=>{let h=Array.from(D.target.files||[]);p(h)},[p]),k=Qe(D=>{m(h=>(t?.({target:{name:n,value:h.filter(x=>x!==D)}}),h.filter(x=>x!==D)))},[]),v=Qe(()=>{s.current?.click()},[]);return P.createElement(bi,null,P.createElement(F,{error:!!f},P.createElement(xi,{state:c,ref:l},P.createElement(yi,null,P.createElement(L,{level:"h3",textColor:"background.tooltip"},"Drop files"),P.createElement(fi,{type:"file",onChange:u,multiple:!0,accept:o,ref:s})),P.createElement(vi,{variant:"soft",color:"neutral",onClick:v},"Select Files"),f&&P.createElement(w,null,f))),P.createElement(Ci,{files:d,onDelete:k}))});Bo.displayName="FileUpload";import{Grid as Di}from"@mui/joy";import{motion as Mi}from"framer-motion";var ki=Mi(Di),No=ki;No.displayName="Grid";import Z from"react";import Ti from"react-markdown";import{Link as Pi}from"@mui/joy";var Lo=e=>{let{...o}=e;return Z.createElement(Ti,{...o,components:{h1:({children:r})=>Z.createElement(V,{level:"h1"},r),h2:({children:r})=>Z.createElement(V,{level:"h2"},r),h3:({children:r})=>Z.createElement(V,{level:"h3"},r),h4:({children:r})=>Z.createElement(V,{level:"h4"},r),p:({children:r})=>Z.createElement(V,null,r),a:({children:r,href:n})=>Z.createElement(Pi,{href:n},r),hr:()=>Z.createElement(Be,null),...o?.components}})};Lo.displayName="Markdown";import N,{forwardRef as wi,useCallback as So,useEffect as Fi,useMemo as Ai,useState as zt}from"react";import{IMaskInput as Ii,IMask as Et}from"react-imask";import Bi from"@mui/icons-material/esm/CalendarToday.js";import{styled as Ot}from"@mui/joy";import{FocusTrap as Ni,ClickAwayListener as Li,Popper as Si}from"@mui/base";var Hi=Ot(Si,{name:"MonthRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),zi=Ot(j,{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})),Ho=e=>{let o=`${e.getMonth()+1}`,r=e.getFullYear();return Number(o)<10&&(o="0"+o),[r,o].join("/")},zo=([e,o])=>{let r=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 Ho(a)};return[r(e),r(o)].join(" - ")},Eo=e=>{let o=e.split(" - ")[0]||"",r=e.split(" - ")[1]||"";return[o,r]},Ei=N.forwardRef(function(o,r){let{onChange:n,...i}=o;return N.createElement(Ii,{...i,inputRef:r,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/m - Y/m",blocks:{m:{mask:Et.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Et.MaskedRange,from:1900,to:9999}},format:zo,parse:Eo})}),Oo=wi((e,o)=>{let{onChange:r,disabled:n,label:i,error:a,helperText:t,minDate:l,maxDate:s,disableFuture:d,disablePast:m,required:c,...b}=e,[f,y]=zt(""),[p,u]=zt(null),k=!!p,v=Ai(()=>f?Eo(f).map(M=>new Date(M)):void 0,[f]);Fi(()=>{y(e.value?zo(Eo(e.value)):"")},[e.value]);let D=So(M=>{y(M.target.value),r?.(M)},[r]),h=So(M=>{u(p?null:M.currentTarget)},[p,u]),x=So(([M,$])=>{!M||!$||(y(zo([Ho(M),Ho($)])),u(null))},[y,u]),H=N.createElement(N.Fragment,null,N.createElement(U,{...b,ref:o,size:"sm",value:f,onChange:D,disabled:n,required:c,placeholder:"YYYY/MM - YYYY/MM",slotProps:{input:{component:Ei}},sx:{fontFamily:"monospace"},endDecorator:N.createElement(E,{variant:"plain",onClick:h},N.createElement(Bi,null))}),k&&N.createElement(Li,{onClickAway:()=>u(null)},N.createElement(Hi,{id:"date-range-picker-popper",open:!0,anchorEl:p,placement:"bottom-end",modifiers:[{name:"offset",options:{offset:[4,4]}}]},N.createElement(Ni,{open:!0},N.createElement(zi,{tabIndex:-1,role:"presentation"},N.createElement(ee,{view:"month",views:["month"],rangeSelection:!0,defaultValue:v,onChange:x,minDate:l?new Date(l):void 0,maxDate:s?new Date(s):void 0,disableFuture:d,disablePast:m}),N.createElement(_,{sx:{p:1}},N.createElement(T,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{y(""),u(null)}},"Clear")))))));return i?N.createElement(F,{required:c,disabled:n,error:a,size:"sm"},N.createElement(S,null,i),H,t&&N.createElement(w,null,t)):H});Oo.displayName="MonthRangePicker";import{Radio as Oi,RadioGroup as Vi}from"@mui/joy";import{motion as Vt}from"framer-motion";var Ji=Vt(Oi),Ne=Ji;Ne.displayName="Radio";var Yi=Vt(Vi),Le=Yi;Le.displayName="RadioGroup";import Jt from"react";function Vo(e){let{items:o,...r}=e;return Jt.createElement(Le,{...r},o.map(n=>Jt.createElement(Ne,{key:`${n.value}`,value:n.value,label:n.label})))}Vo.displayName="RadioList";import Re from"react";import{Select as $i,Option as Wi}from"@mui/joy";import{motion as qi}from"framer-motion";var Gi=qi(Wi),Jo=Gi;Jo.displayName="Option";function Yo(e){let{label:o,helperText:r,error:n,size:i,color:a,disabled:t,required:l,onChange:s,...d}=e,c=Re.createElement($i,{...d,required:l,disabled:t,size:i,color:a,onChange:(b,f)=>{let y=b||{target:{}},p={...y,target:{name:y.target?.name||e.name,value:f||void 0}};s?.(p)}});return o?Re.createElement(F,{required:l,disabled:t,size:i,color:a,error:n},Re.createElement(S,null,o),c,r&&Re.createElement(w,null,r)):c}Yo.displayName="Select";import Yt from"react";import{Switch as Ui,styled as ji,switchClasses as _i}from"@mui/joy";import{motion as $t}from"framer-motion";var Zi=$t(Ui),Xi=ji($t.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)",[`&.${_i.checked}`]:{left:"unset",right:"var(--Switch-thumbOffset)"}}),Qi=e=>Yt.createElement(Xi,{...e,layout:!0,transition:Ri}),Ri={type:"spring",stiffness:700,damping:30},$o=e=>Yt.createElement(Zi,{...e,slots:{thumb:Qi,...e.slots}});$o.displayName="Switch";import{Tabs as Ki,Tab as el,TabList as ol,TabPanel as tl,styled as rl,tabClasses as nl}from"@mui/joy";import{motion as Ke}from"framer-motion";var al=Ke(Ki),Wo=al;Wo.displayName="Tabs";var il=rl(Ke(el))(({theme:e})=>({[`&:not(.${nl.selected})`]:{color:e.palette.neutral[700]}})),qo=il;qo.displayName="Tab";var ll=Ke(ol),Go=ll;Go.displayName="TabList";var sl=Ke(tl),Uo=sl;Uo.displayName="TabPanel";import eo from"react";import{Textarea as ml}from"@mui/joy";import{motion as dl}from"framer-motion";var pl=dl(ml),jo=e=>{let{label:o,error:r,helperText:n,color:i,size:a,disabled:t,required:l,...s}=e,d=eo.createElement(pl,{required:l,disabled:t,color:i,size:a,...s});return o?eo.createElement(F,{required:l,disabled:t,color:i,size:a,error:r},eo.createElement(S,null,o),d,n&&eo.createElement(w,null,n)):d};jo.displayName="Textarea";import oo from"react";import{CssBaseline as cl,CssVarsProvider as ul,checkboxClasses as gl,extendTheme as fl}from"@mui/joy";var hl=fl({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)"},[`& .${gl.root}`]:{verticalAlign:"middle"}})}},JoyTooltip:{defaultProps:{size:"sm",placement:"top"}}}});function _o(e){return oo.createElement(oo.Fragment,null,oo.createElement(ul,{theme:hl},oo.createElement(cl,null),e.children))}_o.displayName="ThemeProvider";import Cl from"react";import{Tooltip as bl}from"@mui/joy";import{motion as yl}from"framer-motion";var xl=yl(bl),Zo=e=>Cl.createElement(xl,{...e});Zo.displayName="Tooltip";export{Ee as Accordion,ze as AccordionDetails,He as AccordionSummary,to as Accordions,ro as Alert,Ef as AspectRatio,no as Autocomplete,Ff as AutocompleteListbox,Af as AutocompleteOption,Lf as Avatar,Hf as AvatarGroup,Vf as Badge,me as Box,lo as Breadcrumbs,ge as Button,Ce as Calendar,ye as Card,uo as CardActions,po as CardContent,co as CardCover,go as CardOverflow,xe as Checkbox,jf as Chip,Zf as CircularProgress,fo as Container,vt as CurrencyInput,yo as DataTable,vo as DatePicker,ko as DateRangePicker,Pe as DialogActions,we as DialogContent,Fo as DialogFrame,Fe as DialogTitle,Be as Divider,Qf as Drawer,ue as Dropdown,Bo as FileUpload,ie as FormControl,se as FormHelperText,le as FormLabel,No as Grid,fe as IconButton,Me as Input,Ao as InsetDrawer,Kf as LinearProgress,fh as Link,oh as List,rh as ListDivider,ah as ListItem,lh as ListItemButton,mh as ListItemContent,ph as ListItemDecorator,uh as ListSubheader,Lo as Markdown,de as Menu,pe as MenuButton,ce as MenuItem,To as Modal,Xe as ModalClose,Ae as ModalDialog,wo as ModalFrame,Po as ModalOverflow,Oo as MonthRangePicker,Jo as Option,Ne as Radio,Le as RadioGroup,Vo as RadioList,Yo as Select,ke as Sheet,Ph as Skeleton,Ch as Slider,ae as Stack,yh as Step,vh as StepButton,Mh as StepIndicator,kh as Stepper,$o as Switch,qo as Tab,Go as TabList,Uo as TabPanel,Te as Table,Co as TableBody,ho as TableHead,Wo as Tabs,jo as Textarea,_o as ThemeProvider,Zo as Tooltip,V as Typography,kf as accordionClasses,Tf as accordionDetailsClasses,wf as accordionSummaryClasses,Pf as accordionsClasses,$g as alertClasses,Of as aspectRatioClasses,If as autocompleteClasses,Bf as autocompleteListboxClasses,Nf as autocompleteOptionClasses,Sf as avatarClasses,zf as avatarGroupClasses,Jf as badgeClasses,Wg as boxClasses,Yf as breadcrumbsClasses,qg as buttonClasses,Wf as cardActionsClasses,$f as cardClasses,qf as cardContentClasses,Gf as cardCoverClasses,Uf as cardOverflowClasses,Gg as checkboxClasses,_f as chipClasses,Xf as circularProgressClasses,yf as dialogActionsClasses,bf as dialogContentClasses,Cf as dialogTitleClasses,Ug as dividerClasses,Rf as drawerClasses,lf as formControlClasses,mf as formHelperTextClasses,sf as formLabelClasses,df as gridClasses,jg as iconButtonClasses,_g as inputClasses,eh as linearProgressClasses,hh as linkClasses,th as listClasses,nh as listDividerClasses,sh as listItemButtonClasses,ih as listItemClasses,dh as listItemContentClasses,ch as listItemDecoratorClasses,gh as listSubheaderClasses,Xg as menuButtonClasses,Zg as menuClasses,Qg as menuItemClasses,uf as modalClasses,gf as modalCloseClasses,ff as modalDialogClasses,hf as modalOverflowClasses,Rg as optionClasses,Kg as radioClasses,ef as radioGroupClasses,of as selectClasses,cf as sheetClasses,wh as skeletonClasses,bh as sliderClasses,pf as stackClasses,Dh as stepButtonClasses,xh as stepClasses,Th as stepperClasses,tf as switchClasses,Df as tabListClasses,Mf as tabPanelClasses,rf as tableClasses,vf as tabsClasses,nf as textareaClasses,xf as tooltipClasses,af as typographyClasses,Jg as useColorScheme,Vg as useTheme,Yg as useThemeProps};
|
|
1
|
+
import{useTheme as Yg,useColorScheme as $g,useThemeProps as Wg,alertClasses as qg,boxClasses as Gg,buttonClasses as Ug,checkboxClasses as jg,dividerClasses as _g,iconButtonClasses as Zg,inputClasses as Xg,menuClasses as Qg,menuButtonClasses as Rg,menuItemClasses as Kg,optionClasses as ef,radioClasses as of,radioGroupClasses as tf,selectClasses as rf,switchClasses as nf,tableClasses as af,textareaClasses as lf,typographyClasses as sf,formControlClasses as mf,formLabelClasses as df,formHelperTextClasses as pf,gridClasses as cf,stackClasses as uf,sheetClasses as gf,modalClasses as ff,modalCloseClasses as hf,modalDialogClasses as Cf,modalOverflowClasses as bf,dialogTitleClasses as yf,dialogContentClasses as xf,dialogActionsClasses as vf,tooltipClasses as Df,tabsClasses as Mf,tabListClasses as kf,tabPanelClasses as Tf,accordionClasses as Pf,accordionDetailsClasses as wf,accordionGroupClasses as Ff,accordionSummaryClasses as Af,AutocompleteListbox as If,AutocompleteOption as Bf,autocompleteClasses as Nf,autocompleteListboxClasses as Lf,autocompleteOptionClasses as Sf,Avatar as Hf,avatarClasses as zf,AvatarGroup as Ef,avatarGroupClasses as Of,AspectRatio as Vf,aspectRatioClasses as Jf,Badge as Yf,badgeClasses as $f,breadcrumbsClasses as Wf,cardClasses as qf,cardActionsClasses as Gf,cardContentClasses as Uf,cardCoverClasses as jf,cardOverflowClasses as _f,Chip as Zf,chipClasses as Xf,CircularProgress as Qf,circularProgressClasses as Rf,Drawer as Kf,drawerClasses as eh,LinearProgress as oh,linearProgressClasses as th,List as rh,listClasses as nh,ListDivider as ah,listDividerClasses as ih,ListItem as lh,listItemClasses as sh,ListItemButton as mh,listItemButtonClasses as dh,ListItemContent as ph,listItemContentClasses as ch,ListItemDecorator as uh,listItemDecoratorClasses as gh,ListSubheader as fh,listSubheaderClasses as hh,Link as Ch,linkClasses as bh,Slider as yh,sliderClasses as xh,Step as vh,stepClasses as Dh,StepButton as Mh,stepButtonClasses as kh,StepIndicator as Th,Stepper as Ph,stepperClasses as wh,Skeleton as Fh,skeletonClasses as Ah}from"@mui/joy";import ne from"react";import{AccordionGroup as Zt,Accordion as Xt,AccordionSummary as Qt,AccordionDetails as Rt}from"@mui/joy";import{motion as Se}from"framer-motion";var Kt=Se(Qt),He=Kt;He.displayName="AccordionSummary";var er=Se(Rt),ze=er;ze.displayName="AccordionDetails";var or=Se(Xt);function Ee(e){let{summary:o,details:t,variant:n,color:i,...a}=e,r=n==="solid"?"solid":void 0;return ne.createElement(or,{variant:r,color:i,...a},ne.createElement(He,{variant:r,color:i},o),ne.createElement(ze,{variant:r,color:i},t))}Ee.displayName="Accordion";var tr=Se(Zt);function ro(e){let{variant:o,color:t,items:n,...i}=e;return ne.createElement(tr,{variant:o,color:t,...i},n.map((a,r)=>ne.createElement(Ee,{key:r,summary:a.summary,details:a.details,index:r,variant:o,color:t})))}ro.displayName="Accordions";import Oe from"react";import{Alert as dr,styled as pr}from"@mui/joy";import{motion as cr}from"framer-motion";import rr from"react";import{Typography as nr}from"@mui/joy";import{motion as ar}from"framer-motion";var ir=ar(nr),J=e=>rr.createElement(ir,{...e});J.displayName="Typography";var S=J;import{Stack as lr}from"@mui/joy";import{motion as sr}from"framer-motion";var mr=sr(lr),ae=mr;ae.displayName="Stack";var z=ae;var ur=pr(cr(dr))({alignItems:"flex-start",fontWeight:"unset"});function no(e){let{title:o,content:t,actions:n,color:i="primary",...a}=e,r=e.invertedColors||e.variant==="solid";return Oe.createElement(ur,{...a,color:i,endDecorator:n,invertedColors:r},Oe.createElement(z,null,o&&Oe.createElement(S,{level:"title-sm",color:i},o),Oe.createElement(S,{level:"body-sm",color:i},t)))}no.displayName="Alert";import I,{useMemo as Ve,useState as kr}from"react";import{Autocomplete as Tr,AutocompleteOption as Pr,ListSubheader as wr,AutocompleteListbox as Fr,ListItemDecorator as ot,CircularProgress as Ar,styled as Ir}from"@mui/joy";import{Popper as Br}from"@mui/base";import{FixedSizeList as Nr}from"react-window";import{FormControl as gr,styled as fr}from"@mui/joy";import{motion as hr}from"framer-motion";var Cr=fr(hr(gr))({width:"100%"}),ie=Cr;ie.displayName="FormControl";var A=ie;import{FormLabel as br}from"@mui/joy";import{motion as yr}from"framer-motion";var xr=yr(br),le=xr;le.displayName="FormLabel";var H=le;import{FormHelperText as vr}from"@mui/joy";import{motion as Dr}from"framer-motion";var Mr=Dr(vr),se=Mr;se.displayName="FormHelperText";var w=se;var Lr=Ir(Br,{name:"Autocomplete",slot:"Popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip}));function Sr(e){let{data:o,index:t,style:n}=e,i=o[t],a={...n},r=i.props;if(i.hasOwnProperty("group"))return I.createElement(wr,{key:i.key,component:"li",style:a},i.group);let s=r["data-option-index"],l=r.ownerState.options[s];return I.createElement(Pr,{...r,style:a},l.startDecorator&&I.createElement(ot,{sx:{marginInlineEnd:"var(--Input-gap)"}},l.startDecorator),l.label,l.endDecorator&&I.createElement(ot,{sx:{marginInlineStart:"var(--Input-gap)"}},l.endDecorator))}var tt=I.createContext({}),Hr=I.forwardRef((e,o)=>{let t=I.useContext(tt);return I.createElement(Fr,{...e,...t,component:"div",ref:o,sx:{"& ul":{padding:0,margin:0,flexShrink:0}}})}),zr=I.forwardRef(function(o,t){let{children:n,anchorEl:i,open:a,modifiers:r,...s}=o,l=[];n[0].forEach(d=>{d&&(l.push(d),l.push(...d.children||[]))});let p=l.length,m=36;return I.createElement(Lr,{ref:t,anchorEl:i,open:a,modifiers:r},I.createElement(tt.Provider,{value:s},I.createElement(Nr,{itemData:l,height:m*8,width:"100%",outerElementType:Hr,innerElementType:"ul",itemSize:m,overscanCount:5,itemCount:p},Sr)))});function ao(e){let{label:o,error:t,helperText:n,color:i,size:a,disabled:r,required:s,onChange:l,...p}=e,[m,d]=kr(e.value||e.defaultValue),v=Ve(()=>e.options.map(y=>typeof y!="object"?{value:y,label:y}:y),[e.options]),u=Ve(()=>e.loading?{value:"",label:"",startDecorator:I.createElement(Ar,{size:"sm",color:"neutral",variant:"plain",thickness:3})}:typeof m=="string"&&v.find(y=>y.value===m)||m,[m,e.options,e.loading]),b=Ve(()=>u?.startDecorator||e.startDecorator,[u]),c=Ve(()=>u?.endDecorator||e.endDecorator,[u]),F=I.createElement(Tr,{...p,required:s,onChange:(y,D)=>{d(D);let x=D;l?.({...y,target:{...y.target,value:x?.value}})},color:i,value:u,options:v,size:a,disabled:r,startDecorator:b,endDecorator:c,slots:{listbox:zr},getOptionLabel:y=>`${y.value||""}`,renderGroup:y=>y});return o?I.createElement(A,{required:s,color:i,size:a,error:t,disabled:r},I.createElement(H,null,o),F,n&&I.createElement(w,null,n)):F}ao.displayName="Autocomplete";import{Box as Er}from"@mui/joy";import{motion as Or}from"framer-motion";var Vr=Or(Er),me=Vr;me.displayName="Box";var Je=me;import V from"react";import{Breadcrumbs as at,Link as Zr}from"@mui/joy";import io from"react";import{Menu as Jr,MenuButton as Yr,MenuItem as $r}from"@mui/joy";import{motion as lo}from"framer-motion";var Wr=lo(Jr),de=e=>io.createElement(Wr,{...e});de.displayName="Menu";var qr=lo(Yr),pe=e=>io.createElement(qr,{...e});pe.displayName="MenuButton";var Gr=lo($r),ce=e=>io.createElement(Gr,{...e});ce.displayName="MenuItem";var rt=de;import{Dropdown as Ur}from"@mui/joy";import{motion as jr}from"framer-motion";var _r=jr(Ur),ue=_r;ue.displayName="Dropdown";var nt=ue;function so(e){let{crumbs:o,size:t,startCrumbCount:n=1,endCrumbCount:i=3,slots:{link:a,...r}={link:Zr},slotProps:{link:s,...l}={link:{color:"neutral"}},collapsed:p=!0,...m}=e,d=g=>g.type==="link"&&a?V.createElement(a,{to:g.linkHref,href:g.linkHref,...s},g.label):V.createElement(S,null,g.label);if(!p)return V.createElement(at,{size:t,slots:r,slotProps:l,...m},o.map(g=>V.createElement(d,{...g})));let v=Math.max(1,i),u=o.slice(0,n).map(g=>V.createElement(d,{...g})),b=(n+v>o.length?o.slice(n):o.slice(-v)).map(g=>V.createElement(d,{...g})),c=o.slice(n,-v).map(g=>V.createElement(ce,null,V.createElement(d,{...g})));return V.createElement(at,{size:t,slots:r,slotProps:l,...m},u,c.length&&V.createElement(nt,null,V.createElement(pe,{size:t,variant:"plain"},"..."),V.createElement(rt,{size:t},c)),b)}so.displayName="Breadcrumbs";import Xr,{forwardRef as Qr}from"react";import{Button as Rr}from"@mui/joy";import{motion as Kr}from"framer-motion";var en=Kr(Rr),ge=Qr((e,o)=>Xr.createElement(en,{ref:o,...e}));ge.displayName="Button";var k=ge;import h,{Fragment as he,forwardRef as dn,useMemo as ut}from"react";import{styled as Y}from"@mui/joy";import pn from"@mui/icons-material/esm/ChevronLeft.js";import cn from"@mui/icons-material/esm/ChevronRight.js";import{AnimatePresence as gt,motion as un}from"framer-motion";var it=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 s=1;s<=a;s++){let l=[];for(let p=1;p<=7;p++)s===i&&p<t.getDay()+1||r>n.getDate()?l.push(void 0):(l.push(r),r++);o.push(l)}return o},lt=(e,o)=>e.toLocaleString(o,{year:"numeric"}),mo=(e,o)=>e.toLocaleString(o,{year:"numeric",month:"long"}),st=(e,o)=>new Date(0,e).toLocaleString(o,{month:"short"}),mt=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()},po=(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},Ye=(e,o)=>e.getFullYear()===o.getFullYear()&&e.getMonth()===o.getMonth();import on from"react";import{IconButton as tn}from"@mui/joy";import{motion as rn}from"framer-motion";var nn=rn(tn),fe=e=>on.createElement(nn,{...e});fe.displayName="IconButton";var E=fe;import{useCallback as an,useMemo as ln,useState as $e}from"react";import{useThemeProps as sn}from"@mui/joy";var mn=(e,o)=>o.includes(e)?e:o[0],pt=e=>{let[o,t]=$e(()=>mn(e.view||"day",e.views||["day","month"])),[n,i]=$e(e.defaultValue),[a,r]=$e(()=>{let c=new Date;return c.setDate(1),c.setHours(0,0,0,0),e.value?.[0]||e.defaultValue?.[0]||c}),[[s,l],p]=$e([0,0]),m=e.view??o,d=c=>{p([s+c,c])},v=an(c=>{r(c),m==="month"?a.getFullYear()!==c.getFullYear()&&d(c>a?1:-1):d(c>a?1:-1),e.onMonthChange?.(c)},[e.onMonthChange,a,m]),u=sn({props:{locale:"default",views:["day","month"],view:m,value:e.value??n,...e,onChange:e.value?e.onChange:c=>{i(c),e.onChange?.(c)},onMonthChange:v,onViewChange:()=>{let c=m==="month"?"day":"month";!(!e.views||e.views.includes(c))||e.view===c||(e.onViewChange?e.onViewChange(c):t(c))}},name:"Calendar"}),b=ln(()=>({...u,viewMonth:a,direction:l}),[u,a,l]);return[u,b]};import{useCallback as R,useState as ct}from"react";var We=e=>{let[o,t]=ct(null),[n,i]=ct(null);return{calendarTitle:e.view==="month"?lt(e.viewMonth,e.locale||"default"):mo(e.viewMonth,e.locale||"default"),onPrev:R(()=>{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:R(()=>{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:R(a=>{let r=new Date(e.viewMonth||new Date);r.setHours(0,0,0,0),r.setDate(a);let 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));return{"aria-label":r.toLocaleDateString(),"aria-current":s?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,o]),getMonthCellProps:R(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(p=>p==="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":l?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,n]),getPickerDayProps:R(a=>{let r=new Date(e.viewMonth||new Date);r.setHours(0,0,0,0),r.setDate(a);let s=!!e.value&&(po(r,e.value[0])||e.value[1]&&po(r,e.value[1])),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)),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:dt(r),isSelected:s,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 m=new Date;return m.setHours(0,0,0,0),m})(),tabIndex:-1,"aria-label":r.toLocaleDateString(),"aria-selected":s?"true":void 0,"aria-current":l?"date":void 0}},[e.onChange,e.value,e.viewMonth,e.rangeSelection,e.minDate,e.maxDate,e.disableFuture,e.disablePast,o]),getPickerMonthProps:R(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,l=!!e.value&&(Ye(r,e.value[0])||e.value[1]&&Ye(r,e.value[1])),p=s&&e.value&&e.value[0]&&(n&&q(e.value[0],n,r)||e.value[1]&&q(e.value[0],e.value[1],r)),m=()=>{s?e.value?e.value[0]&&!e.value[1]?e.onChange?.([new Date(Math.min(e.value[0].getTime(),r.getTime())),new Date(Math.max(e.value[0].getTime(),r.getTime()))]):e.onChange?.([r,void 0]):e.onChange?.([r,void 0]):(e.onViewChange?.("day"),e.onMonthChange?.(r)),i(null)};return{isSelected:l,onMouseEnter:s&&e.value?.[0]&&!e.value?.[1]?()=>i(r):void 0,disabled:e.minDate&&(()=>{let d=new Date(r);return d.setMonth(d.getMonth()+1),d.setDate(0),d<e.minDate})()||e.maxDate&&(()=>{let d=new Date(r);return d.setDate(0),d>e.maxDate})()||e.disableFuture&&r>new Date||e.disablePast&&r<new Date&&!Ye(r,new Date),onClick:m,tabIndex:-1,"aria-label":mo(r,e.locale||"default"),"aria-selected":l?"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 gn=Y("div",{name:"Calendar",slot:"root"})({maxWidth:"264px"}),fn=Y("div",{name:"Calendar",slot:"calendarHeader"})(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",padding:e.spacing(1)})),ft=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"})),ht=Y(un.table,{name:"Calendar",slot:"viewTable"})(({theme:e})=>({borderSpacing:0,"& td, & th":{padding:0},"& th":{paddingTop:e.spacing(1),paddingBottom:e.spacing(1)}})),hn=Y("thead",{name:"Calendar",slot:"weekHeaderContainer"})({}),Cn=Y("tbody",{name:"Calendar",slot:"dayPickerContainer"})({}),bn=Y(k,{name:"Calendar",slot:"switchViewButton"})(({ownerState:e})=>[e.view==="month"&&{pointerEvents:"none"}]),yn=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}}})),xn=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}}})),vn=Y(k,{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}]),Dn=Y(k,{name:"Calendar",slot:"day"})(({theme:e,isToday:o,isSelected:t,disabled:n})=>[{width:"32px",height:"32px",textAlign:"center","&:hover":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softHoverBg},"&:active":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softActiveBg}},o&&!t&&{"&:not([aria-current=date]):not(:hover)":{border:`1px solid ${e.palette.neutral.outlinedBorder}`}},t&&{backgroundColor:e.palette.primary.solidBg,color:e.palette.primary.solidColor,"&:hover":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidHoverBg},"&:active":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidActiveBg}},n&&{color:e.palette.neutral.solidDisabledColor,backgroundColor:e.palette.neutral.solidDisabledBg}]),Ct={enter:e=>({x:e>0?300:-300,opacity:0}),center:{position:"relative",zIndex:1,x:0,opacity:1},exit:e=>({position:"absolute",zIndex:0,x:e<0?300:-300,opacity:0})},qe=1e4,bt=(e,o)=>Math.abs(e)*o,Mn=e=>{let{ownerState:o}=e,{getPickerDayProps:t,getDayCellProps:n}=We(o),i=ut(()=>it(o.viewMonth),[o.viewMonth]),a=ut(()=>mt(o.locale||"default"),[o.locale]);return h.createElement(ft,{calendarType:"datePicker"},h.createElement(gt,{initial:!1,custom:o.direction},h.createElement(ht,{key:`${o.viewMonth.toString()}_${o.direction}`,custom:o.direction,variants:Ct,initial:"enter",animate:"center",exit:"exit",transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}},drag:"x",dragConstraints:{left:0,right:0},dragElastic:1,onDragEnd:(r,{offset:s,velocity:l})=>{let p=bt(s.x,l.x);if(p<-qe){let m=new Date(o.viewMonth||new Date);m.setMonth(m.getMonth()+1),o.onMonthChange?.(m)}else if(p>qe){let m=new Date(o.viewMonth||new Date);m.setMonth(m.getMonth()-1),o.onMonthChange?.(m)}}},h.createElement(hn,null,h.createElement("tr",null,a.map((r,s)=>h.createElement(h.Fragment,null,h.createElement("th",null,h.createElement(S,{level:"body-xs",textAlign:"center"},r)),s<6&&h.createElement("th",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"}))))),h.createElement(Cn,null,i.map((r,s)=>h.createElement(he,{key:`${o.viewMonth}_${s}`},h.createElement("tr",null,r.map((l,p)=>l?h.createElement(he,{key:p},h.createElement(yn,{...n(l)},h.createElement(Dn,{size:"sm",variant:"plain",color:"neutral",...t(l)},l)),p<6&&h.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})):h.createElement(he,{key:p},h.createElement("td",null),p<6&&h.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})))),s<i.length-1&&h.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},h.createElement("td",{colSpan:13,style:{height:4}}))))))))},kn=e=>{let{ownerState:o}=e,{getPickerMonthProps:t,getMonthCellProps:n}=We(o),i=Array.from({length:12},(r,s)=>s).reduce((r,s)=>(r[r.length-1].length===4&&r.push([]),r[r.length-1].push(s),r),[[]]),a=!o.views?.find(r=>r==="day")&&o.rangeSelection;return h.createElement(ft,{calendarType:a?"monthPicker":"datePicker"},h.createElement(gt,{initial:!1,custom:o.direction},h.createElement(ht,{key:`${o.viewMonth.getFullYear()}_${o.direction}`,custom:o.direction,variants:Ct,initial:"enter",animate:"center",exit:"exit",transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}},drag:"x",dragConstraints:{left:0,right:0},dragElastic:1,onDragEnd:(r,{offset:s,velocity:l})=>{let p=bt(s.x,l.x);if(p<-qe){let m=new Date(o.viewMonth||new Date);m.setMonth(m.getMonth()+1),o.onMonthChange?.(m)}else if(p>qe){let m=new Date(o.viewMonth||new Date);m.setMonth(m.getMonth()-1),o.onMonthChange?.(m)}}},h.createElement("tbody",null,i.map((r,s)=>h.createElement(he,{key:s},h.createElement("tr",null,r.map((l,p)=>h.createElement(he,{key:l},h.createElement(xn,{...n(l)},h.createElement(vn,{size:"sm",variant:"plain",color:"neutral",...t(l)},st(l,o.locale))),p<3&&h.createElement("td",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"})))),s<i.length-1&&h.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},h.createElement("td",{colSpan:7,style:{height:4}}))))))))},Ce=dn((e,o)=>{let[t,n]=pt(e),{value:i,defaultValue:a,onChange:r,locale:s,onViewChange:l,onMonthChange:p,view:m,views:d,rangeSelection:v,...u}=t,{calendarTitle:b,onPrev:c,onNext:g}=We(n);return h.createElement(gn,{ref:o,...u},h.createElement(fn,null,h.createElement(E,{size:"sm",onClick:c},h.createElement(pn,null)),h.createElement(bn,{ownerState:n,variant:"plain",color:"neutral",onClick:l},b),h.createElement(E,{size:"sm",onClick:g},h.createElement(cn,null))),m==="day"&&h.createElement(Mn,{ownerState:n}),m==="month"&&h.createElement(kn,{ownerState:n}))});Ce.displayName="Calendar";var K=Ce;import{Card as Tn,CardContent as Pn,CardCover as wn,CardActions as Fn,CardOverflow as An}from"@mui/joy";import{motion as be}from"framer-motion";var In=be(Tn),ye=In;ye.displayName="Card";var Bn=be(Pn),co=Bn;co.displayName="CardContent";var Nn=be(wn),uo=Nn;uo.displayName="CardCover";var Ln=be(Fn),go=Ln;go.displayName="CardActions";var Sn=be(An),fo=Sn;fo.displayName="CardOverflow";import Hn from"react";import{Checkbox as zn}from"@mui/joy";import{motion as En}from"framer-motion";var On=En(zn),xe=e=>Hn.createElement(On,{...e});xe.displayName="Checkbox";var ve=xe;import{styled as Vn}from"@mui/joy";import Jn,{forwardRef as Yn}from"react";var $n=Vn("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}}})),ho=Yn(function(o,t){return Jn.createElement($n,{ref:t,...o})});ho.displayName="Container";import G,{useCallback as Un,useState as vt}from"react";import{IntlMessageFormat as jn}from"intl-messageformat";import{NumericFormat as _n}from"react-number-format";import Zn from"@mui/icons-material/esm/InfoOutlined.js";import De from"react";import{Input as Wn}from"@mui/joy";import{motion as qn}from"framer-motion";var yt=qn(Wn),Me=e=>{let{label:o,helperText:t,error:n,style:i,size:a,color:r,disabled:s,required:l,...p}=e;return o?De.createElement(A,{required:l,color:r,size:a,error:n,disabled:s},De.createElement(H,null,o),De.createElement(yt,{...p}),t&&De.createElement(w,null,t)):De.createElement(yt,{required:l,color:r,size:a,disabled:s,...p})};Me.displayName="Input";var U=Me;import Gn from"intl-messageformat";var xt=(e="usd")=>{let[o,t,n]=new Gn(`{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 Xn=G.forwardRef(function(o,t){let{onChange:n,...i}=o;return G.createElement(_n,{...i,onValueChange:({floatValue:a})=>{n?.({target:{name:o.name,value:a?.toString()}})},valueIsNumericString:!0,getInputRef:t,decimalScale:2})}),Dt=G.forwardRef(function(o,t){let{currency:n="usd",max:i=1e5,name:a,onChange:r,label:s,error:l,helperText:p,required:m,disabled:d,...v}=o,{symbol:u,thousandSeparator:b,decimalSeparator:c,placeholder:g,fixedDecimalScale:F}=xt(n),[y,D]=vt(o.value),[x,C]=vt(!!i&&!!o.value&&o.value>i),P=Un(O=>{let re=Number(O.target.value);D(re),r?.({...O,target:{name:a,value:re}}),i&&re>i?C(!0):C(!1)},[]),M=G.createElement(U,{...v,size:"sm",ref:t,value:y,placeholder:g,onChange:P,disabled:d,required:m,slotProps:{input:{component:Xn,decimalSeparator:c,thousandSeparator:b,prefix:u,fixedDecimalScale:F}},sx:{fontFamily:"monospace"}});return s?G.createElement(A,{size:"sm",disabled:d,required:m,error:l||x},G.createElement(H,null,s),M,x?G.createElement(w,null,G.createElement(Zn,null),new jn(`limit: {amount, number, ::currency/${n} unit-width-narrow}`).format({amount:i})):p&&G.createElement(w,null,p)):M});import f,{useCallback as ee,useEffect as yo,useMemo as oe,useRef as oa,useState as ta}from"react";import{styled as ra,LinearProgress as na}from"@mui/joy";import aa from"@mui/icons-material/esm/ChevronLeft.js";import ia from"@mui/icons-material/esm/ChevronRight.js";import{Sheet as Qn}from"@mui/joy";import{motion as Rn}from"framer-motion";var Kn=Rn(Qn),ke=Kn;ke.displayName="Sheet";var j=ke;import $ from"react";import{Table as ea}from"@mui/joy";var Te=e=>{let{children:o,...t}=e;return $.createElement(ea,{...t},o)};Te.displayName="Table";function Co(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))))}Co.displayName="TableHead";function bo(e){let{rows:o,cellOrder:t,rowOptions:n,showCheckbox:i,onCheckboxChange:a,slots:{checkbox:r=ve}={},slotProps:{checkbox:s={}}={}}=e;return $.createElement("tbody",null,o.map((l,p)=>$.createElement("tr",{key:p},i&&$.createElement("td",{style:{textAlign:"center"}},$.createElement(r,{onChange:m=>a?.(m,p),...s})),t.map(m=>$.createElement("td",{key:m,style:{textAlign:n?.[m]?.numeric?"right":"left"}},l[m])))))}bo.displayName="TableBody";var Mt=ra("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 la(e){let{paginationModel:{page:o,pageSize:t},rowCount:n,onPageChange:i}=e,a=1,r=Math.ceil(n/t),s=[o-2,o-1].filter(d=>d>1),l=[o+1,o+2].filter(d=>d<=r-1),p=r>1&&o<r-3,m=r>1&&o>4;return f.createElement(z,{direction:"row",spacing:1,sx:{pt:1,pb:1},justifyContent:"end",alignItems:"center"},f.createElement(z,{direction:"row",spacing:.5,alignItems:"center"},f.createElement(E,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o-1),disabled:o===a,"aria-label":"Previous page"},f.createElement(aa,null)),o!==a&&f.createElement(k,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(a)},a),m&&f.createElement(k,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o-3)},"..."),s.map(d=>f.createElement(k,{key:d,size:"sm",variant:"plain",color:"neutral",onClick:()=>i(d)},d)),f.createElement(k,{variant:"soft",size:"sm"},o),l.map(d=>f.createElement(k,{key:d,size:"sm",variant:"plain",color:"neutral",onClick:()=>i(d)},d)),p&&f.createElement(k,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o+3)},"..."),o!==r&&f.createElement(k,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(r)},r),f.createElement(E,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o+1),disabled:o===r,"aria-label":"Next page"},f.createElement(ia,null))))}var sa=e=>f.createElement(Je,{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)}}),ma=e=>{let o=oa(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?sa(o):null;return f.createElement("th",{ref:o,key:e.field,style:t},e.headerName??e.field,n)};function da({rows:e,columns:o,rowCount:t,pagination:n,paginationMode:i,paginationModel:a,onPaginationModelChange:r,selectionModel:s=[],onSelectionModelChange:l,getId:p,isTotalSelected:m}){let[d,v]=ta(a?.page||1),u=a?.pageSize||20,b=ee((C,P)=>p?.(C)??C?.id??`${(P||0)+(d-1)*u}`,[p??d,u]),c=oe(()=>new Set(s),[s]),g=oe(()=>!n||i==="server"?e:e.slice((d-1)*u,(d-1)*u+u),[e,d,u,i,n]),F=oe(()=>g.length>0&&g.every((C,P)=>c.has(b(C,P))),[g,c,d,u,b]),y=t||e.length,D=oe(()=>m??(y>0&&s.length===y),[m,s,y]),x=ee(C=>{v(C),r?.({page:C,pageSize:u})},[r]);return yo(()=>{x(1)},[y]),yo(()=>{d>Math.ceil(y/u)&&x(Math.ceil(y/u))},[y,u]),yo(()=>{l?.([])},[d]),{rowCount:y,page:d,pageSize:u,onPaginationModelChange:x,getId:b,HeadCell:ma,dataInPage:g,isAllSelected:F,isTotalSelected:D,isSelectedRow:ee(C=>c.has(C),[c]),onAllCheckboxChange:ee(()=>{l?.(F?[]:g.map(b))},[F,g,l]),onCheckboxChange:ee((C,P)=>{if(c.has(P)){let M=s.filter(O=>O!==P);l?.(M)}else{let M=[...s,P];l?.(M)}},[s,l]),columns:oe(()=>o||Object.keys(e[0]||{}).map(C=>({field:C})),[e,o]),onTotalSelect:ee(()=>{l?.(D?[]:e.map(b),!D)},[D,e,l])}}function xo(e){let{rows:o,checkboxSelection:t,selectionModel:n,onSelectionModelChange:i,rowCount:a,columns:r,onPaginationModelChange:s,pagination:l,paginationMode:p,paginationModel:m,loading:d,slots:{checkbox:v=ve,toolbar:u,footer:b,loadingOverlay:c=()=>f.createElement(na,{value:8,variant:"plain"})}={},slotProps:{checkbox:g={},toolbar:F,background:y={}}={},...D}=e,{columns:x,isAllSelected:C,isSelectedRow:P,onAllCheckboxChange:M,onCheckboxChange:O,getId:re,rowCount:to,page:Qo,pageSize:Ro,onPaginationModelChange:qt,dataInPage:Gt,isTotalSelected:Ko,onTotalSelect:et,HeadCell:Ut}=da(e),jt=oe(()=>({page:Qo,pageSize:Ro}),[Qo,Ro]);return f.createElement(Je,null,f.createElement(z,{direction:"row",sx:{pt:1,pb:1},justifyContent:"space-between",alignItems:"center"},!!t&&f.createElement(z,{direction:"row",spacing:1},!C&&f.createElement(S,{level:"body-xs"},Ge(n?.length||0)," items selected"),C&&!Ko&&f.createElement(z,{direction:"row",spacing:1,alignItems:"center"},f.createElement(S,{level:"body-xs"},"All ",Ge(n?.length||0)," items on this page are selected."),f.createElement(k,{size:"sm",variant:"plain",onClick:et},"Select all ",Ge(to??o.length)," items")),Ko&&f.createElement(z,{direction:"row",spacing:1,alignItems:"center"},f.createElement(S,{level:"body-xs"},"All ",Ge(to??o.length)," items are selected."),f.createElement(k,{size:"sm",variant:"plain",color:"danger",onClick:et},"Cancel"))),u&&f.createElement(u,{...F||{}})),f.createElement(j,{variant:"outlined",sx:{overflow:"auto",width:"100%",boxShadow:"sm",borderRadius:"sm"},...y},f.createElement(Te,{...D},f.createElement("thead",null,f.createElement("tr",null,t&&f.createElement("th",{style:{width:"40px",textAlign:"center"}},f.createElement(v,{onChange:M,checked:C,indeterminate:(n||[]).length>0&&!C,...g})),x.map(X=>f.createElement(Ut,{key:X.field,stickyHeader:e.stickyHeader,...X})))),f.createElement("tbody",null,f.createElement(Mt,null,!!d&&f.createElement("td",null,f.createElement(Je,{sx:{position:"absolute",top:0,left:0,right:0}},f.createElement(c,null)))),f.createElement(Mt,null),Gt.map((X,_t)=>{let Q=re(X,_t);return f.createElement("tr",{key:Q,role:t?"checkbox":void 0,tabIndex:t?-1:void 0,onClick:t?W=>O(W,Q):void 0,"aria-checked":t?P(Q):void 0},t&&f.createElement("th",{scope:"row",style:{textAlign:"center"}},f.createElement(v,{onChange:W=>O(W,Q),checked:P(Q),...g})),x.map(W=>f.createElement("td",{key:W.field,style:{textAlign:W.type==="number"?"end":"start"}},W.renderCell?.({row:X,value:X[W.field],id:Q})??X[W.field])))})),b&&f.createElement(b,null))),l&&f.createElement(la,{paginationModel:jt,rowCount:to,onPageChange:qt}))}xo.displayName="DataTable";import B,{forwardRef as ha,useCallback as kt,useEffect as Ca,useState as Tt}from"react";import{IMaskInput as ba,IMask as vo}from"react-imask";import ya from"@mui/icons-material/esm/CalendarToday.js";import{styled as Pt}from"@mui/joy";import{FocusTrap as xa,ClickAwayListener as va,Popper as Da}from"@mui/base";import{DialogActions as pa,styled as ca}from"@mui/joy";import{motion as ua}from"framer-motion";var ga=ua(pa),fa=ca(ga)(({theme:e})=>({padding:e.spacing(1),gap:e.spacing(1),flexDirection:"row",justifyContent:"flex-end"})),Pe=fa;Pe.displayName="DialogActions";var _=Pe;var Ma=Pt(Da,{name:"DatePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),ka=Pt(j,{name:"DatePicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),wt=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("/")},Ta=B.forwardRef(function(o,t){let{onChange:n,...i}=o;return B.createElement(ba,{...i,inputRef:t,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/`m/`d",blocks:{d:{mask:vo.MaskedRange,from:1,to:31,maxLength:2},m:{mask:vo.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:vo.MaskedRange,from:1900,to:9999}},format:wt,parse:a=>{let r=a.split("/");return new Date(Number(r[0]),Number(r[1])-1,Number(r[2]))},autofix:"pad",overwrite:!0})}),Do=ha((e,o)=>{let{onChange:t,disabled:n,label:i,error:a,helperText:r,minDate:s,maxDate:l,disableFuture:p,disablePast:m,required:d,...v}=e,[u,b]=Tt(e.value||""),[c,g]=Tt(null),F=!!c;Ca(()=>{b(e.value||"")},[e.value]);let y=kt(C=>{b(C.target.value),t?.(C)},[]),D=kt(C=>{g(c?null:C.currentTarget)},[c,g]),x=B.createElement(B.Fragment,null,B.createElement(U,{...v,ref:o,size:"sm",value:u,onChange:y,placeholder:"YYYY/MM/DD",disabled:n,required:d,slotProps:{input:{component:Ta}},sx:{fontFamily:"monospace"},endDecorator:B.createElement(E,{variant:"plain",onClick:D},B.createElement(ya,null))}),F&&B.createElement(va,{onClickAway:()=>g(null)},B.createElement(Ma,{id:"date-picker-popper",open:!0,anchorEl:c,placement:"bottom-end",modifiers:[{name:"offset",options:{offset:[4,4]}}]},B.createElement(xa,{open:!0},B.createElement(ka,{tabIndex:-1,role:"presentation"},B.createElement(K,{value:Number.isNaN(new Date(u).getTime())?void 0:[new Date(u),void 0],onChange:([C])=>{b(wt(C)),g(null)},minDate:s?new Date(s):void 0,maxDate:l?new Date(l):void 0,disableFuture:p,disablePast:m}),B.createElement(_,{sx:{p:1}},B.createElement(k,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{b(""),g(null)}},"Clear")))))));return i?B.createElement(A,{required:d,disabled:n,error:a,size:"sm"},B.createElement(H,null,i),x,r&&B.createElement(w,null,r)):x});Do.displayName="DatePicker";import N,{forwardRef as Pa,useCallback as Mo,useEffect as wa,useMemo as Fa,useState as Ft}from"react";import{IMaskInput as Aa,IMask as ko}from"react-imask";import Ia from"@mui/icons-material/esm/CalendarToday.js";import{styled as At}from"@mui/joy";import{FocusTrap as Ba,ClickAwayListener as Na,Popper as La}from"@mui/base";var Sa=At(La,{name:"DateRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Ha=At(j,{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})),It=([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(" - ")},Bt=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]))]},za=N.forwardRef(function(o,t){let{onChange:n,...i}=o;return N.createElement(Aa,{...i,inputRef:t,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/`m/`d - Y/`m/`d",blocks:{d:{mask:ko.MaskedRange,from:1,to:31,maxLength:2},m:{mask:ko.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:ko.MaskedRange,from:1900,to:9999}},format:It,parse:Bt,autofix:"pad",overwrite:!0})}),To=Pa((e,o)=>{let{onChange:t,disabled:n,label:i,error:a,helperText:r,minDate:s,maxDate:l,disableFuture:p,disablePast:m,required:d,...v}=e,[u,b]=Ft(e.value||""),[c,g]=Ft(null),F=!!c,y=Fa(()=>u?Bt(u):void 0,[u]);wa(()=>{b(e.value||"")},[e.value]);let D=Mo(M=>{b(M.target.value),t?.(M)},[t]),x=Mo(M=>{g(c?null:M.currentTarget)},[c,g]),C=Mo(([M,O])=>{!M||!O||(b(It([M,O])),g(null))},[b,g]),P=N.createElement(N.Fragment,null,N.createElement(U,{...v,ref:o,size:"sm",value:u,onChange:D,disabled:n,required:d,placeholder:"YYYY/MM/DD - YYYY/MM/DD",slotProps:{input:{component:za}},sx:{fontFamily:"monospace"},endDecorator:N.createElement(E,{variant:"plain",onClick:x},N.createElement(Ia,null))}),F&&N.createElement(Na,{onClickAway:()=>g(null)},N.createElement(Sa,{id:"date-range-picker-popper",open:!0,anchorEl:c,placement:"bottom-end",modifiers:[{name:"offset",options:{offset:[4,4]}}]},N.createElement(Ba,{open:!0},N.createElement(Ha,{tabIndex:-1,role:"presentation"},N.createElement(K,{rangeSelection:!0,defaultValue:y,onChange:C,minDate:s?new Date(s):void 0,maxDate:l?new Date(l):void 0,disableFuture:p,disablePast:m}),N.createElement(_,{sx:{p:1}},N.createElement(k,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{b(""),g(null)}},"Clear")))))));return i?N.createElement(A,{required:d,disabled:n,error:a,size:"sm"},N.createElement(H,null,i),P,r&&N.createElement(w,null,r)):P});To.displayName="DateRangePicker";import{DialogContent as Ea,styled as Oa}from"@mui/joy";import{motion as Va}from"framer-motion";var Ja=Va(Ea),Ya=Oa(Ja)(({theme:e})=>({padding:e.spacing(0,3,2.5)})),we=Ya;we.displayName="DialogContent";var Ue=we;import{DialogTitle as $a,styled as Wa}from"@mui/joy";import{motion as qa}from"framer-motion";var Ga=qa($a),Ua=Wa(Ga)(({theme:e})=>({padding:e.spacing(2,3)})),Fe=Ua;Fe.displayName="DialogTitle";var je=Fe;import Ie from"react";import _e from"react";import{Modal as ja,ModalDialog as _a,ModalClose as Za,ModalOverflow as Xa,styled as Nt}from"@mui/joy";import{motion as Ze}from"framer-motion";var Qa=Ze(ja),Po=Qa;Po.displayName="Modal";var Ra=Ze(_a),Lt=Nt(Ra)({padding:0}),Ae=Lt;Ae.displayName="ModalDialog";var Ka=Nt(Ze(Za))(({theme:e})=>({top:e.spacing(1.5),right:e.spacing(3)})),Xe=Ka;Xe.displayName="ModalClose";var ei=Ze(Xa),wo=ei;wo.displayName="ModalOverflow";function Fo(e){let{title:o,children:t,...n}=e;return _e.createElement(Lt,{...n},_e.createElement(Xe,null),_e.createElement(je,null,o),_e.createElement(Ue,null,t))}Fo.displayName="ModalFrame";import{styled as oi}from"@mui/joy";var ti=oi(Ae)(({theme:e})=>({padding:0})),Ao=Ie.forwardRef((e,o)=>{let{title:t,children:n,actions:i,...a}=e;return Ie.createElement(ti,{ref:o,...a},Ie.createElement(je,null,t),Ie.createElement(Ue,null,n),Ie.createElement(_,null,i))});Ao.displayName="DialogFrame";import ri from"react";import{Divider as ni}from"@mui/joy";import{motion as ai}from"framer-motion";var ii=ai(ni),Be=e=>ri.createElement(ii,{...e});Be.displayName="Divider";import li from"react";import{Drawer as si}from"@mui/joy";import{motion as mi}from"framer-motion";var di=mi(si),Io=e=>{let{children:o,...t}=e;return li.createElement(di,{...t,slotProps:{...t.slotProps,content:{...t.slotProps?.content,sx:{bgcolor:"transparent",p:{md:3,sm:0},boxShadow:"none"}}}},o)};Io.displayName="InsetDrawer";import T,{useCallback as Qe,useEffect as pi,useRef as St,useState as Bo}from"react";import{styled as te}from"@mui/joy";import ci from"@mui/icons-material/esm/Delete.js";import{combine as ui}from"@atlaskit/pragmatic-drag-and-drop/combine";import{dropTargetForExternal as gi,monitorForExternal as fi}from"@atlaskit/pragmatic-drag-and-drop/external/adapter";import{containsFiles as Ht,getFiles as hi}from"@atlaskit/pragmatic-drag-and-drop/external/file";import{preventUnhandled as zt}from"@atlaskit/pragmatic-drag-and-drop/prevent-unhandled";var Ci=te("input")({width:"1px",height:"1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",position:"absolute"}),bi=te("div",{name:"FileUpload",slot:"PreviewRoot"})(({theme:e})=>({display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(300px, auto))",gap:"8px"})),yi=e=>{let{files:o,onDelete:t}=e;return T.createElement(bi,null,o.map(n=>T.createElement(ye,{key:n.name},T.createElement(z,{style:{aspectRatio:"4/3",height:"200px"},alignItems:"center",justifyContent:"center"},n.type.startsWith("image/")?T.createElement("img",{style:{width:"100%",height:"100%",objectFit:"cover"},src:URL.createObjectURL(n),alt:n.name}):T.createElement(S,{level:"title-md",textColor:"neutral.400"},n.type)),T.createElement(z,{direction:"row",justifyContent:"space-between",gap:"8px"},T.createElement(z,null,T.createElement(S,{level:"title-sm",textColor:"common.black"},n.name),T.createElement(S,{level:"body-sm",textColor:"neutral.600"},(n.size/1e3).toFixed(2),"KB")),T.createElement(E,{onClick:()=>t?.(n)},T.createElement(ci,null))))))},xi=te(z,{name:"FileUpload",slot:"root"})(({theme:e})=>({gap:e.spacing(1)})),vi=te("label",{name:"FileUpload",slot:"label"})({}),Di=te("div",{name:"FileUpload",slot:"dropZone"})(({theme:e,state:o})=>({width:"100%",backgroundColor:o==="over"?e.palette.background.level2:e.palette.background.backdrop,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",padding:e.spacing(3),gap:e.spacing(2),border:o==="idle"?"2px solid rgba(0,0,0,0)":`2px dashed ${e.palette.primary[400]}`})),Mi=te(k,{name:"FileUpload",slot:"button"})({}),No=T.memo(e=>{let{accept:o,maxCount:t,name:n,maxTotalSize:i,maxSizePerFile:a,onChange:r}=e,s=St(null),l=St(null),[p,m]=Bo([]),[d,v]=Bo("idle"),[u,b]=Bo(),c=Qe(D=>{try{a&&D.forEach(C=>{if(C.size>a)throw new Error(`File size exceeds the limit: ${a}`)});let x=[...p,...D];if(t&&x.length>t)throw new Error(`File count exceeds the limit: ${t}`);if(i&&x.reduce((C,P)=>C+P.size,0)>i)throw new Error(`Total file size exceeds the limit: ${i}`);r?.({target:{name:n,value:x}}),b(void 0),m(x)}catch(x){b(x.message)}},[p]);pi(()=>{let D=s.current;if(!D)throw new Error("Drop zone ref is not set");return ui(gi({element:D,canDrop:Ht,onDragEnter:()=>v("over"),onDragLeave:()=>v("potential"),onDrop:async({source:x})=>{let C=await hi({source:x});c(C)}}),fi({canMonitor:Ht,onDragStart:()=>{v("potential"),zt.start()},onDrop:()=>{v("idle"),zt.stop()}}))});let g=Qe(D=>{let x=Array.from(D.target.files||[]);c(x)},[c]),F=Qe(D=>{m(x=>(r?.({target:{name:n,value:x.filter(C=>C!==D)}}),x.filter(C=>C!==D)))},[]),y=Qe(()=>{l.current?.click()},[]);return T.createElement(xi,null,T.createElement(A,{error:!!u},T.createElement(Di,{state:d,ref:s},T.createElement(vi,null,T.createElement(S,{level:"h3",textColor:"background.tooltip"},"Drop files"),T.createElement(Ci,{type:"file",onChange:g,multiple:!0,accept:o,ref:l})),T.createElement(Mi,{variant:"soft",color:"neutral",onClick:y},"Select Files"),u&&T.createElement(w,null,u))),T.createElement(yi,{files:p,onDelete:F}))});No.displayName="FileUpload";import{Grid as ki}from"@mui/joy";import{motion as Ti}from"framer-motion";var Pi=Ti(ki),Lo=Pi;Lo.displayName="Grid";import Z from"react";import wi from"react-markdown";import{Link as Fi}from"@mui/joy";var So=e=>{let{...o}=e;return Z.createElement(wi,{...o,components:{h1:({children:t})=>Z.createElement(J,{level:"h1"},t),h2:({children:t})=>Z.createElement(J,{level:"h2"},t),h3:({children:t})=>Z.createElement(J,{level:"h3"},t),h4:({children:t})=>Z.createElement(J,{level:"h4"},t),p:({children:t})=>Z.createElement(J,null,t),a:({children:t,href:n})=>Z.createElement(Fi,{href:n},t),hr:()=>Z.createElement(Be,null),...o?.components}})};So.displayName="Markdown";import L,{forwardRef as Ai,useCallback as Ho,useEffect as Ii,useMemo as Bi,useState as Et}from"react";import{IMaskInput as Ni,IMask as Ot}from"react-imask";import Li from"@mui/icons-material/esm/CalendarToday.js";import{styled as Vt}from"@mui/joy";import{FocusTrap as Si,ClickAwayListener as Hi,Popper as zi}from"@mui/base";var Ei=Vt(zi,{name:"MonthRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Oi=Vt(j,{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})),zo=e=>{let o=`${e.getMonth()+1}`,t=e.getFullYear();return Number(o)<10&&(o="0"+o),[t,o].join("/")},Eo=([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 zo(a)};return[t(e),t(o)].join(" - ")},Oo=e=>{let o=e.split(" - ")[0]||"",t=e.split(" - ")[1]||"";return[o,t]},Vi=L.forwardRef(function(o,t){let{onChange:n,...i}=o;return L.createElement(Ni,{...i,inputRef:t,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/m - Y/m",blocks:{m:{mask:Ot.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Ot.MaskedRange,from:1900,to:9999}},format:Eo,parse:Oo})}),Vo=Ai((e,o)=>{let{onChange:t,disabled:n,label:i,error:a,helperText:r,minDate:s,maxDate:l,disableFuture:p,disablePast:m,required:d,...v}=e,[u,b]=Et(""),[c,g]=Et(null),F=!!c,y=Bi(()=>u?Oo(u).map(M=>new Date(M)):void 0,[u]);Ii(()=>{b(e.value?Eo(Oo(e.value)):"")},[e.value]);let D=Ho(M=>{b(M.target.value),t?.(M)},[t]),x=Ho(M=>{g(c?null:M.currentTarget)},[c,g]),C=Ho(([M,O])=>{!M||!O||(b(Eo([zo(M),zo(O)])),g(null))},[b,g]),P=L.createElement(L.Fragment,null,L.createElement(U,{...v,ref:o,size:"sm",value:u,onChange:D,disabled:n,required:d,placeholder:"YYYY/MM - YYYY/MM",slotProps:{input:{component:Vi}},sx:{fontFamily:"monospace"},endDecorator:L.createElement(E,{variant:"plain",onClick:x},L.createElement(Li,null))}),F&&L.createElement(Hi,{onClickAway:()=>g(null)},L.createElement(Ei,{id:"date-range-picker-popper",open:!0,anchorEl:c,placement:"bottom-end",modifiers:[{name:"offset",options:{offset:[4,4]}}]},L.createElement(Si,{open:!0},L.createElement(Oi,{tabIndex:-1,role:"presentation"},L.createElement(K,{view:"month",views:["month"],rangeSelection:!0,defaultValue:y,onChange:C,minDate:s?new Date(s):void 0,maxDate:l?new Date(l):void 0,disableFuture:p,disablePast:m}),L.createElement(_,{sx:{p:1}},L.createElement(k,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{b(""),g(null)}},"Clear")))))));return i?L.createElement(A,{required:d,disabled:n,error:a,size:"sm"},L.createElement(H,null,i),P,r&&L.createElement(w,null,r)):P});Vo.displayName="MonthRangePicker";import{Radio as Ji,RadioGroup as Yi}from"@mui/joy";import{motion as Jt}from"framer-motion";var $i=Jt(Ji),Ne=$i;Ne.displayName="Radio";var Wi=Jt(Yi),Le=Wi;Le.displayName="RadioGroup";import Yt from"react";function Jo(e){let{items:o,...t}=e;return Yt.createElement(Le,{...t},o.map(n=>Yt.createElement(Ne,{key:`${n.value}`,value:n.value,label:n.label})))}Jo.displayName="RadioList";import Re from"react";import{Select as qi,Option as Gi}from"@mui/joy";import{motion as Ui}from"framer-motion";var ji=Ui(Gi),Yo=ji;Yo.displayName="Option";function $o(e){let{label:o,helperText:t,error:n,size:i,color:a,disabled:r,required:s,onChange:l,...p}=e,d=Re.createElement(qi,{...p,required:s,disabled:r,size:i,color:a,onChange:(v,u)=>{let b=v||{target:{}},c={...b,target:{name:b.target?.name||e.name,value:u||void 0}};l?.(c)}});return o?Re.createElement(A,{required:s,disabled:r,size:i,color:a,error:n},Re.createElement(H,null,o),d,t&&Re.createElement(w,null,t)):d}$o.displayName="Select";import $t from"react";import{Switch as _i,styled as Zi,switchClasses as Xi}from"@mui/joy";import{motion as Wt}from"framer-motion";var Qi=Wt(_i),Ri=Zi(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)",[`&.${Xi.checked}`]:{left:"unset",right:"var(--Switch-thumbOffset)"}}),Ki=e=>$t.createElement(Ri,{...e,layout:!0,transition:el}),el={type:"spring",stiffness:700,damping:30},Wo=e=>$t.createElement(Qi,{...e,slots:{thumb:Ki,...e.slots}});Wo.displayName="Switch";import{Tabs as ol,Tab as tl,TabList as rl,TabPanel as nl,styled as al,tabClasses as il}from"@mui/joy";import{motion as Ke}from"framer-motion";var ll=Ke(ol),qo=ll;qo.displayName="Tabs";var sl=al(Ke(tl))(({theme:e})=>({[`&:not(.${il.selected})`]:{color:e.palette.neutral[700]}})),Go=sl;Go.displayName="Tab";var ml=Ke(rl),Uo=ml;Uo.displayName="TabList";var dl=Ke(nl),jo=dl;jo.displayName="TabPanel";import eo from"react";import{Textarea as pl}from"@mui/joy";import{motion as cl}from"framer-motion";var ul=cl(pl),_o=e=>{let{label:o,error:t,helperText:n,color:i,size:a,disabled:r,required:s,...l}=e,p=eo.createElement(ul,{required:s,disabled:r,color:i,size:a,...l});return o?eo.createElement(A,{required:s,disabled:r,color:i,size:a,error:t},eo.createElement(H,null,o),p,n&&eo.createElement(w,null,n)):p};_o.displayName="Textarea";import oo from"react";import{CssBaseline as gl,CssVarsProvider as fl,checkboxClasses as hl,extendTheme as Cl}from"@mui/joy";var bl=Cl({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)"},[`& .${hl.root}`]:{verticalAlign:"middle"}})}},JoyTooltip:{defaultProps:{size:"sm",placement:"top"}}}});function Zo(e){return oo.createElement(oo.Fragment,null,oo.createElement(fl,{theme:bl},oo.createElement(gl,null),e.children))}Zo.displayName="ThemeProvider";import yl from"react";import{Tooltip as xl}from"@mui/joy";import{motion as vl}from"framer-motion";var Dl=vl(xl),Xo=e=>yl.createElement(Dl,{...e});Xo.displayName="Tooltip";export{Ee as Accordion,ze as AccordionDetails,He as AccordionSummary,ro as Accordions,no as Alert,Vf as AspectRatio,ao as Autocomplete,If as AutocompleteListbox,Bf as AutocompleteOption,Hf as Avatar,Ef as AvatarGroup,Yf as Badge,me as Box,so as Breadcrumbs,ge as Button,Ce as Calendar,ye as Card,go as CardActions,co as CardContent,uo as CardCover,fo as CardOverflow,xe as Checkbox,Zf as Chip,Qf as CircularProgress,ho as Container,Dt as CurrencyInput,xo as DataTable,Do as DatePicker,To as DateRangePicker,Pe as DialogActions,we as DialogContent,Ao as DialogFrame,Fe as DialogTitle,Be as Divider,Kf as Drawer,ue as Dropdown,No as FileUpload,ie as FormControl,se as FormHelperText,le as FormLabel,Lo as Grid,fe as IconButton,Me as Input,Io as InsetDrawer,oh as LinearProgress,Ch as Link,rh as List,ah as ListDivider,lh as ListItem,mh as ListItemButton,ph as ListItemContent,uh as ListItemDecorator,fh as ListSubheader,So as Markdown,de as Menu,pe as MenuButton,ce as MenuItem,Po as Modal,Xe as ModalClose,Ae as ModalDialog,Fo as ModalFrame,wo as ModalOverflow,Vo as MonthRangePicker,Yo as Option,Ne as Radio,Le as RadioGroup,Jo as RadioList,$o as Select,ke as Sheet,Fh as Skeleton,yh as Slider,ae as Stack,vh as Step,Mh as StepButton,Th as StepIndicator,Ph as Stepper,Wo as Switch,Go as Tab,Uo as TabList,jo as TabPanel,Te as Table,bo as TableBody,Co as TableHead,qo as Tabs,_o as Textarea,Zo as ThemeProvider,Xo as Tooltip,J as Typography,Pf as accordionClasses,wf as accordionDetailsClasses,Af as accordionSummaryClasses,Ff as accordionsClasses,qg as alertClasses,Jf as aspectRatioClasses,Nf as autocompleteClasses,Lf as autocompleteListboxClasses,Sf as autocompleteOptionClasses,zf as avatarClasses,Of as avatarGroupClasses,$f as badgeClasses,Gg as boxClasses,Wf as breadcrumbsClasses,Ug as buttonClasses,Gf as cardActionsClasses,qf as cardClasses,Uf as cardContentClasses,jf as cardCoverClasses,_f as cardOverflowClasses,jg as checkboxClasses,Xf as chipClasses,Rf as circularProgressClasses,vf as dialogActionsClasses,xf as dialogContentClasses,yf as dialogTitleClasses,_g as dividerClasses,eh as drawerClasses,mf as formControlClasses,pf as formHelperTextClasses,df as formLabelClasses,cf as gridClasses,Zg as iconButtonClasses,Xg as inputClasses,th as linearProgressClasses,bh as linkClasses,nh as listClasses,ih as listDividerClasses,dh as listItemButtonClasses,sh as listItemClasses,ch as listItemContentClasses,gh as listItemDecoratorClasses,hh as listSubheaderClasses,Rg as menuButtonClasses,Qg as menuClasses,Kg as menuItemClasses,ff as modalClasses,hf as modalCloseClasses,Cf as modalDialogClasses,bf as modalOverflowClasses,ef as optionClasses,of as radioClasses,tf as radioGroupClasses,rf as selectClasses,gf as sheetClasses,Ah as skeletonClasses,xh as sliderClasses,uf as stackClasses,kh as stepButtonClasses,Dh as stepClasses,wh as stepperClasses,nf as switchClasses,kf as tabListClasses,Tf as tabPanelClasses,af as tableClasses,Mf as tabsClasses,lf as textareaClasses,Df as tooltipClasses,sf as typographyClasses,$g as useColorScheme,Yg as useTheme,Wg as useThemeProps};
|