@3sc/common-component 0.0.90 → 0.0.91

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.umd.js CHANGED
@@ -237,7 +237,7 @@ const theme2 = createTheme({ palette: {
237
237
  ${e.palette.mode==="light"?El(Be(e.palette.divider,1),.88):Tl(Be(e.palette.divider,1),.68)}`,textAlign:"left",padding:16},t.variant==="head"&&{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium},t.variant==="body"&&{color:(e.vars||e).palette.text.primary},t.variant==="footer"&&{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},t.size==="small"&&{padding:"6px 16px",[`&.${xc.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},t.padding==="checkbox"&&{width:48,padding:"0 0 0 4px"},t.padding==="none"&&{padding:0},t.align==="left"&&{textAlign:"left"},t.align==="center"&&{textAlign:"center"},t.align==="right"&&{textAlign:"right",flexDirection:"row-reverse"},t.align==="justify"&&{textAlign:"justify"},t.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default})),Cc=E.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiTableCell"}),{align:r="inherit",className:s,component:a,padding:l,scope:c,size:u,sortDirection:d,variant:p}=o,h=ne(o,AR),g=E.useContext(bc),m=E.useContext(ri),f=m&&m.variant==="head";let b;a?b=a:b=f?"th":"td";let v=c;b==="td"?v=void 0:!v&&f&&(v="col");const S=p||m&&m.variant,T=C({},o,{align:r,component:b,padding:l||(g&&g.padding?g.padding:"normal"),size:u||(g&&g.size?g.size:"medium"),sortDirection:d,stickyHeader:S==="head"&&g&&g.stickyHeader,variant:S}),I=RR(T);let y=null;return d&&(y=d==="asc"?"ascending":"descending"),x.jsx(OR,C({as:b,ref:n,className:re(I.root,s),"aria-sort":y,scope:v,ownerState:T},h))});process.env.NODE_ENV!=="production"&&(Cc.propTypes={align:i.oneOf(["center","inherit","justify","left","right"]),children:i.node,classes:i.object,className:i.string,component:i.elementType,padding:i.oneOf(["checkbox","none","normal"]),scope:i.string,size:i.oneOfType([i.oneOf(["medium","small"]),i.string]),sortDirection:i.oneOf(["asc","desc",!1]),sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object]),variant:i.oneOfType([i.oneOf(["body","footer","head"]),i.string])});function PR(e){return ye("MuiTableContainer",e)}xe("MuiTableContainer",["root"]);const NR=["className","component"],MR=e=>{const{classes:t}=e;return Ee({root:["root"]},PR,t)},kR=Y("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),xm=E.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiTableContainer"}),{className:r,component:s="div"}=o,a=ne(o,NR),l=C({},o,{component:s}),c=MR(l);return x.jsx(kR,C({ref:n,as:s,className:re(c.root,r),ownerState:l},a))});process.env.NODE_ENV!=="production"&&(xm.propTypes={children:i.node,classes:i.object,className:i.string,component:i.elementType,sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object])});function DR(e){return ye("MuiTableHead",e)}xe("MuiTableHead",["root"]);const BR=["className","component"],FR=e=>{const{classes:t}=e;return Ee({root:["root"]},DR,t)},jR=Y("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),VR={variant:"head"},Cm="thead",Tc=E.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiTableHead"}),{className:r,component:s=Cm}=o,a=ne(o,BR),l=C({},o,{component:s}),c=FR(l);return x.jsx(ri.Provider,{value:VR,children:x.jsx(jR,C({as:s,className:re(c.root,r),ref:n,role:s===Cm?null:"rowgroup",ownerState:l},a))})});process.env.NODE_ENV!=="production"&&(Tc.propTypes={children:i.node,classes:i.object,className:i.string,component:i.elementType,sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object])});const LR=Qt(x.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),_R=Qt(x.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function $R(e){return ye("MuiTableRow",e)}const Tm=xe("MuiTableRow",["root","selected","hover","head","footer"]),WR=["className","component","hover","selected"],GR=e=>{const{classes:t,selected:n,hover:o,head:r,footer:s}=e;return Ee({root:["root",n&&"selected",o&&"hover",r&&"head",s&&"footer"]},$R,t)},zR=Y("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.head&&t.head,n.footer&&t.footer]}})(({theme:e})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${Tm.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Tm.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Be(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Be(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)}}})),Em="tr",ii=E.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiTableRow"}),{className:r,component:s=Em,hover:a=!1,selected:l=!1}=o,c=ne(o,WR),u=E.useContext(ri),d=C({},o,{component:s,hover:a,selected:l,head:u&&u.variant==="head",footer:u&&u.variant==="footer"}),p=GR(d);return x.jsx(zR,C({as:s,ref:n,className:re(p.root,r),role:s===Em?null:"row",ownerState:d},c))});process.env.NODE_ENV!=="production"&&(ii.propTypes={children:i.node,classes:i.object,className:i.string,component:i.elementType,hover:i.bool,selected:i.bool,sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object])});function HR(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function XR(e,t,n,o={},r=()=>{}){const{ease:s=HR,duration:a=300}=o;let l=null;const c=t[e];let u=!1;const d=()=>{u=!0},p=h=>{if(u){r(new Error("Animation cancelled"));return}l===null&&(l=h);const g=Math.min(1,(h-l)/a);if(t[e]=s(g)*(n-c)+c,g>=1){requestAnimationFrame(()=>{r(null)});return}requestAnimationFrame(p)};return c===n?(r(new Error("Element already at target position")),d):(requestAnimationFrame(p),d)}const UR=["onChange"],ZR={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function Im(e){const{onChange:t}=e,n=ne(e,UR),o=E.useRef(),r=E.useRef(null),s=()=>{o.current=r.current.offsetHeight-r.current.clientHeight};return En(()=>{const a=ns(()=>{const c=o.current;s(),c!==o.current&&t(o.current)}),l=Dn(r.current);return l.addEventListener("resize",a),()=>{a.clear(),l.removeEventListener("resize",a)}},[t]),E.useEffect(()=>{s(),t(o.current)},[t]),x.jsx("div",C({style:ZR},n,{ref:r}))}process.env.NODE_ENV!=="production"&&(Im.propTypes={onChange:i.func.isRequired});function YR(e){return ye("MuiTabScrollButton",e)}const JR=xe("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),qR=["className","slots","slotProps","direction","orientation","disabled"],KR=e=>{const{classes:t,orientation:n,disabled:o}=e;return Ee({root:["root",n,o&&"disabled"]},YR,t)},QR=Y(wn,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})(({ownerState:e})=>C({width:40,flexShrink:0,opacity:.8,[`&.${JR.disabled}`]:{opacity:0}},e.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}})),Sm=E.forwardRef(function(t,n){var o,r;const s=Ie({props:t,name:"MuiTabScrollButton"}),{className:a,slots:l={},slotProps:c={},direction:u}=s,d=ne(s,qR),p=Lr(),h=C({isRtl:p},s),g=KR(h),m=(o=l.StartScrollButtonIcon)!=null?o:LR,f=(r=l.EndScrollButtonIcon)!=null?r:_R,b=Vt({elementType:m,externalSlotProps:c.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:h}),v=Vt({elementType:f,externalSlotProps:c.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:h});return x.jsx(QR,C({component:"div",className:re(g.root,a),ref:n,role:null,ownerState:h,tabIndex:null},d,{children:u==="left"?x.jsx(m,C({},b)):x.jsx(f,C({},v))}))});process.env.NODE_ENV!=="production"&&(Sm.propTypes={children:i.node,classes:i.object,className:i.string,direction:i.oneOf(["left","right"]).isRequired,disabled:i.bool,orientation:i.oneOf(["horizontal","vertical"]).isRequired,slotProps:i.shape({endScrollButtonIcon:i.oneOfType([i.func,i.object]),startScrollButtonIcon:i.oneOfType([i.func,i.object])}),slots:i.shape({EndScrollButtonIcon:i.elementType,StartScrollButtonIcon:i.elementType}),sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object])});function eO(e){return ye("MuiTabs",e)}const Ec=xe("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),tO=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],wm=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,Am=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,Gs=(e,t,n)=>{let o=!1,r=n(e,t);for(;r;){if(r===e.firstChild){if(o)return;o=!0}const s=r.disabled||r.getAttribute("aria-disabled")==="true";if(!r.hasAttribute("tabindex")||s)r=n(e,r);else{r.focus();return}}},nO=e=>{const{vertical:t,fixed:n,hideScrollbar:o,scrollableX:r,scrollableY:s,centered:a,scrollButtonsHideMobile:l,classes:c}=e;return Ee({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",o&&"hideScrollbar",r&&"scrollableX",s&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",l&&"scrollButtonsHideMobile"],scrollableX:[r&&"scrollableX"],hideScrollbar:[o&&"hideScrollbar"]},eO,c)},oO=Y("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Ec.scrollButtons}`]:t.scrollButtons},{[`& .${Ec.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(({ownerState:e,theme:t})=>C({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{[`& .${Ec.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}})),rO=Y("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})(({ownerState:e})=>C({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),iO=Y("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})(({ownerState:e})=>C({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"})),sO=Y("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(({ownerState:e,theme:t})=>C({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},e.indicatorColor==="primary"&&{backgroundColor:(t.vars||t).palette.primary.main},e.indicatorColor==="secondary"&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0})),aO=Y(Im)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),Rm={};let Om=!1;const Pm=E.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiTabs"}),r=ut(),s=Lr(),{"aria-label":a,"aria-labelledby":l,action:c,centered:u=!1,children:d,className:p,component:h="div",allowScrollButtonsMobile:g=!1,indicatorColor:m="primary",onChange:f,orientation:b="horizontal",ScrollButtonComponent:v=Sm,scrollButtons:S="auto",selectionFollowsFocus:T,slots:I={},slotProps:y={},TabIndicatorProps:w={},TabScrollButtonProps:A={},textColor:R="primary",value:N,variant:P="standard",visibleScrollbar:F=!1}=o,G=ne(o,tO),j=P==="scrollable",L=b==="vertical",_=L?"scrollTop":"scrollLeft",V=L?"top":"left",$=L?"bottom":"right",D=L?"clientHeight":"clientWidth",X=L?"height":"width",k=C({},o,{component:h,allowScrollButtonsMobile:g,indicatorColor:m,orientation:b,vertical:L,scrollButtons:S,textColor:R,variant:P,visibleScrollbar:F,fixed:!j,hideScrollbar:j&&!F,scrollableX:j&&!L,scrollableY:j&&L,centered:u&&!j,scrollButtonsHideMobile:!g}),z=nO(k),Z=Vt({elementType:I.StartScrollButtonIcon,externalSlotProps:y.startScrollButtonIcon,ownerState:k}),Q=Vt({elementType:I.EndScrollButtonIcon,externalSlotProps:y.endScrollButtonIcon,ownerState:k});process.env.NODE_ENV!=="production"&&u&&j&&console.error('MUI: You can not use the `centered={true}` and `variant="scrollable"` properties at the same time on a `Tabs` component.');const[U,ee]=E.useState(!1),[J,oe]=E.useState(Rm),[te,ie]=E.useState(!1),[ce,le]=E.useState(!1),[B,ue]=E.useState(!1),[fe,ge]=E.useState({overflow:"hidden",scrollbarWidth:0}),He=new Map,Xe=E.useRef(null),Oe=E.useRef(null),ot=()=>{const q=Xe.current;let se;if(q){const Re=q.getBoundingClientRect();se={clientWidth:q.clientWidth,scrollLeft:q.scrollLeft,scrollTop:q.scrollTop,scrollLeftNormalized:V1(q,s?"rtl":"ltr"),scrollWidth:q.scrollWidth,top:Re.top,bottom:Re.bottom,left:Re.left,right:Re.right}}let Se;if(q&&N!==!1){const Re=Oe.current.children;if(Re.length>0){const qe=Re[He.get(N)];process.env.NODE_ENV!=="production"&&(qe||console.error(["MUI: The `value` provided to the Tabs component is invalid.",`None of the Tabs' children match with "${N}".`,He.keys?`You can provide one of the following values: ${Array.from(He.keys()).join(", ")}.`:null].join(`
238
238
  `))),Se=qe?qe.getBoundingClientRect():null,process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&!Om&&Se&&Se.width===0&&Se.height===0&&se.clientWidth!==0&&(se=null,console.error(["MUI: The `value` provided to the Tabs component is invalid.",`The Tab with this \`value\` ("${N}") is not part of the document layout.`,"Make sure the tab item is present in the document or that it's not `display: none`."].join(`
239
239
  `)),Om=!0)}}return{tabsMeta:se,tabMeta:Se}},je=hn(()=>{const{tabsMeta:q,tabMeta:se}=ot();let Se=0,Re;if(L)Re="top",se&&q&&(Se=se.top-q.top+q.scrollTop);else if(Re=s?"right":"left",se&&q){const vt=s?q.scrollLeftNormalized+q.clientWidth-q.scrollWidth:q.scrollLeft;Se=(s?-1:1)*(se[Re]-q[Re]+vt)}const qe={[Re]:Se,[X]:se?se[X]:0};if(isNaN(J[Re])||isNaN(J[X]))oe(qe);else{const vt=Math.abs(J[Re]-qe[Re]),xt=Math.abs(J[X]-qe[X]);(vt>=1||xt>=1)&&oe(qe)}}),Ne=(q,{animation:se=!0}={})=>{se?XR(_,Xe.current,q,{duration:r.transitions.duration.standard}):Xe.current[_]=q},Je=q=>{let se=Xe.current[_];L?se+=q:(se+=q*(s?-1:1),se*=s&&rf()==="reverse"?-1:1),Ne(se)},et=()=>{const q=Xe.current[D];let se=0;const Se=Array.from(Oe.current.children);for(let Re=0;Re<Se.length;Re+=1){const qe=Se[Re];if(se+qe[D]>q){Re===0&&(se=q);break}se+=qe[D]}return se},ke=()=>{Je(-1*et())},rt=()=>{Je(et())},bt=E.useCallback(q=>{ge({overflow:null,scrollbarWidth:q})},[]),pt=()=>{const q={};q.scrollbarSizeListener=j?x.jsx(aO,{onChange:bt,className:re(z.scrollableX,z.hideScrollbar)}):null;const Se=j&&(S==="auto"&&(te||ce)||S===!0);return q.scrollButtonStart=Se?x.jsx(v,C({slots:{StartScrollButtonIcon:I.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:Z},orientation:b,direction:s?"right":"left",onClick:ke,disabled:!te},A,{className:re(z.scrollButtons,A.className)})):null,q.scrollButtonEnd=Se?x.jsx(v,C({slots:{EndScrollButtonIcon:I.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:Q},orientation:b,direction:s?"left":"right",onClick:rt,disabled:!ce},A,{className:re(z.scrollButtons,A.className)})):null,q},Ae=hn(q=>{const{tabsMeta:se,tabMeta:Se}=ot();if(!(!Se||!se)){if(Se[V]<se[V]){const Re=se[_]+(Se[V]-se[V]);Ne(Re,{animation:q})}else if(Se[$]>se[$]){const Re=se[_]+(Se[$]-se[$]);Ne(Re,{animation:q})}}}),pe=hn(()=>{j&&S!==!1&&ue(!B)});E.useEffect(()=>{const q=ns(()=>{Xe.current&&je()});let se;const Se=vt=>{vt.forEach(xt=>{xt.removedNodes.forEach(un=>{var Bt;(Bt=se)==null||Bt.unobserve(un)}),xt.addedNodes.forEach(un=>{var Bt;(Bt=se)==null||Bt.observe(un)})}),q(),pe()},Re=Dn(Xe.current);Re.addEventListener("resize",q);let qe;return typeof ResizeObserver<"u"&&(se=new ResizeObserver(q),Array.from(Oe.current.children).forEach(vt=>{se.observe(vt)})),typeof MutationObserver<"u"&&(qe=new MutationObserver(Se),qe.observe(Oe.current,{childList:!0})),()=>{var vt,xt;q.clear(),Re.removeEventListener("resize",q),(vt=qe)==null||vt.disconnect(),(xt=se)==null||xt.disconnect()}},[je,pe]),E.useEffect(()=>{const q=Array.from(Oe.current.children),se=q.length;if(typeof IntersectionObserver<"u"&&se>0&&j&&S!==!1){const Se=q[0],Re=q[se-1],qe={root:Xe.current,threshold:.99},vt=Gn=>{ie(!Gn[0].isIntersecting)},xt=new IntersectionObserver(vt,qe);xt.observe(Se);const un=Gn=>{le(!Gn[0].isIntersecting)},Bt=new IntersectionObserver(un,qe);return Bt.observe(Re),()=>{xt.disconnect(),Bt.disconnect()}}},[j,S,B,d==null?void 0:d.length]),E.useEffect(()=>{ee(!0)},[]),E.useEffect(()=>{je()}),E.useEffect(()=>{Ae(Rm!==J)},[Ae,J]),E.useImperativeHandle(c,()=>({updateIndicator:je,updateScrollButtons:pe}),[je,pe]);const tt=x.jsx(sO,C({},w,{className:re(z.indicator,w.className),ownerState:k,style:C({},J,w.style)}));let Tt=0;const Ot=E.Children.map(d,q=>{if(!E.isValidElement(q))return null;process.env.NODE_ENV!=="production"&&co.isFragment(q)&&console.error(["MUI: The Tabs component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
240
- `));const se=q.props.value===void 0?Tt:q.props.value;He.set(se,Tt);const Se=se===N;return Tt+=1,E.cloneElement(q,C({fullWidth:P==="fullWidth",indicator:Se&&!U&&tt,selected:Se,selectionFollowsFocus:T,onChange:f,textColor:R,value:se},Tt===1&&N===!1&&!q.props.tabIndex?{tabIndex:0}:{}))}),cn=q=>{const se=Oe.current,Se=wt(se).activeElement;if(Se.getAttribute("role")!=="tab")return;let qe=b==="horizontal"?"ArrowLeft":"ArrowUp",vt=b==="horizontal"?"ArrowRight":"ArrowDown";switch(b==="horizontal"&&s&&(qe="ArrowRight",vt="ArrowLeft"),q.key){case qe:q.preventDefault(),Gs(se,Se,Am);break;case vt:q.preventDefault(),Gs(se,Se,wm);break;case"Home":q.preventDefault(),Gs(se,null,wm);break;case"End":q.preventDefault(),Gs(se,null,Am);break}},de=pt();return x.jsxs(oO,C({className:re(z.root,p),ownerState:k,ref:n,as:h},G,{children:[de.scrollButtonStart,de.scrollbarSizeListener,x.jsxs(rO,{className:z.scroller,ownerState:k,style:{overflow:fe.overflow,[L?`margin${s?"Left":"Right"}`:"marginBottom"]:F?void 0:-fe.scrollbarWidth},ref:Xe,children:[x.jsx(iO,{"aria-label":a,"aria-labelledby":l,"aria-orientation":b==="vertical"?"vertical":null,className:z.flexContainer,ownerState:k,onKeyDown:cn,ref:Oe,role:"tablist",children:Ot}),U&&tt]}),de.scrollButtonEnd]}))});process.env.NODE_ENV!=="production"&&(Pm.propTypes={action:Nt,allowScrollButtonsMobile:i.bool,"aria-label":i.string,"aria-labelledby":i.string,centered:i.bool,children:i.node,classes:i.object,className:i.string,component:i.elementType,indicatorColor:i.oneOfType([i.oneOf(["primary","secondary"]),i.string]),onChange:i.func,orientation:i.oneOf(["horizontal","vertical"]),ScrollButtonComponent:i.elementType,scrollButtons:i.oneOf(["auto",!1,!0]),selectionFollowsFocus:i.bool,slotProps:i.shape({endScrollButtonIcon:i.oneOfType([i.func,i.object]),startScrollButtonIcon:i.oneOfType([i.func,i.object])}),slots:i.shape({EndScrollButtonIcon:i.elementType,StartScrollButtonIcon:i.elementType}),sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object]),TabIndicatorProps:i.object,TabScrollButtonProps:i.object,textColor:i.oneOf(["inherit","primary","secondary"]),value:i.any,variant:i.oneOf(["fullWidth","scrollable","standard"]),visibleScrollbar:i.bool});function lO(e){return ye("MuiTextField",e)}xe("MuiTextField",["root"]);const cO=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],uO={standard:Vs,filled:js,outlined:_s},dO=e=>{const{classes:t}=e;return Ee({root:["root"]},lO,t)},pO=Y(Lh,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Nm=E.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiTextField"}),{autoComplete:r,autoFocus:s=!1,children:a,className:l,color:c="primary",defaultValue:u,disabled:d=!1,error:p=!1,FormHelperTextProps:h,fullWidth:g=!1,helperText:m,id:f,InputLabelProps:b,inputProps:v,InputProps:S,inputRef:T,label:I,maxRows:y,minRows:w,multiline:A=!1,name:R,onBlur:N,onChange:P,onFocus:F,placeholder:G,required:j=!1,rows:L,select:_=!1,SelectProps:V,type:$,value:D,variant:X="outlined"}=o,k=ne(o,cO),z=C({},o,{autoFocus:s,color:c,disabled:d,error:p,fullWidth:g,multiline:A,required:j,select:_,variant:X}),Z=dO(z);process.env.NODE_ENV!=="production"&&_&&!a&&console.error("MUI: `children` must be passed when using the `TextField` component with `select`.");const Q={};X==="outlined"&&(b&&typeof b.shrink<"u"&&(Q.notched=b.shrink),Q.label=I),_&&((!V||!V.native)&&(Q.id=void 0),Q["aria-describedby"]=void 0);const U=os(f),ee=m&&U?`${U}-helper-text`:void 0,J=I&&U?`${U}-label`:void 0,oe=uO[X],te=x.jsx(oe,C({"aria-describedby":ee,autoComplete:r,autoFocus:s,defaultValue:u,fullWidth:g,multiline:A,name:R,rows:L,maxRows:y,minRows:w,type:$,value:D,id:U,inputRef:T,onBlur:N,onChange:P,onFocus:F,placeholder:G,inputProps:v},Q,S));return x.jsxs(pO,C({className:re(Z.root,l),disabled:d,error:p,fullWidth:g,ref:n,required:j,color:c,variant:X,ownerState:z},k,{children:[I!=null&&I!==""&&x.jsx(zh,C({htmlFor:U,id:J},b,{children:I})),_?x.jsx(gc,C({"aria-describedby":ee,id:U,labelId:J,value:D,input:te},V,{children:a})):te,m&&x.jsx(Wh,C({id:ee},h,{children:m}))]}))});process.env.NODE_ENV!=="production"&&(Nm.propTypes={autoComplete:i.string,autoFocus:i.bool,children:i.node,classes:i.object,className:i.string,color:i.oneOfType([i.oneOf(["primary","secondary","error","info","success","warning"]),i.string]),defaultValue:i.any,disabled:i.bool,error:i.bool,FormHelperTextProps:i.object,fullWidth:i.bool,helperText:i.node,id:i.string,InputLabelProps:i.object,inputProps:i.object,InputProps:i.object,inputRef:Nt,label:i.node,margin:i.oneOf(["dense","none","normal"]),maxRows:i.oneOfType([i.number,i.string]),minRows:i.oneOfType([i.number,i.string]),multiline:i.bool,name:i.string,onBlur:i.func,onChange:i.func,onFocus:i.func,placeholder:i.string,required:i.bool,rows:i.oneOfType([i.number,i.string]),select:i.bool,SelectProps:i.object,size:i.oneOfType([i.oneOf(["medium","small"]),i.string]),sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object]),type:i.string,value:i.any,variant:i.oneOf(["filled","outlined","standard"])});const fO={light:cs({palette:{primary:{appBackground:"#FFFFFF",main:"#f5f7fa",notifyBackground:"#F8FAFB",notifyTextColor:"#525252",notifyActiveText:"#282A2A",notifyBorderColor:"#D0D4DA",notifyTooltipBackground:"#07080B",notifyButtonBackground:"#E6EAEC",notifyActiveBorderColor:"#1D1D1D",notifyIconColor:"#666D80"},brandColor:{blue:"#0166FF",orange:"#E94F1C",grey1:"#595959",main:"#FF6D33",grey3:"#898A93"}},typography:{fontFamily:"Euclid Circular Regular, sans-serif",fontSize:12,fontWeightMedium:"bold",fontWeightRegular:"lighter"},components:{MuiDrawer:{defaultProps:{disableRipple:!0}}}}),dark:cs({palette:{primary:{appBackground:"#101010",main:"#f5f7fa",notifyBackground:"#1D1D1D",notifyTextColor:"#A8A8A8",notifyActiveText:"#FFFFFF",notifyBorderColor:"#313133",notifyTooltipBackground:"#07080B",notifyButtonBackground:"#2C2C2F",notifyActiveBorderColor:"#FFFFFF",notifyIconColor:"#909090"},brandColor:{blue:"#0166FF",orange:"#E94F1C",grey1:"#595959",main:"#FF6D33",grey3:"#898A93"}},typography:{fontFamily:"Euclid Circular Regular, sans-serif",fontSize:12,fontWeightMedium:"bold",fontWeightRegular:"lighter"},components:{MuiDrawer:{defaultProps:{disableRipple:!0}}}})};function Ic({children:e}){var n,o;const t=((o=(n=JSON.parse(localStorage.getItem("settings")))==null?void 0:n.platform)==null?void 0:o.theme)||"light";return x.jsx($f,{theme:fO[t],children:e})}const Mm=M.createContext(null),zs=M.createContext(null);function km({children:e}){const[t,n]=M.useReducer(hO,mO);return x.jsx(Mm.Provider,{value:t,children:x.jsx(zs.Provider,{value:n,children:x.jsx(Ic,{children:e})})})}function hO(e,t){switch(t.type){case Ke.SET_GRID_DATA:return{...e,...t.payload};default:throw new Error(`${pn.UNHANDLED}: ${t}`)}}const mO={visibleGridColumns:[]};km.propTypes={children:i.node.isRequired};const kt={Search:"data:image/svg+xml,%3csvg%20width='16'%20height='15'%20viewBox='0%200%2016%2015'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7.6503%2013.8006C11.3232%2013.8006%2014.3006%2010.8232%2014.3006%207.15029C14.3006%203.47744%2011.3232%200.5%207.6503%200.5C3.97744%200.5%201%203.47744%201%207.15029C1%2010.8232%203.97744%2013.8006%207.6503%2013.8006Z'%20stroke='%23898A93'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M14.9997%2014.5006L13.5996%2013.1006'%20stroke='%23898A93'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Refresh:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.0733%203.38664C6.6533%203.21331%207.2933%203.09998%207.99997%203.09998C11.1933%203.09998%2013.78%205.68664%2013.78%208.87998C13.78%2012.0733%2011.1933%2014.66%207.99997%2014.66C4.80664%2014.66%202.21997%2012.0733%202.21997%208.87998C2.21997%207.69331%202.57997%206.58664%203.1933%205.66664'%20stroke='%232176FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5.2467%203.54671L7.17337%201.33337'%20stroke='%232176FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5.2467%203.54663L7.49337%205.18663'%20stroke='%232176FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Close:"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='12'%20height='12'%20viewBox='0%200%2024%2024'%3e%3ccircle%20cx='12'%20cy='12'%20r='11'%20fill='none'%20stroke='%23E85353'%20stroke-width='2'/%3e%3cpath%20d='M8.5%208.5l7%207M15.5%208.5l-7%207'%20stroke='%23E85353'%20stroke-width='2'/%3e%3c/svg%3e",Unsort:"data:image/svg+xml,%3csvg%20width='10'%20height='10'%20viewBox='0%200%2010%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0.646447%203.24676C0.451184%203.44202%200.451184%203.7586%200.646447%203.95387C0.841709%204.14913%201.15829%204.14913%201.35355%203.95387L0.646447%203.24676ZM3.40012%201.2002H3.90012C3.90012%200.997964%203.7783%200.815646%203.59146%200.738256C3.40462%200.660865%203.18956%200.703643%203.04656%200.846642L3.40012%201.2002ZM2.90012%2010.8007C2.90012%2011.0768%203.12398%2011.3007%203.40012%2011.3007C3.67626%2011.3007%203.90012%2011.0768%203.90012%2010.8007H2.90012ZM9.35377%208.7541C9.54903%208.55884%209.54903%208.24226%209.35377%208.04699C9.15851%207.85173%208.84193%207.85173%208.64666%208.04699L9.35377%208.7541ZM6.6001%2010.8007H6.1001C6.1001%2011.0029%206.22192%2011.1852%206.40876%2011.2626C6.5956%2011.34%206.81065%2011.2972%206.95365%2011.1542L6.6001%2010.8007ZM7.1001%201.2002C7.1001%200.924053%206.87624%200.700195%206.6001%200.700195C6.32396%200.700195%206.1001%200.924053%206.1001%201.2002H7.1001ZM1.35355%203.95387L3.75367%201.55375L3.04656%200.846642L0.646447%203.24676L1.35355%203.95387ZM2.90012%201.2002V10.8007H3.90012V1.2002H2.90012ZM8.64666%208.04699L6.24655%2010.4471L6.95365%2011.1542L9.35377%208.7541L8.64666%208.04699ZM7.1001%2010.8007V1.2002H6.1001V10.8007H7.1001Z'%20fill='%23909090'/%3e%3c/svg%3e",AscSort:"data:image/svg+xml,%3csvg%20width='9'%20height='12'%20viewBox='0%200%209%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8%204.59888L4.5%201.09888L1%204.59888'%20stroke='%23909090'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M4.5%2010.9013V1.19702'%20stroke='%23909090'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",DescSort:"data:image/svg+xml,%3csvg%20width='9'%20height='12'%20viewBox='0%200%209%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1%207.40112L4.5%2010.9011L8%207.40112'%20stroke='%23909090'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M4.5%201.09869L4.5%2010.803'%20stroke='%23909090'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Menu:"data:image/svg+xml,%3csvg%20width='4'%20height='10'%20viewBox='0%200%204%2010'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2%207.5C1.45%207.5%201%207.95%201%208.5C1%209.05%201.45%209.5%202%209.5C2.55%209.5%203%209.05%203%208.5C3%207.95%202.55%207.5%202%207.5Z'%20stroke='%23909090'%20stroke-width='0.7'/%3e%3cpath%20d='M2%204C1.45%204%201%204.45%201%205C1%205.55%201.45%206%202%206C2.55%206%203%205.55%203%205C3%204.45%202.55%204%202%204Z'%20stroke='%23909090'%20stroke-width='0.7'/%3e%3cpath%20d='M2%200.5C1.45%200.5%201%200.95%201%201.5C1%202.05%201.45%202.5%202%202.5C2.55%202.5%203%202.05%203%201.5C3%200.95%202.55%200.5%202%200.5Z'%20stroke='%23909090'%20stroke-width='0.7'/%3e%3c/svg%3e",Manage:"data:image/svg+xml,%3csvg%20width='15'%20height='16'%20viewBox='0%200%2015%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.56152%2012.937V3.06201C6.56152%202.12451%206.16152%201.74951%205.16777%201.74951H2.64277C1.64902%201.74951%201.24902%202.12451%201.24902%203.06201V12.937C1.24902%2013.8745%201.64902%2014.2495%202.64277%2014.2495H5.16777C6.16152%2014.2495%206.56152%2013.8745%206.56152%2012.937Z'%20stroke='%23909090'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M13.75%2012.937V3.06201C13.75%202.12451%2013.35%201.74951%2012.3563%201.74951H9.83125C8.8375%201.74951%208.4375%202.12451%208.4375%203.06201V12.937C8.4375%2013.8745%208.8375%2014.2495%209.83125%2014.2495H12.3563C13.35%2014.2495%2013.75%2013.8745%2013.75%2012.937Z'%20stroke='%23909090'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",ArrowSelectUp:"data:image/svg+xml,%3csvg%20width='10'%20height='5'%20viewBox='0%200%2010%205'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9%200.595703L5.50126%204.09444C5.08807%204.50763%204.41193%204.50763%203.99874%204.09444L0.5%200.595703'%20stroke='%23909090'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",ArrowSelectDown:"data:image/svg+xml,%3csvg%20width='10'%20height='5'%20viewBox='0%200%2010%205'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9%204.4043L5.50126%200.90556C5.08807%200.492365%204.41193%200.492365%203.99874%200.90556L0.5%204.4043'%20stroke='%23909090'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Upload:"data:image/svg+xml,%3csvg%20width='15'%20height='15'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.25016%209.9165V6.4165L4.0835%207.58317'%20stroke='white'%20stroke-width='0.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5.25%206.4165L6.41667%207.58317'%20stroke='white'%20stroke-width='0.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.8332%205.83317V8.74984C12.8332%2011.6665%2011.6665%2012.8332%208.74984%2012.8332H5.24984C2.33317%2012.8332%201.1665%2011.6665%201.1665%208.74984V5.24984C1.1665%202.33317%202.33317%201.1665%205.24984%201.1665H8.1665'%20stroke='white'%20stroke-width='0.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.8332%205.83317H10.4998C8.74984%205.83317%208.1665%205.24984%208.1665%203.49984V1.1665L12.8332%205.83317Z'%20stroke='white'%20stroke-width='0.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Download:"data:image/svg+xml,%3csvg%20width='15'%20height='15'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.25%206.41699V9.91699L6.41667%208.75033'%20stroke='%23909090'%20stroke-width='0.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5.25114%209.91667L4.08447%208.75'%20stroke='%23909090'%20stroke-width='0.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.8322%205.83366V8.75033C12.8322%2011.667%2011.6655%2012.8337%208.74886%2012.8337H5.24886C2.33219%2012.8337%201.16553%2011.667%201.16553%208.75033V5.25033C1.16553%202.33366%202.33219%201.16699%205.24886%201.16699H8.16553'%20stroke='%23909090'%20stroke-width='0.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.8322%205.83366H10.4989C8.74886%205.83366%208.16553%205.25033%208.16553%203.50033V1.16699L12.8322%205.83366Z'%20stroke='%23909090'%20stroke-width='0.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",More:"data:image/svg+xml,%3csvg%20width='15'%20height='16'%20viewBox='0%200%2015%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.4531%202.16699H7.64478C8.07645%202.16699%208.43227%202.52283%208.43227%202.9545V3.81782C8.43227%204.13282%208.23395%204.52366%208.04145%204.722L6.3498%206.21533C6.11647%206.41366%205.95894%206.80449%205.95894%207.11949V8.81117C5.95894%209.0445%205.80145%209.3595%205.60312%209.482L5.05478%209.83782C4.54145%2010.1528%203.8356%209.79699%203.8356%209.16699V7.08449C3.8356%206.81032%203.67811%206.4545%203.52061%206.25616L2.02728%204.68116C1.82895%204.48282%201.67146%204.13282%201.67146%203.89365V2.98949C1.66562%202.52283%202.02144%202.16699%202.4531%202.16699Z'%20stroke='white'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M1.66211%207.99998V9.74998C1.66211%2012.6666%202.82878%2013.8333%205.74544%2013.8333H9.24544C12.1621%2013.8333%2013.3288%2012.6666%2013.3288%209.74998V6.24998C13.3288%204.42998%2012.8738%203.28664%2011.8179%202.69164C11.5204%202.52248%2010.9254%202.39414%2010.3829%202.30664'%20stroke='white'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M8.08789%208.5835H11.0046'%20stroke='white'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M6.91211%2010.9165H10.9954'%20stroke='white'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",ArrowRight:"data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4.45508%209.96028L7.71508%206.70028C8.10008%206.31528%208.10008%205.68528%207.71508%205.30028L4.45508%202.04028'%20stroke='%23A8A8A8'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Cross:"data:image/svg+xml,%3csvg%20width='15'%20height='16'%20viewBox='0%200%2015%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12.2302%203.25244L2.75%2012.7366'%20stroke='white'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.25%2012.75L2.75%203.25'%20stroke='white'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",PaginationLeft:"data:image/svg+xml,%3csvg%20width='7'%20height='11'%20viewBox='0%200%207%2011'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.5%209.96346L1.82547%206.28893C1.39151%205.85497%201.39151%205.14487%201.82547%204.71091L5.5%201.03638'%20stroke='%23909090'%20stroke-width='1.2'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",PaginationRight:"data:image/svg+xml,%3csvg%20width='7'%20height='11'%20viewBox='0%200%207%2011'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.5%209.96346L5.17453%206.28893C5.60849%205.85498%205.60849%205.14487%205.17453%204.71091L1.5%201.03638'%20stroke='%23909090'%20stroke-width='1.2'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e"},Dm=({sortKey:e,sortField:t,sortDir:n,handleSortClick:o})=>{const r=s=>x.jsx(ys,{onClick:o,sx:{padding:"0.5rem"},children:x.jsx(Te,{component:"img",src:s})});return x.jsx(x.Fragment,{children:r(t===e?n==="asc"?kt.AscSort:kt.DescSort:kt.Unsort)})};Dm.propTypes={sortKey:i.string.isRequired,sortField:i.string,sortDir:i.string,handleSortClick:i.func};function Bm({column:e,sort:t,handleMenuClick:n,isManageable:o}){const r=e==null?void 0:e.isMandatory,s=e==null?void 0:e.label,a=e==null?void 0:e.isSortable,l=t==null?void 0:t.sortField,c=t==null?void 0:t.sortDir,u=t==null?void 0:t.onSort;return x.jsxs(Te,{sx:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:"1.1rem"},children:[s,a&&x.jsx(Dm,{sortKey:e==null?void 0:e.key,sortField:l,sortDir:c,handleSortClick:()=>u({column:e,sortDir:c,sortField:l})}),o&&!r&&x.jsx(ys,{onClick:d=>n(d,e),sx:{padding:"0.5rem"},children:x.jsx(Te,{component:"img",src:kt.Menu})})]})}Bm.propTypes={column:i.object.isRequired,sort:i.object.isRequired,handleMenuClick:i.func,isManageable:i.bool};const Sc=e=>{const t=localStorage.getItem(e);return t?JSON.parse(t):""},gO=e=>{const t=new Date,n=new Date(e);let o=t-n;o<0&&(o=0);const r=Math.floor(o/1e3),s=Math.floor(r/60);return r<60?`${r} sec ago`:s<60?`${s} min ago`:n.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0})},wc=e=>e.sort((n,o)=>{let r=new Date(n.createdAt),s=new Date(o.createdAt);return r===s?0:r>s?-1:1}).sort((n,o)=>n.isRead===o.isRead?0:o.isRead?-1:1),bO=e=>{let t=0;for(let n=0;n<e.length;n++)e[n].isRead||t++;return t},vO=e=>{const t=[];return e.forEach(n=>{n.isRead||t.push(n.id)}),t},yO=(e,t,n)=>e.filter(r=>t.some(s=>{var a,l,c;return(c=(a=r[s])==null?void 0:a.toLowerCase())==null?void 0:c.includes((l=n==null?void 0:n.trim())==null?void 0:l.toLowerCase())})),xO=(e,t,n)=>e.sort((r,s)=>n==="asc"?r[t].toLowerCase().localeCompare(s[t].toLowerCase()):s[t].toLowerCase().localeCompare(r[t].toLowerCase())),Ac=(e,t,n)=>e.slice((t-1)*n,t*n),Rc=e=>{var r;const t=JSON.parse(localStorage.getItem("configuration")),n=((r=t==null?void 0:t.entities)==null?void 0:r.labelChannel)||"Channel";return e.split("_").map(s=>s==="channel"?n:s[0].toUpperCase()+s.substring(1)).join(" ")},CO=e=>{const t=e.reduce((o,r)=>{const s=new Date(r==null?void 0:r.createdAt),a=new Intl.DateTimeFormat("en-US",{day:"numeric",month:"long",year:"numeric"}).format(s);return o[a]||(o[a]=[]),o[a].push(r),o},{});return Object.fromEntries(Object.entries(t).sort(([o],[r])=>new Date(r)-new Date(o)))},TO=(e,t=20)=>(e==null?void 0:e.length)>t?`${e.slice(0,t)}...`:e;function Fm({isRenderCellContent:e,column:t,row:n}){const o=n[t.key];return x.jsx(x.Fragment,{children:e?x.jsx(Te,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",textTransform:"none",fontSize:"1.1rem"},component:"label",children:t==null?void 0:t.cellRenderer(n)}):x.jsx(mm,{title:(o==null?void 0:o.length)>20?o:"",arrow:!0,children:x.jsx(Te,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",textTransform:"none",fontSize:"1.1rem"},component:"label",children:TO(o)})})})}Fm.propTypes={isRenderCellContent:i.bool,column:i.object,row:i.object};const Hs={TOKEN:"token",USER:"user",SNOP:"snop",SELECTED_BU:"selected_business_unit"},jm={BEARER:"Bearer",TENANT_ID:"tenant_id",BU_ID:"bu_id",SNOP_ID:"snop_id"},Xs={REFRESH:"refresh",CLOSE:"close"},EO=Object.values({"SKU Name":"sku_name",Node:"node","Channel Name":"channel_name"}),Vm=[10,25,50,100],Lm={MARK_ALL_READ:"MARK_ALL_READ"},IO=Vm.map(e=>({label:e,value:e})),_m=M.createContext({});function SO(e){const t=M.useRef(null);return t.current===null&&(t.current=e()),t.current}const Oc=M.createContext(null),$m=M.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function wO(e=!0){const t=M.useContext(Oc);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:o,register:r}=t,s=M.useId();M.useEffect(()=>{e&&r(s)},[e]);const a=M.useCallback(()=>e&&o&&o(s),[s,o,e]);return!n&&o?[!1,a]:[!0]}const Pc=typeof window<"u",AO=Pc?M.useLayoutEffect:M.useEffect,$t=e=>e;let rr=$t,eo=$t;process.env.NODE_ENV!=="production"&&(rr=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},eo=(e,t)=>{if(!e)throw new Error(t)});function Nc(e){let t;return()=>(t===void 0&&(t=e()),t)}const ir=(e,t,n)=>{const o=t-e;return o===0?1:(n-e)/o},On=e=>e*1e3,Fn=e=>e/1e3,RO={skipAnimations:!1,useManualTiming:!1},Us=["read","resolveKeyframes","update","preRender","render","postRender"],Wm={value:null,addProjectionMetrics:null};function OO(e,t){let n=new Set,o=new Set,r=!1,s=!1;const a=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1},c=0;function u(p){a.has(p)&&(d.schedule(p),e()),c++,p(l)}const d={schedule:(p,h=!1,g=!1)=>{const f=g&&r?n:o;return h&&a.add(p),f.has(p)||f.add(p),p},cancel:p=>{o.delete(p),a.delete(p)},process:p=>{if(l=p,r){s=!0;return}r=!0,[n,o]=[o,n],n.forEach(u),t&&Wm.value&&Wm.value.frameloop[t].push(c),c=0,n.clear(),r=!1,s&&(s=!1,d.process(p))}};return d}const PO=40;function Gm(e,t){let n=!1,o=!0;const r={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,a=Us.reduce((v,S)=>(v[S]=OO(s,t?S:void 0),v),{}),{read:l,resolveKeyframes:c,update:u,preRender:d,render:p,postRender:h}=a,g=()=>{const v=performance.now();n=!1,r.delta=o?1e3/60:Math.max(Math.min(v-r.timestamp,PO),1),r.timestamp=v,r.isProcessing=!0,l.process(r),c.process(r),u.process(r),d.process(r),p.process(r),h.process(r),r.isProcessing=!1,n&&t&&(o=!1,e(g))},m=()=>{n=!0,o=!0,r.isProcessing||e(g)};return{schedule:Us.reduce((v,S)=>{const T=a[S];return v[S]=(I,y=!1,w=!1)=>(n||m(),T.schedule(I,y,w)),v},{}),cancel:v=>{for(let S=0;S<Us.length;S++)a[Us[S]].cancel(v)},state:r,steps:a}}const{schedule:Qe,cancel:to,state:It,steps:Mc}=Gm(typeof requestAnimationFrame<"u"?requestAnimationFrame:$t,!0),zm=M.createContext({strict:!1}),Hm={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},sr={};for(const e in Hm)sr[e]={isEnabled:t=>Hm[e].some(n=>!!t[n])};function NO(e){for(const t in e)sr[t]={...sr[t],...e[t]}}const MO=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Zs(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||MO.has(e)}let Xm=e=>!Zs(e);function kO(e){e&&(Xm=t=>t.startsWith("on")?!Zs(t):e(t))}try{kO(require("@emotion/is-prop-valid").default)}catch{}function DO(e,t,n){const o={};for(const r in e)r==="values"&&typeof e.values=="object"||(Xm(r)||n===!0&&Zs(r)||!t&&!Zs(r)||e.draggable&&r.startsWith("onDrag"))&&(o[r]=e[r]);return o}const Um=new Set;function Ys(e,t,n){e||Um.has(t)||(console.warn(t),Um.add(t))}function BO(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...o)=>(process.env.NODE_ENV!=="production"&&Ys(!1,"motion() is deprecated. Use motion.create() instead."),e(...o));return new Proxy(n,{get:(o,r)=>r==="create"?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}const Js=M.createContext({});function qs(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function si(e){return typeof e=="string"||Array.isArray(e)}const kc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Dc=["initial",...kc];function Ks(e){return qs(e.animate)||Dc.some(t=>si(e[t]))}function Zm(e){return!!(Ks(e)||e.variants)}function FO(e,t){if(Ks(e)){const{initial:n,animate:o}=e;return{initial:n===!1||si(n)?n:void 0,animate:si(o)?o:void 0}}return e.inherit!==!1?t:{}}function jO(e){const{initial:t,animate:n}=FO(e,M.useContext(Js));return M.useMemo(()=>({initial:t,animate:n}),[Ym(t),Ym(n)])}function Ym(e){return Array.isArray(e)?e.join(" "):e}const VO=Symbol.for("motionComponentSymbol");function ar(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function LO(e,t,n){return M.useCallback(o=>{o&&e.onMount&&e.onMount(o),t&&(o?t.mount(o):t.unmount()),n&&(typeof n=="function"?n(o):ar(n)&&(n.current=o))},[t])}const Bc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Jm="data-"+Bc("framerAppearId"),{schedule:Fc,cancel:d4}=Gm(queueMicrotask,!1),qm=M.createContext({});function _O(e,t,n,o,r){var s,a;const{visualElement:l}=M.useContext(Js),c=M.useContext(zm),u=M.useContext(Oc),d=M.useContext($m).reducedMotion,p=M.useRef(null);o=o||c.renderer,!p.current&&o&&(p.current=o(e,{visualState:t,parent:l,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d}));const h=p.current,g=M.useContext(qm);h&&!h.projection&&r&&(h.type==="html"||h.type==="svg")&&$O(p.current,n,r,g);const m=M.useRef(!1);M.useInsertionEffect(()=>{h&&m.current&&h.update(n,u)});const f=n[Jm],b=M.useRef(!!f&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,f))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,f)));return AO(()=>{h&&(m.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),Fc.render(h.render),b.current&&h.animationState&&h.animationState.animateChanges())}),M.useEffect(()=>{h&&(!b.current&&h.animationState&&h.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)===null||v===void 0||v.call(window,f)}),b.current=!1))}),h}function $O(e,t,n,o){const{layoutId:r,layout:s,drag:a,dragConstraints:l,layoutScroll:c,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Km(e.parent)),e.projection.setOptions({layoutId:r,layout:s,alwaysMeasureLayout:!!a||l&&ar(l),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:o,layoutScroll:c,layoutRoot:u})}function Km(e){if(e)return e.options.allowProjection!==!1?e.projection:Km(e.parent)}function WO({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:o,Component:r}){var s,a;e&&NO(e);function l(u,d){let p;const h={...M.useContext($m),...u,layoutId:GO(u)},{isStatic:g}=h,m=jO(u),f=o(u,g);if(!g&&Pc){zO(h,e);const b=HO(h);p=b.MeasureLayout,m.visualElement=_O(r,f,h,t,b.ProjectionNode)}return x.jsxs(Js.Provider,{value:m,children:[p&&m.visualElement?x.jsx(p,{visualElement:m.visualElement,...h}):null,n(r,u,LO(f,m.visualElement,d),f,g,m.visualElement)]})}l.displayName=`motion.${typeof r=="string"?r:`create(${(a=(s=r.displayName)!==null&&s!==void 0?s:r.name)!==null&&a!==void 0?a:""})`}`;const c=M.forwardRef(l);return c[VO]=r,c}function GO({layoutId:e}){const t=M.useContext(_m).id;return t&&e!==void 0?t+"-"+e:e}function zO(e,t){const n=M.useContext(zm).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const o="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?rr(!1,o):eo(!1,o)}}function HO(e){const{drag:t,layout:n}=sr;if(!t&&!n)return{};const o={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}const Qm=e=>t=>typeof t=="string"&&t.startsWith(e),jc=Qm("--"),XO=Qm("var(--"),Vc=e=>XO(e)?UO.test(e.split("/*")[0].trim()):!1,UO=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,ai={};function ZO(e){for(const t in e)ai[t]=e[t],jc(t)&&(ai[t].isCSSVariable=!0)}const lr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],yo=new Set(lr);function eg(e,{layout:t,layoutId:n}){return yo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ai[e]||e==="opacity")}const At=e=>!!(e&&e.getVelocity),tg=(e,t)=>t&&typeof e=="number"?t.transform(e):e,jn=(e,t,n)=>n>t?t:n<e?e:n,cr={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},li={...cr,transform:e=>jn(0,1,e)},Qs={...cr,default:1},ci=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),no=ci("deg"),Pn=ci("%"),ve=ci("px"),YO=ci("vh"),JO=ci("vw"),ng={...Pn,parse:e=>Pn.parse(e)/100,transform:e=>Pn.transform(e*100)},qO={borderWidth:ve,borderTopWidth:ve,borderRightWidth:ve,borderBottomWidth:ve,borderLeftWidth:ve,borderRadius:ve,radius:ve,borderTopLeftRadius:ve,borderTopRightRadius:ve,borderBottomRightRadius:ve,borderBottomLeftRadius:ve,width:ve,maxWidth:ve,height:ve,maxHeight:ve,top:ve,right:ve,bottom:ve,left:ve,padding:ve,paddingTop:ve,paddingRight:ve,paddingBottom:ve,paddingLeft:ve,margin:ve,marginTop:ve,marginRight:ve,marginBottom:ve,marginLeft:ve,backgroundPositionX:ve,backgroundPositionY:ve},KO={rotate:no,rotateX:no,rotateY:no,rotateZ:no,scale:Qs,scaleX:Qs,scaleY:Qs,scaleZ:Qs,skew:no,skewX:no,skewY:no,distance:ve,translateX:ve,translateY:ve,translateZ:ve,x:ve,y:ve,z:ve,perspective:ve,transformPerspective:ve,opacity:li,originX:ng,originY:ng,originZ:ve},og={...cr,transform:Math.round},Lc={...qO,...KO,zIndex:og,size:ve,fillOpacity:li,strokeOpacity:li,numOctaves:og},QO={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},eP=lr.length;function tP(e,t,n){let o="",r=!0;for(let s=0;s<eP;s++){const a=lr[s],l=e[a];if(l===void 0)continue;let c=!0;if(typeof l=="number"?c=l===(a.startsWith("scale")?1:0):c=parseFloat(l)===0,!c||n){const u=tg(l,Lc[a]);if(!c){r=!1;const d=QO[a]||a;o+=`${d}(${u}) `}n&&(t[a]=u)}}return o=o.trim(),n?o=n(t,r?"":o):r&&(o="none"),o}function _c(e,t,n){const{style:o,vars:r,transformOrigin:s}=e;let a=!1,l=!1;for(const c in t){const u=t[c];if(yo.has(c)){a=!0;continue}else if(jc(c)){r[c]=u;continue}else{const d=tg(u,Lc[c]);c.startsWith("origin")?(l=!0,s[c]=d):o[c]=d}}if(t.transform||(a||n?o.transform=tP(t,e.transform,n):o.transform&&(o.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:d=0}=s;o.transformOrigin=`${c} ${u} ${d}`}}const $c=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function rg(e,t,n){for(const o in t)!At(t[o])&&!eg(o,n)&&(e[o]=t[o])}function nP({transformTemplate:e},t){return M.useMemo(()=>{const n=$c();return _c(n,t,e),Object.assign({},n.vars,n.style)},[t])}function oP(e,t){const n=e.style||{},o={};return rg(o,n,e),Object.assign(o,nP(e,t)),o}function rP(e,t){const n={},o=oP(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=o,n}const iP=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Wc(e){return typeof e!="string"||e.includes("-")?!1:!!(iP.indexOf(e)>-1||/[A-Z]/u.test(e))}const sP={offset:"stroke-dashoffset",array:"stroke-dasharray"},aP={offset:"strokeDashoffset",array:"strokeDasharray"};function lP(e,t,n=1,o=0,r=!0){e.pathLength=1;const s=r?sP:aP;e[s.offset]=ve.transform(-o);const a=ve.transform(t),l=ve.transform(n);e[s.array]=`${a} ${l}`}function ig(e,t,n){return typeof e=="string"?e:ve.transform(t+n*e)}function cP(e,t,n){const o=ig(t,e.x,e.width),r=ig(n,e.y,e.height);return`${o} ${r}`}function Gc(e,{attrX:t,attrY:n,attrScale:o,originX:r,originY:s,pathLength:a,pathSpacing:l=1,pathOffset:c=0,...u},d,p){if(_c(e,u,p),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:g,dimensions:m}=e;h.transform&&(m&&(g.transform=h.transform),delete h.transform),m&&(r!==void 0||s!==void 0||g.transform)&&(g.transformOrigin=cP(m,r!==void 0?r:.5,s!==void 0?s:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),o!==void 0&&(h.scale=o),a!==void 0&&lP(h,a,l,c,!1)}const sg=()=>({...$c(),attrs:{}}),zc=e=>typeof e=="string"&&e.toLowerCase()==="svg";function uP(e,t,n,o){const r=M.useMemo(()=>{const s=sg();return Gc(s,t,zc(o),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};rg(s,e.style,e),r.style={...s,...r.style}}return r}function dP(e=!1){return(n,o,r,{latestValues:s},a)=>{const c=(Wc(n)?uP:rP)(o,s,a,n),u=DO(o,typeof n=="string",e),d=n!==M.Fragment?{...u,...c,ref:r}:{},{children:p}=o,h=M.useMemo(()=>At(p)?p.get():p,[p]);return M.createElement(n,{...d,children:h})}}function ag(e){const t=[{},{}];return e==null||e.values.forEach((n,o)=>{t[0][o]=n.get(),t[1][o]=n.getVelocity()}),t}function Hc(e,t,n,o){if(typeof t=="function"){const[r,s]=ag(o);t=t(n!==void 0?n:e.custom,r,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,s]=ag(o);t=t(n!==void 0?n:e.custom,r,s)}return t}const Xc=e=>Array.isArray(e),pP=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),fP=e=>Xc(e)?e[e.length-1]||0:e;function ea(e){const t=At(e)?e.get():e;return pP(t)?t.toValue():t}function hP({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},o,r,s){const a={latestValues:mP(o,r,s,e),renderState:t()};return n&&(a.onMount=l=>n({props:o,current:l,...a}),a.onUpdate=l=>n(l)),a}const lg=e=>(t,n)=>{const o=M.useContext(Js),r=M.useContext(Oc),s=()=>hP(e,t,o,r);return n?s():SO(s)};function mP(e,t,n,o){const r={},s=o(e,{});for(const h in s)r[h]=ea(s[h]);let{initial:a,animate:l}=e;const c=Ks(e),u=Zm(e);t&&u&&!c&&e.inherit!==!1&&(a===void 0&&(a=t.initial),l===void 0&&(l=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const p=d?l:a;if(p&&typeof p!="boolean"&&!qs(p)){const h=Array.isArray(p)?p:[p];for(let g=0;g<h.length;g++){const m=Hc(e,h[g]);if(m){const{transitionEnd:f,transition:b,...v}=m;for(const S in v){let T=v[S];if(Array.isArray(T)){const I=d?T.length-1:0;T=T[I]}T!==null&&(r[S]=T)}for(const S in f)r[S]=f[S]}}}return r}function Uc(e,t,n){var o;const{style:r}=e,s={};for(const a in r)(At(r[a])||t.style&&At(t.style[a])||eg(a,e)||((o=n==null?void 0:n.getValue(a))===null||o===void 0?void 0:o.liveStyle)!==void 0)&&(s[a]=r[a]);return s}const gP={useVisualState:lg({scrapeMotionValuesFromProps:Uc,createRenderState:$c})};function cg(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function ug(e,{style:t,vars:n},o,r){Object.assign(e.style,t,r&&r.getProjectionStyles(o));for(const s in n)e.style.setProperty(s,n[s])}const dg=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function pg(e,t,n,o){ug(e,t,void 0,o);for(const r in t.attrs)e.setAttribute(dg.has(r)?r:Bc(r),t.attrs[r])}function fg(e,t,n){const o=Uc(e,t,n);for(const r in e)if(At(e[r])||At(t[r])){const s=lr.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;o[s]=e[r]}return o}const hg=["x","y","width","height","cx","cy","r"],bP={useVisualState:lg({scrapeMotionValuesFromProps:fg,createRenderState:sg,onUpdate:({props:e,prevProps:t,current:n,renderState:o,latestValues:r})=>{if(!n)return;let s=!!e.drag;if(!s){for(const l in r)if(yo.has(l)){s=!0;break}}if(!s)return;let a=!t;if(t)for(let l=0;l<hg.length;l++){const c=hg[l];e[c]!==t[c]&&(a=!0)}a&&Qe.read(()=>{cg(n,o),Qe.render(()=>{Gc(o,r,zc(n.tagName),e.transformTemplate),pg(n,o)})})}})};function vP(e,t){return function(o,{forwardMotionProps:r}={forwardMotionProps:!1}){const a={...Wc(o)?bP:gP,preloadedFeatures:e,useRender:dP(r),createVisualElement:t,Component:o};return WO(a)}}function ui(e,t,n){const o=e.getProps();return Hc(o,t,n!==void 0?n:o.custom,e)}const yP=Nc(()=>window.ScrollTimeline!==void 0);class xP{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let o=0;o<this.animations.length;o++)this.animations[o][t]=n}attachTimeline(t,n){const o=this.animations.map(r=>{if(yP()&&r.attachTimeline)return r.attachTimeline(t);if(typeof n=="function")return n(r)});return()=>{o.forEach((r,s)=>{r&&r(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class CP extends xP{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function Zc(e,t){return e?e[t]||e.default||e:void 0}const Yc=2e4;function mg(e){let t=0;const n=50;let o=e.next(t);for(;!o.done&&t<Yc;)t+=n,o=e.next(t);return t>=Yc?1/0:t}function Jc(e){return typeof e=="function"}function gg(e,t){e.timeline=t,e.onfinish=null}const qc=e=>Array.isArray(e)&&typeof e[0]=="number",TP={linearEasing:void 0};function EP(e,t){const n=Nc(e);return()=>{var o;return(o=TP[t])!==null&&o!==void 0?o:n()}}const ta=EP(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),bg=(e,t,n=10)=>{let o="";const r=Math.max(Math.round(t/n),2);for(let s=0;s<r;s++)o+=e(ir(0,r-1,s))+", ";return`linear(${o.substring(0,o.length-2)})`};function vg(e){return!!(typeof e=="function"&&ta()||!e||typeof e=="string"&&(e in Kc||ta())||qc(e)||Array.isArray(e)&&e.every(vg))}const di=([e,t,n,o])=>`cubic-bezier(${e}, ${t}, ${n}, ${o})`,Kc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:di([0,.65,.55,1]),circOut:di([.55,0,1,.45]),backIn:di([.31,.01,.66,-.59]),backOut:di([.33,1.53,.69,.99])};function yg(e,t){if(e)return typeof e=="function"&&ta()?bg(e,t):qc(e)?di(e):Array.isArray(e)?e.map(n=>yg(n,t)||Kc.easeOut):Kc[e]}const mn={x:!1,y:!1};function xg(){return mn.x||mn.y}function IP(e,t,n){var o;if(e instanceof Element)return[e];if(typeof e=="string"){let r=document;const s=(o=void 0)!==null&&o!==void 0?o:r.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}function Cg(e,t){const n=IP(e),o=new AbortController,r={passive:!0,...t,signal:o.signal};return[n,r,()=>o.abort()]}function Tg(e){return!(e.pointerType==="touch"||xg())}function SP(e,t,n={}){const[o,r,s]=Cg(e,n),a=l=>{if(!Tg(l))return;const{target:c}=l,u=t(c,l);if(typeof u!="function"||!c)return;const d=p=>{Tg(p)&&(u(p),c.removeEventListener("pointerleave",d))};c.addEventListener("pointerleave",d,r)};return o.forEach(l=>{l.addEventListener("pointerenter",a,r)}),s}const Eg=(e,t)=>t?e===t?!0:Eg(e,t.parentElement):!1,Qc=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,wP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function AP(e){return wP.has(e.tagName)||e.tabIndex!==-1}const pi=new WeakSet;function Ig(e){return t=>{t.key==="Enter"&&e(t)}}function eu(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const RP=(e,t)=>{const n=e.currentTarget;if(!n)return;const o=Ig(()=>{if(pi.has(n))return;eu(n,"down");const r=Ig(()=>{eu(n,"up")}),s=()=>eu(n,"cancel");n.addEventListener("keyup",r,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",o,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",o),t)};function Sg(e){return Qc(e)&&!xg()}function OP(e,t,n={}){const[o,r,s]=Cg(e,n),a=l=>{const c=l.currentTarget;if(!Sg(l)||pi.has(c))return;pi.add(c);const u=t(c,l),d=(g,m)=>{window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",h),!(!Sg(g)||!pi.has(c))&&(pi.delete(c),typeof u=="function"&&u(g,{success:m}))},p=g=>{d(g,n.useGlobalTarget||Eg(c,g.target))},h=g=>{d(g,!1)};window.addEventListener("pointerup",p,r),window.addEventListener("pointercancel",h,r)};return o.forEach(l=>{!AP(l)&&l.getAttribute("tabindex")===null&&(l.tabIndex=0),(n.useGlobalTarget?window:l).addEventListener("pointerdown",a,r),l.addEventListener("focus",u=>RP(u,r),r)}),s}function PP(e){return e==="x"||e==="y"?mn[e]?null:(mn[e]=!0,()=>{mn[e]=!1}):mn.x||mn.y?null:(mn.x=mn.y=!0,()=>{mn.x=mn.y=!1})}const wg=new Set(["width","height","top","left","right","bottom",...lr]);let na;function NP(){na=void 0}const Nn={now:()=>(na===void 0&&Nn.set(It.isProcessing||RO.useManualTiming?It.timestamp:performance.now()),na),set:e=>{na=e,queueMicrotask(NP)}};function tu(e,t){e.indexOf(t)===-1&&e.push(t)}function nu(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class ou{constructor(){this.subscriptions=[]}add(t){return tu(this.subscriptions,t),()=>nu(this.subscriptions,t)}notify(t,n,o){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,n,o);else for(let s=0;s<r;s++){const a=this.subscriptions[s];a&&a(t,n,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Ag(e,t){return t?e*(1e3/t):0}const Rg=30,MP=e=>!isNaN(parseFloat(e));class kP{constructor(t,n={}){this.version="12.4.3",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(o,r=!0)=>{const s=Nn.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),r&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Nn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=MP(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Ys(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new ou);const o=this.events[t].add(n);return t==="change"?()=>{o(),Qe.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,o){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-o}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Nn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Rg)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Rg);return Ag(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function fi(e,t){return new kP(e,t)}function DP(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,fi(n))}function BP(e,t){const n=ui(e,t);let{transitionEnd:o={},transition:r={},...s}=n||{};s={...s,...o};for(const a in s){const l=fP(s[a]);DP(e,a,l)}}function FP(e){return!!(At(e)&&e.add)}function ru(e,t){const n=e.getValue("willChange");if(FP(n))return n.add(t)}function Og(e){return e.props[Jm]}const Pg=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,jP=1e-7,VP=12;function LP(e,t,n,o,r){let s,a,l=0;do a=t+(n-t)/2,s=Pg(a,o,r)-e,s>0?n=a:t=a;while(Math.abs(s)>jP&&++l<VP);return a}function hi(e,t,n,o){if(e===t&&n===o)return $t;const r=s=>LP(s,0,1,e,n);return s=>s===0||s===1?s:Pg(r(s),t,o)}const Ng=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Mg=e=>t=>1-e(1-t),kg=hi(.33,1.53,.69,.99),iu=Mg(kg),Dg=Ng(iu),Bg=e=>(e*=2)<1?.5*iu(e):.5*(2-Math.pow(2,-10*(e-1))),su=e=>1-Math.sin(Math.acos(e)),Fg=Mg(su),jg=Ng(su),Vg=e=>/^0[^.\s]+$/u.test(e);function _P(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Vg(e):!0}const mi=e=>Math.round(e*1e5)/1e5,au=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function $P(e){return e==null}const WP=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,lu=(e,t)=>n=>!!(typeof n=="string"&&WP.test(n)&&n.startsWith(e)||t&&!$P(n)&&Object.prototype.hasOwnProperty.call(n,t)),Lg=(e,t,n)=>o=>{if(typeof o!="string")return o;const[r,s,a,l]=o.match(au);return{[e]:parseFloat(r),[t]:parseFloat(s),[n]:parseFloat(a),alpha:l!==void 0?parseFloat(l):1}},GP=e=>jn(0,255,e),cu={...cr,transform:e=>Math.round(GP(e))},xo={test:lu("rgb","red"),parse:Lg("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:o=1})=>"rgba("+cu.transform(e)+", "+cu.transform(t)+", "+cu.transform(n)+", "+mi(li.transform(o))+")"};function zP(e){let t="",n="",o="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),o=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),o=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,o+=o,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(o,16),alpha:r?parseInt(r,16)/255:1}}const uu={test:lu("#"),parse:zP,transform:xo.transform},ur={test:lu("hsl","hue"),parse:Lg("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:o=1})=>"hsla("+Math.round(e)+", "+Pn.transform(mi(t))+", "+Pn.transform(mi(n))+", "+mi(li.transform(o))+")"},Rt={test:e=>xo.test(e)||uu.test(e)||ur.test(e),parse:e=>xo.test(e)?xo.parse(e):ur.test(e)?ur.parse(e):uu.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?xo.transform(e):ur.transform(e)},HP=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function XP(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(au))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(HP))===null||n===void 0?void 0:n.length)||0)>0}const _g="number",$g="color",UP="var",ZP="var(",Wg="${}",YP=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function gi(e){const t=e.toString(),n=[],o={color:[],number:[],var:[]},r=[];let s=0;const l=t.replace(YP,c=>(Rt.test(c)?(o.color.push(s),r.push($g),n.push(Rt.parse(c))):c.startsWith(ZP)?(o.var.push(s),r.push(UP),n.push(c)):(o.number.push(s),r.push(_g),n.push(parseFloat(c))),++s,Wg)).split(Wg);return{values:n,split:l,indexes:o,types:r}}function Gg(e){return gi(e).values}function zg(e){const{split:t,types:n}=gi(e),o=t.length;return r=>{let s="";for(let a=0;a<o;a++)if(s+=t[a],r[a]!==void 0){const l=n[a];l===_g?s+=mi(r[a]):l===$g?s+=Rt.transform(r[a]):s+=r[a]}return s}}const JP=e=>typeof e=="number"?0:e;function qP(e){const t=Gg(e);return zg(e)(t.map(JP))}const oo={test:XP,parse:Gg,createTransformer:zg,getAnimatableNone:qP},KP=new Set(["brightness","contrast","saturate","opacity"]);function QP(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[o]=n.match(au)||[];if(!o)return e;const r=n.replace(o,"");let s=KP.has(t)?1:0;return o!==n&&(s*=100),t+"("+s+r+")"}const eN=/\b([a-z-]*)\(.*?\)/gu,du={...oo,getAnimatableNone:e=>{const t=e.match(eN);return t?t.map(QP).join(" "):e}},tN={...Lc,color:Rt,backgroundColor:Rt,outlineColor:Rt,fill:Rt,stroke:Rt,borderColor:Rt,borderTopColor:Rt,borderRightColor:Rt,borderBottomColor:Rt,borderLeftColor:Rt,filter:du,WebkitFilter:du},pu=e=>tN[e];function Hg(e,t){let n=pu(e);return n!==du&&(n=oo),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const nN=new Set(["auto","none","0"]);function oN(e,t,n){let o=0,r;for(;o<e.length&&!r;){const s=e[o];typeof s=="string"&&!nN.has(s)&&gi(s).values.length&&(r=e[o]),o++}if(r&&n)for(const s of t)e[s]=Hg(n,r)}const Xg=e=>e===cr||e===ve,Ug=(e,t)=>parseFloat(e.split(", ")[t]),Zg=(e,t)=>(n,{transform:o})=>{if(o==="none"||!o)return 0;const r=o.match(/^matrix3d\((.+)\)$/u);if(r)return Ug(r[1],t);{const s=o.match(/^matrix\((.+)\)$/u);return s?Ug(s[1],e):0}},rN=new Set(["x","y","z"]),iN=lr.filter(e=>!rN.has(e));function sN(e){const t=[];return iN.forEach(n=>{const o=e.getValue(n);o!==void 0&&(t.push([n,o.get()]),o.set(n.startsWith("scale")?1:0))}),t}const dr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Zg(4,13),y:Zg(5,14)};dr.translateX=dr.x,dr.translateY=dr.y;const Co=new Set;let fu=!1,hu=!1;function Yg(){if(hu){const e=Array.from(Co).filter(o=>o.needsMeasurement),t=new Set(e.map(o=>o.element)),n=new Map;t.forEach(o=>{const r=sN(o);r.length&&(n.set(o,r),o.render())}),e.forEach(o=>o.measureInitialState()),t.forEach(o=>{o.render();const r=n.get(o);r&&r.forEach(([s,a])=>{var l;(l=o.getValue(s))===null||l===void 0||l.set(a)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}hu=!1,fu=!1,Co.forEach(e=>e.complete()),Co.clear()}function Jg(){Co.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(hu=!0)})}function aN(){Jg(),Yg()}class mu{constructor(t,n,o,r,s,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=o,this.motionValue=r,this.element=s,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Co.add(this),fu||(fu=!0,Qe.read(Jg),Qe.resolveKeyframes(Yg))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:o,motionValue:r}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const a=r==null?void 0:r.get(),l=t[t.length-1];if(a!==void 0)t[0]=a;else if(o&&n){const c=o.readValue(n,l);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=l),r&&a===void 0&&r.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Co.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Co.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const qg=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),lN=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function cN(e){const t=lN.exec(e);if(!t)return[,];const[,n,o,r]=t;return[`--${n??o}`,r]}const uN=4;function Kg(e,t,n=1){eo(n<=uN,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[o,r]=cN(e);if(!o)return;const s=window.getComputedStyle(t).getPropertyValue(o);if(s){const a=s.trim();return qg(a)?parseFloat(a):a}return Vc(r)?Kg(r,t,n+1):r}const Qg=e=>t=>t.test(e),eb=[cr,ve,Pn,no,JO,YO,{test:e=>e==="auto",parse:e=>e}],tb=e=>eb.find(Qg(e));class nb extends mu{constructor(t,n,o,r,s){super(t,n,o,r,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:o}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let u=t[c];if(typeof u=="string"&&(u=u.trim(),Vc(u))){const d=Kg(u,n.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!wg.has(o)||t.length!==2)return;const[r,s]=t,a=tb(r),l=tb(s);if(a!==l)if(Xg(a)&&Xg(l))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,o=[];for(let r=0;r<t.length;r++)_P(t[r])&&o.push(r);o.length&&oN(t,o,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:o}=this;if(!t||!t.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=dr[o](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const r=n[n.length-1];r!==void 0&&t.getValue(o,r).jump(r,!1)}measureEndState(){var t;const{element:n,name:o,unresolvedKeyframes:r}=this;if(!n||!n.current)return;const s=n.getValue(o);s&&s.jump(this.measuredOrigin,!1);const a=r.length-1,l=r[a];r[a]=dr[o](n.measureViewportBox(),window.getComputedStyle(n.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([c,u])=>{n.getValue(c).set(u)}),this.resolveNoneKeyframes()}}const ob=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(oo.test(e)||e==="0")&&!e.startsWith("url("));function dN(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function pN(e,t,n,o){const r=e[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],a=ob(r,t),l=ob(s,t);return rr(a===l,`You are trying to animate ${t} from "${r}" to "${s}". ${r} is not an animatable value - to enable this animation set ${r} to a value animatable to ${s} via the \`style\` property.`),!a||!l?!1:dN(e)||(n==="spring"||Jc(n))&&o}const fN=e=>e!==null;function oa(e,{repeat:t,repeatType:n="loop"},o){const r=e.filter(fN),s=t&&n!=="loop"&&t%2===1?0:r.length-1;return!s||o===void 0?r[s]:o}const hN=40;class rb{constructor({autoplay:t=!0,delay:n=0,type:o="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:a="loop",...l}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Nn.now(),this.options={autoplay:t,delay:n,type:o,repeat:r,repeatDelay:s,repeatType:a,...l},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>hN?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&aN(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Nn.now(),this.hasAttemptedResolve=!0;const{name:o,type:r,velocity:s,delay:a,onComplete:l,onUpdate:c,isGenerator:u}=this.options;if(!u&&!pN(t,o,r,s))if(a)this.options.duration=0;else{c&&c(oa(t,this.options,n)),l&&l(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const it=(e,t,n)=>e+(t-e)*n;function gu(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function mN({hue:e,saturation:t,lightness:n,alpha:o}){e/=360,t/=100,n/=100;let r=0,s=0,a=0;if(!t)r=s=a=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;r=gu(c,l,e+1/3),s=gu(c,l,e),a=gu(c,l,e-1/3)}return{red:Math.round(r*255),green:Math.round(s*255),blue:Math.round(a*255),alpha:o}}function ra(e,t){return n=>n>0?t:e}const bu=(e,t,n)=>{const o=e*e,r=n*(t*t-o)+o;return r<0?0:Math.sqrt(r)},gN=[uu,xo,ur],bN=e=>gN.find(t=>t.test(e));function ib(e){const t=bN(e);if(rr(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===ur&&(n=mN(n)),n}const sb=(e,t)=>{const n=ib(e),o=ib(t);if(!n||!o)return ra(e,t);const r={...n};return s=>(r.red=bu(n.red,o.red,s),r.green=bu(n.green,o.green,s),r.blue=bu(n.blue,o.blue,s),r.alpha=it(n.alpha,o.alpha,s),xo.transform(r))},vN=(e,t)=>n=>t(e(n)),bi=(...e)=>e.reduce(vN),vu=new Set(["none","hidden"]);function yN(e,t){return vu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function xN(e,t){return n=>it(e,t,n)}function yu(e){return typeof e=="number"?xN:typeof e=="string"?Vc(e)?ra:Rt.test(e)?sb:EN:Array.isArray(e)?ab:typeof e=="object"?Rt.test(e)?sb:CN:ra}function ab(e,t){const n=[...e],o=n.length,r=e.map((s,a)=>yu(s)(s,t[a]));return s=>{for(let a=0;a<o;a++)n[a]=r[a](s);return n}}function CN(e,t){const n={...e,...t},o={};for(const r in n)e[r]!==void 0&&t[r]!==void 0&&(o[r]=yu(e[r])(e[r],t[r]));return r=>{for(const s in o)n[s]=o[s](r);return n}}function TN(e,t){var n;const o=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const a=t.types[s],l=e.indexes[a][r[a]],c=(n=e.values[l])!==null&&n!==void 0?n:0;o[s]=c,r[a]++}return o}const EN=(e,t)=>{const n=oo.createTransformer(t),o=gi(e),r=gi(t);return o.indexes.var.length===r.indexes.var.length&&o.indexes.color.length===r.indexes.color.length&&o.indexes.number.length>=r.indexes.number.length?vu.has(e)&&!r.values.length||vu.has(t)&&!o.values.length?yN(e,t):bi(ab(TN(o,r),r.values),n):(rr(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),ra(e,t))};function lb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?it(e,t,n):yu(e)(e,t)}const IN=5;function cb(e,t,n){const o=Math.max(t-IN,0);return Ag(n-e(o),t-o)}const st={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},xu=.001;function SN({duration:e=st.duration,bounce:t=st.bounce,velocity:n=st.velocity,mass:o=st.mass}){let r,s;rr(e<=On(st.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=jn(st.minDamping,st.maxDamping,a),e=jn(st.minDuration,st.maxDuration,Fn(e)),a<1?(r=u=>{const d=u*a,p=d*e,h=d-n,g=Cu(u,a),m=Math.exp(-p);return xu-h/g*m},s=u=>{const p=u*a*e,h=p*n+n,g=Math.pow(a,2)*Math.pow(u,2)*e,m=Math.exp(-p),f=Cu(Math.pow(u,2),a);return(-r(u)+xu>0?-1:1)*((h-g)*m)/f}):(r=u=>{const d=Math.exp(-u*e),p=(u-n)*e+1;return-xu+d*p},s=u=>{const d=Math.exp(-u*e),p=(n-u)*(e*e);return d*p});const l=5/e,c=AN(r,s,l);if(e=On(e),isNaN(c))return{stiffness:st.stiffness,damping:st.damping,duration:e};{const u=Math.pow(c,2)*o;return{stiffness:u,damping:a*2*Math.sqrt(o*u),duration:e}}}const wN=12;function AN(e,t,n){let o=n;for(let r=1;r<wN;r++)o=o-e(o)/t(o);return o}function Cu(e,t){return e*Math.sqrt(1-t*t)}const RN=["duration","bounce"],ON=["stiffness","damping","mass"];function ub(e,t){return t.some(n=>e[n]!==void 0)}function PN(e){let t={velocity:st.velocity,stiffness:st.stiffness,damping:st.damping,mass:st.mass,isResolvedFromDuration:!1,...e};if(!ub(e,ON)&&ub(e,RN))if(e.visualDuration){const n=e.visualDuration,o=2*Math.PI/(n*1.2),r=o*o,s=2*jn(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:st.mass,stiffness:r,damping:s}}else{const n=SN(e);t={...t,...n,mass:st.mass},t.isResolvedFromDuration=!0}return t}function db(e=st.visualDuration,t=st.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:o,restDelta:r}=n;const s=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],l={done:!1,value:s},{stiffness:c,damping:u,mass:d,duration:p,velocity:h,isResolvedFromDuration:g}=PN({...n,velocity:-Fn(n.velocity||0)}),m=h||0,f=u/(2*Math.sqrt(c*d)),b=a-s,v=Fn(Math.sqrt(c/d)),S=Math.abs(b)<5;o||(o=S?st.restSpeed.granular:st.restSpeed.default),r||(r=S?st.restDelta.granular:st.restDelta.default);let T;if(f<1){const y=Cu(v,f);T=w=>{const A=Math.exp(-f*v*w);return a-A*((m+f*v*b)/y*Math.sin(y*w)+b*Math.cos(y*w))}}else if(f===1)T=y=>a-Math.exp(-v*y)*(b+(m+v*b)*y);else{const y=v*Math.sqrt(f*f-1);T=w=>{const A=Math.exp(-f*v*w),R=Math.min(y*w,300);return a-A*((m+f*v*b)*Math.sinh(R)+y*b*Math.cosh(R))/y}}const I={calculatedDuration:g&&p||null,next:y=>{const w=T(y);if(g)l.done=y>=p;else{let A=0;f<1&&(A=y===0?On(m):cb(T,y,w));const R=Math.abs(A)<=o,N=Math.abs(a-w)<=r;l.done=R&&N}return l.value=l.done?a:w,l},toString:()=>{const y=Math.min(mg(I),Yc),w=bg(A=>I.next(y*A).value,y,30);return y+"ms "+w}};return I}function pb({keyframes:e,velocity:t=0,power:n=.8,timeConstant:o=325,bounceDamping:r=10,bounceStiffness:s=500,modifyTarget:a,min:l,max:c,restDelta:u=.5,restSpeed:d}){const p=e[0],h={done:!1,value:p},g=R=>l!==void 0&&R<l||c!==void 0&&R>c,m=R=>l===void 0?c:c===void 0||Math.abs(l-R)<Math.abs(c-R)?l:c;let f=n*t;const b=p+f,v=a===void 0?b:a(b);v!==b&&(f=v-p);const S=R=>-f*Math.exp(-R/o),T=R=>v+S(R),I=R=>{const N=S(R),P=T(R);h.done=Math.abs(N)<=u,h.value=h.done?v:P};let y,w;const A=R=>{g(h.value)&&(y=R,w=db({keyframes:[h.value,m(h.value)],velocity:cb(T,R,h.value),damping:r,stiffness:s,restDelta:u,restSpeed:d}))};return A(0),{calculatedDuration:null,next:R=>{let N=!1;return!w&&y===void 0&&(N=!0,I(R),A(R)),y!==void 0&&R>=y?w.next(R-y):(!N&&I(R),h)}}}const NN=hi(.42,0,1,1),MN=hi(0,0,.58,1),fb=hi(.42,0,.58,1),kN=e=>Array.isArray(e)&&typeof e[0]!="number",hb={linear:$t,easeIn:NN,easeInOut:fb,easeOut:MN,circIn:su,circInOut:jg,circOut:Fg,backIn:iu,backInOut:Dg,backOut:kg,anticipate:Bg},mb=e=>{if(qc(e)){eo(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,o,r]=e;return hi(t,n,o,r)}else if(typeof e=="string")return eo(hb[e]!==void 0,`Invalid easing type '${e}'`),hb[e];return e};function DN(e,t,n){const o=[],r=n||lb,s=e.length-1;for(let a=0;a<s;a++){let l=r(e[a],e[a+1]);if(t){const c=Array.isArray(t)?t[a]||$t:t;l=bi(c,l)}o.push(l)}return o}function BN(e,t,{clamp:n=!0,ease:o,mixer:r}={}){const s=e.length;if(eo(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=DN(t,o,r),c=l.length,u=d=>{if(a&&d<e[0])return t[0];let p=0;if(c>1)for(;p<e.length-2&&!(d<e[p+1]);p++);const h=ir(e[p],e[p+1],d);return l[p](h)};return n?d=>u(jn(e[0],e[s-1],d)):u}function FN(e,t){const n=e[e.length-1];for(let o=1;o<=t;o++){const r=ir(0,t,o);e.push(it(n,1,r))}}function jN(e){const t=[0];return FN(t,e.length-1),t}function VN(e,t){return e.map(n=>n*t)}function LN(e,t){return e.map(()=>t||fb).splice(0,e.length-1)}function vi({duration:e=300,keyframes:t,times:n,ease:o="easeInOut"}){const r=kN(o)?o.map(mb):mb(o),s={done:!1,value:t[0]},a=VN(n&&n.length===t.length?n:jN(t),e),l=BN(a,t,{ease:Array.isArray(r)?r:LN(t,r)});return{calculatedDuration:e,next:c=>(s.value=l(c),s.done=c>=e,s)}}const _N=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Qe.update(t,!0),stop:()=>to(t),now:()=>It.isProcessing?It.timestamp:Nn.now()}},$N={decay:pb,inertia:pb,tween:vi,keyframes:vi,spring:db},WN=e=>e/100;class Tu extends rb{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:c}=this.options;c&&c()};const{name:n,motionValue:o,element:r,keyframes:s}=this.options,a=(r==null?void 0:r.KeyframeResolver)||mu,l=(c,u)=>this.onKeyframesResolved(c,u);this.resolver=new a(s,l,n,o,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:s,velocity:a=0}=this.options,l=Jc(n)?n:$N[n]||vi;let c,u;process.env.NODE_ENV!=="production"&&l!==vi&&eo(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l!==vi&&typeof t[0]!="number"&&(c=bi(WN,lb(t[0],t[1])),t=[0,100]);const d=l({...this.options,keyframes:t});s==="mirror"&&(u=l({...this.options,keyframes:[...t].reverse(),velocity:-a})),d.calculatedDuration===null&&(d.calculatedDuration=mg(d));const{calculatedDuration:p}=d,h=p+r,g=h*(o+1)-r;return{generator:d,mirroredGenerator:u,mapPercentToKeyframes:c,calculatedDuration:p,resolvedDuration:h,totalDuration:g}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:o}=this;if(!o){const{keyframes:R}=this.options;return{done:!0,value:R[R.length-1]}}const{finalKeyframe:r,generator:s,mirroredGenerator:a,mapPercentToKeyframes:l,keyframes:c,calculatedDuration:u,totalDuration:d,resolvedDuration:p}=o;if(this.startTime===null)return s.next(0);const{delay:h,repeat:g,repeatType:m,repeatDelay:f,onUpdate:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const v=this.currentTime-h*(this.speed>=0?1:-1),S=this.speed>=0?v<0:v>d;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let T=this.currentTime,I=s;if(g){const R=Math.min(this.currentTime,d)/p;let N=Math.floor(R),P=R%1;!P&&R>=1&&(P=1),P===1&&N--,N=Math.min(N,g+1),!!(N%2)&&(m==="reverse"?(P=1-P,f&&(P-=f/p)):m==="mirror"&&(I=a)),T=jn(0,1,P)*p}const y=S?{done:!1,value:c[0]}:I.next(T);l&&(y.value=l(y.value));let{done:w}=y;!S&&u!==null&&(w=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&w);return A&&r!==void 0&&(y.value=oa(c,this.options,r)),b&&b(y.value),A&&this.finish(),y}get duration(){const{resolved:t}=this;return t?Fn(t.calculatedDuration):0}get time(){return Fn(this.currentTime)}set time(t){t=On(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Fn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=_N,onPlay:n,startTime:o}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=r):this.startTime=o??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const GN=new Set(["opacity","clipPath","filter","transform"]);function zN(e,t,n,{delay:o=0,duration:r=300,repeat:s=0,repeatType:a="loop",ease:l="easeInOut",times:c}={}){const u={[t]:n};c&&(u.offset=c);const d=yg(l,r);return Array.isArray(d)&&(u.easing=d),e.animate(u,{delay:o,duration:r,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:a==="reverse"?"alternate":"normal"})}const HN=Nc(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ia=10,XN=2e4;function UN(e){return Jc(e.type)||e.type==="spring"||!vg(e.ease)}function ZN(e,t){const n=new Tu({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let o={done:!1,value:e[0]};const r=[];let s=0;for(;!o.done&&s<XN;)o=n.sample(s),r.push(o.value),s+=ia;return{times:void 0,keyframes:r,duration:s-ia,ease:"linear"}}const gb={anticipate:Bg,backInOut:Dg,circInOut:jg};function YN(e){return e in gb}class bb extends rb{constructor(t){super(t);const{name:n,motionValue:o,element:r,keyframes:s}=this.options;this.resolver=new nb(s,(a,l)=>this.onKeyframesResolved(a,l),n,o,r),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:o=300,times:r,ease:s,type:a,motionValue:l,name:c,startTime:u}=this.options;if(!l.owner||!l.owner.current)return!1;if(typeof s=="string"&&ta()&&YN(s)&&(s=gb[s]),UN(this.options)){const{onComplete:p,onUpdate:h,motionValue:g,element:m,...f}=this.options,b=ZN(t,f);t=b.keyframes,t.length===1&&(t[1]=t[0]),o=b.duration,r=b.times,s=b.ease,a="keyframes"}const d=zN(l.owner.current,c,t,{...this.options,duration:o,times:r,ease:s});return d.startTime=u??this.calcStartTime(),this.pendingTimeline?(gg(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:p}=this.options;l.set(oa(t,this.options,n)),p&&p(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:o,times:r,type:a,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Fn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Fn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:o}=n;o.currentTime=On(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:o}=n;o.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return $t;const{animation:o}=n;gg(o,t)}return $t}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:o,duration:r,type:s,ease:a,times:l}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:d,onComplete:p,element:h,...g}=this.options,m=new Tu({...g,keyframes:o,duration:r,type:s,ease:a,times:l,isGenerator:!0}),f=On(this.time);u.setWithVelocity(m.sample(f-ia).value,m.sample(f).value,ia)}const{onStop:c}=this.options;c&&c(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:o,repeatDelay:r,repeatType:s,damping:a,type:l}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=n.owner.getProps();return HN()&&o&&GN.has(o)&&!c&&!u&&!r&&s!=="mirror"&&a!==0&&l!=="inertia"}}const JN={type:"spring",stiffness:500,damping:25,restSpeed:10},qN=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),KN={type:"keyframes",duration:.8},QN={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},eM=(e,{keyframes:t})=>t.length>2?KN:yo.has(e)?e.startsWith("scale")?qN(t[1]):JN:QN;function tM({when:e,delay:t,delayChildren:n,staggerChildren:o,staggerDirection:r,repeat:s,repeatType:a,repeatDelay:l,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const Eu=(e,t,n,o={},r,s)=>a=>{const l=Zc(o,e)||{},c=l.delay||o.delay||0;let{elapsed:u=0}=o;u=u-On(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:h=>{t.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:s?void 0:r};tM(l)||(d={...d,...eM(e,d)}),d.duration&&(d.duration=On(d.duration)),d.repeatDelay&&(d.repeatDelay=On(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let p=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(p=!0)),p&&!s&&t.get()!==void 0){const h=oa(d.keyframes,l);if(h!==void 0)return Qe.update(()=>{d.onUpdate(h),d.onComplete()}),new CP([])}return!s&&bb.supports(d)?new bb(d):new Tu(d)};function nM({protectedKeys:e,needsAnimating:t},n){const o=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,o}function vb(e,t,{delay:n=0,transitionOverride:o,type:r}={}){var s;let{transition:a=e.getDefaultTransition(),transitionEnd:l,...c}=t;o&&(a=o);const u=[],d=r&&e.animationState&&e.animationState.getState()[r];for(const p in c){const h=e.getValue(p,(s=e.latestValues[p])!==null&&s!==void 0?s:null),g=c[p];if(g===void 0||d&&nM(d,p))continue;const m={delay:n,...Zc(a||{},p)};let f=!1;if(window.MotionHandoffAnimation){const v=Og(e);if(v){const S=window.MotionHandoffAnimation(v,p,Qe);S!==null&&(m.startTime=S,f=!0)}}ru(e,p),h.start(Eu(p,h,g,e.shouldReduceMotion&&wg.has(p)?{type:!1}:m,e,f));const b=h.animation;b&&u.push(b)}return l&&Promise.all(u).then(()=>{Qe.update(()=>{l&&BP(e,l)})}),u}function Iu(e,t,n={}){var o;const r=ui(e,t,n.type==="exit"?(o=e.presenceContext)===null||o===void 0?void 0:o.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const a=r?()=>Promise.all(vb(e,r,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:p,staggerDirection:h}=s;return oM(e,t,d+u,p,h,n)}:()=>Promise.resolve(),{when:c}=s;if(c){const[u,d]=c==="beforeChildren"?[a,l]:[l,a];return u().then(()=>d())}else return Promise.all([a(),l(n.delay)])}function oM(e,t,n=0,o=0,r=1,s){const a=[],l=(e.variantChildren.size-1)*o,c=r===1?(u=0)=>u*o:(u=0)=>l-u*o;return Array.from(e.variantChildren).sort(rM).forEach((u,d)=>{u.notify("AnimationStart",t),a.push(Iu(u,t,{...s,delay:n+c(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function rM(e,t){return e.sortNodePosition(t)}function iM(e,t,n={}){e.notify("AnimationStart",t);let o;if(Array.isArray(t)){const r=t.map(s=>Iu(e,s,n));o=Promise.all(r)}else if(typeof t=="string")o=Iu(e,t,n);else{const r=typeof t=="function"?ui(e,t,n.custom):t;o=Promise.all(vb(e,r,n))}return o.then(()=>{e.notify("AnimationComplete",t)})}function yb(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let o=0;o<n;o++)if(t[o]!==e[o])return!1;return!0}const sM=Dc.length;function xb(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?xb(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<sM;n++){const o=Dc[n],r=e.props[o];(si(r)||r===!1)&&(t[o]=r)}return t}const aM=[...kc].reverse(),lM=kc.length;function cM(e){return t=>Promise.all(t.map(({animation:n,options:o})=>iM(e,n,o)))}function uM(e){let t=cM(e),n=Cb(),o=!0;const r=c=>(u,d)=>{var p;const h=ui(e,d,c==="exit"?(p=e.presenceContext)===null||p===void 0?void 0:p.custom:void 0);if(h){const{transition:g,transitionEnd:m,...f}=h;u={...u,...f,...m}}return u};function s(c){t=c(e)}function a(c){const{props:u}=e,d=xb(e.parent)||{},p=[],h=new Set;let g={},m=1/0;for(let b=0;b<lM;b++){const v=aM[b],S=n[v],T=u[v]!==void 0?u[v]:d[v],I=si(T),y=v===c?S.isActive:null;y===!1&&(m=b);let w=T===d[v]&&T!==u[v]&&I;if(w&&o&&e.manuallyAnimateOnMount&&(w=!1),S.protectedKeys={...g},!S.isActive&&y===null||!T&&!S.prevProp||qs(T)||typeof T=="boolean")continue;const A=dM(S.prevProp,T);let R=A||v===c&&S.isActive&&!w&&I||b>m&&I,N=!1;const P=Array.isArray(T)?T:[T];let F=P.reduce(r(v),{});y===!1&&(F={});const{prevResolvedValues:G={}}=S,j={...G,...F},L=$=>{R=!0,h.has($)&&(N=!0,h.delete($)),S.needsAnimating[$]=!0;const D=e.getValue($);D&&(D.liveStyle=!1)};for(const $ in j){const D=F[$],X=G[$];if(g.hasOwnProperty($))continue;let k=!1;Xc(D)&&Xc(X)?k=!yb(D,X):k=D!==X,k?D!=null?L($):h.add($):D!==void 0&&h.has($)?L($):S.protectedKeys[$]=!0}S.prevProp=T,S.prevResolvedValues=F,S.isActive&&(g={...g,...F}),o&&e.blockInitialAnimation&&(R=!1),R&&(!(w&&A)||N)&&p.push(...P.map($=>({animation:$,options:{type:v}})))}if(h.size){const b={};if(typeof u.initial!="boolean"){const v=ui(e,Array.isArray(u.initial)?u.initial[0]:u.initial);v&&v.transition&&(b.transition=v.transition)}h.forEach(v=>{const S=e.getBaseTarget(v),T=e.getValue(v);T&&(T.liveStyle=!0),b[v]=S??null}),p.push({animation:b})}let f=!!p.length;return o&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(f=!1),o=!1,f?t(p):Promise.resolve()}function l(c,u){var d;if(n[c].isActive===u)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(h=>{var g;return(g=h.animationState)===null||g===void 0?void 0:g.setActive(c,u)}),n[c].isActive=u;const p=a(c);for(const h in n)n[h].protectedKeys={};return p}return{animateChanges:a,setActive:l,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Cb(),o=!0}}}function dM(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!yb(t,e):!1}function To(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Cb(){return{animate:To(!0),whileInView:To(),whileHover:To(),whileTap:To(),whileDrag:To(),whileFocus:To(),exit:To()}}class ro{constructor(t){this.isMounted=!1,this.node=t}update(){}}class pM extends ro{constructor(t){super(t),t.animationState||(t.animationState=uM(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();qs(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let fM=0;class hM extends ro{constructor(){super(...arguments),this.id=fM++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;const r=this.node.animationState.setActive("exit",!t);n&&!t&&r.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const mM={animation:{Feature:pM},exit:{Feature:hM}};function yi(e,t,n,o={passive:!0}){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n)}function xi(e){return{point:{x:e.pageX,y:e.pageY}}}const gM=e=>t=>Qc(t)&&e(t,xi(t));function Ci(e,t,n,o){return yi(e,t,gM(n),o)}const Tb=(e,t)=>Math.abs(e-t);function bM(e,t){const n=Tb(e.x,t.x),o=Tb(e.y,t.y);return Math.sqrt(n**2+o**2)}class Eb{constructor(t,n,{transformPagePoint:o,contextWindow:r,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=wu(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=bM(p.offset,{x:0,y:0})>=3;if(!h&&!g)return;const{point:m}=p,{timestamp:f}=It;this.history.push({...m,timestamp:f});const{onStart:b,onMove:v}=this.handlers;h||(b&&b(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,p)},this.handlePointerMove=(p,h)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=Su(h,this.transformPagePoint),Qe.update(this.updatePoint,!0)},this.handlePointerUp=(p,h)=>{this.end();const{onEnd:g,onSessionEnd:m,resumeAnimation:f}=this.handlers;if(this.dragSnapToOrigin&&f&&f(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=wu(p.type==="pointercancel"?this.lastMoveEventInfo:Su(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(p,b),m&&m(p,b)},!Qc(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=o,this.contextWindow=r||window;const a=xi(t),l=Su(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=It;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,wu(l,this.history)),this.removeListeners=bi(Ci(this.contextWindow,"pointermove",this.handlePointerMove),Ci(this.contextWindow,"pointerup",this.handlePointerUp),Ci(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),to(this.updatePoint)}}function Su(e,t){return t?{point:t(e.point)}:e}function Ib(e,t){return{x:e.x-t.x,y:e.y-t.y}}function wu({point:e},t){return{point:e,delta:Ib(e,Sb(t)),offset:Ib(e,vM(t)),velocity:yM(t,.1)}}function vM(e){return e[0]}function Sb(e){return e[e.length-1]}function yM(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,o=null;const r=Sb(e);for(;n>=0&&(o=e[n],!(r.timestamp-o.timestamp>On(t)));)n--;if(!o)return{x:0,y:0};const s=Fn(r.timestamp-o.timestamp);if(s===0)return{x:0,y:0};const a={x:(r.x-o.x)/s,y:(r.y-o.y)/s};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}const wb=1e-4,xM=1-wb,CM=1+wb,Ab=.01,TM=0-Ab,EM=0+Ab;function Dt(e){return e.max-e.min}function IM(e,t,n){return Math.abs(e-t)<=n}function Rb(e,t,n,o=.5){e.origin=o,e.originPoint=it(t.min,t.max,e.origin),e.scale=Dt(n)/Dt(t),e.translate=it(n.min,n.max,e.origin)-e.originPoint,(e.scale>=xM&&e.scale<=CM||isNaN(e.scale))&&(e.scale=1),(e.translate>=TM&&e.translate<=EM||isNaN(e.translate))&&(e.translate=0)}function Ti(e,t,n,o){Rb(e.x,t.x,n.x,o?o.originX:void 0),Rb(e.y,t.y,n.y,o?o.originY:void 0)}function Ob(e,t,n){e.min=n.min+t.min,e.max=e.min+Dt(t)}function SM(e,t,n){Ob(e.x,t.x,n.x),Ob(e.y,t.y,n.y)}function Pb(e,t,n){e.min=t.min-n.min,e.max=e.min+Dt(t)}function Ei(e,t,n){Pb(e.x,t.x,n.x),Pb(e.y,t.y,n.y)}function wM(e,{min:t,max:n},o){return t!==void 0&&e<t?e=o?it(t,e,o.min):Math.max(e,t):n!==void 0&&e>n&&(e=o?it(n,e,o.max):Math.min(e,n)),e}function Nb(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function AM(e,{top:t,left:n,bottom:o,right:r}){return{x:Nb(e.x,n,r),y:Nb(e.y,t,o)}}function Mb(e,t){let n=t.min-e.min,o=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,o]=[o,n]),{min:n,max:o}}function RM(e,t){return{x:Mb(e.x,t.x),y:Mb(e.y,t.y)}}function OM(e,t){let n=.5;const o=Dt(e),r=Dt(t);return r>o?n=ir(t.min,t.max-o,e.min):o>r&&(n=ir(e.min,e.max-r,t.min)),jn(0,1,n)}function PM(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Au=.35;function NM(e=Au){return e===!1?e=0:e===!0&&(e=Au),{x:kb(e,"left","right"),y:kb(e,"top","bottom")}}function kb(e,t,n){return{min:Db(e,t),max:Db(e,n)}}function Db(e,t){return typeof e=="number"?e:e[t]||0}const Bb=()=>({translate:0,scale:1,origin:0,originPoint:0}),pr=()=>({x:Bb(),y:Bb()}),Fb=()=>({min:0,max:0}),mt=()=>({x:Fb(),y:Fb()});function sn(e){return[e("x"),e("y")]}function jb({top:e,left:t,right:n,bottom:o}){return{x:{min:t,max:n},y:{min:e,max:o}}}function MM({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function kM(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),o=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:o.y,right:o.x}}function Ru(e){return e===void 0||e===1}function Ou({scale:e,scaleX:t,scaleY:n}){return!Ru(e)||!Ru(t)||!Ru(n)}function Eo(e){return Ou(e)||Vb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Vb(e){return Lb(e.x)||Lb(e.y)}function Lb(e){return e&&e!=="0%"}function sa(e,t,n){const o=e-n,r=t*o;return n+r}function _b(e,t,n,o,r){return r!==void 0&&(e=sa(e,r,o)),sa(e,n,o)+t}function Pu(e,t=0,n=1,o,r){e.min=_b(e.min,t,n,o,r),e.max=_b(e.max,t,n,o,r)}function $b(e,{x:t,y:n}){Pu(e.x,t.translate,t.scale,t.originPoint),Pu(e.y,n.translate,n.scale,n.originPoint)}const Wb=.999999999999,Gb=1.0000000000001;function DM(e,t,n,o=!1){const r=n.length;if(!r)return;t.x=t.y=1;let s,a;for(let l=0;l<r;l++){s=n[l],a=s.projectionDelta;const{visualElement:c}=s.options;c&&c.props.style&&c.props.style.display==="contents"||(o&&s.options.layoutScroll&&s.scroll&&s!==s.root&&hr(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,$b(e,a)),o&&Eo(s.latestValues)&&hr(e,s.latestValues))}t.x<Gb&&t.x>Wb&&(t.x=1),t.y<Gb&&t.y>Wb&&(t.y=1)}function fr(e,t){e.min=e.min+t,e.max=e.max+t}function zb(e,t,n,o,r=.5){const s=it(e.min,e.max,r);Pu(e,t,n,s,o)}function hr(e,t){zb(e.x,t.x,t.scaleX,t.scale,t.originX),zb(e.y,t.y,t.scaleY,t.scale,t.originY)}function Hb(e,t){return jb(kM(e.getBoundingClientRect(),t))}function BM(e,t,n){const o=Hb(e,n),{scroll:r}=t;return r&&(fr(o.x,r.offset.x),fr(o.y,r.offset.y)),o}const Xb=({current:e})=>e?e.ownerDocument.defaultView:null,FM=new WeakMap;class jM{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=mt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const r=d=>{const{dragSnapToOrigin:p}=this.getProps();p?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(xi(d).point)},s=(d,p)=>{const{drag:h,dragPropagation:g,onDragStart:m}=this.getProps();if(h&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=PP(h),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),sn(b=>{let v=this.getAxisMotionValue(b).get()||0;if(Pn.test(v)){const{projection:S}=this.visualElement;if(S&&S.layout){const T=S.layout.layoutBox[b];T&&(v=Dt(T)*(parseFloat(v)/100))}}this.originPoint[b]=v}),m&&Qe.postRender(()=>m(d,p)),ru(this.visualElement,"transform");const{animationState:f}=this.visualElement;f&&f.setActive("whileDrag",!0)},a=(d,p)=>{const{dragPropagation:h,dragDirectionLock:g,onDirectionLock:m,onDrag:f}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:b}=p;if(g&&this.currentDirection===null){this.currentDirection=VM(b),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",p.point,b),this.updateAxis("y",p.point,b),this.visualElement.render(),f&&f(d,p)},l=(d,p)=>this.stop(d,p),c=()=>sn(d=>{var p;return this.getAnimationState(d)==="paused"&&((p=this.getAxisMotionValue(d).animation)===null||p===void 0?void 0:p.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Eb(t,{onSessionStart:r,onStart:s,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Xb(this.visualElement)})}stop(t,n){const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:r}=n;this.startAnimation(r);const{onDragEnd:s}=this.getProps();s&&Qe.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,o){const{drag:r}=this.getProps();if(!o||!aa(t,r,this.currentDirection))return;const s=this.getAxisMotionValue(t);let a=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(a=wM(a,this.constraints[t],this.elastic[t])),s.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:o}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&ar(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&r?this.constraints=AM(r.layoutBox,n):this.constraints=!1,this.elastic=NM(o),s!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&sn(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=PM(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ar(t))return!1;const o=t.current;eo(o!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const s=BM(o,r.root,this.visualElement.getTransformPagePoint());let a=RM(r.layout.layoutBox,s);if(n){const l=n(MM(a));this.hasMutatedConstraints=!!l,l&&(a=jb(l))}return a}startAnimation(t){const{drag:n,dragMomentum:o,dragElastic:r,dragTransition:s,dragSnapToOrigin:a,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=sn(d=>{if(!aa(d,n,this.currentDirection))return;let p=c&&c[d]||{};a&&(p={min:0,max:0});const h=r?200:1e6,g=r?40:1e7,m={type:"inertia",velocity:o?t[d]:0,bounceStiffness:h,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...s,...p};return this.startAxisValueAnimation(d,m)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const o=this.getAxisMotionValue(t);return ru(this.visualElement,t),o.start(Eu(t,o,0,n,this.visualElement,!1))}stopAnimation(){sn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){sn(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,o=this.visualElement.getProps(),r=o[n];return r||this.visualElement.getValue(t,(o.initial?o.initial[t]:void 0)||0)}snapToCursor(t){sn(n=>{const{drag:o}=this.getProps();if(!aa(n,o,this.currentDirection))return;const{projection:r}=this.visualElement,s=this.getAxisMotionValue(n);if(r&&r.layout){const{min:a,max:l}=r.layout.layoutBox[n];s.set(t[n]-it(a,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:o}=this.visualElement;if(!ar(n)||!o||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};sn(a=>{const l=this.getAxisMotionValue(a);if(l&&this.constraints!==!1){const c=l.get();r[a]=OM({min:c,max:c},this.constraints[a])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),sn(a=>{if(!aa(a,t,null))return;const l=this.getAxisMotionValue(a),{min:c,max:u}=this.constraints[a];l.set(it(c,u,r[a]))})}addListeners(){if(!this.visualElement.current)return;FM.set(this.visualElement,this);const t=this.visualElement.current,n=Ci(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(c)}),o=()=>{const{dragConstraints:c}=this.getProps();ar(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,s=r.addEventListener("measure",o);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),Qe.read(o);const a=yi(window,"resize",()=>this.scalePositionWithinConstraints()),l=r.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(sn(d=>{const p=this.getAxisMotionValue(d);p&&(this.originPoint[d]+=c[d].translate,p.set(p.get()+c[d].translate))}),this.visualElement.render())});return()=>{a(),n(),s(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:o=!1,dragPropagation:r=!1,dragConstraints:s=!1,dragElastic:a=Au,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:o,dragPropagation:r,dragConstraints:s,dragElastic:a,dragMomentum:l}}}function aa(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function VM(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class LM extends ro{constructor(t){super(t),this.removeGroupControls=$t,this.removeListeners=$t,this.controls=new jM(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||$t}unmount(){this.removeGroupControls(),this.removeListeners()}}const Ub=e=>(t,n)=>{e&&Qe.postRender(()=>e(t,n))};class _M extends ro{constructor(){super(...arguments),this.removePointerDownListener=$t}onPointerDown(t){this.session=new Eb(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Xb(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:o,onPanEnd:r}=this.node.getProps();return{onSessionStart:Ub(t),onStart:Ub(n),onMove:o,onEnd:(s,a)=>{delete this.session,r&&Qe.postRender(()=>r(s,a))}}}mount(){this.removePointerDownListener=Ci(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const la={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Zb(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ii={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ve.test(e))e=parseFloat(e);else return e;const n=Zb(e,t.target.x),o=Zb(e,t.target.y);return`${n}% ${o}%`}},$M={correct:(e,{treeScale:t,projectionDelta:n})=>{const o=e,r=oo.parse(e);if(r.length>5)return o;const s=oo.createTransformer(e),a=typeof r[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;r[0+a]/=l,r[1+a]/=c;const u=it(l,c,.5);return typeof r[2+a]=="number"&&(r[2+a]/=u),typeof r[3+a]=="number"&&(r[3+a]/=u),s(r)}};class WM extends M.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o,layoutId:r}=this.props,{projection:s}=t;ZO(GM),s&&(n.group&&n.group.add(s),o&&o.register&&r&&o.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),la.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:o,drag:r,isPresent:s}=this.props,a=o.projection;return a&&(a.isPresent=s,r||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?a.promote():a.relegate()||Qe.postRender(()=>{const l=a.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Fc.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o}=this.props,{projection:r}=t;r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),o&&o.deregister&&o.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Yb(e){const[t,n]=wO(),o=M.useContext(_m);return x.jsx(WM,{...e,layoutGroup:o,switchLayoutGroup:M.useContext(qm),isPresent:t,safeToRemove:n})}const GM={borderRadius:{...Ii,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ii,borderTopRightRadius:Ii,borderBottomLeftRadius:Ii,borderBottomRightRadius:Ii,boxShadow:$M};function zM(e,t,n){const o=At(e)?e:fi(e);return o.start(Eu("",o,t,n)),o.animation}function HM(e){return e instanceof SVGElement&&e.tagName!=="svg"}const XM=(e,t)=>e.depth-t.depth;class UM{constructor(){this.children=[],this.isDirty=!1}add(t){tu(this.children,t),this.isDirty=!0}remove(t){nu(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(XM),this.isDirty=!1,this.children.forEach(t)}}function ZM(e,t){const n=Nn.now(),o=({timestamp:r})=>{const s=r-n;s>=t&&(to(o),e(s-t))};return Qe.read(o,!0),()=>to(o)}const Jb=["TopLeft","TopRight","BottomLeft","BottomRight"],YM=Jb.length,qb=e=>typeof e=="string"?parseFloat(e):e,Kb=e=>typeof e=="number"||ve.test(e);function JM(e,t,n,o,r,s){r?(e.opacity=it(0,n.opacity!==void 0?n.opacity:1,qM(o)),e.opacityExit=it(t.opacity!==void 0?t.opacity:1,0,KM(o))):s&&(e.opacity=it(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,o));for(let a=0;a<YM;a++){const l=`border${Jb[a]}Radius`;let c=Qb(t,l),u=Qb(n,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||Kb(c)===Kb(u)?(e[l]=Math.max(it(qb(c),qb(u),o),0),(Pn.test(u)||Pn.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||n.rotate)&&(e.rotate=it(t.rotate||0,n.rotate||0,o))}function Qb(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const qM=e0(0,.5,Fg),KM=e0(.5,.95,$t);function e0(e,t,n){return o=>o<e?0:o>t?1:n(ir(e,t,o))}function t0(e,t){e.min=t.min,e.max=t.max}function an(e,t){t0(e.x,t.x),t0(e.y,t.y)}function n0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function o0(e,t,n,o,r){return e-=t,e=sa(e,1/n,o),r!==void 0&&(e=sa(e,1/r,o)),e}function QM(e,t=0,n=1,o=.5,r,s=e,a=e){if(Pn.test(t)&&(t=parseFloat(t),t=it(a.min,a.max,t/100)-a.min),typeof t!="number")return;let l=it(s.min,s.max,o);e===s&&(l-=t),e.min=o0(e.min,t,n,l,r),e.max=o0(e.max,t,n,l,r)}function r0(e,t,[n,o,r],s,a){QM(e,t[n],t[o],t[r],t.scale,s,a)}const ek=["x","scaleX","originX"],tk=["y","scaleY","originY"];function i0(e,t,n,o){r0(e.x,t,ek,n?n.x:void 0,o?o.x:void 0),r0(e.y,t,tk,n?n.y:void 0,o?o.y:void 0)}function s0(e){return e.translate===0&&e.scale===1}function a0(e){return s0(e.x)&&s0(e.y)}function l0(e,t){return e.min===t.min&&e.max===t.max}function nk(e,t){return l0(e.x,t.x)&&l0(e.y,t.y)}function c0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function u0(e,t){return c0(e.x,t.x)&&c0(e.y,t.y)}function d0(e){return Dt(e.x)/Dt(e.y)}function p0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class ok{constructor(){this.members=[]}add(t){tu(this.members,t),t.scheduleRender()}remove(t){if(nu(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(r=>t===r);if(n===0)return!1;let o;for(let r=n;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1){o=s;break}}return o?(this.promote(o),!0):!1}promote(t,n){const o=this.lead;if(t!==o&&(this.prevLead=o,this.lead=t,t.show(),o)){o.instance&&o.scheduleRender(),t.scheduleRender(),t.resumeFrom=o,n&&(t.resumeFrom.preserveOpacity=!0),o.snapshot&&(t.snapshot=o.snapshot,t.snapshot.latestValues=o.animationValues||o.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:r}=t.options;r===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:o}=t;n.onExitComplete&&n.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function rk(e,t,n){let o="";const r=e.x.translate/t.x,s=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((r||s||a)&&(o=`translate3d(${r}px, ${s}px, ${a}px) `),(t.x!==1||t.y!==1)&&(o+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:p,rotateY:h,skewX:g,skewY:m}=n;u&&(o=`perspective(${u}px) ${o}`),d&&(o+=`rotate(${d}deg) `),p&&(o+=`rotateX(${p}deg) `),h&&(o+=`rotateY(${h}deg) `),g&&(o+=`skewX(${g}deg) `),m&&(o+=`skewY(${m}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(o+=`scale(${l}, ${c})`),o||"none"}const Nu=["","X","Y","Z"],ik={visibility:"hidden"},f0=1e3;let sk=0;function Mu(e,t,n,o){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),o&&(o[e]=0))}function h0(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Og(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Qe,!(r||s))}const{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&h0(o)}function m0({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:o,resetTransform:r}){return class{constructor(a={},l=t==null?void 0:t()){this.id=sk++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(ck),this.nodes.forEach(hk),this.nodes.forEach(mk),this.nodes.forEach(uk)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new UM)}addEventListener(a,l){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new ou),this.eventHandlers.get(a).add(l)}notifyListeners(a,...l){const c=this.eventHandlers.get(a);c&&c.notify(...l)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,l=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=HM(a),this.instance=a;const{layoutId:c,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),l&&(u||c)&&(this.isLayoutDirty=!0),e){let p;const h=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,p&&p(),p=ZM(h,250),la.hasAnimatedSinceResize&&(la.hasAnimatedSinceResize=!1,this.nodes.forEach(b0))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||u)&&this.addEventListener("didUpdate",({delta:p,hasLayoutChanged:h,hasRelativeLayoutChanged:g,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const f=this.options.transition||d.getDefaultTransition()||xk,{onLayoutAnimationStart:b,onLayoutAnimationComplete:v}=d.getProps(),S=!this.targetLayout||!u0(this.targetLayout,m),T=!h&&g;if(this.options.layoutRoot||this.resumeFrom||T||h&&(S||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(p,T);const I={...Zc(f,"layout"),onPlay:b,onComplete:v};(d.shouldReduceMotion||this.options.layoutRoot)&&(I.delay=0,I.type=!1),this.startAnimation(I)}else h||b0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,to(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(gk),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&h0(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const p=this.path[d];p.shouldResetTransform=!0,p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(g0);return}this.isUpdating||this.nodes.forEach(pk),this.isUpdating=!1,this.nodes.forEach(fk),this.nodes.forEach(ak),this.nodes.forEach(lk),this.clearAllSnapshots();const l=Nn.now();It.delta=jn(0,1e3/60,l-It.timestamp),It.timestamp=l,It.isProcessing=!0,Mc.update.process(It),Mc.preRender.process(It),Mc.render.process(It),It.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Fc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(dk),this.sharedNodes.forEach(bk)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Qe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Qe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Dt(this.snapshot.measuredBox.x)&&!Dt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=mt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(l=!1),l){const c=o(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!r)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!a0(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;a&&(l||Eo(this.latestValues)||d)&&(r(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return a&&(c=this.removeTransform(c)),Ck(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:l}=this.options;if(!l)return mt();const c=l.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(Tk))){const{scroll:d}=this.root;d&&(fr(c.x,d.offset.x),fr(c.y,d.offset.y))}return c}removeElementScroll(a){var l;const c=mt();if(an(c,a),!((l=this.scroll)===null||l===void 0)&&l.wasRoot)return c;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:p,options:h}=d;d!==this.root&&p&&h.layoutScroll&&(p.wasRoot&&an(c,a),fr(c.x,p.offset.x),fr(c.y,p.offset.y))}return c}applyTransform(a,l=!1){const c=mt();an(c,a);for(let u=0;u<this.path.length;u++){const d=this.path[u];!l&&d.options.layoutScroll&&d.scroll&&d!==d.root&&hr(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),Eo(d.latestValues)&&hr(c,d.latestValues)}return Eo(this.latestValues)&&hr(c,this.latestValues),c}removeTransform(a){const l=mt();an(l,a);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!Eo(u.latestValues))continue;Ou(u.latestValues)&&u.updateSnapshot();const d=mt(),p=u.measurePageBox();an(d,p),i0(l,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return Eo(this.latestValues)&&i0(l,this.latestValues),l}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==It.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var l;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==c;if(!(a||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((l=this.parent)===null||l===void 0)&&l.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:p,layoutId:h}=this.options;if(!(!this.layout||!(p||h))){if(this.resolvedRelativeTargetAt=It.timestamp,!this.targetDelta&&!this.relativeTarget){const g=this.getClosestProjectingParent();g&&g.layout&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=mt(),this.relativeTargetOrigin=mt(),Ei(this.relativeTargetOrigin,this.layout.layoutBox,g.layout.layoutBox),an(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=mt(),this.targetWithTransforms=mt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),SM(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):an(this.target,this.layout.layoutBox),$b(this.target,this.targetDelta)):an(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const g=this.getClosestProjectingParent();g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=mt(),this.relativeTargetOrigin=mt(),Ei(this.relativeTargetOrigin,this.target,g.target),an(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Ou(this.parent.latestValues)||Vb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var a;const l=this.getLead(),c=!!this.resumingFrom||this!==l;let u=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(u=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===It.timestamp&&(u=!1),u)return;const{layout:d,layoutId:p}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||p))return;an(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,g=this.treeScale.y;DM(this.layoutCorrected,this.treeScale,this.path,c),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=mt());const{target:m}=l;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(n0(this.prevProjectionDelta.x,this.projectionDelta.x),n0(this.prevProjectionDelta.y,this.projectionDelta.y)),Ti(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==g||!p0(this.projectionDelta.x,this.prevProjectionDelta.x)||!p0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var l;if((l=this.options.visualElement)===null||l===void 0||l.scheduleRender(),a){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=pr(),this.projectionDelta=pr(),this.projectionDeltaWithTransform=pr()}setAnimationOrigin(a,l=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},p=pr();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const h=mt(),g=c?c.source:void 0,m=this.layout?this.layout.source:void 0,f=g!==m,b=this.getStack(),v=!b||b.members.length<=1,S=!!(f&&!v&&this.options.crossfade===!0&&!this.path.some(yk));this.animationProgress=0;let T;this.mixTargetDelta=I=>{const y=I/1e3;v0(p.x,a.x,y),v0(p.y,a.y,y),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ei(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),vk(this.relativeTarget,this.relativeTargetOrigin,h,y),T&&nk(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=mt()),an(T,this.relativeTarget)),f&&(this.animationValues=d,JM(d,u,this.latestValues,y,S,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=y},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(to(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Qe.update(()=>{la.hasAnimatedSinceResize=!0,this.currentAnimation=zM(0,f0,{...a,onUpdate:l=>{this.mixTargetDelta(l),a.onUpdate&&a.onUpdate(l)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(f0),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:d}=a;if(!(!l||!c||!u)){if(this!==a&&this.layout&&u&&E0(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||mt();const p=Dt(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+p;const h=Dt(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+h}an(l,c),hr(l,d),Ti(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(a,l){this.sharedNodes.has(a)||this.sharedNodes.set(a,new ok),this.sharedNodes.get(a).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:l}=this.options;return l?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:l}=this.options;return l?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let l=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&Mu("z",a,u,this.animationValues);for(let d=0;d<Nu.length;d++)Mu(`rotate${Nu[d]}`,a,u,this.animationValues),Mu(`skew${Nu[d]}`,a,u,this.animationValues);a.render();for(const d in u)a.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);a.scheduleRender()}getProjectionStyles(a){var l,c;if(!this.instance||this.isSVG)return;if(!this.isVisible)return ik;const u={visibility:""},d=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=ea(a==null?void 0:a.pointerEvents)||"",u.transform=d?d(this.latestValues,""):"none",u;const p=this.getLead();if(!this.projectionDelta||!this.layout||!p.target){const f={};return this.options.layoutId&&(f.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,f.pointerEvents=ea(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Eo(this.latestValues)&&(f.transform=d?d({},""):"none",this.hasProjected=!1),f}const h=p.animationValues||p.latestValues;this.applyTransformsToTarget(),u.transform=rk(this.projectionDeltaWithTransform,this.treeScale,h),d&&(u.transform=d(h,u.transform));const{x:g,y:m}=this.projectionDelta;u.transformOrigin=`${g.origin*100}% ${m.origin*100}% 0`,p.animationValues?u.opacity=p===this?(c=(l=h.opacity)!==null&&l!==void 0?l:this.latestValues.opacity)!==null&&c!==void 0?c:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:u.opacity=p===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const f in ai){if(h[f]===void 0)continue;const{correct:b,applyTo:v,isCSSVariable:S}=ai[f],T=u.transform==="none"?h[f]:b(h[f],p);if(v){const I=v.length;for(let y=0;y<I;y++)u[v[y]]=T}else S?this.options.visualElement.renderState.vars[f]=T:u[f]=T}return this.options.layoutId&&(u.pointerEvents=p===this?ea(a==null?void 0:a.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var l;return(l=a.currentAnimation)===null||l===void 0?void 0:l.stop()}),this.root.nodes.forEach(g0),this.root.sharedNodes.clear()}}}function ak(e){e.updateLayout()}function lk(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:r}=e.layout,{animationType:s}=e.options,a=n.source!==e.layout.source;s==="size"?sn(p=>{const h=a?n.measuredBox[p]:n.layoutBox[p],g=Dt(h);h.min=o[p].min,h.max=h.min+g}):E0(s,n.layoutBox,o)&&sn(p=>{const h=a?n.measuredBox[p]:n.layoutBox[p],g=Dt(o[p]);h.max=h.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[p].max=e.relativeTarget[p].min+g)});const l=pr();Ti(l,o,n.layoutBox);const c=pr();a?Ti(c,e.applyTransform(r,!0),n.measuredBox):Ti(c,o,n.layoutBox);const u=!a0(l);let d=!1;if(!e.resumeFrom){const p=e.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:h,layout:g}=p;if(h&&g){const m=mt();Ei(m,n.layoutBox,h.layoutBox);const f=mt();Ei(f,o,g.layoutBox),u0(m,f)||(d=!0),p.options.layoutRoot&&(e.relativeTarget=f,e.relativeTargetOrigin=m,e.relativeParent=p)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:n,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:o}=e.options;o&&o()}e.options.transition=void 0}function ck(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function uk(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function dk(e){e.clearSnapshot()}function g0(e){e.clearMeasurements()}function pk(e){e.isLayoutDirty=!1}function fk(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function b0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function hk(e){e.resolveTargetDelta()}function mk(e){e.calcProjection()}function gk(e){e.resetSkewAndRotation()}function bk(e){e.removeLeadSnapshot()}function v0(e,t,n){e.translate=it(t.translate,0,n),e.scale=it(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function y0(e,t,n,o){e.min=it(t.min,n.min,o),e.max=it(t.max,n.max,o)}function vk(e,t,n,o){y0(e.x,t.x,n.x,o),y0(e.y,t.y,n.y,o)}function yk(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const xk={duration:.45,ease:[.4,0,.1,1]},x0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),C0=x0("applewebkit/")&&!x0("chrome/")?Math.round:$t;function T0(e){e.min=C0(e.min),e.max=C0(e.max)}function Ck(e){T0(e.x),T0(e.y)}function E0(e,t,n){return e==="position"||e==="preserve-aspect"&&!IM(d0(t),d0(n),.2)}function Tk(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const Ek=m0({attachResizeListener:(e,t)=>yi(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ku={current:void 0},I0=m0({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ku.current){const e=new Ek({});e.mount(window),e.setOptions({layoutScroll:!0}),ku.current=e}return ku.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Ik={pan:{Feature:_M},drag:{Feature:LM,ProjectionNode:I0,MeasureLayout:Yb}};function S0(e,t,n){const{props:o}=e;e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,s=o[r];s&&Qe.postRender(()=>s(t,xi(t)))}class Sk extends ro{mount(){const{current:t}=this.node;t&&(this.unmount=SP(t,(n,o)=>(S0(this.node,o,"Start"),r=>S0(this.node,r,"End"))))}unmount(){}}class wk extends ro{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=bi(yi(this.node.current,"focus",()=>this.onFocus()),yi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function w0(e,t,n){const{props:o}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&o.whileTap&&e.animationState.setActive("whileTap",n==="Start");const r="onTap"+(n==="End"?"":n),s=o[r];s&&Qe.postRender(()=>s(t,xi(t)))}class Ak extends ro{mount(){const{current:t}=this.node;t&&(this.unmount=OP(t,(n,o)=>(w0(this.node,o,"Start"),(r,{success:s})=>w0(this.node,r,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Du=new WeakMap,Bu=new WeakMap,Rk=e=>{const t=Du.get(e.target);t&&t(e)},Ok=e=>{e.forEach(Rk)};function Pk({root:e,...t}){const n=e||document;Bu.has(n)||Bu.set(n,{});const o=Bu.get(n),r=JSON.stringify(t);return o[r]||(o[r]=new IntersectionObserver(Ok,{root:e,...t})),o[r]}function Nk(e,t,n){const o=Pk(t);return Du.set(e,n),o.observe(e),()=>{Du.delete(e),o.unobserve(e)}}const Mk={some:0,all:1};class kk extends ro{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:o,amount:r="some",once:s}=t,a={root:n?n.current:void 0,rootMargin:o,threshold:typeof r=="number"?r:Mk[r]},l=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:p}=this.node.getProps(),h=u?d:p;h&&h(c)};return Nk(this.node.current,a,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Dk(t,n))&&this.startObserver()}unmount(){}}function Dk({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Bk={inView:{Feature:kk},tap:{Feature:Ak},focus:{Feature:wk},hover:{Feature:Sk}},Fk={layout:{ProjectionNode:I0,MeasureLayout:Yb}},Fu={current:null},A0={current:!1};function jk(){if(A0.current=!0,!!Pc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Fu.current=e.matches;e.addListener(t),t()}else Fu.current=!1}const Vk=[...eb,Rt,oo],Lk=e=>Vk.find(Qg(e)),_k=new WeakMap;function $k(e,t,n){for(const o in t){const r=t[o],s=n[o];if(At(r))e.addValue(o,r),process.env.NODE_ENV==="development"&&Ys(r.version==="12.4.3",`Attempting to mix Motion versions ${r.version} with 12.4.3 may not work as expected.`);else if(At(s))e.addValue(o,fi(r,{owner:e}));else if(s!==r)if(e.hasValue(o)){const a=e.getValue(o);a.liveStyle===!0?a.jump(r):a.hasAnimated||a.set(r)}else{const a=e.getStaticValue(o);e.addValue(o,fi(a!==void 0?a:r,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const R0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Wk{scrapeMotionValuesFromProps(t,n,o){return{}}constructor({parent:t,props:n,presenceContext:o,reducedMotionConfig:r,blockInitialAnimation:s,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=mu,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const g=Nn.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,Qe.render(this.render,!1,!0))};const{latestValues:c,renderState:u,onUpdate:d}=a;this.onUpdate=d,this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=o,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=l,this.blockInitialAnimation=!!s,this.isControllingVariants=Ks(n),this.isVariantNode=Zm(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:p,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const g in h){const m=h[g];c[g]!==void 0&&At(m)&&m.set(c[g],!1)}}mount(t){this.current=t,_k.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,o)=>this.bindToMotionValue(o,n)),A0.current||jk(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Fu.current,process.env.NODE_ENV!=="production"&&Ys(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),to(this.notifyUpdate),to(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const o=yo.has(t);o&&this.onBindTransform&&this.onBindTransform();const r=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&Qe.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{r(),s(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in sr){const n=sr[t];if(!n)continue;const{isEnabled:o,Feature:r}=n;if(!this.features[t]&&r&&o(this.props)&&(this.features[t]=new r(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):mt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let o=0;o<R0.length;o++){const r=R0[o];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const s="on"+r,a=t[s];a&&(this.propEventSubscriptions[r]=this.on(r,a))}this.prevMotionValues=$k(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const o=this.values.get(t);n!==o&&(o&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let o=this.values.get(t);return o===void 0&&n!==void 0&&(o=fi(n===null?void 0:n,{owner:this}),this.addValue(t,o)),o}readValue(t,n){var o;let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(o=this.getBaseTargetFromProps(this.props,t))!==null&&o!==void 0?o:this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(qg(r)||Vg(r))?r=parseFloat(r):!Lk(r)&&oo.test(n)&&(r=Hg(t,n)),this.setBaseTarget(t,At(r)?r.get():r)),At(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:o}=this.props;let r;if(typeof o=="string"||typeof o=="object"){const a=Hc(this.props,o,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(r=a[t])}if(o&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!At(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new ou),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class O0 extends Wk{constructor(){super(...arguments),this.KeyframeResolver=nb}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:o}){delete n[t],delete o[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;At(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Gk(e){return window.getComputedStyle(e)}class zk extends O0{constructor(){super(...arguments),this.type="html",this.renderInstance=ug}readValueFromInstance(t,n){if(yo.has(n)){const o=pu(n);return o&&o.default||0}else{const o=Gk(t),r=(jc(n)?o.getPropertyValue(n):o[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Hb(t,n)}build(t,n,o){_c(t,n,o.transformTemplate)}scrapeMotionValuesFromProps(t,n,o){return Uc(t,n,o)}}class Hk extends O0{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=mt,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&cg(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(yo.has(n)){const o=pu(n);return o&&o.default||0}return n=dg.has(n)?n:Bc(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,o){return fg(t,n,o)}onBindTransform(){this.current&&!this.renderState.dimensions&&Qe.postRender(this.updateDimensions)}build(t,n,o){Gc(t,n,this.isSVGTag,o.transformTemplate)}renderInstance(t,n,o,r){pg(t,n,o,r)}mount(t){this.isSVGTag=zc(t.tagName),super.mount(t)}}const Xk=(e,t)=>Wc(e)?new Hk(t):new zk(t,{allowProjection:e!==M.Fragment}),Uk=vP({...mM,...Bk,...Ik,...Fk},Xk),Vn=BO(Uk),ju=({styles:e,label:t,hasFooter:n=!1,showCheckBox:o=!1,options:r,defaultValue:s=!0,isMulti:a=!1,handleSelectClick:l,handleCheckboxChange:c})=>{var T,I;const u=ut(),[d,p]=M.useState(!1),[h,g]=M.useState(s?(T=r==null?void 0:r[0])==null?void 0:T.label:"Select option"),[m,f]=M.useState(r||[]);((I=m==null?void 0:m.filter(y=>!(y!=null&&y.isMandatory)))==null?void 0:I.length)>7,M.useRef(null),M.useRef(null),M.useCallback(y=>{let w=[...m];w=w==null?void 0:w.map(A=>(A==null?void 0:A.key)===y?{...A,hidden:!A.hidden}:A),f(w),p(!0)},[m]),M.useCallback(()=>{},[m]);const b=()=>{},v=()=>{},S=M.useRef(null);return M.useEffect(()=>{const y=w=>{S.current&&!S.current.contains(w.target)&&p(!1)};return document.addEventListener("mousedown",y),()=>{document.removeEventListener("mousedown",y)}},[]),x.jsx(Te,{ref:S,sx:{position:"relative",flexShrink:0},children:x.jsx(Te,{position:"absolute",top:0,zIndex:10,children:x.jsxs(Vn.div,{style:{position:"relative",maxHeight:"3rem",border:`0.1rem solid ${u.palette.primary.notifyBorderColor}`,borderRadius:"0.7rem",color:u.palette.primary.notifyTextColor,backgroundColor:u.palette.primary.notifyBackground,overflow:"hidden",width:"max-content"},animate:{maxHeight:d?"15rem":"3rem"},transition:{duration:.2,ease:"easeInOut"},children:[x.jsxs(Te,{sx:{padding:"0.65rem",display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",gap:"0.5rem"},onClick:()=>p(!d),children:[x.jsx(Te,{component:"img",className:"select-icon",src:e==null?void 0:e.icon,sx:{cursor:"pointer"}}),x.jsx(Ut,{sx:{color:u.palette.primary.notifyTextColor,flex:1,fontSize:"1.1rem"},children:t||h}),x.jsx(Te,{component:"img",className:"child",src:d?kt.ArrowSelectDown:kt.ArrowSelectUp,sx:{cursor:"pointer"}})]}),d&&x.jsx("hr",{style:{width:"100%",height:"0.1rem",backgroundColor:u.palette.primary.notifyBorderColor,border:"none",margin:"0rem"}}),x.jsx(Vn.ul,{style:{listStyle:"none",padding:"0rem 1rem 0.8rem 1rem",margin:0,opacity:d?1:0,visibility:d?"visible":"hidden",maxHeight:"10rem",overflowY:"auto",scrollbarWidth:"thin",scrollbarColor:`${u.palette.primary.notifyIconColor} transparent`},initial:{opacity:0},animate:{opacity:d?1:0},transition:{duration:.3,ease:"easeInOut"},children:r==null?void 0:r.map((y,w)=>x.jsxs("li",{style:{padding:o?"0.4rem 0":"0.2rem 0.4rem",cursor:"pointer",display:"flex",alignItems:"center",color:u.palette.primary.notifyTextColor,backgroundColor:u.palette.primary.notifyBackground},onClick:()=>{g(y==null?void 0:y.label),!a&&p(!1),!o&&l(y)},children:[o&&x.jsx(tc,{size:"medium",sx:{color:u.palette.primary.notifyIconColor,"&.Mui-checked":{color:u.palette.brandColor.orange},p:"0.2rem 0.5rem"},checked:!(y!=null&&y.isHidden),onChange:A=>c(y,A.target.checked)}),x.jsx(Ut,{sx:{fontSize:"1.1rem"},children:y==null?void 0:y.label})]},w))}),n&&d&&x.jsxs(Vn.div,{style:{display:"flex",flexDirection:"row",padding:"0.5rem 1rem",justifyContent:"space-between",borderTop:`0.1rem solid ${u.palette.primary.notifyBorderColor}`,position:"sticky",bottom:0,opacity:d?1:0,visibility:d?"visible":"hidden"},initial:{opacity:0},animate:{opacity:d?1:0},transition:{duration:.3,ease:"easeInOut"},children:[x.jsx(Vn.button,{onClick:b,style:{textTransform:"none",padding:"0.4rem",background:"transparent",color:u.palette.primary.notifyTextColor,fontSize:"1.1rem",border:"none",cursor:"pointer"},children:"Apply"}),x.jsx(Vn.button,{onClick:v,style:{textTransform:"none",padding:"0.4rem",background:"transparent",color:u.palette.primary.notifyTextColor,fontSize:"1.1rem",border:"none",cursor:"pointer"},children:"Cancel"})]})]})})})},P0=({pagination:e})=>{const{selectedPage:t,rowPerPage:n,totalRecords:o,onPageChange:r,onPageSizeChange:s}=e,a=ut();return x.jsxs(Te,{sx:{display:"flex",p:"1rem 2rem"},children:[x.jsxs(Te,{sx:{zIndex:10,display:"flex",flexDirection:"row",gap:"0.5rem",width:"100%"},children:[x.jsx(Te,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:x.jsx(Ut,{sx:{fontSize:"1.1rem",color:a.palette.primary.notifyTextColor},children:`Showing ${(t-1)*n+1} to ${t*n} of ${o} rows`})}),x.jsx(Te,{sx:{display:"flex",flexDirection:"row",gap:"0.5rem",justifyContent:"space-between"},children:x.jsx(Te,{sx:{display:"flex",flexDirection:"row",width:"5.2rem"},children:x.jsx(ju,{options:IO,handleSelectClick:s})})}),x.jsx(Te,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:x.jsx(Ut,{sx:{fontSize:"1.1rem",color:a.palette.primary.notifyTextColor},children:"records per page"})})]}),x.jsx(hc,{count:Math.ceil(o/n),page:t,onChange:(l,c)=>{r(c)},shape:"rounded",sx:{width:"100%","& .MuiPagination-ul":{width:"100%",display:"flex",justifyContent:"flex-end","& li:first-of-type":{border:`0.1rem solid ${a.palette.primary.notifyBorderColor}`,color:a.palette.primary.notifyActiveText,marginRight:"1.5rem",borderRadius:"1rem",width:"3rem",height:"3rem",justifyContent:"center",alignItems:"center",display:"flex"},"& li:last-child":{border:`0.1rem solid ${a.palette.primary.notifyBorderColor}`,color:a.palette.primary.notifyActiveText,marginLeft:"1.5rem",borderRadius:"1rem",width:"3rem",height:"3rem",justifyContent:"center",alignItems:"center",display:"flex"}},"& .MuiPaginationItem-root":{color:"#595959",fontSize:"1.1rem",borderRadius:"1rem",width:"3rem",height:"3rem",justifyContent:"center",alignItems:"center",display:"flex","& .MuiSvgIcon-root":{fontSize:"2.2rem"}},"& .Mui-selected":{color:a.palette.primary.notifyActiveText,backgroundColor:a.palette.primary.notifyButtonBackground}}})]})};P0.propTypes={pagination:i.object.isRequired};const N0=({menuOpen:e,handleClose:t,onHideClick:n})=>{const o=ut();return x.jsx(pc,{open:!!e,anchorEl:e,onClose:t,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:x.jsx(Te,{sx:{p:"0.4rem 1rem",backgroundColor:o.palette.primary.notifyBackground,border:`0.1rem solid ${o.palette.primary.notifyBorderColor}`,minHeight:"2.3rem",display:"flex",justifyContent:"center",alignItems:"center"},children:x.jsx(Kl,{onClick:n,sx:{textTransform:"none",fontSize:"1.1rem",p:0,minHeight:"unset",fontWeight:"500",color:o.palette.primary.notifyTextColor},children:"Hide Column"})})})};N0.propTypes={menuOpen:i.object,handleClose:i.func,onHideClick:i.func};const Zk=(e,t)=>{const[n,o]=M.useState({isOpen:!1,column:null}),r=(l,c)=>{o({isOpen:l.currentTarget,column:c})},s=()=>{o({isOpen:!1,column:null})};return{selectedColumn:n,handleMenuClick:r,handleClose:s,handleHideClick:()=>{t({type:Ke.SET_GRID_DATA,payload:{visibleGridColumns:e.map(l=>{var c;return l.key===((c=n==null?void 0:n.column)==null?void 0:c.key)?{...l,isHidden:!0}:l})}}),s()}}},Yk=Y(ii)(()=>({"&:last-child td":{borderBottom:0}}));function Vu({children:e,...t}){return x.jsx(Yk,{...t,children:e})}Vu.propTypes={children:i.node};const Jk=Y(e=>x.jsx(Cc,{...e}))(({theme:e})=>({[`&.${xc.head}`]:{color:e.palette.primary.notifyTextColor,backgroundColor:e.palette.primary.notifyBackground,borderColor:e.palette.primary.notifyBorderColor,padding:"0.3rem 1rem",borderTopLeftRadius:"1.4rem",borderTopRightRadius:"1.4rem",textAlign:"center"},[`&.${xc.body}`]:{color:e.palette.primary.notifyTextColor,borderColor:e.palette.primary.notifyBorderColor,padding:"0.5rem 1rem",textAlign:"center"}}));function Lu({children:e,...t}){return x.jsx(Jk,{...t,children:e})}Lu.propTypes={children:i.node};const qk=Y(Vh)(({theme:e})=>({"& .MuiPaper-root":{borderRadius:8,border:`1px solid ${e.palette.primary.notifyBorderColor}`,boxShadow:e.shadows[4],padding:"1rem 1rem 0rem 1rem",backgroundColor:e.palette.primary.notifyBackground}})),Ln=Y(Ut)(({theme:e})=>({color:e.palette.primary.notifyTextColor})),Kk=Y(gm)(({theme:e})=>({width:28,height:16,padding:0,display:"flex","&:active":{"& .MuiSwitch-thumb":{width:15},"& .MuiSwitch-switchBase.Mui-checked":{transform:"translateX(9px)"}},"& .MuiSwitch-switchBase":{padding:2,"&.Mui-checked":{transform:"translateX(12px)",color:"#fff","& + .MuiSwitch-track":{opacity:1,backgroundColor:"#1890ff",...e.applyStyles("dark",{backgroundColor:"#177ddc"})}}},"& .MuiSwitch-thumb":{boxShadow:"0 2px 4px 0 rgb(0 35 11 / 20%)",width:12,height:12,borderRadius:6,transition:e.transitions.create(["width"],{duration:200})},"& .MuiSwitch-track":{borderRadius:16/2,opacity:1,backgroundColor:"rgba(0,0,0,.25)",boxSizing:"border-box",...e.applyStyles("dark",{backgroundColor:"rgba(255,255,255,.35)"})}})),Qk=e=>{const{children:t,value:n,index:o,...r}=e;return x.jsx("div",{role:"tabpanel",hidden:n!==o,...r,children:n===o&&x.jsx(Te,{sx:{pl:"0.5rem",pb:"0.5rem"},children:t})})},eD=Y(ac)(({theme:e})=>({color:e.palette.primary.notifyTextColor,padding:"0.6rem 0",fontSize:"0.9rem",fontWeight:500,"&::before, &::after":{borderColor:`${e.palette.primary.notifyBorderColor}!important`}})),tD=Y(ql)(({theme:e})=>({"& .MuiBadge-badge":{right:3.5,top:2.34,border:`0.1rem solid ${e.palette.primary.notifyBackground}`,padding:"0 1.3px",borderRadius:"50%",backgroundColor:"#D44E40",fontSize:"0.725rem",minWidth:"0.7rem",height:"0.7rem"}}));Y(Nm)(({theme:e})=>({"& .MuiInputBase-root":{height:"3.52rem"},"& .MuiFormLabel-root":{color:`${e.palette.primary.notifyBorderColor} !important`,fontSize:"1rem",marginTop:"0.4rem"},"& label.Mui-focused":{color:e.palette.primary.notifyTextColor},"& .MuiInput-underline:after":{borderBottomColor:e.palette.primary.notifyBorderColor,borderBottomWidth:"0.1rem"},"& .MuiOutlinedInput-root":{"& fieldset":{borderColor:e.palette.primary.notifyBorderColor,borderWidth:"0.1rem"},"&:hover fieldset":{borderColor:e.palette.primary.notifyBorderColor,borderWidth:"0.1rem"},"&.Mui-focused fieldset":{borderColor:e.palette.primary.notifyBorderColor,borderWidth:"0.1rem"}}}));const nD=Y(Pm)(({theme:e})=>({"& .MuiTabs-indicator":{height:"0.1rem",backgroundColor:e.palette.primary.notifyActiveBorderColor}})),oD=Y(bm)(({theme:e})=>({color:"gray","&.Mui-selected":{color:e.palette.primary.notifyActiveBorderColor,fontWeight:"bold"}}));function M0({sort:e,data:t,pagination:n,columns:o}){const r=ut(),{visibleGridColumns:s}=M.useContext(Mm),a=M.useContext(zs),{selectedColumn:l,handleMenuClick:c,handleClose:u,handleHideClick:d}=Zk(s,a),p=o==null?void 0:o.isManageable;return(t==null?void 0:t.length)>0?x.jsxs(x.Fragment,{children:[x.jsx(xm,{sx:{maxHeight:"100%"},children:x.jsxs(vc,{stickyHeader:!0,sx:{backgroundColor:r.palette.primary.notifyBackground,border:`0.1rem solid ${r.palette.primary.notifyBorderColor}`,borderRadius:"1.4rem","& .MuiTableHead-root":{backgroundColor:r.palette.primary.notifyBackground}},children:[x.jsx(Tc,{children:x.jsx(Vu,{children:s.map((g,m)=>{const f=g==null?void 0:g.isHidden,b=g==null?void 0:g.style;return f?null:x.jsx(Lu,{style:b,children:x.jsx(Bm,{column:g,sort:e,handleMenuClick:c,isManageable:p})},m)})})}),x.jsx(yc,{children:t.map((g,m)=>x.jsx(Vu,{children:s.map((f,b)=>{const v=!!(f!=null&&f.cellRenderer);return(f==null?void 0:f.isHidden)?null:x.jsx(Lu,{children:x.jsx(Fm,{isRenderCellContent:v,column:f,row:g},b)},b)})},m))})]})}),x.jsx(P0,{pagination:n}),x.jsx(N0,{menuOpen:l==null?void 0:l.isOpen,handleClose:u,onHideClick:d})]}):x.jsx(Ln,{sx:{textAlign:"center"},children:pn.NRF})}M0.propTypes={sort:i.object,data:i.array,pagination:i.object,columns:i.object};function k0({tableProps:e,mergedColumns:t}){const n=M.useContext(zs);return M.useEffect(()=>{n({type:Ke.SET_GRID_DATA,payload:{visibleGridColumns:t}})},[t,n]),x.jsx(x.Fragment,{children:x.jsx(M0,{...e})})}k0.propTypes={tableProps:i.object.isRequired,mergedColumns:i.array.isRequired};const mr=({styles:e,label:t,...n})=>{const o=ut(),r=(t==null?void 0:t.length)*((t==null?void 0:t.length)>=10?6.5:7.5)+38||0,[s,a]=M.useState(!1);return x.jsxs(Vn.button,{onMouseEnter:()=>(e==null?void 0:e.isAnimate)&&a(!0),onMouseLeave:()=>(e==null?void 0:e.isAnimate)&&a(!1),initial:{width:e!=null&&e.isAnimate||!t?"3rem":`${r/10}rem`,borderRadius:"0.7rem"},animate:{width:e!=null&&e.isAnimate?`${s?r/10:3}rem`:`${t?r/10:3}rem`},transition:{duration:.2,ease:"easeInOut"},style:{height:"3rem",outline:"none",overflow:"hidden",backgroundColor:(e==null?void 0:e.variant)!=="outlined"?(e==null?void 0:e.color)==="secondary"?o.palette.brandColor.blue:o.palette.brandColor.orange:o.palette.primary.notifyBackground,border:(e==null?void 0:e.variant)==="outlined"?`0.1rem solid ${o.palette.primary.notifyBorderColor}`:"none",display:"flex",cursor:"pointer",alignItems:"center",gap:s||!(e!=null&&e.isAnimate)?"0.5rem":0,color:(e==null?void 0:e.variant)==="outlined"?o.palette.primary.notifyActiveText:"white",justifyContent:s?"flex-start":"center",padding:s||!(e!=null&&e.isAnimate)?"1.2rem":"0.8rem",whiteSpace:"nowrap"},layout:!0,...n,children:[(!(e!=null&&e.iconPosition)||(e==null?void 0:e.iconPosition)==="start")&&x.jsx(Te,{component:"img",src:e==null?void 0:e.icon}),t&&x.jsx(Vn.div,{layout:!0,initial:{opacity:0,width:0},animate:{opacity:s||!(e!=null&&e.isAnimate)?1:0,width:s||!(e!=null&&e.isAnimate)?"auto":0},transition:{duration:.2,ease:"easeInOut",delay:s?.1:0},style:{overflow:"hidden",whiteSpace:"nowrap"},children:x.jsx(Ut,{sx:{fontSize:"1.1rem"},children:t})}),(e==null?void 0:e.iconPosition)==="end"&&x.jsx(Te,{component:"img",src:e==null?void 0:e.icon})]})};mr.propTypes={styles:i.object.isRequired,label:i.string};const rD=({...e})=>{const[t,n]=M.useState(!1),o=ut();return x.jsx(Vn.input,{type:"text",onFocus:()=>n(!0),onBlur:()=>n(!1),initial:{width:"10rem",borderRadius:"0.7rem"},animate:{width:t?"13rem":"10rem"},transition:{duration:.3,ease:"easeInOut"},style:{height:"3rem",outline:"none",boxShadow:"none",fontSize:"1.1rem",border:`0.1rem solid ${o.palette.primary.notifyBorderColor}`,backgroundColor:o.palette.primary.notifyBackground,padding:"0rem 1rem",color:o.palette.primary.notifyTextColor,transition:"height 0.1s ease"},...e})},iD=({customTools:e})=>({sortedTools:e==null?void 0:e.sort((n,o)=>n.sequenceId-o.sequenceId)}),sD=e=>{if(!e)return null;const{subAction:t,...n}=e,o=t?"select":"button",r={button:s=>x.jsx(mr,{...s}),select:s=>x.jsx(ju,{...s})};return r[o]?r[o](n):null},D0=({customTools:e})=>{const{sortedTools:t}=iD({customTools:e}),[n,o]=M.useState(!1),r=(t==null?void 0:t.length)>3,l=r?Math.min(t.length,3.45)*45+20:"auto";return x.jsxs(x.Fragment,{children:[n&&x.jsx("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:998}}),x.jsx(Vn.div,{className:"custom-tools-container",initial:{width:l!=="auto"?`${l/10}rem`:l},animate:r&&{width:n?"100%":`${l/10}rem`},transition:{duration:.4,ease:"easeInOut"},style:{height:"3rem",outline:"none",overflow:"hidden",display:"flex",alignItems:"center",gap:"0.5rem",whiteSpace:"nowrap",borderTopRightRadius:"0.8rem",borderBottomRightRadius:"0.8rem",zIndex:999,pointerEvents:n?"auto":"none"},layout:!0,children:t==null?void 0:t.map(c=>x.jsx(Te,{sx:{flexShrink:0,minWidth:"fit-content"},children:sD(c)},c.id))}),r&&x.jsx(Te,{sx:{zIndex:1e3,pointerEvents:"auto"},children:x.jsx(mr,{label:n?"":"More Actions",styles:{icon:n?kt.Cross:kt.More},onClick:()=>o(c=>!c)})})]})};D0.propTypes={customTools:i.array.isRequired};const B0=({defaultTools:e,isManageable:t,customTools:n,mergedColumns:o})=>{var l,c,u,d,p,h,g;const r=o==null?void 0:o.filter(m=>!(m!=null&&m.isMandatory)),s=M.useContext(zs),a=(m,f)=>{const b=[...o].map(v=>v.id===(m==null?void 0:m.id)?{...v,isHidden:!f}:v);s({type:Ke.SET_GRID_DATA,payload:{visibleGridColumns:b}})};return x.jsxs(Te,{sx:{margin:"1rem 0",position:"relative",zIndex:10,display:"flex",flexDirection:"row",gap:"0.5rem",width:"100%"},children:[x.jsxs(Te,{sx:{display:"flex",flexDirection:"row",gap:"0.5rem"},children:[((l=e==null?void 0:e.search)==null?void 0:l.isRequired)&&x.jsx(rD,{...e==null?void 0:e.search}),((c=e==null?void 0:e.refresh)==null?void 0:c.isRequired)&&x.jsx(mr,{...e==null?void 0:e.refresh,styles:{...(u=e==null?void 0:e.refresh)==null?void 0:u.styles,icon:kt.Refresh}})]}),x.jsx(Te,{sx:{display:"flex",flexDirection:"row",gap:"0.5rem",justifyContent:"space-between",flex:1,width:"27rem"},children:x.jsx(Te,{sx:{display:"flex",flexDirection:"row",gap:"0.5rem"},children:t&&x.jsx(ju,{label:"Manage Columns",options:r,isMulti:!0,showCheckBox:!0,handleCheckboxChange:(m,f)=>a(m,f)})})}),x.jsxs(Te,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-end",gap:"0.6rem"},children:[x.jsx(D0,{customTools:n}),((d=e==null?void 0:e.upload)==null?void 0:d.isRequired)&&x.jsx(mr,{...e==null?void 0:e.upload,styles:{...(p=e==null?void 0:e.upload)==null?void 0:p.styles,icon:kt.Upload,color:"secondary",isAnimate:!0}}),((h=e==null?void 0:e.download)==null?void 0:h.isRequired)&&x.jsx(mr,{...e==null?void 0:e.download,styles:{...(g=e==null?void 0:e.download)==null?void 0:g.styles,icon:kt.Download,isAnimate:!0}})]})]})};B0.propTypes={defaultTools:i.object.isRequired,customTools:i.array,isManageable:i.bool,mergedColumns:i.array.isRequired};const aD=({columns:e})=>{const{definitions:t,defaultUserSettings:n,labels:o}=e,r=n.reduce((c,u)=>(c[u.id]=u,c),{}),s=o.reduce((c,u)=>(c[u.id]=u,c),{}),a=[];for(const c of t){const{id:u}=c,d=r[u],p=s[u];let h={...c,...d,...p};a.push(h)}return a.sort((c,u)=>c.sequenceId-u.sequenceId)};function F0({tableProps:e,toolbarProps:t}){var s;const n=(s=e.columns)==null?void 0:s.isManageable,{columns:o}=e,r=aD({columns:o});return x.jsxs(km,{children:[x.jsx(B0,{...t,isManageable:n,mergedColumns:r}),x.jsx(k0,{tableProps:e,mergedColumns:r})]})}F0.propTypes={tableProps:i.object.isRequired,toolbarProps:i.object.isRequired};const j0=({list:e,handleLinkClick:t})=>{const n=ut(),o=({list:r})=>{var s;return(s=r==null?void 0:r.sort((a,l)=>a.order-l.order))==null?void 0:s.map((a,l)=>a!=null&&a.link?x.jsx(uc,{component:"h3",sx:{fontSize:"1rem",cursor:"pointer",color:l===(r==null?void 0:r.length)-1?n.palette.brandColor.orange:n.palette.primary.notifyTextColor},href:a==null?void 0:a.link,underline:"hover",onClick:()=>t(a),children:a==null?void 0:a.title},l):x.jsx(Ut,{component:"h3",sx:{fontSize:"1rem",color:l===(r==null?void 0:r.length)-1?n.palette.brandColor.orange:n.palette.primary.notifyTextColor},children:a==null?void 0:a.title},l))};return x.jsx(Ah,{separator:x.jsx(Te,{component:"img",src:kt.ArrowRight}),children:o({list:e})})};j0.propTypes={list:i.array.isRequired,handleLinkClick:i.func};const V0=({breadcrumbProps:e})=>{const t=ut();return x.jsx(qn,{sx:{background:t.palette.primary.notifyBackground,borderBottom:`0.1rem solid ${t.palette.primary.notifyBorderColor}`,height:"3rem",p:"0 1.4rem"},direction:"row",justifyContent:"space-between",alignItems:"center",children:x.jsx(j0,{...e})})};V0.propTypes={breadcrumbProps:i.object.isRequired};function L0({headerProps:e}){return x.jsx(Ic,{children:x.jsx(V0,{...e})})}L0.propTypes={headerProps:i.object.isRequired};const _u=M.createContext(null),_0=M.createContext(null);function lD({children:e}){const[t,n]=M.useReducer(cD,uD);return x.jsx(_u.Provider,{value:t,children:x.jsx(_0.Provider,{value:n,children:e})})}function cD(e,t){var n;switch(t.type){case Ke.LOADING:return{...e,loading:t.loading};case Ke.SUCCESS:return{...e,data:(n=t.data)==null?void 0:n.sort((o,r)=>new Date(r.createdAt)-new Date(o.createdAt))};case Ke.MARK_ALL_AS_READ:return{...e,isMarkAllAsRead:t.isMarkAllAsRead};case Ke.ERROR:return{...e,error:t.error};default:throw new Error(`${pn.UNHANDLED}: ${t}`)}}const uD={loading:!1,data:[],error:"",isMarkAllAsRead:{count:0,boo:!1}};function $0(e,t){return function(){return e.apply(t,arguments)}}const{toString:dD}=Object.prototype,{getPrototypeOf:$u}=Object,ca=(e=>t=>{const n=dD.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),gn=e=>(e=e.toLowerCase(),t=>ca(t)===e),ua=e=>t=>typeof t===e,{isArray:gr}=Array,Si=ua("undefined");function pD(e){return e!==null&&!Si(e)&&e.constructor!==null&&!Si(e.constructor)&&ln(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const W0=gn("ArrayBuffer");function fD(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&W0(e.buffer),t}const hD=ua("string"),ln=ua("function"),G0=ua("number"),da=e=>e!==null&&typeof e=="object",mD=e=>e===!0||e===!1,pa=e=>{if(ca(e)!=="object")return!1;const t=$u(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},gD=gn("Date"),bD=gn("File"),vD=gn("Blob"),yD=gn("FileList"),xD=e=>da(e)&&ln(e.pipe),CD=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ln(e.append)&&((t=ca(e))==="formdata"||t==="object"&&ln(e.toString)&&e.toString()==="[object FormData]"))},TD=gn("URLSearchParams"),[ED,ID,SD,wD]=["ReadableStream","Request","Response","Headers"].map(gn),AD=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function wi(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let o,r;if(typeof e!="object"&&(e=[e]),gr(e))for(o=0,r=e.length;o<r;o++)t.call(null,e[o],o,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),a=s.length;let l;for(o=0;o<a;o++)l=s[o],t.call(null,e[l],l,e)}}function z0(e,t){t=t.toLowerCase();const n=Object.keys(e);let o=n.length,r;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const H0=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,X0=e=>!Si(e)&&e!==H0;function Wu(){const{caseless:e}=X0(this)&&this||{},t={},n=(o,r)=>{const s=e&&z0(t,r)||r;pa(t[s])&&pa(o)?t[s]=Wu(t[s],o):pa(o)?t[s]=Wu({},o):gr(o)?t[s]=o.slice():t[s]=o};for(let o=0,r=arguments.length;o<r;o++)arguments[o]&&wi(arguments[o],n);return t}const RD=(e,t,n,{allOwnKeys:o}={})=>(wi(t,(r,s)=>{n&&ln(r)?e[s]=$0(r,n):e[s]=r},{allOwnKeys:o}),e),OD=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),PD=(e,t,n,o)=>{e.prototype=Object.create(t.prototype,o),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},ND=(e,t,n,o)=>{let r,s,a;const l={};if(t=t||{},e==null)return t;do{for(r=Object.getOwnPropertyNames(e),s=r.length;s-- >0;)a=r[s],(!o||o(a,e,t))&&!l[a]&&(t[a]=e[a],l[a]=!0);e=n!==!1&&$u(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},MD=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const o=e.indexOf(t,n);return o!==-1&&o===n},kD=e=>{if(!e)return null;if(gr(e))return e;let t=e.length;if(!G0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},DD=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&$u(Uint8Array)),BD=(e,t)=>{const o=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=o.next())&&!r.done;){const s=r.value;t.call(e,s[0],s[1])}},FD=(e,t)=>{let n;const o=[];for(;(n=e.exec(t))!==null;)o.push(n);return o},jD=gn("HTMLFormElement"),VD=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,o,r){return o.toUpperCase()+r}),U0=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),LD=gn("RegExp"),Z0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),o={};wi(n,(r,s)=>{let a;(a=t(r,s,e))!==!1&&(o[s]=a||r)}),Object.defineProperties(e,o)},_D=e=>{Z0(e,(t,n)=>{if(ln(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const o=e[n];if(ln(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},$D=(e,t)=>{const n={},o=r=>{r.forEach(s=>{n[s]=!0})};return gr(e)?o(e):o(String(e).split(t)),n},WD=()=>{},GD=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Gu="abcdefghijklmnopqrstuvwxyz",Y0="0123456789",J0={DIGIT:Y0,ALPHA:Gu,ALPHA_DIGIT:Gu+Gu.toUpperCase()+Y0},zD=(e=16,t=J0.ALPHA_DIGIT)=>{let n="";const{length:o}=t;for(;e--;)n+=t[Math.random()*o|0];return n};function HD(e){return!!(e&&ln(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const XD=e=>{const t=new Array(10),n=(o,r)=>{if(da(o)){if(t.indexOf(o)>=0)return;if(!("toJSON"in o)){t[r]=o;const s=gr(o)?[]:{};return wi(o,(a,l)=>{const c=n(a,r+1);!Si(c)&&(s[l]=c)}),t[r]=void 0,s}}return o};return n(e,0)},UD=gn("AsyncFunction"),W={isArray:gr,isArrayBuffer:W0,isBuffer:pD,isFormData:CD,isArrayBufferView:fD,isString:hD,isNumber:G0,isBoolean:mD,isObject:da,isPlainObject:pa,isReadableStream:ED,isRequest:ID,isResponse:SD,isHeaders:wD,isUndefined:Si,isDate:gD,isFile:bD,isBlob:vD,isRegExp:LD,isFunction:ln,isStream:xD,isURLSearchParams:TD,isTypedArray:DD,isFileList:yD,forEach:wi,merge:Wu,extend:RD,trim:AD,stripBOM:OD,inherits:PD,toFlatObject:ND,kindOf:ca,kindOfTest:gn,endsWith:MD,toArray:kD,forEachEntry:BD,matchAll:FD,isHTMLForm:jD,hasOwnProperty:U0,hasOwnProp:U0,reduceDescriptors:Z0,freezeMethods:_D,toObjectSet:$D,toCamelCase:VD,noop:WD,toFiniteNumber:GD,findKey:z0,global:H0,isContextDefined:X0,ALPHABET:J0,generateString:zD,isSpecCompliantForm:HD,toJSONObject:XD,isAsyncFn:UD,isThenable:e=>e&&(da(e)||ln(e))&&ln(e.then)&&ln(e.catch)};function we(e,t,n,o,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),o&&(this.request=o),r&&(this.response=r)}W.inherits(we,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:W.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const q0=we.prototype,K0={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{K0[e]={value:e}}),Object.defineProperties(we,K0),Object.defineProperty(q0,"isAxiosError",{value:!0}),we.from=(e,t,n,o,r,s)=>{const a=Object.create(q0);return W.toFlatObject(e,a,function(c){return c!==Error.prototype},l=>l!=="isAxiosError"),we.call(a,e.message,t,n,o,r),a.cause=e,a.name=e.name,s&&Object.assign(a,s),a};const ZD=null;function zu(e){return W.isPlainObject(e)||W.isArray(e)}function Q0(e){return W.endsWith(e,"[]")?e.slice(0,-2):e}function ev(e,t,n){return e?e.concat(t).map(function(r,s){return r=Q0(r),!n&&s?"["+r+"]":r}).join(n?".":""):t}function YD(e){return W.isArray(e)&&!e.some(zu)}const JD=W.toFlatObject(W,{},null,function(t){return/^is[A-Z]/.test(t)});function fa(e,t,n){if(!W.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=W.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,b){return!W.isUndefined(b[f])});const o=n.metaTokens,r=n.visitor||d,s=n.dots,a=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&W.isSpecCompliantForm(t);if(!W.isFunction(r))throw new TypeError("visitor must be a function");function u(m){if(m===null)return"";if(W.isDate(m))return m.toISOString();if(!c&&W.isBlob(m))throw new we("Blob is not supported. Use a Buffer instead.");return W.isArrayBuffer(m)||W.isTypedArray(m)?c&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function d(m,f,b){let v=m;if(m&&!b&&typeof m=="object"){if(W.endsWith(f,"{}"))f=o?f:f.slice(0,-2),m=JSON.stringify(m);else if(W.isArray(m)&&YD(m)||(W.isFileList(m)||W.endsWith(f,"[]"))&&(v=W.toArray(m)))return f=Q0(f),v.forEach(function(T,I){!(W.isUndefined(T)||T===null)&&t.append(a===!0?ev([f],I,s):a===null?f:f+"[]",u(T))}),!1}return zu(m)?!0:(t.append(ev(b,f,s),u(m)),!1)}const p=[],h=Object.assign(JD,{defaultVisitor:d,convertValue:u,isVisitable:zu});function g(m,f){if(!W.isUndefined(m)){if(p.indexOf(m)!==-1)throw Error("Circular reference detected in "+f.join("."));p.push(m),W.forEach(m,function(v,S){(!(W.isUndefined(v)||v===null)&&r.call(t,v,W.isString(S)?S.trim():S,f,h))===!0&&g(v,f?f.concat(S):[S])}),p.pop()}}if(!W.isObject(e))throw new TypeError("data must be an object");return g(e),t}function tv(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(o){return t[o]})}function Hu(e,t){this._pairs=[],e&&fa(e,this,t)}const nv=Hu.prototype;nv.append=function(t,n){this._pairs.push([t,n])},nv.toString=function(t){const n=t?function(o){return t.call(this,o,tv)}:tv;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function qD(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ov(e,t,n){if(!t)return e;const o=n&&n.encode||qD,r=n&&n.serialize;let s;if(r?s=r(t,n):s=W.isURLSearchParams(t)?t.toString():new Hu(t,n).toString(o),s){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class rv{constructor(){this.handlers=[]}use(t,n,o){return this.handlers.push({fulfilled:t,rejected:n,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){W.forEach(this.handlers,function(o){o!==null&&t(o)})}}const iv={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},KD={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Hu,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Xu=typeof window<"u"&&typeof document<"u",QD=(e=>Xu&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),eB=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",tB=Xu&&window.location.href||"http://localhost",bn={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Xu,hasStandardBrowserEnv:QD,hasStandardBrowserWebWorkerEnv:eB,origin:tB},Symbol.toStringTag,{value:"Module"})),...KD};function nB(e,t){return fa(e,new bn.classes.URLSearchParams,Object.assign({visitor:function(n,o,r,s){return bn.isNode&&W.isBuffer(n)?(this.append(o,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function oB(e){return W.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function rB(e){const t={},n=Object.keys(e);let o;const r=n.length;let s;for(o=0;o<r;o++)s=n[o],t[s]=e[s];return t}function sv(e){function t(n,o,r,s){let a=n[s++];if(a==="__proto__")return!0;const l=Number.isFinite(+a),c=s>=n.length;return a=!a&&W.isArray(r)?r.length:a,c?(W.hasOwnProp(r,a)?r[a]=[r[a],o]:r[a]=o,!l):((!r[a]||!W.isObject(r[a]))&&(r[a]=[]),t(n,o,r[a],s)&&W.isArray(r[a])&&(r[a]=rB(r[a])),!l)}if(W.isFormData(e)&&W.isFunction(e.entries)){const n={};return W.forEachEntry(e,(o,r)=>{t(oB(o),r,n,0)}),n}return null}function iB(e,t,n){if(W.isString(e))try{return(t||JSON.parse)(e),W.trim(e)}catch(o){if(o.name!=="SyntaxError")throw o}return(n||JSON.stringify)(e)}const Ai={transitional:iv,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const o=n.getContentType()||"",r=o.indexOf("application/json")>-1,s=W.isObject(t);if(s&&W.isHTMLForm(t)&&(t=new FormData(t)),W.isFormData(t))return r?JSON.stringify(sv(t)):t;if(W.isArrayBuffer(t)||W.isBuffer(t)||W.isStream(t)||W.isFile(t)||W.isBlob(t)||W.isReadableStream(t))return t;if(W.isArrayBufferView(t))return t.buffer;if(W.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(s){if(o.indexOf("application/x-www-form-urlencoded")>-1)return nB(t,this.formSerializer).toString();if((l=W.isFileList(t))||o.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return fa(l?{"files[]":t}:t,c&&new c,this.formSerializer)}}return s||r?(n.setContentType("application/json",!1),iB(t)):t}],transformResponse:[function(t){const n=this.transitional||Ai.transitional,o=n&&n.forcedJSONParsing,r=this.responseType==="json";if(W.isResponse(t)||W.isReadableStream(t))return t;if(t&&W.isString(t)&&(o&&!this.responseType||r)){const a=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(l){if(a)throw l.name==="SyntaxError"?we.from(l,we.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:bn.classes.FormData,Blob:bn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};W.forEach(["delete","get","head","post","put","patch"],e=>{Ai.headers[e]={}});const sB=W.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),aB=e=>{const t={};let n,o,r;return e&&e.split(`
240
+ `));const se=q.props.value===void 0?Tt:q.props.value;He.set(se,Tt);const Se=se===N;return Tt+=1,E.cloneElement(q,C({fullWidth:P==="fullWidth",indicator:Se&&!U&&tt,selected:Se,selectionFollowsFocus:T,onChange:f,textColor:R,value:se},Tt===1&&N===!1&&!q.props.tabIndex?{tabIndex:0}:{}))}),cn=q=>{const se=Oe.current,Se=wt(se).activeElement;if(Se.getAttribute("role")!=="tab")return;let qe=b==="horizontal"?"ArrowLeft":"ArrowUp",vt=b==="horizontal"?"ArrowRight":"ArrowDown";switch(b==="horizontal"&&s&&(qe="ArrowRight",vt="ArrowLeft"),q.key){case qe:q.preventDefault(),Gs(se,Se,Am);break;case vt:q.preventDefault(),Gs(se,Se,wm);break;case"Home":q.preventDefault(),Gs(se,null,wm);break;case"End":q.preventDefault(),Gs(se,null,Am);break}},de=pt();return x.jsxs(oO,C({className:re(z.root,p),ownerState:k,ref:n,as:h},G,{children:[de.scrollButtonStart,de.scrollbarSizeListener,x.jsxs(rO,{className:z.scroller,ownerState:k,style:{overflow:fe.overflow,[L?`margin${s?"Left":"Right"}`:"marginBottom"]:F?void 0:-fe.scrollbarWidth},ref:Xe,children:[x.jsx(iO,{"aria-label":a,"aria-labelledby":l,"aria-orientation":b==="vertical"?"vertical":null,className:z.flexContainer,ownerState:k,onKeyDown:cn,ref:Oe,role:"tablist",children:Ot}),U&&tt]}),de.scrollButtonEnd]}))});process.env.NODE_ENV!=="production"&&(Pm.propTypes={action:Nt,allowScrollButtonsMobile:i.bool,"aria-label":i.string,"aria-labelledby":i.string,centered:i.bool,children:i.node,classes:i.object,className:i.string,component:i.elementType,indicatorColor:i.oneOfType([i.oneOf(["primary","secondary"]),i.string]),onChange:i.func,orientation:i.oneOf(["horizontal","vertical"]),ScrollButtonComponent:i.elementType,scrollButtons:i.oneOf(["auto",!1,!0]),selectionFollowsFocus:i.bool,slotProps:i.shape({endScrollButtonIcon:i.oneOfType([i.func,i.object]),startScrollButtonIcon:i.oneOfType([i.func,i.object])}),slots:i.shape({EndScrollButtonIcon:i.elementType,StartScrollButtonIcon:i.elementType}),sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object]),TabIndicatorProps:i.object,TabScrollButtonProps:i.object,textColor:i.oneOf(["inherit","primary","secondary"]),value:i.any,variant:i.oneOf(["fullWidth","scrollable","standard"]),visibleScrollbar:i.bool});function lO(e){return ye("MuiTextField",e)}xe("MuiTextField",["root"]);const cO=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],uO={standard:Vs,filled:js,outlined:_s},dO=e=>{const{classes:t}=e;return Ee({root:["root"]},lO,t)},pO=Y(Lh,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Nm=E.forwardRef(function(t,n){const o=Ie({props:t,name:"MuiTextField"}),{autoComplete:r,autoFocus:s=!1,children:a,className:l,color:c="primary",defaultValue:u,disabled:d=!1,error:p=!1,FormHelperTextProps:h,fullWidth:g=!1,helperText:m,id:f,InputLabelProps:b,inputProps:v,InputProps:S,inputRef:T,label:I,maxRows:y,minRows:w,multiline:A=!1,name:R,onBlur:N,onChange:P,onFocus:F,placeholder:G,required:j=!1,rows:L,select:_=!1,SelectProps:V,type:$,value:D,variant:X="outlined"}=o,k=ne(o,cO),z=C({},o,{autoFocus:s,color:c,disabled:d,error:p,fullWidth:g,multiline:A,required:j,select:_,variant:X}),Z=dO(z);process.env.NODE_ENV!=="production"&&_&&!a&&console.error("MUI: `children` must be passed when using the `TextField` component with `select`.");const Q={};X==="outlined"&&(b&&typeof b.shrink<"u"&&(Q.notched=b.shrink),Q.label=I),_&&((!V||!V.native)&&(Q.id=void 0),Q["aria-describedby"]=void 0);const U=os(f),ee=m&&U?`${U}-helper-text`:void 0,J=I&&U?`${U}-label`:void 0,oe=uO[X],te=x.jsx(oe,C({"aria-describedby":ee,autoComplete:r,autoFocus:s,defaultValue:u,fullWidth:g,multiline:A,name:R,rows:L,maxRows:y,minRows:w,type:$,value:D,id:U,inputRef:T,onBlur:N,onChange:P,onFocus:F,placeholder:G,inputProps:v},Q,S));return x.jsxs(pO,C({className:re(Z.root,l),disabled:d,error:p,fullWidth:g,ref:n,required:j,color:c,variant:X,ownerState:z},k,{children:[I!=null&&I!==""&&x.jsx(zh,C({htmlFor:U,id:J},b,{children:I})),_?x.jsx(gc,C({"aria-describedby":ee,id:U,labelId:J,value:D,input:te},V,{children:a})):te,m&&x.jsx(Wh,C({id:ee},h,{children:m}))]}))});process.env.NODE_ENV!=="production"&&(Nm.propTypes={autoComplete:i.string,autoFocus:i.bool,children:i.node,classes:i.object,className:i.string,color:i.oneOfType([i.oneOf(["primary","secondary","error","info","success","warning"]),i.string]),defaultValue:i.any,disabled:i.bool,error:i.bool,FormHelperTextProps:i.object,fullWidth:i.bool,helperText:i.node,id:i.string,InputLabelProps:i.object,inputProps:i.object,InputProps:i.object,inputRef:Nt,label:i.node,margin:i.oneOf(["dense","none","normal"]),maxRows:i.oneOfType([i.number,i.string]),minRows:i.oneOfType([i.number,i.string]),multiline:i.bool,name:i.string,onBlur:i.func,onChange:i.func,onFocus:i.func,placeholder:i.string,required:i.bool,rows:i.oneOfType([i.number,i.string]),select:i.bool,SelectProps:i.object,size:i.oneOfType([i.oneOf(["medium","small"]),i.string]),sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object]),type:i.string,value:i.any,variant:i.oneOf(["filled","outlined","standard"])});const fO={light:cs({palette:{primary:{appBackground:"#FFFFFF",main:"#f5f7fa",notifyBackground:"#F8FAFB",notifyTextColor:"#525252",notifyActiveText:"#282A2A",notifyBorderColor:"#D0D4DA",notifyTooltipBackground:"#07080B",notifyButtonBackground:"#E6EAEC",notifyActiveBorderColor:"#1D1D1D",notifyIconColor:"#666D80"},brandColor:{blue:"#0166FF",orange:"#E94F1C",grey1:"#595959",main:"#FF6D33",grey3:"#898A93"}},typography:{fontFamily:"Euclid Circular Regular, sans-serif",fontSize:12,fontWeightMedium:"bold",fontWeightRegular:"lighter"},components:{MuiDrawer:{defaultProps:{disableRipple:!0}}}}),dark:cs({palette:{primary:{appBackground:"#101010",main:"#f5f7fa",notifyBackground:"#1D1D1D",notifyTextColor:"#A8A8A8",notifyActiveText:"#FFFFFF",notifyBorderColor:"#313133",notifyTooltipBackground:"#07080B",notifyButtonBackground:"#2C2C2F",notifyActiveBorderColor:"#FFFFFF",notifyIconColor:"#909090"},brandColor:{blue:"#0166FF",orange:"#E94F1C",grey1:"#595959",main:"#FF6D33",grey3:"#898A93"}},typography:{fontFamily:"Euclid Circular Regular, sans-serif",fontSize:12,fontWeightMedium:"bold",fontWeightRegular:"lighter"},components:{MuiDrawer:{defaultProps:{disableRipple:!0}}}})};function Ic({children:e}){var n,o;const t=((o=(n=JSON.parse(localStorage.getItem("settings")))==null?void 0:n.platform)==null?void 0:o.theme)||"light";return x.jsx($f,{theme:fO[t],children:e})}const Mm=M.createContext(null),zs=M.createContext(null);function km({children:e}){const[t,n]=M.useReducer(hO,mO);return x.jsx(Mm.Provider,{value:t,children:x.jsx(zs.Provider,{value:n,children:x.jsx(Ic,{children:e})})})}function hO(e,t){switch(t.type){case Ke.SET_GRID_DATA:return{...e,...t.payload};default:throw new Error(`${pn.UNHANDLED}: ${t}`)}}const mO={visibleGridColumns:[]};km.propTypes={children:i.node.isRequired};const kt={Search:"data:image/svg+xml,%3csvg%20width='16'%20height='15'%20viewBox='0%200%2016%2015'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7.6503%2013.8006C11.3232%2013.8006%2014.3006%2010.8232%2014.3006%207.15029C14.3006%203.47744%2011.3232%200.5%207.6503%200.5C3.97744%200.5%201%203.47744%201%207.15029C1%2010.8232%203.97744%2013.8006%207.6503%2013.8006Z'%20stroke='%23898A93'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M14.9997%2014.5006L13.5996%2013.1006'%20stroke='%23898A93'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Refresh:"data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.0733%203.38664C6.6533%203.21331%207.2933%203.09998%207.99997%203.09998C11.1933%203.09998%2013.78%205.68664%2013.78%208.87998C13.78%2012.0733%2011.1933%2014.66%207.99997%2014.66C4.80664%2014.66%202.21997%2012.0733%202.21997%208.87998C2.21997%207.69331%202.57997%206.58664%203.1933%205.66664'%20stroke='%232176FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5.2467%203.54671L7.17337%201.33337'%20stroke='%232176FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5.2467%203.54663L7.49337%205.18663'%20stroke='%232176FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Close:"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='12'%20height='12'%20viewBox='0%200%2024%2024'%3e%3ccircle%20cx='12'%20cy='12'%20r='11'%20fill='none'%20stroke='%23E85353'%20stroke-width='2'/%3e%3cpath%20d='M8.5%208.5l7%207M15.5%208.5l-7%207'%20stroke='%23E85353'%20stroke-width='2'/%3e%3c/svg%3e",Unsort:"data:image/svg+xml,%3csvg%20width='10'%20height='10'%20viewBox='0%200%2010%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0.646447%203.24676C0.451184%203.44202%200.451184%203.7586%200.646447%203.95387C0.841709%204.14913%201.15829%204.14913%201.35355%203.95387L0.646447%203.24676ZM3.40012%201.2002H3.90012C3.90012%200.997964%203.7783%200.815646%203.59146%200.738256C3.40462%200.660865%203.18956%200.703643%203.04656%200.846642L3.40012%201.2002ZM2.90012%2010.8007C2.90012%2011.0768%203.12398%2011.3007%203.40012%2011.3007C3.67626%2011.3007%203.90012%2011.0768%203.90012%2010.8007H2.90012ZM9.35377%208.7541C9.54903%208.55884%209.54903%208.24226%209.35377%208.04699C9.15851%207.85173%208.84193%207.85173%208.64666%208.04699L9.35377%208.7541ZM6.6001%2010.8007H6.1001C6.1001%2011.0029%206.22192%2011.1852%206.40876%2011.2626C6.5956%2011.34%206.81065%2011.2972%206.95365%2011.1542L6.6001%2010.8007ZM7.1001%201.2002C7.1001%200.924053%206.87624%200.700195%206.6001%200.700195C6.32396%200.700195%206.1001%200.924053%206.1001%201.2002H7.1001ZM1.35355%203.95387L3.75367%201.55375L3.04656%200.846642L0.646447%203.24676L1.35355%203.95387ZM2.90012%201.2002V10.8007H3.90012V1.2002H2.90012ZM8.64666%208.04699L6.24655%2010.4471L6.95365%2011.1542L9.35377%208.7541L8.64666%208.04699ZM7.1001%2010.8007V1.2002H6.1001V10.8007H7.1001Z'%20fill='%23909090'/%3e%3c/svg%3e",AscSort:"data:image/svg+xml,%3csvg%20width='9'%20height='12'%20viewBox='0%200%209%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8%204.59888L4.5%201.09888L1%204.59888'%20stroke='%23909090'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M4.5%2010.9013V1.19702'%20stroke='%23909090'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",DescSort:"data:image/svg+xml,%3csvg%20width='9'%20height='12'%20viewBox='0%200%209%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1%207.40112L4.5%2010.9011L8%207.40112'%20stroke='%23909090'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M4.5%201.09869L4.5%2010.803'%20stroke='%23909090'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Menu:"data:image/svg+xml,%3csvg%20width='4'%20height='10'%20viewBox='0%200%204%2010'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2%207.5C1.45%207.5%201%207.95%201%208.5C1%209.05%201.45%209.5%202%209.5C2.55%209.5%203%209.05%203%208.5C3%207.95%202.55%207.5%202%207.5Z'%20stroke='%23909090'%20stroke-width='0.7'/%3e%3cpath%20d='M2%204C1.45%204%201%204.45%201%205C1%205.55%201.45%206%202%206C2.55%206%203%205.55%203%205C3%204.45%202.55%204%202%204Z'%20stroke='%23909090'%20stroke-width='0.7'/%3e%3cpath%20d='M2%200.5C1.45%200.5%201%200.95%201%201.5C1%202.05%201.45%202.5%202%202.5C2.55%202.5%203%202.05%203%201.5C3%200.95%202.55%200.5%202%200.5Z'%20stroke='%23909090'%20stroke-width='0.7'/%3e%3c/svg%3e",Manage:"data:image/svg+xml,%3csvg%20width='15'%20height='16'%20viewBox='0%200%2015%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.56152%2012.937V3.06201C6.56152%202.12451%206.16152%201.74951%205.16777%201.74951H2.64277C1.64902%201.74951%201.24902%202.12451%201.24902%203.06201V12.937C1.24902%2013.8745%201.64902%2014.2495%202.64277%2014.2495H5.16777C6.16152%2014.2495%206.56152%2013.8745%206.56152%2012.937Z'%20stroke='%23909090'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M13.75%2012.937V3.06201C13.75%202.12451%2013.35%201.74951%2012.3563%201.74951H9.83125C8.8375%201.74951%208.4375%202.12451%208.4375%203.06201V12.937C8.4375%2013.8745%208.8375%2014.2495%209.83125%2014.2495H12.3563C13.35%2014.2495%2013.75%2013.8745%2013.75%2012.937Z'%20stroke='%23909090'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",ArrowSelectUp:"data:image/svg+xml,%3csvg%20width='10'%20height='5'%20viewBox='0%200%2010%205'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9%200.595703L5.50126%204.09444C5.08807%204.50763%204.41193%204.50763%203.99874%204.09444L0.5%200.595703'%20stroke='%23909090'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",ArrowSelectDown:"data:image/svg+xml,%3csvg%20width='10'%20height='5'%20viewBox='0%200%2010%205'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9%204.4043L5.50126%200.90556C5.08807%200.492365%204.41193%200.492365%203.99874%200.90556L0.5%204.4043'%20stroke='%23909090'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Upload:"data:image/svg+xml,%3csvg%20width='15'%20height='15'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.25016%209.9165V6.4165L4.0835%207.58317'%20stroke='white'%20stroke-width='0.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5.25%206.4165L6.41667%207.58317'%20stroke='white'%20stroke-width='0.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.8332%205.83317V8.74984C12.8332%2011.6665%2011.6665%2012.8332%208.74984%2012.8332H5.24984C2.33317%2012.8332%201.1665%2011.6665%201.1665%208.74984V5.24984C1.1665%202.33317%202.33317%201.1665%205.24984%201.1665H8.1665'%20stroke='white'%20stroke-width='0.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.8332%205.83317H10.4998C8.74984%205.83317%208.1665%205.24984%208.1665%203.49984V1.1665L12.8332%205.83317Z'%20stroke='white'%20stroke-width='0.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Download:"data:image/svg+xml,%3csvg%20width='15'%20height='15'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.25%206.41699V9.91699L6.41667%208.75033'%20stroke='%23909090'%20stroke-width='0.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5.25114%209.91667L4.08447%208.75'%20stroke='%23909090'%20stroke-width='0.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.8322%205.83366V8.75033C12.8322%2011.667%2011.6655%2012.8337%208.74886%2012.8337H5.24886C2.33219%2012.8337%201.16553%2011.667%201.16553%208.75033V5.25033C1.16553%202.33366%202.33219%201.16699%205.24886%201.16699H8.16553'%20stroke='%23909090'%20stroke-width='0.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.8322%205.83366H10.4989C8.74886%205.83366%208.16553%205.25033%208.16553%203.50033V1.16699L12.8322%205.83366Z'%20stroke='%23909090'%20stroke-width='0.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",More:"data:image/svg+xml,%3csvg%20width='15'%20height='16'%20viewBox='0%200%2015%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.4531%202.16699H7.64478C8.07645%202.16699%208.43227%202.52283%208.43227%202.9545V3.81782C8.43227%204.13282%208.23395%204.52366%208.04145%204.722L6.3498%206.21533C6.11647%206.41366%205.95894%206.80449%205.95894%207.11949V8.81117C5.95894%209.0445%205.80145%209.3595%205.60312%209.482L5.05478%209.83782C4.54145%2010.1528%203.8356%209.79699%203.8356%209.16699V7.08449C3.8356%206.81032%203.67811%206.4545%203.52061%206.25616L2.02728%204.68116C1.82895%204.48282%201.67146%204.13282%201.67146%203.89365V2.98949C1.66562%202.52283%202.02144%202.16699%202.4531%202.16699Z'%20stroke='white'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M1.66211%207.99998V9.74998C1.66211%2012.6666%202.82878%2013.8333%205.74544%2013.8333H9.24544C12.1621%2013.8333%2013.3288%2012.6666%2013.3288%209.74998V6.24998C13.3288%204.42998%2012.8738%203.28664%2011.8179%202.69164C11.5204%202.52248%2010.9254%202.39414%2010.3829%202.30664'%20stroke='white'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M8.08789%208.5835H11.0046'%20stroke='white'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M6.91211%2010.9165H10.9954'%20stroke='white'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",ArrowRight:"data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4.45508%209.96028L7.71508%206.70028C8.10008%206.31528%208.10008%205.68528%207.71508%205.30028L4.45508%202.04028'%20stroke='%23A8A8A8'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Cross:"data:image/svg+xml,%3csvg%20width='15'%20height='16'%20viewBox='0%200%2015%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12.2302%203.25244L2.75%2012.7366'%20stroke='white'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.25%2012.75L2.75%203.25'%20stroke='white'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",PaginationLeft:"data:image/svg+xml,%3csvg%20width='7'%20height='11'%20viewBox='0%200%207%2011'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.5%209.96346L1.82547%206.28893C1.39151%205.85497%201.39151%205.14487%201.82547%204.71091L5.5%201.03638'%20stroke='%23909090'%20stroke-width='1.2'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",PaginationRight:"data:image/svg+xml,%3csvg%20width='7'%20height='11'%20viewBox='0%200%207%2011'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.5%209.96346L5.17453%206.28893C5.60849%205.85498%205.60849%205.14487%205.17453%204.71091L1.5%201.03638'%20stroke='%23909090'%20stroke-width='1.2'%20stroke-miterlimit='10'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e"},Dm=({sortKey:e,sortField:t,sortDir:n,handleSortClick:o})=>{const r=s=>x.jsx(ys,{onClick:o,sx:{padding:"0.5rem"},children:x.jsx(Te,{component:"img",src:s})});return x.jsx(x.Fragment,{children:r(t===e?n==="asc"?kt.AscSort:kt.DescSort:kt.Unsort)})};Dm.propTypes={sortKey:i.string.isRequired,sortField:i.string,sortDir:i.string,handleSortClick:i.func};function Bm({column:e,sort:t,handleMenuClick:n,isManageable:o}){const r=e==null?void 0:e.isMandatory,s=e==null?void 0:e.label,a=e==null?void 0:e.isSortable,l=t==null?void 0:t.sortField,c=t==null?void 0:t.sortDir,u=t==null?void 0:t.onSort;return x.jsxs(Te,{sx:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:"1.1rem"},children:[s,a&&x.jsx(Dm,{sortKey:e==null?void 0:e.key,sortField:l,sortDir:c,handleSortClick:()=>u({column:e,sortDir:c,sortField:l})}),o&&!r&&x.jsx(ys,{onClick:d=>n(d,e),sx:{padding:"0.5rem"},children:x.jsx(Te,{component:"img",src:kt.Menu})})]})}Bm.propTypes={column:i.object.isRequired,sort:i.object.isRequired,handleMenuClick:i.func,isManageable:i.bool};const Sc=e=>{const t=localStorage.getItem(e);return t?JSON.parse(t):""},gO=e=>{const t=new Date,n=new Date(e);let o=t-n;o<0&&(o=0);const r=Math.floor(o/1e3),s=Math.floor(r/60);return r<60?`${r} sec ago`:s<60?`${s} min ago`:n.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0})},wc=e=>e.sort((n,o)=>{let r=new Date(n.createdAt),s=new Date(o.createdAt);return r===s?0:r>s?-1:1}).sort((n,o)=>n.isRead===o.isRead?0:o.isRead?-1:1),bO=e=>{let t=0;for(let n=0;n<e.length;n++)e[n].isRead||t++;return t},vO=e=>{const t=[];return e.forEach(n=>{n.isRead||t.push(n.id)}),t},yO=(e,t,n)=>e.filter(r=>t.some(s=>{var a,l,c;return(c=(a=r[s])==null?void 0:a.toLowerCase())==null?void 0:c.includes((l=n==null?void 0:n.trim())==null?void 0:l.toLowerCase())})),xO=(e,t,n)=>e.sort((r,s)=>n==="asc"?r[t].toLowerCase().localeCompare(s[t].toLowerCase()):s[t].toLowerCase().localeCompare(r[t].toLowerCase())),Ac=(e,t,n)=>e.slice((t-1)*n,t*n),Rc=e=>{var r;const t=JSON.parse(localStorage.getItem("configuration")),n=((r=t==null?void 0:t.entities)==null?void 0:r.labelChannel)||"Channel";return e.split("_").map(s=>s==="channel"?n:s[0].toUpperCase()+s.substring(1)).join(" ")},CO=e=>{const t=e.reduce((o,r)=>{const s=new Date(r==null?void 0:r.createdAt),a=new Intl.DateTimeFormat("en-US",{day:"numeric",month:"long",year:"numeric"}).format(s);return o[a]||(o[a]=[]),o[a].push(r),o},{});return Object.fromEntries(Object.entries(t).sort(([o],[r])=>new Date(r)-new Date(o)))},TO=(e,t=20)=>(e==null?void 0:e.length)>t?`${e.slice(0,t)}...`:e;function Fm({isRenderCellContent:e,column:t,row:n}){const o=n[t.key];return x.jsx(x.Fragment,{children:e?x.jsx(Te,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",textTransform:"none",fontSize:"1.1rem"},component:"label",children:t==null?void 0:t.cellRenderer(n)}):x.jsx(mm,{title:(o==null?void 0:o.length)>20?o:"",arrow:!0,children:x.jsx(Te,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",textTransform:"none",fontSize:"1.1rem"},component:"label",children:TO(o)})})})}Fm.propTypes={isRenderCellContent:i.bool,column:i.object,row:i.object};const Hs={TOKEN:"token",USER:"user",SNOP:"snop",SELECTED_BU:"selected_business_unit"},jm={BEARER:"Bearer",TENANT_ID:"tenant_id",BU_ID:"bu_id",SNOP_ID:"snop_id"},Xs={REFRESH:"refresh",CLOSE:"close"},EO=Object.values({"SKU Name":"sku_name",Node:"node","Channel Name":"channel_name"}),Vm=[10,25,50,100],Lm={MARK_ALL_READ:"MARK_ALL_READ"},IO=Vm.map(e=>({label:e,value:e})),_m=M.createContext({});function SO(e){const t=M.useRef(null);return t.current===null&&(t.current=e()),t.current}const Oc=M.createContext(null),$m=M.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function wO(e=!0){const t=M.useContext(Oc);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:o,register:r}=t,s=M.useId();M.useEffect(()=>{e&&r(s)},[e]);const a=M.useCallback(()=>e&&o&&o(s),[s,o,e]);return!n&&o?[!1,a]:[!0]}const Pc=typeof window<"u",AO=Pc?M.useLayoutEffect:M.useEffect,$t=e=>e;let rr=$t,eo=$t;process.env.NODE_ENV!=="production"&&(rr=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},eo=(e,t)=>{if(!e)throw new Error(t)});function Nc(e){let t;return()=>(t===void 0&&(t=e()),t)}const ir=(e,t,n)=>{const o=t-e;return o===0?1:(n-e)/o},On=e=>e*1e3,Fn=e=>e/1e3,RO={skipAnimations:!1,useManualTiming:!1},Us=["read","resolveKeyframes","update","preRender","render","postRender"],Wm={value:null,addProjectionMetrics:null};function OO(e,t){let n=new Set,o=new Set,r=!1,s=!1;const a=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1},c=0;function u(p){a.has(p)&&(d.schedule(p),e()),c++,p(l)}const d={schedule:(p,h=!1,g=!1)=>{const f=g&&r?n:o;return h&&a.add(p),f.has(p)||f.add(p),p},cancel:p=>{o.delete(p),a.delete(p)},process:p=>{if(l=p,r){s=!0;return}r=!0,[n,o]=[o,n],n.forEach(u),t&&Wm.value&&Wm.value.frameloop[t].push(c),c=0,n.clear(),r=!1,s&&(s=!1,d.process(p))}};return d}const PO=40;function Gm(e,t){let n=!1,o=!0;const r={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,a=Us.reduce((v,S)=>(v[S]=OO(s,t?S:void 0),v),{}),{read:l,resolveKeyframes:c,update:u,preRender:d,render:p,postRender:h}=a,g=()=>{const v=performance.now();n=!1,r.delta=o?1e3/60:Math.max(Math.min(v-r.timestamp,PO),1),r.timestamp=v,r.isProcessing=!0,l.process(r),c.process(r),u.process(r),d.process(r),p.process(r),h.process(r),r.isProcessing=!1,n&&t&&(o=!1,e(g))},m=()=>{n=!0,o=!0,r.isProcessing||e(g)};return{schedule:Us.reduce((v,S)=>{const T=a[S];return v[S]=(I,y=!1,w=!1)=>(n||m(),T.schedule(I,y,w)),v},{}),cancel:v=>{for(let S=0;S<Us.length;S++)a[Us[S]].cancel(v)},state:r,steps:a}}const{schedule:Qe,cancel:to,state:It,steps:Mc}=Gm(typeof requestAnimationFrame<"u"?requestAnimationFrame:$t,!0),zm=M.createContext({strict:!1}),Hm={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},sr={};for(const e in Hm)sr[e]={isEnabled:t=>Hm[e].some(n=>!!t[n])};function NO(e){for(const t in e)sr[t]={...sr[t],...e[t]}}const MO=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Zs(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||MO.has(e)}let Xm=e=>!Zs(e);function kO(e){e&&(Xm=t=>t.startsWith("on")?!Zs(t):e(t))}try{kO(require("@emotion/is-prop-valid").default)}catch{}function DO(e,t,n){const o={};for(const r in e)r==="values"&&typeof e.values=="object"||(Xm(r)||n===!0&&Zs(r)||!t&&!Zs(r)||e.draggable&&r.startsWith("onDrag"))&&(o[r]=e[r]);return o}const Um=new Set;function Ys(e,t,n){e||Um.has(t)||(console.warn(t),Um.add(t))}function BO(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...o)=>(process.env.NODE_ENV!=="production"&&Ys(!1,"motion() is deprecated. Use motion.create() instead."),e(...o));return new Proxy(n,{get:(o,r)=>r==="create"?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}const Js=M.createContext({});function qs(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function si(e){return typeof e=="string"||Array.isArray(e)}const kc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Dc=["initial",...kc];function Ks(e){return qs(e.animate)||Dc.some(t=>si(e[t]))}function Zm(e){return!!(Ks(e)||e.variants)}function FO(e,t){if(Ks(e)){const{initial:n,animate:o}=e;return{initial:n===!1||si(n)?n:void 0,animate:si(o)?o:void 0}}return e.inherit!==!1?t:{}}function jO(e){const{initial:t,animate:n}=FO(e,M.useContext(Js));return M.useMemo(()=>({initial:t,animate:n}),[Ym(t),Ym(n)])}function Ym(e){return Array.isArray(e)?e.join(" "):e}const VO=Symbol.for("motionComponentSymbol");function ar(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function LO(e,t,n){return M.useCallback(o=>{o&&e.onMount&&e.onMount(o),t&&(o?t.mount(o):t.unmount()),n&&(typeof n=="function"?n(o):ar(n)&&(n.current=o))},[t])}const Bc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Jm="data-"+Bc("framerAppearId"),{schedule:Fc,cancel:d4}=Gm(queueMicrotask,!1),qm=M.createContext({});function _O(e,t,n,o,r){var s,a;const{visualElement:l}=M.useContext(Js),c=M.useContext(zm),u=M.useContext(Oc),d=M.useContext($m).reducedMotion,p=M.useRef(null);o=o||c.renderer,!p.current&&o&&(p.current=o(e,{visualState:t,parent:l,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d}));const h=p.current,g=M.useContext(qm);h&&!h.projection&&r&&(h.type==="html"||h.type==="svg")&&$O(p.current,n,r,g);const m=M.useRef(!1);M.useInsertionEffect(()=>{h&&m.current&&h.update(n,u)});const f=n[Jm],b=M.useRef(!!f&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,f))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,f)));return AO(()=>{h&&(m.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),Fc.render(h.render),b.current&&h.animationState&&h.animationState.animateChanges())}),M.useEffect(()=>{h&&(!b.current&&h.animationState&&h.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)===null||v===void 0||v.call(window,f)}),b.current=!1))}),h}function $O(e,t,n,o){const{layoutId:r,layout:s,drag:a,dragConstraints:l,layoutScroll:c,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Km(e.parent)),e.projection.setOptions({layoutId:r,layout:s,alwaysMeasureLayout:!!a||l&&ar(l),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:o,layoutScroll:c,layoutRoot:u})}function Km(e){if(e)return e.options.allowProjection!==!1?e.projection:Km(e.parent)}function WO({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:o,Component:r}){var s,a;e&&NO(e);function l(u,d){let p;const h={...M.useContext($m),...u,layoutId:GO(u)},{isStatic:g}=h,m=jO(u),f=o(u,g);if(!g&&Pc){zO(h,e);const b=HO(h);p=b.MeasureLayout,m.visualElement=_O(r,f,h,t,b.ProjectionNode)}return x.jsxs(Js.Provider,{value:m,children:[p&&m.visualElement?x.jsx(p,{visualElement:m.visualElement,...h}):null,n(r,u,LO(f,m.visualElement,d),f,g,m.visualElement)]})}l.displayName=`motion.${typeof r=="string"?r:`create(${(a=(s=r.displayName)!==null&&s!==void 0?s:r.name)!==null&&a!==void 0?a:""})`}`;const c=M.forwardRef(l);return c[VO]=r,c}function GO({layoutId:e}){const t=M.useContext(_m).id;return t&&e!==void 0?t+"-"+e:e}function zO(e,t){const n=M.useContext(zm).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const o="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?rr(!1,o):eo(!1,o)}}function HO(e){const{drag:t,layout:n}=sr;if(!t&&!n)return{};const o={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}const Qm=e=>t=>typeof t=="string"&&t.startsWith(e),jc=Qm("--"),XO=Qm("var(--"),Vc=e=>XO(e)?UO.test(e.split("/*")[0].trim()):!1,UO=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,ai={};function ZO(e){for(const t in e)ai[t]=e[t],jc(t)&&(ai[t].isCSSVariable=!0)}const lr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],yo=new Set(lr);function eg(e,{layout:t,layoutId:n}){return yo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ai[e]||e==="opacity")}const At=e=>!!(e&&e.getVelocity),tg=(e,t)=>t&&typeof e=="number"?t.transform(e):e,jn=(e,t,n)=>n>t?t:n<e?e:n,cr={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},li={...cr,transform:e=>jn(0,1,e)},Qs={...cr,default:1},ci=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),no=ci("deg"),Pn=ci("%"),ve=ci("px"),YO=ci("vh"),JO=ci("vw"),ng={...Pn,parse:e=>Pn.parse(e)/100,transform:e=>Pn.transform(e*100)},qO={borderWidth:ve,borderTopWidth:ve,borderRightWidth:ve,borderBottomWidth:ve,borderLeftWidth:ve,borderRadius:ve,radius:ve,borderTopLeftRadius:ve,borderTopRightRadius:ve,borderBottomRightRadius:ve,borderBottomLeftRadius:ve,width:ve,maxWidth:ve,height:ve,maxHeight:ve,top:ve,right:ve,bottom:ve,left:ve,padding:ve,paddingTop:ve,paddingRight:ve,paddingBottom:ve,paddingLeft:ve,margin:ve,marginTop:ve,marginRight:ve,marginBottom:ve,marginLeft:ve,backgroundPositionX:ve,backgroundPositionY:ve},KO={rotate:no,rotateX:no,rotateY:no,rotateZ:no,scale:Qs,scaleX:Qs,scaleY:Qs,scaleZ:Qs,skew:no,skewX:no,skewY:no,distance:ve,translateX:ve,translateY:ve,translateZ:ve,x:ve,y:ve,z:ve,perspective:ve,transformPerspective:ve,opacity:li,originX:ng,originY:ng,originZ:ve},og={...cr,transform:Math.round},Lc={...qO,...KO,zIndex:og,size:ve,fillOpacity:li,strokeOpacity:li,numOctaves:og},QO={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},eP=lr.length;function tP(e,t,n){let o="",r=!0;for(let s=0;s<eP;s++){const a=lr[s],l=e[a];if(l===void 0)continue;let c=!0;if(typeof l=="number"?c=l===(a.startsWith("scale")?1:0):c=parseFloat(l)===0,!c||n){const u=tg(l,Lc[a]);if(!c){r=!1;const d=QO[a]||a;o+=`${d}(${u}) `}n&&(t[a]=u)}}return o=o.trim(),n?o=n(t,r?"":o):r&&(o="none"),o}function _c(e,t,n){const{style:o,vars:r,transformOrigin:s}=e;let a=!1,l=!1;for(const c in t){const u=t[c];if(yo.has(c)){a=!0;continue}else if(jc(c)){r[c]=u;continue}else{const d=tg(u,Lc[c]);c.startsWith("origin")?(l=!0,s[c]=d):o[c]=d}}if(t.transform||(a||n?o.transform=tP(t,e.transform,n):o.transform&&(o.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:d=0}=s;o.transformOrigin=`${c} ${u} ${d}`}}const $c=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function rg(e,t,n){for(const o in t)!At(t[o])&&!eg(o,n)&&(e[o]=t[o])}function nP({transformTemplate:e},t){return M.useMemo(()=>{const n=$c();return _c(n,t,e),Object.assign({},n.vars,n.style)},[t])}function oP(e,t){const n=e.style||{},o={};return rg(o,n,e),Object.assign(o,nP(e,t)),o}function rP(e,t){const n={},o=oP(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=o,n}const iP=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Wc(e){return typeof e!="string"||e.includes("-")?!1:!!(iP.indexOf(e)>-1||/[A-Z]/u.test(e))}const sP={offset:"stroke-dashoffset",array:"stroke-dasharray"},aP={offset:"strokeDashoffset",array:"strokeDasharray"};function lP(e,t,n=1,o=0,r=!0){e.pathLength=1;const s=r?sP:aP;e[s.offset]=ve.transform(-o);const a=ve.transform(t),l=ve.transform(n);e[s.array]=`${a} ${l}`}function ig(e,t,n){return typeof e=="string"?e:ve.transform(t+n*e)}function cP(e,t,n){const o=ig(t,e.x,e.width),r=ig(n,e.y,e.height);return`${o} ${r}`}function Gc(e,{attrX:t,attrY:n,attrScale:o,originX:r,originY:s,pathLength:a,pathSpacing:l=1,pathOffset:c=0,...u},d,p){if(_c(e,u,p),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:g,dimensions:m}=e;h.transform&&(m&&(g.transform=h.transform),delete h.transform),m&&(r!==void 0||s!==void 0||g.transform)&&(g.transformOrigin=cP(m,r!==void 0?r:.5,s!==void 0?s:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),o!==void 0&&(h.scale=o),a!==void 0&&lP(h,a,l,c,!1)}const sg=()=>({...$c(),attrs:{}}),zc=e=>typeof e=="string"&&e.toLowerCase()==="svg";function uP(e,t,n,o){const r=M.useMemo(()=>{const s=sg();return Gc(s,t,zc(o),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};rg(s,e.style,e),r.style={...s,...r.style}}return r}function dP(e=!1){return(n,o,r,{latestValues:s},a)=>{const c=(Wc(n)?uP:rP)(o,s,a,n),u=DO(o,typeof n=="string",e),d=n!==M.Fragment?{...u,...c,ref:r}:{},{children:p}=o,h=M.useMemo(()=>At(p)?p.get():p,[p]);return M.createElement(n,{...d,children:h})}}function ag(e){const t=[{},{}];return e==null||e.values.forEach((n,o)=>{t[0][o]=n.get(),t[1][o]=n.getVelocity()}),t}function Hc(e,t,n,o){if(typeof t=="function"){const[r,s]=ag(o);t=t(n!==void 0?n:e.custom,r,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,s]=ag(o);t=t(n!==void 0?n:e.custom,r,s)}return t}const Xc=e=>Array.isArray(e),pP=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),fP=e=>Xc(e)?e[e.length-1]||0:e;function ea(e){const t=At(e)?e.get():e;return pP(t)?t.toValue():t}function hP({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},o,r,s){const a={latestValues:mP(o,r,s,e),renderState:t()};return n&&(a.onMount=l=>n({props:o,current:l,...a}),a.onUpdate=l=>n(l)),a}const lg=e=>(t,n)=>{const o=M.useContext(Js),r=M.useContext(Oc),s=()=>hP(e,t,o,r);return n?s():SO(s)};function mP(e,t,n,o){const r={},s=o(e,{});for(const h in s)r[h]=ea(s[h]);let{initial:a,animate:l}=e;const c=Ks(e),u=Zm(e);t&&u&&!c&&e.inherit!==!1&&(a===void 0&&(a=t.initial),l===void 0&&(l=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const p=d?l:a;if(p&&typeof p!="boolean"&&!qs(p)){const h=Array.isArray(p)?p:[p];for(let g=0;g<h.length;g++){const m=Hc(e,h[g]);if(m){const{transitionEnd:f,transition:b,...v}=m;for(const S in v){let T=v[S];if(Array.isArray(T)){const I=d?T.length-1:0;T=T[I]}T!==null&&(r[S]=T)}for(const S in f)r[S]=f[S]}}}return r}function Uc(e,t,n){var o;const{style:r}=e,s={};for(const a in r)(At(r[a])||t.style&&At(t.style[a])||eg(a,e)||((o=n==null?void 0:n.getValue(a))===null||o===void 0?void 0:o.liveStyle)!==void 0)&&(s[a]=r[a]);return s}const gP={useVisualState:lg({scrapeMotionValuesFromProps:Uc,createRenderState:$c})};function cg(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function ug(e,{style:t,vars:n},o,r){Object.assign(e.style,t,r&&r.getProjectionStyles(o));for(const s in n)e.style.setProperty(s,n[s])}const dg=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function pg(e,t,n,o){ug(e,t,void 0,o);for(const r in t.attrs)e.setAttribute(dg.has(r)?r:Bc(r),t.attrs[r])}function fg(e,t,n){const o=Uc(e,t,n);for(const r in e)if(At(e[r])||At(t[r])){const s=lr.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;o[s]=e[r]}return o}const hg=["x","y","width","height","cx","cy","r"],bP={useVisualState:lg({scrapeMotionValuesFromProps:fg,createRenderState:sg,onUpdate:({props:e,prevProps:t,current:n,renderState:o,latestValues:r})=>{if(!n)return;let s=!!e.drag;if(!s){for(const l in r)if(yo.has(l)){s=!0;break}}if(!s)return;let a=!t;if(t)for(let l=0;l<hg.length;l++){const c=hg[l];e[c]!==t[c]&&(a=!0)}a&&Qe.read(()=>{cg(n,o),Qe.render(()=>{Gc(o,r,zc(n.tagName),e.transformTemplate),pg(n,o)})})}})};function vP(e,t){return function(o,{forwardMotionProps:r}={forwardMotionProps:!1}){const a={...Wc(o)?bP:gP,preloadedFeatures:e,useRender:dP(r),createVisualElement:t,Component:o};return WO(a)}}function ui(e,t,n){const o=e.getProps();return Hc(o,t,n!==void 0?n:o.custom,e)}const yP=Nc(()=>window.ScrollTimeline!==void 0);class xP{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let o=0;o<this.animations.length;o++)this.animations[o][t]=n}attachTimeline(t,n){const o=this.animations.map(r=>{if(yP()&&r.attachTimeline)return r.attachTimeline(t);if(typeof n=="function")return n(r)});return()=>{o.forEach((r,s)=>{r&&r(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class CP extends xP{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function Zc(e,t){return e?e[t]||e.default||e:void 0}const Yc=2e4;function mg(e){let t=0;const n=50;let o=e.next(t);for(;!o.done&&t<Yc;)t+=n,o=e.next(t);return t>=Yc?1/0:t}function Jc(e){return typeof e=="function"}function gg(e,t){e.timeline=t,e.onfinish=null}const qc=e=>Array.isArray(e)&&typeof e[0]=="number",TP={linearEasing:void 0};function EP(e,t){const n=Nc(e);return()=>{var o;return(o=TP[t])!==null&&o!==void 0?o:n()}}const ta=EP(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),bg=(e,t,n=10)=>{let o="";const r=Math.max(Math.round(t/n),2);for(let s=0;s<r;s++)o+=e(ir(0,r-1,s))+", ";return`linear(${o.substring(0,o.length-2)})`};function vg(e){return!!(typeof e=="function"&&ta()||!e||typeof e=="string"&&(e in Kc||ta())||qc(e)||Array.isArray(e)&&e.every(vg))}const di=([e,t,n,o])=>`cubic-bezier(${e}, ${t}, ${n}, ${o})`,Kc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:di([0,.65,.55,1]),circOut:di([.55,0,1,.45]),backIn:di([.31,.01,.66,-.59]),backOut:di([.33,1.53,.69,.99])};function yg(e,t){if(e)return typeof e=="function"&&ta()?bg(e,t):qc(e)?di(e):Array.isArray(e)?e.map(n=>yg(n,t)||Kc.easeOut):Kc[e]}const mn={x:!1,y:!1};function xg(){return mn.x||mn.y}function IP(e,t,n){var o;if(e instanceof Element)return[e];if(typeof e=="string"){let r=document;const s=(o=void 0)!==null&&o!==void 0?o:r.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}function Cg(e,t){const n=IP(e),o=new AbortController,r={passive:!0,...t,signal:o.signal};return[n,r,()=>o.abort()]}function Tg(e){return!(e.pointerType==="touch"||xg())}function SP(e,t,n={}){const[o,r,s]=Cg(e,n),a=l=>{if(!Tg(l))return;const{target:c}=l,u=t(c,l);if(typeof u!="function"||!c)return;const d=p=>{Tg(p)&&(u(p),c.removeEventListener("pointerleave",d))};c.addEventListener("pointerleave",d,r)};return o.forEach(l=>{l.addEventListener("pointerenter",a,r)}),s}const Eg=(e,t)=>t?e===t?!0:Eg(e,t.parentElement):!1,Qc=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,wP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function AP(e){return wP.has(e.tagName)||e.tabIndex!==-1}const pi=new WeakSet;function Ig(e){return t=>{t.key==="Enter"&&e(t)}}function eu(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const RP=(e,t)=>{const n=e.currentTarget;if(!n)return;const o=Ig(()=>{if(pi.has(n))return;eu(n,"down");const r=Ig(()=>{eu(n,"up")}),s=()=>eu(n,"cancel");n.addEventListener("keyup",r,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",o,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",o),t)};function Sg(e){return Qc(e)&&!xg()}function OP(e,t,n={}){const[o,r,s]=Cg(e,n),a=l=>{const c=l.currentTarget;if(!Sg(l)||pi.has(c))return;pi.add(c);const u=t(c,l),d=(g,m)=>{window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",h),!(!Sg(g)||!pi.has(c))&&(pi.delete(c),typeof u=="function"&&u(g,{success:m}))},p=g=>{d(g,n.useGlobalTarget||Eg(c,g.target))},h=g=>{d(g,!1)};window.addEventListener("pointerup",p,r),window.addEventListener("pointercancel",h,r)};return o.forEach(l=>{!AP(l)&&l.getAttribute("tabindex")===null&&(l.tabIndex=0),(n.useGlobalTarget?window:l).addEventListener("pointerdown",a,r),l.addEventListener("focus",u=>RP(u,r),r)}),s}function PP(e){return e==="x"||e==="y"?mn[e]?null:(mn[e]=!0,()=>{mn[e]=!1}):mn.x||mn.y?null:(mn.x=mn.y=!0,()=>{mn.x=mn.y=!1})}const wg=new Set(["width","height","top","left","right","bottom",...lr]);let na;function NP(){na=void 0}const Nn={now:()=>(na===void 0&&Nn.set(It.isProcessing||RO.useManualTiming?It.timestamp:performance.now()),na),set:e=>{na=e,queueMicrotask(NP)}};function tu(e,t){e.indexOf(t)===-1&&e.push(t)}function nu(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class ou{constructor(){this.subscriptions=[]}add(t){return tu(this.subscriptions,t),()=>nu(this.subscriptions,t)}notify(t,n,o){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,n,o);else for(let s=0;s<r;s++){const a=this.subscriptions[s];a&&a(t,n,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Ag(e,t){return t?e*(1e3/t):0}const Rg=30,MP=e=>!isNaN(parseFloat(e));class kP{constructor(t,n={}){this.version="12.4.3",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(o,r=!0)=>{const s=Nn.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),r&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Nn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=MP(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Ys(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new ou);const o=this.events[t].add(n);return t==="change"?()=>{o(),Qe.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,o){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-o}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Nn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Rg)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Rg);return Ag(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function fi(e,t){return new kP(e,t)}function DP(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,fi(n))}function BP(e,t){const n=ui(e,t);let{transitionEnd:o={},transition:r={},...s}=n||{};s={...s,...o};for(const a in s){const l=fP(s[a]);DP(e,a,l)}}function FP(e){return!!(At(e)&&e.add)}function ru(e,t){const n=e.getValue("willChange");if(FP(n))return n.add(t)}function Og(e){return e.props[Jm]}const Pg=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,jP=1e-7,VP=12;function LP(e,t,n,o,r){let s,a,l=0;do a=t+(n-t)/2,s=Pg(a,o,r)-e,s>0?n=a:t=a;while(Math.abs(s)>jP&&++l<VP);return a}function hi(e,t,n,o){if(e===t&&n===o)return $t;const r=s=>LP(s,0,1,e,n);return s=>s===0||s===1?s:Pg(r(s),t,o)}const Ng=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Mg=e=>t=>1-e(1-t),kg=hi(.33,1.53,.69,.99),iu=Mg(kg),Dg=Ng(iu),Bg=e=>(e*=2)<1?.5*iu(e):.5*(2-Math.pow(2,-10*(e-1))),su=e=>1-Math.sin(Math.acos(e)),Fg=Mg(su),jg=Ng(su),Vg=e=>/^0[^.\s]+$/u.test(e);function _P(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Vg(e):!0}const mi=e=>Math.round(e*1e5)/1e5,au=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function $P(e){return e==null}const WP=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,lu=(e,t)=>n=>!!(typeof n=="string"&&WP.test(n)&&n.startsWith(e)||t&&!$P(n)&&Object.prototype.hasOwnProperty.call(n,t)),Lg=(e,t,n)=>o=>{if(typeof o!="string")return o;const[r,s,a,l]=o.match(au);return{[e]:parseFloat(r),[t]:parseFloat(s),[n]:parseFloat(a),alpha:l!==void 0?parseFloat(l):1}},GP=e=>jn(0,255,e),cu={...cr,transform:e=>Math.round(GP(e))},xo={test:lu("rgb","red"),parse:Lg("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:o=1})=>"rgba("+cu.transform(e)+", "+cu.transform(t)+", "+cu.transform(n)+", "+mi(li.transform(o))+")"};function zP(e){let t="",n="",o="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),o=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),o=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,o+=o,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(o,16),alpha:r?parseInt(r,16)/255:1}}const uu={test:lu("#"),parse:zP,transform:xo.transform},ur={test:lu("hsl","hue"),parse:Lg("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:o=1})=>"hsla("+Math.round(e)+", "+Pn.transform(mi(t))+", "+Pn.transform(mi(n))+", "+mi(li.transform(o))+")"},Rt={test:e=>xo.test(e)||uu.test(e)||ur.test(e),parse:e=>xo.test(e)?xo.parse(e):ur.test(e)?ur.parse(e):uu.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?xo.transform(e):ur.transform(e)},HP=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function XP(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(au))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(HP))===null||n===void 0?void 0:n.length)||0)>0}const _g="number",$g="color",UP="var",ZP="var(",Wg="${}",YP=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function gi(e){const t=e.toString(),n=[],o={color:[],number:[],var:[]},r=[];let s=0;const l=t.replace(YP,c=>(Rt.test(c)?(o.color.push(s),r.push($g),n.push(Rt.parse(c))):c.startsWith(ZP)?(o.var.push(s),r.push(UP),n.push(c)):(o.number.push(s),r.push(_g),n.push(parseFloat(c))),++s,Wg)).split(Wg);return{values:n,split:l,indexes:o,types:r}}function Gg(e){return gi(e).values}function zg(e){const{split:t,types:n}=gi(e),o=t.length;return r=>{let s="";for(let a=0;a<o;a++)if(s+=t[a],r[a]!==void 0){const l=n[a];l===_g?s+=mi(r[a]):l===$g?s+=Rt.transform(r[a]):s+=r[a]}return s}}const JP=e=>typeof e=="number"?0:e;function qP(e){const t=Gg(e);return zg(e)(t.map(JP))}const oo={test:XP,parse:Gg,createTransformer:zg,getAnimatableNone:qP},KP=new Set(["brightness","contrast","saturate","opacity"]);function QP(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[o]=n.match(au)||[];if(!o)return e;const r=n.replace(o,"");let s=KP.has(t)?1:0;return o!==n&&(s*=100),t+"("+s+r+")"}const eN=/\b([a-z-]*)\(.*?\)/gu,du={...oo,getAnimatableNone:e=>{const t=e.match(eN);return t?t.map(QP).join(" "):e}},tN={...Lc,color:Rt,backgroundColor:Rt,outlineColor:Rt,fill:Rt,stroke:Rt,borderColor:Rt,borderTopColor:Rt,borderRightColor:Rt,borderBottomColor:Rt,borderLeftColor:Rt,filter:du,WebkitFilter:du},pu=e=>tN[e];function Hg(e,t){let n=pu(e);return n!==du&&(n=oo),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const nN=new Set(["auto","none","0"]);function oN(e,t,n){let o=0,r;for(;o<e.length&&!r;){const s=e[o];typeof s=="string"&&!nN.has(s)&&gi(s).values.length&&(r=e[o]),o++}if(r&&n)for(const s of t)e[s]=Hg(n,r)}const Xg=e=>e===cr||e===ve,Ug=(e,t)=>parseFloat(e.split(", ")[t]),Zg=(e,t)=>(n,{transform:o})=>{if(o==="none"||!o)return 0;const r=o.match(/^matrix3d\((.+)\)$/u);if(r)return Ug(r[1],t);{const s=o.match(/^matrix\((.+)\)$/u);return s?Ug(s[1],e):0}},rN=new Set(["x","y","z"]),iN=lr.filter(e=>!rN.has(e));function sN(e){const t=[];return iN.forEach(n=>{const o=e.getValue(n);o!==void 0&&(t.push([n,o.get()]),o.set(n.startsWith("scale")?1:0))}),t}const dr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Zg(4,13),y:Zg(5,14)};dr.translateX=dr.x,dr.translateY=dr.y;const Co=new Set;let fu=!1,hu=!1;function Yg(){if(hu){const e=Array.from(Co).filter(o=>o.needsMeasurement),t=new Set(e.map(o=>o.element)),n=new Map;t.forEach(o=>{const r=sN(o);r.length&&(n.set(o,r),o.render())}),e.forEach(o=>o.measureInitialState()),t.forEach(o=>{o.render();const r=n.get(o);r&&r.forEach(([s,a])=>{var l;(l=o.getValue(s))===null||l===void 0||l.set(a)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}hu=!1,fu=!1,Co.forEach(e=>e.complete()),Co.clear()}function Jg(){Co.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(hu=!0)})}function aN(){Jg(),Yg()}class mu{constructor(t,n,o,r,s,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=o,this.motionValue=r,this.element=s,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Co.add(this),fu||(fu=!0,Qe.read(Jg),Qe.resolveKeyframes(Yg))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:o,motionValue:r}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const a=r==null?void 0:r.get(),l=t[t.length-1];if(a!==void 0)t[0]=a;else if(o&&n){const c=o.readValue(n,l);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=l),r&&a===void 0&&r.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Co.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Co.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const qg=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),lN=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function cN(e){const t=lN.exec(e);if(!t)return[,];const[,n,o,r]=t;return[`--${n??o}`,r]}const uN=4;function Kg(e,t,n=1){eo(n<=uN,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[o,r]=cN(e);if(!o)return;const s=window.getComputedStyle(t).getPropertyValue(o);if(s){const a=s.trim();return qg(a)?parseFloat(a):a}return Vc(r)?Kg(r,t,n+1):r}const Qg=e=>t=>t.test(e),eb=[cr,ve,Pn,no,JO,YO,{test:e=>e==="auto",parse:e=>e}],tb=e=>eb.find(Qg(e));class nb extends mu{constructor(t,n,o,r,s){super(t,n,o,r,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:o}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let u=t[c];if(typeof u=="string"&&(u=u.trim(),Vc(u))){const d=Kg(u,n.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!wg.has(o)||t.length!==2)return;const[r,s]=t,a=tb(r),l=tb(s);if(a!==l)if(Xg(a)&&Xg(l))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,o=[];for(let r=0;r<t.length;r++)_P(t[r])&&o.push(r);o.length&&oN(t,o,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:o}=this;if(!t||!t.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=dr[o](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const r=n[n.length-1];r!==void 0&&t.getValue(o,r).jump(r,!1)}measureEndState(){var t;const{element:n,name:o,unresolvedKeyframes:r}=this;if(!n||!n.current)return;const s=n.getValue(o);s&&s.jump(this.measuredOrigin,!1);const a=r.length-1,l=r[a];r[a]=dr[o](n.measureViewportBox(),window.getComputedStyle(n.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([c,u])=>{n.getValue(c).set(u)}),this.resolveNoneKeyframes()}}const ob=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(oo.test(e)||e==="0")&&!e.startsWith("url("));function dN(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function pN(e,t,n,o){const r=e[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],a=ob(r,t),l=ob(s,t);return rr(a===l,`You are trying to animate ${t} from "${r}" to "${s}". ${r} is not an animatable value - to enable this animation set ${r} to a value animatable to ${s} via the \`style\` property.`),!a||!l?!1:dN(e)||(n==="spring"||Jc(n))&&o}const fN=e=>e!==null;function oa(e,{repeat:t,repeatType:n="loop"},o){const r=e.filter(fN),s=t&&n!=="loop"&&t%2===1?0:r.length-1;return!s||o===void 0?r[s]:o}const hN=40;class rb{constructor({autoplay:t=!0,delay:n=0,type:o="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:a="loop",...l}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Nn.now(),this.options={autoplay:t,delay:n,type:o,repeat:r,repeatDelay:s,repeatType:a,...l},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>hN?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&aN(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Nn.now(),this.hasAttemptedResolve=!0;const{name:o,type:r,velocity:s,delay:a,onComplete:l,onUpdate:c,isGenerator:u}=this.options;if(!u&&!pN(t,o,r,s))if(a)this.options.duration=0;else{c&&c(oa(t,this.options,n)),l&&l(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const it=(e,t,n)=>e+(t-e)*n;function gu(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function mN({hue:e,saturation:t,lightness:n,alpha:o}){e/=360,t/=100,n/=100;let r=0,s=0,a=0;if(!t)r=s=a=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;r=gu(c,l,e+1/3),s=gu(c,l,e),a=gu(c,l,e-1/3)}return{red:Math.round(r*255),green:Math.round(s*255),blue:Math.round(a*255),alpha:o}}function ra(e,t){return n=>n>0?t:e}const bu=(e,t,n)=>{const o=e*e,r=n*(t*t-o)+o;return r<0?0:Math.sqrt(r)},gN=[uu,xo,ur],bN=e=>gN.find(t=>t.test(e));function ib(e){const t=bN(e);if(rr(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===ur&&(n=mN(n)),n}const sb=(e,t)=>{const n=ib(e),o=ib(t);if(!n||!o)return ra(e,t);const r={...n};return s=>(r.red=bu(n.red,o.red,s),r.green=bu(n.green,o.green,s),r.blue=bu(n.blue,o.blue,s),r.alpha=it(n.alpha,o.alpha,s),xo.transform(r))},vN=(e,t)=>n=>t(e(n)),bi=(...e)=>e.reduce(vN),vu=new Set(["none","hidden"]);function yN(e,t){return vu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function xN(e,t){return n=>it(e,t,n)}function yu(e){return typeof e=="number"?xN:typeof e=="string"?Vc(e)?ra:Rt.test(e)?sb:EN:Array.isArray(e)?ab:typeof e=="object"?Rt.test(e)?sb:CN:ra}function ab(e,t){const n=[...e],o=n.length,r=e.map((s,a)=>yu(s)(s,t[a]));return s=>{for(let a=0;a<o;a++)n[a]=r[a](s);return n}}function CN(e,t){const n={...e,...t},o={};for(const r in n)e[r]!==void 0&&t[r]!==void 0&&(o[r]=yu(e[r])(e[r],t[r]));return r=>{for(const s in o)n[s]=o[s](r);return n}}function TN(e,t){var n;const o=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const a=t.types[s],l=e.indexes[a][r[a]],c=(n=e.values[l])!==null&&n!==void 0?n:0;o[s]=c,r[a]++}return o}const EN=(e,t)=>{const n=oo.createTransformer(t),o=gi(e),r=gi(t);return o.indexes.var.length===r.indexes.var.length&&o.indexes.color.length===r.indexes.color.length&&o.indexes.number.length>=r.indexes.number.length?vu.has(e)&&!r.values.length||vu.has(t)&&!o.values.length?yN(e,t):bi(ab(TN(o,r),r.values),n):(rr(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),ra(e,t))};function lb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?it(e,t,n):yu(e)(e,t)}const IN=5;function cb(e,t,n){const o=Math.max(t-IN,0);return Ag(n-e(o),t-o)}const st={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},xu=.001;function SN({duration:e=st.duration,bounce:t=st.bounce,velocity:n=st.velocity,mass:o=st.mass}){let r,s;rr(e<=On(st.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=jn(st.minDamping,st.maxDamping,a),e=jn(st.minDuration,st.maxDuration,Fn(e)),a<1?(r=u=>{const d=u*a,p=d*e,h=d-n,g=Cu(u,a),m=Math.exp(-p);return xu-h/g*m},s=u=>{const p=u*a*e,h=p*n+n,g=Math.pow(a,2)*Math.pow(u,2)*e,m=Math.exp(-p),f=Cu(Math.pow(u,2),a);return(-r(u)+xu>0?-1:1)*((h-g)*m)/f}):(r=u=>{const d=Math.exp(-u*e),p=(u-n)*e+1;return-xu+d*p},s=u=>{const d=Math.exp(-u*e),p=(n-u)*(e*e);return d*p});const l=5/e,c=AN(r,s,l);if(e=On(e),isNaN(c))return{stiffness:st.stiffness,damping:st.damping,duration:e};{const u=Math.pow(c,2)*o;return{stiffness:u,damping:a*2*Math.sqrt(o*u),duration:e}}}const wN=12;function AN(e,t,n){let o=n;for(let r=1;r<wN;r++)o=o-e(o)/t(o);return o}function Cu(e,t){return e*Math.sqrt(1-t*t)}const RN=["duration","bounce"],ON=["stiffness","damping","mass"];function ub(e,t){return t.some(n=>e[n]!==void 0)}function PN(e){let t={velocity:st.velocity,stiffness:st.stiffness,damping:st.damping,mass:st.mass,isResolvedFromDuration:!1,...e};if(!ub(e,ON)&&ub(e,RN))if(e.visualDuration){const n=e.visualDuration,o=2*Math.PI/(n*1.2),r=o*o,s=2*jn(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:st.mass,stiffness:r,damping:s}}else{const n=SN(e);t={...t,...n,mass:st.mass},t.isResolvedFromDuration=!0}return t}function db(e=st.visualDuration,t=st.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:o,restDelta:r}=n;const s=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],l={done:!1,value:s},{stiffness:c,damping:u,mass:d,duration:p,velocity:h,isResolvedFromDuration:g}=PN({...n,velocity:-Fn(n.velocity||0)}),m=h||0,f=u/(2*Math.sqrt(c*d)),b=a-s,v=Fn(Math.sqrt(c/d)),S=Math.abs(b)<5;o||(o=S?st.restSpeed.granular:st.restSpeed.default),r||(r=S?st.restDelta.granular:st.restDelta.default);let T;if(f<1){const y=Cu(v,f);T=w=>{const A=Math.exp(-f*v*w);return a-A*((m+f*v*b)/y*Math.sin(y*w)+b*Math.cos(y*w))}}else if(f===1)T=y=>a-Math.exp(-v*y)*(b+(m+v*b)*y);else{const y=v*Math.sqrt(f*f-1);T=w=>{const A=Math.exp(-f*v*w),R=Math.min(y*w,300);return a-A*((m+f*v*b)*Math.sinh(R)+y*b*Math.cosh(R))/y}}const I={calculatedDuration:g&&p||null,next:y=>{const w=T(y);if(g)l.done=y>=p;else{let A=0;f<1&&(A=y===0?On(m):cb(T,y,w));const R=Math.abs(A)<=o,N=Math.abs(a-w)<=r;l.done=R&&N}return l.value=l.done?a:w,l},toString:()=>{const y=Math.min(mg(I),Yc),w=bg(A=>I.next(y*A).value,y,30);return y+"ms "+w}};return I}function pb({keyframes:e,velocity:t=0,power:n=.8,timeConstant:o=325,bounceDamping:r=10,bounceStiffness:s=500,modifyTarget:a,min:l,max:c,restDelta:u=.5,restSpeed:d}){const p=e[0],h={done:!1,value:p},g=R=>l!==void 0&&R<l||c!==void 0&&R>c,m=R=>l===void 0?c:c===void 0||Math.abs(l-R)<Math.abs(c-R)?l:c;let f=n*t;const b=p+f,v=a===void 0?b:a(b);v!==b&&(f=v-p);const S=R=>-f*Math.exp(-R/o),T=R=>v+S(R),I=R=>{const N=S(R),P=T(R);h.done=Math.abs(N)<=u,h.value=h.done?v:P};let y,w;const A=R=>{g(h.value)&&(y=R,w=db({keyframes:[h.value,m(h.value)],velocity:cb(T,R,h.value),damping:r,stiffness:s,restDelta:u,restSpeed:d}))};return A(0),{calculatedDuration:null,next:R=>{let N=!1;return!w&&y===void 0&&(N=!0,I(R),A(R)),y!==void 0&&R>=y?w.next(R-y):(!N&&I(R),h)}}}const NN=hi(.42,0,1,1),MN=hi(0,0,.58,1),fb=hi(.42,0,.58,1),kN=e=>Array.isArray(e)&&typeof e[0]!="number",hb={linear:$t,easeIn:NN,easeInOut:fb,easeOut:MN,circIn:su,circInOut:jg,circOut:Fg,backIn:iu,backInOut:Dg,backOut:kg,anticipate:Bg},mb=e=>{if(qc(e)){eo(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,o,r]=e;return hi(t,n,o,r)}else if(typeof e=="string")return eo(hb[e]!==void 0,`Invalid easing type '${e}'`),hb[e];return e};function DN(e,t,n){const o=[],r=n||lb,s=e.length-1;for(let a=0;a<s;a++){let l=r(e[a],e[a+1]);if(t){const c=Array.isArray(t)?t[a]||$t:t;l=bi(c,l)}o.push(l)}return o}function BN(e,t,{clamp:n=!0,ease:o,mixer:r}={}){const s=e.length;if(eo(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=DN(t,o,r),c=l.length,u=d=>{if(a&&d<e[0])return t[0];let p=0;if(c>1)for(;p<e.length-2&&!(d<e[p+1]);p++);const h=ir(e[p],e[p+1],d);return l[p](h)};return n?d=>u(jn(e[0],e[s-1],d)):u}function FN(e,t){const n=e[e.length-1];for(let o=1;o<=t;o++){const r=ir(0,t,o);e.push(it(n,1,r))}}function jN(e){const t=[0];return FN(t,e.length-1),t}function VN(e,t){return e.map(n=>n*t)}function LN(e,t){return e.map(()=>t||fb).splice(0,e.length-1)}function vi({duration:e=300,keyframes:t,times:n,ease:o="easeInOut"}){const r=kN(o)?o.map(mb):mb(o),s={done:!1,value:t[0]},a=VN(n&&n.length===t.length?n:jN(t),e),l=BN(a,t,{ease:Array.isArray(r)?r:LN(t,r)});return{calculatedDuration:e,next:c=>(s.value=l(c),s.done=c>=e,s)}}const _N=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Qe.update(t,!0),stop:()=>to(t),now:()=>It.isProcessing?It.timestamp:Nn.now()}},$N={decay:pb,inertia:pb,tween:vi,keyframes:vi,spring:db},WN=e=>e/100;class Tu extends rb{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:c}=this.options;c&&c()};const{name:n,motionValue:o,element:r,keyframes:s}=this.options,a=(r==null?void 0:r.KeyframeResolver)||mu,l=(c,u)=>this.onKeyframesResolved(c,u);this.resolver=new a(s,l,n,o,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:s,velocity:a=0}=this.options,l=Jc(n)?n:$N[n]||vi;let c,u;process.env.NODE_ENV!=="production"&&l!==vi&&eo(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l!==vi&&typeof t[0]!="number"&&(c=bi(WN,lb(t[0],t[1])),t=[0,100]);const d=l({...this.options,keyframes:t});s==="mirror"&&(u=l({...this.options,keyframes:[...t].reverse(),velocity:-a})),d.calculatedDuration===null&&(d.calculatedDuration=mg(d));const{calculatedDuration:p}=d,h=p+r,g=h*(o+1)-r;return{generator:d,mirroredGenerator:u,mapPercentToKeyframes:c,calculatedDuration:p,resolvedDuration:h,totalDuration:g}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:o}=this;if(!o){const{keyframes:R}=this.options;return{done:!0,value:R[R.length-1]}}const{finalKeyframe:r,generator:s,mirroredGenerator:a,mapPercentToKeyframes:l,keyframes:c,calculatedDuration:u,totalDuration:d,resolvedDuration:p}=o;if(this.startTime===null)return s.next(0);const{delay:h,repeat:g,repeatType:m,repeatDelay:f,onUpdate:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const v=this.currentTime-h*(this.speed>=0?1:-1),S=this.speed>=0?v<0:v>d;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let T=this.currentTime,I=s;if(g){const R=Math.min(this.currentTime,d)/p;let N=Math.floor(R),P=R%1;!P&&R>=1&&(P=1),P===1&&N--,N=Math.min(N,g+1),!!(N%2)&&(m==="reverse"?(P=1-P,f&&(P-=f/p)):m==="mirror"&&(I=a)),T=jn(0,1,P)*p}const y=S?{done:!1,value:c[0]}:I.next(T);l&&(y.value=l(y.value));let{done:w}=y;!S&&u!==null&&(w=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&w);return A&&r!==void 0&&(y.value=oa(c,this.options,r)),b&&b(y.value),A&&this.finish(),y}get duration(){const{resolved:t}=this;return t?Fn(t.calculatedDuration):0}get time(){return Fn(this.currentTime)}set time(t){t=On(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Fn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=_N,onPlay:n,startTime:o}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=r):this.startTime=o??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const GN=new Set(["opacity","clipPath","filter","transform"]);function zN(e,t,n,{delay:o=0,duration:r=300,repeat:s=0,repeatType:a="loop",ease:l="easeInOut",times:c}={}){const u={[t]:n};c&&(u.offset=c);const d=yg(l,r);return Array.isArray(d)&&(u.easing=d),e.animate(u,{delay:o,duration:r,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:a==="reverse"?"alternate":"normal"})}const HN=Nc(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ia=10,XN=2e4;function UN(e){return Jc(e.type)||e.type==="spring"||!vg(e.ease)}function ZN(e,t){const n=new Tu({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let o={done:!1,value:e[0]};const r=[];let s=0;for(;!o.done&&s<XN;)o=n.sample(s),r.push(o.value),s+=ia;return{times:void 0,keyframes:r,duration:s-ia,ease:"linear"}}const gb={anticipate:Bg,backInOut:Dg,circInOut:jg};function YN(e){return e in gb}class bb extends rb{constructor(t){super(t);const{name:n,motionValue:o,element:r,keyframes:s}=this.options;this.resolver=new nb(s,(a,l)=>this.onKeyframesResolved(a,l),n,o,r),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:o=300,times:r,ease:s,type:a,motionValue:l,name:c,startTime:u}=this.options;if(!l.owner||!l.owner.current)return!1;if(typeof s=="string"&&ta()&&YN(s)&&(s=gb[s]),UN(this.options)){const{onComplete:p,onUpdate:h,motionValue:g,element:m,...f}=this.options,b=ZN(t,f);t=b.keyframes,t.length===1&&(t[1]=t[0]),o=b.duration,r=b.times,s=b.ease,a="keyframes"}const d=zN(l.owner.current,c,t,{...this.options,duration:o,times:r,ease:s});return d.startTime=u??this.calcStartTime(),this.pendingTimeline?(gg(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:p}=this.options;l.set(oa(t,this.options,n)),p&&p(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:o,times:r,type:a,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Fn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Fn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:o}=n;o.currentTime=On(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:o}=n;o.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return $t;const{animation:o}=n;gg(o,t)}return $t}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:o,duration:r,type:s,ease:a,times:l}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:d,onComplete:p,element:h,...g}=this.options,m=new Tu({...g,keyframes:o,duration:r,type:s,ease:a,times:l,isGenerator:!0}),f=On(this.time);u.setWithVelocity(m.sample(f-ia).value,m.sample(f).value,ia)}const{onStop:c}=this.options;c&&c(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:o,repeatDelay:r,repeatType:s,damping:a,type:l}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=n.owner.getProps();return HN()&&o&&GN.has(o)&&!c&&!u&&!r&&s!=="mirror"&&a!==0&&l!=="inertia"}}const JN={type:"spring",stiffness:500,damping:25,restSpeed:10},qN=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),KN={type:"keyframes",duration:.8},QN={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},eM=(e,{keyframes:t})=>t.length>2?KN:yo.has(e)?e.startsWith("scale")?qN(t[1]):JN:QN;function tM({when:e,delay:t,delayChildren:n,staggerChildren:o,staggerDirection:r,repeat:s,repeatType:a,repeatDelay:l,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const Eu=(e,t,n,o={},r,s)=>a=>{const l=Zc(o,e)||{},c=l.delay||o.delay||0;let{elapsed:u=0}=o;u=u-On(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:h=>{t.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:s?void 0:r};tM(l)||(d={...d,...eM(e,d)}),d.duration&&(d.duration=On(d.duration)),d.repeatDelay&&(d.repeatDelay=On(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let p=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(p=!0)),p&&!s&&t.get()!==void 0){const h=oa(d.keyframes,l);if(h!==void 0)return Qe.update(()=>{d.onUpdate(h),d.onComplete()}),new CP([])}return!s&&bb.supports(d)?new bb(d):new Tu(d)};function nM({protectedKeys:e,needsAnimating:t},n){const o=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,o}function vb(e,t,{delay:n=0,transitionOverride:o,type:r}={}){var s;let{transition:a=e.getDefaultTransition(),transitionEnd:l,...c}=t;o&&(a=o);const u=[],d=r&&e.animationState&&e.animationState.getState()[r];for(const p in c){const h=e.getValue(p,(s=e.latestValues[p])!==null&&s!==void 0?s:null),g=c[p];if(g===void 0||d&&nM(d,p))continue;const m={delay:n,...Zc(a||{},p)};let f=!1;if(window.MotionHandoffAnimation){const v=Og(e);if(v){const S=window.MotionHandoffAnimation(v,p,Qe);S!==null&&(m.startTime=S,f=!0)}}ru(e,p),h.start(Eu(p,h,g,e.shouldReduceMotion&&wg.has(p)?{type:!1}:m,e,f));const b=h.animation;b&&u.push(b)}return l&&Promise.all(u).then(()=>{Qe.update(()=>{l&&BP(e,l)})}),u}function Iu(e,t,n={}){var o;const r=ui(e,t,n.type==="exit"?(o=e.presenceContext)===null||o===void 0?void 0:o.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const a=r?()=>Promise.all(vb(e,r,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:p,staggerDirection:h}=s;return oM(e,t,d+u,p,h,n)}:()=>Promise.resolve(),{when:c}=s;if(c){const[u,d]=c==="beforeChildren"?[a,l]:[l,a];return u().then(()=>d())}else return Promise.all([a(),l(n.delay)])}function oM(e,t,n=0,o=0,r=1,s){const a=[],l=(e.variantChildren.size-1)*o,c=r===1?(u=0)=>u*o:(u=0)=>l-u*o;return Array.from(e.variantChildren).sort(rM).forEach((u,d)=>{u.notify("AnimationStart",t),a.push(Iu(u,t,{...s,delay:n+c(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function rM(e,t){return e.sortNodePosition(t)}function iM(e,t,n={}){e.notify("AnimationStart",t);let o;if(Array.isArray(t)){const r=t.map(s=>Iu(e,s,n));o=Promise.all(r)}else if(typeof t=="string")o=Iu(e,t,n);else{const r=typeof t=="function"?ui(e,t,n.custom):t;o=Promise.all(vb(e,r,n))}return o.then(()=>{e.notify("AnimationComplete",t)})}function yb(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let o=0;o<n;o++)if(t[o]!==e[o])return!1;return!0}const sM=Dc.length;function xb(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?xb(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<sM;n++){const o=Dc[n],r=e.props[o];(si(r)||r===!1)&&(t[o]=r)}return t}const aM=[...kc].reverse(),lM=kc.length;function cM(e){return t=>Promise.all(t.map(({animation:n,options:o})=>iM(e,n,o)))}function uM(e){let t=cM(e),n=Cb(),o=!0;const r=c=>(u,d)=>{var p;const h=ui(e,d,c==="exit"?(p=e.presenceContext)===null||p===void 0?void 0:p.custom:void 0);if(h){const{transition:g,transitionEnd:m,...f}=h;u={...u,...f,...m}}return u};function s(c){t=c(e)}function a(c){const{props:u}=e,d=xb(e.parent)||{},p=[],h=new Set;let g={},m=1/0;for(let b=0;b<lM;b++){const v=aM[b],S=n[v],T=u[v]!==void 0?u[v]:d[v],I=si(T),y=v===c?S.isActive:null;y===!1&&(m=b);let w=T===d[v]&&T!==u[v]&&I;if(w&&o&&e.manuallyAnimateOnMount&&(w=!1),S.protectedKeys={...g},!S.isActive&&y===null||!T&&!S.prevProp||qs(T)||typeof T=="boolean")continue;const A=dM(S.prevProp,T);let R=A||v===c&&S.isActive&&!w&&I||b>m&&I,N=!1;const P=Array.isArray(T)?T:[T];let F=P.reduce(r(v),{});y===!1&&(F={});const{prevResolvedValues:G={}}=S,j={...G,...F},L=$=>{R=!0,h.has($)&&(N=!0,h.delete($)),S.needsAnimating[$]=!0;const D=e.getValue($);D&&(D.liveStyle=!1)};for(const $ in j){const D=F[$],X=G[$];if(g.hasOwnProperty($))continue;let k=!1;Xc(D)&&Xc(X)?k=!yb(D,X):k=D!==X,k?D!=null?L($):h.add($):D!==void 0&&h.has($)?L($):S.protectedKeys[$]=!0}S.prevProp=T,S.prevResolvedValues=F,S.isActive&&(g={...g,...F}),o&&e.blockInitialAnimation&&(R=!1),R&&(!(w&&A)||N)&&p.push(...P.map($=>({animation:$,options:{type:v}})))}if(h.size){const b={};if(typeof u.initial!="boolean"){const v=ui(e,Array.isArray(u.initial)?u.initial[0]:u.initial);v&&v.transition&&(b.transition=v.transition)}h.forEach(v=>{const S=e.getBaseTarget(v),T=e.getValue(v);T&&(T.liveStyle=!0),b[v]=S??null}),p.push({animation:b})}let f=!!p.length;return o&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(f=!1),o=!1,f?t(p):Promise.resolve()}function l(c,u){var d;if(n[c].isActive===u)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(h=>{var g;return(g=h.animationState)===null||g===void 0?void 0:g.setActive(c,u)}),n[c].isActive=u;const p=a(c);for(const h in n)n[h].protectedKeys={};return p}return{animateChanges:a,setActive:l,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Cb(),o=!0}}}function dM(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!yb(t,e):!1}function To(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Cb(){return{animate:To(!0),whileInView:To(),whileHover:To(),whileTap:To(),whileDrag:To(),whileFocus:To(),exit:To()}}class ro{constructor(t){this.isMounted=!1,this.node=t}update(){}}class pM extends ro{constructor(t){super(t),t.animationState||(t.animationState=uM(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();qs(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let fM=0;class hM extends ro{constructor(){super(...arguments),this.id=fM++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;const r=this.node.animationState.setActive("exit",!t);n&&!t&&r.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const mM={animation:{Feature:pM},exit:{Feature:hM}};function yi(e,t,n,o={passive:!0}){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n)}function xi(e){return{point:{x:e.pageX,y:e.pageY}}}const gM=e=>t=>Qc(t)&&e(t,xi(t));function Ci(e,t,n,o){return yi(e,t,gM(n),o)}const Tb=(e,t)=>Math.abs(e-t);function bM(e,t){const n=Tb(e.x,t.x),o=Tb(e.y,t.y);return Math.sqrt(n**2+o**2)}class Eb{constructor(t,n,{transformPagePoint:o,contextWindow:r,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=wu(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=bM(p.offset,{x:0,y:0})>=3;if(!h&&!g)return;const{point:m}=p,{timestamp:f}=It;this.history.push({...m,timestamp:f});const{onStart:b,onMove:v}=this.handlers;h||(b&&b(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,p)},this.handlePointerMove=(p,h)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=Su(h,this.transformPagePoint),Qe.update(this.updatePoint,!0)},this.handlePointerUp=(p,h)=>{this.end();const{onEnd:g,onSessionEnd:m,resumeAnimation:f}=this.handlers;if(this.dragSnapToOrigin&&f&&f(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=wu(p.type==="pointercancel"?this.lastMoveEventInfo:Su(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(p,b),m&&m(p,b)},!Qc(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=o,this.contextWindow=r||window;const a=xi(t),l=Su(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=It;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,wu(l,this.history)),this.removeListeners=bi(Ci(this.contextWindow,"pointermove",this.handlePointerMove),Ci(this.contextWindow,"pointerup",this.handlePointerUp),Ci(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),to(this.updatePoint)}}function Su(e,t){return t?{point:t(e.point)}:e}function Ib(e,t){return{x:e.x-t.x,y:e.y-t.y}}function wu({point:e},t){return{point:e,delta:Ib(e,Sb(t)),offset:Ib(e,vM(t)),velocity:yM(t,.1)}}function vM(e){return e[0]}function Sb(e){return e[e.length-1]}function yM(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,o=null;const r=Sb(e);for(;n>=0&&(o=e[n],!(r.timestamp-o.timestamp>On(t)));)n--;if(!o)return{x:0,y:0};const s=Fn(r.timestamp-o.timestamp);if(s===0)return{x:0,y:0};const a={x:(r.x-o.x)/s,y:(r.y-o.y)/s};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}const wb=1e-4,xM=1-wb,CM=1+wb,Ab=.01,TM=0-Ab,EM=0+Ab;function Dt(e){return e.max-e.min}function IM(e,t,n){return Math.abs(e-t)<=n}function Rb(e,t,n,o=.5){e.origin=o,e.originPoint=it(t.min,t.max,e.origin),e.scale=Dt(n)/Dt(t),e.translate=it(n.min,n.max,e.origin)-e.originPoint,(e.scale>=xM&&e.scale<=CM||isNaN(e.scale))&&(e.scale=1),(e.translate>=TM&&e.translate<=EM||isNaN(e.translate))&&(e.translate=0)}function Ti(e,t,n,o){Rb(e.x,t.x,n.x,o?o.originX:void 0),Rb(e.y,t.y,n.y,o?o.originY:void 0)}function Ob(e,t,n){e.min=n.min+t.min,e.max=e.min+Dt(t)}function SM(e,t,n){Ob(e.x,t.x,n.x),Ob(e.y,t.y,n.y)}function Pb(e,t,n){e.min=t.min-n.min,e.max=e.min+Dt(t)}function Ei(e,t,n){Pb(e.x,t.x,n.x),Pb(e.y,t.y,n.y)}function wM(e,{min:t,max:n},o){return t!==void 0&&e<t?e=o?it(t,e,o.min):Math.max(e,t):n!==void 0&&e>n&&(e=o?it(n,e,o.max):Math.min(e,n)),e}function Nb(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function AM(e,{top:t,left:n,bottom:o,right:r}){return{x:Nb(e.x,n,r),y:Nb(e.y,t,o)}}function Mb(e,t){let n=t.min-e.min,o=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,o]=[o,n]),{min:n,max:o}}function RM(e,t){return{x:Mb(e.x,t.x),y:Mb(e.y,t.y)}}function OM(e,t){let n=.5;const o=Dt(e),r=Dt(t);return r>o?n=ir(t.min,t.max-o,e.min):o>r&&(n=ir(e.min,e.max-r,t.min)),jn(0,1,n)}function PM(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Au=.35;function NM(e=Au){return e===!1?e=0:e===!0&&(e=Au),{x:kb(e,"left","right"),y:kb(e,"top","bottom")}}function kb(e,t,n){return{min:Db(e,t),max:Db(e,n)}}function Db(e,t){return typeof e=="number"?e:e[t]||0}const Bb=()=>({translate:0,scale:1,origin:0,originPoint:0}),pr=()=>({x:Bb(),y:Bb()}),Fb=()=>({min:0,max:0}),mt=()=>({x:Fb(),y:Fb()});function sn(e){return[e("x"),e("y")]}function jb({top:e,left:t,right:n,bottom:o}){return{x:{min:t,max:n},y:{min:e,max:o}}}function MM({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function kM(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),o=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:o.y,right:o.x}}function Ru(e){return e===void 0||e===1}function Ou({scale:e,scaleX:t,scaleY:n}){return!Ru(e)||!Ru(t)||!Ru(n)}function Eo(e){return Ou(e)||Vb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Vb(e){return Lb(e.x)||Lb(e.y)}function Lb(e){return e&&e!=="0%"}function sa(e,t,n){const o=e-n,r=t*o;return n+r}function _b(e,t,n,o,r){return r!==void 0&&(e=sa(e,r,o)),sa(e,n,o)+t}function Pu(e,t=0,n=1,o,r){e.min=_b(e.min,t,n,o,r),e.max=_b(e.max,t,n,o,r)}function $b(e,{x:t,y:n}){Pu(e.x,t.translate,t.scale,t.originPoint),Pu(e.y,n.translate,n.scale,n.originPoint)}const Wb=.999999999999,Gb=1.0000000000001;function DM(e,t,n,o=!1){const r=n.length;if(!r)return;t.x=t.y=1;let s,a;for(let l=0;l<r;l++){s=n[l],a=s.projectionDelta;const{visualElement:c}=s.options;c&&c.props.style&&c.props.style.display==="contents"||(o&&s.options.layoutScroll&&s.scroll&&s!==s.root&&hr(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,$b(e,a)),o&&Eo(s.latestValues)&&hr(e,s.latestValues))}t.x<Gb&&t.x>Wb&&(t.x=1),t.y<Gb&&t.y>Wb&&(t.y=1)}function fr(e,t){e.min=e.min+t,e.max=e.max+t}function zb(e,t,n,o,r=.5){const s=it(e.min,e.max,r);Pu(e,t,n,s,o)}function hr(e,t){zb(e.x,t.x,t.scaleX,t.scale,t.originX),zb(e.y,t.y,t.scaleY,t.scale,t.originY)}function Hb(e,t){return jb(kM(e.getBoundingClientRect(),t))}function BM(e,t,n){const o=Hb(e,n),{scroll:r}=t;return r&&(fr(o.x,r.offset.x),fr(o.y,r.offset.y)),o}const Xb=({current:e})=>e?e.ownerDocument.defaultView:null,FM=new WeakMap;class jM{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=mt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const r=d=>{const{dragSnapToOrigin:p}=this.getProps();p?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(xi(d).point)},s=(d,p)=>{const{drag:h,dragPropagation:g,onDragStart:m}=this.getProps();if(h&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=PP(h),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),sn(b=>{let v=this.getAxisMotionValue(b).get()||0;if(Pn.test(v)){const{projection:S}=this.visualElement;if(S&&S.layout){const T=S.layout.layoutBox[b];T&&(v=Dt(T)*(parseFloat(v)/100))}}this.originPoint[b]=v}),m&&Qe.postRender(()=>m(d,p)),ru(this.visualElement,"transform");const{animationState:f}=this.visualElement;f&&f.setActive("whileDrag",!0)},a=(d,p)=>{const{dragPropagation:h,dragDirectionLock:g,onDirectionLock:m,onDrag:f}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:b}=p;if(g&&this.currentDirection===null){this.currentDirection=VM(b),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",p.point,b),this.updateAxis("y",p.point,b),this.visualElement.render(),f&&f(d,p)},l=(d,p)=>this.stop(d,p),c=()=>sn(d=>{var p;return this.getAnimationState(d)==="paused"&&((p=this.getAxisMotionValue(d).animation)===null||p===void 0?void 0:p.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Eb(t,{onSessionStart:r,onStart:s,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Xb(this.visualElement)})}stop(t,n){const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:r}=n;this.startAnimation(r);const{onDragEnd:s}=this.getProps();s&&Qe.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,o){const{drag:r}=this.getProps();if(!o||!aa(t,r,this.currentDirection))return;const s=this.getAxisMotionValue(t);let a=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(a=wM(a,this.constraints[t],this.elastic[t])),s.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:o}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&ar(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&r?this.constraints=AM(r.layoutBox,n):this.constraints=!1,this.elastic=NM(o),s!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&sn(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=PM(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ar(t))return!1;const o=t.current;eo(o!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const s=BM(o,r.root,this.visualElement.getTransformPagePoint());let a=RM(r.layout.layoutBox,s);if(n){const l=n(MM(a));this.hasMutatedConstraints=!!l,l&&(a=jb(l))}return a}startAnimation(t){const{drag:n,dragMomentum:o,dragElastic:r,dragTransition:s,dragSnapToOrigin:a,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=sn(d=>{if(!aa(d,n,this.currentDirection))return;let p=c&&c[d]||{};a&&(p={min:0,max:0});const h=r?200:1e6,g=r?40:1e7,m={type:"inertia",velocity:o?t[d]:0,bounceStiffness:h,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...s,...p};return this.startAxisValueAnimation(d,m)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const o=this.getAxisMotionValue(t);return ru(this.visualElement,t),o.start(Eu(t,o,0,n,this.visualElement,!1))}stopAnimation(){sn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){sn(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,o=this.visualElement.getProps(),r=o[n];return r||this.visualElement.getValue(t,(o.initial?o.initial[t]:void 0)||0)}snapToCursor(t){sn(n=>{const{drag:o}=this.getProps();if(!aa(n,o,this.currentDirection))return;const{projection:r}=this.visualElement,s=this.getAxisMotionValue(n);if(r&&r.layout){const{min:a,max:l}=r.layout.layoutBox[n];s.set(t[n]-it(a,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:o}=this.visualElement;if(!ar(n)||!o||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};sn(a=>{const l=this.getAxisMotionValue(a);if(l&&this.constraints!==!1){const c=l.get();r[a]=OM({min:c,max:c},this.constraints[a])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),sn(a=>{if(!aa(a,t,null))return;const l=this.getAxisMotionValue(a),{min:c,max:u}=this.constraints[a];l.set(it(c,u,r[a]))})}addListeners(){if(!this.visualElement.current)return;FM.set(this.visualElement,this);const t=this.visualElement.current,n=Ci(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(c)}),o=()=>{const{dragConstraints:c}=this.getProps();ar(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,s=r.addEventListener("measure",o);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),Qe.read(o);const a=yi(window,"resize",()=>this.scalePositionWithinConstraints()),l=r.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(sn(d=>{const p=this.getAxisMotionValue(d);p&&(this.originPoint[d]+=c[d].translate,p.set(p.get()+c[d].translate))}),this.visualElement.render())});return()=>{a(),n(),s(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:o=!1,dragPropagation:r=!1,dragConstraints:s=!1,dragElastic:a=Au,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:o,dragPropagation:r,dragConstraints:s,dragElastic:a,dragMomentum:l}}}function aa(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function VM(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class LM extends ro{constructor(t){super(t),this.removeGroupControls=$t,this.removeListeners=$t,this.controls=new jM(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||$t}unmount(){this.removeGroupControls(),this.removeListeners()}}const Ub=e=>(t,n)=>{e&&Qe.postRender(()=>e(t,n))};class _M extends ro{constructor(){super(...arguments),this.removePointerDownListener=$t}onPointerDown(t){this.session=new Eb(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Xb(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:o,onPanEnd:r}=this.node.getProps();return{onSessionStart:Ub(t),onStart:Ub(n),onMove:o,onEnd:(s,a)=>{delete this.session,r&&Qe.postRender(()=>r(s,a))}}}mount(){this.removePointerDownListener=Ci(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const la={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Zb(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ii={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ve.test(e))e=parseFloat(e);else return e;const n=Zb(e,t.target.x),o=Zb(e,t.target.y);return`${n}% ${o}%`}},$M={correct:(e,{treeScale:t,projectionDelta:n})=>{const o=e,r=oo.parse(e);if(r.length>5)return o;const s=oo.createTransformer(e),a=typeof r[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;r[0+a]/=l,r[1+a]/=c;const u=it(l,c,.5);return typeof r[2+a]=="number"&&(r[2+a]/=u),typeof r[3+a]=="number"&&(r[3+a]/=u),s(r)}};class WM extends M.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o,layoutId:r}=this.props,{projection:s}=t;ZO(GM),s&&(n.group&&n.group.add(s),o&&o.register&&r&&o.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),la.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:o,drag:r,isPresent:s}=this.props,a=o.projection;return a&&(a.isPresent=s,r||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?a.promote():a.relegate()||Qe.postRender(()=>{const l=a.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Fc.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o}=this.props,{projection:r}=t;r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),o&&o.deregister&&o.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Yb(e){const[t,n]=wO(),o=M.useContext(_m);return x.jsx(WM,{...e,layoutGroup:o,switchLayoutGroup:M.useContext(qm),isPresent:t,safeToRemove:n})}const GM={borderRadius:{...Ii,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ii,borderTopRightRadius:Ii,borderBottomLeftRadius:Ii,borderBottomRightRadius:Ii,boxShadow:$M};function zM(e,t,n){const o=At(e)?e:fi(e);return o.start(Eu("",o,t,n)),o.animation}function HM(e){return e instanceof SVGElement&&e.tagName!=="svg"}const XM=(e,t)=>e.depth-t.depth;class UM{constructor(){this.children=[],this.isDirty=!1}add(t){tu(this.children,t),this.isDirty=!0}remove(t){nu(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(XM),this.isDirty=!1,this.children.forEach(t)}}function ZM(e,t){const n=Nn.now(),o=({timestamp:r})=>{const s=r-n;s>=t&&(to(o),e(s-t))};return Qe.read(o,!0),()=>to(o)}const Jb=["TopLeft","TopRight","BottomLeft","BottomRight"],YM=Jb.length,qb=e=>typeof e=="string"?parseFloat(e):e,Kb=e=>typeof e=="number"||ve.test(e);function JM(e,t,n,o,r,s){r?(e.opacity=it(0,n.opacity!==void 0?n.opacity:1,qM(o)),e.opacityExit=it(t.opacity!==void 0?t.opacity:1,0,KM(o))):s&&(e.opacity=it(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,o));for(let a=0;a<YM;a++){const l=`border${Jb[a]}Radius`;let c=Qb(t,l),u=Qb(n,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||Kb(c)===Kb(u)?(e[l]=Math.max(it(qb(c),qb(u),o),0),(Pn.test(u)||Pn.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||n.rotate)&&(e.rotate=it(t.rotate||0,n.rotate||0,o))}function Qb(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const qM=e0(0,.5,Fg),KM=e0(.5,.95,$t);function e0(e,t,n){return o=>o<e?0:o>t?1:n(ir(e,t,o))}function t0(e,t){e.min=t.min,e.max=t.max}function an(e,t){t0(e.x,t.x),t0(e.y,t.y)}function n0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function o0(e,t,n,o,r){return e-=t,e=sa(e,1/n,o),r!==void 0&&(e=sa(e,1/r,o)),e}function QM(e,t=0,n=1,o=.5,r,s=e,a=e){if(Pn.test(t)&&(t=parseFloat(t),t=it(a.min,a.max,t/100)-a.min),typeof t!="number")return;let l=it(s.min,s.max,o);e===s&&(l-=t),e.min=o0(e.min,t,n,l,r),e.max=o0(e.max,t,n,l,r)}function r0(e,t,[n,o,r],s,a){QM(e,t[n],t[o],t[r],t.scale,s,a)}const ek=["x","scaleX","originX"],tk=["y","scaleY","originY"];function i0(e,t,n,o){r0(e.x,t,ek,n?n.x:void 0,o?o.x:void 0),r0(e.y,t,tk,n?n.y:void 0,o?o.y:void 0)}function s0(e){return e.translate===0&&e.scale===1}function a0(e){return s0(e.x)&&s0(e.y)}function l0(e,t){return e.min===t.min&&e.max===t.max}function nk(e,t){return l0(e.x,t.x)&&l0(e.y,t.y)}function c0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function u0(e,t){return c0(e.x,t.x)&&c0(e.y,t.y)}function d0(e){return Dt(e.x)/Dt(e.y)}function p0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class ok{constructor(){this.members=[]}add(t){tu(this.members,t),t.scheduleRender()}remove(t){if(nu(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(r=>t===r);if(n===0)return!1;let o;for(let r=n;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1){o=s;break}}return o?(this.promote(o),!0):!1}promote(t,n){const o=this.lead;if(t!==o&&(this.prevLead=o,this.lead=t,t.show(),o)){o.instance&&o.scheduleRender(),t.scheduleRender(),t.resumeFrom=o,n&&(t.resumeFrom.preserveOpacity=!0),o.snapshot&&(t.snapshot=o.snapshot,t.snapshot.latestValues=o.animationValues||o.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:r}=t.options;r===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:o}=t;n.onExitComplete&&n.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function rk(e,t,n){let o="";const r=e.x.translate/t.x,s=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((r||s||a)&&(o=`translate3d(${r}px, ${s}px, ${a}px) `),(t.x!==1||t.y!==1)&&(o+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:p,rotateY:h,skewX:g,skewY:m}=n;u&&(o=`perspective(${u}px) ${o}`),d&&(o+=`rotate(${d}deg) `),p&&(o+=`rotateX(${p}deg) `),h&&(o+=`rotateY(${h}deg) `),g&&(o+=`skewX(${g}deg) `),m&&(o+=`skewY(${m}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(o+=`scale(${l}, ${c})`),o||"none"}const Nu=["","X","Y","Z"],ik={visibility:"hidden"},f0=1e3;let sk=0;function Mu(e,t,n,o){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),o&&(o[e]=0))}function h0(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Og(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Qe,!(r||s))}const{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&h0(o)}function m0({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:o,resetTransform:r}){return class{constructor(a={},l=t==null?void 0:t()){this.id=sk++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(ck),this.nodes.forEach(hk),this.nodes.forEach(mk),this.nodes.forEach(uk)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new UM)}addEventListener(a,l){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new ou),this.eventHandlers.get(a).add(l)}notifyListeners(a,...l){const c=this.eventHandlers.get(a);c&&c.notify(...l)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,l=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=HM(a),this.instance=a;const{layoutId:c,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),l&&(u||c)&&(this.isLayoutDirty=!0),e){let p;const h=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,p&&p(),p=ZM(h,250),la.hasAnimatedSinceResize&&(la.hasAnimatedSinceResize=!1,this.nodes.forEach(b0))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||u)&&this.addEventListener("didUpdate",({delta:p,hasLayoutChanged:h,hasRelativeLayoutChanged:g,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const f=this.options.transition||d.getDefaultTransition()||xk,{onLayoutAnimationStart:b,onLayoutAnimationComplete:v}=d.getProps(),S=!this.targetLayout||!u0(this.targetLayout,m),T=!h&&g;if(this.options.layoutRoot||this.resumeFrom||T||h&&(S||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(p,T);const I={...Zc(f,"layout"),onPlay:b,onComplete:v};(d.shouldReduceMotion||this.options.layoutRoot)&&(I.delay=0,I.type=!1),this.startAnimation(I)}else h||b0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,to(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(gk),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&h0(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const p=this.path[d];p.shouldResetTransform=!0,p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(g0);return}this.isUpdating||this.nodes.forEach(pk),this.isUpdating=!1,this.nodes.forEach(fk),this.nodes.forEach(ak),this.nodes.forEach(lk),this.clearAllSnapshots();const l=Nn.now();It.delta=jn(0,1e3/60,l-It.timestamp),It.timestamp=l,It.isProcessing=!0,Mc.update.process(It),Mc.preRender.process(It),Mc.render.process(It),It.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Fc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(dk),this.sharedNodes.forEach(bk)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Qe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Qe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Dt(this.snapshot.measuredBox.x)&&!Dt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=mt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(l=!1),l){const c=o(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!r)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!a0(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;a&&(l||Eo(this.latestValues)||d)&&(r(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return a&&(c=this.removeTransform(c)),Ck(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:l}=this.options;if(!l)return mt();const c=l.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(Tk))){const{scroll:d}=this.root;d&&(fr(c.x,d.offset.x),fr(c.y,d.offset.y))}return c}removeElementScroll(a){var l;const c=mt();if(an(c,a),!((l=this.scroll)===null||l===void 0)&&l.wasRoot)return c;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:p,options:h}=d;d!==this.root&&p&&h.layoutScroll&&(p.wasRoot&&an(c,a),fr(c.x,p.offset.x),fr(c.y,p.offset.y))}return c}applyTransform(a,l=!1){const c=mt();an(c,a);for(let u=0;u<this.path.length;u++){const d=this.path[u];!l&&d.options.layoutScroll&&d.scroll&&d!==d.root&&hr(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),Eo(d.latestValues)&&hr(c,d.latestValues)}return Eo(this.latestValues)&&hr(c,this.latestValues),c}removeTransform(a){const l=mt();an(l,a);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!Eo(u.latestValues))continue;Ou(u.latestValues)&&u.updateSnapshot();const d=mt(),p=u.measurePageBox();an(d,p),i0(l,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return Eo(this.latestValues)&&i0(l,this.latestValues),l}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==It.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var l;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==c;if(!(a||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((l=this.parent)===null||l===void 0)&&l.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:p,layoutId:h}=this.options;if(!(!this.layout||!(p||h))){if(this.resolvedRelativeTargetAt=It.timestamp,!this.targetDelta&&!this.relativeTarget){const g=this.getClosestProjectingParent();g&&g.layout&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=mt(),this.relativeTargetOrigin=mt(),Ei(this.relativeTargetOrigin,this.layout.layoutBox,g.layout.layoutBox),an(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=mt(),this.targetWithTransforms=mt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),SM(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):an(this.target,this.layout.layoutBox),$b(this.target,this.targetDelta)):an(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const g=this.getClosestProjectingParent();g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=mt(),this.relativeTargetOrigin=mt(),Ei(this.relativeTargetOrigin,this.target,g.target),an(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Ou(this.parent.latestValues)||Vb(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var a;const l=this.getLead(),c=!!this.resumingFrom||this!==l;let u=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(u=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===It.timestamp&&(u=!1),u)return;const{layout:d,layoutId:p}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||p))return;an(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,g=this.treeScale.y;DM(this.layoutCorrected,this.treeScale,this.path,c),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=mt());const{target:m}=l;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(n0(this.prevProjectionDelta.x,this.projectionDelta.x),n0(this.prevProjectionDelta.y,this.projectionDelta.y)),Ti(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==g||!p0(this.projectionDelta.x,this.prevProjectionDelta.x)||!p0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var l;if((l=this.options.visualElement)===null||l===void 0||l.scheduleRender(),a){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=pr(),this.projectionDelta=pr(),this.projectionDeltaWithTransform=pr()}setAnimationOrigin(a,l=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},p=pr();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const h=mt(),g=c?c.source:void 0,m=this.layout?this.layout.source:void 0,f=g!==m,b=this.getStack(),v=!b||b.members.length<=1,S=!!(f&&!v&&this.options.crossfade===!0&&!this.path.some(yk));this.animationProgress=0;let T;this.mixTargetDelta=I=>{const y=I/1e3;v0(p.x,a.x,y),v0(p.y,a.y,y),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ei(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),vk(this.relativeTarget,this.relativeTargetOrigin,h,y),T&&nk(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=mt()),an(T,this.relativeTarget)),f&&(this.animationValues=d,JM(d,u,this.latestValues,y,S,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=y},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(to(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Qe.update(()=>{la.hasAnimatedSinceResize=!0,this.currentAnimation=zM(0,f0,{...a,onUpdate:l=>{this.mixTargetDelta(l),a.onUpdate&&a.onUpdate(l)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(f0),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:d}=a;if(!(!l||!c||!u)){if(this!==a&&this.layout&&u&&E0(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||mt();const p=Dt(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+p;const h=Dt(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+h}an(l,c),hr(l,d),Ti(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(a,l){this.sharedNodes.has(a)||this.sharedNodes.set(a,new ok),this.sharedNodes.get(a).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:l}=this.options;return l?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:l}=this.options;return l?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let l=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&Mu("z",a,u,this.animationValues);for(let d=0;d<Nu.length;d++)Mu(`rotate${Nu[d]}`,a,u,this.animationValues),Mu(`skew${Nu[d]}`,a,u,this.animationValues);a.render();for(const d in u)a.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);a.scheduleRender()}getProjectionStyles(a){var l,c;if(!this.instance||this.isSVG)return;if(!this.isVisible)return ik;const u={visibility:""},d=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=ea(a==null?void 0:a.pointerEvents)||"",u.transform=d?d(this.latestValues,""):"none",u;const p=this.getLead();if(!this.projectionDelta||!this.layout||!p.target){const f={};return this.options.layoutId&&(f.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,f.pointerEvents=ea(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Eo(this.latestValues)&&(f.transform=d?d({},""):"none",this.hasProjected=!1),f}const h=p.animationValues||p.latestValues;this.applyTransformsToTarget(),u.transform=rk(this.projectionDeltaWithTransform,this.treeScale,h),d&&(u.transform=d(h,u.transform));const{x:g,y:m}=this.projectionDelta;u.transformOrigin=`${g.origin*100}% ${m.origin*100}% 0`,p.animationValues?u.opacity=p===this?(c=(l=h.opacity)!==null&&l!==void 0?l:this.latestValues.opacity)!==null&&c!==void 0?c:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:u.opacity=p===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const f in ai){if(h[f]===void 0)continue;const{correct:b,applyTo:v,isCSSVariable:S}=ai[f],T=u.transform==="none"?h[f]:b(h[f],p);if(v){const I=v.length;for(let y=0;y<I;y++)u[v[y]]=T}else S?this.options.visualElement.renderState.vars[f]=T:u[f]=T}return this.options.layoutId&&(u.pointerEvents=p===this?ea(a==null?void 0:a.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var l;return(l=a.currentAnimation)===null||l===void 0?void 0:l.stop()}),this.root.nodes.forEach(g0),this.root.sharedNodes.clear()}}}function ak(e){e.updateLayout()}function lk(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:r}=e.layout,{animationType:s}=e.options,a=n.source!==e.layout.source;s==="size"?sn(p=>{const h=a?n.measuredBox[p]:n.layoutBox[p],g=Dt(h);h.min=o[p].min,h.max=h.min+g}):E0(s,n.layoutBox,o)&&sn(p=>{const h=a?n.measuredBox[p]:n.layoutBox[p],g=Dt(o[p]);h.max=h.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[p].max=e.relativeTarget[p].min+g)});const l=pr();Ti(l,o,n.layoutBox);const c=pr();a?Ti(c,e.applyTransform(r,!0),n.measuredBox):Ti(c,o,n.layoutBox);const u=!a0(l);let d=!1;if(!e.resumeFrom){const p=e.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:h,layout:g}=p;if(h&&g){const m=mt();Ei(m,n.layoutBox,h.layoutBox);const f=mt();Ei(f,o,g.layoutBox),u0(m,f)||(d=!0),p.options.layoutRoot&&(e.relativeTarget=f,e.relativeTargetOrigin=m,e.relativeParent=p)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:n,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:o}=e.options;o&&o()}e.options.transition=void 0}function ck(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function uk(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function dk(e){e.clearSnapshot()}function g0(e){e.clearMeasurements()}function pk(e){e.isLayoutDirty=!1}function fk(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function b0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function hk(e){e.resolveTargetDelta()}function mk(e){e.calcProjection()}function gk(e){e.resetSkewAndRotation()}function bk(e){e.removeLeadSnapshot()}function v0(e,t,n){e.translate=it(t.translate,0,n),e.scale=it(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function y0(e,t,n,o){e.min=it(t.min,n.min,o),e.max=it(t.max,n.max,o)}function vk(e,t,n,o){y0(e.x,t.x,n.x,o),y0(e.y,t.y,n.y,o)}function yk(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const xk={duration:.45,ease:[.4,0,.1,1]},x0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),C0=x0("applewebkit/")&&!x0("chrome/")?Math.round:$t;function T0(e){e.min=C0(e.min),e.max=C0(e.max)}function Ck(e){T0(e.x),T0(e.y)}function E0(e,t,n){return e==="position"||e==="preserve-aspect"&&!IM(d0(t),d0(n),.2)}function Tk(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const Ek=m0({attachResizeListener:(e,t)=>yi(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ku={current:void 0},I0=m0({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ku.current){const e=new Ek({});e.mount(window),e.setOptions({layoutScroll:!0}),ku.current=e}return ku.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Ik={pan:{Feature:_M},drag:{Feature:LM,ProjectionNode:I0,MeasureLayout:Yb}};function S0(e,t,n){const{props:o}=e;e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,s=o[r];s&&Qe.postRender(()=>s(t,xi(t)))}class Sk extends ro{mount(){const{current:t}=this.node;t&&(this.unmount=SP(t,(n,o)=>(S0(this.node,o,"Start"),r=>S0(this.node,r,"End"))))}unmount(){}}class wk extends ro{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=bi(yi(this.node.current,"focus",()=>this.onFocus()),yi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function w0(e,t,n){const{props:o}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&o.whileTap&&e.animationState.setActive("whileTap",n==="Start");const r="onTap"+(n==="End"?"":n),s=o[r];s&&Qe.postRender(()=>s(t,xi(t)))}class Ak extends ro{mount(){const{current:t}=this.node;t&&(this.unmount=OP(t,(n,o)=>(w0(this.node,o,"Start"),(r,{success:s})=>w0(this.node,r,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Du=new WeakMap,Bu=new WeakMap,Rk=e=>{const t=Du.get(e.target);t&&t(e)},Ok=e=>{e.forEach(Rk)};function Pk({root:e,...t}){const n=e||document;Bu.has(n)||Bu.set(n,{});const o=Bu.get(n),r=JSON.stringify(t);return o[r]||(o[r]=new IntersectionObserver(Ok,{root:e,...t})),o[r]}function Nk(e,t,n){const o=Pk(t);return Du.set(e,n),o.observe(e),()=>{Du.delete(e),o.unobserve(e)}}const Mk={some:0,all:1};class kk extends ro{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:o,amount:r="some",once:s}=t,a={root:n?n.current:void 0,rootMargin:o,threshold:typeof r=="number"?r:Mk[r]},l=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:p}=this.node.getProps(),h=u?d:p;h&&h(c)};return Nk(this.node.current,a,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Dk(t,n))&&this.startObserver()}unmount(){}}function Dk({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Bk={inView:{Feature:kk},tap:{Feature:Ak},focus:{Feature:wk},hover:{Feature:Sk}},Fk={layout:{ProjectionNode:I0,MeasureLayout:Yb}},Fu={current:null},A0={current:!1};function jk(){if(A0.current=!0,!!Pc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Fu.current=e.matches;e.addListener(t),t()}else Fu.current=!1}const Vk=[...eb,Rt,oo],Lk=e=>Vk.find(Qg(e)),_k=new WeakMap;function $k(e,t,n){for(const o in t){const r=t[o],s=n[o];if(At(r))e.addValue(o,r),process.env.NODE_ENV==="development"&&Ys(r.version==="12.4.3",`Attempting to mix Motion versions ${r.version} with 12.4.3 may not work as expected.`);else if(At(s))e.addValue(o,fi(r,{owner:e}));else if(s!==r)if(e.hasValue(o)){const a=e.getValue(o);a.liveStyle===!0?a.jump(r):a.hasAnimated||a.set(r)}else{const a=e.getStaticValue(o);e.addValue(o,fi(a!==void 0?a:r,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const R0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Wk{scrapeMotionValuesFromProps(t,n,o){return{}}constructor({parent:t,props:n,presenceContext:o,reducedMotionConfig:r,blockInitialAnimation:s,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=mu,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const g=Nn.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,Qe.render(this.render,!1,!0))};const{latestValues:c,renderState:u,onUpdate:d}=a;this.onUpdate=d,this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=o,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=l,this.blockInitialAnimation=!!s,this.isControllingVariants=Ks(n),this.isVariantNode=Zm(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:p,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const g in h){const m=h[g];c[g]!==void 0&&At(m)&&m.set(c[g],!1)}}mount(t){this.current=t,_k.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,o)=>this.bindToMotionValue(o,n)),A0.current||jk(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Fu.current,process.env.NODE_ENV!=="production"&&Ys(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),to(this.notifyUpdate),to(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const o=yo.has(t);o&&this.onBindTransform&&this.onBindTransform();const r=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&Qe.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{r(),s(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in sr){const n=sr[t];if(!n)continue;const{isEnabled:o,Feature:r}=n;if(!this.features[t]&&r&&o(this.props)&&(this.features[t]=new r(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):mt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let o=0;o<R0.length;o++){const r=R0[o];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const s="on"+r,a=t[s];a&&(this.propEventSubscriptions[r]=this.on(r,a))}this.prevMotionValues=$k(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const o=this.values.get(t);n!==o&&(o&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let o=this.values.get(t);return o===void 0&&n!==void 0&&(o=fi(n===null?void 0:n,{owner:this}),this.addValue(t,o)),o}readValue(t,n){var o;let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(o=this.getBaseTargetFromProps(this.props,t))!==null&&o!==void 0?o:this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(qg(r)||Vg(r))?r=parseFloat(r):!Lk(r)&&oo.test(n)&&(r=Hg(t,n)),this.setBaseTarget(t,At(r)?r.get():r)),At(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:o}=this.props;let r;if(typeof o=="string"||typeof o=="object"){const a=Hc(this.props,o,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(r=a[t])}if(o&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!At(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new ou),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class O0 extends Wk{constructor(){super(...arguments),this.KeyframeResolver=nb}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:o}){delete n[t],delete o[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;At(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Gk(e){return window.getComputedStyle(e)}class zk extends O0{constructor(){super(...arguments),this.type="html",this.renderInstance=ug}readValueFromInstance(t,n){if(yo.has(n)){const o=pu(n);return o&&o.default||0}else{const o=Gk(t),r=(jc(n)?o.getPropertyValue(n):o[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Hb(t,n)}build(t,n,o){_c(t,n,o.transformTemplate)}scrapeMotionValuesFromProps(t,n,o){return Uc(t,n,o)}}class Hk extends O0{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=mt,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&cg(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(yo.has(n)){const o=pu(n);return o&&o.default||0}return n=dg.has(n)?n:Bc(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,o){return fg(t,n,o)}onBindTransform(){this.current&&!this.renderState.dimensions&&Qe.postRender(this.updateDimensions)}build(t,n,o){Gc(t,n,this.isSVGTag,o.transformTemplate)}renderInstance(t,n,o,r){pg(t,n,o,r)}mount(t){this.isSVGTag=zc(t.tagName),super.mount(t)}}const Xk=(e,t)=>Wc(e)?new Hk(t):new zk(t,{allowProjection:e!==M.Fragment}),Uk=vP({...mM,...Bk,...Ik,...Fk},Xk),Vn=BO(Uk),ju=({styles:e,label:t,hasFooter:n=!1,showCheckBox:o=!1,options:r,defaultValue:s=!0,isMulti:a=!1,handleSelectClick:l,handleCheckboxChange:c})=>{var T,I;const u=ut(),[d,p]=M.useState(!1),[h,g]=M.useState(s?(T=r==null?void 0:r[0])==null?void 0:T.label:"Select option"),[m,f]=M.useState(r||[]);((I=m==null?void 0:m.filter(y=>!(y!=null&&y.isMandatory)))==null?void 0:I.length)>7,M.useRef(null),M.useRef(null),M.useCallback(y=>{let w=[...m];w=w==null?void 0:w.map(A=>(A==null?void 0:A.key)===y?{...A,hidden:!A.hidden}:A),f(w),p(!0)},[m]),M.useCallback(()=>{},[m]);const b=()=>{},v=()=>{},S=M.useRef(null);return M.useEffect(()=>{const y=w=>{S.current&&!S.current.contains(w.target)&&p(!1)};return document.addEventListener("mousedown",y),()=>{document.removeEventListener("mousedown",y)}},[]),x.jsx(Te,{ref:S,sx:{position:"relative",flexShrink:0},children:x.jsx(Te,{position:"absolute",top:0,zIndex:10,children:x.jsxs(Vn.div,{style:{position:"relative",maxHeight:"3rem",border:`0.1rem solid ${u.palette.primary.notifyBorderColor}`,borderRadius:"0.7rem",color:u.palette.primary.notifyTextColor,backgroundColor:u.palette.primary.notifyBackground,overflow:"hidden",width:"max-content"},animate:{maxHeight:d?"15rem":"3rem"},transition:{duration:.2,ease:"easeInOut"},children:[x.jsxs(Te,{sx:{padding:"0.65rem",display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",gap:"0.5rem"},onClick:()=>p(!d),children:[x.jsx(Te,{component:"img",className:"select-icon",src:e==null?void 0:e.icon,sx:{cursor:"pointer"}}),x.jsx(Ut,{sx:{color:u.palette.primary.notifyTextColor,flex:1,fontSize:"1.1rem"},children:t||h}),x.jsx(Te,{component:"img",className:"child",src:d?kt.ArrowSelectDown:kt.ArrowSelectUp,sx:{cursor:"pointer"}})]}),d&&x.jsx("hr",{style:{width:"100%",height:"0.1rem",backgroundColor:u.palette.primary.notifyBorderColor,border:"none",margin:"0rem"}}),x.jsx(Vn.ul,{style:{listStyle:"none",padding:"0rem 1rem 0.8rem 1rem",margin:0,opacity:d?1:0,visibility:d?"visible":"hidden",maxHeight:"10rem",overflowY:"auto",scrollbarWidth:"thin",scrollbarColor:`${u.palette.primary.notifyIconColor} transparent`},initial:{opacity:0},animate:{opacity:d?1:0},transition:{duration:.3,ease:"easeInOut"},children:r==null?void 0:r.map((y,w)=>x.jsxs("li",{style:{padding:o?"0.4rem 0":"0.2rem 0.4rem",cursor:"pointer",display:"flex",alignItems:"center",color:u.palette.primary.notifyTextColor,backgroundColor:u.palette.primary.notifyBackground},onClick:()=>{g(y==null?void 0:y.label),!a&&p(!1),!o&&l(y)},children:[o&&x.jsx(tc,{size:"medium",sx:{color:u.palette.primary.notifyIconColor,"&.Mui-checked":{color:u.palette.brandColor.orange},p:"0.2rem 0.5rem"},checked:!(y!=null&&y.isHidden),onChange:A=>c(y,A.target.checked)}),x.jsx(Ut,{sx:{fontSize:"1.1rem"},children:y==null?void 0:y.label})]},w))}),n&&d&&x.jsxs(Vn.div,{style:{display:"flex",flexDirection:"row",padding:"0.5rem 1rem",justifyContent:"space-between",borderTop:`0.1rem solid ${u.palette.primary.notifyBorderColor}`,position:"sticky",bottom:0,opacity:d?1:0,visibility:d?"visible":"hidden"},initial:{opacity:0},animate:{opacity:d?1:0},transition:{duration:.3,ease:"easeInOut"},children:[x.jsx(Vn.button,{onClick:b,style:{textTransform:"none",padding:"0.4rem",background:"transparent",color:u.palette.primary.notifyTextColor,fontSize:"1.1rem",border:"none",cursor:"pointer"},children:"Apply"}),x.jsx(Vn.button,{onClick:v,style:{textTransform:"none",padding:"0.4rem",background:"transparent",color:u.palette.primary.notifyTextColor,fontSize:"1.1rem",border:"none",cursor:"pointer"},children:"Cancel"})]})]})})})},P0=({pagination:e})=>{const{selectedPage:t,rowPerPage:n,totalRecords:o,onPageChange:r,onPageSizeChange:s}=e,a=ut();return x.jsxs(Te,{sx:{display:"flex",p:"1rem 2rem"},children:[x.jsxs(Te,{sx:{zIndex:10,display:"flex",flexDirection:"row",gap:"0.5rem",width:"100%"},children:[x.jsx(Te,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:x.jsx(Ut,{sx:{fontSize:"1.1rem",color:a.palette.primary.notifyTextColor},children:`Showing ${(t-1)*n+1} to ${t*n} of ${o} rows`})}),x.jsx(Te,{sx:{display:"flex",flexDirection:"row",gap:"0.5rem",justifyContent:"space-between"},children:x.jsx(Te,{sx:{display:"flex",flexDirection:"row",width:"5.2rem"},children:x.jsx(ju,{options:IO,handleSelectClick:s})})}),x.jsx(Te,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:x.jsx(Ut,{sx:{fontSize:"1.1rem",color:a.palette.primary.notifyTextColor},children:"records per page"})})]}),x.jsx(hc,{count:Math.ceil(o/n),page:t,onChange:(l,c)=>{r(c)},shape:"rounded",sx:{width:"100%","& .MuiPagination-ul":{width:"100%",display:"flex",justifyContent:"flex-end","& li:first-of-type":{border:`0.1rem solid ${a.palette.primary.notifyBorderColor}`,color:a.palette.primary.notifyActiveText,marginRight:"1.5rem",borderRadius:"1rem",width:"3rem",height:"3rem",justifyContent:"center",alignItems:"center",display:"flex"},"& li:last-child":{border:`0.1rem solid ${a.palette.primary.notifyBorderColor}`,color:a.palette.primary.notifyActiveText,marginLeft:"1.5rem",borderRadius:"1rem",width:"3rem",height:"3rem",justifyContent:"center",alignItems:"center",display:"flex"}},"& .MuiPaginationItem-root":{color:"#595959",fontSize:"1.1rem",borderRadius:"1rem",width:"3rem",height:"3rem",justifyContent:"center",alignItems:"center",display:"flex","& .MuiSvgIcon-root":{fontSize:"2.2rem"}},"& .Mui-selected":{color:a.palette.primary.notifyActiveText,backgroundColor:a.palette.primary.notifyButtonBackground}}})]})};P0.propTypes={pagination:i.object.isRequired};const N0=({menuOpen:e,handleClose:t,onHideClick:n})=>{const o=ut();return x.jsx(pc,{open:!!e,anchorEl:e,onClose:t,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:x.jsx(Te,{sx:{p:"0.4rem 1rem",backgroundColor:o.palette.primary.notifyBackground,border:`0.1rem solid ${o.palette.primary.notifyBorderColor}`,minHeight:"2.3rem",display:"flex",justifyContent:"center",alignItems:"center"},children:x.jsx(Kl,{onClick:n,sx:{textTransform:"none",fontSize:"1.1rem",p:0,minHeight:"unset",fontWeight:"500",color:o.palette.primary.notifyTextColor},children:"Hide Column"})})})};N0.propTypes={menuOpen:i.object,handleClose:i.func,onHideClick:i.func};const Zk=(e,t)=>{const[n,o]=M.useState({isOpen:!1,column:null}),r=(l,c)=>{o({isOpen:l.currentTarget,column:c})},s=()=>{o({isOpen:!1,column:null})};return{selectedColumn:n,handleMenuClick:r,handleClose:s,handleHideClick:()=>{t({type:Ke.SET_GRID_DATA,payload:{visibleGridColumns:e.map(l=>{var c;return l.key===((c=n==null?void 0:n.column)==null?void 0:c.key)?{...l,isHidden:!0}:l})}}),s()}}},Yk=Y(ii)(()=>({"&:last-child td":{borderBottom:0}}));function Vu({children:e,...t}){return x.jsx(Yk,{...t,children:e})}Vu.propTypes={children:i.node};const Jk=Y(e=>x.jsx(Cc,{...e}))(({theme:e})=>({[`&.${xc.head}`]:{color:e.palette.primary.notifyTextColor,backgroundColor:e.palette.primary.notifyBackground,borderColor:e.palette.primary.notifyBorderColor,padding:"0.3rem 1rem",borderTopLeftRadius:"1.4rem",borderTopRightRadius:"1.4rem",textAlign:"center"},[`&.${xc.body}`]:{color:e.palette.primary.notifyTextColor,borderColor:e.palette.primary.notifyBorderColor,padding:"0.5rem 1rem",textAlign:"center"}}));function Lu({children:e,...t}){return x.jsx(Jk,{...t,children:e})}Lu.propTypes={children:i.node};const qk=Y(Vh)(({theme:e})=>({"& .MuiPaper-root":{borderRadius:8,border:`1px solid ${e.palette.primary.notifyBorderColor}`,boxShadow:e.shadows[4],padding:"1rem 1rem 0rem 1rem",backgroundColor:e.palette.primary.notifyBackground}})),Ln=Y(Ut)(({theme:e})=>({color:e.palette.primary.notifyTextColor})),Kk=Y(gm)(({theme:e})=>({width:28,height:16,padding:0,display:"flex","&:active":{"& .MuiSwitch-thumb":{width:15},"& .MuiSwitch-switchBase.Mui-checked":{transform:"translateX(9px)"}},"& .MuiSwitch-switchBase":{padding:2,"&.Mui-checked":{transform:"translateX(12px)",color:"#fff","& + .MuiSwitch-track":{opacity:1,backgroundColor:"#1890ff",...e.applyStyles("dark",{backgroundColor:"#177ddc"})}}},"& .MuiSwitch-thumb":{boxShadow:"0 2px 4px 0 rgb(0 35 11 / 20%)",width:12,height:12,borderRadius:6,transition:e.transitions.create(["width"],{duration:200})},"& .MuiSwitch-track":{borderRadius:16/2,opacity:1,backgroundColor:"rgba(0,0,0,.25)",boxSizing:"border-box",...e.applyStyles("dark",{backgroundColor:"rgba(255,255,255,.35)"})}})),Qk=e=>{const{children:t,value:n,index:o,...r}=e;return x.jsx("div",{role:"tabpanel",hidden:n!==o,...r,children:n===o&&x.jsx(Te,{sx:{pl:"0.5rem",pb:"0.5rem"},children:t})})},eD=Y(ac)(({theme:e})=>({color:e.palette.primary.notifyTextColor,padding:"0.6rem 0",fontSize:"0.9rem",fontWeight:500,"&::before, &::after":{borderColor:`${e.palette.primary.notifyBorderColor}!important`}})),tD=Y(ql)(({theme:e})=>({"& .MuiBadge-badge":{right:3.5,top:2.34,border:`0.1rem solid ${e.palette.primary.notifyBackground}`,padding:"0 1.3px",borderRadius:"50%",backgroundColor:"#D44E40",fontSize:"0.725rem",minWidth:"0.7rem",height:"0.7rem"}}));Y(Nm)(({theme:e})=>({"& .MuiInputBase-root":{height:"3.52rem"},"& .MuiFormLabel-root":{color:`${e.palette.primary.notifyBorderColor} !important`,fontSize:"1rem",marginTop:"0.4rem"},"& label.Mui-focused":{color:e.palette.primary.notifyTextColor},"& .MuiInput-underline:after":{borderBottomColor:e.palette.primary.notifyBorderColor,borderBottomWidth:"0.1rem"},"& .MuiOutlinedInput-root":{"& fieldset":{borderColor:e.palette.primary.notifyBorderColor,borderWidth:"0.1rem"},"&:hover fieldset":{borderColor:e.palette.primary.notifyBorderColor,borderWidth:"0.1rem"},"&.Mui-focused fieldset":{borderColor:e.palette.primary.notifyBorderColor,borderWidth:"0.1rem"}}}));const nD=Y(Pm)(({theme:e})=>({"& .MuiTabs-indicator":{height:"0.1rem",backgroundColor:e.palette.primary.notifyActiveBorderColor}})),oD=Y(bm)(({theme:e})=>({color:"gray","&.Mui-selected":{color:e.palette.primary.notifyActiveBorderColor,fontWeight:"bold"}}));function M0({sort:e,data:t,pagination:n,columns:o}){const r=ut(),{visibleGridColumns:s}=M.useContext(Mm),a=M.useContext(zs),{selectedColumn:l,handleMenuClick:c,handleClose:u,handleHideClick:d}=Zk(s,a),p=o==null?void 0:o.isManageable;return(t==null?void 0:t.length)>0?x.jsxs(x.Fragment,{children:[x.jsx(xm,{sx:{maxHeight:"100%"},children:x.jsxs(vc,{stickyHeader:!0,sx:{backgroundColor:r.palette.primary.notifyBackground,border:`0.1rem solid ${r.palette.primary.notifyBorderColor}`,borderRadius:"1.4rem","& .MuiTableHead-root":{backgroundColor:r.palette.primary.notifyBackground}},children:[x.jsx(Tc,{children:x.jsx(Vu,{children:s.map((g,m)=>{const f=g==null?void 0:g.isHidden,b=g==null?void 0:g.style;return f?null:x.jsx(Lu,{style:b,children:x.jsx(Bm,{column:g,sort:e,handleMenuClick:c,isManageable:p})},m)})})}),x.jsx(yc,{children:t.map((g,m)=>x.jsx(Vu,{children:s.map((f,b)=>{const v=!!(f!=null&&f.cellRenderer);return(f==null?void 0:f.isHidden)?null:x.jsx(Lu,{children:x.jsx(Fm,{isRenderCellContent:v,column:f,row:g},b)},b)})},m))})]})}),x.jsx(P0,{pagination:n}),x.jsx(N0,{menuOpen:l==null?void 0:l.isOpen,handleClose:u,onHideClick:d})]}):x.jsx(Ln,{sx:{textAlign:"center"},children:pn.NRF})}M0.propTypes={sort:i.object,data:i.array,pagination:i.object,columns:i.object};function k0({tableProps:e,mergedColumns:t}){const n=M.useContext(zs);return M.useEffect(()=>{n({type:Ke.SET_GRID_DATA,payload:{visibleGridColumns:t}})},[t,n]),x.jsx(x.Fragment,{children:x.jsx(M0,{...e})})}k0.propTypes={tableProps:i.object.isRequired,mergedColumns:i.array.isRequired};const mr=({styles:e,label:t,...n})=>{const o=ut(),r=(t==null?void 0:t.length)*((t==null?void 0:t.length)>=10?6.5:7.5)+38||0,[s,a]=M.useState(!1);return x.jsxs(Vn.button,{onMouseEnter:()=>(e==null?void 0:e.isAnimate)&&a(!0),onMouseLeave:()=>(e==null?void 0:e.isAnimate)&&a(!1),initial:{width:e!=null&&e.isAnimate||!t?"3rem":`${r/10}rem`,borderRadius:"0.7rem"},animate:{width:e!=null&&e.isAnimate?`${s?r/10:3}rem`:`${t?r/10:3}rem`},transition:{duration:.2,ease:"easeInOut"},style:{height:"3rem",outline:"none",overflow:"hidden",backgroundColor:(e==null?void 0:e.variant)!=="outlined"?(e==null?void 0:e.color)==="secondary"?o.palette.brandColor.blue:o.palette.brandColor.orange:o.palette.primary.notifyBackground,border:(e==null?void 0:e.variant)==="outlined"?`0.1rem solid ${o.palette.primary.notifyBorderColor}`:"none",display:"flex",cursor:"pointer",alignItems:"center",gap:s||!(e!=null&&e.isAnimate)?"0.5rem":0,color:(e==null?void 0:e.variant)==="outlined"?o.palette.primary.notifyActiveText:"white",justifyContent:s?"flex-start":"center",padding:s||!(e!=null&&e.isAnimate)?"1.2rem":"0.8rem",whiteSpace:"nowrap"},layout:!0,...n,children:[(!(e!=null&&e.iconPosition)||(e==null?void 0:e.iconPosition)==="start")&&x.jsx(Te,{component:"img",src:e==null?void 0:e.icon}),t&&x.jsx(Vn.div,{layout:!0,initial:{opacity:0,width:0},animate:{opacity:s||!(e!=null&&e.isAnimate)?1:0,width:s||!(e!=null&&e.isAnimate)?"auto":0},transition:{duration:.2,ease:"easeInOut",delay:s?.1:0},style:{overflow:"hidden",whiteSpace:"nowrap"},children:x.jsx(Ut,{sx:{fontSize:"1.1rem"},children:t})}),(e==null?void 0:e.iconPosition)==="end"&&x.jsx(Te,{component:"img",src:e==null?void 0:e.icon})]})};mr.propTypes={styles:i.object.isRequired,label:i.string};const rD=({...e})=>{const[t,n]=M.useState(!1),o=ut();return x.jsx(Vn.input,{type:"text",onFocus:()=>n(!0),onBlur:()=>n(!1),initial:{width:"10rem",borderRadius:"0.7rem"},animate:{width:t?"13rem":"10rem"},transition:{duration:.3,ease:"easeInOut"},style:{height:"3rem",outline:"none",boxShadow:"none",fontSize:"1.1rem",border:`0.1rem solid ${o.palette.primary.notifyBorderColor}`,backgroundColor:o.palette.primary.notifyBackground,padding:"0rem 1rem",color:o.palette.primary.notifyTextColor,transition:"height 0.1s ease"},...e})},iD=({customTools:e})=>({sortedTools:e==null?void 0:e.sort((n,o)=>n.sequenceId-o.sequenceId)}),sD=e=>{if(!e)return null;const{subAction:t,...n}=e,o=t?"select":"button",r={button:s=>x.jsx(mr,{...s}),select:s=>x.jsx(ju,{...s})};return r[o]?r[o](n):null},D0=({customTools:e})=>{const{sortedTools:t}=iD({customTools:e}),[n,o]=M.useState(!1),r=(t==null?void 0:t.length)>3,l=r?Math.min(t.length,3.45)*45+20:"auto";return x.jsxs(x.Fragment,{children:[n&&x.jsx("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:998}}),x.jsx(Vn.div,{className:"custom-tools-container",initial:{width:l!=="auto"?`${l/10}rem`:l},animate:r&&{width:n?"100%":`${l/10}rem`},transition:{duration:.4,ease:"easeInOut"},style:{height:"3rem",outline:"none",overflow:"hidden",display:"flex",alignItems:"center",gap:"0.5rem",whiteSpace:"nowrap",borderTopRightRadius:"0.8rem",borderBottomRightRadius:"0.8rem",zIndex:999,pointerEvents:n||!r?"auto":"none"},layout:!0,children:t==null?void 0:t.map(c=>x.jsx(Te,{sx:{flexShrink:0,minWidth:"fit-content"},children:sD(c)},c.id))}),r&&x.jsx(Te,{sx:{zIndex:1e3,pointerEvents:"auto"},children:x.jsx(mr,{label:n?"":"More Actions",styles:{icon:n?kt.Cross:kt.More},onClick:()=>o(c=>!c)})})]})};D0.propTypes={customTools:i.array.isRequired};const B0=({defaultTools:e,isManageable:t,customTools:n,mergedColumns:o})=>{var l,c,u,d,p,h,g;const r=o==null?void 0:o.filter(m=>!(m!=null&&m.isMandatory)),s=M.useContext(zs),a=(m,f)=>{const b=[...o].map(v=>v.id===(m==null?void 0:m.id)?{...v,isHidden:!f}:v);s({type:Ke.SET_GRID_DATA,payload:{visibleGridColumns:b}})};return x.jsxs(Te,{sx:{margin:"1rem 0",position:"relative",zIndex:10,display:"flex",flexDirection:"row",gap:"0.5rem",width:"100%"},children:[x.jsxs(Te,{sx:{display:"flex",flexDirection:"row",gap:"0.5rem"},children:[((l=e==null?void 0:e.search)==null?void 0:l.isRequired)&&x.jsx(rD,{...e==null?void 0:e.search}),((c=e==null?void 0:e.refresh)==null?void 0:c.isRequired)&&x.jsx(mr,{...e==null?void 0:e.refresh,styles:{...(u=e==null?void 0:e.refresh)==null?void 0:u.styles,icon:kt.Refresh}})]}),x.jsx(Te,{sx:{display:"flex",flexDirection:"row",gap:"0.5rem",justifyContent:"space-between",flex:1,width:"27rem"},children:x.jsx(Te,{sx:{display:"flex",flexDirection:"row",gap:"0.5rem"},children:t&&x.jsx(ju,{label:"Manage Columns",options:r,isMulti:!0,showCheckBox:!0,handleCheckboxChange:(m,f)=>a(m,f)})})}),x.jsxs(Te,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-end",gap:"0.6rem"},children:[x.jsx(D0,{customTools:n}),((d=e==null?void 0:e.upload)==null?void 0:d.isRequired)&&x.jsx(mr,{...e==null?void 0:e.upload,styles:{...(p=e==null?void 0:e.upload)==null?void 0:p.styles,icon:kt.Upload,color:"secondary",isAnimate:!0}}),((h=e==null?void 0:e.download)==null?void 0:h.isRequired)&&x.jsx(mr,{...e==null?void 0:e.download,styles:{...(g=e==null?void 0:e.download)==null?void 0:g.styles,icon:kt.Download,isAnimate:!0}})]})]})};B0.propTypes={defaultTools:i.object.isRequired,customTools:i.array,isManageable:i.bool,mergedColumns:i.array.isRequired};const aD=({columns:e})=>{const{definitions:t,defaultUserSettings:n,labels:o}=e,r=n.reduce((c,u)=>(c[u.id]=u,c),{}),s=o.reduce((c,u)=>(c[u.id]=u,c),{}),a=[];for(const c of t){const{id:u}=c,d=r[u],p=s[u];let h={...c,...d,...p};a.push(h)}return a.sort((c,u)=>c.sequenceId-u.sequenceId)};function F0({tableProps:e,toolbarProps:t}){var s;const n=(s=e.columns)==null?void 0:s.isManageable,{columns:o}=e,r=aD({columns:o});return x.jsxs(km,{children:[x.jsx(B0,{...t,isManageable:n,mergedColumns:r}),x.jsx(k0,{tableProps:e,mergedColumns:r})]})}F0.propTypes={tableProps:i.object.isRequired,toolbarProps:i.object.isRequired};const j0=({list:e,handleLinkClick:t})=>{const n=ut(),o=({list:r})=>{var s;return(s=r==null?void 0:r.sort((a,l)=>a.order-l.order))==null?void 0:s.map((a,l)=>a!=null&&a.link?x.jsx(uc,{component:"h3",sx:{fontSize:"1rem",cursor:"pointer",color:l===(r==null?void 0:r.length)-1?n.palette.brandColor.orange:n.palette.primary.notifyTextColor},href:a==null?void 0:a.link,underline:"hover",onClick:()=>t(a),children:a==null?void 0:a.title},l):x.jsx(Ut,{component:"h3",sx:{fontSize:"1rem",color:l===(r==null?void 0:r.length)-1?n.palette.brandColor.orange:n.palette.primary.notifyTextColor},children:a==null?void 0:a.title},l))};return x.jsx(Ah,{separator:x.jsx(Te,{component:"img",src:kt.ArrowRight}),children:o({list:e})})};j0.propTypes={list:i.array.isRequired,handleLinkClick:i.func};const V0=({breadcrumbProps:e})=>{const t=ut();return x.jsx(qn,{sx:{background:t.palette.primary.notifyBackground,borderBottom:`0.1rem solid ${t.palette.primary.notifyBorderColor}`,height:"3rem",p:"0 1.4rem"},direction:"row",justifyContent:"space-between",alignItems:"center",children:x.jsx(j0,{...e})})};V0.propTypes={breadcrumbProps:i.object.isRequired};function L0({headerProps:e}){return x.jsx(Ic,{children:x.jsx(V0,{...e})})}L0.propTypes={headerProps:i.object.isRequired};const _u=M.createContext(null),_0=M.createContext(null);function lD({children:e}){const[t,n]=M.useReducer(cD,uD);return x.jsx(_u.Provider,{value:t,children:x.jsx(_0.Provider,{value:n,children:e})})}function cD(e,t){var n;switch(t.type){case Ke.LOADING:return{...e,loading:t.loading};case Ke.SUCCESS:return{...e,data:(n=t.data)==null?void 0:n.sort((o,r)=>new Date(r.createdAt)-new Date(o.createdAt))};case Ke.MARK_ALL_AS_READ:return{...e,isMarkAllAsRead:t.isMarkAllAsRead};case Ke.ERROR:return{...e,error:t.error};default:throw new Error(`${pn.UNHANDLED}: ${t}`)}}const uD={loading:!1,data:[],error:"",isMarkAllAsRead:{count:0,boo:!1}};function $0(e,t){return function(){return e.apply(t,arguments)}}const{toString:dD}=Object.prototype,{getPrototypeOf:$u}=Object,ca=(e=>t=>{const n=dD.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),gn=e=>(e=e.toLowerCase(),t=>ca(t)===e),ua=e=>t=>typeof t===e,{isArray:gr}=Array,Si=ua("undefined");function pD(e){return e!==null&&!Si(e)&&e.constructor!==null&&!Si(e.constructor)&&ln(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const W0=gn("ArrayBuffer");function fD(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&W0(e.buffer),t}const hD=ua("string"),ln=ua("function"),G0=ua("number"),da=e=>e!==null&&typeof e=="object",mD=e=>e===!0||e===!1,pa=e=>{if(ca(e)!=="object")return!1;const t=$u(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},gD=gn("Date"),bD=gn("File"),vD=gn("Blob"),yD=gn("FileList"),xD=e=>da(e)&&ln(e.pipe),CD=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ln(e.append)&&((t=ca(e))==="formdata"||t==="object"&&ln(e.toString)&&e.toString()==="[object FormData]"))},TD=gn("URLSearchParams"),[ED,ID,SD,wD]=["ReadableStream","Request","Response","Headers"].map(gn),AD=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function wi(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let o,r;if(typeof e!="object"&&(e=[e]),gr(e))for(o=0,r=e.length;o<r;o++)t.call(null,e[o],o,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),a=s.length;let l;for(o=0;o<a;o++)l=s[o],t.call(null,e[l],l,e)}}function z0(e,t){t=t.toLowerCase();const n=Object.keys(e);let o=n.length,r;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const H0=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,X0=e=>!Si(e)&&e!==H0;function Wu(){const{caseless:e}=X0(this)&&this||{},t={},n=(o,r)=>{const s=e&&z0(t,r)||r;pa(t[s])&&pa(o)?t[s]=Wu(t[s],o):pa(o)?t[s]=Wu({},o):gr(o)?t[s]=o.slice():t[s]=o};for(let o=0,r=arguments.length;o<r;o++)arguments[o]&&wi(arguments[o],n);return t}const RD=(e,t,n,{allOwnKeys:o}={})=>(wi(t,(r,s)=>{n&&ln(r)?e[s]=$0(r,n):e[s]=r},{allOwnKeys:o}),e),OD=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),PD=(e,t,n,o)=>{e.prototype=Object.create(t.prototype,o),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},ND=(e,t,n,o)=>{let r,s,a;const l={};if(t=t||{},e==null)return t;do{for(r=Object.getOwnPropertyNames(e),s=r.length;s-- >0;)a=r[s],(!o||o(a,e,t))&&!l[a]&&(t[a]=e[a],l[a]=!0);e=n!==!1&&$u(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},MD=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const o=e.indexOf(t,n);return o!==-1&&o===n},kD=e=>{if(!e)return null;if(gr(e))return e;let t=e.length;if(!G0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},DD=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&$u(Uint8Array)),BD=(e,t)=>{const o=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=o.next())&&!r.done;){const s=r.value;t.call(e,s[0],s[1])}},FD=(e,t)=>{let n;const o=[];for(;(n=e.exec(t))!==null;)o.push(n);return o},jD=gn("HTMLFormElement"),VD=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,o,r){return o.toUpperCase()+r}),U0=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),LD=gn("RegExp"),Z0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),o={};wi(n,(r,s)=>{let a;(a=t(r,s,e))!==!1&&(o[s]=a||r)}),Object.defineProperties(e,o)},_D=e=>{Z0(e,(t,n)=>{if(ln(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const o=e[n];if(ln(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},$D=(e,t)=>{const n={},o=r=>{r.forEach(s=>{n[s]=!0})};return gr(e)?o(e):o(String(e).split(t)),n},WD=()=>{},GD=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Gu="abcdefghijklmnopqrstuvwxyz",Y0="0123456789",J0={DIGIT:Y0,ALPHA:Gu,ALPHA_DIGIT:Gu+Gu.toUpperCase()+Y0},zD=(e=16,t=J0.ALPHA_DIGIT)=>{let n="";const{length:o}=t;for(;e--;)n+=t[Math.random()*o|0];return n};function HD(e){return!!(e&&ln(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const XD=e=>{const t=new Array(10),n=(o,r)=>{if(da(o)){if(t.indexOf(o)>=0)return;if(!("toJSON"in o)){t[r]=o;const s=gr(o)?[]:{};return wi(o,(a,l)=>{const c=n(a,r+1);!Si(c)&&(s[l]=c)}),t[r]=void 0,s}}return o};return n(e,0)},UD=gn("AsyncFunction"),W={isArray:gr,isArrayBuffer:W0,isBuffer:pD,isFormData:CD,isArrayBufferView:fD,isString:hD,isNumber:G0,isBoolean:mD,isObject:da,isPlainObject:pa,isReadableStream:ED,isRequest:ID,isResponse:SD,isHeaders:wD,isUndefined:Si,isDate:gD,isFile:bD,isBlob:vD,isRegExp:LD,isFunction:ln,isStream:xD,isURLSearchParams:TD,isTypedArray:DD,isFileList:yD,forEach:wi,merge:Wu,extend:RD,trim:AD,stripBOM:OD,inherits:PD,toFlatObject:ND,kindOf:ca,kindOfTest:gn,endsWith:MD,toArray:kD,forEachEntry:BD,matchAll:FD,isHTMLForm:jD,hasOwnProperty:U0,hasOwnProp:U0,reduceDescriptors:Z0,freezeMethods:_D,toObjectSet:$D,toCamelCase:VD,noop:WD,toFiniteNumber:GD,findKey:z0,global:H0,isContextDefined:X0,ALPHABET:J0,generateString:zD,isSpecCompliantForm:HD,toJSONObject:XD,isAsyncFn:UD,isThenable:e=>e&&(da(e)||ln(e))&&ln(e.then)&&ln(e.catch)};function we(e,t,n,o,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),o&&(this.request=o),r&&(this.response=r)}W.inherits(we,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:W.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const q0=we.prototype,K0={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{K0[e]={value:e}}),Object.defineProperties(we,K0),Object.defineProperty(q0,"isAxiosError",{value:!0}),we.from=(e,t,n,o,r,s)=>{const a=Object.create(q0);return W.toFlatObject(e,a,function(c){return c!==Error.prototype},l=>l!=="isAxiosError"),we.call(a,e.message,t,n,o,r),a.cause=e,a.name=e.name,s&&Object.assign(a,s),a};const ZD=null;function zu(e){return W.isPlainObject(e)||W.isArray(e)}function Q0(e){return W.endsWith(e,"[]")?e.slice(0,-2):e}function ev(e,t,n){return e?e.concat(t).map(function(r,s){return r=Q0(r),!n&&s?"["+r+"]":r}).join(n?".":""):t}function YD(e){return W.isArray(e)&&!e.some(zu)}const JD=W.toFlatObject(W,{},null,function(t){return/^is[A-Z]/.test(t)});function fa(e,t,n){if(!W.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=W.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,b){return!W.isUndefined(b[f])});const o=n.metaTokens,r=n.visitor||d,s=n.dots,a=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&W.isSpecCompliantForm(t);if(!W.isFunction(r))throw new TypeError("visitor must be a function");function u(m){if(m===null)return"";if(W.isDate(m))return m.toISOString();if(!c&&W.isBlob(m))throw new we("Blob is not supported. Use a Buffer instead.");return W.isArrayBuffer(m)||W.isTypedArray(m)?c&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function d(m,f,b){let v=m;if(m&&!b&&typeof m=="object"){if(W.endsWith(f,"{}"))f=o?f:f.slice(0,-2),m=JSON.stringify(m);else if(W.isArray(m)&&YD(m)||(W.isFileList(m)||W.endsWith(f,"[]"))&&(v=W.toArray(m)))return f=Q0(f),v.forEach(function(T,I){!(W.isUndefined(T)||T===null)&&t.append(a===!0?ev([f],I,s):a===null?f:f+"[]",u(T))}),!1}return zu(m)?!0:(t.append(ev(b,f,s),u(m)),!1)}const p=[],h=Object.assign(JD,{defaultVisitor:d,convertValue:u,isVisitable:zu});function g(m,f){if(!W.isUndefined(m)){if(p.indexOf(m)!==-1)throw Error("Circular reference detected in "+f.join("."));p.push(m),W.forEach(m,function(v,S){(!(W.isUndefined(v)||v===null)&&r.call(t,v,W.isString(S)?S.trim():S,f,h))===!0&&g(v,f?f.concat(S):[S])}),p.pop()}}if(!W.isObject(e))throw new TypeError("data must be an object");return g(e),t}function tv(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(o){return t[o]})}function Hu(e,t){this._pairs=[],e&&fa(e,this,t)}const nv=Hu.prototype;nv.append=function(t,n){this._pairs.push([t,n])},nv.toString=function(t){const n=t?function(o){return t.call(this,o,tv)}:tv;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function qD(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ov(e,t,n){if(!t)return e;const o=n&&n.encode||qD,r=n&&n.serialize;let s;if(r?s=r(t,n):s=W.isURLSearchParams(t)?t.toString():new Hu(t,n).toString(o),s){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class rv{constructor(){this.handlers=[]}use(t,n,o){return this.handlers.push({fulfilled:t,rejected:n,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){W.forEach(this.handlers,function(o){o!==null&&t(o)})}}const iv={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},KD={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Hu,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Xu=typeof window<"u"&&typeof document<"u",QD=(e=>Xu&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),eB=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",tB=Xu&&window.location.href||"http://localhost",bn={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Xu,hasStandardBrowserEnv:QD,hasStandardBrowserWebWorkerEnv:eB,origin:tB},Symbol.toStringTag,{value:"Module"})),...KD};function nB(e,t){return fa(e,new bn.classes.URLSearchParams,Object.assign({visitor:function(n,o,r,s){return bn.isNode&&W.isBuffer(n)?(this.append(o,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function oB(e){return W.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function rB(e){const t={},n=Object.keys(e);let o;const r=n.length;let s;for(o=0;o<r;o++)s=n[o],t[s]=e[s];return t}function sv(e){function t(n,o,r,s){let a=n[s++];if(a==="__proto__")return!0;const l=Number.isFinite(+a),c=s>=n.length;return a=!a&&W.isArray(r)?r.length:a,c?(W.hasOwnProp(r,a)?r[a]=[r[a],o]:r[a]=o,!l):((!r[a]||!W.isObject(r[a]))&&(r[a]=[]),t(n,o,r[a],s)&&W.isArray(r[a])&&(r[a]=rB(r[a])),!l)}if(W.isFormData(e)&&W.isFunction(e.entries)){const n={};return W.forEachEntry(e,(o,r)=>{t(oB(o),r,n,0)}),n}return null}function iB(e,t,n){if(W.isString(e))try{return(t||JSON.parse)(e),W.trim(e)}catch(o){if(o.name!=="SyntaxError")throw o}return(n||JSON.stringify)(e)}const Ai={transitional:iv,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const o=n.getContentType()||"",r=o.indexOf("application/json")>-1,s=W.isObject(t);if(s&&W.isHTMLForm(t)&&(t=new FormData(t)),W.isFormData(t))return r?JSON.stringify(sv(t)):t;if(W.isArrayBuffer(t)||W.isBuffer(t)||W.isStream(t)||W.isFile(t)||W.isBlob(t)||W.isReadableStream(t))return t;if(W.isArrayBufferView(t))return t.buffer;if(W.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(s){if(o.indexOf("application/x-www-form-urlencoded")>-1)return nB(t,this.formSerializer).toString();if((l=W.isFileList(t))||o.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return fa(l?{"files[]":t}:t,c&&new c,this.formSerializer)}}return s||r?(n.setContentType("application/json",!1),iB(t)):t}],transformResponse:[function(t){const n=this.transitional||Ai.transitional,o=n&&n.forcedJSONParsing,r=this.responseType==="json";if(W.isResponse(t)||W.isReadableStream(t))return t;if(t&&W.isString(t)&&(o&&!this.responseType||r)){const a=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(l){if(a)throw l.name==="SyntaxError"?we.from(l,we.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:bn.classes.FormData,Blob:bn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};W.forEach(["delete","get","head","post","put","patch"],e=>{Ai.headers[e]={}});const sB=W.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),aB=e=>{const t={};let n,o,r;return e&&e.split(`
241
241
  `).forEach(function(a){r=a.indexOf(":"),n=a.substring(0,r).trim().toLowerCase(),o=a.substring(r+1).trim(),!(!n||t[n]&&sB[n])&&(n==="set-cookie"?t[n]?t[n].push(o):t[n]=[o]:t[n]=t[n]?t[n]+", "+o:o)}),t},av=Symbol("internals");function Ri(e){return e&&String(e).trim().toLowerCase()}function ha(e){return e===!1||e==null?e:W.isArray(e)?e.map(ha):String(e)}function lB(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=n.exec(e);)t[o[1]]=o[2];return t}const cB=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Uu(e,t,n,o,r){if(W.isFunction(o))return o.call(this,t,n);if(r&&(t=n),!!W.isString(t)){if(W.isString(o))return t.indexOf(o)!==-1;if(W.isRegExp(o))return o.test(t)}}function uB(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,o)=>n.toUpperCase()+o)}function dB(e,t){const n=W.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(e,o+n,{value:function(r,s,a){return this[o].call(this,t,r,s,a)},configurable:!0})})}class Wt{constructor(t){t&&this.set(t)}set(t,n,o){const r=this;function s(l,c,u){const d=Ri(c);if(!d)throw new Error("header name must be a non-empty string");const p=W.findKey(r,d);(!p||r[p]===void 0||u===!0||u===void 0&&r[p]!==!1)&&(r[p||c]=ha(l))}const a=(l,c)=>W.forEach(l,(u,d)=>s(u,d,c));if(W.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(W.isString(t)&&(t=t.trim())&&!cB(t))a(aB(t),n);else if(W.isHeaders(t))for(const[l,c]of t.entries())s(c,l,o);else t!=null&&s(n,t,o);return this}get(t,n){if(t=Ri(t),t){const o=W.findKey(this,t);if(o){const r=this[o];if(!n)return r;if(n===!0)return lB(r);if(W.isFunction(n))return n.call(this,r,o);if(W.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ri(t),t){const o=W.findKey(this,t);return!!(o&&this[o]!==void 0&&(!n||Uu(this,this[o],o,n)))}return!1}delete(t,n){const o=this;let r=!1;function s(a){if(a=Ri(a),a){const l=W.findKey(o,a);l&&(!n||Uu(o,o[l],l,n))&&(delete o[l],r=!0)}}return W.isArray(t)?t.forEach(s):s(t),r}clear(t){const n=Object.keys(this);let o=n.length,r=!1;for(;o--;){const s=n[o];(!t||Uu(this,this[s],s,t,!0))&&(delete this[s],r=!0)}return r}normalize(t){const n=this,o={};return W.forEach(this,(r,s)=>{const a=W.findKey(o,s);if(a){n[a]=ha(r),delete n[s];return}const l=t?uB(s):String(s).trim();l!==s&&delete n[s],n[l]=ha(r),o[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return W.forEach(this,(o,r)=>{o!=null&&o!==!1&&(n[r]=t&&W.isArray(o)?o.join(", "):o)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
242
242
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const o=new this(t);return n.forEach(r=>o.set(r)),o}static accessor(t){const o=(this[av]=this[av]={accessors:{}}).accessors,r=this.prototype;function s(a){const l=Ri(a);o[l]||(dB(r,a),o[l]=!0)}return W.isArray(t)?t.forEach(s):s(t),this}}Wt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),W.reduceDescriptors(Wt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[n]=o}}}),W.freezeMethods(Wt);function Zu(e,t){const n=this||Ai,o=t||n,r=Wt.from(o.headers);let s=o.data;return W.forEach(e,function(l){s=l.call(n,s,r.normalize(),t?t.status:void 0)}),r.normalize(),s}function lv(e){return!!(e&&e.__CANCEL__)}function br(e,t,n){we.call(this,e??"canceled",we.ERR_CANCELED,t,n),this.name="CanceledError"}W.inherits(br,we,{__CANCEL__:!0});function cv(e,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?e(n):t(new we("Request failed with status code "+n.status,[we.ERR_BAD_REQUEST,we.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function pB(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function fB(e,t){e=e||10;const n=new Array(e),o=new Array(e);let r=0,s=0,a;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),d=o[s];a||(a=u),n[r]=c,o[r]=u;let p=s,h=0;for(;p!==r;)h+=n[p++],p=p%e;if(r=(r+1)%e,r===s&&(s=(s+1)%e),u-a<t)return;const g=d&&u-d;return g?Math.round(h*1e3/g):void 0}}function hB(e,t){let n=0;const o=1e3/t;let r=null;return function(){const a=this===!0,l=Date.now();if(a||l-n>o)return r&&(clearTimeout(r),r=null),n=l,e.apply(null,arguments);r||(r=setTimeout(()=>(r=null,n=Date.now(),e.apply(null,arguments)),o-(l-n)))}}const ma=(e,t,n=3)=>{let o=0;const r=fB(50,250);return hB(s=>{const a=s.loaded,l=s.lengthComputable?s.total:void 0,c=a-o,u=r(c),d=a<=l;o=a;const p={loaded:a,total:l,progress:l?a/l:void 0,bytes:c,rate:u||void 0,estimated:u&&l&&d?(l-a)/u:void 0,event:s,lengthComputable:l!=null};p[t?"download":"upload"]=!0,e(p)},n)},mB=bn.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let o;function r(s){let a=s;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return o=r(window.location.href),function(a){const l=W.isString(a)?r(a):a;return l.protocol===o.protocol&&l.host===o.host}}():function(){return function(){return!0}}(),gB=bn.hasStandardBrowserEnv?{write(e,t,n,o,r,s){const a=[e+"="+encodeURIComponent(t)];W.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),W.isString(o)&&a.push("path="+o),W.isString(r)&&a.push("domain="+r),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function bB(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function vB(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function uv(e,t){return e&&!bB(t)?vB(e,t):t}const dv=e=>e instanceof Wt?{...e}:e;function Io(e,t){t=t||{};const n={};function o(u,d,p){return W.isPlainObject(u)&&W.isPlainObject(d)?W.merge.call({caseless:p},u,d):W.isPlainObject(d)?W.merge({},d):W.isArray(d)?d.slice():d}function r(u,d,p){if(W.isUndefined(d)){if(!W.isUndefined(u))return o(void 0,u,p)}else return o(u,d,p)}function s(u,d){if(!W.isUndefined(d))return o(void 0,d)}function a(u,d){if(W.isUndefined(d)){if(!W.isUndefined(u))return o(void 0,u)}else return o(void 0,d)}function l(u,d,p){if(p in t)return o(u,d);if(p in e)return o(void 0,u)}const c={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:l,headers:(u,d)=>r(dv(u),dv(d),!0)};return W.forEach(Object.keys(Object.assign({},e,t)),function(d){const p=c[d]||r,h=p(e[d],t[d],d);W.isUndefined(h)&&p!==l||(n[d]=h)}),n}const pv=e=>{const t=Io({},e);let{data:n,withXSRFToken:o,xsrfHeaderName:r,xsrfCookieName:s,headers:a,auth:l}=t;t.headers=a=Wt.from(a),t.url=ov(uv(t.baseURL,t.url),e.params,e.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let c;if(W.isFormData(n)){if(bn.hasStandardBrowserEnv||bn.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((c=a.getContentType())!==!1){const[u,...d]=c?c.split(";").map(p=>p.trim()).filter(Boolean):[];a.setContentType([u||"multipart/form-data",...d].join("; "))}}if(bn.hasStandardBrowserEnv&&(o&&W.isFunction(o)&&(o=o(t)),o||o!==!1&&mB(t.url))){const u=r&&s&&gB.read(s);u&&a.set(r,u)}return t},yB=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,o){const r=pv(e);let s=r.data;const a=Wt.from(r.headers).normalize();let{responseType:l}=r,c;function u(){r.cancelToken&&r.cancelToken.unsubscribe(c),r.signal&&r.signal.removeEventListener("abort",c)}let d=new XMLHttpRequest;d.open(r.method.toUpperCase(),r.url,!0),d.timeout=r.timeout;function p(){if(!d)return;const g=Wt.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),f={data:!l||l==="text"||l==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:g,config:e,request:d};cv(function(v){n(v),u()},function(v){o(v),u()},f),d=null}"onloadend"in d?d.onloadend=p:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(p)},d.onabort=function(){d&&(o(new we("Request aborted",we.ECONNABORTED,r,d)),d=null)},d.onerror=function(){o(new we("Network Error",we.ERR_NETWORK,r,d)),d=null},d.ontimeout=function(){let m=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const f=r.transitional||iv;r.timeoutErrorMessage&&(m=r.timeoutErrorMessage),o(new we(m,f.clarifyTimeoutError?we.ETIMEDOUT:we.ECONNABORTED,r,d)),d=null},s===void 0&&a.setContentType(null),"setRequestHeader"in d&&W.forEach(a.toJSON(),function(m,f){d.setRequestHeader(f,m)}),W.isUndefined(r.withCredentials)||(d.withCredentials=!!r.withCredentials),l&&l!=="json"&&(d.responseType=r.responseType),typeof r.onDownloadProgress=="function"&&d.addEventListener("progress",ma(r.onDownloadProgress,!0)),typeof r.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",ma(r.onUploadProgress)),(r.cancelToken||r.signal)&&(c=g=>{d&&(o(!g||g.type?new br(null,e,d):g),d.abort(),d=null)},r.cancelToken&&r.cancelToken.subscribe(c),r.signal&&(r.signal.aborted?c():r.signal.addEventListener("abort",c)));const h=pB(r.url);if(h&&bn.protocols.indexOf(h)===-1){o(new we("Unsupported protocol "+h+":",we.ERR_BAD_REQUEST,e));return}d.send(s||null)})},xB=(e,t)=>{let n=new AbortController,o;const r=function(c){if(!o){o=!0,a();const u=c instanceof Error?c:this.reason;n.abort(u instanceof we?u:new br(u instanceof Error?u.message:u))}};let s=t&&setTimeout(()=>{r(new we(`timeout ${t} of ms exceeded`,we.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(c=>{c&&(c.removeEventListener?c.removeEventListener("abort",r):c.unsubscribe(r))}),e=null)};e.forEach(c=>c&&c.addEventListener&&c.addEventListener("abort",r));const{signal:l}=n;return l.unsubscribe=a,[l,()=>{s&&clearTimeout(s),s=null}]},CB=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let o=0,r;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},TB=async function*(e,t,n){for await(const o of e)yield*CB(ArrayBuffer.isView(o)?o:await n(String(o)),t)},fv=(e,t,n,o,r)=>{const s=TB(e,t,r);let a=0;return new ReadableStream({type:"bytes",async pull(l){const{done:c,value:u}=await s.next();if(c){l.close(),o();return}let d=u.byteLength;n&&n(a+=d),l.enqueue(new Uint8Array(u))},cancel(l){return o(l),s.return()}},{highWaterMark:2})},hv=(e,t)=>{const n=e!=null;return o=>setTimeout(()=>t({lengthComputable:n,total:e,loaded:o}))},ga=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",mv=ga&&typeof ReadableStream=="function",Yu=ga&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),EB=mv&&(()=>{let e=!1;const t=new Request(bn.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})(),gv=64*1024,Ju=mv&&!!(()=>{try{return W.isReadableStream(new Response("").body)}catch{}})(),ba={stream:Ju&&(e=>e.body)};ga&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!ba[t]&&(ba[t]=W.isFunction(e[t])?n=>n[t]():(n,o)=>{throw new we(`Response type '${t}' is not supported`,we.ERR_NOT_SUPPORT,o)})})})(new Response);const IB=async e=>{if(e==null)return 0;if(W.isBlob(e))return e.size;if(W.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(W.isArrayBufferView(e))return e.byteLength;if(W.isURLSearchParams(e)&&(e=e+""),W.isString(e))return(await Yu(e)).byteLength},SB=async(e,t)=>{const n=W.toFiniteNumber(e.getContentLength());return n??IB(t)},qu={http:ZD,xhr:yB,fetch:ga&&(async e=>{let{url:t,method:n,data:o,signal:r,cancelToken:s,timeout:a,onDownloadProgress:l,onUploadProgress:c,responseType:u,headers:d,withCredentials:p="same-origin",fetchOptions:h}=pv(e);u=u?(u+"").toLowerCase():"text";let[g,m]=r||s||a?xB([r,s],a):[],f,b;const v=()=>{!f&&setTimeout(()=>{g&&g.unsubscribe()}),f=!0};let S;try{if(c&&EB&&n!=="get"&&n!=="head"&&(S=await SB(d,o))!==0){let w=new Request(t,{method:"POST",body:o,duplex:"half"}),A;W.isFormData(o)&&(A=w.headers.get("content-type"))&&d.setContentType(A),w.body&&(o=fv(w.body,gv,hv(S,ma(c)),null,Yu))}W.isString(p)||(p=p?"cors":"omit"),b=new Request(t,{...h,signal:g,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:o,duplex:"half",withCredentials:p});let T=await fetch(b);const I=Ju&&(u==="stream"||u==="response");if(Ju&&(l||I)){const w={};["status","statusText","headers"].forEach(R=>{w[R]=T[R]});const A=W.toFiniteNumber(T.headers.get("content-length"));T=new Response(fv(T.body,gv,l&&hv(A,ma(l,!0)),I&&v,Yu),w)}u=u||"text";let y=await ba[W.findKey(ba,u)||"text"](T,e);return!I&&v(),m&&m(),await new Promise((w,A)=>{cv(w,A,{data:y,headers:Wt.from(T.headers),status:T.status,statusText:T.statusText,config:e,request:b})})}catch(T){throw v(),T&&T.name==="TypeError"&&/fetch/i.test(T.message)?Object.assign(new we("Network Error",we.ERR_NETWORK,e,b),{cause:T.cause||T}):we.from(T,T&&T.code,e,b)}})};W.forEach(qu,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const bv=e=>`- ${e}`,wB=e=>W.isFunction(e)||e===null||e===!1,vv={getAdapter:e=>{e=W.isArray(e)?e:[e];const{length:t}=e;let n,o;const r={};for(let s=0;s<t;s++){n=e[s];let a;if(o=n,!wB(n)&&(o=qu[(a=String(n)).toLowerCase()],o===void 0))throw new we(`Unknown adapter '${a}'`);if(o)break;r[a||"#"+s]=o}if(!o){const s=Object.entries(r).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=t?s.length>1?`since :
243
243
  `+s.map(bv).join(`