@ukpc-lib/react 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/index.cjs +6 -6
- package/dist/components/index.js +488 -485
- package/dist/share/index.cjs +18 -18
- package/dist/share/index.js +257 -247
- package/package.json +3 -5
- package/web-components-bundle/global-menu/index.cjs +12 -11
- package/web-components-bundle/global-menu/index.js +655 -636
- package/web-components-bundle/global-topbar/index.cjs +2 -2
- package/web-components-bundle/global-topbar/index.js +2 -2
- package/web-components-bundle/{index-fe58ccfa.cjs → index-447756c6.cjs} +16 -16
- package/web-components-bundle/{index-6fdc89ad.js → index-6ba7e1d4.js} +380 -377
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
-
`;function
|
|
3
|
-
`;function Bi({
|
|
4
|
-
`;function kr({logo:t,user:e,baseUrl:n,style:i,classNames:s="",customColors:o}){const r=t||"/public/assets/icons/logo-header.png",a={...i,color:(o==null?void 0:o.color)||"black",backgroundColor:(o==null?void 0:o.bgColor)||"black"},[l,c]=T.useState(!1),u=()=>{window.location.href=`${n}/authentication/logout?callbackUrl=${window.location.href}`};return y.jsxs($e,{styles:[Cr],style:{zIndex:1200},children:[y.jsx("nav",{className:`navbar ${s}`,style:o?a:i,children:y.jsxs("div",{className:"navbar-container",children:[y.jsx("div",{className:"logo-container",children:y.jsx("img",{src:r,alt:"logo-header"})}),y.jsxs("div",{className:"right-side-container",children:[y.jsxs("div",{className:"userContainer",children:[y.jsx("p",{className:"userFullName",children:`${e==null?void 0:e.firstName} ${e==null?void 0:e.lastName}`}),y.jsx(Vr,{primaryColor:o==null?void 0:o.primaryColor,avatarUrl:e==null?void 0:e.avatarUrl,setShowConfirmModal:c})]}),y.jsx("span",{className:"cursor-pointer",children:y.jsx(Ar,{primaryColor:o==null?void 0:o.primaryColor})}),y.jsx("span",{className:"cursor-pointer",children:y.jsx(Tr,{primaryColor:o==null?void 0:o.primaryColor})})]})]})}),y.jsx(Bi,{isOpen:l,onClose:()=>c(!1),onConfirm:u})]})}function Vr({avatarUrl:t,setShowConfirmModal:e,primaryColor:n="#009d4f"}){const[i,s]=T.useState(!1),o=T.useRef(null),r=T.useRef(null),[a,l]=T.useState(!1),[c,u]=T.useState(!1),h={backgroundColor:a?n:"transparent"},d={backgroundColor:c?n:"transparent"};return T.useEffect(()=>{const f=p=>{o.current&&!o.current.contains(p.target)&&s(!1),r.current&&!r.current.contains(p.target)&&s(!1)};return document.addEventListener("click",f,!0),()=>{document.removeEventListener("click",f,!0)}},[o]),y.jsx(y.Fragment,{children:y.jsxs("div",{style:{position:"relative"},children:[y.jsx("img",{onClick:()=>s(!i),ref:o,alt:"user avatar",className:"userAvatar",src:t||Pr}),y.jsx("div",{style:{display:i?"block":"none"},className:"avartarDropdownMenu",ref:r,children:y.jsxs("ul",{children:[y.jsx("li",{onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),style:d,className:"avatar-dropdown-item",children:"Profile"}),y.jsx("li",{onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),style:h,onClick:()=>e(!0),className:"avatar-dropdown-item",children:"Logout"})]})})]})})}var Er=typeof global=="object"&&global&&global.Object===Object&&global;const Mr=Er;var Or=typeof self=="object"&&self&&self.Object===Object&&self,Dr=Mr||Or||Function("return this")();const Ni=Dr;var jr=Ni.Symbol;const re=jr;var Ii=Object.prototype,Lr=Ii.hasOwnProperty,Rr=Ii.toString,jt=re?re.toStringTag:void 0;function Br(t){var e=Lr.call(t,jt),n=t[jt];try{t[jt]=void 0;var i=!0}catch{}var s=Rr.call(t);return i&&(e?t[jt]=n:delete t[jt]),s}var Nr=Object.prototype,Ir=Nr.toString;function Fr(t){return Ir.call(t)}var zr="[object Null]",Wr="[object Undefined]",An=re?re.toStringTag:void 0;function _r(t){return t==null?t===void 0?Wr:zr:An&&An in Object(t)?Br(t):Fr(t)}function Ur(t){return t!=null&&typeof t=="object"}var Hr="[object Symbol]";function Gr(t){return typeof t=="symbol"||Ur(t)&&_r(t)==Hr}var Yr=/\s/;function qr(t){for(var e=t.length;e--&&Yr.test(t.charAt(e)););return e}var Xr=/^\s+/;function Kr(t){return t&&t.slice(0,qr(t)+1).replace(Xr,"")}function oe(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Pn=0/0,$r=/^[-+]0x[0-9a-f]+$/i,Qr=/^0b[01]+$/i,Zr=/^0o[0-7]+$/i,Jr=parseInt;function Cn(t){if(typeof t=="number")return t;if(Gr(t))return Pn;if(oe(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=oe(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Kr(t);var n=Qr.test(t);return n||Zr.test(t)?Jr(t.slice(2),n?2:8):$r.test(t)?Pn:+t}var to=function(){return Ni.Date.now()};const Te=to;var eo="Expected a function",no=Math.max,io=Math.min;function ne(t,e,n){var i,s,o,r,a,l,c=0,u=!1,h=!1,d=!0;if(typeof t!="function")throw new TypeError(eo);e=Cn(e)||0,oe(n)&&(u=!!n.leading,h="maxWait"in n,o=h?no(Cn(n.maxWait)||0,e):o,d="trailing"in n?!!n.trailing:d);function f(S){var k=i,C=s;return i=s=void 0,c=S,r=t.apply(C,k),r}function p(S){return c=S,a=setTimeout(x,e),u?f(S):r}function m(S){var k=S-l,C=S-c,V=e-k;return h?io(V,o-C):V}function b(S){var k=S-l,C=S-c;return l===void 0||k>=e||k<0||h&&C>=o}function x(){var S=Te();if(b(S))return v(S);a=setTimeout(x,m(S))}function v(S){return a=void 0,d&&i?f(S):(i=s=void 0,r)}function g(){a!==void 0&&clearTimeout(a),c=0,i=l=s=a=void 0}function w(){return a===void 0?r:v(Te())}function P(){var S=Te(),k=b(S);if(i=arguments,s=this,l=S,k){if(a===void 0)return p(l);if(h)return clearTimeout(a),a=setTimeout(x,e),f(l)}return a===void 0&&(a=setTimeout(x,e)),r}return P.cancel=g,P.flush=w,P}var so="Expected a function";function ro(t,e,n){var i=!0,s=!0;if(typeof t!="function")throw new TypeError(so);return oe(n)&&(i="leading"in n?!!n.leading:i,s="trailing"in n?!!n.trailing:s),ne(t,e,{leading:i,maxWait:e,trailing:s})}var oo=!!(typeof window<"u"&&window.document&&window.document.createElement),ao=oo;const Fi=ut.getDefaultExportFromCjs(ao);var Tt=function(){return Tt=Object.assign||function(e){for(var n,i=1,s=arguments.length;i<s;i++){n=arguments[i];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Tt.apply(this,arguments)},St=null,kn=null;Fi&&window.addEventListener("resize",function(){kn!==window.devicePixelRatio&&(kn=window.devicePixelRatio,St=null)});function Vn(){if(St===null){if(typeof document>"u")return St=0,St;var t=document.body,e=document.createElement("div");e.classList.add("simplebar-hide-scrollbar"),t.appendChild(e);var n=e.getBoundingClientRect().right;t.removeChild(e),St=n}return St}function zi(t){return!t||!t.ownerDocument||!t.ownerDocument.defaultView?window:t.ownerDocument.defaultView}function Wi(t){return!t||!t.ownerDocument?document:t.ownerDocument}var _i=function(t){var e={},n=Array.prototype.reduce.call(t,function(i,s){var o=s.name.match(/data-simplebar-(.+)/);if(o){var r=o[1].replace(/\W+(.)/g,function(a,l){return l.toUpperCase()});switch(s.value){case"true":i[r]=!0;break;case"false":i[r]=!1;break;case void 0:i[r]=!0;break;default:i[r]=s.value}}return i},e);return n};function Ui(t,e){var n;t&&(n=t.classList).add.apply(n,e.split(" "))}function Hi(t,e){t&&e.split(" ").forEach(function(n){t.classList.remove(n)})}function Gi(t){return".".concat(t.split(" ").join("."))}var lo=Object.freeze({__proto__:null,getElementWindow:zi,getElementDocument:Wi,getOptions:_i,addClasses:Ui,removeClasses:Hi,classNamesToQuery:Gi}),et=zi,Ae=Wi,co=_i,nt=Ui,it=Hi,F=Gi,$t=function(){function t(e,n){n===void 0&&(n={});var i=this;if(this.removePreventClickId=null,this.minScrollbarWidth=20,this.stopScrollDelay=175,this.isScrolling=!1,this.isMouseEntering=!1,this.scrollXTicking=!1,this.scrollYTicking=!1,this.wrapperEl=null,this.contentWrapperEl=null,this.contentEl=null,this.offsetEl=null,this.maskEl=null,this.placeholderEl=null,this.heightAutoObserverWrapperEl=null,this.heightAutoObserverEl=null,this.rtlHelpers=null,this.scrollbarWidth=0,this.resizeObserver=null,this.mutationObserver=null,this.elStyles=null,this.isRtl=null,this.mouseX=0,this.mouseY=0,this.onMouseMove=function(){},this.onWindowResize=function(){},this.onStopScrolling=function(){},this.onMouseEntered=function(){},this.onScroll=function(){var s=et(i.el);i.scrollXTicking||(s.requestAnimationFrame(i.scrollX),i.scrollXTicking=!0),i.scrollYTicking||(s.requestAnimationFrame(i.scrollY),i.scrollYTicking=!0),i.isScrolling||(i.isScrolling=!0,nt(i.el,i.classNames.scrolling)),i.showScrollbar("x"),i.showScrollbar("y"),i.onStopScrolling()},this.scrollX=function(){i.axis.x.isOverflowing&&i.positionScrollbar("x"),i.scrollXTicking=!1},this.scrollY=function(){i.axis.y.isOverflowing&&i.positionScrollbar("y"),i.scrollYTicking=!1},this._onStopScrolling=function(){it(i.el,i.classNames.scrolling),i.options.autoHide&&(i.hideScrollbar("x"),i.hideScrollbar("y")),i.isScrolling=!1},this.onMouseEnter=function(){i.isMouseEntering||(nt(i.el,i.classNames.mouseEntered),i.showScrollbar("x"),i.showScrollbar("y"),i.isMouseEntering=!0),i.onMouseEntered()},this._onMouseEntered=function(){it(i.el,i.classNames.mouseEntered),i.options.autoHide&&(i.hideScrollbar("x"),i.hideScrollbar("y")),i.isMouseEntering=!1},this._onMouseMove=function(s){i.mouseX=s.clientX,i.mouseY=s.clientY,(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&i.onMouseMoveForAxis("x"),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&i.onMouseMoveForAxis("y")},this.onMouseLeave=function(){i.onMouseMove.cancel(),(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&i.onMouseLeaveForAxis("x"),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&i.onMouseLeaveForAxis("y"),i.mouseX=-1,i.mouseY=-1},this._onWindowResize=function(){i.scrollbarWidth=i.getScrollbarWidth(),i.hideNativeScrollbar()},this.onPointerEvent=function(s){if(!(!i.axis.x.track.el||!i.axis.y.track.el||!i.axis.x.scrollbar.el||!i.axis.y.scrollbar.el)){var o,r;i.axis.x.track.rect=i.axis.x.track.el.getBoundingClientRect(),i.axis.y.track.rect=i.axis.y.track.el.getBoundingClientRect(),(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&(o=i.isWithinBounds(i.axis.x.track.rect)),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&(r=i.isWithinBounds(i.axis.y.track.rect)),(o||r)&&(s.stopPropagation(),s.type==="pointerdown"&&s.pointerType!=="touch"&&(o&&(i.axis.x.scrollbar.rect=i.axis.x.scrollbar.el.getBoundingClientRect(),i.isWithinBounds(i.axis.x.scrollbar.rect)?i.onDragStart(s,"x"):i.onTrackClick(s,"x")),r&&(i.axis.y.scrollbar.rect=i.axis.y.scrollbar.el.getBoundingClientRect(),i.isWithinBounds(i.axis.y.scrollbar.rect)?i.onDragStart(s,"y"):i.onTrackClick(s,"y"))))}},this.drag=function(s){var o,r,a,l,c,u,h,d,f,p,m;if(!(!i.draggedAxis||!i.contentWrapperEl)){var b,x=i.axis[i.draggedAxis].track,v=(r=(o=x.rect)===null||o===void 0?void 0:o[i.axis[i.draggedAxis].sizeAttr])!==null&&r!==void 0?r:0,g=i.axis[i.draggedAxis].scrollbar,w=(l=(a=i.contentWrapperEl)===null||a===void 0?void 0:a[i.axis[i.draggedAxis].scrollSizeAttr])!==null&&l!==void 0?l:0,P=parseInt((u=(c=i.elStyles)===null||c===void 0?void 0:c[i.axis[i.draggedAxis].sizeAttr])!==null&&u!==void 0?u:"0px",10);s.preventDefault(),s.stopPropagation(),i.draggedAxis==="y"?b=s.pageY:b=s.pageX;var S=b-((d=(h=x.rect)===null||h===void 0?void 0:h[i.axis[i.draggedAxis].offsetAttr])!==null&&d!==void 0?d:0)-i.axis[i.draggedAxis].dragOffset;S=i.draggedAxis==="x"&&i.isRtl?((p=(f=x.rect)===null||f===void 0?void 0:f[i.axis[i.draggedAxis].sizeAttr])!==null&&p!==void 0?p:0)-g.size-S:S;var k=S/(v-g.size),C=k*(w-P);i.draggedAxis==="x"&&i.isRtl&&(C=!((m=t.getRtlHelpers())===null||m===void 0)&&m.isScrollingToNegative?-C:C),i.contentWrapperEl[i.axis[i.draggedAxis].scrollOffsetAttr]=C}},this.onEndDrag=function(s){var o=Ae(i.el),r=et(i.el);s.preventDefault(),s.stopPropagation(),it(i.el,i.classNames.dragging),o.removeEventListener("mousemove",i.drag,!0),o.removeEventListener("mouseup",i.onEndDrag,!0),i.removePreventClickId=r.setTimeout(function(){o.removeEventListener("click",i.preventClick,!0),o.removeEventListener("dblclick",i.preventClick,!0),i.removePreventClickId=null})},this.preventClick=function(s){s.preventDefault(),s.stopPropagation()},this.el=e,this.options=Tt(Tt({},t.defaultOptions),n),this.classNames=Tt(Tt({},t.defaultOptions.classNames),n.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}}},typeof this.el!="object"||!this.el.nodeName)throw new Error("Argument passed to SimpleBar must be an HTML element instead of ".concat(this.el));this.onMouseMove=ro(this._onMouseMove,64),this.onWindowResize=ne(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=ne(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=ne(this._onMouseEntered,this.stopScrollDelay),this.init()}return t.getRtlHelpers=function(){if(t.rtlHelpers)return t.rtlHelpers;var e=document.createElement("div");e.innerHTML='<div class="simplebar-dummy-scrollbar-size"><div></div></div>';var n=e.firstElementChild,i=n==null?void 0:n.firstElementChild;if(!i)return null;document.body.appendChild(n),n.scrollLeft=0;var s=t.getOffset(n),o=t.getOffset(i);n.scrollLeft=-999;var r=t.getOffset(i);return document.body.removeChild(n),t.rtlHelpers={isScrollOriginAtZero:s.left!==o.left,isScrollingToNegative:o.left!==r.left},t.rtlHelpers},t.prototype.getScrollbarWidth=function(){try{return this.contentWrapperEl&&getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display==="none"||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:Vn()}catch{return Vn()}},t.getOffset=function(e){var n=e.getBoundingClientRect(),i=Ae(e),s=et(e);return{top:n.top+(s.pageYOffset||i.documentElement.scrollTop),left:n.left+(s.pageXOffset||i.documentElement.scrollLeft)}},t.prototype.init=function(){Fi&&(this.initDOM(),this.rtlHelpers=t.getRtlHelpers(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},t.prototype.initDOM=function(){var e,n;this.wrapperEl=this.el.querySelector(F(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(F(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(F(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(F(this.classNames.offset)),this.maskEl=this.el.querySelector(F(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,F(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(F(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(F(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(F(this.classNames.track)).concat(F(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(F(this.classNames.track)).concat(F(this.classNames.vertical))),this.axis.x.scrollbar.el=((e=this.axis.x.track.el)===null||e===void 0?void 0:e.querySelector(F(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=((n=this.axis.y.track.el)===null||n===void 0?void 0:n.querySelector(F(this.classNames.scrollbar)))||null,this.options.autoHide||(nt(this.axis.x.scrollbar.el,this.classNames.visible),nt(this.axis.y.scrollbar.el,this.classNames.visible))},t.prototype.initListeners=function(){var e=this,n,i=et(this.el);if(this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("pointerdown",this.onPointerEvent,!0),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),(n=this.contentWrapperEl)===null||n===void 0||n.addEventListener("scroll",this.onScroll),i.addEventListener("resize",this.onWindowResize),!!this.contentEl){if(window.ResizeObserver){var s=!1,o=i.ResizeObserver||ResizeObserver;this.resizeObserver=new o(function(){s&&i.requestAnimationFrame(function(){e.recalculate()})}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),i.requestAnimationFrame(function(){s=!0})}this.mutationObserver=new i.MutationObserver(function(){i.requestAnimationFrame(function(){e.recalculate()})}),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})}},t.prototype.recalculate=function(){if(!(!this.heightAutoObserverEl||!this.contentEl||!this.contentWrapperEl||!this.wrapperEl||!this.placeholderEl)){var e=et(this.el);this.elStyles=e.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var n=this.contentEl.offsetWidth,i=this.heightAutoObserverEl.offsetHeight<=1,s=this.heightAutoObserverEl.offsetWidth<=1||n>0,o=this.contentWrapperEl.offsetWidth,r=this.elStyles.overflowX,a=this.elStyles.overflowY;this.contentEl.style.padding="".concat(this.elStyles.paddingTop," ").concat(this.elStyles.paddingRight," ").concat(this.elStyles.paddingBottom," ").concat(this.elStyles.paddingLeft),this.wrapperEl.style.margin="-".concat(this.elStyles.paddingTop," -").concat(this.elStyles.paddingRight," -").concat(this.elStyles.paddingBottom," -").concat(this.elStyles.paddingLeft);var l=this.contentEl.scrollHeight,c=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=i?"auto":"100%",this.placeholderEl.style.width=s?"".concat(n||c,"px"):"auto",this.placeholderEl.style.height="".concat(l,"px");var u=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=n!==0&&c>n,this.axis.y.isOverflowing=l>u,this.axis.x.isOverflowing=r==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=a==="hidden"?!1:this.axis.y.isOverflowing,this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0,this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0,this.hideNativeScrollbar();var h=this.axis.x.isOverflowing?this.scrollbarWidth:0,d=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&c>o-d,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&l>u-h,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el&&(this.axis.x.scrollbar.el.style.width="".concat(this.axis.x.scrollbar.size,"px")),this.axis.y.scrollbar.el&&(this.axis.y.scrollbar.el.style.height="".concat(this.axis.y.scrollbar.size,"px")),this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")}},t.prototype.getScrollbarSize=function(e){var n,i;if(e===void 0&&(e="y"),!this.axis[e].isOverflowing||!this.contentEl)return 0;var s=this.contentEl[this.axis[e].scrollSizeAttr],o=(i=(n=this.axis[e].track.el)===null||n===void 0?void 0:n[this.axis[e].offsetSizeAttr])!==null&&i!==void 0?i:0,r=o/s,a;return a=Math.max(~~(r*o),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(a=Math.min(a,this.options.scrollbarMaxSize)),a},t.prototype.positionScrollbar=function(e){var n,i,s;e===void 0&&(e="y");var o=this.axis[e].scrollbar;if(!(!this.axis[e].isOverflowing||!this.contentWrapperEl||!o.el||!this.elStyles)){var r=this.contentWrapperEl[this.axis[e].scrollSizeAttr],a=((n=this.axis[e].track.el)===null||n===void 0?void 0:n[this.axis[e].offsetSizeAttr])||0,l=parseInt(this.elStyles[this.axis[e].sizeAttr],10),c=this.contentWrapperEl[this.axis[e].scrollOffsetAttr];c=e==="x"&&this.isRtl&&(!((i=t.getRtlHelpers())===null||i===void 0)&&i.isScrollOriginAtZero)?-c:c,e==="x"&&this.isRtl&&(c=!((s=t.getRtlHelpers())===null||s===void 0)&&s.isScrollingToNegative?c:-c);var u=c/(r-l),h=~~((a-o.size)*u);h=e==="x"&&this.isRtl?-h+(a-o.size):h,o.el.style.transform=e==="x"?"translate3d(".concat(h,"px, 0, 0)"):"translate3d(0, ".concat(h,"px, 0)")}},t.prototype.toggleTrackVisibility=function(e){e===void 0&&(e="y");var n=this.axis[e].track.el,i=this.axis[e].scrollbar.el;!n||!i||!this.contentWrapperEl||(this.axis[e].isOverflowing||this.axis[e].forceVisible?(n.style.visibility="visible",this.contentWrapperEl.style[this.axis[e].overflowAttr]="scroll",this.el.classList.add("".concat(this.classNames.scrollable,"-").concat(e))):(n.style.visibility="hidden",this.contentWrapperEl.style[this.axis[e].overflowAttr]="hidden",this.el.classList.remove("".concat(this.classNames.scrollable,"-").concat(e))),this.axis[e].isOverflowing?i.style.display="block":i.style.display="none")},t.prototype.showScrollbar=function(e){e===void 0&&(e="y"),this.axis[e].isOverflowing&&!this.axis[e].scrollbar.isVisible&&(nt(this.axis[e].scrollbar.el,this.classNames.visible),this.axis[e].scrollbar.isVisible=!0)},t.prototype.hideScrollbar=function(e){e===void 0&&(e="y"),this.axis[e].isOverflowing&&this.axis[e].scrollbar.isVisible&&(it(this.axis[e].scrollbar.el,this.classNames.visible),this.axis[e].scrollbar.isVisible=!1)},t.prototype.hideNativeScrollbar=function(){this.offsetEl&&(this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px",this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px")},t.prototype.onMouseMoveForAxis=function(e){e===void 0&&(e="y");var n=this.axis[e];!n.track.el||!n.scrollbar.el||(n.track.rect=n.track.el.getBoundingClientRect(),n.scrollbar.rect=n.scrollbar.el.getBoundingClientRect(),this.isWithinBounds(n.track.rect)?(this.showScrollbar(e),nt(n.track.el,this.classNames.hover),this.isWithinBounds(n.scrollbar.rect)?nt(n.scrollbar.el,this.classNames.hover):it(n.scrollbar.el,this.classNames.hover)):(it(n.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(e)))},t.prototype.onMouseLeaveForAxis=function(e){e===void 0&&(e="y"),it(this.axis[e].track.el,this.classNames.hover),it(this.axis[e].scrollbar.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(e)},t.prototype.onDragStart=function(e,n){var i;n===void 0&&(n="y");var s=Ae(this.el),o=et(this.el),r=this.axis[n].scrollbar,a=n==="y"?e.pageY:e.pageX;this.axis[n].dragOffset=a-(((i=r.rect)===null||i===void 0?void 0:i[this.axis[n].offsetAttr])||0),this.draggedAxis=n,nt(this.el,this.classNames.dragging),s.addEventListener("mousemove",this.drag,!0),s.addEventListener("mouseup",this.onEndDrag,!0),this.removePreventClickId===null?(s.addEventListener("click",this.preventClick,!0),s.addEventListener("dblclick",this.preventClick,!0)):(o.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},t.prototype.onTrackClick=function(e,n){var i=this,s,o,r,a;n===void 0&&(n="y");var l=this.axis[n];if(!(!this.options.clickOnTrack||!l.scrollbar.el||!this.contentWrapperEl)){e.preventDefault();var c=et(this.el);this.axis[n].scrollbar.rect=l.scrollbar.el.getBoundingClientRect();var u=this.axis[n].scrollbar,h=(o=(s=u.rect)===null||s===void 0?void 0:s[this.axis[n].offsetAttr])!==null&&o!==void 0?o:0,d=parseInt((a=(r=this.elStyles)===null||r===void 0?void 0:r[this.axis[n].sizeAttr])!==null&&a!==void 0?a:"0px",10),f=this.contentWrapperEl[this.axis[n].scrollOffsetAttr],p=n==="y"?this.mouseY-h:this.mouseX-h,m=p<0?-1:1,b=m===-1?f-d:f+d,x=40,v=function(){i.contentWrapperEl&&(m===-1?f>b&&(f-=x,i.contentWrapperEl[i.axis[n].scrollOffsetAttr]=f,c.requestAnimationFrame(v)):f<b&&(f+=x,i.contentWrapperEl[i.axis[n].scrollOffsetAttr]=f,c.requestAnimationFrame(v)))};v()}},t.prototype.getContentElement=function(){return this.contentEl},t.prototype.getScrollElement=function(){return this.contentWrapperEl},t.prototype.removeListeners=function(){var e=et(this.el);this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("pointerdown",this.onPointerEvent,!0),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.onMouseMove.cancel(),this.onWindowResize.cancel(),this.onStopScrolling.cancel(),this.onMouseEntered.cancel()},t.prototype.unMount=function(){this.removeListeners()},t.prototype.isWithinBounds=function(e){return this.mouseX>=e.left&&this.mouseX<=e.left+e.width&&this.mouseY>=e.top&&this.mouseY<=e.top+e.height},t.prototype.findChild=function(e,n){var i=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector;return Array.prototype.filter.call(e.children,function(s){return i.call(s,n)})[0]},t.rtlHelpers=null,t.defaultOptions={forceVisible:!1,clickOnTrack:!0,scrollbarMinSize:25,scrollbarMaxSize:0,ariaLabel:"scrollable content",classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging",scrolling:"simplebar-scrolling",scrollable:"simplebar-scrollable",mouseEntered:"simplebar-mouse-entered"},scrollableNode:null,contentNode:null,autoHide:!0},t.getOptions=co,t.helpers=lo,t}(),W=function(){return W=Object.assign||function(e){for(var n,i=1,s=arguments.length;i<s;i++){n=arguments[i];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},W.apply(this,arguments)};function uo(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(t);s<i.length;s++)e.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(n[i[s]]=t[i[s]]);return n}var Yi=j.forwardRef(function(t,e){var n=t.children,i=t.scrollableNodeProps,s=i===void 0?{}:i,o=uo(t,["children","scrollableNodeProps"]),r=j.useRef(),a=j.useRef(),l=j.useRef(),c={},u={};Object.keys(o).forEach(function(f){Object.prototype.hasOwnProperty.call($t.defaultOptions,f)?c[f]=o[f]:u[f]=o[f]});var h=W(W({},$t.defaultOptions.classNames),c.classNames),d=W(W({},s),{className:"".concat(h.contentWrapper).concat(s.className?" ".concat(s.className):""),tabIndex:0,role:"region","aria-label":c.ariaLabel||$t.defaultOptions.ariaLabel});return j.useEffect(function(){var f;return a.current=d.ref?d.ref.current:a.current,r.current&&(f=new $t(r.current,W(W(W({},c),a.current&&{scrollableNode:a.current}),l.current&&{contentNode:l.current})),typeof e=="function"?e(f):e&&(e.current=f)),function(){f==null||f.unMount(),f=null,typeof e=="function"&&e(null)}},[]),j.createElement("div",W({"data-simplebar":"init",ref:r},u),j.createElement("div",{className:h.wrapper},j.createElement("div",{className:h.heightAutoObserverWrapperEl},j.createElement("div",{className:h.heightAutoObserverEl})),j.createElement("div",{className:h.mask},j.createElement("div",{className:h.offset},typeof n=="function"?n({scrollableNodeRef:a,scrollableNodeProps:W(W({},d),{ref:a}),contentNodeRef:l,contentNodeProps:{className:h.contentEl,ref:l}}):j.createElement("div",W({},d),j.createElement("div",{className:h.contentEl},n)))),j.createElement("div",{className:h.placeholder})),j.createElement("div",{className:"".concat(h.track," simplebar-horizontal")},j.createElement("div",{className:h.scrollbar})),j.createElement("div",{className:"".concat(h.track," simplebar-vertical")},j.createElement("div",{className:h.scrollbar})))});Yi.displayName="SimpleBar";const qi=T.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),me=T.createContext({}),Qe=T.createContext(null),ge=typeof document<"u",ho=ge?T.useLayoutEffect:T.useEffect,Xi=T.createContext({strict:!1}),Ze=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),fo="framerAppearId",Ki="data-"+Ze(fo);function po(t,e,n,i){const{visualElement:s}=T.useContext(me),o=T.useContext(Xi),r=T.useContext(Qe),a=T.useContext(qi).reducedMotion,l=T.useRef();i=i||o.renderer,!l.current&&i&&(l.current=i(t,{visualState:e,parent:s,props:n,presenceContext:r,blockInitialAnimation:r?r.initial===!1:!1,reducedMotionConfig:a}));const c=l.current;T.useInsertionEffect(()=>{c&&c.update(n,r)});const u=T.useRef(!!(n[Ki]&&!window.HandoffComplete));return ho(()=>{c&&(c.render(),u.current&&c.animationState&&c.animationState.animateChanges())}),T.useEffect(()=>{c&&(c.updateFeatures(),!u.current&&c.animationState&&c.animationState.animateChanges(),u.current&&(u.current=!1,window.HandoffComplete=!0))}),c}function At(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function mo(t,e,n){return T.useCallback(i=>{i&&t.mount&&t.mount(i),e&&(i?e.mount(i):e.unmount()),n&&(typeof n=="function"?n(i):At(n)&&(n.current=i))},[e])}function Wt(t){return typeof t=="string"||Array.isArray(t)}function ve(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const Je=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],tn=["initial",...Je];function ye(t){return ve(t.animate)||tn.some(e=>Wt(t[e]))}function $i(t){return!!(ye(t)||t.variants)}function go(t,e){if(ye(t)){const{initial:n,animate:i}=t;return{initial:n===!1||Wt(n)?n:void 0,animate:Wt(i)?i:void 0}}return t.inherit!==!1?e:{}}function vo(t){const{initial:e,animate:n}=go(t,T.useContext(me));return T.useMemo(()=>({initial:e,animate:n}),[En(e),En(n)])}function En(t){return Array.isArray(t)?t.join(" "):t}const Mn={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"]},_t={};for(const t in Mn)_t[t]={isEnabled:e=>Mn[t].some(n=>!!e[n])};function yo(t){for(const e in t)_t[e]={..._t[e],...t[e]}}const Qi=T.createContext({}),Zi=T.createContext({}),bo=Symbol.for("motionComponentSymbol");function xo({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:i,Component:s}){t&&yo(t);function o(a,l){let c;const u={...T.useContext(qi),...a,layoutId:wo(a)},{isStatic:h}=u,d=vo(a),f=i(a,h);if(!h&&ge){d.visualElement=po(s,f,u,e);const p=T.useContext(Zi),m=T.useContext(Xi).strict;d.visualElement&&(c=d.visualElement.loadFeatures(u,m,t,p))}return j.createElement(me.Provider,{value:d},c&&d.visualElement?j.createElement(c,{visualElement:d.visualElement,...u}):null,n(s,a,mo(f,d.visualElement,l),f,h,d.visualElement))}const r=T.forwardRef(o);return r[bo]=s,r}function wo({layoutId:t}){const e=T.useContext(Qi).id;return e&&t!==void 0?e+"-"+t:t}function So(t){function e(i,s={}){return xo(t(i,s))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(i,s)=>(n.has(s)||n.set(s,e(s)),n.get(s))})}const To=["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 en(t){return typeof t!="string"||t.includes("-")?!1:!!(To.indexOf(t)>-1||/[A-Z]/.test(t))}const ae={};function Ao(t){Object.assign(ae,t)}const Ht=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],vt=new Set(Ht);function Ji(t,{layout:e,layoutId:n}){return vt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!ae[t]||t==="opacity")}const z=t=>!!(t&&t.getVelocity),Po={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Co=Ht.length;function ko(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},i,s){let o="";for(let r=0;r<Co;r++){const a=Ht[r];if(t[a]!==void 0){const l=Po[a]||a;o+=`${l}(${t[a]}) `}}return e&&!t.z&&(o+="translateZ(0)"),o=o.trim(),s?o=s(t,i?"":o):n&&i&&(o="none"),o}const ts=t=>e=>typeof e=="string"&&e.startsWith(t),es=ts("--"),Ne=ts("var(--"),Vo=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,Eo=(t,e)=>e&&typeof t=="number"?e.transform(t):t,lt=(t,e,n)=>Math.min(Math.max(n,t),e),yt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Nt={...yt,transform:t=>lt(0,1,t)},Qt={...yt,default:1},It=t=>Math.round(t*1e5)/1e5,be=/(-)?([\d]*\.?[\d])+/g,ns=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Mo=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Gt(t){return typeof t=="string"}const Yt=t=>({test:e=>Gt(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),st=Yt("deg"),q=Yt("%"),A=Yt("px"),Oo=Yt("vh"),Do=Yt("vw"),On={...q,parse:t=>q.parse(t)/100,transform:t=>q.transform(t*100)},Dn={...yt,transform:Math.round},is={borderWidth:A,borderTopWidth:A,borderRightWidth:A,borderBottomWidth:A,borderLeftWidth:A,borderRadius:A,radius:A,borderTopLeftRadius:A,borderTopRightRadius:A,borderBottomRightRadius:A,borderBottomLeftRadius:A,width:A,maxWidth:A,height:A,maxHeight:A,size:A,top:A,right:A,bottom:A,left:A,padding:A,paddingTop:A,paddingRight:A,paddingBottom:A,paddingLeft:A,margin:A,marginTop:A,marginRight:A,marginBottom:A,marginLeft:A,rotate:st,rotateX:st,rotateY:st,rotateZ:st,scale:Qt,scaleX:Qt,scaleY:Qt,scaleZ:Qt,skew:st,skewX:st,skewY:st,distance:A,translateX:A,translateY:A,translateZ:A,x:A,y:A,z:A,perspective:A,transformPerspective:A,opacity:Nt,originX:On,originY:On,originZ:A,zIndex:Dn,fillOpacity:Nt,strokeOpacity:Nt,numOctaves:Dn};function nn(t,e,n,i){const{style:s,vars:o,transform:r,transformOrigin:a}=t;let l=!1,c=!1,u=!0;for(const h in e){const d=e[h];if(es(h)){o[h]=d;continue}const f=is[h],p=Eo(d,f);if(vt.has(h)){if(l=!0,r[h]=p,!u)continue;d!==(f.default||0)&&(u=!1)}else h.startsWith("origin")?(c=!0,a[h]=p):s[h]=p}if(e.transform||(l||i?s.transform=ko(t.transform,n,u,i):s.transform&&(s.transform="none")),c){const{originX:h="50%",originY:d="50%",originZ:f=0}=a;s.transformOrigin=`${h} ${d} ${f}`}}const sn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ss(t,e,n){for(const i in e)!z(e[i])&&!Ji(i,n)&&(t[i]=e[i])}function jo({transformTemplate:t},e,n){return T.useMemo(()=>{const i=sn();return nn(i,e,{enableHardwareAcceleration:!n},t),Object.assign({},i.vars,i.style)},[e])}function Lo(t,e,n){const i=t.style||{},s={};return ss(s,i,t),Object.assign(s,jo(t,e,n)),t.transformValues?t.transformValues(s):s}function Ro(t,e,n){const i={},s=Lo(t,e,n);return t.drag&&t.dragListener!==!1&&(i.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(i.tabIndex=0),i.style=s,i}const Bo=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function le(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Bo.has(t)}let rs=t=>!le(t);function No(t){t&&(rs=e=>e.startsWith("on")?!le(e):t(e))}try{No(require("@emotion/is-prop-valid").default)}catch{}function Io(t,e,n){const i={};for(const s in t)s==="values"&&typeof t.values=="object"||(rs(s)||n===!0&&le(s)||!e&&!le(s)||t.draggable&&s.startsWith("onDrag"))&&(i[s]=t[s]);return i}function jn(t,e,n){return typeof t=="string"?t:A.transform(e+n*t)}function Fo(t,e,n){const i=jn(e,t.x,t.width),s=jn(n,t.y,t.height);return`${i} ${s}`}const zo={offset:"stroke-dashoffset",array:"stroke-dasharray"},Wo={offset:"strokeDashoffset",array:"strokeDasharray"};function _o(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?zo:Wo;t[o.offset]=A.transform(-i);const r=A.transform(e),a=A.transform(n);t[o.array]=`${r} ${a}`}function rn(t,{attrX:e,attrY:n,attrScale:i,originX:s,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:l=0,...c},u,h,d){if(nn(t,c,u,d),h){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:p,dimensions:m}=t;f.transform&&(m&&(p.transform=f.transform),delete f.transform),m&&(s!==void 0||o!==void 0||p.transform)&&(p.transformOrigin=Fo(m,s!==void 0?s:.5,o!==void 0?o:.5)),e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),i!==void 0&&(f.scale=i),r!==void 0&&_o(f,r,a,l,!1)}const os=()=>({...sn(),attrs:{}}),on=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Uo(t,e,n,i){const s=T.useMemo(()=>{const o=os();return rn(o,e,{enableHardwareAcceleration:!1},on(i),t.transformTemplate),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};ss(o,t.style,t),s.style={...o,...s.style}}return s}function Ho(t=!1){return(n,i,s,{latestValues:o},r)=>{const l=(en(n)?Uo:Ro)(i,o,r,n),u={...Io(i,typeof n=="string",t),...l,ref:s},{children:h}=i,d=T.useMemo(()=>z(h)?h.get():h,[h]);return T.createElement(n,{...u,children:d})}}function as(t,{style:e,vars:n},i,s){Object.assign(t.style,e,s&&s.getProjectionStyles(i));for(const o in n)t.style.setProperty(o,n[o])}const ls=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 cs(t,e,n,i){as(t,e,void 0,i);for(const s in e.attrs)t.setAttribute(ls.has(s)?s:Ze(s),e.attrs[s])}function an(t,e){const{style:n}=t,i={};for(const s in n)(z(n[s])||e.style&&z(e.style[s])||Ji(s,t))&&(i[s]=n[s]);return i}function us(t,e){const n=an(t,e);for(const i in t)if(z(t[i])||z(e[i])){const s=Ht.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;n[s]=t[i]}return n}function ln(t,e,n,i={},s={}){return typeof e=="function"&&(e=e(n!==void 0?n:t.custom,i,s)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(n!==void 0?n:t.custom,i,s)),e}function Go(t){const e=T.useRef(null);return e.current===null&&(e.current=t()),e.current}const ce=t=>Array.isArray(t),Yo=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),qo=t=>ce(t)?t[t.length-1]||0:t;function ie(t){const e=z(t)?t.get():t;return Yo(e)?e.toValue():e}function Xo({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},i,s,o){const r={latestValues:Ko(i,s,o,t),renderState:e()};return n&&(r.mount=a=>n(i,a,r)),r}const hs=t=>(e,n)=>{const i=T.useContext(me),s=T.useContext(Qe),o=()=>Xo(t,e,i,s);return n?o():Go(o)};function Ko(t,e,n,i){const s={},o=i(t,{});for(const d in o)s[d]=ie(o[d]);let{initial:r,animate:a}=t;const l=ye(t),c=$i(t);e&&c&&!l&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||r===!1;const h=u?a:r;return h&&typeof h!="boolean"&&!ve(h)&&(Array.isArray(h)?h:[h]).forEach(f=>{const p=ln(t,f);if(!p)return;const{transitionEnd:m,transition:b,...x}=p;for(const v in x){let g=x[v];if(Array.isArray(g)){const w=u?g.length-1:0;g=g[w]}g!==null&&(s[v]=g)}for(const v in m)s[v]=m[v]}),s}const D=t=>t;class Ln{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 n=this.order.indexOf(e);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function $o(t){let e=new Ln,n=new Ln,i=0,s=!1,o=!1;const r=new WeakSet,a={schedule:(l,c=!1,u=!1)=>{const h=u&&s,d=h?e:n;return c&&r.add(l),d.add(l)&&h&&s&&(i=e.order.length),l},cancel:l=>{n.remove(l),r.delete(l)},process:l=>{if(s){o=!0;return}if(s=!0,[e,n]=[n,e],n.clear(),i=e.order.length,i)for(let c=0;c<i;c++){const u=e.order[c];u(l),r.has(u)&&(a.schedule(u),t())}s=!1,o&&(o=!1,a.process(l))}};return a}const Zt=["prepare","read","update","preRender","render","postRender"],Qo=40;function Zo(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=Zt.reduce((h,d)=>(h[d]=$o(()=>n=!0),h),{}),r=h=>o[h].process(s),a=()=>{const h=performance.now();n=!1,s.delta=i?1e3/60:Math.max(Math.min(h-s.timestamp,Qo),1),s.timestamp=h,s.isProcessing=!0,Zt.forEach(r),s.isProcessing=!1,n&&e&&(i=!1,t(a))},l=()=>{n=!0,i=!0,s.isProcessing||t(a)};return{schedule:Zt.reduce((h,d)=>{const f=o[d];return h[d]=(p,m=!1,b=!1)=>(n||l(),f.schedule(p,m,b)),h},{}),cancel:h=>Zt.forEach(d=>o[d].cancel(h)),state:s,steps:o}}const{schedule:E,cancel:J,state:B,steps:Pe}=Zo(typeof requestAnimationFrame<"u"?requestAnimationFrame:D,!0),Jo={useVisualState:hs({scrapeMotionValuesFromProps:us,createRenderState:os,onMount:(t,e,{renderState:n,latestValues:i})=>{E.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),E.render(()=>{rn(n,i,{enableHardwareAcceleration:!1},on(e.tagName),t.transformTemplate),cs(e,n)})}})},ta={useVisualState:hs({scrapeMotionValuesFromProps:an,createRenderState:sn})};function ea(t,{forwardMotionProps:e=!1},n,i){return{...en(t)?Jo:ta,preloadedFeatures:n,useRender:Ho(e),createVisualElement:i,Component:t}}function $(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const ds=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function xe(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const na=t=>e=>ds(e)&&t(e,xe(e));function Q(t,e,n,i){return $(t,e,na(n),i)}const ia=(t,e)=>n=>e(t(n)),ot=(...t)=>t.reduce(ia);function fs(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const Rn=fs("dragHorizontal"),Bn=fs("dragVertical");function ps(t){let e=!1;if(t==="y")e=Bn();else if(t==="x")e=Rn();else{const n=Rn(),i=Bn();n&&i?e=()=>{n(),i()}:(n&&n(),i&&i())}return e}function ms(){const t=ps(!0);return t?(t(),!1):!0}class ht{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Nn(t,e){const n="pointer"+(e?"enter":"leave"),i="onHover"+(e?"Start":"End"),s=(o,r)=>{if(o.pointerType==="touch"||ms())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e),a[i]&&E.update(()=>a[i](o,r))};return Q(t.current,n,s,{passive:!t.getProps()[i]})}class sa extends ht{mount(){this.unmount=ot(Nn(this.node,!0),Nn(this.node,!1))}unmount(){}}class ra extends ht{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{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=ot($(this.node.current,"focus",()=>this.onFocus()),$(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const gs=(t,e)=>e?t===e?!0:gs(t,e.parentElement):!1;function Ce(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,xe(n))}class oa extends ht{constructor(){super(...arguments),this.removeStartListeners=D,this.removeEndListeners=D,this.removeAccessibleListeners=D,this.startPointerPress=(e,n)=>{if(this.isPressing)return;this.removeEndListeners();const i=this.node.getProps(),o=Q(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:h}=this.node.getProps();E.update(()=>{!h&&!gs(this.node.current,a.target)?u&&u(a,l):c&&c(a,l)})},{passive:!(i.onTap||i.onPointerUp)}),r=Q(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(i.onTapCancel||i.onPointerCancel)});this.removeEndListeners=ot(o,r),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=o=>{if(o.key!=="Enter"||this.isPressing)return;const r=a=>{a.key!=="Enter"||!this.checkPressEnd()||Ce("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&E.update(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=$(this.node.current,"keyup",r),Ce("down",(a,l)=>{this.startPress(a,l)})},n=$(this.node.current,"keydown",e),i=()=>{this.isPressing&&Ce("cancel",(o,r)=>this.cancelPress(o,r))},s=$(this.node.current,"blur",i);this.removeAccessibleListeners=ot(n,s)}}startPress(e,n){this.isPressing=!0;const{onTapStart:i,whileTap:s}=this.node.getProps();s&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),i&&E.update(()=>i(e,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!ms()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:i}=this.node.getProps();i&&E.update(()=>i(e,n))}mount(){const e=this.node.getProps(),n=Q(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),i=$(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=ot(n,i)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Ie=new WeakMap,ke=new WeakMap,aa=t=>{const e=Ie.get(t.target);e&&e(t)},la=t=>{t.forEach(aa)};function ca({root:t,...e}){const n=t||document;ke.has(n)||ke.set(n,{});const i=ke.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(la,{root:t,...e})),i[s]}function ua(t,e,n){const i=ca(e);return Ie.set(t,n),i.observe(t),()=>{Ie.delete(t),i.unobserve(t)}}const ha={some:0,all:1};class da extends ht{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:i,amount:s="some",once:o}=e,r={root:n?n.current:void 0,rootMargin:i,threshold:typeof s=="number"?s:ha[s]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,o&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:h}=this.node.getProps(),d=c?u:h;d&&d(l)};return ua(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(fa(e,n))&&this.startObserver()}unmount(){}}function fa({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const pa={inView:{Feature:da},tap:{Feature:oa},focus:{Feature:ra},hover:{Feature:sa}};function vs(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}function ma(t){const e={};return t.values.forEach((n,i)=>e[i]=n.get()),e}function ga(t){const e={};return t.values.forEach((n,i)=>e[i]=n.getVelocity()),e}function we(t,e,n){const i=t.getProps();return ln(i,e,n!==void 0?n:i.custom,ma(t),ga(t))}let qt=D,Y=D;process.env.NODE_ENV!=="production"&&(qt=(t,e)=>{!t&&typeof console<"u"&&console.warn(e)},Y=(t,e)=>{if(!t)throw new Error(e)});const at=t=>t*1e3,Z=t=>t/1e3,va={current:!1},ys=t=>Array.isArray(t)&&typeof t[0]=="number";function bs(t){return!!(!t||typeof t=="string"&&xs[t]||ys(t)||Array.isArray(t)&&t.every(bs))}const Bt=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,xs={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Bt([0,.65,.55,1]),circOut:Bt([.55,0,1,.45]),backIn:Bt([.31,.01,.66,-.59]),backOut:Bt([.33,1.53,.69,.99])};function ws(t){if(t)return ys(t)?Bt(t):Array.isArray(t)?t.map(ws):xs[t]}function ya(t,e,n,{delay:i=0,duration:s,repeat:o=0,repeatType:r="loop",ease:a,times:l}={}){const c={[e]:n};l&&(c.offset=l);const u=ws(a);return Array.isArray(u)&&(c.easing=u),t.animate(c,{delay:i,duration:s,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"})}function ba(t,{repeat:e,repeatType:n="loop"}){const i=e&&n!=="loop"&&e%2===1?0:t.length-1;return t[i]}const Ss=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,xa=1e-7,wa=12;function Sa(t,e,n,i,s){let o,r,a=0;do r=e+(n-e)/2,o=Ss(r,i,s)-t,o>0?n=r:e=r;while(Math.abs(o)>xa&&++a<wa);return r}function Xt(t,e,n,i){if(t===e&&n===i)return D;const s=o=>Sa(o,0,1,t,n);return o=>o===0||o===1?o:Ss(s(o),e,i)}const Ta=Xt(.42,0,1,1),Aa=Xt(0,0,.58,1),Ts=Xt(.42,0,.58,1),Pa=t=>Array.isArray(t)&&typeof t[0]!="number",As=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Ps=t=>e=>1-t(1-e),cn=t=>1-Math.sin(Math.acos(t)),Cs=Ps(cn),Ca=As(cn),ks=Xt(.33,1.53,.69,.99),un=Ps(ks),ka=As(un),Va=t=>(t*=2)<1?.5*un(t):.5*(2-Math.pow(2,-10*(t-1))),In={linear:D,easeIn:Ta,easeInOut:Ts,easeOut:Aa,circIn:cn,circInOut:Ca,circOut:Cs,backIn:un,backInOut:ka,backOut:ks,anticipate:Va},Fn=t=>{if(Array.isArray(t)){Y(t.length===4,"Cubic bezier arrays must contain four numerical values.");const[e,n,i,s]=t;return Xt(e,n,i,s)}else if(typeof t=="string")return Y(In[t]!==void 0,`Invalid easing type '${t}'`),In[t];return t},hn=(t,e)=>n=>!!(Gt(n)&&Mo.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),Vs=(t,e,n)=>i=>{if(!Gt(i))return i;const[s,o,r,a]=i.match(be);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},Ea=t=>lt(0,255,t),Ve={...yt,transform:t=>Math.round(Ea(t))},gt={test:hn("rgb","red"),parse:Vs("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+Ve.transform(t)+", "+Ve.transform(e)+", "+Ve.transform(n)+", "+It(Nt.transform(i))+")"};function Ma(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}}const Fe={test:hn("#"),parse:Ma,transform:gt.transform},Pt={test:hn("hsl","hue"),parse:Vs("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+q.transform(It(e))+", "+q.transform(It(n))+", "+It(Nt.transform(i))+")"},I={test:t=>gt.test(t)||Fe.test(t)||Pt.test(t),parse:t=>gt.test(t)?gt.parse(t):Pt.test(t)?Pt.parse(t):Fe.parse(t),transform:t=>Gt(t)?t:t.hasOwnProperty("red")?gt.transform(t):Pt.transform(t)},O=(t,e,n)=>-n*t+n*e+t;function Ee(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Oa({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,e/=100,n/=100;let s=0,o=0,r=0;if(!e)s=o=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;s=Ee(l,a,t+1/3),o=Ee(l,a,t),r=Ee(l,a,t-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:i}}const Me=(t,e,n)=>{const i=t*t;return Math.sqrt(Math.max(0,n*(e*e-i)+i))},Da=[Fe,gt,Pt],ja=t=>Da.find(e=>e.test(t));function zn(t){const e=ja(t);Y(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`);let n=e.parse(t);return e===Pt&&(n=Oa(n)),n}const Es=(t,e)=>{const n=zn(t),i=zn(e),s={...n};return o=>(s.red=Me(n.red,i.red,o),s.green=Me(n.green,i.green,o),s.blue=Me(n.blue,i.blue,o),s.alpha=O(n.alpha,i.alpha,o),gt.transform(s))};function La(t){var e,n;return isNaN(t)&&Gt(t)&&(((e=t.match(be))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(ns))===null||n===void 0?void 0:n.length)||0)>0}const Ms={regex:Vo,countKey:"Vars",token:"${v}",parse:D},Os={regex:ns,countKey:"Colors",token:"${c}",parse:I.parse},Ds={regex:be,countKey:"Numbers",token:"${n}",parse:yt.parse};function Oe(t,{regex:e,countKey:n,token:i,parse:s}){const o=t.tokenised.match(e);o&&(t["num"+n]=o.length,t.tokenised=t.tokenised.replace(e,i),t.values.push(...o.map(s)))}function ue(t){const e=t.toString(),n={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&Oe(n,Ms),Oe(n,Os),Oe(n,Ds),n}function js(t){return ue(t).values}function Ls(t){const{values:e,numColors:n,numVars:i,tokenised:s}=ue(t),o=e.length;return r=>{let a=s;for(let l=0;l<o;l++)l<i?a=a.replace(Ms.token,r[l]):l<i+n?a=a.replace(Os.token,I.transform(r[l])):a=a.replace(Ds.token,It(r[l]));return a}}const Ra=t=>typeof t=="number"?0:t;function Ba(t){const e=js(t);return Ls(t)(e.map(Ra))}const ct={test:La,parse:js,createTransformer:Ls,getAnimatableNone:Ba},Rs=(t,e)=>n=>`${n>0?e:t}`;function Bs(t,e){return typeof t=="number"?n=>O(t,e,n):I.test(t)?Es(t,e):t.startsWith("var(")?Rs(t,e):Is(t,e)}const Ns=(t,e)=>{const n=[...t],i=n.length,s=t.map((o,r)=>Bs(o,e[r]));return o=>{for(let r=0;r<i;r++)n[r]=s[r](o);return n}},Na=(t,e)=>{const n={...t,...e},i={};for(const s in n)t[s]!==void 0&&e[s]!==void 0&&(i[s]=Bs(t[s],e[s]));return s=>{for(const o in i)n[o]=i[o](s);return n}},Is=(t,e)=>{const n=ct.createTransformer(e),i=ue(t),s=ue(e);return i.numVars===s.numVars&&i.numColors===s.numColors&&i.numNumbers>=s.numNumbers?ot(Ns(i.values,s.values),n):(qt(!0,`Complex values '${t}' and '${e}' 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.`),Rs(t,e))},Ut=(t,e,n)=>{const i=e-t;return i===0?1:(n-t)/i},Wn=(t,e)=>n=>O(t,e,n);function Ia(t){return typeof t=="number"?Wn:typeof t=="string"?I.test(t)?Es:Is:Array.isArray(t)?Ns:typeof t=="object"?Na:Wn}function Fa(t,e,n){const i=[],s=n||Ia(t[0]),o=t.length-1;for(let r=0;r<o;r++){let a=s(t[r],t[r+1]);if(e){const l=Array.isArray(e)?e[r]||D:e;a=ot(l,a)}i.push(a)}return i}function Fs(t,e,{clamp:n=!0,ease:i,mixer:s}={}){const o=t.length;if(Y(o===e.length,"Both input and output ranges must be the same length"),o===1)return()=>e[0];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=Fa(e,i,s),a=r.length,l=c=>{let u=0;if(a>1)for(;u<t.length-2&&!(c<t[u+1]);u++);const h=Ut(t[u],t[u+1],c);return r[u](h)};return n?c=>l(lt(t[0],t[o-1],c)):l}function za(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=Ut(0,e,i);t.push(O(n,1,s))}}function Wa(t){const e=[0];return za(e,t.length-1),e}function _a(t,e){return t.map(n=>n*e)}function Ua(t,e){return t.map(()=>e||Ts).splice(0,t.length-1)}function he({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=Pa(i)?i.map(Fn):Fn(i),o={done:!1,value:e[0]},r=_a(n&&n.length===e.length?n:Wa(e),t),a=Fs(r,e,{ease:Array.isArray(s)?s:Ua(e,s)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}function zs(t,e){return e?t*(1e3/e):0}const Ha=5;function Ws(t,e,n){const i=Math.max(e-Ha,0);return zs(n-t(i),e-i)}const De=.001,Ga=.01,_n=10,Ya=.05,qa=1;function Xa({duration:t=800,bounce:e=.25,velocity:n=0,mass:i=1}){let s,o;qt(t<=at(_n),"Spring duration must be 10 seconds or less");let r=1-e;r=lt(Ya,qa,r),t=lt(Ga,_n,Z(t)),r<1?(s=c=>{const u=c*r,h=u*t,d=u-n,f=ze(c,r),p=Math.exp(-h);return De-d/f*p},o=c=>{const h=c*r*t,d=h*n+n,f=Math.pow(r,2)*Math.pow(c,2)*t,p=Math.exp(-h),m=ze(Math.pow(c,2),r);return(-s(c)+De>0?-1:1)*((d-f)*p)/m}):(s=c=>{const u=Math.exp(-c*t),h=(c-n)*t+1;return-De+u*h},o=c=>{const u=Math.exp(-c*t),h=(n-c)*(t*t);return u*h});const a=5/t,l=$a(s,o,a);if(t=at(t),isNaN(l))return{stiffness:100,damping:10,duration:t};{const c=Math.pow(l,2)*i;return{stiffness:c,damping:r*2*Math.sqrt(i*c),duration:t}}}const Ka=12;function $a(t,e,n){let i=n;for(let s=1;s<Ka;s++)i=i-t(i)/e(i);return i}function ze(t,e){return t*Math.sqrt(1-e*e)}const Qa=["duration","bounce"],Za=["stiffness","damping","mass"];function Un(t,e){return e.some(n=>t[n]!==void 0)}function Ja(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Un(t,Za)&&Un(t,Qa)){const n=Xa(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}function _s({keyframes:t,restDelta:e,restSpeed:n,...i}){const s=t[0],o=t[t.length-1],r={done:!1,value:s},{stiffness:a,damping:l,mass:c,duration:u,velocity:h,isResolvedFromDuration:d}=Ja({...i,velocity:-Z(i.velocity||0)}),f=h||0,p=l/(2*Math.sqrt(a*c)),m=o-s,b=Z(Math.sqrt(a/c)),x=Math.abs(m)<5;n||(n=x?.01:2),e||(e=x?.005:.5);let v;if(p<1){const g=ze(b,p);v=w=>{const P=Math.exp(-p*b*w);return o-P*((f+p*b*m)/g*Math.sin(g*w)+m*Math.cos(g*w))}}else if(p===1)v=g=>o-Math.exp(-b*g)*(m+(f+b*m)*g);else{const g=b*Math.sqrt(p*p-1);v=w=>{const P=Math.exp(-p*b*w),S=Math.min(g*w,300);return o-P*((f+p*b*m)*Math.sinh(S)+g*m*Math.cosh(S))/g}}return{calculatedDuration:d&&u||null,next:g=>{const w=v(g);if(d)r.done=g>=u;else{let P=f;g!==0&&(p<1?P=Ws(v,g,w):P=0);const S=Math.abs(P)<=n,k=Math.abs(o-w)<=e;r.done=S&&k}return r.value=r.done?o:w,r}}}function Hn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],d={done:!1,value:h},f=C=>a!==void 0&&C<a||l!==void 0&&C>l,p=C=>a===void 0?l:l===void 0||Math.abs(a-C)<Math.abs(l-C)?a:l;let m=n*e;const b=h+m,x=r===void 0?b:r(b);x!==b&&(m=x-h);const v=C=>-m*Math.exp(-C/i),g=C=>x+v(C),w=C=>{const V=v(C),X=g(C);d.done=Math.abs(V)<=c,d.value=d.done?x:X};let P,S;const k=C=>{f(d.value)&&(P=C,S=_s({keyframes:[d.value,p(d.value)],velocity:Ws(g,C,d.value),damping:s,stiffness:o,restDelta:c,restSpeed:u}))};return k(0),{calculatedDuration:null,next:C=>{let V=!1;return!S&&P===void 0&&(V=!0,w(C),k(C)),P!==void 0&&C>P?S.next(C-P):(!V&&w(C),d)}}}const tl=t=>{const e=({timestamp:n})=>t(n);return{start:()=>E.update(e,!0),stop:()=>J(e),now:()=>B.isProcessing?B.timestamp:performance.now()}},Gn=2e4;function Yn(t){let e=0;const n=50;let i=t.next(e);for(;!i.done&&e<Gn;)e+=n,i=t.next(e);return e>=Gn?1/0:e}const el={decay:Hn,inertia:Hn,tween:he,keyframes:he,spring:_s};function de({autoplay:t=!0,delay:e=0,driver:n=tl,keyframes:i,type:s="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:a="loop",onPlay:l,onStop:c,onComplete:u,onUpdate:h,...d}){let f=1,p=!1,m,b;const x=()=>{b=new Promise(M=>{m=M})};x();let v;const g=el[s]||he;let w;g!==he&&typeof i[0]!="number"&&(process.env.NODE_ENV!=="production"&&Y(i.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${i}`),w=Fs([0,100],i,{clamp:!1}),i=[0,100]);const P=g({...d,keyframes:i});let S;a==="mirror"&&(S=g({...d,keyframes:[...i].reverse(),velocity:-(d.velocity||0)}));let k="idle",C=null,V=null,X=null;P.calculatedDuration===null&&o&&(P.calculatedDuration=Yn(P));const{calculatedDuration:bt}=P;let G=1/0,K=1/0;bt!==null&&(G=bt+r,K=G*(o+1)-r);let N=0;const xt=M=>{if(V===null)return;f>0&&(V=Math.min(V,M)),f<0&&(V=Math.min(M-K/f,V)),C!==null?N=C:N=Math.round(M-V)*f;const Ot=N-e*(f>=0?1:-1),xn=f>=0?Ot<0:Ot>K;N=Math.max(Ot,0),k==="finished"&&C===null&&(N=K);let wn=N,Sn=P;if(o){const Se=Math.min(N,K)/G;let Kt=Math.floor(Se),dt=Se%1;!dt&&Se>=1&&(dt=1),dt===1&&Kt--,Kt=Math.min(Kt,o+1),!!(Kt%2)&&(a==="reverse"?(dt=1-dt,r&&(dt-=r/G)):a==="mirror"&&(Sn=S)),wn=lt(0,1,dt)*G}const Dt=xn?{done:!1,value:i[0]}:Sn.next(wn);w&&(Dt.value=w(Dt.value));let{done:Tn}=Dt;!xn&&bt!==null&&(Tn=f>=0?N>=K:N<=0);const vr=C===null&&(k==="finished"||k==="running"&&Tn);return h&&h(Dt.value),vr&&Mt(),Dt},R=()=>{v&&v.stop(),v=void 0},tt=()=>{k="idle",R(),m(),x(),V=X=null},Mt=()=>{k="finished",u&&u(),R(),m()},wt=()=>{if(p)return;v||(v=n(xt));const M=v.now();l&&l(),C!==null?V=M-C:(!V||k==="finished")&&(V=M),k==="finished"&&x(),X=V,C=null,k="running",v.start()};t&&wt();const bn={then(M,Ot){return b.then(M,Ot)},get time(){return Z(N)},set time(M){M=at(M),N=M,C!==null||!v||f===0?C=M:V=v.now()-M/f},get duration(){const M=P.calculatedDuration===null?Yn(P):P.calculatedDuration;return Z(M)},get speed(){return f},set speed(M){M===f||!v||(f=M,bn.time=Z(N))},get state(){return k},play:wt,pause:()=>{k="paused",C=N},stop:()=>{p=!0,k!=="idle"&&(k="idle",c&&c(),tt())},cancel:()=>{X!==null&&xt(X),tt()},complete:()=>{k="finished"},sample:M=>(V=0,xt(M))};return bn}function nl(t){let e;return()=>(e===void 0&&(e=t()),e)}const il=nl(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),sl=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Jt=10,rl=2e4,ol=(t,e)=>e.type==="spring"||t==="backgroundColor"||!bs(e.ease);function al(t,e,{onUpdate:n,onComplete:i,...s}){if(!(il()&&sl.has(e)&&!s.repeatDelay&&s.repeatType!=="mirror"&&s.damping!==0&&s.type!=="inertia"))return!1;let r=!1,a,l,c=!1;const u=()=>{l=new Promise(g=>{a=g})};u();let{keyframes:h,duration:d=300,ease:f,times:p}=s;if(ol(e,s)){const g=de({...s,repeat:0,delay:0});let w={done:!1,value:h[0]};const P=[];let S=0;for(;!w.done&&S<rl;)w=g.sample(S),P.push(w.value),S+=Jt;p=void 0,h=P,d=S-Jt,f="linear"}const m=ya(t.owner.current,e,h,{...s,duration:d,ease:f,times:p}),b=()=>{c=!1,m.cancel()},x=()=>{c=!0,E.update(b),a(),u()};return m.onfinish=()=>{c||(t.set(ba(h,s)),i&&i(),x())},{then(g,w){return l.then(g,w)},attachTimeline(g){return m.timeline=g,m.onfinish=null,D},get time(){return Z(m.currentTime||0)},set time(g){m.currentTime=at(g)},get speed(){return m.playbackRate},set speed(g){m.playbackRate=g},get duration(){return Z(d)},play:()=>{r||(m.play(),J(b))},pause:()=>m.pause(),stop:()=>{if(r=!0,m.playState==="idle")return;const{currentTime:g}=m;if(g){const w=de({...s,autoplay:!1});t.setWithVelocity(w.sample(g-Jt).value,w.sample(g).value,Jt)}x()},complete:()=>{c||m.finish()},cancel:x}}function ll({keyframes:t,delay:e,onUpdate:n,onComplete:i}){const s=()=>(n&&n(t[t.length-1]),i&&i(),{time:0,speed:1,duration:0,play:D,pause:D,stop:D,then:o=>(o(),Promise.resolve()),cancel:D,complete:D});return e?de({keyframes:[0,1],duration:0,delay:e,onComplete:s}):s()}const cl={type:"spring",stiffness:500,damping:25,restSpeed:10},ul=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),hl={type:"keyframes",duration:.8},dl={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},fl=(t,{keyframes:e})=>e.length>2?hl:vt.has(t)?t.startsWith("scale")?ul(e[1]):cl:dl,We=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ct.test(e)||e==="0")&&!e.startsWith("url(")),pl=new Set(["brightness","contrast","saturate","opacity"]);function ml(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[i]=n.match(be)||[];if(!i)return t;const s=n.replace(i,"");let o=pl.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const gl=/([a-z-]*)\(.*?\)/g,_e={...ct,getAnimatableNone:t=>{const e=t.match(gl);return e?e.map(ml).join(" "):t}},vl={...is,color:I,backgroundColor:I,outlineColor:I,fill:I,stroke:I,borderColor:I,borderTopColor:I,borderRightColor:I,borderBottomColor:I,borderLeftColor:I,filter:_e,WebkitFilter:_e},dn=t=>vl[t];function Us(t,e){let n=dn(t);return n!==_e&&(n=ct),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Hs=t=>/^0[^.\s]+$/.test(t);function yl(t){if(typeof t=="number")return t===0;if(t!==null)return t==="none"||t==="0"||Hs(t)}function bl(t,e,n,i){const s=We(e,n);let o;Array.isArray(n)?o=[...n]:o=[null,n];const r=i.from!==void 0?i.from:t.get();let a;const l=[];for(let c=0;c<o.length;c++)o[c]===null&&(o[c]=c===0?r:o[c-1]),yl(o[c])&&l.push(c),typeof o[c]=="string"&&o[c]!=="none"&&o[c]!=="0"&&(a=o[c]);if(s&&l.length&&a)for(let c=0;c<l.length;c++){const u=l[c];o[u]=Us(e,a)}return o}function xl({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function fn(t,e){return t[e]||t.default||t}const wl={skipAnimations:!1},pn=(t,e,n,i={})=>s=>{const o=fn(i,t)||{},r=o.delay||i.delay||0;let{elapsed:a=0}=i;a=a-at(r);const l=bl(e,t,n,o),c=l[0],u=l[l.length-1],h=We(t,c),d=We(t,u);qt(h===d,`You are trying to animate ${t} from "${c}" to "${u}". ${c} is not an animatable value - to enable this animation set ${c} to a value animatable to ${u} via the \`style\` property.`);let f={keyframes:l,velocity:e.getVelocity(),ease:"easeOut",...o,delay:-a,onUpdate:p=>{e.set(p),o.onUpdate&&o.onUpdate(p)},onComplete:()=>{s(),o.onComplete&&o.onComplete()}};if(xl(o)||(f={...f,...fl(t,f)}),f.duration&&(f.duration=at(f.duration)),f.repeatDelay&&(f.repeatDelay=at(f.repeatDelay)),!h||!d||va.current||o.type===!1||wl.skipAnimations)return ll(f);if(!i.isHandoff&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const p=al(e,t,f);if(p)return p}return de(f)};function fe(t){return!!(z(t)&&t.add)}const Gs=t=>/^\-?\d*\.?\d+$/.test(t);function mn(t,e){t.indexOf(e)===-1&&t.push(e)}function gn(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class vn{constructor(){this.subscriptions=[]}add(e){return mn(this.subscriptions,e),()=>gn(this.subscriptions,e)}notify(e,n,i){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,n,i);else for(let o=0;o<s;o++){const r=this.subscriptions[o];r&&r(e,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const qn=new Set;function yn(t,e,n){t||qn.has(e)||(console.warn(e),n&&console.warn(n),qn.add(e))}const Sl=t=>!isNaN(parseFloat(t));class Tl{constructor(e,n={}){this.version="10.18.0",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(i,s=!0)=>{this.prev=this.current,this.current=i;const{delta:o,timestamp:r}=B;this.lastUpdated!==r&&(this.timeDelta=o,this.lastUpdated=r,E.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>E.postRender(this.velocityCheck),this.velocityCheck=({timestamp:i})=>{i!==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=Sl(this.current),this.owner=n.owner}onChange(e){return process.env.NODE_ENV!=="production"&&yn(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new vn);const i=this.events[e].add(n);return e==="change"?()=>{i(),E.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,i){this.set(n),this.prev=e,this.timeDelta=i}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?zs(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Vt(t,e){return new Tl(t,e)}const Ys=t=>e=>e.test(t),Al={test:t=>t==="auto",parse:t=>t},qs=[yt,A,q,st,Do,Oo,Al],Lt=t=>qs.find(Ys(t)),Pl=[...qs,I,ct],Cl=t=>Pl.find(Ys(t));function kl(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Vt(n))}function Vl(t,e){const n=we(t,e);let{transitionEnd:i={},transition:s={},...o}=n?t.makeTargetAnimatable(n,!1):{};o={...o,...i};for(const r in o){const a=qo(o[r]);kl(t,r,a)}}function El(t,e,n){var i,s;const o=Object.keys(e).filter(a=>!t.hasValue(a)),r=o.length;if(r)for(let a=0;a<r;a++){const l=o[a],c=e[l];let u=null;Array.isArray(c)&&(u=c[0]),u===null&&(u=(s=(i=n[l])!==null&&i!==void 0?i:t.readValue(l))!==null&&s!==void 0?s:e[l]),u!=null&&(typeof u=="string"&&(Gs(u)||Hs(u))?u=parseFloat(u):!Cl(u)&&ct.test(c)&&(u=Us(l,c)),t.addValue(l,Vt(u,{owner:t})),n[l]===void 0&&(n[l]=u),u!==null&&t.setBaseTarget(l,u))}}function Ml(t,e){return e?(e[t]||e.default||e).from:void 0}function Ol(t,e,n){const i={};for(const s in t){const o=Ml(s,e);if(o!==void 0)i[s]=o;else{const r=n.getValue(s);r&&(i[s]=r.get())}}return i}function Dl({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,i}function jl(t,e){const n=t.get();if(Array.isArray(e)){for(let i=0;i<e.length;i++)if(e[i]!==n)return!0}else return n!==e}function Xs(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=t.makeTargetAnimatable(e);const l=t.getValue("willChange");i&&(o=i);const c=[],u=s&&t.animationState&&t.animationState.getState()[s];for(const h in a){const d=t.getValue(h),f=a[h];if(!d||f===void 0||u&&Dl(u,h))continue;const p={delay:n,elapsed:0,...fn(o||{},h)};if(window.HandoffAppearAnimations){const x=t.getProps()[Ki];if(x){const v=window.HandoffAppearAnimations(x,h,d,E);v!==null&&(p.elapsed=v,p.isHandoff=!0)}}let m=!p.isHandoff&&!jl(d,f);if(p.type==="spring"&&(d.getVelocity()||p.velocity)&&(m=!1),d.animation&&(m=!1),m)continue;d.start(pn(h,d,f,t.shouldReduceMotion&&vt.has(h)?{type:!1}:p));const b=d.animation;fe(l)&&(l.add(h),b.then(()=>l.remove(h))),c.push(b)}return r&&Promise.all(c).then(()=>{r&&Vl(t,r)}),c}function Ue(t,e,n={}){const i=we(t,e,n.custom);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(Xs(t,i,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:h}=s;return Ll(t,e,c+l,u,h,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[l,c]=a==="beforeChildren"?[o,r]:[r,o];return l().then(()=>c())}else return Promise.all([o(),r(n.delay)])}function Ll(t,e,n=0,i=0,s=1,o){const r=[],a=(t.variantChildren.size-1)*i,l=s===1?(c=0)=>c*i:(c=0)=>a-c*i;return Array.from(t.variantChildren).sort(Rl).forEach((c,u)=>{c.notify("AnimationStart",e),r.push(Ue(c,e,{...o,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(r)}function Rl(t,e){return t.sortNodePosition(e)}function Bl(t,e,n={}){t.notify("AnimationStart",e);let i;if(Array.isArray(e)){const s=e.map(o=>Ue(t,o,n));i=Promise.all(s)}else if(typeof e=="string")i=Ue(t,e,n);else{const s=typeof e=="function"?we(t,e,n.custom):e;i=Promise.all(Xs(t,s,n))}return i.then(()=>t.notify("AnimationComplete",e))}const Nl=[...Je].reverse(),Il=Je.length;function Fl(t){return e=>Promise.all(e.map(({animation:n,options:i})=>Bl(t,n,i)))}function zl(t){let e=Fl(t);const n=_l();let i=!0;const s=(l,c)=>{const u=we(t,c);if(u){const{transition:h,transitionEnd:d,...f}=u;l={...l,...f,...d}}return l};function o(l){e=l(t)}function r(l,c){const u=t.getProps(),h=t.getVariantContext(!0)||{},d=[],f=new Set;let p={},m=1/0;for(let x=0;x<Il;x++){const v=Nl[x],g=n[v],w=u[v]!==void 0?u[v]:h[v],P=Wt(w),S=v===c?g.isActive:null;S===!1&&(m=x);let k=w===h[v]&&w!==u[v]&&P;if(k&&i&&t.manuallyAnimateOnMount&&(k=!1),g.protectedKeys={...p},!g.isActive&&S===null||!w&&!g.prevProp||ve(w)||typeof w=="boolean")continue;let V=Wl(g.prevProp,w)||v===c&&g.isActive&&!k&&P||x>m&&P,X=!1;const bt=Array.isArray(w)?w:[w];let G=bt.reduce(s,{});S===!1&&(G={});const{prevResolvedValues:K={}}=g,N={...K,...G},xt=R=>{V=!0,f.has(R)&&(X=!0,f.delete(R)),g.needsAnimating[R]=!0};for(const R in N){const tt=G[R],Mt=K[R];if(p.hasOwnProperty(R))continue;let wt=!1;ce(tt)&&ce(Mt)?wt=!vs(tt,Mt):wt=tt!==Mt,wt?tt!==void 0?xt(R):f.add(R):tt!==void 0&&f.has(R)?xt(R):g.protectedKeys[R]=!0}g.prevProp=w,g.prevResolvedValues=G,g.isActive&&(p={...p,...G}),i&&t.blockInitialAnimation&&(V=!1),V&&(!k||X)&&d.push(...bt.map(R=>({animation:R,options:{type:v,...l}})))}if(f.size){const x={};f.forEach(v=>{const g=t.getBaseTarget(v);g!==void 0&&(x[v]=g)}),d.push({animation:x})}let b=!!d.length;return i&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(b=!1),i=!1,b?e(d):Promise.resolve()}function a(l,c,u){var h;if(n[l].isActive===c)return Promise.resolve();(h=t.variantChildren)===null||h===void 0||h.forEach(f=>{var p;return(p=f.animationState)===null||p===void 0?void 0:p.setActive(l,c)}),n[l].isActive=c;const d=r(u,l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n}}function Wl(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!vs(e,t):!1}function ft(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function _l(){return{animate:ft(!0),whileInView:ft(),whileHover:ft(),whileTap:ft(),whileDrag:ft(),whileFocus:ft(),exit:ft()}}class Ul extends ht{constructor(e){super(e),e.animationState||(e.animationState=zl(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),ve(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let Hl=0;class Gl extends ht{constructor(){super(...arguments),this.id=Hl++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n,custom:i}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const o=this.node.animationState.setActive("exit",!e,{custom:i??this.node.getProps().custom});n&&!e&&o.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const Yl={animation:{Feature:Ul},exit:{Feature:Gl}},Xn=(t,e)=>Math.abs(t-e);function ql(t,e){const n=Xn(t.x,e.x),i=Xn(t.y,e.y);return Math.sqrt(n**2+i**2)}class Ks{constructor(e,n,{transformPagePoint:i,contextWindow:s,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=Le(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,f=ql(h.offset,{x:0,y:0})>=3;if(!d&&!f)return;const{point:p}=h,{timestamp:m}=B;this.history.push({...p,timestamp:m});const{onStart:b,onMove:x}=this.handlers;d||(b&&b(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,h)},this.handlePointerMove=(h,d)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=je(d,this.transformPagePoint),E.update(this.updatePoint,!0)},this.handlePointerUp=(h,d)=>{this.end();const{onEnd:f,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Le(h.type==="pointercancel"?this.lastMoveEventInfo:je(d,this.transformPagePoint),this.history);this.startEvent&&f&&f(h,b),p&&p(h,b)},!ds(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=i,this.contextWindow=s||window;const r=xe(e),a=je(r,this.transformPagePoint),{point:l}=a,{timestamp:c}=B;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(e,Le(a,this.history)),this.removeListeners=ot(Q(this.contextWindow,"pointermove",this.handlePointerMove),Q(this.contextWindow,"pointerup",this.handlePointerUp),Q(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),J(this.updatePoint)}}function je(t,e){return e?{point:e(t.point)}:t}function Kn(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Le({point:t},e){return{point:t,delta:Kn(t,$s(e)),offset:Kn(t,Xl(e)),velocity:Kl(e,.1)}}function Xl(t){return t[0]}function $s(t){return t[t.length-1]}function Kl(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=$s(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>at(e)));)n--;if(!i)return{x:0,y:0};const o=Z(s.timestamp-i.timestamp);if(o===0)return{x:0,y:0};const r={x:(s.x-i.x)/o,y:(s.y-i.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function _(t){return t.max-t.min}function He(t,e=0,n=.01){return Math.abs(t-e)<=n}function $n(t,e,n,i=.5){t.origin=i,t.originPoint=O(e.min,e.max,t.origin),t.scale=_(n)/_(e),(He(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=O(n.min,n.max,t.origin)-t.originPoint,(He(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Ft(t,e,n,i){$n(t.x,e.x,n.x,i?i.originX:void 0),$n(t.y,e.y,n.y,i?i.originY:void 0)}function Qn(t,e,n){t.min=n.min+e.min,t.max=t.min+_(e)}function $l(t,e,n){Qn(t.x,e.x,n.x),Qn(t.y,e.y,n.y)}function Zn(t,e,n){t.min=e.min-n.min,t.max=t.min+_(e)}function zt(t,e,n){Zn(t.x,e.x,n.x),Zn(t.y,e.y,n.y)}function Ql(t,{min:e,max:n},i){return e!==void 0&&t<e?t=i?O(e,t,i.min):Math.max(t,e):n!==void 0&&t>n&&(t=i?O(n,t,i.max):Math.min(t,n)),t}function Jn(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function Zl(t,{top:e,left:n,bottom:i,right:s}){return{x:Jn(t.x,n,s),y:Jn(t.y,e,i)}}function ti(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}function Jl(t,e){return{x:ti(t.x,e.x),y:ti(t.y,e.y)}}function tc(t,e){let n=.5;const i=_(t),s=_(e);return s>i?n=Ut(e.min,e.max-i,t.min):i>s&&(n=Ut(t.min,t.max-s,e.min)),lt(0,1,n)}function ec(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Ge=.35;function nc(t=Ge){return t===!1?t=0:t===!0&&(t=Ge),{x:ei(t,"left","right"),y:ei(t,"top","bottom")}}function ei(t,e,n){return{min:ni(t,e),max:ni(t,n)}}function ni(t,e){return typeof t=="number"?t:t[e]||0}const ii=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ct=()=>({x:ii(),y:ii()}),si=()=>({min:0,max:0}),L=()=>({x:si(),y:si()});function H(t){return[t("x"),t("y")]}function Qs({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function ic({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function sc(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function Re(t){return t===void 0||t===1}function Ye({scale:t,scaleX:e,scaleY:n}){return!Re(t)||!Re(e)||!Re(n)}function pt(t){return Ye(t)||Zs(t)||t.z||t.rotate||t.rotateX||t.rotateY}function Zs(t){return ri(t.x)||ri(t.y)}function ri(t){return t&&t!=="0%"}function pe(t,e,n){const i=t-n,s=e*i;return n+s}function oi(t,e,n,i,s){return s!==void 0&&(t=pe(t,s,i)),pe(t,n,i)+e}function qe(t,e=0,n=1,i,s){t.min=oi(t.min,e,n,i,s),t.max=oi(t.max,e,n,i,s)}function Js(t,{x:e,y:n}){qe(t.x,e.translate,e.scale,e.originPoint),qe(t.y,n.translate,n.scale,n.originPoint)}function rc(t,e,n,i=!1){const s=n.length;if(!s)return;e.x=e.y=1;let o,r;for(let a=0;a<s;a++){o=n[a],r=o.projectionDelta;const l=o.instance;l&&l.style&&l.style.display==="contents"||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&kt(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Js(t,r)),i&&pt(o.latestValues)&&kt(t,o.latestValues))}e.x=ai(e.x),e.y=ai(e.y)}function ai(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function rt(t,e){t.min=t.min+e,t.max=t.max+e}function li(t,e,[n,i,s]){const o=e[s]!==void 0?e[s]:.5,r=O(t.min,t.max,o);qe(t,e[n],e[i],r,e.scale)}const oc=["x","scaleX","originX"],ac=["y","scaleY","originY"];function kt(t,e){li(t.x,e,oc),li(t.y,e,ac)}function tr(t,e){return Qs(sc(t.getBoundingClientRect(),e))}function lc(t,e,n){const i=tr(t,n),{scroll:s}=e;return s&&(rt(i.x,s.offset.x),rt(i.y,s.offset.y)),i}const er=({current:t})=>t?t.ownerDocument.defaultView:null,cc=new WeakMap;class uc{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=L(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const s=u=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(xe(u,"page").point)},o=(u,h)=>{const{drag:d,dragPropagation:f,onDragStart:p}=this.getProps();if(d&&!f&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=ps(d),!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),H(b=>{let x=this.getAxisMotionValue(b).get()||0;if(q.test(x)){const{projection:v}=this.visualElement;if(v&&v.layout){const g=v.layout.layoutBox[b];g&&(x=_(g)*(parseFloat(x)/100))}}this.originPoint[b]=x}),p&&E.update(()=>p(u,h),!1,!0);const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},r=(u,h)=>{const{dragPropagation:d,dragDirectionLock:f,onDirectionLock:p,onDrag:m}=this.getProps();if(!d&&!this.openGlobalLock)return;const{offset:b}=h;if(f&&this.currentDirection===null){this.currentDirection=hc(b),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",h.point,b),this.updateAxis("y",h.point,b),this.visualElement.render(),m&&m(u,h)},a=(u,h)=>this.stop(u,h),l=()=>H(u=>{var h;return this.getAnimationState(u)==="paused"&&((h=this.getAxisMotionValue(u).animation)===null||h===void 0?void 0:h.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Ks(e,{onSessionStart:s,onStart:o,onMove:r,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:er(this.visualElement)})}stop(e,n){const i=this.isDragging;if(this.cancel(),!i)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:o}=this.getProps();o&&E.update(()=>o(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,i){const{drag:s}=this.getProps();if(!i||!te(e,s,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(r=Ql(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:i}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,o=this.constraints;n&&At(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&s?this.constraints=Zl(s.layoutBox,n):this.constraints=!1,this.elastic=nc(i),o!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&H(r=>{this.getAxisMotionValue(r)&&(this.constraints[r]=ec(s.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!At(e))return!1;const i=e.current;Y(i!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const o=lc(i,s.root,this.visualElement.getTransformPagePoint());let r=Jl(s.layout.layoutBox,o);if(n){const a=n(ic(r));this.hasMutatedConstraints=!!a,a&&(r=Qs(a))}return r}startAnimation(e){const{drag:n,dragMomentum:i,dragElastic:s,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=H(u=>{if(!te(u,n,this.currentDirection))return;let h=l&&l[u]||{};r&&(h={min:0,max:0});const d=s?200:1e6,f=s?40:1e7,p={type:"inertia",velocity:i?e[u]:0,bounceStiffness:d,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const i=this.getAxisMotionValue(e);return i.start(pn(e,i,0,n))}stopAnimation(){H(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){H(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n="_drag"+e.toUpperCase(),i=this.visualElement.getProps(),s=i[n];return s||this.visualElement.getValue(e,(i.initial?i.initial[e]:void 0)||0)}snapToCursor(e){H(n=>{const{drag:i}=this.getProps();if(!te(n,i,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(n);if(s&&s.layout){const{min:r,max:a}=s.layout.layoutBox[n];o.set(e[n]-O(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!At(n)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};H(r=>{const a=this.getAxisMotionValue(r);if(a){const l=a.get();s[r]=tc({min:l,max:l},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),H(r=>{if(!te(r,e,null))return;const a=this.getAxisMotionValue(r),{min:l,max:c}=this.constraints[r];a.set(O(l,c,s[r]))})}addListeners(){if(!this.visualElement.current)return;cc.set(this.visualElement,this);const e=this.visualElement.current,n=Q(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),i=()=>{const{dragConstraints:l}=this.getProps();At(l)&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),i();const r=$(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(H(u=>{const h=this.getAxisMotionValue(u);h&&(this.originPoint[u]+=l[u].translate,h.set(h.get()+l[u].translate))}),this.visualElement.render())});return()=>{r(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:s=!1,dragConstraints:o=!1,dragElastic:r=Ge,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:i,dragPropagation:s,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function te(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function hc(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class dc extends ht{constructor(e){super(e),this.removeGroupControls=D,this.removeListeners=D,this.controls=new uc(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||D}unmount(){this.removeGroupControls(),this.removeListeners()}}const ci=t=>(e,n)=>{t&&E.update(()=>t(e,n))};class fc extends ht{constructor(){super(...arguments),this.removePointerDownListener=D}onPointerDown(e){this.session=new Ks(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:er(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:i,onPanEnd:s}=this.node.getProps();return{onSessionStart:ci(e),onStart:ci(n),onMove:i,onEnd:(o,r)=>{delete this.session,s&&E.update(()=>s(o,r))}}}mount(){this.removePointerDownListener=Q(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function pc(){const t=T.useContext(Qe);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:i}=t,s=T.useId();return T.useEffect(()=>i(s),[]),!e&&n?[!1,()=>n&&n(s)]:[!0]}const se={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function ui(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Rt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(A.test(t))t=parseFloat(t);else return t;const n=ui(t,e.target.x),i=ui(t,e.target.y);return`${n}% ${i}%`}},mc={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=ct.parse(t);if(s.length>5)return i;const o=ct.createTransformer(t),r=typeof s[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=l;const c=O(a,l,.5);return typeof s[2+r]=="number"&&(s[2+r]/=c),typeof s[3+r]=="number"&&(s[3+r]/=c),o(s)}};class gc extends T.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:i,layoutId:s}=this.props,{projection:o}=e;Ao(vc),o&&(n.group&&n.group.add(o),i&&i.register&&s&&i.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),se.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:i,drag:s,isPresent:o}=this.props,r=i.projection;return r&&(r.isPresent=o,s||e.layoutDependency!==n||n===void 0?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||E.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),queueMicrotask(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:s}=e;s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),i&&i.deregister&&i.deregister(s))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function nr(t){const[e,n]=pc(),i=T.useContext(Qi);return T.createElement(gc,{...t,layoutGroup:i,switchLayoutGroup:T.useContext(Zi),isPresent:e,safeToRemove:n})}const vc={borderRadius:{...Rt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Rt,borderTopRightRadius:Rt,borderBottomLeftRadius:Rt,borderBottomRightRadius:Rt,boxShadow:mc},ir=["TopLeft","TopRight","BottomLeft","BottomRight"],yc=ir.length,hi=t=>typeof t=="string"?parseFloat(t):t,di=t=>typeof t=="number"||A.test(t);function bc(t,e,n,i,s,o){s?(t.opacity=O(0,n.opacity!==void 0?n.opacity:1,xc(i)),t.opacityExit=O(e.opacity!==void 0?e.opacity:1,0,wc(i))):o&&(t.opacity=O(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,i));for(let r=0;r<yc;r++){const a=`border${ir[r]}Radius`;let l=fi(e,a),c=fi(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||di(l)===di(c)?(t[a]=Math.max(O(hi(l),hi(c),i),0),(q.test(c)||q.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=O(e.rotate||0,n.rotate||0,i))}function fi(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const xc=sr(0,.5,Cs),wc=sr(.5,.95,D);function sr(t,e,n){return i=>i<t?0:i>e?1:n(Ut(t,e,i))}function pi(t,e){t.min=e.min,t.max=e.max}function U(t,e){pi(t.x,e.x),pi(t.y,e.y)}function mi(t,e,n,i,s){return t-=e,t=pe(t,1/n,i),s!==void 0&&(t=pe(t,1/s,i)),t}function Sc(t,e=0,n=1,i=.5,s,o=t,r=t){if(q.test(e)&&(e=parseFloat(e),e=O(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=O(o.min,o.max,i);t===o&&(a-=e),t.min=mi(t.min,e,n,a,s),t.max=mi(t.max,e,n,a,s)}function gi(t,e,[n,i,s],o,r){Sc(t,e[n],e[i],e[s],e.scale,o,r)}const Tc=["x","scaleX","originX"],Ac=["y","scaleY","originY"];function vi(t,e,n,i){gi(t.x,e,Tc,n?n.x:void 0,i?i.x:void 0),gi(t.y,e,Ac,n?n.y:void 0,i?i.y:void 0)}function yi(t){return t.translate===0&&t.scale===1}function rr(t){return yi(t.x)&&yi(t.y)}function Pc(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function or(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function bi(t){return _(t.x)/_(t.y)}class Cc{constructor(){this.members=[]}add(e){mn(this.members,e),e.scheduleRender()}remove(e){if(gn(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(s=>e===s);if(n===0)return!1;let i;for(let s=n;s>=0;s--){const o=this.members[s];if(o.isPresent!==!1){i=o;break}}return i?(this.promote(i),!0):!1}promote(e,n){const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender(),e.resumeFrom=i,n&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:s}=e.options;s===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:i}=e;n.onExitComplete&&n.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function xi(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y;if((s||o)&&(i=`translate3d(${s}px, ${o}px, 0) `),(e.x!==1||e.y!==1)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:l,rotateX:c,rotateY:u}=n;l&&(i+=`rotate(${l}deg) `),c&&(i+=`rotateX(${c}deg) `),u&&(i+=`rotateY(${u}deg) `)}const r=t.x.scale*e.x,a=t.y.scale*e.y;return(r!==1||a!==1)&&(i+=`scale(${r}, ${a})`),i||"none"}const kc=(t,e)=>t.depth-e.depth;class Vc{constructor(){this.children=[],this.isDirty=!1}add(e){mn(this.children,e),this.isDirty=!0}remove(e){gn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(kc),this.isDirty=!1,this.children.forEach(e)}}function Ec(t,e){const n=performance.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(J(i),t(o-e))};return E.read(i,!0),()=>J(i)}function Mc(t){window.MotionDebug&&window.MotionDebug.record(t)}function Oc(t){return t instanceof SVGElement&&t.tagName!=="svg"}function Dc(t,e,n){const i=z(t)?t:Vt(t);return i.start(pn("",i,e,n)),i.animation}const wi=["","X","Y","Z"],jc={visibility:"hidden"},Si=1e3;let Lc=0;const mt={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function ar({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(r={},a=e==null?void 0:e()){this.id=Lc++,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=()=>{this.projectionUpdateScheduled=!1,mt.totalNodes=mt.resolvedTargetDeltas=mt.recalculatedProjection=0,this.nodes.forEach(Nc),this.nodes.forEach(_c),this.nodes.forEach(Uc),this.nodes.forEach(Ic),Mc(mt)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Vc)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new vn),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const l=this.eventHandlers.get(r);l&&l.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Oc(r),this.instance=r;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),t){let h;const d=()=>this.root.updateBlockedByResize=!1;t(r,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=Ec(d,250),se.hasAnimatedSinceResize&&(se.hasAnimatedSinceResize=!1,this.nodes.forEach(Ai))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:d,hasRelativeTargetChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||Xc,{onLayoutAnimationStart:b,onLayoutAnimationComplete:x}=u.getProps(),v=!this.targetLayout||!or(this.targetLayout,p)||f,g=!d&&f;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,g);const w={...fn(m,"layout"),onPlay:b,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w)}else d||Ai(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,J(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(Hc),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ti);return}this.isUpdating||this.nodes.forEach(zc),this.isUpdating=!1,this.nodes.forEach(Wc),this.nodes.forEach(Rc),this.nodes.forEach(Bc),this.clearAllSnapshots();const a=performance.now();B.delta=lt(0,1e3/60,a-B.timestamp),B.timestamp=a,B.isProcessing=!0,Pe.update.process(B),Pe.preRender.process(B),Pe.render.process(B),B.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(Fc),this.sharedNodes.forEach(Gc)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,E.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){E.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutCorrected=L(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:r,isRoot:i(this.instance),offset:n(this.instance)})}resetTransform(){if(!s)return;const r=this.isLayoutDirty||this.shouldResetTransform,a=this.projectionDelta&&!rr(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;r&&(a||pt(this.latestValues)||u)&&(s(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),Kc(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return L();const a=r.measureViewportBox(),{scroll:l}=this.root;return l&&(rt(a.x,l.offset.x),rt(a.y,l.offset.y)),a}removeElementScroll(r){const a=L();U(a,r);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:h}=c;if(c!==this.root&&u&&h.layoutScroll){if(u.isRoot){U(a,r);const{scroll:d}=this.root;d&&(rt(a.x,-d.offset.x),rt(a.y,-d.offset.y))}rt(a.x,u.offset.x),rt(a.y,u.offset.y)}}return a}applyTransform(r,a=!1){const l=L();U(l,r);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&kt(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),pt(u.latestValues)&&kt(l,u.latestValues)}return pt(this.latestValues)&&kt(l,this.latestValues),l}removeTransform(r){const a=L();U(a,r);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!pt(c.latestValues))continue;Ye(c.latestValues)&&c.updateSnapshot();const u=L(),h=c.measurePageBox();U(u,h),vi(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return pt(this.latestValues)&&vi(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==B.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(r||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:h,layoutId:d}=this.options;if(!(!this.layout||!(h||d))){if(this.resolvedRelativeTargetAt=B.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=L(),this.relativeTargetOrigin=L(),zt(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),U(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=L(),this.targetWithTransforms=L()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),$l(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):U(this.target,this.layout.layoutBox),Js(this.target,this.targetDelta)):U(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=L(),this.relativeTargetOrigin=L(),zt(this.relativeTargetOrigin,this.target,f.target),U(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}mt.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Ye(this.parent.latestValues)||Zs(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var r;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((r=this.parent)===null||r===void 0)&&r.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===B.timestamp&&(c=!1),c)return;const{layout:u,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||h))return;U(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;rc(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox);const{target:p}=a;if(!p){this.projectionTransform&&(this.projectionDelta=Ct(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=Ct(),this.projectionDeltaWithTransform=Ct());const m=this.projectionTransform;Ft(this.projectionDelta,this.layoutCorrected,p,this.latestValues),this.projectionTransform=xi(this.projectionDelta,this.treeScale),(this.projectionTransform!==m||this.treeScale.x!==d||this.treeScale.y!==f)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),mt.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),r){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(r,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},h=Ct();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=L(),f=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=f!==p,b=this.getStack(),x=!b||b.members.length<=1,v=!!(m&&!x&&this.options.crossfade===!0&&!this.path.some(qc));this.animationProgress=0;let g;this.mixTargetDelta=w=>{const P=w/1e3;Pi(h.x,r.x,P),Pi(h.y,r.y,P),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(zt(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Yc(this.relativeTarget,this.relativeTargetOrigin,d,P),g&&Pc(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=L()),U(g,this.relativeTarget)),m&&(this.animationValues=u,bc(u,c,this.latestValues,P,v,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(J(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=E.update(()=>{se.hasAnimatedSinceResize=!0,this.currentAnimation=Dc(0,Si,{...r,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onComplete:()=>{r.onComplete&&r.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 r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Si),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=r;if(!(!a||!l||!c)){if(this!==r&&this.layout&&c&&lr(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||L();const h=_(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+h;const d=_(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+d}U(a,l),kt(a,u),Ft(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Cc),this.sharedNodes.get(r).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){var r;const{layoutId:a}=this.options;return a?((r=this.getStack())===null||r===void 0?void 0:r.lead)||this:this}getPrevLead(){var r;const{layoutId:a}=this.options;return a?(r=this.getStack())===null||r===void 0?void 0:r.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const c={};for(let u=0;u<wi.length;u++){const h="rotate"+wi[u];l[h]&&(c[h]=l[h],r.setStaticValue(h,0))}r.render();for(const u in c)r.setStaticValue(u,c[u]);r.scheduleRender()}getProjectionStyles(r){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return jc;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=ie(r==null?void 0:r.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=ie(r==null?void 0:r.pointerEvents)||""),this.hasProjected&&!pt(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const d=h.animationValues||h.latestValues;this.applyTransformsToTarget(),c.transform=xi(this.projectionDeltaWithTransform,this.treeScale,d),u&&(c.transform=u(d,c.transform));const{x:f,y:p}=this.projectionDelta;c.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,h.animationValues?c.opacity=h===this?(l=(a=d.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:c.opacity=h===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const m in ae){if(d[m]===void 0)continue;const{correct:b,applyTo:x}=ae[m],v=c.transform==="none"?d[m]:b(d[m],h);if(x){const g=x.length;for(let w=0;w<g;w++)c[x[w]]=v}else c[m]=v}return this.options.layoutId&&(c.pointerEvents=h===this?ie(r==null?void 0:r.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>{var a;return(a=r.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Ti),this.root.sharedNodes.clear()}}}function Rc(t){t.updateLayout()}function Bc(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:s}=t.layout,{animationType:o}=t.options,r=n.source!==t.layout.source;o==="size"?H(h=>{const d=r?n.measuredBox[h]:n.layoutBox[h],f=_(d);d.min=i[h].min,d.max=d.min+f}):lr(o,n.layoutBox,i)&&H(h=>{const d=r?n.measuredBox[h]:n.layoutBox[h],f=_(i[h]);d.max=d.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+f)});const a=Ct();Ft(a,i,n.layoutBox);const l=Ct();r?Ft(l,t.applyTransform(s,!0),n.measuredBox):Ft(l,i,n.layoutBox);const c=!rr(a);let u=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:d,layout:f}=h;if(d&&f){const p=L();zt(p,n.layoutBox,d.layoutBox);const m=L();zt(m,i,f.layoutBox),or(p,m)||(u=!0),h.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=p,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:i}=t.options;i&&i()}t.options.transition=void 0}function Nc(t){mt.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Ic(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Fc(t){t.clearSnapshot()}function Ti(t){t.clearMeasurements()}function zc(t){t.isLayoutDirty=!1}function Wc(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ai(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function _c(t){t.resolveTargetDelta()}function Uc(t){t.calcProjection()}function Hc(t){t.resetRotation()}function Gc(t){t.removeLeadSnapshot()}function Pi(t,e,n){t.translate=O(e.translate,0,n),t.scale=O(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Ci(t,e,n,i){t.min=O(e.min,n.min,i),t.max=O(e.max,n.max,i)}function Yc(t,e,n,i){Ci(t.x,e.x,n.x,i),Ci(t.y,e.y,n.y,i)}function qc(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Xc={duration:.45,ease:[.4,0,.1,1]},ki=t=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(t),Vi=ki("applewebkit/")&&!ki("chrome/")?Math.round:D;function Ei(t){t.min=Vi(t.min),t.max=Vi(t.max)}function Kc(t){Ei(t.x),Ei(t.y)}function lr(t,e,n){return t==="position"||t==="preserve-aspect"&&!He(bi(e),bi(n),.2)}const $c=ar({attachResizeListener:(t,e)=>$(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Be={current:void 0},cr=ar({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Be.current){const t=new $c({});t.mount(window),t.setOptions({layoutScroll:!0}),Be.current=t}return Be.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Qc={pan:{Feature:fc},drag:{Feature:dc,ProjectionNode:cr,MeasureLayout:nr}},Zc=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Jc(t){const e=Zc.exec(t);if(!e)return[,];const[,n,i]=e;return[n,i]}const tu=4;function Xe(t,e,n=1){Y(n<=tu,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[i,s]=Jc(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const r=o.trim();return Gs(r)?parseFloat(r):r}else return Ne(s)?Xe(s,e,n+1):s}function eu(t,{...e},n){const i=t.current;if(!(i instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(s=>{const o=s.get();if(!Ne(o))return;const r=Xe(o,i);r&&s.set(r)});for(const s in e){const o=e[s];if(!Ne(o))continue;const r=Xe(o,i);r&&(e[s]=r,n||(n={}),n[s]===void 0&&(n[s]=o))}return{target:e,transitionEnd:n}}const nu=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),ur=t=>nu.has(t),iu=t=>Object.keys(t).some(ur),ee=t=>t===yt||t===A,Mi=(t,e)=>parseFloat(t.split(", ")[e]),Oi=(t,e)=>(n,{transform:i})=>{if(i==="none"||!i)return 0;const s=i.match(/^matrix3d\((.+)\)$/);if(s)return Mi(s[1],e);{const o=i.match(/^matrix\((.+)\)$/);return o?Mi(o[1],t):0}},su=new Set(["x","y","z"]),ru=Ht.filter(t=>!su.has(t));function ou(t){const e=[];return ru.forEach(n=>{const i=t.getValue(n);i!==void 0&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}const Et={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:Oi(4,13),y:Oi(5,14)};Et.translateX=Et.x;Et.translateY=Et.y;const au=(t,e,n)=>{const i=e.measureViewportBox(),s=e.current,o=getComputedStyle(s),{display:r}=o,a={};r==="none"&&e.setStaticValue("display",t.display||"block"),n.forEach(c=>{a[c]=Et[c](i,o)}),e.render();const l=e.measureViewportBox();return n.forEach(c=>{const u=e.getValue(c);u&&u.jump(a[c]),t[c]=Et[c](l,o)}),t},lu=(t,e,n={},i={})=>{e={...e},i={...i};const s=Object.keys(e).filter(ur);let o=[],r=!1;const a=[];if(s.forEach(l=>{const c=t.getValue(l);if(!t.hasValue(l))return;let u=n[l],h=Lt(u);const d=e[l];let f;if(ce(d)){const p=d.length,m=d[0]===null?1:0;u=d[m],h=Lt(u);for(let b=m;b<p&&d[b]!==null;b++)f?Y(Lt(d[b])===f,"All keyframes must be of the same type"):(f=Lt(d[b]),Y(f===h||ee(h)&&ee(f),"Keyframes must be of the same dimension as the current value"))}else f=Lt(d);if(h!==f)if(ee(h)&&ee(f)){const p=c.get();typeof p=="string"&&c.set(parseFloat(p)),typeof d=="string"?e[l]=parseFloat(d):Array.isArray(d)&&f===A&&(e[l]=d.map(parseFloat))}else h!=null&&h.transform&&(f!=null&&f.transform)&&(u===0||d===0)?u===0?c.set(f.transform(u)):e[l]=h.transform(d):(r||(o=ou(t),r=!0),a.push(l),i[l]=i[l]!==void 0?i[l]:e[l],c.jump(d))}),a.length){const l=a.indexOf("height")>=0?window.pageYOffset:null,c=au(e,t,a);return o.length&&o.forEach(([u,h])=>{t.getValue(u).set(h)}),t.render(),ge&&l!==null&&window.scrollTo({top:l}),{target:c,transitionEnd:i}}else return{target:e,transitionEnd:i}};function cu(t,e,n,i){return iu(e)?lu(t,e,n,i):{target:e,transitionEnd:i}}const uu=(t,e,n,i)=>{const s=eu(t,e,i);return e=s.target,i=s.transitionEnd,cu(t,e,n,i)},Ke={current:null},hr={current:!1};function hu(){if(hr.current=!0,!!ge)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ke.current=t.matches;t.addListener(e),e()}else Ke.current=!1}function du(t,e,n){const{willChange:i}=e;for(const s in e){const o=e[s],r=n[s];if(z(o))t.addValue(s,o),fe(i)&&i.add(s),process.env.NODE_ENV==="development"&&yn(o.version==="10.18.0",`Attempting to mix Framer Motion versions ${o.version} with 10.18.0 may not work as expected.`);else if(z(r))t.addValue(s,Vt(o,{owner:t})),fe(i)&&i.remove(s);else if(r!==o)if(t.hasValue(s)){const a=t.getValue(s);!a.hasAnimated&&a.set(o)}else{const a=t.getStaticValue(s);t.addValue(s,Vt(a!==void 0?a:o,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const Di=new WeakMap,dr=Object.keys(_t),fu=dr.length,ji=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],pu=tn.length;class mu{constructor({parent:e,props:n,presenceContext:i,reducedMotionConfig:s,visualState:o},r={}){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=()=>E.render(this.render,!1,!0);const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=n,this.presenceContext=i,this.depth=e?e.depth+1:0,this.reducedMotionConfig=s,this.options=r,this.isControllingVariants=ye(n),this.isVariantNode=$i(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...u}=this.scrapeMotionValuesFromProps(n,{});for(const h in u){const d=u[h];a[h]!==void 0&&z(d)&&(d.set(a[h],!1),fe(c)&&c.add(h))}}scrapeMotionValuesFromProps(e,n){return{}}mount(e){this.current=e,Di.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((n,i)=>this.bindToMotionValue(i,n)),hr.current||hu(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ke.current,process.env.NODE_ENV!=="production"&&yn(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Di.delete(this.current),this.projection&&this.projection.unmount(),J(this.notifyUpdate),J(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,n){const i=vt.has(e),s=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&E.update(this.notifyUpdate,!1,!0),i&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{s(),o()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...n},i,s,o){let r,a;if(process.env.NODE_ENV!=="production"&&s&&i){const l="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";n.ignoreStrict?qt(!1,l):Y(!1,l)}for(let l=0;l<fu;l++){const c=dr[l],{isEnabled:u,Feature:h,ProjectionNode:d,MeasureLayout:f}=_t[c];d&&(r=d),u(n)&&(!this.features[c]&&h&&(this.features[c]=new h(this)),f&&(a=f))}if((this.type==="html"||this.type==="svg")&&!this.projection&&r){this.projection=new r(this.latestValues,this.parent&&this.parent.projection);const{layoutId:l,layout:c,drag:u,dragConstraints:h,layoutScroll:d,layoutRoot:f}=n;this.projection.setOptions({layoutId:l,layout:c,alwaysMeasureLayout:!!u||h&&At(h),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof c=="string"?c:"both",initialPromotionConfig:o,layoutScroll:d,layoutRoot:f})}return a}updateFeatures(){for(const e in this.features){const n=this.features[e];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):L()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}makeTargetAnimatable(e,n=!0){return this.makeTargetAnimatableFromInstance(e,this.props,n)}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let i=0;i<ji.length;i++){const s=ji[i];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const o=e["on"+s];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=du(this,this.scrapeMotionValuesFromProps(e,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const i=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(i.initial=this.props.initial),i}const n={};for(let i=0;i<pu;i++){const s=tn[i],o=this.props[s];(Wt(o)||o===!1)&&(n[s]=o)}return n}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){n!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,n)),this.values.set(e,n),this.latestValues[e]=n.get()}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return i===void 0&&n!==void 0&&(i=Vt(n,{owner:this}),this.addValue(e,i)),i}readValue(e){var n;return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(n=this.getBaseTargetFromProps(this.props,e))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:i}=this.props,s=typeof i=="string"||typeof i=="object"?(n=ln(this.props,i))===null||n===void 0?void 0:n[e]:void 0;if(i&&s!==void 0)return s;const o=this.getBaseTargetFromProps(this.props,e);return o!==void 0&&!z(o)?o:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new vn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class fr extends mu{sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:i}){delete n[e],delete i[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:n,...i},{transformValues:s},o){let r=Ol(i,e||{},this);if(s&&(n&&(n=s(n)),i&&(i=s(i)),r&&(r=s(r))),o){El(this,i,r);const a=uu(this,i,r,n);n=a.transitionEnd,i=a.target}return{transition:e,transitionEnd:n,...i}}}function gu(t){return window.getComputedStyle(t)}class vu extends fr{constructor(){super(...arguments),this.type="html"}readValueFromInstance(e,n){if(vt.has(n)){const i=dn(n);return i&&i.default||0}else{const i=gu(e),s=(es(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:n}){return tr(e,n)}build(e,n,i,s){nn(e,n,i,s.transformTemplate)}scrapeMotionValuesFromProps(e,n){return an(e,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;z(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(e,n,i,s){as(e,n,i,s)}}class yu extends fr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(vt.has(n)){const i=dn(n);return i&&i.default||0}return n=ls.has(n)?n:Ze(n),e.getAttribute(n)}measureInstanceViewportBox(){return L()}scrapeMotionValuesFromProps(e,n){return us(e,n)}build(e,n,i,s){rn(e,n,i,this.isSVGTag,s.transformTemplate)}renderInstance(e,n,i,s){cs(e,n,i,s)}mount(e){this.isSVGTag=on(e.tagName),super.mount(e)}}const bu=(t,e)=>en(t)?new yu(e,{enableHardwareAcceleration:!1}):new vu(e,{enableHardwareAcceleration:!0}),xu={layout:{ProjectionNode:cr,MeasureLayout:nr}},wu={...Yl,...pa,...Qc,...xu},pr=So((t,e)=>ea(t,e,wu,bu));function Su(t){const{children:e,parentRef:n,onlyChild:i}=t,[s,o]=T.useState({top:0,left:0});return T.useLayoutEffect(()=>{if(n.current){const r=n.current.getBoundingClientRect();o({top:r.top,left:r.left+r.width})}},[n]),i?e:yr.createPortal(y.jsx(pr.div,{style:{position:"fixed",top:s.top,left:s.left,zIndex:1200},children:e}),n.current)}function Tu(t){return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",...t,children:y.jsx("path",{fill:"currenColor",d:"M4.427 7.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 7H4.604a.25.25 0 00-.177.427z"})})}function mr({item:t,level:e=0,...n}){var x;const{isActive:i,isCollapsed:s,expanded:o,toggleExpand:r}=n,a=`level-${e}`,l=s?"collapsed":"expanded",c=i(t.id)?"active":"",u=(v,g=a)=>`${v} ${g} ${l} ${c}`,h=!!((x=t.children)!=null&&x.length),[d,f]=T.useState(!1),p=T.useRef();function m(v){var S;const{level:g,hovered:w,parentRef:P}=v;return!h||s&&g>=2&&!w?null:y.jsx(Su,{parentRef:P,onlyChild:!s||s&&g<2,children:y.jsx(pr.div,{className:u("menu-item__dropdown",`level-${g}`),initial:{height:s?"auto":0},animate:{height:s||o(t.id)?"auto":0},transition:{duration:.2},children:(S=t.children)==null?void 0:S.map(k=>T.createElement(mr,{...n,key:k.id,item:k,level:g}))},+s)})}const b=h?"div":Ri.Link;return y.jsxs("div",{ref:p,className:u("menu-item__wrapper"),onMouseEnter:()=>s&&f(!0),onMouseLeave:()=>s&&f(!1),children:[y.jsxs(b,{to:h?"#":t.path||"#",style:{paddingLeft:`${s?"0.5rem":`${e*1}rem`}`},className:u("menu-item__link"),onClick:v=>{h&&(v.preventDefault(),s||r(t.id))},children:[e!==0&&y.jsx(Au,{cls:u,item:t}),y.jsx("span",{className:u("menu-item__label"),children:t.name}),h&&y.jsx("div",{className:u("menu-item__icon-arrow__wrapper"),children:y.jsx(Tu,{className:u(`menu-item__icon-arrow__icon ${o(t.id)?"open":"close"}`)})})]}),m({level:e+1,hovered:d,parentRef:p})]},t.id)}function Au({item:t,cls:e}){var r,a;const[n,i]=T.useState(!1),s=()=>{i(!0)},o=(r=t.icon)==null?void 0:r.endsWith(".svg");return y.jsx("div",{className:e("menu-item__icon"),children:n?y.jsx("div",{style:{width:24,height:24,backgroundColor:"#dadada",borderRadius:"5px",display:"flex",justifyContent:"center",alignItems:"center"},children:(a=t.name.trim().at(0))==null?void 0:a.toUpperCase()}):o?y.jsx(ut.ReactSVG,{src:t.icon,beforeInjection:l=>{l.setAttribute("style","margin: 0 auto;"),l.querySelectorAll("path").forEach(u=>{u.setAttribute("stroke","currentColor")})}}):y.jsx("img",{src:t.icon||"/",alt:" ",style:{height:24,maxHeight:24},onError:s})})}function Li(t){for(;t.startsWith("/");)t=t.slice(1);return t}function gr(t,e,n=[]){for(const i of t){if(console.log(i.path,e,i.path===e),Li(i.path||"")===Li(e))return[...n,i];if(i.children){const s=gr(i.children,e,[...n,i]);if(s)return s}}return null}function Pu(t){return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"20",fill:"none",viewBox:"0 0 18 20",...t,children:y.jsx("path",{fill:"#E01B00",fillRule:"evenodd",d:"M.179 2.875A2.375 2.375 0 012.554.5h3.393a1.018 1.018 0 010 2.036H2.554a.34.34 0 00-.34.339v14.25c0 .187.152.34.34.34h3.393a1.018 1.018 0 110 2.035H2.554a2.375 2.375 0 01-2.375-2.375V2.875zm14.167 6.107h-7.72a1.018 1.018 0 000 2.036h7.72l-2.673 2.673a1.018 1.018 0 101.44 1.44l4.41-4.411a1.018 1.018 0 000-1.44l-4.41-4.41a1.018 1.018 0 10-1.44 1.439l2.673 2.673z",clipRule:"evenodd"})})}const Cu=`[data-simplebar]{position:relative;flex-direction:column;flex-wrap:wrap;justify-content:flex-start;align-content:flex-start;align-items:flex-start}.simplebar-wrapper{overflow:hidden;width:inherit;height:inherit;max-width:inherit;max-height:inherit}.simplebar-mask{direction:inherit;position:absolute;overflow:hidden;padding:0;margin:0;left:0;top:0;bottom:0;right:0;width:auto!important;height:auto!important;z-index:0}.simplebar-offset{direction:inherit!important;box-sizing:inherit!important;resize:none!important;position:absolute;top:0;left:0;bottom:0;right:0;padding:0;margin:0;-webkit-overflow-scrolling:touch}.simplebar-content-wrapper{direction:inherit;box-sizing:border-box!important;position:relative;display:block;height:100%;width:auto;max-width:100%;max-height:100%;overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.simplebar-content-wrapper::-webkit-scrollbar,.simplebar-hide-scrollbar::-webkit-scrollbar{display:none;width:0;height:0}.simplebar-content:after,.simplebar-content:before{content:" ";display:table}.simplebar-placeholder{max-height:100%;max-width:100%;width:100%;pointer-events:none}.simplebar-height-auto-observer-wrapper{box-sizing:inherit!important;height:100%;width:100%;max-width:1px;position:relative;float:left;max-height:1px;overflow:hidden;z-index:-1;padding:0;margin:0;pointer-events:none;flex-grow:inherit;flex-shrink:0;flex-basis:0}.simplebar-height-auto-observer{box-sizing:inherit;display:block;opacity:0;position:absolute;top:0;left:0;height:1000%;width:1000%;min-height:1px;min-width:1px;overflow:hidden;pointer-events:none;z-index:-1}.simplebar-track{z-index:1;position:absolute;right:0;bottom:0;pointer-events:none;overflow:hidden}[data-simplebar].simplebar-dragging,[data-simplebar].simplebar-dragging .simplebar-content{pointer-events:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}[data-simplebar].simplebar-dragging .simplebar-track{pointer-events:all}.simplebar-scrollbar{position:absolute;left:0;right:0;min-height:10px}.simplebar-scrollbar:before{position:absolute;content:"";background:#000;border-radius:7px;left:2px;right:2px;opacity:0;transition:opacity .2s .5s linear}.simplebar-scrollbar.simplebar-visible:before{opacity:.5;transition-delay:0s;transition-duration:0s}.simplebar-track.simplebar-vertical{top:0;width:11px}.simplebar-scrollbar:before{top:2px;bottom:2px;left:2px;right:2px}.simplebar-track.simplebar-horizontal{left:0;height:11px}.simplebar-track.simplebar-horizontal .simplebar-scrollbar{right:auto;left:0;top:0;bottom:0;min-height:0;min-width:10px;width:auto}[data-simplebar-direction=rtl] .simplebar-track.simplebar-vertical{right:auto;left:0}.simplebar-dummy-scrollbar-size{direction:rtl;position:fixed;opacity:0;visibility:hidden;height:500px;width:500px;overflow-y:hidden;overflow-x:scroll;-ms-overflow-style:scrollbar!important}.simplebar-dummy-scrollbar-size>div{width:200%;height:200%;margin:10px 0}.simplebar-hide-scrollbar{position:fixed;left:0;visibility:hidden;overflow-y:scroll;scrollbar-width:none;-ms-overflow-style:none}
|
|
5
|
-
`;function ku(){return
|
|
6
|
-
`,Mu=t=>
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react/jsx-runtime"),T=require("react"),ut=require("../index-e55ba232.cjs"),Li=require("react-router-dom"),yr=require("react-dom"),br=require("axios");function xr(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const D=xr(T),wr=`.modal-overlay{z-index:1300;position:fixed;top:0;right:0;bottom:0;left:0;background:hsla(0,0%,0%,.254);--tw-backdrop-blur: blur(4px);justify-content:center;align-items:center;-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.modal-title{font-size:1.25rem;line-height:1.75rem;color:#e01b00;font-weight:500}.modal-footer{display:flex;justify-content:space-between;width:80%}.modal-container{background:#ffffff;-webkit-backdrop-filter:blur(4.5px);backdrop-filter:blur(4.5px);display:flex;padding:32px 24px 40px;flex-direction:column;align-items:center;gap:24px;align-self:stretch;width:500px;height:204px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);border-radius:.5rem}.modal-button{border-radius:3px;border:1px solid #ddd;background:#ddd;padding:8px 32px;font-size:14px}.confirm-btn{background:#e01b00!important}.text-white{color:#fff}.text-sm{font-size:.875rem;line-height:1.25rem}
|
|
2
|
+
`;function Ri({isOpen:t,onClose:e,onConfirm:n}){if(!t)return null;function i(s){var o;((o=s.target)==null?void 0:o.id)==="modal-wrapper"&&e()}return v.jsxs(v.Fragment,{children:[v.jsx("style",{type:"text/css",children:wr}),v.jsx("div",{onClick:i,className:"modal-overlay",id:"modal-wrapper",children:v.jsxs("div",{className:"modal-container",children:[v.jsx("h3",{className:"modal-title",children:"Log out"}),v.jsx("p",{className:"text-sm",children:"Are you sure want to log out?"}),v.jsxs("div",{className:"modal-footer",children:[v.jsx("button",{className:"modal-button",onClick:e,children:"Cancel"}),v.jsx("button",{onClick:n,className:"text-white confirm-btn modal-button",children:"Confirm"})]})]})})]})}function Sr({primaryColor:t="#009d4f"}){return v.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",children:[v.jsx("path",{d:"M8.5 19.5H8C4 19.5 2 18.5 2 13.5V8.5C2 4.5 4 2.5 8 2.5H16C20 2.5 22 4.5 22 8.5V13.5C22 17.5 20 19.5 16 19.5H15.5C15.19 19.5 14.89 19.65 14.7 19.9L13.2 21.9C12.54 22.78 11.46 22.78 10.8 21.9L9.3 19.9C9.14 19.68 8.77 19.5 8.5 19.5Z",stroke:t,"stroke-width":"1.5","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),v.jsx("path",{d:"M15.9965 11.5H16.0054",stroke:t,"stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),v.jsx("path",{d:"M11.9955 11.5H12.0045",stroke:t,"stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),v.jsx("path",{d:"M7.99451 11.5H8.00349",stroke:t,"stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]})}function Tr({primaryColor:t="#009d4f"}){return v.jsxs("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[v.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.7968 17.4705C16.5901 17.4705 18.8076 16.8556 19.0218 14.3874C19.0218 11.921 17.4757 12.0796 17.4757 9.05334C17.4757 6.68952 15.2352 4 11.7968 4C8.35833 4 6.1178 6.68952 6.1178 9.05334C6.1178 12.0796 4.57178 11.921 4.57178 14.3874C4.78679 16.8649 7.00428 17.4705 11.7968 17.4705Z",stroke:t,"stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),v.jsx("path",{d:"M13.8274 20.0286C12.6679 21.3161 10.8591 21.3313 9.68848 20.0286",stroke:t,"stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),v.jsx("circle",{cx:"16.928",cy:"7",r:"2",fill:"#E01B00",stroke:t})]})}const Ar="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAArCAYAAAADgWq5AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAA3XSURBVHgBtVl7jFxVGf/dO3feMzuzO/tuu92y2xIoCEgCgUQogSIKhBIgaAxpFdREITxMVCrYNqB/+A8QCYQYbIuJUTChGqBQDCkaMUCgW0qtpe12t933drezs/N+XX/fuefOzK6l0KInPb2POfec3/m+3/c6a+ALNNu247xczL6Ofbm+j+suLck+pK972XcYhrEbX6AZOItGoGt4uZ99jQtu+tAnmP7kIPLz8yiwS/NHmxDr6kJTdzfaVq5qnGIb+/azAX9GgDXQTQJUQB3Y+SqOvL1bgXVB6nELv2OvcqllX74Uq2+8SV2buBE40n+QwHfgfwlYq34r+7rU+Bj2vvgH/Ou1VxXIxeAaW7Xht6ph1NGzCfAr7/meC3wb+xYCH8IXBaylurWQnu/d++IfMUCwRS1Nuz7mFN813lfVUrYh3xi1lWXIlXd/F1eww5H2rQQ9gLMFTCAP8PJEamIcO+77AebHx+u/6Y8FrItNJDqVL2Awm8WJQhFejwedfj9WhIJosjz8wKCkUdupu6koOX7n08+60haKPHnGgAlEuLp5bGAPdm78yUKO6tU4cQ3w/uQc3pqYwkypQOAGTNNU3SJoi+N6wmFclWjmBnxqvEja1rMJcF8kghseeRT9V62Rl5s595bPDZggxE29fPD11/DWLx9f/FsNqFwrvP5l6DjenZmBKN40TM5qqrEeAUzJGnz28Rpgv6atFRdGQmrXjjG6QrDV/Q0/+zlWf/1GebWB82//TMAE0svLnpnDh+N/umfDaY1KfnlrdBw7R8ZguyQxPJSsoW493JDHY7JbaiGhSNCycEt3J3oDgZp2qi5HOMgbjuCOp59B+8pV4rsvWWyIpwJ8ND0x0fvKQ/dDPIJh1yWgWVsbW6xU8au9+8jXAqUJWJRo2OdDiGqPBv1ojcUQIRVOptOYnEsjky+iUrXREw3jm91dihQ26VPRs0NvoKmrk6DJ6c6uAQK+pBGftQis8LZ3z/ZtIGjFQRJS78zQ05q1u/0nk5ghWOFoazCAloCFGIF2xKPobmtHW1sCifZWeP1e5DM5jJPjHxwaxsGpJE5WykhYlprZI1IWr0FOGASd4tpv/OIx3PHrZy4mJuHzZhejuYgKDxza9Tqkm4ah5Ck8NUzpjhG5z/L7QQIWsGGfFzGvGJeeUMZY5G0oxGgXRYBSjsSi6GpvwZoL+7GqM4GhbM5hkOEIw6SkDcN5ISIZ2fOh6mz36ziwEDCb7CK+94UXHFAKsHMVQzK1lIWfakq+T4p0+RwhWP5Tm1CcVAbFb7w+xwA9XnVvkS4RbuCS5Z18tvT8LmgO0+s5axrY5Ri8gH3gVICvPvLmG0hPTjjSNVyp6kk5Uhii7Mm01W9i1X6S1yLR7apj78ozKEPjDqoVlIsFLmIjJNKm6wpEI2iOBMhzT10wohmzDtSloGAZ2bNngZRNTYcNwt0ju3Y5vK19jIZJG7ssZiuL93kMTSmC5X3Acnq1lEM2lUQ2OYsTY2PI8BoOeOEXgVfLiPqtmmBqVGt4NrWG3932vCvlNY1GtyYzOYmpfR9pKsgWRa91ryBvXZ8pb1PFspo0YJpqxIlCCf6qiRx3eWwkidBkCj2JGfT3LsU+Gtp83sbyZcsRpTtDbhYtytWJUVfrkwqRbE0rJ4xilBIu0MtQO7fwzQ6XEldPfVQHa7vc1cZlurs26+9eOngIQ/MpeMmVeCiAXNWLXBkEVuDVwniqiH2Tafzz4Cj2T6QwkytifHYOyfQ8ZuYLeHN4FEUKxZWuY6v63k039NqDf/+bPK5TEiYdJOnunT16xLFu6TqKyVURTEvZwwlVBsaFUsqdAZlKBWYuj85QBJmq5A8mYpEw5uYraPUauHBZBxf18LuqChSlSgnnLO1AjnTxaA+huCl5BqUt63q0x6gq92lj+shhnEdaiCezND+QPHrUIbzgMZ3Q61ib7QQPdevwWh6DtPIygXpMD4p0Cx0RA+cnOlUaWShXkZsvYwkN7LLz+5AtVbF0SbcKzyGfhfTMNFYtaVXaMVzfRrCOlzE0TL0Z3owO7HEdw8UCuFfuMlOTNWnWrFWnhY5DdpnsXFfEYxjN5NSGKpw0ncsy8kVRplkcn06izQ+E6IujzQlcviqH9/49zIhmoY9AffQyYZ8fZsmjMghnaqNuIRLWbceQhculTMYFHK8Bzk1POzvUiY3zrVnLqZRJmI6UpfU3t+AfKt00tTHaODw2gQIHlctlTCaLGDqZwfzvX6Ira0IgEMTw1BRGR4awsiOOsBVg2uFXvK2vZzgobVN5oaqjYOXedOuthWZTATJr8V1RQyeCqMm1LvCepihDcRDJYlEBrkqgEP5yBQ8DhD8eRlu8CSuW96ClOYYSc2SDGjs6PonxZAqdTdRWuGlBpm+gIXuzDQfTwvSlIXBo92S7oExDewudLi7yxVEm5ndfcAF5yOSFq3jok6Ufm8sjze+C8WYsWXUuWnpXoBgM4/3jE9gzPO4EFY4zqqiF4gU+uOaLtZfQHsttIuEhuQl3dEB8sZs1aUY4FDCqTvJj63xN5wwtrCSaKc2xXAEpZmIrOoSfQILG1kOpfuXSS9Ddswz+YBA9zIGPkUIf7NuvpNfmDao5lJUYjo93c2xXy66bbersdPEOCWDJO+FjHpo1Jl1y1KkgXkIrwmiwP7Fjr6STlpcuK48CxTybztDQPEimUojxuv+99zB9bNihVjGNALUS9AfgJTWWB6M1Cdq60qsVBg0kWQxYkKiir43qVY5bAxLVeAxolaDm0G19dbO2CsdWCCBPQ5tIZZArVVQSP8nodGB4BIPDx5FlsLDI11lyt1wu4bJ4u/LpCpBZpwOABlpAGZ68be1b6QJOWpLRc1fJ2Ipz4nAduespFrkzxx8bdSMQAyMnyzpnzpdKBJpFdzSIJYkE+np70HtOL6KRIGZnZnF8cgpLQzG0+ILaMzR4h0XN1bNE1kRfn5KuVNSul/jzkssuX/9hLTXXEm2wW1tPXPOZXPBktqAqCFXq2I5WsswpjlWqSsm5cgXTLE5l+OiJWRW66d/wTr6E/oAP7bBrLs02Tln+qLW6LrpInnbLfy7gHd5weH3b6gswvf/jU+7VjXYizP0nTuCVw4MYnJsjjx2LrlYNRQ01iEAHZ1MYTqbhHRxVJdOKzg60NUUUzY4UWH14vehg4r+UX3QxexNe1845XAWyd1x4ESIdisNvNwLeLfw4785vxKc3PaIJUFUewlXcXKmM96nSd1h0jpKfZeYQMkqqZhnnkZhN0JJrlLgrcVs2k41YOICVXe0Is3SS9LNKflveELyMdCelCGDfT6Es529Ly0VE1by6Mudd//XXu3TYVgPMhyRV81Tr6gs2hds7kZUwDcegxjNZvM0INnBihiCrzBuY7DA5N0XkBGXy2SlHbFUuqQcxWOYYzQTbxoJTPLz4a8u0MG34lR8uku9hJvUVApT8Q3zJKLndzA2vLuYQ4PswtdJ/3doaHVx9u01OW5KX/vBexeNksYSXh4bxG6aRH88lafisJKhan1e6l1mZl++YC9CtSTBQZRQX9jMpipGf3bEQ2mlsQapdNpOn1McrTJhsllN8V2IlIqqrUAiSYko499LtZVjMvh+N4XgojC996y7BJW53y38BFinzIlLGSGe3A5RuyCYYARkMhuBjkJCTHK+EXk7u8zIXIPAycwKTwKFDu0+iGe+EGuliFWmTIdwMqdouwM3IKLGFErWTzeeoMQMZFqVObmyq0N659qvou/Y6gfZU49lEo4Shy+mB23+6EfGubiVBOQTxM2cQNYqqg4xuIuEgAYdo8WFGsRC7FQjBE4ygxKQmbfiQZSQrBOPwNLczKMUQZj0X4qYdz2io2k96kXm1SFlaLp9XjqEl0Yqbb7vN5e7mBRixqLknPwcPHIh/f/16ZHOyc+a8THIU6bmJEvnX6KttisuSKpjSKfG8QRLxMMF5+E42E6CGAtyccF/AWtz8PKNhS2sCkzRk0ZyYhJfjm1ta8Ojjj2FpT88pT37MxYD1gAfPPe88/GjjwwRoOZWAlPOUkgD1UbqKEuwRhvQwzx18lg9NLOETTHoSXDTKbC7EMCzGJxV2RdduUl3LfPIs3kjCdSaTJqU8yFPad939HQErQ799qvNiC6do4kJE0jevu3VTUyyOTQ9vRIVG4UpHpCxNXJiU8/KuSj6KNIsMvR66Lj8NVDyBAJPNCUjRiKWlLG7RrRWzrFyWdC/Fgw//GBddrE6mtnzaqbyB0zT3fHhsdBQP3XsfxkZGlBsSFSr1GI6f9pLT8l7O0WQTeXIxSm2UuMkcjSrRkqBXKCkteSW1FP/LoNPBpCZL6XposE8+ywNAZow42/PhBtBSpL7M3rv9+efx2+eeo0S99VTQcNSq/CoBi5pzLJcsbkKkn+W9ABa35UjYUvmBeIeeZT24+rpr8bWbbkIoHB6CQ4Pdp8PzmYA16F44R1nrJ5jT/m7rVvz19TecPJaqFsDlakXxWYCJNCt89mgDbWluVvx0D7mjTU248qqrsO7225BgksS2Q4NNfhaWzwW4AbicDTzB3jtJ4HsHBvDmzp0YPHQYhVKRbi6oKFIgOKGFBAhpQb4Pkt8r+s7B5VdcgWvWrhWJyk+SH2w2zuDPX2cEuAH4Gl42sK933w0ePowZhu9JHpWmyM8y3ZvwOMoz4r7+foLtc4cmNdAnjf/33+lOA14k7/4VdDkW/iV0Dk6RMARH9QOfR/Wf1v4D3Fe7Fu3OpbsAAAAASUVORK5CYII=",Pr=`@import"https://fonts.cdnfonts.com/css/tt-firs-neue-trl?styles=143111,143113,143105,143108,143110,143101,143099,143103,143097,143115";*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:TT Firs Neue Trl,sans-serif;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}
|
|
3
|
+
`;function Bi({children:t,styles:e=[],...n}){return v.jsxs(ut.C.div,{...n,children:[[Pr,...e].map((i,s)=>v.jsx("style",{type:"text/css",children:i},s)),t]})}const Cr=`.avatar-dropdown-item{padding:.5rem;font-size:.875rem;line-height:1.25rem;cursor:pointer;border-radius:.25rem}.avartarDropdownMenu{background-color:#fff;padding:.5rem;width:13rem;--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);position:absolute;left:-10rem;top:3.5rem}.avartarDropdownMenu ul{list-style:none;padding-inline-start:0;margin-block-end:0}.navbar{position:fixed;display:flex;z-index:30;background:black;top:0;width:100%;padding-left:2.5rem;height:64px}.navbar-container{display:flex;flex-direction:row;align-items:center;width:100%;justify-content:space-between}.logo-container{padding:16px 0;height:100%}.navbar-container img{height:100%}.right-side-container{display:flex;flex-direction:row;align-items:center;text-align:center;margin-right:2.5rem;gap:1rem}.userContainer{display:flex;align-items:center;gap:.5rem}.userFullName{color:#fff;font-weight:400;font-size:.875rem;line-height:1.25rem}.userAvatar{width:2.5rem;height:2.5rem;cursor:pointer;-o-object-fit:cover;object-fit:cover;border-radius:9999px}.relative{position:relative}.cursor-pointer{cursor:pointer}
|
|
4
|
+
`;function kr({logo:t,user:e,baseUrl:n,style:i,classNames:s="",customColors:o}){const r=t||"/public/assets/icons/logo-header.png",a={...i,color:(o==null?void 0:o.color)||"black",backgroundColor:(o==null?void 0:o.bgColor)||"black"},[l,c]=T.useState(!1),u=()=>{window.location.href=`${n}/authentication/logout?callbackUrl=${window.location.href}`};return v.jsxs(Bi,{styles:[Cr],style:{zIndex:1202},children:[v.jsx("nav",{className:`navbar ${s}`,style:o?a:i,children:v.jsxs("div",{className:"navbar-container",children:[v.jsx("div",{className:"logo-container",children:v.jsx("img",{src:r,alt:"logo-header"})}),v.jsxs("div",{className:"right-side-container",children:[v.jsxs("div",{className:"userContainer",children:[v.jsx("p",{className:"userFullName",children:`${e==null?void 0:e.firstName} ${e==null?void 0:e.lastName}`}),v.jsx(Vr,{primaryColor:o==null?void 0:o.primaryColor,avatarUrl:e==null?void 0:e.avatarUrl,setShowConfirmModal:c})]}),v.jsx("span",{className:"cursor-pointer",children:v.jsx(Tr,{primaryColor:o==null?void 0:o.primaryColor})}),v.jsx("span",{className:"cursor-pointer",children:v.jsx(Sr,{primaryColor:o==null?void 0:o.primaryColor})})]})]})}),v.jsx(Ri,{isOpen:l,onClose:()=>c(!1),onConfirm:u})]})}function Vr({avatarUrl:t,setShowConfirmModal:e,primaryColor:n="#009d4f"}){const[i,s]=T.useState(!1),o=T.useRef(null),r=T.useRef(null),[a,l]=T.useState(!1),[c,u]=T.useState(!1),h={backgroundColor:a?n:"transparent"},d={backgroundColor:c?n:"transparent"};return T.useEffect(()=>{const f=p=>{o.current&&!o.current.contains(p.target)&&s(!1),r.current&&!r.current.contains(p.target)&&s(!1)};return document.addEventListener("click",f,!0),()=>{document.removeEventListener("click",f,!0)}},[o]),v.jsx(v.Fragment,{children:v.jsxs("div",{style:{position:"relative"},children:[v.jsx("img",{onClick:()=>s(!i),ref:o,alt:"user avatar",className:"userAvatar",src:t||Ar}),v.jsx("div",{style:{display:i?"block":"none"},className:"avartarDropdownMenu",ref:r,children:v.jsxs("ul",{children:[v.jsx("li",{onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),style:d,className:"avatar-dropdown-item",children:"Profile"}),v.jsx("li",{onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),style:h,onClick:()=>e(!0),className:"avatar-dropdown-item",children:"Logout"})]})})]})})}var Er=typeof global=="object"&&global&&global.Object===Object&&global;const Mr=Er;var Or=typeof self=="object"&&self&&self.Object===Object&&self,jr=Mr||Or||Function("return this")();const Ni=jr;var Dr=Ni.Symbol;const re=Dr;var Fi=Object.prototype,Lr=Fi.hasOwnProperty,Rr=Fi.toString,Dt=re?re.toStringTag:void 0;function Br(t){var e=Lr.call(t,Dt),n=t[Dt];try{t[Dt]=void 0;var i=!0}catch{}var s=Rr.call(t);return i&&(e?t[Dt]=n:delete t[Dt]),s}var Nr=Object.prototype,Fr=Nr.toString;function Ir(t){return Fr.call(t)}var zr="[object Null]",Wr="[object Undefined]",Tn=re?re.toStringTag:void 0;function _r(t){return t==null?t===void 0?Wr:zr:Tn&&Tn in Object(t)?Br(t):Ir(t)}function Ur(t){return t!=null&&typeof t=="object"}var Hr="[object Symbol]";function Gr(t){return typeof t=="symbol"||Ur(t)&&_r(t)==Hr}var Yr=/\s/;function qr(t){for(var e=t.length;e--&&Yr.test(t.charAt(e)););return e}var Xr=/^\s+/;function Kr(t){return t&&t.slice(0,qr(t)+1).replace(Xr,"")}function oe(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var An=0/0,$r=/^[-+]0x[0-9a-f]+$/i,Qr=/^0b[01]+$/i,Zr=/^0o[0-7]+$/i,Jr=parseInt;function Pn(t){if(typeof t=="number")return t;if(Gr(t))return An;if(oe(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=oe(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Kr(t);var n=Qr.test(t);return n||Zr.test(t)?Jr(t.slice(2),n?2:8):$r.test(t)?An:+t}var to=function(){return Ni.Date.now()};const Te=to;var eo="Expected a function",no=Math.max,io=Math.min;function ne(t,e,n){var i,s,o,r,a,l,c=0,u=!1,h=!1,d=!0;if(typeof t!="function")throw new TypeError(eo);e=Pn(e)||0,oe(n)&&(u=!!n.leading,h="maxWait"in n,o=h?no(Pn(n.maxWait)||0,e):o,d="trailing"in n?!!n.trailing:d);function f(S){var k=i,C=s;return i=s=void 0,c=S,r=t.apply(C,k),r}function p(S){return c=S,a=setTimeout(x,e),u?f(S):r}function m(S){var k=S-l,C=S-c,V=e-k;return h?io(V,o-C):V}function b(S){var k=S-l,C=S-c;return l===void 0||k>=e||k<0||h&&C>=o}function x(){var S=Te();if(b(S))return y(S);a=setTimeout(x,m(S))}function y(S){return a=void 0,d&&i?f(S):(i=s=void 0,r)}function g(){a!==void 0&&clearTimeout(a),c=0,i=l=s=a=void 0}function w(){return a===void 0?r:y(Te())}function P(){var S=Te(),k=b(S);if(i=arguments,s=this,l=S,k){if(a===void 0)return p(l);if(h)return clearTimeout(a),a=setTimeout(x,e),f(l)}return a===void 0&&(a=setTimeout(x,e)),r}return P.cancel=g,P.flush=w,P}var so="Expected a function";function ro(t,e,n){var i=!0,s=!0;if(typeof t!="function")throw new TypeError(so);return oe(n)&&(i="leading"in n?!!n.leading:i,s="trailing"in n?!!n.trailing:s),ne(t,e,{leading:i,maxWait:e,trailing:s})}var oo=!!(typeof window<"u"&&window.document&&window.document.createElement),ao=oo;const Ii=ut.getDefaultExportFromCjs(ao);var Tt=function(){return Tt=Object.assign||function(e){for(var n,i=1,s=arguments.length;i<s;i++){n=arguments[i];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Tt.apply(this,arguments)},St=null,Cn=null;Ii&&window.addEventListener("resize",function(){Cn!==window.devicePixelRatio&&(Cn=window.devicePixelRatio,St=null)});function kn(){if(St===null){if(typeof document>"u")return St=0,St;var t=document.body,e=document.createElement("div");e.classList.add("simplebar-hide-scrollbar"),t.appendChild(e);var n=e.getBoundingClientRect().right;t.removeChild(e),St=n}return St}function zi(t){return!t||!t.ownerDocument||!t.ownerDocument.defaultView?window:t.ownerDocument.defaultView}function Wi(t){return!t||!t.ownerDocument?document:t.ownerDocument}var _i=function(t){var e={},n=Array.prototype.reduce.call(t,function(i,s){var o=s.name.match(/data-simplebar-(.+)/);if(o){var r=o[1].replace(/\W+(.)/g,function(a,l){return l.toUpperCase()});switch(s.value){case"true":i[r]=!0;break;case"false":i[r]=!1;break;case void 0:i[r]=!0;break;default:i[r]=s.value}}return i},e);return n};function Ui(t,e){var n;t&&(n=t.classList).add.apply(n,e.split(" "))}function Hi(t,e){t&&e.split(" ").forEach(function(n){t.classList.remove(n)})}function Gi(t){return".".concat(t.split(" ").join("."))}var lo=Object.freeze({__proto__:null,getElementWindow:zi,getElementDocument:Wi,getOptions:_i,addClasses:Ui,removeClasses:Hi,classNamesToQuery:Gi}),et=zi,Ae=Wi,co=_i,nt=Ui,it=Hi,I=Gi,$t=function(){function t(e,n){n===void 0&&(n={});var i=this;if(this.removePreventClickId=null,this.minScrollbarWidth=20,this.stopScrollDelay=175,this.isScrolling=!1,this.isMouseEntering=!1,this.scrollXTicking=!1,this.scrollYTicking=!1,this.wrapperEl=null,this.contentWrapperEl=null,this.contentEl=null,this.offsetEl=null,this.maskEl=null,this.placeholderEl=null,this.heightAutoObserverWrapperEl=null,this.heightAutoObserverEl=null,this.rtlHelpers=null,this.scrollbarWidth=0,this.resizeObserver=null,this.mutationObserver=null,this.elStyles=null,this.isRtl=null,this.mouseX=0,this.mouseY=0,this.onMouseMove=function(){},this.onWindowResize=function(){},this.onStopScrolling=function(){},this.onMouseEntered=function(){},this.onScroll=function(){var s=et(i.el);i.scrollXTicking||(s.requestAnimationFrame(i.scrollX),i.scrollXTicking=!0),i.scrollYTicking||(s.requestAnimationFrame(i.scrollY),i.scrollYTicking=!0),i.isScrolling||(i.isScrolling=!0,nt(i.el,i.classNames.scrolling)),i.showScrollbar("x"),i.showScrollbar("y"),i.onStopScrolling()},this.scrollX=function(){i.axis.x.isOverflowing&&i.positionScrollbar("x"),i.scrollXTicking=!1},this.scrollY=function(){i.axis.y.isOverflowing&&i.positionScrollbar("y"),i.scrollYTicking=!1},this._onStopScrolling=function(){it(i.el,i.classNames.scrolling),i.options.autoHide&&(i.hideScrollbar("x"),i.hideScrollbar("y")),i.isScrolling=!1},this.onMouseEnter=function(){i.isMouseEntering||(nt(i.el,i.classNames.mouseEntered),i.showScrollbar("x"),i.showScrollbar("y"),i.isMouseEntering=!0),i.onMouseEntered()},this._onMouseEntered=function(){it(i.el,i.classNames.mouseEntered),i.options.autoHide&&(i.hideScrollbar("x"),i.hideScrollbar("y")),i.isMouseEntering=!1},this._onMouseMove=function(s){i.mouseX=s.clientX,i.mouseY=s.clientY,(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&i.onMouseMoveForAxis("x"),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&i.onMouseMoveForAxis("y")},this.onMouseLeave=function(){i.onMouseMove.cancel(),(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&i.onMouseLeaveForAxis("x"),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&i.onMouseLeaveForAxis("y"),i.mouseX=-1,i.mouseY=-1},this._onWindowResize=function(){i.scrollbarWidth=i.getScrollbarWidth(),i.hideNativeScrollbar()},this.onPointerEvent=function(s){if(!(!i.axis.x.track.el||!i.axis.y.track.el||!i.axis.x.scrollbar.el||!i.axis.y.scrollbar.el)){var o,r;i.axis.x.track.rect=i.axis.x.track.el.getBoundingClientRect(),i.axis.y.track.rect=i.axis.y.track.el.getBoundingClientRect(),(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&(o=i.isWithinBounds(i.axis.x.track.rect)),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&(r=i.isWithinBounds(i.axis.y.track.rect)),(o||r)&&(s.stopPropagation(),s.type==="pointerdown"&&s.pointerType!=="touch"&&(o&&(i.axis.x.scrollbar.rect=i.axis.x.scrollbar.el.getBoundingClientRect(),i.isWithinBounds(i.axis.x.scrollbar.rect)?i.onDragStart(s,"x"):i.onTrackClick(s,"x")),r&&(i.axis.y.scrollbar.rect=i.axis.y.scrollbar.el.getBoundingClientRect(),i.isWithinBounds(i.axis.y.scrollbar.rect)?i.onDragStart(s,"y"):i.onTrackClick(s,"y"))))}},this.drag=function(s){var o,r,a,l,c,u,h,d,f,p,m;if(!(!i.draggedAxis||!i.contentWrapperEl)){var b,x=i.axis[i.draggedAxis].track,y=(r=(o=x.rect)===null||o===void 0?void 0:o[i.axis[i.draggedAxis].sizeAttr])!==null&&r!==void 0?r:0,g=i.axis[i.draggedAxis].scrollbar,w=(l=(a=i.contentWrapperEl)===null||a===void 0?void 0:a[i.axis[i.draggedAxis].scrollSizeAttr])!==null&&l!==void 0?l:0,P=parseInt((u=(c=i.elStyles)===null||c===void 0?void 0:c[i.axis[i.draggedAxis].sizeAttr])!==null&&u!==void 0?u:"0px",10);s.preventDefault(),s.stopPropagation(),i.draggedAxis==="y"?b=s.pageY:b=s.pageX;var S=b-((d=(h=x.rect)===null||h===void 0?void 0:h[i.axis[i.draggedAxis].offsetAttr])!==null&&d!==void 0?d:0)-i.axis[i.draggedAxis].dragOffset;S=i.draggedAxis==="x"&&i.isRtl?((p=(f=x.rect)===null||f===void 0?void 0:f[i.axis[i.draggedAxis].sizeAttr])!==null&&p!==void 0?p:0)-g.size-S:S;var k=S/(y-g.size),C=k*(w-P);i.draggedAxis==="x"&&i.isRtl&&(C=!((m=t.getRtlHelpers())===null||m===void 0)&&m.isScrollingToNegative?-C:C),i.contentWrapperEl[i.axis[i.draggedAxis].scrollOffsetAttr]=C}},this.onEndDrag=function(s){var o=Ae(i.el),r=et(i.el);s.preventDefault(),s.stopPropagation(),it(i.el,i.classNames.dragging),o.removeEventListener("mousemove",i.drag,!0),o.removeEventListener("mouseup",i.onEndDrag,!0),i.removePreventClickId=r.setTimeout(function(){o.removeEventListener("click",i.preventClick,!0),o.removeEventListener("dblclick",i.preventClick,!0),i.removePreventClickId=null})},this.preventClick=function(s){s.preventDefault(),s.stopPropagation()},this.el=e,this.options=Tt(Tt({},t.defaultOptions),n),this.classNames=Tt(Tt({},t.defaultOptions.classNames),n.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}}},typeof this.el!="object"||!this.el.nodeName)throw new Error("Argument passed to SimpleBar must be an HTML element instead of ".concat(this.el));this.onMouseMove=ro(this._onMouseMove,64),this.onWindowResize=ne(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=ne(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=ne(this._onMouseEntered,this.stopScrollDelay),this.init()}return t.getRtlHelpers=function(){if(t.rtlHelpers)return t.rtlHelpers;var e=document.createElement("div");e.innerHTML='<div class="simplebar-dummy-scrollbar-size"><div></div></div>';var n=e.firstElementChild,i=n==null?void 0:n.firstElementChild;if(!i)return null;document.body.appendChild(n),n.scrollLeft=0;var s=t.getOffset(n),o=t.getOffset(i);n.scrollLeft=-999;var r=t.getOffset(i);return document.body.removeChild(n),t.rtlHelpers={isScrollOriginAtZero:s.left!==o.left,isScrollingToNegative:o.left!==r.left},t.rtlHelpers},t.prototype.getScrollbarWidth=function(){try{return this.contentWrapperEl&&getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display==="none"||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:kn()}catch{return kn()}},t.getOffset=function(e){var n=e.getBoundingClientRect(),i=Ae(e),s=et(e);return{top:n.top+(s.pageYOffset||i.documentElement.scrollTop),left:n.left+(s.pageXOffset||i.documentElement.scrollLeft)}},t.prototype.init=function(){Ii&&(this.initDOM(),this.rtlHelpers=t.getRtlHelpers(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},t.prototype.initDOM=function(){var e,n;this.wrapperEl=this.el.querySelector(I(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(I(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(I(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(I(this.classNames.offset)),this.maskEl=this.el.querySelector(I(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,I(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(I(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(I(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(I(this.classNames.track)).concat(I(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(I(this.classNames.track)).concat(I(this.classNames.vertical))),this.axis.x.scrollbar.el=((e=this.axis.x.track.el)===null||e===void 0?void 0:e.querySelector(I(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=((n=this.axis.y.track.el)===null||n===void 0?void 0:n.querySelector(I(this.classNames.scrollbar)))||null,this.options.autoHide||(nt(this.axis.x.scrollbar.el,this.classNames.visible),nt(this.axis.y.scrollbar.el,this.classNames.visible))},t.prototype.initListeners=function(){var e=this,n,i=et(this.el);if(this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("pointerdown",this.onPointerEvent,!0),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),(n=this.contentWrapperEl)===null||n===void 0||n.addEventListener("scroll",this.onScroll),i.addEventListener("resize",this.onWindowResize),!!this.contentEl){if(window.ResizeObserver){var s=!1,o=i.ResizeObserver||ResizeObserver;this.resizeObserver=new o(function(){s&&i.requestAnimationFrame(function(){e.recalculate()})}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),i.requestAnimationFrame(function(){s=!0})}this.mutationObserver=new i.MutationObserver(function(){i.requestAnimationFrame(function(){e.recalculate()})}),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})}},t.prototype.recalculate=function(){if(!(!this.heightAutoObserverEl||!this.contentEl||!this.contentWrapperEl||!this.wrapperEl||!this.placeholderEl)){var e=et(this.el);this.elStyles=e.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var n=this.contentEl.offsetWidth,i=this.heightAutoObserverEl.offsetHeight<=1,s=this.heightAutoObserverEl.offsetWidth<=1||n>0,o=this.contentWrapperEl.offsetWidth,r=this.elStyles.overflowX,a=this.elStyles.overflowY;this.contentEl.style.padding="".concat(this.elStyles.paddingTop," ").concat(this.elStyles.paddingRight," ").concat(this.elStyles.paddingBottom," ").concat(this.elStyles.paddingLeft),this.wrapperEl.style.margin="-".concat(this.elStyles.paddingTop," -").concat(this.elStyles.paddingRight," -").concat(this.elStyles.paddingBottom," -").concat(this.elStyles.paddingLeft);var l=this.contentEl.scrollHeight,c=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=i?"auto":"100%",this.placeholderEl.style.width=s?"".concat(n||c,"px"):"auto",this.placeholderEl.style.height="".concat(l,"px");var u=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=n!==0&&c>n,this.axis.y.isOverflowing=l>u,this.axis.x.isOverflowing=r==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=a==="hidden"?!1:this.axis.y.isOverflowing,this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0,this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0,this.hideNativeScrollbar();var h=this.axis.x.isOverflowing?this.scrollbarWidth:0,d=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&c>o-d,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&l>u-h,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el&&(this.axis.x.scrollbar.el.style.width="".concat(this.axis.x.scrollbar.size,"px")),this.axis.y.scrollbar.el&&(this.axis.y.scrollbar.el.style.height="".concat(this.axis.y.scrollbar.size,"px")),this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")}},t.prototype.getScrollbarSize=function(e){var n,i;if(e===void 0&&(e="y"),!this.axis[e].isOverflowing||!this.contentEl)return 0;var s=this.contentEl[this.axis[e].scrollSizeAttr],o=(i=(n=this.axis[e].track.el)===null||n===void 0?void 0:n[this.axis[e].offsetSizeAttr])!==null&&i!==void 0?i:0,r=o/s,a;return a=Math.max(~~(r*o),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(a=Math.min(a,this.options.scrollbarMaxSize)),a},t.prototype.positionScrollbar=function(e){var n,i,s;e===void 0&&(e="y");var o=this.axis[e].scrollbar;if(!(!this.axis[e].isOverflowing||!this.contentWrapperEl||!o.el||!this.elStyles)){var r=this.contentWrapperEl[this.axis[e].scrollSizeAttr],a=((n=this.axis[e].track.el)===null||n===void 0?void 0:n[this.axis[e].offsetSizeAttr])||0,l=parseInt(this.elStyles[this.axis[e].sizeAttr],10),c=this.contentWrapperEl[this.axis[e].scrollOffsetAttr];c=e==="x"&&this.isRtl&&(!((i=t.getRtlHelpers())===null||i===void 0)&&i.isScrollOriginAtZero)?-c:c,e==="x"&&this.isRtl&&(c=!((s=t.getRtlHelpers())===null||s===void 0)&&s.isScrollingToNegative?c:-c);var u=c/(r-l),h=~~((a-o.size)*u);h=e==="x"&&this.isRtl?-h+(a-o.size):h,o.el.style.transform=e==="x"?"translate3d(".concat(h,"px, 0, 0)"):"translate3d(0, ".concat(h,"px, 0)")}},t.prototype.toggleTrackVisibility=function(e){e===void 0&&(e="y");var n=this.axis[e].track.el,i=this.axis[e].scrollbar.el;!n||!i||!this.contentWrapperEl||(this.axis[e].isOverflowing||this.axis[e].forceVisible?(n.style.visibility="visible",this.contentWrapperEl.style[this.axis[e].overflowAttr]="scroll",this.el.classList.add("".concat(this.classNames.scrollable,"-").concat(e))):(n.style.visibility="hidden",this.contentWrapperEl.style[this.axis[e].overflowAttr]="hidden",this.el.classList.remove("".concat(this.classNames.scrollable,"-").concat(e))),this.axis[e].isOverflowing?i.style.display="block":i.style.display="none")},t.prototype.showScrollbar=function(e){e===void 0&&(e="y"),this.axis[e].isOverflowing&&!this.axis[e].scrollbar.isVisible&&(nt(this.axis[e].scrollbar.el,this.classNames.visible),this.axis[e].scrollbar.isVisible=!0)},t.prototype.hideScrollbar=function(e){e===void 0&&(e="y"),this.axis[e].isOverflowing&&this.axis[e].scrollbar.isVisible&&(it(this.axis[e].scrollbar.el,this.classNames.visible),this.axis[e].scrollbar.isVisible=!1)},t.prototype.hideNativeScrollbar=function(){this.offsetEl&&(this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px",this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px")},t.prototype.onMouseMoveForAxis=function(e){e===void 0&&(e="y");var n=this.axis[e];!n.track.el||!n.scrollbar.el||(n.track.rect=n.track.el.getBoundingClientRect(),n.scrollbar.rect=n.scrollbar.el.getBoundingClientRect(),this.isWithinBounds(n.track.rect)?(this.showScrollbar(e),nt(n.track.el,this.classNames.hover),this.isWithinBounds(n.scrollbar.rect)?nt(n.scrollbar.el,this.classNames.hover):it(n.scrollbar.el,this.classNames.hover)):(it(n.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(e)))},t.prototype.onMouseLeaveForAxis=function(e){e===void 0&&(e="y"),it(this.axis[e].track.el,this.classNames.hover),it(this.axis[e].scrollbar.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(e)},t.prototype.onDragStart=function(e,n){var i;n===void 0&&(n="y");var s=Ae(this.el),o=et(this.el),r=this.axis[n].scrollbar,a=n==="y"?e.pageY:e.pageX;this.axis[n].dragOffset=a-(((i=r.rect)===null||i===void 0?void 0:i[this.axis[n].offsetAttr])||0),this.draggedAxis=n,nt(this.el,this.classNames.dragging),s.addEventListener("mousemove",this.drag,!0),s.addEventListener("mouseup",this.onEndDrag,!0),this.removePreventClickId===null?(s.addEventListener("click",this.preventClick,!0),s.addEventListener("dblclick",this.preventClick,!0)):(o.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},t.prototype.onTrackClick=function(e,n){var i=this,s,o,r,a;n===void 0&&(n="y");var l=this.axis[n];if(!(!this.options.clickOnTrack||!l.scrollbar.el||!this.contentWrapperEl)){e.preventDefault();var c=et(this.el);this.axis[n].scrollbar.rect=l.scrollbar.el.getBoundingClientRect();var u=this.axis[n].scrollbar,h=(o=(s=u.rect)===null||s===void 0?void 0:s[this.axis[n].offsetAttr])!==null&&o!==void 0?o:0,d=parseInt((a=(r=this.elStyles)===null||r===void 0?void 0:r[this.axis[n].sizeAttr])!==null&&a!==void 0?a:"0px",10),f=this.contentWrapperEl[this.axis[n].scrollOffsetAttr],p=n==="y"?this.mouseY-h:this.mouseX-h,m=p<0?-1:1,b=m===-1?f-d:f+d,x=40,y=function(){i.contentWrapperEl&&(m===-1?f>b&&(f-=x,i.contentWrapperEl[i.axis[n].scrollOffsetAttr]=f,c.requestAnimationFrame(y)):f<b&&(f+=x,i.contentWrapperEl[i.axis[n].scrollOffsetAttr]=f,c.requestAnimationFrame(y)))};y()}},t.prototype.getContentElement=function(){return this.contentEl},t.prototype.getScrollElement=function(){return this.contentWrapperEl},t.prototype.removeListeners=function(){var e=et(this.el);this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("pointerdown",this.onPointerEvent,!0),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.onMouseMove.cancel(),this.onWindowResize.cancel(),this.onStopScrolling.cancel(),this.onMouseEntered.cancel()},t.prototype.unMount=function(){this.removeListeners()},t.prototype.isWithinBounds=function(e){return this.mouseX>=e.left&&this.mouseX<=e.left+e.width&&this.mouseY>=e.top&&this.mouseY<=e.top+e.height},t.prototype.findChild=function(e,n){var i=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector;return Array.prototype.filter.call(e.children,function(s){return i.call(s,n)})[0]},t.rtlHelpers=null,t.defaultOptions={forceVisible:!1,clickOnTrack:!0,scrollbarMinSize:25,scrollbarMaxSize:0,ariaLabel:"scrollable content",classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging",scrolling:"simplebar-scrolling",scrollable:"simplebar-scrollable",mouseEntered:"simplebar-mouse-entered"},scrollableNode:null,contentNode:null,autoHide:!0},t.getOptions=co,t.helpers=lo,t}(),W=function(){return W=Object.assign||function(e){for(var n,i=1,s=arguments.length;i<s;i++){n=arguments[i];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},W.apply(this,arguments)};function uo(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(t);s<i.length;s++)e.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(n[i[s]]=t[i[s]]);return n}var Yi=D.forwardRef(function(t,e){var n=t.children,i=t.scrollableNodeProps,s=i===void 0?{}:i,o=uo(t,["children","scrollableNodeProps"]),r=D.useRef(),a=D.useRef(),l=D.useRef(),c={},u={};Object.keys(o).forEach(function(f){Object.prototype.hasOwnProperty.call($t.defaultOptions,f)?c[f]=o[f]:u[f]=o[f]});var h=W(W({},$t.defaultOptions.classNames),c.classNames),d=W(W({},s),{className:"".concat(h.contentWrapper).concat(s.className?" ".concat(s.className):""),tabIndex:0,role:"region","aria-label":c.ariaLabel||$t.defaultOptions.ariaLabel});return D.useEffect(function(){var f;return a.current=d.ref?d.ref.current:a.current,r.current&&(f=new $t(r.current,W(W(W({},c),a.current&&{scrollableNode:a.current}),l.current&&{contentNode:l.current})),typeof e=="function"?e(f):e&&(e.current=f)),function(){f==null||f.unMount(),f=null,typeof e=="function"&&e(null)}},[]),D.createElement("div",W({"data-simplebar":"init",ref:r},u),D.createElement("div",{className:h.wrapper},D.createElement("div",{className:h.heightAutoObserverWrapperEl},D.createElement("div",{className:h.heightAutoObserverEl})),D.createElement("div",{className:h.mask},D.createElement("div",{className:h.offset},typeof n=="function"?n({scrollableNodeRef:a,scrollableNodeProps:W(W({},d),{ref:a}),contentNodeRef:l,contentNodeProps:{className:h.contentEl,ref:l}}):D.createElement("div",W({},d),D.createElement("div",{className:h.contentEl},n)))),D.createElement("div",{className:h.placeholder})),D.createElement("div",{className:"".concat(h.track," simplebar-horizontal")},D.createElement("div",{className:h.scrollbar})),D.createElement("div",{className:"".concat(h.track," simplebar-vertical")},D.createElement("div",{className:h.scrollbar})))});Yi.displayName="SimpleBar";const qi=T.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),me=T.createContext({}),$e=T.createContext(null),ge=typeof document<"u",ho=ge?T.useLayoutEffect:T.useEffect,Xi=T.createContext({strict:!1}),Qe=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),fo="framerAppearId",Ki="data-"+Qe(fo);function po(t,e,n,i){const{visualElement:s}=T.useContext(me),o=T.useContext(Xi),r=T.useContext($e),a=T.useContext(qi).reducedMotion,l=T.useRef();i=i||o.renderer,!l.current&&i&&(l.current=i(t,{visualState:e,parent:s,props:n,presenceContext:r,blockInitialAnimation:r?r.initial===!1:!1,reducedMotionConfig:a}));const c=l.current;T.useInsertionEffect(()=>{c&&c.update(n,r)});const u=T.useRef(!!(n[Ki]&&!window.HandoffComplete));return ho(()=>{c&&(c.render(),u.current&&c.animationState&&c.animationState.animateChanges())}),T.useEffect(()=>{c&&(c.updateFeatures(),!u.current&&c.animationState&&c.animationState.animateChanges(),u.current&&(u.current=!1,window.HandoffComplete=!0))}),c}function At(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function mo(t,e,n){return T.useCallback(i=>{i&&t.mount&&t.mount(i),e&&(i?e.mount(i):e.unmount()),n&&(typeof n=="function"?n(i):At(n)&&(n.current=i))},[e])}function Wt(t){return typeof t=="string"||Array.isArray(t)}function ve(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const Ze=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Je=["initial",...Ze];function ye(t){return ve(t.animate)||Je.some(e=>Wt(t[e]))}function $i(t){return!!(ye(t)||t.variants)}function go(t,e){if(ye(t)){const{initial:n,animate:i}=t;return{initial:n===!1||Wt(n)?n:void 0,animate:Wt(i)?i:void 0}}return t.inherit!==!1?e:{}}function vo(t){const{initial:e,animate:n}=go(t,T.useContext(me));return T.useMemo(()=>({initial:e,animate:n}),[Vn(e),Vn(n)])}function Vn(t){return Array.isArray(t)?t.join(" "):t}const En={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"]},_t={};for(const t in En)_t[t]={isEnabled:e=>En[t].some(n=>!!e[n])};function yo(t){for(const e in t)_t[e]={..._t[e],...t[e]}}const Qi=T.createContext({}),Zi=T.createContext({}),bo=Symbol.for("motionComponentSymbol");function xo({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:i,Component:s}){t&&yo(t);function o(a,l){let c;const u={...T.useContext(qi),...a,layoutId:wo(a)},{isStatic:h}=u,d=vo(a),f=i(a,h);if(!h&&ge){d.visualElement=po(s,f,u,e);const p=T.useContext(Zi),m=T.useContext(Xi).strict;d.visualElement&&(c=d.visualElement.loadFeatures(u,m,t,p))}return D.createElement(me.Provider,{value:d},c&&d.visualElement?D.createElement(c,{visualElement:d.visualElement,...u}):null,n(s,a,mo(f,d.visualElement,l),f,h,d.visualElement))}const r=T.forwardRef(o);return r[bo]=s,r}function wo({layoutId:t}){const e=T.useContext(Qi).id;return e&&t!==void 0?e+"-"+t:t}function So(t){function e(i,s={}){return xo(t(i,s))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(i,s)=>(n.has(s)||n.set(s,e(s)),n.get(s))})}const To=["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 tn(t){return typeof t!="string"||t.includes("-")?!1:!!(To.indexOf(t)>-1||/[A-Z]/.test(t))}const ae={};function Ao(t){Object.assign(ae,t)}const Ht=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],vt=new Set(Ht);function Ji(t,{layout:e,layoutId:n}){return vt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!ae[t]||t==="opacity")}const z=t=>!!(t&&t.getVelocity),Po={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Co=Ht.length;function ko(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},i,s){let o="";for(let r=0;r<Co;r++){const a=Ht[r];if(t[a]!==void 0){const l=Po[a]||a;o+=`${l}(${t[a]}) `}}return e&&!t.z&&(o+="translateZ(0)"),o=o.trim(),s?o=s(t,i?"":o):n&&i&&(o="none"),o}const ts=t=>e=>typeof e=="string"&&e.startsWith(t),es=ts("--"),Ne=ts("var(--"),Vo=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,Eo=(t,e)=>e&&typeof t=="number"?e.transform(t):t,lt=(t,e,n)=>Math.min(Math.max(n,t),e),yt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Nt={...yt,transform:t=>lt(0,1,t)},Qt={...yt,default:1},Ft=t=>Math.round(t*1e5)/1e5,be=/(-)?([\d]*\.?[\d])+/g,ns=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Mo=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Gt(t){return typeof t=="string"}const Yt=t=>({test:e=>Gt(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),st=Yt("deg"),q=Yt("%"),A=Yt("px"),Oo=Yt("vh"),jo=Yt("vw"),Mn={...q,parse:t=>q.parse(t)/100,transform:t=>q.transform(t*100)},On={...yt,transform:Math.round},is={borderWidth:A,borderTopWidth:A,borderRightWidth:A,borderBottomWidth:A,borderLeftWidth:A,borderRadius:A,radius:A,borderTopLeftRadius:A,borderTopRightRadius:A,borderBottomRightRadius:A,borderBottomLeftRadius:A,width:A,maxWidth:A,height:A,maxHeight:A,size:A,top:A,right:A,bottom:A,left:A,padding:A,paddingTop:A,paddingRight:A,paddingBottom:A,paddingLeft:A,margin:A,marginTop:A,marginRight:A,marginBottom:A,marginLeft:A,rotate:st,rotateX:st,rotateY:st,rotateZ:st,scale:Qt,scaleX:Qt,scaleY:Qt,scaleZ:Qt,skew:st,skewX:st,skewY:st,distance:A,translateX:A,translateY:A,translateZ:A,x:A,y:A,z:A,perspective:A,transformPerspective:A,opacity:Nt,originX:Mn,originY:Mn,originZ:A,zIndex:On,fillOpacity:Nt,strokeOpacity:Nt,numOctaves:On};function en(t,e,n,i){const{style:s,vars:o,transform:r,transformOrigin:a}=t;let l=!1,c=!1,u=!0;for(const h in e){const d=e[h];if(es(h)){o[h]=d;continue}const f=is[h],p=Eo(d,f);if(vt.has(h)){if(l=!0,r[h]=p,!u)continue;d!==(f.default||0)&&(u=!1)}else h.startsWith("origin")?(c=!0,a[h]=p):s[h]=p}if(e.transform||(l||i?s.transform=ko(t.transform,n,u,i):s.transform&&(s.transform="none")),c){const{originX:h="50%",originY:d="50%",originZ:f=0}=a;s.transformOrigin=`${h} ${d} ${f}`}}const nn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ss(t,e,n){for(const i in e)!z(e[i])&&!Ji(i,n)&&(t[i]=e[i])}function Do({transformTemplate:t},e,n){return T.useMemo(()=>{const i=nn();return en(i,e,{enableHardwareAcceleration:!n},t),Object.assign({},i.vars,i.style)},[e])}function Lo(t,e,n){const i=t.style||{},s={};return ss(s,i,t),Object.assign(s,Do(t,e,n)),t.transformValues?t.transformValues(s):s}function Ro(t,e,n){const i={},s=Lo(t,e,n);return t.drag&&t.dragListener!==!1&&(i.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(i.tabIndex=0),i.style=s,i}const Bo=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function le(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Bo.has(t)}let rs=t=>!le(t);function No(t){t&&(rs=e=>e.startsWith("on")?!le(e):t(e))}try{No(require("@emotion/is-prop-valid").default)}catch{}function Fo(t,e,n){const i={};for(const s in t)s==="values"&&typeof t.values=="object"||(rs(s)||n===!0&&le(s)||!e&&!le(s)||t.draggable&&s.startsWith("onDrag"))&&(i[s]=t[s]);return i}function jn(t,e,n){return typeof t=="string"?t:A.transform(e+n*t)}function Io(t,e,n){const i=jn(e,t.x,t.width),s=jn(n,t.y,t.height);return`${i} ${s}`}const zo={offset:"stroke-dashoffset",array:"stroke-dasharray"},Wo={offset:"strokeDashoffset",array:"strokeDasharray"};function _o(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?zo:Wo;t[o.offset]=A.transform(-i);const r=A.transform(e),a=A.transform(n);t[o.array]=`${r} ${a}`}function sn(t,{attrX:e,attrY:n,attrScale:i,originX:s,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:l=0,...c},u,h,d){if(en(t,c,u,d),h){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:p,dimensions:m}=t;f.transform&&(m&&(p.transform=f.transform),delete f.transform),m&&(s!==void 0||o!==void 0||p.transform)&&(p.transformOrigin=Io(m,s!==void 0?s:.5,o!==void 0?o:.5)),e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),i!==void 0&&(f.scale=i),r!==void 0&&_o(f,r,a,l,!1)}const os=()=>({...nn(),attrs:{}}),rn=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Uo(t,e,n,i){const s=T.useMemo(()=>{const o=os();return sn(o,e,{enableHardwareAcceleration:!1},rn(i),t.transformTemplate),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};ss(o,t.style,t),s.style={...o,...s.style}}return s}function Ho(t=!1){return(n,i,s,{latestValues:o},r)=>{const l=(tn(n)?Uo:Ro)(i,o,r,n),u={...Fo(i,typeof n=="string",t),...l,ref:s},{children:h}=i,d=T.useMemo(()=>z(h)?h.get():h,[h]);return T.createElement(n,{...u,children:d})}}function as(t,{style:e,vars:n},i,s){Object.assign(t.style,e,s&&s.getProjectionStyles(i));for(const o in n)t.style.setProperty(o,n[o])}const ls=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 cs(t,e,n,i){as(t,e,void 0,i);for(const s in e.attrs)t.setAttribute(ls.has(s)?s:Qe(s),e.attrs[s])}function on(t,e){const{style:n}=t,i={};for(const s in n)(z(n[s])||e.style&&z(e.style[s])||Ji(s,t))&&(i[s]=n[s]);return i}function us(t,e){const n=on(t,e);for(const i in t)if(z(t[i])||z(e[i])){const s=Ht.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;n[s]=t[i]}return n}function an(t,e,n,i={},s={}){return typeof e=="function"&&(e=e(n!==void 0?n:t.custom,i,s)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(n!==void 0?n:t.custom,i,s)),e}function Go(t){const e=T.useRef(null);return e.current===null&&(e.current=t()),e.current}const ce=t=>Array.isArray(t),Yo=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),qo=t=>ce(t)?t[t.length-1]||0:t;function ie(t){const e=z(t)?t.get():t;return Yo(e)?e.toValue():e}function Xo({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},i,s,o){const r={latestValues:Ko(i,s,o,t),renderState:e()};return n&&(r.mount=a=>n(i,a,r)),r}const hs=t=>(e,n)=>{const i=T.useContext(me),s=T.useContext($e),o=()=>Xo(t,e,i,s);return n?o():Go(o)};function Ko(t,e,n,i){const s={},o=i(t,{});for(const d in o)s[d]=ie(o[d]);let{initial:r,animate:a}=t;const l=ye(t),c=$i(t);e&&c&&!l&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||r===!1;const h=u?a:r;return h&&typeof h!="boolean"&&!ve(h)&&(Array.isArray(h)?h:[h]).forEach(f=>{const p=an(t,f);if(!p)return;const{transitionEnd:m,transition:b,...x}=p;for(const y in x){let g=x[y];if(Array.isArray(g)){const w=u?g.length-1:0;g=g[w]}g!==null&&(s[y]=g)}for(const y in m)s[y]=m[y]}),s}const j=t=>t;class Dn{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 n=this.order.indexOf(e);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function $o(t){let e=new Dn,n=new Dn,i=0,s=!1,o=!1;const r=new WeakSet,a={schedule:(l,c=!1,u=!1)=>{const h=u&&s,d=h?e:n;return c&&r.add(l),d.add(l)&&h&&s&&(i=e.order.length),l},cancel:l=>{n.remove(l),r.delete(l)},process:l=>{if(s){o=!0;return}if(s=!0,[e,n]=[n,e],n.clear(),i=e.order.length,i)for(let c=0;c<i;c++){const u=e.order[c];u(l),r.has(u)&&(a.schedule(u),t())}s=!1,o&&(o=!1,a.process(l))}};return a}const Zt=["prepare","read","update","preRender","render","postRender"],Qo=40;function Zo(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=Zt.reduce((h,d)=>(h[d]=$o(()=>n=!0),h),{}),r=h=>o[h].process(s),a=()=>{const h=performance.now();n=!1,s.delta=i?1e3/60:Math.max(Math.min(h-s.timestamp,Qo),1),s.timestamp=h,s.isProcessing=!0,Zt.forEach(r),s.isProcessing=!1,n&&e&&(i=!1,t(a))},l=()=>{n=!0,i=!0,s.isProcessing||t(a)};return{schedule:Zt.reduce((h,d)=>{const f=o[d];return h[d]=(p,m=!1,b=!1)=>(n||l(),f.schedule(p,m,b)),h},{}),cancel:h=>Zt.forEach(d=>o[d].cancel(h)),state:s,steps:o}}const{schedule:E,cancel:J,state:B,steps:Pe}=Zo(typeof requestAnimationFrame<"u"?requestAnimationFrame:j,!0),Jo={useVisualState:hs({scrapeMotionValuesFromProps:us,createRenderState:os,onMount:(t,e,{renderState:n,latestValues:i})=>{E.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),E.render(()=>{sn(n,i,{enableHardwareAcceleration:!1},rn(e.tagName),t.transformTemplate),cs(e,n)})}})},ta={useVisualState:hs({scrapeMotionValuesFromProps:on,createRenderState:nn})};function ea(t,{forwardMotionProps:e=!1},n,i){return{...tn(t)?Jo:ta,preloadedFeatures:n,useRender:Ho(e),createVisualElement:i,Component:t}}function $(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const ds=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function xe(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const na=t=>e=>ds(e)&&t(e,xe(e));function Q(t,e,n,i){return $(t,e,na(n),i)}const ia=(t,e)=>n=>e(t(n)),ot=(...t)=>t.reduce(ia);function fs(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const Ln=fs("dragHorizontal"),Rn=fs("dragVertical");function ps(t){let e=!1;if(t==="y")e=Rn();else if(t==="x")e=Ln();else{const n=Ln(),i=Rn();n&&i?e=()=>{n(),i()}:(n&&n(),i&&i())}return e}function ms(){const t=ps(!0);return t?(t(),!1):!0}class ht{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Bn(t,e){const n="pointer"+(e?"enter":"leave"),i="onHover"+(e?"Start":"End"),s=(o,r)=>{if(o.pointerType==="touch"||ms())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e),a[i]&&E.update(()=>a[i](o,r))};return Q(t.current,n,s,{passive:!t.getProps()[i]})}class sa extends ht{mount(){this.unmount=ot(Bn(this.node,!0),Bn(this.node,!1))}unmount(){}}class ra extends ht{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{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=ot($(this.node.current,"focus",()=>this.onFocus()),$(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const gs=(t,e)=>e?t===e?!0:gs(t,e.parentElement):!1;function Ce(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,xe(n))}class oa extends ht{constructor(){super(...arguments),this.removeStartListeners=j,this.removeEndListeners=j,this.removeAccessibleListeners=j,this.startPointerPress=(e,n)=>{if(this.isPressing)return;this.removeEndListeners();const i=this.node.getProps(),o=Q(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:h}=this.node.getProps();E.update(()=>{!h&&!gs(this.node.current,a.target)?u&&u(a,l):c&&c(a,l)})},{passive:!(i.onTap||i.onPointerUp)}),r=Q(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(i.onTapCancel||i.onPointerCancel)});this.removeEndListeners=ot(o,r),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=o=>{if(o.key!=="Enter"||this.isPressing)return;const r=a=>{a.key!=="Enter"||!this.checkPressEnd()||Ce("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&E.update(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=$(this.node.current,"keyup",r),Ce("down",(a,l)=>{this.startPress(a,l)})},n=$(this.node.current,"keydown",e),i=()=>{this.isPressing&&Ce("cancel",(o,r)=>this.cancelPress(o,r))},s=$(this.node.current,"blur",i);this.removeAccessibleListeners=ot(n,s)}}startPress(e,n){this.isPressing=!0;const{onTapStart:i,whileTap:s}=this.node.getProps();s&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),i&&E.update(()=>i(e,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!ms()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:i}=this.node.getProps();i&&E.update(()=>i(e,n))}mount(){const e=this.node.getProps(),n=Q(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),i=$(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=ot(n,i)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Fe=new WeakMap,ke=new WeakMap,aa=t=>{const e=Fe.get(t.target);e&&e(t)},la=t=>{t.forEach(aa)};function ca({root:t,...e}){const n=t||document;ke.has(n)||ke.set(n,{});const i=ke.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(la,{root:t,...e})),i[s]}function ua(t,e,n){const i=ca(e);return Fe.set(t,n),i.observe(t),()=>{Fe.delete(t),i.unobserve(t)}}const ha={some:0,all:1};class da extends ht{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:i,amount:s="some",once:o}=e,r={root:n?n.current:void 0,rootMargin:i,threshold:typeof s=="number"?s:ha[s]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,o&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:h}=this.node.getProps(),d=c?u:h;d&&d(l)};return ua(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(fa(e,n))&&this.startObserver()}unmount(){}}function fa({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const pa={inView:{Feature:da},tap:{Feature:oa},focus:{Feature:ra},hover:{Feature:sa}};function vs(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}function ma(t){const e={};return t.values.forEach((n,i)=>e[i]=n.get()),e}function ga(t){const e={};return t.values.forEach((n,i)=>e[i]=n.getVelocity()),e}function we(t,e,n){const i=t.getProps();return an(i,e,n!==void 0?n:i.custom,ma(t),ga(t))}let qt=j,Y=j;process.env.NODE_ENV!=="production"&&(qt=(t,e)=>{!t&&typeof console<"u"&&console.warn(e)},Y=(t,e)=>{if(!t)throw new Error(e)});const at=t=>t*1e3,Z=t=>t/1e3,va={current:!1},ys=t=>Array.isArray(t)&&typeof t[0]=="number";function bs(t){return!!(!t||typeof t=="string"&&xs[t]||ys(t)||Array.isArray(t)&&t.every(bs))}const Bt=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,xs={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Bt([0,.65,.55,1]),circOut:Bt([.55,0,1,.45]),backIn:Bt([.31,.01,.66,-.59]),backOut:Bt([.33,1.53,.69,.99])};function ws(t){if(t)return ys(t)?Bt(t):Array.isArray(t)?t.map(ws):xs[t]}function ya(t,e,n,{delay:i=0,duration:s,repeat:o=0,repeatType:r="loop",ease:a,times:l}={}){const c={[e]:n};l&&(c.offset=l);const u=ws(a);return Array.isArray(u)&&(c.easing=u),t.animate(c,{delay:i,duration:s,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"})}function ba(t,{repeat:e,repeatType:n="loop"}){const i=e&&n!=="loop"&&e%2===1?0:t.length-1;return t[i]}const Ss=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,xa=1e-7,wa=12;function Sa(t,e,n,i,s){let o,r,a=0;do r=e+(n-e)/2,o=Ss(r,i,s)-t,o>0?n=r:e=r;while(Math.abs(o)>xa&&++a<wa);return r}function Xt(t,e,n,i){if(t===e&&n===i)return j;const s=o=>Sa(o,0,1,t,n);return o=>o===0||o===1?o:Ss(s(o),e,i)}const Ta=Xt(.42,0,1,1),Aa=Xt(0,0,.58,1),Ts=Xt(.42,0,.58,1),Pa=t=>Array.isArray(t)&&typeof t[0]!="number",As=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Ps=t=>e=>1-t(1-e),ln=t=>1-Math.sin(Math.acos(t)),Cs=Ps(ln),Ca=As(ln),ks=Xt(.33,1.53,.69,.99),cn=Ps(ks),ka=As(cn),Va=t=>(t*=2)<1?.5*cn(t):.5*(2-Math.pow(2,-10*(t-1))),Nn={linear:j,easeIn:Ta,easeInOut:Ts,easeOut:Aa,circIn:ln,circInOut:Ca,circOut:Cs,backIn:cn,backInOut:ka,backOut:ks,anticipate:Va},Fn=t=>{if(Array.isArray(t)){Y(t.length===4,"Cubic bezier arrays must contain four numerical values.");const[e,n,i,s]=t;return Xt(e,n,i,s)}else if(typeof t=="string")return Y(Nn[t]!==void 0,`Invalid easing type '${t}'`),Nn[t];return t},un=(t,e)=>n=>!!(Gt(n)&&Mo.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),Vs=(t,e,n)=>i=>{if(!Gt(i))return i;const[s,o,r,a]=i.match(be);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},Ea=t=>lt(0,255,t),Ve={...yt,transform:t=>Math.round(Ea(t))},gt={test:un("rgb","red"),parse:Vs("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+Ve.transform(t)+", "+Ve.transform(e)+", "+Ve.transform(n)+", "+Ft(Nt.transform(i))+")"};function Ma(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}}const Ie={test:un("#"),parse:Ma,transform:gt.transform},Pt={test:un("hsl","hue"),parse:Vs("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+q.transform(Ft(e))+", "+q.transform(Ft(n))+", "+Ft(Nt.transform(i))+")"},F={test:t=>gt.test(t)||Ie.test(t)||Pt.test(t),parse:t=>gt.test(t)?gt.parse(t):Pt.test(t)?Pt.parse(t):Ie.parse(t),transform:t=>Gt(t)?t:t.hasOwnProperty("red")?gt.transform(t):Pt.transform(t)},O=(t,e,n)=>-n*t+n*e+t;function Ee(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Oa({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,e/=100,n/=100;let s=0,o=0,r=0;if(!e)s=o=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;s=Ee(l,a,t+1/3),o=Ee(l,a,t),r=Ee(l,a,t-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:i}}const Me=(t,e,n)=>{const i=t*t;return Math.sqrt(Math.max(0,n*(e*e-i)+i))},ja=[Ie,gt,Pt],Da=t=>ja.find(e=>e.test(t));function In(t){const e=Da(t);Y(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`);let n=e.parse(t);return e===Pt&&(n=Oa(n)),n}const Es=(t,e)=>{const n=In(t),i=In(e),s={...n};return o=>(s.red=Me(n.red,i.red,o),s.green=Me(n.green,i.green,o),s.blue=Me(n.blue,i.blue,o),s.alpha=O(n.alpha,i.alpha,o),gt.transform(s))};function La(t){var e,n;return isNaN(t)&&Gt(t)&&(((e=t.match(be))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(ns))===null||n===void 0?void 0:n.length)||0)>0}const Ms={regex:Vo,countKey:"Vars",token:"${v}",parse:j},Os={regex:ns,countKey:"Colors",token:"${c}",parse:F.parse},js={regex:be,countKey:"Numbers",token:"${n}",parse:yt.parse};function Oe(t,{regex:e,countKey:n,token:i,parse:s}){const o=t.tokenised.match(e);o&&(t["num"+n]=o.length,t.tokenised=t.tokenised.replace(e,i),t.values.push(...o.map(s)))}function ue(t){const e=t.toString(),n={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&Oe(n,Ms),Oe(n,Os),Oe(n,js),n}function Ds(t){return ue(t).values}function Ls(t){const{values:e,numColors:n,numVars:i,tokenised:s}=ue(t),o=e.length;return r=>{let a=s;for(let l=0;l<o;l++)l<i?a=a.replace(Ms.token,r[l]):l<i+n?a=a.replace(Os.token,F.transform(r[l])):a=a.replace(js.token,Ft(r[l]));return a}}const Ra=t=>typeof t=="number"?0:t;function Ba(t){const e=Ds(t);return Ls(t)(e.map(Ra))}const ct={test:La,parse:Ds,createTransformer:Ls,getAnimatableNone:Ba},Rs=(t,e)=>n=>`${n>0?e:t}`;function Bs(t,e){return typeof t=="number"?n=>O(t,e,n):F.test(t)?Es(t,e):t.startsWith("var(")?Rs(t,e):Fs(t,e)}const Ns=(t,e)=>{const n=[...t],i=n.length,s=t.map((o,r)=>Bs(o,e[r]));return o=>{for(let r=0;r<i;r++)n[r]=s[r](o);return n}},Na=(t,e)=>{const n={...t,...e},i={};for(const s in n)t[s]!==void 0&&e[s]!==void 0&&(i[s]=Bs(t[s],e[s]));return s=>{for(const o in i)n[o]=i[o](s);return n}},Fs=(t,e)=>{const n=ct.createTransformer(e),i=ue(t),s=ue(e);return i.numVars===s.numVars&&i.numColors===s.numColors&&i.numNumbers>=s.numNumbers?ot(Ns(i.values,s.values),n):(qt(!0,`Complex values '${t}' and '${e}' 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.`),Rs(t,e))},Ut=(t,e,n)=>{const i=e-t;return i===0?1:(n-t)/i},zn=(t,e)=>n=>O(t,e,n);function Fa(t){return typeof t=="number"?zn:typeof t=="string"?F.test(t)?Es:Fs:Array.isArray(t)?Ns:typeof t=="object"?Na:zn}function Ia(t,e,n){const i=[],s=n||Fa(t[0]),o=t.length-1;for(let r=0;r<o;r++){let a=s(t[r],t[r+1]);if(e){const l=Array.isArray(e)?e[r]||j:e;a=ot(l,a)}i.push(a)}return i}function Is(t,e,{clamp:n=!0,ease:i,mixer:s}={}){const o=t.length;if(Y(o===e.length,"Both input and output ranges must be the same length"),o===1)return()=>e[0];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=Ia(e,i,s),a=r.length,l=c=>{let u=0;if(a>1)for(;u<t.length-2&&!(c<t[u+1]);u++);const h=Ut(t[u],t[u+1],c);return r[u](h)};return n?c=>l(lt(t[0],t[o-1],c)):l}function za(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=Ut(0,e,i);t.push(O(n,1,s))}}function Wa(t){const e=[0];return za(e,t.length-1),e}function _a(t,e){return t.map(n=>n*e)}function Ua(t,e){return t.map(()=>e||Ts).splice(0,t.length-1)}function he({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=Pa(i)?i.map(Fn):Fn(i),o={done:!1,value:e[0]},r=_a(n&&n.length===e.length?n:Wa(e),t),a=Is(r,e,{ease:Array.isArray(s)?s:Ua(e,s)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}function zs(t,e){return e?t*(1e3/e):0}const Ha=5;function Ws(t,e,n){const i=Math.max(e-Ha,0);return zs(n-t(i),e-i)}const je=.001,Ga=.01,Wn=10,Ya=.05,qa=1;function Xa({duration:t=800,bounce:e=.25,velocity:n=0,mass:i=1}){let s,o;qt(t<=at(Wn),"Spring duration must be 10 seconds or less");let r=1-e;r=lt(Ya,qa,r),t=lt(Ga,Wn,Z(t)),r<1?(s=c=>{const u=c*r,h=u*t,d=u-n,f=ze(c,r),p=Math.exp(-h);return je-d/f*p},o=c=>{const h=c*r*t,d=h*n+n,f=Math.pow(r,2)*Math.pow(c,2)*t,p=Math.exp(-h),m=ze(Math.pow(c,2),r);return(-s(c)+je>0?-1:1)*((d-f)*p)/m}):(s=c=>{const u=Math.exp(-c*t),h=(c-n)*t+1;return-je+u*h},o=c=>{const u=Math.exp(-c*t),h=(n-c)*(t*t);return u*h});const a=5/t,l=$a(s,o,a);if(t=at(t),isNaN(l))return{stiffness:100,damping:10,duration:t};{const c=Math.pow(l,2)*i;return{stiffness:c,damping:r*2*Math.sqrt(i*c),duration:t}}}const Ka=12;function $a(t,e,n){let i=n;for(let s=1;s<Ka;s++)i=i-t(i)/e(i);return i}function ze(t,e){return t*Math.sqrt(1-e*e)}const Qa=["duration","bounce"],Za=["stiffness","damping","mass"];function _n(t,e){return e.some(n=>t[n]!==void 0)}function Ja(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!_n(t,Za)&&_n(t,Qa)){const n=Xa(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}function _s({keyframes:t,restDelta:e,restSpeed:n,...i}){const s=t[0],o=t[t.length-1],r={done:!1,value:s},{stiffness:a,damping:l,mass:c,duration:u,velocity:h,isResolvedFromDuration:d}=Ja({...i,velocity:-Z(i.velocity||0)}),f=h||0,p=l/(2*Math.sqrt(a*c)),m=o-s,b=Z(Math.sqrt(a/c)),x=Math.abs(m)<5;n||(n=x?.01:2),e||(e=x?.005:.5);let y;if(p<1){const g=ze(b,p);y=w=>{const P=Math.exp(-p*b*w);return o-P*((f+p*b*m)/g*Math.sin(g*w)+m*Math.cos(g*w))}}else if(p===1)y=g=>o-Math.exp(-b*g)*(m+(f+b*m)*g);else{const g=b*Math.sqrt(p*p-1);y=w=>{const P=Math.exp(-p*b*w),S=Math.min(g*w,300);return o-P*((f+p*b*m)*Math.sinh(S)+g*m*Math.cosh(S))/g}}return{calculatedDuration:d&&u||null,next:g=>{const w=y(g);if(d)r.done=g>=u;else{let P=f;g!==0&&(p<1?P=Ws(y,g,w):P=0);const S=Math.abs(P)<=n,k=Math.abs(o-w)<=e;r.done=S&&k}return r.value=r.done?o:w,r}}}function Un({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],d={done:!1,value:h},f=C=>a!==void 0&&C<a||l!==void 0&&C>l,p=C=>a===void 0?l:l===void 0||Math.abs(a-C)<Math.abs(l-C)?a:l;let m=n*e;const b=h+m,x=r===void 0?b:r(b);x!==b&&(m=x-h);const y=C=>-m*Math.exp(-C/i),g=C=>x+y(C),w=C=>{const V=y(C),X=g(C);d.done=Math.abs(V)<=c,d.value=d.done?x:X};let P,S;const k=C=>{f(d.value)&&(P=C,S=_s({keyframes:[d.value,p(d.value)],velocity:Ws(g,C,d.value),damping:s,stiffness:o,restDelta:c,restSpeed:u}))};return k(0),{calculatedDuration:null,next:C=>{let V=!1;return!S&&P===void 0&&(V=!0,w(C),k(C)),P!==void 0&&C>P?S.next(C-P):(!V&&w(C),d)}}}const tl=t=>{const e=({timestamp:n})=>t(n);return{start:()=>E.update(e,!0),stop:()=>J(e),now:()=>B.isProcessing?B.timestamp:performance.now()}},Hn=2e4;function Gn(t){let e=0;const n=50;let i=t.next(e);for(;!i.done&&e<Hn;)e+=n,i=t.next(e);return e>=Hn?1/0:e}const el={decay:Un,inertia:Un,tween:he,keyframes:he,spring:_s};function de({autoplay:t=!0,delay:e=0,driver:n=tl,keyframes:i,type:s="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:a="loop",onPlay:l,onStop:c,onComplete:u,onUpdate:h,...d}){let f=1,p=!1,m,b;const x=()=>{b=new Promise(M=>{m=M})};x();let y;const g=el[s]||he;let w;g!==he&&typeof i[0]!="number"&&(process.env.NODE_ENV!=="production"&&Y(i.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${i}`),w=Is([0,100],i,{clamp:!1}),i=[0,100]);const P=g({...d,keyframes:i});let S;a==="mirror"&&(S=g({...d,keyframes:[...i].reverse(),velocity:-(d.velocity||0)}));let k="idle",C=null,V=null,X=null;P.calculatedDuration===null&&o&&(P.calculatedDuration=Gn(P));const{calculatedDuration:bt}=P;let G=1/0,K=1/0;bt!==null&&(G=bt+r,K=G*(o+1)-r);let N=0;const xt=M=>{if(V===null)return;f>0&&(V=Math.min(V,M)),f<0&&(V=Math.min(M-K/f,V)),C!==null?N=C:N=Math.round(M-V)*f;const Ot=N-e*(f>=0?1:-1),bn=f>=0?Ot<0:Ot>K;N=Math.max(Ot,0),k==="finished"&&C===null&&(N=K);let xn=N,wn=P;if(o){const Se=Math.min(N,K)/G;let Kt=Math.floor(Se),dt=Se%1;!dt&&Se>=1&&(dt=1),dt===1&&Kt--,Kt=Math.min(Kt,o+1),!!(Kt%2)&&(a==="reverse"?(dt=1-dt,r&&(dt-=r/G)):a==="mirror"&&(wn=S)),xn=lt(0,1,dt)*G}const jt=bn?{done:!1,value:i[0]}:wn.next(xn);w&&(jt.value=w(jt.value));let{done:Sn}=jt;!bn&&bt!==null&&(Sn=f>=0?N>=K:N<=0);const vr=C===null&&(k==="finished"||k==="running"&&Sn);return h&&h(jt.value),vr&&Mt(),jt},R=()=>{y&&y.stop(),y=void 0},tt=()=>{k="idle",R(),m(),x(),V=X=null},Mt=()=>{k="finished",u&&u(),R(),m()},wt=()=>{if(p)return;y||(y=n(xt));const M=y.now();l&&l(),C!==null?V=M-C:(!V||k==="finished")&&(V=M),k==="finished"&&x(),X=V,C=null,k="running",y.start()};t&&wt();const yn={then(M,Ot){return b.then(M,Ot)},get time(){return Z(N)},set time(M){M=at(M),N=M,C!==null||!y||f===0?C=M:V=y.now()-M/f},get duration(){const M=P.calculatedDuration===null?Gn(P):P.calculatedDuration;return Z(M)},get speed(){return f},set speed(M){M===f||!y||(f=M,yn.time=Z(N))},get state(){return k},play:wt,pause:()=>{k="paused",C=N},stop:()=>{p=!0,k!=="idle"&&(k="idle",c&&c(),tt())},cancel:()=>{X!==null&&xt(X),tt()},complete:()=>{k="finished"},sample:M=>(V=0,xt(M))};return yn}function nl(t){let e;return()=>(e===void 0&&(e=t()),e)}const il=nl(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),sl=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Jt=10,rl=2e4,ol=(t,e)=>e.type==="spring"||t==="backgroundColor"||!bs(e.ease);function al(t,e,{onUpdate:n,onComplete:i,...s}){if(!(il()&&sl.has(e)&&!s.repeatDelay&&s.repeatType!=="mirror"&&s.damping!==0&&s.type!=="inertia"))return!1;let r=!1,a,l,c=!1;const u=()=>{l=new Promise(g=>{a=g})};u();let{keyframes:h,duration:d=300,ease:f,times:p}=s;if(ol(e,s)){const g=de({...s,repeat:0,delay:0});let w={done:!1,value:h[0]};const P=[];let S=0;for(;!w.done&&S<rl;)w=g.sample(S),P.push(w.value),S+=Jt;p=void 0,h=P,d=S-Jt,f="linear"}const m=ya(t.owner.current,e,h,{...s,duration:d,ease:f,times:p}),b=()=>{c=!1,m.cancel()},x=()=>{c=!0,E.update(b),a(),u()};return m.onfinish=()=>{c||(t.set(ba(h,s)),i&&i(),x())},{then(g,w){return l.then(g,w)},attachTimeline(g){return m.timeline=g,m.onfinish=null,j},get time(){return Z(m.currentTime||0)},set time(g){m.currentTime=at(g)},get speed(){return m.playbackRate},set speed(g){m.playbackRate=g},get duration(){return Z(d)},play:()=>{r||(m.play(),J(b))},pause:()=>m.pause(),stop:()=>{if(r=!0,m.playState==="idle")return;const{currentTime:g}=m;if(g){const w=de({...s,autoplay:!1});t.setWithVelocity(w.sample(g-Jt).value,w.sample(g).value,Jt)}x()},complete:()=>{c||m.finish()},cancel:x}}function ll({keyframes:t,delay:e,onUpdate:n,onComplete:i}){const s=()=>(n&&n(t[t.length-1]),i&&i(),{time:0,speed:1,duration:0,play:j,pause:j,stop:j,then:o=>(o(),Promise.resolve()),cancel:j,complete:j});return e?de({keyframes:[0,1],duration:0,delay:e,onComplete:s}):s()}const cl={type:"spring",stiffness:500,damping:25,restSpeed:10},ul=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),hl={type:"keyframes",duration:.8},dl={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},fl=(t,{keyframes:e})=>e.length>2?hl:vt.has(t)?t.startsWith("scale")?ul(e[1]):cl:dl,We=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ct.test(e)||e==="0")&&!e.startsWith("url(")),pl=new Set(["brightness","contrast","saturate","opacity"]);function ml(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[i]=n.match(be)||[];if(!i)return t;const s=n.replace(i,"");let o=pl.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const gl=/([a-z-]*)\(.*?\)/g,_e={...ct,getAnimatableNone:t=>{const e=t.match(gl);return e?e.map(ml).join(" "):t}},vl={...is,color:F,backgroundColor:F,outlineColor:F,fill:F,stroke:F,borderColor:F,borderTopColor:F,borderRightColor:F,borderBottomColor:F,borderLeftColor:F,filter:_e,WebkitFilter:_e},hn=t=>vl[t];function Us(t,e){let n=hn(t);return n!==_e&&(n=ct),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Hs=t=>/^0[^.\s]+$/.test(t);function yl(t){if(typeof t=="number")return t===0;if(t!==null)return t==="none"||t==="0"||Hs(t)}function bl(t,e,n,i){const s=We(e,n);let o;Array.isArray(n)?o=[...n]:o=[null,n];const r=i.from!==void 0?i.from:t.get();let a;const l=[];for(let c=0;c<o.length;c++)o[c]===null&&(o[c]=c===0?r:o[c-1]),yl(o[c])&&l.push(c),typeof o[c]=="string"&&o[c]!=="none"&&o[c]!=="0"&&(a=o[c]);if(s&&l.length&&a)for(let c=0;c<l.length;c++){const u=l[c];o[u]=Us(e,a)}return o}function xl({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function dn(t,e){return t[e]||t.default||t}const wl={skipAnimations:!1},fn=(t,e,n,i={})=>s=>{const o=dn(i,t)||{},r=o.delay||i.delay||0;let{elapsed:a=0}=i;a=a-at(r);const l=bl(e,t,n,o),c=l[0],u=l[l.length-1],h=We(t,c),d=We(t,u);qt(h===d,`You are trying to animate ${t} from "${c}" to "${u}". ${c} is not an animatable value - to enable this animation set ${c} to a value animatable to ${u} via the \`style\` property.`);let f={keyframes:l,velocity:e.getVelocity(),ease:"easeOut",...o,delay:-a,onUpdate:p=>{e.set(p),o.onUpdate&&o.onUpdate(p)},onComplete:()=>{s(),o.onComplete&&o.onComplete()}};if(xl(o)||(f={...f,...fl(t,f)}),f.duration&&(f.duration=at(f.duration)),f.repeatDelay&&(f.repeatDelay=at(f.repeatDelay)),!h||!d||va.current||o.type===!1||wl.skipAnimations)return ll(f);if(!i.isHandoff&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const p=al(e,t,f);if(p)return p}return de(f)};function fe(t){return!!(z(t)&&t.add)}const Gs=t=>/^\-?\d*\.?\d+$/.test(t);function pn(t,e){t.indexOf(e)===-1&&t.push(e)}function mn(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class gn{constructor(){this.subscriptions=[]}add(e){return pn(this.subscriptions,e),()=>mn(this.subscriptions,e)}notify(e,n,i){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,n,i);else for(let o=0;o<s;o++){const r=this.subscriptions[o];r&&r(e,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Yn=new Set;function vn(t,e,n){t||Yn.has(e)||(console.warn(e),n&&console.warn(n),Yn.add(e))}const Sl=t=>!isNaN(parseFloat(t));class Tl{constructor(e,n={}){this.version="10.18.0",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(i,s=!0)=>{this.prev=this.current,this.current=i;const{delta:o,timestamp:r}=B;this.lastUpdated!==r&&(this.timeDelta=o,this.lastUpdated=r,E.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>E.postRender(this.velocityCheck),this.velocityCheck=({timestamp:i})=>{i!==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=Sl(this.current),this.owner=n.owner}onChange(e){return process.env.NODE_ENV!=="production"&&vn(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new gn);const i=this.events[e].add(n);return e==="change"?()=>{i(),E.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,i){this.set(n),this.prev=e,this.timeDelta=i}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?zs(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Vt(t,e){return new Tl(t,e)}const Ys=t=>e=>e.test(t),Al={test:t=>t==="auto",parse:t=>t},qs=[yt,A,q,st,jo,Oo,Al],Lt=t=>qs.find(Ys(t)),Pl=[...qs,F,ct],Cl=t=>Pl.find(Ys(t));function kl(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Vt(n))}function Vl(t,e){const n=we(t,e);let{transitionEnd:i={},transition:s={},...o}=n?t.makeTargetAnimatable(n,!1):{};o={...o,...i};for(const r in o){const a=qo(o[r]);kl(t,r,a)}}function El(t,e,n){var i,s;const o=Object.keys(e).filter(a=>!t.hasValue(a)),r=o.length;if(r)for(let a=0;a<r;a++){const l=o[a],c=e[l];let u=null;Array.isArray(c)&&(u=c[0]),u===null&&(u=(s=(i=n[l])!==null&&i!==void 0?i:t.readValue(l))!==null&&s!==void 0?s:e[l]),u!=null&&(typeof u=="string"&&(Gs(u)||Hs(u))?u=parseFloat(u):!Cl(u)&&ct.test(c)&&(u=Us(l,c)),t.addValue(l,Vt(u,{owner:t})),n[l]===void 0&&(n[l]=u),u!==null&&t.setBaseTarget(l,u))}}function Ml(t,e){return e?(e[t]||e.default||e).from:void 0}function Ol(t,e,n){const i={};for(const s in t){const o=Ml(s,e);if(o!==void 0)i[s]=o;else{const r=n.getValue(s);r&&(i[s]=r.get())}}return i}function jl({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,i}function Dl(t,e){const n=t.get();if(Array.isArray(e)){for(let i=0;i<e.length;i++)if(e[i]!==n)return!0}else return n!==e}function Xs(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=t.makeTargetAnimatable(e);const l=t.getValue("willChange");i&&(o=i);const c=[],u=s&&t.animationState&&t.animationState.getState()[s];for(const h in a){const d=t.getValue(h),f=a[h];if(!d||f===void 0||u&&jl(u,h))continue;const p={delay:n,elapsed:0,...dn(o||{},h)};if(window.HandoffAppearAnimations){const x=t.getProps()[Ki];if(x){const y=window.HandoffAppearAnimations(x,h,d,E);y!==null&&(p.elapsed=y,p.isHandoff=!0)}}let m=!p.isHandoff&&!Dl(d,f);if(p.type==="spring"&&(d.getVelocity()||p.velocity)&&(m=!1),d.animation&&(m=!1),m)continue;d.start(fn(h,d,f,t.shouldReduceMotion&&vt.has(h)?{type:!1}:p));const b=d.animation;fe(l)&&(l.add(h),b.then(()=>l.remove(h))),c.push(b)}return r&&Promise.all(c).then(()=>{r&&Vl(t,r)}),c}function Ue(t,e,n={}){const i=we(t,e,n.custom);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(Xs(t,i,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:h}=s;return Ll(t,e,c+l,u,h,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[l,c]=a==="beforeChildren"?[o,r]:[r,o];return l().then(()=>c())}else return Promise.all([o(),r(n.delay)])}function Ll(t,e,n=0,i=0,s=1,o){const r=[],a=(t.variantChildren.size-1)*i,l=s===1?(c=0)=>c*i:(c=0)=>a-c*i;return Array.from(t.variantChildren).sort(Rl).forEach((c,u)=>{c.notify("AnimationStart",e),r.push(Ue(c,e,{...o,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(r)}function Rl(t,e){return t.sortNodePosition(e)}function Bl(t,e,n={}){t.notify("AnimationStart",e);let i;if(Array.isArray(e)){const s=e.map(o=>Ue(t,o,n));i=Promise.all(s)}else if(typeof e=="string")i=Ue(t,e,n);else{const s=typeof e=="function"?we(t,e,n.custom):e;i=Promise.all(Xs(t,s,n))}return i.then(()=>t.notify("AnimationComplete",e))}const Nl=[...Ze].reverse(),Fl=Ze.length;function Il(t){return e=>Promise.all(e.map(({animation:n,options:i})=>Bl(t,n,i)))}function zl(t){let e=Il(t);const n=_l();let i=!0;const s=(l,c)=>{const u=we(t,c);if(u){const{transition:h,transitionEnd:d,...f}=u;l={...l,...f,...d}}return l};function o(l){e=l(t)}function r(l,c){const u=t.getProps(),h=t.getVariantContext(!0)||{},d=[],f=new Set;let p={},m=1/0;for(let x=0;x<Fl;x++){const y=Nl[x],g=n[y],w=u[y]!==void 0?u[y]:h[y],P=Wt(w),S=y===c?g.isActive:null;S===!1&&(m=x);let k=w===h[y]&&w!==u[y]&&P;if(k&&i&&t.manuallyAnimateOnMount&&(k=!1),g.protectedKeys={...p},!g.isActive&&S===null||!w&&!g.prevProp||ve(w)||typeof w=="boolean")continue;let V=Wl(g.prevProp,w)||y===c&&g.isActive&&!k&&P||x>m&&P,X=!1;const bt=Array.isArray(w)?w:[w];let G=bt.reduce(s,{});S===!1&&(G={});const{prevResolvedValues:K={}}=g,N={...K,...G},xt=R=>{V=!0,f.has(R)&&(X=!0,f.delete(R)),g.needsAnimating[R]=!0};for(const R in N){const tt=G[R],Mt=K[R];if(p.hasOwnProperty(R))continue;let wt=!1;ce(tt)&&ce(Mt)?wt=!vs(tt,Mt):wt=tt!==Mt,wt?tt!==void 0?xt(R):f.add(R):tt!==void 0&&f.has(R)?xt(R):g.protectedKeys[R]=!0}g.prevProp=w,g.prevResolvedValues=G,g.isActive&&(p={...p,...G}),i&&t.blockInitialAnimation&&(V=!1),V&&(!k||X)&&d.push(...bt.map(R=>({animation:R,options:{type:y,...l}})))}if(f.size){const x={};f.forEach(y=>{const g=t.getBaseTarget(y);g!==void 0&&(x[y]=g)}),d.push({animation:x})}let b=!!d.length;return i&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(b=!1),i=!1,b?e(d):Promise.resolve()}function a(l,c,u){var h;if(n[l].isActive===c)return Promise.resolve();(h=t.variantChildren)===null||h===void 0||h.forEach(f=>{var p;return(p=f.animationState)===null||p===void 0?void 0:p.setActive(l,c)}),n[l].isActive=c;const d=r(u,l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n}}function Wl(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!vs(e,t):!1}function ft(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function _l(){return{animate:ft(!0),whileInView:ft(),whileHover:ft(),whileTap:ft(),whileDrag:ft(),whileFocus:ft(),exit:ft()}}class Ul extends ht{constructor(e){super(e),e.animationState||(e.animationState=zl(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),ve(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let Hl=0;class Gl extends ht{constructor(){super(...arguments),this.id=Hl++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n,custom:i}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const o=this.node.animationState.setActive("exit",!e,{custom:i??this.node.getProps().custom});n&&!e&&o.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const Yl={animation:{Feature:Ul},exit:{Feature:Gl}},qn=(t,e)=>Math.abs(t-e);function ql(t,e){const n=qn(t.x,e.x),i=qn(t.y,e.y);return Math.sqrt(n**2+i**2)}class Ks{constructor(e,n,{transformPagePoint:i,contextWindow:s,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=Le(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,f=ql(h.offset,{x:0,y:0})>=3;if(!d&&!f)return;const{point:p}=h,{timestamp:m}=B;this.history.push({...p,timestamp:m});const{onStart:b,onMove:x}=this.handlers;d||(b&&b(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,h)},this.handlePointerMove=(h,d)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=De(d,this.transformPagePoint),E.update(this.updatePoint,!0)},this.handlePointerUp=(h,d)=>{this.end();const{onEnd:f,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Le(h.type==="pointercancel"?this.lastMoveEventInfo:De(d,this.transformPagePoint),this.history);this.startEvent&&f&&f(h,b),p&&p(h,b)},!ds(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=i,this.contextWindow=s||window;const r=xe(e),a=De(r,this.transformPagePoint),{point:l}=a,{timestamp:c}=B;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(e,Le(a,this.history)),this.removeListeners=ot(Q(this.contextWindow,"pointermove",this.handlePointerMove),Q(this.contextWindow,"pointerup",this.handlePointerUp),Q(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),J(this.updatePoint)}}function De(t,e){return e?{point:e(t.point)}:t}function Xn(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Le({point:t},e){return{point:t,delta:Xn(t,$s(e)),offset:Xn(t,Xl(e)),velocity:Kl(e,.1)}}function Xl(t){return t[0]}function $s(t){return t[t.length-1]}function Kl(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=$s(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>at(e)));)n--;if(!i)return{x:0,y:0};const o=Z(s.timestamp-i.timestamp);if(o===0)return{x:0,y:0};const r={x:(s.x-i.x)/o,y:(s.y-i.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function _(t){return t.max-t.min}function He(t,e=0,n=.01){return Math.abs(t-e)<=n}function Kn(t,e,n,i=.5){t.origin=i,t.originPoint=O(e.min,e.max,t.origin),t.scale=_(n)/_(e),(He(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=O(n.min,n.max,t.origin)-t.originPoint,(He(t.translate)||isNaN(t.translate))&&(t.translate=0)}function It(t,e,n,i){Kn(t.x,e.x,n.x,i?i.originX:void 0),Kn(t.y,e.y,n.y,i?i.originY:void 0)}function $n(t,e,n){t.min=n.min+e.min,t.max=t.min+_(e)}function $l(t,e,n){$n(t.x,e.x,n.x),$n(t.y,e.y,n.y)}function Qn(t,e,n){t.min=e.min-n.min,t.max=t.min+_(e)}function zt(t,e,n){Qn(t.x,e.x,n.x),Qn(t.y,e.y,n.y)}function Ql(t,{min:e,max:n},i){return e!==void 0&&t<e?t=i?O(e,t,i.min):Math.max(t,e):n!==void 0&&t>n&&(t=i?O(n,t,i.max):Math.min(t,n)),t}function Zn(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function Zl(t,{top:e,left:n,bottom:i,right:s}){return{x:Zn(t.x,n,s),y:Zn(t.y,e,i)}}function Jn(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}function Jl(t,e){return{x:Jn(t.x,e.x),y:Jn(t.y,e.y)}}function tc(t,e){let n=.5;const i=_(t),s=_(e);return s>i?n=Ut(e.min,e.max-i,t.min):i>s&&(n=Ut(t.min,t.max-s,e.min)),lt(0,1,n)}function ec(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Ge=.35;function nc(t=Ge){return t===!1?t=0:t===!0&&(t=Ge),{x:ti(t,"left","right"),y:ti(t,"top","bottom")}}function ti(t,e,n){return{min:ei(t,e),max:ei(t,n)}}function ei(t,e){return typeof t=="number"?t:t[e]||0}const ni=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ct=()=>({x:ni(),y:ni()}),ii=()=>({min:0,max:0}),L=()=>({x:ii(),y:ii()});function H(t){return[t("x"),t("y")]}function Qs({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function ic({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function sc(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function Re(t){return t===void 0||t===1}function Ye({scale:t,scaleX:e,scaleY:n}){return!Re(t)||!Re(e)||!Re(n)}function pt(t){return Ye(t)||Zs(t)||t.z||t.rotate||t.rotateX||t.rotateY}function Zs(t){return si(t.x)||si(t.y)}function si(t){return t&&t!=="0%"}function pe(t,e,n){const i=t-n,s=e*i;return n+s}function ri(t,e,n,i,s){return s!==void 0&&(t=pe(t,s,i)),pe(t,n,i)+e}function qe(t,e=0,n=1,i,s){t.min=ri(t.min,e,n,i,s),t.max=ri(t.max,e,n,i,s)}function Js(t,{x:e,y:n}){qe(t.x,e.translate,e.scale,e.originPoint),qe(t.y,n.translate,n.scale,n.originPoint)}function rc(t,e,n,i=!1){const s=n.length;if(!s)return;e.x=e.y=1;let o,r;for(let a=0;a<s;a++){o=n[a],r=o.projectionDelta;const l=o.instance;l&&l.style&&l.style.display==="contents"||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&kt(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Js(t,r)),i&&pt(o.latestValues)&&kt(t,o.latestValues))}e.x=oi(e.x),e.y=oi(e.y)}function oi(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function rt(t,e){t.min=t.min+e,t.max=t.max+e}function ai(t,e,[n,i,s]){const o=e[s]!==void 0?e[s]:.5,r=O(t.min,t.max,o);qe(t,e[n],e[i],r,e.scale)}const oc=["x","scaleX","originX"],ac=["y","scaleY","originY"];function kt(t,e){ai(t.x,e,oc),ai(t.y,e,ac)}function tr(t,e){return Qs(sc(t.getBoundingClientRect(),e))}function lc(t,e,n){const i=tr(t,n),{scroll:s}=e;return s&&(rt(i.x,s.offset.x),rt(i.y,s.offset.y)),i}const er=({current:t})=>t?t.ownerDocument.defaultView:null,cc=new WeakMap;class uc{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=L(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const s=u=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(xe(u,"page").point)},o=(u,h)=>{const{drag:d,dragPropagation:f,onDragStart:p}=this.getProps();if(d&&!f&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=ps(d),!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),H(b=>{let x=this.getAxisMotionValue(b).get()||0;if(q.test(x)){const{projection:y}=this.visualElement;if(y&&y.layout){const g=y.layout.layoutBox[b];g&&(x=_(g)*(parseFloat(x)/100))}}this.originPoint[b]=x}),p&&E.update(()=>p(u,h),!1,!0);const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},r=(u,h)=>{const{dragPropagation:d,dragDirectionLock:f,onDirectionLock:p,onDrag:m}=this.getProps();if(!d&&!this.openGlobalLock)return;const{offset:b}=h;if(f&&this.currentDirection===null){this.currentDirection=hc(b),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",h.point,b),this.updateAxis("y",h.point,b),this.visualElement.render(),m&&m(u,h)},a=(u,h)=>this.stop(u,h),l=()=>H(u=>{var h;return this.getAnimationState(u)==="paused"&&((h=this.getAxisMotionValue(u).animation)===null||h===void 0?void 0:h.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Ks(e,{onSessionStart:s,onStart:o,onMove:r,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:er(this.visualElement)})}stop(e,n){const i=this.isDragging;if(this.cancel(),!i)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:o}=this.getProps();o&&E.update(()=>o(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,i){const{drag:s}=this.getProps();if(!i||!te(e,s,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(r=Ql(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:i}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,o=this.constraints;n&&At(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&s?this.constraints=Zl(s.layoutBox,n):this.constraints=!1,this.elastic=nc(i),o!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&H(r=>{this.getAxisMotionValue(r)&&(this.constraints[r]=ec(s.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!At(e))return!1;const i=e.current;Y(i!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const o=lc(i,s.root,this.visualElement.getTransformPagePoint());let r=Jl(s.layout.layoutBox,o);if(n){const a=n(ic(r));this.hasMutatedConstraints=!!a,a&&(r=Qs(a))}return r}startAnimation(e){const{drag:n,dragMomentum:i,dragElastic:s,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=H(u=>{if(!te(u,n,this.currentDirection))return;let h=l&&l[u]||{};r&&(h={min:0,max:0});const d=s?200:1e6,f=s?40:1e7,p={type:"inertia",velocity:i?e[u]:0,bounceStiffness:d,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const i=this.getAxisMotionValue(e);return i.start(fn(e,i,0,n))}stopAnimation(){H(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){H(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n="_drag"+e.toUpperCase(),i=this.visualElement.getProps(),s=i[n];return s||this.visualElement.getValue(e,(i.initial?i.initial[e]:void 0)||0)}snapToCursor(e){H(n=>{const{drag:i}=this.getProps();if(!te(n,i,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(n);if(s&&s.layout){const{min:r,max:a}=s.layout.layoutBox[n];o.set(e[n]-O(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!At(n)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};H(r=>{const a=this.getAxisMotionValue(r);if(a){const l=a.get();s[r]=tc({min:l,max:l},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),H(r=>{if(!te(r,e,null))return;const a=this.getAxisMotionValue(r),{min:l,max:c}=this.constraints[r];a.set(O(l,c,s[r]))})}addListeners(){if(!this.visualElement.current)return;cc.set(this.visualElement,this);const e=this.visualElement.current,n=Q(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),i=()=>{const{dragConstraints:l}=this.getProps();At(l)&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),i();const r=$(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(H(u=>{const h=this.getAxisMotionValue(u);h&&(this.originPoint[u]+=l[u].translate,h.set(h.get()+l[u].translate))}),this.visualElement.render())});return()=>{r(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:s=!1,dragConstraints:o=!1,dragElastic:r=Ge,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:i,dragPropagation:s,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function te(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function hc(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class dc extends ht{constructor(e){super(e),this.removeGroupControls=j,this.removeListeners=j,this.controls=new uc(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||j}unmount(){this.removeGroupControls(),this.removeListeners()}}const li=t=>(e,n)=>{t&&E.update(()=>t(e,n))};class fc extends ht{constructor(){super(...arguments),this.removePointerDownListener=j}onPointerDown(e){this.session=new Ks(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:er(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:i,onPanEnd:s}=this.node.getProps();return{onSessionStart:li(e),onStart:li(n),onMove:i,onEnd:(o,r)=>{delete this.session,s&&E.update(()=>s(o,r))}}}mount(){this.removePointerDownListener=Q(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function pc(){const t=T.useContext($e);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:i}=t,s=T.useId();return T.useEffect(()=>i(s),[]),!e&&n?[!1,()=>n&&n(s)]:[!0]}const se={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function ci(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Rt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(A.test(t))t=parseFloat(t);else return t;const n=ci(t,e.target.x),i=ci(t,e.target.y);return`${n}% ${i}%`}},mc={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=ct.parse(t);if(s.length>5)return i;const o=ct.createTransformer(t),r=typeof s[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=l;const c=O(a,l,.5);return typeof s[2+r]=="number"&&(s[2+r]/=c),typeof s[3+r]=="number"&&(s[3+r]/=c),o(s)}};class gc extends T.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:i,layoutId:s}=this.props,{projection:o}=e;Ao(vc),o&&(n.group&&n.group.add(o),i&&i.register&&s&&i.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),se.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:i,drag:s,isPresent:o}=this.props,r=i.projection;return r&&(r.isPresent=o,s||e.layoutDependency!==n||n===void 0?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||E.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),queueMicrotask(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:s}=e;s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),i&&i.deregister&&i.deregister(s))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function nr(t){const[e,n]=pc(),i=T.useContext(Qi);return T.createElement(gc,{...t,layoutGroup:i,switchLayoutGroup:T.useContext(Zi),isPresent:e,safeToRemove:n})}const vc={borderRadius:{...Rt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Rt,borderTopRightRadius:Rt,borderBottomLeftRadius:Rt,borderBottomRightRadius:Rt,boxShadow:mc},ir=["TopLeft","TopRight","BottomLeft","BottomRight"],yc=ir.length,ui=t=>typeof t=="string"?parseFloat(t):t,hi=t=>typeof t=="number"||A.test(t);function bc(t,e,n,i,s,o){s?(t.opacity=O(0,n.opacity!==void 0?n.opacity:1,xc(i)),t.opacityExit=O(e.opacity!==void 0?e.opacity:1,0,wc(i))):o&&(t.opacity=O(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,i));for(let r=0;r<yc;r++){const a=`border${ir[r]}Radius`;let l=di(e,a),c=di(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||hi(l)===hi(c)?(t[a]=Math.max(O(ui(l),ui(c),i),0),(q.test(c)||q.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=O(e.rotate||0,n.rotate||0,i))}function di(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const xc=sr(0,.5,Cs),wc=sr(.5,.95,j);function sr(t,e,n){return i=>i<t?0:i>e?1:n(Ut(t,e,i))}function fi(t,e){t.min=e.min,t.max=e.max}function U(t,e){fi(t.x,e.x),fi(t.y,e.y)}function pi(t,e,n,i,s){return t-=e,t=pe(t,1/n,i),s!==void 0&&(t=pe(t,1/s,i)),t}function Sc(t,e=0,n=1,i=.5,s,o=t,r=t){if(q.test(e)&&(e=parseFloat(e),e=O(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=O(o.min,o.max,i);t===o&&(a-=e),t.min=pi(t.min,e,n,a,s),t.max=pi(t.max,e,n,a,s)}function mi(t,e,[n,i,s],o,r){Sc(t,e[n],e[i],e[s],e.scale,o,r)}const Tc=["x","scaleX","originX"],Ac=["y","scaleY","originY"];function gi(t,e,n,i){mi(t.x,e,Tc,n?n.x:void 0,i?i.x:void 0),mi(t.y,e,Ac,n?n.y:void 0,i?i.y:void 0)}function vi(t){return t.translate===0&&t.scale===1}function rr(t){return vi(t.x)&&vi(t.y)}function Pc(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function or(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function yi(t){return _(t.x)/_(t.y)}class Cc{constructor(){this.members=[]}add(e){pn(this.members,e),e.scheduleRender()}remove(e){if(mn(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(s=>e===s);if(n===0)return!1;let i;for(let s=n;s>=0;s--){const o=this.members[s];if(o.isPresent!==!1){i=o;break}}return i?(this.promote(i),!0):!1}promote(e,n){const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender(),e.resumeFrom=i,n&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:s}=e.options;s===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:i}=e;n.onExitComplete&&n.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function bi(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y;if((s||o)&&(i=`translate3d(${s}px, ${o}px, 0) `),(e.x!==1||e.y!==1)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:l,rotateX:c,rotateY:u}=n;l&&(i+=`rotate(${l}deg) `),c&&(i+=`rotateX(${c}deg) `),u&&(i+=`rotateY(${u}deg) `)}const r=t.x.scale*e.x,a=t.y.scale*e.y;return(r!==1||a!==1)&&(i+=`scale(${r}, ${a})`),i||"none"}const kc=(t,e)=>t.depth-e.depth;class Vc{constructor(){this.children=[],this.isDirty=!1}add(e){pn(this.children,e),this.isDirty=!0}remove(e){mn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(kc),this.isDirty=!1,this.children.forEach(e)}}function Ec(t,e){const n=performance.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(J(i),t(o-e))};return E.read(i,!0),()=>J(i)}function Mc(t){window.MotionDebug&&window.MotionDebug.record(t)}function Oc(t){return t instanceof SVGElement&&t.tagName!=="svg"}function jc(t,e,n){const i=z(t)?t:Vt(t);return i.start(fn("",i,e,n)),i.animation}const xi=["","X","Y","Z"],Dc={visibility:"hidden"},wi=1e3;let Lc=0;const mt={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function ar({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(r={},a=e==null?void 0:e()){this.id=Lc++,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=()=>{this.projectionUpdateScheduled=!1,mt.totalNodes=mt.resolvedTargetDeltas=mt.recalculatedProjection=0,this.nodes.forEach(Nc),this.nodes.forEach(_c),this.nodes.forEach(Uc),this.nodes.forEach(Fc),Mc(mt)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Vc)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new gn),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const l=this.eventHandlers.get(r);l&&l.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Oc(r),this.instance=r;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),t){let h;const d=()=>this.root.updateBlockedByResize=!1;t(r,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=Ec(d,250),se.hasAnimatedSinceResize&&(se.hasAnimatedSinceResize=!1,this.nodes.forEach(Ti))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:d,hasRelativeTargetChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||Xc,{onLayoutAnimationStart:b,onLayoutAnimationComplete:x}=u.getProps(),y=!this.targetLayout||!or(this.targetLayout,p)||f,g=!d&&f;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||d&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,g);const w={...dn(m,"layout"),onPlay:b,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w)}else d||Ti(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,J(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(Hc),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Si);return}this.isUpdating||this.nodes.forEach(zc),this.isUpdating=!1,this.nodes.forEach(Wc),this.nodes.forEach(Rc),this.nodes.forEach(Bc),this.clearAllSnapshots();const a=performance.now();B.delta=lt(0,1e3/60,a-B.timestamp),B.timestamp=a,B.isProcessing=!0,Pe.update.process(B),Pe.preRender.process(B),Pe.render.process(B),B.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(Ic),this.sharedNodes.forEach(Gc)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,E.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){E.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutCorrected=L(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:r,isRoot:i(this.instance),offset:n(this.instance)})}resetTransform(){if(!s)return;const r=this.isLayoutDirty||this.shouldResetTransform,a=this.projectionDelta&&!rr(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;r&&(a||pt(this.latestValues)||u)&&(s(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),Kc(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return L();const a=r.measureViewportBox(),{scroll:l}=this.root;return l&&(rt(a.x,l.offset.x),rt(a.y,l.offset.y)),a}removeElementScroll(r){const a=L();U(a,r);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:h}=c;if(c!==this.root&&u&&h.layoutScroll){if(u.isRoot){U(a,r);const{scroll:d}=this.root;d&&(rt(a.x,-d.offset.x),rt(a.y,-d.offset.y))}rt(a.x,u.offset.x),rt(a.y,u.offset.y)}}return a}applyTransform(r,a=!1){const l=L();U(l,r);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&kt(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),pt(u.latestValues)&&kt(l,u.latestValues)}return pt(this.latestValues)&&kt(l,this.latestValues),l}removeTransform(r){const a=L();U(a,r);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!pt(c.latestValues))continue;Ye(c.latestValues)&&c.updateSnapshot();const u=L(),h=c.measurePageBox();U(u,h),gi(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return pt(this.latestValues)&&gi(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==B.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(r||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:h,layoutId:d}=this.options;if(!(!this.layout||!(h||d))){if(this.resolvedRelativeTargetAt=B.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=L(),this.relativeTargetOrigin=L(),zt(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),U(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=L(),this.targetWithTransforms=L()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),$l(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):U(this.target,this.layout.layoutBox),Js(this.target,this.targetDelta)):U(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=L(),this.relativeTargetOrigin=L(),zt(this.relativeTargetOrigin,this.target,f.target),U(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}mt.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Ye(this.parent.latestValues)||Zs(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var r;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((r=this.parent)===null||r===void 0)&&r.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===B.timestamp&&(c=!1),c)return;const{layout:u,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||h))return;U(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;rc(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox);const{target:p}=a;if(!p){this.projectionTransform&&(this.projectionDelta=Ct(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=Ct(),this.projectionDeltaWithTransform=Ct());const m=this.projectionTransform;It(this.projectionDelta,this.layoutCorrected,p,this.latestValues),this.projectionTransform=bi(this.projectionDelta,this.treeScale),(this.projectionTransform!==m||this.treeScale.x!==d||this.treeScale.y!==f)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),mt.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),r){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(r,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},h=Ct();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=L(),f=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=f!==p,b=this.getStack(),x=!b||b.members.length<=1,y=!!(m&&!x&&this.options.crossfade===!0&&!this.path.some(qc));this.animationProgress=0;let g;this.mixTargetDelta=w=>{const P=w/1e3;Ai(h.x,r.x,P),Ai(h.y,r.y,P),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(zt(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Yc(this.relativeTarget,this.relativeTargetOrigin,d,P),g&&Pc(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=L()),U(g,this.relativeTarget)),m&&(this.animationValues=u,bc(u,c,this.latestValues,P,y,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(J(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=E.update(()=>{se.hasAnimatedSinceResize=!0,this.currentAnimation=jc(0,wi,{...r,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onComplete:()=>{r.onComplete&&r.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 r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(wi),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=r;if(!(!a||!l||!c)){if(this!==r&&this.layout&&c&&lr(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||L();const h=_(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+h;const d=_(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+d}U(a,l),kt(a,u),It(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Cc),this.sharedNodes.get(r).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){var r;const{layoutId:a}=this.options;return a?((r=this.getStack())===null||r===void 0?void 0:r.lead)||this:this}getPrevLead(){var r;const{layoutId:a}=this.options;return a?(r=this.getStack())===null||r===void 0?void 0:r.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const c={};for(let u=0;u<xi.length;u++){const h="rotate"+xi[u];l[h]&&(c[h]=l[h],r.setStaticValue(h,0))}r.render();for(const u in c)r.setStaticValue(u,c[u]);r.scheduleRender()}getProjectionStyles(r){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Dc;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=ie(r==null?void 0:r.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=ie(r==null?void 0:r.pointerEvents)||""),this.hasProjected&&!pt(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const d=h.animationValues||h.latestValues;this.applyTransformsToTarget(),c.transform=bi(this.projectionDeltaWithTransform,this.treeScale,d),u&&(c.transform=u(d,c.transform));const{x:f,y:p}=this.projectionDelta;c.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,h.animationValues?c.opacity=h===this?(l=(a=d.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:c.opacity=h===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const m in ae){if(d[m]===void 0)continue;const{correct:b,applyTo:x}=ae[m],y=c.transform==="none"?d[m]:b(d[m],h);if(x){const g=x.length;for(let w=0;w<g;w++)c[x[w]]=y}else c[m]=y}return this.options.layoutId&&(c.pointerEvents=h===this?ie(r==null?void 0:r.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>{var a;return(a=r.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Si),this.root.sharedNodes.clear()}}}function Rc(t){t.updateLayout()}function Bc(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:s}=t.layout,{animationType:o}=t.options,r=n.source!==t.layout.source;o==="size"?H(h=>{const d=r?n.measuredBox[h]:n.layoutBox[h],f=_(d);d.min=i[h].min,d.max=d.min+f}):lr(o,n.layoutBox,i)&&H(h=>{const d=r?n.measuredBox[h]:n.layoutBox[h],f=_(i[h]);d.max=d.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+f)});const a=Ct();It(a,i,n.layoutBox);const l=Ct();r?It(l,t.applyTransform(s,!0),n.measuredBox):It(l,i,n.layoutBox);const c=!rr(a);let u=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:d,layout:f}=h;if(d&&f){const p=L();zt(p,n.layoutBox,d.layoutBox);const m=L();zt(m,i,f.layoutBox),or(p,m)||(u=!0),h.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=p,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:i}=t.options;i&&i()}t.options.transition=void 0}function Nc(t){mt.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Fc(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Ic(t){t.clearSnapshot()}function Si(t){t.clearMeasurements()}function zc(t){t.isLayoutDirty=!1}function Wc(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ti(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function _c(t){t.resolveTargetDelta()}function Uc(t){t.calcProjection()}function Hc(t){t.resetRotation()}function Gc(t){t.removeLeadSnapshot()}function Ai(t,e,n){t.translate=O(e.translate,0,n),t.scale=O(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Pi(t,e,n,i){t.min=O(e.min,n.min,i),t.max=O(e.max,n.max,i)}function Yc(t,e,n,i){Pi(t.x,e.x,n.x,i),Pi(t.y,e.y,n.y,i)}function qc(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Xc={duration:.45,ease:[.4,0,.1,1]},Ci=t=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(t),ki=Ci("applewebkit/")&&!Ci("chrome/")?Math.round:j;function Vi(t){t.min=ki(t.min),t.max=ki(t.max)}function Kc(t){Vi(t.x),Vi(t.y)}function lr(t,e,n){return t==="position"||t==="preserve-aspect"&&!He(yi(e),yi(n),.2)}const $c=ar({attachResizeListener:(t,e)=>$(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Be={current:void 0},cr=ar({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Be.current){const t=new $c({});t.mount(window),t.setOptions({layoutScroll:!0}),Be.current=t}return Be.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Qc={pan:{Feature:fc},drag:{Feature:dc,ProjectionNode:cr,MeasureLayout:nr}},Zc=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Jc(t){const e=Zc.exec(t);if(!e)return[,];const[,n,i]=e;return[n,i]}const tu=4;function Xe(t,e,n=1){Y(n<=tu,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[i,s]=Jc(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const r=o.trim();return Gs(r)?parseFloat(r):r}else return Ne(s)?Xe(s,e,n+1):s}function eu(t,{...e},n){const i=t.current;if(!(i instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(s=>{const o=s.get();if(!Ne(o))return;const r=Xe(o,i);r&&s.set(r)});for(const s in e){const o=e[s];if(!Ne(o))continue;const r=Xe(o,i);r&&(e[s]=r,n||(n={}),n[s]===void 0&&(n[s]=o))}return{target:e,transitionEnd:n}}const nu=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),ur=t=>nu.has(t),iu=t=>Object.keys(t).some(ur),ee=t=>t===yt||t===A,Ei=(t,e)=>parseFloat(t.split(", ")[e]),Mi=(t,e)=>(n,{transform:i})=>{if(i==="none"||!i)return 0;const s=i.match(/^matrix3d\((.+)\)$/);if(s)return Ei(s[1],e);{const o=i.match(/^matrix\((.+)\)$/);return o?Ei(o[1],t):0}},su=new Set(["x","y","z"]),ru=Ht.filter(t=>!su.has(t));function ou(t){const e=[];return ru.forEach(n=>{const i=t.getValue(n);i!==void 0&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}const Et={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:Mi(4,13),y:Mi(5,14)};Et.translateX=Et.x;Et.translateY=Et.y;const au=(t,e,n)=>{const i=e.measureViewportBox(),s=e.current,o=getComputedStyle(s),{display:r}=o,a={};r==="none"&&e.setStaticValue("display",t.display||"block"),n.forEach(c=>{a[c]=Et[c](i,o)}),e.render();const l=e.measureViewportBox();return n.forEach(c=>{const u=e.getValue(c);u&&u.jump(a[c]),t[c]=Et[c](l,o)}),t},lu=(t,e,n={},i={})=>{e={...e},i={...i};const s=Object.keys(e).filter(ur);let o=[],r=!1;const a=[];if(s.forEach(l=>{const c=t.getValue(l);if(!t.hasValue(l))return;let u=n[l],h=Lt(u);const d=e[l];let f;if(ce(d)){const p=d.length,m=d[0]===null?1:0;u=d[m],h=Lt(u);for(let b=m;b<p&&d[b]!==null;b++)f?Y(Lt(d[b])===f,"All keyframes must be of the same type"):(f=Lt(d[b]),Y(f===h||ee(h)&&ee(f),"Keyframes must be of the same dimension as the current value"))}else f=Lt(d);if(h!==f)if(ee(h)&&ee(f)){const p=c.get();typeof p=="string"&&c.set(parseFloat(p)),typeof d=="string"?e[l]=parseFloat(d):Array.isArray(d)&&f===A&&(e[l]=d.map(parseFloat))}else h!=null&&h.transform&&(f!=null&&f.transform)&&(u===0||d===0)?u===0?c.set(f.transform(u)):e[l]=h.transform(d):(r||(o=ou(t),r=!0),a.push(l),i[l]=i[l]!==void 0?i[l]:e[l],c.jump(d))}),a.length){const l=a.indexOf("height")>=0?window.pageYOffset:null,c=au(e,t,a);return o.length&&o.forEach(([u,h])=>{t.getValue(u).set(h)}),t.render(),ge&&l!==null&&window.scrollTo({top:l}),{target:c,transitionEnd:i}}else return{target:e,transitionEnd:i}};function cu(t,e,n,i){return iu(e)?lu(t,e,n,i):{target:e,transitionEnd:i}}const uu=(t,e,n,i)=>{const s=eu(t,e,i);return e=s.target,i=s.transitionEnd,cu(t,e,n,i)},Ke={current:null},hr={current:!1};function hu(){if(hr.current=!0,!!ge)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ke.current=t.matches;t.addListener(e),e()}else Ke.current=!1}function du(t,e,n){const{willChange:i}=e;for(const s in e){const o=e[s],r=n[s];if(z(o))t.addValue(s,o),fe(i)&&i.add(s),process.env.NODE_ENV==="development"&&vn(o.version==="10.18.0",`Attempting to mix Framer Motion versions ${o.version} with 10.18.0 may not work as expected.`);else if(z(r))t.addValue(s,Vt(o,{owner:t})),fe(i)&&i.remove(s);else if(r!==o)if(t.hasValue(s)){const a=t.getValue(s);!a.hasAnimated&&a.set(o)}else{const a=t.getStaticValue(s);t.addValue(s,Vt(a!==void 0?a:o,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const Oi=new WeakMap,dr=Object.keys(_t),fu=dr.length,ji=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],pu=Je.length;class mu{constructor({parent:e,props:n,presenceContext:i,reducedMotionConfig:s,visualState:o},r={}){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=()=>E.render(this.render,!1,!0);const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=n,this.presenceContext=i,this.depth=e?e.depth+1:0,this.reducedMotionConfig=s,this.options=r,this.isControllingVariants=ye(n),this.isVariantNode=$i(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...u}=this.scrapeMotionValuesFromProps(n,{});for(const h in u){const d=u[h];a[h]!==void 0&&z(d)&&(d.set(a[h],!1),fe(c)&&c.add(h))}}scrapeMotionValuesFromProps(e,n){return{}}mount(e){this.current=e,Oi.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((n,i)=>this.bindToMotionValue(i,n)),hr.current||hu(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ke.current,process.env.NODE_ENV!=="production"&&vn(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Oi.delete(this.current),this.projection&&this.projection.unmount(),J(this.notifyUpdate),J(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,n){const i=vt.has(e),s=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&E.update(this.notifyUpdate,!1,!0),i&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{s(),o()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...n},i,s,o){let r,a;if(process.env.NODE_ENV!=="production"&&s&&i){const l="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";n.ignoreStrict?qt(!1,l):Y(!1,l)}for(let l=0;l<fu;l++){const c=dr[l],{isEnabled:u,Feature:h,ProjectionNode:d,MeasureLayout:f}=_t[c];d&&(r=d),u(n)&&(!this.features[c]&&h&&(this.features[c]=new h(this)),f&&(a=f))}if((this.type==="html"||this.type==="svg")&&!this.projection&&r){this.projection=new r(this.latestValues,this.parent&&this.parent.projection);const{layoutId:l,layout:c,drag:u,dragConstraints:h,layoutScroll:d,layoutRoot:f}=n;this.projection.setOptions({layoutId:l,layout:c,alwaysMeasureLayout:!!u||h&&At(h),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof c=="string"?c:"both",initialPromotionConfig:o,layoutScroll:d,layoutRoot:f})}return a}updateFeatures(){for(const e in this.features){const n=this.features[e];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):L()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}makeTargetAnimatable(e,n=!0){return this.makeTargetAnimatableFromInstance(e,this.props,n)}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let i=0;i<ji.length;i++){const s=ji[i];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const o=e["on"+s];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=du(this,this.scrapeMotionValuesFromProps(e,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const i=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(i.initial=this.props.initial),i}const n={};for(let i=0;i<pu;i++){const s=Je[i],o=this.props[s];(Wt(o)||o===!1)&&(n[s]=o)}return n}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){n!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,n)),this.values.set(e,n),this.latestValues[e]=n.get()}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return i===void 0&&n!==void 0&&(i=Vt(n,{owner:this}),this.addValue(e,i)),i}readValue(e){var n;return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(n=this.getBaseTargetFromProps(this.props,e))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:i}=this.props,s=typeof i=="string"||typeof i=="object"?(n=an(this.props,i))===null||n===void 0?void 0:n[e]:void 0;if(i&&s!==void 0)return s;const o=this.getBaseTargetFromProps(this.props,e);return o!==void 0&&!z(o)?o:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new gn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class fr extends mu{sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:i}){delete n[e],delete i[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:n,...i},{transformValues:s},o){let r=Ol(i,e||{},this);if(s&&(n&&(n=s(n)),i&&(i=s(i)),r&&(r=s(r))),o){El(this,i,r);const a=uu(this,i,r,n);n=a.transitionEnd,i=a.target}return{transition:e,transitionEnd:n,...i}}}function gu(t){return window.getComputedStyle(t)}class vu extends fr{constructor(){super(...arguments),this.type="html"}readValueFromInstance(e,n){if(vt.has(n)){const i=hn(n);return i&&i.default||0}else{const i=gu(e),s=(es(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:n}){return tr(e,n)}build(e,n,i,s){en(e,n,i,s.transformTemplate)}scrapeMotionValuesFromProps(e,n){return on(e,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;z(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(e,n,i,s){as(e,n,i,s)}}class yu extends fr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(vt.has(n)){const i=hn(n);return i&&i.default||0}return n=ls.has(n)?n:Qe(n),e.getAttribute(n)}measureInstanceViewportBox(){return L()}scrapeMotionValuesFromProps(e,n){return us(e,n)}build(e,n,i,s){sn(e,n,i,this.isSVGTag,s.transformTemplate)}renderInstance(e,n,i,s){cs(e,n,i,s)}mount(e){this.isSVGTag=rn(e.tagName),super.mount(e)}}const bu=(t,e)=>tn(t)?new yu(e,{enableHardwareAcceleration:!1}):new vu(e,{enableHardwareAcceleration:!0}),xu={layout:{ProjectionNode:cr,MeasureLayout:nr}},wu={...Yl,...pa,...Qc,...xu},pr=So((t,e)=>ea(t,e,wu,bu));function Su(t){const{children:e,parentRef:n,onlyChild:i}=t,[s,o]=T.useState({top:0,left:0});return T.useLayoutEffect(()=>{if(n.current){const r=n.current.getBoundingClientRect();o({top:r.top,left:r.left+r.width})}},[n]),i?e:yr.createPortal(v.jsx(pr.div,{style:{position:"fixed",top:s.top,left:s.left,zIndex:1200},children:e}),n.current)}function Tu(t){return v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",...t,children:v.jsx("path",{fill:"currenColor",d:"M4.427 7.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 7H4.604a.25.25 0 00-.177.427z"})})}function mr({item:t,level:e=0,...n}){var x;const{isActive:i,isCollapsed:s,expanded:o,toggleExpand:r}=n,a=`level-${e}`,l=s?"collapsed":"expanded",c=i(t.id)?"active":"",u=(y,g=a)=>`${y} ${g} ${l} ${c}`,h=!!((x=t.children)!=null&&x.length),[d,f]=T.useState(!1),p=T.useRef();function m(y){var S;const{level:g,hovered:w,parentRef:P}=y;return!h||s&&g>=2&&!w?null:v.jsx(Su,{parentRef:P,onlyChild:!s||s&&g<2,children:v.jsx(pr.div,{className:u("menu-item__dropdown",`level-${g}`),initial:{height:s?"auto":0},animate:{height:s||o(t.id)?"auto":0},transition:{duration:.2},children:(S=t.children)==null?void 0:S.map(k=>T.createElement(mr,{...n,key:k.id,item:k,level:g}))},+s)})}const b=h?"div":Li.Link;return v.jsxs("div",{ref:p,className:u("menu-item__wrapper"),onMouseEnter:()=>s&&f(!0),onMouseLeave:()=>s&&f(!1),children:[v.jsxs(b,{to:h?"#":t.path||"#",style:{paddingLeft:`${s?"0.5rem":`${e*1}rem`}`},className:u("menu-item__link"),onClick:y=>{h&&(y.preventDefault(),s||r(t.id))},children:[e!==0&&v.jsx(Au,{cls:u,item:t}),v.jsx("span",{className:u("menu-item__label"),children:t.name}),h&&v.jsx("div",{className:u("menu-item__icon-arrow__wrapper"),children:v.jsx(Tu,{className:u(`menu-item__icon-arrow__icon ${o(t.id)?"open":"close"}`)})})]}),m({level:e+1,hovered:d,parentRef:p})]},t.id)}function Au({item:t,cls:e}){var r,a;const[n,i]=T.useState(!1),s=()=>{i(!0)},o=(r=t.icon)==null?void 0:r.endsWith(".svg");return v.jsx("div",{className:e("menu-item__icon"),children:n?v.jsx("div",{style:{width:24,height:24,backgroundColor:"#dadada",borderRadius:"5px",display:"flex",justifyContent:"center",alignItems:"center"},children:(a=t.name.trim().at(0))==null?void 0:a.toUpperCase()}):o?v.jsx(ut.ReactSVG,{src:t.icon,beforeInjection:l=>{l.setAttribute("style","margin: 0 auto;"),l.querySelectorAll("path").forEach(u=>{u.setAttribute("stroke","currentColor")})}}):v.jsx("img",{src:t.icon||"/",alt:" ",style:{height:24,maxHeight:24},onError:s})})}function Di(t){for(;t.startsWith("/");)t=t.slice(1);return t}function gr(t,e,n=[]){for(const i of t){if(console.log(i.path,e,i.path===e),Di(i.path||"")===Di(e))return[...n,i];if(i.children){const s=gr(i.children,e,[...n,i]);if(s)return s}}return null}function Pu(t){return v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"20",fill:"none",viewBox:"0 0 18 20",...t,children:v.jsx("path",{fill:"#E01B00",fillRule:"evenodd",d:"M.179 2.875A2.375 2.375 0 012.554.5h3.393a1.018 1.018 0 010 2.036H2.554a.34.34 0 00-.34.339v14.25c0 .187.152.34.34.34h3.393a1.018 1.018 0 110 2.035H2.554a2.375 2.375 0 01-2.375-2.375V2.875zm14.167 6.107h-7.72a1.018 1.018 0 000 2.036h7.72l-2.673 2.673a1.018 1.018 0 101.44 1.44l4.41-4.411a1.018 1.018 0 000-1.44l-4.41-4.41a1.018 1.018 0 10-1.44 1.439l2.673 2.673z",clipRule:"evenodd"})})}const Cu=`[data-simplebar]{position:relative;flex-direction:column;flex-wrap:wrap;justify-content:flex-start;align-content:flex-start;align-items:flex-start}.simplebar-wrapper{overflow:hidden;width:inherit;height:inherit;max-width:inherit;max-height:inherit}.simplebar-mask{direction:inherit;position:absolute;overflow:hidden;padding:0;margin:0;left:0;top:0;bottom:0;right:0;width:auto!important;height:auto!important;z-index:0}.simplebar-offset{direction:inherit!important;box-sizing:inherit!important;resize:none!important;position:absolute;top:0;left:0;bottom:0;right:0;padding:0;margin:0;-webkit-overflow-scrolling:touch}.simplebar-content-wrapper{direction:inherit;box-sizing:border-box!important;position:relative;display:block;height:100%;width:auto;max-width:100%;max-height:100%;overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.simplebar-content-wrapper::-webkit-scrollbar,.simplebar-hide-scrollbar::-webkit-scrollbar{display:none;width:0;height:0}.simplebar-content:after,.simplebar-content:before{content:" ";display:table}.simplebar-placeholder{max-height:100%;max-width:100%;width:100%;pointer-events:none}.simplebar-height-auto-observer-wrapper{box-sizing:inherit!important;height:100%;width:100%;max-width:1px;position:relative;float:left;max-height:1px;overflow:hidden;z-index:-1;padding:0;margin:0;pointer-events:none;flex-grow:inherit;flex-shrink:0;flex-basis:0}.simplebar-height-auto-observer{box-sizing:inherit;display:block;opacity:0;position:absolute;top:0;left:0;height:1000%;width:1000%;min-height:1px;min-width:1px;overflow:hidden;pointer-events:none;z-index:-1}.simplebar-track{z-index:1;position:absolute;right:0;bottom:0;pointer-events:none;overflow:hidden}[data-simplebar].simplebar-dragging,[data-simplebar].simplebar-dragging .simplebar-content{pointer-events:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}[data-simplebar].simplebar-dragging .simplebar-track{pointer-events:all}.simplebar-scrollbar{position:absolute;left:0;right:0;min-height:10px}.simplebar-scrollbar:before{position:absolute;content:"";background:#000;border-radius:7px;left:2px;right:2px;opacity:0;transition:opacity .2s .5s linear}.simplebar-scrollbar.simplebar-visible:before{opacity:.5;transition-delay:0s;transition-duration:0s}.simplebar-track.simplebar-vertical{top:0;width:11px}.simplebar-scrollbar:before{top:2px;bottom:2px;left:2px;right:2px}.simplebar-track.simplebar-horizontal{left:0;height:11px}.simplebar-track.simplebar-horizontal .simplebar-scrollbar{right:auto;left:0;top:0;bottom:0;min-height:0;min-width:10px;width:auto}[data-simplebar-direction=rtl] .simplebar-track.simplebar-vertical{right:auto;left:0}.simplebar-dummy-scrollbar-size{direction:rtl;position:fixed;opacity:0;visibility:hidden;height:500px;width:500px;overflow-y:hidden;overflow-x:scroll;-ms-overflow-style:scrollbar!important}.simplebar-dummy-scrollbar-size>div{width:200%;height:200%;margin:10px 0}.simplebar-hide-scrollbar{position:fixed;left:0;visibility:hidden;overflow-y:scroll;scrollbar-width:none;-ms-overflow-style:none}
|
|
5
|
+
`;function ku(){return v.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",children:[v.jsx("path",{stroke:"#85858A",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M22 8.27V4.23C22 2.64 21.36 2 19.77 2h-4.04c-1.59 0-2.23.64-2.23 2.23v4.04c0 1.59.64 2.23 2.23 2.23h4.04c1.59 0 2.23-.64 2.23-2.23zM10.5 8.52V3.98C10.5 2.57 9.86 2 8.27 2H4.23C2.64 2 2 2.57 2 3.98v4.53c0 1.42.64 1.98 2.23 1.98h4.04c1.59.01 2.23-.56 2.23-1.97zM10.5 19.77v-4.04c0-1.59-.64-2.23-2.23-2.23H4.23c-1.59 0-2.23.64-2.23 2.23v4.04C2 21.36 2.64 22 4.23 22h4.04c1.59 0 2.23-.64 2.23-2.23z"}),v.jsx("path",{stroke:"#85858A",strokeLinecap:"round",strokeWidth:"1.5",d:"M15 15.5h6M15 19.5h6"})]})}function Vu(){return v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",children:v.jsx("path",{stroke:"#85858A",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M22 8.52V3.98C22 2.57 21.36 2 19.77 2h-4.04c-1.59 0-2.23.57-2.23 1.98v4.53c0 1.42.64 1.98 2.23 1.98h4.04c1.59.01 2.23-.56 2.23-1.97zM22 19.77v-4.04c0-1.59-.64-2.23-2.23-2.23h-4.04c-1.59 0-2.23.64-2.23 2.23v4.04c0 1.59.64 2.23 2.23 2.23h4.04c1.59 0 2.23-.64 2.23-2.23zM10.5 8.52V3.98C10.5 2.57 9.86 2 8.27 2H4.23C2.64 2 2 2.57 2 3.98v4.53c0 1.42.64 1.98 2.23 1.98h4.04c1.59.01 2.23-.56 2.23-1.97zM10.5 19.77v-4.04c0-1.59-.64-2.23-2.23-2.23H4.23c-1.59 0-2.23.64-2.23 2.23v4.04C2 21.36 2.64 22 4.23 22h4.04c1.59 0 2.23-.64 2.23-2.23z"})})}const Eu=`.side-bar{display:flex;flex-direction:column;max-width:18rem;height:calc(100vh - 64px);border-right:1px solid #ddd;background-color:#fafafa;transition:all .3s;padding:0 8px}.side-bar.expanded{width:18rem}.side-bar.collapsed{width:64px;padding-left:4px;padding-right:4px}.side-bar__menu{margin-left:-8px;margin-right:-8px;padding-left:8px;padding-right:8px}.side-bar__menu.collapsed{margin-left:-4px;margin-right:-4px;padding-left:4px;padding-right:4px}.side-bar__wrap-btn-logout,.side-bar__btn-logout{margin:40px 0}.side-bar__logout-btn__text{margin-left:12px}.side-bar__logout-btn__text.collapsed{display:none}.side-bar__wrapper-toggle-btn{display:flex;flex-direction:row;justify-content:flex-end;transition:all .3s;margin-right:-8px;margin-top:40px}.side-bar__wrapper-toggle-btn.collapsed{justify-content:center;width:100%}.side-bar__toggle-btn{margin-top:-6px}.side-bar__logout-btn{width:100%;text-align:left;display:flex;flex-direction:row;align-items:center;padding:0 16px;min-height:48px;border-radius:.375rem}.side-bar__logout-btn:hover{background-color:#919eab14}.side-bar__logout-btn.collapsed{justify-content:center}.menu-item__wrapper{display:flex;flex-direction:column;position:relative;width:100%;margin-top:4px}.menu-item__wrapper:first-child,.menu-item__wrapper.collapsed{margin-top:0}.menu-item__wrapper.collapsed.level-1{margin-top:4px}.menu-item__link{display:flex;flex-direction:row;border-radius:.375rem;align-items:center;padding:.5rem;position:relative;height:48px;cursor:pointer;color:#85858a}.menu-item__link:hover{background-color:#919eab14}.menu-item__link.active{background-color:#009d4f1a!important;color:#009d4f!important}.menu-item__link.level-0{height:auto}.menu-item__link.menu-item__link.collapsed.level-0{display:none}.menu-item__icon{width:1.5rem;height:1.5rem;flex-shrink:0}.menu-item__icon.collapsed.level-1{width:100%}.menu-item__icon.collapsed.level-1>*{margin:0 auto}.menu-item__label{font-size:.875rem;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100%;flex-shrink:1;margin-left:12px;padding-right:12px;color:#292929}.menu-item__label.active{color:inherit}.menu-item__label.collapsed{margin-left:8px;font-size:.75rem;line-height:1rem}.menu-item__label.collapsed.level-1{text-align:center;margin-left:0;display:none}.menu-item__label.level-0{color:#85858a}.menu-item__icon-arrow__wrapper{display:grid;place-items:center;position:absolute;top:50%;transform:translateY(-50%);right:-3px}.menu-item__icon-arrow__wrapper.expanded{right:0}.menu-item__icon-arrow__icon{transition:all .3s!important;transform:rotate(-90deg)!important}.menu-item__icon-arrow__icon.active{color:inherit}.menu-item__icon-arrow__icon.expanded.open{transform:rotate(0)!important}.menu-item__dropdown.collapsed{background-color:#fafafa;border:1px solid #ddd;box-shadow:#0000001a 0 10px 15px -3px,#0000000d 0 4px 6px -2px;border-radius:4px;width:180px;max-width:180px;padding:4px;z-index:1200}.menu-item__dropdown.collapsed .menu-item__link{height:40px}.menu-item__dropdown.collapsed .menu-item__link.level-1{height:48px}.menu-item__dropdown.collapsed.level-1{width:auto;max-width:unset;box-shadow:none;border:none;padding:0;background-color:unset}.menu-item__dropdown.expanded{margin-top:4px;overflow:hidden}.icon-btn{display:inline-flex;align-items:center;justify-content:center;padding:8px;border-radius:50%;background-color:transparent;transition:background-color .3s ease;border:none}.icon-btn:hover{background-color:var(--btn-bg-hover)}.simplebar-scrollbar:before{background-color:#0000002d}
|
|
6
|
+
`,Mu=t=>v.jsx(ut.Q,{autoClose:3e3,hideProgressBar:!0,closeButton:!1,position:"bottom-left",newestOnTop:!0,pauseOnFocusLoss:!1,style:{fontFamily:"inherit"},...t});function Ou(t){return v.jsx(Bi,{styles:[Cu,Eu],style:{zIndex:1200},children:v.jsx(ju,{...t})})}function ju(t){const{baseUrl:e,menuPath:n,logout:i}=t,s=Li.useLocation(),[o,r]=T.useState([]),[a,l]=T.useState(!1),c=(gr(o,s.pathname)||[]).filter(y=>y.parentKey!==0),[u,h]=T.useState({}),d=y=>{h({...u,[y]:!u[y]})},f=()=>{l(!a)};T.useEffect(()=>{(async()=>{const g=e+(n||"/global-menu-config/api/v1/menu-items/user"),w=await br.get(g,{withCredentials:!0}).then(S=>S.data).catch(S=>{var k,C;ut.pushError(((C=(k=S.response)==null?void 0:k.data)==null?void 0:C.errorMessage)||"Have error when get menu items")}),P={};w.forEach(S=>{S.children&&(P[S.id]=!0)}),h(P),r(w.map(S=>({...S,parentKey:0})))})()},[e,n]);const[p,m]=T.useState(!1),b=a?"collapsed":"expanded",x=y=>`${y} ${b}`;return v.jsxs("div",{className:x("side-bar"),children:[v.jsx("div",{className:x("side-bar__wrapper-toggle-btn"),children:v.jsx("button",{className:"icon-btn side-bar__toggle-btn",onClick:f,children:a?v.jsx(ku,{}):v.jsx(Vu,{})})}),v.jsx(Yi,{className:x("side-bar__menu"),style:{marginTop:24,flex:1,overflow:"auto",height:"100%",overflowX:"hidden"},children:o.map(y=>{const g=w=>c.some(P=>P.id===w);return v.jsx(mr,{item:y,isActive:g,isCollapsed:a,expanded:w=>u[w],toggleExpand:d},y.id)})}),v.jsxs("div",{className:x("side-bar__wrap-btn-logout"),children:[v.jsxs("button",{className:x("side-bar__logout-btn"),onClick:()=>m(!0),children:[v.jsx(Pu,{}),v.jsx("span",{className:x("side-bar__logout-btn__text"),children:"Logout"})]}),v.jsx(Ri,{isOpen:p,onClose:()=>m(!1),onConfirm:i})]})]})}exports.pushError=ut.pushError;exports.pushSuccess=ut.pushSuccess;exports.pushWarning=ut.pushWarning;exports.GlobalMenu=Ou;exports.ToastConfig=Mu;exports.TopBar=kr;
|