@ceed/ads 0.0.161 → 0.0.162
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 +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useTheme as nh,useColorScheme as ah,useThemeProps as ih,alertClasses as lh,boxClasses as sh,buttonClasses as mh,checkboxClasses as ph,dividerClasses as dh,iconButtonClasses as ch,inputClasses as uh,menuClasses as gh,menuButtonClasses as fh,menuItemClasses as hh,optionClasses as bh,radioClasses as Ch,radioGroupClasses as yh,selectClasses as xh,switchClasses as vh,tableClasses as Mh,textareaClasses as kh,typographyClasses as Dh,formControlClasses as Ph,formLabelClasses as Th,formHelperTextClasses as wh,gridClasses as Ih,stackClasses as Ah,sheetClasses as Fh,modalClasses as Bh,modalCloseClasses as Nh,modalDialogClasses as Lh,modalOverflowClasses as Sh,dialogTitleClasses as Hh,dialogContentClasses as Eh,dialogActionsClasses as zh,tooltipClasses as Oh,tabsClasses as Vh,tabListClasses as Jh,tabPanelClasses as Yh,accordionClasses as $h,accordionDetailsClasses as qh,accordionGroupClasses as Wh,accordionSummaryClasses as Uh,AutocompleteListbox as Gh,AutocompleteOption as _h,autocompleteClasses as Rh,autocompleteListboxClasses as jh,autocompleteOptionClasses as Zh,Avatar as Xh,avatarClasses as Qh,AvatarGroup as Kh,avatarGroupClasses as eb,AspectRatio as ob,aspectRatioClasses as tb,Badge as rb,badgeClasses as nb,breadcrumbsClasses as ab,cardClasses as ib,cardActionsClasses as lb,cardContentClasses as sb,cardCoverClasses as mb,cardOverflowClasses as pb,chipClasses as db,CircularProgress as cb,circularProgressClasses as ub,Drawer as gb,drawerClasses as fb,LinearProgress as hb,linearProgressClasses as bb,List as Cb,listClasses as yb,ListDivider as xb,listDividerClasses as vb,ListItem as Mb,listItemClasses as kb,ListItemButton as Db,listItemButtonClasses as Pb,ListItemContent as Tb,listItemContentClasses as wb,ListItemDecorator as Ib,listItemDecoratorClasses as Ab,ListSubheader as Fb,listSubheaderClasses as Bb,Link as Nb,linkClasses as Lb,Slider as Sb,sliderClasses as Hb,Step as Eb,stepClasses as zb,StepButton as Ob,stepButtonClasses as Vb,StepIndicator as Jb,Stepper as Yb,stepperClasses as $b,Skeleton as qb,skeletonClasses as Wb}from"@mui/joy";import le from"react";import{AccordionGroup as ir,Accordion as lr,AccordionSummary as sr,AccordionDetails as mr}from"@mui/joy";import{motion as Ve}from"framer-motion";var pr=Ve(sr),Je=pr;Je.displayName="AccordionSummary";var dr=Ve(mr),Ye=dr;Ye.displayName="AccordionDetails";var cr=Ve(lr);function $e(e){let{summary:o,details:t,variant:n,color:i,...a}=e,r=n==="solid"?"solid":void 0;return le.createElement(cr,{variant:r,color:i,...a},le.createElement(Je,{variant:r,color:i},o),le.createElement(Ye,{variant:r,color:i},t))}$e.displayName="Accordion";var ur=Ve(ir);function lo(e){let{variant:o,color:t,items:n,...i}=e;return le.createElement(ur,{variant:o,color:t,...i},n.map((a,r)=>le.createElement($e,{key:r,summary:a.summary,details:a.details,index:r,variant:o,color:t})))}lo.displayName="Accordions";import qe from"react";import{Alert as vr,styled as Mr}from"@mui/joy";import{motion as kr}from"framer-motion";import gr from"react";import{Typography as fr}from"@mui/joy";import{motion as hr}from"framer-motion";var br=hr(fr),$=e=>gr.createElement(br,{...e});$.displayName="Typography";var Y=$;import{Stack as Cr}from"@mui/joy";import{motion as yr}from"framer-motion";var xr=yr(Cr),se=xr;se.displayName="Stack";var J=se;var Dr=Mr(kr(vr))({alignItems:"flex-start",fontWeight:"unset"});function so(e){let{title:o,content:t,actions:n,color:i="primary",...a}=e,r=e.invertedColors||e.variant==="solid";return qe.createElement(Dr,{...a,color:i,endDecorator:n,invertedColors:r},qe.createElement(J,null,o&&qe.createElement(Y,{level:"title-sm",color:i},o),qe.createElement(Y,{level:"body-sm",color:i},t)))}so.displayName="Alert";import L,{useCallback as Hr,useEffect as Er,useMemo as ce,useRef as zr,useState as Or}from"react";import{Autocomplete as Vr,AutocompleteOption as Jr,ListSubheader as Yr,AutocompleteListbox as $r,ListItemDecorator as it,CircularProgress as qr,styled as Wr}from"@mui/joy";import{useVirtualizer as Ur}from"@tanstack/react-virtual";import{Popper as Gr}from"@mui/base";import{FormControl as Pr,styled as Tr}from"@mui/joy";import{motion as wr}from"framer-motion";var Ir=Tr(wr(Pr))({width:"100%"}),me=Ir;me.displayName="FormControl";var B=me;import{FormLabel as Ar}from"@mui/joy";import{motion as Fr}from"framer-motion";var Br=Fr(Ar),pe=Br;pe.displayName="FormLabel";var N=pe;import{FormHelperText as Nr}from"@mui/joy";import{motion as Lr}from"framer-motion";var Sr=Lr(Nr),de=Sr;de.displayName="FormHelperText";var w=de;var _r=Wr(Gr,{name:"Autocomplete",slot:"Popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Rr=L.forwardRef((e,o)=>{let{anchorEl:t,open:n,modifiers:i,children:a,ownerState:{loading:r,size:l="md"},...m}=e,u=zr(null),g=a[0].every(h=>h.hasOwnProperty("group")),d=r?[a[1]]:a[0].length===0?[a[2]]:g?a[0].flatMap(h=>[L.createElement(Yr,{key:h.key,component:"li"},h.group),...h.children]):a[0],y=Ur({count:d.length,estimateSize:()=>36,getScrollElement:()=>u.current,overscan:5}),s=y.getVirtualItems();return Er(()=>{n&&y.measure()},[n]),L.createElement(_r,{ref:o,anchorEl:t,open:n,modifiers:i},L.createElement($r,{...m},L.createElement("div",{ref:u,style:{overflow:"auto"}},L.createElement("div",{style:{height:`${y.getTotalSize()}px`,position:"relative"}},s.map(({index:h,size:p,start:c,key:v})=>L.cloneElement(d[h],{key:v,style:{position:"absolute",top:0,left:0,width:"100%",fontSize:`var(--ceed-fontSize-${l})`,height:`${p}px`,transform:`translateY(${c}px)`,overflow:"visible"},children:L.createElement("div",{style:{textOverflow:"ellipsis",textWrap:"nowrap",overflow:"hidden",width:"100%"}},d[h].props.children)}))))))});function lt(e){let{label:o,error:t,helperText:n,color:i,size:a,disabled:r,required:l,onChange:m,onChangeComplete:u,...g}=e,[d,y]=Or(e.value||e.defaultValue),s=ce(()=>e.options.map(f=>typeof f!="object"?{value:f,label:f}:f),[e.options]),h=ce(()=>new Set(s.map(f=>f.value)),[e.options]),p=ce(()=>e.loading?{value:"",label:"",startDecorator:L.createElement(qr,{size:"sm",color:"neutral",variant:"plain",thickness:3})}:typeof d=="string"?s.find(f=>f.value===d)??d:d,[d,e.options,e.loading]),c=Hr(f=>L.isValidElement(f)&&!e.loading?L.cloneElement(f,{size:a}):f,[a,e.loading]),v=ce(()=>c(p?.startDecorator||e.startDecorator),[p,c]),P=ce(()=>c(p?.endDecorator||e.endDecorator),[p,c]),A=L.createElement(Vr,{...g,required:l,onChange:(f,b)=>{y(b);let D=b;m?.({...f,target:{...f.target,value:D?.value}}),h.has(D.value)&&u?.({...f,target:{...f.target,value:D?.value}})},color:i,value:p,options:s,size:a,disabled:r,startDecorator:v,endDecorator:P,getOptionLabel:f=>`${f.value??""}`,slots:{listbox:Rr},renderOption:(f,b)=>L.createElement(Jr,{...f},b.startDecorator&&L.createElement(it,{sx:D=>({marginInlineEnd:`var(--Input-gap, ${D.spacing(1)})`})},c(b.startDecorator)),c(b.label),b.endDecorator&&L.createElement(it,{sx:D=>({marginInlineStart:`var(--Input-gap, ${D.spacing(1)})`})},c(b.endDecorator))),renderGroup:f=>f});return o?L.createElement(B,{required:l,color:i,size:a,error:t,disabled:r},L.createElement(N,null,o),A,n&&L.createElement(w,null,n)):A}import{Box as jr}from"@mui/joy";import{motion as Zr}from"framer-motion";var Xr=Zr(jr),ue=Xr;ue.displayName="Box";var We=ue;import q from"react";import{Breadcrumbs as pt,Link as sn}from"@mui/joy";import mo from"react";import{Menu as Qr,MenuButton as Kr,MenuItem as en}from"@mui/joy";import{motion as po}from"framer-motion";var on=po(Qr),ge=e=>mo.createElement(on,{...e});ge.displayName="Menu";var tn=po(Kr),fe=e=>mo.createElement(tn,{...e});fe.displayName="MenuButton";var rn=po(en),he=e=>mo.createElement(rn,{...e});he.displayName="MenuItem";var st=ge;import{Dropdown as nn}from"@mui/joy";import{motion as an}from"framer-motion";var ln=an(nn),be=ln;be.displayName="Dropdown";var mt=be;function co(e){let{crumbs:o,size:t,startCrumbCount:n=1,endCrumbCount:i=3,slots:{link:a,...r}={link:sn},slotProps:{link:l,...m}={link:{color:"neutral"}},collapsed:u=!0,...g}=e,d=c=>c.type==="link"&&a?q.createElement(a,{to:c.linkHref,href:c.linkHref,...l},c.label):q.createElement(Y,null,c.label);if(!u)return q.createElement(pt,{size:t,slots:r,slotProps:m,...g},o.map(c=>q.createElement(d,{...c})));let y=Math.max(1,i),s=o.slice(0,n).map(c=>q.createElement(d,{...c})),h=(n+y>o.length?o.slice(n):o.slice(-y)).map(c=>q.createElement(d,{...c})),p=o.slice(n,-y).map(c=>q.createElement(he,null,q.createElement(d,{...c})));return q.createElement(pt,{size:t,slots:r,slotProps:m,...g},s,p.length&&q.createElement(mt,null,q.createElement(fe,{size:t,variant:"plain"},"..."),q.createElement(st,{size:t},p)),h)}co.displayName="Breadcrumbs";import mn,{forwardRef as pn}from"react";import{Button as dn}from"@mui/joy";import{motion as cn}from"framer-motion";var un=cn(dn),Ce=pn((e,o)=>mn.createElement(un,{ref:o,...e}));Ce.displayName="Button";var I=Ce;import x,{Fragment as xe,forwardRef as Mn,useMemo as Ct}from"react";import{styled as U}from"@mui/joy";import kn from"@mui/icons-material/esm/ChevronLeft.js";import Dn from"@mui/icons-material/esm/ChevronRight.js";import{AnimatePresence as yt,motion as Pn}from"framer-motion";var dt=e=>{let o=[],t=new Date(e.getFullYear(),e.getMonth(),1),n=new Date(e.getFullYear(),e.getMonth()+1,0),i=Math.ceil((t.getDay()+1)/7),a=Math.ceil((n.getDate()+t.getDay())/7),r=1;for(let l=1;l<=a;l++){let m=[];for(let u=1;u<=7;u++)l===i&&u<t.getDay()+1||r>n.getDate()?m.push(void 0):(m.push(r),r++);o.push(m)}return o},ct=(e,o)=>e.toLocaleString(o,{year:"numeric"}),uo=(e,o)=>e.toLocaleString(o,{year:"numeric",month:"long"}),ut=(e,o)=>new Date(0,e).toLocaleString(o,{month:"short"}),gt=e=>{let o=new Date().getDay(),t=new Date;return t.setDate(t.getDate()-o),Array.from({length:7}).map(()=>{let n=t.toLocaleString(e,{weekday:"short"});return t.setDate(t.getDate()+1),n})},ft=e=>{let o=new Date,t=new Date(e);return t.setHours(0,0,0,0),o.setHours(0,0,0,0),t.getTime()===o.getTime()},go=(e,o)=>{let t=new Date(e),n=new Date(o);return t.setHours(0,0,0,0),n.setHours(0,0,0,0),t.getTime()===n.getTime()},Z=(e,o,t)=>{let n=new Date(t);n.setHours(0,0,0,0);let i=new Date(Math.min(e.getTime(),o.getTime())),a=new Date(Math.max(e.getTime(),o.getTime()));return n>=i&&n<=a},Ue=(e,o)=>e.getFullYear()===o.getFullYear()&&e.getMonth()===o.getMonth();import gn from"react";import{IconButton as fn}from"@mui/joy";import{motion as hn}from"framer-motion";var bn=hn(fn),ye=e=>gn.createElement(bn,{...e});ye.displayName="IconButton";var V=ye;import{useCallback as Cn,useMemo as yn,useState as Ge}from"react";import{useThemeProps as xn}from"@mui/joy";var vn=(e,o)=>o.includes(e)?e:o[0],ht=e=>{let[o,t]=Ge(()=>vn(e.view||"day",e.views||["day","month"])),[n,i]=Ge(e.defaultValue),[a,r]=Ge(()=>{let p=new Date;return p.setDate(1),p.setHours(0,0,0,0),e.value?.[0]||e.defaultValue?.[0]||p}),[[l,m],u]=Ge([0,0]),g=e.view??o,d=p=>{u([l+p,p])},y=Cn(p=>{r(p),g==="month"?a.getFullYear()!==p.getFullYear()&&d(p>a?1:-1):d(p>a?1:-1),e.onMonthChange?.(p)},[e.onMonthChange,a,g]),s=xn({props:{locale:"default",views:["day","month"],view:g,value:e.value??n,...e,onChange:e.value?e.onChange:p=>{i(p),e.onChange?.(p)},onMonthChange:y,onViewChange:()=>{let p=g==="month"?"day":"month";!(!e.views||e.views.includes(p))||e.view===p||(e.onViewChange?e.onViewChange(p):t(p))}},name:"Calendar"}),h=yn(()=>({...s,viewMonth:a,direction:m}),[s,a,m]);return[s,h]};import{useCallback as ne,useState as bt}from"react";var _e=e=>{let[o,t]=bt(null),[n,i]=bt(null);return{calendarTitle:e.view==="month"?ct(e.viewMonth,e.locale||"default"):uo(e.viewMonth,e.locale||"default"),onPrev:ne(()=>{if(e.view==="day"){let a=new Date(e.viewMonth||new Date);a.setMonth(a.getMonth()-1),e.onMonthChange?.(a)}else if(e.view==="month"){let a=new Date(e.viewMonth||new Date);a.setFullYear(a.getFullYear()-1),e.onMonthChange?.(a)}},[e.onMonthChange,e.viewMonth,e.view]),onNext:ne(()=>{if(e.view==="day"){let a=new Date(e.viewMonth||new Date);a.setMonth(a.getMonth()+1),e.onMonthChange?.(a)}else if(e.view==="month"){let a=new Date(e.viewMonth||new Date);a.setFullYear(a.getFullYear()+1),e.onMonthChange?.(a)}},[e.onMonthChange,e.viewMonth,e.view]),getDayCellProps:ne(a=>{let r=new Date(e.viewMonth||new Date);r.setHours(0,0,0,0),r.setDate(a);let l=e.rangeSelection&&e.value&&e.value[0]&&(o&&Z(e.value[0],o,r)||e.value[1]&&Z(e.value[0],e.value[1],r));return{"aria-label":r.toLocaleDateString(),"aria-current":l?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,o]),getMonthCellProps:ne(a=>{let r=new Date(e.viewMonth||new Date);r.setDate(1),r.setHours(0,0,0,0),r.setMonth(a);let m=!e.views?.find(u=>u==="day")&&e.rangeSelection&&e.value&&e.value[0]&&(n&&Z(e.value[0],n,r)||e.value[1]&&Z(e.value[0],e.value[1],r));return{"aria-label":r.toLocaleDateString(),"aria-current":m?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,n]),getPickerDayProps:ne(a=>{let r=new Date(e.viewMonth||new Date);r.setHours(0,0,0,0),r.setDate(a);let l=!!e.value&&(go(r,e.value[0])||e.value[1]&&go(r,e.value[1])),m=e.rangeSelection&&e.value&&e.value[0]&&(o&&Z(e.value[0],o,r)||e.value[1]&&Z(e.value[0],e.value[1],r)),u=()=>{e.rangeSelection?e.value?e.value[0]&&!e.value[1]?e.onChange?.([new Date(Math.min(e.value[0].getTime(),r.getTime())),new Date(Math.max(e.value[0].getTime(),r.getTime()))]):e.onChange?.([r,void 0]):e.onChange?.([r,void 0]):e.onChange?.([r,void 0]),t(null)};return{isToday:ft(r),isSelected:l,onClick:u,onMouseEnter:e.rangeSelection&&e.value?.[0]&&!e.value?.[1]?()=>t(r):void 0,disabled:e.minDate&&r<e.minDate||e.maxDate&&r>e.maxDate||e.disableFuture&&r>new Date||e.disablePast&&r<(()=>{let g=new Date;return g.setHours(0,0,0,0),g})(),tabIndex:-1,"aria-label":r.toLocaleDateString(),"aria-selected":l?"true":void 0,"aria-current":m?"date":void 0}},[e.onChange,e.value,e.viewMonth,e.rangeSelection,e.minDate,e.maxDate,e.disableFuture,e.disablePast,o]),getPickerMonthProps:ne(a=>{let r=new Date(e.viewMonth||new Date);r.setDate(1),r.setHours(0,0,0,0),r.setMonth(a);let l=!e.views?.find(y=>y==="day"),m=l&&e.rangeSelection,u=!!e.value&&(Ue(r,e.value[0])||e.value[1]&&Ue(r,e.value[1])),g=m&&e.value&&e.value[0]&&(n&&Z(e.value[0],n,r)||e.value[1]&&Z(e.value[0],e.value[1],r)),d=()=>{m?e.value?e.value[0]&&!e.value[1]?e.onChange?.([new Date(Math.min(e.value[0].getTime(),r.getTime())),new Date(Math.max(e.value[0].getTime(),r.getTime()))]):e.onChange?.([r,void 0]):e.onChange?.([r,void 0]):l?e.onChange?.([r,void 0]):(e.onViewChange?.("day"),e.onMonthChange?.(r)),i(null)};return{isSelected:u,onMouseEnter:m&&e.value?.[0]&&!e.value?.[1]?()=>i(r):void 0,disabled:e.minDate&&(()=>{let y=new Date(r);return y.setMonth(y.getMonth()+1),y.setDate(0),y<e.minDate})()||e.maxDate&&(()=>{let y=new Date(r);return y.setDate(0),y>e.maxDate})()||e.disableFuture&&r>new Date||e.disablePast&&r<new Date&&!Ue(r,new Date),onClick:d,tabIndex:-1,"aria-label":uo(r,e.locale||"default"),"aria-selected":u?"true":void 0,"aria-current":g?"date":void 0}},[e.onMonthChange,e.onViewChange,e.onChange,e.viewMonth,e.locale,e.value,e.minDate,e.maxDate,e.disableFuture,e.disablePast,n])}};var Tn=U("div",{name:"Calendar",slot:"root"})({maxWidth:"264px"}),wn=U("div",{name:"Calendar",slot:"calendarHeader"})(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",padding:e.spacing(2)})),xt=U("div",{name:"Calendar",slot:"viewContainer"})(({theme:e,calendarType:o})=>({paddingLeft:e.spacing(2),paddingRight:e.spacing(2),position:"relative",overflow:"hidden",minHeight:o==="datePicker"?"250px":"unset"})),vt=U(Pn.table,{name:"Calendar",slot:"viewTable"})(({theme:e})=>({borderSpacing:0,"& td, & th":{padding:0},"& th":{paddingTop:e.spacing(2),paddingBottom:e.spacing(2)}})),In=U("thead",{name:"Calendar",slot:"weekHeaderContainer"})({}),An=U("tbody",{name:"Calendar",slot:"dayPickerContainer"})({}),Fn=U(I,{name:"Calendar",slot:"switchViewButton"})(({ownerState:e})=>[e.view==="month"&&{pointerEvents:"none"}]),Bn=U("td",{name:"Calendar",slot:"dayCell"})(({theme:e})=>({"&[aria-current=date]":{position:"relative","& button[aria-current=date]:not([aria-selected=true]):not(:hover):not(:active)":{backgroundColor:`rgb(${e.palette.primary.lightChannel})`},'& + td[aria-hidden] + td[aria-current="date"]::before':{content:'""',position:"absolute",top:0,left:"-10px",bottom:0,width:"16px",backgroundColor:`rgb(${e.palette.primary.lightChannel})`,zIndex:-1}}})),Nn=U("td",{name:"Calendar",slot:"monthCell"})(({theme:e})=>({"&[aria-current=date]":{position:"relative","& button[aria-current=date]:not([aria-selected=true]):not(:hover):not(:active)":{backgroundColor:`rgb(${e.palette.primary.lightChannel})`},'& + td[aria-hidden] + td[aria-current="date"]::before':{content:'""',position:"absolute",top:0,left:"-10px",bottom:0,width:"16px",backgroundColor:`rgb(${e.palette.primary.lightChannel})`,zIndex:-1}}})),Ln=U(I,{name:"Calendar",slot:"month"})(({theme:e,isSelected:o,disabled:t})=>[{width:"59px",textAlign:"center","&:hover":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softHoverBg},"&:active":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softActiveBg}},o&&{backgroundColor:e.palette.primary.solidBg,color:e.palette.primary.solidColor,"&:hover":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidHoverBg},"&:active":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidActiveBg}},t&&{color:e.palette.neutral.solidDisabledColor,backgroundColor:e.palette.neutral.solidDisabledBg}]),Sn=U(I,{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}]),Mt={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})},Re=1e4,kt=(e,o)=>Math.abs(e)*o,Hn=e=>{let{ownerState:o}=e,{getPickerDayProps:t,getDayCellProps:n}=_e(o),i=Ct(()=>dt(o.viewMonth),[o.viewMonth]),a=Ct(()=>gt(o.locale||"default"),[o.locale]);return x.createElement(xt,{calendarType:"datePicker"},x.createElement(yt,{initial:!1,custom:o.direction},x.createElement(vt,{key:`${o.viewMonth.toString()}_${o.direction}`,custom:o.direction,variants:Mt,initial:"enter",animate:"center",exit:"exit",transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}},drag:"x",dragConstraints:{left:0,right:0},dragElastic:1,onDragEnd:(r,{offset:l,velocity:m})=>{let u=kt(l.x,m.x);if(u<-Re){let g=new Date(o.viewMonth||new Date);g.setMonth(g.getMonth()+1),o.onMonthChange?.(g)}else if(u>Re){let g=new Date(o.viewMonth||new Date);g.setMonth(g.getMonth()-1),o.onMonthChange?.(g)}}},x.createElement(In,null,x.createElement("tr",null,a.map((r,l)=>x.createElement(x.Fragment,null,x.createElement("th",null,x.createElement(Y,{level:"body-xs",textAlign:"center"},r)),l<6&&x.createElement("th",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"}))))),x.createElement(An,null,i.map((r,l)=>x.createElement(xe,{key:`${o.viewMonth}_${l}`},x.createElement("tr",null,r.map((m,u)=>m?x.createElement(xe,{key:u},x.createElement(Bn,{...n(m)},x.createElement(Sn,{size:"sm",variant:"plain",color:"neutral",...t(m)},m)),u<6&&x.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})):x.createElement(xe,{key:u},x.createElement("td",null),u<6&&x.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})))),l<i.length-1&&x.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},x.createElement("td",{colSpan:13,style:{height:4}}))))))))},En=e=>{let{ownerState:o}=e,{getPickerMonthProps:t,getMonthCellProps:n}=_e(o),i=Array.from({length:12},(r,l)=>l).reduce((r,l)=>(r[r.length-1].length===4&&r.push([]),r[r.length-1].push(l),r),[[]]),a=!o.views?.find(r=>r==="day");return x.createElement(xt,{calendarType:a?"monthPicker":"datePicker"},x.createElement(yt,{initial:!1,custom:o.direction},x.createElement(vt,{key:`${o.viewMonth.getFullYear()}_${o.direction}`,custom:o.direction,variants:Mt,initial:"enter",animate:"center",exit:"exit",transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}},drag:"x",dragConstraints:{left:0,right:0},dragElastic:1,onDragEnd:(r,{offset:l,velocity:m})=>{let u=kt(l.x,m.x);if(u<-Re){let g=new Date(o.viewMonth||new Date);g.setMonth(g.getMonth()+1),o.onMonthChange?.(g)}else if(u>Re){let g=new Date(o.viewMonth||new Date);g.setMonth(g.getMonth()-1),o.onMonthChange?.(g)}}},x.createElement("tbody",null,i.map((r,l)=>x.createElement(xe,{key:l},x.createElement("tr",null,r.map((m,u)=>x.createElement(xe,{key:m},x.createElement(Nn,{...n(m)},x.createElement(Ln,{size:"sm",variant:"plain",color:"neutral",...t(m)},ut(m,o.locale))),u<3&&x.createElement("td",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"})))),l<i.length-1&&x.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},x.createElement("td",{colSpan:7,style:{height:4}}))))))))},ve=Mn((e,o)=>{let[t,n]=ht(e),{value:i,defaultValue:a,onChange:r,locale:l,onViewChange:m,onMonthChange:u,view:g,views:d,rangeSelection:y,...s}=t,{calendarTitle:h,onPrev:p,onNext:c}=_e(n);return x.createElement(Tn,{ref:o,...s},x.createElement(wn,null,x.createElement(V,{size:"sm",onClick:p},x.createElement(kn,null)),x.createElement(Fn,{ownerState:n,variant:"plain",color:"neutral",onClick:m},h),x.createElement(V,{size:"sm",onClick:c},x.createElement(Dn,null))),g==="day"&&x.createElement(Hn,{ownerState:n}),g==="month"&&x.createElement(En,{ownerState:n}))});ve.displayName="Calendar";var K=ve;import{Card as zn,CardContent as On,CardCover as Vn,CardActions as Jn,CardOverflow as Yn}from"@mui/joy";import{motion as Me}from"framer-motion";var $n=Me(zn),ke=$n;ke.displayName="Card";var qn=Me(On),fo=qn;fo.displayName="CardContent";var Wn=Me(Vn),ho=Wn;ho.displayName="CardCover";var Un=Me(Jn),bo=Un;bo.displayName="CardActions";var Gn=Me(Yn),Co=Gn;Co.displayName="CardOverflow";import _n from"react";import{Checkbox as Rn}from"@mui/joy";import{motion as jn}from"framer-motion";var Zn=jn(Rn),De=e=>_n.createElement(Zn,{...e});De.displayName="Checkbox";var Pe=De;import{Chip as Xn}from"@mui/joy";import{motion as Qn}from"framer-motion";var Kn=Qn(Xn),yo=Kn;yo.displayName="Chip";import{styled as ea}from"@mui/joy";import oa,{forwardRef as ta}from"react";var ra=ea("div",{name:"Container",slot:"root",shouldForwardProp:e=>e!=="maxWidth"})(({theme:e,maxWidth:o="lg"})=>({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block",paddingLeft:e.spacing(4),paddingRight:e.spacing(4),...o==="sm"&&{[e.breakpoints.up("xs")]:{maxWidth:e.breakpoints.values.sm}},...o==="md"&&{[e.breakpoints.up("sm")]:{maxWidth:e.breakpoints.values.md}},...o==="lg"&&{[e.breakpoints.up("md")]:{maxWidth:e.breakpoints.values.lg}},...o==="xl"&&{[e.breakpoints.up("lg")]:{maxWidth:e.breakpoints.values.xl}}})),xo=ta(function(o,t){return oa.createElement(ra,{ref:t,...o})});xo.displayName="Container";import X,{useCallback as la,useMemo as sa,useState as Tt}from"react";import{IntlMessageFormat as ma}from"intl-messageformat";import{NumericFormat as pa}from"react-number-format";import da from"@mui/icons-material/esm/InfoOutlined.js";import Te from"react";import{Input as na}from"@mui/joy";import{motion as aa}from"framer-motion";var Dt=aa(na),we=e=>{let{label:o,helperText:t,error:n,style:i,size:a,color:r,disabled:l,required:m,...u}=e;return o?Te.createElement(B,{required:m,color:r,size:a,error:n,disabled:l},Te.createElement(N,null,o),Te.createElement(Dt,{...u}),t&&Te.createElement(w,null,t)):Te.createElement(Dt,{required:m,color:r,size:a,disabled:l,...u})};we.displayName="Input";var R=we;import ia from"intl-messageformat";var Pt=(e="usd")=>{let[o,t,n]=new ia(`{amount, number, ::currency/${e} unit-width-narrow}`).format({amount:1e3}).toString().replace(/\d/g,"").split("");return{symbol:`${o} `,thousandSeparator:t,decimalSeparator:n,placeholder:n?`${o} 0${n}00`:`${o} 0`,fixedDecimalScale:!!n}};var ca=X.forwardRef(function(o,t){let{onChange:n,...i}=o;return X.createElement(pa,{...i,onValueChange:({value:a})=>{n?.({target:{name:o.name,value:a}})},valueIsNumericString:!0,getInputRef:t,decimalScale:2})}),wt=X.forwardRef(function(o,t){let{currency:n="usd",max:i=1e5,name:a,onChange:r,label:l,error:m,helperText:u,required:g,disabled:d,useMinorUnit:y,...s}=o,{symbol:h,thousandSeparator:p,decimalSeparator:c,placeholder:v,fixedDecimalScale:P}=Pt(n),[k,A]=Tt(o.value),[f,b]=Tt(!!i&&!!o.value&&o.value>i),D=sa(()=>k&&y?k/100:k,[k,y]),M=la(O=>{let te=Number(y?O.target.value?.replace(c,""):O.target.value);A(te),r?.({...O,target:{name:a,value:te}}),i&&te>i?b(!0):b(!1)},[]),T=X.createElement(R,{...s,size:"sm",ref:t,value:D,placeholder:v,onChange:M,disabled:d,required:g,slotProps:{input:{component:ca,decimalSeparator:c,thousandSeparator:p,prefix:h,fixedDecimalScale:P}},sx:{fontFamily:"monospace"}});return l?X.createElement(B,{size:"sm",disabled:d,required:g,error:m||f},X.createElement(N,null,l),T,f?X.createElement(w,null,X.createElement(da,null),new ma(`limit: {amount, number, ::currency/${n} unit-width-narrow}`).format({amount:i})):u&&X.createElement(w,null,u)):T});import C,{useCallback as ae,useEffect as ko,useMemo as ie,useRef as ba,useState as Ca}from"react";import{styled as ya,LinearProgress as xa}from"@mui/joy";import va from"@mui/icons-material/esm/ChevronLeft.js";import Ma from"@mui/icons-material/esm/ChevronRight.js";import{Sheet as ua}from"@mui/joy";import{motion as ga}from"framer-motion";var fa=ga(ua),Ie=fa;Ie.displayName="Sheet";var W=Ie;import G from"react";import{Table as ha}from"@mui/joy";var Ae=e=>{let{children:o,...t}=e;return G.createElement(ha,{...t},o)};Ae.displayName="Table";function vo(e){let{headCells:o,showCheckbox:t,onCheckboxChange:n,slots:{checkbox:i=Pe}={},slotProps:{checkbox:a={}}={}}=e;return G.createElement("thead",null,G.createElement("tr",null,t&&G.createElement("th",{style:{width:"40px",textAlign:"center"}},G.createElement(i,{onChange:n,...a})),o.map(r=>G.createElement("th",{key:r.label,style:{width:r.width,minWidth:r.minWidth,maxWidth:r.maxWidth,textAlign:r.numeric?"right":"left"}},r.label))))}vo.displayName="TableHead";function Mo(e){let{rows:o,cellOrder:t,rowOptions:n,showCheckbox:i,onCheckboxChange:a,slots:{checkbox:r=Pe}={},slotProps:{checkbox:l={}}={}}=e;return G.createElement("tbody",null,o.map((m,u)=>G.createElement("tr",{key:u},i&&G.createElement("td",{style:{textAlign:"center"}},G.createElement(r,{onChange:g=>a?.(g,u),...l})),t.map(g=>G.createElement("td",{key:g,style:{textAlign:n?.[g]?.numeric?"right":"left"}},m[g])))))}Mo.displayName="TableBody";var It=ya("tr",{name:"DataTable",slot:"overlayWrapper"})({position:"sticky",top:"calc(var(--unstable_TableCell-height, 32px))",left:0,right:0,zIndex:1,"& > td":{height:0,padding:0,border:"none !important"}}),je=e=>"Intl"in window?new Intl.NumberFormat().format(e):e;function ka(e){let{paginationModel:{page:o,pageSize:t},rowCount:n,onPageChange:i}=e,a=1,r=Math.ceil(n/t),l=[o-2,o-1].filter(d=>d>1),m=[o+1,o+2].filter(d=>d<=r-1),u=r>1&&o<r-3,g=r>1&&o>4;return C.createElement(J,{direction:"row",spacing:1,sx:{pt:1,pb:1},justifyContent:"end",alignItems:"center"},C.createElement(J,{direction:"row",spacing:.5,alignItems:"center"},C.createElement(V,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o-1),disabled:o===a,"aria-label":"Previous page"},C.createElement(va,null)),o!==a&&C.createElement(I,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(a)},a),g&&C.createElement(I,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o-3)},"..."),l.map(d=>C.createElement(I,{key:d,size:"sm",variant:"plain",color:"neutral",onClick:()=>i(d)},d)),C.createElement(I,{variant:"soft",size:"sm"},o),m.map(d=>C.createElement(I,{key:d,size:"sm",variant:"plain",color:"neutral",onClick:()=>i(d)},d)),u&&C.createElement(I,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o+3)},"..."),o!==r&&C.createElement(I,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(r)},r),C.createElement(V,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o+1),disabled:o===r,"aria-label":"Next page"},C.createElement(Ma,null))))}var Da=e=>C.createElement(We,{sx:{position:"absolute",top:0,right:0,bottom:0,width:"4px",cursor:"col-resize"},onMouseDown:o=>{let t=o.clientX,n=e.current?.getBoundingClientRect().width,i=r=>{n&&t&&(e.current.style.width=`${n+(r.clientX-t)}px`)},a=()=>{document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",a)};document.addEventListener("mousemove",i),document.addEventListener("mouseup",a)}}),Pa=e=>{let o=ba(null),t={width:e.width,minWidth:e.minWidth??"50px",maxWidth:e.maxWidth,textAlign:e.type==="number"?"end":"start",position:e.stickyHeader?void 0:"relative"},n=e.resizable??!0?Da(o):null;return C.createElement("th",{ref:o,key:e.field,style:t},e.headerName??e.field,n)};function Ta({rows:e,columns:o,rowCount:t,pagination:n,paginationMode:i,paginationModel:a,onPaginationModelChange:r,selectionModel:l=[],onSelectionModelChange:m,getId:u,isTotalSelected:g}){let[d,y]=Ca(a?.page||1),s=a?.pageSize||20,h=ae((f,b)=>u?.(f)??f?.id??`${(b||0)+(d-1)*s}`,[u??d,s]),p=ie(()=>new Set(l),[l]),c=ie(()=>!n||i==="server"?e:e.slice((d-1)*s,(d-1)*s+s),[e,d,s,i,n]),v=ie(()=>c.length>0&&c.every((f,b)=>p.has(h(f,b))),[c,p,d,s,h]),P=t||e.length,k=ie(()=>g??(P>0&&l.length===P),[g,l,P]),A=ae(f=>{y(f),r?.({page:f,pageSize:s})},[r]);return ko(()=>{A(1)},[P]),ko(()=>{let f=Math.max(1,Math.ceil(P/s));d>f&&A(f)},[d,P,s]),ko(()=>{m?.([])},[d]),{rowCount:P,page:d,pageSize:s,onPaginationModelChange:A,getId:h,HeadCell:Pa,dataInPage:c,isAllSelected:v,isTotalSelected:k,isSelectedRow:ae(f=>p.has(f),[p]),onAllCheckboxChange:ae(()=>{m?.(v?[]:c.map(h))},[v,c,m]),onCheckboxChange:ae((f,b)=>{if(p.has(b)){let D=l.filter(M=>M!==b);m?.(D)}else{let D=[...l,b];m?.(D)}},[l,m]),columns:ie(()=>o||Object.keys(e[0]||{}).map(f=>({field:f})),[e,o]),onTotalSelect:ae(()=>{m?.(k?[]:e.map(h),!k)},[k,e,m])}}function Do(e){let{rows:o,checkboxSelection:t,selectionModel:n,onSelectionModelChange:i,rowCount:a,columns:r,onPaginationModelChange:l,pagination:m,paginationMode:u,paginationModel:g,loading:d,slots:{checkbox:y=Pe,toolbar:s,footer:h,loadingOverlay:p=()=>C.createElement(xa,{value:8,variant:"plain"})}={},slotProps:{checkbox:c={},toolbar:v,background:P={}}={},...k}=e,{columns:A,isAllSelected:f,isSelectedRow:b,onAllCheckboxChange:D,onCheckboxChange:M,getId:T,rowCount:O,page:te,pageSize:io,onPaginationModelChange:or,dataInPage:tr,isTotalSelected:nt,onTotalSelect:at,HeadCell:rr}=Ta(e),nr=ie(()=>({page:te,pageSize:io}),[te,io]);return C.createElement(We,null,C.createElement(J,{direction:"row",sx:{pt:1,pb:1},justifyContent:"space-between",alignItems:"center"},!!t&&C.createElement(J,{direction:"row",spacing:1},!f&&C.createElement(Y,{level:"body-xs"},je(n?.length||0)," items selected"),f&&!nt&&C.createElement(J,{direction:"row",spacing:1,alignItems:"center"},C.createElement(Y,{level:"body-xs"},"All ",je(n?.length||0)," items on this page are selected."),C.createElement(I,{size:"sm",variant:"plain",onClick:at},"Select all ",je(O??o.length)," items")),nt&&C.createElement(J,{direction:"row",spacing:1,alignItems:"center"},C.createElement(Y,{level:"body-xs"},"All ",je(O??o.length)," items are selected."),C.createElement(I,{size:"sm",variant:"plain",color:"danger",onClick:at},"Cancel"))),s&&C.createElement(s,{...v||{}})),C.createElement(W,{variant:"outlined",sx:{overflow:"auto",width:"100%",boxShadow:"sm",borderRadius:"sm"},...P},C.createElement(Ae,{...k},C.createElement("thead",null,C.createElement("tr",null,t&&C.createElement("th",{style:{width:"40px",textAlign:"center"}},C.createElement(y,{onChange:D,checked:f,indeterminate:(n||[]).length>0&&!f,...c})),A.map(oe=>C.createElement(rr,{key:oe.field,stickyHeader:e.stickyHeader,...oe})))),C.createElement("tbody",null,C.createElement(It,null,!!d&&C.createElement("td",null,C.createElement(We,{sx:{position:"absolute",top:0,left:0,right:0}},C.createElement(p,null)))),C.createElement(It,null),tr.map((oe,ar)=>{let re=T(oe,ar);return C.createElement("tr",{key:re,role:t?"checkbox":void 0,tabIndex:t?-1:void 0,onClick:t?_=>M(_,re):void 0,"aria-checked":t?b(re):void 0},t&&C.createElement("th",{scope:"row",style:{textAlign:"center"}},C.createElement(y,{onChange:_=>M(_,re),checked:b(re),...c})),A.map(_=>C.createElement("td",{key:_.field,style:{textAlign:_.type&&["number","date"].includes(_.type)?"end":"start"}},_.renderCell?.({row:oe,value:oe[_.field],id:re})??oe[_.field])))})),h&&C.createElement(h,null))),io<O&&m&&C.createElement(ka,{paginationModel:nr,rowCount:O,onPageChange:or}))}Do.displayName="DataTable";import S,{forwardRef as Na,useCallback as At,useEffect as La,useImperativeHandle as Sa,useRef as Ha,useState as Ft}from"react";import{IMaskInput as Ea,IMask as Po}from"react-imask";import za from"@mui/icons-material/esm/CalendarToday.js";import{styled as To}from"@mui/joy";import{FocusTrap as Oa,ClickAwayListener as Va,Popper as Ja}from"@mui/base";import{DialogActions as wa,styled as Ia}from"@mui/joy";import{motion as Aa}from"framer-motion";var Fa=Aa(wa),Ba=Ia(Fa)(({theme:e})=>({padding:e.spacing(2),gap:e.spacing(2),flexDirection:"row",justifyContent:"flex-end"})),Fe=Ba;Fe.displayName="DialogActions";var j=Fe;var Ya=To(Ja,{name:"DatePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),$a=To(W,{name:"DatePicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),qa=To("div",{name:"DatePicker",slot:"container"})({width:"100%"}),Bt=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("/")},Wa=S.forwardRef(function(o,t){let{onChange:n,...i}=o;return S.createElement(Ea,{...i,inputRef:t,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/`m/`d",blocks:{d:{mask:Po.MaskedRange,from:1,to:31,maxLength:2},m:{mask:Po.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Po.MaskedRange,from:1900,to:9999}},format:Bt,parse:a=>{let r=a.split("/");return new Date(Number(r[0]),Number(r[1])-1,Number(r[2]))},autofix:"pad",overwrite:!0})}),Nt=Na((e,o)=>{let{onChange:t,disabled:n,label:i,error:a,helperText:r,minDate:l,maxDate:m,disableFuture:u,disablePast:g,required:d,...y}=e,s=Ha(null),[h,p]=Ft(e.value||""),[c,v]=Ft(null),P=!!c;La(()=>{p(e.value||"")},[e.value]),Sa(o,()=>s.current,[s.current]);let k=At(b=>{p(b.target.value),t?.(b)},[]),A=At(b=>{v(c?null:b.currentTarget),s.current?.focus()},[c,v,s]),f=S.createElement(qa,null,S.createElement(Oa,{open:!0},S.createElement(S.Fragment,null,S.createElement(R,{...y,ref:s,size:"sm",value:h,onChange:k,placeholder:"YYYY/MM/DD",disabled:n,required:d,slotProps:{input:{component:Wa,ref:s}},sx:{fontFamily:"monospace"},endDecorator:S.createElement(V,{variant:"plain",onClick:A},S.createElement(za,null))}),P&&S.createElement(Va,{onClickAway:()=>v(null)},S.createElement(Ya,{id:"date-picker-popper",open:!0,anchorEl:c,placement:"bottom-end",onMouseDown:b=>b.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}]},S.createElement($a,{tabIndex:-1,role:"presentation"},S.createElement(K,{value:Number.isNaN(new Date(h).getTime())?void 0:[new Date(h),void 0],onChange:([b])=>{k({target:{name:e.name,value:Bt(b)}}),v(null),s.current?.blur()},minDate:l?new Date(l):void 0,maxDate:m?new Date(m):void 0,disableFuture:u,disablePast:g}),S.createElement(j,{sx:{p:1}},S.createElement(I,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{k({target:{name:e.name,value:""}}),v(null),s.current?.blur()}},"Clear"))))))));return i?S.createElement(B,{required:d,disabled:n,error:a,size:"sm"},S.createElement(N,null,i),f,r&&S.createElement(w,null,r)):f});import H,{forwardRef as Ua,useCallback as wo,useEffect as Ga,useImperativeHandle as _a,useMemo as Ra,useRef as ja,useState as Lt}from"react";import{IMaskInput as Za,IMask as Io}from"react-imask";import Xa from"@mui/icons-material/esm/CalendarToday.js";import{styled as Ao}from"@mui/joy";import{FocusTrap as Qa,ClickAwayListener as Ka,Popper as ei}from"@mui/base";var oi=Ao(ei,{name:"DateRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),ti=Ao(W,{name:"DateRangePicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({zIndex:e.zIndex.tooltip,width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),ri=Ao("div",{name:"DateRangePicker",slot:"container"})({width:"100%"}),St=([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(" - ")},Ht=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]))]},ni=H.forwardRef(function(o,t){let{onChange:n,...i}=o;return H.createElement(Za,{...i,inputRef:t,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/`m/`d - Y/`m/`d",blocks:{d:{mask:Io.MaskedRange,from:1,to:31,maxLength:2},m:{mask:Io.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Io.MaskedRange,from:1900,to:9999}},format:St,parse:Ht,autofix:"pad",overwrite:!0})}),Fo=Ua((e,o)=>{let{onChange:t,disabled:n,label:i,error:a,helperText:r,minDate:l,maxDate:m,disableFuture:u,disablePast:g,required:d,...y}=e,s=ja(null),[h,p]=Lt(e.value||""),[c,v]=Lt(null),P=!!c,k=Ra(()=>h?Ht(h):void 0,[h]);Ga(()=>{p(e.value||"")},[e.value]),_a(o,()=>s.current,[s.current]);let A=wo(M=>{p(M.target.value),t?.(M)},[t]),f=wo(M=>{v(c?null:M.currentTarget),s.current?.focus()},[c,v,s]),b=wo(([M,T])=>{!M||!T||(s.current?.blur(),p(St([M,T])),v(null))},[p,v,s]),D=H.createElement(ri,null,H.createElement(Qa,{open:!0},H.createElement(H.Fragment,null,H.createElement(R,{...y,ref:o,size:"sm",value:h,onChange:A,disabled:n,required:d,placeholder:"YYYY/MM/DD - YYYY/MM/DD",slotProps:{input:{component:ni,ref:s}},sx:{fontFamily:"monospace"},endDecorator:H.createElement(V,{variant:"plain",onClick:f},H.createElement(Xa,null))}),P&&H.createElement(Ka,{onClickAway:()=>v(null)},H.createElement(oi,{id:"date-range-picker-popper",open:!0,anchorEl:c,placement:"bottom-end",onMouseDown:M=>M.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}]},H.createElement(ti,{tabIndex:-1,role:"presentation"},H.createElement(K,{rangeSelection:!0,defaultValue:k,onChange:b,minDate:l?new Date(l):void 0,maxDate:m?new Date(m):void 0,disableFuture:u,disablePast:g}),H.createElement(j,{sx:{p:1}},H.createElement(I,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{p(""),v(null),s.current?.blur()}},"Clear"))))))));return i?H.createElement(B,{required:d,disabled:n,error:a,size:"sm"},H.createElement(N,null,i),D,r&&H.createElement(w,null,r)):D});Fo.displayName="DateRangePicker";import{DialogContent as ai,styled as ii}from"@mui/joy";import{motion as li}from"framer-motion";var si=li(ai),mi=ii(si)(({theme:e})=>({padding:e.spacing(0,6,5)})),Be=mi;Be.displayName="DialogContent";var Ze=Be;import{DialogTitle as pi,styled as di}from"@mui/joy";import{motion as ci}from"framer-motion";var ui=ci(pi),gi=di(ui)(({theme:e})=>({padding:e.spacing(4,6)})),Ne=gi;Ne.displayName="DialogTitle";var Xe=Ne;import Se from"react";import Qe from"react";import{Modal as fi,ModalDialog as hi,ModalClose as bi,ModalOverflow as Ci,styled as Et}from"@mui/joy";import{motion as Ke}from"framer-motion";var yi=Ke(fi),Bo=yi;Bo.displayName="Modal";var xi=Ke(hi),zt=Et(xi)({padding:0}),Le=zt;Le.displayName="ModalDialog";var vi=Et(Ke(bi))(({theme:e})=>({top:e.spacing(3),right:e.spacing(6)})),eo=vi;eo.displayName="ModalClose";var Mi=Ke(Ci),No=Mi;No.displayName="ModalOverflow";function Lo(e){let{title:o,children:t,...n}=e;return Qe.createElement(zt,{...n},Qe.createElement(eo,null),Qe.createElement(Xe,null,o),Qe.createElement(Ze,null,t))}Lo.displayName="ModalFrame";import{styled as ki}from"@mui/joy";var Di=ki(Le)(({theme:e})=>({padding:0})),So=Se.forwardRef((e,o)=>{let{title:t,children:n,actions:i,...a}=e;return Se.createElement(Di,{ref:o,...a},Se.createElement(Xe,null,t),Se.createElement(Ze,null,n),Se.createElement(j,null,i))});So.displayName="DialogFrame";import Pi from"react";import{Divider as Ti}from"@mui/joy";import{motion as wi}from"framer-motion";var Ii=wi(Ti),He=e=>Pi.createElement(Ii,{...e});He.displayName="Divider";import Ai from"react";import{Drawer as Fi}from"@mui/joy";import{motion as Bi}from"framer-motion";var Ni=Bi(Fi),Ho=e=>{let{children:o,...t}=e;return Ai.createElement(Ni,{...t,slotProps:{...t.slotProps,content:{...t.slotProps?.content,sx:{bgcolor:"transparent",p:{md:3,sm:0},boxShadow:"none"}}}},o)};Ho.displayName="InsetDrawer";import F,{useCallback as oo,useEffect as Li,useMemo as Ot,useRef as Vt,useState as Eo}from"react";import{styled as ee}from"@mui/joy";import Si from"@mui/icons-material/esm/InfoOutlined.js";import Hi from"@mui/icons-material/esm/CloudUploadRounded.js";import Ei from"@mui/icons-material/esm/UploadFileRounded.js";import zi from"@mui/icons-material/esm/ClearRounded.js";import{combine as Oi}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/combine.js";import{dropTargetForExternal as Vi,monitorForExternal as Ji}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/adapter.js";import{containsFiles as Jt,getFiles as Yi}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/file.js";import{preventUnhandled as Yt}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/prevent-unhandled.js";var $i=ee("input")({width:"1px",height:"1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",position:"absolute"}),qi=ee(J,{name:"Uploader",slot:"PreviewRoot"})({}),Wi=ee(ke,{name:"Uploader",slot:"UploadCard"})(({theme:e})=>({padding:e.spacing(2.5),border:`1px solid ${e.palette.neutral.outlinedBorder}`})),Ui=ee(Ei,{name:"Uploader",slot:"UploadFileIcon"})(({theme:e})=>({color:e.palette.neutral[400],width:"32px",height:"32px"})),Gi=ee(zi,{name:"Uploader",slot:"ClearIcon"})(({theme:e})=>({color:e.palette.neutral.plainColor,width:"18px",height:"18px"})),_i=["byte","kilobyte","megabyte","gigabyte","terabyte","petabyte"],$t=e=>{let o=e==0?0:Math.floor(Math.log(e)/Math.log(1024)),t=e/Math.pow(1024,o),n=_i[o];return Intl.NumberFormat("en-us",{style:"unit",unit:n,unitDisplay:"narrow"}).format(t)},Ri=e=>{let{files:o,onDelete:t}=e;return F.createElement(qi,{gap:1},o.map(n=>F.createElement(Wi,{key:n.name,size:"sm",color:"neutral"},F.createElement(J,{direction:"row",alignItems:"center",gap:2},F.createElement(Ui,null),F.createElement(J,{flex:"1"},F.createElement(Y,{level:"body-sm",textColor:"common.black"},n.name),F.createElement(Y,{level:"body-xs",fontWeight:"300",lineHeight:"1.33",textColor:"text.tertiary"},$t(n.size))),F.createElement(V,{onClick:()=>t?.(n)},F.createElement(Gi,null))))))},ji=ee(J,{name:"Uploader",slot:"root"})(({theme:e})=>({gap:e.spacing(2)})),Zi=ee(W,{name:"Uploader",slot:"dropZone"})(({theme:e,state:o,error:t})=>({width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",padding:e.spacing(5),gap:e.spacing(4),cursor:"pointer",backgroundColor:e.palette.background.surface,border:t?`1px solid ${e.palette.danger.outlinedBorder}`:o==="idle"?`1px solid ${e.palette.neutral.outlinedBorder}`:`1px solid ${e.palette.primary.outlinedBorder}`})),Xi=ee(Hi,{name:"Uploader",slot:"iconContainer"})(({theme:e,state:o,error:t})=>({color:t?`rgba(${e.vars.palette.danger.mainChannel} / 0.6)`:o==="over"?`rgba(${e.palette.primary.mainChannel} / 0.6)`:e.palette.neutral.softActiveBg,width:"32px",height:"32px"})),zo=F.memo(e=>{let{accept:o,maxCount:t,name:n,size:i,maxSize:a,onChange:r,label:l,helperText:m}=e,u=Vt(null),g=Vt(null),[d,y]=Eo(),[s,h]=Eo([]),[p,c]=Eo("idle"),v=Ot(()=>!!d||e.error,[e.error,d]),P=Ot(()=>!t||t&&s.length!==t,[s,t]),k=oo(M=>{try{a&&M.forEach(O=>{if(O.size>a)throw new Error(`File size exceeds the limit: ${$t(a)}`)});let T=[...s,...M];if(t&&T.length>t)throw new Error(`File count exceeds the limit: ${t}`);r?.({target:{name:n,value:T}}),h(T)}catch(T){y(T.message)}},[s]);Li(()=>{let M=u.current;if(M)return Oi(Vi({element:M,canDrop:Jt,onDragEnter:()=>c("over"),onDragLeave:()=>c("potential"),onDrop:async({source:T})=>{let O=await Yi({source:T});k(O)}}),Ji({canMonitor:Jt,onDragStart:()=>{c("potential"),Yt.start()},onDrop:()=>{c("idle"),Yt.stop()}}))});let A=oo(M=>{let T=Array.from(M.target.files||[]);k(T)},[k]),f=oo(M=>{h(T=>(r?.({target:{name:n,value:T.filter(O=>O!==M)}}),T.filter(O=>O!==M)))},[]),b=oo(()=>{g.current?.click()},[]),D=F.createElement(Zi,{state:p,error:v,ref:u,onClick:b},F.createElement(J,{alignItems:"center",gap:1},F.createElement(Xi,{state:p,error:v})),F.createElement($i,{type:"file",onChange:A,multiple:!0,accept:o,ref:g}));return F.createElement(ji,null,P&&(l?F.createElement(B,{size:i,error:!!v},F.createElement(N,null,l),D,d?F.createElement(w,null,F.createElement(Si,null),d):m&&F.createElement(w,null,m)):D),s.length>0&&F.createElement(Ri,{files:s,onDelete:f}))});zo.displayName="Uploader";import{Grid as Qi}from"@mui/joy";import{motion as Ki}from"framer-motion";var el=Ki(Qi),Oo=el;Oo.displayName="Grid";import Q from"react";import ol from"react-markdown";import{Link as tl}from"@mui/joy";var Vo=e=>{let{children:o,color:t,textColor:n,defaultLevel:i="body-md",markdownOptions:a,...r}=e;return Q.createElement($,{color:t,textColor:n,...r},Q.createElement(ol,{...a,children:o,components:{h1:({children:l})=>Q.createElement($,{color:t,textColor:n,level:"h1"},l),h2:({children:l})=>Q.createElement($,{color:t,textColor:n,level:"h2"},l),h3:({children:l})=>Q.createElement($,{color:t,textColor:n,level:"h3"},l),h4:({children:l})=>Q.createElement($,{color:t,textColor:n,level:"h4"},l),p:({children:l})=>Q.createElement($,{color:t,textColor:n,level:i},l),a:({children:l,href:m})=>Q.createElement(tl,{href:m},l),hr:()=>Q.createElement(He,null),...a?.components}}))};Vo.displayName="Markdown";import E,{forwardRef as rl,useCallback as qt,useEffect as nl,useImperativeHandle as al,useRef as il,useState as Wt}from"react";import{IMaskInput as ll,IMask as Ut}from"react-imask";import sl from"@mui/icons-material/esm/CalendarToday.js";import{styled as Yo}from"@mui/joy";import{FocusTrap as ml,ClickAwayListener as pl,Popper as dl}from"@mui/base";var cl=Yo(dl,{name:"MonthPicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),ul=Yo(W,{name:"MonthPicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),gl=Yo("div",{name:"MonthPicker",slot:"container"})({width:"100%"}),Gt=e=>{let o=`${e.getMonth()+1}`,t=e.getFullYear();return Number(o)<10&&(o="0"+o),[t,o].join("/")},Jo=e=>(t=>{if(!/^\d\d\d\d\/(0[1-9]|1[012])(\/(0[1-9]|[23][0-9]))?$/.test(t))return t;let n=t.split("/"),i=new Date(Number(n[0]),Number(n[1])-1);return Gt(i)})(e),_t=e=>e.split(" - ")[0]||"",fl=E.forwardRef(function(o,t){let{onChange:n,...i}=o;return E.createElement(ll,{...i,inputRef:t,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/m",blocks:{m:{mask:Ut.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Ut.MaskedRange,from:1900,to:9999}},format:Jo,parse:_t})}),Rt=rl((e,o)=>{let{onChange:t,disabled:n,label:i,error:a,helperText:r,minDate:l,maxDate:m,disableFuture:u,disablePast:g,required:d,...y}=e,s=il(null),[h,p]=Wt(e.value||""),[c,v]=Wt(null),P=!!c;nl(()=>{p(e.value?Jo(_t(e.value)):"")},[e.value]),al(o,()=>s.current,[s.current]);let k=qt(b=>{p(b.target.value),t?.(b)},[]),A=qt(b=>{v(c?null:b.currentTarget),s.current?.focus()},[c,v,s]),f=E.createElement(gl,null,E.createElement(ml,{open:!0},E.createElement(E.Fragment,null,E.createElement(R,{...y,ref:s,size:"sm",value:h,onChange:k,placeholder:"YYYY/MM",disabled:n,required:d,slotProps:{input:{component:fl,ref:s}},sx:{fontFamily:"monospace"},endDecorator:E.createElement(V,{variant:"plain",onClick:A},E.createElement(sl,null))}),P&&E.createElement(pl,{onClickAway:()=>v(null)},E.createElement(cl,{id:"date-picker-popper",open:!0,anchorEl:c,placement:"bottom-end",onMouseDown:b=>b.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}]},E.createElement(ul,{tabIndex:-1,role:"presentation"},E.createElement(K,{view:"month",views:["month"],value:Number.isNaN(new Date(h).getTime())?void 0:[new Date(h),void 0],onChange:([b])=>{k({target:{name:e.name,value:Jo(Gt(b))}}),v(null),s.current?.blur()},minDate:l?new Date(l):void 0,maxDate:m?new Date(m):void 0,disableFuture:u,disablePast:g}),E.createElement(j,{sx:{p:1}},E.createElement(I,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{k({target:{name:e.name,value:""}}),v(null),s.current?.blur()}},"Clear"))))))));return i?E.createElement(B,{required:d,disabled:n,error:a,size:"sm"},E.createElement(N,null,i),f,r&&E.createElement(w,null,r)):f});import z,{forwardRef as hl,useCallback as $o,useEffect as bl,useImperativeHandle as Cl,useMemo as yl,useRef as xl,useState as jt}from"react";import{IMaskInput as vl,IMask as Zt}from"react-imask";import Ml from"@mui/icons-material/esm/CalendarToday.js";import{styled as Go}from"@mui/joy";import{FocusTrap as kl,ClickAwayListener as Dl,Popper as Pl}from"@mui/base";var Tl=Go(Pl,{name:"MonthRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),wl=Go(W,{name:"MonthRangePicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({zIndex:e.zIndex.tooltip,width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),Il=Go("div",{name:"MonthRangePicker",slot:"container"})({width:"100%"}),qo=e=>{let o=`${e.getMonth()+1}`,t=e.getFullYear();return Number(o)<10&&(o="0"+o),[t,o].join("/")},Wo=([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 qo(a)};return[t(e),t(o)].join(" - ")},Uo=e=>{let o=e.split(" - ")[0]||"",t=e.split(" - ")[1]||"";return[o,t]},Al=z.forwardRef(function(o,t){let{onChange:n,...i}=o;return z.createElement(vl,{...i,inputRef:t,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/m - Y/m",blocks:{m:{mask:Zt.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Zt.MaskedRange,from:1900,to:9999}},format:Wo,parse:Uo})}),_o=hl((e,o)=>{let{onChange:t,disabled:n,label:i,error:a,helperText:r,minDate:l,maxDate:m,disableFuture:u,disablePast:g,required:d,...y}=e,s=xl(null),[h,p]=jt(""),[c,v]=jt(null),P=!!c,k=yl(()=>h?Uo(h).map(M=>new Date(M)):void 0,[h]);bl(()=>{p(e.value?Wo(Uo(e.value)):"")},[e.value]),Cl(o,()=>s.current,[s.current]);let A=$o(M=>{p(M.target.value),t?.(M)},[t]),f=$o(M=>{v(c?null:M.currentTarget),s.current?.focus()},[c,v,s]),b=$o(([M,T])=>{!M||!T||(p(Wo([qo(M),qo(T)])),v(null),s.current?.blur())},[p,v,s]),D=z.createElement(Il,null,z.createElement(kl,{open:!0},z.createElement(z.Fragment,null,z.createElement(R,{...y,ref:o,size:"sm",value:h,onChange:A,disabled:n,required:d,placeholder:"YYYY/MM - YYYY/MM",slotProps:{input:{component:Al,ref:s}},sx:{fontFamily:"monospace"},endDecorator:z.createElement(V,{variant:"plain",onClick:f},z.createElement(Ml,null))}),P&&z.createElement(Dl,{onClickAway:()=>v(null)},z.createElement(Tl,{id:"date-range-picker-popper",open:!0,anchorEl:c,placement:"bottom-end",onMouseDown:M=>M.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}]},z.createElement(wl,{tabIndex:-1,role:"presentation"},z.createElement(K,{view:"month",views:["month"],rangeSelection:!0,defaultValue:k,onChange:b,minDate:l?new Date(l):void 0,maxDate:m?new Date(m):void 0,disableFuture:u,disablePast:g}),z.createElement(j,{sx:{p:1}},z.createElement(I,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{p(""),v(null),s.current?.blur()}},"Clear"))))))));return i?z.createElement(B,{required:d,disabled:n,error:a,size:"sm"},z.createElement(N,null,i),D,r&&z.createElement(w,null,r)):D});_o.displayName="MonthRangePicker";import{Radio as Fl,RadioGroup as Bl}from"@mui/joy";import{motion as Xt}from"framer-motion";var Nl=Xt(Fl),Ee=Nl;Ee.displayName="Radio";var Ll=Xt(Bl),ze=Ll;ze.displayName="RadioGroup";import Qt from"react";function Ro(e){let{items:o,...t}=e;return Qt.createElement(ze,{...t},o.map(n=>Qt.createElement(Ee,{key:`${n.value}`,value:n.value,label:n.label})))}Ro.displayName="RadioList";import Oe,{useMemo as Sl}from"react";import{Select as Hl,Option as El}from"@mui/joy";import{motion as zl}from"framer-motion";var Ol=zl(El),to=Ol;to.displayName="Option";function jo(e){let{label:o,helperText:t,error:n,size:i,color:a,disabled:r,required:l,onChange:m,...u}=e,g=Sl(()=>e.options.map(s=>typeof s!="object"?{value:s,label:s}:s),[e.options]),y=Oe.createElement(Hl,{...u,required:l,disabled:r,size:i,color:a,onChange:(s,h)=>{let p=s||{target:{}},c={...p,target:{name:p.target?.name||e.name,value:h||void 0}};m?.(c)}},g.map(s=>Oe.createElement(to,{key:s.value,value:s.value},s.label)));return o?Oe.createElement(B,{required:l,disabled:r,size:i,color:a,error:n},Oe.createElement(N,null,o),y,t&&Oe.createElement(w,null,t)):y}jo.displayName="Select";import Kt from"react";import{Switch as Vl,styled as Jl,switchClasses as Yl}from"@mui/joy";import{motion as er}from"framer-motion";var $l=er(Vl),ql=Jl(er.div)({"--Icon-fontSize":"calc(var(--Switch-thumbSize) * 0.75)",display:"inline-flex",justifyContent:"center",alignItems:"center",position:"absolute",left:"var(--Switch-thumbOffset)",width:"var(--Switch-thumbWidth)",height:"var(--Switch-thumbSize)",borderRadius:"var(--Switch-thumbRadius)",boxShadow:"var(--Switch-thumbShadow)",color:"var(--Switch-thumbColor)",backgroundColor:"var(--Switch-thumbBackground)",[`&.${Yl.checked}`]:{left:"unset",right:"var(--Switch-thumbOffset)"}}),Wl=e=>Kt.createElement(ql,{...e,layout:!0,transition:Ul}),Ul={type:"spring",stiffness:700,damping:30},Zo=e=>Kt.createElement($l,{...e,slots:{thumb:Wl,...e.slots}});Zo.displayName="Switch";import{Tabs as Gl,Tab as _l,TabList as Rl,TabPanel as jl,styled as Zl,tabClasses as Xl}from"@mui/joy";import{motion as ro}from"framer-motion";var Ql=ro(Gl),Xo=Ql;Xo.displayName="Tabs";var Kl=Zl(ro(_l))(({theme:e})=>({[`&:not(.${Xl.selected})`]:{color:e.palette.neutral[700]}})),Qo=Kl;Qo.displayName="Tab";var es=ro(Rl),Ko=es;Ko.displayName="TabList";var os=ro(jl),et=os;et.displayName="TabPanel";import no from"react";import{Textarea as ts}from"@mui/joy";import{motion as rs}from"framer-motion";var ns=rs(ts),ot=e=>{let{label:o,error:t,helperText:n,color:i,size:a,disabled:r,required:l,...m}=e,u=no.createElement(ns,{required:l,disabled:r,color:i,size:a,...m});return o?no.createElement(B,{required:l,disabled:r,color:i,size:a,error:t},no.createElement(N,null,o),u,n&&no.createElement(w,null,n)):u};ot.displayName="Textarea";import ao from"react";import{CssBaseline as as,CssVarsProvider as is,checkboxClasses as ls,extendTheme as ss}from"@mui/joy";var ms=ss({cssVarPrefix:"ceed",spacing:4,zIndex:{popup:1500},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)"},[`& .${ls.root}`]:{verticalAlign:"middle"}})}},JoyTooltip:{defaultProps:{size:"sm",placement:"top"}}}});function tt(e){return ao.createElement(ao.Fragment,null,ao.createElement(is,{theme:ms},ao.createElement(as,null),e.children))}tt.displayName="ThemeProvider";import ps from"react";import{Tooltip as ds}from"@mui/joy";import{motion as cs}from"framer-motion";var us=cs(ds),rt=e=>ps.createElement(us,{...e});rt.displayName="Tooltip";export{$e as Accordion,Ye as AccordionDetails,Je as AccordionSummary,lo as Accordions,so as Alert,ob as AspectRatio,lt as Autocomplete,Gh as AutocompleteListbox,_h as AutocompleteOption,Xh as Avatar,Kh as AvatarGroup,rb as Badge,ue as Box,co as Breadcrumbs,Ce as Button,ve as Calendar,ke as Card,bo as CardActions,fo as CardContent,ho as CardCover,Co as CardOverflow,De as Checkbox,yo as Chip,cb as CircularProgress,xo as Container,wt as CurrencyInput,Do as DataTable,Nt as DatePicker,Fo as DateRangePicker,Fe as DialogActions,Be as DialogContent,So as DialogFrame,Ne as DialogTitle,He as Divider,gb as Drawer,be as Dropdown,me as FormControl,de as FormHelperText,pe as FormLabel,Oo as Grid,ye as IconButton,we as Input,Ho as InsetDrawer,hb as LinearProgress,Nb as Link,Cb as List,xb as ListDivider,Mb as ListItem,Db as ListItemButton,Tb as ListItemContent,Ib as ListItemDecorator,Fb as ListSubheader,Vo as Markdown,ge as Menu,fe as MenuButton,he as MenuItem,Bo as Modal,eo as ModalClose,Le as ModalDialog,Lo as ModalFrame,No as ModalOverflow,Rt as MonthPicker,_o as MonthRangePicker,to as Option,Ee as Radio,ze as RadioGroup,Ro as RadioList,jo as Select,Ie as Sheet,qb as Skeleton,Sb as Slider,se as Stack,Eb as Step,Ob as StepButton,Jb as StepIndicator,Yb as Stepper,Zo as Switch,Qo as Tab,Ko as TabList,et as TabPanel,Ae as Table,Mo as TableBody,vo as TableHead,Xo as Tabs,ot as Textarea,tt as ThemeProvider,rt as Tooltip,$ as Typography,zo as Uploader,$h as accordionClasses,qh as accordionDetailsClasses,Uh as accordionSummaryClasses,Wh as accordionsClasses,lh as alertClasses,tb as aspectRatioClasses,Rh as autocompleteClasses,jh as autocompleteListboxClasses,Zh as autocompleteOptionClasses,Qh as avatarClasses,eb as avatarGroupClasses,nb as badgeClasses,sh as boxClasses,ab as breadcrumbsClasses,mh as buttonClasses,lb as cardActionsClasses,ib as cardClasses,sb as cardContentClasses,mb as cardCoverClasses,pb as cardOverflowClasses,ph as checkboxClasses,db as chipClasses,ub as circularProgressClasses,zh as dialogActionsClasses,Eh as dialogContentClasses,Hh as dialogTitleClasses,dh as dividerClasses,fb as drawerClasses,Ph as formControlClasses,wh as formHelperTextClasses,Th as formLabelClasses,Ih as gridClasses,ch as iconButtonClasses,uh as inputClasses,bb as linearProgressClasses,Lb as linkClasses,yb as listClasses,vb as listDividerClasses,Pb as listItemButtonClasses,kb as listItemClasses,wb as listItemContentClasses,Ab as listItemDecoratorClasses,Bb as listSubheaderClasses,fh as menuButtonClasses,gh as menuClasses,hh as menuItemClasses,Bh as modalClasses,Nh as modalCloseClasses,Lh as modalDialogClasses,Sh as modalOverflowClasses,bh as optionClasses,Ch as radioClasses,yh as radioGroupClasses,xh as selectClasses,Fh as sheetClasses,Wb as skeletonClasses,Hb as sliderClasses,Ah as stackClasses,Vb as stepButtonClasses,zb as stepClasses,$b as stepperClasses,vh as switchClasses,Jh as tabListClasses,Yh as tabPanelClasses,Mh as tableClasses,Vh as tabsClasses,kh as textareaClasses,Oh as tooltipClasses,Dh as typographyClasses,ah as useColorScheme,nh as useTheme,ih as useThemeProps};
|
|
1
|
+
import{useTheme as nh,useColorScheme as ah,useThemeProps as ih,alertClasses as lh,boxClasses as sh,buttonClasses as mh,checkboxClasses as ph,dividerClasses as dh,iconButtonClasses as ch,inputClasses as uh,menuClasses as gh,menuButtonClasses as fh,menuItemClasses as hh,optionClasses as bh,radioClasses as Ch,radioGroupClasses as yh,selectClasses as xh,switchClasses as vh,tableClasses as Mh,textareaClasses as kh,typographyClasses as Dh,formControlClasses as Ph,formLabelClasses as Th,formHelperTextClasses as wh,gridClasses as Ih,stackClasses as Ah,sheetClasses as Fh,modalClasses as Bh,modalCloseClasses as Nh,modalDialogClasses as Lh,modalOverflowClasses as Sh,dialogTitleClasses as Hh,dialogContentClasses as Eh,dialogActionsClasses as zh,tooltipClasses as Oh,tabsClasses as Vh,tabListClasses as Jh,tabPanelClasses as Yh,accordionClasses as $h,accordionDetailsClasses as qh,accordionGroupClasses as Wh,accordionSummaryClasses as Uh,AutocompleteListbox as Gh,AutocompleteOption as _h,autocompleteClasses as Rh,autocompleteListboxClasses as jh,autocompleteOptionClasses as Zh,Avatar as Xh,avatarClasses as Qh,AvatarGroup as Kh,avatarGroupClasses as eb,AspectRatio as ob,aspectRatioClasses as tb,Badge as rb,badgeClasses as nb,breadcrumbsClasses as ab,cardClasses as ib,cardActionsClasses as lb,cardContentClasses as sb,cardCoverClasses as mb,cardOverflowClasses as pb,chipClasses as db,CircularProgress as cb,circularProgressClasses as ub,Drawer as gb,drawerClasses as fb,LinearProgress as hb,linearProgressClasses as bb,List as Cb,listClasses as yb,ListDivider as xb,listDividerClasses as vb,ListItem as Mb,listItemClasses as kb,ListItemButton as Db,listItemButtonClasses as Pb,ListItemContent as Tb,listItemContentClasses as wb,ListItemDecorator as Ib,listItemDecoratorClasses as Ab,ListSubheader as Fb,listSubheaderClasses as Bb,Link as Nb,linkClasses as Lb,Slider as Sb,sliderClasses as Hb,Step as Eb,stepClasses as zb,StepButton as Ob,stepButtonClasses as Vb,StepIndicator as Jb,Stepper as Yb,stepperClasses as $b,Skeleton as qb,skeletonClasses as Wb}from"@mui/joy";import le from"react";import{AccordionGroup as ir,Accordion as lr,AccordionSummary as sr,AccordionDetails as mr}from"@mui/joy";import{motion as Ve}from"framer-motion";var pr=Ve(sr),Je=pr;Je.displayName="AccordionSummary";var dr=Ve(mr),Ye=dr;Ye.displayName="AccordionDetails";var cr=Ve(lr);function $e(e){let{summary:o,details:t,variant:n,color:i,...a}=e,r=n==="solid"?"solid":void 0;return le.createElement(cr,{variant:r,color:i,...a},le.createElement(Je,{variant:r,color:i},o),le.createElement(Ye,{variant:r,color:i},t))}$e.displayName="Accordion";var ur=Ve(ir);function lo(e){let{variant:o,color:t,items:n,...i}=e;return le.createElement(ur,{variant:o,color:t,...i},n.map((a,r)=>le.createElement($e,{key:r,summary:a.summary,details:a.details,index:r,variant:o,color:t})))}lo.displayName="Accordions";import qe from"react";import{Alert as vr,styled as Mr}from"@mui/joy";import{motion as kr}from"framer-motion";import gr from"react";import{Typography as fr}from"@mui/joy";import{motion as hr}from"framer-motion";var br=hr(fr),$=e=>gr.createElement(br,{...e});$.displayName="Typography";var Y=$;import{Stack as Cr}from"@mui/joy";import{motion as yr}from"framer-motion";var xr=yr(Cr),se=xr;se.displayName="Stack";var J=se;var Dr=Mr(kr(vr))({alignItems:"flex-start",fontWeight:"unset"});function so(e){let{title:o,content:t,actions:n,color:i="primary",...a}=e,r=e.invertedColors||e.variant==="solid";return qe.createElement(Dr,{...a,color:i,endDecorator:n,invertedColors:r},qe.createElement(J,null,o&&qe.createElement(Y,{level:"title-sm",color:i},o),qe.createElement(Y,{level:"body-sm",color:i},t)))}so.displayName="Alert";import L,{useCallback as Hr,useEffect as Er,useMemo as ce,useRef as zr,useState as Or}from"react";import{Autocomplete as Vr,AutocompleteOption as Jr,ListSubheader as Yr,AutocompleteListbox as $r,ListItemDecorator as it,CircularProgress as qr,styled as Wr}from"@mui/joy";import{useVirtualizer as Ur}from"@tanstack/react-virtual";import{Popper as Gr}from"@mui/base";import{FormControl as Pr,styled as Tr}from"@mui/joy";import{motion as wr}from"framer-motion";var Ir=Tr(wr(Pr))({width:"100%"}),me=Ir;me.displayName="FormControl";var B=me;import{FormLabel as Ar}from"@mui/joy";import{motion as Fr}from"framer-motion";var Br=Fr(Ar),pe=Br;pe.displayName="FormLabel";var N=pe;import{FormHelperText as Nr}from"@mui/joy";import{motion as Lr}from"framer-motion";var Sr=Lr(Nr),de=Sr;de.displayName="FormHelperText";var w=de;var _r=Wr(Gr,{name:"Autocomplete",slot:"Popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Rr=L.forwardRef((e,o)=>{let{anchorEl:t,open:n,modifiers:i,children:a,ownerState:{loading:r,size:l="md"},...m}=e,u=zr(null),g=a[0].every(h=>h.hasOwnProperty("group")),d=r?[a[1]]:a[0].length===0?[a[2]]:g?a[0].flatMap(h=>[L.createElement(Yr,{key:h.key,component:"li"},h.group),...h.children]):a[0],y=Ur({count:d.length,estimateSize:()=>36,getScrollElement:()=>u.current,overscan:5}),s=y.getVirtualItems();return Er(()=>{n&&y.measure()},[n]),L.createElement(_r,{ref:o,anchorEl:t,open:n,modifiers:i},L.createElement($r,{...m},L.createElement("div",{ref:u,style:{overflow:"auto"}},L.createElement("div",{style:{height:`${y.getTotalSize()}px`,position:"relative"}},s.map(({index:h,size:p,start:c,key:v})=>L.cloneElement(d[h],{key:v,style:{position:"absolute",top:0,left:0,width:"100%",fontSize:`var(--ceed-fontSize-${l})`,height:`${p}px`,transform:`translateY(${c}px)`,overflow:"visible"},children:L.createElement("div",{style:{textOverflow:"ellipsis",textWrap:"nowrap",overflow:"hidden",width:"100%"}},d[h].props.children)}))))))});function lt(e){let{label:o,error:t,helperText:n,color:i,size:a,disabled:r,required:l,onChange:m,onChangeComplete:u,...g}=e,[d,y]=Or(e.value||e.defaultValue),s=ce(()=>e.options.map(f=>typeof f!="object"?{value:f,label:f}:f),[e.options]),h=ce(()=>new Set(s.map(f=>f.value)),[e.options]),p=ce(()=>e.loading?{value:"",label:"",startDecorator:L.createElement(qr,{size:"sm",color:"neutral",variant:"plain",thickness:3})}:typeof d=="string"?s.find(f=>f.value===d)??d:d,[d,e.options,e.loading]),c=Hr(f=>L.isValidElement(f)&&!e.loading?L.cloneElement(f,{size:a}):f,[a,e.loading]),v=ce(()=>c(p?.startDecorator||e.startDecorator),[p,c]),D=ce(()=>c(p?.endDecorator||e.endDecorator),[p,c]),A=L.createElement(Vr,{...g,required:l,onChange:(f,b)=>{y(b);let T=b;m?.({...f,target:{...f.target,value:T?.value}}),h.has(T.value)&&u?.({...f,target:{...f.target,value:T?.value}})},color:i,value:p,options:s,size:a,disabled:r,startDecorator:v,endDecorator:D,getOptionLabel:f=>`${f.value??""}`,slots:{listbox:Rr},renderOption:(f,b)=>L.createElement(Jr,{...f},b.startDecorator&&L.createElement(it,{sx:T=>({marginInlineEnd:`var(--Input-gap, ${T.spacing(1)})`})},c(b.startDecorator)),c(b.label),b.endDecorator&&L.createElement(it,{sx:T=>({marginInlineStart:`var(--Input-gap, ${T.spacing(1)})`})},c(b.endDecorator))),renderGroup:f=>f});return o?L.createElement(B,{required:l,color:i,size:a,error:t,disabled:r},L.createElement(N,null,o),A,n&&L.createElement(w,null,n)):A}import{Box as jr}from"@mui/joy";import{motion as Zr}from"framer-motion";var Xr=Zr(jr),ue=Xr;ue.displayName="Box";var We=ue;import q from"react";import{Breadcrumbs as pt,Link as sn}from"@mui/joy";import mo from"react";import{Menu as Qr,MenuButton as Kr,MenuItem as en}from"@mui/joy";import{motion as po}from"framer-motion";var on=po(Qr),ge=e=>mo.createElement(on,{...e});ge.displayName="Menu";var tn=po(Kr),fe=e=>mo.createElement(tn,{...e});fe.displayName="MenuButton";var rn=po(en),he=e=>mo.createElement(rn,{...e});he.displayName="MenuItem";var st=ge;import{Dropdown as nn}from"@mui/joy";import{motion as an}from"framer-motion";var ln=an(nn),be=ln;be.displayName="Dropdown";var mt=be;function co(e){let{crumbs:o,size:t,startCrumbCount:n=1,endCrumbCount:i=3,slots:{link:a,...r}={link:sn},slotProps:{link:l,...m}={link:{color:"neutral"}},collapsed:u=!0,...g}=e,d=c=>c.type==="link"&&a?q.createElement(a,{to:c.linkHref,href:c.linkHref,...l},c.label):q.createElement(Y,null,c.label);if(!u)return q.createElement(pt,{size:t,slots:r,slotProps:m,...g},o.map(c=>q.createElement(d,{...c})));let y=Math.max(1,i),s=o.slice(0,n).map(c=>q.createElement(d,{...c})),h=(n+y>o.length?o.slice(n):o.slice(-y)).map(c=>q.createElement(d,{...c})),p=o.slice(n,-y).map(c=>q.createElement(he,null,q.createElement(d,{...c})));return q.createElement(pt,{size:t,slots:r,slotProps:m,...g},s,p.length&&q.createElement(mt,null,q.createElement(fe,{size:t,variant:"plain"},"..."),q.createElement(st,{size:t},p)),h)}co.displayName="Breadcrumbs";import mn,{forwardRef as pn}from"react";import{Button as dn}from"@mui/joy";import{motion as cn}from"framer-motion";var un=cn(dn),Ce=pn((e,o)=>mn.createElement(un,{ref:o,...e}));Ce.displayName="Button";var I=Ce;import x,{Fragment as xe,forwardRef as Mn,useMemo as Ct}from"react";import{styled as U}from"@mui/joy";import kn from"@mui/icons-material/esm/ChevronLeft.js";import Dn from"@mui/icons-material/esm/ChevronRight.js";import{AnimatePresence as yt,motion as Pn}from"framer-motion";var dt=e=>{let o=[],t=new Date(e.getFullYear(),e.getMonth(),1),n=new Date(e.getFullYear(),e.getMonth()+1,0),i=Math.ceil((t.getDay()+1)/7),a=Math.ceil((n.getDate()+t.getDay())/7),r=1;for(let l=1;l<=a;l++){let m=[];for(let u=1;u<=7;u++)l===i&&u<t.getDay()+1||r>n.getDate()?m.push(void 0):(m.push(r),r++);o.push(m)}return o},ct=(e,o)=>e.toLocaleString(o,{year:"numeric"}),uo=(e,o)=>e.toLocaleString(o,{year:"numeric",month:"long"}),ut=(e,o)=>new Date(0,e).toLocaleString(o,{month:"short"}),gt=e=>{let o=new Date().getDay(),t=new Date;return t.setDate(t.getDate()-o),Array.from({length:7}).map(()=>{let n=t.toLocaleString(e,{weekday:"short"});return t.setDate(t.getDate()+1),n})},ft=e=>{let o=new Date,t=new Date(e);return t.setHours(0,0,0,0),o.setHours(0,0,0,0),t.getTime()===o.getTime()},go=(e,o)=>{let t=new Date(e),n=new Date(o);return t.setHours(0,0,0,0),n.setHours(0,0,0,0),t.getTime()===n.getTime()},Z=(e,o,t)=>{let n=new Date(t);n.setHours(0,0,0,0);let i=new Date(Math.min(e.getTime(),o.getTime())),a=new Date(Math.max(e.getTime(),o.getTime()));return n>=i&&n<=a},Ue=(e,o)=>e.getFullYear()===o.getFullYear()&&e.getMonth()===o.getMonth();import gn from"react";import{IconButton as fn}from"@mui/joy";import{motion as hn}from"framer-motion";var bn=hn(fn),ye=e=>gn.createElement(bn,{...e});ye.displayName="IconButton";var V=ye;import{useCallback as Cn,useMemo as yn,useState as Ge}from"react";import{useThemeProps as xn}from"@mui/joy";var vn=(e,o)=>o.includes(e)?e:o[0],ht=e=>{let[o,t]=Ge(()=>vn(e.view||"day",e.views||["day","month"])),[n,i]=Ge(e.defaultValue),[a,r]=Ge(()=>{let p=new Date;return p.setDate(1),p.setHours(0,0,0,0),e.value?.[0]||e.defaultValue?.[0]||p}),[[l,m],u]=Ge([0,0]),g=e.view??o,d=p=>{u([l+p,p])},y=Cn(p=>{r(p),g==="month"?a.getFullYear()!==p.getFullYear()&&d(p>a?1:-1):d(p>a?1:-1),e.onMonthChange?.(p)},[e.onMonthChange,a,g]),s=xn({props:{locale:"default",views:["day","month"],view:g,value:e.value??n,...e,onChange:e.value?e.onChange:p=>{i(p),e.onChange?.(p)},onMonthChange:y,onViewChange:()=>{let p=g==="month"?"day":"month";!(!e.views||e.views.includes(p))||e.view===p||(e.onViewChange?e.onViewChange(p):t(p))}},name:"Calendar"}),h=yn(()=>({...s,viewMonth:a,direction:m}),[s,a,m]);return[s,h]};import{useCallback as ne,useState as bt}from"react";var _e=e=>{let[o,t]=bt(null),[n,i]=bt(null);return{calendarTitle:e.view==="month"?ct(e.viewMonth,e.locale||"default"):uo(e.viewMonth,e.locale||"default"),onPrev:ne(()=>{if(e.view==="day"){let a=new Date(e.viewMonth||new Date);a.setMonth(a.getMonth()-1),e.onMonthChange?.(a)}else if(e.view==="month"){let a=new Date(e.viewMonth||new Date);a.setFullYear(a.getFullYear()-1),e.onMonthChange?.(a)}},[e.onMonthChange,e.viewMonth,e.view]),onNext:ne(()=>{if(e.view==="day"){let a=new Date(e.viewMonth||new Date);a.setMonth(a.getMonth()+1),e.onMonthChange?.(a)}else if(e.view==="month"){let a=new Date(e.viewMonth||new Date);a.setFullYear(a.getFullYear()+1),e.onMonthChange?.(a)}},[e.onMonthChange,e.viewMonth,e.view]),getDayCellProps:ne(a=>{let r=new Date(e.viewMonth||new Date);r.setHours(0,0,0,0),r.setDate(a);let l=e.rangeSelection&&e.value&&e.value[0]&&(o&&Z(e.value[0],o,r)||e.value[1]&&Z(e.value[0],e.value[1],r));return{"aria-label":r.toLocaleDateString(),"aria-current":l?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,o]),getMonthCellProps:ne(a=>{let r=new Date(e.viewMonth||new Date);r.setDate(1),r.setHours(0,0,0,0),r.setMonth(a);let m=!e.views?.find(u=>u==="day")&&e.rangeSelection&&e.value&&e.value[0]&&(n&&Z(e.value[0],n,r)||e.value[1]&&Z(e.value[0],e.value[1],r));return{"aria-label":r.toLocaleDateString(),"aria-current":m?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,n]),getPickerDayProps:ne(a=>{let r=new Date(e.viewMonth||new Date);r.setHours(0,0,0,0),r.setDate(a);let l=!!e.value&&(go(r,e.value[0])||e.value[1]&&go(r,e.value[1])),m=e.rangeSelection&&e.value&&e.value[0]&&(o&&Z(e.value[0],o,r)||e.value[1]&&Z(e.value[0],e.value[1],r)),u=()=>{e.rangeSelection?e.value?e.value[0]&&!e.value[1]?e.onChange?.([new Date(Math.min(e.value[0].getTime(),r.getTime())),new Date(Math.max(e.value[0].getTime(),r.getTime()))]):e.onChange?.([r,void 0]):e.onChange?.([r,void 0]):e.onChange?.([r,void 0]),t(null)};return{isToday:ft(r),isSelected:l,onClick:u,onMouseEnter:e.rangeSelection&&e.value?.[0]&&!e.value?.[1]?()=>t(r):void 0,disabled:e.minDate&&r<e.minDate||e.maxDate&&r>e.maxDate||e.disableFuture&&r>new Date||e.disablePast&&r<(()=>{let g=new Date;return g.setHours(0,0,0,0),g})(),tabIndex:-1,"aria-label":r.toLocaleDateString(),"aria-selected":l?"true":void 0,"aria-current":m?"date":void 0}},[e.onChange,e.value,e.viewMonth,e.rangeSelection,e.minDate,e.maxDate,e.disableFuture,e.disablePast,o]),getPickerMonthProps:ne(a=>{let r=new Date(e.viewMonth||new Date);r.setDate(1),r.setHours(0,0,0,0),r.setMonth(a);let l=!e.views?.find(y=>y==="day"),m=l&&e.rangeSelection,u=!!e.value&&(Ue(r,e.value[0])||e.value[1]&&Ue(r,e.value[1])),g=m&&e.value&&e.value[0]&&(n&&Z(e.value[0],n,r)||e.value[1]&&Z(e.value[0],e.value[1],r)),d=()=>{m?e.value?e.value[0]&&!e.value[1]?e.onChange?.([new Date(Math.min(e.value[0].getTime(),r.getTime())),new Date(Math.max(e.value[0].getTime(),r.getTime()))]):e.onChange?.([r,void 0]):e.onChange?.([r,void 0]):l?e.onChange?.([r,void 0]):(e.onViewChange?.("day"),e.onMonthChange?.(r)),i(null)};return{isSelected:u,onMouseEnter:m&&e.value?.[0]&&!e.value?.[1]?()=>i(r):void 0,disabled:e.minDate&&(()=>{let y=new Date(r);return y.setMonth(y.getMonth()+1),y.setDate(0),y<e.minDate})()||e.maxDate&&(()=>{let y=new Date(r);return y.setDate(0),y>e.maxDate})()||e.disableFuture&&r>new Date||e.disablePast&&r<new Date&&!Ue(r,new Date),onClick:d,tabIndex:-1,"aria-label":uo(r,e.locale||"default"),"aria-selected":u?"true":void 0,"aria-current":g?"date":void 0}},[e.onMonthChange,e.onViewChange,e.onChange,e.viewMonth,e.locale,e.value,e.minDate,e.maxDate,e.disableFuture,e.disablePast,n])}};var Tn=U("div",{name:"Calendar",slot:"root"})({maxWidth:"264px"}),wn=U("div",{name:"Calendar",slot:"calendarHeader"})(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",padding:e.spacing(2)})),xt=U("div",{name:"Calendar",slot:"viewContainer"})(({theme:e,calendarType:o})=>({paddingLeft:e.spacing(2),paddingRight:e.spacing(2),position:"relative",overflow:"hidden",minHeight:o==="datePicker"?"250px":"unset"})),vt=U(Pn.table,{name:"Calendar",slot:"viewTable"})(({theme:e})=>({borderSpacing:0,"& td, & th":{padding:0},"& th":{paddingTop:e.spacing(2),paddingBottom:e.spacing(2)}})),In=U("thead",{name:"Calendar",slot:"weekHeaderContainer"})({}),An=U("tbody",{name:"Calendar",slot:"dayPickerContainer"})({}),Fn=U(I,{name:"Calendar",slot:"switchViewButton"})(({ownerState:e})=>[e.view==="month"&&{pointerEvents:"none"}]),Bn=U("td",{name:"Calendar",slot:"dayCell"})(({theme:e})=>({"&[aria-current=date]":{position:"relative","& button[aria-current=date]:not([aria-selected=true]):not(:hover):not(:active)":{backgroundColor:`rgb(${e.palette.primary.lightChannel})`},'& + td[aria-hidden] + td[aria-current="date"]::before':{content:'""',position:"absolute",top:0,left:"-10px",bottom:0,width:"16px",backgroundColor:`rgb(${e.palette.primary.lightChannel})`,zIndex:-1}}})),Nn=U("td",{name:"Calendar",slot:"monthCell"})(({theme:e})=>({"&[aria-current=date]":{position:"relative","& button[aria-current=date]:not([aria-selected=true]):not(:hover):not(:active)":{backgroundColor:`rgb(${e.palette.primary.lightChannel})`},'& + td[aria-hidden] + td[aria-current="date"]::before':{content:'""',position:"absolute",top:0,left:"-10px",bottom:0,width:"16px",backgroundColor:`rgb(${e.palette.primary.lightChannel})`,zIndex:-1}}})),Ln=U(I,{name:"Calendar",slot:"month"})(({theme:e,isSelected:o,disabled:t})=>[{width:"59px",textAlign:"center","&:hover":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softHoverBg},"&:active":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softActiveBg}},o&&{backgroundColor:e.palette.primary.solidBg,color:e.palette.primary.solidColor,"&:hover":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidHoverBg},"&:active":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidActiveBg}},t&&{color:e.palette.neutral.solidDisabledColor,backgroundColor:e.palette.neutral.solidDisabledBg}]),Sn=U(I,{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}]),Mt={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})},Re=1e4,kt=(e,o)=>Math.abs(e)*o,Hn=e=>{let{ownerState:o}=e,{getPickerDayProps:t,getDayCellProps:n}=_e(o),i=Ct(()=>dt(o.viewMonth),[o.viewMonth]),a=Ct(()=>gt(o.locale||"default"),[o.locale]);return x.createElement(xt,{calendarType:"datePicker"},x.createElement(yt,{initial:!1,custom:o.direction},x.createElement(vt,{key:`${o.viewMonth.toString()}_${o.direction}`,custom:o.direction,variants:Mt,initial:"enter",animate:"center",exit:"exit",transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}},drag:"x",dragConstraints:{left:0,right:0},dragElastic:1,onDragEnd:(r,{offset:l,velocity:m})=>{let u=kt(l.x,m.x);if(u<-Re){let g=new Date(o.viewMonth||new Date);g.setMonth(g.getMonth()+1),o.onMonthChange?.(g)}else if(u>Re){let g=new Date(o.viewMonth||new Date);g.setMonth(g.getMonth()-1),o.onMonthChange?.(g)}}},x.createElement(In,null,x.createElement("tr",null,a.map((r,l)=>x.createElement(x.Fragment,null,x.createElement("th",null,x.createElement(Y,{level:"body-xs",textAlign:"center"},r)),l<6&&x.createElement("th",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"}))))),x.createElement(An,null,i.map((r,l)=>x.createElement(xe,{key:`${o.viewMonth}_${l}`},x.createElement("tr",null,r.map((m,u)=>m?x.createElement(xe,{key:u},x.createElement(Bn,{...n(m)},x.createElement(Sn,{size:"sm",variant:"plain",color:"neutral",...t(m)},m)),u<6&&x.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})):x.createElement(xe,{key:u},x.createElement("td",null),u<6&&x.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})))),l<i.length-1&&x.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},x.createElement("td",{colSpan:13,style:{height:4}}))))))))},En=e=>{let{ownerState:o}=e,{getPickerMonthProps:t,getMonthCellProps:n}=_e(o),i=Array.from({length:12},(r,l)=>l).reduce((r,l)=>(r[r.length-1].length===4&&r.push([]),r[r.length-1].push(l),r),[[]]),a=!o.views?.find(r=>r==="day");return x.createElement(xt,{calendarType:a?"monthPicker":"datePicker"},x.createElement(yt,{initial:!1,custom:o.direction},x.createElement(vt,{key:`${o.viewMonth.getFullYear()}_${o.direction}`,custom:o.direction,variants:Mt,initial:"enter",animate:"center",exit:"exit",transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}},drag:"x",dragConstraints:{left:0,right:0},dragElastic:1,onDragEnd:(r,{offset:l,velocity:m})=>{let u=kt(l.x,m.x);if(u<-Re){let g=new Date(o.viewMonth||new Date);g.setMonth(g.getMonth()+1),o.onMonthChange?.(g)}else if(u>Re){let g=new Date(o.viewMonth||new Date);g.setMonth(g.getMonth()-1),o.onMonthChange?.(g)}}},x.createElement("tbody",null,i.map((r,l)=>x.createElement(xe,{key:l},x.createElement("tr",null,r.map((m,u)=>x.createElement(xe,{key:m},x.createElement(Nn,{...n(m)},x.createElement(Ln,{size:"sm",variant:"plain",color:"neutral",...t(m)},ut(m,o.locale))),u<3&&x.createElement("td",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"})))),l<i.length-1&&x.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},x.createElement("td",{colSpan:7,style:{height:4}}))))))))},ve=Mn((e,o)=>{let[t,n]=ht(e),{value:i,defaultValue:a,onChange:r,locale:l,onViewChange:m,onMonthChange:u,view:g,views:d,rangeSelection:y,...s}=t,{calendarTitle:h,onPrev:p,onNext:c}=_e(n);return x.createElement(Tn,{ref:o,...s},x.createElement(wn,null,x.createElement(V,{size:"sm",onClick:p},x.createElement(kn,null)),x.createElement(Fn,{ownerState:n,variant:"plain",color:"neutral",onClick:m},h),x.createElement(V,{size:"sm",onClick:c},x.createElement(Dn,null))),g==="day"&&x.createElement(Hn,{ownerState:n}),g==="month"&&x.createElement(En,{ownerState:n}))});ve.displayName="Calendar";var K=ve;import{Card as zn,CardContent as On,CardCover as Vn,CardActions as Jn,CardOverflow as Yn}from"@mui/joy";import{motion as Me}from"framer-motion";var $n=Me(zn),ke=$n;ke.displayName="Card";var qn=Me(On),fo=qn;fo.displayName="CardContent";var Wn=Me(Vn),ho=Wn;ho.displayName="CardCover";var Un=Me(Jn),bo=Un;bo.displayName="CardActions";var Gn=Me(Yn),Co=Gn;Co.displayName="CardOverflow";import _n from"react";import{Checkbox as Rn}from"@mui/joy";import{motion as jn}from"framer-motion";var Zn=jn(Rn),De=e=>_n.createElement(Zn,{...e});De.displayName="Checkbox";var Pe=De;import{Chip as Xn}from"@mui/joy";import{motion as Qn}from"framer-motion";var Kn=Qn(Xn),yo=Kn;yo.displayName="Chip";import{styled as ea}from"@mui/joy";import oa,{forwardRef as ta}from"react";var ra=ea("div",{name:"Container",slot:"root",shouldForwardProp:e=>e!=="maxWidth"})(({theme:e,maxWidth:o="lg"})=>({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block",paddingLeft:e.spacing(4),paddingRight:e.spacing(4),...o==="sm"&&{[e.breakpoints.up("xs")]:{maxWidth:e.breakpoints.values.sm}},...o==="md"&&{[e.breakpoints.up("sm")]:{maxWidth:e.breakpoints.values.md}},...o==="lg"&&{[e.breakpoints.up("md")]:{maxWidth:e.breakpoints.values.lg}},...o==="xl"&&{[e.breakpoints.up("lg")]:{maxWidth:e.breakpoints.values.xl}}})),xo=ta(function(o,t){return oa.createElement(ra,{ref:t,...o})});xo.displayName="Container";import X,{useCallback as la,useMemo as sa,useState as Tt}from"react";import{IntlMessageFormat as ma}from"intl-messageformat";import{NumericFormat as pa}from"react-number-format";import da from"@mui/icons-material/esm/InfoOutlined.js";import Te from"react";import{Input as na}from"@mui/joy";import{motion as aa}from"framer-motion";var Dt=aa(na),we=e=>{let{label:o,helperText:t,error:n,style:i,size:a,color:r,disabled:l,required:m,...u}=e;return o?Te.createElement(B,{required:m,color:r,size:a,error:n,disabled:l},Te.createElement(N,null,o),Te.createElement(Dt,{...u}),t&&Te.createElement(w,null,t)):Te.createElement(Dt,{required:m,color:r,size:a,disabled:l,...u})};we.displayName="Input";var R=we;import ia from"intl-messageformat";var Pt=(e="usd")=>{let[o,t,n]=new ia(`{amount, number, ::currency/${e} unit-width-narrow}`).format({amount:1e3}).toString().replace(/\d/g,"").split("");return{symbol:`${o} `,thousandSeparator:t,decimalSeparator:n,placeholder:n?`${o} 0${n}00`:`${o} 0`,fixedDecimalScale:!!n}};var ca=X.forwardRef(function(o,t){let{onChange:n,...i}=o;return X.createElement(pa,{...i,onValueChange:({value:a})=>{n?.({target:{name:o.name,value:a}})},valueIsNumericString:!0,getInputRef:t,decimalScale:2})}),wt=X.forwardRef(function(o,t){let{currency:n="usd",max:i=1e5,name:a,onChange:r,label:l,error:m,helperText:u,required:g,disabled:d,useMinorUnit:y,...s}=o,{symbol:h,thousandSeparator:p,decimalSeparator:c,placeholder:v,fixedDecimalScale:D}=Pt(n),[k,A]=Tt(o.value),[f,b]=Tt(!!i&&!!o.value&&o.value>i),T=sa(()=>k&&y?k/100:k,[k,y]),M=la(O=>{let te=Number(y?O.target.value?.replace(c,""):O.target.value);A(te),r?.({...O,target:{name:a,value:te}}),i&&te>i?b(!0):b(!1)},[]),P=X.createElement(R,{...s,size:"sm",ref:t,value:T,placeholder:v,onChange:M,disabled:d,required:g,slotProps:{input:{component:ca,decimalSeparator:c,thousandSeparator:p,prefix:h,fixedDecimalScale:D}},sx:{fontFamily:"monospace"}});return l?X.createElement(B,{size:"sm",disabled:d,required:g,error:m||f},X.createElement(N,null,l),P,f?X.createElement(w,null,X.createElement(da,null),new ma(`limit: {amount, number, ::currency/${n} unit-width-narrow}`).format({amount:i})):u&&X.createElement(w,null,u)):P});import C,{useCallback as ae,useEffect as ko,useMemo as ie,useRef as ba,useState as Ca}from"react";import{styled as ya,LinearProgress as xa}from"@mui/joy";import va from"@mui/icons-material/esm/ChevronLeft.js";import Ma from"@mui/icons-material/esm/ChevronRight.js";import{Sheet as ua}from"@mui/joy";import{motion as ga}from"framer-motion";var fa=ga(ua),Ie=fa;Ie.displayName="Sheet";var W=Ie;import G from"react";import{Table as ha}from"@mui/joy";var Ae=e=>{let{children:o,...t}=e;return G.createElement(ha,{...t},o)};Ae.displayName="Table";function vo(e){let{headCells:o,showCheckbox:t,onCheckboxChange:n,slots:{checkbox:i=Pe}={},slotProps:{checkbox:a={}}={}}=e;return G.createElement("thead",null,G.createElement("tr",null,t&&G.createElement("th",{style:{width:"40px",textAlign:"center"}},G.createElement(i,{onChange:n,...a})),o.map(r=>G.createElement("th",{key:r.label,style:{width:r.width,minWidth:r.minWidth,maxWidth:r.maxWidth,textAlign:r.numeric?"right":"left"}},r.label))))}vo.displayName="TableHead";function Mo(e){let{rows:o,cellOrder:t,rowOptions:n,showCheckbox:i,onCheckboxChange:a,slots:{checkbox:r=Pe}={},slotProps:{checkbox:l={}}={}}=e;return G.createElement("tbody",null,o.map((m,u)=>G.createElement("tr",{key:u},i&&G.createElement("td",{style:{textAlign:"center"}},G.createElement(r,{onChange:g=>a?.(g,u),...l})),t.map(g=>G.createElement("td",{key:g,style:{textAlign:n?.[g]?.numeric?"right":"left"}},m[g])))))}Mo.displayName="TableBody";var It=ya("tr",{name:"DataTable",slot:"overlayWrapper"})({position:"sticky",top:"calc(var(--unstable_TableCell-height, 32px))",left:0,right:0,zIndex:1,"& > td":{height:0,padding:0,border:"none !important"}}),je=e=>"Intl"in window?new Intl.NumberFormat().format(e):e;function ka(e){let{paginationModel:{page:o,pageSize:t},rowCount:n,onPageChange:i}=e,a=1,r=Math.ceil(n/t),l=[o-2,o-1].filter(d=>d>1),m=[o+1,o+2].filter(d=>d<=r-1),u=r>1&&o<r-3,g=r>1&&o>4;return C.createElement(J,{direction:"row",spacing:1,sx:{pt:1,pb:1},justifyContent:"end",alignItems:"center"},C.createElement(J,{direction:"row",spacing:.5,alignItems:"center"},C.createElement(V,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o-1),disabled:o===a,"aria-label":"Previous page"},C.createElement(va,null)),o!==a&&C.createElement(I,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(a)},a),g&&C.createElement(I,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o-3)},"..."),l.map(d=>C.createElement(I,{key:d,size:"sm",variant:"plain",color:"neutral",onClick:()=>i(d)},d)),C.createElement(I,{variant:"soft",size:"sm"},o),m.map(d=>C.createElement(I,{key:d,size:"sm",variant:"plain",color:"neutral",onClick:()=>i(d)},d)),u&&C.createElement(I,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o+3)},"..."),o!==r&&C.createElement(I,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(r)},r),C.createElement(V,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o+1),disabled:o===r,"aria-label":"Next page"},C.createElement(Ma,null))))}var Da=e=>C.createElement(We,{sx:{position:"absolute",top:0,right:0,bottom:0,width:"4px",cursor:"col-resize"},onMouseDown:o=>{let t=o.clientX,n=e.current?.getBoundingClientRect().width,i=r=>{n&&t&&(e.current.style.width=`${n+(r.clientX-t)}px`)},a=()=>{document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",a)};document.addEventListener("mousemove",i),document.addEventListener("mouseup",a)}}),Pa=e=>{let o=ba(null),t={width:e.width,minWidth:e.minWidth??"50px",maxWidth:e.maxWidth,textAlign:e.type==="number"?"end":"start",position:e.stickyHeader?void 0:"relative"},n=e.resizable??!0?Da(o):null;return C.createElement("th",{ref:o,key:e.field,style:t},e.headerName??e.field,n)};function Ta({rows:e,columns:o,rowCount:t,pagination:n,paginationMode:i,paginationModel:a,onPaginationModelChange:r,selectionModel:l=[],onSelectionModelChange:m,getId:u,isTotalSelected:g}){let[d,y]=Ca(a?.page||1),s=a?.pageSize||20,h=ae((f,b)=>u?.(f)??f?.id??`${(b||0)+(d-1)*s}`,[u??d,s]),p=ie(()=>new Set(l),[l]),c=ie(()=>!n||i==="server"?e:e.slice((d-1)*s,(d-1)*s+s),[e,d,s,i,n]),v=ie(()=>c.length>0&&c.every((f,b)=>p.has(h(f,b))),[c,p,d,s,h]),D=t||e.length,k=ie(()=>g??(D>0&&l.length===D),[g,l,D]),A=ae(f=>{y(f),r?.({page:f,pageSize:s})},[r]);return ko(()=>{A(1)},[D]),ko(()=>{let f=Math.max(1,Math.ceil(D/s));d>f&&A(f)},[d,D,s]),ko(()=>{m?.([])},[d]),{rowCount:D,page:d,pageSize:s,onPaginationModelChange:A,getId:h,HeadCell:Pa,dataInPage:c,isAllSelected:v,isTotalSelected:k,isSelectedRow:ae(f=>p.has(f),[p]),onAllCheckboxChange:ae(()=>{m?.(v?[]:c.map(h))},[v,c,m]),onCheckboxChange:ae((f,b)=>{if(p.has(b)){let T=l.filter(M=>M!==b);m?.(T)}else{let T=[...l,b];m?.(T)}},[l,m]),columns:ie(()=>o||Object.keys(e[0]||{}).map(f=>({field:f})),[e,o]),onTotalSelect:ae(()=>{m?.(k?[]:e.map(h),!k)},[k,e,m])}}function Do(e){let{rows:o,checkboxSelection:t,selectionModel:n,onSelectionModelChange:i,rowCount:a,columns:r,onPaginationModelChange:l,pagination:m,paginationMode:u,paginationModel:g,loading:d,slots:{checkbox:y=Pe,toolbar:s,footer:h,loadingOverlay:p=()=>C.createElement(xa,{value:8,variant:"plain"})}={},slotProps:{checkbox:c={},toolbar:v,background:D={}}={},...k}=e,{columns:A,isAllSelected:f,isSelectedRow:b,onAllCheckboxChange:T,onCheckboxChange:M,getId:P,rowCount:O,page:te,pageSize:io,onPaginationModelChange:or,dataInPage:tr,isTotalSelected:nt,onTotalSelect:at,HeadCell:rr}=Ta(e),nr=ie(()=>({page:te,pageSize:io}),[te,io]);return C.createElement(We,null,C.createElement(J,{direction:"row",sx:{pt:1,pb:1},justifyContent:"space-between",alignItems:"center"},!!t&&C.createElement(J,{direction:"row",spacing:1},!f&&C.createElement(Y,{level:"body-xs"},je(n?.length||0)," items selected"),f&&!nt&&C.createElement(J,{direction:"row",spacing:1,alignItems:"center"},C.createElement(Y,{level:"body-xs"},"All ",je(n?.length||0)," items on this page are selected."),C.createElement(I,{size:"sm",variant:"plain",onClick:at},"Select all ",je(O??o.length)," items")),nt&&C.createElement(J,{direction:"row",spacing:1,alignItems:"center"},C.createElement(Y,{level:"body-xs"},"All ",je(O??o.length)," items are selected."),C.createElement(I,{size:"sm",variant:"plain",color:"danger",onClick:at},"Cancel"))),s&&C.createElement(s,{...v||{}})),C.createElement(W,{variant:"outlined",sx:{overflow:"auto",width:"100%",boxShadow:"sm",borderRadius:"sm"},...D},C.createElement(Ae,{...k},C.createElement("thead",null,C.createElement("tr",null,t&&C.createElement("th",{style:{width:"40px",textAlign:"center"}},C.createElement(y,{onChange:T,checked:f,indeterminate:(n||[]).length>0&&!f,...c})),A.map(oe=>C.createElement(rr,{key:oe.field,stickyHeader:e.stickyHeader,...oe})))),C.createElement("tbody",null,C.createElement(It,null,!!d&&C.createElement("td",null,C.createElement(We,{sx:{position:"absolute",top:0,left:0,right:0}},C.createElement(p,null)))),C.createElement(It,null),tr.map((oe,ar)=>{let re=P(oe,ar);return C.createElement("tr",{key:re,role:t?"checkbox":void 0,tabIndex:t?-1:void 0,onClick:t?_=>M(_,re):void 0,"aria-checked":t?b(re):void 0},t&&C.createElement("th",{scope:"row",style:{textAlign:"center"}},C.createElement(y,{onChange:_=>M(_,re),checked:b(re),...c})),A.map(_=>C.createElement("td",{key:_.field,style:{textAlign:_.type&&["number","date"].includes(_.type)?"end":"start"}},_.renderCell?.({row:oe,value:oe[_.field],id:re})??oe[_.field])))})),h&&C.createElement(h,null))),io<O&&m&&C.createElement(ka,{paginationModel:nr,rowCount:O,onPageChange:or}))}Do.displayName="DataTable";import S,{forwardRef as Na,useCallback as At,useEffect as La,useImperativeHandle as Sa,useRef as Ha,useState as Ft}from"react";import{IMaskInput as Ea,IMask as Po}from"react-imask";import za from"@mui/icons-material/esm/CalendarToday.js";import{styled as To}from"@mui/joy";import{FocusTrap as Oa,ClickAwayListener as Va,Popper as Ja}from"@mui/base";import{DialogActions as wa,styled as Ia}from"@mui/joy";import{motion as Aa}from"framer-motion";var Fa=Aa(wa),Ba=Ia(Fa)(({theme:e})=>({padding:e.spacing(2),gap:e.spacing(2),flexDirection:"row",justifyContent:"flex-end"})),Fe=Ba;Fe.displayName="DialogActions";var j=Fe;var Ya=To(Ja,{name:"DatePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),$a=To(W,{name:"DatePicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),qa=To("div",{name:"DatePicker",slot:"container"})({width:"100%"}),Bt=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("/")},Wa=S.forwardRef(function(o,t){let{onChange:n,...i}=o;return S.createElement(Ea,{...i,inputRef:t,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/`m/`d",blocks:{d:{mask:Po.MaskedRange,from:1,to:31,maxLength:2},m:{mask:Po.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Po.MaskedRange,from:1900,to:9999}},format:Bt,parse:a=>{let r=a.split("/");return new Date(Number(r[0]),Number(r[1])-1,Number(r[2]))},autofix:"pad",overwrite:!0})}),Nt=Na((e,o)=>{let{onChange:t,disabled:n,label:i,error:a,helperText:r,minDate:l,maxDate:m,disableFuture:u,disablePast:g,required:d,...y}=e,s=Ha(null),[h,p]=Ft(e.value||""),[c,v]=Ft(null),D=!!c;La(()=>{p(e.value||"")},[e.value]),Sa(o,()=>s.current,[s.current]);let k=At(b=>{p(b.target.value),t?.(b)},[]),A=At(b=>{v(c?null:b.currentTarget),s.current?.focus()},[c,v,s]),f=S.createElement(qa,null,S.createElement(Oa,{open:!0},S.createElement(S.Fragment,null,S.createElement(R,{...y,ref:s,size:"sm",value:h,onChange:k,placeholder:"YYYY/MM/DD",disabled:n,required:d,slotProps:{input:{component:Wa,ref:s}},sx:{fontFamily:"monospace"},endDecorator:S.createElement(V,{variant:"plain",onClick:A},S.createElement(za,null))}),D&&S.createElement(Va,{onClickAway:()=>v(null)},S.createElement(Ya,{id:"date-picker-popper",open:!0,anchorEl:c,placement:"bottom-end",onMouseDown:b=>b.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}]},S.createElement($a,{tabIndex:-1,role:"presentation"},S.createElement(K,{value:Number.isNaN(new Date(h).getTime())?void 0:[new Date(h),void 0],onChange:([b])=>{k({target:{name:e.name,value:Bt(b)}}),v(null),s.current?.blur()},minDate:l?new Date(l):void 0,maxDate:m?new Date(m):void 0,disableFuture:u,disablePast:g}),S.createElement(j,{sx:{p:1}},S.createElement(I,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{k({target:{name:e.name,value:""}}),v(null),s.current?.blur()}},"Clear"))))))));return i?S.createElement(B,{required:d,disabled:n,error:a,size:"sm"},S.createElement(N,null,i),f,r&&S.createElement(w,null,r)):f});import H,{forwardRef as Ua,useCallback as wo,useEffect as Ga,useImperativeHandle as _a,useMemo as Ra,useRef as ja,useState as Lt}from"react";import{IMaskInput as Za,IMask as Io}from"react-imask";import Xa from"@mui/icons-material/esm/CalendarToday.js";import{styled as Ao}from"@mui/joy";import{FocusTrap as Qa,ClickAwayListener as Ka,Popper as ei}from"@mui/base";var oi=Ao(ei,{name:"DateRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),ti=Ao(W,{name:"DateRangePicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({zIndex:e.zIndex.tooltip,width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),ri=Ao("div",{name:"DateRangePicker",slot:"container"})({width:"100%"}),St=([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(" - ")},Ht=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]))]},ni=H.forwardRef(function(o,t){let{onChange:n,...i}=o;return H.createElement(Za,{...i,inputRef:t,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/`m/`d - Y/`m/`d",blocks:{d:{mask:Io.MaskedRange,from:1,to:31,maxLength:2},m:{mask:Io.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Io.MaskedRange,from:1900,to:9999}},format:St,parse:Ht,autofix:"pad",overwrite:!0})}),Fo=Ua((e,o)=>{let{onChange:t,disabled:n,label:i,error:a,helperText:r,minDate:l,maxDate:m,disableFuture:u,disablePast:g,required:d,...y}=e,s=ja(null),[h,p]=Lt(e.value||""),[c,v]=Lt(null),D=!!c,k=Ra(()=>h?Ht(h):void 0,[h]);Ga(()=>{p(e.value||"")},[e.value]),_a(o,()=>s.current,[s.current]);let A=wo(M=>{p(M.target.value),t?.(M)},[t]),f=wo(M=>{v(c?null:M.currentTarget),s.current?.focus()},[c,v,s]),b=wo(([M,P])=>{!M||!P||(s.current?.blur(),p(St([M,P])),v(null))},[p,v,s]),T=H.createElement(ri,null,H.createElement(Qa,{open:!0},H.createElement(H.Fragment,null,H.createElement(R,{...y,ref:o,size:"sm",value:h,onChange:A,disabled:n,required:d,placeholder:"YYYY/MM/DD - YYYY/MM/DD",slotProps:{input:{component:ni,ref:s}},sx:{fontFamily:"monospace"},endDecorator:H.createElement(V,{variant:"plain",onClick:f},H.createElement(Xa,null))}),D&&H.createElement(Ka,{onClickAway:()=>v(null)},H.createElement(oi,{id:"date-range-picker-popper",open:!0,anchorEl:c,placement:"bottom-end",onMouseDown:M=>M.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}]},H.createElement(ti,{tabIndex:-1,role:"presentation"},H.createElement(K,{rangeSelection:!0,defaultValue:k,onChange:b,minDate:l?new Date(l):void 0,maxDate:m?new Date(m):void 0,disableFuture:u,disablePast:g}),H.createElement(j,{sx:{p:1}},H.createElement(I,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{p(""),v(null),s.current?.blur()}},"Clear"))))))));return i?H.createElement(B,{required:d,disabled:n,error:a,size:"sm"},H.createElement(N,null,i),T,r&&H.createElement(w,null,r)):T});Fo.displayName="DateRangePicker";import{DialogContent as ai,styled as ii}from"@mui/joy";import{motion as li}from"framer-motion";var si=li(ai),mi=ii(si)(({theme:e})=>({padding:e.spacing(0,6,5)})),Be=mi;Be.displayName="DialogContent";var Ze=Be;import{DialogTitle as pi,styled as di}from"@mui/joy";import{motion as ci}from"framer-motion";var ui=ci(pi),gi=di(ui)(({theme:e})=>({padding:e.spacing(4,6)})),Ne=gi;Ne.displayName="DialogTitle";var Xe=Ne;import Se from"react";import Qe from"react";import{Modal as fi,ModalDialog as hi,ModalClose as bi,ModalOverflow as Ci,styled as Et}from"@mui/joy";import{motion as Ke}from"framer-motion";var yi=Ke(fi),Bo=yi;Bo.displayName="Modal";var xi=Ke(hi),zt=Et(xi)({padding:0}),Le=zt;Le.displayName="ModalDialog";var vi=Et(Ke(bi))(({theme:e})=>({top:e.spacing(3),right:e.spacing(6)})),eo=vi;eo.displayName="ModalClose";var Mi=Ke(Ci),No=Mi;No.displayName="ModalOverflow";function Lo(e){let{title:o,children:t,...n}=e;return Qe.createElement(zt,{...n},Qe.createElement(eo,null),Qe.createElement(Xe,null,o),Qe.createElement(Ze,null,t))}Lo.displayName="ModalFrame";import{styled as ki}from"@mui/joy";var Di=ki(Le)(({theme:e})=>({padding:0})),So=Se.forwardRef((e,o)=>{let{title:t,children:n,actions:i,...a}=e;return Se.createElement(Di,{ref:o,...a},Se.createElement(Xe,null,t),Se.createElement(Ze,null,n),Se.createElement(j,null,i))});So.displayName="DialogFrame";import Pi from"react";import{Divider as Ti}from"@mui/joy";import{motion as wi}from"framer-motion";var Ii=wi(Ti),He=e=>Pi.createElement(Ii,{...e});He.displayName="Divider";import Ai from"react";import{Drawer as Fi}from"@mui/joy";import{motion as Bi}from"framer-motion";var Ni=Bi(Fi),Ho=e=>{let{children:o,...t}=e;return Ai.createElement(Ni,{...t,slotProps:{...t.slotProps,content:{...t.slotProps?.content,sx:{bgcolor:"transparent",p:{md:3,sm:0},boxShadow:"none"}}}},o)};Ho.displayName="InsetDrawer";import F,{useCallback as oo,useEffect as Li,useMemo as Ot,useRef as Vt,useState as Eo}from"react";import{styled as ee}from"@mui/joy";import Si from"@mui/icons-material/esm/InfoOutlined.js";import Hi from"@mui/icons-material/esm/CloudUploadRounded.js";import Ei from"@mui/icons-material/esm/UploadFileRounded.js";import zi from"@mui/icons-material/esm/ClearRounded.js";import{combine as Oi}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/combine.js";import{dropTargetForExternal as Vi,monitorForExternal as Ji}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/adapter.js";import{containsFiles as Jt,getFiles as Yi}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/file.js";import{preventUnhandled as Yt}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/prevent-unhandled.js";var $i=ee("input")({width:"1px",height:"1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",position:"absolute"}),qi=ee(J,{name:"Uploader",slot:"PreviewRoot"})({}),Wi=ee(ke,{name:"Uploader",slot:"UploadCard"})(({theme:e})=>({padding:e.spacing(2.5),border:`1px solid ${e.palette.neutral.outlinedBorder}`})),Ui=ee(Ei,{name:"Uploader",slot:"UploadFileIcon"})(({theme:e})=>({color:e.palette.neutral[400],width:"32px",height:"32px"})),Gi=ee(zi,{name:"Uploader",slot:"ClearIcon"})(({theme:e})=>({color:e.palette.neutral.plainColor,width:"18px",height:"18px"})),_i=["byte","kilobyte","megabyte","gigabyte","terabyte","petabyte"],$t=e=>{let o=e==0?0:Math.floor(Math.log(e)/Math.log(1024)),t=e/Math.pow(1024,o),n=_i[o];return Intl.NumberFormat("en-us",{style:"unit",unit:n,unitDisplay:"narrow"}).format(t)},Ri=e=>{let{files:o,onDelete:t}=e;return F.createElement(qi,{gap:1},o.map(n=>F.createElement(Wi,{key:n.name,size:"sm",color:"neutral"},F.createElement(J,{direction:"row",alignItems:"center",gap:2},F.createElement(Ui,null),F.createElement(J,{flex:"1"},F.createElement(Y,{level:"body-sm",textColor:"common.black"},n.name),F.createElement(Y,{level:"body-xs",fontWeight:"300",lineHeight:"1.33",textColor:"text.tertiary"},$t(n.size))),F.createElement(V,{onClick:()=>t?.(n)},F.createElement(Gi,null))))))},ji=ee(J,{name:"Uploader",slot:"root"})(({theme:e})=>({gap:e.spacing(2)})),Zi=ee(W,{name:"Uploader",slot:"dropZone"})(({theme:e,state:o,error:t})=>({width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",padding:e.spacing(5),gap:e.spacing(4),cursor:"pointer",backgroundColor:e.palette.background.surface,border:t?`1px solid ${e.palette.danger.outlinedBorder}`:o==="idle"?`1px solid ${e.palette.neutral.outlinedBorder}`:`1px solid ${e.palette.primary.outlinedBorder}`})),Xi=ee(Hi,{name:"Uploader",slot:"iconContainer"})(({theme:e,state:o,error:t})=>({color:t?`rgba(${e.vars.palette.danger.mainChannel} / 0.6)`:o==="over"?`rgba(${e.palette.primary.mainChannel} / 0.6)`:e.palette.neutral.softActiveBg,width:"32px",height:"32px"})),zo=F.memo(e=>{let{accept:o,maxCount:t,name:n,size:i,maxSize:a,onChange:r,label:l,helperText:m}=e,u=Vt(null),g=Vt(null),[d,y]=Eo(),[s,h]=Eo([]),[p,c]=Eo("idle"),v=Ot(()=>!!d||e.error,[e.error,d]),D=Ot(()=>!t||t&&s.length!==t,[s,t]),k=oo(M=>{try{a&&M.forEach(O=>{if(O.size>a)throw new Error(`File size exceeds the limit: ${$t(a)}`)});let P=[...s,...M];if(t&&P.length>t)throw new Error(`File count exceeds the limit: ${t}`);r?.({target:{name:n,value:P}}),h(P)}catch(P){y(P.message)}},[s]);Li(()=>{let M=u.current;if(M)return Oi(Vi({element:M,canDrop:Jt,onDragEnter:()=>c("over"),onDragLeave:()=>c("potential"),onDrop:async({source:P})=>{let O=await Yi({source:P});k(O)}}),Ji({canMonitor:Jt,onDragStart:()=>{c("potential"),Yt.start()},onDrop:()=>{c("idle"),Yt.stop()}}))});let A=oo(M=>{let P=Array.from(M.target.files||[]);k(P)},[k]),f=oo(M=>{h(P=>(r?.({target:{name:n,value:P.filter(O=>O!==M)}}),P.filter(O=>O!==M)))},[]),b=oo(()=>{g.current?.click()},[]);return F.createElement(ji,null,D&&F.createElement(B,{size:i,error:!!v},l&&F.createElement(N,null,l),F.createElement(Zi,{state:p,error:v,ref:u,onClick:b},F.createElement(J,{alignItems:"center",gap:1},F.createElement(Xi,{state:p,error:v})),F.createElement($i,{type:"file",onChange:A,multiple:!0,accept:o,ref:g})),d?F.createElement(w,null,F.createElement(Si,null),d):m&&F.createElement(w,null,m)),s.length>0&&F.createElement(Ri,{files:s,onDelete:f}))});zo.displayName="Uploader";import{Grid as Qi}from"@mui/joy";import{motion as Ki}from"framer-motion";var el=Ki(Qi),Oo=el;Oo.displayName="Grid";import Q from"react";import ol from"react-markdown";import{Link as tl}from"@mui/joy";var Vo=e=>{let{children:o,color:t,textColor:n,defaultLevel:i="body-md",markdownOptions:a,...r}=e;return Q.createElement($,{color:t,textColor:n,...r},Q.createElement(ol,{...a,children:o,components:{h1:({children:l})=>Q.createElement($,{color:t,textColor:n,level:"h1"},l),h2:({children:l})=>Q.createElement($,{color:t,textColor:n,level:"h2"},l),h3:({children:l})=>Q.createElement($,{color:t,textColor:n,level:"h3"},l),h4:({children:l})=>Q.createElement($,{color:t,textColor:n,level:"h4"},l),p:({children:l})=>Q.createElement($,{color:t,textColor:n,level:i},l),a:({children:l,href:m})=>Q.createElement(tl,{href:m},l),hr:()=>Q.createElement(He,null),...a?.components}}))};Vo.displayName="Markdown";import E,{forwardRef as rl,useCallback as qt,useEffect as nl,useImperativeHandle as al,useRef as il,useState as Wt}from"react";import{IMaskInput as ll,IMask as Ut}from"react-imask";import sl from"@mui/icons-material/esm/CalendarToday.js";import{styled as Yo}from"@mui/joy";import{FocusTrap as ml,ClickAwayListener as pl,Popper as dl}from"@mui/base";var cl=Yo(dl,{name:"MonthPicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),ul=Yo(W,{name:"MonthPicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),gl=Yo("div",{name:"MonthPicker",slot:"container"})({width:"100%"}),Gt=e=>{let o=`${e.getMonth()+1}`,t=e.getFullYear();return Number(o)<10&&(o="0"+o),[t,o].join("/")},Jo=e=>(t=>{if(!/^\d\d\d\d\/(0[1-9]|1[012])(\/(0[1-9]|[23][0-9]))?$/.test(t))return t;let n=t.split("/"),i=new Date(Number(n[0]),Number(n[1])-1);return Gt(i)})(e),_t=e=>e.split(" - ")[0]||"",fl=E.forwardRef(function(o,t){let{onChange:n,...i}=o;return E.createElement(ll,{...i,inputRef:t,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/m",blocks:{m:{mask:Ut.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Ut.MaskedRange,from:1900,to:9999}},format:Jo,parse:_t})}),Rt=rl((e,o)=>{let{onChange:t,disabled:n,label:i,error:a,helperText:r,minDate:l,maxDate:m,disableFuture:u,disablePast:g,required:d,...y}=e,s=il(null),[h,p]=Wt(e.value||""),[c,v]=Wt(null),D=!!c;nl(()=>{p(e.value?Jo(_t(e.value)):"")},[e.value]),al(o,()=>s.current,[s.current]);let k=qt(b=>{p(b.target.value),t?.(b)},[]),A=qt(b=>{v(c?null:b.currentTarget),s.current?.focus()},[c,v,s]),f=E.createElement(gl,null,E.createElement(ml,{open:!0},E.createElement(E.Fragment,null,E.createElement(R,{...y,ref:s,size:"sm",value:h,onChange:k,placeholder:"YYYY/MM",disabled:n,required:d,slotProps:{input:{component:fl,ref:s}},sx:{fontFamily:"monospace"},endDecorator:E.createElement(V,{variant:"plain",onClick:A},E.createElement(sl,null))}),D&&E.createElement(pl,{onClickAway:()=>v(null)},E.createElement(cl,{id:"date-picker-popper",open:!0,anchorEl:c,placement:"bottom-end",onMouseDown:b=>b.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}]},E.createElement(ul,{tabIndex:-1,role:"presentation"},E.createElement(K,{view:"month",views:["month"],value:Number.isNaN(new Date(h).getTime())?void 0:[new Date(h),void 0],onChange:([b])=>{k({target:{name:e.name,value:Jo(Gt(b))}}),v(null),s.current?.blur()},minDate:l?new Date(l):void 0,maxDate:m?new Date(m):void 0,disableFuture:u,disablePast:g}),E.createElement(j,{sx:{p:1}},E.createElement(I,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{k({target:{name:e.name,value:""}}),v(null),s.current?.blur()}},"Clear"))))))));return i?E.createElement(B,{required:d,disabled:n,error:a,size:"sm"},E.createElement(N,null,i),f,r&&E.createElement(w,null,r)):f});import z,{forwardRef as hl,useCallback as $o,useEffect as bl,useImperativeHandle as Cl,useMemo as yl,useRef as xl,useState as jt}from"react";import{IMaskInput as vl,IMask as Zt}from"react-imask";import Ml from"@mui/icons-material/esm/CalendarToday.js";import{styled as Go}from"@mui/joy";import{FocusTrap as kl,ClickAwayListener as Dl,Popper as Pl}from"@mui/base";var Tl=Go(Pl,{name:"MonthRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),wl=Go(W,{name:"MonthRangePicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({zIndex:e.zIndex.tooltip,width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),Il=Go("div",{name:"MonthRangePicker",slot:"container"})({width:"100%"}),qo=e=>{let o=`${e.getMonth()+1}`,t=e.getFullYear();return Number(o)<10&&(o="0"+o),[t,o].join("/")},Wo=([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 qo(a)};return[t(e),t(o)].join(" - ")},Uo=e=>{let o=e.split(" - ")[0]||"",t=e.split(" - ")[1]||"";return[o,t]},Al=z.forwardRef(function(o,t){let{onChange:n,...i}=o;return z.createElement(vl,{...i,inputRef:t,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/m - Y/m",blocks:{m:{mask:Zt.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Zt.MaskedRange,from:1900,to:9999}},format:Wo,parse:Uo})}),_o=hl((e,o)=>{let{onChange:t,disabled:n,label:i,error:a,helperText:r,minDate:l,maxDate:m,disableFuture:u,disablePast:g,required:d,...y}=e,s=xl(null),[h,p]=jt(""),[c,v]=jt(null),D=!!c,k=yl(()=>h?Uo(h).map(M=>new Date(M)):void 0,[h]);bl(()=>{p(e.value?Wo(Uo(e.value)):"")},[e.value]),Cl(o,()=>s.current,[s.current]);let A=$o(M=>{p(M.target.value),t?.(M)},[t]),f=$o(M=>{v(c?null:M.currentTarget),s.current?.focus()},[c,v,s]),b=$o(([M,P])=>{!M||!P||(p(Wo([qo(M),qo(P)])),v(null),s.current?.blur())},[p,v,s]),T=z.createElement(Il,null,z.createElement(kl,{open:!0},z.createElement(z.Fragment,null,z.createElement(R,{...y,ref:o,size:"sm",value:h,onChange:A,disabled:n,required:d,placeholder:"YYYY/MM - YYYY/MM",slotProps:{input:{component:Al,ref:s}},sx:{fontFamily:"monospace"},endDecorator:z.createElement(V,{variant:"plain",onClick:f},z.createElement(Ml,null))}),D&&z.createElement(Dl,{onClickAway:()=>v(null)},z.createElement(Tl,{id:"date-range-picker-popper",open:!0,anchorEl:c,placement:"bottom-end",onMouseDown:M=>M.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}]},z.createElement(wl,{tabIndex:-1,role:"presentation"},z.createElement(K,{view:"month",views:["month"],rangeSelection:!0,defaultValue:k,onChange:b,minDate:l?new Date(l):void 0,maxDate:m?new Date(m):void 0,disableFuture:u,disablePast:g}),z.createElement(j,{sx:{p:1}},z.createElement(I,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{p(""),v(null),s.current?.blur()}},"Clear"))))))));return i?z.createElement(B,{required:d,disabled:n,error:a,size:"sm"},z.createElement(N,null,i),T,r&&z.createElement(w,null,r)):T});_o.displayName="MonthRangePicker";import{Radio as Fl,RadioGroup as Bl}from"@mui/joy";import{motion as Xt}from"framer-motion";var Nl=Xt(Fl),Ee=Nl;Ee.displayName="Radio";var Ll=Xt(Bl),ze=Ll;ze.displayName="RadioGroup";import Qt from"react";function Ro(e){let{items:o,...t}=e;return Qt.createElement(ze,{...t},o.map(n=>Qt.createElement(Ee,{key:`${n.value}`,value:n.value,label:n.label})))}Ro.displayName="RadioList";import Oe,{useMemo as Sl}from"react";import{Select as Hl,Option as El}from"@mui/joy";import{motion as zl}from"framer-motion";var Ol=zl(El),to=Ol;to.displayName="Option";function jo(e){let{label:o,helperText:t,error:n,size:i,color:a,disabled:r,required:l,onChange:m,...u}=e,g=Sl(()=>e.options.map(s=>typeof s!="object"?{value:s,label:s}:s),[e.options]),y=Oe.createElement(Hl,{...u,required:l,disabled:r,size:i,color:a,onChange:(s,h)=>{let p=s||{target:{}},c={...p,target:{name:p.target?.name||e.name,value:h||void 0}};m?.(c)}},g.map(s=>Oe.createElement(to,{key:s.value,value:s.value},s.label)));return o?Oe.createElement(B,{required:l,disabled:r,size:i,color:a,error:n},Oe.createElement(N,null,o),y,t&&Oe.createElement(w,null,t)):y}jo.displayName="Select";import Kt from"react";import{Switch as Vl,styled as Jl,switchClasses as Yl}from"@mui/joy";import{motion as er}from"framer-motion";var $l=er(Vl),ql=Jl(er.div)({"--Icon-fontSize":"calc(var(--Switch-thumbSize) * 0.75)",display:"inline-flex",justifyContent:"center",alignItems:"center",position:"absolute",left:"var(--Switch-thumbOffset)",width:"var(--Switch-thumbWidth)",height:"var(--Switch-thumbSize)",borderRadius:"var(--Switch-thumbRadius)",boxShadow:"var(--Switch-thumbShadow)",color:"var(--Switch-thumbColor)",backgroundColor:"var(--Switch-thumbBackground)",[`&.${Yl.checked}`]:{left:"unset",right:"var(--Switch-thumbOffset)"}}),Wl=e=>Kt.createElement(ql,{...e,layout:!0,transition:Ul}),Ul={type:"spring",stiffness:700,damping:30},Zo=e=>Kt.createElement($l,{...e,slots:{thumb:Wl,...e.slots}});Zo.displayName="Switch";import{Tabs as Gl,Tab as _l,TabList as Rl,TabPanel as jl,styled as Zl,tabClasses as Xl}from"@mui/joy";import{motion as ro}from"framer-motion";var Ql=ro(Gl),Xo=Ql;Xo.displayName="Tabs";var Kl=Zl(ro(_l))(({theme:e})=>({[`&:not(.${Xl.selected})`]:{color:e.palette.neutral[700]}})),Qo=Kl;Qo.displayName="Tab";var es=ro(Rl),Ko=es;Ko.displayName="TabList";var os=ro(jl),et=os;et.displayName="TabPanel";import no from"react";import{Textarea as ts}from"@mui/joy";import{motion as rs}from"framer-motion";var ns=rs(ts),ot=e=>{let{label:o,error:t,helperText:n,color:i,size:a,disabled:r,required:l,...m}=e,u=no.createElement(ns,{required:l,disabled:r,color:i,size:a,...m});return o?no.createElement(B,{required:l,disabled:r,color:i,size:a,error:t},no.createElement(N,null,o),u,n&&no.createElement(w,null,n)):u};ot.displayName="Textarea";import ao from"react";import{CssBaseline as as,CssVarsProvider as is,checkboxClasses as ls,extendTheme as ss}from"@mui/joy";var ms=ss({cssVarPrefix:"ceed",spacing:4,zIndex:{popup:1500},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)"},[`& .${ls.root}`]:{verticalAlign:"middle"}})}},JoyTooltip:{defaultProps:{size:"sm",placement:"top"}}}});function tt(e){return ao.createElement(ao.Fragment,null,ao.createElement(is,{theme:ms},ao.createElement(as,null),e.children))}tt.displayName="ThemeProvider";import ps from"react";import{Tooltip as ds}from"@mui/joy";import{motion as cs}from"framer-motion";var us=cs(ds),rt=e=>ps.createElement(us,{...e});rt.displayName="Tooltip";export{$e as Accordion,Ye as AccordionDetails,Je as AccordionSummary,lo as Accordions,so as Alert,ob as AspectRatio,lt as Autocomplete,Gh as AutocompleteListbox,_h as AutocompleteOption,Xh as Avatar,Kh as AvatarGroup,rb as Badge,ue as Box,co as Breadcrumbs,Ce as Button,ve as Calendar,ke as Card,bo as CardActions,fo as CardContent,ho as CardCover,Co as CardOverflow,De as Checkbox,yo as Chip,cb as CircularProgress,xo as Container,wt as CurrencyInput,Do as DataTable,Nt as DatePicker,Fo as DateRangePicker,Fe as DialogActions,Be as DialogContent,So as DialogFrame,Ne as DialogTitle,He as Divider,gb as Drawer,be as Dropdown,me as FormControl,de as FormHelperText,pe as FormLabel,Oo as Grid,ye as IconButton,we as Input,Ho as InsetDrawer,hb as LinearProgress,Nb as Link,Cb as List,xb as ListDivider,Mb as ListItem,Db as ListItemButton,Tb as ListItemContent,Ib as ListItemDecorator,Fb as ListSubheader,Vo as Markdown,ge as Menu,fe as MenuButton,he as MenuItem,Bo as Modal,eo as ModalClose,Le as ModalDialog,Lo as ModalFrame,No as ModalOverflow,Rt as MonthPicker,_o as MonthRangePicker,to as Option,Ee as Radio,ze as RadioGroup,Ro as RadioList,jo as Select,Ie as Sheet,qb as Skeleton,Sb as Slider,se as Stack,Eb as Step,Ob as StepButton,Jb as StepIndicator,Yb as Stepper,Zo as Switch,Qo as Tab,Ko as TabList,et as TabPanel,Ae as Table,Mo as TableBody,vo as TableHead,Xo as Tabs,ot as Textarea,tt as ThemeProvider,rt as Tooltip,$ as Typography,zo as Uploader,$h as accordionClasses,qh as accordionDetailsClasses,Uh as accordionSummaryClasses,Wh as accordionsClasses,lh as alertClasses,tb as aspectRatioClasses,Rh as autocompleteClasses,jh as autocompleteListboxClasses,Zh as autocompleteOptionClasses,Qh as avatarClasses,eb as avatarGroupClasses,nb as badgeClasses,sh as boxClasses,ab as breadcrumbsClasses,mh as buttonClasses,lb as cardActionsClasses,ib as cardClasses,sb as cardContentClasses,mb as cardCoverClasses,pb as cardOverflowClasses,ph as checkboxClasses,db as chipClasses,ub as circularProgressClasses,zh as dialogActionsClasses,Eh as dialogContentClasses,Hh as dialogTitleClasses,dh as dividerClasses,fb as drawerClasses,Ph as formControlClasses,wh as formHelperTextClasses,Th as formLabelClasses,Ih as gridClasses,ch as iconButtonClasses,uh as inputClasses,bb as linearProgressClasses,Lb as linkClasses,yb as listClasses,vb as listDividerClasses,Pb as listItemButtonClasses,kb as listItemClasses,wb as listItemContentClasses,Ab as listItemDecoratorClasses,Bb as listSubheaderClasses,fh as menuButtonClasses,gh as menuClasses,hh as menuItemClasses,Bh as modalClasses,Nh as modalCloseClasses,Lh as modalDialogClasses,Sh as modalOverflowClasses,bh as optionClasses,Ch as radioClasses,yh as radioGroupClasses,xh as selectClasses,Fh as sheetClasses,Wb as skeletonClasses,Hb as sliderClasses,Ah as stackClasses,Vb as stepButtonClasses,zb as stepClasses,$b as stepperClasses,vh as switchClasses,Jh as tabListClasses,Yh as tabPanelClasses,Mh as tableClasses,Vh as tabsClasses,kh as textareaClasses,Oh as tooltipClasses,Dh as typographyClasses,ah as useColorScheme,nh as useTheme,ih as useThemeProps};
|
package/framer/index.js
CHANGED
|
@@ -127,7 +127,7 @@ Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
|
127
127
|
`),a=!1),Object.assign(Object.assign({},e),{allowNegative:a})}function M4(e){e=A4(e);var t=e.decimalSeparator,r=e.allowedDecimalSeparators,o=e.thousandsGroupStyle,n=e.suffix,a=e.allowNegative,i=e.allowLeadingZeros,s=e.onKeyDown;s===void 0&&(s=Wa);var l=e.onBlur;l===void 0&&(l=Wa);var p=e.thousandSeparator,c=e.decimalScale,d=e.fixedDecimalScale,f=e.prefix;f===void 0&&(f="");var u=e.defaultValue,h=e.value,y=e.valueIsNumericString,v=e.onValueChange,g=II(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),x=Nm(e),b=x.decimalSeparator,k=x.allowedDecimalSeparators,P=function(V){return RI(V,e)},T=function(V,R){return w4(V,R,e)},C=Cl(h)?u:h,S=y!=null?y:_4(C,f,n);Cl(h)?Cl(u)||(S=S||typeof u=="number"):S=S||typeof h=="number";var I=function(V){return OI(V)?V:(typeof V=="number"&&(V=DI(V)),S&&typeof c=="number"?kI(V,c,!!d):V)},O=MI(I(h),I(u),!!S,P,T,v),L=O[0],M=L.numAsString,w=L.formattedValue,H=O[1],N=function(V){var R=V.target,ee=V.key,ne=R.selectionStart,_=R.selectionEnd,pe=R.value;if(pe===void 0&&(pe=""),ne!==_){s(V);return}ee==="Backspace"&&pe[0]==="-"&&ne===f.length+1&&a&&Qi(R,1),c&&d&&(ee==="Backspace"&&pe[ne-1]===b?(Qi(R,ne-1),V.preventDefault()):ee==="Delete"&&pe[ne]===b&&V.preventDefault()),k!=null&&k.includes(ee)&&pe[ne]===b&&Qi(R,ne+1);var ge=p===!0?",":p;ee==="Backspace"&&pe[ne-1]===ge&&Qi(R,ne-1),ee==="Delete"&&pe[ne]===ge&&Qi(R,ne+1),s(V)},D=function(V){var R=M;if(R.match(/\d/g)||(R=""),i||(R=v4(R)),d&&c&&(R=kI(R,c,d)),R!==M){var ee=RI(R,e);H({formattedValue:ee,value:R,floatValue:parseFloat(R)},{event:V,source:Oc.event})}l(V)},z=function(V){return V===b?!0:_c(V)},Y=function(V){var R=V.currentValue,ee=V.lastValue,ne=V.formattedValue,_=V.currentValueIndex,pe=V.formattedValueIndex,ge=R[_],De=ne[pe],ie=AI(ee,R),W=ie.to;return _>=W.start&&_<W.end&&k&&k.includes(ge)&&De===b?!0:ge===De};return Object.assign(Object.assign({},g),{value:w,valueIsNumericString:!1,isValidInputCharacter:z,isCharacterSame:Y,onValueChange:H,format:P,removeFormatting:T,getCaretBoundary:function(V){return D4(V,e)},onKeyDown:N,onBlur:D})}function NI(e){var t=M4(e);return Pl.createElement(E4,Object.assign({},t))}import{jsx as N4}from"react/jsx-runtime";var Lm=fr(N4("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined");import{motion as L4}from"framer-motion";var LI=L4(Xd),wc=e=>{let c=e,{label:t,helperText:r,error:o,style:n,size:a,color:i,disabled:s,required:l}=c,p=xe(c,["label","helperText","error","style","size","color","disabled","required"]);return t?Ce(Ht,{required:l,color:i,size:a,error:o,disabled:s,children:[A(Ut,{children:t}),A(LI,j({},p)),r&&A(Et,{children:r})]}):A(LI,j({required:l,color:i,size:a,disabled:s},p))};wc.displayName="Input";var Sn=wc;var BI=(e="usd")=>{let[t,r,o]=new PI(`{amount, number, ::currency/${e} unit-width-narrow}`).format({amount:1e3}).toString().replace(/\d/g,"").split("");return{symbol:`${t} `,thousandSeparator:r,decimalSeparator:o,placeholder:o?`${t} 0${o}00`:`${t} 0`,fixedDecimalScale:!!o}};var F4=FI.forwardRef(function(t,r){let a=t,{onChange:o}=a,n=xe(a,["onChange"]);return A(NI,ce(j({},n),{onValueChange:({value:i})=>{o==null||o({target:{name:t.name,value:i}})},valueIsNumericString:!0,getInputRef:r,decimalScale:2}))}),$I=FI.forwardRef(function(t,r){let O=t,{currency:o="usd",max:n=1e5,name:a,onChange:i,label:s,error:l,helperText:p,required:c,disabled:d,useMinorUnit:f}=O,u=xe(O,["currency","max","name","onChange","label","error","helperText","required","disabled","useMinorUnit"]),{symbol:h,thousandSeparator:y,decimalSeparator:v,placeholder:g,fixedDecimalScale:x}=BI(o),[b,k]=zI(t.value),[P,T]=zI(!!n&&!!t.value&&t.value>n),C=z4(()=>b&&f?b/100:b,[b,f]),S=B4(L=>{var w;let M=Number(f?(w=L.target.value)==null?void 0:w.replace(v,""):L.target.value);k(M),i==null||i(ce(j({},L),{target:{name:a,value:M}})),n&&M>n?T(!0):T(!1)},[]),I=A(Sn,ce(j({},u),{size:"sm",ref:r,value:C,placeholder:g,onChange:S,disabled:d,required:c,slotProps:{input:{component:F4,decimalSeparator:v,thousandSeparator:y,prefix:h,fixedDecimalScale:x}},sx:{fontFamily:"monospace"}}));return s?Ce(Ht,{size:"sm",disabled:d,required:c,error:l||P,children:[A(Ut,{children:s}),I,P?Ce(Et,{children:[A(Lm,{}),new Mm(`limit: {amount, number, ::currency/${o} unit-width-narrow}`).format({amount:n})]}):p&&A(Et,{children:p})]}):I});import{useCallback as kl,useEffect as Jv,useMemo as Sl,useRef as j4,useState as H4}from"react";import{motion as $4}from"framer-motion";var V4=$4(Uf),Dc=V4;Dc.displayName="Sheet";var Mo=Dc;var Ac=e=>{let o=e,{children:t}=o,r=xe(o,["children"]);return A(Yf,ce(j({},r),{children:t}))};Ac.displayName="Table";function Wv(e){let{headCells:t,showCheckbox:r,onCheckboxChange:o,slots:{checkbox:n=Pc}={},slotProps:{checkbox:a={}}={}}=e;return A("thead",{children:Ce("tr",{children:[r&&A("th",{style:{width:"40px",textAlign:"center"},children:A(n,j({onChange:o},a))}),t.map(i=>A("th",{style:{width:i.width,minWidth:i.minWidth,maxWidth:i.maxWidth,textAlign:i.numeric?"right":"left"},children:i.label},i.label))]})})}Wv.displayName="TableHead";function Gv(e){let{rows:t,cellOrder:r,rowOptions:o,showCheckbox:n,onCheckboxChange:a,slots:{checkbox:i=Pc}={},slotProps:{checkbox:s={}}={}}=e;return A("tbody",{children:t.map((l,p)=>Ce("tr",{children:[n&&A("td",{style:{textAlign:"center"},children:A(i,j({onChange:c=>a==null?void 0:a(c,p)},s))}),r.map(c=>{var d;return A("td",{style:{textAlign:(d=o==null?void 0:o[c])!=null&&d.numeric?"right":"left"},children:l[c]},c)})]},p))})}Gv.displayName="TableBody";var VI=E("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"}}),Bm=e=>"Intl"in window?new Intl.NumberFormat().format(e):e;function U4(e){let{paginationModel:{page:t,pageSize:r},rowCount:o,onPageChange:n}=e,a=1,i=Math.ceil(o/r),s=[t-2,t-1].filter(d=>d>1),l=[t+1,t+2].filter(d=>d<=i-1),p=i>1&&t<i-3,c=i>1&&t>4;return A(Fr,{direction:"row",spacing:1,sx:{pt:1,pb:1},justifyContent:"end",alignItems:"center",children:Ce(Fr,{direction:"row",spacing:.5,alignItems:"center",children:[A(Rr,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(t-1),disabled:t===a,"aria-label":"Previous page",children:A(vm,{})}),t!==a&&A(It,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(a),children:a}),c&&A(It,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(t-3),children:"..."}),s.map(d=>A(It,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(d),children:d},d)),A(It,{variant:"soft",size:"sm",children:t}),l.map(d=>A(It,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(d),children:d},d)),p&&A(It,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(t+3),children:"..."}),t!==i&&A(It,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(i),children:i}),A(Rr,{size:"sm",variant:"plain",color:"neutral",onClick:()=>n(t+1),disabled:t===i,"aria-label":"Next page",children:A(bm,{})})]})})}var W4=e=>A(dm,{sx:{position:"absolute",top:0,right:0,bottom:0,width:"4px",cursor:"col-resize"},onMouseDown:t=>{var i;let r=t.clientX,o=(i=e.current)==null?void 0:i.getBoundingClientRect().width,n=s=>{o&&r&&(e.current.style.width=`${o+(s.clientX-r)}px`)},a=()=>{document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",a)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",a)}}),G4=e=>{var n,a,i;let t=j4(null),r={width:e.width,minWidth:(n=e.minWidth)!=null?n:"50px",maxWidth:e.maxWidth,textAlign:e.type==="number"?"end":"start",position:e.stickyHeader?void 0:"relative"},o=(a=e.resizable)==null||a?W4(t):null;return Ce("th",{ref:t,style:r,children:[(i=e.headerName)!=null?i:e.field,o]},e.field)};function J4({rows:e,columns:t,rowCount:r,pagination:o,paginationMode:n,paginationModel:a,onPaginationModelChange:i,selectionModel:s=[],onSelectionModelChange:l,getId:p,isTotalSelected:c}){let[d,f]=H4((a==null?void 0:a.page)||1),u=(a==null?void 0:a.pageSize)||20,h=kl((P,T)=>{var C,S;return(S=(C=p==null?void 0:p(P))!=null?C:P==null?void 0:P.id)!=null?S:`${(T||0)+(d-1)*u}`},[p!=null?p:d,u]),y=Sl(()=>new Set(s),[s]),v=Sl(()=>!o||n==="server"?e:e.slice((d-1)*u,(d-1)*u+u),[e,d,u,n,o]),g=Sl(()=>v.length>0&&v.every((P,T)=>y.has(h(P,T))),[v,y,d,u,h]),x=r||e.length,b=Sl(()=>c!=null?c:x>0&&s.length===x,[c,s,x]),k=kl(P=>{f(P),i==null||i({page:P,pageSize:u})},[i]);return Jv(()=>{k(1)},[x]),Jv(()=>{let P=Math.max(1,Math.ceil(x/u));d>P&&k(P)},[d,x,u]),Jv(()=>{l==null||l([])},[d]),{rowCount:x,page:d,pageSize:u,onPaginationModelChange:k,getId:h,HeadCell:G4,dataInPage:v,isAllSelected:g,isTotalSelected:b,isSelectedRow:kl(P=>y.has(P),[y]),onAllCheckboxChange:kl(()=>{l==null||l(g?[]:v.map(h))},[g,v,l]),onCheckboxChange:kl((P,T)=>{if(y.has(T)){let C=s.filter(S=>S!==T);l==null||l(C)}else{let C=[...s,T];l==null||l(C)}},[s,l]),columns:Sl(()=>t||Object.keys(e[0]||{}).map(P=>({field:P})),[e,t]),onTotalSelect:kl(()=>{l==null||l(b?[]:e.map(h),!b)},[b,e,l])}}function qv(e){let V=e,{rows:t,checkboxSelection:r,selectionModel:o,onSelectionModelChange:n,rowCount:a,columns:i,onPaginationModelChange:s,pagination:l,paginationMode:p,paginationModel:c,loading:d,slots:{checkbox:f=Pc,toolbar:u,footer:h,loadingOverlay:y=()=>A(Jp,{value:8,variant:"plain"})}={},slotProps:{checkbox:v={},toolbar:g,background:x={}}={}}=V,b=xe(V,["rows","checkboxSelection","selectionModel","onSelectionModelChange","rowCount","columns","onPaginationModelChange","pagination","paginationMode","paginationModel","loading","slots","slotProps"]),{columns:k,isAllSelected:P,isSelectedRow:T,onAllCheckboxChange:C,onCheckboxChange:S,getId:I,rowCount:O,page:L,pageSize:M,onPaginationModelChange:w,dataInPage:H,isTotalSelected:N,onTotalSelect:D,HeadCell:z}=J4(e),Y=Sl(()=>({page:L,pageSize:M}),[L,M]);return Ce(dm,{children:[Ce(Fr,{direction:"row",sx:{pt:1,pb:1},justifyContent:"space-between",alignItems:"center",children:[!!r&&Ce(Fr,{direction:"row",spacing:1,children:[!P&&Ce(qr,{level:"body-xs",children:[Bm((o==null?void 0:o.length)||0)," items selected"]}),P&&!N&&Ce(Fr,{direction:"row",spacing:1,alignItems:"center",children:[Ce(qr,{level:"body-xs",children:["All ",Bm((o==null?void 0:o.length)||0)," items on this page are selected."]}),Ce(It,{size:"sm",variant:"plain",onClick:D,children:["Select all ",Bm(O!=null?O:t.length)," items"]})]}),N&&Ce(Fr,{direction:"row",spacing:1,alignItems:"center",children:[Ce(qr,{level:"body-xs",children:["All ",Bm(O!=null?O:t.length)," items are selected."]}),A(It,{size:"sm",variant:"plain",color:"danger",onClick:D,children:"Cancel"})]})]}),u&&A(u,j({},g||{}))]}),A(Mo,ce(j({variant:"outlined",sx:{overflow:"auto",width:"100%",boxShadow:"sm",borderRadius:"sm"}},x),{children:Ce(Ac,ce(j({},b),{children:[A("thead",{children:Ce("tr",{children:[r&&A("th",{style:{width:"40px",textAlign:"center"},children:A(f,j({onChange:C,checked:P,indeterminate:(o||[]).length>0&&!P},v))}),k.map(R=>A(z,j({stickyHeader:e.stickyHeader},R),R.field))]})}),Ce("tbody",{children:[A(VI,{children:!!d&&A("td",{children:A(dm,{sx:{position:"absolute",top:0,left:0,right:0},children:A(y,{})})})}),A(VI,{}),H.map((R,ee)=>{let ne=I(R,ee);return Ce("tr",{role:r?"checkbox":void 0,tabIndex:r?-1:void 0,onClick:r?_=>S(_,ne):void 0,"aria-checked":r?T(ne):void 0,children:[r&&A("th",{scope:"row",style:{textAlign:"center"},children:A(f,j({onChange:_=>S(_,ne),checked:T(ne)},v))}),k.map(_=>{var pe,ge;return A("td",{style:{textAlign:_.type&&["number","date"].includes(_.type)?"end":"start"},children:(ge=(pe=_.renderCell)==null?void 0:pe.call(_,{row:R,value:R[_.field],id:ne}))!=null?ge:R[_.field]},_.field)})]},ne)})]}),h&&A(h,{})]}))})),M<O&&l&&A(U4,{paginationModel:Y,rowCount:O,onPageChange:w})]})}qv.displayName="DataTable";import oW,{forwardRef as nW,useCallback as JI,useEffect as aW,useImperativeHandle as iW,useRef as sW,useState as qI}from"react";function lo(e){return typeof e=="string"||e instanceof String}function Kv(e){var t;return typeof e=="object"&&e!=null&&(e==null||(t=e.constructor)==null?void 0:t.name)==="Object"}function Yv(e,t){return Array.isArray(t)?Yv(e,(r,o)=>t.includes(o)):Object.entries(e).reduce((r,o)=>{let[n,a]=o;return t(a,n)&&(r[n]=a),r},{})}var Oe={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function Xv(e){switch(e){case Oe.LEFT:return Oe.FORCE_LEFT;case Oe.RIGHT:return Oe.FORCE_RIGHT;default:return e}}function zm(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function Rl(e,t){if(t===e)return!0;let r=Array.isArray(t),o=Array.isArray(e),n;if(r&&o){if(t.length!=e.length)return!1;for(n=0;n<t.length;n++)if(!Rl(t[n],e[n]))return!1;return!0}if(r!=o)return!1;if(t&&e&&typeof t=="object"&&typeof e=="object"){let a=t instanceof Date,i=e instanceof Date;if(a&&i)return t.getTime()==e.getTime();if(a!=i)return!1;let s=t instanceof RegExp,l=e instanceof RegExp;if(s&&l)return t.toString()==e.toString();if(s!=l)return!1;let p=Object.keys(t);for(n=0;n<p.length;n++)if(!Object.prototype.hasOwnProperty.call(e,p[n]))return!1;for(n=0;n<p.length;n++)if(!Rl(e[p[n]],t[p[n]]))return!1;return!0}else if(t&&e&&typeof t=="function"&&typeof e=="function")return t.toString()===e.toString();return!1}var Fm=class{constructor(t){for(Object.assign(this,t);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?Oe.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?Oe.RIGHT:Oe.LEFT}};function Te(e,t){return new Te.InputMask(e,t)}function Zv(e){if(e==null)throw new Error("mask property should be defined");return e instanceof RegExp?Te.MaskedRegExp:lo(e)?Te.MaskedPattern:e===Date?Te.MaskedDate:e===Number?Te.MaskedNumber:Array.isArray(e)||e===Array?Te.MaskedDynamic:Te.Masked&&e.prototype instanceof Te.Masked?e:Te.Masked&&e instanceof Te.Masked?e.constructor:e instanceof Function?Te.MaskedFunction:(console.warn("Mask not found for mask",e),Te.Masked)}function Xn(e){if(!e)throw new Error("Options in not defined");if(Te.Masked){if(e.prototype instanceof Te.Masked)return{mask:e};let t=e instanceof Te.Masked?{mask:e}:Kv(e)&&e.mask instanceof Te.Masked?e:{},{mask:r=void 0}=t,o=xe(t,["mask"]);if(r){let n=r.mask;return j(ce(j({},Yv(r,(a,i)=>!i.startsWith("_"))),{mask:r.constructor,_mask:n}),o)}}return Kv(e)?j({},e):{mask:e}}function Ir(e){if(Te.Masked&&e instanceof Te.Masked)return e;let t=Xn(e),r=Zv(t.mask);if(!r)throw new Error("Masked class is not found for provided mask "+t.mask+", appropriate module needs to be imported manually before creating mask.");return t.mask===r&&delete t.mask,t._mask&&(t.mask=t._mask,delete t._mask),new r(t)}Te.createMask=Ir;var Ga=class{get selectionStart(){let t;try{t=this._unsafeSelectionStart}catch(r){}return t!=null?t:this.value.length}get selectionEnd(){let t;try{t=this._unsafeSelectionEnd}catch(r){}return t!=null?t:this.value.length}select(t,r){if(!(t==null||r==null||t===this.selectionStart&&r===this.selectionEnd))try{this._unsafeSelect(t,r)}catch(o){}}get isActive(){return!1}};Te.MaskElement=Ga;var jI=90,q4=89,Zn=class extends Ga{constructor(t){super(),this.input=t,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var t,r,o;return(t=(r=(o=this.input).getRootNode)==null?void 0:r.call(o))!=null?t:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(t){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",t.drop),this.input.addEventListener("click",t.click),this.input.addEventListener("focus",t.focus),this.input.addEventListener("blur",t.commit),this._handlers=t}_onKeydown(t){if(this._handlers.redo&&(t.keyCode===jI&&t.shiftKey&&(t.metaKey||t.ctrlKey)||t.keyCode===q4&&t.ctrlKey))return t.preventDefault(),this._handlers.redo(t);if(this._handlers.undo&&t.keyCode===jI&&(t.metaKey||t.ctrlKey))return t.preventDefault(),this._handlers.undo(t);t.isComposing||this._handlers.selectionChange(t)}_onBeforeinput(t){if(t.inputType==="historyUndo"&&this._handlers.undo)return t.preventDefault(),this._handlers.undo(t);if(t.inputType==="historyRedo"&&this._handlers.redo)return t.preventDefault(),this._handlers.redo(t)}_onCompositionEnd(t){this._handlers.input(t)}_onInput(t){t.isComposing||this._handlers.input(t)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}};Te.HTMLMaskElement=Zn;var Mc=class extends Zn{constructor(t){super(t),this.input=t}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(t,r){this.input.setSelectionRange(t,r)}get value(){return this.input.value}set value(t){this.input.value=t}};Te.HTMLMaskElement=Zn;var El=class extends Zn{get _unsafeSelectionStart(){let t=this.rootElement,r=t.getSelection&&t.getSelection(),o=r&&r.anchorOffset,n=r&&r.focusOffset;return n==null||o==null||o<n?o:n}get _unsafeSelectionEnd(){let t=this.rootElement,r=t.getSelection&&t.getSelection(),o=r&&r.anchorOffset,n=r&&r.focusOffset;return n==null||o==null||o>n?o:n}_unsafeSelect(t,r){if(!this.rootElement.createRange)return;let o=this.rootElement.createRange();o.setStart(this.input.firstChild||this.input,t),o.setEnd(this.input.lastChild||this.input,r);let n=this.rootElement,a=n.getSelection&&n.getSelection();a&&(a.removeAllRanges(),a.addRange(o))}get value(){return this.input.textContent||""}set value(t){this.input.textContent=t}};Te.HTMLContenteditableMaskElement=El;var Nc=class e{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(t){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(t),this.states.length>e.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(t){return this.currentIndex=Math.min(Math.max(this.currentIndex+t,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}};Nc.MAX_LENGTH=100;var $m=class{constructor(t,r){this.el=t instanceof Ga?t:t.isContentEditable&&t.tagName!=="INPUT"&&t.tagName!=="TEXTAREA"?new El(t):new Mc(t),this.masked=Ir(r),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new Nc,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(t){var r;return t==null||((r=this.masked)==null?void 0:r.maskEquals(t))}get mask(){return this.masked.mask}set mask(t){if(this.maskEquals(t))return;if(!(t instanceof Te.Masked)&&this.masked.constructor===Zv(t)){this.masked.updateOptions({mask:t});return}let r=t instanceof Te.Masked?t:Ir({mask:t});r.unmaskedValue=this.masked.unmaskedValue,this.masked=r}get value(){return this._value}set value(t){this.value!==t&&(this.masked.value=t,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(t){this.unmaskedValue!==t&&(this.masked.unmaskedValue=t,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(t){this.rawInputValue!==t&&(this.masked.rawInputValue=t,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(t){this.masked.typedValueEquals(t)||(this.masked.typedValue=t,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(t,r){let o=this._listeners[t];o&&o.forEach(n=>n(r))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(t){!this.el||!this.el.isActive||(this.el.select(t,t),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value}updateControl(t){let r=this.masked.unmaskedValue,o=this.masked.value,n=this.masked.rawInputValue,a=this.displayValue,i=this.unmaskedValue!==r||this.value!==o||this._rawInputValue!==n;this._unmaskedValue=r,this._value=o,this._rawInputValue=n,this.el.value!==a&&(this.el.value=a),t==="auto"?this.alignCursor():t!=null&&(this.cursorPos=t),i&&this._fireChangeEvents(),!this._historyChanging&&(i||this.history.isEmpty)&&this.history.push({unmaskedValue:r,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(t){let i=t,{mask:r}=i,o=xe(i,["mask"]),n=!this.maskEquals(r),a=this.masked.optionsIsChanged(o);n&&(this.mask=r),a&&this.masked.updateOptions(o),(n||a)&&this.updateControl()}updateCursor(t){t!=null&&(this.cursorPos=t,this._delayUpdateCursor(t))}_delayUpdateCursor(t){this._abortUpdateCursor(),this._changingCursorPos=t,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,Oe.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(t,r){return this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(r),this}off(t,r){if(!this._listeners[t])return this;if(!r)return delete this._listeners[t],this;let o=this._listeners[t].indexOf(r);return o>=0&&this._listeners[t].splice(o,1),this}_onInput(t){this._inputEvent=t,this._abortUpdateCursor();let r=new Fm({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),o=this.masked.rawInputValue,n=this.masked.splice(r.startChangePos,r.removed.length,r.inserted,r.removeDirection,{input:!0,raw:!0}).offset,a=o===this.masked.rawInputValue?r.removeDirection:Oe.NONE,i=this.masked.nearestInputPos(r.startChangePos+n,a);a!==Oe.NONE&&(i=this.masked.nearestInputPos(i,Oe.NONE)),this.updateControl(i),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(t){t.preventDefault(),t.stopPropagation()}_onFocus(t){this.alignCursorFriendly()}_onClick(t){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(t){t&&(this._historyChanging=!0,this.unmaskedValue=t.unmaskedValue,this.el.select(t.selection.start,t.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}};Te.InputMask=$m;var ze=class e{static normalize(t){return Array.isArray(t)?t:[t,new e]}constructor(t){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},t)}aggregate(t){return this.inserted+=t.inserted,this.rawInserted+=t.rawInserted,this.tailShift+=t.tailShift,this.skip=this.skip||t.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(t){return this.inserted===t.inserted&&this.tailShift===t.tailShift&&this.rawInserted===t.rawInserted&&this.skip===t.skip}};Te.ChangeDetails=ze;var Or=class{constructor(t,r,o){t===void 0&&(t=""),r===void 0&&(r=0),this.value=t,this.from=r,this.stop=o}toString(){return this.value}extend(t){this.value+=String(t)}appendTo(t){return t.append(this.toString(),{tail:!0}).aggregate(t._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(t){Object.assign(this,t)}unshift(t){if(!this.value.length||t!=null&&this.from>=t)return"";let r=this.value[0];return this.value=this.value.slice(1),r}shift(){if(!this.value.length)return"";let t=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),t}};var Wt=class e{constructor(t){this._value="",this._update(j(j({},e.DEFAULTS),t)),this._initialized=!0}updateOptions(t){this.optionsIsChanged(t)&&this.withValueRefresh(this._update.bind(this,t))}_update(t){Object.assign(this,t)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value}reset(){this._value=""}get value(){return this._value}set value(t){this.resolve(t,{input:!0})}resolve(t,r){r===void 0&&(r={input:!0}),this.reset(),this.append(t,r,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(t){this.resolve(t,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(t){this.format?this.value=this.format(t,this):this.unmaskedValue=String(t)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(t){this.resolve(t,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(t,r){return t}totalInputPositions(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),Math.min(this.displayValue.length,r-t)}extractInput(t,r,o){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),this.displayValue.slice(t,r)}extractTail(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),new Or(this.extractInput(t,r),t)}appendTail(t){return lo(t)&&(t=new Or(String(t))),t.appendTo(this)}_appendCharRaw(t,r){return t?(this._value+=t,new ze({inserted:t,rawInserted:t})):new ze}_appendChar(t,r,o){r===void 0&&(r={});let n=this.state,a;if([t,a]=this.doPrepareChar(t,r),t&&(a=a.aggregate(this._appendCharRaw(t,r)),!a.rawInserted&&this.autofix==="pad")){let i=this.state;this.state=n;let s=this.pad(r),l=this._appendCharRaw(t,r);s=s.aggregate(l),l.rawInserted||s.equals(a)?a=s:this.state=i}if(a.inserted){let i,s=this.doValidate(r)!==!1;if(s&&o!=null){let l=this.state;if(this.overwrite===!0){i=o.state;for(let c=0;c<a.rawInserted.length;++c)o.unshift(this.displayValue.length-a.tailShift)}let p=this.appendTail(o);if(s=p.rawInserted.length===o.toString().length,!(s&&p.inserted)&&this.overwrite==="shift"){this.state=l,i=o.state;for(let c=0;c<a.rawInserted.length;++c)o.shift();p=this.appendTail(o),s=p.rawInserted.length===o.toString().length}s&&p.inserted&&(this.state=l)}s||(a=new ze,this.state=n,o&&i&&(o.state=i))}return a}_appendPlaceholder(){return new ze}_appendEager(){return new ze}append(t,r,o){if(!lo(t))throw new Error("value should be string");let n=lo(o)?new Or(String(o)):o;r!=null&&r.tail&&(r._beforeTailState=this.state);let a;[t,a]=this.doPrepare(t,r);for(let i=0;i<t.length;++i){let s=this._appendChar(t[i],r,n);if(!s.rawInserted&&!this.doSkipInvalid(t[i],r,n))break;a.aggregate(s)}return(this.eager===!0||this.eager==="append")&&r!=null&&r.input&&t&&a.aggregate(this._appendEager()),n!=null&&(a.tailShift+=this.appendTail(n).tailShift),a}remove(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),this._value=this.displayValue.slice(0,t)+this.displayValue.slice(r),new ze}withValueRefresh(t){if(this._refreshing||!this._initialized)return t();this._refreshing=!0;let r=this.rawInputValue,o=this.value,n=t();return this.rawInputValue=r,this.value&&this.value!==o&&o.indexOf(this.value)===0&&(this.append(o.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,n}runIsolated(t){if(this._isolated||!this._initialized)return t(this);this._isolated=!0;let r=this.state,o=t(this);return this.state=r,delete this._isolated,o}doSkipInvalid(t,r,o){return!!this.skipInvalid}doPrepare(t,r){return r===void 0&&(r={}),ze.normalize(this.prepare?this.prepare(t,this,r):t)}doPrepareChar(t,r){return r===void 0&&(r={}),ze.normalize(this.prepareChar?this.prepareChar(t,this,r):t)}doValidate(t){return(!this.validate||this.validate(this.value,this,t))&&(!this.parent||this.parent.doValidate(t))}doCommit(){this.commit&&this.commit(this.value,this)}splice(t,r,o,n,a){o===void 0&&(o=""),n===void 0&&(n=Oe.NONE),a===void 0&&(a={input:!0});let i=t+r,s=this.extractTail(i),l=this.eager===!0||this.eager==="remove",p;l&&(n=Xv(n),p=this.extractInput(0,i,{raw:!0}));let c=t,d=new ze;if(n!==Oe.NONE&&(c=this.nearestInputPos(t,r>1&&t!==0&&!l?Oe.NONE:n),d.tailShift=c-t),d.aggregate(this.remove(c)),l&&n!==Oe.NONE&&p===this.rawInputValue)if(n===Oe.FORCE_LEFT){let f;for(;p===this.rawInputValue&&(f=this.displayValue.length);)d.aggregate(new ze({tailShift:-1})).aggregate(this.remove(f-1))}else n===Oe.FORCE_RIGHT&&s.unshift();return d.aggregate(this.append(o,a,s))}maskEquals(t){return this.mask===t}optionsIsChanged(t){return!Rl(this,t)}typedValueEquals(t){let r=this.typedValue;return t===r||e.EMPTY_VALUES.includes(t)&&e.EMPTY_VALUES.includes(r)||(this.format?this.format(t,this)===this.format(this.typedValue,this):!1)}pad(t){return new ze}};Wt.DEFAULTS={skipInvalid:!0};Wt.EMPTY_VALUES=[void 0,null,""];Te.Masked=Wt;var Il=class e{constructor(t,r){t===void 0&&(t=[]),r===void 0&&(r=0),this.chunks=t,this.from=r}toString(){return this.chunks.map(String).join("")}extend(t){if(!String(t))return;t=lo(t)?new Or(String(t)):t;let r=this.chunks[this.chunks.length-1],o=r&&(r.stop===t.stop||t.stop==null)&&t.from===r.from+r.toString().length;if(t instanceof Or)o?r.extend(t.toString()):this.chunks.push(t);else if(t instanceof e){if(t.stop==null){let n;for(;t.chunks.length&&t.chunks[0].stop==null;)n=t.chunks.shift(),n.from+=t.from,this.extend(n)}t.toString()&&(t.stop=t.blockIndex,this.chunks.push(t))}}appendTo(t){if(!(t instanceof Te.MaskedPattern))return new Or(this.toString()).appendTo(t);let r=new ze;for(let o=0;o<this.chunks.length;++o){let n=this.chunks[o],a=t._mapPosToBlock(t.displayValue.length),i=n.stop,s;if(i!=null&&(!a||a.index<=i)&&((n instanceof e||t._stops.indexOf(i)>=0)&&r.aggregate(t._appendPlaceholder(i)),s=n instanceof e&&t._blocks[i]),s){let l=s.appendTail(n);r.aggregate(l);let p=n.toString().slice(l.rawInserted.length);p&&r.aggregate(t.append(p,{tail:!0}))}else r.aggregate(t.append(n.toString(),{tail:!0}))}return r}get state(){return{chunks:this.chunks.map(t=>t.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(t){let n=t,{chunks:r}=n,o=xe(n,["chunks"]);Object.assign(this,o),this.chunks=r.map(a=>{let i="chunks"in a?new e:new Or;return i.state=a,i})}unshift(t){if(!this.chunks.length||t!=null&&this.from>=t)return"";let r=t!=null?t-this.from:t,o=0;for(;o<this.chunks.length;){let n=this.chunks[o],a=n.unshift(r);if(n.toString()){if(!a)break;++o}else this.chunks.splice(o,1);if(a)return a}return""}shift(){if(!this.chunks.length)return"";let t=this.chunks.length-1;for(;0<=t;){let r=this.chunks[t],o=r.shift();if(r.toString()){if(!o)break;--t}else this.chunks.splice(t,1);if(o)return o}return""}};var Vm=class{constructor(t,r){this.masked=t,this._log=[];let{offset:o,index:n}=t._mapPosToBlock(r)||(r<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=o,this.index=n,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(t){Object.assign(this,t)}pushState(){this._log.push(this.state)}popState(){let t=this._log.pop();return t&&(this.state=t),t}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(t){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((r=this.block)==null?void 0:r.displayValue.length)||0){var r;if(t())return this.ok=!0}return this.ok=!1}_pushRight(t){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(t())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,Oe.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Oe.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Oe.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,Oe.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Oe.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Oe.NONE),!0})}};var Ol=class{constructor(t){Object.assign(this,t),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(t,r){return t===void 0&&(t=0),r===void 0&&(r=this._value.length),this._value=this._value.slice(0,t)+this._value.slice(r),this._value||(this._isRawInput=!1),new ze}nearestInputPos(t,r){r===void 0&&(r=Oe.NONE);let o=0,n=this._value.length;switch(r){case Oe.LEFT:case Oe.FORCE_LEFT:return o;case Oe.NONE:case Oe.RIGHT:case Oe.FORCE_RIGHT:default:return n}}totalInputPositions(t,r){return t===void 0&&(t=0),r===void 0&&(r=this._value.length),this._isRawInput?r-t:0}extractInput(t,r,o){return t===void 0&&(t=0),r===void 0&&(r=this._value.length),o===void 0&&(o={}),o.raw&&this._isRawInput&&this._value.slice(t,r)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(t,r){if(r===void 0&&(r={}),this.isFilled)return new ze;let o=this.eager===!0||this.eager==="append",a=this.char===t&&(this.isUnmasking||r.input||r.raw)&&(!r.raw||!o)&&!r.tail,i=new ze({inserted:this.char,rawInserted:a?this.char:""});return this._value=this.char,this._isRawInput=a&&(r.raw||r.input),i}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){let t=new ze;return this.isFilled||(this._value=t.inserted=this.char),t}extractTail(){return new Or("")}appendTail(t){return lo(t)&&(t=new Or(String(t))),t.appendTo(this)}append(t,r,o){let n=this._appendChar(t[0],r);return o!=null&&(n.tailShift+=this.appendTail(o).tailShift),n}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value,this._isRawInput=!!t._rawInputValue}pad(t){return this._appendPlaceholder()}};var Ja=class{constructor(t){let p=t,{parent:r,isOptional:o,placeholderChar:n,displayChar:a,lazy:i,eager:s}=p,l=xe(p,["parent","isOptional","placeholderChar","displayChar","lazy","eager"]);this.masked=Ir(l),Object.assign(this,{parent:r,isOptional:o,placeholderChar:n,displayChar:a,lazy:i,eager:s})}reset(){this.isFilled=!1,this.masked.reset()}remove(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.value.length),t===0&&r>=1?(this.isFilled=!1,this.masked.remove(t,r)):new ze}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(t,r){if(r===void 0&&(r={}),this.isFilled)return new ze;let o=this.masked.state,n=this.masked._appendChar(t,this.currentMaskFlags(r));return n.inserted&&this.doValidate(r)===!1&&(n=new ze,this.masked.state=o),!n.inserted&&!this.isOptional&&!this.lazy&&!r.input&&(n.inserted=this.placeholderChar),n.skip=!n.inserted&&!this.isOptional,this.isFilled=!!n.inserted,n}append(t,r,o){return this.masked.append(t,this.currentMaskFlags(r),o)}_appendPlaceholder(){return this.isFilled||this.isOptional?new ze:(this.isFilled=!0,new ze({inserted:this.placeholderChar}))}_appendEager(){return new ze}extractTail(t,r){return this.masked.extractTail(t,r)}appendTail(t){return this.masked.appendTail(t)}extractInput(t,r,o){return t===void 0&&(t=0),r===void 0&&(r=this.value.length),this.masked.extractInput(t,r,o)}nearestInputPos(t,r){r===void 0&&(r=Oe.NONE);let o=0,n=this.value.length,a=Math.min(Math.max(t,o),n);switch(r){case Oe.LEFT:case Oe.FORCE_LEFT:return this.isComplete?a:o;case Oe.RIGHT:case Oe.FORCE_RIGHT:return this.isComplete?a:n;case Oe.NONE:default:return a}}totalInputPositions(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.value.length),this.value.slice(t,r).length}doValidate(t){return this.masked.doValidate(this.currentMaskFlags(t))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(t)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(t){this.masked.state=t.masked,this.isFilled=t.isFilled}currentMaskFlags(t){var r;return ce(j({},t),{_beforeTailState:(t==null||(r=t._beforeTailState)==null?void 0:r.masked)||(t==null?void 0:t._beforeTailState)})}pad(t){return new ze}};Ja.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};var jm=class extends Wt{updateOptions(t){super.updateOptions(t)}_update(t){let r=t.mask;r&&(t.validate=o=>o.search(r)>=0),super._update(t)}};Te.MaskedRegExp=jm;var Xt=class e extends Wt{constructor(t){super(ce(j(j({},e.DEFAULTS),t),{definitions:Object.assign({},Ja.DEFAULT_DEFINITIONS,t==null?void 0:t.definitions)}))}updateOptions(t){super.updateOptions(t)}_update(t){t.definitions=Object.assign({},this.definitions,t.definitions),super._update(t),this._rebuildMask()}_rebuildMask(){let t=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};let r=this.mask;if(!r||!t)return;let o=!1,n=!1;for(let i=0;i<r.length;++i){if(this.blocks){let c=r.slice(i),d=Object.keys(this.blocks).filter(u=>c.indexOf(u)===0);d.sort((u,h)=>h.length-u.length);let f=d[0];if(f){let a=Xn(this.blocks[f]),{expose:u,repeat:h}=a,y=xe(a,["expose","repeat"]),v=ce(j({lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix},y),{repeat:h,parent:this}),g=h!=null?new Te.RepeatBlock(v):Ir(v);g&&(this._blocks.push(g),u&&(this.exposeBlock=g),this._maskedBlocks[f]||(this._maskedBlocks[f]=[]),this._maskedBlocks[f].push(this._blocks.length-1)),i+=f.length-1;continue}}let s=r[i],l=s in t;if(s===e.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(s==="{"||s==="}"){o=!o;continue}if(s==="["||s==="]"){n=!n;continue}if(s===e.ESCAPE_CHAR){if(++i,s=r[i],!s)break;l=!1}let p=l?new Ja(ce(j({isOptional:n,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar},Xn(t[s])),{parent:this})):new Ol({char:s,eager:this.eager,isUnmasking:o});this._blocks.push(p)}}get state(){return ce(j({},super.state),{_blocks:this._blocks.map(t=>t.state)})}set state(t){if(!t){this.reset();return}let n=t,{_blocks:r}=n,o=xe(n,["_blocks"]);this._blocks.forEach((a,i)=>a.state=r[i]),super.state=o}reset(){super.reset(),this._blocks.forEach(t=>t.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(t=>t.isComplete)}get isFilled(){return this._blocks.every(t=>t.isFilled)}get isFixed(){return this._blocks.every(t=>t.isFixed)}get isOptional(){return this._blocks.every(t=>t.isOptional)}doCommit(){this._blocks.forEach(t=>t.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((t,r)=>t+=r.unmaskedValue,"")}set unmaskedValue(t){if(this.exposeBlock){let r=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=t,this.appendTail(r),this.doCommit()}else super.unmaskedValue=t}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((t,r)=>t+=r.value,"")}set value(t){if(this.exposeBlock){let r=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=t,this.appendTail(r),this.doCommit()}else super.value=t}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(t){if(this.exposeBlock){let r=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=t,this.appendTail(r),this.doCommit()}else super.typedValue=t}get displayValue(){return this._blocks.reduce((t,r)=>t+=r.displayValue,"")}appendTail(t){return super.appendTail(t).aggregate(this._appendPlaceholder())}_appendEager(){var t;let r=new ze,o=(t=this._mapPosToBlock(this.displayValue.length))==null?void 0:t.index;if(o==null)return r;this._blocks[o].isFilled&&++o;for(let n=o;n<this._blocks.length;++n){let a=this._blocks[n]._appendEager();if(!a.inserted)break;r.aggregate(a)}return r}_appendCharRaw(t,r){r===void 0&&(r={});let o=this._mapPosToBlock(this.displayValue.length),n=new ze;if(!o)return n;for(let i=o.index,s;s=this._blocks[i];++i){var a;let l=s._appendChar(t,ce(j({},r),{_beforeTailState:(a=r._beforeTailState)==null||(a=a._blocks)==null?void 0:a[i]}));if(n.aggregate(l),l.consumed)break}return n}extractTail(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length);let o=new Il;return t===r||this._forEachBlocksInRange(t,r,(n,a,i,s)=>{let l=n.extractTail(i,s);l.stop=this._findStopBefore(a),l.from=this._blockStartPos(a),l instanceof Il&&(l.blockIndex=a),o.extend(l)}),o}extractInput(t,r,o){if(t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),o===void 0&&(o={}),t===r)return"";let n="";return this._forEachBlocksInRange(t,r,(a,i,s,l)=>{n+=a.extractInput(s,l,o)}),n}_findStopBefore(t){let r;for(let o=0;o<this._stops.length;++o){let n=this._stops[o];if(n<=t)r=n;else break}return r}_appendPlaceholder(t){let r=new ze;if(this.lazy&&t==null)return r;let o=this._mapPosToBlock(this.displayValue.length);if(!o)return r;let n=o.index,a=t!=null?t:this._blocks.length;return this._blocks.slice(n,a).forEach(i=>{if(!i.lazy||t!=null){var s;r.aggregate(i._appendPlaceholder((s=i._blocks)==null?void 0:s.length))}}),r}_mapPosToBlock(t){let r="";for(let o=0;o<this._blocks.length;++o){let n=this._blocks[o],a=r.length;if(r+=n.displayValue,t<=r.length)return{index:o,offset:t-a}}}_blockStartPos(t){return this._blocks.slice(0,t).reduce((r,o)=>r+=o.displayValue.length,0)}_forEachBlocksInRange(t,r,o){r===void 0&&(r=this.displayValue.length);let n=this._mapPosToBlock(t);if(n){let a=this._mapPosToBlock(r),i=a&&n.index===a.index,s=n.offset,l=a&&i?a.offset:this._blocks[n.index].displayValue.length;if(o(this._blocks[n.index],n.index,s,l),a&&!i){for(let p=n.index+1;p<a.index;++p)o(this._blocks[p],p,0,this._blocks[p].displayValue.length);o(this._blocks[a.index],a.index,0,a.offset)}}}remove(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length);let o=super.remove(t,r);return this._forEachBlocksInRange(t,r,(n,a,i,s)=>{o.aggregate(n.remove(i,s))}),o}nearestInputPos(t,r){if(r===void 0&&(r=Oe.NONE),!this._blocks.length)return 0;let o=new Vm(this,t);if(r===Oe.NONE)return o.pushRightBeforeInput()||(o.popState(),o.pushLeftBeforeInput())?o.pos:this.displayValue.length;if(r===Oe.LEFT||r===Oe.FORCE_LEFT){if(r===Oe.LEFT){if(o.pushRightBeforeFilled(),o.ok&&o.pos===t)return t;o.popState()}if(o.pushLeftBeforeInput(),o.pushLeftBeforeRequired(),o.pushLeftBeforeFilled(),r===Oe.LEFT){if(o.pushRightBeforeInput(),o.pushRightBeforeRequired(),o.ok&&o.pos<=t||(o.popState(),o.ok&&o.pos<=t))return o.pos;o.popState()}return o.ok?o.pos:r===Oe.FORCE_LEFT?0:(o.popState(),o.ok||(o.popState(),o.ok)?o.pos:0)}return r===Oe.RIGHT||r===Oe.FORCE_RIGHT?(o.pushRightBeforeInput(),o.pushRightBeforeRequired(),o.pushRightBeforeFilled()?o.pos:r===Oe.FORCE_RIGHT?this.displayValue.length:(o.popState(),o.ok||(o.popState(),o.ok)?o.pos:this.nearestInputPos(t,Oe.LEFT))):t}totalInputPositions(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length);let o=0;return this._forEachBlocksInRange(t,r,(n,a,i,s)=>{o+=n.totalInputPositions(i,s)}),o}maskedBlock(t){return this.maskedBlocks(t)[0]}maskedBlocks(t){let r=this._maskedBlocks[t];return r?r.map(o=>this._blocks[o]):[]}pad(t){let r=new ze;return this._forEachBlocksInRange(0,this.displayValue.length,o=>r.aggregate(o.pad(t))),r}};Xt.DEFAULTS=ce(j({},Wt.DEFAULTS),{lazy:!0,placeholderChar:"_"});Xt.STOP_CHAR="`";Xt.ESCAPE_CHAR="\\";Xt.InputDefinition=Ja;Xt.FixedDefinition=Ol;Te.MaskedPattern=Xt;var qa=class extends Xt{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){let c=t,{to:r=this.to||0,from:o=this.from||0,maxLength:n=this.maxLength||0,autofix:a=this.autofix}=c,i=xe(c,["to","from","maxLength","autofix"]);this.to=r,this.from=o,this.maxLength=Math.max(String(r).length,n),this.autofix=a;let s=String(this.from).padStart(this.maxLength,"0"),l=String(this.to).padStart(this.maxLength,"0"),p=0;for(;p<l.length&&l[p]===s[p];)++p;i.mask=l.slice(0,p).replace(/0/g,"\\0")+"0".repeat(this.maxLength-p),super._update(i)}get isComplete(){return super.isComplete&&!!this.value}boundaries(t){let r="",o="",[,n,a]=t.match(/^(\D*)(\d*)(\D*)/)||[];return a&&(r="0".repeat(n.length)+a,o="9".repeat(n.length)+a),r=r.padEnd(this.maxLength,"0"),o=o.padEnd(this.maxLength,"9"),[r,o]}doPrepareChar(t,r){r===void 0&&(r={});let o;return[t,o]=super.doPrepareChar(t.replace(/\D/g,""),r),t||(o.skip=!this.isComplete),[t,o]}_appendCharRaw(t,r){if(r===void 0&&(r={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(t,r);let o=String(this.from).padStart(this.maxLength,"0"),n=String(this.to).padStart(this.maxLength,"0"),[a,i]=this.boundaries(this.value+t);return Number(i)<this.from?super._appendCharRaw(o[this.value.length],r):Number(a)>this.to?!r.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(o[this.value.length],r).aggregate(this._appendCharRaw(t,r)):super._appendCharRaw(n[this.value.length],r):super._appendCharRaw(t,r)}doValidate(t){let r=this.value;if(r.search(/[^0]/)===-1&&r.length<=this._matchFrom)return!0;let[n,a]=this.boundaries(r);return this.from<=Number(a)&&Number(n)<=this.to&&super.doValidate(t)}pad(t){let r=new ze;if(this.value.length===this.maxLength)return r;let o=this.value,n=this.maxLength-this.value.length;if(n){this.reset();for(let a=0;a<n;++a)r.aggregate(super._appendCharRaw("0",t));o.split("").forEach(a=>this._appendCharRaw(a))}return r}};Te.MaskedRange=qa;var _l=class e extends Xt{static extractPatternOptions(t){let a=t,{mask:r,pattern:o}=a,n=xe(a,["mask","pattern"]);return ce(j({},n),{mask:lo(r)?r:o})}constructor(t){super(e.extractPatternOptions(j(j({},e.DEFAULTS),t)))}updateOptions(t){super.updateOptions(t)}_update(t){let s=j(j({},e.DEFAULTS),t),{mask:r,pattern:o,blocks:n}=s,a=xe(s,["mask","pattern","blocks"]),i=Object.assign({},e.GET_DEFAULT_BLOCKS());t.min&&(i.Y.from=t.min.getFullYear()),t.max&&(i.Y.to=t.max.getFullYear()),t.min&&t.max&&i.Y.from===i.Y.to&&(i.m.from=t.min.getMonth()+1,i.m.to=t.max.getMonth()+1,i.m.from===i.m.to&&(i.d.from=t.min.getDate(),i.d.to=t.max.getDate())),Object.assign(i,this.blocks,n),super._update(ce(j({},a),{mask:lo(r)?r:o,blocks:i}))}doValidate(t){let r=this.date;return super.doValidate(t)&&(!this.isComplete||this.isDateExist(this.value)&&r!=null&&(this.min==null||this.min<=r)&&(this.max==null||r<=this.max))}isDateExist(t){return this.format(this.parse(t,this),this).indexOf(t)>=0}get date(){return this.typedValue}set date(t){this.typedValue=t}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(t){super.typedValue=t}maskEquals(t){return t===Date||super.maskEquals(t)}optionsIsChanged(t){return super.optionsIsChanged(e.extractPatternOptions(t))}};_l.GET_DEFAULT_BLOCKS=()=>({d:{mask:qa,from:1,to:31,maxLength:2},m:{mask:qa,from:1,to:12,maxLength:2},Y:{mask:qa,from:1900,to:9999}});_l.DEFAULTS=ce(j({},Xt.DEFAULTS),{mask:Date,pattern:"d{.}`m{.}`Y",format:(e,t)=>{if(!e)return"";let r=String(e.getDate()).padStart(2,"0"),o=String(e.getMonth()+1).padStart(2,"0"),n=e.getFullYear();return[r,o,n].join(".")},parse:(e,t)=>{let[r,o,n]=e.split(".").map(Number);return new Date(n,o-1,r)}});Te.MaskedDate=_l;var Lc=class e extends Wt{constructor(t){super(j(j({},e.DEFAULTS),t)),this.currentMask=void 0}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),"mask"in t&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(t.mask)?t.mask.map(r=>{let i=Xn(r),{expose:o}=i,n=xe(i,["expose"]),a=Ir(j({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid},n));return o&&(this.exposeMask=a),a}):[])}_appendCharRaw(t,r){r===void 0&&(r={});let o=this._applyDispatch(t,r);return this.currentMask&&o.aggregate(this.currentMask._appendChar(t,this.currentMaskFlags(r))),o}_applyDispatch(t,r,o){t===void 0&&(t=""),r===void 0&&(r={}),o===void 0&&(o="");let n=r.tail&&r._beforeTailState!=null?r._beforeTailState._value:this.value,a=this.rawInputValue,i=r.tail&&r._beforeTailState!=null?r._beforeTailState._rawInputValue:a,s=a.slice(i.length),l=this.currentMask,p=new ze,c=l==null?void 0:l.state;return this.currentMask=this.doDispatch(t,j({},r),o),this.currentMask&&(this.currentMask!==l?(this.currentMask.reset(),i&&(this.currentMask.append(i,{raw:!0}),p.tailShift=this.currentMask.value.length-n.length),s&&(p.tailShift+=this.currentMask.append(s,{raw:!0,tail:!0}).tailShift)):c&&(this.currentMask.state=c)),p}_appendPlaceholder(){let t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendPlaceholder()),t}_appendEager(){let t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendEager()),t}appendTail(t){let r=new ze;return t&&r.aggregate(this._applyDispatch("",{},t)),r.aggregate(this.currentMask?this.currentMask.appendTail(t):super.appendTail(t))}currentMaskFlags(t){var r,o;return ce(j({},t),{_beforeTailState:((r=t._beforeTailState)==null?void 0:r.currentMaskRef)===this.currentMask&&((o=t._beforeTailState)==null?void 0:o.currentMask)||t._beforeTailState})}doDispatch(t,r,o){return r===void 0&&(r={}),o===void 0&&(o=""),this.dispatch(t,this,r,o)}doValidate(t){return super.doValidate(t)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(t)))}doPrepare(t,r){r===void 0&&(r={});let[o,n]=super.doPrepare(t,r);if(this.currentMask){let a;[o,a]=super.doPrepare(o,this.currentMaskFlags(r)),n=n.aggregate(a)}return[o,n]}doPrepareChar(t,r){r===void 0&&(r={});let[o,n]=super.doPrepareChar(t,r);if(this.currentMask){let a;[o,a]=super.doPrepareChar(o,this.currentMaskFlags(r)),n=n.aggregate(a)}return[o,n]}reset(){var t;(t=this.currentMask)==null||t.reset(),this.compiledMasks.forEach(r=>r.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(t){this.exposeMask?(this.exposeMask.value=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=t}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(t){this.exposeMask?(this.exposeMask.unmaskedValue=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=t}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(t){if(this.exposeMask){this.exposeMask.typedValue=t,this.currentMask=this.exposeMask,this._applyDispatch();return}let r=String(t);this.currentMask&&(this.currentMask.typedValue=t,r=this.currentMask.unmaskedValue),this.unmaskedValue=r}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var t;return!!((t=this.currentMask)!=null&&t.isComplete)}get isFilled(){var t;return!!((t=this.currentMask)!=null&&t.isFilled)}remove(t,r){let o=new ze;return this.currentMask&&o.aggregate(this.currentMask.remove(t,r)).aggregate(this._applyDispatch()),o}get state(){var t;return ce(j({},super.state),{_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(r=>r.state),currentMaskRef:this.currentMask,currentMask:(t=this.currentMask)==null?void 0:t.state})}set state(t){let i=t,{compiledMasks:r,currentMaskRef:o,currentMask:n}=i,a=xe(i,["compiledMasks","currentMaskRef","currentMask"]);r&&this.compiledMasks.forEach((s,l)=>s.state=r[l]),o!=null&&(this.currentMask=o,this.currentMask.state=n),super.state=a}extractInput(t,r,o){return this.currentMask?this.currentMask.extractInput(t,r,o):""}extractTail(t,r){return this.currentMask?this.currentMask.extractTail(t,r):super.extractTail(t,r)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(t,r){return this.currentMask?this.currentMask.nearestInputPos(t,r):super.nearestInputPos(t,r)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(t){this._overwrite=t}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(t){this._eager=t}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(t){this._skipInvalid=t}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(t){this._autofix=t}maskEquals(t){return Array.isArray(t)?this.compiledMasks.every((r,o)=>{if(!t[o])return;let i=t[o],{mask:n}=i,a=xe(i,["mask"]);return Rl(r,a)&&r.maskEquals(n)}):super.maskEquals(t)}typedValueEquals(t){var r;return!!((r=this.currentMask)!=null&&r.typedValueEquals(t))}};Lc.DEFAULTS=ce(j({},Wt.DEFAULTS),{dispatch:(e,t,r,o)=>{if(!t.compiledMasks.length)return;let n=t.rawInputValue,a=t.compiledMasks.map((i,s)=>{let l=t.currentMask===i,p=l?i.displayValue.length:i.nearestInputPos(i.displayValue.length,Oe.FORCE_LEFT);return i.rawInputValue!==n?(i.reset(),i.append(n,{raw:!0})):l||i.remove(p),i.append(e,t.currentMaskFlags(r)),i.appendTail(o),{index:s,weight:i.rawInputValue.length,totalInputPositions:i.totalInputPositions(0,Math.max(p,i.nearestInputPos(i.displayValue.length,Oe.FORCE_LEFT)))}});return a.sort((i,s)=>s.weight-i.weight||s.totalInputPositions-i.totalInputPositions),t.compiledMasks[a[0].index]}});Te.MaskedDynamic=Lc;var Bc=class e extends Xt{constructor(t){super(j(j({},e.DEFAULTS),t))}updateOptions(t){super.updateOptions(t)}_update(t){let n=t,{enum:r}=n,o=xe(n,["enum"]);if(r){let a=r.map(l=>l.length),i=Math.min(...a),s=Math.max(...a)-i;o.mask="*".repeat(i),s&&(o.mask+="["+"*".repeat(s)+"]"),this.enum=r}super._update(o)}_appendCharRaw(t,r){r===void 0&&(r={});let o=Math.min(this.nearestInputPos(0,Oe.FORCE_RIGHT),this.value.length),n=this.enum.filter(a=>this.matchValue(a,this.unmaskedValue+t,o));if(n.length){n.length===1&&this._forEachBlocksInRange(0,this.value.length,(i,s)=>{let l=n[0][s];s>=this.value.length||l===i.value||(i.reset(),i._appendChar(l,r))});let a=super._appendCharRaw(n[0][this.value.length],r);return n.length===1&&n[0].slice(this.unmaskedValue.length).split("").forEach(i=>a.aggregate(super._appendCharRaw(i))),a}return new ze}extractTail(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),new Or("",t)}remove(t,r){if(t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),t===r)return new ze;let o=Math.min(super.nearestInputPos(0,Oe.FORCE_RIGHT),this.value.length),n;for(n=t;n>=0&&!(this.enum.filter(s=>this.matchValue(s,this.value.slice(o,n),o)).length>1);--n);let a=super.remove(n,r);return a.tailShift+=n-t,a}};Bc.DEFAULTS=ce(j({},Xt.DEFAULTS),{matchValue:(e,t,r)=>e.indexOf(t,r)===r});Te.MaskedEnum=Bc;var Hm=class extends Wt{updateOptions(t){super.updateOptions(t)}_update(t){super._update(ce(j({},t),{validate:t.mask}))}};Te.MaskedFunction=Hm;var HI,Ka=class e extends Wt{constructor(t){super(j(j({},e.DEFAULTS),t))}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),this._updateRegExps()}_updateRegExps(){let t="^"+(this.allowNegative?"[+|\\-]?":""),r="\\d*",o=(this.scale?"("+zm(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(t+r+o),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(zm).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(zm(this.thousandsSeparator),"g")}_removeThousandsSeparators(t){return t.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(t){let r=t.split(this.radix);return r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),r.join(this.radix)}doPrepareChar(t,r){r===void 0&&(r={});let[o,n]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(r.input&&r.raw||!r.input&&!r.raw)?t.replace(this._mapToRadixRegExp,this.radix):t),r);return t&&!o&&(n.skip=!0),o&&!this.allowPositive&&!this.value&&o!=="-"&&n.aggregate(this._appendChar("-")),[o,n]}_separatorsCount(t,r){r===void 0&&(r=!1);let o=0;for(let n=0;n<t;++n)this._value.indexOf(this.thousandsSeparator,n)===n&&(++o,r&&(t+=this.thousandsSeparator.length));return o}_separatorsCountFromSlice(t){return t===void 0&&(t=this._value),this._separatorsCount(this._removeThousandsSeparators(t).length,!0)}extractInput(t,r,o){return t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),[t,r]=this._adjustRangeWithSeparators(t,r),this._removeThousandsSeparators(super.extractInput(t,r,o))}_appendCharRaw(t,r){r===void 0&&(r={});let o=r.tail&&r._beforeTailState?r._beforeTailState._value:this._value,n=this._separatorsCountFromSlice(o);this._value=this._removeThousandsSeparators(this.value);let a=this._value;this._value+=t;let i=this.number,s=!isNaN(i),l=!1;if(s){let f;this.min!=null&&this.min<0&&this.number<this.min&&(f=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(f=this.max),f!=null&&(this.autofix?(this._value=this.format(f,this).replace(e.UNMASKED_RADIX,this.radix),l||(l=a===this._value&&!r.tail)):s=!1),s&&(s=!!this._value.match(this._numberRegExp))}let p;s?p=new ze({inserted:this._value.slice(a.length),rawInserted:l?"":t,skip:l}):(this._value=a,p=new ze),this._value=this._insertThousandsSeparators(this._value);let c=r.tail&&r._beforeTailState?r._beforeTailState._value:this._value,d=this._separatorsCountFromSlice(c);return p.tailShift+=(d-n)*this.thousandsSeparator.length,p}_findSeparatorAround(t){if(this.thousandsSeparator){let r=t-this.thousandsSeparator.length+1,o=this.value.indexOf(this.thousandsSeparator,r);if(o<=t)return o}return-1}_adjustRangeWithSeparators(t,r){let o=this._findSeparatorAround(t);o>=0&&(t=o);let n=this._findSeparatorAround(r);return n>=0&&(r=n+this.thousandsSeparator.length),[t,r]}remove(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length),[t,r]=this._adjustRangeWithSeparators(t,r);let o=this.value.slice(0,t),n=this.value.slice(r),a=this._separatorsCount(o.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(o+n));let i=this._separatorsCountFromSlice(o);return new ze({tailShift:(i-a)*this.thousandsSeparator.length})}nearestInputPos(t,r){if(!this.thousandsSeparator)return t;switch(r){case Oe.NONE:case Oe.LEFT:case Oe.FORCE_LEFT:{let o=this._findSeparatorAround(t-1);if(o>=0){let n=o+this.thousandsSeparator.length;if(t<n||this.value.length<=n||r===Oe.FORCE_LEFT)return o}break}case Oe.RIGHT:case Oe.FORCE_RIGHT:{let o=this._findSeparatorAround(t);if(o>=0)return o+this.thousandsSeparator.length}}return t}doCommit(){if(this.value){let t=this.number,r=t;this.min!=null&&(r=Math.max(r,this.min)),this.max!=null&&(r=Math.min(r,this.max)),r!==t&&(this.unmaskedValue=this.format(r,this));let o=this.value;this.normalizeZeros&&(o=this._normalizeZeros(o)),this.padFractionalZeros&&this.scale>0&&(o=this._padFractionalZeros(o)),this._value=o}super.doCommit()}_normalizeZeros(t){let r=this._removeThousandsSeparators(t).split(this.radix);return r[0]=r[0].replace(/^(\D*)(0*)(\d*)/,(o,n,a,i)=>n+i),t.length&&!/\d$/.test(r[0])&&(r[0]=r[0]+"0"),r.length>1&&(r[1]=r[1].replace(/0*$/,""),r[1].length||(r.length=1)),this._insertThousandsSeparators(r.join(this.radix))}_padFractionalZeros(t){if(!t)return t;let r=t.split(this.radix);return r.length<2&&r.push(""),r[1]=r[1].padEnd(this.scale,"0"),r.join(this.radix)}doSkipInvalid(t,r,o){r===void 0&&(r={});let n=this.scale===0&&t!==this.thousandsSeparator&&(t===this.radix||t===e.UNMASKED_RADIX||this.mapToRadix.includes(t));return super.doSkipInvalid(t,r,o)&&!n}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,e.UNMASKED_RADIX)}set unmaskedValue(t){super.unmaskedValue=t}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(t){this.rawInputValue=this.format(t,this).replace(e.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(t){this.typedValue=t}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(t){return(super.typedValueEquals(t)||e.EMPTY_VALUES.includes(t)&&e.EMPTY_VALUES.includes(this.typedValue))&&!(t===0&&this.value==="")}};HI=Ka;Ka.UNMASKED_RADIX=".";Ka.EMPTY_VALUES=[...Wt.EMPTY_VALUES,0];Ka.DEFAULTS=ce(j({},Wt.DEFAULTS),{mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[HI.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:e=>e.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})});Te.MaskedNumber=Ka;var Um={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function Qv(e,t,r){t===void 0&&(t=Um.MASKED),r===void 0&&(r=Um.MASKED);let o=Ir(e);return n=>o.runIsolated(a=>(a[t]=n,a[r]))}function UI(e,t,r,o){return Qv(t,r,o)(e)}Te.PIPE_TYPE=Um;Te.createPipe=Qv;Te.pipe=UI;var Wm=class extends Xt{get repeatFrom(){var t;return(t=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?t:0}get repeatTo(){var t;return(t=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?t:1/0}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){var r,o,n;let l=Xn(t),{repeat:a}=l,i=xe(l,["repeat"]);this._blockOpts=Object.assign({},this._blockOpts,i);let s=Ir(this._blockOpts);this.repeat=(r=(o=a!=null?a:s.repeat)!=null?o:this.repeat)!=null?r:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((n=this._blocks)==null?void 0:n.length)||0,this.repeatFrom)),blocks:{m:s},eager:s.eager,overwrite:s.overwrite,skipInvalid:s.skipInvalid,lazy:s.lazy,placeholderChar:s.placeholderChar,displayChar:s.displayChar})}_allocateBlock(t){if(t<this._blocks.length)return this._blocks[t];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(Ir(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(t,r){r===void 0&&(r={});let o=new ze;for(let l=(n=(a=this._mapPosToBlock(this.displayValue.length))==null?void 0:a.index)!=null?n:Math.max(this._blocks.length-1,0),p,c;p=(i=this._blocks[l])!=null?i:c=!c&&this._allocateBlock(l);++l){var n,a,i,s;let d=p._appendChar(t,ce(j({},r),{_beforeTailState:(s=r._beforeTailState)==null||(s=s._blocks)==null?void 0:s[l]}));if(d.skip&&c){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(o.aggregate(d),d.consumed)break}return o}_trimEmptyTail(t,r){var o,n;t===void 0&&(t=0);let a=Math.max(((o=this._mapPosToBlock(t))==null?void 0:o.index)||0,this.repeatFrom,0),i;r!=null&&(i=(n=this._mapPosToBlock(r))==null?void 0:n.index),i==null&&(i=this._blocks.length-1);let s=0;for(let l=i;a<=l&&!this._blocks[l].unmaskedValue;--l,++s);s&&(this._blocks.splice(i-s+1,s),this.mask=this.mask.slice(s))}reset(){super.reset(),this._trimEmptyTail()}remove(t,r){t===void 0&&(t=0),r===void 0&&(r=this.displayValue.length);let o=super.remove(t,r);return this._trimEmptyTail(t,r),o}totalInputPositions(t,r){return t===void 0&&(t=0),r==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(t,r)}get state(){return super.state}set state(t){this._blocks.length=t._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=t}};Te.RepeatBlock=Wm;try{globalThis.IMask=Te}catch(e){}import tb from"react";var Ne=fn(nP(),1);import Gm from"react";var WI={mask:Ne.default.oneOfType([Ne.default.array,Ne.default.func,Ne.default.string,Ne.default.instanceOf(RegExp),Ne.default.oneOf([Date,Number,Te.Masked]),Ne.default.instanceOf(Te.Masked)]),value:Ne.default.any,unmask:Ne.default.oneOfType([Ne.default.bool,Ne.default.oneOf(["typed"])]),prepare:Ne.default.func,prepareChar:Ne.default.func,validate:Ne.default.func,commit:Ne.default.func,overwrite:Ne.default.oneOfType([Ne.default.bool,Ne.default.oneOf(["shift"])]),eager:Ne.default.oneOfType([Ne.default.bool,Ne.default.oneOf(["append","remove"])]),skipInvalid:Ne.default.bool,onAccept:Ne.default.func,onComplete:Ne.default.func,placeholderChar:Ne.default.string,displayChar:Ne.default.string,lazy:Ne.default.bool,definitions:Ne.default.object,blocks:Ne.default.object,enum:Ne.default.arrayOf(Ne.default.string),maxLength:Ne.default.number,from:Ne.default.number,to:Ne.default.number,pattern:Ne.default.string,format:Ne.default.func,parse:Ne.default.func,autofix:Ne.default.oneOfType([Ne.default.bool,Ne.default.oneOf(["pad"])]),radix:Ne.default.string,thousandsSeparator:Ne.default.string,mapToRadix:Ne.default.arrayOf(Ne.default.string),scale:Ne.default.number,normalizeZeros:Ne.default.bool,padFractionalZeros:Ne.default.bool,min:Ne.default.oneOfType([Ne.default.number,Ne.default.instanceOf(Date)]),max:Ne.default.oneOfType([Ne.default.number,Ne.default.instanceOf(Date)]),dispatch:Ne.default.func,inputRef:Ne.default.oneOfType([Ne.default.func,Ne.default.shape({current:Ne.default.object})])},GI=Object.keys(WI).filter(e=>e!=="value"),K4=["value","unmask","onAccept","onComplete","inputRef"],Y4=GI.filter(e=>K4.indexOf(e)<0);function eb(e){var t;let r=(t=class extends Gm.Component{constructor(a){super(a),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){let a=this.props,i=this._extractMaskOptionsFromProps(a);if(i.mask)this.maskRef?(this.maskRef.updateOptions(i),"value"in a&&a.value!==void 0&&(this.maskValue=a.value)):this.initMask(i);else if(this.destroyMask(),"value"in a&&a.value!==void 0){var s;(s=this.element)!=null&&s.isContentEditable&&this.element.tagName!=="INPUT"&&this.element.tagName!=="TEXTAREA"?this.element.textContent=a.value:this.element.value=a.value}}componentWillUnmount(){this.destroyMask()}_inputRef(a){this.element=a,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=a:this.props.inputRef(a))}initMask(a){a===void 0&&(a=this._extractMaskOptionsFromProps(this.props)),this.maskRef=Te(this.element,a).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this)),"value"in this.props&&this.props.value!==void 0&&(this.maskValue=this.props.value)}destroyMask(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)}_extractMaskOptionsFromProps(a){let i=xe(a,[]);return Object.keys(i).filter(s=>Y4.indexOf(s)<0).forEach(s=>{delete i[s]}),i}_extractNonMaskProps(a){let i=xe(a,[]);return GI.forEach(s=>{s!=="maxLength"&&delete i[s]}),"defaultValue"in i||(i.defaultValue=a.mask?"":i.value),delete i.value,i}get maskValue(){return this.maskRef?this.props.unmask==="typed"?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(a){this.maskRef&&(a=a==null&&this.props.unmask!=="typed"?"":a,this.props.unmask==="typed"?this.maskRef.typedValue=a:this.props.unmask?this.maskRef.unmaskedValue=a:this.maskRef.value=a)}_onAccept(a){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,a)}_onComplete(a){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,a)}render(){return Gm.createElement(e,ce(j({},this._extractNonMaskProps(this.props)),{inputRef:this._inputRef}))}},t.displayName=void 0,t.propTypes=void 0,t),o=e.displayName||e.name||"Component";return r.displayName="IMask("+o+")",r.propTypes=WI,Gm.forwardRef((n,a)=>Gm.createElement(r,ce(j({},n),{ref:a})))}var X4=eb(e=>{let o=e,{inputRef:t}=o,r=xe(o,["inputRef"]);return tb.createElement("input",ce(j({},r),{ref:t}))}),Z4=(e,t)=>tb.createElement(X4,ce(j({},e),{ref:t})),Qn=tb.forwardRef(Z4);import{useRef as TGe,useState as PGe,useCallback as CGe,useEffect as kGe}from"react";import"react";import{jsx as Q4}from"react/jsx-runtime";var Ya=fr(Q4("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V8h16z"}),"CalendarToday");import{motion as eW}from"framer-motion";var tW=eW(mf),rW=E(tW)(({theme:e})=>({padding:e.spacing(2),gap:e.spacing(2),flexDirection:"row",justifyContent:"flex-end"})),zc=rW;zc.displayName="DialogActions";var Rn=zc;var lW=E(jt,{name:"DatePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),pW=E(Mo,{name:"DatePicker",slot:"sheet",overridesResolver:(e,t)=>t.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),cW=E("div",{name:"DatePicker",slot:"container"})({width:"100%"}),KI=e=>{let t=`${e.getDate()}`,r=`${e.getMonth()+1}`,o=e.getFullYear();return Number(t)<10&&(t="0"+t),Number(r)<10&&(r="0"+r),[o,r,t].join("/")},uW=oW.forwardRef(function(t,r){let a=t,{onChange:o}=a,n=xe(a,["onChange"]);return A(Qn,ce(j({},n),{inputRef:r,onAccept:i=>o({target:{name:t.name,value:i}}),mask:Date,pattern:"Y/`m/`d",blocks:{d:{mask:Te.MaskedRange,from:1,to:31,maxLength:2},m:{mask:Te.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Te.MaskedRange,from:1900,to:9999}},format:KI,parse:i=>{let s=i.split("/");return new Date(Number(s[0]),Number(s[1])-1,Number(s[2]))},autofix:"pad",overwrite:!0}))}),YI=nW((e,t)=>{let T=e,{onChange:r,disabled:o,label:n,error:a,helperText:i,minDate:s,maxDate:l,disableFuture:p,disablePast:c,required:d}=T,f=xe(T,["onChange","disabled","label","error","helperText","minDate","maxDate","disableFuture","disablePast","required"]),u=sW(null),[h,y]=qI(e.value||""),[v,g]=qI(null),x=!!v;aW(()=>{y(e.value||"")},[e.value]),iW(t,()=>u.current,[u.current]);let b=JI(C=>{y(C.target.value),r==null||r(C)},[]),k=JI(C=>{var S;g(v?null:C.currentTarget),(S=u.current)==null||S.focus()},[v,g,u]),P=A(cW,{children:A(Wr,{open:!0,children:Ce(Do,{children:[A(Sn,ce(j({},f),{ref:u,size:"sm",value:h,onChange:b,placeholder:"YYYY/MM/DD",disabled:o,required:d,slotProps:{input:{component:uW,ref:u}},sx:{fontFamily:"monospace"},endDecorator:A(Rr,{variant:"plain",onClick:k,children:A(Ya,{})})})),x&&A(Mn,{onClickAway:()=>g(null),children:A(lW,{id:"date-picker-popper",open:!0,anchorEl:v,placement:"bottom-end",onMouseDown:C=>C.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],children:Ce(pW,{tabIndex:-1,role:"presentation",children:[A(Ua,{value:Number.isNaN(new Date(h).getTime())?void 0:[new Date(h),void 0],onChange:([C])=>{var S;b({target:{name:e.name,value:KI(C)}}),g(null),(S=u.current)==null||S.blur()},minDate:s?new Date(s):void 0,maxDate:l?new Date(l):void 0,disableFuture:p,disablePast:c}),A(Rn,{sx:{p:1},children:A(It,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{var C;b({target:{name:e.name,value:""}}),g(null),(C=u.current)==null||C.blur()},children:"Clear"})})]})})})]})})});return n?Ce(Ht,{required:d,disabled:o,error:a,size:"sm",children:[A(Ut,{children:n}),P,i&&A(Et,{children:i})]}):P});import dW,{forwardRef as fW,useCallback as rb,useEffect as mW,useImperativeHandle as hW,useMemo as yW,useRef as gW,useState as XI}from"react";var vW=E(jt,{name:"DateRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),bW=E(Mo,{name:"DateRangePicker",slot:"sheet",overridesResolver:(e,t)=>t.root})(({theme:e})=>({zIndex:e.zIndex.tooltip,width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),xW=E("div",{name:"DateRangePicker",slot:"container"})({width:"100%"}),ZI=([e,t])=>{let r=o=>{let n=`${o.getDate()}`,a=`${o.getMonth()+1}`,i=o.getFullYear();return Number(n)<10&&(n="0"+n),Number(a)<10&&(a="0"+a),[i,a,n].join("/")};return[r(e),t?r(t):""].join(" - ")},QI=e=>{let t=e.split(" - ")[0]||"",r=e.split(" - ")[1]||"",o=t.split("/"),n=r.split("/");return[new Date(Number(o[0]),Number(o[1])-1,Number(o[2])),new Date(Number(n[0]),Number(n[1])-1,Number(n[2]))]},TW=dW.forwardRef(function(t,r){let a=t,{onChange:o}=a,n=xe(a,["onChange"]);return A(Qn,ce(j({},n),{inputRef:r,onAccept:i=>o({target:{name:t.name,value:i}}),mask:Date,pattern:"Y/`m/`d - Y/`m/`d",blocks:{d:{mask:Te.MaskedRange,from:1,to:31,maxLength:2},m:{mask:Te.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Te.MaskedRange,from:1900,to:9999}},format:ZI,parse:QI,autofix:"pad",overwrite:!0}))}),ob=fW((e,t)=>{let S=e,{onChange:r,disabled:o,label:n,error:a,helperText:i,minDate:s,maxDate:l,disableFuture:p,disablePast:c,required:d}=S,f=xe(S,["onChange","disabled","label","error","helperText","minDate","maxDate","disableFuture","disablePast","required"]),u=gW(null),[h,y]=XI(e.value||""),[v,g]=XI(null),x=!!v,b=yW(()=>h?QI(h):void 0,[h]);mW(()=>{y(e.value||"")},[e.value]),hW(t,()=>u.current,[u.current]);let k=rb(I=>{y(I.target.value),r==null||r(I)},[r]),P=rb(I=>{var O;g(v?null:I.currentTarget),(O=u.current)==null||O.focus()},[v,g,u]),T=rb(([I,O])=>{var L;!I||!O||((L=u.current)==null||L.blur(),y(ZI([I,O])),g(null))},[y,g,u]),C=A(xW,{children:A(Wr,{open:!0,children:Ce(Do,{children:[A(Sn,ce(j({},f),{ref:t,size:"sm",value:h,onChange:k,disabled:o,required:d,placeholder:"YYYY/MM/DD - YYYY/MM/DD",slotProps:{input:{component:TW,ref:u}},sx:{fontFamily:"monospace"},endDecorator:A(Rr,{variant:"plain",onClick:P,children:A(Ya,{})})})),x&&A(Mn,{onClickAway:()=>g(null),children:A(vW,{id:"date-range-picker-popper",open:!0,anchorEl:v,placement:"bottom-end",onMouseDown:I=>I.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],children:Ce(bW,{tabIndex:-1,role:"presentation",children:[A(Ua,{rangeSelection:!0,defaultValue:b,onChange:T,minDate:s?new Date(s):void 0,maxDate:l?new Date(l):void 0,disableFuture:p,disablePast:c}),A(Rn,{sx:{p:1},children:A(It,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{var I;y(""),g(null),(I=u.current)==null||I.blur()},children:"Clear"})})]})})})]})})});return n?Ce(Ht,{required:d,disabled:o,error:a,size:"sm",children:[A(Ut,{children:n}),C,i&&A(Et,{children:i})]}):C});ob.displayName="DateRangePicker";import{motion as PW}from"framer-motion";var CW=PW(yf),kW=E(CW)(({theme:e})=>({padding:e.spacing(0,6,5)})),Fc=kW;Fc.displayName="DialogContent";var Jm=Fc;import{motion as SW}from"framer-motion";var RW=SW(gf),EW=E(RW)(({theme:e})=>({padding:e.spacing(4,6)})),$c=EW;$c.displayName="DialogTitle";var qm=$c;import DW from"react";import{motion as Km}from"framer-motion";var IW=Km(xf),nb=IW;nb.displayName="Modal";var OW=Km(Lf),e1=E(OW)({padding:0}),Vc=e1;Vc.displayName="ModalDialog";var _W=E(Km(Nf))(({theme:e})=>({top:e.spacing(3),right:e.spacing(6)})),Ym=_W;Ym.displayName="ModalClose";var wW=Km(zf),ab=wW;ab.displayName="ModalOverflow";function ib(e){let n=e,{title:t,children:r}=n,o=xe(n,["title","children"]);return Ce(e1,ce(j({},o),{children:[A(Ym,{}),A(qm,{children:t}),A(Jm,{children:r})]}))}ib.displayName="ModalFrame";var AW=E(Vc)(({theme:e})=>({padding:0})),sb=DW.forwardRef((e,t)=>{let i=e,{title:r,children:o,actions:n}=i,a=xe(i,["title","children","actions"]);return Ce(AW,ce(j({ref:t},a),{children:[A(qm,{children:r}),A(Jm,{children:o}),A(Rn,{children:n})]}))});sb.displayName="DialogFrame";import{motion as MW}from"framer-motion";var NW=MW(vf),jc=e=>A(NW,j({},e));jc.displayName="Divider";import{motion as LW}from"framer-motion";var BW=LW(Wp),lb=e=>{var n;let o=e,{children:t}=o,r=xe(o,["children"]);return A(BW,ce(j({},r),{slotProps:ce(j({},r.slotProps),{content:ce(j({},(n=r.slotProps)==null?void 0:n.content),{sx:{bgcolor:"transparent",p:{md:3,sm:0},boxShadow:"none"}})}),children:t}))};lb.displayName="InsetDrawer";import u9,{useCallback as oh,useEffect as d9,useMemo as _1,useRef as w1,useState as Db}from"react";import{jsx as zW}from"react/jsx-runtime";var t1=fr(zW("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M14 13v4h-4v-4H7l4.65-4.65c.2-.2.51-.2.71 0L17 13z"}),"CloudUploadRounded");import{jsx as FW}from"react/jsx-runtime";var r1=fr(FW("path",{d:"m19.41 7.41-4.83-4.83c-.37-.37-.88-.58-1.41-.58H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8.83c0-.53-.21-1.04-.59-1.42M14.8 15H13v3c0 .55-.45 1-1 1s-1-.45-1-1v-3H9.21c-.45 0-.67-.54-.35-.85l2.8-2.79c.2-.19.51-.19.71 0l2.79 2.79c.3.31.08.85-.36.85M14 9c-.55 0-1-.45-1-1V3.5L18.5 9z"}),"UploadFileRounded");import{jsx as $W}from"react/jsx-runtime";var o1=fr($W("path",{d:"M18.3 5.71a.9959.9959 0 0 0-1.41 0L12 10.59 7.11 5.7a.9959.9959 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4"}),"ClearRounded");function Hc(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(){t.forEach(function(n){return n()})}}function wl(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function pb(e){if(Array.isArray(e))return wl(e)}function cb(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ub(e,t){if(e){if(typeof e=="string")return wl(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return wl(e,t)}}function db(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
128
128
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ea(e){return pb(e)||cb(e)||ub(e)||db()}var Wc=fn(Nl());var f1=fn(Nl());function Zm(e){var t=null;return function(){return t||(t={value:e.apply(void 0,arguments)}),t.value}}var Xa=Zm(function(){var t=navigator,r=t.userAgent;return r.includes("AppleWebKit")&&!r.includes("Chrome")});var i1=fn(Nl());var Qm={isLeavingWindow:Symbol("leaving"),isEnteringWindow:Symbol("entering")};function s1(e){var t=e.dragEnter;return Xa()?t.hasOwnProperty(Qm.isEnteringWindow):!1}function l1(e){var t=e.dragLeave;return Xa()?t.hasOwnProperty(Qm.isLeavingWindow):!1}(function(){if(typeof window>"u"||!Xa())return;function t(){return{enterCount:0,isOverWindow:!1}}var r=t();function o(){r=t()}(0,i1.bindAll)(window,[{type:"dragstart",listener:function(){r.enterCount=0,r.isOverWindow=!0}},{type:"drop",listener:o},{type:"dragend",listener:o},{type:"dragenter",listener:function(a){!r.isOverWindow&&r.enterCount===0&&(a[Qm.isEnteringWindow]=!0),r.isOverWindow=!0,r.enterCount++}},{type:"dragleave",listener:function(a){r.enterCount--,r.isOverWindow&&r.enterCount===0&&(a[Qm.isLeavingWindow]=!0,r.isOverWindow=!1)}}],{capture:!0})})();function JW(e){return"nodeName"in e}function p1(e){var t=e.dragLeave,r=t.type,o=t.relatedTarget;return r!=="dragleave"?!1:Xa()?l1({dragLeave:t}):o==null||o instanceof HTMLIFrameElement?!0:JW(o)&&!document.contains(o)}function Ll(e){var t=e.onDragEnd;return[{type:"pointermove",listener:function(){var r=0;return function(){if(r<20){r++;return}t()}}()},{type:"pointerdown",listener:t}]}var c1=fn(Nl());function qW(e,t){var r=t.property,o=t.rule,n=t.priority,a=n===void 0?"":n,i=e.style.getPropertyValue(r),s=e.style.getPropertyPriority(r);return e.style.setProperty(r,o,a),function(){e.style.setProperty(r,i,s)}}function KW(e){var t=e.current,r=document.elementFromPoint(t.input.clientX,t.input.clientY);return r instanceof HTMLElement?qW(r,{property:"pointer-events",rule:"auto",priority:"important"}):null}function YW(){var e,t=document.createElement("style");return t.setAttribute("pdnd-post-drag-fix","true"),document.head.appendChild(t),(e=t.sheet)===null||e===void 0||e.insertRule("* { pointer-events: none !important; }"),function(){document.head.removeChild(t)}}function mb(e){var t=e.current;queueMicrotask(function(){var r=KW({current:t}),o=YW();function n(){a(),r==null||r(),o()}var a=(0,c1.bindAll)(window,[{type:"pointerdown",listener:n},{type:"pointermove",listener:n},{type:"focusin",listener:n},{type:"focusout",listener:n},{type:"dragstart",listener:n},{type:"dragenter",listener:n},{type:"dragover",listener:n}],{capture:!0})})}function hb(e){return{altKey:e.altKey,button:e.button,buttons:e.buttons,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey,clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY}}var XW=function(t){var r=[],o=null,n=function(){for(var i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l];r=s,!o&&(o=requestAnimationFrame(function(){o=null,t.apply(void 0,r)}))};return n.cancel=function(){o&&(cancelAnimationFrame(o),o=null)},n},u1=XW;var yb=u1(function(e){return e()}),eh=function(){var e=null;function t(o){var n=requestAnimationFrame(function(){e=null,o()});e={frameId:n,fn:o}}function r(){e&&(cancelAnimationFrame(e.frameId),e.fn(),e=null)}return{schedule:t,flush:r}}();function d1(e){var t=e.source,r=e.initial,o=e.dispatchEvent,n={dropTargets:[]};function a(s){o(s),n={dropTargets:s.payload.location.current.dropTargets}}var i={start:function(l){var p=l.nativeSetDragImage,c={current:r,previous:n,initial:r};a({eventName:"onGenerateDragPreview",payload:{source:t,location:c,nativeSetDragImage:p}}),eh.schedule(function(){a({eventName:"onDragStart",payload:{source:t,location:c}})})},dragUpdate:function(l){var p=l.current;eh.flush(),yb.cancel(),a({eventName:"onDropTargetChange",payload:{source:t,location:{initial:r,previous:n,current:p}}})},drag:function(l){var p=l.current;yb(function(){eh.flush();var c={initial:r,previous:n,current:p};a({eventName:"onDrag",payload:{source:t,location:c}})})},drop:function(l){var p=l.current,c=l.updatedSourcePayload;eh.flush(),yb.cancel(),a({eventName:"onDrop",payload:{source:c!=null?c:t,location:{current:p,previous:n,initial:r}}})}};return i}var vb={isActive:!1};function m1(){return!vb.isActive}function ZW(e){return e.dataTransfer?e.dataTransfer.setDragImage.bind(e.dataTransfer):null}function QW(e){var t=e.current,r=e.next;if(t.length!==r.length)return!0;for(var o=0;o<t.length;o++)if(t[o].element!==r[o].element)return!0;return!1}function e9(e){var t=e.event,r=e.dragType,o=e.getDropTargetsOver,n=e.dispatchEvent;if(!m1())return;var a=t9({event:t,dragType:r,getDropTargetsOver:o});vb.isActive=!0;var i={current:a};gb({event:t,current:a.dropTargets});var s=d1({source:r.payload,dispatchEvent:n,initial:a});function l(u){var h=QW({current:i.current.dropTargets,next:u.dropTargets});i.current=u,h&&s.dragUpdate({current:i.current})}function p(u){var h=hb(u),y=o({target:u.target,input:h,source:r.payload,current:i.current.dropTargets});y.length&&(u.preventDefault(),gb({event:u,current:y})),l({dropTargets:y,input:h})}function c(){i.current.dropTargets.length&&l({dropTargets:[],input:i.current.input}),s.drop({current:i.current,updatedSourcePayload:null}),d()}function d(){vb.isActive=!1,f()}var f=(0,f1.bindAll)(window,[{type:"dragover",listener:function(h){p(h),s.drag({current:i.current})}},{type:"dragenter",listener:p},{type:"dragleave",listener:function(h){p1({dragLeave:h})&&(l({input:i.current.input,dropTargets:[]}),r.startedFrom==="external"&&c())}},{type:"drop",listener:function(h){h.preventDefault(),gb({event:h,current:i.current.dropTargets}),s.drop({current:i.current,updatedSourcePayload:r.type==="external"?r.getDropPayload(h):null}),d(),r.startedFrom==="internal"&&mb({current:i.current})}},{type:"dragend",listener:function(h){c(),r.startedFrom==="internal"&&mb({current:i.current})}}].concat(ea(Ll({onDragEnd:c}))),{capture:!0});s.start({nativeSetDragImage:ZW(t)})}function gb(e){var t,r=e.event,o=e.current,n=(t=o[0])===null||t===void 0?void 0:t.dropEffect;n!=null&&r.dataTransfer&&(r.dataTransfer.dropEffect=n)}function t9(e){var t=e.event,r=e.dragType,o=e.getDropTargetsOver,n=hb(t);if(r.startedFrom==="external")return{input:n,dropTargets:[]};var a=o({input:n,source:r.payload,target:t.target,current:[]});return{input:n,dropTargets:a}}var bb={canStart:m1,start:e9};var xb=new Map;function r9(e){var t=e.typeKey,r=e.mount,o=xb.get(t);if(o)return o.usageCount++,o;var n={typeKey:t,unmount:r(),usageCount:1};return xb.set(t,n),n}function h1(e){var t=r9(e);return function(){t.usageCount--,!(t.usageCount>0)&&(t.unmount(),xb.delete(e.typeKey))}}function Za(e){"@babel/helpers - typeof";return Za=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Za(e)}function Tb(e,t){if(Za(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(Za(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Pb(e){var t=Tb(e,"string");return Za(t)=="symbol"?t:t+""}function Uc(e,t,r){return t=Pb(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y1(e,t){var r=t.attribute,o=t.value;return e.setAttribute(r,o),function(){return e.removeAttribute(r)}}function g1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function Qa(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?g1(Object(r),!0).forEach(function(o){Uc(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g1(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function Cb(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=o9(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(p){throw p},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
129
129
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,i=!1,s;return{s:function(){r=r.call(e)},n:function(){var p=r.next();return a=p.done,p},e:function(p){i=!0,s=p},f:function(){try{!a&&r.return!=null&&r.return()}finally{if(i)throw s}}}}function o9(e,t){if(e){if(typeof e=="string")return v1(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return v1(e,t)}}function v1(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function kb(e){return e.slice(0).reverse()}function b1(e){var t=e.typeKey,r=e.defaultDropEffect,o=new WeakMap,n="data-drop-target-for-".concat(t),a="[".concat(n,"]");function i(u){return o.set(u.element,u),function(){return o.delete(u.element)}}function s(u){if(0)var h;return Hc(y1(u.element,{attribute:n,value:"true"}),i(u))}function l(u){var h,y,v,g,x=u.source,b=u.target,k=u.input,P=u.result,T=P===void 0?[]:P;if(b==null)return T;if(!(b instanceof Element))return b instanceof Node?l({source:x,target:b.parentElement,input:k,result:T}):T;var C=b.closest(a);if(C==null)return T;var S=o.get(C);if(S==null)return T;var I={input:k,source:x,element:S.element};if(S.canDrop&&!S.canDrop(I))return l({source:x,target:S.element.parentElement,input:k,result:T});var O=(h=(y=S.getData)===null||y===void 0?void 0:y.call(S,I))!==null&&h!==void 0?h:{},L=(v=(g=S.getDropEffect)===null||g===void 0?void 0:g.call(S,I))!==null&&v!==void 0?v:r,M={data:O,element:S.element,dropEffect:L,isActiveDueToStickiness:!1};return l({source:x,target:S.element.parentElement,input:k,result:[].concat(ea(T),[M])})}function p(u){var h=u.eventName,y=u.payload,v=Cb(y.location.current.dropTargets),g;try{for(v.s();!(g=v.n()).done;){var x,b=g.value,k=o.get(b.element),P=Qa(Qa({},y),{},{self:b});k==null||(x=k[h])===null||x===void 0||x.call(k,P)}}catch(T){v.e(T)}finally{v.f()}}var c={onGenerateDragPreview:p,onDrag:p,onDragStart:p,onDrop:p,onDropTargetChange:function(h){var y=h.payload,v=new Set(y.location.current.dropTargets.map(function(z){return z.element})),g=new Set,x=Cb(y.location.previous.dropTargets),b;try{for(x.s();!(b=x.n()).done;){var k,P=b.value;g.add(P.element);var T=o.get(P.element),C=v.has(P.element),S=Qa(Qa({},y),{},{self:P});if(T==null||(k=T.onDropTargetChange)===null||k===void 0||k.call(T,S),!C){var I;T==null||(I=T.onDragLeave)===null||I===void 0||I.call(T,S)}}}catch(z){x.e(z)}finally{x.f()}var O=Cb(y.location.current.dropTargets),L;try{for(O.s();!(L=O.n()).done;){var M,w,H=L.value;if(!g.has(H.element)){var N=Qa(Qa({},y),{},{self:H}),D=o.get(H.element);D==null||(M=D.onDropTargetChange)===null||M===void 0||M.call(D,N),D==null||(w=D.onDragEnter)===null||w===void 0||w.call(D,N)}}}catch(z){O.e(z)}finally{O.f()}}};function d(u){c[u.eventName](u)}function f(u){var h=u.source,y=u.target,v=u.input,g=u.current,x=l({source:h,target:y,input:v});if(x.length>=g.length)return x;for(var b=kb(g),k=kb(x),P=[],T=0;T<b.length;T++){var C,S=b[T],I=k[T];if(I!=null){P.push(I);continue}var O=P[T-1],L=b[T-1];if((O==null?void 0:O.element)!==(L==null?void 0:L.element))break;var M=o.get(S.element);if(!M)break;var w={input:v,source:h,element:M.element};if(M.canDrop&&!M.canDrop(w)||!((C=M.getIsSticky)!==null&&C!==void 0&&C.call(M,w)))break;P.push(Qa(Qa({},S),{},{isActiveDueToStickiness:!0}))}return kb(P)}return{dropTargetForConsumers:s,getIsOver:f,dispatchEvent:d}}function n9(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=a9(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(p){throw p},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
130
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,i=!1,s;return{s:function(){r=r.call(e)},n:function(){var p=r.next();return a=p.done,p},e:function(p){i=!0,s=p},f:function(){try{!a&&r.return!=null&&r.return()}finally{if(i)throw s}}}}function a9(e,t){if(e){if(typeof e=="string")return x1(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return x1(e,t)}}function x1(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function T1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function i9(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?T1(Object(r),!0).forEach(function(o){Uc(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T1(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function P1(){var e=new Set,t=null;function r(a){t&&(!a.canMonitor||a.canMonitor(t.canMonitorArgs))&&t.active.add(a)}function o(a){var i=i9({},a);return e.add(i),r(i),function(){e.delete(i),t&&t.active.delete(i)}}function n(a){var i=a.eventName,s=a.payload;if(i==="onGenerateDragPreview"){t={canMonitorArgs:{initial:s.location.initial,source:s.source},active:new Set};var l=n9(e),p;try{for(l.s();!(p=l.n()).done;){var c=p.value;r(c)}}catch(v){l.e(v)}finally{l.f()}}if(t){for(var d=Array.from(t.active),f=0,u=d;f<u.length;f++){var h=u[f];if(t.active.has(h)){var y;(y=h[i])===null||y===void 0||y.call(h,s)}}i==="onDrop"&&(t.active.clear(),t=null)}}return{dispatchEvent:n,monitorForConsumers:o}}function C1(e){var t=e.typeKey,r=e.mount,o=e.dispatchEventToSource,n=e.defaultDropEffect,a=P1(),i=b1({typeKey:t,defaultDropEffect:n});function s(c){o==null||o(c),i.dispatchEvent(c),a.dispatchEvent(c)}function l(c){var d=c.event,f=c.dragType;bb.start({event:d,dragType:f,getDropTargetsOver:i.getIsOver,dispatchEvent:s})}function p(){function c(){var d={canStart:bb.canStart,start:l};return r(d)}return h1({typeKey:t,mount:c})}return{registerUsage:p,dropTarget:i.dropTargetForConsumers,monitor:a.monitorForConsumers}}var wqe=Zm(function(){return navigator.userAgent.toLocaleLowerCase().includes("android")}),k1="pdnd:android-fallback";function s9(e){return"nodeName"in e}function S1(e){var t=e.dragEnter,r=t.type,o=t.relatedTarget;return r!=="dragenter"?!1:Xa()?s1({dragEnter:t}):o==null||o instanceof HTMLIFrameElement?!0:s9(o)&&!document.contains(o)}var R1="text/plain";var E1="application/vnd.pdnd";function Rb(e){var t=e.type,r=e.value;return!(t===E1||t===R1&&r===k1)}function l9(e){return Array.from(e.types).filter(function(t){return Rb({type:t,value:e.getData(t)})})}function p9(e){return Array.from(e.items).filter(function(t){return t.kind==="file"||Rb({type:t.type,value:e.getData(t.type)})})}var Sb=!1,Eb=C1({typeKey:"external",defaultDropEffect:"copy",mount:function(t){return(0,Wc.bind)(window,{type:"dragenter",listener:function(o){if(!Sb&&o.dataTransfer&&t.canStart(o)&&S1({dragEnter:o})){var n=l9(o.dataTransfer);if(n.length){var a={types:n,items:[],getStringData:function(){return null}};t.start({event:o,dragType:{type:"external",startedFrom:"external",payload:a,getDropPayload:function(s){if(!s.dataTransfer)return a;var l=p9(s.dataTransfer),p=s.dataTransfer.getData.bind(s.dataTransfer);return{types:n,items:l,getStringData:function(d){if(!n.includes(d))return null;var f=p(d);return Rb({type:d,value:f})?f:null}}}}})}}}})}});function Ib(e){return Eb.dropTarget(e)}function Ob(e){return Eb.monitor(e)}(function(){if(typeof window>"u")return;Eb.registerUsage();var t={type:"idle"},r=t;function o(){r.type==="dragging"&&(Sb=!1,r.cleanup(),r=t)}function n(){return(0,Wc.bindAll)(window,[{type:"dragend",listener:o}].concat(ea(Ll({onDragEnd:o}))),{capture:!0})}(0,Wc.bind)(window,{type:"dragstart",listener:function(){r.type==="idle"&&(Sb=!0,r={type:"dragging",cleanup:n()})},options:{capture:!0}})})();function th(e){var t=e.source;return t.types.includes("Files")}function _b(e){var t=e.source;return t.items.filter(function(r){return r.kind==="file"}).map(function(r){return r.getAsFile()}).filter(function(r){return r!=null})}var O1=fn(Nl());function I1(e){e.defaultPrevented||(e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.preventDefault())}var wb=null;function c9(){Gc(),wb=(0,O1.bindAll)(window,[{type:"dragover",listener:I1},{type:"dragenter",listener:I1},{type:"drop",listener:function(t){t.preventDefault(),Gc()}},{type:"dragend",listener:Gc}].concat(ea(Ll({onDragEnd:Gc}))),{capture:!1})}function Gc(){var e;(e=wb)===null||e===void 0||e(),wb=null}var rh={start:c9,stop:Gc};var f9=E("input")({width:"1px",height:"1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",position:"absolute"}),m9=E(Fr,{name:"Uploader",slot:"PreviewRoot"})({}),h9=E(xc,{name:"Uploader",slot:"UploadCard"})(({theme:e})=>({padding:e.spacing(2.5),border:`1px solid ${e.palette.neutral.outlinedBorder}`})),y9=E(r1,{name:"Uploader",slot:"UploadFileIcon"})(({theme:e})=>({color:e.palette.neutral[400],width:"32px",height:"32px"})),g9=E(o1,{name:"Uploader",slot:"ClearIcon"})(({theme:e})=>({color:e.palette.neutral.plainColor,width:"18px",height:"18px"})),v9=["byte","kilobyte","megabyte","gigabyte","terabyte","petabyte"],D1=e=>{let t=e==0?0:Math.floor(Math.log(e)/Math.log(1024)),r=e/Math.pow(1024,t),o=v9[t];return Intl.NumberFormat("en-us",{style:"unit",unit:o,unitDisplay:"narrow"}).format(r)},b9=e=>{let{files:t,onDelete:r}=e;return A(m9,{gap:1,children:t.map(o=>A(h9,{size:"sm",color:"neutral",children:Ce(Fr,{direction:"row",alignItems:"center",gap:2,children:[A(y9,{}),Ce(Fr,{flex:"1",children:[A(qr,{level:"body-sm",textColor:"common.black",children:o.name}),A(qr,{level:"body-xs",fontWeight:"300",lineHeight:"1.33",textColor:"text.tertiary",children:D1(o.size)})]}),A(Rr,{onClick:()=>r==null?void 0:r(o),children:A(g9,{})})]})},o.name))})},x9=E(Fr,{name:"Uploader",slot:"root"})(({theme:e})=>({gap:e.spacing(2)})),T9=E(Mo,{name:"Uploader",slot:"dropZone"})(({theme:e,state:t,error:r})=>({width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",padding:e.spacing(5),gap:e.spacing(4),cursor:"pointer",backgroundColor:e.palette.background.surface,border:r?`1px solid ${e.palette.danger.outlinedBorder}`:t==="idle"?`1px solid ${e.palette.neutral.outlinedBorder}`:`1px solid ${e.palette.primary.outlinedBorder}`})),P9=E(t1,{name:"Uploader",slot:"iconContainer"})(({theme:e,state:t,error:r})=>({color:r?`rgba(${e.vars.palette.danger.mainChannel} / 0.6)`:t==="over"?`rgba(${e.palette.primary.mainChannel} / 0.6)`:e.palette.neutral.softActiveBg,width:"32px",height:"32px"})),Ab=u9.memo(e=>{let{accept:t,maxCount:r,name:o,size:n,maxSize:a,onChange:i,label:s,helperText:l}=e,p=w1(null),c=w1(null),[d,f]=Db(),[u,h]=Db([]),[y,v]=Db("idle"),g=_1(()=>!!d||e.error,[e.error,d]),x=_1(()=>!r||r&&u.length!==r,[u,r]),b=oh(S=>{try{a&&S.forEach(O=>{if(O.size>a)throw new Error(`File size exceeds the limit: ${D1(a)}`)});let I=[...u,...S];if(r&&I.length>r)throw new Error(`File count exceeds the limit: ${r}`);i==null||i({target:{name:o,value:I}}),h(I)}catch(I){f(I.message)}},[u]);d9(()=>{let S=p.current;if(S)return Hc(Ib({element:S,canDrop:th,onDragEnter:()=>v("over"),onDragLeave:()=>v("potential"),onDrop:async({source:I})=>{let O=await _b({source:I});b(O)}}),Ob({canMonitor:th,onDragStart:()=>{v("potential"),rh.start()},onDrop:()=>{v("idle"),rh.stop()}}))});let k=oh(S=>{let I=Array.from(S.target.files||[]);b(I)},[b]),P=oh(S=>{h(I=>(i==null||i({target:{name:o,value:I.filter(O=>O!==S)}}),I.filter(O=>O!==S)))},[]),T=oh(()=>{var S;(S=c.current)==null||S.click()},[]),C=Ce(T9,{state:y,error:g,ref:p,onClick:T,children:[A(Fr,{alignItems:"center",gap:1,children:A(P9,{state:y,error:g})}),A(f9,{type:"file",onChange:k,multiple:!0,accept:t,ref:c})]});return Ce(x9,{children:[x&&(s?Ce(Ht,{size:n,error:!!g,children:[A(Ut,{children:s}),C,d?Ce(Et,{children:[A(Lm,{}),d]}):l&&A(Et,{children:l})]}):C),u.length>0&&A(b9,{files:u,onDelete:P})]})});Ab.displayName="Uploader";import{motion as C9}from"framer-motion";var k9=C9(Ef),Mb=k9;Mb.displayName="Grid";function A1(e,t){let r=t||{};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}var S9=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,R9=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,E9={};function nh(e,t){return((t||E9).jsx?R9:S9).test(e)}var I9=/[ \t\n\f\r]/g;function Nb(e){return typeof e=="object"?e.type==="text"?M1(e.value):!1:M1(e)}function M1(e){return e.replace(I9,"")===""}var ta=class{constructor(t,r,o){this.property=t,this.normal=r,o&&(this.space=o)}};ta.prototype.property={};ta.prototype.normal={};ta.prototype.space=null;function Lb(e,t){let r={},o={},n=-1;for(;++n<e.length;)Object.assign(r,e[n].property),Object.assign(o,e[n].normal);return new ta(r,o,t)}function Jc(e){return e.toLowerCase()}var _r=class{constructor(t,r){this.property=t,this.attribute=r}};_r.prototype.space=null;_r.prototype.boolean=!1;_r.prototype.booleanish=!1;_r.prototype.overloadedBoolean=!1;_r.prototype.number=!1;_r.prototype.commaSeparated=!1;_r.prototype.spaceSeparated=!1;_r.prototype.commaOrSpaceSeparated=!1;_r.prototype.mustUseProperty=!1;_r.prototype.defined=!1;var qc={};iT(qc,{boolean:()=>Ve,booleanish:()=>Ot,commaOrSpaceSeparated:()=>Kr,commaSeparated:()=>ei,number:()=>me,overloadedBoolean:()=>Bb,spaceSeparated:()=>pt});var O9=0,Ve=es(),Ot=es(),Bb=es(),me=es(),pt=es(),ei=es(),Kr=es();function es(){return 2**++O9}var zb=Object.keys(qc),ts=class extends _r{constructor(t,r,o,n){let a=-1;if(super(t,r),N1(this,"space",n),typeof o=="number")for(;++a<zb.length;){let i=zb[a];N1(this,zb[a],(o&qc[i])===qc[i])}}};ts.prototype.defined=!0;function N1(e,t,r){r&&(e[t]=r)}var _9={}.hasOwnProperty;function No(e){let t={},r={},o;for(o in e.properties)if(_9.call(e.properties,o)){let n=e.properties[o],a=new ts(o,e.transform(e.attributes||{},o),n,e.space);e.mustUseProperty&&e.mustUseProperty.includes(o)&&(a.mustUseProperty=!0),t[o]=a,r[Jc(o)]=o,r[Jc(a.attribute)]=o}return new ta(t,r,e.space)}var Fb=No({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}});var $b=No({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function ah(e,t){return t in e?e[t]:t}function ih(e,t){return ah(e,t.toLowerCase())}var Vb=No({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:ih,properties:{xmlns:null,xmlnsXLink:null}});var jb=No({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Ot,ariaAutoComplete:null,ariaBusy:Ot,ariaChecked:Ot,ariaColCount:me,ariaColIndex:me,ariaColSpan:me,ariaControls:pt,ariaCurrent:null,ariaDescribedBy:pt,ariaDetails:null,ariaDisabled:Ot,ariaDropEffect:pt,ariaErrorMessage:null,ariaExpanded:Ot,ariaFlowTo:pt,ariaGrabbed:Ot,ariaHasPopup:null,ariaHidden:Ot,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:pt,ariaLevel:me,ariaLive:null,ariaModal:Ot,ariaMultiLine:Ot,ariaMultiSelectable:Ot,ariaOrientation:null,ariaOwns:pt,ariaPlaceholder:null,ariaPosInSet:me,ariaPressed:Ot,ariaReadOnly:Ot,ariaRelevant:null,ariaRequired:Ot,ariaRoleDescription:pt,ariaRowCount:me,ariaRowIndex:me,ariaRowSpan:me,ariaSelected:Ot,ariaSetSize:me,ariaSort:null,ariaValueMax:me,ariaValueMin:me,ariaValueNow:me,ariaValueText:null,role:null}});var L1=No({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:ih,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ei,acceptCharset:pt,accessKey:pt,action:null,allow:null,allowFullScreen:Ve,allowPaymentRequest:Ve,allowUserMedia:Ve,alt:null,as:null,async:Ve,autoCapitalize:null,autoComplete:pt,autoFocus:Ve,autoPlay:Ve,blocking:pt,capture:null,charSet:null,checked:Ve,cite:null,className:pt,cols:me,colSpan:null,content:null,contentEditable:Ot,controls:Ve,controlsList:pt,coords:me|ei,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ve,defer:Ve,dir:null,dirName:null,disabled:Ve,download:Bb,draggable:Ot,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ve,formTarget:null,headers:pt,height:me,hidden:Ve,high:me,href:null,hrefLang:null,htmlFor:pt,httpEquiv:pt,id:null,imageSizes:null,imageSrcSet:null,inert:Ve,inputMode:null,integrity:null,is:null,isMap:Ve,itemId:null,itemProp:pt,itemRef:pt,itemScope:Ve,itemType:pt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ve,low:me,manifest:null,max:null,maxLength:me,media:null,method:null,min:null,minLength:me,multiple:Ve,muted:Ve,name:null,nonce:null,noModule:Ve,noValidate:Ve,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ve,optimum:me,pattern:null,ping:pt,placeholder:null,playsInline:Ve,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ve,referrerPolicy:null,rel:pt,required:Ve,reversed:Ve,rows:me,rowSpan:me,sandbox:pt,scope:null,scoped:Ve,seamless:Ve,selected:Ve,shadowRootClonable:Ve,shadowRootDelegatesFocus:Ve,shadowRootMode:null,shape:null,size:me,sizes:null,slot:null,span:me,spellCheck:Ot,src:null,srcDoc:null,srcLang:null,srcSet:null,start:me,step:null,style:null,tabIndex:me,target:null,title:null,translate:null,type:null,typeMustMatch:Ve,useMap:null,value:Ot,width:me,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:pt,axis:null,background:null,bgColor:null,border:me,borderColor:null,bottomMargin:me,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ve,declare:Ve,event:null,face:null,frame:null,frameBorder:null,hSpace:me,leftMargin:me,link:null,longDesc:null,lowSrc:null,marginHeight:me,marginWidth:me,noResize:Ve,noHref:Ve,noShade:Ve,noWrap:Ve,object:null,profile:null,prompt:null,rev:null,rightMargin:me,rules:null,scheme:null,scrolling:Ot,standby:null,summary:null,text:null,topMargin:me,valueType:null,version:null,vAlign:null,vLink:null,vSpace:me,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ve,disableRemotePlayback:Ve,prefix:null,property:null,results:me,security:null,unselectable:null}});var B1=No({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:ah,properties:{about:Kr,accentHeight:me,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:me,amplitude:me,arabicForm:null,ascent:me,attributeName:null,attributeType:null,azimuth:me,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:me,by:null,calcMode:null,capHeight:me,className:pt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:me,diffuseConstant:me,direction:null,display:null,dur:null,divisor:me,dominantBaseline:null,download:Ve,dx:null,dy:null,edgeMode:null,editable:null,elevation:me,enableBackground:null,end:null,event:null,exponent:me,externalResourcesRequired:null,fill:null,fillOpacity:me,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ei,g2:ei,glyphName:ei,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:me,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:me,horizOriginX:me,horizOriginY:me,id:null,ideographic:me,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:me,k:me,k1:me,k2:me,k3:me,k4:me,kernelMatrix:Kr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:me,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:me,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:me,overlineThickness:me,paintOrder:null,panose1:null,path:null,pathLength:me,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:pt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:me,pointsAtY:me,pointsAtZ:me,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Kr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Kr,rev:Kr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Kr,requiredFeatures:Kr,requiredFonts:Kr,requiredFormats:Kr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:me,specularExponent:me,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:me,strikethroughThickness:me,string:null,stroke:null,strokeDashArray:Kr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:me,strokeOpacity:me,strokeWidth:null,style:null,surfaceScale:me,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Kr,tabIndex:me,tableValues:null,target:null,targetX:me,targetY:me,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Kr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:me,underlineThickness:me,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:me,values:null,vAlphabetic:me,vMathematical:me,vectorEffect:null,vHanging:me,vIdeographic:me,version:null,vertAdvY:me,vertOriginX:me,vertOriginY:me,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:me,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}});var w9=/^data[-\w.:]+$/i,z1=/-[a-z]/g,D9=/[A-Z]/g;function Hb(e,t){let r=Jc(t),o=t,n=_r;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&w9.test(t)){if(t.charAt(4)==="-"){let a=t.slice(5).replace(z1,M9);o="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{let a=t.slice(4);if(!z1.test(a)){let i=a.replace(D9,A9);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}n=ts}return new n(o,t)}function A9(e){return"-"+e.toLowerCase()}function M9(e){return e.charAt(1).toUpperCase()}var Ub={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};var F1=Lb([$b,Fb,Vb,jb,L1],"html"),sh=Lb([$b,Fb,Vb,jb,B1],"svg");function $1(e){return e.join(" ").trim()}var Wb=fn(J1(),1),q1=Wb.default.default||Wb.default;var lh=K1("end"),Bl=K1("start");function K1(e){return t;function t(r){let o=r&&r.position&&r.position[e]||{};if(typeof o.line=="number"&&o.line>0&&typeof o.column=="number"&&o.column>0)return{line:o.line,column:o.column,offset:typeof o.offset=="number"&&o.offset>-1?o.offset:void 0}}}function Gb(e){let t=Bl(e),r=lh(e);if(t&&r)return{start:t,end:r}}function ti(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Y1(e.position):"start"in e||"end"in e?Y1(e):"line"in e||"column"in e?Jb(e):""}function Jb(e){return X1(e&&e.line)+":"+X1(e&&e.column)}function Y1(e){return Jb(e&&e.start)+"-"+Jb(e&&e.end)}function X1(e){return e&&typeof e=="number"?e:1}var Nt=class extends Error{constructor(t,r,o){super(),typeof r=="string"&&(o=r,r=void 0);let n="",a={},i=!1;if(r&&("line"in r&&"column"in r?a={place:r}:"start"in r&&"end"in r?a={place:r}:"type"in r?a={ancestors:[r],place:r.position}:a=j({},r)),typeof t=="string"?n=t:!a.cause&&t&&(i=!0,n=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof o=="string"){let l=o.indexOf(":");l===-1?a.ruleId=o:(a.source=o.slice(0,l),a.ruleId=o.slice(l+1))}if(!a.place&&a.ancestors&&a.ancestors){let l=a.ancestors[a.ancestors.length-1];l&&(a.place=l.position)}let s=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=n,this.line=s?s.line:void 0,this.name=ti(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=i&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}};Nt.prototype.file="";Nt.prototype.name="";Nt.prototype.reason="";Nt.prototype.message="";Nt.prototype.stack="";Nt.prototype.column=void 0;Nt.prototype.line=void 0;Nt.prototype.ancestors=void 0;Nt.prototype.cause=void 0;Nt.prototype.fatal=void 0;Nt.prototype.place=void 0;Nt.prototype.ruleId=void 0;Nt.prototype.source=void 0;var qb={}.hasOwnProperty,q9=new Map,K9=/[A-Z]/g,Y9=/-([a-z])/g,X9=new Set(["table","tbody","thead","tfoot","tr"]),Z9=new Set(["td","th"]),Z1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Kb(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");let r=t.filePath||void 0,o;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");o=i6(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");o=a6(r,t.jsx,t.jsxs)}let n={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:o,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?sh:F1,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Q1(n,e,void 0);return a&&typeof a!="string"?a:n.create(e,n.Fragment,{children:a||void 0},void 0)}function Q1(e,t,r){if(t.type==="element")return Q9(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return e6(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return r6(e,t,r);if(t.type==="mdxjsEsm")return t6(e,t);if(t.type==="root")return o6(e,t,r);if(t.type==="text")return n6(e,t)}function Q9(e,t,r){let o=e.schema,n=o;t.tagName.toLowerCase()==="svg"&&o.space==="html"&&(n=sh,e.schema=n),e.ancestors.push(t);let a=tO(e,t.tagName,!1),i=s6(e,t),s=Xb(e,t);return X9.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!Nb(l):!0})),eO(e,i,a,t),Yb(i,s),e.ancestors.pop(),e.schema=o,e.create(t,a,i,r)}function e6(e,t){if(t.data&&t.data.estree&&e.evaluater){let o=t.data.estree.body[0];return o.type,e.evaluater.evaluateExpression(o.expression)}Yc(e,t.position)}function t6(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Yc(e,t.position)}function r6(e,t,r){let o=e.schema,n=o;t.name==="svg"&&o.space==="html"&&(n=sh,e.schema=n),e.ancestors.push(t);let a=t.name===null?e.Fragment:tO(e,t.name,!0),i=l6(e,t),s=Xb(e,t);return eO(e,i,a,t),Yb(i,s),e.ancestors.pop(),e.schema=o,e.create(t,a,i,r)}function o6(e,t,r){let o={};return Yb(o,Xb(e,t)),e.create(t,e.Fragment,o,r)}function n6(e,t){return t.value}function eO(e,t,r,o){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=o)}function Yb(e,t){if(t.length>0){let r=t.length>1?t:t[0];r&&(e.children=r)}}function a6(e,t,r){return o;function o(n,a,i,s){let p=Array.isArray(i.children)?r:t;return s?p(a,i,s):p(a,i)}}function i6(e,t){return r;function r(o,n,a,i){let s=Array.isArray(a.children),l=Bl(o);return t(n,a,i,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function s6(e,t){let r={},o,n;for(n in t.properties)if(n!=="children"&&qb.call(t.properties,n)){let a=p6(e,n,t.properties[n]);if(a){let[i,s]=a;e.tableCellAlignToStyle&&i==="align"&&typeof s=="string"&&Z9.has(t.tagName)?o=s:r[i]=s}}if(o){let a=r.style||(r.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return r}function l6(e,t){let r={};for(let o of t.attributes)if(o.type==="mdxJsxExpressionAttribute")if(o.data&&o.data.estree&&e.evaluater){let a=o.data.estree.body[0];a.type;let i=a.expression;i.type;let s=i.properties[0];s.type,Object.assign(r,e.evaluater.evaluateExpression(s.argument))}else Yc(e,t.position);else{let n=o.name,a;if(o.value&&typeof o.value=="object")if(o.value.data&&o.value.data.estree&&e.evaluater){let s=o.value.data.estree.body[0];s.type,a=e.evaluater.evaluateExpression(s.expression)}else Yc(e,t.position);else a=o.value===null?!0:o.value;r[n]=a}return r}function Xb(e,t){let r=[],o=-1,n=e.passKeys?new Map:q9;for(;++o<t.children.length;){let a=t.children[o],i;if(e.passKeys){let l=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(l){let p=n.get(l)||0;i=l+"-"+p,n.set(l,p+1)}}let s=Q1(e,a,i);s!==void 0&&r.push(s)}return r}function p6(e,t,r){let o=Hb(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=o.commaSeparated?A1(r):$1(r)),o.property==="style"){let n=typeof r=="object"?r:c6(e,String(r));return e.stylePropertyNameCase==="css"&&(n=u6(n)),["style",n]}return[e.elementAttributeNameCase==="react"&&o.space?Ub[o.property]||o.property:o.attribute,r]}}function c6(e,t){let r={};try{q1(t,o)}catch(n){if(!e.ignoreInvalidStyle){let a=n,i=new Nt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Z1+"#cannot-parse-style-attribute",i}}return r;function o(n,a){let i=n;i.slice(0,2)!=="--"&&(i.slice(0,4)==="-ms-"&&(i="ms-"+i.slice(4)),i=i.replace(Y9,f6)),r[i]=a}}function tO(e,t,r){let o;if(!r)o={type:"Literal",value:t};else if(t.includes(".")){let n=t.split("."),a=-1,i;for(;++a<n.length;){let s=nh(n[a])?{type:"Identifier",name:n[a]}:{type:"Literal",value:n[a]};i=i?{type:"MemberExpression",object:i,property:s,computed:!!(a&&s.type==="Literal"),optional:!1}:s}o=i}else o=nh(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(o.type==="Literal"){let n=o.value;return qb.call(e.components,n)?e.components[n]:n}if(e.evaluater)return e.evaluater.evaluateExpression(o);Yc(e)}function Yc(e,t){let r=new Nt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=Z1+"#cannot-handle-mdx-estrees-without-createevaluater",r}function u6(e){let t={},r;for(r in e)qb.call(e,r)&&(t[d6(r)]=e[r]);return t}function d6(e){let t=e.replace(K9,m6);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function f6(e,t){return t.toUpperCase()}function m6(e){return"-"+e.toLowerCase()}var Xc={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]};import{Fragment as bG,jsx as xG,jsxs as TG}from"react/jsx-runtime";var h6={};function Zb(e,t){let r=t||h6,o=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,n=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return oO(e,o,n)}function oO(e,t,r){if(y6(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return rO(e.children,t,r)}return Array.isArray(e)?rO(e,t,r):""}function rO(e,t,r){let o=[],n=-1;for(;++n<e.length;)o[n]=oO(e[n],t,r);return o.join("")}function y6(e){return!!(e&&typeof e=="object")}var nO=document.createElement("i");function zl(e){let t="&"+e+";";nO.innerHTML=t;let r=nO.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function wr(e,t,r,o){let n=e.length,a=0,i;if(t<0?t=-t>n?0:n+t:t=t>n?n:t,r=r>0?r:0,o.length<1e4)i=Array.from(o),i.unshift(t,r),e.splice(...i);else for(r&&e.splice(t,r);a<o.length;)i=o.slice(a,a+1e4),i.unshift(t,0),e.splice(...i),a+=1e4,t+=1e4}function $r(e,t){return e.length>0?(wr(e,e.length,0,t),e):t}var aO={}.hasOwnProperty;function iO(e){let t={},r=-1;for(;++r<e.length;)g6(t,e[r]);return t}function g6(e,t){let r;for(r in t){let n=(aO.call(e,r)?e[r]:void 0)||(e[r]={}),a=t[r],i;if(a)for(i in a){aO.call(n,i)||(n[i]=[]);let s=a[i];v6(n[i],Array.isArray(s)?s:s?[s]:[])}}}function v6(e,t){let r=-1,o=[];for(;++r<t.length;)(t[r].add==="after"?e:o).push(t[r]);wr(e,0,0,o)}function ph(e,t){let r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"\uFFFD":String.fromCodePoint(r)}function ra(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var po=ri(/[A-Za-z]/),or=ri(/[\dA-Za-z]/),sO=ri(/[#-'*+\--9=?A-Z^-~]/);function Zc(e){return e!==null&&(e<32||e===127)}var Qc=ri(/\d/),lO=ri(/[\dA-Fa-f]/),pO=ri(/[!-/:-@[-`{-~]/);function _e(e){return e!==null&&e<-2}function Lt(e){return e!==null&&(e<0||e===32)}function je(e){return e===-2||e===-1||e===32}var cO=ri(new RegExp("\\p{P}|\\p{S}","u")),uO=ri(/\s/);function ri(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function Lo(e){let t=[],r=-1,o=0,n=0;for(;++r<e.length;){let a=e.charCodeAt(r),i="";if(a===37&&or(e.charCodeAt(r+1))&&or(e.charCodeAt(r+2)))n=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(i=String.fromCharCode(a));else if(a>55295&&a<57344){let s=e.charCodeAt(r+1);a<56320&&s>56319&&s<57344?(i=String.fromCharCode(a,s),n=1):i="\uFFFD"}else i=String.fromCharCode(a);i&&(t.push(e.slice(o,r),encodeURIComponent(i)),o=r+n+1,i=""),n&&(r+=n,n=0)}return t.join("")+e.slice(o)}function Ue(e,t,r,o){let n=o?o-1:Number.POSITIVE_INFINITY,a=0;return i;function i(l){return je(l)?(e.enter(r),s(l)):t(l)}function s(l){return je(l)&&a++<n?(e.consume(l),s):(e.exit(r),t(l))}}var dO={tokenize:b6};function b6(e){let t=e.attempt(this.parser.constructs.contentInitial,o,n),r;return t;function o(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Ue(e,t,"linePrefix")}function n(s){return e.enter("paragraph"),a(s)}function a(s){let l=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=l),r=l,i(s)}function i(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return _e(s)?(e.consume(s),e.exit("chunkText"),a):(e.consume(s),i)}}var mO={tokenize:x6},fO={tokenize:T6};function x6(e){let t=this,r=[],o=0,n,a,i;return s;function s(b){if(o<r.length){let k=r[o];return t.containerState=k[1],e.attempt(k[0].continuation,l,p)(b)}return p(b)}function l(b){if(o++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,n&&x();let k=t.events.length,P=k,T;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){T=t.events[P][1].end;break}g(o);let C=k;for(;C<t.events.length;)t.events[C][1].end=Object.assign({},T),C++;return wr(t.events,P+1,0,t.events.slice(k)),t.events.length=C,p(b)}return s(b)}function p(b){if(o===r.length){if(!n)return f(b);if(n.currentConstruct&&n.currentConstruct.concrete)return h(b);t.interrupt=!!(n.currentConstruct&&!n._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(fO,c,d)(b)}function c(b){return n&&x(),g(o),f(b)}function d(b){return t.parser.lazy[t.now().line]=o!==r.length,i=t.now().offset,h(b)}function f(b){return t.containerState={},e.attempt(fO,u,h)(b)}function u(b){return o++,r.push([t.currentConstruct,t.containerState]),f(b)}function h(b){if(b===null){n&&x(),g(0),e.consume(b);return}return n=n||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:a,_tokenizer:n}),y(b)}function y(b){if(b===null){v(e.exit("chunkFlow"),!0),g(0),e.consume(b);return}return _e(b)?(e.consume(b),v(e.exit("chunkFlow")),o=0,t.interrupt=void 0,s):(e.consume(b),y)}function v(b,k){let P=t.sliceStream(b);if(k&&P.push(null),b.previous=a,a&&(a.next=b),a=b,n.defineSkip(b.start),n.write(P),t.parser.lazy[b.start.line]){let T=n.events.length;for(;T--;)if(n.events[T][1].start.offset<i&&(!n.events[T][1].end||n.events[T][1].end.offset>i))return;let C=t.events.length,S=C,I,O;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){if(I){O=t.events[S][1].end;break}I=!0}for(g(o),T=C;T<t.events.length;)t.events[T][1].end=Object.assign({},O),T++;wr(t.events,S+1,0,t.events.slice(C)),t.events.length=T}}function g(b){let k=r.length;for(;k-- >b;){let P=r[k];t.containerState=P[1],P[0].exit.call(t,e)}r.length=b}function x(){n.write([null]),a=void 0,n=void 0,t.containerState._closeFlow=void 0}}function T6(e,t,r){return Ue(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Qb(e){if(e===null||Lt(e)||uO(e))return 1;if(cO(e))return 2}function Fl(e,t,r){let o=[],n=-1;for(;++n<e.length;){let a=e[n].resolveAll;a&&!o.includes(a)&&(t=a(t,r),o.push(a))}return t}var eu={name:"attention",tokenize:C6,resolveAll:P6};function P6(e,t){let r=-1,o,n,a,i,s,l,p,c;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(o=r;o--;)if(e[o][0]==="exit"&&e[o][1].type==="attentionSequence"&&e[o][1]._open&&t.sliceSerialize(e[o][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[o][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[o][1].end.offset-e[o][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;l=e[o][1].end.offset-e[o][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;let d=Object.assign({},e[o][1].end),f=Object.assign({},e[r][1].start);hO(d,-l),hO(f,l),i={type:l>1?"strongSequence":"emphasisSequence",start:d,end:Object.assign({},e[o][1].end)},s={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[r][1].start),end:f},a={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[o][1].end),end:Object.assign({},e[r][1].start)},n={type:l>1?"strong":"emphasis",start:Object.assign({},i.start),end:Object.assign({},s.end)},e[o][1].end=Object.assign({},i.start),e[r][1].start=Object.assign({},s.end),p=[],e[o][1].end.offset-e[o][1].start.offset&&(p=$r(p,[["enter",e[o][1],t],["exit",e[o][1],t]])),p=$r(p,[["enter",n,t],["enter",i,t],["exit",i,t],["enter",a,t]]),p=$r(p,Fl(t.parser.constructs.insideSpan.null,e.slice(o+1,r),t)),p=$r(p,[["exit",a,t],["enter",s,t],["exit",s,t],["exit",n,t]]),e[r][1].end.offset-e[r][1].start.offset?(c=2,p=$r(p,[["enter",e[r][1],t],["exit",e[r][1],t]])):c=0,wr(e,o-1,r-o+3,p),r=o+p.length-c-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function C6(e,t){let r=this.parser.constructs.attentionMarkers.null,o=this.previous,n=Qb(o),a;return i;function i(l){return a=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===a)return e.consume(l),s;let p=e.exit("attentionSequence"),c=Qb(l),d=!c||c===2&&n||r.includes(l),f=!n||n===2&&c||r.includes(o);return p._open=!!(a===42?d:d&&(n||!f)),p._close=!!(a===42?f:f&&(c||!d)),t(l)}}function hO(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var ex={name:"autolink",tokenize:k6};function k6(e,t,r){let o=0;return n;function n(u){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(u),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(u){return po(u)?(e.consume(u),i):p(u)}function i(u){return u===43||u===45||u===46||or(u)?(o=1,s(u)):p(u)}function s(u){return u===58?(e.consume(u),o=0,l):(u===43||u===45||u===46||or(u))&&o++<32?(e.consume(u),s):(o=0,p(u))}function l(u){return u===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(u),e.exit("autolinkMarker"),e.exit("autolink"),t):u===null||u===32||u===60||Zc(u)?r(u):(e.consume(u),l)}function p(u){return u===64?(e.consume(u),c):sO(u)?(e.consume(u),p):r(u)}function c(u){return or(u)?d(u):r(u)}function d(u){return u===46?(e.consume(u),o=0,c):u===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(u),e.exit("autolinkMarker"),e.exit("autolink"),t):f(u)}function f(u){if((u===45||or(u))&&o++<63){let h=u===45?f:d;return e.consume(u),h}return r(u)}}var oi={tokenize:S6,partial:!0};function S6(e,t,r){return o;function o(a){return je(a)?Ue(e,n,"linePrefix")(a):n(a)}function n(a){return a===null||_e(a)?t(a):r(a)}}var ch={name:"blockQuote",tokenize:R6,continuation:{tokenize:E6},exit:I6};function R6(e,t,r){let o=this;return n;function n(i){if(i===62){let s=o.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(i),e.exit("blockQuoteMarker"),a}return r(i)}function a(i){return je(i)?(e.enter("blockQuotePrefixWhitespace"),e.consume(i),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(i))}}function E6(e,t,r){let o=this;return n;function n(i){return je(i)?Ue(e,a,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i):a(i)}function a(i){return e.attempt(ch,t,r)(i)}}function I6(e){e.exit("blockQuote")}var uh={name:"characterEscape",tokenize:O6};function O6(e,t,r){return o;function o(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),n}function n(a){return pO(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(a)}}var dh={name:"characterReference",tokenize:_6};function _6(e,t,r){let o=this,n=0,a,i;return s;function s(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),a=31,i=or,c(d))}function p(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,i=lO,c):(e.enter("characterReferenceValue"),a=7,i=Qc,c(d))}function c(d){if(d===59&&n){let f=e.exit("characterReferenceValue");return i===or&&!zl(o.sliceSerialize(f))?r(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return i(d)&&n++<a?(e.consume(d),c):r(d)}}var yO={tokenize:D6,partial:!0},fh={name:"codeFenced",tokenize:w6,concrete:!0};function w6(e,t,r){let o=this,n={tokenize:P,partial:!0},a=0,i=0,s;return l;function l(T){return p(T)}function p(T){let C=o.events[o.events.length-1];return a=C&&C[1].type==="linePrefix"?C[2].sliceSerialize(C[1],!0).length:0,s=T,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(T)}function c(T){return T===s?(i++,e.consume(T),c):i<3?r(T):(e.exit("codeFencedFenceSequence"),je(T)?Ue(e,d,"whitespace")(T):d(T))}function d(T){return T===null||_e(T)?(e.exit("codeFencedFence"),o.interrupt?t(T):e.check(yO,y,k)(T)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(T))}function f(T){return T===null||_e(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(T)):je(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ue(e,u,"whitespace")(T)):T===96&&T===s?r(T):(e.consume(T),f)}function u(T){return T===null||_e(T)?d(T):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(T))}function h(T){return T===null||_e(T)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(T)):T===96&&T===s?r(T):(e.consume(T),h)}function y(T){return e.attempt(n,k,v)(T)}function v(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),g}function g(T){return a>0&&je(T)?Ue(e,x,"linePrefix",a+1)(T):x(T)}function x(T){return T===null||_e(T)?e.check(yO,y,k)(T):(e.enter("codeFlowValue"),b(T))}function b(T){return T===null||_e(T)?(e.exit("codeFlowValue"),x(T)):(e.consume(T),b)}function k(T){return e.exit("codeFenced"),t(T)}function P(T,C,S){let I=0;return O;function O(N){return T.enter("lineEnding"),T.consume(N),T.exit("lineEnding"),L}function L(N){return T.enter("codeFencedFence"),je(N)?Ue(T,M,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):M(N)}function M(N){return N===s?(T.enter("codeFencedFenceSequence"),w(N)):S(N)}function w(N){return N===s?(I++,T.consume(N),w):I>=i?(T.exit("codeFencedFenceSequence"),je(N)?Ue(T,H,"whitespace")(N):H(N)):S(N)}function H(N){return N===null||_e(N)?(T.exit("codeFencedFence"),C(N)):S(N)}}}function D6(e,t,r){let o=this;return n;function n(i){return i===null?r(i):(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),a)}function a(i){return o.parser.lazy[o.now().line]?r(i):t(i)}}var tu={name:"codeIndented",tokenize:M6},A6={tokenize:N6,partial:!0};function M6(e,t,r){let o=this;return n;function n(p){return e.enter("codeIndented"),Ue(e,a,"linePrefix",5)(p)}function a(p){let c=o.events[o.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?i(p):r(p)}function i(p){return p===null?l(p):_e(p)?e.attempt(A6,i,l)(p):(e.enter("codeFlowValue"),s(p))}function s(p){return p===null||_e(p)?(e.exit("codeFlowValue"),i(p)):(e.consume(p),s)}function l(p){return e.exit("codeIndented"),t(p)}}function N6(e,t,r){let o=this;return n;function n(i){return o.parser.lazy[o.now().line]?r(i):_e(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n):Ue(e,a,"linePrefix",5)(i)}function a(i){let s=o.events[o.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(i):_e(i)?n(i):r(i)}}var tx={name:"codeText",tokenize:z6,resolve:L6,previous:B6};function L6(e){let t=e.length-4,r=3,o,n;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(o=r;++o<t;)if(e[o][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(o=r-1,t++;++o<=t;)n===void 0?o!==t&&e[o][1].type!=="lineEnding"&&(n=o):(o===t||e[o][1].type==="lineEnding")&&(e[n][1].type="codeTextData",o!==n+2&&(e[n][1].end=e[o-1][1].end,e.splice(n+2,o-n-2),t-=o-n-2,o=n+2),n=void 0);return e}function B6(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function z6(e,t,r){let o=this,n=0,a,i;return s;function s(f){return e.enter("codeText"),e.enter("codeTextSequence"),l(f)}function l(f){return f===96?(e.consume(f),n++,l):(e.exit("codeTextSequence"),p(f))}function p(f){return f===null?r(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),p):f===96?(i=e.enter("codeTextSequence"),a=0,d(f)):_e(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),p):(e.enter("codeTextData"),c(f))}function c(f){return f===null||f===32||f===96||_e(f)?(e.exit("codeTextData"),p(f)):(e.consume(f),c)}function d(f){return f===96?(e.consume(f),a++,d):a===n?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(i.type="codeTextData",c(f))}}var mh=class{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,r){let o=r==null?Number.POSITIVE_INFINITY:r;return o<this.left.length?this.left.slice(t,o):t>this.left.length?this.right.slice(this.right.length-o+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-o+this.left.length).reverse())}splice(t,r,o){let n=r||0;this.setCursor(Math.trunc(t));let a=this.right.splice(this.right.length-n,Number.POSITIVE_INFINITY);return o&&ru(this.left,o),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),ru(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ru(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){let r=this.left.splice(t,Number.POSITIVE_INFINITY);ru(this.right,r.reverse())}else{let r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ru(this.left,r.reverse())}}};function ru(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function hh(e){let t={},r=-1,o,n,a,i,s,l,p,c=new mh(e);for(;++r<c.length;){for(;r in t;)r=t[r];if(o=c.get(r),r&&o[1].type==="chunkFlow"&&c.get(r-1)[1].type==="listItemPrefix"&&(l=o[1]._tokenizer.events,a=0,a<l.length&&l[a][1].type==="lineEndingBlank"&&(a+=2),a<l.length&&l[a][1].type==="content"))for(;++a<l.length&&l[a][1].type!=="content";)l[a][1].type==="chunkText"&&(l[a][1]._isInFirstContentOfListItem=!0,a++);if(o[0]==="enter")o[1].contentType&&(Object.assign(t,F6(c,r)),r=t[r],p=!0);else if(o[1]._container){for(a=r,n=void 0;a--&&(i=c.get(a),i[1].type==="lineEnding"||i[1].type==="lineEndingBlank");)i[0]==="enter"&&(n&&(c.get(n)[1].type="lineEndingBlank"),i[1].type="lineEnding",n=a);n&&(o[1].end=Object.assign({},c.get(n)[1].start),s=c.slice(n,r),s.unshift(o),c.splice(n,r-n+1,s))}}return wr(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!p}function F6(e,t){let r=e.get(t)[1],o=e.get(t)[2],n=t-1,a=[],i=r._tokenizer||o.parser[r.contentType](r.start),s=i.events,l=[],p={},c,d,f=-1,u=r,h=0,y=0,v=[y];for(;u;){for(;e.get(++n)[1]!==u;);a.push(n),u._tokenizer||(c=o.sliceStream(u),u.next||c.push(null),d&&i.defineSkip(u.start),u._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(c),u._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),d=u,u=u.next}for(u=r;++f<s.length;)s[f][0]==="exit"&&s[f-1][0]==="enter"&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(y=f+1,v.push(y),u._tokenizer=void 0,u.previous=void 0,u=u.next);for(i.events=[],u?(u._tokenizer=void 0,u.previous=void 0):v.pop(),f=v.length;f--;){let g=s.slice(v[f],v[f+1]),x=a.pop();l.push([x,x+g.length-1]),e.splice(x,2,g)}for(l.reverse(),f=-1;++f<l.length;)p[h+l[f][0]]=h+l[f][1],h+=l[f][1]-l[f][0]-1;return p}var rx={tokenize:j6,resolve:V6},$6={tokenize:H6,partial:!0};function V6(e){return hh(e),e}function j6(e,t){let r;return o;function o(s){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),n(s)}function n(s){return s===null?a(s):_e(s)?e.check($6,i,a)(s):(e.consume(s),n)}function a(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function i(s){return e.consume(s),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,n}}function H6(e,t,r){let o=this;return n;function n(i){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Ue(e,a,"linePrefix")}function a(i){if(i===null||_e(i))return r(i);let s=o.events[o.events.length-1];return!o.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(i):e.interrupt(o.parser.constructs.flow,r,t)(i)}}function yh(e,t,r,o,n,a,i,s,l){let p=l||Number.POSITIVE_INFINITY,c=0;return d;function d(g){return g===60?(e.enter(o),e.enter(n),e.enter(a),e.consume(g),e.exit(a),f):g===null||g===32||g===41||Zc(g)?r(g):(e.enter(o),e.enter(i),e.enter(s),e.enter("chunkString",{contentType:"string"}),y(g))}function f(g){return g===62?(e.enter(a),e.consume(g),e.exit(a),e.exit(n),e.exit(o),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),u(g))}function u(g){return g===62?(e.exit("chunkString"),e.exit(s),f(g)):g===null||g===60||_e(g)?r(g):(e.consume(g),g===92?h:u)}function h(g){return g===60||g===62||g===92?(e.consume(g),u):u(g)}function y(g){return!c&&(g===null||g===41||Lt(g))?(e.exit("chunkString"),e.exit(s),e.exit(i),e.exit(o),t(g)):c<p&&g===40?(e.consume(g),c++,y):g===41?(e.consume(g),c--,y):g===null||g===32||g===40||Zc(g)?r(g):(e.consume(g),g===92?v:y)}function v(g){return g===40||g===41||g===92?(e.consume(g),y):y(g)}}function gh(e,t,r,o,n,a){let i=this,s=0,l;return p;function p(u){return e.enter(o),e.enter(n),e.consume(u),e.exit(n),e.enter(a),c}function c(u){return s>999||u===null||u===91||u===93&&!l||u===94&&!s&&"_hiddenFootnoteSupport"in i.parser.constructs?r(u):u===93?(e.exit(a),e.enter(n),e.consume(u),e.exit(n),e.exit(o),t):_e(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(u))}function d(u){return u===null||u===91||u===93||_e(u)||s++>999?(e.exit("chunkString"),c(u)):(e.consume(u),l||(l=!je(u)),u===92?f:d)}function f(u){return u===91||u===92||u===93?(e.consume(u),s++,d):d(u)}}function vh(e,t,r,o,n,a){let i;return s;function s(f){return f===34||f===39||f===40?(e.enter(o),e.enter(n),e.consume(f),e.exit(n),i=f===40?41:f,l):r(f)}function l(f){return f===i?(e.enter(n),e.consume(f),e.exit(n),e.exit(o),t):(e.enter(a),p(f))}function p(f){return f===i?(e.exit(a),l(i)):f===null?r(f):_e(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Ue(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(f){return f===i||f===null||_e(f)?(e.exit("chunkString"),p(f)):(e.consume(f),f===92?d:c)}function d(f){return f===i||f===92?(e.consume(f),c):c(f)}}function os(e,t){let r;return o;function o(n){return _e(n)?(e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),r=!0,o):je(n)?Ue(e,o,r?"linePrefix":"lineSuffix")(n):t(n)}}var ox={name:"definition",tokenize:W6},U6={tokenize:G6,partial:!0};function W6(e,t,r){let o=this,n;return a;function a(u){return e.enter("definition"),i(u)}function i(u){return gh.call(o,e,s,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(u)}function s(u){return n=ra(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),u===58?(e.enter("definitionMarker"),e.consume(u),e.exit("definitionMarker"),l):r(u)}function l(u){return Lt(u)?os(e,p)(u):p(u)}function p(u){return yh(e,c,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(u)}function c(u){return e.attempt(U6,d,d)(u)}function d(u){return je(u)?Ue(e,f,"whitespace")(u):f(u)}function f(u){return u===null||_e(u)?(e.exit("definition"),o.parser.defined.push(n),t(u)):r(u)}}function G6(e,t,r){return o;function o(s){return Lt(s)?os(e,n)(s):r(s)}function n(s){return vh(e,a,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return je(s)?Ue(e,i,"whitespace")(s):i(s)}function i(s){return s===null||_e(s)?t(s):r(s)}}var nx={name:"hardBreakEscape",tokenize:J6};function J6(e,t,r){return o;function o(a){return e.enter("hardBreakEscape"),e.consume(a),n}function n(a){return _e(a)?(e.exit("hardBreakEscape"),t(a)):r(a)}}var ax={name:"headingAtx",tokenize:K6,resolve:q6};function q6(e,t){let r=e.length-2,o=3,n,a;return e[o][1].type==="whitespace"&&(o+=2),r-2>o&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(o===r-1||r-4>o&&e[r-2][1].type==="whitespace")&&(r-=o+1===r?2:4),r>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[r][1].end},a={type:"chunkText",start:e[o][1].start,end:e[r][1].end,contentType:"text"},wr(e,o,r-o+1,[["enter",n,t],["enter",a,t],["exit",a,t],["exit",n,t]])),e}function K6(e,t,r){let o=0;return n;function n(c){return e.enter("atxHeading"),a(c)}function a(c){return e.enter("atxHeadingSequence"),i(c)}function i(c){return c===35&&o++<6?(e.consume(c),i):c===null||Lt(c)?(e.exit("atxHeadingSequence"),s(c)):r(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||_e(c)?(e.exit("atxHeading"),t(c)):je(c)?Ue(e,s,"whitespace")(c):(e.enter("atxHeadingText"),p(c))}function l(c){return c===35?(e.consume(c),l):(e.exit("atxHeadingSequence"),s(c))}function p(c){return c===null||c===35||Lt(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),p)}}var gO=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],ix=["pre","script","style","textarea"];var sx={name:"htmlFlow",tokenize:Q6,resolveTo:Z6,concrete:!0},Y6={tokenize:t7,partial:!0},X6={tokenize:e7,partial:!0};function Z6(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Q6(e,t,r){let o=this,n,a,i,s,l;return p;function p(_){return c(_)}function c(_){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(_),d}function d(_){return _===33?(e.consume(_),f):_===47?(e.consume(_),a=!0,y):_===63?(e.consume(_),n=3,o.interrupt?t:R):po(_)?(e.consume(_),i=String.fromCharCode(_),v):r(_)}function f(_){return _===45?(e.consume(_),n=2,u):_===91?(e.consume(_),n=5,s=0,h):po(_)?(e.consume(_),n=4,o.interrupt?t:R):r(_)}function u(_){return _===45?(e.consume(_),o.interrupt?t:R):r(_)}function h(_){let pe="CDATA[";return _===pe.charCodeAt(s++)?(e.consume(_),s===pe.length?o.interrupt?t:M:h):r(_)}function y(_){return po(_)?(e.consume(_),i=String.fromCharCode(_),v):r(_)}function v(_){if(_===null||_===47||_===62||Lt(_)){let pe=_===47,ge=i.toLowerCase();return!pe&&!a&&ix.includes(ge)?(n=1,o.interrupt?t(_):M(_)):gO.includes(i.toLowerCase())?(n=6,pe?(e.consume(_),g):o.interrupt?t(_):M(_)):(n=7,o.interrupt&&!o.parser.lazy[o.now().line]?r(_):a?x(_):b(_))}return _===45||or(_)?(e.consume(_),i+=String.fromCharCode(_),v):r(_)}function g(_){return _===62?(e.consume(_),o.interrupt?t:M):r(_)}function x(_){return je(_)?(e.consume(_),x):O(_)}function b(_){return _===47?(e.consume(_),O):_===58||_===95||po(_)?(e.consume(_),k):je(_)?(e.consume(_),b):O(_)}function k(_){return _===45||_===46||_===58||_===95||or(_)?(e.consume(_),k):P(_)}function P(_){return _===61?(e.consume(_),T):je(_)?(e.consume(_),P):b(_)}function T(_){return _===null||_===60||_===61||_===62||_===96?r(_):_===34||_===39?(e.consume(_),l=_,C):je(_)?(e.consume(_),T):S(_)}function C(_){return _===l?(e.consume(_),l=null,I):_===null||_e(_)?r(_):(e.consume(_),C)}function S(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||Lt(_)?P(_):(e.consume(_),S)}function I(_){return _===47||_===62||je(_)?b(_):r(_)}function O(_){return _===62?(e.consume(_),L):r(_)}function L(_){return _===null||_e(_)?M(_):je(_)?(e.consume(_),L):r(_)}function M(_){return _===45&&n===2?(e.consume(_),D):_===60&&n===1?(e.consume(_),z):_===62&&n===4?(e.consume(_),ee):_===63&&n===3?(e.consume(_),R):_===93&&n===5?(e.consume(_),V):_e(_)&&(n===6||n===7)?(e.exit("htmlFlowData"),e.check(Y6,ne,w)(_)):_===null||_e(_)?(e.exit("htmlFlowData"),w(_)):(e.consume(_),M)}function w(_){return e.check(X6,H,ne)(_)}function H(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),N}function N(_){return _===null||_e(_)?w(_):(e.enter("htmlFlowData"),M(_))}function D(_){return _===45?(e.consume(_),R):M(_)}function z(_){return _===47?(e.consume(_),i="",Y):M(_)}function Y(_){if(_===62){let pe=i.toLowerCase();return ix.includes(pe)?(e.consume(_),ee):M(_)}return po(_)&&i.length<8?(e.consume(_),i+=String.fromCharCode(_),Y):M(_)}function V(_){return _===93?(e.consume(_),R):M(_)}function R(_){return _===62?(e.consume(_),ee):_===45&&n===2?(e.consume(_),R):M(_)}function ee(_){return _===null||_e(_)?(e.exit("htmlFlowData"),ne(_)):(e.consume(_),ee)}function ne(_){return e.exit("htmlFlow"),t(_)}}function e7(e,t,r){let o=this;return n;function n(i){return _e(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),a):r(i)}function a(i){return o.parser.lazy[o.now().line]?r(i):t(i)}}function t7(e,t,r){return o;function o(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),e.attempt(oi,t,r)}}var lx={name:"htmlText",tokenize:r7};function r7(e,t,r){let o=this,n,a,i;return s;function s(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),l}function l(R){return R===33?(e.consume(R),p):R===47?(e.consume(R),P):R===63?(e.consume(R),b):po(R)?(e.consume(R),S):r(R)}function p(R){return R===45?(e.consume(R),c):R===91?(e.consume(R),a=0,h):po(R)?(e.consume(R),x):r(R)}function c(R){return R===45?(e.consume(R),u):r(R)}function d(R){return R===null?r(R):R===45?(e.consume(R),f):_e(R)?(i=d,z(R)):(e.consume(R),d)}function f(R){return R===45?(e.consume(R),u):d(R)}function u(R){return R===62?D(R):R===45?f(R):d(R)}function h(R){let ee="CDATA[";return R===ee.charCodeAt(a++)?(e.consume(R),a===ee.length?y:h):r(R)}function y(R){return R===null?r(R):R===93?(e.consume(R),v):_e(R)?(i=y,z(R)):(e.consume(R),y)}function v(R){return R===93?(e.consume(R),g):y(R)}function g(R){return R===62?D(R):R===93?(e.consume(R),g):y(R)}function x(R){return R===null||R===62?D(R):_e(R)?(i=x,z(R)):(e.consume(R),x)}function b(R){return R===null?r(R):R===63?(e.consume(R),k):_e(R)?(i=b,z(R)):(e.consume(R),b)}function k(R){return R===62?D(R):b(R)}function P(R){return po(R)?(e.consume(R),T):r(R)}function T(R){return R===45||or(R)?(e.consume(R),T):C(R)}function C(R){return _e(R)?(i=C,z(R)):je(R)?(e.consume(R),C):D(R)}function S(R){return R===45||or(R)?(e.consume(R),S):R===47||R===62||Lt(R)?I(R):r(R)}function I(R){return R===47?(e.consume(R),D):R===58||R===95||po(R)?(e.consume(R),O):_e(R)?(i=I,z(R)):je(R)?(e.consume(R),I):D(R)}function O(R){return R===45||R===46||R===58||R===95||or(R)?(e.consume(R),O):L(R)}function L(R){return R===61?(e.consume(R),M):_e(R)?(i=L,z(R)):je(R)?(e.consume(R),L):I(R)}function M(R){return R===null||R===60||R===61||R===62||R===96?r(R):R===34||R===39?(e.consume(R),n=R,w):_e(R)?(i=M,z(R)):je(R)?(e.consume(R),M):(e.consume(R),H)}function w(R){return R===n?(e.consume(R),n=void 0,N):R===null?r(R):_e(R)?(i=w,z(R)):(e.consume(R),w)}function H(R){return R===null||R===34||R===39||R===60||R===61||R===96?r(R):R===47||R===62||Lt(R)?I(R):(e.consume(R),H)}function N(R){return R===47||R===62||Lt(R)?I(R):r(R)}function D(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),t):r(R)}function z(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),Y}function Y(R){return je(R)?Ue(e,V,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):V(R)}function V(R){return e.enter("htmlTextData"),i(R)}}var ns={name:"labelEnd",tokenize:l7,resolveTo:s7,resolveAll:i7},o7={tokenize:p7},n7={tokenize:c7},a7={tokenize:u7};function i7(e){let t=-1;for(;++t<e.length;){let r=e[t][1];(r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd")&&(e.splice(t+1,r.type==="labelImage"?4:2),r.type="data",t++)}return e}function s7(e,t){let r=e.length,o=0,n,a,i,s;for(;r--;)if(n=e[r][1],a){if(n.type==="link"||n.type==="labelLink"&&n._inactive)break;e[r][0]==="enter"&&n.type==="labelLink"&&(n._inactive=!0)}else if(i){if(e[r][0]==="enter"&&(n.type==="labelImage"||n.type==="labelLink")&&!n._balanced&&(a=r,n.type!=="labelLink")){o=2;break}}else n.type==="labelEnd"&&(i=r);let l={type:e[a][1].type==="labelLink"?"link":"image",start:Object.assign({},e[a][1].start),end:Object.assign({},e[e.length-1][1].end)},p={type:"label",start:Object.assign({},e[a][1].start),end:Object.assign({},e[i][1].end)},c={type:"labelText",start:Object.assign({},e[a+o+2][1].end),end:Object.assign({},e[i-2][1].start)};return s=[["enter",l,t],["enter",p,t]],s=$r(s,e.slice(a+1,a+o+3)),s=$r(s,[["enter",c,t]]),s=$r(s,Fl(t.parser.constructs.insideSpan.null,e.slice(a+o+4,i-3),t)),s=$r(s,[["exit",c,t],e[i-2],e[i-1],["exit",p,t]]),s=$r(s,e.slice(i+1)),s=$r(s,[["exit",l,t]]),wr(e,a,e.length,s),e}function l7(e,t,r){let o=this,n=o.events.length,a,i;for(;n--;)if((o.events[n][1].type==="labelImage"||o.events[n][1].type==="labelLink")&&!o.events[n][1]._balanced){a=o.events[n][1];break}return s;function s(f){return a?a._inactive?d(f):(i=o.parser.defined.includes(ra(o.sliceSerialize({start:a.end,end:o.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),l):r(f)}function l(f){return f===40?e.attempt(o7,c,i?c:d)(f):f===91?e.attempt(n7,c,i?p:d)(f):i?c(f):d(f)}function p(f){return e.attempt(a7,c,d)(f)}function c(f){return t(f)}function d(f){return a._balanced=!0,r(f)}}function p7(e,t,r){return o;function o(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),n}function n(d){return Lt(d)?os(e,a)(d):a(d)}function a(d){return d===41?c(d):yh(e,i,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function i(d){return Lt(d)?os(e,l)(d):c(d)}function s(d){return r(d)}function l(d){return d===34||d===39||d===40?vh(e,p,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function p(d){return Lt(d)?os(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):r(d)}}function c7(e,t,r){let o=this;return n;function n(s){return gh.call(o,e,a,i,"reference","referenceMarker","referenceString")(s)}function a(s){return o.parser.defined.includes(ra(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?t(s):r(s)}function i(s){return r(s)}}function u7(e,t,r){return o;function o(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),n}function n(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):r(a)}}var px={name:"labelStartImage",tokenize:d7,resolveAll:ns.resolveAll};function d7(e,t,r){let o=this;return n;function n(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),a}function a(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),i):r(s)}function i(s){return s===94&&"_hiddenFootnoteSupport"in o.parser.constructs?r(s):t(s)}}var cx={name:"labelStartLink",tokenize:f7,resolveAll:ns.resolveAll};function f7(e,t,r){let o=this;return n;function n(i){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(i),e.exit("labelMarker"),e.exit("labelLink"),a}function a(i){return i===94&&"_hiddenFootnoteSupport"in o.parser.constructs?r(i):t(i)}}var ou={name:"lineEnding",tokenize:m7};function m7(e,t){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Ue(e,t,"linePrefix")}}var as={name:"thematicBreak",tokenize:h7};function h7(e,t,r){let o=0,n;return a;function a(p){return e.enter("thematicBreak"),i(p)}function i(p){return n=p,s(p)}function s(p){return p===n?(e.enter("thematicBreakSequence"),l(p)):o>=3&&(p===null||_e(p))?(e.exit("thematicBreak"),t(p)):r(p)}function l(p){return p===n?(e.consume(p),o++,l):(e.exit("thematicBreakSequence"),je(p)?Ue(e,s,"whitespace")(p):s(p))}}var Dr={name:"list",tokenize:v7,continuation:{tokenize:b7},exit:T7},y7={tokenize:P7,partial:!0},g7={tokenize:x7,partial:!0};function v7(e,t,r){let o=this,n=o.events[o.events.length-1],a=n&&n[1].type==="linePrefix"?n[2].sliceSerialize(n[1],!0).length:0,i=0;return s;function s(u){let h=o.containerState.type||(u===42||u===43||u===45?"listUnordered":"listOrdered");if(h==="listUnordered"?!o.containerState.marker||u===o.containerState.marker:Qc(u)){if(o.containerState.type||(o.containerState.type=h,e.enter(h,{_container:!0})),h==="listUnordered")return e.enter("listItemPrefix"),u===42||u===45?e.check(as,r,p)(u):p(u);if(!o.interrupt||u===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(u)}return r(u)}function l(u){return Qc(u)&&++i<10?(e.consume(u),l):(!o.interrupt||i<2)&&(o.containerState.marker?u===o.containerState.marker:u===41||u===46)?(e.exit("listItemValue"),p(u)):r(u)}function p(u){return e.enter("listItemMarker"),e.consume(u),e.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||u,e.check(oi,o.interrupt?r:c,e.attempt(y7,f,d))}function c(u){return o.containerState.initialBlankLine=!0,a++,f(u)}function d(u){return je(u)?(e.enter("listItemPrefixWhitespace"),e.consume(u),e.exit("listItemPrefixWhitespace"),f):r(u)}function f(u){return o.containerState.size=a+o.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(u)}}function b7(e,t,r){let o=this;return o.containerState._closeFlow=void 0,e.check(oi,n,a);function n(s){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,Ue(e,t,"listItemIndent",o.containerState.size+1)(s)}function a(s){return o.containerState.furtherBlankLines||!je(s)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,i(s)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,e.attempt(g7,t,i)(s))}function i(s){return o.containerState._closeFlow=!0,o.interrupt=void 0,Ue(e,e.attempt(Dr,t,r),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function x7(e,t,r){let o=this;return Ue(e,n,"listItemIndent",o.containerState.size+1);function n(a){let i=o.events[o.events.length-1];return i&&i[1].type==="listItemIndent"&&i[2].sliceSerialize(i[1],!0).length===o.containerState.size?t(a):r(a)}}function T7(e){e.exit(this.containerState.type)}function P7(e,t,r){let o=this;return Ue(e,n,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function n(a){let i=o.events[o.events.length-1];return!je(a)&&i&&i[1].type==="listItemPrefixWhitespace"?t(a):r(a)}}var bh={name:"setextUnderline",tokenize:k7,resolveTo:C7};function C7(e,t){let r=e.length,o,n,a;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){o=r;break}e[r][1].type==="paragraph"&&(n=r)}else e[r][1].type==="content"&&e.splice(r,1),!a&&e[r][1].type==="definition"&&(a=r);let i={type:"setextHeading",start:Object.assign({},e[n][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[n][1].type="setextHeadingText",a?(e.splice(n,0,["enter",i,t]),e.splice(a+1,0,["exit",e[o][1],t]),e[o][1].end=Object.assign({},e[a][1].end)):e[o][1]=i,e.push(["exit",i,t]),e}function k7(e,t,r){let o=this,n;return a;function a(p){let c=o.events.length,d;for(;c--;)if(o.events[c][1].type!=="lineEnding"&&o.events[c][1].type!=="linePrefix"&&o.events[c][1].type!=="content"){d=o.events[c][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||d)?(e.enter("setextHeadingLine"),n=p,i(p)):r(p)}function i(p){return e.enter("setextHeadingLineSequence"),s(p)}function s(p){return p===n?(e.consume(p),s):(e.exit("setextHeadingLineSequence"),je(p)?Ue(e,l,"lineSuffix")(p):l(p))}function l(p){return p===null||_e(p)?(e.exit("setextHeadingLine"),t(p)):r(p)}}var vO={tokenize:S7};function S7(e){let t=this,r=e.attempt(oi,o,e.attempt(this.parser.constructs.flowInitial,n,Ue(e,e.attempt(this.parser.constructs.flow,n,e.attempt(rx,n)),"linePrefix")));return r;function o(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function n(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,r}}var bO={resolveAll:CO()},xO=PO("string"),TO=PO("text");function PO(e){return{tokenize:t,resolveAll:CO(e==="text"?R7:void 0)};function t(r){let o=this,n=this.parser.constructs[e],a=r.attempt(n,i,s);return i;function i(c){return p(c)?a(c):s(c)}function s(c){if(c===null){r.consume(c);return}return r.enter("data"),r.consume(c),l}function l(c){return p(c)?(r.exit("data"),a(c)):(r.consume(c),l)}function p(c){if(c===null)return!0;let d=n[c],f=-1;if(d)for(;++f<d.length;){let u=d[f];if(!u.previous||u.previous.call(o,o.previous))return!0}return!1}}}function CO(e){return t;function t(r,o){let n=-1,a;for(;++n<=r.length;)a===void 0?r[n]&&r[n][1].type==="data"&&(a=n,n++):(!r[n]||r[n][1].type!=="data")&&(n!==a+2&&(r[a][1].end=r[n-1][1].end,r.splice(a+2,n-a-2),n=a+2),a=void 0);return e?e(r,o):r}}function R7(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){let o=e[r-1][1],n=t.sliceStream(o),a=n.length,i=-1,s=0,l;for(;a--;){let p=n[a];if(typeof p=="string"){for(i=p.length;p.charCodeAt(i-1)===32;)s++,i--;if(i)break;i=-1}else if(p===-2)l=!0,s++;else if(p!==-1){a++;break}}if(s){let p={type:r===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{line:o.end.line,column:o.end.column-s,offset:o.end.offset-s,_index:o.start._index+a,_bufferIndex:a?i:o.start._bufferIndex+i},end:Object.assign({},o.end)};o.end=Object.assign({},p.start),o.start.offset===o.end.offset?Object.assign(o,p):(e.splice(r,0,["enter",p,t],["exit",p,t]),r+=2)}r++}return e}function kO(e,t,r){let o=Object.assign(r?Object.assign({},r):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1}),n={},a=[],i=[],s=[],l=!0,p={consume:k,enter:P,exit:T,attempt:I(C),check:I(S),interrupt:I(S,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:y,sliceSerialize:h,now:v,defineSkip:g,write:u},d=t.tokenize.call(c,p),f;return t.resolveAll&&a.push(t),c;function u(w){return i=$r(i,w),x(),i[i.length-1]!==null?[]:(O(t,0),c.events=Fl(a,c.events,c),c.events)}function h(w,H){return I7(y(w),H)}function y(w){return E7(i,w)}function v(){let{line:w,column:H,offset:N,_index:D,_bufferIndex:z}=o;return{line:w,column:H,offset:N,_index:D,_bufferIndex:z}}function g(w){n[w.line]=w.column,M()}function x(){let w;for(;o._index<i.length;){let H=i[o._index];if(typeof H=="string")for(w=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===w&&o._bufferIndex<H.length;)b(H.charCodeAt(o._bufferIndex));else b(H)}}function b(w){l=void 0,f=w,d=d(w)}function k(w){_e(w)?(o.line++,o.column=1,o.offset+=w===-3?2:1,M()):w!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===i[o._index].length&&(o._bufferIndex=-1,o._index++)),c.previous=w,l=!0}function P(w,H){let N=H||{};return N.type=w,N.start=v(),c.events.push(["enter",N,c]),s.push(N),N}function T(w){let H=s.pop();return H.end=v(),c.events.push(["exit",H,c]),H}function C(w,H){O(w,H.from)}function S(w,H){H.restore()}function I(w,H){return N;function N(D,z,Y){let V,R,ee,ne;return Array.isArray(D)?pe(D):"tokenize"in D?pe([D]):_(D);function _(W){return de;function de(fe){let ke=fe!==null&&W[fe],ve=fe!==null&&W.null,Fe=[...Array.isArray(ke)?ke:ke?[ke]:[],...Array.isArray(ve)?ve:ve?[ve]:[]];return pe(Fe)(fe)}}function pe(W){return V=W,R=0,W.length===0?Y:ge(W[R])}function ge(W){return de;function de(fe){return ne=L(),ee=W,W.partial||(c.currentConstruct=W),W.name&&c.parser.constructs.disable.null.includes(W.name)?ie(fe):W.tokenize.call(H?Object.assign(Object.create(c),H):c,p,De,ie)(fe)}}function De(W){return l=!0,w(ee,ne),z}function ie(W){return l=!0,ne.restore(),++R<V.length?ge(V[R]):Y}}}function O(w,H){w.resolveAll&&!a.includes(w)&&a.push(w),w.resolve&&wr(c.events,H,c.events.length-H,w.resolve(c.events.slice(H),c)),w.resolveTo&&(c.events=w.resolveTo(c.events,c))}function L(){let w=v(),H=c.previous,N=c.currentConstruct,D=c.events.length,z=Array.from(s);return{restore:Y,from:D};function Y(){o=w,c.previous=H,c.currentConstruct=N,c.events.length=D,s=z,M()}}function M(){o.line in n&&o.column<2&&(o.column=n[o.line],o.offset+=n[o.line]-1)}}function E7(e,t){let r=t.start._index,o=t.start._bufferIndex,n=t.end._index,a=t.end._bufferIndex,i;if(r===n)i=[e[r].slice(o,a)];else{if(i=e.slice(r,n),o>-1){let s=i[0];typeof s=="string"?i[0]=s.slice(o):i.shift()}a>0&&i.push(e[n].slice(0,a))}return i}function I7(e,t){let r=-1,o=[],n;for(;++r<e.length;){let a=e[r],i;if(typeof a=="string")i=a;else switch(a){case-5:{i="\r";break}case-4:{i=`
|
|
130
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,i=!1,s;return{s:function(){r=r.call(e)},n:function(){var p=r.next();return a=p.done,p},e:function(p){i=!0,s=p},f:function(){try{!a&&r.return!=null&&r.return()}finally{if(i)throw s}}}}function a9(e,t){if(e){if(typeof e=="string")return x1(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return x1(e,t)}}function x1(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function T1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function i9(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?T1(Object(r),!0).forEach(function(o){Uc(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T1(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function P1(){var e=new Set,t=null;function r(a){t&&(!a.canMonitor||a.canMonitor(t.canMonitorArgs))&&t.active.add(a)}function o(a){var i=i9({},a);return e.add(i),r(i),function(){e.delete(i),t&&t.active.delete(i)}}function n(a){var i=a.eventName,s=a.payload;if(i==="onGenerateDragPreview"){t={canMonitorArgs:{initial:s.location.initial,source:s.source},active:new Set};var l=n9(e),p;try{for(l.s();!(p=l.n()).done;){var c=p.value;r(c)}}catch(v){l.e(v)}finally{l.f()}}if(t){for(var d=Array.from(t.active),f=0,u=d;f<u.length;f++){var h=u[f];if(t.active.has(h)){var y;(y=h[i])===null||y===void 0||y.call(h,s)}}i==="onDrop"&&(t.active.clear(),t=null)}}return{dispatchEvent:n,monitorForConsumers:o}}function C1(e){var t=e.typeKey,r=e.mount,o=e.dispatchEventToSource,n=e.defaultDropEffect,a=P1(),i=b1({typeKey:t,defaultDropEffect:n});function s(c){o==null||o(c),i.dispatchEvent(c),a.dispatchEvent(c)}function l(c){var d=c.event,f=c.dragType;bb.start({event:d,dragType:f,getDropTargetsOver:i.getIsOver,dispatchEvent:s})}function p(){function c(){var d={canStart:bb.canStart,start:l};return r(d)}return h1({typeKey:t,mount:c})}return{registerUsage:p,dropTarget:i.dropTargetForConsumers,monitor:a.monitorForConsumers}}var wqe=Zm(function(){return navigator.userAgent.toLocaleLowerCase().includes("android")}),k1="pdnd:android-fallback";function s9(e){return"nodeName"in e}function S1(e){var t=e.dragEnter,r=t.type,o=t.relatedTarget;return r!=="dragenter"?!1:Xa()?s1({dragEnter:t}):o==null||o instanceof HTMLIFrameElement?!0:s9(o)&&!document.contains(o)}var R1="text/plain";var E1="application/vnd.pdnd";function Rb(e){var t=e.type,r=e.value;return!(t===E1||t===R1&&r===k1)}function l9(e){return Array.from(e.types).filter(function(t){return Rb({type:t,value:e.getData(t)})})}function p9(e){return Array.from(e.items).filter(function(t){return t.kind==="file"||Rb({type:t.type,value:e.getData(t.type)})})}var Sb=!1,Eb=C1({typeKey:"external",defaultDropEffect:"copy",mount:function(t){return(0,Wc.bind)(window,{type:"dragenter",listener:function(o){if(!Sb&&o.dataTransfer&&t.canStart(o)&&S1({dragEnter:o})){var n=l9(o.dataTransfer);if(n.length){var a={types:n,items:[],getStringData:function(){return null}};t.start({event:o,dragType:{type:"external",startedFrom:"external",payload:a,getDropPayload:function(s){if(!s.dataTransfer)return a;var l=p9(s.dataTransfer),p=s.dataTransfer.getData.bind(s.dataTransfer);return{types:n,items:l,getStringData:function(d){if(!n.includes(d))return null;var f=p(d);return Rb({type:d,value:f})?f:null}}}}})}}}})}});function Ib(e){return Eb.dropTarget(e)}function Ob(e){return Eb.monitor(e)}(function(){if(typeof window>"u")return;Eb.registerUsage();var t={type:"idle"},r=t;function o(){r.type==="dragging"&&(Sb=!1,r.cleanup(),r=t)}function n(){return(0,Wc.bindAll)(window,[{type:"dragend",listener:o}].concat(ea(Ll({onDragEnd:o}))),{capture:!0})}(0,Wc.bind)(window,{type:"dragstart",listener:function(){r.type==="idle"&&(Sb=!0,r={type:"dragging",cleanup:n()})},options:{capture:!0}})})();function th(e){var t=e.source;return t.types.includes("Files")}function _b(e){var t=e.source;return t.items.filter(function(r){return r.kind==="file"}).map(function(r){return r.getAsFile()}).filter(function(r){return r!=null})}var O1=fn(Nl());function I1(e){e.defaultPrevented||(e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.preventDefault())}var wb=null;function c9(){Gc(),wb=(0,O1.bindAll)(window,[{type:"dragover",listener:I1},{type:"dragenter",listener:I1},{type:"drop",listener:function(t){t.preventDefault(),Gc()}},{type:"dragend",listener:Gc}].concat(ea(Ll({onDragEnd:Gc}))),{capture:!1})}function Gc(){var e;(e=wb)===null||e===void 0||e(),wb=null}var rh={start:c9,stop:Gc};var f9=E("input")({width:"1px",height:"1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",position:"absolute"}),m9=E(Fr,{name:"Uploader",slot:"PreviewRoot"})({}),h9=E(xc,{name:"Uploader",slot:"UploadCard"})(({theme:e})=>({padding:e.spacing(2.5),border:`1px solid ${e.palette.neutral.outlinedBorder}`})),y9=E(r1,{name:"Uploader",slot:"UploadFileIcon"})(({theme:e})=>({color:e.palette.neutral[400],width:"32px",height:"32px"})),g9=E(o1,{name:"Uploader",slot:"ClearIcon"})(({theme:e})=>({color:e.palette.neutral.plainColor,width:"18px",height:"18px"})),v9=["byte","kilobyte","megabyte","gigabyte","terabyte","petabyte"],D1=e=>{let t=e==0?0:Math.floor(Math.log(e)/Math.log(1024)),r=e/Math.pow(1024,t),o=v9[t];return Intl.NumberFormat("en-us",{style:"unit",unit:o,unitDisplay:"narrow"}).format(r)},b9=e=>{let{files:t,onDelete:r}=e;return A(m9,{gap:1,children:t.map(o=>A(h9,{size:"sm",color:"neutral",children:Ce(Fr,{direction:"row",alignItems:"center",gap:2,children:[A(y9,{}),Ce(Fr,{flex:"1",children:[A(qr,{level:"body-sm",textColor:"common.black",children:o.name}),A(qr,{level:"body-xs",fontWeight:"300",lineHeight:"1.33",textColor:"text.tertiary",children:D1(o.size)})]}),A(Rr,{onClick:()=>r==null?void 0:r(o),children:A(g9,{})})]})},o.name))})},x9=E(Fr,{name:"Uploader",slot:"root"})(({theme:e})=>({gap:e.spacing(2)})),T9=E(Mo,{name:"Uploader",slot:"dropZone"})(({theme:e,state:t,error:r})=>({width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",padding:e.spacing(5),gap:e.spacing(4),cursor:"pointer",backgroundColor:e.palette.background.surface,border:r?`1px solid ${e.palette.danger.outlinedBorder}`:t==="idle"?`1px solid ${e.palette.neutral.outlinedBorder}`:`1px solid ${e.palette.primary.outlinedBorder}`})),P9=E(t1,{name:"Uploader",slot:"iconContainer"})(({theme:e,state:t,error:r})=>({color:r?`rgba(${e.vars.palette.danger.mainChannel} / 0.6)`:t==="over"?`rgba(${e.palette.primary.mainChannel} / 0.6)`:e.palette.neutral.softActiveBg,width:"32px",height:"32px"})),Ab=u9.memo(e=>{let{accept:t,maxCount:r,name:o,size:n,maxSize:a,onChange:i,label:s,helperText:l}=e,p=w1(null),c=w1(null),[d,f]=Db(),[u,h]=Db([]),[y,v]=Db("idle"),g=_1(()=>!!d||e.error,[e.error,d]),x=_1(()=>!r||r&&u.length!==r,[u,r]),b=oh(S=>{try{a&&S.forEach(O=>{if(O.size>a)throw new Error(`File size exceeds the limit: ${D1(a)}`)});let I=[...u,...S];if(r&&I.length>r)throw new Error(`File count exceeds the limit: ${r}`);i==null||i({target:{name:o,value:I}}),h(I)}catch(I){f(I.message)}},[u]);d9(()=>{let S=p.current;if(S)return Hc(Ib({element:S,canDrop:th,onDragEnter:()=>v("over"),onDragLeave:()=>v("potential"),onDrop:async({source:I})=>{let O=await _b({source:I});b(O)}}),Ob({canMonitor:th,onDragStart:()=>{v("potential"),rh.start()},onDrop:()=>{v("idle"),rh.stop()}}))});let k=oh(S=>{let I=Array.from(S.target.files||[]);b(I)},[b]),P=oh(S=>{h(I=>(i==null||i({target:{name:o,value:I.filter(O=>O!==S)}}),I.filter(O=>O!==S)))},[]),T=oh(()=>{var S;(S=c.current)==null||S.click()},[]);return Ce(x9,{children:[x&&Ce(Ht,{size:n,error:!!g,children:[s&&A(Ut,{children:s}),Ce(T9,{state:y,error:g,ref:p,onClick:T,children:[A(Fr,{alignItems:"center",gap:1,children:A(P9,{state:y,error:g})}),A(f9,{type:"file",onChange:k,multiple:!0,accept:t,ref:c})]}),d?Ce(Et,{children:[A(Lm,{}),d]}):l&&A(Et,{children:l})]}),u.length>0&&A(b9,{files:u,onDelete:P})]})});Ab.displayName="Uploader";import{motion as C9}from"framer-motion";var k9=C9(Ef),Mb=k9;Mb.displayName="Grid";function A1(e,t){let r=t||{};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}var S9=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,R9=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,E9={};function nh(e,t){return((t||E9).jsx?R9:S9).test(e)}var I9=/[ \t\n\f\r]/g;function Nb(e){return typeof e=="object"?e.type==="text"?M1(e.value):!1:M1(e)}function M1(e){return e.replace(I9,"")===""}var ta=class{constructor(t,r,o){this.property=t,this.normal=r,o&&(this.space=o)}};ta.prototype.property={};ta.prototype.normal={};ta.prototype.space=null;function Lb(e,t){let r={},o={},n=-1;for(;++n<e.length;)Object.assign(r,e[n].property),Object.assign(o,e[n].normal);return new ta(r,o,t)}function Jc(e){return e.toLowerCase()}var _r=class{constructor(t,r){this.property=t,this.attribute=r}};_r.prototype.space=null;_r.prototype.boolean=!1;_r.prototype.booleanish=!1;_r.prototype.overloadedBoolean=!1;_r.prototype.number=!1;_r.prototype.commaSeparated=!1;_r.prototype.spaceSeparated=!1;_r.prototype.commaOrSpaceSeparated=!1;_r.prototype.mustUseProperty=!1;_r.prototype.defined=!1;var qc={};iT(qc,{boolean:()=>Ve,booleanish:()=>Ot,commaOrSpaceSeparated:()=>Kr,commaSeparated:()=>ei,number:()=>me,overloadedBoolean:()=>Bb,spaceSeparated:()=>pt});var O9=0,Ve=es(),Ot=es(),Bb=es(),me=es(),pt=es(),ei=es(),Kr=es();function es(){return 2**++O9}var zb=Object.keys(qc),ts=class extends _r{constructor(t,r,o,n){let a=-1;if(super(t,r),N1(this,"space",n),typeof o=="number")for(;++a<zb.length;){let i=zb[a];N1(this,zb[a],(o&qc[i])===qc[i])}}};ts.prototype.defined=!0;function N1(e,t,r){r&&(e[t]=r)}var _9={}.hasOwnProperty;function No(e){let t={},r={},o;for(o in e.properties)if(_9.call(e.properties,o)){let n=e.properties[o],a=new ts(o,e.transform(e.attributes||{},o),n,e.space);e.mustUseProperty&&e.mustUseProperty.includes(o)&&(a.mustUseProperty=!0),t[o]=a,r[Jc(o)]=o,r[Jc(a.attribute)]=o}return new ta(t,r,e.space)}var Fb=No({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}});var $b=No({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function ah(e,t){return t in e?e[t]:t}function ih(e,t){return ah(e,t.toLowerCase())}var Vb=No({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:ih,properties:{xmlns:null,xmlnsXLink:null}});var jb=No({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Ot,ariaAutoComplete:null,ariaBusy:Ot,ariaChecked:Ot,ariaColCount:me,ariaColIndex:me,ariaColSpan:me,ariaControls:pt,ariaCurrent:null,ariaDescribedBy:pt,ariaDetails:null,ariaDisabled:Ot,ariaDropEffect:pt,ariaErrorMessage:null,ariaExpanded:Ot,ariaFlowTo:pt,ariaGrabbed:Ot,ariaHasPopup:null,ariaHidden:Ot,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:pt,ariaLevel:me,ariaLive:null,ariaModal:Ot,ariaMultiLine:Ot,ariaMultiSelectable:Ot,ariaOrientation:null,ariaOwns:pt,ariaPlaceholder:null,ariaPosInSet:me,ariaPressed:Ot,ariaReadOnly:Ot,ariaRelevant:null,ariaRequired:Ot,ariaRoleDescription:pt,ariaRowCount:me,ariaRowIndex:me,ariaRowSpan:me,ariaSelected:Ot,ariaSetSize:me,ariaSort:null,ariaValueMax:me,ariaValueMin:me,ariaValueNow:me,ariaValueText:null,role:null}});var L1=No({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:ih,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ei,acceptCharset:pt,accessKey:pt,action:null,allow:null,allowFullScreen:Ve,allowPaymentRequest:Ve,allowUserMedia:Ve,alt:null,as:null,async:Ve,autoCapitalize:null,autoComplete:pt,autoFocus:Ve,autoPlay:Ve,blocking:pt,capture:null,charSet:null,checked:Ve,cite:null,className:pt,cols:me,colSpan:null,content:null,contentEditable:Ot,controls:Ve,controlsList:pt,coords:me|ei,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ve,defer:Ve,dir:null,dirName:null,disabled:Ve,download:Bb,draggable:Ot,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ve,formTarget:null,headers:pt,height:me,hidden:Ve,high:me,href:null,hrefLang:null,htmlFor:pt,httpEquiv:pt,id:null,imageSizes:null,imageSrcSet:null,inert:Ve,inputMode:null,integrity:null,is:null,isMap:Ve,itemId:null,itemProp:pt,itemRef:pt,itemScope:Ve,itemType:pt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ve,low:me,manifest:null,max:null,maxLength:me,media:null,method:null,min:null,minLength:me,multiple:Ve,muted:Ve,name:null,nonce:null,noModule:Ve,noValidate:Ve,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ve,optimum:me,pattern:null,ping:pt,placeholder:null,playsInline:Ve,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ve,referrerPolicy:null,rel:pt,required:Ve,reversed:Ve,rows:me,rowSpan:me,sandbox:pt,scope:null,scoped:Ve,seamless:Ve,selected:Ve,shadowRootClonable:Ve,shadowRootDelegatesFocus:Ve,shadowRootMode:null,shape:null,size:me,sizes:null,slot:null,span:me,spellCheck:Ot,src:null,srcDoc:null,srcLang:null,srcSet:null,start:me,step:null,style:null,tabIndex:me,target:null,title:null,translate:null,type:null,typeMustMatch:Ve,useMap:null,value:Ot,width:me,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:pt,axis:null,background:null,bgColor:null,border:me,borderColor:null,bottomMargin:me,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ve,declare:Ve,event:null,face:null,frame:null,frameBorder:null,hSpace:me,leftMargin:me,link:null,longDesc:null,lowSrc:null,marginHeight:me,marginWidth:me,noResize:Ve,noHref:Ve,noShade:Ve,noWrap:Ve,object:null,profile:null,prompt:null,rev:null,rightMargin:me,rules:null,scheme:null,scrolling:Ot,standby:null,summary:null,text:null,topMargin:me,valueType:null,version:null,vAlign:null,vLink:null,vSpace:me,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ve,disableRemotePlayback:Ve,prefix:null,property:null,results:me,security:null,unselectable:null}});var B1=No({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:ah,properties:{about:Kr,accentHeight:me,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:me,amplitude:me,arabicForm:null,ascent:me,attributeName:null,attributeType:null,azimuth:me,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:me,by:null,calcMode:null,capHeight:me,className:pt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:me,diffuseConstant:me,direction:null,display:null,dur:null,divisor:me,dominantBaseline:null,download:Ve,dx:null,dy:null,edgeMode:null,editable:null,elevation:me,enableBackground:null,end:null,event:null,exponent:me,externalResourcesRequired:null,fill:null,fillOpacity:me,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ei,g2:ei,glyphName:ei,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:me,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:me,horizOriginX:me,horizOriginY:me,id:null,ideographic:me,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:me,k:me,k1:me,k2:me,k3:me,k4:me,kernelMatrix:Kr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:me,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:me,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:me,overlineThickness:me,paintOrder:null,panose1:null,path:null,pathLength:me,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:pt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:me,pointsAtY:me,pointsAtZ:me,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Kr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Kr,rev:Kr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Kr,requiredFeatures:Kr,requiredFonts:Kr,requiredFormats:Kr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:me,specularExponent:me,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:me,strikethroughThickness:me,string:null,stroke:null,strokeDashArray:Kr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:me,strokeOpacity:me,strokeWidth:null,style:null,surfaceScale:me,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Kr,tabIndex:me,tableValues:null,target:null,targetX:me,targetY:me,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Kr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:me,underlineThickness:me,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:me,values:null,vAlphabetic:me,vMathematical:me,vectorEffect:null,vHanging:me,vIdeographic:me,version:null,vertAdvY:me,vertOriginX:me,vertOriginY:me,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:me,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}});var w9=/^data[-\w.:]+$/i,z1=/-[a-z]/g,D9=/[A-Z]/g;function Hb(e,t){let r=Jc(t),o=t,n=_r;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&w9.test(t)){if(t.charAt(4)==="-"){let a=t.slice(5).replace(z1,M9);o="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{let a=t.slice(4);if(!z1.test(a)){let i=a.replace(D9,A9);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}n=ts}return new n(o,t)}function A9(e){return"-"+e.toLowerCase()}function M9(e){return e.charAt(1).toUpperCase()}var Ub={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};var F1=Lb([$b,Fb,Vb,jb,L1],"html"),sh=Lb([$b,Fb,Vb,jb,B1],"svg");function $1(e){return e.join(" ").trim()}var Wb=fn(J1(),1),q1=Wb.default.default||Wb.default;var lh=K1("end"),Bl=K1("start");function K1(e){return t;function t(r){let o=r&&r.position&&r.position[e]||{};if(typeof o.line=="number"&&o.line>0&&typeof o.column=="number"&&o.column>0)return{line:o.line,column:o.column,offset:typeof o.offset=="number"&&o.offset>-1?o.offset:void 0}}}function Gb(e){let t=Bl(e),r=lh(e);if(t&&r)return{start:t,end:r}}function ti(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Y1(e.position):"start"in e||"end"in e?Y1(e):"line"in e||"column"in e?Jb(e):""}function Jb(e){return X1(e&&e.line)+":"+X1(e&&e.column)}function Y1(e){return Jb(e&&e.start)+"-"+Jb(e&&e.end)}function X1(e){return e&&typeof e=="number"?e:1}var Nt=class extends Error{constructor(t,r,o){super(),typeof r=="string"&&(o=r,r=void 0);let n="",a={},i=!1;if(r&&("line"in r&&"column"in r?a={place:r}:"start"in r&&"end"in r?a={place:r}:"type"in r?a={ancestors:[r],place:r.position}:a=j({},r)),typeof t=="string"?n=t:!a.cause&&t&&(i=!0,n=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof o=="string"){let l=o.indexOf(":");l===-1?a.ruleId=o:(a.source=o.slice(0,l),a.ruleId=o.slice(l+1))}if(!a.place&&a.ancestors&&a.ancestors){let l=a.ancestors[a.ancestors.length-1];l&&(a.place=l.position)}let s=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=n,this.line=s?s.line:void 0,this.name=ti(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=i&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}};Nt.prototype.file="";Nt.prototype.name="";Nt.prototype.reason="";Nt.prototype.message="";Nt.prototype.stack="";Nt.prototype.column=void 0;Nt.prototype.line=void 0;Nt.prototype.ancestors=void 0;Nt.prototype.cause=void 0;Nt.prototype.fatal=void 0;Nt.prototype.place=void 0;Nt.prototype.ruleId=void 0;Nt.prototype.source=void 0;var qb={}.hasOwnProperty,q9=new Map,K9=/[A-Z]/g,Y9=/-([a-z])/g,X9=new Set(["table","tbody","thead","tfoot","tr"]),Z9=new Set(["td","th"]),Z1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Kb(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");let r=t.filePath||void 0,o;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");o=i6(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");o=a6(r,t.jsx,t.jsxs)}let n={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:o,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?sh:F1,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Q1(n,e,void 0);return a&&typeof a!="string"?a:n.create(e,n.Fragment,{children:a||void 0},void 0)}function Q1(e,t,r){if(t.type==="element")return Q9(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return e6(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return r6(e,t,r);if(t.type==="mdxjsEsm")return t6(e,t);if(t.type==="root")return o6(e,t,r);if(t.type==="text")return n6(e,t)}function Q9(e,t,r){let o=e.schema,n=o;t.tagName.toLowerCase()==="svg"&&o.space==="html"&&(n=sh,e.schema=n),e.ancestors.push(t);let a=tO(e,t.tagName,!1),i=s6(e,t),s=Xb(e,t);return X9.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!Nb(l):!0})),eO(e,i,a,t),Yb(i,s),e.ancestors.pop(),e.schema=o,e.create(t,a,i,r)}function e6(e,t){if(t.data&&t.data.estree&&e.evaluater){let o=t.data.estree.body[0];return o.type,e.evaluater.evaluateExpression(o.expression)}Yc(e,t.position)}function t6(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Yc(e,t.position)}function r6(e,t,r){let o=e.schema,n=o;t.name==="svg"&&o.space==="html"&&(n=sh,e.schema=n),e.ancestors.push(t);let a=t.name===null?e.Fragment:tO(e,t.name,!0),i=l6(e,t),s=Xb(e,t);return eO(e,i,a,t),Yb(i,s),e.ancestors.pop(),e.schema=o,e.create(t,a,i,r)}function o6(e,t,r){let o={};return Yb(o,Xb(e,t)),e.create(t,e.Fragment,o,r)}function n6(e,t){return t.value}function eO(e,t,r,o){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=o)}function Yb(e,t){if(t.length>0){let r=t.length>1?t:t[0];r&&(e.children=r)}}function a6(e,t,r){return o;function o(n,a,i,s){let p=Array.isArray(i.children)?r:t;return s?p(a,i,s):p(a,i)}}function i6(e,t){return r;function r(o,n,a,i){let s=Array.isArray(a.children),l=Bl(o);return t(n,a,i,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function s6(e,t){let r={},o,n;for(n in t.properties)if(n!=="children"&&qb.call(t.properties,n)){let a=p6(e,n,t.properties[n]);if(a){let[i,s]=a;e.tableCellAlignToStyle&&i==="align"&&typeof s=="string"&&Z9.has(t.tagName)?o=s:r[i]=s}}if(o){let a=r.style||(r.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return r}function l6(e,t){let r={};for(let o of t.attributes)if(o.type==="mdxJsxExpressionAttribute")if(o.data&&o.data.estree&&e.evaluater){let a=o.data.estree.body[0];a.type;let i=a.expression;i.type;let s=i.properties[0];s.type,Object.assign(r,e.evaluater.evaluateExpression(s.argument))}else Yc(e,t.position);else{let n=o.name,a;if(o.value&&typeof o.value=="object")if(o.value.data&&o.value.data.estree&&e.evaluater){let s=o.value.data.estree.body[0];s.type,a=e.evaluater.evaluateExpression(s.expression)}else Yc(e,t.position);else a=o.value===null?!0:o.value;r[n]=a}return r}function Xb(e,t){let r=[],o=-1,n=e.passKeys?new Map:q9;for(;++o<t.children.length;){let a=t.children[o],i;if(e.passKeys){let l=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(l){let p=n.get(l)||0;i=l+"-"+p,n.set(l,p+1)}}let s=Q1(e,a,i);s!==void 0&&r.push(s)}return r}function p6(e,t,r){let o=Hb(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=o.commaSeparated?A1(r):$1(r)),o.property==="style"){let n=typeof r=="object"?r:c6(e,String(r));return e.stylePropertyNameCase==="css"&&(n=u6(n)),["style",n]}return[e.elementAttributeNameCase==="react"&&o.space?Ub[o.property]||o.property:o.attribute,r]}}function c6(e,t){let r={};try{q1(t,o)}catch(n){if(!e.ignoreInvalidStyle){let a=n,i=new Nt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Z1+"#cannot-parse-style-attribute",i}}return r;function o(n,a){let i=n;i.slice(0,2)!=="--"&&(i.slice(0,4)==="-ms-"&&(i="ms-"+i.slice(4)),i=i.replace(Y9,f6)),r[i]=a}}function tO(e,t,r){let o;if(!r)o={type:"Literal",value:t};else if(t.includes(".")){let n=t.split("."),a=-1,i;for(;++a<n.length;){let s=nh(n[a])?{type:"Identifier",name:n[a]}:{type:"Literal",value:n[a]};i=i?{type:"MemberExpression",object:i,property:s,computed:!!(a&&s.type==="Literal"),optional:!1}:s}o=i}else o=nh(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(o.type==="Literal"){let n=o.value;return qb.call(e.components,n)?e.components[n]:n}if(e.evaluater)return e.evaluater.evaluateExpression(o);Yc(e)}function Yc(e,t){let r=new Nt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=Z1+"#cannot-handle-mdx-estrees-without-createevaluater",r}function u6(e){let t={},r;for(r in e)qb.call(e,r)&&(t[d6(r)]=e[r]);return t}function d6(e){let t=e.replace(K9,m6);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function f6(e,t){return t.toUpperCase()}function m6(e){return"-"+e.toLowerCase()}var Xc={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]};import{Fragment as bG,jsx as xG,jsxs as TG}from"react/jsx-runtime";var h6={};function Zb(e,t){let r=t||h6,o=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,n=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return oO(e,o,n)}function oO(e,t,r){if(y6(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return rO(e.children,t,r)}return Array.isArray(e)?rO(e,t,r):""}function rO(e,t,r){let o=[],n=-1;for(;++n<e.length;)o[n]=oO(e[n],t,r);return o.join("")}function y6(e){return!!(e&&typeof e=="object")}var nO=document.createElement("i");function zl(e){let t="&"+e+";";nO.innerHTML=t;let r=nO.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function wr(e,t,r,o){let n=e.length,a=0,i;if(t<0?t=-t>n?0:n+t:t=t>n?n:t,r=r>0?r:0,o.length<1e4)i=Array.from(o),i.unshift(t,r),e.splice(...i);else for(r&&e.splice(t,r);a<o.length;)i=o.slice(a,a+1e4),i.unshift(t,0),e.splice(...i),a+=1e4,t+=1e4}function $r(e,t){return e.length>0?(wr(e,e.length,0,t),e):t}var aO={}.hasOwnProperty;function iO(e){let t={},r=-1;for(;++r<e.length;)g6(t,e[r]);return t}function g6(e,t){let r;for(r in t){let n=(aO.call(e,r)?e[r]:void 0)||(e[r]={}),a=t[r],i;if(a)for(i in a){aO.call(n,i)||(n[i]=[]);let s=a[i];v6(n[i],Array.isArray(s)?s:s?[s]:[])}}}function v6(e,t){let r=-1,o=[];for(;++r<t.length;)(t[r].add==="after"?e:o).push(t[r]);wr(e,0,0,o)}function ph(e,t){let r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"\uFFFD":String.fromCodePoint(r)}function ra(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var po=ri(/[A-Za-z]/),or=ri(/[\dA-Za-z]/),sO=ri(/[#-'*+\--9=?A-Z^-~]/);function Zc(e){return e!==null&&(e<32||e===127)}var Qc=ri(/\d/),lO=ri(/[\dA-Fa-f]/),pO=ri(/[!-/:-@[-`{-~]/);function _e(e){return e!==null&&e<-2}function Lt(e){return e!==null&&(e<0||e===32)}function je(e){return e===-2||e===-1||e===32}var cO=ri(new RegExp("\\p{P}|\\p{S}","u")),uO=ri(/\s/);function ri(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function Lo(e){let t=[],r=-1,o=0,n=0;for(;++r<e.length;){let a=e.charCodeAt(r),i="";if(a===37&&or(e.charCodeAt(r+1))&&or(e.charCodeAt(r+2)))n=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(i=String.fromCharCode(a));else if(a>55295&&a<57344){let s=e.charCodeAt(r+1);a<56320&&s>56319&&s<57344?(i=String.fromCharCode(a,s),n=1):i="\uFFFD"}else i=String.fromCharCode(a);i&&(t.push(e.slice(o,r),encodeURIComponent(i)),o=r+n+1,i=""),n&&(r+=n,n=0)}return t.join("")+e.slice(o)}function Ue(e,t,r,o){let n=o?o-1:Number.POSITIVE_INFINITY,a=0;return i;function i(l){return je(l)?(e.enter(r),s(l)):t(l)}function s(l){return je(l)&&a++<n?(e.consume(l),s):(e.exit(r),t(l))}}var dO={tokenize:b6};function b6(e){let t=e.attempt(this.parser.constructs.contentInitial,o,n),r;return t;function o(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Ue(e,t,"linePrefix")}function n(s){return e.enter("paragraph"),a(s)}function a(s){let l=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=l),r=l,i(s)}function i(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return _e(s)?(e.consume(s),e.exit("chunkText"),a):(e.consume(s),i)}}var mO={tokenize:x6},fO={tokenize:T6};function x6(e){let t=this,r=[],o=0,n,a,i;return s;function s(b){if(o<r.length){let k=r[o];return t.containerState=k[1],e.attempt(k[0].continuation,l,p)(b)}return p(b)}function l(b){if(o++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,n&&x();let k=t.events.length,P=k,T;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){T=t.events[P][1].end;break}g(o);let C=k;for(;C<t.events.length;)t.events[C][1].end=Object.assign({},T),C++;return wr(t.events,P+1,0,t.events.slice(k)),t.events.length=C,p(b)}return s(b)}function p(b){if(o===r.length){if(!n)return f(b);if(n.currentConstruct&&n.currentConstruct.concrete)return h(b);t.interrupt=!!(n.currentConstruct&&!n._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(fO,c,d)(b)}function c(b){return n&&x(),g(o),f(b)}function d(b){return t.parser.lazy[t.now().line]=o!==r.length,i=t.now().offset,h(b)}function f(b){return t.containerState={},e.attempt(fO,u,h)(b)}function u(b){return o++,r.push([t.currentConstruct,t.containerState]),f(b)}function h(b){if(b===null){n&&x(),g(0),e.consume(b);return}return n=n||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:a,_tokenizer:n}),y(b)}function y(b){if(b===null){v(e.exit("chunkFlow"),!0),g(0),e.consume(b);return}return _e(b)?(e.consume(b),v(e.exit("chunkFlow")),o=0,t.interrupt=void 0,s):(e.consume(b),y)}function v(b,k){let P=t.sliceStream(b);if(k&&P.push(null),b.previous=a,a&&(a.next=b),a=b,n.defineSkip(b.start),n.write(P),t.parser.lazy[b.start.line]){let T=n.events.length;for(;T--;)if(n.events[T][1].start.offset<i&&(!n.events[T][1].end||n.events[T][1].end.offset>i))return;let C=t.events.length,S=C,I,O;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){if(I){O=t.events[S][1].end;break}I=!0}for(g(o),T=C;T<t.events.length;)t.events[T][1].end=Object.assign({},O),T++;wr(t.events,S+1,0,t.events.slice(C)),t.events.length=T}}function g(b){let k=r.length;for(;k-- >b;){let P=r[k];t.containerState=P[1],P[0].exit.call(t,e)}r.length=b}function x(){n.write([null]),a=void 0,n=void 0,t.containerState._closeFlow=void 0}}function T6(e,t,r){return Ue(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Qb(e){if(e===null||Lt(e)||uO(e))return 1;if(cO(e))return 2}function Fl(e,t,r){let o=[],n=-1;for(;++n<e.length;){let a=e[n].resolveAll;a&&!o.includes(a)&&(t=a(t,r),o.push(a))}return t}var eu={name:"attention",tokenize:C6,resolveAll:P6};function P6(e,t){let r=-1,o,n,a,i,s,l,p,c;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(o=r;o--;)if(e[o][0]==="exit"&&e[o][1].type==="attentionSequence"&&e[o][1]._open&&t.sliceSerialize(e[o][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[o][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[o][1].end.offset-e[o][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;l=e[o][1].end.offset-e[o][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;let d=Object.assign({},e[o][1].end),f=Object.assign({},e[r][1].start);hO(d,-l),hO(f,l),i={type:l>1?"strongSequence":"emphasisSequence",start:d,end:Object.assign({},e[o][1].end)},s={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[r][1].start),end:f},a={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[o][1].end),end:Object.assign({},e[r][1].start)},n={type:l>1?"strong":"emphasis",start:Object.assign({},i.start),end:Object.assign({},s.end)},e[o][1].end=Object.assign({},i.start),e[r][1].start=Object.assign({},s.end),p=[],e[o][1].end.offset-e[o][1].start.offset&&(p=$r(p,[["enter",e[o][1],t],["exit",e[o][1],t]])),p=$r(p,[["enter",n,t],["enter",i,t],["exit",i,t],["enter",a,t]]),p=$r(p,Fl(t.parser.constructs.insideSpan.null,e.slice(o+1,r),t)),p=$r(p,[["exit",a,t],["enter",s,t],["exit",s,t],["exit",n,t]]),e[r][1].end.offset-e[r][1].start.offset?(c=2,p=$r(p,[["enter",e[r][1],t],["exit",e[r][1],t]])):c=0,wr(e,o-1,r-o+3,p),r=o+p.length-c-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function C6(e,t){let r=this.parser.constructs.attentionMarkers.null,o=this.previous,n=Qb(o),a;return i;function i(l){return a=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===a)return e.consume(l),s;let p=e.exit("attentionSequence"),c=Qb(l),d=!c||c===2&&n||r.includes(l),f=!n||n===2&&c||r.includes(o);return p._open=!!(a===42?d:d&&(n||!f)),p._close=!!(a===42?f:f&&(c||!d)),t(l)}}function hO(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var ex={name:"autolink",tokenize:k6};function k6(e,t,r){let o=0;return n;function n(u){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(u),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(u){return po(u)?(e.consume(u),i):p(u)}function i(u){return u===43||u===45||u===46||or(u)?(o=1,s(u)):p(u)}function s(u){return u===58?(e.consume(u),o=0,l):(u===43||u===45||u===46||or(u))&&o++<32?(e.consume(u),s):(o=0,p(u))}function l(u){return u===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(u),e.exit("autolinkMarker"),e.exit("autolink"),t):u===null||u===32||u===60||Zc(u)?r(u):(e.consume(u),l)}function p(u){return u===64?(e.consume(u),c):sO(u)?(e.consume(u),p):r(u)}function c(u){return or(u)?d(u):r(u)}function d(u){return u===46?(e.consume(u),o=0,c):u===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(u),e.exit("autolinkMarker"),e.exit("autolink"),t):f(u)}function f(u){if((u===45||or(u))&&o++<63){let h=u===45?f:d;return e.consume(u),h}return r(u)}}var oi={tokenize:S6,partial:!0};function S6(e,t,r){return o;function o(a){return je(a)?Ue(e,n,"linePrefix")(a):n(a)}function n(a){return a===null||_e(a)?t(a):r(a)}}var ch={name:"blockQuote",tokenize:R6,continuation:{tokenize:E6},exit:I6};function R6(e,t,r){let o=this;return n;function n(i){if(i===62){let s=o.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(i),e.exit("blockQuoteMarker"),a}return r(i)}function a(i){return je(i)?(e.enter("blockQuotePrefixWhitespace"),e.consume(i),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(i))}}function E6(e,t,r){let o=this;return n;function n(i){return je(i)?Ue(e,a,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i):a(i)}function a(i){return e.attempt(ch,t,r)(i)}}function I6(e){e.exit("blockQuote")}var uh={name:"characterEscape",tokenize:O6};function O6(e,t,r){return o;function o(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),n}function n(a){return pO(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(a)}}var dh={name:"characterReference",tokenize:_6};function _6(e,t,r){let o=this,n=0,a,i;return s;function s(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),a=31,i=or,c(d))}function p(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,i=lO,c):(e.enter("characterReferenceValue"),a=7,i=Qc,c(d))}function c(d){if(d===59&&n){let f=e.exit("characterReferenceValue");return i===or&&!zl(o.sliceSerialize(f))?r(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return i(d)&&n++<a?(e.consume(d),c):r(d)}}var yO={tokenize:D6,partial:!0},fh={name:"codeFenced",tokenize:w6,concrete:!0};function w6(e,t,r){let o=this,n={tokenize:P,partial:!0},a=0,i=0,s;return l;function l(T){return p(T)}function p(T){let C=o.events[o.events.length-1];return a=C&&C[1].type==="linePrefix"?C[2].sliceSerialize(C[1],!0).length:0,s=T,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(T)}function c(T){return T===s?(i++,e.consume(T),c):i<3?r(T):(e.exit("codeFencedFenceSequence"),je(T)?Ue(e,d,"whitespace")(T):d(T))}function d(T){return T===null||_e(T)?(e.exit("codeFencedFence"),o.interrupt?t(T):e.check(yO,y,k)(T)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(T))}function f(T){return T===null||_e(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(T)):je(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ue(e,u,"whitespace")(T)):T===96&&T===s?r(T):(e.consume(T),f)}function u(T){return T===null||_e(T)?d(T):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(T))}function h(T){return T===null||_e(T)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(T)):T===96&&T===s?r(T):(e.consume(T),h)}function y(T){return e.attempt(n,k,v)(T)}function v(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),g}function g(T){return a>0&&je(T)?Ue(e,x,"linePrefix",a+1)(T):x(T)}function x(T){return T===null||_e(T)?e.check(yO,y,k)(T):(e.enter("codeFlowValue"),b(T))}function b(T){return T===null||_e(T)?(e.exit("codeFlowValue"),x(T)):(e.consume(T),b)}function k(T){return e.exit("codeFenced"),t(T)}function P(T,C,S){let I=0;return O;function O(N){return T.enter("lineEnding"),T.consume(N),T.exit("lineEnding"),L}function L(N){return T.enter("codeFencedFence"),je(N)?Ue(T,M,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):M(N)}function M(N){return N===s?(T.enter("codeFencedFenceSequence"),w(N)):S(N)}function w(N){return N===s?(I++,T.consume(N),w):I>=i?(T.exit("codeFencedFenceSequence"),je(N)?Ue(T,H,"whitespace")(N):H(N)):S(N)}function H(N){return N===null||_e(N)?(T.exit("codeFencedFence"),C(N)):S(N)}}}function D6(e,t,r){let o=this;return n;function n(i){return i===null?r(i):(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),a)}function a(i){return o.parser.lazy[o.now().line]?r(i):t(i)}}var tu={name:"codeIndented",tokenize:M6},A6={tokenize:N6,partial:!0};function M6(e,t,r){let o=this;return n;function n(p){return e.enter("codeIndented"),Ue(e,a,"linePrefix",5)(p)}function a(p){let c=o.events[o.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?i(p):r(p)}function i(p){return p===null?l(p):_e(p)?e.attempt(A6,i,l)(p):(e.enter("codeFlowValue"),s(p))}function s(p){return p===null||_e(p)?(e.exit("codeFlowValue"),i(p)):(e.consume(p),s)}function l(p){return e.exit("codeIndented"),t(p)}}function N6(e,t,r){let o=this;return n;function n(i){return o.parser.lazy[o.now().line]?r(i):_e(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n):Ue(e,a,"linePrefix",5)(i)}function a(i){let s=o.events[o.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(i):_e(i)?n(i):r(i)}}var tx={name:"codeText",tokenize:z6,resolve:L6,previous:B6};function L6(e){let t=e.length-4,r=3,o,n;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(o=r;++o<t;)if(e[o][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(o=r-1,t++;++o<=t;)n===void 0?o!==t&&e[o][1].type!=="lineEnding"&&(n=o):(o===t||e[o][1].type==="lineEnding")&&(e[n][1].type="codeTextData",o!==n+2&&(e[n][1].end=e[o-1][1].end,e.splice(n+2,o-n-2),t-=o-n-2,o=n+2),n=void 0);return e}function B6(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function z6(e,t,r){let o=this,n=0,a,i;return s;function s(f){return e.enter("codeText"),e.enter("codeTextSequence"),l(f)}function l(f){return f===96?(e.consume(f),n++,l):(e.exit("codeTextSequence"),p(f))}function p(f){return f===null?r(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),p):f===96?(i=e.enter("codeTextSequence"),a=0,d(f)):_e(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),p):(e.enter("codeTextData"),c(f))}function c(f){return f===null||f===32||f===96||_e(f)?(e.exit("codeTextData"),p(f)):(e.consume(f),c)}function d(f){return f===96?(e.consume(f),a++,d):a===n?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(i.type="codeTextData",c(f))}}var mh=class{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,r){let o=r==null?Number.POSITIVE_INFINITY:r;return o<this.left.length?this.left.slice(t,o):t>this.left.length?this.right.slice(this.right.length-o+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-o+this.left.length).reverse())}splice(t,r,o){let n=r||0;this.setCursor(Math.trunc(t));let a=this.right.splice(this.right.length-n,Number.POSITIVE_INFINITY);return o&&ru(this.left,o),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),ru(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ru(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){let r=this.left.splice(t,Number.POSITIVE_INFINITY);ru(this.right,r.reverse())}else{let r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ru(this.left,r.reverse())}}};function ru(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function hh(e){let t={},r=-1,o,n,a,i,s,l,p,c=new mh(e);for(;++r<c.length;){for(;r in t;)r=t[r];if(o=c.get(r),r&&o[1].type==="chunkFlow"&&c.get(r-1)[1].type==="listItemPrefix"&&(l=o[1]._tokenizer.events,a=0,a<l.length&&l[a][1].type==="lineEndingBlank"&&(a+=2),a<l.length&&l[a][1].type==="content"))for(;++a<l.length&&l[a][1].type!=="content";)l[a][1].type==="chunkText"&&(l[a][1]._isInFirstContentOfListItem=!0,a++);if(o[0]==="enter")o[1].contentType&&(Object.assign(t,F6(c,r)),r=t[r],p=!0);else if(o[1]._container){for(a=r,n=void 0;a--&&(i=c.get(a),i[1].type==="lineEnding"||i[1].type==="lineEndingBlank");)i[0]==="enter"&&(n&&(c.get(n)[1].type="lineEndingBlank"),i[1].type="lineEnding",n=a);n&&(o[1].end=Object.assign({},c.get(n)[1].start),s=c.slice(n,r),s.unshift(o),c.splice(n,r-n+1,s))}}return wr(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!p}function F6(e,t){let r=e.get(t)[1],o=e.get(t)[2],n=t-1,a=[],i=r._tokenizer||o.parser[r.contentType](r.start),s=i.events,l=[],p={},c,d,f=-1,u=r,h=0,y=0,v=[y];for(;u;){for(;e.get(++n)[1]!==u;);a.push(n),u._tokenizer||(c=o.sliceStream(u),u.next||c.push(null),d&&i.defineSkip(u.start),u._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(c),u._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),d=u,u=u.next}for(u=r;++f<s.length;)s[f][0]==="exit"&&s[f-1][0]==="enter"&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(y=f+1,v.push(y),u._tokenizer=void 0,u.previous=void 0,u=u.next);for(i.events=[],u?(u._tokenizer=void 0,u.previous=void 0):v.pop(),f=v.length;f--;){let g=s.slice(v[f],v[f+1]),x=a.pop();l.push([x,x+g.length-1]),e.splice(x,2,g)}for(l.reverse(),f=-1;++f<l.length;)p[h+l[f][0]]=h+l[f][1],h+=l[f][1]-l[f][0]-1;return p}var rx={tokenize:j6,resolve:V6},$6={tokenize:H6,partial:!0};function V6(e){return hh(e),e}function j6(e,t){let r;return o;function o(s){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),n(s)}function n(s){return s===null?a(s):_e(s)?e.check($6,i,a)(s):(e.consume(s),n)}function a(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function i(s){return e.consume(s),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,n}}function H6(e,t,r){let o=this;return n;function n(i){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Ue(e,a,"linePrefix")}function a(i){if(i===null||_e(i))return r(i);let s=o.events[o.events.length-1];return!o.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(i):e.interrupt(o.parser.constructs.flow,r,t)(i)}}function yh(e,t,r,o,n,a,i,s,l){let p=l||Number.POSITIVE_INFINITY,c=0;return d;function d(g){return g===60?(e.enter(o),e.enter(n),e.enter(a),e.consume(g),e.exit(a),f):g===null||g===32||g===41||Zc(g)?r(g):(e.enter(o),e.enter(i),e.enter(s),e.enter("chunkString",{contentType:"string"}),y(g))}function f(g){return g===62?(e.enter(a),e.consume(g),e.exit(a),e.exit(n),e.exit(o),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),u(g))}function u(g){return g===62?(e.exit("chunkString"),e.exit(s),f(g)):g===null||g===60||_e(g)?r(g):(e.consume(g),g===92?h:u)}function h(g){return g===60||g===62||g===92?(e.consume(g),u):u(g)}function y(g){return!c&&(g===null||g===41||Lt(g))?(e.exit("chunkString"),e.exit(s),e.exit(i),e.exit(o),t(g)):c<p&&g===40?(e.consume(g),c++,y):g===41?(e.consume(g),c--,y):g===null||g===32||g===40||Zc(g)?r(g):(e.consume(g),g===92?v:y)}function v(g){return g===40||g===41||g===92?(e.consume(g),y):y(g)}}function gh(e,t,r,o,n,a){let i=this,s=0,l;return p;function p(u){return e.enter(o),e.enter(n),e.consume(u),e.exit(n),e.enter(a),c}function c(u){return s>999||u===null||u===91||u===93&&!l||u===94&&!s&&"_hiddenFootnoteSupport"in i.parser.constructs?r(u):u===93?(e.exit(a),e.enter(n),e.consume(u),e.exit(n),e.exit(o),t):_e(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(u))}function d(u){return u===null||u===91||u===93||_e(u)||s++>999?(e.exit("chunkString"),c(u)):(e.consume(u),l||(l=!je(u)),u===92?f:d)}function f(u){return u===91||u===92||u===93?(e.consume(u),s++,d):d(u)}}function vh(e,t,r,o,n,a){let i;return s;function s(f){return f===34||f===39||f===40?(e.enter(o),e.enter(n),e.consume(f),e.exit(n),i=f===40?41:f,l):r(f)}function l(f){return f===i?(e.enter(n),e.consume(f),e.exit(n),e.exit(o),t):(e.enter(a),p(f))}function p(f){return f===i?(e.exit(a),l(i)):f===null?r(f):_e(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Ue(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(f){return f===i||f===null||_e(f)?(e.exit("chunkString"),p(f)):(e.consume(f),f===92?d:c)}function d(f){return f===i||f===92?(e.consume(f),c):c(f)}}function os(e,t){let r;return o;function o(n){return _e(n)?(e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),r=!0,o):je(n)?Ue(e,o,r?"linePrefix":"lineSuffix")(n):t(n)}}var ox={name:"definition",tokenize:W6},U6={tokenize:G6,partial:!0};function W6(e,t,r){let o=this,n;return a;function a(u){return e.enter("definition"),i(u)}function i(u){return gh.call(o,e,s,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(u)}function s(u){return n=ra(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),u===58?(e.enter("definitionMarker"),e.consume(u),e.exit("definitionMarker"),l):r(u)}function l(u){return Lt(u)?os(e,p)(u):p(u)}function p(u){return yh(e,c,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(u)}function c(u){return e.attempt(U6,d,d)(u)}function d(u){return je(u)?Ue(e,f,"whitespace")(u):f(u)}function f(u){return u===null||_e(u)?(e.exit("definition"),o.parser.defined.push(n),t(u)):r(u)}}function G6(e,t,r){return o;function o(s){return Lt(s)?os(e,n)(s):r(s)}function n(s){return vh(e,a,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return je(s)?Ue(e,i,"whitespace")(s):i(s)}function i(s){return s===null||_e(s)?t(s):r(s)}}var nx={name:"hardBreakEscape",tokenize:J6};function J6(e,t,r){return o;function o(a){return e.enter("hardBreakEscape"),e.consume(a),n}function n(a){return _e(a)?(e.exit("hardBreakEscape"),t(a)):r(a)}}var ax={name:"headingAtx",tokenize:K6,resolve:q6};function q6(e,t){let r=e.length-2,o=3,n,a;return e[o][1].type==="whitespace"&&(o+=2),r-2>o&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(o===r-1||r-4>o&&e[r-2][1].type==="whitespace")&&(r-=o+1===r?2:4),r>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[r][1].end},a={type:"chunkText",start:e[o][1].start,end:e[r][1].end,contentType:"text"},wr(e,o,r-o+1,[["enter",n,t],["enter",a,t],["exit",a,t],["exit",n,t]])),e}function K6(e,t,r){let o=0;return n;function n(c){return e.enter("atxHeading"),a(c)}function a(c){return e.enter("atxHeadingSequence"),i(c)}function i(c){return c===35&&o++<6?(e.consume(c),i):c===null||Lt(c)?(e.exit("atxHeadingSequence"),s(c)):r(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||_e(c)?(e.exit("atxHeading"),t(c)):je(c)?Ue(e,s,"whitespace")(c):(e.enter("atxHeadingText"),p(c))}function l(c){return c===35?(e.consume(c),l):(e.exit("atxHeadingSequence"),s(c))}function p(c){return c===null||c===35||Lt(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),p)}}var gO=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],ix=["pre","script","style","textarea"];var sx={name:"htmlFlow",tokenize:Q6,resolveTo:Z6,concrete:!0},Y6={tokenize:t7,partial:!0},X6={tokenize:e7,partial:!0};function Z6(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Q6(e,t,r){let o=this,n,a,i,s,l;return p;function p(_){return c(_)}function c(_){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(_),d}function d(_){return _===33?(e.consume(_),f):_===47?(e.consume(_),a=!0,y):_===63?(e.consume(_),n=3,o.interrupt?t:R):po(_)?(e.consume(_),i=String.fromCharCode(_),v):r(_)}function f(_){return _===45?(e.consume(_),n=2,u):_===91?(e.consume(_),n=5,s=0,h):po(_)?(e.consume(_),n=4,o.interrupt?t:R):r(_)}function u(_){return _===45?(e.consume(_),o.interrupt?t:R):r(_)}function h(_){let pe="CDATA[";return _===pe.charCodeAt(s++)?(e.consume(_),s===pe.length?o.interrupt?t:M:h):r(_)}function y(_){return po(_)?(e.consume(_),i=String.fromCharCode(_),v):r(_)}function v(_){if(_===null||_===47||_===62||Lt(_)){let pe=_===47,ge=i.toLowerCase();return!pe&&!a&&ix.includes(ge)?(n=1,o.interrupt?t(_):M(_)):gO.includes(i.toLowerCase())?(n=6,pe?(e.consume(_),g):o.interrupt?t(_):M(_)):(n=7,o.interrupt&&!o.parser.lazy[o.now().line]?r(_):a?x(_):b(_))}return _===45||or(_)?(e.consume(_),i+=String.fromCharCode(_),v):r(_)}function g(_){return _===62?(e.consume(_),o.interrupt?t:M):r(_)}function x(_){return je(_)?(e.consume(_),x):O(_)}function b(_){return _===47?(e.consume(_),O):_===58||_===95||po(_)?(e.consume(_),k):je(_)?(e.consume(_),b):O(_)}function k(_){return _===45||_===46||_===58||_===95||or(_)?(e.consume(_),k):P(_)}function P(_){return _===61?(e.consume(_),T):je(_)?(e.consume(_),P):b(_)}function T(_){return _===null||_===60||_===61||_===62||_===96?r(_):_===34||_===39?(e.consume(_),l=_,C):je(_)?(e.consume(_),T):S(_)}function C(_){return _===l?(e.consume(_),l=null,I):_===null||_e(_)?r(_):(e.consume(_),C)}function S(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||Lt(_)?P(_):(e.consume(_),S)}function I(_){return _===47||_===62||je(_)?b(_):r(_)}function O(_){return _===62?(e.consume(_),L):r(_)}function L(_){return _===null||_e(_)?M(_):je(_)?(e.consume(_),L):r(_)}function M(_){return _===45&&n===2?(e.consume(_),D):_===60&&n===1?(e.consume(_),z):_===62&&n===4?(e.consume(_),ee):_===63&&n===3?(e.consume(_),R):_===93&&n===5?(e.consume(_),V):_e(_)&&(n===6||n===7)?(e.exit("htmlFlowData"),e.check(Y6,ne,w)(_)):_===null||_e(_)?(e.exit("htmlFlowData"),w(_)):(e.consume(_),M)}function w(_){return e.check(X6,H,ne)(_)}function H(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),N}function N(_){return _===null||_e(_)?w(_):(e.enter("htmlFlowData"),M(_))}function D(_){return _===45?(e.consume(_),R):M(_)}function z(_){return _===47?(e.consume(_),i="",Y):M(_)}function Y(_){if(_===62){let pe=i.toLowerCase();return ix.includes(pe)?(e.consume(_),ee):M(_)}return po(_)&&i.length<8?(e.consume(_),i+=String.fromCharCode(_),Y):M(_)}function V(_){return _===93?(e.consume(_),R):M(_)}function R(_){return _===62?(e.consume(_),ee):_===45&&n===2?(e.consume(_),R):M(_)}function ee(_){return _===null||_e(_)?(e.exit("htmlFlowData"),ne(_)):(e.consume(_),ee)}function ne(_){return e.exit("htmlFlow"),t(_)}}function e7(e,t,r){let o=this;return n;function n(i){return _e(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),a):r(i)}function a(i){return o.parser.lazy[o.now().line]?r(i):t(i)}}function t7(e,t,r){return o;function o(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),e.attempt(oi,t,r)}}var lx={name:"htmlText",tokenize:r7};function r7(e,t,r){let o=this,n,a,i;return s;function s(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),l}function l(R){return R===33?(e.consume(R),p):R===47?(e.consume(R),P):R===63?(e.consume(R),b):po(R)?(e.consume(R),S):r(R)}function p(R){return R===45?(e.consume(R),c):R===91?(e.consume(R),a=0,h):po(R)?(e.consume(R),x):r(R)}function c(R){return R===45?(e.consume(R),u):r(R)}function d(R){return R===null?r(R):R===45?(e.consume(R),f):_e(R)?(i=d,z(R)):(e.consume(R),d)}function f(R){return R===45?(e.consume(R),u):d(R)}function u(R){return R===62?D(R):R===45?f(R):d(R)}function h(R){let ee="CDATA[";return R===ee.charCodeAt(a++)?(e.consume(R),a===ee.length?y:h):r(R)}function y(R){return R===null?r(R):R===93?(e.consume(R),v):_e(R)?(i=y,z(R)):(e.consume(R),y)}function v(R){return R===93?(e.consume(R),g):y(R)}function g(R){return R===62?D(R):R===93?(e.consume(R),g):y(R)}function x(R){return R===null||R===62?D(R):_e(R)?(i=x,z(R)):(e.consume(R),x)}function b(R){return R===null?r(R):R===63?(e.consume(R),k):_e(R)?(i=b,z(R)):(e.consume(R),b)}function k(R){return R===62?D(R):b(R)}function P(R){return po(R)?(e.consume(R),T):r(R)}function T(R){return R===45||or(R)?(e.consume(R),T):C(R)}function C(R){return _e(R)?(i=C,z(R)):je(R)?(e.consume(R),C):D(R)}function S(R){return R===45||or(R)?(e.consume(R),S):R===47||R===62||Lt(R)?I(R):r(R)}function I(R){return R===47?(e.consume(R),D):R===58||R===95||po(R)?(e.consume(R),O):_e(R)?(i=I,z(R)):je(R)?(e.consume(R),I):D(R)}function O(R){return R===45||R===46||R===58||R===95||or(R)?(e.consume(R),O):L(R)}function L(R){return R===61?(e.consume(R),M):_e(R)?(i=L,z(R)):je(R)?(e.consume(R),L):I(R)}function M(R){return R===null||R===60||R===61||R===62||R===96?r(R):R===34||R===39?(e.consume(R),n=R,w):_e(R)?(i=M,z(R)):je(R)?(e.consume(R),M):(e.consume(R),H)}function w(R){return R===n?(e.consume(R),n=void 0,N):R===null?r(R):_e(R)?(i=w,z(R)):(e.consume(R),w)}function H(R){return R===null||R===34||R===39||R===60||R===61||R===96?r(R):R===47||R===62||Lt(R)?I(R):(e.consume(R),H)}function N(R){return R===47||R===62||Lt(R)?I(R):r(R)}function D(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),t):r(R)}function z(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),Y}function Y(R){return je(R)?Ue(e,V,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):V(R)}function V(R){return e.enter("htmlTextData"),i(R)}}var ns={name:"labelEnd",tokenize:l7,resolveTo:s7,resolveAll:i7},o7={tokenize:p7},n7={tokenize:c7},a7={tokenize:u7};function i7(e){let t=-1;for(;++t<e.length;){let r=e[t][1];(r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd")&&(e.splice(t+1,r.type==="labelImage"?4:2),r.type="data",t++)}return e}function s7(e,t){let r=e.length,o=0,n,a,i,s;for(;r--;)if(n=e[r][1],a){if(n.type==="link"||n.type==="labelLink"&&n._inactive)break;e[r][0]==="enter"&&n.type==="labelLink"&&(n._inactive=!0)}else if(i){if(e[r][0]==="enter"&&(n.type==="labelImage"||n.type==="labelLink")&&!n._balanced&&(a=r,n.type!=="labelLink")){o=2;break}}else n.type==="labelEnd"&&(i=r);let l={type:e[a][1].type==="labelLink"?"link":"image",start:Object.assign({},e[a][1].start),end:Object.assign({},e[e.length-1][1].end)},p={type:"label",start:Object.assign({},e[a][1].start),end:Object.assign({},e[i][1].end)},c={type:"labelText",start:Object.assign({},e[a+o+2][1].end),end:Object.assign({},e[i-2][1].start)};return s=[["enter",l,t],["enter",p,t]],s=$r(s,e.slice(a+1,a+o+3)),s=$r(s,[["enter",c,t]]),s=$r(s,Fl(t.parser.constructs.insideSpan.null,e.slice(a+o+4,i-3),t)),s=$r(s,[["exit",c,t],e[i-2],e[i-1],["exit",p,t]]),s=$r(s,e.slice(i+1)),s=$r(s,[["exit",l,t]]),wr(e,a,e.length,s),e}function l7(e,t,r){let o=this,n=o.events.length,a,i;for(;n--;)if((o.events[n][1].type==="labelImage"||o.events[n][1].type==="labelLink")&&!o.events[n][1]._balanced){a=o.events[n][1];break}return s;function s(f){return a?a._inactive?d(f):(i=o.parser.defined.includes(ra(o.sliceSerialize({start:a.end,end:o.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),l):r(f)}function l(f){return f===40?e.attempt(o7,c,i?c:d)(f):f===91?e.attempt(n7,c,i?p:d)(f):i?c(f):d(f)}function p(f){return e.attempt(a7,c,d)(f)}function c(f){return t(f)}function d(f){return a._balanced=!0,r(f)}}function p7(e,t,r){return o;function o(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),n}function n(d){return Lt(d)?os(e,a)(d):a(d)}function a(d){return d===41?c(d):yh(e,i,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function i(d){return Lt(d)?os(e,l)(d):c(d)}function s(d){return r(d)}function l(d){return d===34||d===39||d===40?vh(e,p,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function p(d){return Lt(d)?os(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):r(d)}}function c7(e,t,r){let o=this;return n;function n(s){return gh.call(o,e,a,i,"reference","referenceMarker","referenceString")(s)}function a(s){return o.parser.defined.includes(ra(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?t(s):r(s)}function i(s){return r(s)}}function u7(e,t,r){return o;function o(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),n}function n(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):r(a)}}var px={name:"labelStartImage",tokenize:d7,resolveAll:ns.resolveAll};function d7(e,t,r){let o=this;return n;function n(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),a}function a(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),i):r(s)}function i(s){return s===94&&"_hiddenFootnoteSupport"in o.parser.constructs?r(s):t(s)}}var cx={name:"labelStartLink",tokenize:f7,resolveAll:ns.resolveAll};function f7(e,t,r){let o=this;return n;function n(i){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(i),e.exit("labelMarker"),e.exit("labelLink"),a}function a(i){return i===94&&"_hiddenFootnoteSupport"in o.parser.constructs?r(i):t(i)}}var ou={name:"lineEnding",tokenize:m7};function m7(e,t){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Ue(e,t,"linePrefix")}}var as={name:"thematicBreak",tokenize:h7};function h7(e,t,r){let o=0,n;return a;function a(p){return e.enter("thematicBreak"),i(p)}function i(p){return n=p,s(p)}function s(p){return p===n?(e.enter("thematicBreakSequence"),l(p)):o>=3&&(p===null||_e(p))?(e.exit("thematicBreak"),t(p)):r(p)}function l(p){return p===n?(e.consume(p),o++,l):(e.exit("thematicBreakSequence"),je(p)?Ue(e,s,"whitespace")(p):s(p))}}var Dr={name:"list",tokenize:v7,continuation:{tokenize:b7},exit:T7},y7={tokenize:P7,partial:!0},g7={tokenize:x7,partial:!0};function v7(e,t,r){let o=this,n=o.events[o.events.length-1],a=n&&n[1].type==="linePrefix"?n[2].sliceSerialize(n[1],!0).length:0,i=0;return s;function s(u){let h=o.containerState.type||(u===42||u===43||u===45?"listUnordered":"listOrdered");if(h==="listUnordered"?!o.containerState.marker||u===o.containerState.marker:Qc(u)){if(o.containerState.type||(o.containerState.type=h,e.enter(h,{_container:!0})),h==="listUnordered")return e.enter("listItemPrefix"),u===42||u===45?e.check(as,r,p)(u):p(u);if(!o.interrupt||u===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(u)}return r(u)}function l(u){return Qc(u)&&++i<10?(e.consume(u),l):(!o.interrupt||i<2)&&(o.containerState.marker?u===o.containerState.marker:u===41||u===46)?(e.exit("listItemValue"),p(u)):r(u)}function p(u){return e.enter("listItemMarker"),e.consume(u),e.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||u,e.check(oi,o.interrupt?r:c,e.attempt(y7,f,d))}function c(u){return o.containerState.initialBlankLine=!0,a++,f(u)}function d(u){return je(u)?(e.enter("listItemPrefixWhitespace"),e.consume(u),e.exit("listItemPrefixWhitespace"),f):r(u)}function f(u){return o.containerState.size=a+o.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(u)}}function b7(e,t,r){let o=this;return o.containerState._closeFlow=void 0,e.check(oi,n,a);function n(s){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,Ue(e,t,"listItemIndent",o.containerState.size+1)(s)}function a(s){return o.containerState.furtherBlankLines||!je(s)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,i(s)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,e.attempt(g7,t,i)(s))}function i(s){return o.containerState._closeFlow=!0,o.interrupt=void 0,Ue(e,e.attempt(Dr,t,r),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function x7(e,t,r){let o=this;return Ue(e,n,"listItemIndent",o.containerState.size+1);function n(a){let i=o.events[o.events.length-1];return i&&i[1].type==="listItemIndent"&&i[2].sliceSerialize(i[1],!0).length===o.containerState.size?t(a):r(a)}}function T7(e){e.exit(this.containerState.type)}function P7(e,t,r){let o=this;return Ue(e,n,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function n(a){let i=o.events[o.events.length-1];return!je(a)&&i&&i[1].type==="listItemPrefixWhitespace"?t(a):r(a)}}var bh={name:"setextUnderline",tokenize:k7,resolveTo:C7};function C7(e,t){let r=e.length,o,n,a;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){o=r;break}e[r][1].type==="paragraph"&&(n=r)}else e[r][1].type==="content"&&e.splice(r,1),!a&&e[r][1].type==="definition"&&(a=r);let i={type:"setextHeading",start:Object.assign({},e[n][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[n][1].type="setextHeadingText",a?(e.splice(n,0,["enter",i,t]),e.splice(a+1,0,["exit",e[o][1],t]),e[o][1].end=Object.assign({},e[a][1].end)):e[o][1]=i,e.push(["exit",i,t]),e}function k7(e,t,r){let o=this,n;return a;function a(p){let c=o.events.length,d;for(;c--;)if(o.events[c][1].type!=="lineEnding"&&o.events[c][1].type!=="linePrefix"&&o.events[c][1].type!=="content"){d=o.events[c][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||d)?(e.enter("setextHeadingLine"),n=p,i(p)):r(p)}function i(p){return e.enter("setextHeadingLineSequence"),s(p)}function s(p){return p===n?(e.consume(p),s):(e.exit("setextHeadingLineSequence"),je(p)?Ue(e,l,"lineSuffix")(p):l(p))}function l(p){return p===null||_e(p)?(e.exit("setextHeadingLine"),t(p)):r(p)}}var vO={tokenize:S7};function S7(e){let t=this,r=e.attempt(oi,o,e.attempt(this.parser.constructs.flowInitial,n,Ue(e,e.attempt(this.parser.constructs.flow,n,e.attempt(rx,n)),"linePrefix")));return r;function o(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function n(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,r}}var bO={resolveAll:CO()},xO=PO("string"),TO=PO("text");function PO(e){return{tokenize:t,resolveAll:CO(e==="text"?R7:void 0)};function t(r){let o=this,n=this.parser.constructs[e],a=r.attempt(n,i,s);return i;function i(c){return p(c)?a(c):s(c)}function s(c){if(c===null){r.consume(c);return}return r.enter("data"),r.consume(c),l}function l(c){return p(c)?(r.exit("data"),a(c)):(r.consume(c),l)}function p(c){if(c===null)return!0;let d=n[c],f=-1;if(d)for(;++f<d.length;){let u=d[f];if(!u.previous||u.previous.call(o,o.previous))return!0}return!1}}}function CO(e){return t;function t(r,o){let n=-1,a;for(;++n<=r.length;)a===void 0?r[n]&&r[n][1].type==="data"&&(a=n,n++):(!r[n]||r[n][1].type!=="data")&&(n!==a+2&&(r[a][1].end=r[n-1][1].end,r.splice(a+2,n-a-2),n=a+2),a=void 0);return e?e(r,o):r}}function R7(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){let o=e[r-1][1],n=t.sliceStream(o),a=n.length,i=-1,s=0,l;for(;a--;){let p=n[a];if(typeof p=="string"){for(i=p.length;p.charCodeAt(i-1)===32;)s++,i--;if(i)break;i=-1}else if(p===-2)l=!0,s++;else if(p!==-1){a++;break}}if(s){let p={type:r===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{line:o.end.line,column:o.end.column-s,offset:o.end.offset-s,_index:o.start._index+a,_bufferIndex:a?i:o.start._bufferIndex+i},end:Object.assign({},o.end)};o.end=Object.assign({},p.start),o.start.offset===o.end.offset?Object.assign(o,p):(e.splice(r,0,["enter",p,t],["exit",p,t]),r+=2)}r++}return e}function kO(e,t,r){let o=Object.assign(r?Object.assign({},r):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1}),n={},a=[],i=[],s=[],l=!0,p={consume:k,enter:P,exit:T,attempt:I(C),check:I(S),interrupt:I(S,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:y,sliceSerialize:h,now:v,defineSkip:g,write:u},d=t.tokenize.call(c,p),f;return t.resolveAll&&a.push(t),c;function u(w){return i=$r(i,w),x(),i[i.length-1]!==null?[]:(O(t,0),c.events=Fl(a,c.events,c),c.events)}function h(w,H){return I7(y(w),H)}function y(w){return E7(i,w)}function v(){let{line:w,column:H,offset:N,_index:D,_bufferIndex:z}=o;return{line:w,column:H,offset:N,_index:D,_bufferIndex:z}}function g(w){n[w.line]=w.column,M()}function x(){let w;for(;o._index<i.length;){let H=i[o._index];if(typeof H=="string")for(w=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===w&&o._bufferIndex<H.length;)b(H.charCodeAt(o._bufferIndex));else b(H)}}function b(w){l=void 0,f=w,d=d(w)}function k(w){_e(w)?(o.line++,o.column=1,o.offset+=w===-3?2:1,M()):w!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===i[o._index].length&&(o._bufferIndex=-1,o._index++)),c.previous=w,l=!0}function P(w,H){let N=H||{};return N.type=w,N.start=v(),c.events.push(["enter",N,c]),s.push(N),N}function T(w){let H=s.pop();return H.end=v(),c.events.push(["exit",H,c]),H}function C(w,H){O(w,H.from)}function S(w,H){H.restore()}function I(w,H){return N;function N(D,z,Y){let V,R,ee,ne;return Array.isArray(D)?pe(D):"tokenize"in D?pe([D]):_(D);function _(W){return de;function de(fe){let ke=fe!==null&&W[fe],ve=fe!==null&&W.null,Fe=[...Array.isArray(ke)?ke:ke?[ke]:[],...Array.isArray(ve)?ve:ve?[ve]:[]];return pe(Fe)(fe)}}function pe(W){return V=W,R=0,W.length===0?Y:ge(W[R])}function ge(W){return de;function de(fe){return ne=L(),ee=W,W.partial||(c.currentConstruct=W),W.name&&c.parser.constructs.disable.null.includes(W.name)?ie(fe):W.tokenize.call(H?Object.assign(Object.create(c),H):c,p,De,ie)(fe)}}function De(W){return l=!0,w(ee,ne),z}function ie(W){return l=!0,ne.restore(),++R<V.length?ge(V[R]):Y}}}function O(w,H){w.resolveAll&&!a.includes(w)&&a.push(w),w.resolve&&wr(c.events,H,c.events.length-H,w.resolve(c.events.slice(H),c)),w.resolveTo&&(c.events=w.resolveTo(c.events,c))}function L(){let w=v(),H=c.previous,N=c.currentConstruct,D=c.events.length,z=Array.from(s);return{restore:Y,from:D};function Y(){o=w,c.previous=H,c.currentConstruct=N,c.events.length=D,s=z,M()}}function M(){o.line in n&&o.column<2&&(o.column=n[o.line],o.offset+=n[o.line]-1)}}function E7(e,t){let r=t.start._index,o=t.start._bufferIndex,n=t.end._index,a=t.end._bufferIndex,i;if(r===n)i=[e[r].slice(o,a)];else{if(i=e.slice(r,n),o>-1){let s=i[0];typeof s=="string"?i[0]=s.slice(o):i.shift()}a>0&&i.push(e[n].slice(0,a))}return i}function I7(e,t){let r=-1,o=[],n;for(;++r<e.length;){let a=e[r],i;if(typeof a=="string")i=a;else switch(a){case-5:{i="\r";break}case-4:{i=`
|
|
131
131
|
`;break}case-3:{i=`\r
|
|
132
132
|
`;break}case-2:{i=t?" ":" ";break}case-1:{if(!t&&n)continue;i=" ";break}default:i=String.fromCharCode(a)}n=a===-2,o.push(i)}return o.join("")}var ux={};iT(ux,{attentionMarkers:()=>L7,contentInitial:()=>_7,disable:()=>B7,document:()=>O7,flow:()=>D7,flowInitial:()=>w7,insideSpan:()=>N7,string:()=>A7,text:()=>M7});var O7={42:Dr,43:Dr,45:Dr,48:Dr,49:Dr,50:Dr,51:Dr,52:Dr,53:Dr,54:Dr,55:Dr,56:Dr,57:Dr,62:ch},_7={91:ox},w7={[-2]:tu,[-1]:tu,32:tu},D7={35:ax,42:as,45:[bh,as],60:sx,61:bh,95:as,96:fh,126:fh},A7={38:dh,92:uh},M7={[-5]:ou,[-4]:ou,[-3]:ou,33:px,38:dh,42:eu,60:[ex,lx],91:cx,92:[nx,uh],93:ns,95:eu,96:tx},N7={null:[eu,bO]},L7={null:[42,95]},B7={null:[]};function dx(e){let r=iO([ux,...(e||{}).extensions||[]]),o={defined:[],lazy:{},constructs:r,content:n(dO),document:n(mO),flow:n(vO),string:n(xO),text:n(TO)};return o;function n(a){return i;function i(s){return kO(o,a,s)}}}function fx(e){for(;!hh(e););return e}var SO=/[\0\t\n\r]/g;function mx(){let e=1,t="",r=!0,o;return n;function n(a,i,s){let l=[],p,c,d,f,u;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(i||void 0).decode(a)),d=0,t="",r&&(a.charCodeAt(0)===65279&&d++,r=void 0);d<a.length;){if(SO.lastIndex=d,p=SO.exec(a),f=p&&p.index!==void 0?p.index:a.length,u=a.charCodeAt(f),!p){t=a.slice(d);break}if(u===10&&d===f&&o)l.push(-3),o=void 0;else switch(o&&(l.push(-5),o=void 0),d<f&&(l.push(a.slice(d,f)),e+=f-d),u){case 0:{l.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,l.push(-2);e++<c;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:o=!0,e=1}d=f+1}return s&&(o&&l.push(-5),t&&l.push(t),l.push(null)),l}}var z7=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function RO(e){return e.replace(z7,F7)}function F7(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){let n=r.charCodeAt(1),a=n===120||n===88;return ph(r.slice(a?2:1),a?16:10)}return zl(r)||e}var IO={}.hasOwnProperty;function hx(e,t,r){return typeof t!="string"&&(r=t,t=void 0),$7(r)(fx(dx(r).document().write(mx()(e,t,!0))))}function $7(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(be),autolinkProtocol:I,autolinkEmail:I,atxHeading:a(Je),blockQuote:a(de),characterEscape:I,characterReference:I,codeFenced:a(fe),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:a(fe,i),codeText:a(ke,i),codeTextData:I,data:I,codeFlowValue:I,definition:a(ve),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:a(Fe),hardBreakEscape:a(te),hardBreakTrailing:a(te),htmlFlow:a(Q,i),htmlFlowData:I,htmlText:a(Q,i),htmlTextData:I,image:a(he),label:i,link:a(be),listItem:a(we),listItemValue:f,listOrdered:a($e,d),listUnordered:a($e),paragraph:a(Ae),reference:_,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:a(Je),strong:a(Le),thematicBreak:a(it)},exit:{atxHeading:l(),atxHeadingSequence:P,autolink:l(),autolinkEmail:W,autolinkProtocol:ie,blockQuote:l(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:ge,characterReferenceMarkerNumeric:ge,characterReferenceValue:De,codeFenced:l(v),codeFencedFence:y,codeFencedFenceInfo:u,codeFencedFenceMeta:h,codeFlowValue:O,codeIndented:l(g),codeText:l(N),codeTextData:O,data:O,definition:l(),definitionDestinationString:k,definitionLabelString:x,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(M),hardBreakTrailing:l(M),htmlFlow:l(w),htmlFlowData:O,htmlText:l(H),htmlTextData:O,image:l(z),label:V,labelText:Y,lineEnding:L,link:l(D),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:pe,resourceDestinationString:R,resourceTitleString:ee,resource:ne,setextHeading:l(S),setextHeadingLineSequence:C,setextHeadingText:T,strong:l(),thematicBreak:l()}};OO(t,(e||{}).mdastExtensions||[]);let r={};return o;function o(K){let ue={type:"root",children:[]},Pe={stack:[ue],tokenStack:[],config:t,enter:s,exit:p,buffer:i,resume:c,data:r},U=[],G=-1;for(;++G<K.length;)if(K[G][1].type==="listOrdered"||K[G][1].type==="listUnordered")if(K[G][0]==="enter")U.push(G);else{let se=U.pop();G=n(K,se,G)}for(G=-1;++G<K.length;){let se=t[K[G][0]];IO.call(se,K[G][1].type)&&se[K[G][1].type].call(Object.assign({sliceSerialize:K[G][2].sliceSerialize},Pe),K[G][1])}if(Pe.tokenStack.length>0){let se=Pe.tokenStack[Pe.tokenStack.length-1];(se[1]||EO).call(Pe,void 0,se[0])}for(ue.position={start:ni(K.length>0?K[0][1].start:{line:1,column:1,offset:0}),end:ni(K.length>0?K[K.length-2][1].end:{line:1,column:1,offset:0})},G=-1;++G<t.transforms.length;)ue=t.transforms[G](ue)||ue;return ue}function n(K,ue,Pe){let U=ue-1,G=-1,se=!1,Ie,ae,oe,Se;for(;++U<=Pe;){let Me=K[U];switch(Me[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Me[0]==="enter"?G++:G--,Se=void 0;break}case"lineEndingBlank":{Me[0]==="enter"&&(Ie&&!Se&&!G&&!oe&&(oe=U),Se=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Se=void 0}if(!G&&Me[0]==="enter"&&Me[1].type==="listItemPrefix"||G===-1&&Me[0]==="exit"&&(Me[1].type==="listUnordered"||Me[1].type==="listOrdered")){if(Ie){let nt=U;for(ae=void 0;nt--;){let qe=K[nt];if(qe[1].type==="lineEnding"||qe[1].type==="lineEndingBlank"){if(qe[0]==="exit")continue;ae&&(K[ae][1].type="lineEndingBlank",se=!0),qe[1].type="lineEnding",ae=nt}else if(!(qe[1].type==="linePrefix"||qe[1].type==="blockQuotePrefix"||qe[1].type==="blockQuotePrefixWhitespace"||qe[1].type==="blockQuoteMarker"||qe[1].type==="listItemIndent"))break}oe&&(!ae||oe<ae)&&(Ie._spread=!0),Ie.end=Object.assign({},ae?K[ae][1].start:Me[1].end),K.splice(ae||U,0,["exit",Ie,Me[2]]),U++,Pe++}if(Me[1].type==="listItemPrefix"){let nt={type:"listItem",_spread:!1,start:Object.assign({},Me[1].start),end:void 0};Ie=nt,K.splice(U,0,["enter",nt,Me[2]]),U++,Pe++,oe=void 0,Se=!0}}}return K[ue][1]._spread=se,Pe}function a(K,ue){return Pe;function Pe(U){s.call(this,K(U),U),ue&&ue.call(this,U)}}function i(){this.stack.push({type:"fragment",children:[]})}function s(K,ue,Pe){this.stack[this.stack.length-1].children.push(K),this.stack.push(K),this.tokenStack.push([ue,Pe]),K.position={start:ni(ue.start),end:void 0}}function l(K){return ue;function ue(Pe){K&&K.call(this,Pe),p.call(this,Pe)}}function p(K,ue){let Pe=this.stack.pop(),U=this.tokenStack.pop();if(U)U[0].type!==K.type&&(ue?ue.call(this,K,U[0]):(U[1]||EO).call(this,K,U[0]));else throw new Error("Cannot close `"+K.type+"` ("+ti({start:K.start,end:K.end})+"): it\u2019s not open");Pe.position.end=ni(K.end)}function c(){return Zb(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(K){if(this.data.expectingFirstListItemValue){let ue=this.stack[this.stack.length-2];ue.start=Number.parseInt(this.sliceSerialize(K),10),this.data.expectingFirstListItemValue=void 0}}function u(){let K=this.resume(),ue=this.stack[this.stack.length-1];ue.lang=K}function h(){let K=this.resume(),ue=this.stack[this.stack.length-1];ue.meta=K}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){let K=this.resume(),ue=this.stack[this.stack.length-1];ue.value=K.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){let K=this.resume(),ue=this.stack[this.stack.length-1];ue.value=K.replace(/(\r?\n|\r)$/g,"")}function x(K){let ue=this.resume(),Pe=this.stack[this.stack.length-1];Pe.label=ue,Pe.identifier=ra(this.sliceSerialize(K)).toLowerCase()}function b(){let K=this.resume(),ue=this.stack[this.stack.length-1];ue.title=K}function k(){let K=this.resume(),ue=this.stack[this.stack.length-1];ue.url=K}function P(K){let ue=this.stack[this.stack.length-1];if(!ue.depth){let Pe=this.sliceSerialize(K).length;ue.depth=Pe}}function T(){this.data.setextHeadingSlurpLineEnding=!0}function C(K){let ue=this.stack[this.stack.length-1];ue.depth=this.sliceSerialize(K).codePointAt(0)===61?1:2}function S(){this.data.setextHeadingSlurpLineEnding=void 0}function I(K){let Pe=this.stack[this.stack.length-1].children,U=Pe[Pe.length-1];(!U||U.type!=="text")&&(U=Ge(),U.position={start:ni(K.start),end:void 0},Pe.push(U)),this.stack.push(U)}function O(K){let ue=this.stack.pop();ue.value+=this.sliceSerialize(K),ue.position.end=ni(K.end)}function L(K){let ue=this.stack[this.stack.length-1];if(this.data.atHardBreak){let Pe=ue.children[ue.children.length-1];Pe.position.end=ni(K.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ue.type)&&(I.call(this,K),O.call(this,K))}function M(){this.data.atHardBreak=!0}function w(){let K=this.resume(),ue=this.stack[this.stack.length-1];ue.value=K}function H(){let K=this.resume(),ue=this.stack[this.stack.length-1];ue.value=K}function N(){let K=this.resume(),ue=this.stack[this.stack.length-1];ue.value=K}function D(){let K=this.stack[this.stack.length-1];if(this.data.inReference){let ue=this.data.referenceType||"shortcut";K.type+="Reference",K.referenceType=ue,delete K.url,delete K.title}else delete K.identifier,delete K.label;this.data.referenceType=void 0}function z(){let K=this.stack[this.stack.length-1];if(this.data.inReference){let ue=this.data.referenceType||"shortcut";K.type+="Reference",K.referenceType=ue,delete K.url,delete K.title}else delete K.identifier,delete K.label;this.data.referenceType=void 0}function Y(K){let ue=this.sliceSerialize(K),Pe=this.stack[this.stack.length-2];Pe.label=RO(ue),Pe.identifier=ra(ue).toLowerCase()}function V(){let K=this.stack[this.stack.length-1],ue=this.resume(),Pe=this.stack[this.stack.length-1];if(this.data.inReference=!0,Pe.type==="link"){let U=K.children;Pe.children=U}else Pe.alt=ue}function R(){let K=this.resume(),ue=this.stack[this.stack.length-1];ue.url=K}function ee(){let K=this.resume(),ue=this.stack[this.stack.length-1];ue.title=K}function ne(){this.data.inReference=void 0}function _(){this.data.referenceType="collapsed"}function pe(K){let ue=this.resume(),Pe=this.stack[this.stack.length-1];Pe.label=ue,Pe.identifier=ra(this.sliceSerialize(K)).toLowerCase(),this.data.referenceType="full"}function ge(K){this.data.characterReferenceType=K.type}function De(K){let ue=this.sliceSerialize(K),Pe=this.data.characterReferenceType,U;Pe?(U=ph(ue,Pe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):U=zl(ue);let G=this.stack.pop();G.value+=U,G.position.end=ni(K.end)}function ie(K){O.call(this,K);let ue=this.stack[this.stack.length-1];ue.url=this.sliceSerialize(K)}function W(K){O.call(this,K);let ue=this.stack[this.stack.length-1];ue.url="mailto:"+this.sliceSerialize(K)}function de(){return{type:"blockquote",children:[]}}function fe(){return{type:"code",lang:null,meta:null,value:""}}function ke(){return{type:"inlineCode",value:""}}function ve(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Fe(){return{type:"emphasis",children:[]}}function Je(){return{type:"heading",depth:0,children:[]}}function te(){return{type:"break"}}function Q(){return{type:"html",value:""}}function he(){return{type:"image",title:null,url:"",alt:null}}function be(){return{type:"link",title:null,url:"",children:[]}}function $e(K){return{type:"list",ordered:K.type==="listOrdered",start:null,spread:K._spread,children:[]}}function we(K){return{type:"listItem",spread:K._spread,checked:null,children:[]}}function Ae(){return{type:"paragraph",children:[]}}function Le(){return{type:"strong",children:[]}}function Ge(){return{type:"text",value:""}}function it(){return{type:"thematicBreak"}}}function ni(e){return{line:e.line,column:e.column,offset:e.offset}}function OO(e,t){let r=-1;for(;++r<t.length;){let o=t[r];Array.isArray(o)?OO(e,o):V7(e,o)}}function V7(e,t){let r;for(r in t)if(IO.call(t,r))switch(r){case"canContainEols":{let o=t[r];o&&e[r].push(...o);break}case"transforms":{let o=t[r];o&&e[r].push(...o);break}case"enter":case"exit":{let o=t[r];o&&Object.assign(e[r],o);break}}}function EO(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ti({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ti({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ti({start:t.start,end:t.end})+") is still open")}function xh(e){let t=this;t.parser=r;function r(o){return hx(o,ce(j(j({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function _O(e,t){let r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function wO(e,t){let r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
|
|
133
133
|
`}]}function DO(e,t){let r=t.value?t.value+`
|