=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:c,styles:o,next:Dn}},Ln=!!l.useInsertionEffect&&l.useInsertionEffect,Fn=Ln||function(e){return e()},Mn=Ln||s.useLayoutEffect,Bn=s.createContext("undefined"!==typeof HTMLElement?Sn({key:"css"}):null);Bn.Provider;var Un=function(e){return(0,s.forwardRef)((function(t,n){var r=(0,s.useContext)(Bn);return e(t,r,n)}))};var Vn=s.createContext({});var zn=Tn((function(e){return Tn((function(t){return function(e,t){return"function"===typeof t?t(e):vt({},e,t)}(e,t)}))})),qn=function(e){var t=s.useContext(Vn);return e.theme!==t&&(t=zn(t)(e.theme)),s.createElement(Vn.Provider,{value:t},e.children)};var Jn,Wn=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Hn=function(e,t,n){Wn(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}},Gn=wt,Yn=function(e){return"theme"!==e},Kn=function(e){return"string"===typeof e&&e.charCodeAt(0)>96?Gn:Yn},$n=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!==typeof r&&n&&(r=e.__emotion_forwardProp),r},Xn=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Wn(t,n,r),Fn((function(){return Hn(t,n,r)})),null},Zn=function e(t,n){var r,o,i=t.__emotion_real===t,a=i&&t.__emotion_base||t;void 0!==n&&(r=n.label,o=n.target);var l=$n(t,n,i),c=l||Kn(a),u=!c("as");return function(){var d=arguments,f=i&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&f.push("label:"+r+";"),null==d[0]||void 0===d[0].raw)f.push.apply(f,d);else{0,f.push(d[0][0]);for(var p=d.length,h=1;h{let{baseStyle:t}=e;return e=>{const{theme:n,css:r,__css:o,sx:i,...a}=e,s=ht(a,((e,t)=>Qe(t))),l=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");const t={...e};for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;otr(...n),get:(t,n)=>(e.has(n)||e.set(n,tr(n)),e.get(n))})}(),rr=d((function(e,t){const{direction:n,align:r,justify:o,wrap:i,basis:a,grow:s,shrink:l,...c}=e,d={display:"flex",flexDirection:n,alignItems:r,justifyContent:o,flexWrap:i,flexBasis:a,flexGrow:s,flexShrink:l};return(0,u.jsx)(nr.div,{ref:t,__css:d,...c})}));rr.displayName="Flex";var or=nr("div");or.displayName="Box";var ir=d((function(e,t){const{size:n,centerContent:r=!0,...o}=e,i=r?{display:"flex",alignItems:"center",justifyContent:"center"}:{};return(0,u.jsx)(or,{ref:t,boxSize:n,__css:{...i,flexShrink:0,flexGrow:0},...o})}));ir.displayName="Square";var ar=d((function(e,t){const{size:n,...r}=e;return(0,u.jsx)(ir,{size:n,ref:t,borderRadius:"9999px",...r})}));function sr(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:i,defaultValue:a}=e,l=(0,s.createContext)(a);return l.displayName=t,[l.Provider,function e(){var t;const a=(0,s.useContext)(l);if(!a&&n){const n=new Error(null!=i?i:(c=o,"".concat(r," returned `undefined`. Seems you forgot to wrap component within ").concat(c)));throw n.name="ContextError",null==(t=Error.captureStackTrace)||t.call(Error,n,e),n}var c;return a},l]}ar.displayName="Circle";var[lr,cr]=sr({name:"BreadcrumbStylesContext",errorMessage:"useBreadcrumbStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "});function ur(e){return s.Children.toArray(e).filter((e=>(0,s.isValidElement)(e)))}function dr(){const e=(0,s.useContext)(Vn);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function fr(){return{...ft(),theme:dr()}}var pr=n(9389);function hr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var n;const{styleConfig:r,...o}=t,{theme:i,colorMode:a}=fr(),l=e?pt(i,"components.".concat(e)):void 0,c=r||l,u=k({theme:i,colorMode:a},null!=(n=null==c?void 0:c.defaultProps)?n:{},mt(function(e,t){const n={};return Object.keys(e).forEach((r=>{t.includes(r)||(n[r]=e[r])})),n}(o,["children"]))),d=(0,s.useRef)({});if(c){const e=function(e){return t=>{var n;const{variant:r,size:o,theme:i}=t,a=at(i);return k({},m(null!=(n=e.baseStyle)?n:{},t),a(e,"sizes",o,t),a(e,"variants",r,t))}}(c),t=e(u);pr(d.current,t)||(d.current=t)}return d.current}function mr(e){return hr(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}function gr(e){return hr(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}var vr=d((function(e,t){const n=gr("Breadcrumb",e),r=st(e),{children:o,spacing:i="0.5rem",separator:a="/",className:l,listProps:c,...d}=r,p=ur(o),h=p.length,m=p.map(((e,t)=>(0,s.cloneElement)(e,{separator:a,spacing:i,isLastChild:h===t+1}))),g=f("chakra-breadcrumb",l);return(0,u.jsx)(nr.nav,{ref:t,"aria-label":"breadcrumb",className:g,__css:n.container,...d,children:(0,u.jsx)(lr,{value:n,children:(0,u.jsx)(nr.ol,{className:"chakra-breadcrumb__list",...c,__css:{display:"flex",alignItems:"center",...n.list},children:m})})})}));function yr(e){const t=Object.assign({},e);for(let n in t)void 0===t[n]&&delete t[n];return t}vr.displayName="Breadcrumb";var br=d((function(e,t){const n=mr("Text",e),{className:r,align:o,decoration:i,casing:a,...s}=st(e),l=yr({textAlign:e.align,textDecoration:e.decoration,textTransform:e.casing});return(0,u.jsx)(nr.p,{ref:t,className:f("chakra-text",e.className),...l,...s,__css:n})}));br.displayName="Text";var wr=d((function(e,t){const{isCurrentPage:n,as:r,className:o,href:i,...a}=e,s=cr(),l={ref:t,as:r,className:f("chakra-breadcrumb__link",o),...a};return n?(0,u.jsx)(nr.span,{"aria-current":"page",__css:s.link,...l}):(0,u.jsx)(nr.a,{__css:s.link,href:i,...l})}));wr.displayName="BreadcrumbLink";var kr=d((function(e,t){const{spacing:n,...r}=e,o={mx:n,...cr().separator};return(0,u.jsx)(nr.span,{ref:t,role:"presentation",...r,__css:o})}));kr.displayName="BreadcrumbSeparator";var xr=d((function(e,t){const{isCurrentPage:n,separator:r,isLastChild:o,spacing:i,children:a,className:l,...c}=e,d=ur(a).map((e=>e.type===wr?(0,s.cloneElement)(e,{isCurrentPage:n}):e.type===kr?(0,s.cloneElement)(e,{spacing:i,children:e.props.children||r}):e)),p={display:"inline-flex",alignItems:"center",...cr().item},h=f("chakra-breadcrumb__list-item",l);return(0,u.jsxs)(nr.li,{ref:t,className:h,...c,__css:p,children:[d,!o&&(0,u.jsx)(kr,{spacing:i,children:r})]})}));xr.displayName="BreadcrumbItem";var[Sr,Tr]=sr({strict:!1,name:"ButtonGroupContext"});function Er(e){const{children:t,className:n,...r}=e,o=(0,s.isValidElement)(t)?(0,s.cloneElement)(t,{"aria-hidden":!0,focusable:!1}):t,i=f("chakra-button__icon",n);return(0,u.jsx)(nr.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:i,children:o})}Er.displayName="ButtonIcon";n(7814);var _r=Un((function(e,t){var n=e.styles,r=Rn([n],void 0,s.useContext(Vn)),o=s.useRef();return Mn((function(){var e=t.key+"-global",n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),i=!1,a=document.querySelector('style[data-emotion="'+e+" "+r.name+'"]');return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),null!==a&&(i=!0,a.setAttribute("data-emotion",e),n.hydrate([a])),o.current=[n,i],function(){n.flush()}}),[t]),Mn((function(){var e=o.current,n=e[0];if(e[1])e[1]=!1;else{if(void 0!==r.next&&Hn(t,r.next,!0),n.tags.length){var i=n.tags[n.tags.length-1].nextElementSibling;n.before=i,n.flush()}t.insert("",r,n,!1)}}),[t,r.name]),null}));function Nr(){for(var e=arguments.length,t=new Array(e),n=0;n{const n=mr("Spinner",e),{label:r="Loading...",thickness:o="2px",speed:i="0.45s",emptyColor:a="transparent",className:s,...l}=st(e),c=f("chakra-spinner",s),d={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:o,borderBottomColor:a,borderLeftColor:a,animation:"".concat(Cr," ").concat(i," linear infinite"),...n};return(0,u.jsx)(nr.div,{ref:t,__css:d,className:c,...l,children:r&&(0,u.jsx)(nr.span,{srOnly:!0,children:r})})}));function Ar(e){const{label:t,placement:n,spacing:r="0.5rem",children:o=(0,u.jsx)(Or,{color:"currentColor",width:"1em",height:"1em"}),className:i,__css:a,...l}=e,c=f("chakra-button__spinner",i),d="start"===n?"marginEnd":"marginStart",p=(0,s.useMemo)((()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[d]:t?r:0,fontSize:"1em",lineHeight:"normal",...a})),[a,t,d,r]);return(0,u.jsx)(nr.div,{className:c,...l,__css:p,children:o})}function Pr(){for(var e=arguments.length,t=new Array(e),n=0;n{t.forEach((t=>{!function(e,t){if(null!=e)if("function"!==typeof e)try{e.current=t}catch(n){throw new Error("Cannot assign value '".concat(t,"' to ref '").concat(e,"'"))}else e(t)}(t,e)}))}}function Dr(){for(var e=arguments.length,t=new Array(e),n=0;nPr(...t)),t)}Or.displayName="Spinner",Ar.displayName="ButtonSpinner";var jr=d(((e,t)=>{const n=Tr(),r=mr("Button",{...n,...e}),{isDisabled:o=(null==n?void 0:n.isDisabled),isLoading:i,isActive:a,children:l,leftIcon:c,rightIcon:d,loadingText:p,iconSpacing:h="0.5rem",type:m,spinner:g,spinnerPlacement:y="start",className:b,as:w,...k}=st(e),x=(0,s.useMemo)((()=>{const e={...null==r?void 0:r._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:e}}}),[r,n]),{ref:S,type:T}=function(e){const[t,n]=(0,s.useState)(!e),r=(0,s.useCallback)((e=>{e&&n("BUTTON"===e.tagName)}),[]);return{ref:r,type:t?"button":void 0}}(w),E={rightIcon:d,leftIcon:c,iconSpacing:h,children:l};return(0,u.jsxs)(nr.button,{ref:Dr(t,S),as:w,type:null!=m?m:T,"data-active":v(a),"data-loading":v(i),__css:x,className:f("chakra-button",b),...k,disabled:o||i,children:[i&&"start"===y&&(0,u.jsx)(Ar,{className:"chakra-button__spinner--start",label:p,placement:"start",spacing:h,children:g}),i?p||(0,u.jsx)(nr.span,{opacity:0,children:(0,u.jsx)(Rr,{...E})}):(0,u.jsx)(Rr,{...E}),i&&"end"===y&&(0,u.jsx)(Ar,{className:"chakra-button__spinner--end",label:p,placement:"end",spacing:h,children:g})]})}));function Rr(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:o}=e;return(0,u.jsxs)(u.Fragment,{children:[t&&(0,u.jsx)(Er,{marginEnd:o,children:t}),r,n&&(0,u.jsx)(Er,{marginStart:o,children:n})]})}jr.displayName="Button";var Lr={horizontal:{"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}},vertical:{"> *:first-of-type:not(:last-of-type)":{borderBottomRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderTopRadius:0}}},Fr={horizontal:e=>({"& > *:not(style) ~ *:not(style)":{marginStart:e}}),vertical:e=>({"& > *:not(style) ~ *:not(style)":{marginTop:e}})},Mr=d((function(e,t){const{size:n,colorScheme:r,variant:o,className:i,spacing:a="0.5rem",isAttached:l,isDisabled:c,orientation:d="horizontal",...p}=e,h=f("chakra-button__group",i),m=(0,s.useMemo)((()=>({size:n,colorScheme:r,variant:o,isDisabled:c})),[n,r,o,c]);let g={display:"inline-flex",...l?Lr[d]:Fr[d](a)};const v="vertical"===d;return(0,u.jsx)(Sr,{value:m,children:(0,u.jsx)(nr.div,{ref:t,role:"group",__css:g,className:h,"data-attached":l?"":void 0,"data-orientation":d,flexDir:v?"column":void 0,...p})})}));function Br(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{timeout:t=300,preventDefault:n=(()=>!0)}=e,[r,o]=(0,s.useState)([]),i=(0,s.useRef)(),a=()=>{i.current&&(clearTimeout(i.current),i.current=null)};return(0,s.useEffect)((()=>a),[]),function(e){return s=>{if("Backspace"===s.key){const e=[...r];return e.pop(),void o(e)}if(function(e){const{key:t}=e;return 1===t.length||t.length>1&&/[^a-zA-Z0-9]/.test(t)}(s)){const l=r.concat(s.key);n(s)&&(s.preventDefault(),s.stopPropagation()),o(l),e(l.join("")),a(),i.current=setTimeout((()=>{o([]),i.current=null}),t)}}}}function Ur(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return"INPUT"!==n&&"TEXTAREA"!==n&&!0!==r}function Vr(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:o=!0,clickOnSpace:i=!0,onMouseDown:a,onMouseUp:l,onClick:c,onKeyDown:u,onKeyUp:d,tabIndex:f,onMouseOver:p,onMouseLeave:h,...m}=e,[g,y]=(0,s.useState)(!0),[b,w]=(0,s.useState)(!1),k=function(){const e=(0,s.useRef)(new Map),t=e.current,n=(0,s.useCallback)(((t,n,r,o)=>{e.current.set(r,{type:n,el:t,options:o}),t.addEventListener(n,r,o)}),[]),r=(0,s.useCallback)(((t,n,r,o)=>{t.removeEventListener(n,r,o),e.current.delete(r)}),[]);return(0,s.useEffect)((()=>()=>{t.forEach(((e,t)=>{r(e.el,e.type,t,e.options)}))}),[r,t]),{add:n,remove:r}}(),x=g?f:f||0,S=n&&!r,T=(0,s.useCallback)((e=>{if(n)return e.stopPropagation(),void e.preventDefault();e.currentTarget.focus(),null==c||c(e)}),[n,c]),E=(0,s.useCallback)((e=>{b&&Ur(e)&&(e.preventDefault(),e.stopPropagation(),w(!1),k.remove(document,"keyup",E,!1))}),[b,k]),_=(0,s.useCallback)((e=>{if(null==u||u(e),n||e.defaultPrevented||e.metaKey)return;if(!Ur(e.nativeEvent)||g)return;const t=o&&"Enter"===e.key;if(i&&" "===e.key&&(e.preventDefault(),w(!0)),t){e.preventDefault();e.currentTarget.click()}k.add(document,"keyup",E,!1)}),[n,g,u,o,i,k,E]),N=(0,s.useCallback)((e=>{if(null==d||d(e),n||e.defaultPrevented||e.metaKey)return;if(!Ur(e.nativeEvent)||g)return;if(i&&" "===e.key){e.preventDefault(),w(!1);e.currentTarget.click()}}),[i,g,n,d]),I=(0,s.useCallback)((e=>{0===e.button&&(w(!1),k.remove(document,"mouseup",I,!1))}),[k]),C=(0,s.useCallback)((e=>{if(0!==e.button)return;if(n)return e.stopPropagation(),void e.preventDefault();g||w(!0);e.currentTarget.focus({preventScroll:!0}),k.add(document,"mouseup",I,!1),null==a||a(e)}),[n,g,a,k,I]),O=(0,s.useCallback)((e=>{0===e.button&&(g||w(!1),null==l||l(e))}),[l,g]),A=(0,s.useCallback)((e=>{n?e.preventDefault():null==p||p(e)}),[n,p]),P=(0,s.useCallback)((e=>{b&&(e.preventDefault(),w(!1)),null==h||h(e)}),[b,h]),D=Pr(t,(e=>{e&&"BUTTON"!==e.tagName&&y(!1)}));return g?{...m,ref:D,type:"button","aria-disabled":S?void 0:n,disabled:S,onClick:T,onMouseDown:a,onMouseUp:l,onKeyUp:d,onKeyDown:u,onMouseOver:p,onMouseLeave:h}:{...m,ref:D,role:"button","data-active":v(b),"aria-disabled":n?"true":void 0,tabIndex:S?void 0:x,onClick:T,onMouseDown:C,onMouseUp:O,onKeyUp:N,onKeyDown:_,onMouseOver:A,onMouseLeave:P}}Mr.displayName="ButtonGroup";var zr=Object.defineProperty,qr=(e,t,n)=>(((e,t,n)=>{t in e?zr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!==typeof t?t+"":t,n),n);function Jr(e){return e.sort(((e,t)=>{const n=e.compareDocumentPosition(t);if(n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(n&Node.DOCUMENT_POSITION_DISCONNECTED||n&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0}))}function Wr(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function Hr(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var Gr="undefined"!==typeof window?s.useLayoutEffect:s.useEffect,Yr=e=>e,Kr=class{constructor(){var e=this;qr(this,"descendants",new Map),qr(this,"register",(e=>{var t;if(null!=e)return"object"==typeof(t=e)&&"nodeType"in t&&t.nodeType===Node.ELEMENT_NODE?this.registerNode(e):t=>{this.registerNode(t,e)}})),qr(this,"unregister",(e=>{this.descendants.delete(e);const t=Jr(Array.from(this.descendants.keys()));this.assignIndex(t)})),qr(this,"destroy",(()=>{this.descendants.clear()})),qr(this,"assignIndex",(e=>{this.descendants.forEach((t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()}))})),qr(this,"count",(()=>this.descendants.size)),qr(this,"enabledCount",(()=>this.enabledValues().length)),qr(this,"values",(()=>Array.from(this.descendants.values()).sort(((e,t)=>e.index-t.index)))),qr(this,"enabledValues",(()=>this.values().filter((e=>!e.disabled)))),qr(this,"item",(e=>{if(0!==this.count())return this.values()[e]})),qr(this,"enabledItem",(e=>{if(0!==this.enabledCount())return this.enabledValues()[e]})),qr(this,"first",(()=>this.item(0))),qr(this,"firstEnabled",(()=>this.enabledItem(0))),qr(this,"last",(()=>this.item(this.descendants.size-1))),qr(this,"lastEnabled",(()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)})),qr(this,"indexOf",(e=>{var t,n;return e&&null!=(n=null==(t=this.descendants.get(e))?void 0:t.index)?n:-1})),qr(this,"enabledIndexOf",(e=>null==e?-1:this.enabledValues().findIndex((t=>t.node.isSameNode(e))))),qr(this,"next",(function(t){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const r=Wr(t,e.count(),n);return e.item(r)})),qr(this,"nextEnabled",(function(t){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const r=e.item(t);if(!r)return;const o=Wr(e.enabledIndexOf(r.node),e.enabledCount(),n);return e.enabledItem(o)})),qr(this,"prev",(function(t){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const r=Hr(t,e.count()-1,n);return e.item(r)})),qr(this,"prevEnabled",(function(t){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const r=e.item(t);if(!r)return;const o=Hr(e.enabledIndexOf(r.node),e.enabledCount()-1,n);return e.enabledItem(o)})),qr(this,"registerNode",((e,t)=>{if(!e||this.descendants.has(e))return;const n=Jr(Array.from(this.descendants.keys()).concat(e));(null==t?void 0:t.disabled)&&(t.disabled=!!t.disabled);const r={node:e,index:-1,...t};this.descendants.set(e,r),this.assignIndex(n)}))}};var[$r,Xr]=sr({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function Zr(){return[Yr($r),()=>Yr(Xr()),()=>function(){const e=(0,s.useRef)(new Kr);return Gr((()=>()=>e.current.destroy())),e.current}(),e=>function(e){const t=Xr(),[n,r]=(0,s.useState)(-1),o=(0,s.useRef)(null);Gr((()=>()=>{o.current&&t.unregister(o.current)}),[]),Gr((()=>{if(!o.current)return;const e=Number(o.current.dataset.index);n==e||Number.isNaN(e)||r(e)}));const i=Yr(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(o.current),register:Pr(i,o)}}(e)]}function Qr(e){return null!=e&&"object"==typeof e&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function eo(e){var t;if(!Qr(e))return!1;return e instanceof(null!=(t=e.ownerDocument.defaultView)?t:window).HTMLElement}function to(e){return Qr(e)?e.ownerDocument:document}var no=e=>e.hasAttribute("tabindex"),ro=e=>no(e)&&-1===e.tabIndex;function oo(e){return!(!e.parentElement||!oo(e.parentElement))||e.hidden}function io(e){if(!eo(e)||oo(e)||function(e){return!0===Boolean(e.getAttribute("disabled"))||!0===Boolean(e.getAttribute("aria-disabled"))}(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const n={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in n?n[t]():!!function(e){const t=e.getAttribute("contenteditable");return"false"!==t&&null!=t}(e)||no(e)}var ao=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"].join(),so=e=>e.offsetWidth>0&&e.offsetHeight>0;function lo(e){const t=Array.from(e.querySelectorAll(ao));return t.unshift(e),t.filter((e=>io(e)&&so(e)))}function co(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=(0,s.useRef)(e);return(0,s.useEffect)((()=>{n.current=e})),(0,s.useCallback)((function(){for(var e,t=arguments.length,r=new Array(t),o=0;o{const i="function"===typeof e?e():null!=e?e:document;if(n&&i)return i.addEventListener(t,o,r),()=>{i.removeEventListener(t,o,r)}}),[t,e,r,o,n]),()=>{const n="function"===typeof e?e():null!=e?e:document;null==n||n.removeEventListener(t,o,r)}}var fo=Boolean(null==globalThis?void 0:globalThis.document)?s.useLayoutEffect:s.useEffect;function po(e,t){const n=(0,s.useRef)(!1),r=(0,s.useRef)(!1);(0,s.useEffect)((()=>{if(n.current&&r.current)return e();r.current=!0}),t),(0,s.useEffect)((()=>(n.current=!0,()=>{n.current=!1})),[])}function ho(e){const t=e.current;if(!t)return!1;const n=function(e){return to(e).activeElement}(t);return!!n&&(!t.contains(n)&&!(!((r=n)&&eo(r)&&io(r))||ro(r)));var r}function mo(e,t){const{shouldFocus:n,visible:r,focusRef:o}=t,i=n&&!r;po((()=>{if(!i)return;if(ho(e))return;const t=(null==o?void 0:o.current)||e.current;let n;return t?(n=requestAnimationFrame((()=>{t.focus({preventScroll:!0})})),()=>{cancelAnimationFrame(n)}):void 0}),[i,e,o])}var go={preventScroll:!0,shouldFocus:!1};var vo=(e,t)=>({var:e,varRef:t?"var(".concat(e,", ").concat(t,")"):"var(".concat(e,")")}),yo={arrowShadowColor:vo("--popper-arrow-shadow-color"),arrowSize:vo("--popper-arrow-size","8px"),arrowSizeHalf:vo("--popper-arrow-size-half"),arrowBg:vo("--popper-arrow-bg"),transformOrigin:vo("--popper-transform-origin"),arrowOffset:vo("--popper-arrow-offset")};var bo={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},wo={scroll:!0,resize:!0};function ko(e){let t;return t="object"===typeof e?{enabled:!0,options:{...wo,...e}}:{enabled:e,options:wo},t}var xo={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:e=>{let{state:t}=e;t.styles.popper.width="".concat(t.rects.reference.width,"px")},effect:e=>{let{state:t}=e;return()=>{const e=t.elements.reference;t.elements.popper.style.width="".concat(e.offsetWidth,"px")}}},So={name:"transformOrigin",enabled:!0,phase:"write",fn:e=>{let{state:t}=e;To(t)},effect:e=>{let{state:t}=e;return()=>{To(t)}}},To=e=>{var t;e.elements.popper.style.setProperty(yo.transformOrigin.var,(t=e.placement,bo[t]))},Eo={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:e=>{let{state:t}=e;_o(t)}},_o=e=>{var t;if(!e.placement)return;const n=No(e.placement);if((null==(t=e.elements)?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:yo.arrowSize.varRef,height:yo.arrowSize.varRef,zIndex:-1});const t={[yo.arrowSizeHalf.var]:"calc(".concat(yo.arrowSize.varRef," / 2 - 1px)"),[yo.arrowOffset.var]:"calc(".concat(yo.arrowSizeHalf.varRef," * -1)")};for(const n in t)e.elements.arrow.style.setProperty(n,t[n])}},No=e=>e.startsWith("top")?{property:"bottom",value:yo.arrowOffset.varRef}:e.startsWith("bottom")?{property:"top",value:yo.arrowOffset.varRef}:e.startsWith("left")?{property:"right",value:yo.arrowOffset.varRef}:e.startsWith("right")?{property:"left",value:yo.arrowOffset.varRef}:void 0,Io={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:e=>{let{state:t}=e;Co(t)},effect:e=>{let{state:t}=e;return()=>{Co(t)}}},Co=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");if(!t)return;const n=(r=e.placement).includes("top")?"1px 1px 0px 0 var(--popper-arrow-shadow-color)":r.includes("bottom")?"-1px -1px 0px 0 var(--popper-arrow-shadow-color)":r.includes("right")?"-1px 1px 0px 0 var(--popper-arrow-shadow-color)":r.includes("left")?"1px -1px 0px 0 var(--popper-arrow-shadow-color)":void 0;var r;n&&t.style.setProperty("--popper-arrow-default-shadow",n),Object.assign(t.style,{transform:"rotate(45deg)",background:yo.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:"var(--popper-arrow-shadow, var(--popper-arrow-default-shadow))"})},Oo={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},Ao={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function Po(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Do(e){return e instanceof Po(e).Element||e instanceof Element}function jo(e){return e instanceof Po(e).HTMLElement||e instanceof HTMLElement}function Ro(e){return"undefined"!==typeof ShadowRoot&&(e instanceof Po(e).ShadowRoot||e instanceof ShadowRoot)}var Lo=Math.max,Fo=Math.min,Mo=Math.round;function Bo(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function Uo(){return!/^((?!chrome|android).)*safari/i.test(Bo())}function Vo(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&jo(e)&&(o=e.offsetWidth>0&&Mo(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Mo(r.height)/e.offsetHeight||1);var a=(Do(e)?Po(e):window).visualViewport,s=!Uo()&&n,l=(r.left+(s&&a?a.offsetLeft:0))/o,c=(r.top+(s&&a?a.offsetTop:0))/i,u=r.width/o,d=r.height/i;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l,x:l,y:c}}function zo(e){var t=Po(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function qo(e){return e?(e.nodeName||"").toLowerCase():null}function Jo(e){return((Do(e)?e.ownerDocument:e.document)||window.document).documentElement}function Wo(e){return Vo(Jo(e)).left+zo(e).scrollLeft}function Ho(e){return Po(e).getComputedStyle(e)}function Go(e){var t=Ho(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function Yo(e,t,n){void 0===n&&(n=!1);var r=jo(t),o=jo(t)&&function(e){var t=e.getBoundingClientRect(),n=Mo(t.width)/e.offsetWidth||1,r=Mo(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),i=Jo(t),a=Vo(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==qo(t)||Go(i))&&(s=function(e){return e!==Po(e)&&jo(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:zo(e);var t}(t)),jo(t)?((l=Vo(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=Wo(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Ko(e){var t=Vo(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function $o(e){return"html"===qo(e)?e:e.assignedSlot||e.parentNode||(Ro(e)?e.host:null)||Jo(e)}function Xo(e){return["html","body","#document"].indexOf(qo(e))>=0?e.ownerDocument.body:jo(e)&&Go(e)?e:Xo($o(e))}function Zo(e,t){var n;void 0===t&&(t=[]);var r=Xo(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=Po(r),a=o?[i].concat(i.visualViewport||[],Go(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(Zo($o(a)))}function Qo(e){return["table","td","th"].indexOf(qo(e))>=0}function ei(e){return jo(e)&&"fixed"!==Ho(e).position?e.offsetParent:null}function ti(e){for(var t=Po(e),n=ei(e);n&&Qo(n)&&"static"===Ho(n).position;)n=ei(n);return n&&("html"===qo(n)||"body"===qo(n)&&"static"===Ho(n).position)?t:n||function(e){var t=/firefox/i.test(Bo());if(/Trident/i.test(Bo())&&jo(e)&&"fixed"===Ho(e).position)return null;var n=$o(e);for(Ro(n)&&(n=n.host);jo(n)&&["html","body"].indexOf(qo(n))<0;){var r=Ho(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var ni="top",ri="bottom",oi="right",ii="left",ai="auto",si=[ni,ri,oi,ii],li="start",ci="end",ui="clippingParents",di="viewport",fi="popper",pi="reference",hi=si.reduce((function(e,t){return e.concat([t+"-"+li,t+"-"+ci])}),[]),mi=[].concat(si,[ai]).reduce((function(e,t){return e.concat([t,t+"-"+li,t+"-"+ci])}),[]),gi=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function vi(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}function yi(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}var bi={placement:"bottom",modifiers:[],strategy:"absolute"};function wi(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function Ni(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?Ti(o):null,a=o?Ei(o):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(i){case ni:t={x:s,y:n.y-r.height};break;case ri:t={x:s,y:n.y+n.height};break;case oi:t={x:n.x+n.width,y:l};break;case ii:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=i?_i(i):null;if(null!=c){var u="y"===c?"height":"width";switch(a){case li:t[c]=t[c]-(n[u]/2-r[u]/2);break;case ci:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}const Ii={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=Ni({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};var Ci={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Oi(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=a.x,p=void 0===f?0:f,h=a.y,m=void 0===h?0:h,g="function"===typeof u?u({x:p,y:m}):{x:p,y:m};p=g.x,m=g.y;var v=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),b=ii,w=ni,k=window;if(c){var x=ti(n),S="clientHeight",T="clientWidth";if(x===Po(n)&&"static"!==Ho(x=Jo(n)).position&&"absolute"===s&&(S="scrollHeight",T="scrollWidth"),o===ni||(o===ii||o===oi)&&i===ci)w=ri,m-=(d&&x===k&&k.visualViewport?k.visualViewport.height:x[S])-r.height,m*=l?1:-1;if(o===ii||(o===ni||o===ri)&&i===ci)b=oi,p-=(d&&x===k&&k.visualViewport?k.visualViewport.width:x[T])-r.width,p*=l?1:-1}var E,_=Object.assign({position:s},c&&Ci),N=!0===u?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:Mo(n*o)/o||0,y:Mo(r*o)/o||0}}({x:p,y:m},Po(n)):{x:p,y:m};return p=N.x,m=N.y,l?Object.assign({},_,((E={})[w]=y?"0":"",E[b]=v?"0":"",E.transform=(k.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",E)):Object.assign({},_,((t={})[w]=y?m+"px":"",t[b]=v?p+"px":"",t.transform="",t))}const Ai={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,l=void 0===s||s,c={placement:Ti(t.placement),variation:Ei(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Oi(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Oi(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};const Pi={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];jo(o)&&qo(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});jo(r)&&qo(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};const Di={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=mi.reduce((function(e,n){return e[n]=function(e,t,n){var r=Ti(e),o=[ii,ni].indexOf(r)>=0?-1:1,i="function"===typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[ii,oi].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}};var ji={left:"right",right:"left",bottom:"top",top:"bottom"};function Ri(e){return e.replace(/left|right|bottom|top/g,(function(e){return ji[e]}))}var Li={start:"end",end:"start"};function Fi(e){return e.replace(/start|end/g,(function(e){return Li[e]}))}function Mi(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Ro(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Bi(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Ui(e,t,n){return t===di?Bi(function(e,t){var n=Po(e),r=Jo(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var c=Uo();(c||!c&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+Wo(e),y:l}}(e,n)):Do(t)?function(e,t){var n=Vo(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):Bi(function(e){var t,n=Jo(e),r=zo(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=Lo(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=Lo(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+Wo(e),l=-r.scrollTop;return"rtl"===Ho(o||n).direction&&(s+=Lo(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(Jo(e)))}function Vi(e,t,n,r){var o="clippingParents"===t?function(e){var t=Zo($o(e)),n=["absolute","fixed"].indexOf(Ho(e).position)>=0&&jo(e)?ti(e):e;return Do(n)?t.filter((function(e){return Do(e)&&Mi(e,n)&&"body"!==qo(e)})):[]}(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce((function(t,n){var o=Ui(e,n,r);return t.top=Lo(o.top,t.top),t.right=Fo(o.right,t.right),t.bottom=Fo(o.bottom,t.bottom),t.left=Lo(o.left,t.left),t}),Ui(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function zi(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function qi(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function Ji(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.strategy,a=void 0===i?e.strategy:i,s=n.boundary,l=void 0===s?ui:s,c=n.rootBoundary,u=void 0===c?di:c,d=n.elementContext,f=void 0===d?fi:d,p=n.altBoundary,h=void 0!==p&&p,m=n.padding,g=void 0===m?0:m,v=zi("number"!==typeof g?g:qi(g,si)),y=f===fi?pi:fi,b=e.rects.popper,w=e.elements[h?y:f],k=Vi(Do(w)?w:w.contextElement||Jo(e.elements.popper),l,u,a),x=Vo(e.elements.reference),S=Ni({reference:x,element:b,strategy:"absolute",placement:o}),T=Bi(Object.assign({},b,S)),E=f===fi?T:x,_={top:k.top-E.top+v.top,bottom:E.bottom-k.bottom+v.bottom,left:k.left-E.left+v.left,right:E.right-k.right+v.right},N=e.modifiersData.offset;if(f===fi&&N){var I=N[o];Object.keys(_).forEach((function(e){var t=[oi,ri].indexOf(e)>=0?1:-1,n=[ni,ri].indexOf(e)>=0?"y":"x";_[e]+=I[n]*t}))}return _}const Wi={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,h=void 0===p||p,m=n.allowedAutoPlacements,g=t.options.placement,v=Ti(g),y=l||(v===g||!h?[Ri(g)]:function(e){if(Ti(e)===ai)return[];var t=Ri(e);return[Fi(e),t,Fi(t)]}(g)),b=[g].concat(y).reduce((function(e,n){return e.concat(Ti(n)===ai?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?mi:l,u=Ei(r),d=u?s?hi:hi.filter((function(e){return Ei(e)===u})):si,f=d.filter((function(e){return c.indexOf(e)>=0}));0===f.length&&(f=d);var p=f.reduce((function(t,n){return t[n]=Ji(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[Ti(n)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:m}):n)}),[]),w=t.rects.reference,k=t.rects.popper,x=new Map,S=!0,T=b[0],E=0;E=0,O=C?"width":"height",A=Ji(t,{placement:_,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),P=C?I?oi:ii:I?ri:ni;w[O]>k[O]&&(P=Ri(P));var D=Ri(P),j=[];if(i&&j.push(A[N]<=0),s&&j.push(A[P]<=0,A[D]<=0),j.every((function(e){return e}))){T=_,S=!1;break}x.set(_,j)}if(S)for(var R=function(e){var t=b.find((function(t){var n=x.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return T=t,"break"},L=h?3:1;L>0;L--){if("break"===R(L))break}t.placement!==T&&(t.modifiersData[r]._skip=!0,t.placement=T,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Hi(e,t,n){return Lo(e,Fo(t,n))}const Gi={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0!==a&&a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=void 0===f||f,h=n.tetherOffset,m=void 0===h?0:h,g=Ji(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),v=Ti(t.placement),y=Ei(t.placement),b=!y,w=_i(v),k="x"===w?"y":"x",x=t.modifiersData.popperOffsets,S=t.rects.reference,T=t.rects.popper,E="function"===typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,_="number"===typeof E?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),N=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,I={x:0,y:0};if(x){if(i){var C,O="y"===w?ni:ii,A="y"===w?ri:oi,P="y"===w?"height":"width",D=x[w],j=D+g[O],R=D-g[A],L=p?-T[P]/2:0,F=y===li?S[P]:T[P],M=y===li?-T[P]:-S[P],B=t.elements.arrow,U=p&&B?Ko(B):{width:0,height:0},V=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},z=V[O],q=V[A],J=Hi(0,S[P],U[P]),W=b?S[P]/2-L-J-z-_.mainAxis:F-J-z-_.mainAxis,H=b?-S[P]/2+L+J+q+_.mainAxis:M+J+q+_.mainAxis,G=t.elements.arrow&&ti(t.elements.arrow),Y=G?"y"===w?G.clientTop||0:G.clientLeft||0:0,K=null!=(C=null==N?void 0:N[w])?C:0,$=D+H-K,X=Hi(p?Fo(j,D+W-K-Y):j,D,p?Lo(R,$):R);x[w]=X,I[w]=X-D}if(s){var Z,Q="x"===w?ni:ii,ee="x"===w?ri:oi,te=x[k],ne="y"===k?"height":"width",re=te+g[Q],oe=te-g[ee],ie=-1!==[ni,ii].indexOf(v),ae=null!=(Z=null==N?void 0:N[k])?Z:0,se=ie?re:te-S[ne]-T[ne]-ae+_.altAxis,le=ie?te+S[ne]+T[ne]-ae-_.altAxis:oe,ce=p&&ie?function(e,t,n){var r=Hi(e,t,n);return r>n?n:r}(se,te,le):Hi(p?se:re,te,p?le:oe);x[k]=ce,I[k]=ce-te}t.modifiersData[r]=I}},requiresIfExists:["offset"]};const Yi={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Ti(n.placement),l=_i(s),c=[ii,oi].indexOf(s)>=0?"height":"width";if(i&&a){var u=function(e,t){return zi("number"!==typeof(e="function"===typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:qi(e,si))}(o.padding,n),d=Ko(i),f="y"===l?ni:ii,p="y"===l?ri:oi,h=n.rects.reference[c]+n.rects.reference[l]-a[l]-n.rects.popper[c],m=a[l]-n.rects.reference[l],g=ti(i),v=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,y=h/2-m/2,b=u[f],w=v-d[c]-u[p],k=v/2-d[c]/2+y,x=Hi(b,k,w),S=l;n.modifiersData[r]=((t={})[S]=x,t.centerOffset=x-k,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!==typeof r||(r=t.elements.popper.querySelector(r)))&&Mi(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ki(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function $i(e){return[ni,oi,ri,ii].some((function(t){return e[t]>=0}))}const Xi={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=Ji(t,{elementContext:"reference"}),s=Ji(t,{altBoundary:!0}),l=Ki(a,r),c=Ki(s,o,i),u=$i(l),d=$i(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}};var Zi=ki({defaultModifiers:[Si,Ii,Ai,Pi,Di,Wi,Gi,Yi,Xi]});function Qi(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:o="absolute",arrowPadding:i=8,eventListeners:a=!0,offset:l,gutter:c=8,flip:u=!0,boundary:d="clippingParents",preventOverflow:f=!0,matchWidth:p,direction:h="ltr"}=e,m=(0,s.useRef)(null),g=(0,s.useRef)(null),v=(0,s.useRef)(null),y=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ltr";var n,r;const o=(null==(n=Oo[e])?void 0:n[t])||e;return"ltr"===t?o:null!=(r=Ao[e])?r:o}(r,h),b=(0,s.useRef)((()=>{})),w=(0,s.useCallback)((()=>{var e;t&&m.current&&g.current&&(null==(e=b.current)||e.call(b),v.current=Zi(m.current,g.current,{placement:y,modifiers:[Io,Eo,So,{...xo,enabled:!!p},{name:"eventListeners",...ko(a)},{name:"arrow",options:{padding:i}},{name:"offset",options:{offset:null!=l?l:[0,c]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!f,options:{boundary:d}},...null!=n?n:[]],strategy:o}),v.current.forceUpdate(),b.current=v.current.destroy)}),[y,t,n,p,a,i,l,c,u,f,d,o]);(0,s.useEffect)((()=>()=>{var e;m.current||g.current||(null==(e=v.current)||e.destroy(),v.current=null)}),[]);const k=(0,s.useCallback)((e=>{m.current=e,w()}),[w]),x=(0,s.useCallback)((function(){return{...arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},ref:Pr(k,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null)}}),[k]),S=(0,s.useCallback)((e=>{g.current=e,w()}),[w]),T=(0,s.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{...e,ref:Pr(S,t),style:{...e.style,position:o,minWidth:p?void 0:"max-content",inset:"0 auto auto 0"}}}),[o,S,p]),E=(0,s.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const{size:n,shadowColor:r,bg:o,style:i,...a}=e;return{...a,ref:t,"data-popper-arrow":"",style:ea(e)}}),[]),_=(0,s.useCallback)((function(){return{...arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},ref:arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,"data-popper-arrow-inner":""}}),[]);return{update(){var e;null==(e=v.current)||e.update()},forceUpdate(){var e;null==(e=v.current)||e.forceUpdate()},transformOrigin:yo.transformOrigin.varRef,referenceRef:k,popperRef:S,getPopperProps:T,getArrowProps:E,getArrowInnerProps:_,getReferenceProps:x}}function ea(e){const{size:t,shadowColor:n,bg:r,style:o}=e,i={...o,position:"absolute"};return t&&(i["--popper-arrow-size"]=t),n&&(i["--popper-arrow-shadow-color"]=n),r&&(i["--popper-arrow-bg"]=r),i}function ta(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{onClose:t,onOpen:n,isOpen:r,id:o}=e,i=co(n),a=co(t),[l,c]=(0,s.useState)(e.defaultIsOpen||!1),u=void 0!==r?r:l,d=void 0!==r,f=(0,s.useId)(),p=null!=o?o:"disclosure-".concat(f),h=(0,s.useCallback)((()=>{d||c(!1),null==a||a()}),[d,a]),m=(0,s.useCallback)((()=>{d||c(!0),null==i||i()}),[d,i]),g=(0,s.useCallback)((()=>{u?h():m()}),[u,m,h]);return{isOpen:u,onOpen:m,onClose:h,onToggle:g,isControlled:d,getButtonProps:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{...e,"aria-expanded":u,"aria-controls":p,onClick(t){var n;null==(n=e.onClick)||n.call(e,t),g()}}},getDisclosureProps:function(){return{...arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},hidden:!u,id:p}}}}function na(e,t){var n;const r=e.target;if(r){if(!ra(r).contains(r))return!1}return!(null==(n=t.current)?void 0:n.contains(r))}function ra(e){var t;return null!=(t=null==e?void 0:e.ownerDocument)?t:document}function oa(e){const{isOpen:t,ref:n}=e,[r,o]=(0,s.useState)(t),[i,a]=(0,s.useState)(!1);(0,s.useEffect)((()=>{i||(o(t),a(!0))}),[t,i,r]),uo((()=>n.current),"animationend",(()=>{o(t)}));return{present:!(!t&&!r),onComplete(){var e;const t=function(e){var t,n;return null!=(n=null==(t=to(e))?void 0:t.defaultView)?n:window}(n.current),r=new t.CustomEvent("animationend",{bubbles:!0});null==(e=n.current)||e.dispatchEvent(r)}}}function ia(e){const{wasSelected:t,enabled:n,isSelected:r,mode:o="unmount"}=e;return!n||(!!r||!("keepMounted"!==o||!t))}var[aa,sa,la,ca]=Zr(),[ua,da]=sr({strict:!1,name:"MenuContext"});function fa(e){var t;return null!=(t=null==e?void 0:e.ownerDocument)?t:document}function pa(e){return fa(e).activeElement===e}function ha(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{id:t,closeOnSelect:n=!0,closeOnBlur:r=!0,initialFocusRef:o,autoSelect:i=!0,isLazy:a,isOpen:l,defaultIsOpen:c,onClose:u,onOpen:d,placement:f="bottom-start",lazyBehavior:p="unmount",direction:h,computePositionOnMount:m=!1,...g}=e,v=(0,s.useRef)(null),y=(0,s.useRef)(null),b=la(),w=(0,s.useCallback)((()=>{requestAnimationFrame((()=>{var e;null==(e=v.current)||e.focus({preventScroll:!1})}))}),[]),k=(0,s.useCallback)((()=>{const e=setTimeout((()=>{var e;if(o)null==(e=o.current)||e.focus();else{const e=b.firstEnabled();e&&O(e.index)}}));R.current.add(e)}),[b,o]),x=(0,s.useCallback)((()=>{const e=setTimeout((()=>{const e=b.lastEnabled();e&&O(e.index)}));R.current.add(e)}),[b]),S=(0,s.useCallback)((()=>{null==d||d(),i?k():w()}),[i,k,w,d]),{isOpen:T,onOpen:E,onClose:_,onToggle:N}=ta({isOpen:l,defaultIsOpen:c,onClose:u,onOpen:S});!function(e){const{ref:t,handler:n,enabled:r=!0}=e,o=co(n),i=(0,s.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}).current;(0,s.useEffect)((()=>{if(!r)return;const e=e=>{na(e,t)&&(i.isPointerDown=!0)},a=e=>{i.ignoreEmulatedMouseEvents?i.ignoreEmulatedMouseEvents=!1:i.isPointerDown&&n&&na(e,t)&&(i.isPointerDown=!1,o(e))},s=e=>{i.ignoreEmulatedMouseEvents=!0,n&&i.isPointerDown&&na(e,t)&&(i.isPointerDown=!1,o(e))},l=ra(t.current);return l.addEventListener("mousedown",e,!0),l.addEventListener("mouseup",a,!0),l.addEventListener("touchstart",e,!0),l.addEventListener("touchend",s,!0),()=>{l.removeEventListener("mousedown",e,!0),l.removeEventListener("mouseup",a,!0),l.removeEventListener("touchstart",e,!0),l.removeEventListener("touchend",s,!0)}}),[n,t,o,i,r])}({enabled:T&&r,ref:v,handler:e=>{var t;(null==(t=y.current)?void 0:t.contains(e.target))||_()}});const I=Qi({...g,enabled:T||m,placement:f,direction:h}),[C,O]=(0,s.useState)(-1);po((()=>{T||O(-1)}),[T]),mo(v,{focusRef:y,visible:T,shouldFocus:!0});const A=oa({isOpen:T,ref:v}),[P,D]=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;rn.map((e=>"".concat(e,"-").concat(i)))),[i,n])}(t,"menu-button","menu-list"),j=(0,s.useCallback)((()=>{E(),w()}),[E,w]),R=(0,s.useRef)(new Set([]));(0,s.useEffect)((()=>{const e=R.current;return()=>{e.forEach((e=>clearTimeout(e))),e.clear()}}),[]);const L=(0,s.useCallback)((()=>{E(),k()}),[k,E]),F=(0,s.useCallback)((()=>{E(),x()}),[E,x]),M=(0,s.useCallback)((()=>{var e,t;const n=fa(v.current),r=null==(e=v.current)?void 0:e.contains(n.activeElement);if(!(T&&!r))return;const o=null==(t=b.item(C))?void 0:t.node;null==o||o.focus({preventScroll:!0})}),[T,C,b]),B=(0,s.useRef)(null);return{openAndFocusMenu:j,openAndFocusFirstItem:L,openAndFocusLastItem:F,onTransitionEnd:M,unstable__animationState:A,descendants:b,popper:I,buttonId:P,menuId:D,forceUpdate:I.forceUpdate,orientation:"vertical",isOpen:T,onToggle:N,onOpen:E,onClose:_,menuRef:v,buttonRef:y,focusedIndex:C,closeOnSelect:n,closeOnBlur:r,autoSelect:i,setFocusedIndex:O,isLazy:a,lazyBehavior:p,initialFocusRef:o,rafId:B}}function ma(e){var t;return function(e){var t;if(!function(e){return null!=e&&"object"==typeof e&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}(e))return!1;const n=null!=(t=e.ownerDocument.defaultView)?t:window;return e instanceof n.HTMLElement}(e)&&!!(null==(t=null==e?void 0:e.getAttribute("role"))?void 0:t.startsWith("menuitem"))}function ga(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const{onMouseEnter:n,onMouseMove:r,onMouseLeave:o,onClick:i,onFocus:a,isDisabled:l,isFocusable:c,closeOnSelect:u,type:d,...f}=e,p=da(),{setFocusedIndex:h,focusedIndex:m,closeOnSelect:g,onClose:v,menuRef:y,isOpen:b,menuId:w,rafId:k}=p,x=(0,s.useRef)(null),S="".concat(w,"-menuitem-").concat((0,s.useId)()),{index:T,register:E}=ca({disabled:l&&!c}),_=(0,s.useCallback)((e=>{null==n||n(e),l||h(T)}),[h,T,l,n]),N=(0,s.useCallback)((e=>{null==r||r(e),x.current&&!pa(x.current)&&_(e)}),[_,r]),I=(0,s.useCallback)((e=>{null==o||o(e),l||h(-1)}),[h,l,o]),C=(0,s.useCallback)((e=>{null==i||i(e),ma(e.currentTarget)&&(null!=u?u:g)&&v()}),[v,i,g,u]),O=(0,s.useCallback)((e=>{null==a||a(e),h(T)}),[h,a,T]),A=T===m,P=l&&!c;po((()=>{if(b)return A&&!P&&x.current?(k.current&&cancelAnimationFrame(k.current),k.current=requestAnimationFrame((()=>{var e;null==(e=x.current)||e.focus({preventScroll:!0}),k.current=null}))):y.current&&!pa(y.current)&&y.current.focus({preventScroll:!0}),()=>{k.current&&cancelAnimationFrame(k.current)}}),[A,P,y,b]);const D=Vr({onClick:C,onFocus:O,onMouseEnter:_,onMouseMove:N,onMouseLeave:I,ref:Pr(E,x,t),isDisabled:l,isFocusable:c});return{...f,...D,type:null!=d?d:D.type,id:S,role:"menuitem",tabIndex:A?0:-1}}var[va,ya]=sr({name:"MenuStylesContext",errorMessage:"useMenuStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),ba=e=>{const{children:t}=e,n=gr("Menu",e),r=st(e),{direction:o}=dr(),{descendants:i,...a}=ha({...r,direction:o}),l=(0,s.useMemo)((()=>a),[a]),{isOpen:c,onClose:d,forceUpdate:f}=l;return(0,u.jsx)(aa,{value:i,children:(0,u.jsx)(ua,{value:l,children:(0,u.jsx)(va,{value:n,children:m(t,{isOpen:c,onClose:d,forceUpdate:f})})})})};ba.displayName="Menu";var wa=d(((e,t)=>{const n=ya();return(0,u.jsx)(nr.button,{ref:t,...e,__css:{display:"inline-flex",appearance:"none",alignItems:"center",outline:0,...n.button}})})),ka=d(((e,t)=>{const{children:n,as:r,...o}=e,i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=da(),{onToggle:r,popper:o,openAndFocusFirstItem:i,openAndFocusLastItem:a}=n,l=(0,s.useCallback)((e=>{const t=e.key,n={Enter:i,ArrowDown:i,ArrowUp:a}[t];n&&(e.preventDefault(),e.stopPropagation(),n(e))}),[i,a]);return{...e,ref:Pr(n.buttonRef,t,o.referenceRef),id:n.buttonId,"data-active":v(n.isOpen),"aria-expanded":n.isOpen,"aria-haspopup":"menu","aria-controls":n.menuId,onClick:b(e.onClick,r),onKeyDown:b(e.onKeyDown,l)}}(o,t),a=r||wa;return(0,u.jsx)(a,{...i,className:f("chakra-menu__menu-button",e.className),children:(0,u.jsx)(nr.span,{__css:{pointerEvents:"none",flex:"1 1 auto",minW:0},children:e.children})})}));ka.displayName="MenuButton";var xa=d(((e,t)=>{const{icon:n,children:r,isRound:o,"aria-label":i,...a}=e,l=n||r,c=(0,s.isValidElement)(l)?(0,s.cloneElement)(l,{"aria-hidden":!0,focusable:!1}):null;return(0,u.jsx)(jr,{padding:"0",borderRadius:o?"full":void 0,ref:t,"aria-label":i,...a,children:c})}));xa.displayName="IconButton";var Sa={path:(0,u.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.5",children:[(0,u.jsx)("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),(0,u.jsx)("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),(0,u.jsx)("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},Ta=d(((e,t)=>{const{as:n,viewBox:r,color:o="currentColor",focusable:i=!1,children:a,className:s,__css:l,...c}=e,d={ref:t,focusable:i,className:f("chakra-icon",s),__css:{w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:o,...l,...mr("Icon",e)}},p=null!=r?r:Sa.viewBox;if(n&&"string"!==typeof n)return(0,u.jsx)(nr.svg,{as:n,...d,...c});const h=null!=a?a:Sa.path;return(0,u.jsx)(nr.svg,{verticalAlign:"middle",viewBox:p,...d,...c,children:h})}));Ta.displayName="Icon";const Ea=(0,s.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),_a=(0,s.createContext)({}),Na=(0,s.createContext)(null),Ia="undefined"!==typeof document,Ca=Ia?s.useLayoutEffect:s.useEffect,Oa=(0,s.createContext)({strict:!1}),Aa=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),Pa="data-"+Aa("framerAppearId");function Da(e){return"object"===typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function ja(e){return"string"===typeof e||Array.isArray(e)}function Ra(e){return"object"===typeof e&&"function"===typeof e.start}const La=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Fa=["initial",...La];function Ma(e){return Ra(e.animate)||Fa.some((t=>ja(e[t])))}function Ba(e){return Boolean(Ma(e)||e.variants)}function Ua(e){const{initial:t,animate:n}=function(e,t){if(Ma(e)){const{initial:t,animate:n}=e;return{initial:!1===t||ja(t)?t:void 0,animate:ja(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,s.useContext)(_a));return(0,s.useMemo)((()=>({initial:t,animate:n})),[Va(t),Va(n)])}function Va(e){return Array.isArray(e)?e.join(" "):e}const za={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"]},qa={};for(const n in za)qa[n]={isEnabled:e=>za[n].some((t=>!!e[t]))};const Ja=(0,s.createContext)({}),Wa=(0,s.createContext)({}),Ha=Symbol.for("motionComponentSymbol");function Ga(e){let{preloadedFeatures:t,createVisualElement:n,useRender:r,useVisualState:o,Component:i}=e;t&&function(e){for(const t in e)qa[t]={...qa[t],...e[t]}}(t);const a=(0,s.forwardRef)((function(e,a){let l;const c={...(0,s.useContext)(Ea),...e,layoutId:Ya(e)},{isStatic:u}=c,d=Ua(e),f=o(e,u);if(!u&&Ia){d.visualElement=function(e,t,n,r){const{visualElement:o}=(0,s.useContext)(_a),i=(0,s.useContext)(Oa),a=(0,s.useContext)(Na),l=(0,s.useContext)(Ea).reducedMotion,c=(0,s.useRef)();r=r||i.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:o,props:n,presenceContext:a,blockInitialAnimation:!!a&&!1===a.initial,reducedMotionConfig:l}));const u=c.current;(0,s.useInsertionEffect)((()=>{u&&u.update(n,a)}));const d=(0,s.useRef)(Boolean(n[Pa]&&!window.HandoffComplete));return Ca((()=>{u&&(u.render(),d.current&&u.animationState&&u.animationState.animateChanges())})),(0,s.useEffect)((()=>{u&&(u.updateFeatures(),!d.current&&u.animationState&&u.animationState.animateChanges(),d.current&&(d.current=!1,window.HandoffComplete=!0))})),u}(i,f,c,n);const e=(0,s.useContext)(Wa),r=(0,s.useContext)(Oa).strict;d.visualElement&&(l=d.visualElement.loadFeatures(c,r,t,e))}return s.createElement(_a.Provider,{value:d},l&&d.visualElement?s.createElement(l,{visualElement:d.visualElement,...c}):null,r(i,e,function(e,t,n){return(0,s.useCallback)((r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&("function"===typeof n?n(r):Da(n)&&(n.current=r))}),[t])}(f,d.visualElement,a),f,u,d.visualElement))}));return a[Ha]=i,a}function Ya(e){let{layoutId:t}=e;const n=(0,s.useContext)(Ja).id;return n&&void 0!==t?n+"-"+t:t}function Ka(e){function t(t){return Ga(e(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}))}if("undefined"===typeof Proxy)return t;const n=new Map;return new Proxy(t,{get:(e,r)=>(n.has(r)||n.set(r,t(r)),n.get(r))})}const $a=["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 Xa(e){return"string"===typeof e&&!e.includes("-")&&!!($a.indexOf(e)>-1||/[A-Z]/.test(e))}const Za={};const Qa=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],es=new Set(Qa);function ts(e,t){let{layout:n,layoutId:r}=t;return es.has(e)||e.startsWith("origin")||(n||void 0!==r)&&(!!Za[e]||"opacity"===e)}const ns=e=>Boolean(e&&e.getVelocity),rs={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},os=Qa.length;const is=e=>t=>"string"===typeof t&&t.startsWith(e),as=is("--"),ss=is("var(--"),ls=(e,t)=>t&&"number"===typeof e?t.transform(e):e,cs=(e,t,n)=>Math.min(Math.max(n,e),t),us={test:e=>"number"===typeof e,parse:parseFloat,transform:e=>e},ds={...us,transform:e=>cs(0,1,e)},fs={...us,default:1},ps=e=>Math.round(1e5*e)/1e5,hs=/(-)?([\d]*\.?[\d])+/g,ms=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,gs=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function vs(e){return"string"===typeof e}const ys=e=>({test:t=>vs(t)&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>"".concat(t).concat(e)}),bs=ys("deg"),ws=ys("%"),ks=ys("px"),xs=ys("vh"),Ss=ys("vw"),Ts={...ws,parse:e=>ws.parse(e)/100,transform:e=>ws.transform(100*e)},Es={...us,transform:Math.round},_s={borderWidth:ks,borderTopWidth:ks,borderRightWidth:ks,borderBottomWidth:ks,borderLeftWidth:ks,borderRadius:ks,radius:ks,borderTopLeftRadius:ks,borderTopRightRadius:ks,borderBottomRightRadius:ks,borderBottomLeftRadius:ks,width:ks,maxWidth:ks,height:ks,maxHeight:ks,size:ks,top:ks,right:ks,bottom:ks,left:ks,padding:ks,paddingTop:ks,paddingRight:ks,paddingBottom:ks,paddingLeft:ks,margin:ks,marginTop:ks,marginRight:ks,marginBottom:ks,marginLeft:ks,rotate:bs,rotateX:bs,rotateY:bs,rotateZ:bs,scale:fs,scaleX:fs,scaleY:fs,scaleZ:fs,skew:bs,skewX:bs,skewY:bs,distance:ks,translateX:ks,translateY:ks,translateZ:ks,x:ks,y:ks,z:ks,perspective:ks,transformPerspective:ks,opacity:ds,originX:Ts,originY:Ts,originZ:ks,zIndex:Es,fillOpacity:ds,strokeOpacity:ds,numOctaves:Es};function Ns(e,t,n,r){const{style:o,vars:i,transform:a,transformOrigin:s}=e;let l=!1,c=!1,u=!0;for(const d in t){const e=t[d];if(as(d)){i[d]=e;continue}const n=_s[d],r=ls(e,n);if(es.has(d)){if(l=!0,a[d]=r,!u)continue;e!==(n.default||0)&&(u=!1)}else d.startsWith("origin")?(c=!0,s[d]=r):o[d]=r}if(t.transform||(l||r?o.transform=function(e,t,n,r){let{enableHardwareAcceleration:o=!0,allowTransformNone:i=!0}=t,a="";for(let s=0;s({style:{},transform:{},transformOrigin:{},vars:{}});function Cs(e,t,n){for(const r in t)ns(t[r])||ts(r,n)||(e[r]=t[r])}function Os(e,t,n){const r={};return Cs(r,e.style||{},e),Object.assign(r,function(e,t,n){let{transformTemplate:r}=e;return(0,s.useMemo)((()=>{const e=Is();return Ns(e,t,{enableHardwareAcceleration:!n},r),Object.assign({},e.vars,e.style)}),[t])}(e,t,n)),e.transformValues?e.transformValues(r):r}function As(e,t,n){const r={},o=Os(e,t,n);return e.drag&&!1!==e.dragListener&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===e.drag?"none":"pan-".concat("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=o,r}const Ps=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function Ds(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||Ps.has(e)}let js=e=>!Ds(e);try{(Rs=require("@emotion/is-prop-valid").default)&&(js=e=>e.startsWith("on")?!Ds(e):Rs(e))}catch(Jn){}var Rs;function Ls(e,t,n){return"string"===typeof e?e:ks.transform(t+n*e)}const Fs={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ms={offset:"strokeDashoffset",array:"strokeDasharray"};function Bs(e,t,n,r,o){let{attrX:i,attrY:a,attrScale:s,originX:l,originY:c,pathLength:u,pathSpacing:d=1,pathOffset:f=0,...p}=t;if(Ns(e,p,n,o),r)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:h,style:m,dimensions:g}=e;h.transform&&(g&&(m.transform=h.transform),delete h.transform),g&&(void 0!==l||void 0!==c||m.transform)&&(m.transformOrigin=function(e,t,n){const r=Ls(t,e.x,e.width),o=Ls(n,e.y,e.height);return"".concat(r," ").concat(o)}(g,void 0!==l?l:.5,void 0!==c?c:.5)),void 0!==i&&(h.x=i),void 0!==a&&(h.y=a),void 0!==s&&(h.scale=s),void 0!==u&&function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];e.pathLength=1;const i=o?Fs:Ms;e[i.offset]=ks.transform(-r);const a=ks.transform(t),s=ks.transform(n);e[i.array]="".concat(a," ").concat(s)}(h,u,d,f,!1)}const Us=()=>({...Is(),attrs:{}}),Vs=e=>"string"===typeof e&&"svg"===e.toLowerCase();function zs(e,t,n,r){const o=(0,s.useMemo)((()=>{const n=Us();return Bs(n,t,{enableHardwareAcceleration:!1},Vs(r),e.transformTemplate),{...n.attrs,style:{...n.style}}}),[t]);if(e.style){const t={};Cs(t,e.style,e),o.style={...t,...o.style}}return o}function qs(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(t,n,r,o,i)=>{let{latestValues:a}=o;const l=(Xa(t)?zs:As)(n,a,i,t),c=function(e,t,n){const r={};for(const o in e)"values"===o&&"object"===typeof e.values||(js(o)||!0===n&&Ds(o)||!t&&!Ds(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(n,"string"===typeof t,e),u={...c,...l,ref:r},{children:d}=n,f=(0,s.useMemo)((()=>ns(d)?d.get():d),[d]);return(0,s.createElement)(t,{...u,children:f})}}function Js(e,t,n,r){let{style:o,vars:i}=t;Object.assign(e.style,o,r&&r.getProjectionStyles(n));for(const a in i)e.style.setProperty(a,i[a])}const Ws=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 Hs(e,t,n,r){Js(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Ws.has(o)?o:Aa(o),t.attrs[o])}function Gs(e,t){const{style:n}=e,r={};for(const o in n)(ns(n[o])||t.style&&ns(t.style[o])||ts(o,e))&&(r[o]=n[o]);return r}function Ys(e,t){const n=Gs(e,t);for(const r in e)if(ns(e[r])||ns(t[r])){n[-1!==Qa.indexOf(r)?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r]=e[r]}return n}function Ks(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return"function"===typeof t&&(t=t(void 0!==n?n:e.custom,r,o)),"string"===typeof t&&(t=e.variants&&e.variants[t]),"function"===typeof t&&(t=t(void 0!==n?n:e.custom,r,o)),t}function $s(e){const t=(0,s.useRef)(null);return null===t.current&&(t.current=e()),t.current}const Xs=e=>Array.isArray(e),Zs=e=>Boolean(e&&"object"===typeof e&&e.mix&&e.toValue),Qs=e=>Xs(e)?e[e.length-1]||0:e;function el(e){const t=ns(e)?e.get():e;return Zs(t)?t.toValue():t}const tl=e=>(t,n)=>{const r=(0,s.useContext)(_a),o=(0,s.useContext)(Na),i=()=>function(e,t,n,r){let{scrapeMotionValuesFromProps:o,createRenderState:i,onMount:a}=e;const s={latestValues:nl(t,n,r,o),renderState:i()};return a&&(s.mount=e=>a(t,e,s)),s}(e,t,r,o);return n?i():$s(i)};function nl(e,t,n,r){const o={},i=r(e,{});for(const f in i)o[f]=el(i[f]);let{initial:a,animate:s}=e;const l=Ma(e),c=Ba(e);t&&c&&!l&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===s&&(s=t.animate));let u=!!n&&!1===n.initial;u=u||!1===a;const d=u?s:a;if(d&&"boolean"!==typeof d&&!Ra(d)){(Array.isArray(d)?d:[d]).forEach((t=>{const n=Ks(e,t);if(!n)return;const{transitionEnd:r,transition:i,...a}=n;for(const e in a){let t=a[e];if(Array.isArray(t)){t=t[u?t.length-1:0]}null!==t&&(o[e]=t)}for(const e in r)o[e]=r[e]}))}return o}const rl=e=>e;class ol{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const t=this.order.indexOf(e);-1!==t&&(this.order.splice(t,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}const il=["prepare","read","update","preRender","render","postRender"];const{schedule:al,cancel:sl,state:ll,steps:cl}=function(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=il.reduce(((e,t)=>(e[t]=function(e){let t=new ol,n=new ol,r=0,o=!1,i=!1;const a=new WeakSet,s={schedule:function(e){const i=arguments.length>2&&void 0!==arguments[2]&&arguments[2]&&o,s=i?t:n;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&a.add(e),s.add(e)&&i&&o&&(r=t.order.length),e},cancel:e=>{n.remove(e),a.delete(e)},process:l=>{if(o)i=!0;else{if(o=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let n=0;nn=!0)),e)),{}),a=e=>i[e].process(o),s=()=>{const i=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(i-o.timestamp,40),1),o.timestamp=i,o.isProcessing=!0,il.forEach(a),o.isProcessing=!1,n&&t&&(r=!1,e(s))},l=il.reduce(((t,a)=>{const l=i[a];return t[a]=function(t){let i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return n||(n=!0,r=!0,o.isProcessing||e(s)),l.schedule(t,i,a)},t}),{});return{schedule:l,cancel:e=>il.forEach((t=>i[t].cancel(e))),state:o,steps:i}}("undefined"!==typeof requestAnimationFrame?requestAnimationFrame:rl,!0),ul={useVisualState:tl({scrapeMotionValuesFromProps:Ys,createRenderState:Us,onMount:(e,t,n)=>{let{renderState:r,latestValues:o}=n;al.read((()=>{try{r.dimensions="function"===typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(e){r.dimensions={x:0,y:0,width:0,height:0}}})),al.render((()=>{Bs(r,o,{enableHardwareAcceleration:!1},Vs(t.tagName),e.transformTemplate),Hs(t,r)}))}})},dl={useVisualState:tl({scrapeMotionValuesFromProps:Gs,createRenderState:Is})};function fl(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{passive:!0};return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const pl=e=>"mouse"===e.pointerType?"number"!==typeof e.button||e.button<=0:!1!==e.isPrimary;function hl(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"page";return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const ml=e=>t=>pl(t)&&e(t,hl(t));function gl(e,t,n,r){return fl(e,t,ml(n),r)}const vl=(e,t)=>n=>t(e(n)),yl=function(){for(var e=arguments.length,t=new Array(e),n=0;n{const n=()=>{t=null};return null===t&&(t=e,n)}}const wl=bl("dragHorizontal"),kl=bl("dragVertical");function xl(e){let t=!1;if("y"===e)t=kl();else if("x"===e)t=wl();else{const e=wl(),n=kl();e&&n?t=()=>{e(),n()}:(e&&e(),n&&n())}return t}function Sl(){const e=xl(!0);return!e||(e(),!1)}class Tl{constructor(e){this.isMounted=!1,this.node=e}update(){}}function El(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End");return gl(e.current,n,((n,o)=>{if("touch"===n.type||Sl())return;const i=e.getProps();e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",t),i[r]&&al.update((()=>i[r](n,o)))}),{passive:!e.getProps()[r]})}const _l=(e,t)=>!!t&&(e===t||_l(e,t.parentElement));function Nl(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,hl(n))}const Il=new WeakMap,Cl=new WeakMap,Ol=e=>{const t=Il.get(e.target);t&&t(e)},Al=e=>{e.forEach(Ol)};function Pl(e,t,n){const r=function(e){let{root:t,...n}=e;const r=t||document;Cl.has(r)||Cl.set(r,{});const o=Cl.get(r),i=JSON.stringify(n);return o[i]||(o[i]=new IntersectionObserver(Al,{root:t,...n})),o[i]}(t);return Il.set(e,n),r.observe(e),()=>{Il.delete(e),r.unobserve(e)}}const Dl={some:0,all:1};const jl={inView:{Feature:class extends Tl{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:o}=e,i={root:t?t.current:void 0,rootMargin:n,threshold:"number"===typeof r?r:Dl[r]};return Pl(this.node.current,i,(e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,o&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),i=t?n:r;i&&i(e)}))}mount(){this.startObserver()}update(){if("undefined"===typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node,n=["amount","margin","root"].some(function(e){let{viewport:t={}}=e,{viewport:n={}}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e=>t[e]!==n[e]}(e,t));n&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Tl{constructor(){super(...arguments),this.removeStartListeners=rl,this.removeEndListeners=rl,this.removeAccessibleListeners=rl,this.startPointerPress=(e,t)=>{if(this.removeEndListeners(),this.isPressing)return;const n=this.node.getProps(),r=gl(window,"pointerup",((e,t)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:r}=this.node.getProps();al.update((()=>{_l(this.node.current,e.target)?n&&n(e,t):r&&r(e,t)}))}),{passive:!(n.onTap||n.onPointerUp)}),o=gl(window,"pointercancel",((e,t)=>this.cancelPress(e,t)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=yl(r,o),this.startPress(e,t)},this.startAccessiblePress=()=>{const e=fl(this.node.current,"keydown",(e=>{if("Enter"!==e.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=fl(this.node.current,"keyup",(e=>{"Enter"===e.key&&this.checkPressEnd()&&Nl("up",((e,t)=>{const{onTap:n}=this.node.getProps();n&&al.update((()=>n(e,t)))}))})),Nl("down",((e,t)=>{this.startPress(e,t)}))})),t=fl(this.node.current,"blur",(()=>{this.isPressing&&Nl("cancel",((e,t)=>this.cancelPress(e,t)))}));this.removeAccessibleListeners=yl(e,t)}}startPress(e,t){this.isPressing=!0;const{onTapStart:n,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&al.update((()=>n(e,t)))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Sl()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&al.update((()=>n(e,t)))}mount(){const e=this.node.getProps(),t=gl(this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=fl(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=yl(t,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends Tl{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&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=yl(fl(this.node.current,"focus",(()=>this.onFocus())),fl(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends Tl{mount(){this.unmount=yl(El(this.node,!0),El(this.node,!1))}unmount(){}}}};function Rl(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rt[n]=e.get())),t}(e),function(e){const t={};return e.values.forEach(((e,n)=>t[n]=e.getVelocity())),t}(e))}let Fl=rl,Ml=rl;const Bl=e=>1e3*e,Ul=e=>e/1e3,Vl=!1,zl=e=>Array.isArray(e)&&"number"===typeof e[0];function ql(e){return Boolean(!e||"string"===typeof e&&Wl[e]||zl(e)||Array.isArray(e)&&e.every(ql))}const Jl=e=>{let[t,n,r,o]=e;return"cubic-bezier(".concat(t,", ").concat(n,", ").concat(r,", ").concat(o,")")},Wl={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Jl([0,.65,.55,1]),circOut:Jl([.55,0,1,.45]),backIn:Jl([.31,.01,.66,-.59]),backOut:Jl([.33,1.53,.69,.99])};function Hl(e){if(e)return zl(e)?Jl(e):Array.isArray(e)?e.map(Hl):Wl[e]}const Gl=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Yl=1e-7,Kl=12;function $l(e,t,n,r){if(e===t&&n===r)return rl;const o=t=>function(e,t,n,r,o){let i,a,s=0;do{a=t+(n-t)/2,i=Gl(a,r,o)-e,i>0?n=a:t=a}while(Math.abs(i)>Yl&&++s0===e||1===e?e:Gl(o(e),t,r)}const Xl=$l(.42,0,1,1),Zl=$l(0,0,.58,1),Ql=$l(.42,0,.58,1),ec=e=>Array.isArray(e)&&"number"!==typeof e[0],tc=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,nc=e=>t=>1-e(1-t),rc=e=>1-Math.sin(Math.acos(e)),oc=nc(rc),ic=tc(rc),ac=$l(.33,1.53,.69,.99),sc=nc(ac),lc=tc(sc),cc={linear:rl,easeIn:Xl,easeInOut:Ql,easeOut:Zl,circIn:rc,circInOut:ic,circOut:oc,backIn:sc,backInOut:lc,backOut:ac,anticipate:e=>(e*=2)<1?.5*sc(e):.5*(2-Math.pow(2,-10*(e-1)))},uc=e=>{if(Array.isArray(e)){Ml(4===e.length,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return $l(t,n,r,o)}return"string"===typeof e?(Ml(void 0!==cc[e],"Invalid easing type '".concat(e,"'")),cc[e]):e},dc=(e,t)=>n=>Boolean(vs(n)&&gs.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),fc=(e,t,n)=>r=>{if(!vs(r))return r;const[o,i,a,s]=r.match(hs);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},pc={...us,transform:e=>Math.round((e=>cs(0,255,e))(e))},hc={test:dc("rgb","red"),parse:fc("red","green","blue"),transform:e=>{let{red:t,green:n,blue:r,alpha:o=1}=e;return"rgba("+pc.transform(t)+", "+pc.transform(n)+", "+pc.transform(r)+", "+ps(ds.transform(o))+")"}};const mc={test:dc("#"),parse:function(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:hc.transform},gc={test:dc("hsl","hue"),parse:fc("hue","saturation","lightness"),transform:e=>{let{hue:t,saturation:n,lightness:r,alpha:o=1}=e;return"hsla("+Math.round(t)+", "+ws.transform(ps(n))+", "+ws.transform(ps(r))+", "+ps(ds.transform(o))+")"}},vc={test:e=>hc.test(e)||mc.test(e)||gc.test(e),parse:e=>hc.test(e)?hc.parse(e):gc.test(e)?gc.parse(e):mc.parse(e),transform:e=>vs(e)?e:e.hasOwnProperty("red")?hc.transform(e):gc.transform(e)},yc=(e,t,n)=>-n*e+n*t+e;function bc(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}const wc=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},kc=[mc,hc,gc];function xc(e){const t=(e=>kc.find((t=>t.test(e))))(e);Ml(Boolean(t),"'".concat(e,"' is not an animatable color. Use the equivalent color code instead."));let n=t.parse(e);return t===gc&&(n=function(e){let{hue:t,saturation:n,lightness:r,alpha:o}=e;t/=360,n/=100,r/=100;let i=0,a=0,s=0;if(n){const e=r<.5?r*(1+n):r+n-r*n,o=2*r-e;i=bc(o,e,t+1/3),a=bc(o,e,t),s=bc(o,e,t-1/3)}else i=a=s=r;return{red:Math.round(255*i),green:Math.round(255*a),blue:Math.round(255*s),alpha:o}}(n)),n}const Sc=(e,t)=>{const n=xc(e),r=xc(t),o={...n};return e=>(o.red=wc(n.red,r.red,e),o.green=wc(n.green,r.green,e),o.blue=wc(n.blue,r.blue,e),o.alpha=yc(n.alpha,r.alpha,e),hc.transform(o))};const Tc={regex:/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,countKey:"Vars",token:"${v}",parse:rl},Ec={regex:ms,countKey:"Colors",token:"${c}",parse:vc.parse},_c={regex:hs,countKey:"Numbers",token:"${n}",parse:us.parse};function Nc(e,t){let{regex:n,countKey:r,token:o,parse:i}=t;const a=e.tokenised.match(n);a&&(e["num"+r]=a.length,e.tokenised=e.tokenised.replace(n,o),e.values.push(...a.map(i)))}function Ic(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&Nc(n,Tc),Nc(n,Ec),Nc(n,_c),n}function Cc(e){return Ic(e).values}function Oc(e){const{values:t,numColors:n,numVars:r,tokenised:o}=Ic(e),i=t.length;return e=>{let t=o;for(let o=0;o"number"===typeof e?0:e;const Pc={test:function(e){var t,n;return isNaN(e)&&vs(e)&&((null===(t=e.match(hs))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(ms))||void 0===n?void 0:n.length)||0)>0},parse:Cc,createTransformer:Oc,getAnimatableNone:function(e){const t=Cc(e);return Oc(e)(t.map(Ac))}},Dc=(e,t)=>n=>"".concat(n>0?t:e);function jc(e,t){return"number"===typeof e?n=>yc(e,t,n):vc.test(e)?Sc(e,t):e.startsWith("var(")?Dc(e,t):Fc(e,t)}const Rc=(e,t)=>{const n=[...e],r=n.length,o=e.map(((e,n)=>jc(e,t[n])));return e=>{for(let t=0;t{const n={...e,...t},r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=jc(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}},Fc=(e,t)=>{const n=Pc.createTransformer(t),r=Ic(e),o=Ic(t);return r.numVars===o.numVars&&r.numColors===o.numColors&&r.numNumbers>=o.numNumbers?yl(Rc(r.values,o.values),n):(Fl(!0,"Complex values '".concat(e,"' and '").concat(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.")),Dc(e,t))},Mc=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},Bc=(e,t)=>n=>yc(e,t,n);function Uc(e,t,n){const r=[],o=n||function(e){return"number"===typeof e?Bc:"string"===typeof e?vc.test(e)?Sc:Fc:Array.isArray(e)?Rc:"object"===typeof e?Lc:Bc}(e[0]),i=e.length-1;for(let a=0;a2&&void 0!==arguments[2]?arguments[2]:{};const i=e.length;if(Ml(i===t.length,"Both input and output ranges must be the same length"),1===i)return()=>t[0];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Uc(t,r,o),s=a.length,l=t=>{let n=0;if(s>1)for(;nl(cs(e[0],e[i-1],t)):l}function zc(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Mc(0,t,r);e.push(yc(n,1,o))}}(t,e.length-1),t}function qc(e){let{duration:t=300,keyframes:n,times:r,ease:o="easeInOut"}=e;const i=ec(o)?o.map(uc):uc(o),a={done:!1,value:n[0]},s=function(e,t){return e.map((e=>e*t))}(r&&r.length===n.length?r:zc(n),t),l=Vc(s,n,{ease:Array.isArray(i)?i:(c=n,u=i,c.map((()=>u||Ql)).splice(0,c.length-1))});var c,u;return{calculatedDuration:t,next:e=>(a.value=l(e),a.done=e>=t,a)}}function Jc(e,t){return t?e*(1e3/t):0}const Wc=5;function Hc(e,t,n){const r=Math.max(t-Wc,0);return Jc(n-e(r),t-r)}const Gc=.001,Yc=.01,Kc=10,$c=.05,Xc=1;function Zc(e){let t,n,{duration:r=800,bounce:o=.25,velocity:i=0,mass:a=1}=e;Fl(r<=Bl(Kc),"Spring duration must be 10 seconds or less");let s=1-o;s=cs($c,Xc,s),r=cs(Yc,Kc,Ul(r)),s<1?(t=e=>{const t=e*s,n=t*r,o=t-i,a=eu(e,s),l=Math.exp(-n);return Gc-o/a*l},n=e=>{const n=e*s*r,o=n*i+i,a=Math.pow(s,2)*Math.pow(e,2)*r,l=Math.exp(-n),c=eu(Math.pow(e,2),s);return(-t(e)+Gc>0?-1:1)*((o-a)*l)/c}):(t=e=>Math.exp(-e*r)*((e-i)*r+1)-Gc,n=e=>Math.exp(-e*r)*(r*r*(i-e)));const l=function(e,t,n){let r=n;for(let o=1;ovoid 0!==e[t]))}function ou(e){let{keyframes:t,restDelta:n,restSpeed:r,...o}=e;const i=t[0],a=t[t.length-1],s={done:!1,value:i},{stiffness:l,damping:c,mass:u,velocity:d,duration:f,isResolvedFromDuration:p}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!ru(e,nu)&&ru(e,tu)){const n=Zc(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}(o),h=d?-Ul(d):0,m=c/(2*Math.sqrt(l*u)),g=a-i,v=Ul(Math.sqrt(l/u)),y=Math.abs(g)<5;let b;if(r||(r=y?.01:2),n||(n=y?.005:.5),m<1){const e=eu(v,m);b=t=>{const n=Math.exp(-m*v*t);return a-n*((h+m*v*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}}else if(1===m)b=e=>a-Math.exp(-v*e)*(g+(h+v*g)*e);else{const e=v*Math.sqrt(m*m-1);b=t=>{const n=Math.exp(-m*v*t),r=Math.min(e*t,300);return a-n*((h+m*v*g)*Math.sinh(r)+e*g*Math.cosh(r))/e}}return{calculatedDuration:p&&f||null,next:e=>{const t=b(e);if(p)s.done=e>=f;else{let o=h;0!==e&&(o=m<1?Hc(b,e,t):0);const i=Math.abs(o)<=r,l=Math.abs(a-t)<=n;s.done=i&&l}return s.value=s.done?a:t,s}}}function iu(e){let{keyframes:t,velocity:n=0,power:r=.8,timeConstant:o=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:s,min:l,max:c,restDelta:u=.5,restSpeed:d}=e;const f=t[0],p={done:!1,value:f},h=e=>void 0===l?c:void 0===c||Math.abs(l-e)-m*Math.exp(-e/o),b=e=>v+y(e),w=e=>{const t=y(e),n=b(e);p.done=Math.abs(t)<=u,p.value=p.done?v:n};let k,x;const S=e=>{(e=>void 0!==l&&ec)(p.value)&&(k=e,x=ou({keyframes:[p.value,h(p.value)],velocity:Hc(b,e,p.value),damping:i,stiffness:a,restDelta:u,restSpeed:d}))};return S(0),{calculatedDuration:null,next:e=>{let t=!1;return x||void 0!==k||(t=!0,w(e),S(e)),void 0!==k&&e>k?x.next(e-k):(!t&&w(e),p)}}}const au=e=>{const t=t=>{let{timestamp:n}=t;return e(n)};return{start:()=>al.update(t,!0),stop:()=>sl(t),now:()=>ll.isProcessing?ll.timestamp:performance.now()}},su=2e4;function lu(e){let t=0;let n=e.next(t);for(;!n.done&&t=su?1/0:t}const cu={decay:iu,inertia:iu,tween:qc,keyframes:qc,spring:ou};function uu(e){let t,n,{autoplay:r=!0,delay:o=0,driver:i=au,keyframes:a,type:s="keyframes",repeat:l=0,repeatDelay:c=0,repeatType:u="loop",onPlay:d,onStop:f,onComplete:p,onUpdate:h,...m}=e,g=1,v=!1;const y=()=>{n=new Promise((e=>{t=e}))};let b;y();const w=cu[s]||qc;let k;w!==qc&&"number"!==typeof a[0]&&(k=Vc([0,100],a,{clamp:!1}),a=[0,100]);const x=w({...m,keyframes:a});let S;"mirror"===u&&(S=w({...m,keyframes:[...a].reverse(),velocity:-(m.velocity||0)}));let T="idle",E=null,_=null,N=null;null===x.calculatedDuration&&l&&(x.calculatedDuration=lu(x));const{calculatedDuration:I}=x;let C=1/0,O=1/0;null!==I&&(C=I+c,O=C*(l+1)-c);let A=0;const P=e=>{if(null===_)return;g>0&&(_=Math.min(_,e)),g<0&&(_=Math.min(e-O/g,_)),A=null!==E?E:Math.round(e-_)*g;const t=A-o*(g>=0?1:-1),n=g>=0?t<0:t>O;A=Math.max(t,0),"finished"===T&&null===E&&(A=O);let r=A,i=x;if(l){const e=A/C;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,l+1);const o=Boolean(t%2);o&&("reverse"===u?(n=1-n,c&&(n-=c/C)):"mirror"===u&&(i=S));let a=cs(0,1,n);A>O&&(a="reverse"===u&&o?1:0),r=a*C}const s=n?{done:!1,value:a[0]}:i.next(r);k&&(s.value=k(s.value));let{done:d}=s;n||null===I||(d=g>=0?A>=O:A<=0);const f=null===E&&("finished"===T||"running"===T&&d);return h&&h(s.value),f&&R(),s},D=()=>{b&&b.stop(),b=void 0},j=()=>{T="idle",D(),t(),y(),_=N=null},R=()=>{T="finished",p&&p(),D(),t()},L=()=>{if(v)return;b||(b=i(P));const e=b.now();d&&d(),null!==E?_=e-E:_&&"finished"!==T||(_=e),"finished"===T&&y(),N=_,E=null,T="running",b.start()};r&&L();const F={then:(e,t)=>n.then(e,t),get time(){return Ul(A)},set time(e){e=Bl(e),A=e,null===E&&b&&0!==g?_=b.now()-e/g:E=e},get duration(){const e=null===x.calculatedDuration?lu(x):x.calculatedDuration;return Ul(e)},get speed(){return g},set speed(e){e!==g&&b&&(g=e,F.time=Ul(A))},get state(){return T},play:L,pause:()=>{T="paused",E=A},stop:()=>{v=!0,"idle"!==T&&(T="idle",f&&f(),j())},cancel:()=>{null!==N&&P(N),j()},complete:()=>{T="finished"},sample:e=>(_=0,P(e))};return F}const du=function(e){let t;return()=>(void 0===t&&(t=e()),t)}((()=>Object.hasOwnProperty.call(Element.prototype,"animate"))),fu=new Set(["opacity","clipPath","filter","transform","backgroundColor"]);function pu(e,t,n){let{onUpdate:r,onComplete:o,...i}=n;if(!(du()&&fu.has(t)&&!i.repeatDelay&&"mirror"!==i.repeatType&&0!==i.damping&&"inertia"!==i.type))return!1;let a,s,l=!1;const c=()=>{s=new Promise((e=>{a=e}))};c();let{keyframes:u,duration:d=300,ease:f,times:p}=i;if(((e,t)=>"spring"===t.type||"backgroundColor"===e||!ql(t.ease))(t,i)){const e=uu({...i,repeat:0,delay:0});let t={done:!1,value:u[0]};const n=[];let r=0;for(;!t.done&&r<2e4;)t=e.sample(r),n.push(t.value),r+=10;p=void 0,u=n,d=r-10,f="linear"}const h=function(e,t,n){let{delay:r=0,duration:o,repeat:i=0,repeatType:a="loop",ease:s,times:l}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const c={[t]:n};l&&(c.offset=l);const u=Hl(s);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:"reverse"===a?"alternate":"normal"})}(e.owner.current,t,u,{...i,duration:d,ease:f,times:p}),m=()=>h.cancel(),g=()=>{al.update(m),a(),c()};h.onfinish=()=>{e.set(function(e,t){let{repeat:n,repeatType:r="loop"}=t;return e[n&&"loop"!==r&&n%2===1?0:e.length-1]}(u,i)),o&&o(),g()};return{then:(e,t)=>s.then(e,t),attachTimeline:e=>(h.timeline=e,h.onfinish=null,rl),get time(){return Ul(h.currentTime||0)},set time(e){h.currentTime=Bl(e)},get speed(){return h.playbackRate},set speed(e){h.playbackRate=e},get duration(){return Ul(d)},play:()=>{l||(h.play(),sl(m))},pause:()=>h.pause(),stop:()=>{if(l=!0,"idle"===h.playState)return;const{currentTime:t}=h;if(t){const n=uu({...i,autoplay:!1});e.setWithVelocity(n.sample(t-10).value,n.sample(t).value,10)}g()},complete:()=>h.finish(),cancel:g}}const hu={type:"spring",stiffness:500,damping:25,restSpeed:10},mu={type:"keyframes",duration:.8},gu={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},vu=(e,t)=>{let{keyframes:n}=t;return n.length>2?mu:es.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===n[1]?2*Math.sqrt(550):30,restSpeed:10}:hu:gu},yu=(e,t)=>"zIndex"!==e&&(!("number"!==typeof t&&!Array.isArray(t))||!("string"!==typeof t||!Pc.test(t)&&"0"!==t||t.startsWith("url("))),bu=new Set(["brightness","contrast","saturate","opacity"]);function wu(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(hs)||[];if(!r)return e;const o=n.replace(r,"");let i=bu.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const ku=/([a-z-]*)\(.*?\)/g,xu={...Pc,getAnimatableNone:e=>{const t=e.match(ku);return t?t.map(wu).join(" "):e}},Su={..._s,color:vc,backgroundColor:vc,outlineColor:vc,fill:vc,stroke:vc,borderColor:vc,borderTopColor:vc,borderRightColor:vc,borderBottomColor:vc,borderLeftColor:vc,filter:xu,WebkitFilter:xu},Tu=e=>Su[e];function Eu(e,t){let n=Tu(e);return n!==xu&&(n=Pc),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const _u=e=>/^0[^.\s]+$/.test(e);function Nu(e){return"number"===typeof e?0===e:null!==e?"none"===e||"0"===e||_u(e):void 0}function Iu(e,t){return e[t]||e.default||e}const Cu=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return o=>{const i=Iu(r,e)||{},a=i.delay||r.delay||0;let{elapsed:s=0}=r;s-=Bl(a);const l=function(e,t,n,r){const o=yu(t,n);let i;i=Array.isArray(n)?[...n]:[null,n];const a=void 0!==r.from?r.from:e.get();let s;const l=[];for(let c=0;c{t.set(e),i.onUpdate&&i.onUpdate(e)},onComplete:()=>{o(),i.onComplete&&i.onComplete()}};if(function(e){let{when:t,delay:n,delayChildren:r,staggerChildren:o,staggerDirection:i,repeat:a,repeatType:s,repeatDelay:l,from:c,elapsed:u,...d}=e;return!!Object.keys(d).length}(i)||(p={...p,...vu(e,p)}),p.duration&&(p.duration=Bl(p.duration)),p.repeatDelay&&(p.repeatDelay=Bl(p.repeatDelay)),!d||!f||Vl||!1===i.type)return function(e){let{keyframes:t,delay:n,onUpdate:r,onComplete:o}=e;const i=()=>(r&&r(t[t.length-1]),o&&o(),{time:0,speed:1,duration:0,play:rl,pause:rl,stop:rl,then:e=>(e(),Promise.resolve()),cancel:rl,complete:rl});return n?uu({keyframes:[0,1],duration:0,delay:n,onComplete:i}):i()}(Vl?{...p,delay:0}:p);if(!r.isHandoff&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const n=pu(t,e,p);if(n)return n}return uu(p)}};function Ou(e){return Boolean(ns(e)&&e.add)}const Au=e=>/^\-?\d*\.?\d+$/.test(e);function Pu(e,t){-1===e.indexOf(t)&&e.push(t)}function Du(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class ju{constructor(){this.subscriptions=[]}add(e){return Pu(this.subscriptions,e),()=>Du(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let o=0;o1&&void 0!==arguments[1]?arguments[1]:{};var r;this.version="10.16.16",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=function(e){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];t.prev=t.current,t.current=e;const{delta:r,timestamp:o}=ll;t.lastUpdated!==o&&(t.timeDelta=r,t.lastUpdated=o,al.postRender(t.scheduleVelocityCheck)),t.prev!==t.current&&t.events.change&&t.events.change.notify(t.current),t.events.velocityChange&&t.events.velocityChange.notify(t.getVelocity()),n&&t.events.renderRequest&&t.events.renderRequest.notify(t.current)},this.scheduleVelocityCheck=()=>al.postRender(this.velocityCheck),this.velocityCheck=e=>{let{timestamp:t}=e;t!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=(r=this.current,!isNaN(parseFloat(r))),this.owner=n.owner}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new ju);const n=this.events[e].add(t);return"change"===e?()=>{n(),al.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=e,this.timeDelta=n}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Ru.current&&Ru.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Jc(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.animation=e(t),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 Fu(e,t){return new Lu(e,t)}const Mu=e=>t=>t.test(e),Bu=[us,ks,ws,bs,Ss,xs,{test:e=>"auto"===e,parse:e=>e}],Uu=e=>Bu.find(Mu(e)),Vu=[...Bu,vc,Pc],zu=e=>Vu.find(Mu(e));function qu(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Fu(n))}function Ju(e,t){const n=Ll(e,t);let{transitionEnd:r={},transition:o={},...i}=n?e.makeTargetAnimatable(n,!1):{};i={...i,...r};for(const a in i){qu(e,a,Qs(i[a]))}}function Wu(e,t){if(!t)return;return(t[e]||t.default||t).from}function Hu(e,t){let{protectedKeys:n,needsAnimating:r}=e;const o=n.hasOwnProperty(t)&&!0!==r[t];return r[t]=!1,o}function Gu(e,t){const n=e.get();if(!Array.isArray(t))return n!==t;for(let r=0;r2&&void 0!==arguments[2]?arguments[2]:{},{transition:i=e.getDefaultTransition(),transitionEnd:a,...s}=e.makeTargetAnimatable(t);const l=e.getValue("willChange");r&&(i=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in s){const t=e.getValue(d),r=s[d];if(!t||void 0===r||u&&Hu(u,d))continue;const o={delay:n,elapsed:0,...Iu(i||{},d)};if(window.HandoffAppearAnimations){const n=e.getProps()[Pa];if(n){const e=window.HandoffAppearAnimations(n,d,t,al);null!==e&&(o.elapsed=e,o.isHandoff=!0)}}let a=!o.isHandoff&&!Gu(t,r);if("spring"===o.type&&(t.getVelocity()||o.velocity)&&(a=!1),t.animation&&(a=!1),a)continue;t.start(Cu(d,t,r,e.shouldReduceMotion&&es.has(d)?{type:!1}:o));const f=t.animation;Ou(l)&&(l.add(d),f.then((()=>l.remove(d)))),c.push(f)}return a&&Promise.all(c).then((()=>{a&&Ju(e,a)})),c}function Ku(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Ll(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(Yu(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?function(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;const{delayChildren:i=0,staggerChildren:a,staggerDirection:s}=o;return function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,i=arguments.length>5?arguments[5]:void 0;const a=[],s=(e.variantChildren.size-1)*r,l=1===o?function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)*r}:function(){return s-(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)*r};return Array.from(e.variantChildren).sort($u).forEach(((e,r)=>{e.notify("AnimationStart",t),a.push(Ku(e,t,{...i,delay:n+l(r)}).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(a)}(e,t,i+r,a,s,n)}:()=>Promise.resolve(),{when:s}=o;if(s){const[e,t]="beforeChildren"===s?[i,a]:[a,i];return e().then((()=>t()))}return Promise.all([i(),a(n.delay)])}function $u(e,t){return e.sortNodePosition(t)}const Xu=[...La].reverse(),Zu=La.length;function Qu(e){return t=>Promise.all(t.map((t=>{let{animation:n,options:r}=t;return function(e,t){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e.notify("AnimationStart",t),Array.isArray(t)){const o=t.map((t=>Ku(e,t,r)));n=Promise.all(o)}else if("string"===typeof t)n=Ku(e,t,r);else{const o="function"===typeof t?Ll(e,t,r.custom):t;n=Promise.all(Yu(e,o,r))}return n.then((()=>e.notify("AnimationComplete",t)))}(e,n,r)})))}function ed(e){let t=Qu(e);const n={animate:nd(!0),whileInView:nd(),whileHover:nd(),whileTap:nd(),whileDrag:nd(),whileFocus:nd(),exit:nd()};let r=!0;const o=(t,n)=>{const r=Ll(e,n);if(r){const{transition:e,transitionEnd:n,...o}=r;t={...t,...o,...n}}return t};function i(i,a){const s=e.getProps(),l=e.getVariantContext(!0)||{},c=[],u=new Set;let d={},f=1/0;for(let t=0;tf&&g;const k=Array.isArray(m)?m:[m];let x=k.reduce(o,{});!1===v&&(x={});const{prevResolvedValues:S={}}=h,T={...S,...x},E=e=>{w=!0,u.delete(e),h.needsAnimating[e]=!0};for(const e in T){const t=x[e],n=S[e];d.hasOwnProperty(e)||(t!==n?Xs(t)&&Xs(n)?!Rl(t,n)||b?E(e):h.protectedKeys[e]=!0:void 0!==t?E(e):u.add(e):void 0!==t&&u.has(e)?E(e):h.protectedKeys[e]=!0)}h.prevProp=m,h.prevResolvedValues=x,h.isActive&&(d={...d,...x}),r&&e.blockInitialAnimation&&(w=!1),w&&!y&&c.push(...k.map((e=>({animation:e,options:{type:p,...i}}))))}if(u.size){const t={};u.forEach((n=>{const r=e.getBaseTarget(n);void 0!==r&&(t[n]=r)})),c.push({animation:t})}let p=Boolean(c.length);return!r||!1!==s.initial&&s.initial!==s.animate||e.manuallyAnimateOnMount||(p=!1),r=!1,p?t(c):Promise.resolve()}return{animateChanges:i,setActive:function(t,r,o){var a;if(n[t].isActive===r)return Promise.resolve();null===(a=e.variantChildren)||void 0===a||a.forEach((e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)})),n[t].isActive=r;const s=i(o,t);for(const e in n)n[e].protectedKeys={};return s},setAnimateFunction:function(n){t=n(e)},getState:()=>n}}function td(e,t){return"string"===typeof t?t!==e:!!Array.isArray(t)&&!Rl(t,e)}function nd(){return{isActive:arguments.length>0&&void 0!==arguments[0]&&arguments[0],protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}let rd=0;const od={animation:{Feature:class extends Tl{constructor(e){super(e),e.animationState||(e.animationState=ed(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),Ra(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends Tl{constructor(){super(...arguments),this.id=rd++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t,custom:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const o=this.node.animationState.setActive("exit",!e,{custom:null!==n&&void 0!==n?n:this.node.getProps().custom});t&&!e&&o.then((()=>t(this.id)))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}},id=(e,t)=>Math.abs(e-t);class ad{constructor(e,t){let{transformPagePoint:n,contextWindow:r}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=cd(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=id(e.x,t.x),r=id(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:r}=e,{timestamp:o}=ll;this.history.push({...r,timestamp:o});const{onStart:i,onMove:a}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=sd(t,this.transformPagePoint),al.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{if(this.end(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const{onEnd:n,onSessionEnd:r}=this.handlers,o=cd("pointercancel"===e.type?this.lastMoveEventInfo:sd(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),r&&r(e,o)},!pl(e))return;this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;const o=sd(hl(e),this.transformPagePoint),{point:i}=o,{timestamp:a}=ll;this.history=[{...i,timestamp:a}];const{onSessionStart:s}=t;s&&s(e,cd(o,this.history)),this.removeListeners=yl(gl(this.contextWindow,"pointermove",this.handlePointerMove),gl(this.contextWindow,"pointerup",this.handlePointerUp),gl(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),sl(this.updatePoint)}}function sd(e,t){return t?{point:t(e.point)}:e}function ld(e,t){return{x:e.x-t.x,y:e.y-t.y}}function cd(e,t){let{point:n}=e;return{point:n,delta:ld(n,dd(t)),offset:ld(n,ud(t)),velocity:fd(t,.1)}}function ud(e){return e[0]}function dd(e){return e[e.length-1]}function fd(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=dd(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Bl(t)));)n--;if(!r)return{x:0,y:0};const i=Ul(o.timestamp-r.timestamp);if(0===i)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function pd(e){return e.max-e.min}function hd(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.01;return Math.abs(e-t)<=n}function md(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5;e.origin=r,e.originPoint=yc(t.min,t.max,e.origin),e.scale=pd(n)/pd(t),(hd(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=yc(n.min,n.max,e.origin)-e.originPoint,(hd(e.translate)||isNaN(e.translate))&&(e.translate=0)}function gd(e,t,n,r){md(e.x,t.x,n.x,r?r.originX:void 0),md(e.y,t.y,n.y,r?r.originY:void 0)}function vd(e,t,n){e.min=n.min+t.min,e.max=e.min+pd(t)}function yd(e,t,n){e.min=t.min-n.min,e.max=e.min+pd(t)}function bd(e,t,n){yd(e.x,t.x,n.x),yd(e.y,t.y,n.y)}function wd(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function kd(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),_d=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Nd(e){return[e("x"),e("y")]}function Id(e){let{top:t,left:n,right:r,bottom:o}=e;return{x:{min:n,max:r},y:{min:t,max:o}}}function Cd(e){return void 0===e||1===e}function Od(e){let{scale:t,scaleX:n,scaleY:r}=e;return!Cd(t)||!Cd(n)||!Cd(r)}function Ad(e){return Od(e)||Pd(e)||e.z||e.rotate||e.rotateX||e.rotateY}function Pd(e){return Dd(e.x)||Dd(e.y)}function Dd(e){return e&&"0%"!==e}function jd(e,t,n){return n+t*(e-n)}function Rd(e,t,n,r,o){return void 0!==o&&(e=jd(e,o,r)),jd(e,n,r)+t}function Ld(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;e.min=Rd(e.min,t,n,r,o),e.max=Rd(e.max,t,n,r,o)}function Fd(e,t){let{x:n,y:r}=t;Ld(e.x,n.translate,n.scale,n.originPoint),Ld(e.y,r.translate,r.scale,r.originPoint)}function Md(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function Bd(e,t){e.min=e.min+t,e.max=e.max+t}function Ud(e,t,n){let[r,o,i]=n;const a=void 0!==t[i]?t[i]:.5,s=yc(e.min,e.max,a);Ld(e,t[r],t[o],s,t.scale)}const Vd=["x","scaleX","originX"],zd=["y","scaleY","originY"];function qd(e,t){Ud(e.x,t,Vd),Ud(e.y,t,zd)}function Jd(e,t){return Id(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}const Wd=e=>{let{current:t}=e;return t?t.ownerDocument.defaultView:null},Hd=new WeakMap;class Gd{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=_d(),this.visualElement=e}start(e){let{snapToCursor:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;this.panSession=new ad(e,{onSessionStart:e=>{this.stopAnimation(),t&&this.snapToCursor(hl(e,"page").point)},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:o}=this.getProps();if(n&&!r&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=xl(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Nd((e=>{let t=this.getAxisMotionValue(e).get()||0;if(ws.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=pd(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t})),o&&al.update((()=>o(e,t)),!1,!0);const{animationState:i}=this.visualElement;i&&i.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:o,onDrag:i}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:a}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(a),void(null!==this.currentDirection&&o&&o(this.currentDirection));this.updateAxis("x",t.point,a),this.updateAxis("y",t.point,a),this.visualElement.render(),i&&i(e,t)},onSessionEnd:(e,t)=>this.stop(e,t)},{transformPagePoint:this.visualElement.getTransformPagePoint(),contextWindow:Wd(this.visualElement)})}stop(e,t){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:o}=this.getProps();o&&al.update((()=>o(e,t)))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!Yd(e,r,this.currentDirection))return;const o=this.getAxisMotionValue(e);let i=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=function(e,t,n){let{min:r,max:o}=t;return void 0!==r&&eo&&(e=n?yc(o,e,n.max):Math.min(e,o)),e}(i,this.constraints[e],this.elastic[e])),o.set(i)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,o=this.constraints;t&&Da(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!r)&&function(e,t){let{top:n,left:r,bottom:o,right:i}=t;return{x:wd(e.x,r,i),y:wd(e.y,n,o)}}(r.layoutBox,t),this.elastic=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xd;return!1===e?e=0:!0===e&&(e=xd),{x:Sd(e,"left","right"),y:Sd(e,"top","bottom")}}(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Nd((e=>{this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(r.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Da(e))return!1;const n=e.current;Ml(null!==n,"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 o=function(e,t,n){const r=Jd(e,n),{scroll:o}=t;return o&&(Bd(r.x,o.offset.x),Bd(r.y,o.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let i=function(e,t){return{x:kd(e.x,t.x),y:kd(e.y,t.y)}}(r.layout.layoutBox,o);if(t){const e=t(function(e){let{x:t,y:n}=e;return{top:n.min,right:t.max,bottom:n.max,left:t.min}}(i));this.hasMutatedConstraints=!!e,e&&(i=Id(e))}return i}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),s=this.constraints||{},l=Nd((a=>{if(!Yd(a,t,this.currentDirection))return;let l=s&&s[a]||{};i&&(l={min:0,max:0});const c=r?200:1e6,u=r?40:1e7,d={type:"inertia",velocity:n?e[a]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(a,d)}));return Promise.all(l).then(a)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return n.start(Cu(e,n,0,t))}stopAnimation(){Nd((e=>this.getAxisMotionValue(e).stop()))}getAxisMotionValue(e){const t="_drag"+e.toUpperCase(),n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){Nd((t=>{const{drag:n}=this.getProps();if(!Yd(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:i}=r.layout.layoutBox[t];o.set(e[t]-yc(n,i,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Da(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Nd((e=>{const t=this.getAxisMotionValue(e);if(t){const n=t.get();r[e]=function(e,t){let n=.5;const r=pd(e),o=pd(t);return o>r?n=Mc(t.min,t.max-r,e.min):r>o&&(n=Mc(e.min,e.max-o,t.min)),cs(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Nd((t=>{if(!Yd(t,e,null))return;const n=this.getAxisMotionValue(t),{min:o,max:i}=this.constraints[t];n.set(yc(o,i,r[t]))}))}addListeners(){if(!this.visualElement.current)return;Hd.set(this.visualElement,this);const e=gl(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();Da(e)&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),t();const o=fl(window,"resize",(()=>this.scalePositionWithinConstraints())),i=n.addEventListener("didUpdate",(e=>{let{delta:t,hasLayoutChanged:n}=e;this.isDragging&&n&&(Nd((e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))})),this.visualElement.render())}));return()=>{o(),e(),r(),i&&i()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:i=xd,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function Yd(e,t,n){return(!0===t||t===e)&&(null===n||n===e)}const Kd=e=>(t,n)=>{e&&al.update((()=>e(t,n)))};function $d(){const e=(0,s.useContext)(Na);if(null===e)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=(0,s.useId)();(0,s.useEffect)((()=>r(o)),[]);return!t&&n?[!1,()=>n&&n(o)]:[!0]}function Xd(){return null===(e=(0,s.useContext)(Na))||e.isPresent;var e}const Zd={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Qd(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ef={correct:(e,t)=>{if(!t.target)return e;if("string"===typeof e){if(!ks.test(e))return e;e=parseFloat(e)}const n=Qd(e,t.target.x),r=Qd(e,t.target.y);return"".concat(n,"% ").concat(r,"%")}},tf={correct:(e,t)=>{let{treeScale:n,projectionDelta:r}=t;const o=e,i=Pc.parse(e);if(i.length>5)return o;const a=Pc.createTransformer(e),s="number"!==typeof i[0]?1:0,l=r.x.scale*n.x,c=r.y.scale*n.y;i[0+s]/=l,i[1+s]/=c;const u=yc(l,c,.5);return"number"===typeof i[2+s]&&(i[2+s]/=u),"number"===typeof i[3+s]&&(i[3+s]/=u),a(i)}};class nf extends s.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;var i;i=of,Object.assign(Za,i),o&&(t.group&&t.group.add(o),n&&n.register&&r&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",(()=>{this.safeToRemove()})),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Zd.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:o}=this.props,i=n.projection;return i?(i.isPresent=o,r||e.layoutDependency!==t||void 0===t?i.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?i.promote():i.relegate()||al.postRender((()=>{const e=i.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),queueMicrotask((()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function rf(e){const[t,n]=$d(),r=(0,s.useContext)(Ja);return s.createElement(nf,{...e,layoutGroup:r,switchLayoutGroup:(0,s.useContext)(Wa),isPresent:t,safeToRemove:n})}const of={borderRadius:{...ef,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ef,borderTopRightRadius:ef,borderBottomLeftRadius:ef,borderBottomRightRadius:ef,boxShadow:tf},af=["TopLeft","TopRight","BottomLeft","BottomRight"],sf=af.length,lf=e=>"string"===typeof e?parseFloat(e):e,cf=e=>"number"===typeof e||ks.test(e);function uf(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const df=pf(0,.5,oc),ff=pf(.5,.95,rl);function pf(e,t,n){return r=>rt?1:n(Mc(e,t,r))}function hf(e,t){e.min=t.min,e.max=t.max}function mf(e,t){hf(e.x,t.x),hf(e.y,t.y)}function gf(e,t,n,r,o){return e=jd(e-=t,1/n,r),void 0!==o&&(e=jd(e,1/o,r)),e}function vf(e,t,n,r,o){let[i,a,s]=n;!function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5,o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:e,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:e;ws.test(t)&&(t=parseFloat(t),t=yc(a.min,a.max,t/100)-a.min);if("number"!==typeof t)return;let s=yc(i.min,i.max,r);e===i&&(s-=t),e.min=gf(e.min,t,n,s,o),e.max=gf(e.max,t,n,s,o)}(e,t[i],t[a],t[s],t.scale,r,o)}const yf=["x","scaleX","originX"],bf=["y","scaleY","originY"];function wf(e,t,n,r){vf(e.x,t,yf,n?n.x:void 0,r?r.x:void 0),vf(e.y,t,bf,n?n.y:void 0,r?r.y:void 0)}function kf(e){return 0===e.translate&&1===e.scale}function xf(e){return kf(e.x)&&kf(e.y)}function Sf(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function Tf(e){return pd(e.x)/pd(e.y)}class Ef{constructor(){this.members=[]}add(e){Pu(this.members,e),e.scheduleRender()}remove(e){if(Du(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let n;for(let r=t;r>=0;r--){const e=this.members[r];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach((e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function _f(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y;if((o||i)&&(r="translate3d(".concat(o,"px, ").concat(i,"px, 0) ")),1===t.x&&1===t.y||(r+="scale(".concat(1/t.x,", ").concat(1/t.y,") ")),n){const{rotate:e,rotateX:t,rotateY:o}=n;e&&(r+="rotate(".concat(e,"deg) ")),t&&(r+="rotateX(".concat(t,"deg) ")),o&&(r+="rotateY(".concat(o,"deg) "))}const a=e.x.scale*t.x,s=e.y.scale*t.y;return 1===a&&1===s||(r+="scale(".concat(a,", ").concat(s,")")),r||"none"}const Nf=(e,t)=>e.depth-t.depth;class If{constructor(){this.children=[],this.isDirty=!1}add(e){Pu(this.children,e),this.isDirty=!0}remove(e){Du(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Nf),this.isDirty=!1,this.children.forEach(e)}}const Cf=["","X","Y","Z"],Of={visibility:"hidden"};let Af=0;const Pf={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Df(e){let{attachResizeListener:t,defaultParent:n,measureScroll:r,checkIsScrollRoot:o,resetTransform:i}=e;return class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===n||void 0===n?void 0:n();this.id=Af++,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.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{var e;this.projectionUpdateScheduled=!1,Pf.totalNodes=Pf.resolvedTargetDeltas=Pf.recalculatedProjection=0,this.nodes.forEach(Lf),this.nodes.forEach(qf),this.nodes.forEach(Jf),this.nodes.forEach(Ff),e=Pf,window.MotionDebug&&window.MotionDebug.record(e)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=t?t.root||t:this,this.path=t?[...t.path,t]:[],this.parent=t,this.depth=t?t.depth+1:0;for(let n=0;n1?n-1:0),o=1;o1&&void 0!==arguments[1]?arguments[1]:this.root.hasTreeAnimated;if(this.instance)return;var r;this.isSVG=(r=e)instanceof SVGElement&&"svg"!==r.tagName,this.instance=e;const{layoutId:o,layout:i,visualElement:a}=this.options;if(a&&!a.current&&a.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(i||o)&&(this.isLayoutDirty=!0),t){let n;const r=()=>this.root.updateBlockedByResize=!1;t(e,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=performance.now(),r=o=>{let{timestamp:i}=o;const a=i-n;a>=t&&(sl(r),e(a-t))};return al.read(r,!0),()=>sl(r)}(r,250),Zd.hasAnimatedSinceResize&&(Zd.hasAnimatedSinceResize=!1,this.nodes.forEach(zf))}))}o&&this.root.registerSharedNode(o,this),!1!==this.options.animate&&a&&(o||i)&&this.addEventListener("didUpdate",(e=>{let{delta:t,hasLayoutChanged:n,hasRelativeTargetChanged:r,layout:o}=e;if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const i=this.options.transition||a.getDefaultTransition()||$f,{onLayoutAnimationStart:s,onLayoutAnimationComplete:l}=a.getProps(),c=!this.targetLayout||!Sf(this.targetLayout,o)||r,u=!n&&r;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||u||n&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,u);const e={...Iu(i,"layout"),onPlay:s,onComplete:l};(a.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else n||zf(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=o}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,sl(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(Wf),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let o=0;othis.update())))}clearAllSnapshots(){this.nodes.forEach(Mf),this.sharedNodes.forEach(Hf)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,al.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){al.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),(!this.options.alwaysMeasureLayout||!this.isLead())&&!this.isLayoutDirty)return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n0&&void 0!==arguments[0]?arguments[0]:"measure",t=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&(this.scroll={animationId:this.root.animationId,phase:e,isRoot:o(this.instance),offset:r(this.instance)})}resetTransform(){if(!i)return;const e=this.isLayoutDirty||this.shouldResetTransform,t=this.projectionDelta&&!xf(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,o=r!==this.prevTransformTemplateValue;e&&(t||Ad(this.latestValues)||o)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),Qf((r=n).x),Qf(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:e}=this.options;if(!e)return _d();const t=e.measureViewportBox(),{scroll:n}=this.root;return n&&(Bd(t.x,n.offset.x),Bd(t.y,n.offset.y)),t}removeElementScroll(e){const t=_d();mf(t,e);for(let n=0;n1&&void 0!==arguments[1]&&arguments[1];const n=_d();mf(n,e);for(let r=0;r0&&void 0!==arguments[0]&&arguments[0];var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget))return;const{layout:o,layoutId:i}=this.options;if(this.layout&&(o||i)){if(this.resolvedRelativeTargetAt=ll.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=_d(),this.relativeTargetOrigin=_d(),bd(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),mf(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var a,s,l;if(this.target||(this.target=_d(),this.targetWithTransforms=_d()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),a=this.target,s=this.relativeTarget,l=this.relativeParent.target,vd(a.x,s.x,l.x),vd(a.y,s.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):mf(this.target,this.layout.layoutBox),Fd(this.target,this.targetDelta)):mf(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=_d(),this.relativeTargetOrigin=_d(),bd(this.relativeTargetOrigin,this.target,e.target),mf(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Pf.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!Od(this.parent.latestValues)&&!Pd(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let r=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===ll.timestamp&&(r=!1),r)return;const{layout:o,layoutId:i}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!o&&!i)return;mf(this.layoutCorrected,this.layout.layoutBox);const a=this.treeScale.x,s=this.treeScale.y;!function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const o=n.length;if(!o)return;let i,a;t.x=t.y=1;for(let s=0;s0&&void 0!==arguments[0])||arguments[0];if(this.options.scheduleRender&&this.options.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=this.snapshot,r=n?n.latestValues:{},o={...this.latestValues},i=Ed();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const a=_d(),s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(s&&!c&&!0===this.options.crossfade&&!this.path.some(Kf));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var l,f;Gf(i.x,e.x,n),Gf(i.y,e.y,n),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(bd(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(e,t,n,r){Yf(e.x,t.x,n.x,r),Yf(e.y,t.y,n.y,r)}(this.relativeTarget,this.relativeTargetOrigin,a,n),d&&(l=this.relativeTarget,f=d,l.x.min===f.x.min&&l.x.max===f.x.max&&l.y.min===f.y.min&&l.y.max===f.y.max)&&(this.isProjectionDirty=!1),d||(d=_d()),mf(d,this.relativeTarget)),s&&(this.animationValues=o,function(e,t,n,r,o,i){o?(e.opacity=yc(0,void 0!==n.opacity?n.opacity:1,df(r)),e.opacityExit=yc(void 0!==t.opacity?t.opacity:1,0,ff(r))):i&&(e.opacity=yc(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let a=0;a{Zd.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const r=ns(e)?e:Fu(e);return r.start(Cu("",r,t,n)),r.animation}(0,1e3,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.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 e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:o}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&ep(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||_d();const t=pd(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=pd(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}mf(t,n),qd(t,o),gd(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Ef);this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote(){let{needsReset:e,transition:t,preserveFollowOpacity:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.rotate||n.rotateX||n.rotateY||n.rotateZ)&&(t=!0),!t)return;const r={};for(let o=0;o{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(Bf),this.root.sharedNodes.clear()}}}function jf(e){e.updateLayout()}function Rf(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:o}=e.options,i=n.source!==e.layout.source;"size"===o?Nd((e=>{const r=i?n.measuredBox[e]:n.layoutBox[e],o=pd(r);r.min=t[e].min,r.max=r.min+o})):ep(o,n.layoutBox,t)&&Nd((r=>{const o=i?n.measuredBox[r]:n.layoutBox[r],a=pd(t[r]);o.max=o.min+a,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+a)}));const a=Ed();gd(a,t,n.layoutBox);const s=Ed();i?gd(s,e.applyTransform(r,!0),n.measuredBox):gd(s,t,n.layoutBox);const l=!xf(a);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:o,layout:i}=r;if(o&&i){const a=_d();bd(a,n.layoutBox,o.layoutBox);const s=_d();bd(s,t,i.layoutBox),Sf(a,s)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=a,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:s,layoutDelta:a,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Lf(e){Pf.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Ff(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Mf(e){e.clearSnapshot()}function Bf(e){e.clearMeasurements()}function Uf(e){e.isLayoutDirty=!1}function Vf(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function zf(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function qf(e){e.resolveTargetDelta()}function Jf(e){e.calcProjection()}function Wf(e){e.resetRotation()}function Hf(e){e.removeLeadSnapshot()}function Gf(e,t,n){e.translate=yc(t.translate,0,n),e.scale=yc(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Yf(e,t,n,r){e.min=yc(t.min,n.min,r),e.max=yc(t.max,n.max,r)}function Kf(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const $f={duration:.45,ease:[.4,0,.1,1]},Xf=e=>"undefined"!==typeof navigator&&navigator.userAgent.toLowerCase().includes(e),Zf=Xf("applewebkit/")&&!Xf("chrome/")?Math.round:rl;function Qf(e){e.min=Zf(e.min),e.max=Zf(e.max)}function ep(e,t,n){return"position"===e||"preserve-aspect"===e&&!hd(Tf(t),Tf(n),.2)}const tp=Df({attachResizeListener:(e,t)=>fl(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),np={current:void 0},rp=Df({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!np.current){const e=new tp({});e.mount(window),e.setOptions({layoutScroll:!0}),np.current=e}return np.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),op={pan:{Feature:class extends Tl{constructor(){super(...arguments),this.removePointerDownListener=rl}onPointerDown(e){this.session=new ad(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Wd(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Kd(e),onStart:Kd(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&al.update((()=>r(e,t)))}}}mount(){this.removePointerDownListener=gl(this.node.current,"pointerdown",(e=>this.onPointerDown(e)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Tl{constructor(e){super(e),this.removeGroupControls=rl,this.removeListeners=rl,this.controls=new Gd(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||rl}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:rp,MeasureLayout:rf}},ip=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;const ap=4;function sp(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;Ml(n<=ap,'Max CSS variable fallback depth detected in property "'.concat(e,'". This may indicate a circular fallback dependency.'));const[r,o]=function(e){const t=ip.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const e=i.trim();return Au(e)?parseFloat(e):e}return ss(o)?sp(o,t,n+1):o}const lp=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),cp=e=>lp.has(e),up=e=>e===us||e===ks,dp=(e,t)=>parseFloat(e.split(", ")[t]),fp=(e,t)=>(n,r)=>{let{transform:o}=r;if("none"===o||!o)return 0;const i=o.match(/^matrix3d\((.+)\)$/);if(i)return dp(i[1],t);{const t=o.match(/^matrix\((.+)\)$/);return t?dp(t[1],e):0}},pp=new Set(["x","y","z"]),hp=Qa.filter((e=>!pp.has(e)));const mp={width:(e,t)=>{let{x:n}=e,{paddingLeft:r="0",paddingRight:o="0"}=t;return n.max-n.min-parseFloat(r)-parseFloat(o)},height:(e,t)=>{let{y:n}=e,{paddingTop:r="0",paddingBottom:o="0"}=t;return n.max-n.min-parseFloat(r)-parseFloat(o)},top:(e,t)=>{let{top:n}=t;return parseFloat(n)},left:(e,t)=>{let{left:n}=t;return parseFloat(n)},bottom:(e,t)=>{let{y:n}=e,{top:r}=t;return parseFloat(r)+(n.max-n.min)},right:(e,t)=>{let{x:n}=e,{left:r}=t;return parseFloat(r)+(n.max-n.min)},x:fp(4,13),y:fp(5,14)};mp.translateX=mp.x,mp.translateY=mp.y;const gp=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};t={...t},r={...r};const o=Object.keys(t).filter(cp);let i=[],a=!1;const s=[];if(o.forEach((o=>{const l=e.getValue(o);if(!e.hasValue(o))return;let c=n[o],u=Uu(c);const d=t[o];let f;if(Xs(d)){const e=d.length,t=null===d[0]?1:0;c=d[t],u=Uu(c);for(let n=t;n{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t.length&&e.render(),t}(e),a=!0),s.push(o),r[o]=void 0!==r[o]?r[o]:t[o],l.jump(d))})),s.length){const n=s.indexOf("height")>=0?window.pageYOffset:null,o=((e,t,n)=>{const r=t.measureViewportBox(),o=t.current,i=getComputedStyle(o),{display:a}=i,s={};"none"===a&&t.setStaticValue("display",e.display||"block"),n.forEach((e=>{s[e]=mp[e](r,i)})),t.render();const l=t.measureViewportBox();return n.forEach((n=>{const r=t.getValue(n);r&&r.jump(s[n]),e[n]=mp[n](l,i)})),e})(t,e,s);return i.length&&i.forEach((t=>{let[n,r]=t;e.getValue(n).set(r)})),e.render(),Ia&&null!==n&&window.scrollTo({top:n}),{target:o,transitionEnd:r}}return{target:t,transitionEnd:r}};function vp(e,t,n,r){return(e=>Object.keys(e).some(cp))(t)?gp(e,t,n,r):{target:t,transitionEnd:r}}const yp=(e,t,n,r)=>{const o=function(e,t,n){let{...r}=t;const o=e.current;if(!(o instanceof Element))return{target:r,transitionEnd:n};n&&(n={...n}),e.values.forEach((e=>{const t=e.get();if(!ss(t))return;const n=sp(t,o);n&&e.set(n)}));for(const i in r){const e=r[i];if(!ss(e))continue;const t=sp(e,o);t&&(r[i]=t,n||(n={}),void 0===n[i]&&(n[i]=e))}return{target:r,transitionEnd:n}}(e,t,r);return vp(e,t=o.target,n,r=o.transitionEnd)},bp={current:null},wp={current:!1};const kp=new WeakMap,xp=Object.keys(qa),Sp=xp.length,Tp=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Ep=Fa.length;class _p{constructor(e){let{parent:t,props:n,presenceContext:r,reducedMotionConfig:o,visualState:i}=e,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,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.scheduleRender=()=>al.render(this.render,!1,!0);const{latestValues:s,renderState:l}=i;this.latestValues=s,this.baseTarget={...s},this.initialValues=n.initial?{...s}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.isControllingVariants=Ma(n),this.isVariantNode=Ba(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...u}=this.scrapeMotionValuesFromProps(n,{});for(const d in u){const e=u[d];void 0!==s[d]&&ns(e)&&(e.set(s[d],!1),Ou(c)&&c.add(d))}}scrapeMotionValuesFromProps(e,t){return{}}mount(e){this.current=e,kp.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((e,t)=>this.bindToMotionValue(t,e))),wp.current||function(){if(wp.current=!0,Ia)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>bp.current=e.matches;e.addListener(t),t()}else bp.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||bp.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){kp.delete(this.current),this.projection&&this.projection.unmount(),sl(this.notifyUpdate),sl(this.render),this.valueSubscriptions.forEach((e=>e())),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,t){const n=es.has(e),r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&al.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)})),o=t.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,(()=>{r(),o()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}loadFeatures(e,t,n,r){let o,i,{children:a,...s}=e;for(let l=0;lthis.scheduleRender(),animationType:"string"===typeof t?t:"both",initialPromotionConfig:r,layoutScroll:a,layoutRoot:l})}return i}updateFeatures(){for(const e in this.features){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):_d()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}makeTargetAnimatable(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this.makeTargetAnimatableFromInstance(e,this.props,t)}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;n0&&void 0!==arguments[0]&&arguments[0])return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const e=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(e.initial=this.props.initial),e}const e={};for(let t=0;tt.variantChildren.delete(e)}addValue(e,t){t!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,t)),this.values.set(e,t),this.latestValues[e]=t.get()}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=Fu(t,{owner:this}),this.addValue(e,n)),n}readValue(e){var t;return void 0===this.latestValues[e]&&this.current?null!==(t=this.getBaseTargetFromProps(this.props,e))&&void 0!==t?t:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e]}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props,r="string"===typeof n||"object"===typeof n?null===(t=Ks(this.props,n))||void 0===t?void 0:t[e]:void 0;if(n&&void 0!==r)return r;const o=this.getBaseTargetFromProps(this.props,e);return void 0===o||ns(o)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:o}on(e,t){return this.events[e]||(this.events[e]=new ju),this.events[e].add(t)}notify(e){if(this.events[e]){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r!e.hasValue(t))),a=i.length;if(a)for(let s=0;s{this.current&&(this.current.textContent="".concat(e))})))}renderInstance(e,t,n,r){Js(e,t,n,r)}}class Cp extends Np{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(es.has(t)){const e=Tu(t);return e&&e.default||0}return t=Ws.has(t)?t:Aa(t),e.getAttribute(t)}measureInstanceViewportBox(){return _d()}scrapeMotionValuesFromProps(e,t){return Ys(e,t)}build(e,t,n,r){Bs(e,t,n,this.isSVGTag,r.transformTemplate)}renderInstance(e,t,n,r){Hs(e,t,0,r)}mount(e){this.isSVGTag=Vs(e.tagName),super.mount(e)}}const Op=(e,t)=>Xa(e)?new Cp(t,{enableHardwareAcceleration:!1}):new Ip(t,{enableHardwareAcceleration:!0}),Ap={...od,...jl,...op,...{layout:{ProjectionNode:rp,MeasureLayout:rf}}},Pp=Ka(((e,t)=>function(e,t,n,r){let{forwardMotionProps:o=!1}=t;return{...Xa(e)?ul:dl,preloadedFeatures:n,useRender:qs(o),createVisualElement:r,Component:e}}(e,t,Ap,Op)));var Dp={enter:{visibility:"visible",opacity:1,scale:1,transition:{duration:.2,ease:[.4,0,.2,1]}},exit:{transitionEnd:{visibility:"hidden"},opacity:0,scale:.8,transition:{duration:.1,easings:"easeOut"}}},jp=nr(Pp.div),Rp=d((function(e,t){var n,r;const{rootProps:o,motionProps:i,...a}=e,{isOpen:l,onTransitionEnd:c,unstable__animationState:d}=da(),p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=da();if(!n)throw new Error("useMenuContext: context is undefined. Seems you forgot to wrap component within