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