@3sc/common-component 0.0.94 → 0.0.95

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"?kl(Be(e.palette.divider,1),.88):Nl(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",[`&.${Pc.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})),Mc=T.forwardRef(function(t,n){const o=Te({props:t,name:"MuiTableCell"}),{align:r="inherit",className:s,component:a,padding:c,scope:l,size:u,sortDirection:d,variant:p}=o,f=ne(o,HO),g=T.useContext(Rc),m=T.useContext(pi),h=m&&m.variant==="head";let b;a?b=a:b=h?"th":"td";let x=l;b==="td"?x=void 0:!x&&h&&(x="col");const S=p||m&&m.variant,E=C({},o,{align:r,component:b,padding:c||(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=XO(E);let v=null;return d&&(v=d==="asc"?"ascending":"descending"),y.jsx(UO,C({as:b,ref:n,className:re(I.root,s),"aria-sort":v,scope:x,ownerState:E},f))});process.env.NODE_ENV!=="production"&&(Mc.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 YO(e){return ye("MuiTableContainer",e)}xe("MuiTableContainer",["root"]);const ZO=["className","component"],JO=e=>{const{classes:t}=e;return Ie({root:["root"]},YO,t)},qO=Z("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),Sm=T.forwardRef(function(t,n){const o=Te({props:t,name:"MuiTableContainer"}),{className:r,component:s="div"}=o,a=ne(o,ZO),c=C({},o,{component:s}),l=JO(c);return y.jsx(qO,C({ref:n,as:s,className:re(l.root,r),ownerState:c},a))});process.env.NODE_ENV!=="production"&&(Sm.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 KO(e){return ye("MuiTableHead",e)}xe("MuiTableHead",["root"]);const QO=["className","component"],eA=e=>{const{classes:t}=e;return Ie({root:["root"]},KO,t)},tA=Z("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),nA={variant:"head"},wm="thead",Nc=T.forwardRef(function(t,n){const o=Te({props:t,name:"MuiTableHead"}),{className:r,component:s=wm}=o,a=ne(o,QO),c=C({},o,{component:s}),l=eA(c);return y.jsx(pi.Provider,{value:nA,children:y.jsx(tA,C({as:s,className:re(l.root,r),ref:n,role:s===wm?null:"rowgroup",ownerState:c},a))})});process.env.NODE_ENV!=="production"&&(Nc.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 oA=nn(y.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),rA=nn(y.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function iA(e){return ye("MuiTableRow",e)}const Rm=xe("MuiTableRow",["root","selected","hover","head","footer"]),sA=["className","component","hover","selected"],aA=e=>{const{classes:t,selected:n,hover:o,head:r,footer:s}=e;return Ie({root:["root",n&&"selected",o&&"hover",r&&"head",s&&"footer"]},iA,t)},lA=Z("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,[`&.${Rm.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Rm.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)}}})),Om="tr",fi=T.forwardRef(function(t,n){const o=Te({props:t,name:"MuiTableRow"}),{className:r,component:s=Om,hover:a=!1,selected:c=!1}=o,l=ne(o,sA),u=T.useContext(pi),d=C({},o,{component:s,hover:a,selected:c,head:u&&u.variant==="head",footer:u&&u.variant==="footer"}),p=aA(d);return y.jsx(lA,C({as:s,ref:n,className:re(p.root,r),role:s===Om?null:"row",ownerState:d},l))});process.env.NODE_ENV!=="production"&&(fi.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 cA(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function uA(e,t,n,o={},r=()=>{}){const{ease:s=cA,duration:a=300}=o;let c=null;const l=t[e];let u=!1;const d=()=>{u=!0},p=f=>{if(u){r(new Error("Animation cancelled"));return}c===null&&(c=f);const g=Math.min(1,(f-c)/a);if(t[e]=s(g)*(n-l)+l,g>=1){requestAnimationFrame(()=>{r(null)});return}requestAnimationFrame(p)};return l===n?(r(new Error("Element already at target position")),d):(requestAnimationFrame(p),d)}const dA=["onChange"],pA={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function Am(e){const{onChange:t}=e,n=ne(e,dA),o=T.useRef(),r=T.useRef(null),s=()=>{o.current=r.current.offsetHeight-r.current.clientHeight};return Sn(()=>{const a=us(()=>{const l=o.current;s(),l!==o.current&&t(o.current)}),c=Fn(r.current);return c.addEventListener("resize",a),()=>{a.clear(),c.removeEventListener("resize",a)}},[t]),T.useEffect(()=>{s(),t(o.current)},[t]),y.jsx("div",C({style:pA},n,{ref:r}))}process.env.NODE_ENV!=="production"&&(Am.propTypes={onChange:i.func.isRequired});function fA(e){return ye("MuiTabScrollButton",e)}const hA=xe("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),mA=["className","slots","slotProps","direction","orientation","disabled"],gA=e=>{const{classes:t,orientation:n,disabled:o}=e;return Ie({root:["root",n,o&&"disabled"]},fA,t)},bA=Z(On,{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,[`&.${hA.disabled}`]:{opacity:0}},e.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}})),Pm=T.forwardRef(function(t,n){var o,r;const s=Te({props:t,name:"MuiTabScrollButton"}),{className:a,slots:c={},slotProps:l={},direction:u}=s,d=ne(s,mA),p=zr(),f=C({isRtl:p},s),g=gA(f),m=(o=c.StartScrollButtonIcon)!=null?o:oA,h=(r=c.EndScrollButtonIcon)!=null?r:rA,b=Lt({elementType:m,externalSlotProps:l.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:f}),x=Lt({elementType:h,externalSlotProps:l.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:f});return y.jsx(bA,C({component:"div",className:re(g.root,a),ref:n,role:null,ownerState:f,tabIndex:null},d,{children:u==="left"?y.jsx(m,C({},b)):y.jsx(h,C({},x))}))});process.env.NODE_ENV!=="production"&&(Pm.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 vA(e){return ye("MuiTabs",e)}const kc=xe("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),yA=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],Mm=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,Nm=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,qs=(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}}},xA=e=>{const{vertical:t,fixed:n,hideScrollbar:o,scrollableX:r,scrollableY:s,centered:a,scrollButtonsHideMobile:c,classes:l}=e;return Ie({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",o&&"hideScrollbar",r&&"scrollableX",s&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",c&&"scrollButtonsHideMobile"],scrollableX:[r&&"scrollableX"],hideScrollbar:[o&&"hideScrollbar"]},vA,l)},CA=Z("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${kc.scrollButtons}`]:t.scrollButtons},{[`& .${kc.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&&{[`& .${kc.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}})),EA=Z("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"})),IA=Z("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"})),TA=Z("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})),SA=Z(Am)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),km={};let Bm=!1;const Dm=T.forwardRef(function(t,n){const o=Te({props:t,name:"MuiTabs"}),r=ot(),s=zr(),{"aria-label":a,"aria-labelledby":c,action:l,centered:u=!1,children:d,className:p,component:f="div",allowScrollButtonsMobile:g=!1,indicatorColor:m="primary",onChange:h,orientation:b="horizontal",ScrollButtonComponent:x=Pm,scrollButtons:S="auto",selectionFollowsFocus:E,slots:I={},slotProps:v={},TabIndicatorProps:R={},TabScrollButtonProps:w={},textColor:O="primary",value:M,variant:P="standard",visibleScrollbar:j=!1}=o,W=ne(o,yA),F=P==="scrollable",L=b==="vertical",_=L?"scrollTop":"scrollLeft",V=L?"top":"left",G=L?"bottom":"right",B=L?"clientHeight":"clientWidth",X=L?"height":"width",k=C({},o,{component:f,allowScrollButtonsMobile:g,indicatorColor:m,orientation:b,vertical:L,scrollButtons:S,textColor:O,variant:P,visibleScrollbar:j,fixed:!F,hideScrollbar:F&&!j,scrollableX:F&&!L,scrollableY:F&&L,centered:u&&!F,scrollButtonsHideMobile:!g}),z=xA(k),Y=Lt({elementType:I.StartScrollButtonIcon,externalSlotProps:v.startScrollButtonIcon,ownerState:k}),Q=Lt({elementType:I.EndScrollButtonIcon,externalSlotProps:v.endScrollButtonIcon,ownerState:k});process.env.NODE_ENV!=="production"&&u&&F&&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]=T.useState(!1),[J,oe]=T.useState(km),[te,ie]=T.useState(!1),[ce,le]=T.useState(!1),[D,ue]=T.useState(!1),[he,be]=T.useState({overflow:"hidden",scrollbarWidth:0}),He=new Map,Xe=T.useRef(null),Ae=T.useRef(null),it=()=>{const q=Xe.current;let se;if(q){const Re=q.getBoundingClientRect();se={clientWidth:q.clientWidth,scrollLeft:q.scrollLeft,scrollTop:q.scrollTop,scrollLeftNormalized:WC(q,s?"rtl":"ltr"),scrollWidth:q.scrollWidth,top:Re.top,bottom:Re.bottom,left:Re.left,right:Re.right}}let Se;if(q&&M!==!1){const Re=Ae.current.children;if(Re.length>0){const tt=Re[He.get(M)];process.env.NODE_ENV!=="production"&&(tt||console.error(["MUI: The `value` provided to the Tabs component is invalid.",`None of the Tabs' children match with "${M}".`,He.keys?`You can provide one of the following values: ${Array.from(He.keys()).join(", ")}.`:null].join(`
238
238
  `))),Se=tt?tt.getBoundingClientRect():null,process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&!Bm&&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\` ("${M}") 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
  `)),Bm=!0)}}return{tabsMeta:se,tabMeta:Se}},Ve=vn(()=>{const{tabsMeta:q,tabMeta:se}=it();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 at=s?q.scrollLeftNormalized+q.clientWidth-q.scrollWidth:q.scrollLeft;Se=(s?-1:1)*(se[Re]-q[Re]+at)}const tt={[Re]:Se,[X]:se?se[X]:0};if(isNaN(J[Re])||isNaN(J[X]))oe(tt);else{const at=Math.abs(J[Re]-tt[Re]),Mt=Math.abs(J[X]-tt[X]);(at>=1||Mt>=1)&&oe(tt)}}),Me=(q,{animation:se=!0}={})=>{se?uA(_,Xe.current,q,{duration:r.transitions.duration.standard}):Xe.current[_]=q},qe=q=>{let se=Xe.current[_];L?se+=q:(se+=q*(s?-1:1),se*=s&&uf()==="reverse"?-1:1),Me(se)},Qe=()=>{const q=Xe.current[B];let se=0;const Se=Array.from(Ae.current.children);for(let Re=0;Re<Se.length;Re+=1){const tt=Se[Re];if(se+tt[B]>q){Re===0&&(se=q);break}se+=tt[B]}return se},ke=()=>{qe(-1*Qe())},st=()=>{qe(Qe())},bt=T.useCallback(q=>{be({overflow:null,scrollbarWidth:q})},[]),vt=()=>{const q={};q.scrollbarSizeListener=F?y.jsx(SA,{onChange:bt,className:re(z.scrollableX,z.hideScrollbar)}):null;const Se=F&&(S==="auto"&&(te||ce)||S===!0);return q.scrollButtonStart=Se?y.jsx(x,C({slots:{StartScrollButtonIcon:I.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:Y},orientation:b,direction:s?"right":"left",onClick:ke,disabled:!te},w,{className:re(z.scrollButtons,w.className)})):null,q.scrollButtonEnd=Se?y.jsx(x,C({slots:{EndScrollButtonIcon:I.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:Q},orientation:b,direction:s?"left":"right",onClick:st,disabled:!ce},w,{className:re(z.scrollButtons,w.className)})):null,q},Oe=vn(q=>{const{tabsMeta:se,tabMeta:Se}=it();if(!(!Se||!se)){if(Se[V]<se[V]){const Re=se[_]+(Se[V]-se[V]);Me(Re,{animation:q})}else if(Se[G]>se[G]){const Re=se[_]+(Se[G]-se[G]);Me(Re,{animation:q})}}}),fe=vn(()=>{F&&S!==!1&&ue(!D)});T.useEffect(()=>{const q=us(()=>{Xe.current&&Ve()});let se;const Se=at=>{at.forEach(Mt=>{Mt.removedNodes.forEach(hn=>{var zt;(zt=se)==null||zt.unobserve(hn)}),Mt.addedNodes.forEach(hn=>{var zt;(zt=se)==null||zt.observe(hn)})}),q(),fe()},Re=Fn(Xe.current);Re.addEventListener("resize",q);let tt;return typeof ResizeObserver<"u"&&(se=new ResizeObserver(q),Array.from(Ae.current.children).forEach(at=>{se.observe(at)})),typeof MutationObserver<"u"&&(tt=new MutationObserver(Se),tt.observe(Ae.current,{childList:!0})),()=>{var at,Mt;q.clear(),Re.removeEventListener("resize",q),(at=tt)==null||at.disconnect(),(Mt=se)==null||Mt.disconnect()}},[Ve,fe]),T.useEffect(()=>{const q=Array.from(Ae.current.children),se=q.length;if(typeof IntersectionObserver<"u"&&se>0&&F&&S!==!1){const Se=q[0],Re=q[se-1],tt={root:Xe.current,threshold:.99},at=io=>{ie(!io[0].isIntersecting)},Mt=new IntersectionObserver(at,tt);Mt.observe(Se);const hn=io=>{le(!io[0].isIntersecting)},zt=new IntersectionObserver(hn,tt);return zt.observe(Re),()=>{Mt.disconnect(),zt.disconnect()}}},[F,S,D,d==null?void 0:d.length]),T.useEffect(()=>{ee(!0)},[]),T.useEffect(()=>{Ve()}),T.useEffect(()=>{Oe(km!==J)},[Oe,J]),T.useImperativeHandle(l,()=>({updateIndicator:Ve,updateScrollButtons:fe}),[Ve,fe]);const et=y.jsx(TA,C({},R,{className:re(z.indicator,R.className),ownerState:k,style:C({},J,R.style)}));let At=0;const Pt=T.Children.map(d,q=>{if(!T.isValidElement(q))return null;process.env.NODE_ENV!=="production"&&po.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?At:q.props.value;He.set(se,At);const Se=se===M;return At+=1,T.cloneElement(q,C({fullWidth:P==="fullWidth",indicator:Se&&!U&&et,selected:Se,selectionFollowsFocus:E,onChange:h,textColor:O,value:se},At===1&&M===!1&&!q.props.tabIndex?{tabIndex:0}:{}))}),fn=q=>{const se=Ae.current,Se=St(se).activeElement;if(Se.getAttribute("role")!=="tab")return;let tt=b==="horizontal"?"ArrowLeft":"ArrowUp",at=b==="horizontal"?"ArrowRight":"ArrowDown";switch(b==="horizontal"&&s&&(tt="ArrowRight",at="ArrowLeft"),q.key){case tt:q.preventDefault(),qs(se,Se,Nm);break;case at:q.preventDefault(),qs(se,Se,Mm);break;case"Home":q.preventDefault(),qs(se,null,Mm);break;case"End":q.preventDefault(),qs(se,null,Nm);break}},pe=vt();return y.jsxs(CA,C({className:re(z.root,p),ownerState:k,ref:n,as:f},W,{children:[pe.scrollButtonStart,pe.scrollbarSizeListener,y.jsxs(EA,{className:z.scroller,ownerState:k,style:{overflow:he.overflow,[L?`margin${s?"Left":"Right"}`:"marginBottom"]:j?void 0:-he.scrollbarWidth},ref:Xe,children:[y.jsx(IA,{"aria-label":a,"aria-labelledby":c,"aria-orientation":b==="vertical"?"vertical":null,className:z.flexContainer,ownerState:k,onKeyDown:fn,ref:Ae,role:"tablist",children:Pt}),U&&et]}),pe.scrollButtonEnd]}))});process.env.NODE_ENV!=="production"&&(Dm.propTypes={action:kt,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 wA(e){return ye("MuiTextField",e)}xe("MuiTextField",["root"]);const RA=["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"],OA={standard:Xs,filled:Hs,outlined:Ys},AA=e=>{const{classes:t}=e;return Ie({root:["root"]},wA,t)},PA=Z(Wh,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),jm=T.forwardRef(function(t,n){const o=Te({props:t,name:"MuiTextField"}),{autoComplete:r,autoFocus:s=!1,children:a,className:c,color:l="primary",defaultValue:u,disabled:d=!1,error:p=!1,FormHelperTextProps:f,fullWidth:g=!1,helperText:m,id:h,InputLabelProps:b,inputProps:x,InputProps:S,inputRef:E,label:I,maxRows:v,minRows:R,multiline:w=!1,name:O,onBlur:M,onChange:P,onFocus:j,placeholder:W,required:F=!1,rows:L,select:_=!1,SelectProps:V,type:G,value:B,variant:X="outlined"}=o,k=ne(o,RA),z=C({},o,{autoFocus:s,color:l,disabled:d,error:p,fullWidth:g,multiline:w,required:F,select:_,variant:X}),Y=AA(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=ds(h),ee=m&&U?`${U}-helper-text`:void 0,J=I&&U?`${U}-label`:void 0,oe=OA[X],te=y.jsx(oe,C({"aria-describedby":ee,autoComplete:r,autoFocus:s,defaultValue:u,fullWidth:g,multiline:w,name:O,rows:L,maxRows:v,minRows:R,type:G,value:B,id:U,inputRef:E,onBlur:M,onChange:P,onFocus:j,placeholder:W,inputProps:x},Q,S));return y.jsxs(PA,C({className:re(Y.root,c),disabled:d,error:p,fullWidth:g,ref:n,required:F,color:l,variant:X,ownerState:z},k,{children:[I!=null&&I!==""&&y.jsx(Zh,C({htmlFor:U,id:J},b,{children:I})),_?y.jsx(wc,C({"aria-describedby":ee,id:U,labelId:J,value:B,input:te},V,{children:a})):te,m&&y.jsx(Xh,C({id:ee},f,{children:m}))]}))});process.env.NODE_ENV!=="production"&&(jm.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:kt,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 MA={light:bs({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",red:"#E85353",main:"#FF6D33",grey3:"#898A93"}},typography:{fontFamily:"Euclid Circular Regular, sans-serif",fontSize:12,fontWeightMedium:"bold",fontWeightRegular:"lighter"},components:{MuiDrawer:{defaultProps:{disableRipple:!0}}}}),dark:bs({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",red:"#E85353",grey3:"#898A93"}},typography:{fontFamily:"Euclid Circular Regular, sans-serif",fontSize:12,fontWeightMedium:"bold",fontWeightRegular:"lighter"},components:{MuiDrawer:{defaultProps:{disableRipple:!0}}}})};function Ks({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 y.jsx(Xf,{theme:MA[t],children:e})}const Fm=N.createContext(null),Qs=N.createContext(null);function Vm({children:e}){const[t,n]=N.useReducer(NA,kA);return y.jsx(Fm.Provider,{value:t,children:y.jsx(Qs.Provider,{value:n,children:y.jsx(Ks,{children:e})})})}function NA(e,t){switch(t.type){case Je.SET_GRID_DATA:return{...e,...t.payload};default:throw new Error(`${bn.UNHANDLED}: ${t}`)}}const kA={visibleGridColumns:[]};Vm.propTypes={children:i.node.isRequired};const BA=(e,t)=>{const[n,o]=N.useState({isOpen:!1,column:null}),r=(c,l)=>{o({isOpen:c.currentTarget,column:l})},s=()=>{o({isOpen:!1,column:null})};return{selectedColumn:n,handleMenuClick:r,handleClose:s,handleHideClick:()=>{t({type:Je.SET_GRID_DATA,payload:{visibleGridColumns:e.map(c=>{var l;return c.key===((l=n==null?void 0:n.column)==null?void 0:l.key)?{...c,isHidden:!0}:c})}}),s()}}},ea={TOKEN:"token",USER:"user",SNOP:"snop",SELECTED_BU:"selected_business_unit"},Lm={BEARER:"Bearer",TENANT_ID:"tenant_id",BU_ID:"bu_id",SNOP_ID:"snop_id"},ta={REFRESH:"refresh",CLOSE:"close"},DA=Object.values({"SKU Name":"sku_name",Node:"node","Channel Name":"channel_name"}),$m=[10,25,50,100],_m={MARK_ALL_READ:"MARK_ALL_READ"},jA=$m.map(e=>({label:e,value:e})),Gm=N.createContext({});function FA(e){const t=N.useRef(null);return t.current===null&&(t.current=e()),t.current}const Bc=N.createContext(null),Wm=N.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function VA(e=!0){const t=N.useContext(Bc);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:o,register:r}=t,s=N.useId();N.useEffect(()=>{if(e)return r(s)},[e]);const a=N.useCallback(()=>e&&o&&o(s),[s,o,e]);return!n&&o?[!1,a]:[!0]}const Dc=typeof window<"u",LA=Dc?N.useLayoutEffect:N.useEffect,Gt=e=>e;let lr=Gt,eo=Gt;process.env.NODE_ENV!=="production"&&(lr=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},eo=(e,t)=>{if(!e)throw new Error(t)});function jc(e){let t;return()=>(t===void 0&&(t=e()),t)}const cr=(e,t,n)=>{const o=t-e;return o===0?1:(n-e)/o},Mn=e=>e*1e3,Ln=e=>e/1e3,$A={useManualTiming:!1},na=["read","resolveKeyframes","update","preRender","render","postRender"],zm={value:null};function _A(e,t){let n=new Set,o=new Set,r=!1,s=!1;const a=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1},l=0;function u(p){a.has(p)&&(d.schedule(p),e()),l++,p(c)}const d={schedule:(p,f=!1,g=!1)=>{const h=g&&r?n:o;return f&&a.add(p),h.has(p)||h.add(p),p},cancel:p=>{o.delete(p),a.delete(p)},process:p=>{if(c=p,r){s=!0;return}r=!0,[n,o]=[o,n],n.forEach(u),t&&zm.value&&zm.value.frameloop[t].push(l),l=0,n.clear(),r=!1,s&&(s=!1,d.process(p))}};return d}const GA=40;function Hm(e,t){let n=!1,o=!0;const r={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,a=na.reduce((x,S)=>(x[S]=_A(s,t?S:void 0),x),{}),{read:c,resolveKeyframes:l,update:u,preRender:d,render:p,postRender:f}=a,g=()=>{const x=performance.now();n=!1,r.delta=o?1e3/60:Math.max(Math.min(x-r.timestamp,GA),1),r.timestamp=x,r.isProcessing=!0,c.process(r),l.process(r),u.process(r),d.process(r),p.process(r),f.process(r),r.isProcessing=!1,n&&t&&(o=!1,e(g))},m=()=>{n=!0,o=!0,r.isProcessing||e(g)};return{schedule:na.reduce((x,S)=>{const E=a[S];return x[S]=(I,v=!1,R=!1)=>(n||m(),E.schedule(I,v,R)),x},{}),cancel:x=>{for(let S=0;S<na.length;S++)a[na[S]].cancel(x)},state:r,steps:a}}const{schedule:Ke,cancel:to,state:Ct,steps:Fc}=Hm(typeof requestAnimationFrame<"u"?requestAnimationFrame:Gt,!0),Xm=N.createContext({strict:!1}),Um={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"]},ur={};for(const e in Um)ur[e]={isEnabled:t=>Um[e].some(n=>!!t[n])};function WA(e){for(const t in e)ur[t]={...ur[t],...e[t]}}const zA=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 oa(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||zA.has(e)}let Ym=e=>!oa(e);function HA(e){e&&(Ym=t=>t.startsWith("on")?!oa(t):e(t))}try{HA(require("@emotion/is-prop-valid").default)}catch{}function XA(e,t,n){const o={};for(const r in e)r==="values"&&typeof e.values=="object"||(Ym(r)||n===!0&&oa(r)||!t&&!oa(r)||e.draggable&&r.startsWith("onDrag"))&&(o[r]=e[r]);return o}const Zm=new Set;function ra(e,t,n){e||Zm.has(t)||(console.warn(t),Zm.add(t))}function UA(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...o)=>(process.env.NODE_ENV!=="production"&&ra(!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 ia=N.createContext({});function sa(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function hi(e){return typeof e=="string"||Array.isArray(e)}const Vc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Lc=["initial",...Vc];function aa(e){return sa(e.animate)||Lc.some(t=>hi(e[t]))}function Jm(e){return!!(aa(e)||e.variants)}function YA(e,t){if(aa(e)){const{initial:n,animate:o}=e;return{initial:n===!1||hi(n)?n:void 0,animate:hi(o)?o:void 0}}return e.inherit!==!1?t:{}}function ZA(e){const{initial:t,animate:n}=YA(e,N.useContext(ia));return N.useMemo(()=>({initial:t,animate:n}),[qm(t),qm(n)])}function qm(e){return Array.isArray(e)?e.join(" "):e}const JA=Symbol.for("motionComponentSymbol");function dr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function qA(e,t,n){return N.useCallback(o=>{o&&e.onMount&&e.onMount(o),t&&(o?t.mount(o):t.unmount()),n&&(typeof n=="function"?n(o):dr(n)&&(n.current=o))},[t])}const $c=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Km="data-"+$c("framerAppearId"),{schedule:_c}=Hm(queueMicrotask,!1),Qm=N.createContext({});function KA(e,t,n,o,r){var s,a;const{visualElement:c}=N.useContext(ia),l=N.useContext(Xm),u=N.useContext(Bc),d=N.useContext(Wm).reducedMotion,p=N.useRef(null);o=o||l.renderer,!p.current&&o&&(p.current=o(e,{visualState:t,parent:c,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d}));const f=p.current,g=N.useContext(Qm);f&&!f.projection&&r&&(f.type==="html"||f.type==="svg")&&QA(p.current,n,r,g);const m=N.useRef(!1);N.useInsertionEffect(()=>{f&&m.current&&f.update(n,u)});const h=n[Km],b=N.useRef(!!h&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,h))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,h)));return LA(()=>{f&&(m.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),_c.render(f.render),b.current&&f.animationState&&f.animationState.animateChanges())}),N.useEffect(()=>{f&&(!b.current&&f.animationState&&f.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)===null||x===void 0||x.call(window,h)}),b.current=!1))}),f}function QA(e,t,n,o){const{layoutId:r,layout:s,drag:a,dragConstraints:c,layoutScroll:l,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:eg(e.parent)),e.projection.setOptions({layoutId:r,layout:s,alwaysMeasureLayout:!!a||c&&dr(c),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:o,layoutScroll:l,layoutRoot:u})}function eg(e){if(e)return e.options.allowProjection!==!1?e.projection:eg(e.parent)}function eP({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:o,Component:r}){var s,a;e&&WA(e);function c(u,d){let p;const f={...N.useContext(Wm),...u,layoutId:tP(u)},{isStatic:g}=f,m=ZA(u),h=o(u,g);if(!g&&Dc){nP(f,e);const b=oP(f);p=b.MeasureLayout,m.visualElement=KA(r,h,f,t,b.ProjectionNode)}return y.jsxs(ia.Provider,{value:m,children:[p&&m.visualElement?y.jsx(p,{visualElement:m.visualElement,...f}):null,n(r,u,qA(h,m.visualElement,d),h,g,m.visualElement)]})}c.displayName=`motion.${typeof r=="string"?r:`create(${(a=(s=r.displayName)!==null&&s!==void 0?s:r.name)!==null&&a!==void 0?a:""})`}`;const l=N.forwardRef(c);return l[JA]=r,l}function tP({layoutId:e}){const t=N.useContext(Gm).id;return t&&e!==void 0?t+"-"+e:e}function nP(e,t){const n=N.useContext(Xm).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?lr(!1,o):eo(!1,o)}}function oP(e){const{drag:t,layout:n}=ur;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 tg=e=>t=>typeof t=="string"&&t.startsWith(e),Gc=tg("--"),rP=tg("var(--"),Wc=e=>rP(e)?iP.test(e.split("/*")[0].trim()):!1,iP=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,mi={};function sP(e){for(const t in e)mi[t]=e[t],Gc(t)&&(mi[t].isCSSVariable=!0)}const pr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Eo=new Set(pr);function ng(e,{layout:t,layoutId:n}){return Eo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!mi[e]||e==="opacity")}const wt=e=>!!(e&&e.getVelocity),og=(e,t)=>t&&typeof e=="number"?t.transform(e):e,$n=(e,t,n)=>n>t?t:n<e?e:n,fr={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},gi={...fr,transform:e=>$n(0,1,e)},la={...fr,default:1},bi=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),no=bi("deg"),Nn=bi("%"),Ce=bi("px"),aP=bi("vh"),lP=bi("vw"),rg={...Nn,parse:e=>Nn.parse(e)/100,transform:e=>Nn.transform(e*100)},cP={borderWidth:Ce,borderTopWidth:Ce,borderRightWidth:Ce,borderBottomWidth:Ce,borderLeftWidth:Ce,borderRadius:Ce,radius:Ce,borderTopLeftRadius:Ce,borderTopRightRadius:Ce,borderBottomRightRadius:Ce,borderBottomLeftRadius:Ce,width:Ce,maxWidth:Ce,height:Ce,maxHeight:Ce,top:Ce,right:Ce,bottom:Ce,left:Ce,padding:Ce,paddingTop:Ce,paddingRight:Ce,paddingBottom:Ce,paddingLeft:Ce,margin:Ce,marginTop:Ce,marginRight:Ce,marginBottom:Ce,marginLeft:Ce,backgroundPositionX:Ce,backgroundPositionY:Ce},uP={rotate:no,rotateX:no,rotateY:no,rotateZ:no,scale:la,scaleX:la,scaleY:la,scaleZ:la,skew:no,skewX:no,skewY:no,distance:Ce,translateX:Ce,translateY:Ce,translateZ:Ce,x:Ce,y:Ce,z:Ce,perspective:Ce,transformPerspective:Ce,opacity:gi,originX:rg,originY:rg,originZ:Ce},ig={...fr,transform:Math.round},zc={...cP,...uP,zIndex:ig,size:Ce,fillOpacity:gi,strokeOpacity:gi,numOctaves:ig},dP={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},pP=pr.length;function fP(e,t,n){let o="",r=!0;for(let s=0;s<pP;s++){const a=pr[s],c=e[a];if(c===void 0)continue;let l=!0;if(typeof c=="number"?l=c===(a.startsWith("scale")?1:0):l=parseFloat(c)===0,!l||n){const u=og(c,zc[a]);if(!l){r=!1;const d=dP[a]||a;o+=`${d}(${u}) `}n&&(t[a]=u)}}return o=o.trim(),n?o=n(t,r?"":o):r&&(o="none"),o}function Hc(e,t,n){const{style:o,vars:r,transformOrigin:s}=e;let a=!1,c=!1;for(const l in t){const u=t[l];if(Eo.has(l)){a=!0;continue}else if(Gc(l)){r[l]=u;continue}else{const d=og(u,zc[l]);l.startsWith("origin")?(c=!0,s[l]=d):o[l]=d}}if(t.transform||(a||n?o.transform=fP(t,e.transform,n):o.transform&&(o.transform="none")),c){const{originX:l="50%",originY:u="50%",originZ:d=0}=s;o.transformOrigin=`${l} ${u} ${d}`}}const Xc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function sg(e,t,n){for(const o in t)!wt(t[o])&&!ng(o,n)&&(e[o]=t[o])}function hP({transformTemplate:e},t){return N.useMemo(()=>{const n=Xc();return Hc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function mP(e,t){const n=e.style||{},o={};return sg(o,n,e),Object.assign(o,hP(e,t)),o}function gP(e,t){const n={},o=mP(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 bP=["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 Uc(e){return typeof e!="string"||e.includes("-")?!1:!!(bP.indexOf(e)>-1||/[A-Z]/u.test(e))}const vP={offset:"stroke-dashoffset",array:"stroke-dasharray"},yP={offset:"strokeDashoffset",array:"strokeDasharray"};function xP(e,t,n=1,o=0,r=!0){e.pathLength=1;const s=r?vP:yP;e[s.offset]=Ce.transform(-o);const a=Ce.transform(t),c=Ce.transform(n);e[s.array]=`${a} ${c}`}function ag(e,t,n){return typeof e=="string"?e:Ce.transform(t+n*e)}function CP(e,t,n){const o=ag(t,e.x,e.width),r=ag(n,e.y,e.height);return`${o} ${r}`}function Yc(e,{attrX:t,attrY:n,attrScale:o,originX:r,originY:s,pathLength:a,pathSpacing:c=1,pathOffset:l=0,...u},d,p){if(Hc(e,u,p),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:g,dimensions:m}=e;f.transform&&(m&&(g.transform=f.transform),delete f.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&&(f.x=t),n!==void 0&&(f.y=n),o!==void 0&&(f.scale=o),a!==void 0&&xP(f,a,c,l,!1)}const lg=()=>({...Xc(),attrs:{}}),Zc=e=>typeof e=="string"&&e.toLowerCase()==="svg";function EP(e,t,n,o){const r=N.useMemo(()=>{const s=lg();return Yc(s,t,Zc(o),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};sg(s,e.style,e),r.style={...s,...r.style}}return r}function IP(e=!1){return(n,o,r,{latestValues:s},a)=>{const l=(Uc(n)?EP:gP)(o,s,a,n),u=XA(o,typeof n=="string",e),d=n!==N.Fragment?{...u,...l,ref:r}:{},{children:p}=o,f=N.useMemo(()=>wt(p)?p.get():p,[p]);return N.createElement(n,{...d,children:f})}}function cg(e){const t=[{},{}];return e==null||e.values.forEach((n,o)=>{t[0][o]=n.get(),t[1][o]=n.getVelocity()}),t}function Jc(e,t,n,o){if(typeof t=="function"){const[r,s]=cg(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]=cg(o);t=t(n!==void 0?n:e.custom,r,s)}return t}const qc=e=>Array.isArray(e),TP=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),SP=e=>qc(e)?e[e.length-1]||0:e;function ca(e){const t=wt(e)?e.get():e;return TP(t)?t.toValue():t}function wP({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},o,r,s){const a={latestValues:RP(o,r,s,e),renderState:t()};return n&&(a.onMount=c=>n({props:o,current:c,...a}),a.onUpdate=c=>n(c)),a}const ug=e=>(t,n)=>{const o=N.useContext(ia),r=N.useContext(Bc),s=()=>wP(e,t,o,r);return n?s():FA(s)};function RP(e,t,n,o){const r={},s=o(e,{});for(const f in s)r[f]=ca(s[f]);let{initial:a,animate:c}=e;const l=aa(e),u=Jm(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),c===void 0&&(c=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const p=d?c:a;if(p&&typeof p!="boolean"&&!sa(p)){const f=Array.isArray(p)?p:[p];for(let g=0;g<f.length;g++){const m=Jc(e,f[g]);if(m){const{transitionEnd:h,transition:b,...x}=m;for(const S in x){let E=x[S];if(Array.isArray(E)){const I=d?E.length-1:0;E=E[I]}E!==null&&(r[S]=E)}for(const S in h)r[S]=h[S]}}}return r}function Kc(e,t,n){var o;const{style:r}=e,s={};for(const a in r)(wt(r[a])||t.style&&wt(t.style[a])||ng(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 OP={useVisualState:ug({scrapeMotionValuesFromProps:Kc,createRenderState:Xc})};function dg(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 pg(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 fg=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 hg(e,t,n,o){pg(e,t,void 0,o);for(const r in t.attrs)e.setAttribute(fg.has(r)?r:$c(r),t.attrs[r])}function mg(e,t,n){const o=Kc(e,t,n);for(const r in e)if(wt(e[r])||wt(t[r])){const s=pr.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;o[s]=e[r]}return o}const gg=["x","y","width","height","cx","cy","r"],AP={useVisualState:ug({scrapeMotionValuesFromProps:mg,createRenderState:lg,onUpdate:({props:e,prevProps:t,current:n,renderState:o,latestValues:r})=>{if(!n)return;let s=!!e.drag;if(!s){for(const c in r)if(Eo.has(c)){s=!0;break}}if(!s)return;let a=!t;if(t)for(let c=0;c<gg.length;c++){const l=gg[c];e[l]!==t[l]&&(a=!0)}a&&Ke.read(()=>{dg(n,o),Ke.render(()=>{Yc(o,r,Zc(n.tagName),e.transformTemplate),hg(n,o)})})}})};function PP(e,t){return function(o,{forwardMotionProps:r}={forwardMotionProps:!1}){const a={...Uc(o)?AP:OP,preloadedFeatures:e,useRender:IP(r),createVisualElement:t,Component:o};return eP(a)}}function vi(e,t,n){const o=e.getProps();return Jc(o,t,n!==void 0?n:o.custom,e)}const MP=jc(()=>window.ScrollTimeline!==void 0);class NP{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(MP()&&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 kP extends NP{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function Qc(e,t){return e?e[t]||e.default||e:void 0}const eu=2e4;function bg(e){let t=0;const n=50;let o=e.next(t);for(;!o.done&&t<eu;)t+=n,o=e.next(t);return t>=eu?1/0:t}function tu(e){return typeof e=="function"}function vg(e,t){e.timeline=t,e.onfinish=null}const nu=e=>Array.isArray(e)&&typeof e[0]=="number",BP={linearEasing:void 0};function DP(e,t){const n=jc(e);return()=>{var o;return(o=BP[t])!==null&&o!==void 0?o:n()}}const ua=DP(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),yg=(e,t,n=10)=>{let o="";const r=Math.max(Math.round(t/n),2);for(let s=0;s<r;s++)o+=e(cr(0,r-1,s))+", ";return`linear(${o.substring(0,o.length-2)})`};function xg(e){return!!(typeof e=="function"&&ua()||!e||typeof e=="string"&&(e in ou||ua())||nu(e)||Array.isArray(e)&&e.every(xg))}const yi=([e,t,n,o])=>`cubic-bezier(${e}, ${t}, ${n}, ${o})`,ou={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:yi([0,.65,.55,1]),circOut:yi([.55,0,1,.45]),backIn:yi([.31,.01,.66,-.59]),backOut:yi([.33,1.53,.69,.99])};function Cg(e,t){if(e)return typeof e=="function"&&ua()?yg(e,t):nu(e)?yi(e):Array.isArray(e)?e.map(n=>Cg(n,t)||ou.easeOut):ou[e]}const yn={x:!1,y:!1};function Eg(){return yn.x||yn.y}function jP(e,t,n){var o;if(e instanceof EventTarget)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 Ig(e,t){const n=jP(e),o=new AbortController,r={passive:!0,...t,signal:o.signal};return[n,r,()=>o.abort()]}function Tg(e){return!(e.pointerType==="touch"||Eg())}function FP(e,t,n={}){const[o,r,s]=Ig(e,n),a=c=>{if(!Tg(c))return;const{target:l}=c,u=t(l,c);if(typeof u!="function"||!l)return;const d=p=>{Tg(p)&&(u(p),l.removeEventListener("pointerleave",d))};l.addEventListener("pointerleave",d,r)};return o.forEach(c=>{c.addEventListener("pointerenter",a,r)}),s}function xi(e,t){const n=`${t}PointerCapture`;if(e.target instanceof Element&&n in e.target&&e.pointerId!==void 0)try{e.target[n](e.pointerId)}catch{}}const Sg=(e,t)=>t?e===t?!0:Sg(e,t.parentElement):!1,ru=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,VP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function LP(e){return VP.has(e.tagName)||e.tabIndex!==-1}const Ci=new WeakSet;function wg(e){return t=>{t.key==="Enter"&&e(t)}}function iu(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const $P=(e,t)=>{const n=e.currentTarget;if(!n)return;const o=wg(()=>{if(Ci.has(n))return;iu(n,"down");const r=wg(()=>{iu(n,"up")}),s=()=>iu(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 Rg(e){return ru(e)&&!Eg()}function _P(e,t,n={}){const[o,r,s]=Ig(e,n),a=c=>{const l=c.currentTarget;if(!l||!Rg(c)||Ci.has(l))return;Ci.add(l),xi(c,"set");const u=t(l,c),d=(g,m)=>{l.removeEventListener("pointerup",p),l.removeEventListener("pointercancel",f),xi(g,"release"),!(!Rg(g)||!Ci.has(l))&&(Ci.delete(l),typeof u=="function"&&u(g,{success:m}))},p=g=>{(g.isTrusted?GP(g,l instanceof Element?l.getBoundingClientRect():{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}):!1)?d(g,!1):d(g,!(l instanceof Element)||Sg(l,g.target))},f=g=>{d(g,!1)};l.addEventListener("pointerup",p,r),l.addEventListener("pointercancel",f,r),l.addEventListener("lostpointercapture",f,r)};return o.forEach(c=>{c=n.useGlobalTarget?window:c;let l=!1;c instanceof HTMLElement&&(l=!0,!LP(c)&&c.getAttribute("tabindex")===null&&(c.tabIndex=0)),c.addEventListener("pointerdown",a,r),l&&c.addEventListener("focus",u=>$P(u,r),r)}),s}function GP(e,t){return e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom}function WP(e){return e==="x"||e==="y"?yn[e]?null:(yn[e]=!0,()=>{yn[e]=!1}):yn.x||yn.y?null:(yn.x=yn.y=!0,()=>{yn.x=yn.y=!1})}const Og=new Set(["width","height","top","left","right","bottom",...pr]);let da;function zP(){da=void 0}const kn={now:()=>(da===void 0&&kn.set(Ct.isProcessing||$A.useManualTiming?Ct.timestamp:performance.now()),da),set:e=>{da=e,queueMicrotask(zP)}};function su(e,t){e.indexOf(t)===-1&&e.push(t)}function au(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class lu{constructor(){this.subscriptions=[]}add(t){return su(this.subscriptions,t),()=>au(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 Pg=30,HP=e=>!isNaN(parseFloat(e));class XP{constructor(t,n={}){this.version="12.4.10",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(o,r=!0)=>{const s=kn.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=kn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=HP(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&ra(!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 lu);const o=this.events[t].add(n);return t==="change"?()=>{o(),Ke.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=kn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Pg)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Pg);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 Ei(e,t){return new XP(e,t)}function UP(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ei(n))}function YP(e,t){const n=vi(e,t);let{transitionEnd:o={},transition:r={},...s}=n||{};s={...s,...o};for(const a in s){const c=SP(s[a]);UP(e,a,c)}}function ZP(e){return!!(wt(e)&&e.add)}function cu(e,t){const n=e.getValue("willChange");if(ZP(n))return n.add(t)}function Mg(e){return e.props[Km]}const Ng=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,JP=1e-7,qP=12;function KP(e,t,n,o,r){let s,a,c=0;do a=t+(n-t)/2,s=Ng(a,o,r)-e,s>0?n=a:t=a;while(Math.abs(s)>JP&&++c<qP);return a}function Ii(e,t,n,o){if(e===t&&n===o)return Gt;const r=s=>KP(s,0,1,e,n);return s=>s===0||s===1?s:Ng(r(s),t,o)}const kg=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Bg=e=>t=>1-e(1-t),Dg=Ii(.33,1.53,.69,.99),uu=Bg(Dg),jg=kg(uu),Fg=e=>(e*=2)<1?.5*uu(e):.5*(2-Math.pow(2,-10*(e-1))),du=e=>1-Math.sin(Math.acos(e)),Vg=Bg(du),Lg=kg(du),$g=e=>/^0[^.\s]+$/u.test(e);function QP(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||$g(e):!0}const Ti=e=>Math.round(e*1e5)/1e5,pu=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function eM(e){return e==null}const tM=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,fu=(e,t)=>n=>!!(typeof n=="string"&&tM.test(n)&&n.startsWith(e)||t&&!eM(n)&&Object.prototype.hasOwnProperty.call(n,t)),_g=(e,t,n)=>o=>{if(typeof o!="string")return o;const[r,s,a,c]=o.match(pu);return{[e]:parseFloat(r),[t]:parseFloat(s),[n]:parseFloat(a),alpha:c!==void 0?parseFloat(c):1}},nM=e=>$n(0,255,e),hu={...fr,transform:e=>Math.round(nM(e))},Io={test:fu("rgb","red"),parse:_g("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:o=1})=>"rgba("+hu.transform(e)+", "+hu.transform(t)+", "+hu.transform(n)+", "+Ti(gi.transform(o))+")"};function oM(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 mu={test:fu("#"),parse:oM,transform:Io.transform},hr={test:fu("hsl","hue"),parse:_g("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:o=1})=>"hsla("+Math.round(e)+", "+Nn.transform(Ti(t))+", "+Nn.transform(Ti(n))+", "+Ti(gi.transform(o))+")"},Rt={test:e=>Io.test(e)||mu.test(e)||hr.test(e),parse:e=>Io.test(e)?Io.parse(e):hr.test(e)?hr.parse(e):mu.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Io.transform(e):hr.transform(e)},rM=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function iM(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(pu))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(rM))===null||n===void 0?void 0:n.length)||0)>0}const Gg="number",Wg="color",sM="var",aM="var(",zg="${}",lM=/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 Si(e){const t=e.toString(),n=[],o={color:[],number:[],var:[]},r=[];let s=0;const c=t.replace(lM,l=>(Rt.test(l)?(o.color.push(s),r.push(Wg),n.push(Rt.parse(l))):l.startsWith(aM)?(o.var.push(s),r.push(sM),n.push(l)):(o.number.push(s),r.push(Gg),n.push(parseFloat(l))),++s,zg)).split(zg);return{values:n,split:c,indexes:o,types:r}}function Hg(e){return Si(e).values}function Xg(e){const{split:t,types:n}=Si(e),o=t.length;return r=>{let s="";for(let a=0;a<o;a++)if(s+=t[a],r[a]!==void 0){const c=n[a];c===Gg?s+=Ti(r[a]):c===Wg?s+=Rt.transform(r[a]):s+=r[a]}return s}}const cM=e=>typeof e=="number"?0:e;function uM(e){const t=Hg(e);return Xg(e)(t.map(cM))}const oo={test:iM,parse:Hg,createTransformer:Xg,getAnimatableNone:uM},dM=new Set(["brightness","contrast","saturate","opacity"]);function pM(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[o]=n.match(pu)||[];if(!o)return e;const r=n.replace(o,"");let s=dM.has(t)?1:0;return o!==n&&(s*=100),t+"("+s+r+")"}const fM=/\b([a-z-]*)\(.*?\)/gu,gu={...oo,getAnimatableNone:e=>{const t=e.match(fM);return t?t.map(pM).join(" "):e}},hM={...zc,color:Rt,backgroundColor:Rt,outlineColor:Rt,fill:Rt,stroke:Rt,borderColor:Rt,borderTopColor:Rt,borderRightColor:Rt,borderBottomColor:Rt,borderLeftColor:Rt,filter:gu,WebkitFilter:gu},bu=e=>hM[e];function Ug(e,t){let n=bu(e);return n!==gu&&(n=oo),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const mM=new Set(["auto","none","0"]);function gM(e,t,n){let o=0,r;for(;o<e.length&&!r;){const s=e[o];typeof s=="string"&&!mM.has(s)&&Si(s).values.length&&(r=e[o]),o++}if(r&&n)for(const s of t)e[s]=Ug(n,r)}const Yg=e=>e===fr||e===Ce,Zg=(e,t)=>parseFloat(e.split(", ")[t]),Jg=(e,t)=>(n,{transform:o})=>{if(o==="none"||!o)return 0;const r=o.match(/^matrix3d\((.+)\)$/u);if(r)return Zg(r[1],t);{const s=o.match(/^matrix\((.+)\)$/u);return s?Zg(s[1],e):0}},bM=new Set(["x","y","z"]),vM=pr.filter(e=>!bM.has(e));function yM(e){const t=[];return vM.forEach(n=>{const o=e.getValue(n);o!==void 0&&(t.push([n,o.get()]),o.set(n.startsWith("scale")?1:0))}),t}const mr={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:Jg(4,13),y:Jg(5,14)};mr.translateX=mr.x,mr.translateY=mr.y;const To=new Set;let vu=!1,yu=!1;function qg(){if(yu){const e=Array.from(To).filter(o=>o.needsMeasurement),t=new Set(e.map(o=>o.element)),n=new Map;t.forEach(o=>{const r=yM(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 c;(c=o.getValue(s))===null||c===void 0||c.set(a)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}yu=!1,vu=!1,To.forEach(e=>e.complete()),To.clear()}function Kg(){To.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(yu=!0)})}function xM(){Kg(),qg()}class xu{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?(To.add(this),vu||(vu=!0,Ke.read(Kg),Ke.resolveKeyframes(qg))):(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(),c=t[t.length-1];if(a!==void 0)t[0]=a;else if(o&&n){const l=o.readValue(n,c);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=c),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),To.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,To.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Qg=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),CM=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function EM(e){const t=CM.exec(e);if(!t)return[,];const[,n,o,r]=t;return[`--${n??o}`,r]}const IM=4;function eb(e,t,n=1){eo(n<=IM,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[o,r]=EM(e);if(!o)return;const s=window.getComputedStyle(t).getPropertyValue(o);if(s){const a=s.trim();return Qg(a)?parseFloat(a):a}return Wc(r)?eb(r,t,n+1):r}const tb=e=>t=>t.test(e),nb=[fr,Ce,Nn,no,lP,aP,{test:e=>e==="auto",parse:e=>e}],ob=e=>nb.find(tb(e));class rb extends xu{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 l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),Wc(u))){const d=eb(u,n.current);d!==void 0&&(t[l]=d),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Og.has(o)||t.length!==2)return;const[r,s]=t,a=ob(r),c=ob(s);if(a!==c)if(Yg(a)&&Yg(c))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,o=[];for(let r=0;r<t.length;r++)QP(t[r])&&o.push(r);o.length&&gM(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=mr[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,c=r[a];r[a]=mr[o](n.measureViewportBox(),window.getComputedStyle(n.current)),c!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=c),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,u])=>{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const ib=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(oo.test(e)||e==="0")&&!e.startsWith("url("));function TM(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 SM(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=ib(r,t),c=ib(s,t);return lr(a===c,`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||!c?!1:TM(e)||(n==="spring"||tu(n))&&o}const wM=e=>e!==null;function pa(e,{repeat:t,repeatType:n="loop"},o){const r=e.filter(wM),s=t&&n!=="loop"&&t%2===1?0:r.length-1;return!s||o===void 0?r[s]:o}const RM=40;class sb{constructor({autoplay:t=!0,delay:n=0,type:o="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:a="loop",...c}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=kn.now(),this.options={autoplay:t,delay:n,type:o,repeat:r,repeatDelay:s,repeatType:a,...c},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>RM?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&xM(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=kn.now(),this.hasAttemptedResolve=!0;const{name:o,type:r,velocity:s,delay:a,onComplete:c,onUpdate:l,isGenerator:u}=this.options;if(!u&&!SM(t,o,r,s))if(a)this.options.duration=0;else{l&&l(pa(t,this.options,n)),c&&c(),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 lt=(e,t,n)=>e+(t-e)*n;function Cu(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 OM({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 c=n<.5?n*(1+t):n+t-n*t,l=2*n-c;r=Cu(l,c,e+1/3),s=Cu(l,c,e),a=Cu(l,c,e-1/3)}return{red:Math.round(r*255),green:Math.round(s*255),blue:Math.round(a*255),alpha:o}}function fa(e,t){return n=>n>0?t:e}const Eu=(e,t,n)=>{const o=e*e,r=n*(t*t-o)+o;return r<0?0:Math.sqrt(r)},AM=[mu,Io,hr],PM=e=>AM.find(t=>t.test(e));function ab(e){const t=PM(e);if(lr(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===hr&&(n=OM(n)),n}const lb=(e,t)=>{const n=ab(e),o=ab(t);if(!n||!o)return fa(e,t);const r={...n};return s=>(r.red=Eu(n.red,o.red,s),r.green=Eu(n.green,o.green,s),r.blue=Eu(n.blue,o.blue,s),r.alpha=lt(n.alpha,o.alpha,s),Io.transform(r))},MM=(e,t)=>n=>t(e(n)),wi=(...e)=>e.reduce(MM),Iu=new Set(["none","hidden"]);function NM(e,t){return Iu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function kM(e,t){return n=>lt(e,t,n)}function Tu(e){return typeof e=="number"?kM:typeof e=="string"?Wc(e)?fa:Rt.test(e)?lb:jM:Array.isArray(e)?cb:typeof e=="object"?Rt.test(e)?lb:BM:fa}function cb(e,t){const n=[...e],o=n.length,r=e.map((s,a)=>Tu(s)(s,t[a]));return s=>{for(let a=0;a<o;a++)n[a]=r[a](s);return n}}function BM(e,t){const n={...e,...t},o={};for(const r in n)e[r]!==void 0&&t[r]!==void 0&&(o[r]=Tu(e[r])(e[r],t[r]));return r=>{for(const s in o)n[s]=o[s](r);return n}}function DM(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],c=e.indexes[a][r[a]],l=(n=e.values[c])!==null&&n!==void 0?n:0;o[s]=l,r[a]++}return o}const jM=(e,t)=>{const n=oo.createTransformer(t),o=Si(e),r=Si(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?Iu.has(e)&&!r.values.length||Iu.has(t)&&!o.values.length?NM(e,t):wi(cb(DM(o,r),r.values),n):(lr(!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.`),fa(e,t))};function ub(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?lt(e,t,n):Tu(e)(e,t)}const FM=5;function db(e,t,n){const o=Math.max(t-FM,0);return Ag(n-e(o),t-o)}const ct={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},pb=.001;function VM({duration:e=ct.duration,bounce:t=ct.bounce,velocity:n=ct.velocity,mass:o=ct.mass}){let r,s;lr(e<=Mn(ct.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=$n(ct.minDamping,ct.maxDamping,a),e=$n(ct.minDuration,ct.maxDuration,Ln(e)),a<1?(r=u=>{const d=u*a,p=d*e,f=d-n,g=Su(u,a),m=Math.exp(-p);return pb-f/g*m},s=u=>{const p=u*a*e,f=p*n+n,g=Math.pow(a,2)*Math.pow(u,2)*e,m=Math.exp(-p),h=Su(Math.pow(u,2),a);return(-r(u)+pb>0?-1:1)*((f-g)*m)/h}):(r=u=>{const d=Math.exp(-u*e),p=(u-n)*e+1;return-.001+d*p},s=u=>{const d=Math.exp(-u*e),p=(n-u)*(e*e);return d*p});const c=5/e,l=$M(r,s,c);if(e=Mn(e),isNaN(l))return{stiffness:ct.stiffness,damping:ct.damping,duration:e};{const u=Math.pow(l,2)*o;return{stiffness:u,damping:a*2*Math.sqrt(o*u),duration:e}}}const LM=12;function $M(e,t,n){let o=n;for(let r=1;r<LM;r++)o=o-e(o)/t(o);return o}function Su(e,t){return e*Math.sqrt(1-t*t)}const _M=["duration","bounce"],GM=["stiffness","damping","mass"];function fb(e,t){return t.some(n=>e[n]!==void 0)}function WM(e){let t={velocity:ct.velocity,stiffness:ct.stiffness,damping:ct.damping,mass:ct.mass,isResolvedFromDuration:!1,...e};if(!fb(e,GM)&&fb(e,_M))if(e.visualDuration){const n=e.visualDuration,o=2*Math.PI/(n*1.2),r=o*o,s=2*$n(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:ct.mass,stiffness:r,damping:s}}else{const n=VM(e);t={...t,...n,mass:ct.mass},t.isResolvedFromDuration=!0}return t}function hb(e=ct.visualDuration,t=ct.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],c={done:!1,value:s},{stiffness:l,damping:u,mass:d,duration:p,velocity:f,isResolvedFromDuration:g}=WM({...n,velocity:-Ln(n.velocity||0)}),m=f||0,h=u/(2*Math.sqrt(l*d)),b=a-s,x=Ln(Math.sqrt(l/d)),S=Math.abs(b)<5;o||(o=S?ct.restSpeed.granular:ct.restSpeed.default),r||(r=S?ct.restDelta.granular:ct.restDelta.default);let E;if(h<1){const v=Su(x,h);E=R=>{const w=Math.exp(-h*x*R);return a-w*((m+h*x*b)/v*Math.sin(v*R)+b*Math.cos(v*R))}}else if(h===1)E=v=>a-Math.exp(-x*v)*(b+(m+x*b)*v);else{const v=x*Math.sqrt(h*h-1);E=R=>{const w=Math.exp(-h*x*R),O=Math.min(v*R,300);return a-w*((m+h*x*b)*Math.sinh(O)+v*b*Math.cosh(O))/v}}const I={calculatedDuration:g&&p||null,next:v=>{const R=E(v);if(g)c.done=v>=p;else{let w=0;h<1&&(w=v===0?Mn(m):db(E,v,R));const O=Math.abs(w)<=o,M=Math.abs(a-R)<=r;c.done=O&&M}return c.value=c.done?a:R,c},toString:()=>{const v=Math.min(bg(I),eu),R=yg(w=>I.next(v*w).value,v,30);return v+"ms "+R}};return I}function mb({keyframes:e,velocity:t=0,power:n=.8,timeConstant:o=325,bounceDamping:r=10,bounceStiffness:s=500,modifyTarget:a,min:c,max:l,restDelta:u=.5,restSpeed:d}){const p=e[0],f={done:!1,value:p},g=O=>c!==void 0&&O<c||l!==void 0&&O>l,m=O=>c===void 0?l:l===void 0||Math.abs(c-O)<Math.abs(l-O)?c:l;let h=n*t;const b=p+h,x=a===void 0?b:a(b);x!==b&&(h=x-p);const S=O=>-h*Math.exp(-O/o),E=O=>x+S(O),I=O=>{const M=S(O),P=E(O);f.done=Math.abs(M)<=u,f.value=f.done?x:P};let v,R;const w=O=>{g(f.value)&&(v=O,R=hb({keyframes:[f.value,m(f.value)],velocity:db(E,O,f.value),damping:r,stiffness:s,restDelta:u,restSpeed:d}))};return w(0),{calculatedDuration:null,next:O=>{let M=!1;return!R&&v===void 0&&(M=!0,I(O),w(O)),v!==void 0&&O>=v?R.next(O-v):(!M&&I(O),f)}}}const zM=Ii(.42,0,1,1),HM=Ii(0,0,.58,1),gb=Ii(.42,0,.58,1),XM=e=>Array.isArray(e)&&typeof e[0]!="number",bb={linear:Gt,easeIn:zM,easeInOut:gb,easeOut:HM,circIn:du,circInOut:Lg,circOut:Vg,backIn:uu,backInOut:jg,backOut:Dg,anticipate:Fg},vb=e=>{if(nu(e)){eo(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,o,r]=e;return Ii(t,n,o,r)}else if(typeof e=="string")return eo(bb[e]!==void 0,`Invalid easing type '${e}'`),bb[e];return e};function UM(e,t,n){const o=[],r=n||ub,s=e.length-1;for(let a=0;a<s;a++){let c=r(e[a],e[a+1]);if(t){const l=Array.isArray(t)?t[a]||Gt:t;c=wi(l,c)}o.push(c)}return o}function YM(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 c=UM(t,o,r),l=c.length,u=d=>{if(a&&d<e[0])return t[0];let p=0;if(l>1)for(;p<e.length-2&&!(d<e[p+1]);p++);const f=cr(e[p],e[p+1],d);return c[p](f)};return n?d=>u($n(e[0],e[s-1],d)):u}function ZM(e,t){const n=e[e.length-1];for(let o=1;o<=t;o++){const r=cr(0,t,o);e.push(lt(n,1,r))}}function JM(e){const t=[0];return ZM(t,e.length-1),t}function qM(e,t){return e.map(n=>n*t)}function KM(e,t){return e.map(()=>t||gb).splice(0,e.length-1)}function Ri({duration:e=300,keyframes:t,times:n,ease:o="easeInOut"}){const r=XM(o)?o.map(vb):vb(o),s={done:!1,value:t[0]},a=qM(n&&n.length===t.length?n:JM(t),e),c=YM(a,t,{ease:Array.isArray(r)?r:KM(t,r)});return{calculatedDuration:e,next:l=>(s.value=c(l),s.done=l>=e,s)}}const QM=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Ke.update(t,!0),stop:()=>to(t),now:()=>Ct.isProcessing?Ct.timestamp:kn.now()}},e3={decay:mb,inertia:mb,tween:Ri,keyframes:Ri,spring:hb},t3=e=>e/100;class wu extends sb{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:l}=this.options;l&&l()};const{name:n,motionValue:o,element:r,keyframes:s}=this.options,a=(r==null?void 0:r.KeyframeResolver)||xu,c=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new a(s,c,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,c=tu(n)?n:e3[n]||Ri;let l,u;process.env.NODE_ENV!=="production"&&c!==Ri&&eo(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),c!==Ri&&typeof t[0]!="number"&&(l=wi(t3,ub(t[0],t[1])),t=[0,100]);const d=c({...this.options,keyframes:t});s==="mirror"&&(u=c({...this.options,keyframes:[...t].reverse(),velocity:-a})),d.calculatedDuration===null&&(d.calculatedDuration=bg(d));const{calculatedDuration:p}=d,f=p+r,g=f*(o+1)-r;return{generator:d,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:p,resolvedDuration:f,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:O}=this.options;return{done:!0,value:O[O.length-1]}}const{finalKeyframe:r,generator:s,mirroredGenerator:a,mapPercentToKeyframes:c,keyframes:l,calculatedDuration:u,totalDuration:d,resolvedDuration:p}=o;if(this.startTime===null)return s.next(0);const{delay:f,repeat:g,repeatType:m,repeatDelay:h,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 x=this.currentTime-f*(this.speed>=0?1:-1),S=this.speed>=0?x<0:x>d;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let E=this.currentTime,I=s;if(g){const O=Math.min(this.currentTime,d)/p;let M=Math.floor(O),P=O%1;!P&&O>=1&&(P=1),P===1&&M--,M=Math.min(M,g+1),!!(M%2)&&(m==="reverse"?(P=1-P,h&&(P-=h/p)):m==="mirror"&&(I=a)),E=$n(0,1,P)*p}const v=S?{done:!1,value:l[0]}:I.next(E);c&&(v.value=c(v.value));let{done:R}=v;!S&&u!==null&&(R=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const w=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&R);return w&&r!==void 0&&(v.value=pa(l,this.options,r)),b&&b(v.value),w&&this.finish(),v}get duration(){const{resolved:t}=this;return t?Ln(t.calculatedDuration):0}get time(){return Ln(this.currentTime)}set time(t){t=Mn(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=Ln(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=QM,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 n3=new Set(["opacity","clipPath","filter","transform"]);function o3(e,t,n,{delay:o=0,duration:r=300,repeat:s=0,repeatType:a="loop",ease:c="easeInOut",times:l}={}){const u={[t]:n};l&&(u.offset=l);const d=Cg(c,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 r3=jc(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ha=10,i3=2e4;function s3(e){return tu(e.type)||e.type==="spring"||!xg(e.ease)}function a3(e,t){const n=new wu({...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<i3;)o=n.sample(s),r.push(o.value),s+=ha;return{times:void 0,keyframes:r,duration:s-ha,ease:"linear"}}const yb={anticipate:Fg,backInOut:jg,circInOut:Lg};function l3(e){return e in yb}class xb extends sb{constructor(t){super(t);const{name:n,motionValue:o,element:r,keyframes:s}=this.options;this.resolver=new rb(s,(a,c)=>this.onKeyframesResolved(a,c),n,o,r),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:o=300,times:r,ease:s,type:a,motionValue:c,name:l,startTime:u}=this.options;if(!c.owner||!c.owner.current)return!1;if(typeof s=="string"&&ua()&&l3(s)&&(s=yb[s]),s3(this.options)){const{onComplete:p,onUpdate:f,motionValue:g,element:m,...h}=this.options,b=a3(t,h);t=b.keyframes,t.length===1&&(t[1]=t[0]),o=b.duration,r=b.times,s=b.ease,a="keyframes"}const d=o3(c.owner.current,l,t,{...this.options,duration:o,times:r,ease:s});return d.startTime=u??this.calcStartTime(),this.pendingTimeline?(vg(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:p}=this.options;c.set(pa(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 Ln(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Ln(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:o}=n;o.currentTime=Mn(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 Gt;const{animation:o}=n;vg(o,t)}return Gt}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:c}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:d,onComplete:p,element:f,...g}=this.options,m=new wu({...g,keyframes:o,duration:r,type:s,ease:a,times:c,isGenerator:!0}),h=Mn(this.time);u.setWithVelocity(m.sample(h-ha).value,m.sample(h).value,ha)}const{onStop:l}=this.options;l&&l(),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:c}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=n.owner.getProps();return r3()&&o&&n3.has(o)&&!l&&!u&&!r&&s!=="mirror"&&a!==0&&c!=="inertia"}}const c3={type:"spring",stiffness:500,damping:25,restSpeed:10},u3=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),d3={type:"keyframes",duration:.8},p3={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},f3=(e,{keyframes:t})=>t.length>2?d3:Eo.has(e)?e.startsWith("scale")?u3(t[1]):c3:p3;function h3({when:e,delay:t,delayChildren:n,staggerChildren:o,staggerDirection:r,repeat:s,repeatType:a,repeatDelay:c,from:l,elapsed:u,...d}){return!!Object.keys(d).length}const Ru=(e,t,n,o={},r,s)=>a=>{const c=Qc(o,e)||{},l=c.delay||o.delay||0;let{elapsed:u=0}=o;u=u-Mn(l);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...c,delay:-u,onUpdate:f=>{t.set(f),c.onUpdate&&c.onUpdate(f)},onComplete:()=>{a(),c.onComplete&&c.onComplete()},name:e,motionValue:t,element:s?void 0:r};h3(c)||(d={...d,...f3(e,d)}),d.duration&&(d.duration=Mn(d.duration)),d.repeatDelay&&(d.repeatDelay=Mn(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 f=pa(d.keyframes,c);if(f!==void 0)return Ke.update(()=>{d.onUpdate(f),d.onComplete()}),new kP([])}return!s&&xb.supports(d)?new xb(d):new wu(d)};function m3({protectedKeys:e,needsAnimating:t},n){const o=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,o}function Cb(e,t,{delay:n=0,transitionOverride:o,type:r}={}){var s;let{transition:a=e.getDefaultTransition(),transitionEnd:c,...l}=t;o&&(a=o);const u=[],d=r&&e.animationState&&e.animationState.getState()[r];for(const p in l){const f=e.getValue(p,(s=e.latestValues[p])!==null&&s!==void 0?s:null),g=l[p];if(g===void 0||d&&m3(d,p))continue;const m={delay:n,...Qc(a||{},p)};let h=!1;if(window.MotionHandoffAnimation){const x=Mg(e);if(x){const S=window.MotionHandoffAnimation(x,p,Ke);S!==null&&(m.startTime=S,h=!0)}}cu(e,p),f.start(Ru(p,f,g,e.shouldReduceMotion&&Og.has(p)?{type:!1}:m,e,h));const b=f.animation;b&&u.push(b)}return c&&Promise.all(u).then(()=>{Ke.update(()=>{c&&YP(e,c)})}),u}function Ou(e,t,n={}){var o;const r=vi(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(Cb(e,r,n)):()=>Promise.resolve(),c=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:p,staggerDirection:f}=s;return g3(e,t,d+u,p,f,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[u,d]=l==="beforeChildren"?[a,c]:[c,a];return u().then(()=>d())}else return Promise.all([a(),c(n.delay)])}function g3(e,t,n=0,o=0,r=1,s){const a=[],c=(e.variantChildren.size-1)*o,l=r===1?(u=0)=>u*o:(u=0)=>c-u*o;return Array.from(e.variantChildren).sort(b3).forEach((u,d)=>{u.notify("AnimationStart",t),a.push(Ou(u,t,{...s,delay:n+l(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function b3(e,t){return e.sortNodePosition(t)}function v3(e,t,n={}){e.notify("AnimationStart",t);let o;if(Array.isArray(t)){const r=t.map(s=>Ou(e,s,n));o=Promise.all(r)}else if(typeof t=="string")o=Ou(e,t,n);else{const r=typeof t=="function"?vi(e,t,n.custom):t;o=Promise.all(Cb(e,r,n))}return o.then(()=>{e.notify("AnimationComplete",t)})}function Eb(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 y3=Lc.length;function Ib(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Ib(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<y3;n++){const o=Lc[n],r=e.props[o];(hi(r)||r===!1)&&(t[o]=r)}return t}const x3=[...Vc].reverse(),C3=Vc.length;function E3(e){return t=>Promise.all(t.map(({animation:n,options:o})=>v3(e,n,o)))}function I3(e){let t=E3(e),n=Tb(),o=!0;const r=l=>(u,d)=>{var p;const f=vi(e,d,l==="exit"?(p=e.presenceContext)===null||p===void 0?void 0:p.custom:void 0);if(f){const{transition:g,transitionEnd:m,...h}=f;u={...u,...h,...m}}return u};function s(l){t=l(e)}function a(l){const{props:u}=e,d=Ib(e.parent)||{},p=[],f=new Set;let g={},m=1/0;for(let b=0;b<C3;b++){const x=x3[b],S=n[x],E=u[x]!==void 0?u[x]:d[x],I=hi(E),v=x===l?S.isActive:null;v===!1&&(m=b);let R=E===d[x]&&E!==u[x]&&I;if(R&&o&&e.manuallyAnimateOnMount&&(R=!1),S.protectedKeys={...g},!S.isActive&&v===null||!E&&!S.prevProp||sa(E)||typeof E=="boolean")continue;const w=T3(S.prevProp,E);let O=w||x===l&&S.isActive&&!R&&I||b>m&&I,M=!1;const P=Array.isArray(E)?E:[E];let j=P.reduce(r(x),{});v===!1&&(j={});const{prevResolvedValues:W={}}=S,F={...W,...j},L=G=>{O=!0,f.has(G)&&(M=!0,f.delete(G)),S.needsAnimating[G]=!0;const B=e.getValue(G);B&&(B.liveStyle=!1)};for(const G in F){const B=j[G],X=W[G];if(g.hasOwnProperty(G))continue;let k=!1;qc(B)&&qc(X)?k=!Eb(B,X):k=B!==X,k?B!=null?L(G):f.add(G):B!==void 0&&f.has(G)?L(G):S.protectedKeys[G]=!0}S.prevProp=E,S.prevResolvedValues=j,S.isActive&&(g={...g,...j}),o&&e.blockInitialAnimation&&(O=!1),O&&(!(R&&w)||M)&&p.push(...P.map(G=>({animation:G,options:{type:x}})))}if(f.size){const b={};if(typeof u.initial!="boolean"){const x=vi(e,Array.isArray(u.initial)?u.initial[0]:u.initial);x&&x.transition&&(b.transition=x.transition)}f.forEach(x=>{const S=e.getBaseTarget(x),E=e.getValue(x);E&&(E.liveStyle=!0),b[x]=S??null}),p.push({animation:b})}let h=!!p.length;return o&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(h=!1),o=!1,h?t(p):Promise.resolve()}function c(l,u){var d;if(n[l].isActive===u)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(f=>{var g;return(g=f.animationState)===null||g===void 0?void 0:g.setActive(l,u)}),n[l].isActive=u;const p=a(l);for(const f in n)n[f].protectedKeys={};return p}return{animateChanges:a,setActive:c,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Tb(),o=!0}}}function T3(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Eb(t,e):!1}function So(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Tb(){return{animate:So(!0),whileInView:So(),whileHover:So(),whileTap:So(),whileDrag:So(),whileFocus:So(),exit:So()}}class ro{constructor(t){this.isMounted=!1,this.node=t}update(){}}class S3 extends ro{constructor(t){super(t),t.animationState||(t.animationState=I3(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();sa(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 w3=0;class R3 extends ro{constructor(){super(...arguments),this.id=w3++}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 O3={animation:{Feature:S3},exit:{Feature:R3}};function Oi(e,t,n,o={passive:!0}){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n)}function Ai(e){return{point:{x:e.pageX,y:e.pageY}}}const A3=e=>t=>ru(t)&&e(t,Ai(t));function gr(e,t,n,o){return Oi(e,t,A3(n),o)}function Sb({top:e,left:t,right:n,bottom:o}){return{x:{min:t,max:n},y:{min:e,max:o}}}function P3({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function M3(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}}const wb=1e-4,N3=1-wb,k3=1+wb,Rb=.01,B3=0-Rb,D3=0+Rb;function jt(e){return e.max-e.min}function j3(e,t,n){return Math.abs(e-t)<=n}function Ob(e,t,n,o=.5){e.origin=o,e.originPoint=lt(t.min,t.max,e.origin),e.scale=jt(n)/jt(t),e.translate=lt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=N3&&e.scale<=k3||isNaN(e.scale))&&(e.scale=1),(e.translate>=B3&&e.translate<=D3||isNaN(e.translate))&&(e.translate=0)}function Pi(e,t,n,o){Ob(e.x,t.x,n.x,o?o.originX:void 0),Ob(e.y,t.y,n.y,o?o.originY:void 0)}function Ab(e,t,n){e.min=n.min+t.min,e.max=e.min+jt(t)}function F3(e,t,n){Ab(e.x,t.x,n.x),Ab(e.y,t.y,n.y)}function Pb(e,t,n){e.min=t.min-n.min,e.max=e.min+jt(t)}function Mi(e,t,n){Pb(e.x,t.x,n.x),Pb(e.y,t.y,n.y)}const Mb=()=>({translate:0,scale:1,origin:0,originPoint:0}),br=()=>({x:Mb(),y:Mb()}),Nb=()=>({min:0,max:0}),mt=()=>({x:Nb(),y:Nb()});function un(e){return[e("x"),e("y")]}function Au(e){return e===void 0||e===1}function Pu({scale:e,scaleX:t,scaleY:n}){return!Au(e)||!Au(t)||!Au(n)}function wo(e){return Pu(e)||kb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function kb(e){return Bb(e.x)||Bb(e.y)}function Bb(e){return e&&e!=="0%"}function ma(e,t,n){const o=e-n,r=t*o;return n+r}function Db(e,t,n,o,r){return r!==void 0&&(e=ma(e,r,o)),ma(e,n,o)+t}function Mu(e,t=0,n=1,o,r){e.min=Db(e.min,t,n,o,r),e.max=Db(e.max,t,n,o,r)}function jb(e,{x:t,y:n}){Mu(e.x,t.translate,t.scale,t.originPoint),Mu(e.y,n.translate,n.scale,n.originPoint)}const Fb=.999999999999,Vb=1.0000000000001;function V3(e,t,n,o=!1){const r=n.length;if(!r)return;t.x=t.y=1;let s,a;for(let c=0;c<r;c++){s=n[c],a=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(o&&s.options.layoutScroll&&s.scroll&&s!==s.root&&yr(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,jb(e,a)),o&&wo(s.latestValues)&&yr(e,s.latestValues))}t.x<Vb&&t.x>Fb&&(t.x=1),t.y<Vb&&t.y>Fb&&(t.y=1)}function vr(e,t){e.min=e.min+t,e.max=e.max+t}function Lb(e,t,n,o,r=.5){const s=lt(e.min,e.max,r);Mu(e,t,n,s,o)}function yr(e,t){Lb(e.x,t.x,t.scaleX,t.scale,t.originX),Lb(e.y,t.y,t.scaleY,t.scale,t.originY)}function $b(e,t){return Sb(M3(e.getBoundingClientRect(),t))}function L3(e,t,n){const o=$b(e,n),{scroll:r}=t;return r&&(vr(o.x,r.offset.x),vr(o.y,r.offset.y)),o}const _b=(e,t)=>Math.abs(e-t);function $3(e,t){const n=_b(e.x,t.x),o=_b(e.y,t.y);return Math.sqrt(n**2+o**2)}class Gb{constructor(t,n,{transformPagePoint:o,dragSnapToOrigin:r=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=ku(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,f=$3(d.offset,{x:0,y:0})>=3;if(!p&&!f)return;const{point:g}=d,{timestamp:m}=Ct;this.history.push({...g,timestamp:m});const{onStart:h,onMove:b}=this.handlers;p||(h&&h(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,d)},this.handlePointerMove=(d,p)=>{if(this.index=Hb(d.currentTarget),d.target instanceof Element&&d.target.hasPointerCapture&&d.pointerId!==void 0)try{if(!d.target.hasPointerCapture(d.pointerId))return}catch{}this.lastMoveEvent=d,this.lastMoveEventInfo=Nu(p,this.transformPagePoint),Ke.update(this.updatePoint,!0)},this.handlePointerUp=(d,p)=>{xi(d,"release"),this.end();const{onEnd:f,onSessionEnd:g,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=ku(d.type==="pointercancel"||d.type==="lostpointercapture"?this.lastMoveEventInfo:Nu(p,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,h),g&&g(d,h)},!ru(t))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=o;const s=Ai(t),a=Nu(s,this.transformPagePoint),{point:c}=a,{timestamp:l}=Ct;this.history=[{...c,timestamp:l}];const{onSessionStart:u}=n;u&&u(t,ku(a,this.history)),xi(t,"set"),this.removeListeners=wi(gr(t.currentTarget,"pointermove",this.handlePointerMove),gr(t.currentTarget,"pointerup",this.handlePointerUp),gr(t.currentTarget,"pointercancel",this.handlePointerUp),gr(t.currentTarget,"lostpointercapture",(d,p)=>{Hb(d.currentTarget)!==this.index?xi(d,"set"):this.handlePointerUp(d,p)}))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),to(this.updatePoint)}}function Nu(e,t){return t?{point:t(e.point)}:e}function Wb(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ku({point:e},t){return{point:e,delta:Wb(e,zb(t)),offset:Wb(e,_3(t)),velocity:G3(t,.1)}}function _3(e){return e[0]}function zb(e){return e[e.length-1]}function G3(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,o=null;const r=zb(e);for(;n>=0&&(o=e[n],!(r.timestamp-o.timestamp>Mn(t)));)n--;if(!o)return{x:0,y:0};const s=Ln(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}function Hb(e){return e.parentNode?Array.from(e.parentNode.children).indexOf(e):-1}function W3(e,{min:t,max:n},o){return t!==void 0&&e<t?e=o?lt(t,e,o.min):Math.max(e,t):n!==void 0&&e>n&&(e=o?lt(n,e,o.max):Math.min(e,n)),e}function Xb(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 z3(e,{top:t,left:n,bottom:o,right:r}){return{x:Xb(e.x,n,r),y:Xb(e.y,t,o)}}function Ub(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 H3(e,t){return{x:Ub(e.x,t.x),y:Ub(e.y,t.y)}}function X3(e,t){let n=.5;const o=jt(e),r=jt(t);return r>o?n=cr(t.min,t.max-o,e.min):o>r&&(n=cr(e.min,e.max-r,t.min)),$n(0,1,n)}function U3(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 Bu=.35;function Y3(e=Bu){return e===!1?e=0:e===!0&&(e=Bu),{x:Yb(e,"left","right"),y:Yb(e,"top","bottom")}}function Yb(e,t,n){return{min:Zb(e,t),max:Zb(e,n)}}function Zb(e,t){return typeof e=="number"?e:e[t]||0}const Z3=new WeakMap;class J3{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(Ai(d).point)},s=(d,p)=>{const{drag:f,dragPropagation:g,onDragStart:m}=this.getProps();if(f&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=WP(f),!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),un(b=>{let x=this.getAxisMotionValue(b).get()||0;if(Nn.test(x)){const{projection:S}=this.visualElement;if(S&&S.layout){const E=S.layout.layoutBox[b];E&&(x=jt(E)*(parseFloat(x)/100))}}this.originPoint[b]=x}),m&&Ke.postRender(()=>m(d,p)),cu(this.visualElement,"transform");const{animationState:h}=this.visualElement;h&&h.setActive("whileDrag",!0)},a=(d,p)=>{const{dragPropagation:f,dragDirectionLock:g,onDirectionLock:m,onDrag:h}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:b}=p;if(g&&this.currentDirection===null){this.currentDirection=q3(b),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",p.point,b),this.updateAxis("y",p.point,b),this.visualElement.render(),h&&h(d,p)},c=(d,p)=>this.stop(d,p),l=()=>un(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 Gb(t,{onSessionStart:r,onStart:s,onMove:a,onSessionEnd:c,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u})}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&&Ke.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||!ga(t,r,this.currentDirection))return;const s=this.getAxisMotionValue(t);let a=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(a=W3(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&&dr(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&r?this.constraints=z3(r.layoutBox,n):this.constraints=!1,this.elastic=Y3(o),s!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&un(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=U3(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!dr(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=L3(o,r.root,this.visualElement.getTransformPagePoint());let a=H3(r.layout.layoutBox,s);if(n){const c=n(P3(a));this.hasMutatedConstraints=!!c,c&&(a=Sb(c))}return a}startAnimation(t){const{drag:n,dragMomentum:o,dragElastic:r,dragTransition:s,dragSnapToOrigin:a,onDragTransitionEnd:c}=this.getProps(),l=this.constraints||{},u=un(d=>{if(!ga(d,n,this.currentDirection))return;let p=l&&l[d]||{};a&&(p={min:0,max:0});const f=r?200:1e6,g=r?40:1e7,m={type:"inertia",velocity:o?t[d]:0,bounceStiffness:f,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...s,...p};return this.startAxisValueAnimation(d,m)});return Promise.all(u).then(c)}startAxisValueAnimation(t,n){const o=this.getAxisMotionValue(t);return cu(this.visualElement,t),o.start(Ru(t,o,0,n,this.visualElement,!1))}stopAnimation(){un(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){un(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){un(n=>{const{drag:o}=this.getProps();if(!ga(n,o,this.currentDirection))return;const{projection:r}=this.visualElement,s=this.getAxisMotionValue(n);if(r&&r.layout){const{min:a,max:c}=r.layout.layoutBox[n];s.set(t[n]-lt(a,c,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:o}=this.visualElement;if(!dr(n)||!o||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};un(a=>{const c=this.getAxisMotionValue(a);if(c&&this.constraints!==!1){const l=c.get();r[a]=X3({min:l,max:l},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(),un(a=>{if(!ga(a,t,null))return;const c=this.getAxisMotionValue(a),{min:l,max:u}=this.constraints[a];c.set(lt(l,u,r[a]))})}addListeners(){if(!this.visualElement.current)return;Z3.set(this.visualElement,this);const t=this.visualElement.current,n=gr(t,"pointerdown",l=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(l)}),o=()=>{const{dragConstraints:l}=this.getProps();dr(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,s=r.addEventListener("measure",o);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),Ke.read(o);const a=Oi(window,"resize",()=>this.scalePositionWithinConstraints()),c=r.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(un(d=>{const p=this.getAxisMotionValue(d);p&&(this.originPoint[d]+=l[d].translate,p.set(p.get()+l[d].translate))}),this.visualElement.render())});return()=>{a(),n(),s(),c&&c()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:o=!1,dragPropagation:r=!1,dragConstraints:s=!1,dragElastic:a=Bu,dragMomentum:c=!0}=t;return{...t,drag:n,dragDirectionLock:o,dragPropagation:r,dragConstraints:s,dragElastic:a,dragMomentum:c}}}function ga(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function q3(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class K3 extends ro{constructor(t){super(t),this.removeGroupControls=Gt,this.removeListeners=Gt,this.controls=new J3(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Gt}unmount(){this.removeGroupControls(),this.removeListeners()}}const Jb=e=>(t,n)=>{e&&Ke.postRender(()=>e(t,n))};class Q3 extends ro{constructor(){super(...arguments),this.removePointerDownListener=Gt}onPointerDown(t){this.session=new Gb(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:o,onPanEnd:r}=this.node.getProps();return{onSessionStart:Jb(t),onStart:Jb(n),onMove:o,onEnd:(s,a)=>{delete this.session,r&&Ke.postRender(()=>r(s,a))}}}mount(){this.removePointerDownListener=gr(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 ba={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function qb(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ni={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ce.test(e))e=parseFloat(e);else return e;const n=qb(e,t.target.x),o=qb(e,t.target.y);return`${n}% ${o}%`}},eN={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,c=n.x.scale*t.x,l=n.y.scale*t.y;r[0+a]/=c,r[1+a]/=l;const u=lt(c,l,.5);return typeof r[2+a]=="number"&&(r[2+a]/=u),typeof r[3+a]=="number"&&(r[3+a]/=u),s(r)}};class tN extends N.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o,layoutId:r}=this.props,{projection:s}=t;sP(nN),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()})),ba.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||t.isPresent!==s?a.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?a.promote():a.relegate()||Ke.postRender(()=>{const c=a.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),_c.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 Kb(e){const[t,n]=VA(),o=N.useContext(Gm);return y.jsx(tN,{...e,layoutGroup:o,switchLayoutGroup:N.useContext(Qm),isPresent:t,safeToRemove:n})}const nN={borderRadius:{...Ni,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ni,borderTopRightRadius:Ni,borderBottomLeftRadius:Ni,borderBottomRightRadius:Ni,boxShadow:eN};function oN(e,t,n){const o=wt(e)?e:Ei(e);return o.start(Ru("",o,t,n)),o.animation}function rN(e){return e instanceof SVGElement&&e.tagName!=="svg"}const iN=(e,t)=>e.depth-t.depth;class sN{constructor(){this.children=[],this.isDirty=!1}add(t){su(this.children,t),this.isDirty=!0}remove(t){au(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(iN),this.isDirty=!1,this.children.forEach(t)}}function aN(e,t){const n=kn.now(),o=({timestamp:r})=>{const s=r-n;s>=t&&(to(o),e(s-t))};return Ke.read(o,!0),()=>to(o)}const Qb=["TopLeft","TopRight","BottomLeft","BottomRight"],lN=Qb.length,e0=e=>typeof e=="string"?parseFloat(e):e,t0=e=>typeof e=="number"||Ce.test(e);function cN(e,t,n,o,r,s){r?(e.opacity=lt(0,n.opacity!==void 0?n.opacity:1,uN(o)),e.opacityExit=lt(t.opacity!==void 0?t.opacity:1,0,dN(o))):s&&(e.opacity=lt(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,o));for(let a=0;a<lN;a++){const c=`border${Qb[a]}Radius`;let l=n0(t,c),u=n0(n,c);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||t0(l)===t0(u)?(e[c]=Math.max(lt(e0(l),e0(u),o),0),(Nn.test(u)||Nn.test(l))&&(e[c]+="%")):e[c]=u}(t.rotate||n.rotate)&&(e.rotate=lt(t.rotate||0,n.rotate||0,o))}function n0(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const uN=o0(0,.5,Vg),dN=o0(.5,.95,Gt);function o0(e,t,n){return o=>o<e?0:o>t?1:n(cr(e,t,o))}function r0(e,t){e.min=t.min,e.max=t.max}function dn(e,t){r0(e.x,t.x),r0(e.y,t.y)}function i0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function s0(e,t,n,o,r){return e-=t,e=ma(e,1/n,o),r!==void 0&&(e=ma(e,1/r,o)),e}function pN(e,t=0,n=1,o=.5,r,s=e,a=e){if(Nn.test(t)&&(t=parseFloat(t),t=lt(a.min,a.max,t/100)-a.min),typeof t!="number")return;let c=lt(s.min,s.max,o);e===s&&(c-=t),e.min=s0(e.min,t,n,c,r),e.max=s0(e.max,t,n,c,r)}function a0(e,t,[n,o,r],s,a){pN(e,t[n],t[o],t[r],t.scale,s,a)}const fN=["x","scaleX","originX"],hN=["y","scaleY","originY"];function l0(e,t,n,o){a0(e.x,t,fN,n?n.x:void 0,o?o.x:void 0),a0(e.y,t,hN,n?n.y:void 0,o?o.y:void 0)}function c0(e){return e.translate===0&&e.scale===1}function u0(e){return c0(e.x)&&c0(e.y)}function d0(e,t){return e.min===t.min&&e.max===t.max}function mN(e,t){return d0(e.x,t.x)&&d0(e.y,t.y)}function p0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function f0(e,t){return p0(e.x,t.x)&&p0(e.y,t.y)}function h0(e){return jt(e.x)/jt(e.y)}function m0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class gN{constructor(){this.members=[]}add(t){su(this.members,t),t.scheduleRender()}remove(t){if(au(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 bN(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:f,skewX:g,skewY:m}=n;u&&(o=`perspective(${u}px) ${o}`),d&&(o+=`rotate(${d}deg) `),p&&(o+=`rotateX(${p}deg) `),f&&(o+=`rotateY(${f}deg) `),g&&(o+=`skewX(${g}deg) `),m&&(o+=`skewY(${m}deg) `)}const c=e.x.scale*t.x,l=e.y.scale*t.y;return(c!==1||l!==1)&&(o+=`scale(${c}, ${l})`),o||"none"}const Du=["","X","Y","Z"],vN={visibility:"hidden"},g0=1e3;let yN=0;function ju(e,t,n,o){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),o&&(o[e]=0))}function b0(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Mg(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ke,!(r||s))}const{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&b0(o)}function v0({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:o,resetTransform:r}){return class{constructor(a={},c=t==null?void 0:t()){this.id=yN++,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(EN),this.nodes.forEach(RN),this.nodes.forEach(ON),this.nodes.forEach(IN)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new sN)}addEventListener(a,c){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new lu),this.eventHandlers.get(a).add(c)}notifyListeners(a,...c){const l=this.eventHandlers.get(a);l&&l.notify(...c)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,c=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=rN(a),this.instance=a;const{layoutId:l,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),c&&(u||l)&&(this.isLayoutDirty=!0),e){let p;const f=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,p&&p(),p=aN(f,250),ba.hasAnimatedSinceResize&&(ba.hasAnimatedSinceResize=!1,this.nodes.forEach(x0))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&d&&(l||u)&&this.addEventListener("didUpdate",({delta:p,hasLayoutChanged:f,hasRelativeLayoutChanged:g,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const h=this.options.transition||d.getDefaultTransition()||kN,{onLayoutAnimationStart:b,onLayoutAnimationComplete:x}=d.getProps(),S=!this.targetLayout||!f0(this.targetLayout,m),E=!f&&g;if(this.options.layoutRoot||this.resumeFrom||E||f&&(S||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(p,E);const I={...Qc(h,"layout"),onPlay:b,onComplete:x};(d.shouldReduceMotion||this.options.layoutRoot)&&(I.delay=0,I.type=!1),this.startAnimation(I)}else f||x0(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(AN),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&&b0(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:c,layout:l}=this.options;if(c===void 0&&!l)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(y0);return}this.isUpdating||this.nodes.forEach(SN),this.isUpdating=!1,this.nodes.forEach(wN),this.nodes.forEach(xN),this.nodes.forEach(CN),this.clearAllSnapshots();const c=kn.now();Ct.delta=$n(0,1e3/60,c-Ct.timestamp),Ct.timestamp=c,Ct.isProcessing=!0,Fc.update.process(Ct),Fc.preRender.process(Ct),Fc.render.process(Ct),Ct.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,_c.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(TN),this.sharedNodes.forEach(PN)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ke.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ke.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!jt(this.snapshot.measuredBox.x)&&!jt(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 l=0;l<this.path.length;l++)this.path[l].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:c}=this.options;c&&c.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let c=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(c=!1),c){const l=o(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!r)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,c=this.projectionDelta&&!u0(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;a&&(c||wo(this.latestValues)||d)&&(r(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const c=this.measurePageBox();let l=this.removeElementScroll(c);return a&&(l=this.removeTransform(l)),BN(l),{animationId:this.root.animationId,measuredBox:c,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:c}=this.options;if(!c)return mt();const l=c.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(DN))){const{scroll:d}=this.root;d&&(vr(l.x,d.offset.x),vr(l.y,d.offset.y))}return l}removeElementScroll(a){var c;const l=mt();if(dn(l,a),!((c=this.scroll)===null||c===void 0)&&c.wasRoot)return l;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:p,options:f}=d;d!==this.root&&p&&f.layoutScroll&&(p.wasRoot&&dn(l,a),vr(l.x,p.offset.x),vr(l.y,p.offset.y))}return l}applyTransform(a,c=!1){const l=mt();dn(l,a);for(let u=0;u<this.path.length;u++){const d=this.path[u];!c&&d.options.layoutScroll&&d.scroll&&d!==d.root&&yr(l,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),wo(d.latestValues)&&yr(l,d.latestValues)}return wo(this.latestValues)&&yr(l,this.latestValues),l}removeTransform(a){const c=mt();dn(c,a);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!wo(u.latestValues))continue;Pu(u.latestValues)&&u.updateSnapshot();const d=mt(),p=u.measurePageBox();dn(d,p),l0(c,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return wo(this.latestValues)&&l0(c,this.latestValues),c}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!==Ct.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var c;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(a||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((c=this.parent)===null||c===void 0)&&c.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:p,layoutId:f}=this.options;if(!(!this.layout||!(p||f))){if(this.resolvedRelativeTargetAt=Ct.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(),Mi(this.relativeTargetOrigin,this.layout.layoutBox,g.layout.layoutBox),dn(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(),F3(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):dn(this.target,this.layout.layoutBox),jb(this.target,this.targetDelta)):dn(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(),Mi(this.relativeTargetOrigin,this.target,g.target),dn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Pu(this.parent.latestValues)||kb(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 c=this.getLead(),l=!!this.resumingFrom||this!==c;let u=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===Ct.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;dn(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,g=this.treeScale.y;V3(this.layoutCorrected,this.treeScale,this.path,l),c.layout&&!c.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(c.target=c.layout.layoutBox,c.targetWithTransforms=mt());const{target:m}=c;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(i0(this.prevProjectionDelta.x,this.projectionDelta.x),i0(this.prevProjectionDelta.y,this.projectionDelta.y)),Pi(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==g||!m0(this.projectionDelta.x,this.prevProjectionDelta.x)||!m0(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 c;if((c=this.options.visualElement)===null||c===void 0||c.scheduleRender(),a){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=br(),this.projectionDelta=br(),this.projectionDeltaWithTransform=br()}setAnimationOrigin(a,c=!1){const l=this.snapshot,u=l?l.latestValues:{},d={...this.latestValues},p=br();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!c;const f=mt(),g=l?l.source:void 0,m=this.layout?this.layout.source:void 0,h=g!==m,b=this.getStack(),x=!b||b.members.length<=1,S=!!(h&&!x&&this.options.crossfade===!0&&!this.path.some(NN));this.animationProgress=0;let E;this.mixTargetDelta=I=>{const v=I/1e3;C0(p.x,a.x,v),C0(p.y,a.y,v),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Mi(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),MN(this.relativeTarget,this.relativeTargetOrigin,f,v),E&&mN(this.relativeTarget,E)&&(this.isProjectionDirty=!1),E||(E=mt()),dn(E,this.relativeTarget)),h&&(this.animationValues=d,cN(d,u,this.latestValues,v,S,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=v},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=Ke.update(()=>{ba.hasAnimatedSinceResize=!0,this.currentAnimation=oN(0,g0,{...a,onUpdate:c=>{this.mixTargetDelta(c),a.onUpdate&&a.onUpdate(c)},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(g0),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:c,target:l,layout:u,latestValues:d}=a;if(!(!c||!l||!u)){if(this!==a&&this.layout&&u&&w0(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||mt();const p=jt(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+p;const f=jt(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+f}dn(c,l),yr(c,d),Pi(this.projectionDeltaWithTransform,this.layoutCorrected,c,d)}}registerSharedNode(a,c){this.sharedNodes.has(a)||this.sharedNodes.set(a,new gN),this.sharedNodes.get(a).add(c);const u=c.options.initialPromotionConfig;c.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(c):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:c}=this.options;return c?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:c}=this.options;return c?(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:c,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let c=!1;const{latestValues:l}=a;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(c=!0),!c)return;const u={};l.z&&ju("z",a,u,this.animationValues);for(let d=0;d<Du.length;d++)ju(`rotate${Du[d]}`,a,u,this.animationValues),ju(`skew${Du[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 c,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return vN;const u={visibility:""},d=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=ca(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 h={};return this.options.layoutId&&(h.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,h.pointerEvents=ca(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!wo(this.latestValues)&&(h.transform=d?d({},""):"none",this.hasProjected=!1),h}const f=p.animationValues||p.latestValues;this.applyTransformsToTarget(),u.transform=bN(this.projectionDeltaWithTransform,this.treeScale,f),d&&(u.transform=d(f,u.transform));const{x:g,y:m}=this.projectionDelta;u.transformOrigin=`${g.origin*100}% ${m.origin*100}% 0`,p.animationValues?u.opacity=p===this?(l=(c=f.opacity)!==null&&c!==void 0?c:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:u.opacity=p===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const h in mi){if(f[h]===void 0)continue;const{correct:b,applyTo:x,isCSSVariable:S}=mi[h],E=u.transform==="none"?f[h]:b(f[h],p);if(x){const I=x.length;for(let v=0;v<I;v++)u[x[v]]=E}else S?this.options.visualElement.renderState.vars[h]=E:u[h]=E}return this.options.layoutId&&(u.pointerEvents=p===this?ca(a==null?void 0:a.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var c;return(c=a.currentAnimation)===null||c===void 0?void 0:c.stop()}),this.root.nodes.forEach(y0),this.root.sharedNodes.clear()}}}function xN(e){e.updateLayout()}function CN(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"?un(p=>{const f=a?n.measuredBox[p]:n.layoutBox[p],g=jt(f);f.min=o[p].min,f.max=f.min+g}):w0(s,n.layoutBox,o)&&un(p=>{const f=a?n.measuredBox[p]:n.layoutBox[p],g=jt(o[p]);f.max=f.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[p].max=e.relativeTarget[p].min+g)});const c=br();Pi(c,o,n.layoutBox);const l=br();a?Pi(l,e.applyTransform(r,!0),n.measuredBox):Pi(l,o,n.layoutBox);const u=!u0(c);let d=!1;if(!e.resumeFrom){const p=e.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:f,layout:g}=p;if(f&&g){const m=mt();Mi(m,n.layoutBox,f.layoutBox);const h=mt();Mi(h,o,g.layoutBox),f0(m,h)||(d=!0),p.options.layoutRoot&&(e.relativeTarget=h,e.relativeTargetOrigin=m,e.relativeParent=p)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:n,delta:l,layoutDelta:c,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:o}=e.options;o&&o()}e.options.transition=void 0}function EN(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 IN(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function TN(e){e.clearSnapshot()}function y0(e){e.clearMeasurements()}function SN(e){e.isLayoutDirty=!1}function wN(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function x0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function RN(e){e.resolveTargetDelta()}function ON(e){e.calcProjection()}function AN(e){e.resetSkewAndRotation()}function PN(e){e.removeLeadSnapshot()}function C0(e,t,n){e.translate=lt(t.translate,0,n),e.scale=lt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function E0(e,t,n,o){e.min=lt(t.min,n.min,o),e.max=lt(t.max,n.max,o)}function MN(e,t,n,o){E0(e.x,t.x,n.x,o),E0(e.y,t.y,n.y,o)}function NN(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const kN={duration:.45,ease:[.4,0,.1,1]},I0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),T0=I0("applewebkit/")&&!I0("chrome/")?Math.round:Gt;function S0(e){e.min=T0(e.min),e.max=T0(e.max)}function BN(e){S0(e.x),S0(e.y)}function w0(e,t,n){return e==="position"||e==="preserve-aspect"&&!j3(h0(t),h0(n),.2)}function DN(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const jN=v0({attachResizeListener:(e,t)=>Oi(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Fu={current:void 0},R0=v0({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Fu.current){const e=new jN({});e.mount(window),e.setOptions({layoutScroll:!0}),Fu.current=e}return Fu.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),FN={pan:{Feature:Q3},drag:{Feature:K3,ProjectionNode:R0,MeasureLayout:Kb}};function O0(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&&Ke.postRender(()=>s(t,Ai(t)))}class VN extends ro{mount(){const{current:t}=this.node;t&&(this.unmount=FP(t,(n,o)=>(O0(this.node,o,"Start"),r=>O0(this.node,r,"End"))))}unmount(){}}class LN 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=wi(Oi(this.node.current,"focus",()=>this.onFocus()),Oi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function A0(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&&Ke.postRender(()=>s(t,Ai(t)))}class $N extends ro{mount(){const{current:t}=this.node;t&&(this.unmount=_P(t,(n,o)=>(A0(this.node,o,"Start"),(r,{success:s})=>A0(this.node,r,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Vu=new WeakMap,Lu=new WeakMap,_N=e=>{const t=Vu.get(e.target);t&&t(e)},GN=e=>{e.forEach(_N)};function WN({root:e,...t}){const n=e||document;Lu.has(n)||Lu.set(n,{});const o=Lu.get(n),r=JSON.stringify(t);return o[r]||(o[r]=new IntersectionObserver(GN,{root:e,...t})),o[r]}function zN(e,t,n){const o=WN(t);return Vu.set(e,n),o.observe(e),()=>{Vu.delete(e),o.unobserve(e)}}const HN={some:0,all:1};class XN 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:HN[r]},c=l=>{const{isIntersecting:u}=l;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(),f=u?d:p;f&&f(l)};return zN(this.node.current,a,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(UN(t,n))&&this.startObserver()}unmount(){}}function UN({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const YN={inView:{Feature:XN},tap:{Feature:$N},focus:{Feature:LN},hover:{Feature:VN}},ZN={layout:{ProjectionNode:R0,MeasureLayout:Kb}},$u={current:null},P0={current:!1};function JN(){if(P0.current=!0,!!Dc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>$u.current=e.matches;e.addListener(t),t()}else $u.current=!1}const qN=[...nb,Rt,oo],KN=e=>qN.find(tb(e)),QN=new WeakMap;function ek(e,t,n){for(const o in t){const r=t[o],s=n[o];if(wt(r))e.addValue(o,r),process.env.NODE_ENV==="development"&&ra(r.version==="12.4.10",`Attempting to mix Motion versions ${r.version} with 12.4.10 may not work as expected.`);else if(wt(s))e.addValue(o,Ei(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,Ei(a!==void 0?a:r,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const M0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class tk{scrapeMotionValuesFromProps(t,n,o){return{}}constructor({parent:t,props:n,presenceContext:o,reducedMotionConfig:r,blockInitialAnimation:s,visualState:a},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=xu,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=kn.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,Ke.render(this.render,!1,!0))};const{latestValues:l,renderState:u,onUpdate:d}=a;this.onUpdate=d,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=o,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=c,this.blockInitialAnimation=!!s,this.isControllingVariants=aa(n),this.isVariantNode=Jm(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:p,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const g in f){const m=f[g];l[g]!==void 0&&wt(m)&&m.set(l[g],!1)}}mount(t){this.current=t,QN.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)),P0.current||JN(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:$u.current,process.env.NODE_ENV!=="production"&&ra(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=Eo.has(t);o&&this.onBindTransform&&this.onBindTransform();const r=n.on("change",c=>{this.latestValues[t]=c,this.props.onUpdate&&Ke.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 ur){const n=ur[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<M0.length;o++){const r=M0[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=ek(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=Ei(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)||$g(r))?r=parseFloat(r):!KN(r)&&oo.test(n)&&(r=Ug(t,n)),this.setBaseTarget(t,wt(r)?r.get():r)),wt(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=Jc(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&&!wt(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 lu),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class N0 extends tk{constructor(){super(...arguments),this.KeyframeResolver=rb}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;wt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function nk(e){return window.getComputedStyle(e)}class ok extends N0{constructor(){super(...arguments),this.type="html",this.renderInstance=pg}readValueFromInstance(t,n){if(Eo.has(n)){const o=bu(n);return o&&o.default||0}else{const o=nk(t),r=(Gc(n)?o.getPropertyValue(n):o[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return $b(t,n)}build(t,n,o){Hc(t,n,o.transformTemplate)}scrapeMotionValuesFromProps(t,n,o){return Kc(t,n,o)}}class rk extends N0{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=mt,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&dg(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Eo.has(n)){const o=bu(n);return o&&o.default||0}return n=fg.has(n)?n:$c(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,o){return mg(t,n,o)}onBindTransform(){this.current&&!this.renderState.dimensions&&Ke.postRender(this.updateDimensions)}build(t,n,o){Yc(t,n,this.isSVGTag,o.transformTemplate)}renderInstance(t,n,o,r){hg(t,n,o,r)}mount(t){this.isSVGTag=Zc(t.tagName),super.mount(t)}}const ik=(e,t)=>Uc(e)?new rk(t):new ok(t,{allowProjection:e!==N.Fragment}),sk=PP({...O3,...YN,...FN,...ZN},ik),pn=UA(sk),Et={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",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",Expand:"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='M14.3332%203.5665C14.3332%204.17317%2014.0465%204.71317%2013.6065%205.05984C13.2865%205.31317%2012.8799%205.4665%2012.4332%205.4665C11.3799%205.4665%2010.5332%204.61984%2010.5332%203.5665C10.5332%203.11984%2010.6865%202.71984%2010.9399%202.39317H10.9465C11.2865%201.95317%2011.8265%201.6665%2012.4332%201.6665C13.4865%201.6665%2014.3332%202.51317%2014.3332%203.5665Z'%20stroke='%230166FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5.46602%203.5665C5.46602%204.61984%204.61935%205.4665%203.56602%205.4665C3.11935%205.4665%202.71935%205.31317%202.39268%205.05984C1.95268%204.71317%201.66602%204.17317%201.66602%203.5665C1.66602%202.51317%202.51268%201.6665%203.56602%201.6665C4.17268%201.6665%204.71268%201.95317%205.05935%202.39317C5.31268%202.71984%205.46602%203.11984%205.46602%203.5665Z'%20stroke='%230166FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M14.3332%2012.4332C14.3332%2013.4865%2013.4865%2014.3332%2012.4332%2014.3332C11.8265%2014.3332%2011.2865%2014.0465%2010.9465%2013.6065H10.9399C10.6865%2013.2865%2010.5332%2012.8799%2010.5332%2012.4332C10.5332%2011.3799%2011.3799%2010.5332%2012.4332%2010.5332C12.8799%2010.5332%2013.2799%2010.6865%2013.6065%2010.9399V10.9465C14.0465%2011.2865%2014.3332%2011.8265%2014.3332%2012.4332Z'%20stroke='%230166FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5.46602%2012.4332C5.46602%2012.8799%205.31268%2013.2799%205.05935%2013.6065C4.71268%2014.0532%204.17268%2014.3332%203.56602%2014.3332C2.51268%2014.3332%201.66602%2013.4865%201.66602%2012.4332C1.66602%2011.8265%201.95268%2011.2865%202.39268%2010.9465V10.9399C2.71268%2010.6865%203.11935%2010.5332%203.56602%2010.5332C4.61935%2010.5332%205.46602%2011.3799%205.46602%2012.4332Z'%20stroke='%230166FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M14.3327%207.99984C14.3327%209.0665%2014.0727%2010.0598%2013.606%2010.9398C13.286%2010.6865%2012.8793%2010.5332%2012.4327%2010.5332C11.3793%2010.5332%2010.5327%2011.3798%2010.5327%2012.4332C10.5327%2012.8798%2010.686%2013.2798%2010.9393%2013.6065C10.0593%2014.0732%209.06602%2014.3332%207.99935%2014.3332C6.93935%2014.3332%205.93935%2014.0732%205.05935%2013.6065C5.31268%2013.2865%205.46602%2012.8798%205.46602%2012.4332C5.46602%2011.3798%204.61935%2010.5332%203.56602%2010.5332C3.11935%2010.5332%202.71935%2010.6865%202.39268%2010.9398C1.92602%2010.0598%201.66602%209.0665%201.66602%207.99984C1.66602%206.93984%201.92602%205.93984%202.39268%205.05984C2.71935%205.31317%203.11935%205.4665%203.56602%205.4665C4.61935%205.4665%205.46602%204.61984%205.46602%203.5665C5.46602%203.11984%205.31268%202.71984%205.05935%202.39317C5.93935%201.9265%206.93935%201.6665%207.99935%201.6665C9.06602%201.6665%2010.0593%201.9265%2010.9393%202.39317C10.686%202.71317%2010.5327%203.11984%2010.5327%203.5665C10.5327%204.61984%2011.3793%205.4665%2012.4327%205.4665C12.8793%205.4665%2013.2793%205.31317%2013.606%205.05984C14.0727%205.93984%2014.3327%206.93984%2014.3327%207.99984Z'%20stroke='%230166FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e"},_u=({styles:e,label:t,hasFooter:n=!1,showCheckBox:o=!1,options:r,defaultValue:s=!0,isMulti:a=!1,handleSelectClick:c,handleCheckboxChange:l})=>{var E,I;const u=ot(),[d,p]=N.useState(!1),[f,g]=N.useState(s?(E=r==null?void 0:r[0])==null?void 0:E.label:"Select option"),[m,h]=N.useState(r||[]);((I=m==null?void 0:m.filter(v=>!(v!=null&&v.isMandatory)))==null?void 0:I.length)>7,N.useRef(null),N.useRef(null),N.useCallback(v=>{let R=[...m];R=R==null?void 0:R.map(w=>(w==null?void 0:w.key)===v?{...w,hidden:!w.hidden}:w),h(R),p(!0)},[m]),N.useCallback(()=>{},[m]);const b=()=>{},x=()=>{},S=N.useRef(null);return N.useEffect(()=>{const v=R=>{S.current&&!S.current.contains(R.target)&&p(!1)};return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[]),y.jsx(ge,{ref:S,sx:{position:"relative",flexShrink:0},children:y.jsx(ge,{position:"absolute",top:0,zIndex:10,children:y.jsxs(pn.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:[y.jsxs(ge,{sx:{padding:"0.65rem",display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",gap:"0.5rem"},onClick:()=>p(!d),children:[y.jsx(ge,{component:"img",className:"select-icon",src:e==null?void 0:e.icon,sx:{cursor:"pointer"}}),y.jsx(Bt,{sx:{color:u.palette.primary.notifyTextColor,flex:1,fontSize:"1.1rem"},children:t||f}),y.jsx(ge,{component:"img",className:"child",src:d?Et.ArrowSelectDown:Et.ArrowSelectUp,sx:{cursor:"pointer"}})]}),d&&y.jsx("hr",{style:{width:"100%",height:"0.1rem",backgroundColor:u.palette.primary.notifyBorderColor,border:"none",margin:"0rem"}}),y.jsx(pn.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((v,R)=>y.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(v==null?void 0:v.label),!a&&p(!1),!o&&c(v)},children:[o&&y.jsx(dc,{size:"medium",sx:{color:u.palette.primary.notifyIconColor,"&.Mui-checked":{color:u.palette.brandColor.orange},p:"0.2rem 0.5rem"},checked:!(v!=null&&v.isHidden),onChange:w=>l(v,w.target.checked)}),y.jsx(Bt,{sx:{fontSize:"1.1rem"},children:v==null?void 0:v.label})]},R))}),n&&d&&y.jsxs(pn.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:[y.jsx(pn.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"}),y.jsx(pn.button,{onClick:x,style:{textTransform:"none",padding:"0.4rem",background:"transparent",color:u.palette.primary.notifyTextColor,fontSize:"1.1rem",border:"none",cursor:"pointer"},children:"Cancel"})]})]})})})},k0=({pagination:e})=>{const{selectedPage:t,rowPerPage:n,totalRecords:o,onPageChange:r,onPageSizeChange:s}=e,a=ot();return y.jsxs(ge,{sx:{display:"flex",p:"1rem 2rem"},children:[y.jsxs(ge,{sx:{zIndex:10,display:"flex",flexDirection:"row",gap:"0.5rem",width:"100%"},children:[y.jsx(ge,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:y.jsx(Bt,{sx:{fontSize:"1.1rem",color:a.palette.primary.notifyTextColor},children:`Showing ${(t-1)*n+1} to ${t*n} of ${o} rows`})}),y.jsx(ge,{sx:{display:"flex",flexDirection:"row",gap:"0.5rem",justifyContent:"space-between"},children:y.jsx(ge,{sx:{display:"flex",flexDirection:"row",width:"5.2rem"},children:y.jsx(_u,{options:jA,handleSelectClick:s})})}),y.jsx(ge,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:y.jsx(Bt,{sx:{fontSize:"1.1rem",color:a.palette.primary.notifyTextColor},children:"records per page"})})]}),y.jsx(Tc,{count:Math.ceil(o/n),page:t,onChange:(c,l)=>{r(l)},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}}})]})};k0.propTypes={pagination:i.object.isRequired};const Gu=e=>{const t=localStorage.getItem(e);return t?JSON.parse(t):""},ak=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})},Wu=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),lk=e=>{let t=0;for(let n=0;n<e.length;n++)e[n].isRead||t++;return t},ck=e=>{const t=[];return e.forEach(n=>{n.isRead||t.push(n.id)}),t},uk=(e,t,n)=>e.filter(r=>t.some(s=>{var a,c,l;return(l=(a=r[s])==null?void 0:a.toLowerCase())==null?void 0:l.includes((c=n==null?void 0:n.trim())==null?void 0:c.toLowerCase())})),dk=(e,t,n)=>e.sort((r,s)=>n==="asc"?r[t].toLowerCase().localeCompare(s[t].toLowerCase()):s[t].toLowerCase().localeCompare(r[t].toLowerCase())),zu=(e,t,n)=>e.slice((t-1)*n,t*n),Hu=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==="channel_name"?n:e.split("_").map(s=>s[0].toUpperCase()+s.substring(1)).join(" ")},pk=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)))},fk=(e,t=20)=>(e==null?void 0:e.length)>t?`${e.slice(0,t)}...`:e;function B0({isRenderCellContent:e,column:t,row:n}){const o=n[t.key];return y.jsx(y.Fragment,{children:e?y.jsx(ge,{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)}):y.jsx(xm,{title:(o==null?void 0:o.length)>20?o:"",arrow:!0,children:y.jsx(ge,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",textTransform:"none",fontSize:"1.1rem"},component:"label",children:fk(o)})})})}B0.propTypes={isRenderCellContent:i.bool,column:i.object,row:i.object};const D0=({menuOpen:e,handleClose:t,onHideClick:n})=>{const o=ot();return y.jsx(Ec,{open:!!e,anchorEl:e,onClose:t,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:y.jsx(ge,{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:y.jsx(lc,{onClick:n,sx:{textTransform:"none",fontSize:"1.1rem",p:0,minHeight:"unset",fontWeight:"500",color:o.palette.primary.notifyTextColor},children:"Hide Column"})})})};D0.propTypes={menuOpen:i.object,handleClose:i.func,onHideClick:i.func};const hk=Z(Gh)(({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}})),_n=Z(Bt)(({theme:e})=>({color:e.palette.primary.notifyTextColor})),mk=Z(Cm)(({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)"})}})),gk=e=>{const{children:t,value:n,index:o,...r}=e;return y.jsx("div",{role:"tabpanel",hidden:n!==o,...r,children:n===o&&y.jsx(ge,{sx:{pl:"0.5rem",pb:"0.5rem"},children:t})})},bk=Z(zs)(({theme:e})=>({color:e.palette.primary.notifyTextColor,padding:"0.6rem 0",fontSize:"0.9rem",fontWeight:500,"&::before, &::after":{borderColor:`${e.palette.primary.notifyBorderColor}!important`}})),vk=Z(ac)(({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"}}));Z(jm)(({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 yk=Z(Dm)(({theme:e})=>({"& .MuiTabs-indicator":{height:"0.1rem",backgroundColor:e.palette.primary.notifyActiveBorderColor}})),xk=Z(Em)(({theme:e})=>({color:"gray","&.Mui-selected":{color:e.palette.primary.notifyActiveBorderColor,fontWeight:"bold"}})),j0=({sortKey:e,sortField:t,sortDir:n,handleSortClick:o})=>{const r=s=>y.jsx(Rs,{onClick:o,sx:{padding:"0.5rem"},children:y.jsx(ge,{component:"img",src:s})});return y.jsx(y.Fragment,{children:r(t===e?n==="asc"?Et.AscSort:Et.DescSort:Et.Unsort)})};j0.propTypes={sortKey:i.string.isRequired,sortField:i.string,sortDir:i.string,handleSortClick:i.func};function F0({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,c=t==null?void 0:t.sortField,l=t==null?void 0:t.sortDir,u=t==null?void 0:t.onSort;return y.jsxs(ge,{sx:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:"1.1rem"},children:[s,a&&y.jsx(j0,{sortKey:e==null?void 0:e.key,sortField:c,sortDir:l,handleSortClick:()=>u({column:e,sortDir:l,sortField:c})}),o&&!r&&y.jsx(Rs,{onClick:d=>n(d,e),sx:{padding:"0.5rem"},children:y.jsx(ge,{component:"img",src:Et.Menu})})]})}F0.propTypes={column:i.object.isRequired,sort:i.object.isRequired,handleMenuClick:i.func,isManageable:i.bool};const Ck=Z(Mc)(({theme:e})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"table-cell",[`&.${Pc.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"},[`&.${Pc.body}`]:{color:e.palette.primary.notifyTextColor,borderColor:e.palette.primary.notifyBorderColor,padding:"0.3rem 1rem",textAlign:"center"}}));function Xu({children:e,...t}){return y.jsx(Ck,{...t,children:e})}Xu.propTypes={children:i.node};const Ek=Z(fi)(()=>({"&:last-child td":{borderBottom:0}}));function Uu({children:e,...t}){return y.jsx(Ek,{...t,children:e})}Uu.propTypes={children:i.node};function V0({sort:e,data:t,pagination:n,columns:o}){const r=ot(),{visibleGridColumns:s}=N.useContext(Fm),a=N.useContext(Qs),{selectedColumn:c,handleMenuClick:l,handleClose:u,handleHideClick:d}=BA(s,a),p=o==null?void 0:o.isManageable,f=(t==null?void 0:t.length)>0,g=N.useRef(null),[m,h]=N.useState(null);let b=null;if(!f)return y.jsx(_n,{sx:{textAlign:"center"},children:bn.NRF});const x=(v,R)=>{h(R),v.dataTransfer.setData("colIndex",R)},S=v=>{v.preventDefault(),I(v)},E=(v,R)=>{if(v.preventDefault(),clearInterval(b),m===null||m===R)return;const w=[...s];[w[m],w[R]]=[w[R],w[m]],a({type:Je.SET_GRID_DATA,payload:{visibleGridColumns:w}}),h(null)},I=v=>{const R=g.current,{left:w,right:O}=R.getBoundingClientRect(),M=50,P=v.clientX>O-M?1:v.clientX<w+M?-1:0;P!==0?(clearInterval(b),b=setInterval(()=>{R.scrollLeft+=P*10},50)):clearInterval(b)};return y.jsxs(y.Fragment,{children:[y.jsx(Sm,{ref:g,sx:{maxHeight:"100%",overflowX:"auto",whiteSpace:"nowrap"},children:y.jsxs(Oc,{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:[y.jsx(Nc,{children:y.jsx(Uu,{children:s.map((v,R)=>v!=null&&v.isHidden?null:y.jsx(Xu,{style:v==null?void 0:v.style,draggable:!0,onDragStart:w=>x(w,R),onDragOver:S,onDrop:w=>E(w,R),children:y.jsx(F0,{column:v,sort:e,handleMenuClick:l,isManageable:p})},R))})}),y.jsx(Ac,{children:t.map((v,R)=>y.jsx(Uu,{children:s.map((w,O)=>w!=null&&w.isHidden?null:y.jsx(Xu,{style:w==null?void 0:w.style,children:y.jsx(B0,{isRenderCellContent:!!(w!=null&&w.cellRenderer),column:w,row:v})},O))},R))})]})}),y.jsx(k0,{pagination:n}),y.jsx(D0,{menuOpen:c==null?void 0:c.isOpen,handleClose:u,onHideClick:d})]})}V0.propTypes={sort:i.object,data:i.array,pagination:i.object,columns:i.object};function L0({tableProps:e,mergedColumns:t}){const n=N.useContext(Qs);return N.useEffect(()=>{n({type:Je.SET_GRID_DATA,payload:{visibleGridColumns:t}})},[t,n]),y.jsx(y.Fragment,{children:y.jsx(V0,{...e})})}L0.propTypes={tableProps:i.object.isRequired,mergedColumns:i.array.isRequired};const xr=({styles:e,label:t,...n})=>{const o=ot(),r=(t==null?void 0:t.length)*((t==null?void 0:t.length)>=10?6.5:7.5)+38||0,[s,a]=N.useState(!1);return y.jsxs(pn.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")&&y.jsx(ge,{component:"img",src:e==null?void 0:e.icon}),t&&y.jsx(pn.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:y.jsx(Bt,{sx:{fontSize:"1.1rem"},children:t})}),(e==null?void 0:e.iconPosition)==="end"&&y.jsx(ge,{component:"img",src:e==null?void 0:e.icon})]})};xr.propTypes={styles:i.object.isRequired,label:i.string};const Ik=({...e})=>{const[t,n]=N.useState(!1),o=ot();return y.jsx(pn.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})},Tk=({customTools:e})=>({sortedTools:e==null?void 0:e.sort((n,o)=>n.sequenceId-o.sequenceId)}),Sk=e=>{if(!e)return null;const{subAction:t,...n}=e,o=t?"select":"button",r={button:s=>y.jsx(xr,{...s}),select:s=>y.jsx(_u,{...s})};return r[o]?r[o](n):null},$0=({customTools:e})=>{const{sortedTools:t}=Tk({customTools:e}),[n,o]=N.useState(!1),r=(t==null?void 0:t.length)>3,c=r?Math.min(t.length,3.37)*45+20:"auto";return y.jsxs(y.Fragment,{children:[n&&y.jsx("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:998}}),y.jsx(pn.div,{className:"custom-tools-container",initial:{width:c!=="auto"?`${c/10}rem`:c},animate:r&&{width:n?"100%":`${c/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",boxShadow:"rgba(0, 0, 0, 0.95) -2px 0px 3px -3px inset"},layout:!0,children:t==null?void 0:t.map(l=>y.jsx(ge,{sx:{flexShrink:0,minWidth:"fit-content"},children:Sk(l)},l.id))}),r&&y.jsx(ge,{sx:{zIndex:1e3,pointerEvents:"auto"},children:y.jsx(xr,{label:n?"":"More Actions",styles:{icon:n?Et.Cross:Et.More},onClick:()=>o(l=>!l)})})]})};$0.propTypes={customTools:i.array.isRequired};const _0=({defaultTools:e,isManageable:t,customTools:n,mergedColumns:o})=>{var c,l,u,d,p,f,g;const r=o==null?void 0:o.filter(m=>!(m!=null&&m.isMandatory)),s=N.useContext(Qs),a=(m,h)=>{const b=[...o].map(x=>x.id===(m==null?void 0:m.id)?{...x,isHidden:!h}:x);s({type:Je.SET_GRID_DATA,payload:{visibleGridColumns:b}})};return y.jsxs(ge,{sx:{margin:"1rem 0",position:"relative",zIndex:10,display:"flex",flexDirection:"row",gap:"0.5rem",width:"100%"},children:[y.jsxs(ge,{sx:{display:"flex",flexDirection:"row",gap:"0.5rem"},children:[((c=e==null?void 0:e.search)==null?void 0:c.isRequired)&&y.jsx(Ik,{...e==null?void 0:e.search}),((l=e==null?void 0:e.refresh)==null?void 0:l.isRequired)&&y.jsx(xr,{...e==null?void 0:e.refresh,styles:{...(u=e==null?void 0:e.refresh)==null?void 0:u.styles,icon:Et.Refresh}})]}),y.jsx(ge,{sx:{display:"flex",flexDirection:"row",gap:"0.5rem",justifyContent:"space-between",flex:1,width:"27rem"},children:y.jsx(ge,{sx:{display:"flex",flexDirection:"row",gap:"0.5rem"},children:t&&y.jsx(_u,{label:"Manage Columns",options:r,isMulti:!0,showCheckBox:!0,handleCheckboxChange:(m,h)=>a(m,h)})})}),y.jsxs(ge,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-end",gap:"0.6rem"},children:[y.jsx($0,{customTools:n}),((d=e==null?void 0:e.upload)==null?void 0:d.isRequired)&&y.jsx(xr,{...e==null?void 0:e.upload,styles:{...(p=e==null?void 0:e.upload)==null?void 0:p.styles,icon:Et.Upload,color:"secondary",isAnimate:!0}}),((f=e==null?void 0:e.download)==null?void 0:f.isRequired)&&y.jsx(xr,{...e==null?void 0:e.download,styles:{...(g=e==null?void 0:e.download)==null?void 0:g.styles,icon:Et.Download,isAnimate:!0}})]})]})};_0.propTypes={defaultTools:i.object.isRequired,customTools:i.array,isManageable:i.bool,mergedColumns:i.array.isRequired};const wk=({columns:e})=>{const{definitions:t,defaultUserSettings:n,labels:o}=e,r=n.reduce((l,u)=>(l[u.id]=u,l),{}),s=o.reduce((l,u)=>(l[u.id]=u,l),{}),a=[];for(const l of t){const{id:u}=l,d=r[u],p=s[u];let f={...l,...d,...p};a.push(f)}return a.sort((l,u)=>l.sequenceId-u.sequenceId)};function G0({tableProps:e,toolbarProps:t}){var s;const n=(s=e.columns)==null?void 0:s.isManageable,{columns:o}=e,r=wk({columns:o});return y.jsxs(Vm,{children:[y.jsx(_0,{...t,isManageable:n,mergedColumns:r}),y.jsx(L0,{tableProps:e,mergedColumns:r})]})}G0.propTypes={tableProps:i.object.isRequired,toolbarProps:i.object.isRequired};const W0=({list:e,handleLinkClick:t})=>{const n=ot(),o=({list:r})=>{var s;return(s=r==null?void 0:r.sort((a,c)=>a.order-c.order))==null?void 0:s.map((a,c)=>a!=null&&a.link?y.jsx(xc,{component:"h3",sx:{fontSize:"1rem",cursor:"pointer",color:c===(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},c):y.jsx(Bt,{component:"h3",sx:{fontSize:"1rem",color:c===(r==null?void 0:r.length)-1?n.palette.brandColor.orange:n.palette.primary.notifyTextColor},children:a==null?void 0:a.title},c))};return y.jsx(Mh,{separator:y.jsx(ge,{component:"img",src:Et.ArrowRight}),children:o({list:e})})};W0.propTypes={list:i.array.isRequired,handleLinkClick:i.func};const z0=({breadcrumbProps:e})=>{const t=ot();return y.jsx(ln,{sx:{background:t.palette.primary.notifyBackground,borderBottom:`0.1rem solid ${t.palette.primary.notifyBorderColor}`,height:"3rem",p:"0 1.4rem",zIndex:3,position:"relative"},direction:"row",justifyContent:"space-between",alignItems:"center",children:y.jsx(W0,{...e})})};z0.propTypes={breadcrumbProps:i.object.isRequired};function H0({headerProps:e}){return y.jsx(Ks,{children:y.jsx(z0,{...e})})}H0.propTypes={headerProps:i.object.isRequired};const Yu=N.createContext(null),X0=N.createContext(null);function Rk({children:e}){const[t,n]=N.useReducer(Ok,Ak);return y.jsx(Yu.Provider,{value:t,children:y.jsx(X0.Provider,{value:n,children:e})})}function Ok(e,t){var n;switch(t.type){case Je.LOADING:return{...e,loading:t.loading};case Je.SUCCESS:return{...e,data:(n=t.data)==null?void 0:n.sort((o,r)=>new Date(r.createdAt)-new Date(o.createdAt))};case Je.MARK_ALL_AS_READ:return{...e,isMarkAllAsRead:t.isMarkAllAsRead};case Je.ERROR:return{...e,error:t.error};default:throw new Error(`${bn.UNHANDLED}: ${t}`)}}const Ak={loading:!1,data:[],error:"",isMarkAllAsRead:{count:0,boo:!1}};function U0(e,t){return function(){return e.apply(t,arguments)}}const{toString:Pk}=Object.prototype,{getPrototypeOf:Zu}=Object,va=(e=>t=>{const n=Pk.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),xn=e=>(e=e.toLowerCase(),t=>va(t)===e),ya=e=>t=>typeof t===e,{isArray:Cr}=Array,ki=ya("undefined");function Mk(e){return e!==null&&!ki(e)&&e.constructor!==null&&!ki(e.constructor)&&qt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Y0=xn("ArrayBuffer");function Nk(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Y0(e.buffer),t}const kk=ya("string"),qt=ya("function"),Z0=ya("number"),xa=e=>e!==null&&typeof e=="object",Bk=e=>e===!0||e===!1,Ca=e=>{if(va(e)!=="object")return!1;const t=Zu(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Dk=xn("Date"),jk=xn("File"),Fk=xn("Blob"),Vk=xn("FileList"),Lk=e=>xa(e)&&qt(e.pipe),$k=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||qt(e.append)&&((t=va(e))==="formdata"||t==="object"&&qt(e.toString)&&e.toString()==="[object FormData]"))},_k=xn("URLSearchParams"),[Gk,Wk,zk,Hk]=["ReadableStream","Request","Response","Headers"].map(xn),Xk=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Bi(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let o,r;if(typeof e!="object"&&(e=[e]),Cr(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 c;for(o=0;o<a;o++)c=s[o],t.call(null,e[c],c,e)}}function J0(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 Ro=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,q0=e=>!ki(e)&&e!==Ro;function Ju(){const{caseless:e}=q0(this)&&this||{},t={},n=(o,r)=>{const s=e&&J0(t,r)||r;Ca(t[s])&&Ca(o)?t[s]=Ju(t[s],o):Ca(o)?t[s]=Ju({},o):Cr(o)?t[s]=o.slice():t[s]=o};for(let o=0,r=arguments.length;o<r;o++)arguments[o]&&Bi(arguments[o],n);return t}const Uk=(e,t,n,{allOwnKeys:o}={})=>(Bi(t,(r,s)=>{n&&qt(r)?e[s]=U0(r,n):e[s]=r},{allOwnKeys:o}),e),Yk=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Zk=(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)},Jk=(e,t,n,o)=>{let r,s,a;const c={};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))&&!c[a]&&(t[a]=e[a],c[a]=!0);e=n!==!1&&Zu(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},qk=(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},Kk=e=>{if(!e)return null;if(Cr(e))return e;let t=e.length;if(!Z0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Qk=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Zu(Uint8Array)),e5=(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])}},t5=(e,t)=>{let n;const o=[];for(;(n=e.exec(t))!==null;)o.push(n);return o},n5=xn("HTMLFormElement"),o5=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,o,r){return o.toUpperCase()+r}),K0=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),r5=xn("RegExp"),Q0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),o={};Bi(n,(r,s)=>{let a;(a=t(r,s,e))!==!1&&(o[s]=a||r)}),Object.defineProperties(e,o)},i5=e=>{Q0(e,(t,n)=>{if(qt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const o=e[n];if(qt(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+"'")})}})},s5=(e,t)=>{const n={},o=r=>{r.forEach(s=>{n[s]=!0})};return Cr(e)?o(e):o(String(e).split(t)),n},a5=()=>{},l5=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function c5(e){return!!(e&&qt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const u5=e=>{const t=new Array(10),n=(o,r)=>{if(xa(o)){if(t.indexOf(o)>=0)return;if(!("toJSON"in o)){t[r]=o;const s=Cr(o)?[]:{};return Bi(o,(a,c)=>{const l=n(a,r+1);!ki(l)&&(s[c]=l)}),t[r]=void 0,s}}return o};return n(e,0)},d5=xn("AsyncFunction"),p5=e=>e&&(xa(e)||qt(e))&&qt(e.then)&&qt(e.catch),ev=((e,t)=>e?setImmediate:t?((n,o)=>(Ro.addEventListener("message",({source:r,data:s})=>{r===Ro&&s===n&&o.length&&o.shift()()},!1),r=>{o.push(r),Ro.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",qt(Ro.postMessage)),f5=typeof queueMicrotask<"u"?queueMicrotask.bind(Ro):typeof process<"u"&&process.nextTick||ev,$={isArray:Cr,isArrayBuffer:Y0,isBuffer:Mk,isFormData:$k,isArrayBufferView:Nk,isString:kk,isNumber:Z0,isBoolean:Bk,isObject:xa,isPlainObject:Ca,isReadableStream:Gk,isRequest:Wk,isResponse:zk,isHeaders:Hk,isUndefined:ki,isDate:Dk,isFile:jk,isBlob:Fk,isRegExp:r5,isFunction:qt,isStream:Lk,isURLSearchParams:_k,isTypedArray:Qk,isFileList:Vk,forEach:Bi,merge:Ju,extend:Uk,trim:Xk,stripBOM:Yk,inherits:Zk,toFlatObject:Jk,kindOf:va,kindOfTest:xn,endsWith:qk,toArray:Kk,forEachEntry:e5,matchAll:t5,isHTMLForm:n5,hasOwnProperty:K0,hasOwnProp:K0,reduceDescriptors:Q0,freezeMethods:i5,toObjectSet:s5,toCamelCase:o5,noop:a5,toFiniteNumber:l5,findKey:J0,global:Ro,isContextDefined:q0,isSpecCompliantForm:c5,toJSONObject:u5,isAsyncFn:d5,isThenable:p5,setImmediate:ev,asap:f5};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,this.status=r.status?r.status:null)}$.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:$.toJSONObject(this.config),code:this.code,status:this.status}}});const tv=we.prototype,nv={};["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=>{nv[e]={value:e}}),Object.defineProperties(we,nv),Object.defineProperty(tv,"isAxiosError",{value:!0}),we.from=(e,t,n,o,r,s)=>{const a=Object.create(tv);return $.toFlatObject(e,a,function(l){return l!==Error.prototype},c=>c!=="isAxiosError"),we.call(a,e.message,t,n,o,r),a.cause=e,a.name=e.name,s&&Object.assign(a,s),a};const h5=null;function qu(e){return $.isPlainObject(e)||$.isArray(e)}function ov(e){return $.endsWith(e,"[]")?e.slice(0,-2):e}function rv(e,t,n){return e?e.concat(t).map(function(r,s){return r=ov(r),!n&&s?"["+r+"]":r}).join(n?".":""):t}function m5(e){return $.isArray(e)&&!e.some(qu)}const g5=$.toFlatObject($,{},null,function(t){return/^is[A-Z]/.test(t)});function Ea(e,t,n){if(!$.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=$.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,b){return!$.isUndefined(b[h])});const o=n.metaTokens,r=n.visitor||d,s=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&$.isSpecCompliantForm(t);if(!$.isFunction(r))throw new TypeError("visitor must be a function");function u(m){if(m===null)return"";if($.isDate(m))return m.toISOString();if(!l&&$.isBlob(m))throw new we("Blob is not supported. Use a Buffer instead.");return $.isArrayBuffer(m)||$.isTypedArray(m)?l&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function d(m,h,b){let x=m;if(m&&!b&&typeof m=="object"){if($.endsWith(h,"{}"))h=o?h:h.slice(0,-2),m=JSON.stringify(m);else if($.isArray(m)&&m5(m)||($.isFileList(m)||$.endsWith(h,"[]"))&&(x=$.toArray(m)))return h=ov(h),x.forEach(function(E,I){!($.isUndefined(E)||E===null)&&t.append(a===!0?rv([h],I,s):a===null?h:h+"[]",u(E))}),!1}return qu(m)?!0:(t.append(rv(b,h,s),u(m)),!1)}const p=[],f=Object.assign(g5,{defaultVisitor:d,convertValue:u,isVisitable:qu});function g(m,h){if(!$.isUndefined(m)){if(p.indexOf(m)!==-1)throw Error("Circular reference detected in "+h.join("."));p.push(m),$.forEach(m,function(x,S){(!($.isUndefined(x)||x===null)&&r.call(t,x,$.isString(S)?S.trim():S,h,f))===!0&&g(x,h?h.concat(S):[S])}),p.pop()}}if(!$.isObject(e))throw new TypeError("data must be an object");return g(e),t}function iv(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(o){return t[o]})}function Ku(e,t){this._pairs=[],e&&Ea(e,this,t)}const sv=Ku.prototype;sv.append=function(t,n){this._pairs.push([t,n])},sv.toString=function(t){const n=t?function(o){return t.call(this,o,iv)}:iv;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function b5(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function av(e,t,n){if(!t)return e;const o=n&&n.encode||b5;$.isFunction(n)&&(n={serialize:n});const r=n&&n.serialize;let s;if(r?s=r(t,n):s=$.isURLSearchParams(t)?t.toString():new Ku(t,n).toString(o),s){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class lv{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){$.forEach(this.handlers,function(o){o!==null&&t(o)})}}const cv={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},v5={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Ku,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Qu=typeof window<"u"&&typeof document<"u",ed=typeof navigator=="object"&&navigator||void 0,y5=Qu&&(!ed||["ReactNative","NativeScript","NS"].indexOf(ed.product)<0),x5=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",C5=Qu&&window.location.href||"http://localhost",Ot={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Qu,hasStandardBrowserEnv:y5,hasStandardBrowserWebWorkerEnv:x5,navigator:ed,origin:C5},Symbol.toStringTag,{value:"Module"})),...v5};function E5(e,t){return Ea(e,new Ot.classes.URLSearchParams,Object.assign({visitor:function(n,o,r,s){return Ot.isNode&&$.isBuffer(n)?(this.append(o,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function I5(e){return $.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function T5(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 uv(e){function t(n,o,r,s){let a=n[s++];if(a==="__proto__")return!0;const c=Number.isFinite(+a),l=s>=n.length;return a=!a&&$.isArray(r)?r.length:a,l?($.hasOwnProp(r,a)?r[a]=[r[a],o]:r[a]=o,!c):((!r[a]||!$.isObject(r[a]))&&(r[a]=[]),t(n,o,r[a],s)&&$.isArray(r[a])&&(r[a]=T5(r[a])),!c)}if($.isFormData(e)&&$.isFunction(e.entries)){const n={};return $.forEachEntry(e,(o,r)=>{t(I5(o),r,n,0)}),n}return null}function S5(e,t,n){if($.isString(e))try{return(t||JSON.parse)(e),$.trim(e)}catch(o){if(o.name!=="SyntaxError")throw o}return(n||JSON.stringify)(e)}const Di={transitional:cv,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const o=n.getContentType()||"",r=o.indexOf("application/json")>-1,s=$.isObject(t);if(s&&$.isHTMLForm(t)&&(t=new FormData(t)),$.isFormData(t))return r?JSON.stringify(uv(t)):t;if($.isArrayBuffer(t)||$.isBuffer(t)||$.isStream(t)||$.isFile(t)||$.isBlob(t)||$.isReadableStream(t))return t;if($.isArrayBufferView(t))return t.buffer;if($.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(s){if(o.indexOf("application/x-www-form-urlencoded")>-1)return E5(t,this.formSerializer).toString();if((c=$.isFileList(t))||o.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Ea(c?{"files[]":t}:t,l&&new l,this.formSerializer)}}return s||r?(n.setContentType("application/json",!1),S5(t)):t}],transformResponse:[function(t){const n=this.transitional||Di.transitional,o=n&&n.forcedJSONParsing,r=this.responseType==="json";if($.isResponse(t)||$.isReadableStream(t))return t;if(t&&$.isString(t)&&(o&&!this.responseType||r)){const a=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(c){if(a)throw c.name==="SyntaxError"?we.from(c,we.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ot.classes.FormData,Blob:Ot.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};$.forEach(["delete","get","head","post","put","patch"],e=>{Di.headers[e]={}});const w5=$.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"]),R5=e=>{const t={};let n,o,r;return e&&e.split(`
240
+ `));const se=q.props.value===void 0?At:q.props.value;He.set(se,At);const Se=se===M;return At+=1,T.cloneElement(q,C({fullWidth:P==="fullWidth",indicator:Se&&!U&&et,selected:Se,selectionFollowsFocus:E,onChange:h,textColor:O,value:se},At===1&&M===!1&&!q.props.tabIndex?{tabIndex:0}:{}))}),fn=q=>{const se=Ae.current,Se=St(se).activeElement;if(Se.getAttribute("role")!=="tab")return;let tt=b==="horizontal"?"ArrowLeft":"ArrowUp",at=b==="horizontal"?"ArrowRight":"ArrowDown";switch(b==="horizontal"&&s&&(tt="ArrowRight",at="ArrowLeft"),q.key){case tt:q.preventDefault(),qs(se,Se,Nm);break;case at:q.preventDefault(),qs(se,Se,Mm);break;case"Home":q.preventDefault(),qs(se,null,Mm);break;case"End":q.preventDefault(),qs(se,null,Nm);break}},pe=vt();return y.jsxs(CA,C({className:re(z.root,p),ownerState:k,ref:n,as:f},W,{children:[pe.scrollButtonStart,pe.scrollbarSizeListener,y.jsxs(EA,{className:z.scroller,ownerState:k,style:{overflow:he.overflow,[L?`margin${s?"Left":"Right"}`:"marginBottom"]:j?void 0:-he.scrollbarWidth},ref:Xe,children:[y.jsx(IA,{"aria-label":a,"aria-labelledby":c,"aria-orientation":b==="vertical"?"vertical":null,className:z.flexContainer,ownerState:k,onKeyDown:fn,ref:Ae,role:"tablist",children:Pt}),U&&et]}),pe.scrollButtonEnd]}))});process.env.NODE_ENV!=="production"&&(Dm.propTypes={action:kt,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 wA(e){return ye("MuiTextField",e)}xe("MuiTextField",["root"]);const RA=["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"],OA={standard:Xs,filled:Hs,outlined:Ys},AA=e=>{const{classes:t}=e;return Ie({root:["root"]},wA,t)},PA=Z(Wh,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),jm=T.forwardRef(function(t,n){const o=Te({props:t,name:"MuiTextField"}),{autoComplete:r,autoFocus:s=!1,children:a,className:c,color:l="primary",defaultValue:u,disabled:d=!1,error:p=!1,FormHelperTextProps:f,fullWidth:g=!1,helperText:m,id:h,InputLabelProps:b,inputProps:x,InputProps:S,inputRef:E,label:I,maxRows:v,minRows:R,multiline:w=!1,name:O,onBlur:M,onChange:P,onFocus:j,placeholder:W,required:F=!1,rows:L,select:_=!1,SelectProps:V,type:G,value:B,variant:X="outlined"}=o,k=ne(o,RA),z=C({},o,{autoFocus:s,color:l,disabled:d,error:p,fullWidth:g,multiline:w,required:F,select:_,variant:X}),Y=AA(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=ds(h),ee=m&&U?`${U}-helper-text`:void 0,J=I&&U?`${U}-label`:void 0,oe=OA[X],te=y.jsx(oe,C({"aria-describedby":ee,autoComplete:r,autoFocus:s,defaultValue:u,fullWidth:g,multiline:w,name:O,rows:L,maxRows:v,minRows:R,type:G,value:B,id:U,inputRef:E,onBlur:M,onChange:P,onFocus:j,placeholder:W,inputProps:x},Q,S));return y.jsxs(PA,C({className:re(Y.root,c),disabled:d,error:p,fullWidth:g,ref:n,required:F,color:l,variant:X,ownerState:z},k,{children:[I!=null&&I!==""&&y.jsx(Zh,C({htmlFor:U,id:J},b,{children:I})),_?y.jsx(wc,C({"aria-describedby":ee,id:U,labelId:J,value:B,input:te},V,{children:a})):te,m&&y.jsx(Xh,C({id:ee},f,{children:m}))]}))});process.env.NODE_ENV!=="production"&&(jm.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:kt,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 MA={light:bs({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",red:"#E85353",main:"#FF6D33",grey3:"#898A93"}},typography:{fontFamily:"Euclid Circular Regular, sans-serif",fontSize:12,fontWeightMedium:"bold",fontWeightRegular:"lighter"},components:{MuiDrawer:{defaultProps:{disableRipple:!0}}}}),dark:bs({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",red:"#E85353",grey3:"#898A93"}},typography:{fontFamily:"Euclid Circular Regular, sans-serif",fontSize:12,fontWeightMedium:"bold",fontWeightRegular:"lighter"},components:{MuiDrawer:{defaultProps:{disableRipple:!0}}}})};function Ks({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 y.jsx(Xf,{theme:MA[t],children:e})}const Fm=N.createContext(null),Qs=N.createContext(null);function Vm({children:e}){const[t,n]=N.useReducer(NA,kA);return y.jsx(Fm.Provider,{value:t,children:y.jsx(Qs.Provider,{value:n,children:y.jsx(Ks,{children:e})})})}function NA(e,t){switch(t.type){case Je.SET_GRID_DATA:return{...e,...t.payload};default:throw new Error(`${bn.UNHANDLED}: ${t}`)}}const kA={visibleGridColumns:[]};Vm.propTypes={children:i.node.isRequired};const BA=(e,t)=>{const[n,o]=N.useState({isOpen:!1,column:null}),r=(c,l)=>{o({isOpen:c.currentTarget,column:l})},s=()=>{o({isOpen:!1,column:null})};return{selectedColumn:n,handleMenuClick:r,handleClose:s,handleHideClick:()=>{t({type:Je.SET_GRID_DATA,payload:{visibleGridColumns:e.map(c=>{var l;return c.key===((l=n==null?void 0:n.column)==null?void 0:l.key)?{...c,isHidden:!0}:c})}}),s()}}},ea={TOKEN:"token",USER:"user",SNOP:"snop",SELECTED_BU:"selected_business_unit"},Lm={BEARER:"Bearer",TENANT_ID:"tenant_id",BU_ID:"bu_id",SNOP_ID:"snop_id"},ta={REFRESH:"refresh",CLOSE:"close"},DA=Object.values({"SKU Name":"sku_name",Node:"node","Channel Name":"channel_name"}),$m=[10,25,50,100],_m={MARK_ALL_READ:"MARK_ALL_READ"},jA=$m.map(e=>({label:e,value:e})),Gm=N.createContext({});function FA(e){const t=N.useRef(null);return t.current===null&&(t.current=e()),t.current}const Bc=N.createContext(null),Wm=N.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function VA(e=!0){const t=N.useContext(Bc);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:o,register:r}=t,s=N.useId();N.useEffect(()=>{if(e)return r(s)},[e]);const a=N.useCallback(()=>e&&o&&o(s),[s,o,e]);return!n&&o?[!1,a]:[!0]}const Dc=typeof window<"u",LA=Dc?N.useLayoutEffect:N.useEffect,Gt=e=>e;let lr=Gt,eo=Gt;process.env.NODE_ENV!=="production"&&(lr=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},eo=(e,t)=>{if(!e)throw new Error(t)});function jc(e){let t;return()=>(t===void 0&&(t=e()),t)}const cr=(e,t,n)=>{const o=t-e;return o===0?1:(n-e)/o},Mn=e=>e*1e3,Ln=e=>e/1e3,$A={useManualTiming:!1},na=["read","resolveKeyframes","update","preRender","render","postRender"],zm={value:null};function _A(e,t){let n=new Set,o=new Set,r=!1,s=!1;const a=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1},l=0;function u(p){a.has(p)&&(d.schedule(p),e()),l++,p(c)}const d={schedule:(p,f=!1,g=!1)=>{const h=g&&r?n:o;return f&&a.add(p),h.has(p)||h.add(p),p},cancel:p=>{o.delete(p),a.delete(p)},process:p=>{if(c=p,r){s=!0;return}r=!0,[n,o]=[o,n],n.forEach(u),t&&zm.value&&zm.value.frameloop[t].push(l),l=0,n.clear(),r=!1,s&&(s=!1,d.process(p))}};return d}const GA=40;function Hm(e,t){let n=!1,o=!0;const r={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,a=na.reduce((x,S)=>(x[S]=_A(s,t?S:void 0),x),{}),{read:c,resolveKeyframes:l,update:u,preRender:d,render:p,postRender:f}=a,g=()=>{const x=performance.now();n=!1,r.delta=o?1e3/60:Math.max(Math.min(x-r.timestamp,GA),1),r.timestamp=x,r.isProcessing=!0,c.process(r),l.process(r),u.process(r),d.process(r),p.process(r),f.process(r),r.isProcessing=!1,n&&t&&(o=!1,e(g))},m=()=>{n=!0,o=!0,r.isProcessing||e(g)};return{schedule:na.reduce((x,S)=>{const E=a[S];return x[S]=(I,v=!1,R=!1)=>(n||m(),E.schedule(I,v,R)),x},{}),cancel:x=>{for(let S=0;S<na.length;S++)a[na[S]].cancel(x)},state:r,steps:a}}const{schedule:Ke,cancel:to,state:Ct,steps:Fc}=Hm(typeof requestAnimationFrame<"u"?requestAnimationFrame:Gt,!0),Xm=N.createContext({strict:!1}),Um={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"]},ur={};for(const e in Um)ur[e]={isEnabled:t=>Um[e].some(n=>!!t[n])};function WA(e){for(const t in e)ur[t]={...ur[t],...e[t]}}const zA=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 oa(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||zA.has(e)}let Ym=e=>!oa(e);function HA(e){e&&(Ym=t=>t.startsWith("on")?!oa(t):e(t))}try{HA(require("@emotion/is-prop-valid").default)}catch{}function XA(e,t,n){const o={};for(const r in e)r==="values"&&typeof e.values=="object"||(Ym(r)||n===!0&&oa(r)||!t&&!oa(r)||e.draggable&&r.startsWith("onDrag"))&&(o[r]=e[r]);return o}const Zm=new Set;function ra(e,t,n){e||Zm.has(t)||(console.warn(t),Zm.add(t))}function UA(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...o)=>(process.env.NODE_ENV!=="production"&&ra(!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 ia=N.createContext({});function sa(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function hi(e){return typeof e=="string"||Array.isArray(e)}const Vc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Lc=["initial",...Vc];function aa(e){return sa(e.animate)||Lc.some(t=>hi(e[t]))}function Jm(e){return!!(aa(e)||e.variants)}function YA(e,t){if(aa(e)){const{initial:n,animate:o}=e;return{initial:n===!1||hi(n)?n:void 0,animate:hi(o)?o:void 0}}return e.inherit!==!1?t:{}}function ZA(e){const{initial:t,animate:n}=YA(e,N.useContext(ia));return N.useMemo(()=>({initial:t,animate:n}),[qm(t),qm(n)])}function qm(e){return Array.isArray(e)?e.join(" "):e}const JA=Symbol.for("motionComponentSymbol");function dr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function qA(e,t,n){return N.useCallback(o=>{o&&e.onMount&&e.onMount(o),t&&(o?t.mount(o):t.unmount()),n&&(typeof n=="function"?n(o):dr(n)&&(n.current=o))},[t])}const $c=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Km="data-"+$c("framerAppearId"),{schedule:_c}=Hm(queueMicrotask,!1),Qm=N.createContext({});function KA(e,t,n,o,r){var s,a;const{visualElement:c}=N.useContext(ia),l=N.useContext(Xm),u=N.useContext(Bc),d=N.useContext(Wm).reducedMotion,p=N.useRef(null);o=o||l.renderer,!p.current&&o&&(p.current=o(e,{visualState:t,parent:c,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d}));const f=p.current,g=N.useContext(Qm);f&&!f.projection&&r&&(f.type==="html"||f.type==="svg")&&QA(p.current,n,r,g);const m=N.useRef(!1);N.useInsertionEffect(()=>{f&&m.current&&f.update(n,u)});const h=n[Km],b=N.useRef(!!h&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,h))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,h)));return LA(()=>{f&&(m.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),_c.render(f.render),b.current&&f.animationState&&f.animationState.animateChanges())}),N.useEffect(()=>{f&&(!b.current&&f.animationState&&f.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)===null||x===void 0||x.call(window,h)}),b.current=!1))}),f}function QA(e,t,n,o){const{layoutId:r,layout:s,drag:a,dragConstraints:c,layoutScroll:l,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:eg(e.parent)),e.projection.setOptions({layoutId:r,layout:s,alwaysMeasureLayout:!!a||c&&dr(c),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:o,layoutScroll:l,layoutRoot:u})}function eg(e){if(e)return e.options.allowProjection!==!1?e.projection:eg(e.parent)}function eP({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:o,Component:r}){var s,a;e&&WA(e);function c(u,d){let p;const f={...N.useContext(Wm),...u,layoutId:tP(u)},{isStatic:g}=f,m=ZA(u),h=o(u,g);if(!g&&Dc){nP(f,e);const b=oP(f);p=b.MeasureLayout,m.visualElement=KA(r,h,f,t,b.ProjectionNode)}return y.jsxs(ia.Provider,{value:m,children:[p&&m.visualElement?y.jsx(p,{visualElement:m.visualElement,...f}):null,n(r,u,qA(h,m.visualElement,d),h,g,m.visualElement)]})}c.displayName=`motion.${typeof r=="string"?r:`create(${(a=(s=r.displayName)!==null&&s!==void 0?s:r.name)!==null&&a!==void 0?a:""})`}`;const l=N.forwardRef(c);return l[JA]=r,l}function tP({layoutId:e}){const t=N.useContext(Gm).id;return t&&e!==void 0?t+"-"+e:e}function nP(e,t){const n=N.useContext(Xm).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?lr(!1,o):eo(!1,o)}}function oP(e){const{drag:t,layout:n}=ur;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 tg=e=>t=>typeof t=="string"&&t.startsWith(e),Gc=tg("--"),rP=tg("var(--"),Wc=e=>rP(e)?iP.test(e.split("/*")[0].trim()):!1,iP=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,mi={};function sP(e){for(const t in e)mi[t]=e[t],Gc(t)&&(mi[t].isCSSVariable=!0)}const pr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Eo=new Set(pr);function ng(e,{layout:t,layoutId:n}){return Eo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!mi[e]||e==="opacity")}const wt=e=>!!(e&&e.getVelocity),og=(e,t)=>t&&typeof e=="number"?t.transform(e):e,$n=(e,t,n)=>n>t?t:n<e?e:n,fr={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},gi={...fr,transform:e=>$n(0,1,e)},la={...fr,default:1},bi=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),no=bi("deg"),Nn=bi("%"),Ce=bi("px"),aP=bi("vh"),lP=bi("vw"),rg={...Nn,parse:e=>Nn.parse(e)/100,transform:e=>Nn.transform(e*100)},cP={borderWidth:Ce,borderTopWidth:Ce,borderRightWidth:Ce,borderBottomWidth:Ce,borderLeftWidth:Ce,borderRadius:Ce,radius:Ce,borderTopLeftRadius:Ce,borderTopRightRadius:Ce,borderBottomRightRadius:Ce,borderBottomLeftRadius:Ce,width:Ce,maxWidth:Ce,height:Ce,maxHeight:Ce,top:Ce,right:Ce,bottom:Ce,left:Ce,padding:Ce,paddingTop:Ce,paddingRight:Ce,paddingBottom:Ce,paddingLeft:Ce,margin:Ce,marginTop:Ce,marginRight:Ce,marginBottom:Ce,marginLeft:Ce,backgroundPositionX:Ce,backgroundPositionY:Ce},uP={rotate:no,rotateX:no,rotateY:no,rotateZ:no,scale:la,scaleX:la,scaleY:la,scaleZ:la,skew:no,skewX:no,skewY:no,distance:Ce,translateX:Ce,translateY:Ce,translateZ:Ce,x:Ce,y:Ce,z:Ce,perspective:Ce,transformPerspective:Ce,opacity:gi,originX:rg,originY:rg,originZ:Ce},ig={...fr,transform:Math.round},zc={...cP,...uP,zIndex:ig,size:Ce,fillOpacity:gi,strokeOpacity:gi,numOctaves:ig},dP={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},pP=pr.length;function fP(e,t,n){let o="",r=!0;for(let s=0;s<pP;s++){const a=pr[s],c=e[a];if(c===void 0)continue;let l=!0;if(typeof c=="number"?l=c===(a.startsWith("scale")?1:0):l=parseFloat(c)===0,!l||n){const u=og(c,zc[a]);if(!l){r=!1;const d=dP[a]||a;o+=`${d}(${u}) `}n&&(t[a]=u)}}return o=o.trim(),n?o=n(t,r?"":o):r&&(o="none"),o}function Hc(e,t,n){const{style:o,vars:r,transformOrigin:s}=e;let a=!1,c=!1;for(const l in t){const u=t[l];if(Eo.has(l)){a=!0;continue}else if(Gc(l)){r[l]=u;continue}else{const d=og(u,zc[l]);l.startsWith("origin")?(c=!0,s[l]=d):o[l]=d}}if(t.transform||(a||n?o.transform=fP(t,e.transform,n):o.transform&&(o.transform="none")),c){const{originX:l="50%",originY:u="50%",originZ:d=0}=s;o.transformOrigin=`${l} ${u} ${d}`}}const Xc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function sg(e,t,n){for(const o in t)!wt(t[o])&&!ng(o,n)&&(e[o]=t[o])}function hP({transformTemplate:e},t){return N.useMemo(()=>{const n=Xc();return Hc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function mP(e,t){const n=e.style||{},o={};return sg(o,n,e),Object.assign(o,hP(e,t)),o}function gP(e,t){const n={},o=mP(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 bP=["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 Uc(e){return typeof e!="string"||e.includes("-")?!1:!!(bP.indexOf(e)>-1||/[A-Z]/u.test(e))}const vP={offset:"stroke-dashoffset",array:"stroke-dasharray"},yP={offset:"strokeDashoffset",array:"strokeDasharray"};function xP(e,t,n=1,o=0,r=!0){e.pathLength=1;const s=r?vP:yP;e[s.offset]=Ce.transform(-o);const a=Ce.transform(t),c=Ce.transform(n);e[s.array]=`${a} ${c}`}function ag(e,t,n){return typeof e=="string"?e:Ce.transform(t+n*e)}function CP(e,t,n){const o=ag(t,e.x,e.width),r=ag(n,e.y,e.height);return`${o} ${r}`}function Yc(e,{attrX:t,attrY:n,attrScale:o,originX:r,originY:s,pathLength:a,pathSpacing:c=1,pathOffset:l=0,...u},d,p){if(Hc(e,u,p),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:g,dimensions:m}=e;f.transform&&(m&&(g.transform=f.transform),delete f.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&&(f.x=t),n!==void 0&&(f.y=n),o!==void 0&&(f.scale=o),a!==void 0&&xP(f,a,c,l,!1)}const lg=()=>({...Xc(),attrs:{}}),Zc=e=>typeof e=="string"&&e.toLowerCase()==="svg";function EP(e,t,n,o){const r=N.useMemo(()=>{const s=lg();return Yc(s,t,Zc(o),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};sg(s,e.style,e),r.style={...s,...r.style}}return r}function IP(e=!1){return(n,o,r,{latestValues:s},a)=>{const l=(Uc(n)?EP:gP)(o,s,a,n),u=XA(o,typeof n=="string",e),d=n!==N.Fragment?{...u,...l,ref:r}:{},{children:p}=o,f=N.useMemo(()=>wt(p)?p.get():p,[p]);return N.createElement(n,{...d,children:f})}}function cg(e){const t=[{},{}];return e==null||e.values.forEach((n,o)=>{t[0][o]=n.get(),t[1][o]=n.getVelocity()}),t}function Jc(e,t,n,o){if(typeof t=="function"){const[r,s]=cg(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]=cg(o);t=t(n!==void 0?n:e.custom,r,s)}return t}const qc=e=>Array.isArray(e),TP=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),SP=e=>qc(e)?e[e.length-1]||0:e;function ca(e){const t=wt(e)?e.get():e;return TP(t)?t.toValue():t}function wP({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},o,r,s){const a={latestValues:RP(o,r,s,e),renderState:t()};return n&&(a.onMount=c=>n({props:o,current:c,...a}),a.onUpdate=c=>n(c)),a}const ug=e=>(t,n)=>{const o=N.useContext(ia),r=N.useContext(Bc),s=()=>wP(e,t,o,r);return n?s():FA(s)};function RP(e,t,n,o){const r={},s=o(e,{});for(const f in s)r[f]=ca(s[f]);let{initial:a,animate:c}=e;const l=aa(e),u=Jm(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),c===void 0&&(c=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const p=d?c:a;if(p&&typeof p!="boolean"&&!sa(p)){const f=Array.isArray(p)?p:[p];for(let g=0;g<f.length;g++){const m=Jc(e,f[g]);if(m){const{transitionEnd:h,transition:b,...x}=m;for(const S in x){let E=x[S];if(Array.isArray(E)){const I=d?E.length-1:0;E=E[I]}E!==null&&(r[S]=E)}for(const S in h)r[S]=h[S]}}}return r}function Kc(e,t,n){var o;const{style:r}=e,s={};for(const a in r)(wt(r[a])||t.style&&wt(t.style[a])||ng(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 OP={useVisualState:ug({scrapeMotionValuesFromProps:Kc,createRenderState:Xc})};function dg(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 pg(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 fg=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 hg(e,t,n,o){pg(e,t,void 0,o);for(const r in t.attrs)e.setAttribute(fg.has(r)?r:$c(r),t.attrs[r])}function mg(e,t,n){const o=Kc(e,t,n);for(const r in e)if(wt(e[r])||wt(t[r])){const s=pr.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;o[s]=e[r]}return o}const gg=["x","y","width","height","cx","cy","r"],AP={useVisualState:ug({scrapeMotionValuesFromProps:mg,createRenderState:lg,onUpdate:({props:e,prevProps:t,current:n,renderState:o,latestValues:r})=>{if(!n)return;let s=!!e.drag;if(!s){for(const c in r)if(Eo.has(c)){s=!0;break}}if(!s)return;let a=!t;if(t)for(let c=0;c<gg.length;c++){const l=gg[c];e[l]!==t[l]&&(a=!0)}a&&Ke.read(()=>{dg(n,o),Ke.render(()=>{Yc(o,r,Zc(n.tagName),e.transformTemplate),hg(n,o)})})}})};function PP(e,t){return function(o,{forwardMotionProps:r}={forwardMotionProps:!1}){const a={...Uc(o)?AP:OP,preloadedFeatures:e,useRender:IP(r),createVisualElement:t,Component:o};return eP(a)}}function vi(e,t,n){const o=e.getProps();return Jc(o,t,n!==void 0?n:o.custom,e)}const MP=jc(()=>window.ScrollTimeline!==void 0);class NP{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(MP()&&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 kP extends NP{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function Qc(e,t){return e?e[t]||e.default||e:void 0}const eu=2e4;function bg(e){let t=0;const n=50;let o=e.next(t);for(;!o.done&&t<eu;)t+=n,o=e.next(t);return t>=eu?1/0:t}function tu(e){return typeof e=="function"}function vg(e,t){e.timeline=t,e.onfinish=null}const nu=e=>Array.isArray(e)&&typeof e[0]=="number",BP={linearEasing:void 0};function DP(e,t){const n=jc(e);return()=>{var o;return(o=BP[t])!==null&&o!==void 0?o:n()}}const ua=DP(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),yg=(e,t,n=10)=>{let o="";const r=Math.max(Math.round(t/n),2);for(let s=0;s<r;s++)o+=e(cr(0,r-1,s))+", ";return`linear(${o.substring(0,o.length-2)})`};function xg(e){return!!(typeof e=="function"&&ua()||!e||typeof e=="string"&&(e in ou||ua())||nu(e)||Array.isArray(e)&&e.every(xg))}const yi=([e,t,n,o])=>`cubic-bezier(${e}, ${t}, ${n}, ${o})`,ou={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:yi([0,.65,.55,1]),circOut:yi([.55,0,1,.45]),backIn:yi([.31,.01,.66,-.59]),backOut:yi([.33,1.53,.69,.99])};function Cg(e,t){if(e)return typeof e=="function"&&ua()?yg(e,t):nu(e)?yi(e):Array.isArray(e)?e.map(n=>Cg(n,t)||ou.easeOut):ou[e]}const yn={x:!1,y:!1};function Eg(){return yn.x||yn.y}function jP(e,t,n){var o;if(e instanceof EventTarget)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 Ig(e,t){const n=jP(e),o=new AbortController,r={passive:!0,...t,signal:o.signal};return[n,r,()=>o.abort()]}function Tg(e){return!(e.pointerType==="touch"||Eg())}function FP(e,t,n={}){const[o,r,s]=Ig(e,n),a=c=>{if(!Tg(c))return;const{target:l}=c,u=t(l,c);if(typeof u!="function"||!l)return;const d=p=>{Tg(p)&&(u(p),l.removeEventListener("pointerleave",d))};l.addEventListener("pointerleave",d,r)};return o.forEach(c=>{c.addEventListener("pointerenter",a,r)}),s}function xi(e,t){const n=`${t}PointerCapture`;if(e.target instanceof Element&&n in e.target&&e.pointerId!==void 0)try{e.target[n](e.pointerId)}catch{}}const Sg=(e,t)=>t?e===t?!0:Sg(e,t.parentElement):!1,ru=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,VP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function LP(e){return VP.has(e.tagName)||e.tabIndex!==-1}const Ci=new WeakSet;function wg(e){return t=>{t.key==="Enter"&&e(t)}}function iu(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const $P=(e,t)=>{const n=e.currentTarget;if(!n)return;const o=wg(()=>{if(Ci.has(n))return;iu(n,"down");const r=wg(()=>{iu(n,"up")}),s=()=>iu(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 Rg(e){return ru(e)&&!Eg()}function _P(e,t,n={}){const[o,r,s]=Ig(e,n),a=c=>{const l=c.currentTarget;if(!l||!Rg(c)||Ci.has(l))return;Ci.add(l),xi(c,"set");const u=t(l,c),d=(g,m)=>{l.removeEventListener("pointerup",p),l.removeEventListener("pointercancel",f),xi(g,"release"),!(!Rg(g)||!Ci.has(l))&&(Ci.delete(l),typeof u=="function"&&u(g,{success:m}))},p=g=>{(g.isTrusted?GP(g,l instanceof Element?l.getBoundingClientRect():{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}):!1)?d(g,!1):d(g,!(l instanceof Element)||Sg(l,g.target))},f=g=>{d(g,!1)};l.addEventListener("pointerup",p,r),l.addEventListener("pointercancel",f,r),l.addEventListener("lostpointercapture",f,r)};return o.forEach(c=>{c=n.useGlobalTarget?window:c;let l=!1;c instanceof HTMLElement&&(l=!0,!LP(c)&&c.getAttribute("tabindex")===null&&(c.tabIndex=0)),c.addEventListener("pointerdown",a,r),l&&c.addEventListener("focus",u=>$P(u,r),r)}),s}function GP(e,t){return e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom}function WP(e){return e==="x"||e==="y"?yn[e]?null:(yn[e]=!0,()=>{yn[e]=!1}):yn.x||yn.y?null:(yn.x=yn.y=!0,()=>{yn.x=yn.y=!1})}const Og=new Set(["width","height","top","left","right","bottom",...pr]);let da;function zP(){da=void 0}const kn={now:()=>(da===void 0&&kn.set(Ct.isProcessing||$A.useManualTiming?Ct.timestamp:performance.now()),da),set:e=>{da=e,queueMicrotask(zP)}};function su(e,t){e.indexOf(t)===-1&&e.push(t)}function au(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class lu{constructor(){this.subscriptions=[]}add(t){return su(this.subscriptions,t),()=>au(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 Pg=30,HP=e=>!isNaN(parseFloat(e));class XP{constructor(t,n={}){this.version="12.4.10",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(o,r=!0)=>{const s=kn.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=kn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=HP(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&ra(!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 lu);const o=this.events[t].add(n);return t==="change"?()=>{o(),Ke.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=kn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Pg)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Pg);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 Ei(e,t){return new XP(e,t)}function UP(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ei(n))}function YP(e,t){const n=vi(e,t);let{transitionEnd:o={},transition:r={},...s}=n||{};s={...s,...o};for(const a in s){const c=SP(s[a]);UP(e,a,c)}}function ZP(e){return!!(wt(e)&&e.add)}function cu(e,t){const n=e.getValue("willChange");if(ZP(n))return n.add(t)}function Mg(e){return e.props[Km]}const Ng=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,JP=1e-7,qP=12;function KP(e,t,n,o,r){let s,a,c=0;do a=t+(n-t)/2,s=Ng(a,o,r)-e,s>0?n=a:t=a;while(Math.abs(s)>JP&&++c<qP);return a}function Ii(e,t,n,o){if(e===t&&n===o)return Gt;const r=s=>KP(s,0,1,e,n);return s=>s===0||s===1?s:Ng(r(s),t,o)}const kg=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Bg=e=>t=>1-e(1-t),Dg=Ii(.33,1.53,.69,.99),uu=Bg(Dg),jg=kg(uu),Fg=e=>(e*=2)<1?.5*uu(e):.5*(2-Math.pow(2,-10*(e-1))),du=e=>1-Math.sin(Math.acos(e)),Vg=Bg(du),Lg=kg(du),$g=e=>/^0[^.\s]+$/u.test(e);function QP(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||$g(e):!0}const Ti=e=>Math.round(e*1e5)/1e5,pu=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function eM(e){return e==null}const tM=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,fu=(e,t)=>n=>!!(typeof n=="string"&&tM.test(n)&&n.startsWith(e)||t&&!eM(n)&&Object.prototype.hasOwnProperty.call(n,t)),_g=(e,t,n)=>o=>{if(typeof o!="string")return o;const[r,s,a,c]=o.match(pu);return{[e]:parseFloat(r),[t]:parseFloat(s),[n]:parseFloat(a),alpha:c!==void 0?parseFloat(c):1}},nM=e=>$n(0,255,e),hu={...fr,transform:e=>Math.round(nM(e))},Io={test:fu("rgb","red"),parse:_g("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:o=1})=>"rgba("+hu.transform(e)+", "+hu.transform(t)+", "+hu.transform(n)+", "+Ti(gi.transform(o))+")"};function oM(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 mu={test:fu("#"),parse:oM,transform:Io.transform},hr={test:fu("hsl","hue"),parse:_g("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:o=1})=>"hsla("+Math.round(e)+", "+Nn.transform(Ti(t))+", "+Nn.transform(Ti(n))+", "+Ti(gi.transform(o))+")"},Rt={test:e=>Io.test(e)||mu.test(e)||hr.test(e),parse:e=>Io.test(e)?Io.parse(e):hr.test(e)?hr.parse(e):mu.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Io.transform(e):hr.transform(e)},rM=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function iM(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(pu))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(rM))===null||n===void 0?void 0:n.length)||0)>0}const Gg="number",Wg="color",sM="var",aM="var(",zg="${}",lM=/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 Si(e){const t=e.toString(),n=[],o={color:[],number:[],var:[]},r=[];let s=0;const c=t.replace(lM,l=>(Rt.test(l)?(o.color.push(s),r.push(Wg),n.push(Rt.parse(l))):l.startsWith(aM)?(o.var.push(s),r.push(sM),n.push(l)):(o.number.push(s),r.push(Gg),n.push(parseFloat(l))),++s,zg)).split(zg);return{values:n,split:c,indexes:o,types:r}}function Hg(e){return Si(e).values}function Xg(e){const{split:t,types:n}=Si(e),o=t.length;return r=>{let s="";for(let a=0;a<o;a++)if(s+=t[a],r[a]!==void 0){const c=n[a];c===Gg?s+=Ti(r[a]):c===Wg?s+=Rt.transform(r[a]):s+=r[a]}return s}}const cM=e=>typeof e=="number"?0:e;function uM(e){const t=Hg(e);return Xg(e)(t.map(cM))}const oo={test:iM,parse:Hg,createTransformer:Xg,getAnimatableNone:uM},dM=new Set(["brightness","contrast","saturate","opacity"]);function pM(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[o]=n.match(pu)||[];if(!o)return e;const r=n.replace(o,"");let s=dM.has(t)?1:0;return o!==n&&(s*=100),t+"("+s+r+")"}const fM=/\b([a-z-]*)\(.*?\)/gu,gu={...oo,getAnimatableNone:e=>{const t=e.match(fM);return t?t.map(pM).join(" "):e}},hM={...zc,color:Rt,backgroundColor:Rt,outlineColor:Rt,fill:Rt,stroke:Rt,borderColor:Rt,borderTopColor:Rt,borderRightColor:Rt,borderBottomColor:Rt,borderLeftColor:Rt,filter:gu,WebkitFilter:gu},bu=e=>hM[e];function Ug(e,t){let n=bu(e);return n!==gu&&(n=oo),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const mM=new Set(["auto","none","0"]);function gM(e,t,n){let o=0,r;for(;o<e.length&&!r;){const s=e[o];typeof s=="string"&&!mM.has(s)&&Si(s).values.length&&(r=e[o]),o++}if(r&&n)for(const s of t)e[s]=Ug(n,r)}const Yg=e=>e===fr||e===Ce,Zg=(e,t)=>parseFloat(e.split(", ")[t]),Jg=(e,t)=>(n,{transform:o})=>{if(o==="none"||!o)return 0;const r=o.match(/^matrix3d\((.+)\)$/u);if(r)return Zg(r[1],t);{const s=o.match(/^matrix\((.+)\)$/u);return s?Zg(s[1],e):0}},bM=new Set(["x","y","z"]),vM=pr.filter(e=>!bM.has(e));function yM(e){const t=[];return vM.forEach(n=>{const o=e.getValue(n);o!==void 0&&(t.push([n,o.get()]),o.set(n.startsWith("scale")?1:0))}),t}const mr={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:Jg(4,13),y:Jg(5,14)};mr.translateX=mr.x,mr.translateY=mr.y;const To=new Set;let vu=!1,yu=!1;function qg(){if(yu){const e=Array.from(To).filter(o=>o.needsMeasurement),t=new Set(e.map(o=>o.element)),n=new Map;t.forEach(o=>{const r=yM(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 c;(c=o.getValue(s))===null||c===void 0||c.set(a)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}yu=!1,vu=!1,To.forEach(e=>e.complete()),To.clear()}function Kg(){To.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(yu=!0)})}function xM(){Kg(),qg()}class xu{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?(To.add(this),vu||(vu=!0,Ke.read(Kg),Ke.resolveKeyframes(qg))):(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(),c=t[t.length-1];if(a!==void 0)t[0]=a;else if(o&&n){const l=o.readValue(n,c);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=c),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),To.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,To.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Qg=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),CM=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function EM(e){const t=CM.exec(e);if(!t)return[,];const[,n,o,r]=t;return[`--${n??o}`,r]}const IM=4;function eb(e,t,n=1){eo(n<=IM,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[o,r]=EM(e);if(!o)return;const s=window.getComputedStyle(t).getPropertyValue(o);if(s){const a=s.trim();return Qg(a)?parseFloat(a):a}return Wc(r)?eb(r,t,n+1):r}const tb=e=>t=>t.test(e),nb=[fr,Ce,Nn,no,lP,aP,{test:e=>e==="auto",parse:e=>e}],ob=e=>nb.find(tb(e));class rb extends xu{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 l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),Wc(u))){const d=eb(u,n.current);d!==void 0&&(t[l]=d),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Og.has(o)||t.length!==2)return;const[r,s]=t,a=ob(r),c=ob(s);if(a!==c)if(Yg(a)&&Yg(c))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,o=[];for(let r=0;r<t.length;r++)QP(t[r])&&o.push(r);o.length&&gM(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=mr[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,c=r[a];r[a]=mr[o](n.measureViewportBox(),window.getComputedStyle(n.current)),c!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=c),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,u])=>{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const ib=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(oo.test(e)||e==="0")&&!e.startsWith("url("));function TM(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 SM(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=ib(r,t),c=ib(s,t);return lr(a===c,`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||!c?!1:TM(e)||(n==="spring"||tu(n))&&o}const wM=e=>e!==null;function pa(e,{repeat:t,repeatType:n="loop"},o){const r=e.filter(wM),s=t&&n!=="loop"&&t%2===1?0:r.length-1;return!s||o===void 0?r[s]:o}const RM=40;class sb{constructor({autoplay:t=!0,delay:n=0,type:o="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:a="loop",...c}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=kn.now(),this.options={autoplay:t,delay:n,type:o,repeat:r,repeatDelay:s,repeatType:a,...c},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>RM?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&xM(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=kn.now(),this.hasAttemptedResolve=!0;const{name:o,type:r,velocity:s,delay:a,onComplete:c,onUpdate:l,isGenerator:u}=this.options;if(!u&&!SM(t,o,r,s))if(a)this.options.duration=0;else{l&&l(pa(t,this.options,n)),c&&c(),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 lt=(e,t,n)=>e+(t-e)*n;function Cu(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 OM({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 c=n<.5?n*(1+t):n+t-n*t,l=2*n-c;r=Cu(l,c,e+1/3),s=Cu(l,c,e),a=Cu(l,c,e-1/3)}return{red:Math.round(r*255),green:Math.round(s*255),blue:Math.round(a*255),alpha:o}}function fa(e,t){return n=>n>0?t:e}const Eu=(e,t,n)=>{const o=e*e,r=n*(t*t-o)+o;return r<0?0:Math.sqrt(r)},AM=[mu,Io,hr],PM=e=>AM.find(t=>t.test(e));function ab(e){const t=PM(e);if(lr(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===hr&&(n=OM(n)),n}const lb=(e,t)=>{const n=ab(e),o=ab(t);if(!n||!o)return fa(e,t);const r={...n};return s=>(r.red=Eu(n.red,o.red,s),r.green=Eu(n.green,o.green,s),r.blue=Eu(n.blue,o.blue,s),r.alpha=lt(n.alpha,o.alpha,s),Io.transform(r))},MM=(e,t)=>n=>t(e(n)),wi=(...e)=>e.reduce(MM),Iu=new Set(["none","hidden"]);function NM(e,t){return Iu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function kM(e,t){return n=>lt(e,t,n)}function Tu(e){return typeof e=="number"?kM:typeof e=="string"?Wc(e)?fa:Rt.test(e)?lb:jM:Array.isArray(e)?cb:typeof e=="object"?Rt.test(e)?lb:BM:fa}function cb(e,t){const n=[...e],o=n.length,r=e.map((s,a)=>Tu(s)(s,t[a]));return s=>{for(let a=0;a<o;a++)n[a]=r[a](s);return n}}function BM(e,t){const n={...e,...t},o={};for(const r in n)e[r]!==void 0&&t[r]!==void 0&&(o[r]=Tu(e[r])(e[r],t[r]));return r=>{for(const s in o)n[s]=o[s](r);return n}}function DM(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],c=e.indexes[a][r[a]],l=(n=e.values[c])!==null&&n!==void 0?n:0;o[s]=l,r[a]++}return o}const jM=(e,t)=>{const n=oo.createTransformer(t),o=Si(e),r=Si(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?Iu.has(e)&&!r.values.length||Iu.has(t)&&!o.values.length?NM(e,t):wi(cb(DM(o,r),r.values),n):(lr(!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.`),fa(e,t))};function ub(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?lt(e,t,n):Tu(e)(e,t)}const FM=5;function db(e,t,n){const o=Math.max(t-FM,0);return Ag(n-e(o),t-o)}const ct={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},pb=.001;function VM({duration:e=ct.duration,bounce:t=ct.bounce,velocity:n=ct.velocity,mass:o=ct.mass}){let r,s;lr(e<=Mn(ct.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=$n(ct.minDamping,ct.maxDamping,a),e=$n(ct.minDuration,ct.maxDuration,Ln(e)),a<1?(r=u=>{const d=u*a,p=d*e,f=d-n,g=Su(u,a),m=Math.exp(-p);return pb-f/g*m},s=u=>{const p=u*a*e,f=p*n+n,g=Math.pow(a,2)*Math.pow(u,2)*e,m=Math.exp(-p),h=Su(Math.pow(u,2),a);return(-r(u)+pb>0?-1:1)*((f-g)*m)/h}):(r=u=>{const d=Math.exp(-u*e),p=(u-n)*e+1;return-.001+d*p},s=u=>{const d=Math.exp(-u*e),p=(n-u)*(e*e);return d*p});const c=5/e,l=$M(r,s,c);if(e=Mn(e),isNaN(l))return{stiffness:ct.stiffness,damping:ct.damping,duration:e};{const u=Math.pow(l,2)*o;return{stiffness:u,damping:a*2*Math.sqrt(o*u),duration:e}}}const LM=12;function $M(e,t,n){let o=n;for(let r=1;r<LM;r++)o=o-e(o)/t(o);return o}function Su(e,t){return e*Math.sqrt(1-t*t)}const _M=["duration","bounce"],GM=["stiffness","damping","mass"];function fb(e,t){return t.some(n=>e[n]!==void 0)}function WM(e){let t={velocity:ct.velocity,stiffness:ct.stiffness,damping:ct.damping,mass:ct.mass,isResolvedFromDuration:!1,...e};if(!fb(e,GM)&&fb(e,_M))if(e.visualDuration){const n=e.visualDuration,o=2*Math.PI/(n*1.2),r=o*o,s=2*$n(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:ct.mass,stiffness:r,damping:s}}else{const n=VM(e);t={...t,...n,mass:ct.mass},t.isResolvedFromDuration=!0}return t}function hb(e=ct.visualDuration,t=ct.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],c={done:!1,value:s},{stiffness:l,damping:u,mass:d,duration:p,velocity:f,isResolvedFromDuration:g}=WM({...n,velocity:-Ln(n.velocity||0)}),m=f||0,h=u/(2*Math.sqrt(l*d)),b=a-s,x=Ln(Math.sqrt(l/d)),S=Math.abs(b)<5;o||(o=S?ct.restSpeed.granular:ct.restSpeed.default),r||(r=S?ct.restDelta.granular:ct.restDelta.default);let E;if(h<1){const v=Su(x,h);E=R=>{const w=Math.exp(-h*x*R);return a-w*((m+h*x*b)/v*Math.sin(v*R)+b*Math.cos(v*R))}}else if(h===1)E=v=>a-Math.exp(-x*v)*(b+(m+x*b)*v);else{const v=x*Math.sqrt(h*h-1);E=R=>{const w=Math.exp(-h*x*R),O=Math.min(v*R,300);return a-w*((m+h*x*b)*Math.sinh(O)+v*b*Math.cosh(O))/v}}const I={calculatedDuration:g&&p||null,next:v=>{const R=E(v);if(g)c.done=v>=p;else{let w=0;h<1&&(w=v===0?Mn(m):db(E,v,R));const O=Math.abs(w)<=o,M=Math.abs(a-R)<=r;c.done=O&&M}return c.value=c.done?a:R,c},toString:()=>{const v=Math.min(bg(I),eu),R=yg(w=>I.next(v*w).value,v,30);return v+"ms "+R}};return I}function mb({keyframes:e,velocity:t=0,power:n=.8,timeConstant:o=325,bounceDamping:r=10,bounceStiffness:s=500,modifyTarget:a,min:c,max:l,restDelta:u=.5,restSpeed:d}){const p=e[0],f={done:!1,value:p},g=O=>c!==void 0&&O<c||l!==void 0&&O>l,m=O=>c===void 0?l:l===void 0||Math.abs(c-O)<Math.abs(l-O)?c:l;let h=n*t;const b=p+h,x=a===void 0?b:a(b);x!==b&&(h=x-p);const S=O=>-h*Math.exp(-O/o),E=O=>x+S(O),I=O=>{const M=S(O),P=E(O);f.done=Math.abs(M)<=u,f.value=f.done?x:P};let v,R;const w=O=>{g(f.value)&&(v=O,R=hb({keyframes:[f.value,m(f.value)],velocity:db(E,O,f.value),damping:r,stiffness:s,restDelta:u,restSpeed:d}))};return w(0),{calculatedDuration:null,next:O=>{let M=!1;return!R&&v===void 0&&(M=!0,I(O),w(O)),v!==void 0&&O>=v?R.next(O-v):(!M&&I(O),f)}}}const zM=Ii(.42,0,1,1),HM=Ii(0,0,.58,1),gb=Ii(.42,0,.58,1),XM=e=>Array.isArray(e)&&typeof e[0]!="number",bb={linear:Gt,easeIn:zM,easeInOut:gb,easeOut:HM,circIn:du,circInOut:Lg,circOut:Vg,backIn:uu,backInOut:jg,backOut:Dg,anticipate:Fg},vb=e=>{if(nu(e)){eo(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,o,r]=e;return Ii(t,n,o,r)}else if(typeof e=="string")return eo(bb[e]!==void 0,`Invalid easing type '${e}'`),bb[e];return e};function UM(e,t,n){const o=[],r=n||ub,s=e.length-1;for(let a=0;a<s;a++){let c=r(e[a],e[a+1]);if(t){const l=Array.isArray(t)?t[a]||Gt:t;c=wi(l,c)}o.push(c)}return o}function YM(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 c=UM(t,o,r),l=c.length,u=d=>{if(a&&d<e[0])return t[0];let p=0;if(l>1)for(;p<e.length-2&&!(d<e[p+1]);p++);const f=cr(e[p],e[p+1],d);return c[p](f)};return n?d=>u($n(e[0],e[s-1],d)):u}function ZM(e,t){const n=e[e.length-1];for(let o=1;o<=t;o++){const r=cr(0,t,o);e.push(lt(n,1,r))}}function JM(e){const t=[0];return ZM(t,e.length-1),t}function qM(e,t){return e.map(n=>n*t)}function KM(e,t){return e.map(()=>t||gb).splice(0,e.length-1)}function Ri({duration:e=300,keyframes:t,times:n,ease:o="easeInOut"}){const r=XM(o)?o.map(vb):vb(o),s={done:!1,value:t[0]},a=qM(n&&n.length===t.length?n:JM(t),e),c=YM(a,t,{ease:Array.isArray(r)?r:KM(t,r)});return{calculatedDuration:e,next:l=>(s.value=c(l),s.done=l>=e,s)}}const QM=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Ke.update(t,!0),stop:()=>to(t),now:()=>Ct.isProcessing?Ct.timestamp:kn.now()}},e3={decay:mb,inertia:mb,tween:Ri,keyframes:Ri,spring:hb},t3=e=>e/100;class wu extends sb{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:l}=this.options;l&&l()};const{name:n,motionValue:o,element:r,keyframes:s}=this.options,a=(r==null?void 0:r.KeyframeResolver)||xu,c=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new a(s,c,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,c=tu(n)?n:e3[n]||Ri;let l,u;process.env.NODE_ENV!=="production"&&c!==Ri&&eo(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),c!==Ri&&typeof t[0]!="number"&&(l=wi(t3,ub(t[0],t[1])),t=[0,100]);const d=c({...this.options,keyframes:t});s==="mirror"&&(u=c({...this.options,keyframes:[...t].reverse(),velocity:-a})),d.calculatedDuration===null&&(d.calculatedDuration=bg(d));const{calculatedDuration:p}=d,f=p+r,g=f*(o+1)-r;return{generator:d,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:p,resolvedDuration:f,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:O}=this.options;return{done:!0,value:O[O.length-1]}}const{finalKeyframe:r,generator:s,mirroredGenerator:a,mapPercentToKeyframes:c,keyframes:l,calculatedDuration:u,totalDuration:d,resolvedDuration:p}=o;if(this.startTime===null)return s.next(0);const{delay:f,repeat:g,repeatType:m,repeatDelay:h,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 x=this.currentTime-f*(this.speed>=0?1:-1),S=this.speed>=0?x<0:x>d;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let E=this.currentTime,I=s;if(g){const O=Math.min(this.currentTime,d)/p;let M=Math.floor(O),P=O%1;!P&&O>=1&&(P=1),P===1&&M--,M=Math.min(M,g+1),!!(M%2)&&(m==="reverse"?(P=1-P,h&&(P-=h/p)):m==="mirror"&&(I=a)),E=$n(0,1,P)*p}const v=S?{done:!1,value:l[0]}:I.next(E);c&&(v.value=c(v.value));let{done:R}=v;!S&&u!==null&&(R=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const w=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&R);return w&&r!==void 0&&(v.value=pa(l,this.options,r)),b&&b(v.value),w&&this.finish(),v}get duration(){const{resolved:t}=this;return t?Ln(t.calculatedDuration):0}get time(){return Ln(this.currentTime)}set time(t){t=Mn(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=Ln(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=QM,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 n3=new Set(["opacity","clipPath","filter","transform"]);function o3(e,t,n,{delay:o=0,duration:r=300,repeat:s=0,repeatType:a="loop",ease:c="easeInOut",times:l}={}){const u={[t]:n};l&&(u.offset=l);const d=Cg(c,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 r3=jc(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ha=10,i3=2e4;function s3(e){return tu(e.type)||e.type==="spring"||!xg(e.ease)}function a3(e,t){const n=new wu({...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<i3;)o=n.sample(s),r.push(o.value),s+=ha;return{times:void 0,keyframes:r,duration:s-ha,ease:"linear"}}const yb={anticipate:Fg,backInOut:jg,circInOut:Lg};function l3(e){return e in yb}class xb extends sb{constructor(t){super(t);const{name:n,motionValue:o,element:r,keyframes:s}=this.options;this.resolver=new rb(s,(a,c)=>this.onKeyframesResolved(a,c),n,o,r),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:o=300,times:r,ease:s,type:a,motionValue:c,name:l,startTime:u}=this.options;if(!c.owner||!c.owner.current)return!1;if(typeof s=="string"&&ua()&&l3(s)&&(s=yb[s]),s3(this.options)){const{onComplete:p,onUpdate:f,motionValue:g,element:m,...h}=this.options,b=a3(t,h);t=b.keyframes,t.length===1&&(t[1]=t[0]),o=b.duration,r=b.times,s=b.ease,a="keyframes"}const d=o3(c.owner.current,l,t,{...this.options,duration:o,times:r,ease:s});return d.startTime=u??this.calcStartTime(),this.pendingTimeline?(vg(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:p}=this.options;c.set(pa(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 Ln(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Ln(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:o}=n;o.currentTime=Mn(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 Gt;const{animation:o}=n;vg(o,t)}return Gt}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:c}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:d,onComplete:p,element:f,...g}=this.options,m=new wu({...g,keyframes:o,duration:r,type:s,ease:a,times:c,isGenerator:!0}),h=Mn(this.time);u.setWithVelocity(m.sample(h-ha).value,m.sample(h).value,ha)}const{onStop:l}=this.options;l&&l(),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:c}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=n.owner.getProps();return r3()&&o&&n3.has(o)&&!l&&!u&&!r&&s!=="mirror"&&a!==0&&c!=="inertia"}}const c3={type:"spring",stiffness:500,damping:25,restSpeed:10},u3=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),d3={type:"keyframes",duration:.8},p3={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},f3=(e,{keyframes:t})=>t.length>2?d3:Eo.has(e)?e.startsWith("scale")?u3(t[1]):c3:p3;function h3({when:e,delay:t,delayChildren:n,staggerChildren:o,staggerDirection:r,repeat:s,repeatType:a,repeatDelay:c,from:l,elapsed:u,...d}){return!!Object.keys(d).length}const Ru=(e,t,n,o={},r,s)=>a=>{const c=Qc(o,e)||{},l=c.delay||o.delay||0;let{elapsed:u=0}=o;u=u-Mn(l);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...c,delay:-u,onUpdate:f=>{t.set(f),c.onUpdate&&c.onUpdate(f)},onComplete:()=>{a(),c.onComplete&&c.onComplete()},name:e,motionValue:t,element:s?void 0:r};h3(c)||(d={...d,...f3(e,d)}),d.duration&&(d.duration=Mn(d.duration)),d.repeatDelay&&(d.repeatDelay=Mn(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 f=pa(d.keyframes,c);if(f!==void 0)return Ke.update(()=>{d.onUpdate(f),d.onComplete()}),new kP([])}return!s&&xb.supports(d)?new xb(d):new wu(d)};function m3({protectedKeys:e,needsAnimating:t},n){const o=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,o}function Cb(e,t,{delay:n=0,transitionOverride:o,type:r}={}){var s;let{transition:a=e.getDefaultTransition(),transitionEnd:c,...l}=t;o&&(a=o);const u=[],d=r&&e.animationState&&e.animationState.getState()[r];for(const p in l){const f=e.getValue(p,(s=e.latestValues[p])!==null&&s!==void 0?s:null),g=l[p];if(g===void 0||d&&m3(d,p))continue;const m={delay:n,...Qc(a||{},p)};let h=!1;if(window.MotionHandoffAnimation){const x=Mg(e);if(x){const S=window.MotionHandoffAnimation(x,p,Ke);S!==null&&(m.startTime=S,h=!0)}}cu(e,p),f.start(Ru(p,f,g,e.shouldReduceMotion&&Og.has(p)?{type:!1}:m,e,h));const b=f.animation;b&&u.push(b)}return c&&Promise.all(u).then(()=>{Ke.update(()=>{c&&YP(e,c)})}),u}function Ou(e,t,n={}){var o;const r=vi(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(Cb(e,r,n)):()=>Promise.resolve(),c=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:p,staggerDirection:f}=s;return g3(e,t,d+u,p,f,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[u,d]=l==="beforeChildren"?[a,c]:[c,a];return u().then(()=>d())}else return Promise.all([a(),c(n.delay)])}function g3(e,t,n=0,o=0,r=1,s){const a=[],c=(e.variantChildren.size-1)*o,l=r===1?(u=0)=>u*o:(u=0)=>c-u*o;return Array.from(e.variantChildren).sort(b3).forEach((u,d)=>{u.notify("AnimationStart",t),a.push(Ou(u,t,{...s,delay:n+l(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function b3(e,t){return e.sortNodePosition(t)}function v3(e,t,n={}){e.notify("AnimationStart",t);let o;if(Array.isArray(t)){const r=t.map(s=>Ou(e,s,n));o=Promise.all(r)}else if(typeof t=="string")o=Ou(e,t,n);else{const r=typeof t=="function"?vi(e,t,n.custom):t;o=Promise.all(Cb(e,r,n))}return o.then(()=>{e.notify("AnimationComplete",t)})}function Eb(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 y3=Lc.length;function Ib(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Ib(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<y3;n++){const o=Lc[n],r=e.props[o];(hi(r)||r===!1)&&(t[o]=r)}return t}const x3=[...Vc].reverse(),C3=Vc.length;function E3(e){return t=>Promise.all(t.map(({animation:n,options:o})=>v3(e,n,o)))}function I3(e){let t=E3(e),n=Tb(),o=!0;const r=l=>(u,d)=>{var p;const f=vi(e,d,l==="exit"?(p=e.presenceContext)===null||p===void 0?void 0:p.custom:void 0);if(f){const{transition:g,transitionEnd:m,...h}=f;u={...u,...h,...m}}return u};function s(l){t=l(e)}function a(l){const{props:u}=e,d=Ib(e.parent)||{},p=[],f=new Set;let g={},m=1/0;for(let b=0;b<C3;b++){const x=x3[b],S=n[x],E=u[x]!==void 0?u[x]:d[x],I=hi(E),v=x===l?S.isActive:null;v===!1&&(m=b);let R=E===d[x]&&E!==u[x]&&I;if(R&&o&&e.manuallyAnimateOnMount&&(R=!1),S.protectedKeys={...g},!S.isActive&&v===null||!E&&!S.prevProp||sa(E)||typeof E=="boolean")continue;const w=T3(S.prevProp,E);let O=w||x===l&&S.isActive&&!R&&I||b>m&&I,M=!1;const P=Array.isArray(E)?E:[E];let j=P.reduce(r(x),{});v===!1&&(j={});const{prevResolvedValues:W={}}=S,F={...W,...j},L=G=>{O=!0,f.has(G)&&(M=!0,f.delete(G)),S.needsAnimating[G]=!0;const B=e.getValue(G);B&&(B.liveStyle=!1)};for(const G in F){const B=j[G],X=W[G];if(g.hasOwnProperty(G))continue;let k=!1;qc(B)&&qc(X)?k=!Eb(B,X):k=B!==X,k?B!=null?L(G):f.add(G):B!==void 0&&f.has(G)?L(G):S.protectedKeys[G]=!0}S.prevProp=E,S.prevResolvedValues=j,S.isActive&&(g={...g,...j}),o&&e.blockInitialAnimation&&(O=!1),O&&(!(R&&w)||M)&&p.push(...P.map(G=>({animation:G,options:{type:x}})))}if(f.size){const b={};if(typeof u.initial!="boolean"){const x=vi(e,Array.isArray(u.initial)?u.initial[0]:u.initial);x&&x.transition&&(b.transition=x.transition)}f.forEach(x=>{const S=e.getBaseTarget(x),E=e.getValue(x);E&&(E.liveStyle=!0),b[x]=S??null}),p.push({animation:b})}let h=!!p.length;return o&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(h=!1),o=!1,h?t(p):Promise.resolve()}function c(l,u){var d;if(n[l].isActive===u)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(f=>{var g;return(g=f.animationState)===null||g===void 0?void 0:g.setActive(l,u)}),n[l].isActive=u;const p=a(l);for(const f in n)n[f].protectedKeys={};return p}return{animateChanges:a,setActive:c,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Tb(),o=!0}}}function T3(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Eb(t,e):!1}function So(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Tb(){return{animate:So(!0),whileInView:So(),whileHover:So(),whileTap:So(),whileDrag:So(),whileFocus:So(),exit:So()}}class ro{constructor(t){this.isMounted=!1,this.node=t}update(){}}class S3 extends ro{constructor(t){super(t),t.animationState||(t.animationState=I3(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();sa(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 w3=0;class R3 extends ro{constructor(){super(...arguments),this.id=w3++}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 O3={animation:{Feature:S3},exit:{Feature:R3}};function Oi(e,t,n,o={passive:!0}){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n)}function Ai(e){return{point:{x:e.pageX,y:e.pageY}}}const A3=e=>t=>ru(t)&&e(t,Ai(t));function gr(e,t,n,o){return Oi(e,t,A3(n),o)}function Sb({top:e,left:t,right:n,bottom:o}){return{x:{min:t,max:n},y:{min:e,max:o}}}function P3({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function M3(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}}const wb=1e-4,N3=1-wb,k3=1+wb,Rb=.01,B3=0-Rb,D3=0+Rb;function jt(e){return e.max-e.min}function j3(e,t,n){return Math.abs(e-t)<=n}function Ob(e,t,n,o=.5){e.origin=o,e.originPoint=lt(t.min,t.max,e.origin),e.scale=jt(n)/jt(t),e.translate=lt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=N3&&e.scale<=k3||isNaN(e.scale))&&(e.scale=1),(e.translate>=B3&&e.translate<=D3||isNaN(e.translate))&&(e.translate=0)}function Pi(e,t,n,o){Ob(e.x,t.x,n.x,o?o.originX:void 0),Ob(e.y,t.y,n.y,o?o.originY:void 0)}function Ab(e,t,n){e.min=n.min+t.min,e.max=e.min+jt(t)}function F3(e,t,n){Ab(e.x,t.x,n.x),Ab(e.y,t.y,n.y)}function Pb(e,t,n){e.min=t.min-n.min,e.max=e.min+jt(t)}function Mi(e,t,n){Pb(e.x,t.x,n.x),Pb(e.y,t.y,n.y)}const Mb=()=>({translate:0,scale:1,origin:0,originPoint:0}),br=()=>({x:Mb(),y:Mb()}),Nb=()=>({min:0,max:0}),mt=()=>({x:Nb(),y:Nb()});function un(e){return[e("x"),e("y")]}function Au(e){return e===void 0||e===1}function Pu({scale:e,scaleX:t,scaleY:n}){return!Au(e)||!Au(t)||!Au(n)}function wo(e){return Pu(e)||kb(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function kb(e){return Bb(e.x)||Bb(e.y)}function Bb(e){return e&&e!=="0%"}function ma(e,t,n){const o=e-n,r=t*o;return n+r}function Db(e,t,n,o,r){return r!==void 0&&(e=ma(e,r,o)),ma(e,n,o)+t}function Mu(e,t=0,n=1,o,r){e.min=Db(e.min,t,n,o,r),e.max=Db(e.max,t,n,o,r)}function jb(e,{x:t,y:n}){Mu(e.x,t.translate,t.scale,t.originPoint),Mu(e.y,n.translate,n.scale,n.originPoint)}const Fb=.999999999999,Vb=1.0000000000001;function V3(e,t,n,o=!1){const r=n.length;if(!r)return;t.x=t.y=1;let s,a;for(let c=0;c<r;c++){s=n[c],a=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(o&&s.options.layoutScroll&&s.scroll&&s!==s.root&&yr(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,jb(e,a)),o&&wo(s.latestValues)&&yr(e,s.latestValues))}t.x<Vb&&t.x>Fb&&(t.x=1),t.y<Vb&&t.y>Fb&&(t.y=1)}function vr(e,t){e.min=e.min+t,e.max=e.max+t}function Lb(e,t,n,o,r=.5){const s=lt(e.min,e.max,r);Mu(e,t,n,s,o)}function yr(e,t){Lb(e.x,t.x,t.scaleX,t.scale,t.originX),Lb(e.y,t.y,t.scaleY,t.scale,t.originY)}function $b(e,t){return Sb(M3(e.getBoundingClientRect(),t))}function L3(e,t,n){const o=$b(e,n),{scroll:r}=t;return r&&(vr(o.x,r.offset.x),vr(o.y,r.offset.y)),o}const _b=(e,t)=>Math.abs(e-t);function $3(e,t){const n=_b(e.x,t.x),o=_b(e.y,t.y);return Math.sqrt(n**2+o**2)}class Gb{constructor(t,n,{transformPagePoint:o,dragSnapToOrigin:r=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=ku(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,f=$3(d.offset,{x:0,y:0})>=3;if(!p&&!f)return;const{point:g}=d,{timestamp:m}=Ct;this.history.push({...g,timestamp:m});const{onStart:h,onMove:b}=this.handlers;p||(h&&h(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,d)},this.handlePointerMove=(d,p)=>{if(this.index=Hb(d.currentTarget),d.target instanceof Element&&d.target.hasPointerCapture&&d.pointerId!==void 0)try{if(!d.target.hasPointerCapture(d.pointerId))return}catch{}this.lastMoveEvent=d,this.lastMoveEventInfo=Nu(p,this.transformPagePoint),Ke.update(this.updatePoint,!0)},this.handlePointerUp=(d,p)=>{xi(d,"release"),this.end();const{onEnd:f,onSessionEnd:g,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=ku(d.type==="pointercancel"||d.type==="lostpointercapture"?this.lastMoveEventInfo:Nu(p,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,h),g&&g(d,h)},!ru(t))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=o;const s=Ai(t),a=Nu(s,this.transformPagePoint),{point:c}=a,{timestamp:l}=Ct;this.history=[{...c,timestamp:l}];const{onSessionStart:u}=n;u&&u(t,ku(a,this.history)),xi(t,"set"),this.removeListeners=wi(gr(t.currentTarget,"pointermove",this.handlePointerMove),gr(t.currentTarget,"pointerup",this.handlePointerUp),gr(t.currentTarget,"pointercancel",this.handlePointerUp),gr(t.currentTarget,"lostpointercapture",(d,p)=>{Hb(d.currentTarget)!==this.index?xi(d,"set"):this.handlePointerUp(d,p)}))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),to(this.updatePoint)}}function Nu(e,t){return t?{point:t(e.point)}:e}function Wb(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ku({point:e},t){return{point:e,delta:Wb(e,zb(t)),offset:Wb(e,_3(t)),velocity:G3(t,.1)}}function _3(e){return e[0]}function zb(e){return e[e.length-1]}function G3(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,o=null;const r=zb(e);for(;n>=0&&(o=e[n],!(r.timestamp-o.timestamp>Mn(t)));)n--;if(!o)return{x:0,y:0};const s=Ln(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}function Hb(e){return e.parentNode?Array.from(e.parentNode.children).indexOf(e):-1}function W3(e,{min:t,max:n},o){return t!==void 0&&e<t?e=o?lt(t,e,o.min):Math.max(e,t):n!==void 0&&e>n&&(e=o?lt(n,e,o.max):Math.min(e,n)),e}function Xb(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 z3(e,{top:t,left:n,bottom:o,right:r}){return{x:Xb(e.x,n,r),y:Xb(e.y,t,o)}}function Ub(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 H3(e,t){return{x:Ub(e.x,t.x),y:Ub(e.y,t.y)}}function X3(e,t){let n=.5;const o=jt(e),r=jt(t);return r>o?n=cr(t.min,t.max-o,e.min):o>r&&(n=cr(e.min,e.max-r,t.min)),$n(0,1,n)}function U3(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 Bu=.35;function Y3(e=Bu){return e===!1?e=0:e===!0&&(e=Bu),{x:Yb(e,"left","right"),y:Yb(e,"top","bottom")}}function Yb(e,t,n){return{min:Zb(e,t),max:Zb(e,n)}}function Zb(e,t){return typeof e=="number"?e:e[t]||0}const Z3=new WeakMap;class J3{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(Ai(d).point)},s=(d,p)=>{const{drag:f,dragPropagation:g,onDragStart:m}=this.getProps();if(f&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=WP(f),!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),un(b=>{let x=this.getAxisMotionValue(b).get()||0;if(Nn.test(x)){const{projection:S}=this.visualElement;if(S&&S.layout){const E=S.layout.layoutBox[b];E&&(x=jt(E)*(parseFloat(x)/100))}}this.originPoint[b]=x}),m&&Ke.postRender(()=>m(d,p)),cu(this.visualElement,"transform");const{animationState:h}=this.visualElement;h&&h.setActive("whileDrag",!0)},a=(d,p)=>{const{dragPropagation:f,dragDirectionLock:g,onDirectionLock:m,onDrag:h}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:b}=p;if(g&&this.currentDirection===null){this.currentDirection=q3(b),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",p.point,b),this.updateAxis("y",p.point,b),this.visualElement.render(),h&&h(d,p)},c=(d,p)=>this.stop(d,p),l=()=>un(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 Gb(t,{onSessionStart:r,onStart:s,onMove:a,onSessionEnd:c,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u})}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&&Ke.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||!ga(t,r,this.currentDirection))return;const s=this.getAxisMotionValue(t);let a=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(a=W3(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&&dr(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&r?this.constraints=z3(r.layoutBox,n):this.constraints=!1,this.elastic=Y3(o),s!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&un(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=U3(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!dr(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=L3(o,r.root,this.visualElement.getTransformPagePoint());let a=H3(r.layout.layoutBox,s);if(n){const c=n(P3(a));this.hasMutatedConstraints=!!c,c&&(a=Sb(c))}return a}startAnimation(t){const{drag:n,dragMomentum:o,dragElastic:r,dragTransition:s,dragSnapToOrigin:a,onDragTransitionEnd:c}=this.getProps(),l=this.constraints||{},u=un(d=>{if(!ga(d,n,this.currentDirection))return;let p=l&&l[d]||{};a&&(p={min:0,max:0});const f=r?200:1e6,g=r?40:1e7,m={type:"inertia",velocity:o?t[d]:0,bounceStiffness:f,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...s,...p};return this.startAxisValueAnimation(d,m)});return Promise.all(u).then(c)}startAxisValueAnimation(t,n){const o=this.getAxisMotionValue(t);return cu(this.visualElement,t),o.start(Ru(t,o,0,n,this.visualElement,!1))}stopAnimation(){un(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){un(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){un(n=>{const{drag:o}=this.getProps();if(!ga(n,o,this.currentDirection))return;const{projection:r}=this.visualElement,s=this.getAxisMotionValue(n);if(r&&r.layout){const{min:a,max:c}=r.layout.layoutBox[n];s.set(t[n]-lt(a,c,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:o}=this.visualElement;if(!dr(n)||!o||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};un(a=>{const c=this.getAxisMotionValue(a);if(c&&this.constraints!==!1){const l=c.get();r[a]=X3({min:l,max:l},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(),un(a=>{if(!ga(a,t,null))return;const c=this.getAxisMotionValue(a),{min:l,max:u}=this.constraints[a];c.set(lt(l,u,r[a]))})}addListeners(){if(!this.visualElement.current)return;Z3.set(this.visualElement,this);const t=this.visualElement.current,n=gr(t,"pointerdown",l=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(l)}),o=()=>{const{dragConstraints:l}=this.getProps();dr(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,s=r.addEventListener("measure",o);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),Ke.read(o);const a=Oi(window,"resize",()=>this.scalePositionWithinConstraints()),c=r.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(un(d=>{const p=this.getAxisMotionValue(d);p&&(this.originPoint[d]+=l[d].translate,p.set(p.get()+l[d].translate))}),this.visualElement.render())});return()=>{a(),n(),s(),c&&c()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:o=!1,dragPropagation:r=!1,dragConstraints:s=!1,dragElastic:a=Bu,dragMomentum:c=!0}=t;return{...t,drag:n,dragDirectionLock:o,dragPropagation:r,dragConstraints:s,dragElastic:a,dragMomentum:c}}}function ga(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function q3(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class K3 extends ro{constructor(t){super(t),this.removeGroupControls=Gt,this.removeListeners=Gt,this.controls=new J3(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Gt}unmount(){this.removeGroupControls(),this.removeListeners()}}const Jb=e=>(t,n)=>{e&&Ke.postRender(()=>e(t,n))};class Q3 extends ro{constructor(){super(...arguments),this.removePointerDownListener=Gt}onPointerDown(t){this.session=new Gb(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:o,onPanEnd:r}=this.node.getProps();return{onSessionStart:Jb(t),onStart:Jb(n),onMove:o,onEnd:(s,a)=>{delete this.session,r&&Ke.postRender(()=>r(s,a))}}}mount(){this.removePointerDownListener=gr(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 ba={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function qb(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ni={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ce.test(e))e=parseFloat(e);else return e;const n=qb(e,t.target.x),o=qb(e,t.target.y);return`${n}% ${o}%`}},eN={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,c=n.x.scale*t.x,l=n.y.scale*t.y;r[0+a]/=c,r[1+a]/=l;const u=lt(c,l,.5);return typeof r[2+a]=="number"&&(r[2+a]/=u),typeof r[3+a]=="number"&&(r[3+a]/=u),s(r)}};class tN extends N.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o,layoutId:r}=this.props,{projection:s}=t;sP(nN),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()})),ba.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||t.isPresent!==s?a.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?a.promote():a.relegate()||Ke.postRender(()=>{const c=a.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),_c.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 Kb(e){const[t,n]=VA(),o=N.useContext(Gm);return y.jsx(tN,{...e,layoutGroup:o,switchLayoutGroup:N.useContext(Qm),isPresent:t,safeToRemove:n})}const nN={borderRadius:{...Ni,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ni,borderTopRightRadius:Ni,borderBottomLeftRadius:Ni,borderBottomRightRadius:Ni,boxShadow:eN};function oN(e,t,n){const o=wt(e)?e:Ei(e);return o.start(Ru("",o,t,n)),o.animation}function rN(e){return e instanceof SVGElement&&e.tagName!=="svg"}const iN=(e,t)=>e.depth-t.depth;class sN{constructor(){this.children=[],this.isDirty=!1}add(t){su(this.children,t),this.isDirty=!0}remove(t){au(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(iN),this.isDirty=!1,this.children.forEach(t)}}function aN(e,t){const n=kn.now(),o=({timestamp:r})=>{const s=r-n;s>=t&&(to(o),e(s-t))};return Ke.read(o,!0),()=>to(o)}const Qb=["TopLeft","TopRight","BottomLeft","BottomRight"],lN=Qb.length,e0=e=>typeof e=="string"?parseFloat(e):e,t0=e=>typeof e=="number"||Ce.test(e);function cN(e,t,n,o,r,s){r?(e.opacity=lt(0,n.opacity!==void 0?n.opacity:1,uN(o)),e.opacityExit=lt(t.opacity!==void 0?t.opacity:1,0,dN(o))):s&&(e.opacity=lt(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,o));for(let a=0;a<lN;a++){const c=`border${Qb[a]}Radius`;let l=n0(t,c),u=n0(n,c);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||t0(l)===t0(u)?(e[c]=Math.max(lt(e0(l),e0(u),o),0),(Nn.test(u)||Nn.test(l))&&(e[c]+="%")):e[c]=u}(t.rotate||n.rotate)&&(e.rotate=lt(t.rotate||0,n.rotate||0,o))}function n0(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const uN=o0(0,.5,Vg),dN=o0(.5,.95,Gt);function o0(e,t,n){return o=>o<e?0:o>t?1:n(cr(e,t,o))}function r0(e,t){e.min=t.min,e.max=t.max}function dn(e,t){r0(e.x,t.x),r0(e.y,t.y)}function i0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function s0(e,t,n,o,r){return e-=t,e=ma(e,1/n,o),r!==void 0&&(e=ma(e,1/r,o)),e}function pN(e,t=0,n=1,o=.5,r,s=e,a=e){if(Nn.test(t)&&(t=parseFloat(t),t=lt(a.min,a.max,t/100)-a.min),typeof t!="number")return;let c=lt(s.min,s.max,o);e===s&&(c-=t),e.min=s0(e.min,t,n,c,r),e.max=s0(e.max,t,n,c,r)}function a0(e,t,[n,o,r],s,a){pN(e,t[n],t[o],t[r],t.scale,s,a)}const fN=["x","scaleX","originX"],hN=["y","scaleY","originY"];function l0(e,t,n,o){a0(e.x,t,fN,n?n.x:void 0,o?o.x:void 0),a0(e.y,t,hN,n?n.y:void 0,o?o.y:void 0)}function c0(e){return e.translate===0&&e.scale===1}function u0(e){return c0(e.x)&&c0(e.y)}function d0(e,t){return e.min===t.min&&e.max===t.max}function mN(e,t){return d0(e.x,t.x)&&d0(e.y,t.y)}function p0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function f0(e,t){return p0(e.x,t.x)&&p0(e.y,t.y)}function h0(e){return jt(e.x)/jt(e.y)}function m0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class gN{constructor(){this.members=[]}add(t){su(this.members,t),t.scheduleRender()}remove(t){if(au(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 bN(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:f,skewX:g,skewY:m}=n;u&&(o=`perspective(${u}px) ${o}`),d&&(o+=`rotate(${d}deg) `),p&&(o+=`rotateX(${p}deg) `),f&&(o+=`rotateY(${f}deg) `),g&&(o+=`skewX(${g}deg) `),m&&(o+=`skewY(${m}deg) `)}const c=e.x.scale*t.x,l=e.y.scale*t.y;return(c!==1||l!==1)&&(o+=`scale(${c}, ${l})`),o||"none"}const Du=["","X","Y","Z"],vN={visibility:"hidden"},g0=1e3;let yN=0;function ju(e,t,n,o){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),o&&(o[e]=0))}function b0(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Mg(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ke,!(r||s))}const{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&b0(o)}function v0({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:o,resetTransform:r}){return class{constructor(a={},c=t==null?void 0:t()){this.id=yN++,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(EN),this.nodes.forEach(RN),this.nodes.forEach(ON),this.nodes.forEach(IN)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new sN)}addEventListener(a,c){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new lu),this.eventHandlers.get(a).add(c)}notifyListeners(a,...c){const l=this.eventHandlers.get(a);l&&l.notify(...c)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,c=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=rN(a),this.instance=a;const{layoutId:l,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),c&&(u||l)&&(this.isLayoutDirty=!0),e){let p;const f=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,p&&p(),p=aN(f,250),ba.hasAnimatedSinceResize&&(ba.hasAnimatedSinceResize=!1,this.nodes.forEach(x0))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&d&&(l||u)&&this.addEventListener("didUpdate",({delta:p,hasLayoutChanged:f,hasRelativeLayoutChanged:g,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const h=this.options.transition||d.getDefaultTransition()||kN,{onLayoutAnimationStart:b,onLayoutAnimationComplete:x}=d.getProps(),S=!this.targetLayout||!f0(this.targetLayout,m),E=!f&&g;if(this.options.layoutRoot||this.resumeFrom||E||f&&(S||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(p,E);const I={...Qc(h,"layout"),onPlay:b,onComplete:x};(d.shouldReduceMotion||this.options.layoutRoot)&&(I.delay=0,I.type=!1),this.startAnimation(I)}else f||x0(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(AN),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&&b0(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:c,layout:l}=this.options;if(c===void 0&&!l)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(y0);return}this.isUpdating||this.nodes.forEach(SN),this.isUpdating=!1,this.nodes.forEach(wN),this.nodes.forEach(xN),this.nodes.forEach(CN),this.clearAllSnapshots();const c=kn.now();Ct.delta=$n(0,1e3/60,c-Ct.timestamp),Ct.timestamp=c,Ct.isProcessing=!0,Fc.update.process(Ct),Fc.preRender.process(Ct),Fc.render.process(Ct),Ct.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,_c.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(TN),this.sharedNodes.forEach(PN)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ke.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ke.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!jt(this.snapshot.measuredBox.x)&&!jt(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 l=0;l<this.path.length;l++)this.path[l].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:c}=this.options;c&&c.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let c=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(c=!1),c){const l=o(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!r)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,c=this.projectionDelta&&!u0(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;a&&(c||wo(this.latestValues)||d)&&(r(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const c=this.measurePageBox();let l=this.removeElementScroll(c);return a&&(l=this.removeTransform(l)),BN(l),{animationId:this.root.animationId,measuredBox:c,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:c}=this.options;if(!c)return mt();const l=c.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(DN))){const{scroll:d}=this.root;d&&(vr(l.x,d.offset.x),vr(l.y,d.offset.y))}return l}removeElementScroll(a){var c;const l=mt();if(dn(l,a),!((c=this.scroll)===null||c===void 0)&&c.wasRoot)return l;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:p,options:f}=d;d!==this.root&&p&&f.layoutScroll&&(p.wasRoot&&dn(l,a),vr(l.x,p.offset.x),vr(l.y,p.offset.y))}return l}applyTransform(a,c=!1){const l=mt();dn(l,a);for(let u=0;u<this.path.length;u++){const d=this.path[u];!c&&d.options.layoutScroll&&d.scroll&&d!==d.root&&yr(l,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),wo(d.latestValues)&&yr(l,d.latestValues)}return wo(this.latestValues)&&yr(l,this.latestValues),l}removeTransform(a){const c=mt();dn(c,a);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!wo(u.latestValues))continue;Pu(u.latestValues)&&u.updateSnapshot();const d=mt(),p=u.measurePageBox();dn(d,p),l0(c,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return wo(this.latestValues)&&l0(c,this.latestValues),c}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!==Ct.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var c;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(a||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((c=this.parent)===null||c===void 0)&&c.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:p,layoutId:f}=this.options;if(!(!this.layout||!(p||f))){if(this.resolvedRelativeTargetAt=Ct.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(),Mi(this.relativeTargetOrigin,this.layout.layoutBox,g.layout.layoutBox),dn(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(),F3(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):dn(this.target,this.layout.layoutBox),jb(this.target,this.targetDelta)):dn(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(),Mi(this.relativeTargetOrigin,this.target,g.target),dn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Pu(this.parent.latestValues)||kb(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 c=this.getLead(),l=!!this.resumingFrom||this!==c;let u=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===Ct.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;dn(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,g=this.treeScale.y;V3(this.layoutCorrected,this.treeScale,this.path,l),c.layout&&!c.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(c.target=c.layout.layoutBox,c.targetWithTransforms=mt());const{target:m}=c;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(i0(this.prevProjectionDelta.x,this.projectionDelta.x),i0(this.prevProjectionDelta.y,this.projectionDelta.y)),Pi(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==g||!m0(this.projectionDelta.x,this.prevProjectionDelta.x)||!m0(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 c;if((c=this.options.visualElement)===null||c===void 0||c.scheduleRender(),a){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=br(),this.projectionDelta=br(),this.projectionDeltaWithTransform=br()}setAnimationOrigin(a,c=!1){const l=this.snapshot,u=l?l.latestValues:{},d={...this.latestValues},p=br();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!c;const f=mt(),g=l?l.source:void 0,m=this.layout?this.layout.source:void 0,h=g!==m,b=this.getStack(),x=!b||b.members.length<=1,S=!!(h&&!x&&this.options.crossfade===!0&&!this.path.some(NN));this.animationProgress=0;let E;this.mixTargetDelta=I=>{const v=I/1e3;C0(p.x,a.x,v),C0(p.y,a.y,v),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Mi(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),MN(this.relativeTarget,this.relativeTargetOrigin,f,v),E&&mN(this.relativeTarget,E)&&(this.isProjectionDirty=!1),E||(E=mt()),dn(E,this.relativeTarget)),h&&(this.animationValues=d,cN(d,u,this.latestValues,v,S,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=v},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=Ke.update(()=>{ba.hasAnimatedSinceResize=!0,this.currentAnimation=oN(0,g0,{...a,onUpdate:c=>{this.mixTargetDelta(c),a.onUpdate&&a.onUpdate(c)},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(g0),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:c,target:l,layout:u,latestValues:d}=a;if(!(!c||!l||!u)){if(this!==a&&this.layout&&u&&w0(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||mt();const p=jt(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+p;const f=jt(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+f}dn(c,l),yr(c,d),Pi(this.projectionDeltaWithTransform,this.layoutCorrected,c,d)}}registerSharedNode(a,c){this.sharedNodes.has(a)||this.sharedNodes.set(a,new gN),this.sharedNodes.get(a).add(c);const u=c.options.initialPromotionConfig;c.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(c):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:c}=this.options;return c?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:c}=this.options;return c?(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:c,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let c=!1;const{latestValues:l}=a;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(c=!0),!c)return;const u={};l.z&&ju("z",a,u,this.animationValues);for(let d=0;d<Du.length;d++)ju(`rotate${Du[d]}`,a,u,this.animationValues),ju(`skew${Du[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 c,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return vN;const u={visibility:""},d=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=ca(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 h={};return this.options.layoutId&&(h.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,h.pointerEvents=ca(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!wo(this.latestValues)&&(h.transform=d?d({},""):"none",this.hasProjected=!1),h}const f=p.animationValues||p.latestValues;this.applyTransformsToTarget(),u.transform=bN(this.projectionDeltaWithTransform,this.treeScale,f),d&&(u.transform=d(f,u.transform));const{x:g,y:m}=this.projectionDelta;u.transformOrigin=`${g.origin*100}% ${m.origin*100}% 0`,p.animationValues?u.opacity=p===this?(l=(c=f.opacity)!==null&&c!==void 0?c:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:u.opacity=p===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const h in mi){if(f[h]===void 0)continue;const{correct:b,applyTo:x,isCSSVariable:S}=mi[h],E=u.transform==="none"?f[h]:b(f[h],p);if(x){const I=x.length;for(let v=0;v<I;v++)u[x[v]]=E}else S?this.options.visualElement.renderState.vars[h]=E:u[h]=E}return this.options.layoutId&&(u.pointerEvents=p===this?ca(a==null?void 0:a.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var c;return(c=a.currentAnimation)===null||c===void 0?void 0:c.stop()}),this.root.nodes.forEach(y0),this.root.sharedNodes.clear()}}}function xN(e){e.updateLayout()}function CN(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"?un(p=>{const f=a?n.measuredBox[p]:n.layoutBox[p],g=jt(f);f.min=o[p].min,f.max=f.min+g}):w0(s,n.layoutBox,o)&&un(p=>{const f=a?n.measuredBox[p]:n.layoutBox[p],g=jt(o[p]);f.max=f.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[p].max=e.relativeTarget[p].min+g)});const c=br();Pi(c,o,n.layoutBox);const l=br();a?Pi(l,e.applyTransform(r,!0),n.measuredBox):Pi(l,o,n.layoutBox);const u=!u0(c);let d=!1;if(!e.resumeFrom){const p=e.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:f,layout:g}=p;if(f&&g){const m=mt();Mi(m,n.layoutBox,f.layoutBox);const h=mt();Mi(h,o,g.layoutBox),f0(m,h)||(d=!0),p.options.layoutRoot&&(e.relativeTarget=h,e.relativeTargetOrigin=m,e.relativeParent=p)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:n,delta:l,layoutDelta:c,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:o}=e.options;o&&o()}e.options.transition=void 0}function EN(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 IN(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function TN(e){e.clearSnapshot()}function y0(e){e.clearMeasurements()}function SN(e){e.isLayoutDirty=!1}function wN(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function x0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function RN(e){e.resolveTargetDelta()}function ON(e){e.calcProjection()}function AN(e){e.resetSkewAndRotation()}function PN(e){e.removeLeadSnapshot()}function C0(e,t,n){e.translate=lt(t.translate,0,n),e.scale=lt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function E0(e,t,n,o){e.min=lt(t.min,n.min,o),e.max=lt(t.max,n.max,o)}function MN(e,t,n,o){E0(e.x,t.x,n.x,o),E0(e.y,t.y,n.y,o)}function NN(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const kN={duration:.45,ease:[.4,0,.1,1]},I0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),T0=I0("applewebkit/")&&!I0("chrome/")?Math.round:Gt;function S0(e){e.min=T0(e.min),e.max=T0(e.max)}function BN(e){S0(e.x),S0(e.y)}function w0(e,t,n){return e==="position"||e==="preserve-aspect"&&!j3(h0(t),h0(n),.2)}function DN(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const jN=v0({attachResizeListener:(e,t)=>Oi(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Fu={current:void 0},R0=v0({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Fu.current){const e=new jN({});e.mount(window),e.setOptions({layoutScroll:!0}),Fu.current=e}return Fu.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),FN={pan:{Feature:Q3},drag:{Feature:K3,ProjectionNode:R0,MeasureLayout:Kb}};function O0(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&&Ke.postRender(()=>s(t,Ai(t)))}class VN extends ro{mount(){const{current:t}=this.node;t&&(this.unmount=FP(t,(n,o)=>(O0(this.node,o,"Start"),r=>O0(this.node,r,"End"))))}unmount(){}}class LN 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=wi(Oi(this.node.current,"focus",()=>this.onFocus()),Oi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function A0(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&&Ke.postRender(()=>s(t,Ai(t)))}class $N extends ro{mount(){const{current:t}=this.node;t&&(this.unmount=_P(t,(n,o)=>(A0(this.node,o,"Start"),(r,{success:s})=>A0(this.node,r,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Vu=new WeakMap,Lu=new WeakMap,_N=e=>{const t=Vu.get(e.target);t&&t(e)},GN=e=>{e.forEach(_N)};function WN({root:e,...t}){const n=e||document;Lu.has(n)||Lu.set(n,{});const o=Lu.get(n),r=JSON.stringify(t);return o[r]||(o[r]=new IntersectionObserver(GN,{root:e,...t})),o[r]}function zN(e,t,n){const o=WN(t);return Vu.set(e,n),o.observe(e),()=>{Vu.delete(e),o.unobserve(e)}}const HN={some:0,all:1};class XN 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:HN[r]},c=l=>{const{isIntersecting:u}=l;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(),f=u?d:p;f&&f(l)};return zN(this.node.current,a,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(UN(t,n))&&this.startObserver()}unmount(){}}function UN({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const YN={inView:{Feature:XN},tap:{Feature:$N},focus:{Feature:LN},hover:{Feature:VN}},ZN={layout:{ProjectionNode:R0,MeasureLayout:Kb}},$u={current:null},P0={current:!1};function JN(){if(P0.current=!0,!!Dc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>$u.current=e.matches;e.addListener(t),t()}else $u.current=!1}const qN=[...nb,Rt,oo],KN=e=>qN.find(tb(e)),QN=new WeakMap;function ek(e,t,n){for(const o in t){const r=t[o],s=n[o];if(wt(r))e.addValue(o,r),process.env.NODE_ENV==="development"&&ra(r.version==="12.4.10",`Attempting to mix Motion versions ${r.version} with 12.4.10 may not work as expected.`);else if(wt(s))e.addValue(o,Ei(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,Ei(a!==void 0?a:r,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const M0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class tk{scrapeMotionValuesFromProps(t,n,o){return{}}constructor({parent:t,props:n,presenceContext:o,reducedMotionConfig:r,blockInitialAnimation:s,visualState:a},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=xu,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=kn.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,Ke.render(this.render,!1,!0))};const{latestValues:l,renderState:u,onUpdate:d}=a;this.onUpdate=d,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=o,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=c,this.blockInitialAnimation=!!s,this.isControllingVariants=aa(n),this.isVariantNode=Jm(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:p,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const g in f){const m=f[g];l[g]!==void 0&&wt(m)&&m.set(l[g],!1)}}mount(t){this.current=t,QN.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)),P0.current||JN(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:$u.current,process.env.NODE_ENV!=="production"&&ra(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=Eo.has(t);o&&this.onBindTransform&&this.onBindTransform();const r=n.on("change",c=>{this.latestValues[t]=c,this.props.onUpdate&&Ke.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 ur){const n=ur[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<M0.length;o++){const r=M0[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=ek(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=Ei(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)||$g(r))?r=parseFloat(r):!KN(r)&&oo.test(n)&&(r=Ug(t,n)),this.setBaseTarget(t,wt(r)?r.get():r)),wt(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=Jc(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&&!wt(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 lu),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class N0 extends tk{constructor(){super(...arguments),this.KeyframeResolver=rb}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;wt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function nk(e){return window.getComputedStyle(e)}class ok extends N0{constructor(){super(...arguments),this.type="html",this.renderInstance=pg}readValueFromInstance(t,n){if(Eo.has(n)){const o=bu(n);return o&&o.default||0}else{const o=nk(t),r=(Gc(n)?o.getPropertyValue(n):o[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return $b(t,n)}build(t,n,o){Hc(t,n,o.transformTemplate)}scrapeMotionValuesFromProps(t,n,o){return Kc(t,n,o)}}class rk extends N0{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=mt,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&dg(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Eo.has(n)){const o=bu(n);return o&&o.default||0}return n=fg.has(n)?n:$c(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,o){return mg(t,n,o)}onBindTransform(){this.current&&!this.renderState.dimensions&&Ke.postRender(this.updateDimensions)}build(t,n,o){Yc(t,n,this.isSVGTag,o.transformTemplate)}renderInstance(t,n,o,r){hg(t,n,o,r)}mount(t){this.isSVGTag=Zc(t.tagName),super.mount(t)}}const ik=(e,t)=>Uc(e)?new rk(t):new ok(t,{allowProjection:e!==N.Fragment}),sk=PP({...O3,...YN,...FN,...ZN},ik),pn=UA(sk),Et={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",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",Expand:"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='M14.3332%203.5665C14.3332%204.17317%2014.0465%204.71317%2013.6065%205.05984C13.2865%205.31317%2012.8799%205.4665%2012.4332%205.4665C11.3799%205.4665%2010.5332%204.61984%2010.5332%203.5665C10.5332%203.11984%2010.6865%202.71984%2010.9399%202.39317H10.9465C11.2865%201.95317%2011.8265%201.6665%2012.4332%201.6665C13.4865%201.6665%2014.3332%202.51317%2014.3332%203.5665Z'%20stroke='%230166FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5.46602%203.5665C5.46602%204.61984%204.61935%205.4665%203.56602%205.4665C3.11935%205.4665%202.71935%205.31317%202.39268%205.05984C1.95268%204.71317%201.66602%204.17317%201.66602%203.5665C1.66602%202.51317%202.51268%201.6665%203.56602%201.6665C4.17268%201.6665%204.71268%201.95317%205.05935%202.39317C5.31268%202.71984%205.46602%203.11984%205.46602%203.5665Z'%20stroke='%230166FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M14.3332%2012.4332C14.3332%2013.4865%2013.4865%2014.3332%2012.4332%2014.3332C11.8265%2014.3332%2011.2865%2014.0465%2010.9465%2013.6065H10.9399C10.6865%2013.2865%2010.5332%2012.8799%2010.5332%2012.4332C10.5332%2011.3799%2011.3799%2010.5332%2012.4332%2010.5332C12.8799%2010.5332%2013.2799%2010.6865%2013.6065%2010.9399V10.9465C14.0465%2011.2865%2014.3332%2011.8265%2014.3332%2012.4332Z'%20stroke='%230166FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5.46602%2012.4332C5.46602%2012.8799%205.31268%2013.2799%205.05935%2013.6065C4.71268%2014.0532%204.17268%2014.3332%203.56602%2014.3332C2.51268%2014.3332%201.66602%2013.4865%201.66602%2012.4332C1.66602%2011.8265%201.95268%2011.2865%202.39268%2010.9465V10.9399C2.71268%2010.6865%203.11935%2010.5332%203.56602%2010.5332C4.61935%2010.5332%205.46602%2011.3799%205.46602%2012.4332Z'%20stroke='%230166FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M14.3327%207.99984C14.3327%209.0665%2014.0727%2010.0598%2013.606%2010.9398C13.286%2010.6865%2012.8793%2010.5332%2012.4327%2010.5332C11.3793%2010.5332%2010.5327%2011.3798%2010.5327%2012.4332C10.5327%2012.8798%2010.686%2013.2798%2010.9393%2013.6065C10.0593%2014.0732%209.06602%2014.3332%207.99935%2014.3332C6.93935%2014.3332%205.93935%2014.0732%205.05935%2013.6065C5.31268%2013.2865%205.46602%2012.8798%205.46602%2012.4332C5.46602%2011.3798%204.61935%2010.5332%203.56602%2010.5332C3.11935%2010.5332%202.71935%2010.6865%202.39268%2010.9398C1.92602%2010.0598%201.66602%209.0665%201.66602%207.99984C1.66602%206.93984%201.92602%205.93984%202.39268%205.05984C2.71935%205.31317%203.11935%205.4665%203.56602%205.4665C4.61935%205.4665%205.46602%204.61984%205.46602%203.5665C5.46602%203.11984%205.31268%202.71984%205.05935%202.39317C5.93935%201.9265%206.93935%201.6665%207.99935%201.6665C9.06602%201.6665%2010.0593%201.9265%2010.9393%202.39317C10.686%202.71317%2010.5327%203.11984%2010.5327%203.5665C10.5327%204.61984%2011.3793%205.4665%2012.4327%205.4665C12.8793%205.4665%2013.2793%205.31317%2013.606%205.05984C14.0727%205.93984%2014.3327%206.93984%2014.3327%207.99984Z'%20stroke='%230166FF'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e"},_u=({styles:e,label:t,hasFooter:n=!1,showCheckBox:o=!1,options:r,defaultValue:s=!0,isMulti:a=!1,handleSelectClick:c,handleCheckboxChange:l})=>{var E,I;const u=ot(),[d,p]=N.useState(!1),[f,g]=N.useState(s?(E=r==null?void 0:r[0])==null?void 0:E.label:"Select option"),[m,h]=N.useState(r||[]);((I=m==null?void 0:m.filter(v=>!(v!=null&&v.isMandatory)))==null?void 0:I.length)>7,N.useRef(null),N.useRef(null),N.useCallback(v=>{let R=[...m];R=R==null?void 0:R.map(w=>(w==null?void 0:w.key)===v?{...w,hidden:!w.hidden}:w),h(R),p(!0)},[m]),N.useCallback(()=>{},[m]);const b=()=>{},x=()=>{},S=N.useRef(null);return N.useEffect(()=>{const v=R=>{S.current&&!S.current.contains(R.target)&&p(!1)};return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[]),y.jsx(ge,{ref:S,sx:{position:"relative",flexShrink:0},children:y.jsx(ge,{position:"absolute",top:0,zIndex:10,children:y.jsxs(pn.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:[y.jsxs(ge,{sx:{padding:"0.65rem",display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",gap:"0.5rem"},onClick:()=>p(!d),children:[y.jsx(ge,{component:"img",className:"select-icon",src:e==null?void 0:e.icon,sx:{cursor:"pointer"}}),y.jsx(Bt,{sx:{color:u.palette.primary.notifyTextColor,flex:1,fontSize:"1.1rem"},children:t||f}),y.jsx(ge,{component:"img",className:"child",src:d?Et.ArrowSelectDown:Et.ArrowSelectUp,sx:{cursor:"pointer"}})]}),d&&y.jsx("hr",{style:{width:"100%",height:"0.1rem",backgroundColor:u.palette.primary.notifyBorderColor,border:"none",margin:"0rem"}}),y.jsx(pn.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((v,R)=>y.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(v==null?void 0:v.label),!a&&p(!1),!o&&c(v)},children:[o&&y.jsx(dc,{size:"medium",sx:{color:u.palette.primary.notifyIconColor,"&.Mui-checked":{color:u.palette.brandColor.orange},p:"0.2rem 0.5rem"},checked:!(v!=null&&v.isHidden),onChange:w=>l(v,w.target.checked)}),y.jsx(Bt,{sx:{fontSize:"1.1rem"},children:v==null?void 0:v.label})]},R))}),n&&d&&y.jsxs(pn.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:[y.jsx(pn.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"}),y.jsx(pn.button,{onClick:x,style:{textTransform:"none",padding:"0.4rem",background:"transparent",color:u.palette.primary.notifyTextColor,fontSize:"1.1rem",border:"none",cursor:"pointer"},children:"Cancel"})]})]})})})},k0=({pagination:e})=>{const{selectedPage:t,rowPerPage:n,totalRecords:o,onPageChange:r,onPageSizeChange:s}=e,a=ot();return y.jsxs(ge,{sx:{display:"flex",p:"1rem 2rem"},children:[y.jsxs(ge,{sx:{zIndex:10,display:"flex",flexDirection:"row",gap:"0.5rem",width:"100%"},children:[y.jsx(ge,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:y.jsx(Bt,{sx:{fontSize:"1.1rem",color:a.palette.primary.notifyTextColor},children:`Showing ${(t-1)*n+1} to ${t*n} of ${o} rows`})}),y.jsx(ge,{sx:{display:"flex",flexDirection:"row",gap:"0.5rem",justifyContent:"space-between"},children:y.jsx(ge,{sx:{display:"flex",flexDirection:"row",width:"5.2rem"},children:y.jsx(_u,{options:jA,handleSelectClick:s})})}),y.jsx(ge,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:y.jsx(Bt,{sx:{fontSize:"1.1rem",color:a.palette.primary.notifyTextColor},children:"records per page"})})]}),y.jsx(Tc,{count:Math.ceil(o/n),page:t,onChange:(c,l)=>{r(l)},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}}})]})};k0.propTypes={pagination:i.object.isRequired};const Gu=e=>{const t=localStorage.getItem(e);return t?JSON.parse(t):""},ak=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})},Wu=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),lk=e=>{let t=0;for(let n=0;n<e.length;n++)e[n].isRead||t++;return t},ck=e=>{const t=[];return e.forEach(n=>{n.isRead||t.push(n.id)}),t},uk=(e,t,n)=>e.filter(r=>t.some(s=>{var a,c,l;return(l=(a=r[s])==null?void 0:a.toLowerCase())==null?void 0:l.includes((c=n==null?void 0:n.trim())==null?void 0:c.toLowerCase())})),dk=(e,t,n)=>e.sort((r,s)=>n==="asc"?r[t].toLowerCase().localeCompare(s[t].toLowerCase()):s[t].toLowerCase().localeCompare(r[t].toLowerCase())),zu=(e,t,n)=>e.slice((t-1)*n,t*n),Hu=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==="channel_name"?n:e.split("_").map(s=>s[0].toUpperCase()+s.substring(1)).join(" ")},pk=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)))},fk=(e,t=20)=>(e==null?void 0:e.length)>t?`${e.slice(0,t)}...`:e;function B0({isRenderCellContent:e,column:t,row:n}){const o=n[t.key];return y.jsx(y.Fragment,{children:e?y.jsx(ge,{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)}):y.jsx(xm,{title:(o==null?void 0:o.length)>20?o:"",arrow:!0,children:y.jsx(ge,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",textTransform:"none",fontSize:"1.1rem"},component:"label",children:fk(o)})})})}B0.propTypes={isRenderCellContent:i.bool,column:i.object,row:i.object};const D0=({menuOpen:e,handleClose:t,onHideClick:n})=>{const o=ot();return y.jsx(Ec,{open:!!e,anchorEl:e,onClose:t,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:y.jsx(ge,{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:y.jsx(lc,{onClick:n,sx:{textTransform:"none",fontSize:"1.1rem",p:0,minHeight:"unset",fontWeight:"500",color:o.palette.primary.notifyTextColor},children:"Hide Column"})})})};D0.propTypes={menuOpen:i.object,handleClose:i.func,onHideClick:i.func};const hk=Z(Gh)(({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}})),_n=Z(Bt)(({theme:e})=>({color:e.palette.primary.notifyTextColor})),mk=Z(Cm)(({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)"})}})),gk=e=>{const{children:t,value:n,index:o,...r}=e;return y.jsx("div",{role:"tabpanel",hidden:n!==o,...r,children:n===o&&y.jsx(ge,{sx:{pl:"0.5rem",pb:"0.5rem"},children:t})})},bk=Z(zs)(({theme:e})=>({color:e.palette.primary.notifyTextColor,padding:"0.6rem 0",fontSize:"0.9rem",fontWeight:500,"&::before, &::after":{borderColor:`${e.palette.primary.notifyBorderColor}!important`}})),vk=Z(ac)(({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"}}));Z(jm)(({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 yk=Z(Dm)(({theme:e})=>({"& .MuiTabs-indicator":{height:"0.1rem",backgroundColor:e.palette.primary.notifyActiveBorderColor}})),xk=Z(Em)(({theme:e})=>({color:"gray","&.Mui-selected":{color:e.palette.primary.notifyActiveBorderColor,fontWeight:"bold"}})),j0=({sortKey:e,sortField:t,sortDir:n,handleSortClick:o})=>{const r=s=>y.jsx(Rs,{onClick:o,sx:{padding:"0.5rem"},children:y.jsx(ge,{component:"img",src:s})});return y.jsx(y.Fragment,{children:r(t===e?n==="asc"?Et.AscSort:Et.DescSort:Et.Unsort)})};j0.propTypes={sortKey:i.string.isRequired,sortField:i.string,sortDir:i.string,handleSortClick:i.func};function F0({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,c=t==null?void 0:t.sortField,l=t==null?void 0:t.sortDir,u=t==null?void 0:t.onSort;return y.jsxs(ge,{sx:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:"1.1rem"},children:[s,a&&y.jsx(j0,{sortKey:e==null?void 0:e.key,sortField:c,sortDir:l,handleSortClick:()=>u({column:e,sortDir:l,sortField:c})}),o&&!r&&y.jsx(Rs,{onClick:d=>n(d,e),sx:{padding:"0.5rem"},children:y.jsx(ge,{component:"img",src:Et.Menu})})]})}F0.propTypes={column:i.object.isRequired,sort:i.object.isRequired,handleMenuClick:i.func,isManageable:i.bool};const Ck=Z(Mc)(({theme:e})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"table-cell",[`&.${Pc.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"},[`&.${Pc.body}`]:{color:e.palette.primary.notifyTextColor,borderColor:e.palette.primary.notifyBorderColor,padding:"0.3rem 1rem",textAlign:"center"}}));function Xu({children:e,...t}){return y.jsx(Ck,{...t,children:e})}Xu.propTypes={children:i.node};const Ek=Z(fi)(()=>({"&:last-child td":{borderBottom:0}}));function Uu({children:e,...t}){return y.jsx(Ek,{...t,children:e})}Uu.propTypes={children:i.node};function V0({sort:e,data:t,pagination:n,columns:o}){const r=ot(),{visibleGridColumns:s}=N.useContext(Fm),a=N.useContext(Qs),{selectedColumn:c,handleMenuClick:l,handleClose:u,handleHideClick:d}=BA(s,a),p=o==null?void 0:o.isManageable,f=(t==null?void 0:t.length)>0,g=N.useRef(null),[m,h]=N.useState(null);let b=null;if(!f)return y.jsx(_n,{sx:{textAlign:"center"},children:bn.NRF});const x=(v,R)=>{h(R),v.dataTransfer.setData("colIndex",R)},S=v=>{v.preventDefault(),I(v)},E=(v,R)=>{if(v.preventDefault(),clearInterval(b),m===null||m===R)return;const w=[...s];[w[m],w[R]]=[w[R],w[m]],a({type:Je.SET_GRID_DATA,payload:{visibleGridColumns:w}}),h(null)},I=v=>{const R=g.current,{left:w,right:O}=R.getBoundingClientRect(),M=50,P=v.clientX>O-M?1:v.clientX<w+M?-1:0;P!==0?(clearInterval(b),b=setInterval(()=>{R.scrollLeft+=P*10},50)):clearInterval(b)};return y.jsxs(y.Fragment,{children:[y.jsx(Sm,{ref:g,sx:{maxHeight:"100%",overflowX:"auto",whiteSpace:"nowrap"},children:y.jsxs(Oc,{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:[y.jsx(Nc,{children:y.jsx(Uu,{children:s.map((v,R)=>v!=null&&v.isHidden?null:y.jsx(Xu,{style:v==null?void 0:v.style,draggable:!0,onDragStart:w=>x(w,R),onDragOver:S,onDrop:w=>E(w,R),children:y.jsx(F0,{column:v,sort:e,handleMenuClick:l,isManageable:p})},R))})}),y.jsx(Ac,{children:t.map((v,R)=>y.jsx(Uu,{children:s.map((w,O)=>w!=null&&w.isHidden?null:y.jsx(Xu,{style:w==null?void 0:w.style,children:y.jsx(B0,{isRenderCellContent:!!(w!=null&&w.cellRenderer),column:w,row:v})},O))},R))})]})}),y.jsx(k0,{pagination:n}),y.jsx(D0,{menuOpen:c==null?void 0:c.isOpen,handleClose:u,onHideClick:d})]})}V0.propTypes={sort:i.object,data:i.array,pagination:i.object,columns:i.object};function L0({tableProps:e,mergedColumns:t}){const n=N.useContext(Qs);return N.useEffect(()=>{n({type:Je.SET_GRID_DATA,payload:{visibleGridColumns:t}})},[t,n]),y.jsx(y.Fragment,{children:y.jsx(V0,{...e})})}L0.propTypes={tableProps:i.object.isRequired,mergedColumns:i.array.isRequired};const xr=({styles:e,label:t,...n})=>{const o=ot(),r=(t==null?void 0:t.length)*((t==null?void 0:t.length)>=10?6.5:7.5)+38||0,[s,a]=N.useState(!1);return y.jsxs(pn.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")&&y.jsx(ge,{component:"img",src:e==null?void 0:e.icon}),t&&y.jsx(pn.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:y.jsx(Bt,{sx:{fontSize:"1.1rem"},children:t})}),(e==null?void 0:e.iconPosition)==="end"&&y.jsx(ge,{component:"img",src:e==null?void 0:e.icon})]})};xr.propTypes={styles:i.object.isRequired,label:i.string};const Ik=({...e})=>{const[t,n]=N.useState(!1),o=ot();return y.jsx(pn.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})},Tk=({customTools:e})=>({sortedTools:e==null?void 0:e.sort((n,o)=>n.sequenceId-o.sequenceId)}),Sk=e=>{if(!e)return null;const{subAction:t,...n}=e,o=t?"select":"button",r={button:s=>y.jsx(xr,{...s}),select:s=>y.jsx(_u,{...s})};return r[o]?r[o](n):null},$0=({customTools:e})=>{const{sortedTools:t}=Tk({customTools:e}),[n,o]=N.useState(!1),r=(t==null?void 0:t.length)>3,c=r?Math.min(t.length,3.37)*45+20:"auto";return y.jsxs(y.Fragment,{children:[n&&y.jsx("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:998}}),y.jsx(pn.div,{className:"custom-tools-container",initial:{width:c!=="auto"?`${c/10}rem`:c},animate:r&&{width:n?"100%":`${c/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",boxShadow:"rgba(0, 0, 0, 0.95) -2px 0px 3px -3px inset"},layout:!0,children:t==null?void 0:t.map(l=>y.jsx(ge,{sx:{flexShrink:0,minWidth:"fit-content"},children:Sk(l)},l.id))}),r&&y.jsx(ge,{sx:{zIndex:1e3,pointerEvents:"auto"},children:y.jsx(xr,{label:n?"":"More Actions",styles:{icon:n?Et.Cross:Et.More},onClick:()=>o(l=>!l)})})]})};$0.propTypes={customTools:i.array.isRequired};const _0=({defaultTools:e,isManageable:t,customTools:n,mergedColumns:o})=>{var c,l,u,d,p,f,g;const r=o==null?void 0:o.filter(m=>!(m!=null&&m.isMandatory)),s=N.useContext(Qs),a=(m,h)=>{const b=[...o].map(x=>x.id===(m==null?void 0:m.id)?{...x,isHidden:!h}:x);s({type:Je.SET_GRID_DATA,payload:{visibleGridColumns:b}})};return y.jsxs(ge,{sx:{margin:"1rem 0",position:"relative",zIndex:10,display:"flex",flexDirection:"row",gap:"0.5rem",width:"100%"},children:[y.jsxs(ge,{sx:{display:"flex",flexDirection:"row",gap:"0.5rem"},children:[((c=e==null?void 0:e.search)==null?void 0:c.isRequired)&&y.jsx(Ik,{...e==null?void 0:e.search}),((l=e==null?void 0:e.refresh)==null?void 0:l.isRequired)&&y.jsx(xr,{...e==null?void 0:e.refresh,styles:{...(u=e==null?void 0:e.refresh)==null?void 0:u.styles,icon:Et.Refresh}})]}),y.jsx(ge,{sx:{display:"flex",flexDirection:"row",gap:"0.5rem",justifyContent:"space-between",flex:1,width:"27rem"},children:y.jsx(ge,{sx:{display:"flex",flexDirection:"row",gap:"0.5rem"},children:t&&y.jsx(_u,{label:"Manage Columns",options:r,isMulti:!0,showCheckBox:!0,handleCheckboxChange:(m,h)=>a(m,h)})})}),y.jsxs(ge,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-end",gap:"0.6rem"},children:[y.jsx($0,{customTools:n}),((d=e==null?void 0:e.upload)==null?void 0:d.isRequired)&&y.jsx(xr,{...e==null?void 0:e.upload,styles:{...(p=e==null?void 0:e.upload)==null?void 0:p.styles,icon:Et.Upload,color:"secondary",isAnimate:!0}}),((f=e==null?void 0:e.download)==null?void 0:f.isRequired)&&y.jsx(xr,{...e==null?void 0:e.download,styles:{...(g=e==null?void 0:e.download)==null?void 0:g.styles,icon:Et.Download,isAnimate:!0}})]})]})};_0.propTypes={defaultTools:i.object.isRequired,customTools:i.array,isManageable:i.bool,mergedColumns:i.array.isRequired};const wk=({columns:e})=>{const{definitions:t,defaultUserSettings:n,labels:o}=e,r=n.reduce((l,u)=>(l[u.id]=u,l),{}),s=o.reduce((l,u)=>(l[u.id]=u,l),{}),a=[];for(const l of t){const{id:u}=l,d=r[u],p=s[u];let f={...l,...d,...p};a.push(f)}return a.sort((l,u)=>l.sequenceId-u.sequenceId)};function G0({tableProps:e,toolbarProps:t}){var s;const n=(s=e.columns)==null?void 0:s.isManageable,{columns:o}=e,r=wk({columns:o});return y.jsxs(Vm,{children:[y.jsx(_0,{...t,isManageable:n,mergedColumns:r}),y.jsx(L0,{tableProps:e,mergedColumns:r})]})}G0.propTypes={tableProps:i.object.isRequired,toolbarProps:i.object.isRequired};const W0=({list:e,handleLinkClick:t})=>{const n=ot(),o=({list:r})=>{var s;return(s=r==null?void 0:r.sort((a,c)=>a.order-c.order))==null?void 0:s.map((a,c)=>a!=null&&a.link?y.jsx(xc,{component:"h3",sx:{fontSize:"1rem",cursor:"pointer",color:c===(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},c):y.jsx(Bt,{component:"h3",sx:{fontSize:"1rem",color:c===(r==null?void 0:r.length)-1?n.palette.brandColor.orange:n.palette.primary.notifyTextColor},children:a==null?void 0:a.title},c))};return y.jsx(Mh,{separator:y.jsx(ge,{component:"img",src:Et.ArrowRight}),children:o({list:e})})};W0.propTypes={list:i.array.isRequired,handleLinkClick:i.func};const z0=({breadcrumbProps:e})=>{const t=ot();return y.jsx(ln,{sx:{background:t.palette.primary.notifyBackground,borderBottom:`0.1rem solid ${t.palette.primary.notifyBorderColor}`,height:"3rem",p:"0 1.4rem",zIndex:4,position:"relative"},direction:"row",justifyContent:"space-between",alignItems:"center",children:y.jsx(W0,{...e})})};z0.propTypes={breadcrumbProps:i.object.isRequired};function H0({headerProps:e}){return y.jsx(Ks,{children:y.jsx(z0,{...e})})}H0.propTypes={headerProps:i.object.isRequired};const Yu=N.createContext(null),X0=N.createContext(null);function Rk({children:e}){const[t,n]=N.useReducer(Ok,Ak);return y.jsx(Yu.Provider,{value:t,children:y.jsx(X0.Provider,{value:n,children:e})})}function Ok(e,t){var n;switch(t.type){case Je.LOADING:return{...e,loading:t.loading};case Je.SUCCESS:return{...e,data:(n=t.data)==null?void 0:n.sort((o,r)=>new Date(r.createdAt)-new Date(o.createdAt))};case Je.MARK_ALL_AS_READ:return{...e,isMarkAllAsRead:t.isMarkAllAsRead};case Je.ERROR:return{...e,error:t.error};default:throw new Error(`${bn.UNHANDLED}: ${t}`)}}const Ak={loading:!1,data:[],error:"",isMarkAllAsRead:{count:0,boo:!1}};function U0(e,t){return function(){return e.apply(t,arguments)}}const{toString:Pk}=Object.prototype,{getPrototypeOf:Zu}=Object,va=(e=>t=>{const n=Pk.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),xn=e=>(e=e.toLowerCase(),t=>va(t)===e),ya=e=>t=>typeof t===e,{isArray:Cr}=Array,ki=ya("undefined");function Mk(e){return e!==null&&!ki(e)&&e.constructor!==null&&!ki(e.constructor)&&qt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Y0=xn("ArrayBuffer");function Nk(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Y0(e.buffer),t}const kk=ya("string"),qt=ya("function"),Z0=ya("number"),xa=e=>e!==null&&typeof e=="object",Bk=e=>e===!0||e===!1,Ca=e=>{if(va(e)!=="object")return!1;const t=Zu(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Dk=xn("Date"),jk=xn("File"),Fk=xn("Blob"),Vk=xn("FileList"),Lk=e=>xa(e)&&qt(e.pipe),$k=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||qt(e.append)&&((t=va(e))==="formdata"||t==="object"&&qt(e.toString)&&e.toString()==="[object FormData]"))},_k=xn("URLSearchParams"),[Gk,Wk,zk,Hk]=["ReadableStream","Request","Response","Headers"].map(xn),Xk=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Bi(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let o,r;if(typeof e!="object"&&(e=[e]),Cr(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 c;for(o=0;o<a;o++)c=s[o],t.call(null,e[c],c,e)}}function J0(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 Ro=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,q0=e=>!ki(e)&&e!==Ro;function Ju(){const{caseless:e}=q0(this)&&this||{},t={},n=(o,r)=>{const s=e&&J0(t,r)||r;Ca(t[s])&&Ca(o)?t[s]=Ju(t[s],o):Ca(o)?t[s]=Ju({},o):Cr(o)?t[s]=o.slice():t[s]=o};for(let o=0,r=arguments.length;o<r;o++)arguments[o]&&Bi(arguments[o],n);return t}const Uk=(e,t,n,{allOwnKeys:o}={})=>(Bi(t,(r,s)=>{n&&qt(r)?e[s]=U0(r,n):e[s]=r},{allOwnKeys:o}),e),Yk=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Zk=(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)},Jk=(e,t,n,o)=>{let r,s,a;const c={};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))&&!c[a]&&(t[a]=e[a],c[a]=!0);e=n!==!1&&Zu(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},qk=(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},Kk=e=>{if(!e)return null;if(Cr(e))return e;let t=e.length;if(!Z0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Qk=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Zu(Uint8Array)),e5=(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])}},t5=(e,t)=>{let n;const o=[];for(;(n=e.exec(t))!==null;)o.push(n);return o},n5=xn("HTMLFormElement"),o5=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,o,r){return o.toUpperCase()+r}),K0=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),r5=xn("RegExp"),Q0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),o={};Bi(n,(r,s)=>{let a;(a=t(r,s,e))!==!1&&(o[s]=a||r)}),Object.defineProperties(e,o)},i5=e=>{Q0(e,(t,n)=>{if(qt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const o=e[n];if(qt(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+"'")})}})},s5=(e,t)=>{const n={},o=r=>{r.forEach(s=>{n[s]=!0})};return Cr(e)?o(e):o(String(e).split(t)),n},a5=()=>{},l5=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function c5(e){return!!(e&&qt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const u5=e=>{const t=new Array(10),n=(o,r)=>{if(xa(o)){if(t.indexOf(o)>=0)return;if(!("toJSON"in o)){t[r]=o;const s=Cr(o)?[]:{};return Bi(o,(a,c)=>{const l=n(a,r+1);!ki(l)&&(s[c]=l)}),t[r]=void 0,s}}return o};return n(e,0)},d5=xn("AsyncFunction"),p5=e=>e&&(xa(e)||qt(e))&&qt(e.then)&&qt(e.catch),ev=((e,t)=>e?setImmediate:t?((n,o)=>(Ro.addEventListener("message",({source:r,data:s})=>{r===Ro&&s===n&&o.length&&o.shift()()},!1),r=>{o.push(r),Ro.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",qt(Ro.postMessage)),f5=typeof queueMicrotask<"u"?queueMicrotask.bind(Ro):typeof process<"u"&&process.nextTick||ev,$={isArray:Cr,isArrayBuffer:Y0,isBuffer:Mk,isFormData:$k,isArrayBufferView:Nk,isString:kk,isNumber:Z0,isBoolean:Bk,isObject:xa,isPlainObject:Ca,isReadableStream:Gk,isRequest:Wk,isResponse:zk,isHeaders:Hk,isUndefined:ki,isDate:Dk,isFile:jk,isBlob:Fk,isRegExp:r5,isFunction:qt,isStream:Lk,isURLSearchParams:_k,isTypedArray:Qk,isFileList:Vk,forEach:Bi,merge:Ju,extend:Uk,trim:Xk,stripBOM:Yk,inherits:Zk,toFlatObject:Jk,kindOf:va,kindOfTest:xn,endsWith:qk,toArray:Kk,forEachEntry:e5,matchAll:t5,isHTMLForm:n5,hasOwnProperty:K0,hasOwnProp:K0,reduceDescriptors:Q0,freezeMethods:i5,toObjectSet:s5,toCamelCase:o5,noop:a5,toFiniteNumber:l5,findKey:J0,global:Ro,isContextDefined:q0,isSpecCompliantForm:c5,toJSONObject:u5,isAsyncFn:d5,isThenable:p5,setImmediate:ev,asap:f5};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,this.status=r.status?r.status:null)}$.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:$.toJSONObject(this.config),code:this.code,status:this.status}}});const tv=we.prototype,nv={};["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=>{nv[e]={value:e}}),Object.defineProperties(we,nv),Object.defineProperty(tv,"isAxiosError",{value:!0}),we.from=(e,t,n,o,r,s)=>{const a=Object.create(tv);return $.toFlatObject(e,a,function(l){return l!==Error.prototype},c=>c!=="isAxiosError"),we.call(a,e.message,t,n,o,r),a.cause=e,a.name=e.name,s&&Object.assign(a,s),a};const h5=null;function qu(e){return $.isPlainObject(e)||$.isArray(e)}function ov(e){return $.endsWith(e,"[]")?e.slice(0,-2):e}function rv(e,t,n){return e?e.concat(t).map(function(r,s){return r=ov(r),!n&&s?"["+r+"]":r}).join(n?".":""):t}function m5(e){return $.isArray(e)&&!e.some(qu)}const g5=$.toFlatObject($,{},null,function(t){return/^is[A-Z]/.test(t)});function Ea(e,t,n){if(!$.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=$.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,b){return!$.isUndefined(b[h])});const o=n.metaTokens,r=n.visitor||d,s=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&$.isSpecCompliantForm(t);if(!$.isFunction(r))throw new TypeError("visitor must be a function");function u(m){if(m===null)return"";if($.isDate(m))return m.toISOString();if(!l&&$.isBlob(m))throw new we("Blob is not supported. Use a Buffer instead.");return $.isArrayBuffer(m)||$.isTypedArray(m)?l&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function d(m,h,b){let x=m;if(m&&!b&&typeof m=="object"){if($.endsWith(h,"{}"))h=o?h:h.slice(0,-2),m=JSON.stringify(m);else if($.isArray(m)&&m5(m)||($.isFileList(m)||$.endsWith(h,"[]"))&&(x=$.toArray(m)))return h=ov(h),x.forEach(function(E,I){!($.isUndefined(E)||E===null)&&t.append(a===!0?rv([h],I,s):a===null?h:h+"[]",u(E))}),!1}return qu(m)?!0:(t.append(rv(b,h,s),u(m)),!1)}const p=[],f=Object.assign(g5,{defaultVisitor:d,convertValue:u,isVisitable:qu});function g(m,h){if(!$.isUndefined(m)){if(p.indexOf(m)!==-1)throw Error("Circular reference detected in "+h.join("."));p.push(m),$.forEach(m,function(x,S){(!($.isUndefined(x)||x===null)&&r.call(t,x,$.isString(S)?S.trim():S,h,f))===!0&&g(x,h?h.concat(S):[S])}),p.pop()}}if(!$.isObject(e))throw new TypeError("data must be an object");return g(e),t}function iv(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(o){return t[o]})}function Ku(e,t){this._pairs=[],e&&Ea(e,this,t)}const sv=Ku.prototype;sv.append=function(t,n){this._pairs.push([t,n])},sv.toString=function(t){const n=t?function(o){return t.call(this,o,iv)}:iv;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function b5(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function av(e,t,n){if(!t)return e;const o=n&&n.encode||b5;$.isFunction(n)&&(n={serialize:n});const r=n&&n.serialize;let s;if(r?s=r(t,n):s=$.isURLSearchParams(t)?t.toString():new Ku(t,n).toString(o),s){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class lv{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){$.forEach(this.handlers,function(o){o!==null&&t(o)})}}const cv={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},v5={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Ku,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Qu=typeof window<"u"&&typeof document<"u",ed=typeof navigator=="object"&&navigator||void 0,y5=Qu&&(!ed||["ReactNative","NativeScript","NS"].indexOf(ed.product)<0),x5=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",C5=Qu&&window.location.href||"http://localhost",Ot={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Qu,hasStandardBrowserEnv:y5,hasStandardBrowserWebWorkerEnv:x5,navigator:ed,origin:C5},Symbol.toStringTag,{value:"Module"})),...v5};function E5(e,t){return Ea(e,new Ot.classes.URLSearchParams,Object.assign({visitor:function(n,o,r,s){return Ot.isNode&&$.isBuffer(n)?(this.append(o,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function I5(e){return $.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function T5(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 uv(e){function t(n,o,r,s){let a=n[s++];if(a==="__proto__")return!0;const c=Number.isFinite(+a),l=s>=n.length;return a=!a&&$.isArray(r)?r.length:a,l?($.hasOwnProp(r,a)?r[a]=[r[a],o]:r[a]=o,!c):((!r[a]||!$.isObject(r[a]))&&(r[a]=[]),t(n,o,r[a],s)&&$.isArray(r[a])&&(r[a]=T5(r[a])),!c)}if($.isFormData(e)&&$.isFunction(e.entries)){const n={};return $.forEachEntry(e,(o,r)=>{t(I5(o),r,n,0)}),n}return null}function S5(e,t,n){if($.isString(e))try{return(t||JSON.parse)(e),$.trim(e)}catch(o){if(o.name!=="SyntaxError")throw o}return(n||JSON.stringify)(e)}const Di={transitional:cv,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const o=n.getContentType()||"",r=o.indexOf("application/json")>-1,s=$.isObject(t);if(s&&$.isHTMLForm(t)&&(t=new FormData(t)),$.isFormData(t))return r?JSON.stringify(uv(t)):t;if($.isArrayBuffer(t)||$.isBuffer(t)||$.isStream(t)||$.isFile(t)||$.isBlob(t)||$.isReadableStream(t))return t;if($.isArrayBufferView(t))return t.buffer;if($.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(s){if(o.indexOf("application/x-www-form-urlencoded")>-1)return E5(t,this.formSerializer).toString();if((c=$.isFileList(t))||o.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Ea(c?{"files[]":t}:t,l&&new l,this.formSerializer)}}return s||r?(n.setContentType("application/json",!1),S5(t)):t}],transformResponse:[function(t){const n=this.transitional||Di.transitional,o=n&&n.forcedJSONParsing,r=this.responseType==="json";if($.isResponse(t)||$.isReadableStream(t))return t;if(t&&$.isString(t)&&(o&&!this.responseType||r)){const a=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(c){if(a)throw c.name==="SyntaxError"?we.from(c,we.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ot.classes.FormData,Blob:Ot.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};$.forEach(["delete","get","head","post","put","patch"],e=>{Di.headers[e]={}});const w5=$.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"]),R5=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]&&w5[n])&&(n==="set-cookie"?t[n]?t[n].push(o):t[n]=[o]:t[n]=t[n]?t[n]+", "+o:o)}),t},dv=Symbol("internals");function ji(e){return e&&String(e).trim().toLowerCase()}function Ia(e){return e===!1||e==null?e:$.isArray(e)?e.map(Ia):String(e)}function O5(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 A5=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function td(e,t,n,o,r){if($.isFunction(o))return o.call(this,t,n);if(r&&(t=n),!!$.isString(t)){if($.isString(o))return t.indexOf(o)!==-1;if($.isRegExp(o))return o.test(t)}}function P5(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,o)=>n.toUpperCase()+o)}function M5(e,t){const n=$.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})})}let Wt=class{constructor(t){t&&this.set(t)}set(t,n,o){const r=this;function s(c,l,u){const d=ji(l);if(!d)throw new Error("header name must be a non-empty string");const p=$.findKey(r,d);(!p||r[p]===void 0||u===!0||u===void 0&&r[p]!==!1)&&(r[p||l]=Ia(c))}const a=(c,l)=>$.forEach(c,(u,d)=>s(u,d,l));if($.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if($.isString(t)&&(t=t.trim())&&!A5(t))a(R5(t),n);else if($.isHeaders(t))for(const[c,l]of t.entries())s(l,c,o);else t!=null&&s(n,t,o);return this}get(t,n){if(t=ji(t),t){const o=$.findKey(this,t);if(o){const r=this[o];if(!n)return r;if(n===!0)return O5(r);if($.isFunction(n))return n.call(this,r,o);if($.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ji(t),t){const o=$.findKey(this,t);return!!(o&&this[o]!==void 0&&(!n||td(this,this[o],o,n)))}return!1}delete(t,n){const o=this;let r=!1;function s(a){if(a=ji(a),a){const c=$.findKey(o,a);c&&(!n||td(o,o[c],c,n))&&(delete o[c],r=!0)}}return $.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||td(this,this[s],s,t,!0))&&(delete this[s],r=!0)}return r}normalize(t){const n=this,o={};return $.forEach(this,(r,s)=>{const a=$.findKey(o,s);if(a){n[a]=Ia(r),delete n[s];return}const c=t?P5(s):String(s).trim();c!==s&&delete n[s],n[c]=Ia(r),o[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return $.forEach(this,(o,r)=>{o!=null&&o!==!1&&(n[r]=t&&$.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[dv]=this[dv]={accessors:{}}).accessors,r=this.prototype;function s(a){const c=ji(a);o[c]||(M5(r,a),o[c]=!0)}return $.isArray(t)?t.forEach(s):s(t),this}};Wt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),$.reduceDescriptors(Wt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[n]=o}}}),$.freezeMethods(Wt);function nd(e,t){const n=this||Di,o=t||n,r=Wt.from(o.headers);let s=o.data;return $.forEach(e,function(c){s=c.call(n,s,r.normalize(),t?t.status:void 0)}),r.normalize(),s}function pv(e){return!!(e&&e.__CANCEL__)}function Er(e,t,n){we.call(this,e??"canceled",we.ERR_CANCELED,t,n),this.name="CanceledError"}$.inherits(Er,we,{__CANCEL__:!0});function fv(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 N5(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function k5(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(l){const u=Date.now(),d=o[s];a||(a=u),n[r]=l,o[r]=u;let p=s,f=0;for(;p!==r;)f+=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(f*1e3/g):void 0}}function B5(e,t){let n=0,o=1e3/t,r,s;const a=(u,d=Date.now())=>{n=d,r=null,s&&(clearTimeout(s),s=null),e.apply(null,u)};return[(...u)=>{const d=Date.now(),p=d-n;p>=o?a(u,d):(r=u,s||(s=setTimeout(()=>{s=null,a(r)},o-p)))},()=>r&&a(r)]}const Ta=(e,t,n=3)=>{let o=0;const r=k5(50,250);return B5(s=>{const a=s.loaded,c=s.lengthComputable?s.total:void 0,l=a-o,u=r(l),d=a<=c;o=a;const p={loaded:a,total:c,progress:c?a/c:void 0,bytes:l,rate:u||void 0,estimated:u&&c&&d?(c-a)/u:void 0,event:s,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(p)},n)},hv=(e,t)=>{const n=e!=null;return[o=>t[0]({lengthComputable:n,total:e,loaded:o}),t[1]]},mv=e=>(...t)=>$.asap(()=>e(...t)),D5=Ot.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Ot.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Ot.origin),Ot.navigator&&/(msie|trident)/i.test(Ot.navigator.userAgent)):()=>!0,j5=Ot.hasStandardBrowserEnv?{write(e,t,n,o,r,s){const a=[e+"="+encodeURIComponent(t)];$.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),$.isString(o)&&a.push("path="+o),$.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 F5(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function V5(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function gv(e,t,n){let o=!F5(t);return e&&o||n==!1?V5(e,t):t}const bv=e=>e instanceof Wt?{...e}:e;function Oo(e,t){t=t||{};const n={};function o(u,d,p,f){return $.isPlainObject(u)&&$.isPlainObject(d)?$.merge.call({caseless:f},u,d):$.isPlainObject(d)?$.merge({},d):$.isArray(d)?d.slice():d}function r(u,d,p,f){if($.isUndefined(d)){if(!$.isUndefined(u))return o(void 0,u,p,f)}else return o(u,d,p,f)}function s(u,d){if(!$.isUndefined(d))return o(void 0,d)}function a(u,d){if($.isUndefined(d)){if(!$.isUndefined(u))return o(void 0,u)}else return o(void 0,d)}function c(u,d,p){if(p in t)return o(u,d);if(p in e)return o(void 0,u)}const l={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:c,headers:(u,d,p)=>r(bv(u),bv(d),p,!0)};return $.forEach(Object.keys(Object.assign({},e,t)),function(d){const p=l[d]||r,f=p(e[d],t[d],d);$.isUndefined(f)&&p!==c||(n[d]=f)}),n}const vv=e=>{const t=Oo({},e);let{data:n,withXSRFToken:o,xsrfHeaderName:r,xsrfCookieName:s,headers:a,auth:c}=t;t.headers=a=Wt.from(a),t.url=av(gv(t.baseURL,t.url),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let l;if($.isFormData(n)){if(Ot.hasStandardBrowserEnv||Ot.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((l=a.getContentType())!==!1){const[u,...d]=l?l.split(";").map(p=>p.trim()).filter(Boolean):[];a.setContentType([u||"multipart/form-data",...d].join("; "))}}if(Ot.hasStandardBrowserEnv&&(o&&$.isFunction(o)&&(o=o(t)),o||o!==!1&&D5(t.url))){const u=r&&s&&j5.read(s);u&&a.set(r,u)}return t},L5=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,o){const r=vv(e);let s=r.data;const a=Wt.from(r.headers).normalize();let{responseType:c,onUploadProgress:l,onDownloadProgress:u}=r,d,p,f,g,m;function h(){g&&g(),m&&m(),r.cancelToken&&r.cancelToken.unsubscribe(d),r.signal&&r.signal.removeEventListener("abort",d)}let b=new XMLHttpRequest;b.open(r.method.toUpperCase(),r.url,!0),b.timeout=r.timeout;function x(){if(!b)return;const E=Wt.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),v={data:!c||c==="text"||c==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:E,config:e,request:b};fv(function(w){n(w),h()},function(w){o(w),h()},v),b=null}"onloadend"in b?b.onloadend=x:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(x)},b.onabort=function(){b&&(o(new we("Request aborted",we.ECONNABORTED,e,b)),b=null)},b.onerror=function(){o(new we("Network Error",we.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let I=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const v=r.transitional||cv;r.timeoutErrorMessage&&(I=r.timeoutErrorMessage),o(new we(I,v.clarifyTimeoutError?we.ETIMEDOUT:we.ECONNABORTED,e,b)),b=null},s===void 0&&a.setContentType(null),"setRequestHeader"in b&&$.forEach(a.toJSON(),function(I,v){b.setRequestHeader(v,I)}),$.isUndefined(r.withCredentials)||(b.withCredentials=!!r.withCredentials),c&&c!=="json"&&(b.responseType=r.responseType),u&&([f,m]=Ta(u,!0),b.addEventListener("progress",f)),l&&b.upload&&([p,g]=Ta(l),b.upload.addEventListener("progress",p),b.upload.addEventListener("loadend",g)),(r.cancelToken||r.signal)&&(d=E=>{b&&(o(!E||E.type?new Er(null,e,b):E),b.abort(),b=null)},r.cancelToken&&r.cancelToken.subscribe(d),r.signal&&(r.signal.aborted?d():r.signal.addEventListener("abort",d)));const S=N5(r.url);if(S&&Ot.protocols.indexOf(S)===-1){o(new we("Unsupported protocol "+S+":",we.ERR_BAD_REQUEST,e));return}b.send(s||null)})},$5=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let o=new AbortController,r;const s=function(u){if(!r){r=!0,c();const d=u instanceof Error?u:this.reason;o.abort(d instanceof we?d:new Er(d instanceof Error?d.message:d))}};let a=t&&setTimeout(()=>{a=null,s(new we(`timeout ${t} of ms exceeded`,we.ETIMEDOUT))},t);const c=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),e=null)};e.forEach(u=>u.addEventListener("abort",s));const{signal:l}=o;return l.unsubscribe=()=>$.asap(c),l}},_5=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let o=0,r;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},G5=async function*(e,t){for await(const n of W5(e))yield*_5(n,t)},W5=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:o}=await t.read();if(n)break;yield o}}finally{await t.cancel()}},yv=(e,t,n,o)=>{const r=G5(e,t);let s=0,a,c=l=>{a||(a=!0,o&&o(l))};return new ReadableStream({async pull(l){try{const{done:u,value:d}=await r.next();if(u){c(),l.close();return}let p=d.byteLength;if(n){let f=s+=p;n(f)}l.enqueue(new Uint8Array(d))}catch(u){throw c(u),u}},cancel(l){return c(l),r.return()}},{highWaterMark:2})},Sa=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",xv=Sa&&typeof ReadableStream=="function",z5=Sa&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Cv=(e,...t)=>{try{return!!e(...t)}catch{return!1}},H5=xv&&Cv(()=>{let e=!1;const t=new Request(Ot.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Ev=64*1024,od=xv&&Cv(()=>$.isReadableStream(new Response("").body)),wa={stream:od&&(e=>e.body)};Sa&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!wa[t]&&(wa[t]=$.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 X5=async e=>{if(e==null)return 0;if($.isBlob(e))return e.size;if($.isSpecCompliantForm(e))return(await new Request(Ot.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if($.isArrayBufferView(e)||$.isArrayBuffer(e))return e.byteLength;if($.isURLSearchParams(e)&&(e=e+""),$.isString(e))return(await z5(e)).byteLength},U5=async(e,t)=>{const n=$.toFiniteNumber(e.getContentLength());return n??X5(t)},rd={http:h5,xhr:L5,fetch:Sa&&(async e=>{let{url:t,method:n,data:o,signal:r,cancelToken:s,timeout:a,onDownloadProgress:c,onUploadProgress:l,responseType:u,headers:d,withCredentials:p="same-origin",fetchOptions:f}=vv(e);u=u?(u+"").toLowerCase():"text";let g=$5([r,s&&s.toAbortSignal()],a),m;const h=g&&g.unsubscribe&&(()=>{g.unsubscribe()});let b;try{if(l&&H5&&n!=="get"&&n!=="head"&&(b=await U5(d,o))!==0){let v=new Request(t,{method:"POST",body:o,duplex:"half"}),R;if($.isFormData(o)&&(R=v.headers.get("content-type"))&&d.setContentType(R),v.body){const[w,O]=hv(b,Ta(mv(l)));o=yv(v.body,Ev,w,O)}}$.isString(p)||(p=p?"include":"omit");const x="credentials"in Request.prototype;m=new Request(t,{...f,signal:g,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:o,duplex:"half",credentials:x?p:void 0});let S=await fetch(m);const E=od&&(u==="stream"||u==="response");if(od&&(c||E&&h)){const v={};["status","statusText","headers"].forEach(M=>{v[M]=S[M]});const R=$.toFiniteNumber(S.headers.get("content-length")),[w,O]=c&&hv(R,Ta(mv(c),!0))||[];S=new Response(yv(S.body,Ev,w,()=>{O&&O(),h&&h()}),v)}u=u||"text";let I=await wa[$.findKey(wa,u)||"text"](S,e);return!E&&h&&h(),await new Promise((v,R)=>{fv(v,R,{data:I,headers:Wt.from(S.headers),status:S.status,statusText:S.statusText,config:e,request:m})})}catch(x){throw h&&h(),x&&x.name==="TypeError"&&/fetch/i.test(x.message)?Object.assign(new we("Network Error",we.ERR_NETWORK,e,m),{cause:x.cause||x}):we.from(x,x&&x.code,e,m)}})};$.forEach(rd,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Iv=e=>`- ${e}`,Y5=e=>$.isFunction(e)||e===null||e===!1,Tv={getAdapter:e=>{e=$.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,!Y5(n)&&(o=rd[(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(([c,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=t?s.length>1?`since :
243
243
  `+s.map(Iv).join(`