From efd491cf9958b228bc753dfedda2f09bd0435f02 Mon Sep 17 00:00:00 2001 From: Srinivas Gowda Date: Sun, 29 Sep 2024 02:37:30 +0530 Subject: [PATCH] Updates --- assets/{index-wKHjC3qQ.js => index-BHhkyAaX.js} | 8 ++++---- index.html | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) rename assets/{index-wKHjC3qQ.js => index-BHhkyAaX.js} (98%) diff --git a/assets/index-wKHjC3qQ.js b/assets/index-BHhkyAaX.js similarity index 98% rename from assets/index-wKHjC3qQ.js rename to assets/index-BHhkyAaX.js index b74db91..08f828d 100644 --- a/assets/index-wKHjC3qQ.js +++ b/assets/index-BHhkyAaX.js @@ -22,7 +22,7 @@ function JC(e,t){for(var n=0;n>>1,ie=R[K];if(0>>1;Ko(ft,W))Meo(H,ft)?(R[K]=H,R[Me]=W,K=Me):(R[K]=ft,R[Ee]=W,K=Ee);else if(Meo(H,W))R[K]=H,R[Me]=W,K=Me;else break e}}return L}function o(R,L){var W=R.sortIndex-L.sortIndex;return W!==0?W:R.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],u=[],c=1,f=null,d=3,h=!1,v=!1,y=!1,S=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(R){for(var L=n(u);L!==null;){if(L.callback===null)r(u);else if(L.startTime<=R)r(u),L.sortIndex=L.expirationTime,t(l,L);else break;L=n(u)}}function C(R){if(y=!1,w(R),!v)if(n(l)!==null)v=!0,$(T);else{var L=n(u);L!==null&&z(C,L.startTime-R)}}function T(R,L){v=!1,y&&(y=!1,m(k),k=-1),h=!0;var W=d;try{for(w(L),f=n(l);f!==null&&(!(f.expirationTime>L)||R&&!M());){var K=f.callback;if(typeof K=="function"){f.callback=null,d=f.priorityLevel;var ie=K(f.expirationTime<=L);L=e.unstable_now(),typeof ie=="function"?f.callback=ie:f===n(l)&&r(l),w(L)}else r(l);f=n(l)}if(f!==null)var ct=!0;else{var Ee=n(u);Ee!==null&&z(C,Ee.startTime-L),ct=!1}return ct}finally{f=null,d=W,h=!1}}var P=!1,E=null,k=-1,b=5,_=-1;function M(){return!(e.unstable_now()-_R||125K?(R.sortIndex=W,t(u,R),n(l)===null&&R===n(u)&&(y?(m(k),k=-1):y=!0,z(C,W-K))):(R.sortIndex=ie,t(l,R),v||h||(v=!0,$(T))),R},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(R){var L=d;return function(){var W=d;d=L;try{return R.apply(this,arguments)}finally{d=W}}}})(o0);r0.exports=o0;var CT=r0.exports;/** + */(function(e){function t(R,L){var W=R.length;R.push(L);e:for(;0>>1,ie=R[K];if(0>>1;Ko(ft,W))Meo(H,ft)?(R[K]=H,R[Me]=W,K=Me):(R[K]=ft,R[Ee]=W,K=Ee);else if(Meo(H,W))R[K]=H,R[Me]=W,K=Me;else break e}}return L}function o(R,L){var W=R.sortIndex-L.sortIndex;return W!==0?W:R.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],u=[],c=1,f=null,d=3,h=!1,v=!1,y=!1,S=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(R){for(var L=n(u);L!==null;){if(L.callback===null)r(u);else if(L.startTime<=R)r(u),L.sortIndex=L.expirationTime,t(l,L);else break;L=n(u)}}function C(R){if(y=!1,w(R),!v)if(n(l)!==null)v=!0,$(T);else{var L=n(u);L!==null&&U(C,L.startTime-R)}}function T(R,L){v=!1,y&&(y=!1,m(k),k=-1),h=!0;var W=d;try{for(w(L),f=n(l);f!==null&&(!(f.expirationTime>L)||R&&!M());){var K=f.callback;if(typeof K=="function"){f.callback=null,d=f.priorityLevel;var ie=K(f.expirationTime<=L);L=e.unstable_now(),typeof ie=="function"?f.callback=ie:f===n(l)&&r(l),w(L)}else r(l);f=n(l)}if(f!==null)var ct=!0;else{var Ee=n(u);Ee!==null&&U(C,Ee.startTime-L),ct=!1}return ct}finally{f=null,d=W,h=!1}}var P=!1,E=null,k=-1,b=5,_=-1;function M(){return!(e.unstable_now()-_R||125K?(R.sortIndex=W,t(u,R),n(l)===null&&R===n(u)&&(y?(m(k),k=-1):y=!0,U(C,W-K))):(R.sortIndex=ie,t(l,R),v||h||(v=!0,$(T))),R},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(R){var L=d;return function(){var W=d;d=L;try{return R.apply(this,arguments)}finally{d=W}}}})(o0);r0.exports=o0;var CT=r0.exports;/** * @license React * react-dom.production.min.js * @@ -37,7 +37,7 @@ function JC(e,t){for(var n=0;n")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{fu=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?li(e):""}function bT(e){switch(e.tag){case 5:return li(e.type);case 16:return li("Lazy");case 13:return li("Suspense");case 19:return li("SuspenseList");case 0:case 2:case 15:return e=du(e.type,!1),e;case 11:return e=du(e.type.render,!1),e;case 1:return e=du(e.type,!0),e;default:return""}}function Cc(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Br:return"Fragment";case Ur:return"Portal";case wc:return"Profiler";case ud:return"StrictMode";case xc:return"Suspense";case Sc:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case a0:return(e.displayName||"Context")+".Consumer";case s0:return(e._context.displayName||"Context")+".Provider";case cd:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case fd:return t=e.displayName||null,t!==null?t:Cc(e.type)||"Memo";case bn:t=e._payload,e=e._init;try{return Cc(e(t))}catch{}}return null}function AT(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Cc(t);case 8:return t===ud?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Un(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function u0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function MT(e){var t=u0(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Es(e){e._valueTracker||(e._valueTracker=MT(e))}function c0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=u0(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ka(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Tc(e,t){var n=t.checked;return ge({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function gp(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Un(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function f0(e,t){t=t.checked,t!=null&&ld(e,"checked",t,!1)}function Pc(e,t){f0(e,t);var n=Un(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?kc(e,t.type,n):t.hasOwnProperty("defaultValue")&&kc(e,t.type,Un(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function vp(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function kc(e,t,n){(t!=="number"||ka(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ui=Array.isArray;function uo(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=_s.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Oi(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Si={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},RT=["Webkit","ms","Moz","O"];Object.keys(Si).forEach(function(e){RT.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Si[t]=Si[e]})});function m0(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Si.hasOwnProperty(e)&&Si[e]?(""+t).trim():t+"px"}function g0(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=m0(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var NT=ge({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function bc(e,t){if(t){if(NT[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(D(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(D(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(D(61))}if(t.style!=null&&typeof t.style!="object")throw Error(D(62))}}function Ac(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Mc=null;function dd(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Rc=null,co=null,fo=null;function xp(e){if(e=cs(e)){if(typeof Rc!="function")throw Error(D(280));var t=e.stateNode;t&&(t=_l(t),Rc(e.stateNode,e.type,t))}}function v0(e){co?fo?fo.push(e):fo=[e]:co=e}function y0(){if(co){var e=co,t=fo;if(fo=co=null,xp(e),t)for(e=0;e>>=0,e===0?32:31-(BT(e)/WT|0)|0}var bs=64,As=4194304;function ci(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Aa(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~o;a!==0?r=ci(a):(i&=s,i!==0&&(r=ci(i)))}else s=n&~o,s!==0?r=ci(s):i!==0&&(r=ci(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function ls(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-_t(t),e[t]=n}function YT(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Ti),Ap=" ",Mp=!1;function F0(e,t){switch(e){case"keyup":return CP.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function V0(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Wr=!1;function PP(e,t){switch(e){case"compositionend":return V0(t);case"keypress":return t.which!==32?null:(Mp=!0,Ap);case"textInput":return e=t.data,e===Ap&&Mp?null:e;default:return null}}function kP(e,t){if(Wr)return e==="compositionend"||!xd&&F0(e,t)?(e=I0(),ia=vd=Nn=null,Wr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Lp(n)}}function B0(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?B0(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function W0(){for(var e=window,t=ka();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ka(e.document)}return t}function Sd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function LP(e){var t=W0(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&B0(n.ownerDocument.documentElement,n)){if(r!==null&&Sd(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=Op(n,i);var s=Op(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Hr=null,jc=null,ki=null,Fc=!1;function Ip(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Fc||Hr==null||Hr!==ka(r)||(r=Hr,"selectionStart"in r&&Sd(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ki&&zi(ki,r)||(ki=r,r=Na(jc,"onSelect"),0Yr||(e.current=Wc[Yr],Wc[Yr]=null,Yr--)}function se(e,t){Yr++,Wc[Yr]=e.current,e.current=t}var Bn={},ze=Qn(Bn),Qe=Qn(!1),vr=Bn;function So(e,t){var n=e.type.contextTypes;if(!n)return Bn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ze(e){return e=e.childContextTypes,e!=null}function La(){ce(Qe),ce(ze)}function Bp(e,t,n){if(ze.current!==Bn)throw Error(D(168));se(ze,t),se(Qe,n)}function J0(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(D(108,AT(e)||"Unknown",o));return ge({},n,r)}function Oa(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Bn,vr=ze.current,se(ze,e),se(Qe,Qe.current),!0}function Wp(e,t,n){var r=e.stateNode;if(!r)throw Error(D(169));n?(e=J0(e,t,vr),r.__reactInternalMemoizedMergedChildContext=e,ce(Qe),ce(ze),se(ze,e)):ce(Qe),se(Qe,n)}var Zt=null,bl=!1,Eu=!1;function ey(e){Zt===null?Zt=[e]:Zt.push(e)}function GP(e){bl=!0,ey(e)}function Zn(){if(!Eu&&Zt!==null){Eu=!0;var e=0,t=ne;try{var n=Zt;for(ne=1;e>=s,o-=s,qt=1<<32-_t(t)+o|n<k?(b=E,E=null):b=E.sibling;var _=d(m,E,w[k],C);if(_===null){E===null&&(E=b);break}e&&E&&_.alternate===null&&t(m,E),p=i(_,p,k),P===null?T=_:P.sibling=_,P=_,E=b}if(k===w.length)return n(m,E),fe&&rr(m,k),T;if(E===null){for(;kk?(b=E,E=null):b=E.sibling;var M=d(m,E,_.value,C);if(M===null){E===null&&(E=b);break}e&&E&&M.alternate===null&&t(m,E),p=i(M,p,k),P===null?T=M:P.sibling=M,P=M,E=b}if(_.done)return n(m,E),fe&&rr(m,k),T;if(E===null){for(;!_.done;k++,_=w.next())_=f(m,_.value,C),_!==null&&(p=i(_,p,k),P===null?T=_:P.sibling=_,P=_);return fe&&rr(m,k),T}for(E=r(m,E);!_.done;k++,_=w.next())_=h(E,m,k,_.value,C),_!==null&&(e&&_.alternate!==null&&E.delete(_.key===null?k:_.key),p=i(_,p,k),P===null?T=_:P.sibling=_,P=_);return e&&E.forEach(function(N){return t(m,N)}),fe&&rr(m,k),T}function S(m,p,w,C){if(typeof w=="object"&&w!==null&&w.type===Br&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case ks:e:{for(var T=w.key,P=p;P!==null;){if(P.key===T){if(T=w.type,T===Br){if(P.tag===7){n(m,P.sibling),p=o(P,w.props.children),p.return=m,m=p;break e}}else if(P.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===bn&&Kp(T)===P.type){n(m,P.sibling),p=o(P,w.props),p.ref=qo(m,P,w),p.return=m,m=p;break e}n(m,P);break}else t(m,P);P=P.sibling}w.type===Br?(p=pr(w.props.children,m.mode,C,w.key),p.return=m,m=p):(C=ha(w.type,w.key,w.props,null,m.mode,C),C.ref=qo(m,p,w),C.return=m,m=C)}return s(m);case Ur:e:{for(P=w.key;p!==null;){if(p.key===P)if(p.tag===4&&p.stateNode.containerInfo===w.containerInfo&&p.stateNode.implementation===w.implementation){n(m,p.sibling),p=o(p,w.children||[]),p.return=m,m=p;break e}else{n(m,p);break}else t(m,p);p=p.sibling}p=Lu(w,m.mode,C),p.return=m,m=p}return s(m);case bn:return P=w._init,S(m,p,P(w._payload),C)}if(ui(w))return v(m,p,w,C);if(Ko(w))return y(m,p,w,C);Is(m,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,p!==null&&p.tag===6?(n(m,p.sibling),p=o(p,w),p.return=m,m=p):(n(m,p),p=Du(w,m.mode,C),p.return=m,m=p),s(m)):n(m,p)}return S}var To=oy(!0),iy=oy(!1),Fa=Qn(null),Va=null,Zr=null,kd=null;function Ed(){kd=Zr=Va=null}function _d(e){var t=Fa.current;ce(Fa),e._currentValue=t}function Kc(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function po(e,t){Va=e,kd=Zr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ye=!0),e.firstContext=null)}function wt(e){var t=e._currentValue;if(kd!==e)if(e={context:e,memoizedValue:t,next:null},Zr===null){if(Va===null)throw Error(D(308));Zr=e,Va.dependencies={lanes:0,firstContext:e}}else Zr=Zr.next=e;return t}var ur=null;function bd(e){ur===null?ur=[e]:ur.push(e)}function sy(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,bd(t)):(n.next=o.next,o.next=n),t.interleaved=n,hn(e,r)}function hn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var An=!1;function Ad(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ay(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function rn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Fn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,q&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,hn(e,n)}return o=r.interleaved,o===null?(t.next=t,bd(r)):(t.next=o.next,o.next=t),r.interleaved=t,hn(e,n)}function aa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pd(e,n)}}function Yp(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function $a(e,t,n,r){var o=e.updateQueue;An=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,u=l.next;l.next=null,s===null?i=u:s.next=u,s=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==s&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(i!==null){var f=o.baseState;s=0,c=u=l=null,a=i;do{var d=a.lane,h=a.eventTime;if((r&d)===d){c!==null&&(c=c.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var v=e,y=a;switch(d=t,h=n,y.tag){case 1:if(v=y.payload,typeof v=="function"){f=v.call(h,f,d);break e}f=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=y.payload,d=typeof v=="function"?v.call(h,f,d):v,d==null)break e;f=ge({},f,d);break e;case 2:An=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,d=o.effects,d===null?o.effects=[a]:d.push(a))}else h={eventTime:h,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=h,l=f):c=c.next=h,s|=d;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;d=a,a=d.next,d.next=null,o.lastBaseUpdate=d,o.shared.pending=null}}while(!0);if(c===null&&(l=f),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);xr|=s,e.lanes=s,e.memoizedState=f}}function Xp(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=bu.transition;bu.transition={};try{e(!1),t()}finally{ne=n,bu.transition=r}}function Py(){return xt().memoizedState}function QP(e,t,n){var r=$n(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ky(e))Ey(t,n);else if(n=sy(e,t,n,r),n!==null){var o=Be();bt(n,e,r,o),_y(n,t,r)}}function ZP(e,t,n){var r=$n(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ky(e))Ey(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,a=i(s,n);if(o.hasEagerState=!0,o.eagerState=a,At(a,s)){var l=t.interleaved;l===null?(o.next=o,bd(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}n=sy(e,t,o,r),n!==null&&(o=Be(),bt(n,e,r,o),_y(n,t,r))}}function ky(e){var t=e.alternate;return e===me||t!==null&&t===me}function Ey(e,t){Ei=Ua=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function _y(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pd(e,n)}}var Ba={readContext:wt,useCallback:Oe,useContext:Oe,useEffect:Oe,useImperativeHandle:Oe,useInsertionEffect:Oe,useLayoutEffect:Oe,useMemo:Oe,useReducer:Oe,useRef:Oe,useState:Oe,useDebugValue:Oe,useDeferredValue:Oe,useTransition:Oe,useMutableSource:Oe,useSyncExternalStore:Oe,useId:Oe,unstable_isNewReconciler:!1},qP={readContext:wt,useCallback:function(e,t){return Ot().memoizedState=[e,t===void 0?null:t],e},useContext:wt,useEffect:Zp,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ua(4194308,4,wy.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ua(4194308,4,e,t)},useInsertionEffect:function(e,t){return ua(4,2,e,t)},useMemo:function(e,t){var n=Ot();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ot();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=QP.bind(null,me,e),[r.memoizedState,e]},useRef:function(e){var t=Ot();return e={current:e},t.memoizedState=e},useState:Qp,useDebugValue:jd,useDeferredValue:function(e){return Ot().memoizedState=e},useTransition:function(){var e=Qp(!1),t=e[0];return e=XP.bind(null,e[1]),Ot().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=me,o=Ot();if(fe){if(n===void 0)throw Error(D(407));n=n()}else{if(n=t(),be===null)throw Error(D(349));wr&30||fy(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Zp(hy.bind(null,r,i,e),[e]),r.flags|=2048,Xi(9,dy.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Ot(),t=be.identifierPrefix;if(fe){var n=Jt,r=qt;n=(r&~(1<<32-_t(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ki++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[It]=t,e[Wi]=r,jy(e,t,!1,!1),t.stateNode=e;e:{switch(s=Ac(n,r),n){case"dialog":ue("cancel",e),ue("close",e),o=r;break;case"iframe":case"object":case"embed":ue("load",e),o=r;break;case"video":case"audio":for(o=0;oEo&&(t.flags|=128,r=!0,Jo(i,!1),t.lanes=4194304)}else{if(!r)if(e=za(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Jo(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!fe)return Ie(t),null}else 2*we()-i.renderingStartTime>Eo&&n!==1073741824&&(t.flags|=128,r=!0,Jo(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=we(),t.sibling=null,n=he.current,se(he,r?n&1|2:n&1),t):(Ie(t),null);case 22:case 23:return Bd(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?et&1073741824&&(Ie(t),t.subtreeFlags&6&&(t.flags|=8192)):Ie(t),null;case 24:return null;case 25:return null}throw Error(D(156,t.tag))}function sk(e,t){switch(Td(t),t.tag){case 1:return Ze(t.type)&&La(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Po(),ce(Qe),ce(ze),Nd(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Rd(t),null;case 13:if(ce(he),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(D(340));Co()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ce(he),null;case 4:return Po(),null;case 10:return _d(t.type._context),null;case 22:case 23:return Bd(),null;case 24:return null;default:return null}}var Fs=!1,Fe=!1,ak=typeof WeakSet=="function"?WeakSet:Set,F=null;function qr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ve(e,t,r)}else n.current=null}function nf(e,t,n){try{n()}catch(r){ve(e,t,r)}}var lm=!1;function lk(e,t){if(Vc=Ma,e=W0(),Sd(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var h;f!==n||o!==0&&f.nodeType!==3||(a=s+o),f!==i||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(h=f.firstChild)!==null;)d=f,f=h;for(;;){if(f===e)break t;if(d===n&&++u===o&&(a=s),d===i&&++c===r&&(l=s),(h=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for($c={focusedElem:e,selectionRange:n},Ma=!1,F=t;F!==null;)if(t=F,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,F=e;else for(;F!==null;){t=F;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var y=v.memoizedProps,S=v.memoizedState,m=t.stateNode,p=m.getSnapshotBeforeUpdate(t.elementType===t.type?y:Ct(t.type,y),S);m.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(D(163))}}catch(C){ve(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,F=e;break}F=t.return}return v=lm,lm=!1,v}function _i(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&nf(t,n,i)}o=o.next}while(o!==r)}}function Rl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function rf(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function $y(e){var t=e.alternate;t!==null&&(e.alternate=null,$y(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[It],delete t[Wi],delete t[Bc],delete t[WP],delete t[HP])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function zy(e){return e.tag===5||e.tag===3||e.tag===4}function um(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||zy(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function of(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Da));else if(r!==4&&(e=e.child,e!==null))for(of(e,t,n),e=e.sibling;e!==null;)of(e,t,n),e=e.sibling}function sf(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(sf(e,t,n),e=e.sibling;e!==null;)sf(e,t,n),e=e.sibling}var Re=null,Tt=!1;function Tn(e,t,n){for(n=n.child;n!==null;)Uy(e,t,n),n=n.sibling}function Uy(e,t,n){if(Vt&&typeof Vt.onCommitFiberUnmount=="function")try{Vt.onCommitFiberUnmount(Tl,n)}catch{}switch(n.tag){case 5:Fe||qr(n,t);case 6:var r=Re,o=Tt;Re=null,Tn(e,t,n),Re=r,Tt=o,Re!==null&&(Tt?(e=Re,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Re.removeChild(n.stateNode));break;case 18:Re!==null&&(Tt?(e=Re,n=n.stateNode,e.nodeType===8?ku(e.parentNode,n):e.nodeType===1&&ku(e,n),Vi(e)):ku(Re,n.stateNode));break;case 4:r=Re,o=Tt,Re=n.stateNode.containerInfo,Tt=!0,Tn(e,t,n),Re=r,Tt=o;break;case 0:case 11:case 14:case 15:if(!Fe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&nf(n,t,s),o=o.next}while(o!==r)}Tn(e,t,n);break;case 1:if(!Fe&&(qr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ve(n,t,a)}Tn(e,t,n);break;case 21:Tn(e,t,n);break;case 22:n.mode&1?(Fe=(r=Fe)||n.memoizedState!==null,Tn(e,t,n),Fe=r):Tn(e,t,n);break;default:Tn(e,t,n)}}function cm(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new ak),t.forEach(function(r){var o=vk.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function St(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=we()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ck(r/1960))-r,10e?16:e,Dn===null)var r=!1;else{if(e=Dn,Dn=null,Ga=0,q&6)throw Error(D(331));var o=q;for(q|=4,F=e.current;F!==null;){var i=F,s=i.child;if(F.flags&16){var a=i.deletions;if(a!==null){for(var l=0;lwe()-zd?hr(e,0):$d|=n),qe(e,t)}function Qy(e,t){t===0&&(e.mode&1?(t=As,As<<=1,!(As&130023424)&&(As=4194304)):t=1);var n=Be();e=hn(e,t),e!==null&&(ls(e,t,n),qe(e,n))}function gk(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Qy(e,n)}function vk(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(D(314))}r!==null&&r.delete(t),Qy(e,n)}var Zy;Zy=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Qe.current)Ye=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ye=!1,ok(e,t,n);Ye=!!(e.flags&131072)}else Ye=!1,fe&&t.flags&1048576&&ty(t,ja,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ca(e,t),e=t.pendingProps;var o=So(t,ze.current);po(t,n),o=Ld(null,t,r,e,o,n);var i=Od();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ze(r)?(i=!0,Oa(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Ad(t),o.updater=Ml,t.stateNode=o,o._reactInternals=t,Xc(t,r,e,n),t=qc(null,t,r,!0,i,n)):(t.tag=0,fe&&i&&Cd(t),Ue(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ca(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=wk(r),e=Ct(r,e),o){case 0:t=Zc(null,t,r,e,n);break e;case 1:t=im(null,t,r,e,n);break e;case 11:t=rm(null,t,r,e,n);break e;case 14:t=om(null,t,r,Ct(r.type,e),n);break e}throw Error(D(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ct(r,o),Zc(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ct(r,o),im(e,t,r,o,n);case 3:e:{if(Ly(t),e===null)throw Error(D(387));r=t.pendingProps,i=t.memoizedState,o=i.element,ay(e,t),$a(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=ko(Error(D(423)),t),t=sm(e,t,r,n,o);break e}else if(r!==o){o=ko(Error(D(424)),t),t=sm(e,t,r,n,o);break e}else for(nt=jn(t.stateNode.containerInfo.firstChild),rt=t,fe=!0,Pt=null,n=iy(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Co(),r===o){t=pn(e,t,n);break e}Ue(e,t,r,n)}t=t.child}return t;case 5:return ly(t),e===null&&Gc(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,zc(r,o)?s=null:i!==null&&zc(r,i)&&(t.flags|=32),Dy(e,t),Ue(e,t,s,n),t.child;case 6:return e===null&&Gc(t),null;case 13:return Oy(e,t,n);case 4:return Md(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=To(t,null,r,n):Ue(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ct(r,o),rm(e,t,r,o,n);case 7:return Ue(e,t,t.pendingProps,n),t.child;case 8:return Ue(e,t,t.pendingProps.children,n),t.child;case 12:return Ue(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,se(Fa,r._currentValue),r._currentValue=s,i!==null)if(At(i.value,s)){if(i.children===o.children&&!Qe.current){t=pn(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=rn(-1,n&-n),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Kc(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(D(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Kc(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}Ue(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,po(t,n),o=wt(o),r=r(o),t.flags|=1,Ue(e,t,r,n),t.child;case 14:return r=t.type,o=Ct(r,t.pendingProps),o=Ct(r.type,o),om(e,t,r,o,n);case 15:return Ry(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ct(r,o),ca(e,t),t.tag=1,Ze(r)?(e=!0,Oa(t)):e=!1,po(t,n),by(t,r,o),Xc(t,r,o,n),qc(null,t,r,!0,e,n);case 19:return Iy(e,t,n);case 22:return Ny(e,t,n)}throw Error(D(156,t.tag))};function qy(e,t){return k0(e,t)}function yk(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function gt(e,t,n,r){return new yk(e,t,n,r)}function Hd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function wk(e){if(typeof e=="function")return Hd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===cd)return 11;if(e===fd)return 14}return 2}function zn(e,t){var n=e.alternate;return n===null?(n=gt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ha(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")Hd(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Br:return pr(n.children,o,i,t);case ud:s=8,o|=8;break;case wc:return e=gt(12,n,t,o|2),e.elementType=wc,e.lanes=i,e;case xc:return e=gt(13,n,t,o),e.elementType=xc,e.lanes=i,e;case Sc:return e=gt(19,n,t,o),e.elementType=Sc,e.lanes=i,e;case l0:return Dl(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case s0:s=10;break e;case a0:s=9;break e;case cd:s=11;break e;case fd:s=14;break e;case bn:s=16,r=null;break e}throw Error(D(130,e==null?e:typeof e,""))}return t=gt(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function pr(e,t,n,r){return e=gt(7,e,r,t),e.lanes=n,e}function Dl(e,t,n,r){return e=gt(22,e,r,t),e.elementType=l0,e.lanes=n,e.stateNode={isHidden:!1},e}function Du(e,t,n){return e=gt(6,e,null,t),e.lanes=n,e}function Lu(e,t,n){return t=gt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function xk(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=pu(0),this.expirationTimes=pu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pu(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Gd(e,t,n,r,o,i,s,a,l){return e=new xk(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=gt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ad(i),e}function Sk(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(nw)}catch(e){console.error(e)}}nw(),n0.exports=lt;var Rr=n0.exports;const Ek=Wv(Rr);var ym=Rr;vc.createRoot=ym.createRoot,vc.hydrateRoot=ym.hydrateRoot;function X(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function _k(e,t){const n=g.createContext(t);function r(i){const{children:s,...a}=i,l=g.useMemo(()=>a,Object.values(a));return x.jsx(n.Provider,{value:l,children:s})}function o(i){const s=g.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return r.displayName=e+"Provider",[r,o]}function Nr(e,t=[]){let n=[];function r(i,s){const a=g.createContext(s),l=n.length;n=[...n,s];function u(f){const{scope:d,children:h,...v}=f,y=(d==null?void 0:d[e][l])||a,S=g.useMemo(()=>v,Object.values(v));return x.jsx(y.Provider,{value:S,children:h})}function c(f,d){const h=(d==null?void 0:d[e][l])||a,v=g.useContext(h);if(v)return v;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,c]}const o=()=>{const i=n.map(s=>g.createContext(s));return function(a){const l=(a==null?void 0:a[e])||i;return g.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,bk(o,...t)]}function bk(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((a,{useScope:l,scopeName:u})=>{const f=l(i)[`__scope${u}`];return{...a,...f}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Ak(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function rw(...e){return t=>e.forEach(n=>Ak(n,t))}function de(...e){return g.useCallback(rw(...e),e)}var Cr=g.forwardRef((e,t)=>{const{children:n,...r}=e,o=g.Children.toArray(n),i=o.find(Mk);if(i){const s=i.props.children,a=o.map(l=>l===i?g.Children.count(s)>1?g.Children.only(null):g.isValidElement(s)?s.props.children:null:l);return x.jsx(ff,{...r,ref:t,children:g.isValidElement(s)?g.cloneElement(s,void 0,a):null})}return x.jsx(ff,{...r,ref:t,children:n})});Cr.displayName="Slot";var ff=g.forwardRef((e,t)=>{const{children:n,...r}=e;if(g.isValidElement(n)){const o=Nk(n);return g.cloneElement(n,{...Rk(r,n.props),ref:t?rw(t,o):o})}return g.Children.count(n)>1?g.Children.only(null):null});ff.displayName="SlotClone";var ow=({children:e})=>x.jsx(x.Fragment,{children:e});function Mk(e){return g.isValidElement(e)&&e.type===ow}function Rk(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Nk(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function iw(e){const t=e+"CollectionProvider",[n,r]=Nr(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=h=>{const{scope:v,children:y}=h,S=Yt.useRef(null),m=Yt.useRef(new Map).current;return x.jsx(o,{scope:v,itemMap:m,collectionRef:S,children:y})};s.displayName=t;const a=e+"CollectionSlot",l=Yt.forwardRef((h,v)=>{const{scope:y,children:S}=h,m=i(a,y),p=de(v,m.collectionRef);return x.jsx(Cr,{ref:p,children:S})});l.displayName=a;const u=e+"CollectionItemSlot",c="data-radix-collection-item",f=Yt.forwardRef((h,v)=>{const{scope:y,children:S,...m}=h,p=Yt.useRef(null),w=de(v,p),C=i(u,y);return Yt.useEffect(()=>(C.itemMap.set(p,{ref:p,...m}),()=>void C.itemMap.delete(p))),x.jsx(Cr,{[c]:"",ref:w,children:S})});f.displayName=u;function d(h){const v=i(e+"CollectionConsumer",h);return Yt.useCallback(()=>{const S=v.collectionRef.current;if(!S)return[];const m=Array.from(S.querySelectorAll(`[${c}]`));return Array.from(v.itemMap.values()).sort((C,T)=>m.indexOf(C.ref.current)-m.indexOf(T.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:s,Slot:l,ItemSlot:f},d,r]}var We=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},Dk=mT.useId||(()=>{}),Lk=0;function on(e){const[t,n]=g.useState(Dk());return We(()=>{e||n(r=>r??String(Lk++))},[e]),e||(t?`radix-${t}`:"")}var Ok=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],J=Ok.reduce((e,t)=>{const n=g.forwardRef((r,o)=>{const{asChild:i,...s}=r,a=i?Cr:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(a,{...s,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Ik(e,t){e&&Rr.flushSync(()=>e.dispatchEvent(t))}function Bt(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function _o({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=jk({defaultProp:t,onChange:n}),i=e!==void 0,s=i?e:r,a=Bt(n),l=g.useCallback(u=>{if(i){const f=typeof u=="function"?u(e):u;f!==e&&a(f)}else o(u)},[i,e,o,a]);return[s,l]}function jk({defaultProp:e,onChange:t}){const n=g.useState(e),[r]=n,o=g.useRef(r),i=Bt(t);return g.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var Fk=g.createContext(void 0);function Qd(e){const t=g.useContext(Fk);return e||t||"ltr"}var Ou="rovingFocusGroup.onEntryFocus",Vk={bubbles:!1,cancelable:!0},Fl="RovingFocusGroup",[df,sw,$k]=iw(Fl),[zk,aw]=Nr(Fl,[$k]),[Uk,Bk]=zk(Fl),lw=g.forwardRef((e,t)=>x.jsx(df.Provider,{scope:e.__scopeRovingFocusGroup,children:x.jsx(df.Slot,{scope:e.__scopeRovingFocusGroup,children:x.jsx(Wk,{...e,ref:t})})}));lw.displayName=Fl;var Wk=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:c=!1,...f}=e,d=g.useRef(null),h=de(t,d),v=Qd(i),[y=null,S]=_o({prop:s,defaultProp:a,onChange:l}),[m,p]=g.useState(!1),w=Bt(u),C=sw(n),T=g.useRef(!1),[P,E]=g.useState(0);return g.useEffect(()=>{const k=d.current;if(k)return k.addEventListener(Ou,w),()=>k.removeEventListener(Ou,w)},[w]),x.jsx(Uk,{scope:n,orientation:r,dir:v,loop:o,currentTabStopId:y,onItemFocus:g.useCallback(k=>S(k),[S]),onItemShiftTab:g.useCallback(()=>p(!0),[]),onFocusableItemAdd:g.useCallback(()=>E(k=>k+1),[]),onFocusableItemRemove:g.useCallback(()=>E(k=>k-1),[]),children:x.jsx(J.div,{tabIndex:m||P===0?-1:0,"data-orientation":r,...f,ref:h,style:{outline:"none",...e.style},onMouseDown:X(e.onMouseDown,()=>{T.current=!0}),onFocus:X(e.onFocus,k=>{const b=!T.current;if(k.target===k.currentTarget&&b&&!m){const _=new CustomEvent(Ou,Vk);if(k.currentTarget.dispatchEvent(_),!_.defaultPrevented){const M=C().filter($=>$.focusable),N=M.find($=>$.active),I=M.find($=>$.id===y),j=[N,I,...M].filter(Boolean).map($=>$.ref.current);fw(j,c)}}T.current=!1}),onBlur:X(e.onBlur,()=>p(!1))})})}),uw="RovingFocusGroupItem",cw=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...s}=e,a=on(),l=i||a,u=Bk(uw,n),c=u.currentTabStopId===l,f=sw(n),{onFocusableItemAdd:d,onFocusableItemRemove:h}=u;return g.useEffect(()=>{if(r)return d(),()=>h()},[r,d,h]),x.jsx(df.ItemSlot,{scope:n,id:l,focusable:r,active:o,children:x.jsx(J.span,{tabIndex:c?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:X(e.onMouseDown,v=>{r?u.onItemFocus(l):v.preventDefault()}),onFocus:X(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:X(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){u.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const y=Kk(v,u.orientation,u.dir);if(y!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let m=f().filter(p=>p.focusable).map(p=>p.ref.current);if(y==="last")m.reverse();else if(y==="prev"||y==="next"){y==="prev"&&m.reverse();const p=m.indexOf(v.currentTarget);m=u.loop?Yk(m,p+1):m.slice(p+1)}setTimeout(()=>fw(m))}})})})});cw.displayName=uw;var Hk={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Gk(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Kk(e,t,n){const r=Gk(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Hk[r]}function fw(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Yk(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Xk=lw,Qk=cw;function Zk(e,t){return g.useReducer((n,r)=>t[n][r]??n,e)}var zo=e=>{const{present:t,children:n}=e,r=qk(t),o=typeof n=="function"?n({present:r.isPresent}):g.Children.only(n),i=de(r.ref,Jk(o));return typeof n=="function"||r.isPresent?g.cloneElement(o,{ref:i}):null};zo.displayName="Presence";function qk(e){const[t,n]=g.useState(),r=g.useRef({}),o=g.useRef(e),i=g.useRef("none"),s=e?"mounted":"unmounted",[a,l]=Zk(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const u=zs(r.current);i.current=a==="mounted"?u:"none"},[a]),We(()=>{const u=r.current,c=o.current;if(c!==e){const d=i.current,h=zs(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&d!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),We(()=>{if(t){const u=f=>{const h=zs(r.current).includes(f.animationName);f.target===t&&h&&Rr.flushSync(()=>l("ANIMATION_END"))},c=f=>{f.target===t&&(i.current=zs(r.current))};return t.addEventListener("animationstart",c),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",c),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:g.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function zs(e){return(e==null?void 0:e.animationName)||"none"}function Jk(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Zd="Tabs",[eE,Dj]=Nr(Zd,[aw]),dw=aw(),[tE,qd]=eE(Zd),hw=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:s="horizontal",dir:a,activationMode:l="automatic",...u}=e,c=Qd(a),[f,d]=_o({prop:r,onChange:o,defaultProp:i});return x.jsx(tE,{scope:n,baseId:on(),value:f,onValueChange:d,orientation:s,dir:c,activationMode:l,children:x.jsx(J.div,{dir:c,"data-orientation":s,...u,ref:t})})});hw.displayName=Zd;var pw="TabsList",mw=g.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=qd(pw,n),s=dw(n);return x.jsx(Xk,{asChild:!0,...s,orientation:i.orientation,dir:i.dir,loop:r,children:x.jsx(J.div,{role:"tablist","aria-orientation":i.orientation,...o,ref:t})})});mw.displayName=pw;var gw="TabsTrigger",vw=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,s=qd(gw,n),a=dw(n),l=xw(s.baseId,r),u=Sw(s.baseId,r),c=r===s.value;return x.jsx(Qk,{asChild:!0,...a,focusable:!o,active:c,children:x.jsx(J.button,{type:"button",role:"tab","aria-selected":c,"aria-controls":u,"data-state":c?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...i,ref:t,onMouseDown:X(e.onMouseDown,f=>{!o&&f.button===0&&f.ctrlKey===!1?s.onValueChange(r):f.preventDefault()}),onKeyDown:X(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&s.onValueChange(r)}),onFocus:X(e.onFocus,()=>{const f=s.activationMode!=="manual";!c&&!o&&f&&s.onValueChange(r)})})})});vw.displayName=gw;var yw="TabsContent",ww=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...s}=e,a=qd(yw,n),l=xw(a.baseId,r),u=Sw(a.baseId,r),c=r===a.value,f=g.useRef(c);return g.useEffect(()=>{const d=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(d)},[]),x.jsx(zo,{present:o||c,children:({present:d})=>x.jsx(J.div,{"data-state":c?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!d,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:d&&i})})});ww.displayName=yw;function xw(e,t){return`${e}-trigger-${t}`}function Sw(e,t){return`${e}-content-${t}`}var nE=hw,Cw=mw,Tw=vw,Pw=ww;function kw(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t{const t=sE(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const a=s.split(Jd);return a[0]===""&&a.length!==1&&a.shift(),Ew(a,t)||iE(s)},getConflictingClassGroupIds:(s,a)=>{const l=n[s]||[];return a&&r[s]?[...l,...r[s]]:l}}},Ew=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Ew(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Jd);return(s=t.validators.find(({validator:a})=>a(i)))==null?void 0:s.classGroupId},wm=/^\[(.+)\]$/,iE=e=>{if(wm.test(e)){const t=wm.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},sE=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return lE(Object.entries(e.classGroups),n).forEach(([i,s])=>{hf(s,r,i,t)}),r},hf=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:xm(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(aE(o)){hf(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,s])=>{hf(s,xm(t,i),n,r)})})},xm=(e,t)=>{let n=e;return t.split(Jd).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},aE=e=>e.isThemeGetter,lE=(e,t)=>t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,a])=>[t+s,a])):i);return[n,o]}):e,uE=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,s)=>{n.set(i,s),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let s=n.get(i);if(s!==void 0)return s;if((s=r.get(i))!==void 0)return o(i,s),s},set(i,s){n.has(i)?n.set(i,s):o(i,s)}}},_w="!",cE=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],i=t.length,s=a=>{const l=[];let u=0,c=0,f;for(let S=0;Sc?f-c:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:v,maybePostfixModifierPosition:y}};return n?a=>n({className:a,parseClassName:s}):s},fE=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},dE=e=>({cache:uE(e.cacheSize),parseClassName:cE(e),...oE(e)}),hE=/\s+/,pE=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],s=e.trim().split(hE);let a="";for(let l=s.length-1;l>=0;l-=1){const u=s[l],{modifiers:c,hasImportantModifier:f,baseClassName:d,maybePostfixModifierPosition:h}=n(u);let v=!!h,y=r(v?d.substring(0,h):d);if(!y){if(!v){a=u+(a.length>0?" "+a:a);continue}if(y=r(d),!y){a=u+(a.length>0?" "+a:a);continue}v=!1}const S=fE(c).join(":"),m=f?S+_w:S,p=m+y;if(i.includes(p))continue;i.push(p);const w=o(y,v);for(let C=0;C0?" "+a:a)}return a};function mE(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rf(c),e());return n=dE(u),r=n.cache.get,o=n.cache.set,i=a,a(l)}function a(l){const u=r(l);if(u)return u;const c=pE(l,n);return o(l,c),c}return function(){return i(mE.apply(null,arguments))}}const le=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Aw=/^\[(?:([a-z-]+):)?(.+)\]$/i,vE=/^\d+\/\d+$/,yE=new Set(["px","full","screen"]),wE=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,xE=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,SE=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,CE=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,TE=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Gt=e=>go(e)||yE.has(e)||vE.test(e),Pn=e=>Uo(e,"length",RE),go=e=>!!e&&!Number.isNaN(Number(e)),Iu=e=>Uo(e,"number",go),ti=e=>!!e&&Number.isInteger(Number(e)),PE=e=>e.endsWith("%")&&go(e.slice(0,-1)),Y=e=>Aw.test(e),kn=e=>wE.test(e),kE=new Set(["length","size","percentage"]),EE=e=>Uo(e,kE,Mw),_E=e=>Uo(e,"position",Mw),bE=new Set(["image","url"]),AE=e=>Uo(e,bE,DE),ME=e=>Uo(e,"",NE),ni=()=>!0,Uo=(e,t,n)=>{const r=Aw.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},RE=e=>xE.test(e)&&!SE.test(e),Mw=()=>!1,NE=e=>CE.test(e),DE=e=>TE.test(e),LE=()=>{const e=le("colors"),t=le("spacing"),n=le("blur"),r=le("brightness"),o=le("borderColor"),i=le("borderRadius"),s=le("borderSpacing"),a=le("borderWidth"),l=le("contrast"),u=le("grayscale"),c=le("hueRotate"),f=le("invert"),d=le("gap"),h=le("gradientColorStops"),v=le("gradientColorStopPositions"),y=le("inset"),S=le("margin"),m=le("opacity"),p=le("padding"),w=le("saturate"),C=le("scale"),T=le("sepia"),P=le("skew"),E=le("space"),k=le("translate"),b=()=>["auto","contain","none"],_=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto",Y,t],N=()=>[Y,t],I=()=>["",Gt,Pn],B=()=>["auto",go,Y],j=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],$=()=>["solid","dashed","dotted","double","none"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],R=()=>["start","end","center","between","around","evenly","stretch"],L=()=>["","0",Y],W=()=>["auto","avoid","all","avoid-page","page","left","right","column"],K=()=>[go,Y];return{cacheSize:500,separator:":",theme:{colors:[ni],spacing:[Gt,Pn],blur:["none","",kn,Y],brightness:K(),borderColor:[e],borderRadius:["none","","full",kn,Y],borderSpacing:N(),borderWidth:I(),contrast:K(),grayscale:L(),hueRotate:K(),invert:L(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[PE,Pn],inset:M(),margin:M(),opacity:K(),padding:N(),saturate:K(),scale:K(),sepia:L(),skew:K(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",Y]}],container:["container"],columns:[{columns:[kn]}],"break-after":[{"break-after":W()}],"break-before":[{"break-before":W()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...j(),Y]}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:b()}],"overscroll-x":[{"overscroll-x":b()}],"overscroll-y":[{"overscroll-y":b()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ti,Y]}],basis:[{basis:M()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Y]}],grow:[{grow:L()}],shrink:[{shrink:L()}],order:[{order:["first","last","none",ti,Y]}],"grid-cols":[{"grid-cols":[ni]}],"col-start-end":[{col:["auto",{span:["full",ti,Y]},Y]}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":[ni]}],"row-start-end":[{row:["auto",{span:[ti,Y]},Y]}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Y]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Y]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...R()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...R(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...R(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[p]}],px:[{px:[p]}],py:[{py:[p]}],ps:[{ps:[p]}],pe:[{pe:[p]}],pt:[{pt:[p]}],pr:[{pr:[p]}],pb:[{pb:[p]}],pl:[{pl:[p]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Y,t]}],"min-w":[{"min-w":[Y,t,"min","max","fit"]}],"max-w":[{"max-w":[Y,t,"none","full","min","max","fit","prose",{screen:[kn]},kn]}],h:[{h:[Y,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Y,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Y,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Y,t,"auto","min","max","fit"]}],"font-size":[{text:["base",kn,Pn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Iu]}],"font-family":[{font:[ni]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Y]}],"line-clamp":[{"line-clamp":["none",go,Iu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Gt,Y]}],"list-image":[{"list-image":["none",Y]}],"list-style-type":[{list:["none","disc","decimal",Y]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...$(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Gt,Pn]}],"underline-offset":[{"underline-offset":["auto",Gt,Y]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Y]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Y]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...j(),_E]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",EE]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},AE]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[m]}],"border-style":[{border:[...$(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[m]}],"divide-style":[{divide:$()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...$()]}],"outline-offset":[{"outline-offset":[Gt,Y]}],"outline-w":[{outline:[Gt,Pn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:I()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[Gt,Pn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",kn,ME]}],"shadow-color":[{shadow:[ni]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":[...z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":z()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",kn,Y]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[f]}],saturate:[{saturate:[w]}],sepia:[{sepia:[T]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[T]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Y]}],duration:[{duration:K()}],ease:[{ease:["linear","in","out","in-out",Y]}],delay:[{delay:K()}],animate:[{animate:["none","spin","ping","pulse","bounce",Y]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[ti,Y]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"skew-x":[{"skew-x":[P]}],"skew-y":[{"skew-y":[P]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Y]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Y]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Y]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Gt,Pn,Iu]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},OE=gE(LE);function ae(...e){return OE(rE(e))}const IE=nE,Rw=g.forwardRef(({className:e,...t},n)=>x.jsx(Cw,{ref:n,className:ae("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));Rw.displayName=Cw.displayName;const pf=g.forwardRef(({className:e,...t},n)=>x.jsx(Tw,{ref:n,className:ae("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));pf.displayName=Tw.displayName;const mf=g.forwardRef(({className:e,...t},n)=>x.jsx(Pw,{ref:n,className:ae("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));mf.displayName=Pw.displayName;function jE(e,t=globalThis==null?void 0:globalThis.document){const n=Bt(e);g.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var FE="DismissableLayer",gf="dismissableLayer.update",VE="dismissableLayer.pointerDownOutside",$E="dismissableLayer.focusOutside",Sm,Nw=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Vl=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...l}=e,u=g.useContext(Nw),[c,f]=g.useState(null),d=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=g.useState({}),v=de(t,E=>f(E)),y=Array.from(u.layers),[S]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),m=y.indexOf(S),p=c?y.indexOf(c):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,C=p>=m,T=BE(E=>{const k=E.target,b=[...u.branches].some(_=>_.contains(k));!C||b||(o==null||o(E),s==null||s(E),E.defaultPrevented||a==null||a())},d),P=WE(E=>{const k=E.target;[...u.branches].some(_=>_.contains(k))||(i==null||i(E),s==null||s(E),E.defaultPrevented||a==null||a())},d);return jE(E=>{p===u.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},d),g.useEffect(()=>{if(c)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Sm=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),Cm(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=Sm)}},[c,d,n,u]),g.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),Cm())},[c,u]),g.useEffect(()=>{const E=()=>h({});return document.addEventListener(gf,E),()=>document.removeEventListener(gf,E)},[]),x.jsx(J.div,{...l,ref:v,style:{pointerEvents:w?C?"auto":"none":void 0,...e.style},onFocusCapture:X(e.onFocusCapture,P.onFocusCapture),onBlurCapture:X(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:X(e.onPointerDownCapture,T.onPointerDownCapture)})});Vl.displayName=FE;var zE="DismissableLayerBranch",UE=g.forwardRef((e,t)=>{const n=g.useContext(Nw),r=g.useRef(null),o=de(t,r);return g.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),x.jsx(J.div,{...e,ref:o})});UE.displayName=zE;function BE(e,t=globalThis==null?void 0:globalThis.document){const n=Bt(e),r=g.useRef(!1),o=g.useRef(()=>{});return g.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){Dw(VE,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function WE(e,t=globalThis==null?void 0:globalThis.document){const n=Bt(e),r=g.useRef(!1);return g.useEffect(()=>{const o=i=>{i.target&&!r.current&&Dw($E,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Cm(){const e=new CustomEvent(gf);document.dispatchEvent(e)}function Dw(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Ik(o,i):o.dispatchEvent(i)}var ju="focusScope.autoFocusOnMount",Fu="focusScope.autoFocusOnUnmount",Tm={bubbles:!1,cancelable:!0},HE="FocusScope",eh=g.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,l]=g.useState(null),u=Bt(o),c=Bt(i),f=g.useRef(null),d=de(t,y=>l(y)),h=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(r){let y=function(w){if(h.paused||!a)return;const C=w.target;a.contains(C)?f.current=C:En(f.current,{select:!0})},S=function(w){if(h.paused||!a)return;const C=w.relatedTarget;C!==null&&(a.contains(C)||En(f.current,{select:!0}))},m=function(w){if(document.activeElement===document.body)for(const T of w)T.removedNodes.length>0&&En(a)};document.addEventListener("focusin",y),document.addEventListener("focusout",S);const p=new MutationObserver(m);return a&&p.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",S),p.disconnect()}}},[r,a,h.paused]),g.useEffect(()=>{if(a){km.add(h);const y=document.activeElement;if(!a.contains(y)){const m=new CustomEvent(ju,Tm);a.addEventListener(ju,u),a.dispatchEvent(m),m.defaultPrevented||(GE(ZE(Lw(a)),{select:!0}),document.activeElement===y&&En(a))}return()=>{a.removeEventListener(ju,u),setTimeout(()=>{const m=new CustomEvent(Fu,Tm);a.addEventListener(Fu,c),a.dispatchEvent(m),m.defaultPrevented||En(y??document.body,{select:!0}),a.removeEventListener(Fu,c),km.remove(h)},0)}}},[a,u,c,h]);const v=g.useCallback(y=>{if(!n&&!r||h.paused)return;const S=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,m=document.activeElement;if(S&&m){const p=y.currentTarget,[w,C]=KE(p);w&&C?!y.shiftKey&&m===C?(y.preventDefault(),n&&En(w,{select:!0})):y.shiftKey&&m===w&&(y.preventDefault(),n&&En(C,{select:!0})):m===p&&y.preventDefault()}},[n,r,h.paused]);return x.jsx(J.div,{tabIndex:-1,...s,ref:d,onKeyDown:v})});eh.displayName=HE;function GE(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(En(r,{select:t}),document.activeElement!==n)return}function KE(e){const t=Lw(e),n=Pm(t,e),r=Pm(t.reverse(),e);return[n,r]}function Lw(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Pm(e,t){for(const n of e)if(!YE(n,{upTo:t}))return n}function YE(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function XE(e){return e instanceof HTMLInputElement&&"select"in e}function En(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&XE(e)&&t&&e.select()}}var km=QE();function QE(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Em(e,t),e.unshift(t)},remove(t){var n;e=Em(e,t),(n=e[0])==null||n.resume()}}}function Em(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function ZE(e){return e.filter(t=>t.tagName!=="A")}var qE="Portal",th=g.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,i]=g.useState(!1);We(()=>i(!0),[]);const s=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?Ek.createPortal(x.jsx(J.div,{...r,ref:t}),s):null});th.displayName=qE;var Vu=0;function Ow(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??_m()),document.body.insertAdjacentElement("beforeend",e[1]??_m()),Vu++,()=>{Vu===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Vu--}},[])}function _m(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var jt=function(){return jt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r"u")return m_;var t=g_(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},y_=Vw(),vo="data-scroll-locked",w_=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),` +`+i.stack}return{value:e,source:t,stack:o,digest:null}}function Ru(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Qc(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var tk=typeof WeakMap=="function"?WeakMap:Map;function Ay(e,t,n){n=rn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ha||(Ha=!0,af=r),Qc(e,t)},n}function My(e,t,n){n=rn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){Qc(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Qc(e,t),typeof r!="function"&&(Vn===null?Vn=new Set([this]):Vn.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function em(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new tk;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=mk.bind(null,e,t,n),t.then(e,e))}function tm(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function nm(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=rn(-1,1),t.tag=2,Fn(n,t,1))),n.lanes|=1),e)}var nk=Sn.ReactCurrentOwner,Ye=!1;function Ue(e,t,n,r){t.child=e===null?iy(t,null,n,r):To(t,e.child,n,r)}function rm(e,t,n,r,o){n=n.render;var i=t.ref;return po(t,o),r=Ld(e,t,n,r,i,o),n=Od(),e!==null&&!Ye?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,pn(e,t,o)):(fe&&n&&Cd(t),t.flags|=1,Ue(e,t,r,o),t.child)}function om(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!Hd(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Ry(e,t,i,r,o)):(e=ha(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&o)){var s=i.memoizedProps;if(n=n.compare,n=n!==null?n:zi,n(s,r)&&e.ref===t.ref)return pn(e,t,o)}return t.flags|=1,e=zn(i,r),e.ref=t.ref,e.return=t,t.child=e}function Ry(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(zi(i,r)&&e.ref===t.ref)if(Ye=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&(Ye=!0);else return t.lanes=e.lanes,pn(e,t,o)}return Zc(e,t,n,r,o)}function Ny(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},se(Jr,et),et|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,se(Jr,et),et|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,se(Jr,et),et|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,se(Jr,et),et|=r;return Ue(e,t,o,n),t.child}function Dy(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Zc(e,t,n,r,o){var i=Ze(n)?vr:ze.current;return i=So(t,i),po(t,o),n=Ld(e,t,n,r,i,o),r=Od(),e!==null&&!Ye?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,pn(e,t,o)):(fe&&r&&Cd(t),t.flags|=1,Ue(e,t,n,o),t.child)}function im(e,t,n,r,o){if(Ze(n)){var i=!0;Oa(t)}else i=!1;if(po(t,o),t.stateNode===null)ca(e,t),by(t,n,r),Xc(t,n,r,o),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=wt(u):(u=Ze(n)?vr:ze.current,u=So(t,u));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";f||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==u)&&Jp(t,s,r,u),An=!1;var d=t.memoizedState;s.state=d,$a(t,r,s,o),l=t.memoizedState,a!==r||d!==l||Qe.current||An?(typeof c=="function"&&(Yc(t,n,c,r),l=t.memoizedState),(a=An||qp(t,n,a,r,d,l,u))?(f||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=u,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,ay(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Ct(t.type,a),s.props=u,f=t.pendingProps,d=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=wt(l):(l=Ze(n)?vr:ze.current,l=So(t,l));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==f||d!==l)&&Jp(t,s,r,l),An=!1,d=t.memoizedState,s.state=d,$a(t,r,s,o);var v=t.memoizedState;a!==f||d!==v||Qe.current||An?(typeof h=="function"&&(Yc(t,n,h,r),v=t.memoizedState),(u=An||qp(t,n,u,r,d,v,l)||!1)?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,v,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,v,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),s.props=r,s.state=v,s.context=l,r=u):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return qc(e,t,n,r,i,o)}function qc(e,t,n,r,o,i){Dy(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return o&&Wp(t,n,!1),pn(e,t,i);r=t.stateNode,nk.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=To(t,e.child,null,i),t.child=To(t,null,a,i)):Ue(e,t,a,i),t.memoizedState=r.state,o&&Wp(t,n,!0),t.child}function Ly(e){var t=e.stateNode;t.pendingContext?Bp(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Bp(e,t.context,!1),Md(e,t.containerInfo)}function sm(e,t,n,r,o){return Co(),Pd(o),t.flags|=256,Ue(e,t,n,r),t.child}var Jc={dehydrated:null,treeContext:null,retryLane:0};function ef(e){return{baseLanes:e,cachePool:null,transitions:null}}function Oy(e,t,n){var r=t.pendingProps,o=he.current,i=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(o&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),se(he,o&1),e===null)return Gc(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,i?(r=t.mode,i=t.child,s={mode:"hidden",children:s},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=s):i=Dl(s,r,0,null),e=pr(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=ef(n),t.memoizedState=Jc,e):Fd(t,s));if(o=e.memoizedState,o!==null&&(a=o.dehydrated,a!==null))return rk(e,t,s,r,a,o,n);if(i){i=r.fallback,s=t.mode,o=e.child,a=o.sibling;var l={mode:"hidden",children:r.children};return!(s&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=zn(o,l),r.subtreeFlags=o.subtreeFlags&14680064),a!==null?i=zn(a,i):(i=pr(i,s,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,s=e.child.memoizedState,s=s===null?ef(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~n,t.memoizedState=Jc,r}return i=e.child,e=i.sibling,r=zn(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Fd(e,t){return t=Dl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function js(e,t,n,r){return r!==null&&Pd(r),To(t,e.child,null,n),e=Fd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function rk(e,t,n,r,o,i,s){if(n)return t.flags&256?(t.flags&=-257,r=Ru(Error(D(422))),js(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=Dl({mode:"visible",children:r.children},o,0,null),i=pr(i,o,s,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&To(t,e.child,null,s),t.child.memoizedState=ef(s),t.memoizedState=Jc,i);if(!(t.mode&1))return js(e,t,s,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(D(419)),r=Ru(i,r,void 0),js(e,t,s,r)}if(a=(s&e.childLanes)!==0,Ye||a){if(r=be,r!==null){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|s)?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,hn(e,o),bt(r,e,o,-1))}return Wd(),r=Ru(Error(D(421))),js(e,t,s,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=gk.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,nt=jn(o.nextSibling),rt=t,fe=!0,Pt=null,e!==null&&(pt[mt++]=qt,pt[mt++]=Jt,pt[mt++]=yr,qt=e.id,Jt=e.overflow,yr=t),t=Fd(t,r.children),t.flags|=4096,t)}function am(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Kc(e.return,t,n)}function Nu(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function Iy(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Ue(e,t,r.children,n),r=he.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&am(e,n,t);else if(e.tag===19)am(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(se(he,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&za(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Nu(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&za(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Nu(t,!0,n,null,i);break;case"together":Nu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ca(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function pn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),xr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(D(153));if(t.child!==null){for(e=t.child,n=zn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=zn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ok(e,t,n){switch(t.tag){case 3:Ly(t),Co();break;case 5:ly(t);break;case 1:Ze(t.type)&&Oa(t);break;case 4:Md(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;se(Fa,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(se(he,he.current&1),t.flags|=128,null):n&t.child.childLanes?Oy(e,t,n):(se(he,he.current&1),e=pn(e,t,n),e!==null?e.sibling:null);se(he,he.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Iy(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),se(he,he.current),r)break;return null;case 22:case 23:return t.lanes=0,Ny(e,t,n)}return pn(e,t,n)}var jy,tf,Fy,Vy;jy=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};tf=function(){};Fy=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,cr($t.current);var i=null;switch(n){case"input":o=Tc(e,o),r=Tc(e,r),i=[];break;case"select":o=ge({},o,{value:void 0}),r=ge({},r,{value:void 0}),i=[];break;case"textarea":o=Ec(e,o),r=Ec(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Da)}bc(n,r);var s;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var a=o[u];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Li.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var l=r[u];if(a=o!=null?o[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(s in a)!a.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in l)l.hasOwnProperty(s)&&a[s]!==l[s]&&(n||(n={}),n[s]=l[s])}else n||(i||(i=[]),i.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Li.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&ue("scroll",e),i||a===l||(i=[])):(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};Vy=function(e,t,n,r){n!==r&&(t.flags|=4)};function Jo(e,t){if(!fe)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ie(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function ik(e,t,n){var r=t.pendingProps;switch(Td(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ie(t),null;case 1:return Ze(t.type)&&La(),Ie(t),null;case 3:return r=t.stateNode,Po(),ce(Qe),ce(ze),Nd(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Os(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Pt!==null&&(cf(Pt),Pt=null))),tf(e,t),Ie(t),null;case 5:Rd(t);var o=cr(Gi.current);if(n=t.type,e!==null&&t.stateNode!=null)Fy(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(D(166));return Ie(t),null}if(e=cr($t.current),Os(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[It]=t,r[Wi]=i,e=(t.mode&1)!==0,n){case"dialog":ue("cancel",r),ue("close",r);break;case"iframe":case"object":case"embed":ue("load",r);break;case"video":case"audio":for(o=0;o<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[It]=t,e[Wi]=r,jy(e,t,!1,!1),t.stateNode=e;e:{switch(s=Ac(n,r),n){case"dialog":ue("cancel",e),ue("close",e),o=r;break;case"iframe":case"object":case"embed":ue("load",e),o=r;break;case"video":case"audio":for(o=0;oEo&&(t.flags|=128,r=!0,Jo(i,!1),t.lanes=4194304)}else{if(!r)if(e=za(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Jo(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!fe)return Ie(t),null}else 2*we()-i.renderingStartTime>Eo&&n!==1073741824&&(t.flags|=128,r=!0,Jo(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=we(),t.sibling=null,n=he.current,se(he,r?n&1|2:n&1),t):(Ie(t),null);case 22:case 23:return Bd(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?et&1073741824&&(Ie(t),t.subtreeFlags&6&&(t.flags|=8192)):Ie(t),null;case 24:return null;case 25:return null}throw Error(D(156,t.tag))}function sk(e,t){switch(Td(t),t.tag){case 1:return Ze(t.type)&&La(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Po(),ce(Qe),ce(ze),Nd(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Rd(t),null;case 13:if(ce(he),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(D(340));Co()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ce(he),null;case 4:return Po(),null;case 10:return _d(t.type._context),null;case 22:case 23:return Bd(),null;case 24:return null;default:return null}}var Fs=!1,Fe=!1,ak=typeof WeakSet=="function"?WeakSet:Set,F=null;function qr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ve(e,t,r)}else n.current=null}function nf(e,t,n){try{n()}catch(r){ve(e,t,r)}}var lm=!1;function lk(e,t){if(Vc=Ma,e=W0(),Sd(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var h;f!==n||o!==0&&f.nodeType!==3||(a=s+o),f!==i||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(h=f.firstChild)!==null;)d=f,f=h;for(;;){if(f===e)break t;if(d===n&&++u===o&&(a=s),d===i&&++c===r&&(l=s),(h=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for($c={focusedElem:e,selectionRange:n},Ma=!1,F=t;F!==null;)if(t=F,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,F=e;else for(;F!==null;){t=F;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var y=v.memoizedProps,S=v.memoizedState,m=t.stateNode,p=m.getSnapshotBeforeUpdate(t.elementType===t.type?y:Ct(t.type,y),S);m.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(D(163))}}catch(C){ve(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,F=e;break}F=t.return}return v=lm,lm=!1,v}function _i(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&nf(t,n,i)}o=o.next}while(o!==r)}}function Rl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function rf(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function $y(e){var t=e.alternate;t!==null&&(e.alternate=null,$y(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[It],delete t[Wi],delete t[Bc],delete t[WP],delete t[HP])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function zy(e){return e.tag===5||e.tag===3||e.tag===4}function um(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||zy(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function of(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Da));else if(r!==4&&(e=e.child,e!==null))for(of(e,t,n),e=e.sibling;e!==null;)of(e,t,n),e=e.sibling}function sf(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(sf(e,t,n),e=e.sibling;e!==null;)sf(e,t,n),e=e.sibling}var Re=null,Tt=!1;function Tn(e,t,n){for(n=n.child;n!==null;)Uy(e,t,n),n=n.sibling}function Uy(e,t,n){if(Vt&&typeof Vt.onCommitFiberUnmount=="function")try{Vt.onCommitFiberUnmount(Tl,n)}catch{}switch(n.tag){case 5:Fe||qr(n,t);case 6:var r=Re,o=Tt;Re=null,Tn(e,t,n),Re=r,Tt=o,Re!==null&&(Tt?(e=Re,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Re.removeChild(n.stateNode));break;case 18:Re!==null&&(Tt?(e=Re,n=n.stateNode,e.nodeType===8?ku(e.parentNode,n):e.nodeType===1&&ku(e,n),Vi(e)):ku(Re,n.stateNode));break;case 4:r=Re,o=Tt,Re=n.stateNode.containerInfo,Tt=!0,Tn(e,t,n),Re=r,Tt=o;break;case 0:case 11:case 14:case 15:if(!Fe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&nf(n,t,s),o=o.next}while(o!==r)}Tn(e,t,n);break;case 1:if(!Fe&&(qr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ve(n,t,a)}Tn(e,t,n);break;case 21:Tn(e,t,n);break;case 22:n.mode&1?(Fe=(r=Fe)||n.memoizedState!==null,Tn(e,t,n),Fe=r):Tn(e,t,n);break;default:Tn(e,t,n)}}function cm(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new ak),t.forEach(function(r){var o=vk.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function St(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=we()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ck(r/1960))-r,10e?16:e,Dn===null)var r=!1;else{if(e=Dn,Dn=null,Ga=0,q&6)throw Error(D(331));var o=q;for(q|=4,F=e.current;F!==null;){var i=F,s=i.child;if(F.flags&16){var a=i.deletions;if(a!==null){for(var l=0;lwe()-zd?hr(e,0):$d|=n),qe(e,t)}function Qy(e,t){t===0&&(e.mode&1?(t=As,As<<=1,!(As&130023424)&&(As=4194304)):t=1);var n=Be();e=hn(e,t),e!==null&&(ls(e,t,n),qe(e,n))}function gk(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Qy(e,n)}function vk(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(D(314))}r!==null&&r.delete(t),Qy(e,n)}var Zy;Zy=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Qe.current)Ye=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ye=!1,ok(e,t,n);Ye=!!(e.flags&131072)}else Ye=!1,fe&&t.flags&1048576&&ty(t,ja,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ca(e,t),e=t.pendingProps;var o=So(t,ze.current);po(t,n),o=Ld(null,t,r,e,o,n);var i=Od();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ze(r)?(i=!0,Oa(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Ad(t),o.updater=Ml,t.stateNode=o,o._reactInternals=t,Xc(t,r,e,n),t=qc(null,t,r,!0,i,n)):(t.tag=0,fe&&i&&Cd(t),Ue(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ca(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=wk(r),e=Ct(r,e),o){case 0:t=Zc(null,t,r,e,n);break e;case 1:t=im(null,t,r,e,n);break e;case 11:t=rm(null,t,r,e,n);break e;case 14:t=om(null,t,r,Ct(r.type,e),n);break e}throw Error(D(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ct(r,o),Zc(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ct(r,o),im(e,t,r,o,n);case 3:e:{if(Ly(t),e===null)throw Error(D(387));r=t.pendingProps,i=t.memoizedState,o=i.element,ay(e,t),$a(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=ko(Error(D(423)),t),t=sm(e,t,r,n,o);break e}else if(r!==o){o=ko(Error(D(424)),t),t=sm(e,t,r,n,o);break e}else for(nt=jn(t.stateNode.containerInfo.firstChild),rt=t,fe=!0,Pt=null,n=iy(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Co(),r===o){t=pn(e,t,n);break e}Ue(e,t,r,n)}t=t.child}return t;case 5:return ly(t),e===null&&Gc(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,zc(r,o)?s=null:i!==null&&zc(r,i)&&(t.flags|=32),Dy(e,t),Ue(e,t,s,n),t.child;case 6:return e===null&&Gc(t),null;case 13:return Oy(e,t,n);case 4:return Md(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=To(t,null,r,n):Ue(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ct(r,o),rm(e,t,r,o,n);case 7:return Ue(e,t,t.pendingProps,n),t.child;case 8:return Ue(e,t,t.pendingProps.children,n),t.child;case 12:return Ue(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,se(Fa,r._currentValue),r._currentValue=s,i!==null)if(At(i.value,s)){if(i.children===o.children&&!Qe.current){t=pn(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=rn(-1,n&-n),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Kc(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(D(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Kc(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}Ue(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,po(t,n),o=wt(o),r=r(o),t.flags|=1,Ue(e,t,r,n),t.child;case 14:return r=t.type,o=Ct(r,t.pendingProps),o=Ct(r.type,o),om(e,t,r,o,n);case 15:return Ry(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ct(r,o),ca(e,t),t.tag=1,Ze(r)?(e=!0,Oa(t)):e=!1,po(t,n),by(t,r,o),Xc(t,r,o,n),qc(null,t,r,!0,e,n);case 19:return Iy(e,t,n);case 22:return Ny(e,t,n)}throw Error(D(156,t.tag))};function qy(e,t){return k0(e,t)}function yk(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function gt(e,t,n,r){return new yk(e,t,n,r)}function Hd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function wk(e){if(typeof e=="function")return Hd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===cd)return 11;if(e===fd)return 14}return 2}function zn(e,t){var n=e.alternate;return n===null?(n=gt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ha(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")Hd(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Br:return pr(n.children,o,i,t);case ud:s=8,o|=8;break;case wc:return e=gt(12,n,t,o|2),e.elementType=wc,e.lanes=i,e;case xc:return e=gt(13,n,t,o),e.elementType=xc,e.lanes=i,e;case Sc:return e=gt(19,n,t,o),e.elementType=Sc,e.lanes=i,e;case l0:return Dl(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case s0:s=10;break e;case a0:s=9;break e;case cd:s=11;break e;case fd:s=14;break e;case bn:s=16,r=null;break e}throw Error(D(130,e==null?e:typeof e,""))}return t=gt(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function pr(e,t,n,r){return e=gt(7,e,r,t),e.lanes=n,e}function Dl(e,t,n,r){return e=gt(22,e,r,t),e.elementType=l0,e.lanes=n,e.stateNode={isHidden:!1},e}function Du(e,t,n){return e=gt(6,e,null,t),e.lanes=n,e}function Lu(e,t,n){return t=gt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function xk(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=pu(0),this.expirationTimes=pu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pu(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Gd(e,t,n,r,o,i,s,a,l){return e=new xk(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=gt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ad(i),e}function Sk(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(nw)}catch(e){console.error(e)}}nw(),n0.exports=lt;var Rr=n0.exports;const Ek=Wv(Rr);var ym=Rr;vc.createRoot=ym.createRoot,vc.hydrateRoot=ym.hydrateRoot;function X(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function _k(e,t){const n=g.createContext(t);function r(i){const{children:s,...a}=i,l=g.useMemo(()=>a,Object.values(a));return x.jsx(n.Provider,{value:l,children:s})}function o(i){const s=g.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return r.displayName=e+"Provider",[r,o]}function Nr(e,t=[]){let n=[];function r(i,s){const a=g.createContext(s),l=n.length;n=[...n,s];function u(f){const{scope:d,children:h,...v}=f,y=(d==null?void 0:d[e][l])||a,S=g.useMemo(()=>v,Object.values(v));return x.jsx(y.Provider,{value:S,children:h})}function c(f,d){const h=(d==null?void 0:d[e][l])||a,v=g.useContext(h);if(v)return v;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,c]}const o=()=>{const i=n.map(s=>g.createContext(s));return function(a){const l=(a==null?void 0:a[e])||i;return g.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,bk(o,...t)]}function bk(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((a,{useScope:l,scopeName:u})=>{const f=l(i)[`__scope${u}`];return{...a,...f}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Ak(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function rw(...e){return t=>e.forEach(n=>Ak(n,t))}function de(...e){return g.useCallback(rw(...e),e)}var Cr=g.forwardRef((e,t)=>{const{children:n,...r}=e,o=g.Children.toArray(n),i=o.find(Mk);if(i){const s=i.props.children,a=o.map(l=>l===i?g.Children.count(s)>1?g.Children.only(null):g.isValidElement(s)?s.props.children:null:l);return x.jsx(ff,{...r,ref:t,children:g.isValidElement(s)?g.cloneElement(s,void 0,a):null})}return x.jsx(ff,{...r,ref:t,children:n})});Cr.displayName="Slot";var ff=g.forwardRef((e,t)=>{const{children:n,...r}=e;if(g.isValidElement(n)){const o=Nk(n);return g.cloneElement(n,{...Rk(r,n.props),ref:t?rw(t,o):o})}return g.Children.count(n)>1?g.Children.only(null):null});ff.displayName="SlotClone";var ow=({children:e})=>x.jsx(x.Fragment,{children:e});function Mk(e){return g.isValidElement(e)&&e.type===ow}function Rk(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Nk(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function iw(e){const t=e+"CollectionProvider",[n,r]=Nr(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=h=>{const{scope:v,children:y}=h,S=Yt.useRef(null),m=Yt.useRef(new Map).current;return x.jsx(o,{scope:v,itemMap:m,collectionRef:S,children:y})};s.displayName=t;const a=e+"CollectionSlot",l=Yt.forwardRef((h,v)=>{const{scope:y,children:S}=h,m=i(a,y),p=de(v,m.collectionRef);return x.jsx(Cr,{ref:p,children:S})});l.displayName=a;const u=e+"CollectionItemSlot",c="data-radix-collection-item",f=Yt.forwardRef((h,v)=>{const{scope:y,children:S,...m}=h,p=Yt.useRef(null),w=de(v,p),C=i(u,y);return Yt.useEffect(()=>(C.itemMap.set(p,{ref:p,...m}),()=>void C.itemMap.delete(p))),x.jsx(Cr,{[c]:"",ref:w,children:S})});f.displayName=u;function d(h){const v=i(e+"CollectionConsumer",h);return Yt.useCallback(()=>{const S=v.collectionRef.current;if(!S)return[];const m=Array.from(S.querySelectorAll(`[${c}]`));return Array.from(v.itemMap.values()).sort((C,T)=>m.indexOf(C.ref.current)-m.indexOf(T.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:s,Slot:l,ItemSlot:f},d,r]}var We=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},Dk=mT.useId||(()=>{}),Lk=0;function on(e){const[t,n]=g.useState(Dk());return We(()=>{e||n(r=>r??String(Lk++))},[e]),e||(t?`radix-${t}`:"")}var Ok=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],J=Ok.reduce((e,t)=>{const n=g.forwardRef((r,o)=>{const{asChild:i,...s}=r,a=i?Cr:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(a,{...s,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Ik(e,t){e&&Rr.flushSync(()=>e.dispatchEvent(t))}function Bt(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function _o({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=jk({defaultProp:t,onChange:n}),i=e!==void 0,s=i?e:r,a=Bt(n),l=g.useCallback(u=>{if(i){const f=typeof u=="function"?u(e):u;f!==e&&a(f)}else o(u)},[i,e,o,a]);return[s,l]}function jk({defaultProp:e,onChange:t}){const n=g.useState(e),[r]=n,o=g.useRef(r),i=Bt(t);return g.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var Fk=g.createContext(void 0);function Qd(e){const t=g.useContext(Fk);return e||t||"ltr"}var Ou="rovingFocusGroup.onEntryFocus",Vk={bubbles:!1,cancelable:!0},Fl="RovingFocusGroup",[df,sw,$k]=iw(Fl),[zk,aw]=Nr(Fl,[$k]),[Uk,Bk]=zk(Fl),lw=g.forwardRef((e,t)=>x.jsx(df.Provider,{scope:e.__scopeRovingFocusGroup,children:x.jsx(df.Slot,{scope:e.__scopeRovingFocusGroup,children:x.jsx(Wk,{...e,ref:t})})}));lw.displayName=Fl;var Wk=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:c=!1,...f}=e,d=g.useRef(null),h=de(t,d),v=Qd(i),[y=null,S]=_o({prop:s,defaultProp:a,onChange:l}),[m,p]=g.useState(!1),w=Bt(u),C=sw(n),T=g.useRef(!1),[P,E]=g.useState(0);return g.useEffect(()=>{const k=d.current;if(k)return k.addEventListener(Ou,w),()=>k.removeEventListener(Ou,w)},[w]),x.jsx(Uk,{scope:n,orientation:r,dir:v,loop:o,currentTabStopId:y,onItemFocus:g.useCallback(k=>S(k),[S]),onItemShiftTab:g.useCallback(()=>p(!0),[]),onFocusableItemAdd:g.useCallback(()=>E(k=>k+1),[]),onFocusableItemRemove:g.useCallback(()=>E(k=>k-1),[]),children:x.jsx(J.div,{tabIndex:m||P===0?-1:0,"data-orientation":r,...f,ref:h,style:{outline:"none",...e.style},onMouseDown:X(e.onMouseDown,()=>{T.current=!0}),onFocus:X(e.onFocus,k=>{const b=!T.current;if(k.target===k.currentTarget&&b&&!m){const _=new CustomEvent(Ou,Vk);if(k.currentTarget.dispatchEvent(_),!_.defaultPrevented){const M=C().filter($=>$.focusable),N=M.find($=>$.active),I=M.find($=>$.id===y),j=[N,I,...M].filter(Boolean).map($=>$.ref.current);fw(j,c)}}T.current=!1}),onBlur:X(e.onBlur,()=>p(!1))})})}),uw="RovingFocusGroupItem",cw=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...s}=e,a=on(),l=i||a,u=Bk(uw,n),c=u.currentTabStopId===l,f=sw(n),{onFocusableItemAdd:d,onFocusableItemRemove:h}=u;return g.useEffect(()=>{if(r)return d(),()=>h()},[r,d,h]),x.jsx(df.ItemSlot,{scope:n,id:l,focusable:r,active:o,children:x.jsx(J.span,{tabIndex:c?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:X(e.onMouseDown,v=>{r?u.onItemFocus(l):v.preventDefault()}),onFocus:X(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:X(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){u.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const y=Kk(v,u.orientation,u.dir);if(y!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let m=f().filter(p=>p.focusable).map(p=>p.ref.current);if(y==="last")m.reverse();else if(y==="prev"||y==="next"){y==="prev"&&m.reverse();const p=m.indexOf(v.currentTarget);m=u.loop?Yk(m,p+1):m.slice(p+1)}setTimeout(()=>fw(m))}})})})});cw.displayName=uw;var Hk={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Gk(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Kk(e,t,n){const r=Gk(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Hk[r]}function fw(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Yk(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Xk=lw,Qk=cw;function Zk(e,t){return g.useReducer((n,r)=>t[n][r]??n,e)}var zo=e=>{const{present:t,children:n}=e,r=qk(t),o=typeof n=="function"?n({present:r.isPresent}):g.Children.only(n),i=de(r.ref,Jk(o));return typeof n=="function"||r.isPresent?g.cloneElement(o,{ref:i}):null};zo.displayName="Presence";function qk(e){const[t,n]=g.useState(),r=g.useRef({}),o=g.useRef(e),i=g.useRef("none"),s=e?"mounted":"unmounted",[a,l]=Zk(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const u=zs(r.current);i.current=a==="mounted"?u:"none"},[a]),We(()=>{const u=r.current,c=o.current;if(c!==e){const d=i.current,h=zs(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&d!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),We(()=>{if(t){const u=f=>{const h=zs(r.current).includes(f.animationName);f.target===t&&h&&Rr.flushSync(()=>l("ANIMATION_END"))},c=f=>{f.target===t&&(i.current=zs(r.current))};return t.addEventListener("animationstart",c),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",c),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:g.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function zs(e){return(e==null?void 0:e.animationName)||"none"}function Jk(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Zd="Tabs",[eE,Dj]=Nr(Zd,[aw]),dw=aw(),[tE,qd]=eE(Zd),hw=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:s="horizontal",dir:a,activationMode:l="automatic",...u}=e,c=Qd(a),[f,d]=_o({prop:r,onChange:o,defaultProp:i});return x.jsx(tE,{scope:n,baseId:on(),value:f,onValueChange:d,orientation:s,dir:c,activationMode:l,children:x.jsx(J.div,{dir:c,"data-orientation":s,...u,ref:t})})});hw.displayName=Zd;var pw="TabsList",mw=g.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=qd(pw,n),s=dw(n);return x.jsx(Xk,{asChild:!0,...s,orientation:i.orientation,dir:i.dir,loop:r,children:x.jsx(J.div,{role:"tablist","aria-orientation":i.orientation,...o,ref:t})})});mw.displayName=pw;var gw="TabsTrigger",vw=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,s=qd(gw,n),a=dw(n),l=xw(s.baseId,r),u=Sw(s.baseId,r),c=r===s.value;return x.jsx(Qk,{asChild:!0,...a,focusable:!o,active:c,children:x.jsx(J.button,{type:"button",role:"tab","aria-selected":c,"aria-controls":u,"data-state":c?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...i,ref:t,onMouseDown:X(e.onMouseDown,f=>{!o&&f.button===0&&f.ctrlKey===!1?s.onValueChange(r):f.preventDefault()}),onKeyDown:X(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&s.onValueChange(r)}),onFocus:X(e.onFocus,()=>{const f=s.activationMode!=="manual";!c&&!o&&f&&s.onValueChange(r)})})})});vw.displayName=gw;var yw="TabsContent",ww=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...s}=e,a=qd(yw,n),l=xw(a.baseId,r),u=Sw(a.baseId,r),c=r===a.value,f=g.useRef(c);return g.useEffect(()=>{const d=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(d)},[]),x.jsx(zo,{present:o||c,children:({present:d})=>x.jsx(J.div,{"data-state":c?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!d,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:d&&i})})});ww.displayName=yw;function xw(e,t){return`${e}-trigger-${t}`}function Sw(e,t){return`${e}-content-${t}`}var nE=hw,Cw=mw,Tw=vw,Pw=ww;function kw(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t{const t=sE(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const a=s.split(Jd);return a[0]===""&&a.length!==1&&a.shift(),Ew(a,t)||iE(s)},getConflictingClassGroupIds:(s,a)=>{const l=n[s]||[];return a&&r[s]?[...l,...r[s]]:l}}},Ew=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Ew(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Jd);return(s=t.validators.find(({validator:a})=>a(i)))==null?void 0:s.classGroupId},wm=/^\[(.+)\]$/,iE=e=>{if(wm.test(e)){const t=wm.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},sE=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return lE(Object.entries(e.classGroups),n).forEach(([i,s])=>{hf(s,r,i,t)}),r},hf=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:xm(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(aE(o)){hf(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,s])=>{hf(s,xm(t,i),n,r)})})},xm=(e,t)=>{let n=e;return t.split(Jd).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},aE=e=>e.isThemeGetter,lE=(e,t)=>t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,a])=>[t+s,a])):i);return[n,o]}):e,uE=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,s)=>{n.set(i,s),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let s=n.get(i);if(s!==void 0)return s;if((s=r.get(i))!==void 0)return o(i,s),s},set(i,s){n.has(i)?n.set(i,s):o(i,s)}}},_w="!",cE=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],i=t.length,s=a=>{const l=[];let u=0,c=0,f;for(let S=0;Sc?f-c:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:v,maybePostfixModifierPosition:y}};return n?a=>n({className:a,parseClassName:s}):s},fE=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},dE=e=>({cache:uE(e.cacheSize),parseClassName:cE(e),...oE(e)}),hE=/\s+/,pE=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],s=e.trim().split(hE);let a="";for(let l=s.length-1;l>=0;l-=1){const u=s[l],{modifiers:c,hasImportantModifier:f,baseClassName:d,maybePostfixModifierPosition:h}=n(u);let v=!!h,y=r(v?d.substring(0,h):d);if(!y){if(!v){a=u+(a.length>0?" "+a:a);continue}if(y=r(d),!y){a=u+(a.length>0?" "+a:a);continue}v=!1}const S=fE(c).join(":"),m=f?S+_w:S,p=m+y;if(i.includes(p))continue;i.push(p);const w=o(y,v);for(let C=0;C0?" "+a:a)}return a};function mE(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rf(c),e());return n=dE(u),r=n.cache.get,o=n.cache.set,i=a,a(l)}function a(l){const u=r(l);if(u)return u;const c=pE(l,n);return o(l,c),c}return function(){return i(mE.apply(null,arguments))}}const le=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Aw=/^\[(?:([a-z-]+):)?(.+)\]$/i,vE=/^\d+\/\d+$/,yE=new Set(["px","full","screen"]),wE=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,xE=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,SE=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,CE=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,TE=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Gt=e=>go(e)||yE.has(e)||vE.test(e),Pn=e=>Uo(e,"length",RE),go=e=>!!e&&!Number.isNaN(Number(e)),Iu=e=>Uo(e,"number",go),ti=e=>!!e&&Number.isInteger(Number(e)),PE=e=>e.endsWith("%")&&go(e.slice(0,-1)),Y=e=>Aw.test(e),kn=e=>wE.test(e),kE=new Set(["length","size","percentage"]),EE=e=>Uo(e,kE,Mw),_E=e=>Uo(e,"position",Mw),bE=new Set(["image","url"]),AE=e=>Uo(e,bE,DE),ME=e=>Uo(e,"",NE),ni=()=>!0,Uo=(e,t,n)=>{const r=Aw.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},RE=e=>xE.test(e)&&!SE.test(e),Mw=()=>!1,NE=e=>CE.test(e),DE=e=>TE.test(e),LE=()=>{const e=le("colors"),t=le("spacing"),n=le("blur"),r=le("brightness"),o=le("borderColor"),i=le("borderRadius"),s=le("borderSpacing"),a=le("borderWidth"),l=le("contrast"),u=le("grayscale"),c=le("hueRotate"),f=le("invert"),d=le("gap"),h=le("gradientColorStops"),v=le("gradientColorStopPositions"),y=le("inset"),S=le("margin"),m=le("opacity"),p=le("padding"),w=le("saturate"),C=le("scale"),T=le("sepia"),P=le("skew"),E=le("space"),k=le("translate"),b=()=>["auto","contain","none"],_=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto",Y,t],N=()=>[Y,t],I=()=>["",Gt,Pn],B=()=>["auto",go,Y],j=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],$=()=>["solid","dashed","dotted","double","none"],U=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],R=()=>["start","end","center","between","around","evenly","stretch"],L=()=>["","0",Y],W=()=>["auto","avoid","all","avoid-page","page","left","right","column"],K=()=>[go,Y];return{cacheSize:500,separator:":",theme:{colors:[ni],spacing:[Gt,Pn],blur:["none","",kn,Y],brightness:K(),borderColor:[e],borderRadius:["none","","full",kn,Y],borderSpacing:N(),borderWidth:I(),contrast:K(),grayscale:L(),hueRotate:K(),invert:L(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[PE,Pn],inset:M(),margin:M(),opacity:K(),padding:N(),saturate:K(),scale:K(),sepia:L(),skew:K(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",Y]}],container:["container"],columns:[{columns:[kn]}],"break-after":[{"break-after":W()}],"break-before":[{"break-before":W()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...j(),Y]}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:b()}],"overscroll-x":[{"overscroll-x":b()}],"overscroll-y":[{"overscroll-y":b()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ti,Y]}],basis:[{basis:M()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Y]}],grow:[{grow:L()}],shrink:[{shrink:L()}],order:[{order:["first","last","none",ti,Y]}],"grid-cols":[{"grid-cols":[ni]}],"col-start-end":[{col:["auto",{span:["full",ti,Y]},Y]}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":[ni]}],"row-start-end":[{row:["auto",{span:[ti,Y]},Y]}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Y]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Y]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...R()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...R(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...R(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[p]}],px:[{px:[p]}],py:[{py:[p]}],ps:[{ps:[p]}],pe:[{pe:[p]}],pt:[{pt:[p]}],pr:[{pr:[p]}],pb:[{pb:[p]}],pl:[{pl:[p]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Y,t]}],"min-w":[{"min-w":[Y,t,"min","max","fit"]}],"max-w":[{"max-w":[Y,t,"none","full","min","max","fit","prose",{screen:[kn]},kn]}],h:[{h:[Y,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Y,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Y,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Y,t,"auto","min","max","fit"]}],"font-size":[{text:["base",kn,Pn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Iu]}],"font-family":[{font:[ni]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Y]}],"line-clamp":[{"line-clamp":["none",go,Iu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Gt,Y]}],"list-image":[{"list-image":["none",Y]}],"list-style-type":[{list:["none","disc","decimal",Y]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...$(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Gt,Pn]}],"underline-offset":[{"underline-offset":["auto",Gt,Y]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Y]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Y]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...j(),_E]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",EE]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},AE]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[m]}],"border-style":[{border:[...$(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[m]}],"divide-style":[{divide:$()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...$()]}],"outline-offset":[{"outline-offset":[Gt,Y]}],"outline-w":[{outline:[Gt,Pn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:I()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[Gt,Pn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",kn,ME]}],"shadow-color":[{shadow:[ni]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":[...U(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":U()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",kn,Y]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[f]}],saturate:[{saturate:[w]}],sepia:[{sepia:[T]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[T]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Y]}],duration:[{duration:K()}],ease:[{ease:["linear","in","out","in-out",Y]}],delay:[{delay:K()}],animate:[{animate:["none","spin","ping","pulse","bounce",Y]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[ti,Y]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"skew-x":[{"skew-x":[P]}],"skew-y":[{"skew-y":[P]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Y]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Y]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Y]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Gt,Pn,Iu]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},OE=gE(LE);function ae(...e){return OE(rE(e))}const IE=nE,Rw=g.forwardRef(({className:e,...t},n)=>x.jsx(Cw,{ref:n,className:ae("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));Rw.displayName=Cw.displayName;const pf=g.forwardRef(({className:e,...t},n)=>x.jsx(Tw,{ref:n,className:ae("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));pf.displayName=Tw.displayName;const mf=g.forwardRef(({className:e,...t},n)=>x.jsx(Pw,{ref:n,className:ae("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));mf.displayName=Pw.displayName;function jE(e,t=globalThis==null?void 0:globalThis.document){const n=Bt(e);g.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var FE="DismissableLayer",gf="dismissableLayer.update",VE="dismissableLayer.pointerDownOutside",$E="dismissableLayer.focusOutside",Sm,Nw=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Vl=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...l}=e,u=g.useContext(Nw),[c,f]=g.useState(null),d=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=g.useState({}),v=de(t,E=>f(E)),y=Array.from(u.layers),[S]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),m=y.indexOf(S),p=c?y.indexOf(c):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,C=p>=m,T=BE(E=>{const k=E.target,b=[...u.branches].some(_=>_.contains(k));!C||b||(o==null||o(E),s==null||s(E),E.defaultPrevented||a==null||a())},d),P=WE(E=>{const k=E.target;[...u.branches].some(_=>_.contains(k))||(i==null||i(E),s==null||s(E),E.defaultPrevented||a==null||a())},d);return jE(E=>{p===u.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},d),g.useEffect(()=>{if(c)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Sm=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),Cm(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=Sm)}},[c,d,n,u]),g.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),Cm())},[c,u]),g.useEffect(()=>{const E=()=>h({});return document.addEventListener(gf,E),()=>document.removeEventListener(gf,E)},[]),x.jsx(J.div,{...l,ref:v,style:{pointerEvents:w?C?"auto":"none":void 0,...e.style},onFocusCapture:X(e.onFocusCapture,P.onFocusCapture),onBlurCapture:X(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:X(e.onPointerDownCapture,T.onPointerDownCapture)})});Vl.displayName=FE;var zE="DismissableLayerBranch",UE=g.forwardRef((e,t)=>{const n=g.useContext(Nw),r=g.useRef(null),o=de(t,r);return g.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),x.jsx(J.div,{...e,ref:o})});UE.displayName=zE;function BE(e,t=globalThis==null?void 0:globalThis.document){const n=Bt(e),r=g.useRef(!1),o=g.useRef(()=>{});return g.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){Dw(VE,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function WE(e,t=globalThis==null?void 0:globalThis.document){const n=Bt(e),r=g.useRef(!1);return g.useEffect(()=>{const o=i=>{i.target&&!r.current&&Dw($E,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Cm(){const e=new CustomEvent(gf);document.dispatchEvent(e)}function Dw(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Ik(o,i):o.dispatchEvent(i)}var ju="focusScope.autoFocusOnMount",Fu="focusScope.autoFocusOnUnmount",Tm={bubbles:!1,cancelable:!0},HE="FocusScope",eh=g.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,l]=g.useState(null),u=Bt(o),c=Bt(i),f=g.useRef(null),d=de(t,y=>l(y)),h=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(r){let y=function(w){if(h.paused||!a)return;const C=w.target;a.contains(C)?f.current=C:En(f.current,{select:!0})},S=function(w){if(h.paused||!a)return;const C=w.relatedTarget;C!==null&&(a.contains(C)||En(f.current,{select:!0}))},m=function(w){if(document.activeElement===document.body)for(const T of w)T.removedNodes.length>0&&En(a)};document.addEventListener("focusin",y),document.addEventListener("focusout",S);const p=new MutationObserver(m);return a&&p.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",S),p.disconnect()}}},[r,a,h.paused]),g.useEffect(()=>{if(a){km.add(h);const y=document.activeElement;if(!a.contains(y)){const m=new CustomEvent(ju,Tm);a.addEventListener(ju,u),a.dispatchEvent(m),m.defaultPrevented||(GE(ZE(Lw(a)),{select:!0}),document.activeElement===y&&En(a))}return()=>{a.removeEventListener(ju,u),setTimeout(()=>{const m=new CustomEvent(Fu,Tm);a.addEventListener(Fu,c),a.dispatchEvent(m),m.defaultPrevented||En(y??document.body,{select:!0}),a.removeEventListener(Fu,c),km.remove(h)},0)}}},[a,u,c,h]);const v=g.useCallback(y=>{if(!n&&!r||h.paused)return;const S=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,m=document.activeElement;if(S&&m){const p=y.currentTarget,[w,C]=KE(p);w&&C?!y.shiftKey&&m===C?(y.preventDefault(),n&&En(w,{select:!0})):y.shiftKey&&m===w&&(y.preventDefault(),n&&En(C,{select:!0})):m===p&&y.preventDefault()}},[n,r,h.paused]);return x.jsx(J.div,{tabIndex:-1,...s,ref:d,onKeyDown:v})});eh.displayName=HE;function GE(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(En(r,{select:t}),document.activeElement!==n)return}function KE(e){const t=Lw(e),n=Pm(t,e),r=Pm(t.reverse(),e);return[n,r]}function Lw(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Pm(e,t){for(const n of e)if(!YE(n,{upTo:t}))return n}function YE(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function XE(e){return e instanceof HTMLInputElement&&"select"in e}function En(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&XE(e)&&t&&e.select()}}var km=QE();function QE(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Em(e,t),e.unshift(t)},remove(t){var n;e=Em(e,t),(n=e[0])==null||n.resume()}}}function Em(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function ZE(e){return e.filter(t=>t.tagName!=="A")}var qE="Portal",th=g.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,i]=g.useState(!1);We(()=>i(!0),[]);const s=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?Ek.createPortal(x.jsx(J.div,{...r,ref:t}),s):null});th.displayName=qE;var Vu=0;function Ow(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??_m()),document.body.insertAdjacentElement("beforeend",e[1]??_m()),Vu++,()=>{Vu===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Vu--}},[])}function _m(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var jt=function(){return jt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r"u")return m_;var t=g_(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},y_=Vw(),vo="data-scroll-locked",w_=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),` .`.concat(e_,` { overflow: hidden `).concat(r,`; padding-right: `).concat(a,"px ").concat(r,`; @@ -81,7 +81,7 @@ Error generating stack: `+i.message+` If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. -For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return g.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},H_="DialogDescriptionWarning",G_=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${i1(H_).contentName}}.`;return g.useEffect(()=>{var i;const o=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},K_=Gw,Y_=Xw,s1=Qw,a1=Zw,l1=Jw,u1=t1,X_=r1;function ds(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var Q_=["color"],Z_=g.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=ds(e,Q_);return g.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),g.createElement("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),q_=["color"],J_=g.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=ds(e,q_);return g.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),g.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),eb=["color"],tb=g.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=ds(e,eb);return g.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),g.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),nb=["color"],rb=g.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=ds(e,nb);return g.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),g.createElement("path",{d:"M3.13523 8.84197C3.3241 9.04343 3.64052 9.05363 3.84197 8.86477L7.5 5.43536L11.158 8.86477C11.3595 9.05363 11.6759 9.04343 11.8648 8.84197C12.0536 8.64051 12.0434 8.32409 11.842 8.13523L7.84197 4.38523C7.64964 4.20492 7.35036 4.20492 7.15803 4.38523L3.15803 8.13523C2.95657 8.32409 2.94637 8.64051 3.13523 8.84197Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),ob=["color"],ib=g.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=ds(e,ob);return g.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),g.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))});function c1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ttypeof e=="boolean"?"".concat(e):e===0?"0":e,Lm=sb,ah=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Lm(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(u=>{const c=n==null?void 0:n[u],f=i==null?void 0:i[u];if(c===null)return null;const d=Dm(c)||Dm(f);return o[u][d]}),a=n&&Object.entries(n).reduce((u,c)=>{let[f,d]=c;return d===void 0||(u[f]=d),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:f,className:d,...h}=c;return Object.entries(h).every(v=>{let[y,S]=v;return Array.isArray(S)?S.includes({...i,...a}[y]):{...i,...a}[y]===S})?[...u,f,d]:u},[]);return Lm(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},f1=K_,ab=Y_,d1=g.forwardRef(({className:e,...t},n)=>x.jsx(s1,{className:ae("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));d1.displayName=s1.displayName;const lb=ah("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),lh=g.forwardRef(({side:e="right",className:t,children:n,...r},o)=>x.jsxs(ab,{children:[x.jsx(d1,{}),x.jsxs(a1,{ref:o,className:ae(lb({side:e}),t),...r,children:[x.jsxs(X_,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[x.jsx(ib,{className:"h-4 w-4"}),x.jsx("span",{className:"sr-only",children:"Close"})]}),n]})]}));lh.displayName=a1.displayName;const h1=({className:e,...t})=>x.jsx("div",{className:ae("flex flex-col space-y-2 text-center sm:text-left",e),...t});h1.displayName="SheetHeader";const p1=g.forwardRef(({className:e,...t},n)=>x.jsx(l1,{ref:n,className:ae("text-lg font-semibold text-foreground",e),...t}));p1.displayName=l1.displayName;const m1=g.forwardRef(({className:e,...t},n)=>x.jsx(u1,{ref:n,className:ae("text-sm text-muted-foreground",e),...t}));m1.displayName=u1.displayName;function ub(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}function Zi(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const yf=e=>Array.isArray(e);function g1(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function uh(e,t,n,r){if(typeof t=="function"){const[o,i]=Om(r);t=t(n!==void 0?n:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=Om(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function zl(e,t,n){const r=e.getProps();return uh(r,t,n!==void 0?n:r.custom,e)}const ch=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],fh=["initial",...ch],hs=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],qn=new Set(hs),sn=e=>e*1e3,an=e=>e/1e3,cb={type:"spring",stiffness:500,damping:25,restSpeed:10},fb=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),db={type:"keyframes",duration:.8},hb={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},pb=(e,{keyframes:t})=>t.length>2?db:qn.has(e)?e.startsWith("scale")?fb(t[1]):cb:hb;function mb({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}function dh(e,t){return e[t]||e.default||e}const gb={skipAnimations:!1,useManualTiming:!1},vb=e=>e!==null;function Ul(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(vb),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}const $e=e=>e;function yb(e){let t=new Set,n=new Set,r=!1,o=!1;const i=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function a(u){i.has(u)&&(l.schedule(u),e()),u(s)}const l={schedule:(u,c=!1,f=!1)=>{const h=f&&r?t:n;return c&&i.add(u),h.has(u)||h.add(u),u},cancel:u=>{n.delete(u),i.delete(u)},process:u=>{if(s=u,r){o=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(a),r=!1,o&&(o=!1,l.process(u))}};return l}const Gs=["read","resolveKeyframes","update","preRender","render","postRender"],wb=40;function v1(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=Gs.reduce((m,p)=>(m[p]=yb(i),m),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:f,postRender:d}=s,h=()=>{const m=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(m-o.timestamp,wb),1),o.timestamp=m,o.isProcessing=!0,a.process(o),l.process(o),u.process(o),c.process(o),f.process(o),d.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(h))},v=()=>{n=!0,r=!0,o.isProcessing||e(h)};return{schedule:Gs.reduce((m,p)=>{const w=s[p];return m[p]=(C,T=!1,P=!1)=>(n||v(),w.schedule(C,T,P)),m},{}),cancel:m=>{for(let p=0;p/^0[^.\s]+$/u.test(e);function xb(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||y1(e):!0}let wf=$e;const w1=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),x1=e=>t=>typeof t=="string"&&t.startsWith(e),S1=x1("--"),Sb=x1("var(--"),hh=e=>Sb(e)?Cb.test(e.split("/*")[0].trim()):!1,Cb=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Tb=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Pb(e){const t=Tb.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}function C1(e,t,n=1){const[r,o]=Pb(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const s=i.trim();return w1(s)?parseFloat(s):s}return hh(o)?C1(o,t,n+1):o}const Wn=(e,t,n)=>n>t?t:ntypeof e=="number",parse:parseFloat,transform:e=>e},Mi={...Bo,transform:e=>Wn(0,1,e)},Ks={...Bo,default:1},Ri=e=>Math.round(e*1e5)/1e5,ph=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,kb=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Eb=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function ps(e){return typeof e=="string"}function _b(e){return e==null}const ms=e=>({test:t=>ps(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),_n=ms("deg"),zt=ms("%"),G=ms("px"),bb=ms("vh"),Ab=ms("vw"),Im={...zt,parse:e=>zt.parse(e)/100,transform:e=>zt.transform(e*100)},Mb=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),jm=e=>e===Bo||e===G,Fm=(e,t)=>parseFloat(e.split(", ")[t]),Vm=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return Fm(o[1],t);{const i=r.match(/^matrix\((.+)\)$/u);return i?Fm(i[1],e):0}},Rb=new Set(["x","y","z"]),Nb=hs.filter(e=>!Rb.has(e));function Db(e){const t=[];return Nb.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const bo={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Vm(4,13),y:Vm(5,14)};bo.translateX=bo.x;bo.translateY=bo.y;const T1=e=>t=>t.test(e),Lb={test:e=>e==="auto",parse:e=>e},P1=[Bo,G,zt,_n,Ab,bb,Lb],$m=e=>P1.find(T1(e)),mr=new Set;let xf=!1,Sf=!1;function k1(){if(Sf){const e=Array.from(mr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=Db(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,s])=>{var a;(a=r.getValue(i))===null||a===void 0||a.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Sf=!1,xf=!1,mr.forEach(e=>e.complete()),mr.clear()}function E1(){mr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Sf=!0)})}function Ob(){E1(),k1()}class mh{constructor(t,n,r,o,i,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(mr.add(this),xf||(xf=!0,te.read(E1),te.resolveKeyframes(k1))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let i=0;in=>!!(ps(n)&&Eb.test(n)&&n.startsWith(e)||t&&!_b(n)&&Object.prototype.hasOwnProperty.call(n,t)),_1=(e,t,n)=>r=>{if(!ps(r))return r;const[o,i,s,a]=r.match(ph);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},Ib=e=>Wn(0,255,e),Hu={...Bo,transform:e=>Math.round(Ib(e))},fr={test:gh("rgb","red"),parse:_1("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Hu.transform(e)+", "+Hu.transform(t)+", "+Hu.transform(n)+", "+Ri(Mi.transform(r))+")"};function jb(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Cf={test:gh("#"),parse:jb,transform:fr.transform},eo={test:gh("hsl","hue"),parse:_1("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+zt.transform(Ri(t))+", "+zt.transform(Ri(n))+", "+Ri(Mi.transform(r))+")"},je={test:e=>fr.test(e)||Cf.test(e)||eo.test(e),parse:e=>fr.test(e)?fr.parse(e):eo.test(e)?eo.parse(e):Cf.parse(e),transform:e=>ps(e)?e:e.hasOwnProperty("red")?fr.transform(e):eo.transform(e)};function Fb(e){var t,n;return isNaN(e)&&ps(e)&&(((t=e.match(ph))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(kb))===null||n===void 0?void 0:n.length)||0)>0}const b1="number",A1="color",Vb="var",$b="var(",zm="${}",zb=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ji(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace(zb,l=>(je.test(l)?(r.color.push(i),o.push(A1),n.push(je.parse(l))):l.startsWith($b)?(r.var.push(i),o.push(Vb),n.push(l)):(r.number.push(i),o.push(b1),n.push(parseFloat(l))),++i,zm)).split(zm);return{values:n,split:a,indexes:r,types:o}}function M1(e){return Ji(e).values}function R1(e){const{split:t,types:n}=Ji(e),r=t.length;return o=>{let i="";for(let s=0;stypeof e=="number"?0:e;function Bb(e){const t=M1(e);return R1(e)(t.map(Ub))}const Hn={test:Fb,parse:M1,createTransformer:R1,getAnimatableNone:Bb},Wb=new Set(["brightness","contrast","saturate","opacity"]);function Hb(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(ph)||[];if(!r)return e;const o=n.replace(r,"");let i=Wb.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const Gb=/\b([a-z-]*)\(.*?\)/gu,Tf={...Hn,getAnimatableNone:e=>{const t=e.match(Gb);return t?t.map(Hb).join(" "):e}},Um={...Bo,transform:Math.round},vh={borderWidth:G,borderTopWidth:G,borderRightWidth:G,borderBottomWidth:G,borderLeftWidth:G,borderRadius:G,radius:G,borderTopLeftRadius:G,borderTopRightRadius:G,borderBottomRightRadius:G,borderBottomLeftRadius:G,width:G,maxWidth:G,height:G,maxHeight:G,size:G,top:G,right:G,bottom:G,left:G,padding:G,paddingTop:G,paddingRight:G,paddingBottom:G,paddingLeft:G,margin:G,marginTop:G,marginRight:G,marginBottom:G,marginLeft:G,rotate:_n,rotateX:_n,rotateY:_n,rotateZ:_n,scale:Ks,scaleX:Ks,scaleY:Ks,scaleZ:Ks,skew:_n,skewX:_n,skewY:_n,distance:G,translateX:G,translateY:G,translateZ:G,x:G,y:G,z:G,perspective:G,transformPerspective:G,opacity:Mi,originX:Im,originY:Im,originZ:G,zIndex:Um,backgroundPositionX:G,backgroundPositionY:G,fillOpacity:Mi,strokeOpacity:Mi,numOctaves:Um},Kb={...vh,color:je,backgroundColor:je,outlineColor:je,fill:je,stroke:je,borderColor:je,borderTopColor:je,borderRightColor:je,borderBottomColor:je,borderLeftColor:je,filter:Tf,WebkitFilter:Tf},yh=e=>Kb[e];function N1(e,t){let n=yh(e);return n!==Tf&&(n=Hn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Yb=new Set(["auto","none","0"]);function Xb(e,t,n){let r=0,o;for(;r{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function L1(e){let t;return()=>(t===void 0&&(t=e()),t)}let ga;function Qb(){ga=void 0}const ln={now:()=>(ga===void 0&&ln.set(Ne.isProcessing||gb.useManualTiming?Ne.timestamp:performance.now()),ga),set:e=>{ga=e,queueMicrotask(Qb)}},Bm=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Hn.test(e)||e==="0")&&!e.startsWith("url("));function Zb(e){const t=e[0];if(e.length===1)return!0;for(let n=0;nJb?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Ob(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=ln.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:s,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!qb(t,r,o,i))if(s)this.options.duration=0;else{l==null||l(Ul(t,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const c=this.initPlayback(t,n);c!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...c},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function I1(e,t){return t?e*(1e3/t):0}const eA=5;function j1(e,t,n){const r=Math.max(t-eA,0);return I1(n-e(r),t-r)}const Gu=.001,tA=.01,nA=10,rA=.05,oA=1;function iA({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i,s=1-t;s=Wn(rA,oA,s),e=Wn(tA,nA,an(e)),s<1?(o=u=>{const c=u*s,f=c*e,d=c-n,h=Pf(u,s),v=Math.exp(-f);return Gu-d/h*v},i=u=>{const f=u*s*e,d=f*n+n,h=Math.pow(s,2)*Math.pow(u,2)*e,v=Math.exp(-f),y=Pf(Math.pow(u,2),s);return(-o(u)+Gu>0?-1:1)*((d-h)*v)/y}):(o=u=>{const c=Math.exp(-u*e),f=(u-n)*e+1;return-Gu+c*f},i=u=>{const c=Math.exp(-u*e),f=(n-u)*(e*e);return c*f});const a=5/e,l=aA(o,i,a);if(e=sn(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:e}}}const sA=12;function aA(e,t,n){let r=n;for(let o=1;oe[n]!==void 0)}function cA(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Wm(e,uA)&&Wm(e,lA)){const n=iA(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function F1({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],i=e[e.length-1],s={done:!1,value:o},{stiffness:a,damping:l,mass:u,duration:c,velocity:f,isResolvedFromDuration:d}=cA({...r,velocity:-an(r.velocity||0)}),h=f||0,v=l/(2*Math.sqrt(a*u)),y=i-o,S=an(Math.sqrt(a/u)),m=Math.abs(y)<5;n||(n=m?.01:2),t||(t=m?.005:.5);let p;if(v<1){const w=Pf(S,v);p=C=>{const T=Math.exp(-v*S*C);return i-T*((h+v*S*y)/w*Math.sin(w*C)+y*Math.cos(w*C))}}else if(v===1)p=w=>i-Math.exp(-S*w)*(y+(h+S*y)*w);else{const w=S*Math.sqrt(v*v-1);p=C=>{const T=Math.exp(-v*S*C),P=Math.min(w*C,300);return i-T*((h+v*S*y)*Math.sinh(P)+w*y*Math.cosh(P))/w}}return{calculatedDuration:d&&c||null,next:w=>{const C=p(w);if(d)s.done=w>=c;else{let T=0;v<1&&(T=w===0?sn(h):j1(p,w,C));const P=Math.abs(T)<=n,E=Math.abs(i-C)<=t;s.done=P&&E}return s.value=s.done?i:C,s}}}function Hm({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:u=.5,restSpeed:c}){const f=e[0],d={done:!1,value:f},h=k=>a!==void 0&&kl,v=k=>a===void 0?l:l===void 0||Math.abs(a-k)-y*Math.exp(-k/r),w=k=>m+p(k),C=k=>{const b=p(k),_=w(k);d.done=Math.abs(b)<=u,d.value=d.done?m:_};let T,P;const E=k=>{h(d.value)&&(T=k,P=F1({keyframes:[d.value,v(d.value)],velocity:j1(w,k,d.value),damping:o,stiffness:i,restDelta:u,restSpeed:c}))};return E(0),{calculatedDuration:null,next:k=>{let b=!1;return!P&&T===void 0&&(b=!0,C(k),E(k)),T!==void 0&&k>=T?P.next(k-T):(!b&&C(k),d)}}}const V1=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,fA=1e-7,dA=12;function hA(e,t,n,r,o){let i,s,a=0;do s=t+(n-t)/2,i=V1(s,r,o)-e,i>0?n=s:t=s;while(Math.abs(i)>fA&&++ahA(i,0,1,e,n);return i=>i===0||i===1?i:V1(o(i),t,r)}const pA=gs(.42,0,1,1),mA=gs(0,0,.58,1),$1=gs(.42,0,.58,1),gA=e=>Array.isArray(e)&&typeof e[0]!="number",z1=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,U1=e=>t=>1-e(1-t),wh=e=>1-Math.sin(Math.acos(e)),B1=U1(wh),vA=z1(wh),W1=gs(.33,1.53,.69,.99),xh=U1(W1),yA=z1(xh),wA=e=>(e*=2)<1?.5*xh(e):.5*(2-Math.pow(2,-10*(e-1))),Gm={linear:$e,easeIn:pA,easeInOut:$1,easeOut:mA,circIn:wh,circInOut:vA,circOut:B1,backIn:xh,backInOut:yA,backOut:W1,anticipate:wA},Km=e=>{if(Array.isArray(e)){wf(e.length===4);const[t,n,r,o]=e;return gs(t,n,r,o)}else if(typeof e=="string")return wf(Gm[e]!==void 0),Gm[e];return e},xA=(e,t)=>n=>t(e(n)),un=(...e)=>e.reduce(xA),es=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},pe=(e,t,n)=>e+(t-e)*n;function Ku(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function SA({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,s=0;if(!t)o=i=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=Ku(l,a,e+1/3),i=Ku(l,a,e),s=Ku(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}function Qa(e,t){return n=>n>0?t:e}const Yu=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},CA=[Cf,fr,eo],TA=e=>CA.find(t=>t.test(e));function Ym(e){const t=TA(e);if(!t)return!1;let n=t.parse(e);return t===eo&&(n=SA(n)),n}const Xm=(e,t)=>{const n=Ym(e),r=Ym(t);if(!n||!r)return Qa(e,t);const o={...n};return i=>(o.red=Yu(n.red,r.red,i),o.green=Yu(n.green,r.green,i),o.blue=Yu(n.blue,r.blue,i),o.alpha=pe(n.alpha,r.alpha,i),fr.transform(o))},kf=new Set(["none","hidden"]);function PA(e,t){return kf.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function kA(e,t){return n=>pe(e,t,n)}function Sh(e){return typeof e=="number"?kA:typeof e=="string"?hh(e)?Qa:je.test(e)?Xm:bA:Array.isArray(e)?H1:typeof e=="object"?je.test(e)?Xm:EA:Qa}function H1(e,t){const n=[...e],r=n.length,o=e.map((i,s)=>Sh(i)(i,t[s]));return i=>{for(let s=0;s{for(const i in r)n[i]=r[i](o);return n}}function _A(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i{const n=Hn.createTransformer(t),r=Ji(e),o=Ji(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?kf.has(e)&&!o.values.length||kf.has(t)&&!r.values.length?PA(e,t):un(H1(_A(r,o),o.values),n):Qa(e,t)};function G1(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?pe(e,t,n):Sh(e)(e,t)}function AA(e,t,n){const r=[],o=n||G1,i=e.length-1;for(let s=0;st[0];if(i===2&&e[0]===e[1])return()=>t[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=AA(t,r,o),a=s.length,l=u=>{let c=0;if(a>1)for(;cl(Wn(e[0],e[i-1],u)):l}function RA(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=es(0,t,r);e.push(pe(n,1,o))}}function NA(e){const t=[0];return RA(t,e.length-1),t}function DA(e,t){return e.map(n=>n*t)}function LA(e,t){return e.map(()=>t||$1).splice(0,e.length-1)}function Za({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=gA(r)?r.map(Km):Km(r),i={done:!1,value:t[0]},s=DA(n&&n.length===t.length?n:NA(t),e),a=MA(s,t,{ease:Array.isArray(o)?o:LA(t,o)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const Qm=2e4;function OA(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t=Qm?1/0:t}const IA=e=>{const t=({timestamp:n})=>e(n);return{start:()=>te.update(t,!0),stop:()=>mn(t),now:()=>Ne.isProcessing?Ne.timestamp:ln.now()}},jA={decay:Hm,inertia:Hm,tween:Za,keyframes:Za,spring:F1},FA=e=>e/100;class Ch extends O1{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:o,keyframes:i}=this.options,s=(o==null?void 0:o.KeyframeResolver)||mh,a=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new s(i,a,n,r,o),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:s=0}=this.options,a=jA[n]||Za;let l,u;a!==Za&&typeof t[0]!="number"&&(l=un(FA,G1(t[0],t[1])),t=[0,100]);const c=a({...this.options,keyframes:t});i==="mirror"&&(u=a({...this.options,keyframes:[...t].reverse(),velocity:-s})),c.calculatedDuration===null&&(c.calculatedDuration=OA(c));const{calculatedDuration:f}=c,d=f+o,h=d*(r+1)-o;return{generator:c,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:f,resolvedDuration:d,totalDuration:h}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:k}=this.options;return{done:!0,value:k[k.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:s,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:c,resolvedDuration:f}=r;if(this.startTime===null)return i.next(0);const{delay:d,repeat:h,repeatType:v,repeatDelay:y,onUpdate:S}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-c/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const m=this.currentTime-d*(this.speed>=0?1:-1),p=this.speed>=0?m<0:m>c;this.currentTime=Math.max(m,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let w=this.currentTime,C=i;if(h){const k=Math.min(this.currentTime,c)/f;let b=Math.floor(k),_=k%1;!_&&k>=1&&(_=1),_===1&&b--,b=Math.min(b,h+1),!!(b%2)&&(v==="reverse"?(_=1-_,y&&(_-=y/f)):v==="mirror"&&(C=s)),w=Wn(0,1,_)*f}const T=p?{done:!1,value:l[0]}:C.next(w);a&&(T.value=a(T.value));let{done:P}=T;!p&&u!==null&&(P=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return E&&o!==void 0&&(T.value=Ul(l,this.options,o)),S&&S(T.value),E&&this.finish(),T}get duration(){const{resolved:t}=this;return t?an(t.calculatedDuration):0}get time(){return an(this.currentTime)}set time(t){t=sn(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=an(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=IA,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const K1=new Set(["opacity","clipPath","filter","transform"]),Y1=e=>Array.isArray(e)&&typeof e[0]=="number";function X1(e){return!!(!e||typeof e=="string"&&e in Th||Y1(e)||Array.isArray(e)&&e.every(X1))}const di=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Th={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:di([0,.65,.55,1]),circOut:di([.55,0,1,.45]),backIn:di([.31,.01,.66,-.59]),backOut:di([.33,1.53,.69,.99])};function VA(e){return Q1(e)||Th.easeOut}function Q1(e){if(e)return Y1(e)?di(e):Array.isArray(e)?e.map(VA):Th[e]}function $A(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:s="loop",ease:a,times:l}={}){const u={[t]:n};l&&(u.offset=l);const c=Q1(a);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:r,duration:o,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"})}const zA=L1(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),qa=10,UA=2e4;function BA(e){return e.type==="spring"||!X1(e.ease)}function WA(e,t){const n=new Ch({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&ithis.onKeyframesResolved(s,a),n,r,o),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:o=300,times:i,ease:s,type:a,motionValue:l,name:u,startTime:c}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(BA(this.options)){const{onComplete:d,onUpdate:h,motionValue:v,element:y,...S}=this.options,m=WA(t,S);t=m.keyframes,t.length===1&&(t[1]=t[0]),o=m.duration,i=m.times,s=m.ease,a="keyframes"}const f=$A(l.owner.current,u,t,{...this.options,duration:o,times:i,ease:s});return f.startTime=c??this.calcStartTime(),this.pendingTimeline?(f.timeline=this.pendingTimeline,this.pendingTimeline=void 0):f.onfinish=()=>{const{onComplete:d}=this.options;l.set(Ul(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:f,duration:o,times:i,type:a,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return an(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return an(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=sn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return $e;const{animation:r}=n;r.timeline=t,r.onfinish=null}return $e}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:i,ease:s,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:c,onComplete:f,element:d,...h}=this.options,v=new Ch({...h,keyframes:r,duration:o,type:i,ease:s,times:a,isGenerator:!0}),y=sn(this.time);u.setWithVelocity(v.sample(y-qa).value,v.sample(y).value,qa)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:i,damping:s,type:a}=t;return zA()&&r&&K1.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!o&&i!=="mirror"&&s!==0&&a!=="inertia"}}function HA(e,t){let n;const r=()=>{const{currentTime:o}=t,s=(o===null?0:o.value)/100;n!==s&&e(s),n=s};return te.update(r,!0),()=>mn(r)}const GA=L1(()=>window.ScrollTimeline!==void 0);class KA{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r{if(GA()&&r.attachTimeline)r.attachTimeline(t);else return r.pause(),HA(o=>{r.time=r.duration*o},t)});return()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;nn[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const Ph=(e,t,n,r={},o,i,s)=>a=>{const l=dh(r,e)||{},u=l.delay||r.delay||0;let{elapsed:c=0}=r;c=c-sn(u);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-c,onUpdate:h=>{t.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),s&&s()},onStop:s,name:e,motionValue:t,element:i?void 0:o};mb(l)||(f={...f,...pb(e,f)}),f.duration&&(f.duration=sn(f.duration)),f.repeatDelay&&(f.repeatDelay=sn(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let d=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(d=!0)),d&&!i&&t.get()!==void 0){const h=Ul(f.keyframes,l);if(h!==void 0)return te.update(()=>{f.onUpdate(h),f.onComplete()}),new KA([])}return!i&&Zm.supports(f)?new Zm(f):new Ch(f)},YA=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),XA=e=>yf(e)?e[e.length-1]||0:e;function Bl(e,t){e.indexOf(t)===-1&&e.push(t)}function Wl(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class kh{constructor(){this.subscriptions=[]}add(t){return Bl(this.subscriptions,t),()=>Wl(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i!isNaN(parseFloat(e));class Z1{constructor(t,n={}){this.version="11.5.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=ln.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=ln.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=QA(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new kh);const r=this.events[t].add(n);return t==="change"?()=>{r(),te.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=ln.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>qm)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,qm);return I1(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ts(e,t){return new Z1(e,t)}function ZA(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ts(n))}function qA(e,t){const n=zl(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const s in i){const a=XA(i[s]);ZA(e,s,a)}}const Hl=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),JA="framerAppearId",q1="data-"+Hl(JA);function J1(e){return e.props[q1]}function ex(e){if(qn.has(e))return"transform";if(K1.has(e))return Hl(e)}class e2 extends Z1{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const n=ex(t);if(!n)return;const r=this.counts.get(n)||0;this.counts.set(n,r+1),r===0&&(this.output.push(n),this.update());let o=!1;return()=>{if(o)return;o=!0;const i=this.counts.get(n)-1;this.counts.set(n,i),i===0&&(Wl(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}const Ve=e=>!!(e&&e.getVelocity);function t2(e){return!!(Ve(e)&&e.add)}function Ef(e,t){var n;if(!e.applyWillChange)return;let r=e.getValue("willChange");if(!r&&!(!((n=e.props.style)===null||n===void 0)&&n.willChange)&&(r=new e2("auto"),e.addValue("willChange",r)),t2(r))return r.add(t)}function n2({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function tx(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(s=r);const u=[],c=o&&e.animationState&&e.animationState.getState()[o];for(const f in l){const d=e.getValue(f,(i=e.latestValues[f])!==null&&i!==void 0?i:null),h=l[f];if(h===void 0||c&&n2(c,f))continue;const v={delay:n,...dh(s||{},f)};let y=!1;if(window.MotionHandoffAnimation){const m=J1(e);if(m){const p=window.MotionHandoffAnimation(m,f,te);p!==null&&(v.startTime=p,y=!0)}}d.start(Ph(f,d,h,e.shouldReduceMotion&&qn.has(f)?{type:!1}:v,e,y,Ef(e,f)));const S=d.animation;S&&u.push(S)}return a&&Promise.all(u).then(()=>{te.update(()=>{a&&qA(e,a)})}),u}function _f(e,t,n={}){var r;const o=zl(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const s=o?()=>Promise.all(tx(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:f,staggerDirection:d}=i;return r2(e,t,c+u,f,d,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[u,c]=l==="beforeChildren"?[s,a]:[a,s];return u().then(()=>c())}else return Promise.all([s(),a(n.delay)])}function r2(e,t,n=0,r=0,o=1,i){const s=[],a=(e.variantChildren.size-1)*r,l=o===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(e.variantChildren).sort(o2).forEach((u,c)=>{u.notify("AnimationStart",t),s.push(_f(u,t,{...i,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(s)}function o2(e,t){return e.sortNodePosition(t)}function i2(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>_f(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=_f(e,t,n);else{const o=typeof t=="function"?zl(e,t,n.custom):t;r=Promise.all(tx(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const s2=[...ch].reverse(),a2=ch.length;function l2(e){return t=>Promise.all(t.map(({animation:n,options:r})=>i2(e,n,r)))}function u2(e){let t=l2(e),n=Jm(),r=!0;const o=l=>(u,c)=>{var f;const d=zl(e,c,l==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(d){const{transition:h,transitionEnd:v,...y}=d;u={...u,...y,...v}}return u};function i(l){t=l(e)}function s(l){const u=e.getProps(),c=e.getVariantContext(!0)||{},f=[],d=new Set;let h={},v=1/0;for(let S=0;Sv&&C,b=!1;const _=Array.isArray(w)?w:[w];let M=_.reduce(o(m),{});T===!1&&(M={});const{prevResolvedValues:N={}}=p,I={...N,...M},B=j=>{k=!0,d.has(j)&&(b=!0,d.delete(j)),p.needsAnimating[j]=!0;const $=e.getValue(j);$&&($.liveStyle=!1)};for(const j in I){const $=M[j],z=N[j];if(h.hasOwnProperty(j))continue;let R=!1;yf($)&&yf(z)?R=!g1($,z):R=$!==z,R?$!=null?B(j):d.add(j):$!==void 0&&d.has(j)?B(j):p.protectedKeys[j]=!0}p.prevProp=w,p.prevResolvedValues=M,p.isActive&&(h={...h,...M}),r&&e.blockInitialAnimation&&(k=!1),k&&(!P||b)&&f.push(..._.map(j=>({animation:j,options:{type:m}})))}if(d.size){const S={};d.forEach(m=>{const p=e.getBaseTarget(m),w=e.getValue(m);w&&(w.liveStyle=!0),S[m]=p??null}),f.push({animation:S})}let y=!!f.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?t(f):Promise.resolve()}function a(l,u){var c;if(n[l].isActive===u)return Promise.resolve();(c=e.variantChildren)===null||c===void 0||c.forEach(d=>{var h;return(h=d.animationState)===null||h===void 0?void 0:h.setActive(l,u)}),n[l].isActive=u;const f=s(l);for(const d in n)n[d].protectedKeys={};return f}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Jm(),r=!0}}}function c2(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!g1(t,e):!1}function nr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Jm(){return{animate:nr(!0),whileInView:nr(),whileHover:nr(),whileTap:nr(),whileDrag:nr(),whileFocus:nr(),exit:nr()}}class Jn{constructor(t){this.isMounted=!1,this.node=t}update(){}}class f2 extends Jn{constructor(t){super(t),t.animationState||(t.animationState=u2(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Zi(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let d2=0;class h2 extends Jn{constructor(){super(...arguments),this.id=d2++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const p2={animation:{Feature:f2},exit:{Feature:h2}},nx=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Gl(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const m2=e=>t=>nx(t)&&e(t,Gl(t));function en(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function cn(e,t,n,r){return en(e,t,m2(n),r)}const eg=(e,t)=>Math.abs(e-t);function g2(e,t){const n=eg(e.x,t.x),r=eg(e.y,t.y);return Math.sqrt(n**2+r**2)}class rx{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!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 f=Qu(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,h=g2(f.offset,{x:0,y:0})>=3;if(!d&&!h)return;const{point:v}=f,{timestamp:y}=Ne;this.history.push({...v,timestamp:y});const{onStart:S,onMove:m}=this.handlers;d||(S&&S(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),m&&m(this.lastMoveEvent,f)},this.handlePointerMove=(f,d)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Xu(d,this.transformPagePoint),te.update(this.updatePoint,!0)},this.handlePointerUp=(f,d)=>{this.end();const{onEnd:h,onSessionEnd:v,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const S=Qu(f.type==="pointercancel"?this.lastMoveEventInfo:Xu(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(f,S),v&&v(f,S)},!nx(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const s=Gl(t),a=Xu(s,this.transformPagePoint),{point:l}=a,{timestamp:u}=Ne;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=n;c&&c(t,Qu(a,this.history)),this.removeListeners=un(cn(this.contextWindow,"pointermove",this.handlePointerMove),cn(this.contextWindow,"pointerup",this.handlePointerUp),cn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),mn(this.updatePoint)}}function Xu(e,t){return t?{point:t(e.point)}:e}function tg(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Qu({point:e},t){return{point:e,delta:tg(e,ox(t)),offset:tg(e,v2(t)),velocity:y2(t,.1)}}function v2(e){return e[0]}function ox(e){return e[e.length-1]}function y2(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=ox(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>sn(t)));)n--;if(!r)return{x:0,y:0};const i=an(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function ix(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const ng=ix("dragHorizontal"),rg=ix("dragVertical");function sx(e){let t=!1;if(e==="y")t=rg();else if(e==="x")t=ng();else{const n=ng(),r=rg();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function ax(){const e=sx(!0);return e?(e(),!1):!0}function to(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const lx=1e-4,w2=1-lx,x2=1+lx,ux=.01,S2=0-ux,C2=0+ux;function st(e){return e.max-e.min}function T2(e,t,n){return Math.abs(e-t)<=n}function og(e,t,n,r=.5){e.origin=r,e.originPoint=pe(t.min,t.max,e.origin),e.scale=st(n)/st(t),e.translate=pe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=w2&&e.scale<=x2||isNaN(e.scale))&&(e.scale=1),(e.translate>=S2&&e.translate<=C2||isNaN(e.translate))&&(e.translate=0)}function Ni(e,t,n,r){og(e.x,t.x,n.x,r?r.originX:void 0),og(e.y,t.y,n.y,r?r.originY:void 0)}function ig(e,t,n){e.min=n.min+t.min,e.max=e.min+st(t)}function P2(e,t,n){ig(e.x,t.x,n.x),ig(e.y,t.y,n.y)}function sg(e,t,n){e.min=t.min-n.min,e.max=e.min+st(t)}function Di(e,t,n){sg(e.x,t.x,n.x),sg(e.y,t.y,n.y)}function k2(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?pe(n,e,r.max):Math.min(e,n)),e}function ag(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function E2(e,{top:t,left:n,bottom:r,right:o}){return{x:ag(e.x,n,o),y:ag(e.y,t,r)}}function lg(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=es(t.min,t.max-r,e.min):r>o&&(n=es(e.min,e.max-o,t.min)),Wn(0,1,n)}function A2(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const bf=.35;function M2(e=bf){return e===!1?e=0:e===!0&&(e=bf),{x:ug(e,"left","right"),y:ug(e,"top","bottom")}}function ug(e,t,n){return{min:cg(e,t),max:cg(e,n)}}function cg(e,t){return typeof e=="number"?e:e[t]||0}const fg=()=>({translate:0,scale:1,origin:0,originPoint:0}),no=()=>({x:fg(),y:fg()}),dg=()=>({min:0,max:0}),ye=()=>({x:dg(),y:dg()});function ht(e){return[e("x"),e("y")]}function cx({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function R2({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function N2(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Zu(e){return e===void 0||e===1}function Af({scale:e,scaleX:t,scaleY:n}){return!Zu(e)||!Zu(t)||!Zu(n)}function ir(e){return Af(e)||fx(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function fx(e){return hg(e.x)||hg(e.y)}function hg(e){return e&&e!=="0%"}function Ja(e,t,n){const r=e-n,o=t*r;return n+o}function pg(e,t,n,r,o){return o!==void 0&&(e=Ja(e,o,r)),Ja(e,n,r)+t}function Mf(e,t=0,n=1,r,o){e.min=pg(e.min,t,n,r,o),e.max=pg(e.max,t,n,r,o)}function dx(e,{x:t,y:n}){Mf(e.x,t.translate,t.scale,t.originPoint),Mf(e.y,n.translate,n.scale,n.originPoint)}const mg=.999999999999,gg=1.0000000000001;function D2(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,s;for(let a=0;amg&&(t.x=1),t.ymg&&(t.y=1)}function ro(e,t){e.min=e.min+t,e.max=e.max+t}function vg(e,t,n,r,o=.5){const i=pe(e.min,e.max,o);Mf(e,t,n,i,r)}function oo(e,t){vg(e.x,t.x,t.scaleX,t.scale,t.originX),vg(e.y,t.y,t.scaleY,t.scale,t.originY)}function hx(e,t){return cx(N2(e.getBoundingClientRect(),t))}function L2(e,t,n){const r=hx(e,n),{scroll:o}=t;return o&&(ro(r.x,o.offset.x),ro(r.y,o.offset.y)),r}const px=({current:e})=>e?e.ownerDocument.defaultView:null,O2=new WeakMap;class I2{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ye(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=c=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Gl(c,"page").point)},i=(c,f)=>{var d;const{drag:h,dragPropagation:v,onDragStart:y}=this.getProps();if(h&&!v&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=sx(h),!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),ht(m=>{let p=this.getAxisMotionValue(m).get()||0;if(zt.test(p)){const{projection:w}=this.visualElement;if(w&&w.layout){const C=w.layout.layoutBox[m];C&&(p=st(C)*(parseFloat(p)/100))}}this.originPoint[m]=p}),y&&te.postRender(()=>y(c,f)),(d=this.removeWillChange)===null||d===void 0||d.call(this),this.removeWillChange=Ef(this.visualElement,"transform");const{animationState:S}=this.visualElement;S&&S.setActive("whileDrag",!0)},s=(c,f)=>{const{dragPropagation:d,dragDirectionLock:h,onDirectionLock:v,onDrag:y}=this.getProps();if(!d&&!this.openGlobalLock)return;const{offset:S}=f;if(h&&this.currentDirection===null){this.currentDirection=j2(S),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",f.point,S),this.updateAxis("y",f.point,S),this.visualElement.render(),y&&y(c,f)},a=(c,f)=>this.stop(c,f),l=()=>ht(c=>{var f;return this.getAnimationState(c)==="paused"&&((f=this.getAxisMotionValue(c).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new rx(t,{onSessionStart:o,onStart:i,onMove:s,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:px(this.visualElement)})}stop(t,n){var r;(r=this.removeWillChange)===null||r===void 0||r.call(this);const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&te.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Ys(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=k2(s,this.constraints[t],this.elastic[t])),i.set(s)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&to(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=E2(o.layoutBox,n):this.constraints=!1,this.elastic=M2(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&ht(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=A2(o.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!to(t))return!1;const r=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=L2(r,o.root,this.visualElement.getTransformPagePoint());let s=_2(o.layout.layoutBox,i);if(n){const a=n(R2(s));this.hasMutatedConstraints=!!a,a&&(s=cx(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=ht(c=>{if(!Ys(c,n,this.currentDirection))return;let f=l&&l[c]||{};s&&(f={min:0,max:0});const d=o?200:1e6,h=o?40:1e7,v={type:"inertia",velocity:r?t[c]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(c,v)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(Ph(t,r,0,n,this.visualElement,!1,Ef(this.visualElement,t)))}stopAnimation(){ht(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){ht(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){ht(n=>{const{drag:r}=this.getProps();if(!Ys(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:s,max:a}=o.layout.layoutBox[n];i.set(t[n]-pe(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!to(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};ht(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();o[s]=b2({min:l,max:l},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),ht(s=>{if(!Ys(s,t,null))return;const a=this.getAxisMotionValue(s),{min:l,max:u}=this.constraints[s];a.set(pe(l,u,o[s]))})}addListeners(){if(!this.visualElement.current)return;O2.set(this.visualElement,this);const t=this.visualElement.current,n=cn(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();to(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),te.read(r);const s=en(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(ht(c=>{const f=this.getAxisMotionValue(c);f&&(this.originPoint[c]+=l[c].translate,f.set(f.get()+l[c].translate))}),this.visualElement.render())});return()=>{s(),n(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:s=bf,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:s,dragMomentum:a}}}function Ys(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function j2(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class F2 extends Jn{constructor(t){super(t),this.removeGroupControls=$e,this.removeListeners=$e,this.controls=new I2(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||$e}unmount(){this.removeGroupControls(),this.removeListeners()}}const yg=e=>(t,n)=>{e&&te.postRender(()=>e(t,n))};class V2 extends Jn{constructor(){super(...arguments),this.removePointerDownListener=$e}onPointerDown(t){this.session=new rx(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:px(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:yg(t),onStart:yg(n),onMove:r,onEnd:(i,s)=>{delete this.session,o&&te.postRender(()=>o(i,s))}}}mount(){this.removePointerDownListener=cn(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Eh=g.createContext(null);function $2(){const e=g.useContext(Eh);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=g.useId();g.useEffect(()=>r(o),[]);const i=g.useCallback(()=>n&&n(o),[o,n]);return!t&&n?[!1,i]:[!0]}const mx=g.createContext({}),gx=g.createContext({}),va={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function wg(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ri={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(G.test(e))e=parseFloat(e);else return e;const n=wg(e,t.target.x),r=wg(e,t.target.y);return`${n}% ${r}%`}},z2={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Hn.parse(e);if(o.length>5)return r;const i=Hn.createTransformer(e),s=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+s]/=a,o[1+s]/=l;const u=pe(a,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=u),typeof o[3+s]=="number"&&(o[3+s]/=u),i(o)}},el={};function U2(e){Object.assign(el,e)}const{schedule:_h,cancel:Ij}=v1(queueMicrotask,!1);class B2 extends g.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;U2(W2),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),va.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,s=r.projection;return s&&(s.isPresent=i,o||t.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?s.promote():s.relegate()||te.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),_h.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function vx(e){const[t,n]=$2(),r=g.useContext(mx);return x.jsx(B2,{...e,layoutGroup:r,switchLayoutGroup:g.useContext(gx),isPresent:t,safeToRemove:n})}const W2={borderRadius:{...ri,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ri,borderTopRightRadius:ri,borderBottomLeftRadius:ri,borderBottomRightRadius:ri,boxShadow:z2},yx=["TopLeft","TopRight","BottomLeft","BottomRight"],H2=yx.length,xg=e=>typeof e=="string"?parseFloat(e):e,Sg=e=>typeof e=="number"||G.test(e);function G2(e,t,n,r,o,i){o?(e.opacity=pe(0,n.opacity!==void 0?n.opacity:1,K2(r)),e.opacityExit=pe(t.opacity!==void 0?t.opacity:1,0,Y2(r))):i&&(e.opacity=pe(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;srt?1:n(es(e,t,r))}function Tg(e,t){e.min=t.min,e.max=t.max}function dt(e,t){Tg(e.x,t.x),Tg(e.y,t.y)}function Pg(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function kg(e,t,n,r,o){return e-=t,e=Ja(e,1/n,r),o!==void 0&&(e=Ja(e,1/o,r)),e}function X2(e,t=0,n=1,r=.5,o,i=e,s=e){if(zt.test(t)&&(t=parseFloat(t),t=pe(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=pe(i.min,i.max,r);e===i&&(a-=t),e.min=kg(e.min,t,n,a,o),e.max=kg(e.max,t,n,a,o)}function Eg(e,t,[n,r,o],i,s){X2(e,t[n],t[r],t[o],t.scale,i,s)}const Q2=["x","scaleX","originX"],Z2=["y","scaleY","originY"];function _g(e,t,n,r){Eg(e.x,t,Q2,n?n.x:void 0,r?r.x:void 0),Eg(e.y,t,Z2,n?n.y:void 0,r?r.y:void 0)}function bg(e){return e.translate===0&&e.scale===1}function xx(e){return bg(e.x)&&bg(e.y)}function Ag(e,t){return e.min===t.min&&e.max===t.max}function q2(e,t){return Ag(e.x,t.x)&&Ag(e.y,t.y)}function Mg(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Sx(e,t){return Mg(e.x,t.x)&&Mg(e.y,t.y)}function Rg(e){return st(e.x)/st(e.y)}function Ng(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class J2{constructor(){this.members=[]}add(t){Bl(this.members,t),t.scheduleRender()}remove(t){if(Wl(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function eM(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,s=(n==null?void 0:n.z)||0;if((o||i||s)&&(r=`translate3d(${o}px, ${i}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:f,rotateY:d,skewX:h,skewY:v}=n;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),f&&(r+=`rotateX(${f}deg) `),d&&(r+=`rotateY(${d}deg) `),h&&(r+=`skewX(${h}deg) `),v&&(r+=`skewY(${v}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const tM=(e,t)=>e.depth-t.depth;class nM{constructor(){this.children=[],this.isDirty=!1}add(t){Bl(this.children,t),this.isDirty=!0}remove(t){Wl(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(tM),this.isDirty=!1,this.children.forEach(t)}}function ya(e){const t=Ve(e)?e.get():e;return YA(t)?t.toValue():t}function rM(e,t){const n=ln.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(mn(r),e(i-t))};return te.read(r,!0),()=>mn(r)}function oM(e){return e instanceof SVGElement&&e.tagName!=="svg"}function iM(e,t,n){const r=Ve(e)?e:ts(e);return r.start(Ph("",r,t,n)),r.animation}const sr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},hi=typeof window<"u"&&window.MotionDebug!==void 0,qu=["","X","Y","Z"],sM={visibility:"hidden"},Dg=1e3;let aM=0;function Ju(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Cx(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=J1(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",te,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Cx(r)}function Tx({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(s={},a=t==null?void 0:t()){this.id=aM++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,hi&&(sr.totalNodes=sr.resolvedTargetDeltas=sr.recalculatedProjection=0),this.nodes.forEach(cM),this.nodes.forEach(mM),this.nodes.forEach(gM),this.nodes.forEach(fM),hi&&window.MotionDebug.record(sr)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,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;lthis.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=rM(d,250),va.hasAnimatedSinceResize&&(va.hasAnimatedSinceResize=!1,this.nodes.forEach(Og))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:d,hasRelativeTargetChanged:h,layout:v})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||c.getDefaultTransition()||SM,{onLayoutAnimationStart:S,onLayoutAnimationComplete:m}=c.getProps(),p=!this.targetLayout||!Sx(this.targetLayout,v)||h,w=!d&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||w||d&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,w);const C={...dh(y,"layout"),onPlay:S,onComplete:m};(c.shouldReduceMotion||this.options.layoutRoot)&&(C.delay=0,C.type=!1),this.startAnimation(C)}else d||Og(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=v})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,mn(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(vM),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Cx(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c{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{const T=C/1e3;Ig(f.x,s.x,T),Ig(f.y,s.y,T),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Di(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),wM(this.relativeTarget,this.relativeTargetOrigin,d,T),w&&q2(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=ye()),dt(w,this.relativeTarget)),y&&(this.animationValues=c,G2(c,u,this.latestValues,T,p,m)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(mn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=te.update(()=>{va.hasAnimatedSinceResize=!0,this.currentAnimation=iM(0,Dg,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.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 s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Dg),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=s;if(!(!a||!l||!u)){if(this!==s&&this.layout&&u&&Px(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||ye();const f=st(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+f;const d=st(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+d}dt(a,l),oo(a,c),Ni(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new J2),this.sharedNodes.get(s).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Ju("z",s,u,this.animationValues);for(let c=0;c{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Lg),this.root.sharedNodes.clear()}}}function lM(e){e.updateLayout()}function uM(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:i}=e.options,s=n.source!==e.layout.source;i==="size"?ht(f=>{const d=s?n.measuredBox[f]:n.layoutBox[f],h=st(d);d.min=r[f].min,d.max=d.min+h}):Px(i,n.layoutBox,r)&&ht(f=>{const d=s?n.measuredBox[f]:n.layoutBox[f],h=st(r[f]);d.max=d.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+h)});const a=no();Ni(a,r,n.layoutBox);const l=no();s?Ni(l,e.applyTransform(o,!0),n.measuredBox):Ni(l,r,n.layoutBox);const u=!xx(a);let c=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:h}=f;if(d&&h){const v=ye();Di(v,n.layoutBox,d.layoutBox);const y=ye();Di(y,r,h.layoutBox),Sx(v,y)||(c=!0),f.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=v,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function cM(e){hi&&sr.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function fM(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function dM(e){e.clearSnapshot()}function Lg(e){e.clearMeasurements()}function hM(e){e.isLayoutDirty=!1}function pM(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Og(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function mM(e){e.resolveTargetDelta()}function gM(e){e.calcProjection()}function vM(e){e.resetSkewAndRotation()}function yM(e){e.removeLeadSnapshot()}function Ig(e,t,n){e.translate=pe(t.translate,0,n),e.scale=pe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function jg(e,t,n,r){e.min=pe(t.min,n.min,r),e.max=pe(t.max,n.max,r)}function wM(e,t,n,r){jg(e.x,t.x,n.x,r),jg(e.y,t.y,n.y,r)}function xM(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const SM={duration:.45,ease:[.4,0,.1,1]},Fg=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Vg=Fg("applewebkit/")&&!Fg("chrome/")?Math.round:$e;function $g(e){e.min=Vg(e.min),e.max=Vg(e.max)}function CM(e){$g(e.x),$g(e.y)}function Px(e,t,n){return e==="position"||e==="preserve-aspect"&&!T2(Rg(t),Rg(n),.2)}function TM(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const PM=Tx({attachResizeListener:(e,t)=>en(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ec={current:void 0},kx=Tx({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ec.current){const e=new PM({});e.mount(window),e.setOptions({layoutScroll:!0}),ec.current=e}return ec.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),kM={pan:{Feature:V2},drag:{Feature:F2,ProjectionNode:kx,MeasureLayout:vx}};function zg(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",o=(i,s)=>{if(i.pointerType==="touch"||ax())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t);const l=a[r];l&&te.postRender(()=>l(i,s))};return cn(e.current,n,o,{passive:!e.getProps()[r]})}class EM extends Jn{mount(){this.unmount=un(zg(this.node,!0),zg(this.node,!1))}unmount(){}}class _M extends Jn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=un(en(this.node.current,"focus",()=>this.onFocus()),en(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Ex=(e,t)=>t?e===t?!0:Ex(e,t.parentElement):!1;function tc(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Gl(n))}class bM extends Jn{constructor(){super(...arguments),this.removeStartListeners=$e,this.removeEndListeners=$e,this.removeAccessibleListeners=$e,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),i=cn(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:c,globalTapTarget:f}=this.node.getProps(),d=!f&&!Ex(this.node.current,a.target)?c:u;d&&te.update(()=>d(a,l))},{passive:!(r.onTap||r.onPointerUp)}),s=cn(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=un(i,s),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=i=>{if(i.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||tc("up",(l,u)=>{const{onTap:c}=this.node.getProps();c&&te.postRender(()=>c(l,u))})};this.removeEndListeners(),this.removeEndListeners=en(this.node.current,"keyup",s),tc("down",(a,l)=>{this.startPress(a,l)})},n=en(this.node.current,"keydown",t),r=()=>{this.isPressing&&tc("cancel",(i,s)=>this.cancelPress(i,s))},o=en(this.node.current,"blur",r);this.removeAccessibleListeners=un(n,o)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&te.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!ax()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&te.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=cn(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=en(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=un(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Rf=new WeakMap,nc=new WeakMap,AM=e=>{const t=Rf.get(e.target);t&&t(e)},MM=e=>{e.forEach(AM)};function RM({root:e,...t}){const n=e||document;nc.has(n)||nc.set(n,{});const r=nc.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(MM,{root:e,...t})),r[o]}function NM(e,t,n){const r=RM(t);return Rf.set(e,n),r.observe(e),()=>{Rf.delete(e),r.unobserve(e)}}const DM={some:0,all:1};class LM extends Jn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:DM[o]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:f}=this.node.getProps(),d=u?c:f;d&&d(l)};return NM(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(OM(t,n))&&this.startObserver()}unmount(){}}function OM({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const IM={inView:{Feature:LM},tap:{Feature:bM},focus:{Feature:_M},hover:{Feature:EM}},jM={layout:{ProjectionNode:kx,MeasureLayout:vx}},_x=g.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Kl=g.createContext({}),bh=typeof window<"u",FM=bh?g.useLayoutEffect:g.useEffect,bx=g.createContext({strict:!1});let Ug=!1;function VM(e,t,n,r,o){var i;const{visualElement:s}=g.useContext(Kl),a=g.useContext(bx),l=g.useContext(Eh),u=g.useContext(_x).reducedMotion,c=g.useRef();r=r||a.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u}));const f=c.current,d=g.useContext(gx);f&&!f.projection&&o&&(f.type==="html"||f.type==="svg")&&zM(c.current,n,o,d),g.useInsertionEffect(()=>{f&&f.update(n,l)});const h=n[q1],v=g.useRef(!!h&&!window.MotionHandoffIsComplete&&((i=window.MotionHasOptimisedAnimation)===null||i===void 0?void 0:i.call(window,h)));return FM(()=>{f&&(f.updateFeatures(),_h.render(f.render),v.current&&f.animationState&&f.animationState.animateChanges())}),g.useEffect(()=>{f&&(!v.current&&f.animationState&&f.animationState.animateChanges(),v.current=!1,Ug||(Ug=!0,queueMicrotask($M)))}),f}function $M(){window.MotionHandoffIsComplete=!0}function zM(e,t,n,r){const{layoutId:o,layout:i,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Ax(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!s||a&&to(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:u})}function Ax(e){if(e)return e.options.allowProjection!==!1?e.projection:Ax(e.parent)}function UM(e,t,n){return g.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):to(n)&&(n.current=r))},[t])}function Yl(e){return Zi(e.animate)||fh.some(t=>qi(e[t]))}function Mx(e){return!!(Yl(e)||e.variants)}function BM(e,t){if(Yl(e)){const{initial:n,animate:r}=e;return{initial:n===!1||qi(n)?n:void 0,animate:qi(r)?r:void 0}}return e.inherit!==!1?t:{}}function WM(e){const{initial:t,animate:n}=BM(e,g.useContext(Kl));return g.useMemo(()=>({initial:t,animate:n}),[Bg(t),Bg(n)])}function Bg(e){return Array.isArray(e)?e.join(" "):e}const Wg={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"]},Ao={};for(const e in Wg)Ao[e]={isEnabled:t=>Wg[e].some(n=>!!t[n])};function HM(e){for(const t in e)Ao[t]={...Ao[t],...e[t]}}const GM=Symbol.for("motionComponentSymbol");function KM({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&HM(e);function i(a,l){let u;const c={...g.useContext(_x),...a,layoutId:YM(a)},{isStatic:f}=c,d=WM(a),h=r(a,f);if(!f&&bh){XM();const v=QM(c);u=v.MeasureLayout,d.visualElement=VM(o,h,c,t,v.ProjectionNode)}return x.jsxs(Kl.Provider,{value:d,children:[u&&d.visualElement?x.jsx(u,{visualElement:d.visualElement,...c}):null,n(o,a,UM(h,d.visualElement,l),h,f,d.visualElement)]})}const s=g.forwardRef(i);return s[GM]=o,s}function YM({layoutId:e}){const t=g.useContext(mx).id;return t&&e!==void 0?t+"-"+e:e}function XM(e,t){g.useContext(bx).strict}function QM(e){const{drag:t,layout:n}=Ao;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const ZM=["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 Ah(e){return typeof e!="string"||e.includes("-")?!1:!!(ZM.indexOf(e)>-1||/[A-Z]/u.test(e))}function Rx(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const Nx=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 Dx(e,t,n,r){Rx(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Nx.has(o)?o:Hl(o),t.attrs[o])}function Lx(e,{layout:t,layoutId:n}){return qn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!el[e]||e==="opacity")}function Mh(e,t,n){var r;const{style:o}=e,i={};for(const s in o)(Ve(o[s])||t.style&&Ve(t.style[s])||Lx(s,e)||((r=n==null?void 0:n.getValue(s))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[s]=o[s]);return n&&o&&typeof o.willChange=="string"&&(n.applyWillChange=!1),i}function Ox(e,t,n){const r=Mh(e,t,n);for(const o in e)if(Ve(e[o])||Ve(t[o])){const i=hs.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}function qM(e){const t=g.useRef(null);return t.current===null&&(t.current=e()),t.current}function JM({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},o,i,s,a){const l={latestValues:tR(o,i,s,a?!1:e,t),renderState:n()};return r&&(l.mount=u=>r(o,u,l)),l}const Ix=e=>(t,n)=>{const r=g.useContext(Kl),o=g.useContext(Eh),i=()=>JM(e,t,r,o,n);return n?i():qM(i)};function eR(e,t){const n=ex(t);n&&Bl(e,n)}function Hg(e,t,n){const r=Array.isArray(t)?t:[t];for(let o=0;o{for(const p in S){let w=S[p];if(Array.isArray(w)){const C=v?w.length-1:0;w=w[C]}w!==null&&(s[p]=w)}for(const p in m)s[p]=m[p]}),l&&(f&&c!==!1&&!Zi(f)&&Hg(e,f,S=>{for(const m in S)eR(a,m)}),a.length&&(s.willChange=a.join(","))),s}const Rh=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),jx=()=>({...Rh(),attrs:{}}),Fx=(e,t)=>t&&typeof e=="number"?t.transform(e):e,nR={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},rR=hs.length;function oR(e,t,n){let r="",o=!0;for(let i=0;itypeof e=="string"&&e.toLowerCase()==="svg",uR={useVisualState:Ix({scrapeMotionValuesFromProps:Ox,createRenderState:jx,onMount:(e,t,{renderState:n,latestValues:r})=>{te.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),te.render(()=>{Dh(n,r,Lh(t.tagName),e.transformTemplate),Dx(t,n)})}})},cR={useVisualState:Ix({applyWillChange:!0,scrapeMotionValuesFromProps:Mh,createRenderState:Rh})};function Vx(e,t,n){for(const r in t)!Ve(t[r])&&!Lx(r,n)&&(e[r]=t[r])}function fR({transformTemplate:e},t){return g.useMemo(()=>{const n=Rh();return Nh(n,t,e),Object.assign({},n.vars,n.style)},[t])}function dR(e,t){const n=e.style||{},r={};return Vx(r,n,e),Object.assign(r,fR(e,t)),r}function hR(e,t){const n={},r=dR(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const pR=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function tl(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||pR.has(e)}let $x=e=>!tl(e);function mR(e){e&&($x=t=>t.startsWith("on")?!tl(t):e(t))}try{mR(require("@emotion/is-prop-valid").default)}catch{}function gR(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||($x(o)||n===!0&&tl(o)||!t&&!tl(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function vR(e,t,n,r){const o=g.useMemo(()=>{const i=jx();return Dh(i,t,Lh(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Vx(i,e.style,e),o.style={...i,...o.style}}return o}function yR(e=!1){return(n,r,o,{latestValues:i},s)=>{const l=(Ah(n)?vR:hR)(r,i,s,n),u=gR(r,typeof n=="string",e),c=n!==g.Fragment?{...u,...l,ref:o}:{},{children:f}=r,d=g.useMemo(()=>Ve(f)?f.get():f,[f]);return g.createElement(n,{...c,children:d})}}function wR(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const s={...Ah(r)?uR:cR,preloadedFeatures:e,useRender:yR(o),createVisualElement:t,Component:r};return KM(s)}}const Nf={current:null},zx={current:!1};function xR(){if(zx.current=!0,!!bh)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Nf.current=e.matches;e.addListener(t),t()}else Nf.current=!1}function SR(e,t,n){for(const r in t){const o=t[r],i=n[r];if(Ve(o))e.addValue(r,o);else if(Ve(i))e.addValue(r,ts(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(o):s.hasAnimated||s.set(o)}else{const s=e.getStaticValue(r);e.addValue(r,ts(s!==void 0?s:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Kg=new WeakMap,CR=[...P1,je,Hn],TR=e=>CR.find(T1(e)),Yg=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],PR=fh.length;class kR{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:s},a={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=mh,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.isRenderScheduled=!1,this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.isRenderScheduled=!1,this.scheduleRender=()=>{this.isRenderScheduled||(this.isRenderScheduled=!0,te.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=Yl(n),this.isVariantNode=Mx(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const h=f[d];l[d]!==void 0&&Ve(h)&&h.set(l[d],!1)}}mount(t){this.current=t,Kg.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),zx.current||xR(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Nf.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Kg.delete(this.current),this.projection&&this.projection.unmount(),mn(this.notifyUpdate),mn(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=qn.has(t),o=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&te.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i(),s&&s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ao){const n=Ao[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ye()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=ts(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(w1(o)||y1(o))?o=parseFloat(o):!TR(o)&&Hn.test(n)&&(o=N1(t,n)),this.setBaseTarget(t,Ve(o)?o.get():o)),Ve(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const s=uh(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);s&&(o=s[t])}if(r&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!Ve(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new kh),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Ux extends kR{constructor(){super(...arguments),this.KeyframeResolver=D1}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}}function ER(e){return window.getComputedStyle(e)}class _R extends Ux{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=Rx}readValueFromInstance(t,n){if(qn.has(n)){const r=yh(n);return r&&r.default||0}else{const r=ER(t),o=(S1(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return hx(t,n)}build(t,n,r){Nh(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Mh(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ve(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class bR extends Ux{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ye}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(qn.has(n)){const r=yh(n);return r&&r.default||0}return n=Nx.has(n)?n:Hl(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Ox(t,n,r)}build(t,n,r){Dh(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){Dx(t,n,r,o)}mount(t){this.isSVGTag=Lh(t.tagName),super.mount(t)}}const AR=(e,t)=>Ah(e)?new bR(t):new _R(t,{allowProjection:e!==g.Fragment}),MR=wR({...p2,...IM,...kM,...jM},AR),nl=ub(MR);/** +For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return g.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},H_="DialogDescriptionWarning",G_=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${i1(H_).contentName}}.`;return g.useEffect(()=>{var i;const o=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},K_=Gw,Y_=Xw,s1=Qw,a1=Zw,l1=Jw,u1=t1,X_=r1;function ds(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var Q_=["color"],Z_=g.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=ds(e,Q_);return g.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),g.createElement("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),q_=["color"],J_=g.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=ds(e,q_);return g.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),g.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),eb=["color"],tb=g.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=ds(e,eb);return g.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),g.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),nb=["color"],rb=g.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=ds(e,nb);return g.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),g.createElement("path",{d:"M3.13523 8.84197C3.3241 9.04343 3.64052 9.05363 3.84197 8.86477L7.5 5.43536L11.158 8.86477C11.3595 9.05363 11.6759 9.04343 11.8648 8.84197C12.0536 8.64051 12.0434 8.32409 11.842 8.13523L7.84197 4.38523C7.64964 4.20492 7.35036 4.20492 7.15803 4.38523L3.15803 8.13523C2.95657 8.32409 2.94637 8.64051 3.13523 8.84197Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),ob=["color"],ib=g.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=ds(e,ob);return g.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),g.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))});function c1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ttypeof e=="boolean"?"".concat(e):e===0?"0":e,Lm=sb,ah=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Lm(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(u=>{const c=n==null?void 0:n[u],f=i==null?void 0:i[u];if(c===null)return null;const d=Dm(c)||Dm(f);return o[u][d]}),a=n&&Object.entries(n).reduce((u,c)=>{let[f,d]=c;return d===void 0||(u[f]=d),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:f,className:d,...h}=c;return Object.entries(h).every(v=>{let[y,S]=v;return Array.isArray(S)?S.includes({...i,...a}[y]):{...i,...a}[y]===S})?[...u,f,d]:u},[]);return Lm(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},f1=K_,ab=Y_,d1=g.forwardRef(({className:e,...t},n)=>x.jsx(s1,{className:ae("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));d1.displayName=s1.displayName;const lb=ah("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),lh=g.forwardRef(({side:e="right",className:t,children:n,...r},o)=>x.jsxs(ab,{children:[x.jsx(d1,{}),x.jsxs(a1,{ref:o,className:ae(lb({side:e}),t),...r,children:[x.jsxs(X_,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[x.jsx(ib,{className:"h-4 w-4"}),x.jsx("span",{className:"sr-only",children:"Close"})]}),n]})]}));lh.displayName=a1.displayName;const h1=({className:e,...t})=>x.jsx("div",{className:ae("flex flex-col space-y-2 text-center sm:text-left",e),...t});h1.displayName="SheetHeader";const p1=g.forwardRef(({className:e,...t},n)=>x.jsx(l1,{ref:n,className:ae("text-lg font-semibold text-foreground",e),...t}));p1.displayName=l1.displayName;const m1=g.forwardRef(({className:e,...t},n)=>x.jsx(u1,{ref:n,className:ae("text-sm text-muted-foreground",e),...t}));m1.displayName=u1.displayName;function ub(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}function Zi(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const yf=e=>Array.isArray(e);function g1(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function uh(e,t,n,r){if(typeof t=="function"){const[o,i]=Om(r);t=t(n!==void 0?n:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=Om(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function zl(e,t,n){const r=e.getProps();return uh(r,t,n!==void 0?n:r.custom,e)}const ch=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],fh=["initial",...ch],hs=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],qn=new Set(hs),sn=e=>e*1e3,an=e=>e/1e3,cb={type:"spring",stiffness:500,damping:25,restSpeed:10},fb=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),db={type:"keyframes",duration:.8},hb={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},pb=(e,{keyframes:t})=>t.length>2?db:qn.has(e)?e.startsWith("scale")?fb(t[1]):cb:hb;function mb({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}function dh(e,t){return e[t]||e.default||e}const gb={skipAnimations:!1,useManualTiming:!1},vb=e=>e!==null;function Ul(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(vb),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}const $e=e=>e;function yb(e){let t=new Set,n=new Set,r=!1,o=!1;const i=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function a(u){i.has(u)&&(l.schedule(u),e()),u(s)}const l={schedule:(u,c=!1,f=!1)=>{const h=f&&r?t:n;return c&&i.add(u),h.has(u)||h.add(u),u},cancel:u=>{n.delete(u),i.delete(u)},process:u=>{if(s=u,r){o=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(a),r=!1,o&&(o=!1,l.process(u))}};return l}const Gs=["read","resolveKeyframes","update","preRender","render","postRender"],wb=40;function v1(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=Gs.reduce((m,p)=>(m[p]=yb(i),m),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:f,postRender:d}=s,h=()=>{const m=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(m-o.timestamp,wb),1),o.timestamp=m,o.isProcessing=!0,a.process(o),l.process(o),u.process(o),c.process(o),f.process(o),d.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(h))},v=()=>{n=!0,r=!0,o.isProcessing||e(h)};return{schedule:Gs.reduce((m,p)=>{const w=s[p];return m[p]=(C,T=!1,P=!1)=>(n||v(),w.schedule(C,T,P)),m},{}),cancel:m=>{for(let p=0;p/^0[^.\s]+$/u.test(e);function xb(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||y1(e):!0}let wf=$e;const w1=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),x1=e=>t=>typeof t=="string"&&t.startsWith(e),S1=x1("--"),Sb=x1("var(--"),hh=e=>Sb(e)?Cb.test(e.split("/*")[0].trim()):!1,Cb=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Tb=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Pb(e){const t=Tb.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}function C1(e,t,n=1){const[r,o]=Pb(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const s=i.trim();return w1(s)?parseFloat(s):s}return hh(o)?C1(o,t,n+1):o}const Wn=(e,t,n)=>n>t?t:ntypeof e=="number",parse:parseFloat,transform:e=>e},Mi={...Bo,transform:e=>Wn(0,1,e)},Ks={...Bo,default:1},Ri=e=>Math.round(e*1e5)/1e5,ph=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,kb=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Eb=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function ps(e){return typeof e=="string"}function _b(e){return e==null}const ms=e=>({test:t=>ps(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),_n=ms("deg"),zt=ms("%"),G=ms("px"),bb=ms("vh"),Ab=ms("vw"),Im={...zt,parse:e=>zt.parse(e)/100,transform:e=>zt.transform(e*100)},Mb=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),jm=e=>e===Bo||e===G,Fm=(e,t)=>parseFloat(e.split(", ")[t]),Vm=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return Fm(o[1],t);{const i=r.match(/^matrix\((.+)\)$/u);return i?Fm(i[1],e):0}},Rb=new Set(["x","y","z"]),Nb=hs.filter(e=>!Rb.has(e));function Db(e){const t=[];return Nb.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const bo={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Vm(4,13),y:Vm(5,14)};bo.translateX=bo.x;bo.translateY=bo.y;const T1=e=>t=>t.test(e),Lb={test:e=>e==="auto",parse:e=>e},P1=[Bo,G,zt,_n,Ab,bb,Lb],$m=e=>P1.find(T1(e)),mr=new Set;let xf=!1,Sf=!1;function k1(){if(Sf){const e=Array.from(mr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=Db(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,s])=>{var a;(a=r.getValue(i))===null||a===void 0||a.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Sf=!1,xf=!1,mr.forEach(e=>e.complete()),mr.clear()}function E1(){mr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Sf=!0)})}function Ob(){E1(),k1()}class mh{constructor(t,n,r,o,i,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(mr.add(this),xf||(xf=!0,te.read(E1),te.resolveKeyframes(k1))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let i=0;in=>!!(ps(n)&&Eb.test(n)&&n.startsWith(e)||t&&!_b(n)&&Object.prototype.hasOwnProperty.call(n,t)),_1=(e,t,n)=>r=>{if(!ps(r))return r;const[o,i,s,a]=r.match(ph);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},Ib=e=>Wn(0,255,e),Hu={...Bo,transform:e=>Math.round(Ib(e))},fr={test:gh("rgb","red"),parse:_1("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Hu.transform(e)+", "+Hu.transform(t)+", "+Hu.transform(n)+", "+Ri(Mi.transform(r))+")"};function jb(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Cf={test:gh("#"),parse:jb,transform:fr.transform},eo={test:gh("hsl","hue"),parse:_1("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+zt.transform(Ri(t))+", "+zt.transform(Ri(n))+", "+Ri(Mi.transform(r))+")"},je={test:e=>fr.test(e)||Cf.test(e)||eo.test(e),parse:e=>fr.test(e)?fr.parse(e):eo.test(e)?eo.parse(e):Cf.parse(e),transform:e=>ps(e)?e:e.hasOwnProperty("red")?fr.transform(e):eo.transform(e)};function Fb(e){var t,n;return isNaN(e)&&ps(e)&&(((t=e.match(ph))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(kb))===null||n===void 0?void 0:n.length)||0)>0}const b1="number",A1="color",Vb="var",$b="var(",zm="${}",zb=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ji(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace(zb,l=>(je.test(l)?(r.color.push(i),o.push(A1),n.push(je.parse(l))):l.startsWith($b)?(r.var.push(i),o.push(Vb),n.push(l)):(r.number.push(i),o.push(b1),n.push(parseFloat(l))),++i,zm)).split(zm);return{values:n,split:a,indexes:r,types:o}}function M1(e){return Ji(e).values}function R1(e){const{split:t,types:n}=Ji(e),r=t.length;return o=>{let i="";for(let s=0;stypeof e=="number"?0:e;function Bb(e){const t=M1(e);return R1(e)(t.map(Ub))}const Hn={test:Fb,parse:M1,createTransformer:R1,getAnimatableNone:Bb},Wb=new Set(["brightness","contrast","saturate","opacity"]);function Hb(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(ph)||[];if(!r)return e;const o=n.replace(r,"");let i=Wb.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const Gb=/\b([a-z-]*)\(.*?\)/gu,Tf={...Hn,getAnimatableNone:e=>{const t=e.match(Gb);return t?t.map(Hb).join(" "):e}},Um={...Bo,transform:Math.round},vh={borderWidth:G,borderTopWidth:G,borderRightWidth:G,borderBottomWidth:G,borderLeftWidth:G,borderRadius:G,radius:G,borderTopLeftRadius:G,borderTopRightRadius:G,borderBottomRightRadius:G,borderBottomLeftRadius:G,width:G,maxWidth:G,height:G,maxHeight:G,size:G,top:G,right:G,bottom:G,left:G,padding:G,paddingTop:G,paddingRight:G,paddingBottom:G,paddingLeft:G,margin:G,marginTop:G,marginRight:G,marginBottom:G,marginLeft:G,rotate:_n,rotateX:_n,rotateY:_n,rotateZ:_n,scale:Ks,scaleX:Ks,scaleY:Ks,scaleZ:Ks,skew:_n,skewX:_n,skewY:_n,distance:G,translateX:G,translateY:G,translateZ:G,x:G,y:G,z:G,perspective:G,transformPerspective:G,opacity:Mi,originX:Im,originY:Im,originZ:G,zIndex:Um,backgroundPositionX:G,backgroundPositionY:G,fillOpacity:Mi,strokeOpacity:Mi,numOctaves:Um},Kb={...vh,color:je,backgroundColor:je,outlineColor:je,fill:je,stroke:je,borderColor:je,borderTopColor:je,borderRightColor:je,borderBottomColor:je,borderLeftColor:je,filter:Tf,WebkitFilter:Tf},yh=e=>Kb[e];function N1(e,t){let n=yh(e);return n!==Tf&&(n=Hn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Yb=new Set(["auto","none","0"]);function Xb(e,t,n){let r=0,o;for(;r{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function L1(e){let t;return()=>(t===void 0&&(t=e()),t)}let ga;function Qb(){ga=void 0}const ln={now:()=>(ga===void 0&&ln.set(Ne.isProcessing||gb.useManualTiming?Ne.timestamp:performance.now()),ga),set:e=>{ga=e,queueMicrotask(Qb)}},Bm=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Hn.test(e)||e==="0")&&!e.startsWith("url("));function Zb(e){const t=e[0];if(e.length===1)return!0;for(let n=0;nJb?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Ob(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=ln.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:s,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!qb(t,r,o,i))if(s)this.options.duration=0;else{l==null||l(Ul(t,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const c=this.initPlayback(t,n);c!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...c},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function I1(e,t){return t?e*(1e3/t):0}const eA=5;function j1(e,t,n){const r=Math.max(t-eA,0);return I1(n-e(r),t-r)}const Gu=.001,tA=.01,nA=10,rA=.05,oA=1;function iA({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i,s=1-t;s=Wn(rA,oA,s),e=Wn(tA,nA,an(e)),s<1?(o=u=>{const c=u*s,f=c*e,d=c-n,h=Pf(u,s),v=Math.exp(-f);return Gu-d/h*v},i=u=>{const f=u*s*e,d=f*n+n,h=Math.pow(s,2)*Math.pow(u,2)*e,v=Math.exp(-f),y=Pf(Math.pow(u,2),s);return(-o(u)+Gu>0?-1:1)*((d-h)*v)/y}):(o=u=>{const c=Math.exp(-u*e),f=(u-n)*e+1;return-Gu+c*f},i=u=>{const c=Math.exp(-u*e),f=(n-u)*(e*e);return c*f});const a=5/e,l=aA(o,i,a);if(e=sn(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:e}}}const sA=12;function aA(e,t,n){let r=n;for(let o=1;oe[n]!==void 0)}function cA(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Wm(e,uA)&&Wm(e,lA)){const n=iA(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function F1({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],i=e[e.length-1],s={done:!1,value:o},{stiffness:a,damping:l,mass:u,duration:c,velocity:f,isResolvedFromDuration:d}=cA({...r,velocity:-an(r.velocity||0)}),h=f||0,v=l/(2*Math.sqrt(a*u)),y=i-o,S=an(Math.sqrt(a/u)),m=Math.abs(y)<5;n||(n=m?.01:2),t||(t=m?.005:.5);let p;if(v<1){const w=Pf(S,v);p=C=>{const T=Math.exp(-v*S*C);return i-T*((h+v*S*y)/w*Math.sin(w*C)+y*Math.cos(w*C))}}else if(v===1)p=w=>i-Math.exp(-S*w)*(y+(h+S*y)*w);else{const w=S*Math.sqrt(v*v-1);p=C=>{const T=Math.exp(-v*S*C),P=Math.min(w*C,300);return i-T*((h+v*S*y)*Math.sinh(P)+w*y*Math.cosh(P))/w}}return{calculatedDuration:d&&c||null,next:w=>{const C=p(w);if(d)s.done=w>=c;else{let T=0;v<1&&(T=w===0?sn(h):j1(p,w,C));const P=Math.abs(T)<=n,E=Math.abs(i-C)<=t;s.done=P&&E}return s.value=s.done?i:C,s}}}function Hm({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:u=.5,restSpeed:c}){const f=e[0],d={done:!1,value:f},h=k=>a!==void 0&&kl,v=k=>a===void 0?l:l===void 0||Math.abs(a-k)-y*Math.exp(-k/r),w=k=>m+p(k),C=k=>{const b=p(k),_=w(k);d.done=Math.abs(b)<=u,d.value=d.done?m:_};let T,P;const E=k=>{h(d.value)&&(T=k,P=F1({keyframes:[d.value,v(d.value)],velocity:j1(w,k,d.value),damping:o,stiffness:i,restDelta:u,restSpeed:c}))};return E(0),{calculatedDuration:null,next:k=>{let b=!1;return!P&&T===void 0&&(b=!0,C(k),E(k)),T!==void 0&&k>=T?P.next(k-T):(!b&&C(k),d)}}}const V1=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,fA=1e-7,dA=12;function hA(e,t,n,r,o){let i,s,a=0;do s=t+(n-t)/2,i=V1(s,r,o)-e,i>0?n=s:t=s;while(Math.abs(i)>fA&&++ahA(i,0,1,e,n);return i=>i===0||i===1?i:V1(o(i),t,r)}const pA=gs(.42,0,1,1),mA=gs(0,0,.58,1),$1=gs(.42,0,.58,1),gA=e=>Array.isArray(e)&&typeof e[0]!="number",z1=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,U1=e=>t=>1-e(1-t),wh=e=>1-Math.sin(Math.acos(e)),B1=U1(wh),vA=z1(wh),W1=gs(.33,1.53,.69,.99),xh=U1(W1),yA=z1(xh),wA=e=>(e*=2)<1?.5*xh(e):.5*(2-Math.pow(2,-10*(e-1))),Gm={linear:$e,easeIn:pA,easeInOut:$1,easeOut:mA,circIn:wh,circInOut:vA,circOut:B1,backIn:xh,backInOut:yA,backOut:W1,anticipate:wA},Km=e=>{if(Array.isArray(e)){wf(e.length===4);const[t,n,r,o]=e;return gs(t,n,r,o)}else if(typeof e=="string")return wf(Gm[e]!==void 0),Gm[e];return e},xA=(e,t)=>n=>t(e(n)),un=(...e)=>e.reduce(xA),es=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},pe=(e,t,n)=>e+(t-e)*n;function Ku(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function SA({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,s=0;if(!t)o=i=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=Ku(l,a,e+1/3),i=Ku(l,a,e),s=Ku(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}function Qa(e,t){return n=>n>0?t:e}const Yu=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},CA=[Cf,fr,eo],TA=e=>CA.find(t=>t.test(e));function Ym(e){const t=TA(e);if(!t)return!1;let n=t.parse(e);return t===eo&&(n=SA(n)),n}const Xm=(e,t)=>{const n=Ym(e),r=Ym(t);if(!n||!r)return Qa(e,t);const o={...n};return i=>(o.red=Yu(n.red,r.red,i),o.green=Yu(n.green,r.green,i),o.blue=Yu(n.blue,r.blue,i),o.alpha=pe(n.alpha,r.alpha,i),fr.transform(o))},kf=new Set(["none","hidden"]);function PA(e,t){return kf.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function kA(e,t){return n=>pe(e,t,n)}function Sh(e){return typeof e=="number"?kA:typeof e=="string"?hh(e)?Qa:je.test(e)?Xm:bA:Array.isArray(e)?H1:typeof e=="object"?je.test(e)?Xm:EA:Qa}function H1(e,t){const n=[...e],r=n.length,o=e.map((i,s)=>Sh(i)(i,t[s]));return i=>{for(let s=0;s{for(const i in r)n[i]=r[i](o);return n}}function _A(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i{const n=Hn.createTransformer(t),r=Ji(e),o=Ji(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?kf.has(e)&&!o.values.length||kf.has(t)&&!r.values.length?PA(e,t):un(H1(_A(r,o),o.values),n):Qa(e,t)};function G1(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?pe(e,t,n):Sh(e)(e,t)}function AA(e,t,n){const r=[],o=n||G1,i=e.length-1;for(let s=0;st[0];if(i===2&&e[0]===e[1])return()=>t[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=AA(t,r,o),a=s.length,l=u=>{let c=0;if(a>1)for(;cl(Wn(e[0],e[i-1],u)):l}function RA(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=es(0,t,r);e.push(pe(n,1,o))}}function NA(e){const t=[0];return RA(t,e.length-1),t}function DA(e,t){return e.map(n=>n*t)}function LA(e,t){return e.map(()=>t||$1).splice(0,e.length-1)}function Za({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=gA(r)?r.map(Km):Km(r),i={done:!1,value:t[0]},s=DA(n&&n.length===t.length?n:NA(t),e),a=MA(s,t,{ease:Array.isArray(o)?o:LA(t,o)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const Qm=2e4;function OA(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t=Qm?1/0:t}const IA=e=>{const t=({timestamp:n})=>e(n);return{start:()=>te.update(t,!0),stop:()=>mn(t),now:()=>Ne.isProcessing?Ne.timestamp:ln.now()}},jA={decay:Hm,inertia:Hm,tween:Za,keyframes:Za,spring:F1},FA=e=>e/100;class Ch extends O1{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:o,keyframes:i}=this.options,s=(o==null?void 0:o.KeyframeResolver)||mh,a=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new s(i,a,n,r,o),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:s=0}=this.options,a=jA[n]||Za;let l,u;a!==Za&&typeof t[0]!="number"&&(l=un(FA,G1(t[0],t[1])),t=[0,100]);const c=a({...this.options,keyframes:t});i==="mirror"&&(u=a({...this.options,keyframes:[...t].reverse(),velocity:-s})),c.calculatedDuration===null&&(c.calculatedDuration=OA(c));const{calculatedDuration:f}=c,d=f+o,h=d*(r+1)-o;return{generator:c,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:f,resolvedDuration:d,totalDuration:h}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:k}=this.options;return{done:!0,value:k[k.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:s,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:c,resolvedDuration:f}=r;if(this.startTime===null)return i.next(0);const{delay:d,repeat:h,repeatType:v,repeatDelay:y,onUpdate:S}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-c/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const m=this.currentTime-d*(this.speed>=0?1:-1),p=this.speed>=0?m<0:m>c;this.currentTime=Math.max(m,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let w=this.currentTime,C=i;if(h){const k=Math.min(this.currentTime,c)/f;let b=Math.floor(k),_=k%1;!_&&k>=1&&(_=1),_===1&&b--,b=Math.min(b,h+1),!!(b%2)&&(v==="reverse"?(_=1-_,y&&(_-=y/f)):v==="mirror"&&(C=s)),w=Wn(0,1,_)*f}const T=p?{done:!1,value:l[0]}:C.next(w);a&&(T.value=a(T.value));let{done:P}=T;!p&&u!==null&&(P=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return E&&o!==void 0&&(T.value=Ul(l,this.options,o)),S&&S(T.value),E&&this.finish(),T}get duration(){const{resolved:t}=this;return t?an(t.calculatedDuration):0}get time(){return an(this.currentTime)}set time(t){t=sn(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=an(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=IA,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const K1=new Set(["opacity","clipPath","filter","transform"]),Y1=e=>Array.isArray(e)&&typeof e[0]=="number";function X1(e){return!!(!e||typeof e=="string"&&e in Th||Y1(e)||Array.isArray(e)&&e.every(X1))}const di=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Th={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:di([0,.65,.55,1]),circOut:di([.55,0,1,.45]),backIn:di([.31,.01,.66,-.59]),backOut:di([.33,1.53,.69,.99])};function VA(e){return Q1(e)||Th.easeOut}function Q1(e){if(e)return Y1(e)?di(e):Array.isArray(e)?e.map(VA):Th[e]}function $A(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:s="loop",ease:a,times:l}={}){const u={[t]:n};l&&(u.offset=l);const c=Q1(a);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:r,duration:o,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"})}const zA=L1(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),qa=10,UA=2e4;function BA(e){return e.type==="spring"||!X1(e.ease)}function WA(e,t){const n=new Ch({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&ithis.onKeyframesResolved(s,a),n,r,o),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:o=300,times:i,ease:s,type:a,motionValue:l,name:u,startTime:c}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(BA(this.options)){const{onComplete:d,onUpdate:h,motionValue:v,element:y,...S}=this.options,m=WA(t,S);t=m.keyframes,t.length===1&&(t[1]=t[0]),o=m.duration,i=m.times,s=m.ease,a="keyframes"}const f=$A(l.owner.current,u,t,{...this.options,duration:o,times:i,ease:s});return f.startTime=c??this.calcStartTime(),this.pendingTimeline?(f.timeline=this.pendingTimeline,this.pendingTimeline=void 0):f.onfinish=()=>{const{onComplete:d}=this.options;l.set(Ul(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:f,duration:o,times:i,type:a,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return an(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return an(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=sn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return $e;const{animation:r}=n;r.timeline=t,r.onfinish=null}return $e}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:i,ease:s,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:c,onComplete:f,element:d,...h}=this.options,v=new Ch({...h,keyframes:r,duration:o,type:i,ease:s,times:a,isGenerator:!0}),y=sn(this.time);u.setWithVelocity(v.sample(y-qa).value,v.sample(y).value,qa)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:i,damping:s,type:a}=t;return zA()&&r&&K1.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!o&&i!=="mirror"&&s!==0&&a!=="inertia"}}function HA(e,t){let n;const r=()=>{const{currentTime:o}=t,s=(o===null?0:o.value)/100;n!==s&&e(s),n=s};return te.update(r,!0),()=>mn(r)}const GA=L1(()=>window.ScrollTimeline!==void 0);class KA{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r{if(GA()&&r.attachTimeline)r.attachTimeline(t);else return r.pause(),HA(o=>{r.time=r.duration*o},t)});return()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;nn[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const Ph=(e,t,n,r={},o,i,s)=>a=>{const l=dh(r,e)||{},u=l.delay||r.delay||0;let{elapsed:c=0}=r;c=c-sn(u);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-c,onUpdate:h=>{t.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),s&&s()},onStop:s,name:e,motionValue:t,element:i?void 0:o};mb(l)||(f={...f,...pb(e,f)}),f.duration&&(f.duration=sn(f.duration)),f.repeatDelay&&(f.repeatDelay=sn(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let d=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(d=!0)),d&&!i&&t.get()!==void 0){const h=Ul(f.keyframes,l);if(h!==void 0)return te.update(()=>{f.onUpdate(h),f.onComplete()}),new KA([])}return!i&&Zm.supports(f)?new Zm(f):new Ch(f)},YA=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),XA=e=>yf(e)?e[e.length-1]||0:e;function Bl(e,t){e.indexOf(t)===-1&&e.push(t)}function Wl(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class kh{constructor(){this.subscriptions=[]}add(t){return Bl(this.subscriptions,t),()=>Wl(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i!isNaN(parseFloat(e));class Z1{constructor(t,n={}){this.version="11.5.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=ln.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=ln.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=QA(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new kh);const r=this.events[t].add(n);return t==="change"?()=>{r(),te.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=ln.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>qm)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,qm);return I1(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ts(e,t){return new Z1(e,t)}function ZA(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ts(n))}function qA(e,t){const n=zl(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const s in i){const a=XA(i[s]);ZA(e,s,a)}}const Hl=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),JA="framerAppearId",q1="data-"+Hl(JA);function J1(e){return e.props[q1]}function ex(e){if(qn.has(e))return"transform";if(K1.has(e))return Hl(e)}class e2 extends Z1{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const n=ex(t);if(!n)return;const r=this.counts.get(n)||0;this.counts.set(n,r+1),r===0&&(this.output.push(n),this.update());let o=!1;return()=>{if(o)return;o=!0;const i=this.counts.get(n)-1;this.counts.set(n,i),i===0&&(Wl(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}}const Ve=e=>!!(e&&e.getVelocity);function t2(e){return!!(Ve(e)&&e.add)}function Ef(e,t){var n;if(!e.applyWillChange)return;let r=e.getValue("willChange");if(!r&&!(!((n=e.props.style)===null||n===void 0)&&n.willChange)&&(r=new e2("auto"),e.addValue("willChange",r)),t2(r))return r.add(t)}function n2({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function tx(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(s=r);const u=[],c=o&&e.animationState&&e.animationState.getState()[o];for(const f in l){const d=e.getValue(f,(i=e.latestValues[f])!==null&&i!==void 0?i:null),h=l[f];if(h===void 0||c&&n2(c,f))continue;const v={delay:n,...dh(s||{},f)};let y=!1;if(window.MotionHandoffAnimation){const m=J1(e);if(m){const p=window.MotionHandoffAnimation(m,f,te);p!==null&&(v.startTime=p,y=!0)}}d.start(Ph(f,d,h,e.shouldReduceMotion&&qn.has(f)?{type:!1}:v,e,y,Ef(e,f)));const S=d.animation;S&&u.push(S)}return a&&Promise.all(u).then(()=>{te.update(()=>{a&&qA(e,a)})}),u}function _f(e,t,n={}){var r;const o=zl(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const s=o?()=>Promise.all(tx(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:f,staggerDirection:d}=i;return r2(e,t,c+u,f,d,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[u,c]=l==="beforeChildren"?[s,a]:[a,s];return u().then(()=>c())}else return Promise.all([s(),a(n.delay)])}function r2(e,t,n=0,r=0,o=1,i){const s=[],a=(e.variantChildren.size-1)*r,l=o===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(e.variantChildren).sort(o2).forEach((u,c)=>{u.notify("AnimationStart",t),s.push(_f(u,t,{...i,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(s)}function o2(e,t){return e.sortNodePosition(t)}function i2(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>_f(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=_f(e,t,n);else{const o=typeof t=="function"?zl(e,t,n.custom):t;r=Promise.all(tx(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const s2=[...ch].reverse(),a2=ch.length;function l2(e){return t=>Promise.all(t.map(({animation:n,options:r})=>i2(e,n,r)))}function u2(e){let t=l2(e),n=Jm(),r=!0;const o=l=>(u,c)=>{var f;const d=zl(e,c,l==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(d){const{transition:h,transitionEnd:v,...y}=d;u={...u,...y,...v}}return u};function i(l){t=l(e)}function s(l){const u=e.getProps(),c=e.getVariantContext(!0)||{},f=[],d=new Set;let h={},v=1/0;for(let S=0;Sv&&C,b=!1;const _=Array.isArray(w)?w:[w];let M=_.reduce(o(m),{});T===!1&&(M={});const{prevResolvedValues:N={}}=p,I={...N,...M},B=j=>{k=!0,d.has(j)&&(b=!0,d.delete(j)),p.needsAnimating[j]=!0;const $=e.getValue(j);$&&($.liveStyle=!1)};for(const j in I){const $=M[j],U=N[j];if(h.hasOwnProperty(j))continue;let R=!1;yf($)&&yf(U)?R=!g1($,U):R=$!==U,R?$!=null?B(j):d.add(j):$!==void 0&&d.has(j)?B(j):p.protectedKeys[j]=!0}p.prevProp=w,p.prevResolvedValues=M,p.isActive&&(h={...h,...M}),r&&e.blockInitialAnimation&&(k=!1),k&&(!P||b)&&f.push(..._.map(j=>({animation:j,options:{type:m}})))}if(d.size){const S={};d.forEach(m=>{const p=e.getBaseTarget(m),w=e.getValue(m);w&&(w.liveStyle=!0),S[m]=p??null}),f.push({animation:S})}let y=!!f.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?t(f):Promise.resolve()}function a(l,u){var c;if(n[l].isActive===u)return Promise.resolve();(c=e.variantChildren)===null||c===void 0||c.forEach(d=>{var h;return(h=d.animationState)===null||h===void 0?void 0:h.setActive(l,u)}),n[l].isActive=u;const f=s(l);for(const d in n)n[d].protectedKeys={};return f}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Jm(),r=!0}}}function c2(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!g1(t,e):!1}function nr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Jm(){return{animate:nr(!0),whileInView:nr(),whileHover:nr(),whileTap:nr(),whileDrag:nr(),whileFocus:nr(),exit:nr()}}class Jn{constructor(t){this.isMounted=!1,this.node=t}update(){}}class f2 extends Jn{constructor(t){super(t),t.animationState||(t.animationState=u2(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Zi(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let d2=0;class h2 extends Jn{constructor(){super(...arguments),this.id=d2++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const p2={animation:{Feature:f2},exit:{Feature:h2}},nx=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Gl(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const m2=e=>t=>nx(t)&&e(t,Gl(t));function en(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function cn(e,t,n,r){return en(e,t,m2(n),r)}const eg=(e,t)=>Math.abs(e-t);function g2(e,t){const n=eg(e.x,t.x),r=eg(e.y,t.y);return Math.sqrt(n**2+r**2)}class rx{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!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 f=Qu(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,h=g2(f.offset,{x:0,y:0})>=3;if(!d&&!h)return;const{point:v}=f,{timestamp:y}=Ne;this.history.push({...v,timestamp:y});const{onStart:S,onMove:m}=this.handlers;d||(S&&S(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),m&&m(this.lastMoveEvent,f)},this.handlePointerMove=(f,d)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Xu(d,this.transformPagePoint),te.update(this.updatePoint,!0)},this.handlePointerUp=(f,d)=>{this.end();const{onEnd:h,onSessionEnd:v,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const S=Qu(f.type==="pointercancel"?this.lastMoveEventInfo:Xu(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(f,S),v&&v(f,S)},!nx(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const s=Gl(t),a=Xu(s,this.transformPagePoint),{point:l}=a,{timestamp:u}=Ne;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=n;c&&c(t,Qu(a,this.history)),this.removeListeners=un(cn(this.contextWindow,"pointermove",this.handlePointerMove),cn(this.contextWindow,"pointerup",this.handlePointerUp),cn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),mn(this.updatePoint)}}function Xu(e,t){return t?{point:t(e.point)}:e}function tg(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Qu({point:e},t){return{point:e,delta:tg(e,ox(t)),offset:tg(e,v2(t)),velocity:y2(t,.1)}}function v2(e){return e[0]}function ox(e){return e[e.length-1]}function y2(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=ox(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>sn(t)));)n--;if(!r)return{x:0,y:0};const i=an(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function ix(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const ng=ix("dragHorizontal"),rg=ix("dragVertical");function sx(e){let t=!1;if(e==="y")t=rg();else if(e==="x")t=ng();else{const n=ng(),r=rg();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function ax(){const e=sx(!0);return e?(e(),!1):!0}function to(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const lx=1e-4,w2=1-lx,x2=1+lx,ux=.01,S2=0-ux,C2=0+ux;function st(e){return e.max-e.min}function T2(e,t,n){return Math.abs(e-t)<=n}function og(e,t,n,r=.5){e.origin=r,e.originPoint=pe(t.min,t.max,e.origin),e.scale=st(n)/st(t),e.translate=pe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=w2&&e.scale<=x2||isNaN(e.scale))&&(e.scale=1),(e.translate>=S2&&e.translate<=C2||isNaN(e.translate))&&(e.translate=0)}function Ni(e,t,n,r){og(e.x,t.x,n.x,r?r.originX:void 0),og(e.y,t.y,n.y,r?r.originY:void 0)}function ig(e,t,n){e.min=n.min+t.min,e.max=e.min+st(t)}function P2(e,t,n){ig(e.x,t.x,n.x),ig(e.y,t.y,n.y)}function sg(e,t,n){e.min=t.min-n.min,e.max=e.min+st(t)}function Di(e,t,n){sg(e.x,t.x,n.x),sg(e.y,t.y,n.y)}function k2(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?pe(n,e,r.max):Math.min(e,n)),e}function ag(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function E2(e,{top:t,left:n,bottom:r,right:o}){return{x:ag(e.x,n,o),y:ag(e.y,t,r)}}function lg(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=es(t.min,t.max-r,e.min):r>o&&(n=es(e.min,e.max-o,t.min)),Wn(0,1,n)}function A2(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const bf=.35;function M2(e=bf){return e===!1?e=0:e===!0&&(e=bf),{x:ug(e,"left","right"),y:ug(e,"top","bottom")}}function ug(e,t,n){return{min:cg(e,t),max:cg(e,n)}}function cg(e,t){return typeof e=="number"?e:e[t]||0}const fg=()=>({translate:0,scale:1,origin:0,originPoint:0}),no=()=>({x:fg(),y:fg()}),dg=()=>({min:0,max:0}),ye=()=>({x:dg(),y:dg()});function ht(e){return[e("x"),e("y")]}function cx({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function R2({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function N2(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Zu(e){return e===void 0||e===1}function Af({scale:e,scaleX:t,scaleY:n}){return!Zu(e)||!Zu(t)||!Zu(n)}function ir(e){return Af(e)||fx(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function fx(e){return hg(e.x)||hg(e.y)}function hg(e){return e&&e!=="0%"}function Ja(e,t,n){const r=e-n,o=t*r;return n+o}function pg(e,t,n,r,o){return o!==void 0&&(e=Ja(e,o,r)),Ja(e,n,r)+t}function Mf(e,t=0,n=1,r,o){e.min=pg(e.min,t,n,r,o),e.max=pg(e.max,t,n,r,o)}function dx(e,{x:t,y:n}){Mf(e.x,t.translate,t.scale,t.originPoint),Mf(e.y,n.translate,n.scale,n.originPoint)}const mg=.999999999999,gg=1.0000000000001;function D2(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,s;for(let a=0;amg&&(t.x=1),t.ymg&&(t.y=1)}function ro(e,t){e.min=e.min+t,e.max=e.max+t}function vg(e,t,n,r,o=.5){const i=pe(e.min,e.max,o);Mf(e,t,n,i,r)}function oo(e,t){vg(e.x,t.x,t.scaleX,t.scale,t.originX),vg(e.y,t.y,t.scaleY,t.scale,t.originY)}function hx(e,t){return cx(N2(e.getBoundingClientRect(),t))}function L2(e,t,n){const r=hx(e,n),{scroll:o}=t;return o&&(ro(r.x,o.offset.x),ro(r.y,o.offset.y)),r}const px=({current:e})=>e?e.ownerDocument.defaultView:null,O2=new WeakMap;class I2{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ye(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=c=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Gl(c,"page").point)},i=(c,f)=>{var d;const{drag:h,dragPropagation:v,onDragStart:y}=this.getProps();if(h&&!v&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=sx(h),!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),ht(m=>{let p=this.getAxisMotionValue(m).get()||0;if(zt.test(p)){const{projection:w}=this.visualElement;if(w&&w.layout){const C=w.layout.layoutBox[m];C&&(p=st(C)*(parseFloat(p)/100))}}this.originPoint[m]=p}),y&&te.postRender(()=>y(c,f)),(d=this.removeWillChange)===null||d===void 0||d.call(this),this.removeWillChange=Ef(this.visualElement,"transform");const{animationState:S}=this.visualElement;S&&S.setActive("whileDrag",!0)},s=(c,f)=>{const{dragPropagation:d,dragDirectionLock:h,onDirectionLock:v,onDrag:y}=this.getProps();if(!d&&!this.openGlobalLock)return;const{offset:S}=f;if(h&&this.currentDirection===null){this.currentDirection=j2(S),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",f.point,S),this.updateAxis("y",f.point,S),this.visualElement.render(),y&&y(c,f)},a=(c,f)=>this.stop(c,f),l=()=>ht(c=>{var f;return this.getAnimationState(c)==="paused"&&((f=this.getAxisMotionValue(c).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new rx(t,{onSessionStart:o,onStart:i,onMove:s,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:px(this.visualElement)})}stop(t,n){var r;(r=this.removeWillChange)===null||r===void 0||r.call(this);const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&te.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Ys(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=k2(s,this.constraints[t],this.elastic[t])),i.set(s)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&to(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=E2(o.layoutBox,n):this.constraints=!1,this.elastic=M2(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&ht(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=A2(o.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!to(t))return!1;const r=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=L2(r,o.root,this.visualElement.getTransformPagePoint());let s=_2(o.layout.layoutBox,i);if(n){const a=n(R2(s));this.hasMutatedConstraints=!!a,a&&(s=cx(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=ht(c=>{if(!Ys(c,n,this.currentDirection))return;let f=l&&l[c]||{};s&&(f={min:0,max:0});const d=o?200:1e6,h=o?40:1e7,v={type:"inertia",velocity:r?t[c]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(c,v)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(Ph(t,r,0,n,this.visualElement,!1,Ef(this.visualElement,t)))}stopAnimation(){ht(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){ht(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){ht(n=>{const{drag:r}=this.getProps();if(!Ys(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:s,max:a}=o.layout.layoutBox[n];i.set(t[n]-pe(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!to(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};ht(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();o[s]=b2({min:l,max:l},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),ht(s=>{if(!Ys(s,t,null))return;const a=this.getAxisMotionValue(s),{min:l,max:u}=this.constraints[s];a.set(pe(l,u,o[s]))})}addListeners(){if(!this.visualElement.current)return;O2.set(this.visualElement,this);const t=this.visualElement.current,n=cn(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();to(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),te.read(r);const s=en(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(ht(c=>{const f=this.getAxisMotionValue(c);f&&(this.originPoint[c]+=l[c].translate,f.set(f.get()+l[c].translate))}),this.visualElement.render())});return()=>{s(),n(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:s=bf,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:s,dragMomentum:a}}}function Ys(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function j2(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class F2 extends Jn{constructor(t){super(t),this.removeGroupControls=$e,this.removeListeners=$e,this.controls=new I2(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||$e}unmount(){this.removeGroupControls(),this.removeListeners()}}const yg=e=>(t,n)=>{e&&te.postRender(()=>e(t,n))};class V2 extends Jn{constructor(){super(...arguments),this.removePointerDownListener=$e}onPointerDown(t){this.session=new rx(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:px(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:yg(t),onStart:yg(n),onMove:r,onEnd:(i,s)=>{delete this.session,o&&te.postRender(()=>o(i,s))}}}mount(){this.removePointerDownListener=cn(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Eh=g.createContext(null);function $2(){const e=g.useContext(Eh);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=g.useId();g.useEffect(()=>r(o),[]);const i=g.useCallback(()=>n&&n(o),[o,n]);return!t&&n?[!1,i]:[!0]}const mx=g.createContext({}),gx=g.createContext({}),va={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function wg(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ri={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(G.test(e))e=parseFloat(e);else return e;const n=wg(e,t.target.x),r=wg(e,t.target.y);return`${n}% ${r}%`}},z2={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Hn.parse(e);if(o.length>5)return r;const i=Hn.createTransformer(e),s=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+s]/=a,o[1+s]/=l;const u=pe(a,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=u),typeof o[3+s]=="number"&&(o[3+s]/=u),i(o)}},el={};function U2(e){Object.assign(el,e)}const{schedule:_h,cancel:Ij}=v1(queueMicrotask,!1);class B2 extends g.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;U2(W2),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),va.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,s=r.projection;return s&&(s.isPresent=i,o||t.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?s.promote():s.relegate()||te.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),_h.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function vx(e){const[t,n]=$2(),r=g.useContext(mx);return x.jsx(B2,{...e,layoutGroup:r,switchLayoutGroup:g.useContext(gx),isPresent:t,safeToRemove:n})}const W2={borderRadius:{...ri,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ri,borderTopRightRadius:ri,borderBottomLeftRadius:ri,borderBottomRightRadius:ri,boxShadow:z2},yx=["TopLeft","TopRight","BottomLeft","BottomRight"],H2=yx.length,xg=e=>typeof e=="string"?parseFloat(e):e,Sg=e=>typeof e=="number"||G.test(e);function G2(e,t,n,r,o,i){o?(e.opacity=pe(0,n.opacity!==void 0?n.opacity:1,K2(r)),e.opacityExit=pe(t.opacity!==void 0?t.opacity:1,0,Y2(r))):i&&(e.opacity=pe(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;srt?1:n(es(e,t,r))}function Tg(e,t){e.min=t.min,e.max=t.max}function dt(e,t){Tg(e.x,t.x),Tg(e.y,t.y)}function Pg(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function kg(e,t,n,r,o){return e-=t,e=Ja(e,1/n,r),o!==void 0&&(e=Ja(e,1/o,r)),e}function X2(e,t=0,n=1,r=.5,o,i=e,s=e){if(zt.test(t)&&(t=parseFloat(t),t=pe(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=pe(i.min,i.max,r);e===i&&(a-=t),e.min=kg(e.min,t,n,a,o),e.max=kg(e.max,t,n,a,o)}function Eg(e,t,[n,r,o],i,s){X2(e,t[n],t[r],t[o],t.scale,i,s)}const Q2=["x","scaleX","originX"],Z2=["y","scaleY","originY"];function _g(e,t,n,r){Eg(e.x,t,Q2,n?n.x:void 0,r?r.x:void 0),Eg(e.y,t,Z2,n?n.y:void 0,r?r.y:void 0)}function bg(e){return e.translate===0&&e.scale===1}function xx(e){return bg(e.x)&&bg(e.y)}function Ag(e,t){return e.min===t.min&&e.max===t.max}function q2(e,t){return Ag(e.x,t.x)&&Ag(e.y,t.y)}function Mg(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Sx(e,t){return Mg(e.x,t.x)&&Mg(e.y,t.y)}function Rg(e){return st(e.x)/st(e.y)}function Ng(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class J2{constructor(){this.members=[]}add(t){Bl(this.members,t),t.scheduleRender()}remove(t){if(Wl(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function eM(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,s=(n==null?void 0:n.z)||0;if((o||i||s)&&(r=`translate3d(${o}px, ${i}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:f,rotateY:d,skewX:h,skewY:v}=n;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),f&&(r+=`rotateX(${f}deg) `),d&&(r+=`rotateY(${d}deg) `),h&&(r+=`skewX(${h}deg) `),v&&(r+=`skewY(${v}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const tM=(e,t)=>e.depth-t.depth;class nM{constructor(){this.children=[],this.isDirty=!1}add(t){Bl(this.children,t),this.isDirty=!0}remove(t){Wl(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(tM),this.isDirty=!1,this.children.forEach(t)}}function ya(e){const t=Ve(e)?e.get():e;return YA(t)?t.toValue():t}function rM(e,t){const n=ln.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(mn(r),e(i-t))};return te.read(r,!0),()=>mn(r)}function oM(e){return e instanceof SVGElement&&e.tagName!=="svg"}function iM(e,t,n){const r=Ve(e)?e:ts(e);return r.start(Ph("",r,t,n)),r.animation}const sr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},hi=typeof window<"u"&&window.MotionDebug!==void 0,qu=["","X","Y","Z"],sM={visibility:"hidden"},Dg=1e3;let aM=0;function Ju(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Cx(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=J1(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",te,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Cx(r)}function Tx({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(s={},a=t==null?void 0:t()){this.id=aM++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,hi&&(sr.totalNodes=sr.resolvedTargetDeltas=sr.recalculatedProjection=0),this.nodes.forEach(cM),this.nodes.forEach(mM),this.nodes.forEach(gM),this.nodes.forEach(fM),hi&&window.MotionDebug.record(sr)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,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;lthis.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=rM(d,250),va.hasAnimatedSinceResize&&(va.hasAnimatedSinceResize=!1,this.nodes.forEach(Og))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:d,hasRelativeTargetChanged:h,layout:v})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||c.getDefaultTransition()||SM,{onLayoutAnimationStart:S,onLayoutAnimationComplete:m}=c.getProps(),p=!this.targetLayout||!Sx(this.targetLayout,v)||h,w=!d&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||w||d&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,w);const C={...dh(y,"layout"),onPlay:S,onComplete:m};(c.shouldReduceMotion||this.options.layoutRoot)&&(C.delay=0,C.type=!1),this.startAnimation(C)}else d||Og(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=v})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,mn(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(vM),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Cx(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c{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{const T=C/1e3;Ig(f.x,s.x,T),Ig(f.y,s.y,T),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Di(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),wM(this.relativeTarget,this.relativeTargetOrigin,d,T),w&&q2(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=ye()),dt(w,this.relativeTarget)),y&&(this.animationValues=c,G2(c,u,this.latestValues,T,p,m)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(mn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=te.update(()=>{va.hasAnimatedSinceResize=!0,this.currentAnimation=iM(0,Dg,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.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 s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Dg),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=s;if(!(!a||!l||!u)){if(this!==s&&this.layout&&u&&Px(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||ye();const f=st(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+f;const d=st(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+d}dt(a,l),oo(a,c),Ni(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new J2),this.sharedNodes.get(s).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Ju("z",s,u,this.animationValues);for(let c=0;c{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Lg),this.root.sharedNodes.clear()}}}function lM(e){e.updateLayout()}function uM(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:i}=e.options,s=n.source!==e.layout.source;i==="size"?ht(f=>{const d=s?n.measuredBox[f]:n.layoutBox[f],h=st(d);d.min=r[f].min,d.max=d.min+h}):Px(i,n.layoutBox,r)&&ht(f=>{const d=s?n.measuredBox[f]:n.layoutBox[f],h=st(r[f]);d.max=d.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+h)});const a=no();Ni(a,r,n.layoutBox);const l=no();s?Ni(l,e.applyTransform(o,!0),n.measuredBox):Ni(l,r,n.layoutBox);const u=!xx(a);let c=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:h}=f;if(d&&h){const v=ye();Di(v,n.layoutBox,d.layoutBox);const y=ye();Di(y,r,h.layoutBox),Sx(v,y)||(c=!0),f.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=v,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function cM(e){hi&&sr.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function fM(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function dM(e){e.clearSnapshot()}function Lg(e){e.clearMeasurements()}function hM(e){e.isLayoutDirty=!1}function pM(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Og(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function mM(e){e.resolveTargetDelta()}function gM(e){e.calcProjection()}function vM(e){e.resetSkewAndRotation()}function yM(e){e.removeLeadSnapshot()}function Ig(e,t,n){e.translate=pe(t.translate,0,n),e.scale=pe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function jg(e,t,n,r){e.min=pe(t.min,n.min,r),e.max=pe(t.max,n.max,r)}function wM(e,t,n,r){jg(e.x,t.x,n.x,r),jg(e.y,t.y,n.y,r)}function xM(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const SM={duration:.45,ease:[.4,0,.1,1]},Fg=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Vg=Fg("applewebkit/")&&!Fg("chrome/")?Math.round:$e;function $g(e){e.min=Vg(e.min),e.max=Vg(e.max)}function CM(e){$g(e.x),$g(e.y)}function Px(e,t,n){return e==="position"||e==="preserve-aspect"&&!T2(Rg(t),Rg(n),.2)}function TM(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const PM=Tx({attachResizeListener:(e,t)=>en(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ec={current:void 0},kx=Tx({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ec.current){const e=new PM({});e.mount(window),e.setOptions({layoutScroll:!0}),ec.current=e}return ec.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),kM={pan:{Feature:V2},drag:{Feature:F2,ProjectionNode:kx,MeasureLayout:vx}};function zg(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",o=(i,s)=>{if(i.pointerType==="touch"||ax())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t);const l=a[r];l&&te.postRender(()=>l(i,s))};return cn(e.current,n,o,{passive:!e.getProps()[r]})}class EM extends Jn{mount(){this.unmount=un(zg(this.node,!0),zg(this.node,!1))}unmount(){}}class _M extends Jn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=un(en(this.node.current,"focus",()=>this.onFocus()),en(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Ex=(e,t)=>t?e===t?!0:Ex(e,t.parentElement):!1;function tc(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Gl(n))}class bM extends Jn{constructor(){super(...arguments),this.removeStartListeners=$e,this.removeEndListeners=$e,this.removeAccessibleListeners=$e,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),i=cn(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:c,globalTapTarget:f}=this.node.getProps(),d=!f&&!Ex(this.node.current,a.target)?c:u;d&&te.update(()=>d(a,l))},{passive:!(r.onTap||r.onPointerUp)}),s=cn(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=un(i,s),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=i=>{if(i.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||tc("up",(l,u)=>{const{onTap:c}=this.node.getProps();c&&te.postRender(()=>c(l,u))})};this.removeEndListeners(),this.removeEndListeners=en(this.node.current,"keyup",s),tc("down",(a,l)=>{this.startPress(a,l)})},n=en(this.node.current,"keydown",t),r=()=>{this.isPressing&&tc("cancel",(i,s)=>this.cancelPress(i,s))},o=en(this.node.current,"blur",r);this.removeAccessibleListeners=un(n,o)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&te.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!ax()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&te.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=cn(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=en(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=un(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Rf=new WeakMap,nc=new WeakMap,AM=e=>{const t=Rf.get(e.target);t&&t(e)},MM=e=>{e.forEach(AM)};function RM({root:e,...t}){const n=e||document;nc.has(n)||nc.set(n,{});const r=nc.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(MM,{root:e,...t})),r[o]}function NM(e,t,n){const r=RM(t);return Rf.set(e,n),r.observe(e),()=>{Rf.delete(e),r.unobserve(e)}}const DM={some:0,all:1};class LM extends Jn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:DM[o]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:f}=this.node.getProps(),d=u?c:f;d&&d(l)};return NM(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(OM(t,n))&&this.startObserver()}unmount(){}}function OM({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const IM={inView:{Feature:LM},tap:{Feature:bM},focus:{Feature:_M},hover:{Feature:EM}},jM={layout:{ProjectionNode:kx,MeasureLayout:vx}},_x=g.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Kl=g.createContext({}),bh=typeof window<"u",FM=bh?g.useLayoutEffect:g.useEffect,bx=g.createContext({strict:!1});let Ug=!1;function VM(e,t,n,r,o){var i;const{visualElement:s}=g.useContext(Kl),a=g.useContext(bx),l=g.useContext(Eh),u=g.useContext(_x).reducedMotion,c=g.useRef();r=r||a.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u}));const f=c.current,d=g.useContext(gx);f&&!f.projection&&o&&(f.type==="html"||f.type==="svg")&&zM(c.current,n,o,d),g.useInsertionEffect(()=>{f&&f.update(n,l)});const h=n[q1],v=g.useRef(!!h&&!window.MotionHandoffIsComplete&&((i=window.MotionHasOptimisedAnimation)===null||i===void 0?void 0:i.call(window,h)));return FM(()=>{f&&(f.updateFeatures(),_h.render(f.render),v.current&&f.animationState&&f.animationState.animateChanges())}),g.useEffect(()=>{f&&(!v.current&&f.animationState&&f.animationState.animateChanges(),v.current=!1,Ug||(Ug=!0,queueMicrotask($M)))}),f}function $M(){window.MotionHandoffIsComplete=!0}function zM(e,t,n,r){const{layoutId:o,layout:i,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Ax(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!s||a&&to(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:u})}function Ax(e){if(e)return e.options.allowProjection!==!1?e.projection:Ax(e.parent)}function UM(e,t,n){return g.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):to(n)&&(n.current=r))},[t])}function Yl(e){return Zi(e.animate)||fh.some(t=>qi(e[t]))}function Mx(e){return!!(Yl(e)||e.variants)}function BM(e,t){if(Yl(e)){const{initial:n,animate:r}=e;return{initial:n===!1||qi(n)?n:void 0,animate:qi(r)?r:void 0}}return e.inherit!==!1?t:{}}function WM(e){const{initial:t,animate:n}=BM(e,g.useContext(Kl));return g.useMemo(()=>({initial:t,animate:n}),[Bg(t),Bg(n)])}function Bg(e){return Array.isArray(e)?e.join(" "):e}const Wg={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"]},Ao={};for(const e in Wg)Ao[e]={isEnabled:t=>Wg[e].some(n=>!!t[n])};function HM(e){for(const t in e)Ao[t]={...Ao[t],...e[t]}}const GM=Symbol.for("motionComponentSymbol");function KM({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&HM(e);function i(a,l){let u;const c={...g.useContext(_x),...a,layoutId:YM(a)},{isStatic:f}=c,d=WM(a),h=r(a,f);if(!f&&bh){XM();const v=QM(c);u=v.MeasureLayout,d.visualElement=VM(o,h,c,t,v.ProjectionNode)}return x.jsxs(Kl.Provider,{value:d,children:[u&&d.visualElement?x.jsx(u,{visualElement:d.visualElement,...c}):null,n(o,a,UM(h,d.visualElement,l),h,f,d.visualElement)]})}const s=g.forwardRef(i);return s[GM]=o,s}function YM({layoutId:e}){const t=g.useContext(mx).id;return t&&e!==void 0?t+"-"+e:e}function XM(e,t){g.useContext(bx).strict}function QM(e){const{drag:t,layout:n}=Ao;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const ZM=["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 Ah(e){return typeof e!="string"||e.includes("-")?!1:!!(ZM.indexOf(e)>-1||/[A-Z]/u.test(e))}function Rx(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const Nx=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 Dx(e,t,n,r){Rx(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Nx.has(o)?o:Hl(o),t.attrs[o])}function Lx(e,{layout:t,layoutId:n}){return qn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!el[e]||e==="opacity")}function Mh(e,t,n){var r;const{style:o}=e,i={};for(const s in o)(Ve(o[s])||t.style&&Ve(t.style[s])||Lx(s,e)||((r=n==null?void 0:n.getValue(s))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[s]=o[s]);return n&&o&&typeof o.willChange=="string"&&(n.applyWillChange=!1),i}function Ox(e,t,n){const r=Mh(e,t,n);for(const o in e)if(Ve(e[o])||Ve(t[o])){const i=hs.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}function qM(e){const t=g.useRef(null);return t.current===null&&(t.current=e()),t.current}function JM({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},o,i,s,a){const l={latestValues:tR(o,i,s,a?!1:e,t),renderState:n()};return r&&(l.mount=u=>r(o,u,l)),l}const Ix=e=>(t,n)=>{const r=g.useContext(Kl),o=g.useContext(Eh),i=()=>JM(e,t,r,o,n);return n?i():qM(i)};function eR(e,t){const n=ex(t);n&&Bl(e,n)}function Hg(e,t,n){const r=Array.isArray(t)?t:[t];for(let o=0;o{for(const p in S){let w=S[p];if(Array.isArray(w)){const C=v?w.length-1:0;w=w[C]}w!==null&&(s[p]=w)}for(const p in m)s[p]=m[p]}),l&&(f&&c!==!1&&!Zi(f)&&Hg(e,f,S=>{for(const m in S)eR(a,m)}),a.length&&(s.willChange=a.join(","))),s}const Rh=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),jx=()=>({...Rh(),attrs:{}}),Fx=(e,t)=>t&&typeof e=="number"?t.transform(e):e,nR={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},rR=hs.length;function oR(e,t,n){let r="",o=!0;for(let i=0;itypeof e=="string"&&e.toLowerCase()==="svg",uR={useVisualState:Ix({scrapeMotionValuesFromProps:Ox,createRenderState:jx,onMount:(e,t,{renderState:n,latestValues:r})=>{te.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),te.render(()=>{Dh(n,r,Lh(t.tagName),e.transformTemplate),Dx(t,n)})}})},cR={useVisualState:Ix({applyWillChange:!0,scrapeMotionValuesFromProps:Mh,createRenderState:Rh})};function Vx(e,t,n){for(const r in t)!Ve(t[r])&&!Lx(r,n)&&(e[r]=t[r])}function fR({transformTemplate:e},t){return g.useMemo(()=>{const n=Rh();return Nh(n,t,e),Object.assign({},n.vars,n.style)},[t])}function dR(e,t){const n=e.style||{},r={};return Vx(r,n,e),Object.assign(r,fR(e,t)),r}function hR(e,t){const n={},r=dR(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const pR=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function tl(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||pR.has(e)}let $x=e=>!tl(e);function mR(e){e&&($x=t=>t.startsWith("on")?!tl(t):e(t))}try{mR(require("@emotion/is-prop-valid").default)}catch{}function gR(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||($x(o)||n===!0&&tl(o)||!t&&!tl(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function vR(e,t,n,r){const o=g.useMemo(()=>{const i=jx();return Dh(i,t,Lh(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Vx(i,e.style,e),o.style={...i,...o.style}}return o}function yR(e=!1){return(n,r,o,{latestValues:i},s)=>{const l=(Ah(n)?vR:hR)(r,i,s,n),u=gR(r,typeof n=="string",e),c=n!==g.Fragment?{...u,...l,ref:o}:{},{children:f}=r,d=g.useMemo(()=>Ve(f)?f.get():f,[f]);return g.createElement(n,{...c,children:d})}}function wR(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const s={...Ah(r)?uR:cR,preloadedFeatures:e,useRender:yR(o),createVisualElement:t,Component:r};return KM(s)}}const Nf={current:null},zx={current:!1};function xR(){if(zx.current=!0,!!bh)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Nf.current=e.matches;e.addListener(t),t()}else Nf.current=!1}function SR(e,t,n){for(const r in t){const o=t[r],i=n[r];if(Ve(o))e.addValue(r,o);else if(Ve(i))e.addValue(r,ts(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(o):s.hasAnimated||s.set(o)}else{const s=e.getStaticValue(r);e.addValue(r,ts(s!==void 0?s:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Kg=new WeakMap,CR=[...P1,je,Hn],TR=e=>CR.find(T1(e)),Yg=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],PR=fh.length;class kR{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:s},a={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=mh,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.isRenderScheduled=!1,this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.isRenderScheduled=!1,this.scheduleRender=()=>{this.isRenderScheduled||(this.isRenderScheduled=!0,te.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=Yl(n),this.isVariantNode=Mx(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const h=f[d];l[d]!==void 0&&Ve(h)&&h.set(l[d],!1)}}mount(t){this.current=t,Kg.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),zx.current||xR(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Nf.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Kg.delete(this.current),this.projection&&this.projection.unmount(),mn(this.notifyUpdate),mn(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=qn.has(t),o=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&te.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i(),s&&s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ao){const n=Ao[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ye()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=ts(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(w1(o)||y1(o))?o=parseFloat(o):!TR(o)&&Hn.test(n)&&(o=N1(t,n)),this.setBaseTarget(t,Ve(o)?o.get():o)),Ve(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const s=uh(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);s&&(o=s[t])}if(r&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!Ve(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new kh),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Ux extends kR{constructor(){super(...arguments),this.KeyframeResolver=D1}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}}function ER(e){return window.getComputedStyle(e)}class _R extends Ux{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=Rx}readValueFromInstance(t,n){if(qn.has(n)){const r=yh(n);return r&&r.default||0}else{const r=ER(t),o=(S1(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return hx(t,n)}build(t,n,r){Nh(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Mh(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ve(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class bR extends Ux{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ye}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(qn.has(n)){const r=yh(n);return r&&r.default||0}return n=Nx.has(n)?n:Hl(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Ox(t,n,r)}build(t,n,r){Dh(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){Dx(t,n,r,o)}mount(t){this.isSVGTag=Lh(t.tagName),super.mount(t)}}const AR=(e,t)=>Ah(e)?new bR(t):new _R(t,{allowProjection:e!==g.Fragment}),MR=wR({...p2,...IM,...kM,...jM},AR),nl=ub(MR);/** * @license lucide-react v0.441.0 - ISC * * This source code is licensed under the ISC license. @@ -136,4 +136,4 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const $R=Dr("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]),zR=ah("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Mo=g.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const s=r?Cr:"button";return x.jsx(s,{className:ae(zR({variant:t,size:n,className:e})),ref:i,...o})});Mo.displayName="Button";const UR=({onAddStockClick:e})=>x.jsxs(nl.header,{className:"flex items-center justify-between mb-8",initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.5},children:[x.jsxs("div",{className:"flex items-center space-x-4",children:[x.jsx(IR,{className:"h-10 w-10 text-black"}),x.jsx("h1",{className:"text-3xl font-bold text-black",children:"TechStock Simulator"})]}),x.jsxs(Mo,{onClick:e,className:"bg-black hover:bg-gray-800 text-white transition-all duration-300 ease-in-out transform hover:scale-105 hover:shadow-lg",children:[x.jsx(jR,{className:"h-5 w-5 mr-2"}),"Add New Stock"]})]});function Xg(e,[t,n]){return Math.min(n,Math.max(t,e))}const BR=["top","right","bottom","left"],Ft=Math.min,tt=Math.max,rl=Math.round,Xs=Math.floor,Gn=e=>({x:e,y:e}),WR={left:"right",right:"left",bottom:"top",top:"bottom"},HR={start:"end",end:"start"};function Df(e,t,n){return tt(e,Ft(t,n))}function gn(e,t){return typeof e=="function"?e(t):e}function vn(e){return e.split("-")[0]}function Wo(e){return e.split("-")[1]}function Oh(e){return e==="x"?"y":"x"}function Ih(e){return e==="y"?"height":"width"}function Kn(e){return["top","bottom"].includes(vn(e))?"y":"x"}function jh(e){return Oh(Kn(e))}function GR(e,t,n){n===void 0&&(n=!1);const r=Wo(e),o=jh(e),i=Ih(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=ol(s)),[s,ol(s)]}function KR(e){const t=ol(e);return[Lf(e),t,Lf(t)]}function Lf(e){return e.replace(/start|end/g,t=>HR[t])}function YR(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function XR(e,t,n,r){const o=Wo(e);let i=YR(vn(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Lf)))),i}function ol(e){return e.replace(/left|right|bottom|top/g,t=>WR[t])}function QR(e){return{top:0,right:0,bottom:0,left:0,...e}}function Wx(e){return typeof e!="number"?QR(e):{top:e,right:e,bottom:e,left:e}}function il(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Qg(e,t,n){let{reference:r,floating:o}=e;const i=Kn(t),s=jh(t),a=Ih(s),l=vn(t),u=i==="y",c=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[a]/2-o[a]/2;let h;switch(l){case"top":h={x:c,y:r.y-o.height};break;case"bottom":h={x:c,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-o.width,y:f};break;default:h={x:r.x,y:r.y}}switch(Wo(t)){case"start":h[s]-=d*(n&&u?-1:1);break;case"end":h[s]+=d*(n&&u?-1:1);break}return h}const ZR=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:f}=Qg(u,r,l),d=r,h={},v=0;for(let y=0;y({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:u,padding:c=0}=gn(e,t)||{};if(u==null)return{};const f=Wx(c),d={x:n,y:r},h=jh(o),v=Ih(h),y=await s.getDimensions(u),S=h==="y",m=S?"top":"left",p=S?"bottom":"right",w=S?"clientHeight":"clientWidth",C=i.reference[v]+i.reference[h]-d[h]-i.floating[v],T=d[h]-i.reference[h],P=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let E=P?P[w]:0;(!E||!await(s.isElement==null?void 0:s.isElement(P)))&&(E=a.floating[w]||i.floating[v]);const k=C/2-T/2,b=E/2-y[v]/2-1,_=Ft(f[m],b),M=Ft(f[p],b),N=_,I=E-y[v]-M,B=E/2-y[v]/2+k,j=Df(N,B,I),$=!l.arrow&&Wo(o)!=null&&B!==j&&i.reference[v]/2-(BB<=0)){var M,N;const B=(((M=i.flip)==null?void 0:M.index)||0)+1,j=E[B];if(j)return{data:{index:B,overflows:_},reset:{placement:j}};let $=(N=_.filter(z=>z.overflows[0]<=0).sort((z,R)=>z.overflows[1]-R.overflows[1])[0])==null?void 0:N.placement;if(!$)switch(h){case"bestFit":{var I;const z=(I=_.filter(R=>{if(P){const L=Kn(R.placement);return L===p||L==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(L=>L>0).reduce((L,W)=>L+W,0)]).sort((R,L)=>R[1]-L[1])[0])==null?void 0:I[0];z&&($=z);break}case"initialPlacement":$=a;break}if(o!==$)return{reset:{placement:$}}}return{}}}};function Zg(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function qg(e){return BR.some(t=>e[t]>=0)}const eN=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=gn(e,t);switch(r){case"referenceHidden":{const i=await ns(t,{...o,elementContext:"reference"}),s=Zg(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:qg(s)}}}case"escaped":{const i=await ns(t,{...o,altBoundary:!0}),s=Zg(i,n.floating);return{data:{escapedOffsets:s,escaped:qg(s)}}}default:return{}}}}};async function tN(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=vn(n),a=Wo(n),l=Kn(n)==="y",u=["left","top"].includes(s)?-1:1,c=i&&l?-1:1,f=gn(t,e);let{mainAxis:d,crossAxis:h,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof v=="number"&&(h=a==="end"?v*-1:v),l?{x:h*c,y:d*u}:{x:d*u,y:h*c}}const nN=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await tN(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},rN=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:S=>{let{x:m,y:p}=S;return{x:m,y:p}}},...l}=gn(e,t),u={x:n,y:r},c=await ns(t,l),f=Kn(vn(o)),d=Oh(f);let h=u[d],v=u[f];if(i){const S=d==="y"?"top":"left",m=d==="y"?"bottom":"right",p=h+c[S],w=h-c[m];h=Df(p,h,w)}if(s){const S=f==="y"?"top":"left",m=f==="y"?"bottom":"right",p=v+c[S],w=v-c[m];v=Df(p,v,w)}const y=a.fn({...t,[d]:h,[f]:v});return{...y,data:{x:y.x-n,y:y.y-r}}}}},oN=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=gn(e,t),c={x:n,y:r},f=Kn(o),d=Oh(f);let h=c[d],v=c[f];const y=gn(a,t),S=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const w=d==="y"?"height":"width",C=i.reference[d]-i.floating[w]+S.mainAxis,T=i.reference[d]+i.reference[w]-S.mainAxis;hT&&(h=T)}if(u){var m,p;const w=d==="y"?"width":"height",C=["top","left"].includes(vn(o)),T=i.reference[f]-i.floating[w]+(C&&((m=s.offset)==null?void 0:m[f])||0)+(C?0:S.crossAxis),P=i.reference[f]+i.reference[w]+(C?0:((p=s.offset)==null?void 0:p[f])||0)-(C?S.crossAxis:0);vP&&(v=P)}return{[d]:h,[f]:v}}}},iN=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:s=()=>{},...a}=gn(e,t),l=await ns(t,a),u=vn(n),c=Wo(n),f=Kn(n)==="y",{width:d,height:h}=r.floating;let v,y;u==="top"||u==="bottom"?(v=u,y=c===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(y=u,v=c==="end"?"top":"bottom");const S=h-l.top-l.bottom,m=d-l.left-l.right,p=Ft(h-l[v],S),w=Ft(d-l[y],m),C=!t.middlewareData.shift;let T=p,P=w;if(f?P=c||C?Ft(w,m):m:T=c||C?Ft(p,S):S,C&&!c){const k=tt(l.left,0),b=tt(l.right,0),_=tt(l.top,0),M=tt(l.bottom,0);f?P=d-2*(k!==0||b!==0?k+b:tt(l.left,l.right)):T=h-2*(_!==0||M!==0?_+M:tt(l.top,l.bottom))}await s({...t,availableWidth:P,availableHeight:T});const E=await o.getDimensions(i.floating);return d!==E.width||h!==E.height?{reset:{rects:!0}}:{}}}};function Ho(e){return Hx(e)?(e.nodeName||"").toLowerCase():"#document"}function ot(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Cn(e){var t;return(t=(Hx(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Hx(e){return e instanceof Node||e instanceof ot(e).Node}function Mt(e){return e instanceof Element||e instanceof ot(e).Element}function Wt(e){return e instanceof HTMLElement||e instanceof ot(e).HTMLElement}function Jg(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ot(e).ShadowRoot}function vs(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Rt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function sN(e){return["table","td","th"].includes(Ho(e))}function Xl(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Fh(e){const t=Vh(),n=Mt(e)?Rt(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function aN(e){let t=Yn(e);for(;Wt(t)&&!Ro(t);){if(Fh(t))return t;if(Xl(t))return null;t=Yn(t)}return null}function Vh(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ro(e){return["html","body","#document"].includes(Ho(e))}function Rt(e){return ot(e).getComputedStyle(e)}function Ql(e){return Mt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yn(e){if(Ho(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Jg(e)&&e.host||Cn(e);return Jg(t)?t.host:t}function Gx(e){const t=Yn(e);return Ro(t)?e.ownerDocument?e.ownerDocument.body:e.body:Wt(t)&&vs(t)?t:Gx(t)}function rs(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Gx(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=ot(o);if(i){const a=Of(s);return t.concat(s,s.visualViewport||[],vs(o)?o:[],a&&n?rs(a):[])}return t.concat(o,rs(o,[],n))}function Of(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Kx(e){const t=Rt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Wt(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=rl(n)!==i||rl(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function $h(e){return Mt(e)?e:e.contextElement}function yo(e){const t=$h(e);if(!Wt(t))return Gn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Kx(t);let s=(i?rl(n.width):n.width)/r,a=(i?rl(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const lN=Gn(0);function Yx(e){const t=ot(e);return!Vh()||!t.visualViewport?lN:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function uN(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ot(e)?!1:t}function Pr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=$h(e);let s=Gn(1);t&&(r?Mt(r)&&(s=yo(r)):s=yo(e));const a=uN(i,n,r)?Yx(i):Gn(0);let l=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,c=o.width/s.x,f=o.height/s.y;if(i){const d=ot(i),h=r&&Mt(r)?ot(r):r;let v=d,y=Of(v);for(;y&&r&&h!==v;){const S=yo(y),m=y.getBoundingClientRect(),p=Rt(y),w=m.left+(y.clientLeft+parseFloat(p.paddingLeft))*S.x,C=m.top+(y.clientTop+parseFloat(p.paddingTop))*S.y;l*=S.x,u*=S.y,c*=S.x,f*=S.y,l+=w,u+=C,v=ot(y),y=Of(v)}}return il({width:c,height:f,x:l,y:u})}function cN(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Cn(r),a=t?Xl(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},u=Gn(1);const c=Gn(0),f=Wt(r);if((f||!f&&!i)&&((Ho(r)!=="body"||vs(s))&&(l=Ql(r)),Wt(r))){const d=Pr(r);u=yo(r),c.x=d.x+r.clientLeft,c.y=d.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x,y:n.y*u.y-l.scrollTop*u.y+c.y}}function fN(e){return Array.from(e.getClientRects())}function Xx(e){return Pr(Cn(e)).left+Ql(e).scrollLeft}function dN(e){const t=Cn(e),n=Ql(e),r=e.ownerDocument.body,o=tt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=tt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Xx(e);const a=-n.scrollTop;return Rt(r).direction==="rtl"&&(s+=tt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function hN(e,t){const n=ot(e),r=Cn(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const u=Vh();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function pN(e,t){const n=Pr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Wt(e)?yo(e):Gn(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,u=r*i.y;return{width:s,height:a,x:l,y:u}}function ev(e,t,n){let r;if(t==="viewport")r=hN(e,n);else if(t==="document")r=dN(Cn(e));else if(Mt(t))r=pN(t,n);else{const o=Yx(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return il(r)}function Qx(e,t){const n=Yn(e);return n===t||!Mt(n)||Ro(n)?!1:Rt(n).position==="fixed"||Qx(n,t)}function mN(e,t){const n=t.get(e);if(n)return n;let r=rs(e,[],!1).filter(a=>Mt(a)&&Ho(a)!=="body"),o=null;const i=Rt(e).position==="fixed";let s=i?Yn(e):e;for(;Mt(s)&&!Ro(s);){const a=Rt(s),l=Fh(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||vs(s)&&!l&&Qx(e,s))?r=r.filter(c=>c!==s):o=a,s=Yn(s)}return t.set(e,r),r}function gN(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Xl(t)?[]:mN(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((u,c)=>{const f=ev(t,c,o);return u.top=tt(f.top,u.top),u.right=Ft(f.right,u.right),u.bottom=Ft(f.bottom,u.bottom),u.left=tt(f.left,u.left),u},ev(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function vN(e){const{width:t,height:n}=Kx(e);return{width:t,height:n}}function yN(e,t,n){const r=Wt(t),o=Cn(t),i=n==="fixed",s=Pr(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Gn(0);if(r||!r&&!i)if((Ho(t)!=="body"||vs(o))&&(a=Ql(t)),r){const f=Pr(t,!0,i,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&(l.x=Xx(o));const u=s.left+a.scrollLeft-l.x,c=s.top+a.scrollTop-l.y;return{x:u,y:c,width:s.width,height:s.height}}function rc(e){return Rt(e).position==="static"}function tv(e,t){return!Wt(e)||Rt(e).position==="fixed"?null:t?t(e):e.offsetParent}function Zx(e,t){const n=ot(e);if(Xl(e))return n;if(!Wt(e)){let o=Yn(e);for(;o&&!Ro(o);){if(Mt(o)&&!rc(o))return o;o=Yn(o)}return n}let r=tv(e,t);for(;r&&sN(r)&&rc(r);)r=tv(r,t);return r&&Ro(r)&&rc(r)&&!Fh(r)?n:r||aN(e)||n}const wN=async function(e){const t=this.getOffsetParent||Zx,n=this.getDimensions,r=await n(e.floating);return{reference:yN(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function xN(e){return Rt(e).direction==="rtl"}const SN={convertOffsetParentRelativeRectToViewportRelativeRect:cN,getDocumentElement:Cn,getClippingRect:gN,getOffsetParent:Zx,getElementRects:wN,getClientRects:fN,getDimensions:vN,getScale:yo,isElement:Mt,isRTL:xN};function CN(e,t){let n=null,r;const o=Cn(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:u,top:c,width:f,height:d}=e.getBoundingClientRect();if(a||t(),!f||!d)return;const h=Xs(c),v=Xs(o.clientWidth-(u+f)),y=Xs(o.clientHeight-(c+d)),S=Xs(u),p={rootMargin:-h+"px "+-v+"px "+-y+"px "+-S+"px",threshold:tt(0,Ft(1,l))||1};let w=!0;function C(T){const P=T[0].intersectionRatio;if(P!==l){if(!w)return s();P?s(!1,P):r=setTimeout(()=>{s(!1,1e-7)},1e3)}w=!1}try{n=new IntersectionObserver(C,{...p,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,p)}n.observe(e)}return s(!0),i}function TN(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=$h(e),c=o||i?[...u?rs(u):[],...rs(t)]:[];c.forEach(m=>{o&&m.addEventListener("scroll",n,{passive:!0}),i&&m.addEventListener("resize",n)});const f=u&&a?CN(u,n):null;let d=-1,h=null;s&&(h=new ResizeObserver(m=>{let[p]=m;p&&p.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let v,y=l?Pr(e):null;l&&S();function S(){const m=Pr(e);y&&(m.x!==y.x||m.y!==y.y||m.width!==y.width||m.height!==y.height)&&n(),y=m,v=requestAnimationFrame(S)}return n(),()=>{var m;c.forEach(p=>{o&&p.removeEventListener("scroll",n),i&&p.removeEventListener("resize",n)}),f==null||f(),(m=h)==null||m.disconnect(),h=null,l&&cancelAnimationFrame(v)}}const PN=nN,kN=rN,EN=JR,_N=iN,bN=eN,nv=qR,AN=oN,MN=(e,t,n)=>{const r=new Map,o={platform:SN,...n},i={...o.platform,_c:r};return ZR(e,t,{...o,platform:i})};var wa=typeof document<"u"?g.useLayoutEffect:g.useEffect;function sl(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!sl(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!sl(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function qx(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function rv(e,t){const n=qx(e);return Math.round(t*n)/n}function ov(e){const t=g.useRef(e);return wa(()=>{t.current=e}),t}function RN(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[c,f]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,h]=g.useState(r);sl(d,r)||h(r);const[v,y]=g.useState(null),[S,m]=g.useState(null),p=g.useCallback(z=>{z!==P.current&&(P.current=z,y(z))},[]),w=g.useCallback(z=>{z!==E.current&&(E.current=z,m(z))},[]),C=i||v,T=s||S,P=g.useRef(null),E=g.useRef(null),k=g.useRef(c),b=l!=null,_=ov(l),M=ov(o),N=g.useCallback(()=>{if(!P.current||!E.current)return;const z={placement:t,strategy:n,middleware:d};M.current&&(z.platform=M.current),MN(P.current,E.current,z).then(R=>{const L={...R,isPositioned:!0};I.current&&!sl(k.current,L)&&(k.current=L,Rr.flushSync(()=>{f(L)}))})},[d,t,n,M]);wa(()=>{u===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,f(z=>({...z,isPositioned:!1})))},[u]);const I=g.useRef(!1);wa(()=>(I.current=!0,()=>{I.current=!1}),[]),wa(()=>{if(C&&(P.current=C),T&&(E.current=T),C&&T){if(_.current)return _.current(C,T,N);N()}},[C,T,N,_,b]);const B=g.useMemo(()=>({reference:P,floating:E,setReference:p,setFloating:w}),[p,w]),j=g.useMemo(()=>({reference:C,floating:T}),[C,T]),$=g.useMemo(()=>{const z={position:n,left:0,top:0};if(!j.floating)return z;const R=rv(j.floating,c.x),L=rv(j.floating,c.y);return a?{...z,transform:"translate("+R+"px, "+L+"px)",...qx(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:R,top:L}},[n,a,j.floating,c.x,c.y]);return g.useMemo(()=>({...c,update:N,refs:B,elements:j,floatingStyles:$}),[c,N,B,j,$])}const NN=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?nv({element:r.current,padding:o}).fn(n):{}:r?nv({element:r,padding:o}).fn(n):{}}}},DN=(e,t)=>({...PN(e),options:[e,t]}),LN=(e,t)=>({...kN(e),options:[e,t]}),ON=(e,t)=>({...AN(e),options:[e,t]}),IN=(e,t)=>({...EN(e),options:[e,t]}),jN=(e,t)=>({..._N(e),options:[e,t]}),FN=(e,t)=>({...bN(e),options:[e,t]}),VN=(e,t)=>({...NN(e),options:[e,t]});var $N="Arrow",Jx=g.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return x.jsx(J.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:x.jsx("polygon",{points:"0,0 30,0 15,10"})})});Jx.displayName=$N;var zN=Jx;function UN(e){const[t,n]=g.useState(void 0);return We(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,a;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;s=u.inlineSize,a=u.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var zh="Popper",[eS,Zl]=Nr(zh),[BN,tS]=eS(zh),nS=e=>{const{__scopePopper:t,children:n}=e,[r,o]=g.useState(null);return x.jsx(BN,{scope:t,anchor:r,onAnchorChange:o,children:n})};nS.displayName=zh;var rS="PopperAnchor",oS=g.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=tS(rS,n),s=g.useRef(null),a=de(t,s);return g.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:x.jsx(J.div,{...o,ref:a})});oS.displayName=rS;var Uh="PopperContent",[WN,HN]=eS(Uh),iS=g.forwardRef((e,t)=>{var H,oe,O,V,U,A;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:f="partial",hideWhenDetached:d=!1,updatePositionStrategy:h="optimized",onPlaced:v,...y}=e,S=tS(Uh,n),[m,p]=g.useState(null),w=de(t,re=>p(re)),[C,T]=g.useState(null),P=UN(C),E=(P==null?void 0:P.width)??0,k=(P==null?void 0:P.height)??0,b=r+(i!=="center"?"-"+i:""),_=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},M=Array.isArray(u)?u:[u],N=M.length>0,I={padding:_,boundary:M.filter(KN),altBoundary:N},{refs:B,floatingStyles:j,placement:$,isPositioned:z,middlewareData:R}=RN({strategy:"fixed",placement:b,whileElementsMounted:(...re)=>TN(...re,{animationFrame:h==="always"}),elements:{reference:S.anchor},middleware:[DN({mainAxis:o+k,alignmentAxis:s}),l&&LN({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?ON():void 0,...I}),l&&IN({...I}),jN({...I,apply:({elements:re,rects:Q,availableWidth:Se,availableHeight:Ce})=>{const{width:Je,height:Cs}=Q.reference,Ts=re.floating.style;Ts.setProperty("--radix-popper-available-width",`${Se}px`),Ts.setProperty("--radix-popper-available-height",`${Ce}px`),Ts.setProperty("--radix-popper-anchor-width",`${Je}px`),Ts.setProperty("--radix-popper-anchor-height",`${Cs}px`)}}),C&&VN({element:C,padding:a}),YN({arrowWidth:E,arrowHeight:k}),d&&FN({strategy:"referenceHidden",...I})]}),[L,W]=lS($),K=Bt(v);We(()=>{z&&(K==null||K())},[z,K]);const ie=(H=R.arrow)==null?void 0:H.x,ct=(oe=R.arrow)==null?void 0:oe.y,Ee=((O=R.arrow)==null?void 0:O.centerOffset)!==0,[ft,Me]=g.useState();return We(()=>{m&&Me(window.getComputedStyle(m).zIndex)},[m]),x.jsx("div",{ref:B.setFloating,"data-radix-popper-content-wrapper":"",style:{...j,transform:z?j.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ft,"--radix-popper-transform-origin":[(V=R.transformOrigin)==null?void 0:V.x,(U=R.transformOrigin)==null?void 0:U.y].join(" "),...((A=R.hide)==null?void 0:A.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:x.jsx(WN,{scope:n,placedSide:L,onArrowChange:T,arrowX:ie,arrowY:ct,shouldHideArrow:Ee,children:x.jsx(J.div,{"data-side":L,"data-align":W,...y,ref:w,style:{...y.style,animation:z?void 0:"none"}})})})});iS.displayName=Uh;var sS="PopperArrow",GN={top:"bottom",right:"left",bottom:"top",left:"right"},aS=g.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=HN(sS,r),s=GN[i.placedSide];return x.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:x.jsx(zN,{...o,ref:n,style:{...o.style,display:"block"}})})});aS.displayName=sS;function KN(e){return e!==null}var YN=e=>({name:"transformOrigin",options:e,fn(t){var S,m,p;const{placement:n,rects:r,middlewareData:o}=t,s=((S=o.arrow)==null?void 0:S.centerOffset)!==0,a=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[u,c]=lS(n),f={start:"0%",center:"50%",end:"100%"}[c],d=(((m=o.arrow)==null?void 0:m.x)??0)+a/2,h=(((p=o.arrow)==null?void 0:p.y)??0)+l/2;let v="",y="";return u==="bottom"?(v=s?f:`${d}px`,y=`${-l}px`):u==="top"?(v=s?f:`${d}px`,y=`${r.floating.height+l}px`):u==="right"?(v=`${-l}px`,y=s?f:`${h}px`):u==="left"&&(v=`${r.floating.width+l}px`,y=s?f:`${h}px`),{data:{x:v,y}}}});function lS(e){const[t,n="center"]=e.split("-");return[t,n]}var uS=nS,cS=oS,fS=iS,dS=aS;function XN(e){const t=g.useRef({value:e,previous:e});return g.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var QN="VisuallyHidden",Bh=g.forwardRef((e,t)=>x.jsx(J.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Bh.displayName=QN;var ZN=Bh,qN=[" ","Enter","ArrowUp","ArrowDown"],JN=[" ","Enter"],ys="Select",[ql,Jl,eD]=iw(ys),[Go,Fj]=Nr(ys,[eD,Zl]),eu=Zl(),[tD,er]=Go(ys),[nD,rD]=Go(ys),hS=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:s,defaultValue:a,onValueChange:l,dir:u,name:c,autoComplete:f,disabled:d,required:h}=e,v=eu(t),[y,S]=g.useState(null),[m,p]=g.useState(null),[w,C]=g.useState(!1),T=Qd(u),[P=!1,E]=_o({prop:r,defaultProp:o,onChange:i}),[k,b]=_o({prop:s,defaultProp:a,onChange:l}),_=g.useRef(null),M=y?!!y.closest("form"):!0,[N,I]=g.useState(new Set),B=Array.from(N).map(j=>j.props.value).join(";");return x.jsx(uS,{...v,children:x.jsxs(tD,{required:h,scope:t,trigger:y,onTriggerChange:S,valueNode:m,onValueNodeChange:p,valueNodeHasChildren:w,onValueNodeHasChildrenChange:C,contentId:on(),value:k,onValueChange:b,open:P,onOpenChange:E,dir:T,triggerPointerDownPosRef:_,disabled:d,children:[x.jsx(ql.Provider,{scope:t,children:x.jsx(nD,{scope:e.__scopeSelect,onNativeOptionAdd:g.useCallback(j=>{I($=>new Set($).add(j))},[]),onNativeOptionRemove:g.useCallback(j=>{I($=>{const z=new Set($);return z.delete(j),z})},[]),children:n})}),M?x.jsxs(VS,{"aria-hidden":!0,required:h,tabIndex:-1,name:c,autoComplete:f,value:k,onChange:j=>b(j.target.value),disabled:d,children:[k===void 0?x.jsx("option",{value:""}):null,Array.from(N)]},B):null]})})};hS.displayName=ys;var pS="SelectTrigger",mS=g.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=eu(n),s=er(pS,n),a=s.disabled||r,l=de(t,s.onTriggerChange),u=Jl(n),[c,f,d]=$S(v=>{const y=u().filter(p=>!p.disabled),S=y.find(p=>p.value===s.value),m=zS(y,v,S);m!==void 0&&s.onValueChange(m.value)}),h=()=>{a||(s.onOpenChange(!0),d())};return x.jsx(cS,{asChild:!0,...i,children:x.jsx(J.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":FS(s.value)?"":void 0,...o,ref:l,onClick:X(o.onClick,v=>{v.currentTarget.focus()}),onPointerDown:X(o.onPointerDown,v=>{const y=v.target;y.hasPointerCapture(v.pointerId)&&y.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&(h(),s.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)},v.preventDefault())}),onKeyDown:X(o.onKeyDown,v=>{const y=c.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&f(v.key),!(y&&v.key===" ")&&qN.includes(v.key)&&(h(),v.preventDefault())})})})});mS.displayName=pS;var gS="SelectValue",vS=g.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:s="",...a}=e,l=er(gS,n),{onValueNodeHasChildrenChange:u}=l,c=i!==void 0,f=de(t,l.onValueNodeChange);return We(()=>{u(c)},[u,c]),x.jsx(J.span,{...a,ref:f,style:{pointerEvents:"none"},children:FS(l.value)?x.jsx(x.Fragment,{children:s}):i})});vS.displayName=gS;var oD="SelectIcon",yS=g.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return x.jsx(J.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});yS.displayName=oD;var iD="SelectPortal",wS=e=>x.jsx(th,{asChild:!0,...e});wS.displayName=iD;var kr="SelectContent",xS=g.forwardRef((e,t)=>{const n=er(kr,e.__scopeSelect),[r,o]=g.useState();if(We(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?Rr.createPortal(x.jsx(SS,{scope:e.__scopeSelect,children:x.jsx(ql.Slot,{scope:e.__scopeSelect,children:x.jsx("div",{children:e.children})})}),i):null}return x.jsx(CS,{...e,ref:t})});xS.displayName=kr;var Qt=10,[SS,tr]=Go(kr),sD="SelectContentImpl",CS=g.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:s,side:a,sideOffset:l,align:u,alignOffset:c,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:v,hideWhenDetached:y,avoidCollisions:S,...m}=e,p=er(kr,n),[w,C]=g.useState(null),[T,P]=g.useState(null),E=de(t,H=>C(H)),[k,b]=g.useState(null),[_,M]=g.useState(null),N=Jl(n),[I,B]=g.useState(!1),j=g.useRef(!1);g.useEffect(()=>{if(w)return Ww(w)},[w]),Ow();const $=g.useCallback(H=>{const[oe,...O]=N().map(A=>A.ref.current),[V]=O.slice(-1),U=document.activeElement;for(const A of H)if(A===U||(A==null||A.scrollIntoView({block:"nearest"}),A===oe&&T&&(T.scrollTop=0),A===V&&T&&(T.scrollTop=T.scrollHeight),A==null||A.focus(),document.activeElement!==U))return},[N,T]),z=g.useCallback(()=>$([k,w]),[$,k,w]);g.useEffect(()=>{I&&z()},[I,z]);const{onOpenChange:R,triggerPointerDownPosRef:L}=p;g.useEffect(()=>{if(w){let H={x:0,y:0};const oe=V=>{var U,A;H={x:Math.abs(Math.round(V.pageX)-(((U=L.current)==null?void 0:U.x)??0)),y:Math.abs(Math.round(V.pageY)-(((A=L.current)==null?void 0:A.y)??0))}},O=V=>{H.x<=10&&H.y<=10?V.preventDefault():w.contains(V.target)||R(!1),document.removeEventListener("pointermove",oe),L.current=null};return L.current!==null&&(document.addEventListener("pointermove",oe),document.addEventListener("pointerup",O,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",oe),document.removeEventListener("pointerup",O,{capture:!0})}}},[w,R,L]),g.useEffect(()=>{const H=()=>R(!1);return window.addEventListener("blur",H),window.addEventListener("resize",H),()=>{window.removeEventListener("blur",H),window.removeEventListener("resize",H)}},[R]);const[W,K]=$S(H=>{const oe=N().filter(U=>!U.disabled),O=oe.find(U=>U.ref.current===document.activeElement),V=zS(oe,H,O);V&&setTimeout(()=>V.ref.current.focus())}),ie=g.useCallback((H,oe,O)=>{const V=!j.current&&!O;(p.value!==void 0&&p.value===oe||V)&&(b(H),V&&(j.current=!0))},[p.value]),ct=g.useCallback(()=>w==null?void 0:w.focus(),[w]),Ee=g.useCallback((H,oe,O)=>{const V=!j.current&&!O;(p.value!==void 0&&p.value===oe||V)&&M(H)},[p.value]),ft=r==="popper"?If:TS,Me=ft===If?{side:a,sideOffset:l,align:u,alignOffset:c,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:v,hideWhenDetached:y,avoidCollisions:S}:{};return x.jsx(SS,{scope:n,content:w,viewport:T,onViewportChange:P,itemRefCallback:ie,selectedItem:k,onItemLeave:ct,itemTextRefCallback:Ee,focusSelectedItem:z,selectedItemText:_,position:r,isPositioned:I,searchRef:W,children:x.jsx(nh,{as:Cr,allowPinchZoom:!0,children:x.jsx(eh,{asChild:!0,trapped:p.open,onMountAutoFocus:H=>{H.preventDefault()},onUnmountAutoFocus:X(o,H=>{var oe;(oe=p.trigger)==null||oe.focus({preventScroll:!0}),H.preventDefault()}),children:x.jsx(Vl,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:H=>H.preventDefault(),onDismiss:()=>p.onOpenChange(!1),children:x.jsx(ft,{role:"listbox",id:p.contentId,"data-state":p.open?"open":"closed",dir:p.dir,onContextMenu:H=>H.preventDefault(),...m,...Me,onPlaced:()=>B(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...m.style},onKeyDown:X(m.onKeyDown,H=>{const oe=H.ctrlKey||H.altKey||H.metaKey;if(H.key==="Tab"&&H.preventDefault(),!oe&&H.key.length===1&&K(H.key),["ArrowUp","ArrowDown","Home","End"].includes(H.key)){let V=N().filter(U=>!U.disabled).map(U=>U.ref.current);if(["ArrowUp","End"].includes(H.key)&&(V=V.slice().reverse()),["ArrowUp","ArrowDown"].includes(H.key)){const U=H.target,A=V.indexOf(U);V=V.slice(A+1)}setTimeout(()=>$(V)),H.preventDefault()}})})})})})})});CS.displayName=sD;var aD="SelectItemAlignedPosition",TS=g.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=er(kr,n),s=tr(kr,n),[a,l]=g.useState(null),[u,c]=g.useState(null),f=de(t,E=>c(E)),d=Jl(n),h=g.useRef(!1),v=g.useRef(!0),{viewport:y,selectedItem:S,selectedItemText:m,focusSelectedItem:p}=s,w=g.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&u&&y&&S&&m){const E=i.trigger.getBoundingClientRect(),k=u.getBoundingClientRect(),b=i.valueNode.getBoundingClientRect(),_=m.getBoundingClientRect();if(i.dir!=="rtl"){const U=_.left-k.left,A=b.left-U,re=E.left-A,Q=E.width+re,Se=Math.max(Q,k.width),Ce=window.innerWidth-Qt,Je=Xg(A,[Qt,Ce-Se]);a.style.minWidth=Q+"px",a.style.left=Je+"px"}else{const U=k.right-_.right,A=window.innerWidth-b.right-U,re=window.innerWidth-E.right-A,Q=E.width+re,Se=Math.max(Q,k.width),Ce=window.innerWidth-Qt,Je=Xg(A,[Qt,Ce-Se]);a.style.minWidth=Q+"px",a.style.right=Je+"px"}const M=d(),N=window.innerHeight-Qt*2,I=y.scrollHeight,B=window.getComputedStyle(u),j=parseInt(B.borderTopWidth,10),$=parseInt(B.paddingTop,10),z=parseInt(B.borderBottomWidth,10),R=parseInt(B.paddingBottom,10),L=j+$+I+R+z,W=Math.min(S.offsetHeight*5,L),K=window.getComputedStyle(y),ie=parseInt(K.paddingTop,10),ct=parseInt(K.paddingBottom,10),Ee=E.top+E.height/2-Qt,ft=N-Ee,Me=S.offsetHeight/2,H=S.offsetTop+Me,oe=j+$+H,O=L-oe;if(oe<=Ee){const U=S===M[M.length-1].ref.current;a.style.bottom="0px";const A=u.clientHeight-y.offsetTop-y.offsetHeight,re=Math.max(ft,Me+(U?ct:0)+A+z),Q=oe+re;a.style.height=Q+"px"}else{const U=S===M[0].ref.current;a.style.top="0px";const re=Math.max(Ee,j+y.offsetTop+(U?ie:0)+Me)+O;a.style.height=re+"px",y.scrollTop=oe-Ee+y.offsetTop}a.style.margin=`${Qt}px 0`,a.style.minHeight=W+"px",a.style.maxHeight=N+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[d,i.trigger,i.valueNode,a,u,y,S,m,i.dir,r]);We(()=>w(),[w]);const[C,T]=g.useState();We(()=>{u&&T(window.getComputedStyle(u).zIndex)},[u]);const P=g.useCallback(E=>{E&&v.current===!0&&(w(),p==null||p(),v.current=!1)},[w,p]);return x.jsx(uD,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:P,children:x.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:x.jsx(J.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});TS.displayName=aD;var lD="SelectPopperPosition",If=g.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Qt,...i}=e,s=eu(n);return x.jsx(fS,{...s,...i,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});If.displayName=lD;var[uD,Wh]=Go(kr,{}),jf="SelectViewport",PS=g.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,i=tr(jf,n),s=Wh(jf,n),a=de(t,i.onViewportChange),l=g.useRef(0);return x.jsxs(x.Fragment,{children:[x.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),x.jsx(ql.Slot,{scope:n,children:x.jsx(J.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"auto",...o.style},onScroll:X(o.onScroll,u=>{const c=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:d}=s;if(d!=null&&d.current&&f){const h=Math.abs(l.current-c.scrollTop);if(h>0){const v=window.innerHeight-Qt*2,y=parseFloat(f.style.minHeight),S=parseFloat(f.style.height),m=Math.max(y,S);if(m0?C:0,f.style.justifyContent="flex-end")}}}l.current=c.scrollTop})})})]})});PS.displayName=jf;var kS="SelectGroup",[cD,fD]=Go(kS),ES=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=on();return x.jsx(cD,{scope:n,id:o,children:x.jsx(J.div,{role:"group","aria-labelledby":o,...r,ref:t})})});ES.displayName=kS;var _S="SelectLabel",bS=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=fD(_S,n);return x.jsx(J.div,{id:o.id,...r,ref:t})});bS.displayName=_S;var al="SelectItem",[dD,AS]=Go(al),MS=g.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...s}=e,a=er(al,n),l=tr(al,n),u=a.value===r,[c,f]=g.useState(i??""),[d,h]=g.useState(!1),v=de(t,m=>{var p;return(p=l.itemRefCallback)==null?void 0:p.call(l,m,r,o)}),y=on(),S=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return x.jsx(dD,{scope:n,value:r,disabled:o,textId:y,isSelected:u,onItemTextChange:g.useCallback(m=>{f(p=>p||((m==null?void 0:m.textContent)??"").trim())},[]),children:x.jsx(ql.ItemSlot,{scope:n,value:r,disabled:o,textValue:c,children:x.jsx(J.div,{role:"option","aria-labelledby":y,"data-highlighted":d?"":void 0,"aria-selected":u&&d,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:v,onFocus:X(s.onFocus,()=>h(!0)),onBlur:X(s.onBlur,()=>h(!1)),onPointerUp:X(s.onPointerUp,S),onPointerMove:X(s.onPointerMove,m=>{var p;o?(p=l.onItemLeave)==null||p.call(l):m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:X(s.onPointerLeave,m=>{var p;m.currentTarget===document.activeElement&&((p=l.onItemLeave)==null||p.call(l))}),onKeyDown:X(s.onKeyDown,m=>{var w;((w=l.searchRef)==null?void 0:w.current)!==""&&m.key===" "||(JN.includes(m.key)&&S(),m.key===" "&&m.preventDefault())})})})})});MS.displayName=al;var pi="SelectItemText",RS=g.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,s=er(pi,n),a=tr(pi,n),l=AS(pi,n),u=rD(pi,n),[c,f]=g.useState(null),d=de(t,m=>f(m),l.onItemTextChange,m=>{var p;return(p=a.itemTextRefCallback)==null?void 0:p.call(a,m,l.value,l.disabled)}),h=c==null?void 0:c.textContent,v=g.useMemo(()=>x.jsx("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:y,onNativeOptionRemove:S}=u;return We(()=>(y(v),()=>S(v)),[y,S,v]),x.jsxs(x.Fragment,{children:[x.jsx(J.span,{id:l.textId,...i,ref:d}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Rr.createPortal(i.children,s.valueNode):null]})});RS.displayName=pi;var NS="SelectItemIndicator",DS=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return AS(NS,n).isSelected?x.jsx(J.span,{"aria-hidden":!0,...r,ref:t}):null});DS.displayName=NS;var Ff="SelectScrollUpButton",LS=g.forwardRef((e,t)=>{const n=tr(Ff,e.__scopeSelect),r=Wh(Ff,e.__scopeSelect),[o,i]=g.useState(!1),s=de(t,r.onScrollButtonChange);return We(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=l.scrollTop>0;i(u)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?x.jsx(IS,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});LS.displayName=Ff;var Vf="SelectScrollDownButton",OS=g.forwardRef((e,t)=>{const n=tr(Vf,e.__scopeSelect),r=Wh(Vf,e.__scopeSelect),[o,i]=g.useState(!1),s=de(t,r.onScrollButtonChange);return We(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=l.scrollHeight-l.clientHeight,c=Math.ceil(l.scrollTop)l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?x.jsx(IS,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});OS.displayName=Vf;var IS=g.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=tr("SelectScrollButton",n),s=g.useRef(null),a=Jl(n),l=g.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return g.useEffect(()=>()=>l(),[l]),We(()=>{var c;const u=a().find(f=>f.ref.current===document.activeElement);(c=u==null?void 0:u.ref.current)==null||c.scrollIntoView({block:"nearest"})},[a]),x.jsx(J.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:X(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:X(o.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:X(o.onPointerLeave,()=>{l()})})}),hD="SelectSeparator",jS=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return x.jsx(J.div,{"aria-hidden":!0,...r,ref:t})});jS.displayName=hD;var $f="SelectArrow",pD=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=eu(n),i=er($f,n),s=tr($f,n);return i.open&&s.position==="popper"?x.jsx(dS,{...o,...r,ref:t}):null});pD.displayName=$f;function FS(e){return e===""||e===void 0}var VS=g.forwardRef((e,t)=>{const{value:n,...r}=e,o=g.useRef(null),i=de(t,o),s=XN(n);return g.useEffect(()=>{const a=o.current,l=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==n&&c){const f=new Event("change",{bubbles:!0});c.call(a,n),a.dispatchEvent(f)}},[s,n]),x.jsx(Bh,{asChild:!0,children:x.jsx("select",{...r,ref:i,defaultValue:n})})});VS.displayName="BubbleSelect";function $S(e){const t=Bt(e),n=g.useRef(""),r=g.useRef(0),o=g.useCallback(s=>{const a=n.current+s;t(a),function l(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),i=g.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return g.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function zS(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let s=mD(e,Math.max(i,0));o.length===1&&(s=s.filter(u=>u!==n));const l=s.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function mD(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var gD=hS,US=mS,vD=vS,yD=yS,wD=wS,BS=xS,xD=PS,SD=ES,WS=bS,HS=MS,CD=RS,TD=DS,GS=LS,KS=OS,YS=jS;const PD=gD,kD=SD,ED=vD,XS=g.forwardRef(({className:e,children:t,...n},r)=>x.jsxs(US,{ref:r,className:ae("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,x.jsx(yD,{asChild:!0,children:x.jsx(Z_,{className:"h-4 w-4 opacity-50"})})]}));XS.displayName=US.displayName;const QS=g.forwardRef(({className:e,...t},n)=>x.jsx(GS,{ref:n,className:ae("flex cursor-default items-center justify-center py-1",e),...t,children:x.jsx(rb,{})}));QS.displayName=GS.displayName;const ZS=g.forwardRef(({className:e,...t},n)=>x.jsx(KS,{ref:n,className:ae("flex cursor-default items-center justify-center py-1",e),...t,children:x.jsx(tb,{})}));ZS.displayName=KS.displayName;const qS=g.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>x.jsx(wD,{children:x.jsxs(BS,{ref:o,className:ae("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[x.jsx(QS,{}),x.jsx(xD,{className:ae("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),x.jsx(ZS,{})]})}));qS.displayName=BS.displayName;const JS=g.forwardRef(({className:e,...t},n)=>x.jsx(WS,{ref:n,className:ae("px-2 py-1.5 text-sm font-semibold",e),...t}));JS.displayName=WS.displayName;const eC=g.forwardRef(({className:e,children:t,...n},r)=>x.jsxs(HS,{ref:r,className:ae("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[x.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:x.jsx(TD,{children:x.jsx(J_,{className:"h-4 w-4"})})}),x.jsx(CD,{children:t})]}));eC.displayName=HS.displayName;const _D=g.forwardRef(({className:e,...t},n)=>x.jsx(YS,{ref:n,className:ae("-mx-1 my-1 h-px bg-muted",e),...t}));_D.displayName=YS.displayName;const io=g.forwardRef(({className:e,...t},n)=>x.jsx("div",{ref:n,className:ae("rounded-xl border bg-card text-card-foreground shadow",e),...t}));io.displayName="Card";const Hh=g.forwardRef(({className:e,...t},n)=>x.jsx("div",{ref:n,className:ae("flex flex-col space-y-1.5 p-6",e),...t}));Hh.displayName="CardHeader";const Gh=g.forwardRef(({className:e,...t},n)=>x.jsx("h3",{ref:n,className:ae("font-semibold leading-none tracking-tight",e),...t}));Gh.displayName="CardTitle";const bD=g.forwardRef(({className:e,...t},n)=>x.jsx("p",{ref:n,className:ae("text-sm text-muted-foreground",e),...t}));bD.displayName="CardDescription";const so=g.forwardRef(({className:e,...t},n)=>x.jsx("div",{ref:n,className:ae("p-6 pt-0",e),...t}));so.displayName="CardContent";const AD=g.forwardRef(({className:e,...t},n)=>x.jsx("div",{ref:n,className:ae("flex items-center p-6 pt-0",e),...t}));AD.displayName="CardFooter";var[tu,Vj]=Nr("Tooltip",[Zl]),nu=Zl(),tC="TooltipProvider",MD=700,zf="tooltip.open",[RD,Kh]=tu(tC),nC=e=>{const{__scopeTooltip:t,delayDuration:n=MD,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,[s,a]=g.useState(!0),l=g.useRef(!1),u=g.useRef(0);return g.useEffect(()=>{const c=u.current;return()=>window.clearTimeout(c)},[]),x.jsx(RD,{scope:t,isOpenDelayed:s,delayDuration:n,onOpen:g.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:g.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:g.useCallback(c=>{l.current=c},[]),disableHoverableContent:o,children:i})};nC.displayName=tC;var ru="Tooltip",[ND,ou]=tu(ru),rC=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:s,delayDuration:a}=e,l=Kh(ru,e.__scopeTooltip),u=nu(t),[c,f]=g.useState(null),d=on(),h=g.useRef(0),v=s??l.disableHoverableContent,y=a??l.delayDuration,S=g.useRef(!1),[m=!1,p]=_o({prop:r,defaultProp:o,onChange:E=>{E?(l.onOpen(),document.dispatchEvent(new CustomEvent(zf))):l.onClose(),i==null||i(E)}}),w=g.useMemo(()=>m?S.current?"delayed-open":"instant-open":"closed",[m]),C=g.useCallback(()=>{window.clearTimeout(h.current),S.current=!1,p(!0)},[p]),T=g.useCallback(()=>{window.clearTimeout(h.current),p(!1)},[p]),P=g.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{S.current=!0,p(!0)},y)},[y,p]);return g.useEffect(()=>()=>window.clearTimeout(h.current),[]),x.jsx(uS,{...u,children:x.jsx(ND,{scope:t,contentId:d,open:m,stateAttribute:w,trigger:c,onTriggerChange:f,onTriggerEnter:g.useCallback(()=>{l.isOpenDelayed?P():C()},[l.isOpenDelayed,P,C]),onTriggerLeave:g.useCallback(()=>{v?T():window.clearTimeout(h.current)},[T,v]),onOpen:C,onClose:T,disableHoverableContent:v,children:n})})};rC.displayName=ru;var Uf="TooltipTrigger",oC=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=ou(Uf,n),i=Kh(Uf,n),s=nu(n),a=g.useRef(null),l=de(t,a,o.onTriggerChange),u=g.useRef(!1),c=g.useRef(!1),f=g.useCallback(()=>u.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),x.jsx(cS,{asChild:!0,...s,children:x.jsx(J.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:X(e.onPointerMove,d=>{d.pointerType!=="touch"&&!c.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),c.current=!0)}),onPointerLeave:X(e.onPointerLeave,()=>{o.onTriggerLeave(),c.current=!1}),onPointerDown:X(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:X(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:X(e.onBlur,o.onClose),onClick:X(e.onClick,o.onClose)})})});oC.displayName=Uf;var DD="TooltipPortal",[$j,LD]=tu(DD,{forceMount:void 0}),No="TooltipContent",iC=g.forwardRef((e,t)=>{const n=LD(No,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,s=ou(No,e.__scopeTooltip);return x.jsx(zo,{present:r||s.open,children:s.disableHoverableContent?x.jsx(sC,{side:o,...i,ref:t}):x.jsx(OD,{side:o,...i,ref:t})})}),OD=g.forwardRef((e,t)=>{const n=ou(No,e.__scopeTooltip),r=Kh(No,e.__scopeTooltip),o=g.useRef(null),i=de(t,o),[s,a]=g.useState(null),{trigger:l,onClose:u}=n,c=o.current,{onPointerInTransitChange:f}=r,d=g.useCallback(()=>{a(null),f(!1)},[f]),h=g.useCallback((v,y)=>{const S=v.currentTarget,m={x:v.clientX,y:v.clientY},p=VD(m,S.getBoundingClientRect()),w=$D(m,p),C=zD(y.getBoundingClientRect()),T=BD([...w,...C]);a(T),f(!0)},[f]);return g.useEffect(()=>()=>d(),[d]),g.useEffect(()=>{if(l&&c){const v=S=>h(S,c),y=S=>h(S,l);return l.addEventListener("pointerleave",v),c.addEventListener("pointerleave",y),()=>{l.removeEventListener("pointerleave",v),c.removeEventListener("pointerleave",y)}}},[l,c,h,d]),g.useEffect(()=>{if(s){const v=y=>{const S=y.target,m={x:y.clientX,y:y.clientY},p=(l==null?void 0:l.contains(S))||(c==null?void 0:c.contains(S)),w=!UD(m,s);p?d():w&&(d(),u())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[l,c,s,u,d]),x.jsx(sC,{...e,ref:i})}),[ID,jD]=tu(ru,{isInside:!1}),sC=g.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...a}=e,l=ou(No,n),u=nu(n),{onClose:c}=l;return g.useEffect(()=>(document.addEventListener(zf,c),()=>document.removeEventListener(zf,c)),[c]),g.useEffect(()=>{if(l.trigger){const f=d=>{const h=d.target;h!=null&&h.contains(l.trigger)&&c()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,c]),x.jsx(Vl,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:c,children:x.jsxs(fS,{"data-state":l.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[x.jsx(ow,{children:r}),x.jsx(ID,{scope:n,isInside:!0,children:x.jsx(ZN,{id:l.contentId,role:"tooltip",children:o||r})})]})})});iC.displayName=No;var aC="TooltipArrow",FD=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=nu(n);return jD(aC,n).isInside?null:x.jsx(dS,{...o,...r,ref:t})});FD.displayName=aC;function VD(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function $D(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function zD(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function UD(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;ir!=c>r&&n<(u-a)*(r-l)/(c-l)+a&&(o=!o)}return o}function BD(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),WD(t)}function WD(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var HD=nC,GD=rC,KD=oC,lC=iC;const oc=HD,ic=GD,sc=KD,xa=g.forwardRef(({className:e,sideOffset:t=4,...n},r)=>x.jsx(lC,{ref:r,sideOffset:t,className:ae("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));xa.displayName=lC.displayName;function Sa(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function YD(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Yh(e){let t,n,r;e.length!==2?(t=Sa,n=(a,l)=>Sa(e(a),l),r=(a,l)=>e(a)-l):(t=e===Sa||e===YD?e:XD,n=e,r=e);function o(a,l,u=0,c=a.length){if(u>>1;n(a[f],l)<0?u=f+1:c=f}while(u>>1;n(a[f],l)<=0?u=f+1:c=f}while(uu&&r(a[f-1],l)>-r(a[f],l)?f-1:f}return{left:o,center:s,right:i}}function XD(){return 0}function QD(e){return e===null?NaN:+e}const ZD=Yh(Sa),qD=ZD.right;Yh(QD).center;function iv(e,t){let n,r;if(t===void 0)for(const o of e)o!=null&&(n===void 0?o>=o&&(n=r=o):(n>o&&(n=o),r=i&&(n=r=i):(n>i&&(n=i),r=JD?10:i>=eL?5:i>=tL?2:1;let a,l,u;return o<0?(u=Math.pow(10,-o)/s,a=Math.round(e*u),l=Math.round(t*u),a/ut&&--l,u=-u):(u=Math.pow(10,o)*s,a=Math.round(e/u),l=Math.round(t/u),a*ut&&--l),l0))return[];if(e===t)return[e];const r=t=o))return[];const a=i-o+1,l=new Array(a);if(r)if(s<0)for(let u=0;u+e(t)}function aL(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function lL(){return!this.__axis}function uC(e,t){var n=[],r=null,o=null,i=6,s=6,a=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,u=e===ac||e===mi?-1:1,c=e===mi||e===lc?"x":"y",f=e===ac||e===Hf?oL:iL;function d(h){var v=r??(t.ticks?t.ticks.apply(t,n):t.domain()),y=o??(t.tickFormat?t.tickFormat.apply(t,n):rL),S=Math.max(i,0)+a,m=t.range(),p=+m[0]+l,w=+m[m.length-1]+l,C=(t.bandwidth?aL:sL)(t.copy(),l),T=h.selection?h.selection():h,P=T.selectAll(".domain").data([null]),E=T.selectAll(".tick").data(v,t).order(),k=E.exit(),b=E.enter().append("g").attr("class","tick"),_=E.select("line"),M=E.select("text");P=P.merge(P.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),E=E.merge(b),_=_.merge(b.append("line").attr("stroke","currentColor").attr(c+"2",u*i)),M=M.merge(b.append("text").attr("fill","currentColor").attr(c,u*S).attr("dy",e===ac?"0em":e===Hf?"0.71em":"0.32em")),h!==T&&(P=P.transition(h),E=E.transition(h),_=_.transition(h),M=M.transition(h),k=k.transition(h).attr("opacity",sv).attr("transform",function(N){return isFinite(N=C(N))?f(N+l):this.getAttribute("transform")}),b.attr("opacity",sv).attr("transform",function(N){var I=this.parentNode.__axis;return f((I&&isFinite(I=I(N))?I:C(N))+l)})),k.remove(),P.attr("d",e===mi||e===lc?s?"M"+u*s+","+p+"H"+l+"V"+w+"H"+u*s:"M"+l+","+p+"V"+w:s?"M"+p+","+u*s+"V"+l+"H"+w+"V"+u*s:"M"+p+","+l+"H"+w),E.attr("opacity",1).attr("transform",function(N){return f(C(N)+l)}),_.attr(c+"2",u*i),M.attr(c,u*S).text(y),T.filter(lL).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===lc?"start":e===mi?"end":"middle"),T.each(function(){this.__axis=C})}return d.scale=function(h){return arguments.length?(t=h,d):t},d.ticks=function(){return n=Array.from(arguments),d},d.tickArguments=function(h){return arguments.length?(n=h==null?[]:Array.from(h),d):n.slice()},d.tickValues=function(h){return arguments.length?(r=h==null?null:Array.from(h),d):r&&r.slice()},d.tickFormat=function(h){return arguments.length?(o=h,d):o},d.tickSize=function(h){return arguments.length?(i=s=+h,d):i},d.tickSizeInner=function(h){return arguments.length?(i=+h,d):i},d.tickSizeOuter=function(h){return arguments.length?(s=+h,d):s},d.tickPadding=function(h){return arguments.length?(a=+h,d):a},d.offset=function(h){return arguments.length?(l=+h,d):l},d}function av(e){return uC(Hf,e)}function lv(e){return uC(mi,e)}var uL={value:()=>{}};function cC(){for(var e=0,t=arguments.length,n={},r;e=0&&(r=n.slice(o+1),n=n.slice(0,o)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Ca.prototype=cC.prototype={constructor:Ca,on:function(e,t){var n=this._,r=cL(e+"",n),o,i=-1,s=r.length;if(arguments.length<2){for(;++i0)for(var n=new Array(o),r=0,o,i;r=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),cv.hasOwnProperty(t)?{space:cv[t],local:e}:e}function dL(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Gf&&t.documentElement.namespaceURI===Gf?t.createElement(e):t.createElementNS(n,e)}}function hL(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function fC(e){var t=iu(e);return(t.local?hL:dL)(t)}function pL(){}function Xh(e){return e==null?pL:function(){return this.querySelector(e)}}function mL(e){typeof e!="function"&&(e=Xh(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o=w&&(w=p+1);!(T=S[w])&&++w=0;)(s=r[o])&&(i&&s.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(s,i),i=s);return this}function $L(e){e||(e=zL);function t(f,d){return f&&d?e(f.__data__,d.__data__):!f-!d}for(var n=this._groups,r=n.length,o=new Array(r),i=0;it?1:e>=t?0:NaN}function UL(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function BL(){return Array.from(this)}function WL(){for(var e=this._groups,t=0,n=e.length;t1?this.each((t==null?t3:typeof t=="function"?r3:n3)(e,t,n??"")):Do(this.node(),e)}function Do(e,t){return e.style.getPropertyValue(t)||gC(e).getComputedStyle(e,null).getPropertyValue(t)}function i3(e){return function(){delete this[e]}}function s3(e,t){return function(){this[e]=t}}function a3(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function l3(e,t){return arguments.length>1?this.each((t==null?i3:typeof t=="function"?a3:s3)(e,t)):this.node()[e]}function vC(e){return e.trim().split(/^|\s+/)}function Qh(e){return e.classList||new yC(e)}function yC(e){this._node=e,this._names=vC(e.getAttribute("class")||"")}yC.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function wC(e,t){for(var n=Qh(e),r=-1,o=t.length;++r=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function I3(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,o=t.length,i;n>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Zs(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Zs(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=H3.exec(e))?new Xe(t[1],t[2],t[3],1):(t=G3.exec(e))?new Xe(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=K3.exec(e))?Zs(t[1],t[2],t[3],t[4]):(t=Y3.exec(e))?Zs(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=X3.exec(e))?vv(t[1],t[2]/100,t[3]/100,1):(t=Q3.exec(e))?vv(t[1],t[2]/100,t[3]/100,t[4]):fv.hasOwnProperty(e)?pv(fv[e]):e==="transparent"?new Xe(NaN,NaN,NaN,0):null}function pv(e){return new Xe(e>>16&255,e>>8&255,e&255,1)}function Zs(e,t,n,r){return r<=0&&(e=t=n=NaN),new Xe(e,t,n,r)}function J3(e){return e instanceof xs||(e=Er(e)),e?(e=e.rgb(),new Xe(e.r,e.g,e.b,e.opacity)):new Xe}function Kf(e,t,n,r){return arguments.length===1?J3(e):new Xe(e,t,n,r??1)}function Xe(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Zh(Xe,Kf,TC(xs,{brighter(e){return e=e==null?cl:Math.pow(cl,e),new Xe(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?os:Math.pow(os,e),new Xe(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xe(gr(this.r),gr(this.g),gr(this.b),fl(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:mv,formatHex:mv,formatHex8:eO,formatRgb:gv,toString:gv}));function mv(){return`#${dr(this.r)}${dr(this.g)}${dr(this.b)}`}function eO(){return`#${dr(this.r)}${dr(this.g)}${dr(this.b)}${dr((isNaN(this.opacity)?1:this.opacity)*255)}`}function gv(){const e=fl(this.opacity);return`${e===1?"rgb(":"rgba("}${gr(this.r)}, ${gr(this.g)}, ${gr(this.b)}${e===1?")":`, ${e})`}`}function fl(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function gr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function dr(e){return e=gr(e),(e<16?"0":"")+e.toString(16)}function vv(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Et(e,t,n,r)}function PC(e){if(e instanceof Et)return new Et(e.h,e.s,e.l,e.opacity);if(e instanceof xs||(e=Er(e)),!e)return new Et;if(e instanceof Et)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),s=NaN,a=i-o,l=(i+o)/2;return a?(t===i?s=(n-r)/a+(n0&&l<1?0:s,new Et(s,a,l,e.opacity)}function tO(e,t,n,r){return arguments.length===1?PC(e):new Et(e,t,n,r??1)}function Et(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Zh(Et,tO,TC(xs,{brighter(e){return e=e==null?cl:Math.pow(cl,e),new Et(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?os:Math.pow(os,e),new Et(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new Xe(uc(e>=240?e-240:e+120,o,r),uc(e,o,r),uc(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new Et(yv(this.h),qs(this.s),qs(this.l),fl(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=fl(this.opacity);return`${e===1?"hsl(":"hsla("}${yv(this.h)}, ${qs(this.s)*100}%, ${qs(this.l)*100}%${e===1?")":`, ${e})`}`}}));function yv(e){return e=(e||0)%360,e<0?e+360:e}function qs(e){return Math.max(0,Math.min(1,e||0))}function uc(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const qh=e=>()=>e;function nO(e,t){return function(n){return e+n*t}}function rO(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function oO(e){return(e=+e)==1?kC:function(t,n){return n-t?rO(t,n,e):qh(isNaN(t)?n:t)}}function kC(e,t){var n=t-e;return n?nO(e,n):qh(isNaN(e)?t:e)}const dl=function e(t){var n=oO(t);function r(o,i){var s=n((o=Kf(o)).r,(i=Kf(i)).r),a=n(o.g,i.g),l=n(o.b,i.b),u=kC(o.opacity,i.opacity);return function(c){return o.r=s(c),o.g=a(c),o.b=l(c),o.opacity=u(c),o+""}}return r.gamma=e,r}(1);function iO(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),o;return function(i){for(o=0;on&&(i=t.slice(n,i),a[s]?a[s]+=i:a[++s]=i),(r=r[0])===(o=o[0])?a[s]?a[s]+=o:a[++s]=o:(a[++s]=null,l.push({i:s,x:kt(r,o)})),n=cc.lastIndex;return n180?c+=360:c-u>180&&(u+=360),d.push({i:f.push(o(f)+"rotate(",null,r)-2,x:kt(u,c)})):c&&f.push(o(f)+"rotate("+c+r)}function a(u,c,f,d){u!==c?d.push({i:f.push(o(f)+"skewX(",null,r)-2,x:kt(u,c)}):c&&f.push(o(f)+"skewX("+c+r)}function l(u,c,f,d,h,v){if(u!==f||c!==d){var y=h.push(o(h)+"scale(",null,",",null,")");v.push({i:y-4,x:kt(u,f)},{i:y-2,x:kt(c,d)})}else(f!==1||d!==1)&&h.push(o(h)+"scale("+f+","+d+")")}return function(u,c){var f=[],d=[];return u=e(u),c=e(c),i(u.translateX,u.translateY,c.translateX,c.translateY,f,d),s(u.rotate,c.rotate,f,d),a(u.skewX,c.skewX,f,d),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,f,d),u=c=null,function(h){for(var v=-1,y=d.length,S;++v=0&&e._call.call(void 0,t),e=e._next;--Lo}function xv(){_r=(pl=ss.now())+su,Lo=gi=0;try{yO()}finally{Lo=0,xO(),_r=0}}function wO(){var e=ss.now(),t=e-pl;t>AC&&(su-=t,pl=e)}function xO(){for(var e,t=hl,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:hl=n);vi=e,Qf(r)}function Qf(e){if(!Lo){gi&&(gi=clearTimeout(gi));var t=e-_r;t>24?(e<1/0&&(gi=setTimeout(xv,e-ss.now()-su)),oi&&(oi=clearInterval(oi))):(oi||(pl=ss.now(),oi=setInterval(wO,AC)),Lo=1,MC(xv))}}function Sv(e,t,n){var r=new ml;return t=t==null?0:+t,r.restart(o=>{r.stop(),e(o+t)},t,n),r}var SO=cC("start","end","cancel","interrupt"),CO=[],NC=0,Cv=1,Zf=2,Ta=3,Tv=4,qf=5,Pa=6;function au(e,t,n,r,o,i){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;TO(e,n,{name:t,index:r,group:o,on:SO,tween:CO,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:NC})}function tp(e,t){var n=Dt(e,t);if(n.state>NC)throw new Error("too late; already scheduled");return n}function Ht(e,t){var n=Dt(e,t);if(n.state>Ta)throw new Error("too late; already running");return n}function Dt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function TO(e,t,n){var r=e.__transition,o;r[t]=n,n.timer=RC(i,0,n.time);function i(u){n.state=Cv,n.timer.restart(s,n.delay,n.time),n.delay<=u&&s(u-n.delay)}function s(u){var c,f,d,h;if(n.state!==Cv)return l();for(c in r)if(h=r[c],h.name===n.name){if(h.state===Ta)return Sv(s);h.state===Tv?(h.state=Pa,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete r[c]):+cZf&&r.state=0&&(t=t.slice(0,n)),!t||t==="start"})}function eI(e,t,n){var r,o,i=JO(t)?tp:Ht;return function(){var s=i(this,e),a=s.on;a!==r&&(o=(r=a).copy()).on(t,n),s.on=o}}function tI(e,t){var n=this._id;return arguments.length<2?Dt(this.node(),n).on.on(e):this.each(eI(n,e,t))}function nI(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function rI(){return this.on("end.remove",nI(this._id))}function oI(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Xh(e));for(var r=this._groups,o=r.length,i=new Array(o),s=0;s=0))throw new Error(`invalid digits: ${e}`);if(t>15)return IC;const n=10**t;return function(r){this._+=r[0];for(let o=1,i=r.length;oar)if(!(Math.abs(f*l-u*c)>ar)||!i)this._append`L${this._x1=t},${this._y1=n}`;else{let h=r-s,v=o-a,y=l*l+u*u,S=h*h+v*v,m=Math.sqrt(y),p=Math.sqrt(d),w=i*Math.tan((Jf-Math.acos((y+d-S)/(2*m*p)))/2),C=w/p,T=w/m;Math.abs(C-1)>ar&&this._append`L${t+C*c},${n+C*f}`,this._append`A${i},${i},0,0,${+(f*h>c*v)},${this._x1=t+T*l},${this._y1=n+T*u}`}}arc(t,n,r,o,i,s){if(t=+t,n=+n,r=+r,s=!!s,r<0)throw new Error(`negative radius: ${r}`);let a=r*Math.cos(o),l=r*Math.sin(o),u=t+a,c=n+l,f=1^s,d=s?o-i:i-o;this._x1===null?this._append`M${u},${c}`:(Math.abs(this._x1-u)>ar||Math.abs(this._y1-c)>ar)&&this._append`L${u},${c}`,r&&(d<0&&(d=d%ed+ed),d>AI?this._append`A${r},${r},0,1,${f},${t-a},${n-l}A${r},${r},0,1,${f},${this._x1=u},${this._y1=c}`:d>ar&&this._append`A${r},${r},0,${+(d>=Jf)},${f},${this._x1=t+r*Math.cos(i)},${this._y1=n+r*Math.sin(i)}`)}rect(t,n,r,o){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+o}h${-r}Z`}toString(){return this._}}function NI(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function gl(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Oo(e){return e=gl(Math.abs(e)),e?e[1]:NaN}function DI(e,t){return function(n,r){for(var o=n.length,i=[],s=0,a=e[0],l=0;o>0&&a>0&&(l+a+1>r&&(a=Math.max(1,r-l)),i.push(n.substring(o-=a,o+a)),!((l+=a+1)>r));)a=e[s=(s+1)%e.length];return i.reverse().join(t)}}function LI(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var OI=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function vl(e){if(!(t=OI.exec(e)))throw new Error("invalid format: "+e);var t;return new rp({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}vl.prototype=rp.prototype;function rp(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}rp.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function II(e){e:for(var t=e.length,n=1,r=-1,o;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(o+1):e}var jC;function jI(e,t){var n=gl(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(jC=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,s=r.length;return i===s?r:i>s?r+new Array(i-s+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+gl(e,Math.max(0,t+i-1))[0]}function Pv(e,t){var n=gl(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}const kv={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:NI,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Pv(e*100,t),r:Pv,s:jI,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Ev(e){return e}var _v=Array.prototype.map,bv=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function FI(e){var t=e.grouping===void 0||e.thousands===void 0?Ev:DI(_v.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",o=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?Ev:LI(_v.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",a=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(f){f=vl(f);var d=f.fill,h=f.align,v=f.sign,y=f.symbol,S=f.zero,m=f.width,p=f.comma,w=f.precision,C=f.trim,T=f.type;T==="n"?(p=!0,T="g"):kv[T]||(w===void 0&&(w=12),C=!0,T="g"),(S||d==="0"&&h==="=")&&(S=!0,d="0",h="=");var P=y==="$"?n:y==="#"&&/[boxX]/.test(T)?"0"+T.toLowerCase():"",E=y==="$"?r:/[%p]/.test(T)?s:"",k=kv[T],b=/[defgprs%]/.test(T);w=w===void 0?6:/[gprs]/.test(T)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function _(M){var N=P,I=E,B,j,$;if(T==="c")I=k(M)+I,M="";else{M=+M;var z=M<0||1/M<0;if(M=isNaN(M)?l:k(Math.abs(M),w),C&&(M=II(M)),z&&+M==0&&v!=="+"&&(z=!1),N=(z?v==="("?v:a:v==="-"||v==="("?"":v)+N,I=(T==="s"?bv[8+jC/3]:"")+I+(z&&v==="("?")":""),b){for(B=-1,j=M.length;++B$||$>57){I=($===46?o+M.slice(B+1):M.slice(B))+I,M=M.slice(0,B);break}}}p&&!S&&(M=t(M,1/0));var R=N.length+M.length+I.length,L=R>1)+N+M+I+L.slice(R);break;default:M=L+N+M+I;break}return i(M)}return _.toString=function(){return f+""},_}function c(f,d){var h=u((f=vl(f),f.type="f",f)),v=Math.max(-8,Math.min(8,Math.floor(Oo(d)/3)))*3,y=Math.pow(10,-v),S=bv[8+v/3];return function(m){return h(y*m)+S}}return{format:u,formatPrefix:c}}var ea,FC,VC;VI({thousands:",",grouping:[3],currency:["$",""]});function VI(e){return ea=FI(e),FC=ea.format,VC=ea.formatPrefix,ea}function $I(e){return Math.max(0,-Oo(Math.abs(e)))}function zI(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Oo(t)/3)))*3-Oo(Math.abs(e)))}function UI(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Oo(t)-Oo(e))+1}function $C(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function BI(e){return function(){return e}}function WI(e){return+e}var Av=[0,1];function ao(e){return e}function td(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:BI(isNaN(t)?NaN:.5)}function HI(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function GI(e,t,n){var r=e[0],o=e[1],i=t[0],s=t[1];return o2?KI:GI,l=u=null,f}function f(d){return d==null||isNaN(d=+d)?i:(l||(l=a(e.map(r),t,n)))(r(s(d)))}return f.invert=function(d){return s(o((u||(u=a(t,e.map(r),kt)))(d)))},f.domain=function(d){return arguments.length?(e=Array.from(d,WI),c()):e.slice()},f.range=function(d){return arguments.length?(t=Array.from(d),c()):t.slice()},f.rangeRound=function(d){return t=Array.from(d),n=dO,c()},f.clamp=function(d){return arguments.length?(s=d?!0:ao,c()):s!==ao},f.interpolate=function(d){return arguments.length?(n=d,c()):n},f.unknown=function(d){return arguments.length?(i=d,f):i},function(d,h){return r=d,o=h,c()}}function UC(){return YI()(ao,ao)}function XI(e,t,n,r){var o=Wf(e,t,n),i;switch(r=vl(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=zI(o,s))&&(r.precision=i),VC(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=UI(o,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=$I(o))&&(r.precision=i-(r.type==="%")*2);break}}return FC(r)}function QI(e){var t=e.domain;return e.ticks=function(n){var r=t();return nL(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var o=t();return XI(o[0],o[o.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),o=0,i=r.length-1,s=r[o],a=r[i],l,u,c=10;for(a0;){if(u=Bf(s,a,n),u===l)return r[o]=s,r[i]=a,t(r);if(u>0)s=Math.floor(s/u)*u,a=Math.ceil(a/u)*u;else if(u<0)s=Math.ceil(s*u)/u,a=Math.floor(a*u)/u;else break;l=u}return e},e}function BC(){var e=UC();return e.copy=function(){return zC(e,BC())},$C.apply(e,arguments),QI(e)}function ZI(e,t){e=e.slice();var n=0,r=e.length-1,o=e[n],i=e[r],s;return i(e(i=new Date(+i)),i),o.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),o.round=i=>{const s=o(i),a=o.ceil(i);return i-s(t(i=new Date(+i),s==null?1:Math.floor(s)),i),o.range=(i,s,a)=>{const l=[];if(i=o.ceil(i),a=a==null?1:Math.floor(a),!(i0))return l;let u;do l.push(u=new Date(+i)),t(i,a),e(i);while(uke(s=>{if(s>=s)for(;e(s),!i(s);)s.setTime(s-1)},(s,a)=>{if(s>=s)if(a<0)for(;++a<=0;)for(;t(s,-1),!i(s););else for(;--a>=0;)for(;t(s,1),!i(s););}),n&&(o.count=(i,s)=>(fc.setTime(+i),dc.setTime(+s),e(fc),e(dc),Math.floor(n(fc,dc))),o.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?o.filter(r?s=>r(s)%i===0:s=>o.count(0,s)%i===0):o)),o}const yl=ke(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);yl.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?ke(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):yl);yl.range;const tn=1e3,vt=tn*60,nn=vt*60,wn=nn*24,op=wn*7,Mv=wn*30,hc=wn*365,lo=ke(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*tn)},(e,t)=>(t-e)/tn,e=>e.getUTCSeconds());lo.range;const ip=ke(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*tn)},(e,t)=>{e.setTime(+e+t*vt)},(e,t)=>(t-e)/vt,e=>e.getMinutes());ip.range;const qI=ke(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*vt)},(e,t)=>(t-e)/vt,e=>e.getUTCMinutes());qI.range;const sp=ke(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*tn-e.getMinutes()*vt)},(e,t)=>{e.setTime(+e+t*nn)},(e,t)=>(t-e)/nn,e=>e.getHours());sp.range;const JI=ke(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*nn)},(e,t)=>(t-e)/nn,e=>e.getUTCHours());JI.range;const Ss=ke(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*vt)/wn,e=>e.getDate()-1);Ss.range;const ap=ke(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/wn,e=>e.getUTCDate()-1);ap.range;const e5=ke(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/wn,e=>Math.floor(e/wn));e5.range;function Lr(e){return ke(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*vt)/op)}const lu=Lr(0),wl=Lr(1),t5=Lr(2),n5=Lr(3),Io=Lr(4),r5=Lr(5),o5=Lr(6);lu.range;wl.range;t5.range;n5.range;Io.range;r5.range;o5.range;function Or(e){return ke(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/op)}const WC=Or(0),xl=Or(1),i5=Or(2),s5=Or(3),jo=Or(4),a5=Or(5),l5=Or(6);WC.range;xl.range;i5.range;s5.range;jo.range;a5.range;l5.range;const lp=ke(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());lp.range;const u5=ke(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());u5.range;const xn=ke(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());xn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ke(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});xn.range;const br=ke(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());br.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ke(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});br.range;function c5(e,t,n,r,o,i){const s=[[lo,1,tn],[lo,5,5*tn],[lo,15,15*tn],[lo,30,30*tn],[i,1,vt],[i,5,5*vt],[i,15,15*vt],[i,30,30*vt],[o,1,nn],[o,3,3*nn],[o,6,6*nn],[o,12,12*nn],[r,1,wn],[r,2,2*wn],[n,1,op],[t,1,Mv],[t,3,3*Mv],[e,1,hc]];function a(u,c,f){const d=cS).right(s,d);if(h===s.length)return e.every(Wf(u/hc,c/hc,f));if(h===0)return yl.every(Math.max(Wf(u,c,f),1));const[v,y]=s[d/s[h-1][2]53)return null;"w"in A||(A.w=1),"Z"in A?(Q=mc(ii(A.y,0,1)),Se=Q.getUTCDay(),Q=Se>4||Se===0?xl.ceil(Q):xl(Q),Q=ap.offset(Q,(A.V-1)*7),A.y=Q.getUTCFullYear(),A.m=Q.getUTCMonth(),A.d=Q.getUTCDate()+(A.w+6)%7):(Q=pc(ii(A.y,0,1)),Se=Q.getDay(),Q=Se>4||Se===0?wl.ceil(Q):wl(Q),Q=Ss.offset(Q,(A.V-1)*7),A.y=Q.getFullYear(),A.m=Q.getMonth(),A.d=Q.getDate()+(A.w+6)%7)}else("W"in A||"U"in A)&&("w"in A||(A.w="u"in A?A.u%7:"W"in A?1:0),Se="Z"in A?mc(ii(A.y,0,1)).getUTCDay():pc(ii(A.y,0,1)).getDay(),A.m=0,A.d="W"in A?(A.w+6)%7+A.W*7-(Se+5)%7:A.w+A.U*7-(Se+6)%7);return"Z"in A?(A.H+=A.Z/100|0,A.M+=A.Z%100,mc(A)):pc(A)}}function k(O,V,U,A){for(var re=0,Q=V.length,Se=U.length,Ce,Je;re=Se)return-1;if(Ce=V.charCodeAt(re++),Ce===37){if(Ce=V.charAt(re++),Je=T[Ce in Rv?V.charAt(re++):Ce],!Je||(A=Je(O,U,A))<0)return-1}else if(Ce!=U.charCodeAt(A++))return-1}return A}function b(O,V,U){var A=u.exec(V.slice(U));return A?(O.p=c.get(A[0].toLowerCase()),U+A[0].length):-1}function _(O,V,U){var A=h.exec(V.slice(U));return A?(O.w=v.get(A[0].toLowerCase()),U+A[0].length):-1}function M(O,V,U){var A=f.exec(V.slice(U));return A?(O.w=d.get(A[0].toLowerCase()),U+A[0].length):-1}function N(O,V,U){var A=m.exec(V.slice(U));return A?(O.m=p.get(A[0].toLowerCase()),U+A[0].length):-1}function I(O,V,U){var A=y.exec(V.slice(U));return A?(O.m=S.get(A[0].toLowerCase()),U+A[0].length):-1}function B(O,V,U){return k(O,t,V,U)}function j(O,V,U){return k(O,n,V,U)}function $(O,V,U){return k(O,r,V,U)}function z(O){return s[O.getDay()]}function R(O){return i[O.getDay()]}function L(O){return l[O.getMonth()]}function W(O){return a[O.getMonth()]}function K(O){return o[+(O.getHours()>=12)]}function ie(O){return 1+~~(O.getMonth()/3)}function ct(O){return s[O.getUTCDay()]}function Ee(O){return i[O.getUTCDay()]}function ft(O){return l[O.getUTCMonth()]}function Me(O){return a[O.getUTCMonth()]}function H(O){return o[+(O.getUTCHours()>=12)]}function oe(O){return 1+~~(O.getUTCMonth()/3)}return{format:function(O){var V=P(O+="",w);return V.toString=function(){return O},V},parse:function(O){var V=E(O+="",!1);return V.toString=function(){return O},V},utcFormat:function(O){var V=P(O+="",C);return V.toString=function(){return O},V},utcParse:function(O){var V=E(O+="",!0);return V.toString=function(){return O},V}}}var Rv={"-":"",_:" ",0:"0"},Ae=/^\s*\d+/,p5=/^%/,m5=/[\\^$*+?|[\]().{}]/g;function ee(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i[t.toLowerCase(),n]))}function v5(e,t,n){var r=Ae.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function y5(e,t,n){var r=Ae.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function w5(e,t,n){var r=Ae.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function x5(e,t,n){var r=Ae.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function S5(e,t,n){var r=Ae.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Nv(e,t,n){var r=Ae.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Dv(e,t,n){var r=Ae.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function C5(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function T5(e,t,n){var r=Ae.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function P5(e,t,n){var r=Ae.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Lv(e,t,n){var r=Ae.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function k5(e,t,n){var r=Ae.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Ov(e,t,n){var r=Ae.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function E5(e,t,n){var r=Ae.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function _5(e,t,n){var r=Ae.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function b5(e,t,n){var r=Ae.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function A5(e,t,n){var r=Ae.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function M5(e,t,n){var r=p5.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function R5(e,t,n){var r=Ae.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function N5(e,t,n){var r=Ae.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Iv(e,t){return ee(e.getDate(),t,2)}function D5(e,t){return ee(e.getHours(),t,2)}function L5(e,t){return ee(e.getHours()%12||12,t,2)}function O5(e,t){return ee(1+Ss.count(xn(e),e),t,3)}function HC(e,t){return ee(e.getMilliseconds(),t,3)}function I5(e,t){return HC(e,t)+"000"}function j5(e,t){return ee(e.getMonth()+1,t,2)}function F5(e,t){return ee(e.getMinutes(),t,2)}function V5(e,t){return ee(e.getSeconds(),t,2)}function $5(e){var t=e.getDay();return t===0?7:t}function z5(e,t){return ee(lu.count(xn(e)-1,e),t,2)}function GC(e){var t=e.getDay();return t>=4||t===0?Io(e):Io.ceil(e)}function U5(e,t){return e=GC(e),ee(Io.count(xn(e),e)+(xn(e).getDay()===4),t,2)}function B5(e){return e.getDay()}function W5(e,t){return ee(wl.count(xn(e)-1,e),t,2)}function H5(e,t){return ee(e.getFullYear()%100,t,2)}function G5(e,t){return e=GC(e),ee(e.getFullYear()%100,t,2)}function K5(e,t){return ee(e.getFullYear()%1e4,t,4)}function Y5(e,t){var n=e.getDay();return e=n>=4||n===0?Io(e):Io.ceil(e),ee(e.getFullYear()%1e4,t,4)}function X5(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ee(t/60|0,"0",2)+ee(t%60,"0",2)}function jv(e,t){return ee(e.getUTCDate(),t,2)}function Q5(e,t){return ee(e.getUTCHours(),t,2)}function Z5(e,t){return ee(e.getUTCHours()%12||12,t,2)}function q5(e,t){return ee(1+ap.count(br(e),e),t,3)}function KC(e,t){return ee(e.getUTCMilliseconds(),t,3)}function J5(e,t){return KC(e,t)+"000"}function ej(e,t){return ee(e.getUTCMonth()+1,t,2)}function tj(e,t){return ee(e.getUTCMinutes(),t,2)}function nj(e,t){return ee(e.getUTCSeconds(),t,2)}function rj(e){var t=e.getUTCDay();return t===0?7:t}function oj(e,t){return ee(WC.count(br(e)-1,e),t,2)}function YC(e){var t=e.getUTCDay();return t>=4||t===0?jo(e):jo.ceil(e)}function ij(e,t){return e=YC(e),ee(jo.count(br(e),e)+(br(e).getUTCDay()===4),t,2)}function sj(e){return e.getUTCDay()}function aj(e,t){return ee(xl.count(br(e)-1,e),t,2)}function lj(e,t){return ee(e.getUTCFullYear()%100,t,2)}function uj(e,t){return e=YC(e),ee(e.getUTCFullYear()%100,t,2)}function cj(e,t){return ee(e.getUTCFullYear()%1e4,t,4)}function fj(e,t){var n=e.getUTCDay();return e=n>=4||n===0?jo(e):jo.ceil(e),ee(e.getUTCFullYear()%1e4,t,4)}function dj(){return"+0000"}function Fv(){return"%"}function Vv(e){return+e}function $v(e){return Math.floor(+e/1e3)}var $r,up;hj({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function hj(e){return $r=h5(e),up=$r.format,$r.parse,$r.utcFormat,$r.utcParse,$r}function pj(e){return new Date(e)}function mj(e){return e instanceof Date?+e:+new Date(+e)}function XC(e,t,n,r,o,i,s,a,l,u){var c=UC(),f=c.invert,d=c.domain,h=u(".%L"),v=u(":%S"),y=u("%I:%M"),S=u("%I %p"),m=u("%a %d"),p=u("%b %d"),w=u("%B"),C=u("%Y");function T(P){return(l(P)=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new RI(t)}function xj(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function QC(e){this._context=e}QC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Sj(e){return new QC(e)}function Cj(e){return e[0]}function Tj(e){return e[1]}function Pj(e,t){var n=zr(!0),r=null,o=Sj,i=null,s=wj(a);e=typeof e=="function"?e:e===void 0?Cj:zr(e),t=typeof t=="function"?t:t===void 0?Tj:zr(t);function a(l){var u,c=(l=xj(l)).length,f,d=!1,h;for(r==null&&(i=o(h=s())),u=0;u<=c;++u)!(u{const t=g.useRef(),[n,r]=g.useState({}),o={top:50,right:80,bottom:70,left:70},i=750;return g.useEffect(()=>{r(s=>{const a={...s};return Object.entries(e).forEach(([l,u])=>{const c=a[l]||[],f=[...c,...u.filter(d=>!c.some(h=>h.time===d.time))];a[l]=f}),a})},[e]),g.useEffect(()=>{if(Object.keys(n).length===0)return;const s=t.current,l=s.parentElement.clientWidth||800,u=500,c=l-o.left-o.right,f=u-o.top-o.bottom;Qs(s).selectAll("*").remove();const h=Qs(s).attr("width",l).attr("height",u).append("g").attr("transform",`translate(${o.left},${o.top})`),y=Object.entries(n).flatMap(([b,_])=>_.map(M=>({...M,stock:b}))).filter(b=>{const _=b.time&&!isNaN(new Date(b.time).getTime()),M=b.price!=null&&!isNaN(b.price);return _&&M});if(y.length===0)return;const S=gj().range([0,c]),m=iv(y,b=>new Date(b.time));S.domain(m);const p=iv(y,b=>b.price),w=BC().domain([p[0]-(p[1]-p[0])*.1,p[1]+(p[1]-p[0])*.1]).range([f,0]),C=av(S).ticks(5).tickFormat(up("%H:%M:%S")),T=av(S).ticks(5).tickSize(-f).tickFormat("");h.append("g").attr("class","x-axis-grid").attr("transform",`translate(0,${f})`).call(T).selectAll("line").attr("stroke","#e0e0e0"),h.append("g").attr("class","x-axis").attr("transform",`translate(0,${f})`).call(C);const P=lv(w).ticks(5).tickFormat(b=>`$${b.toFixed(2)}`),E=lv(w).ticks(5).tickSize(-c).tickFormat("");h.append("g").attr("class","y-axis-grid").call(E).selectAll("line").attr("stroke","#e0e0e0"),h.append("g").attr("class","y-axis").call(P),Object.entries(n).forEach(([b,_],M)=>{const N=ta[M%ta.length],I=Pj().x(j=>S(new Date(j.time))).y(j=>w(j.price)).curve(kj),B=h.selectAll(`.line-${b}`).data([_]);B.enter().append("path").attr("class",`stock-line line-${b}`).attr("fill","none").attr("stroke",N).attr("stroke-width",2).attr("d",I).merge(B).transition().duration(i).attr("d",I),B.exit().remove()});const k=h.append("g").attr("class","legend").attr("transform",`translate(0,${-o.top/2})`);Object.keys(n).forEach((b,_)=>{const M=k.append("g").attr("class",`legend-item legend-${b}`).attr("transform",`translate(${_*120}, 0)`).style("cursor","pointer").on("click",function(){const N=!Qs(this).classed("inactive");Qs(this).classed("inactive",N),h.selectAll(`.line-${b}`).style("opacity",N?0:1)});M.append("rect").attr("width",10).attr("height",10).attr("fill",ta[_%ta.length]),M.append("text").attr("x",15).attr("y",10).text(b).attr("fill","#000").attr("font-size","12px")})},[n]),x.jsx("div",{style:{position:"relative",width:"100%"},children:x.jsx("svg",{ref:t,style:{width:"100%",height:"500px"}})})},_j=({selectedStock:e,setSelectedStock:t,availableStocks:n,handleStartSimulation:r,isLoading:o,stockData:i,marketSummary:s})=>x.jsx(nl.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:.5},children:x.jsxs(io,{className:"bg-white border-gray-200 shadow-lg hover:shadow-xl transition-shadow duration-300",children:[x.jsx(Hh,{children:x.jsxs(Gh,{className:"flex items-center text-black",children:[x.jsx(OR,{className:"h-6 w-6 mr-2 text-black"}),"Stock Simulator"]})}),x.jsxs(so,{children:[x.jsxs("div",{className:"flex space-x-4 mb-6",children:[x.jsxs(PD,{onValueChange:a=>t(a),value:e,children:[x.jsx(XS,{className:"w-[200px] bg-white border-gray-300 text-black hover:border-black transition-colors duration-300",children:x.jsx(ED,{placeholder:"Select Stock Symbol"})}),x.jsx(qS,{className:"bg-white border-gray-300 text-black",children:x.jsxs(kD,{children:[x.jsx(JS,{children:"Available Stocks"}),n.map(a=>x.jsx(eC,{value:a,children:a},a))]})})]}),x.jsx(Mo,{onClick:r,className:"bg-black hover:bg-gray-800 text-white transition-all duration-300 ease-in-out transform hover:scale-105 hover:shadow-lg",disabled:o,children:o?x.jsx(VR,{className:"h-5 w-5 mr-2 animate-spin"}):"Start Simulation"})]}),x.jsx("div",{className:"bg-white border border-gray-200 rounded-lg p-4 mb-6 hover:shadow-md transition-shadow duration-300",children:x.jsx(Ej,{data:i})}),x.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[x.jsx(oc,{children:x.jsxs(ic,{children:[x.jsx(sc,{children:x.jsx(io,{className:"bg-gray-100 hover:bg-gray-200 transition-colors duration-300",children:x.jsxs(so,{className:"flex items-center justify-between p-4",children:[x.jsxs("div",{className:"flex items-center",children:[x.jsx($R,{className:"h-6 w-6 mr-2 text-black"}),x.jsx("span",{className:"font-semibold",children:"Top Performer"})]}),x.jsx("span",{className:"text-black font-bold",children:s.topPerformer})]})})}),x.jsx(xa,{children:x.jsx("p",{children:"Top performing stock today"})})]})}),x.jsx(oc,{children:x.jsxs(ic,{children:[x.jsx(sc,{children:x.jsx(io,{className:"bg-gray-100 hover:bg-gray-200 transition-colors duration-300",children:x.jsxs(so,{className:"flex items-center justify-between p-4",children:[x.jsxs("div",{className:"flex items-center",children:[x.jsx(LR,{className:"h-6 w-6 mr-2 text-black"}),x.jsx("span",{className:"font-semibold",children:"Total Volume"})]}),x.jsx("span",{className:"text-black font-bold",children:s.totalVolume})]})})}),x.jsx(xa,{children:x.jsx("p",{children:"Total trading volume today"})})]})}),x.jsx(oc,{children:x.jsxs(ic,{children:[x.jsx(sc,{children:x.jsx(io,{className:"bg-gray-100 hover:bg-gray-200 transition-colors duration-300",children:x.jsxs(so,{className:"flex items-center justify-between p-4",children:[x.jsxs("div",{className:"flex items-center",children:[x.jsx(FR,{className:"h-6 w-6 mr-2 text-black"}),x.jsx("span",{className:"font-semibold",children:"Market Hours"})]}),x.jsx("span",{className:"text-black font-bold",children:s.marketHours})]})})}),x.jsx(xa,{children:x.jsx("p",{children:"Current market hours"})})]})})]})]})]})}),bj=({runningSimulations:e,stopSimulation:t})=>x.jsx(nl.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:.5},children:x.jsxs(io,{className:"bg-white border-gray-200 shadow-lg hover:shadow-xl transition-shadow duration-300",children:[x.jsx(Hh,{children:x.jsx(Gh,{className:"text-black",children:"Running Simulations"})}),x.jsx(so,{children:Object.keys(e).length===0?x.jsx("p",{className:"text-gray-600",children:"No simulations are currently running."}):x.jsx("ul",{className:"space-y-2",children:Object.keys(e).map(n=>x.jsxs(nl.li,{className:"flex items-center justify-between bg-gray-100 p-3 rounded-lg hover:bg-gray-200 transition-colors duration-300",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[x.jsx("span",{className:"font-semibold text-black",children:n}),x.jsx(Mo,{variant:"destructive",onClick:()=>t(n),className:"bg-black hover:bg-gray-800 text-white transition-all duration-300 ease-in-out transform hover:scale-105",children:"Stop Simulation"})]},n))})})]})}),wi=g.forwardRef(({className:e,type:t,...n},r)=>x.jsx("input",{type:t,className:ae("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));wi.displayName="Input";var Aj="Label",ZC=g.forwardRef((e,t)=>x.jsx(J.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));ZC.displayName=Aj;var qC=ZC;const Mj=ah("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),xi=g.forwardRef(({className:e,...t},n)=>x.jsx(qC,{ref:n,className:ae(Mj(),e),...t}));xi.displayName=qC.displayName;const Rj=({isOpen:e,onOpenChange:t,newStock:n,handleInputChange:r,handleAddStock:o})=>x.jsx(f1,{open:e,onOpenChange:t,children:x.jsxs(lh,{className:"bg-white text-black",children:[x.jsxs(h1,{children:[x.jsx(p1,{className:"text-2xl font-bold text-black",children:"Add New Stock"}),x.jsx(m1,{className:"text-gray-600",children:"Enter the details of the new stock below."})]}),x.jsxs("form",{onSubmit:o,className:"space-y-6 mt-6",children:[x.jsxs("div",{className:"space-y-2",children:[x.jsx(xi,{htmlFor:"symbol",className:"text-gray-700",children:"Stock Symbol"}),x.jsx(wi,{id:"symbol",name:"symbol",value:n.symbol,onChange:r,className:"bg-white border-gray-300 text-black focus:border-black focus:ring-black transition-colors duration-300",required:!0})]}),x.jsxs("div",{className:"space-y-2",children:[x.jsx(xi,{htmlFor:"initialPrice",className:"text-gray-700",children:"Initial Price"}),x.jsx(wi,{id:"initialPrice",name:"initialPrice",type:"number",value:n.initialPrice,onChange:r,className:"bg-white border-gray-300 text-black focus:border-black focus:ring-black transition-colors duration-300",required:!0})]}),x.jsxs("div",{className:"space-y-2",children:[x.jsx(xi,{htmlFor:"expectedReturn",className:"text-gray-700",children:"Expected Return"}),x.jsx(wi,{id:"expectedReturn",name:"expectedReturn",type:"number",value:n.expectedReturn,onChange:r,className:"bg-white border-gray-300 text-black focus:border-black focus:ring-black transition-colors duration-300",required:!0})]}),x.jsxs("div",{className:"space-y-2",children:[x.jsx(xi,{htmlFor:"volatility",className:"text-gray-700",children:"Volatility"}),x.jsx(wi,{id:"volatility",name:"volatility",type:"number",value:n.volatility,onChange:r,className:"bg-white border-gray-300 text-black focus:border-black focus:ring-black transition-colors duration-300",required:!0})]}),x.jsxs("div",{className:"flex space-x-4 mt-6",children:[x.jsx(Mo,{type:"submit",className:"bg-black hover:bg-gray-800 text-white transition-all duration-300 ease-in-out transform hover:scale-105",children:"Add Stock"}),x.jsx(Mo,{variant:"secondary",onClick:()=>t(!1),className:"bg-gray-200 hover:bg-gray-300 text-black transition-all duration-300 ease-in-out transform hover:scale-105",children:"Cancel"})]})]})]})});function Nj(){const[e,t]=g.useState({}),[n,r]=g.useState(["AAPL","GOOGL","AMZN"]),[o,i]=g.useState("AAPL"),[s,a]=g.useState(!1),[l,u]=g.useState({}),[c,f]=g.useState({}),[d,h]=g.useState(!1),[v,y]=g.useState({topPerformer:"AAPL",totalVolume:"1.2M",marketHours:"9:30 AM - 4:00 PM EST"}),[S,m]=g.useState({symbol:"",initialPrice:"",expectedReturn:"",volatility:""}),p=()=>{h(!0),setTimeout(()=>{P(),h(!1)},1500)},w=E=>{const{name:k,value:b}=E.target;m(_=>({..._,[k]:b}))},C=E=>{E.preventDefault();const{symbol:k,initialPrice:b,expectedReturn:_,volatility:M}=S,N=k.toUpperCase();r(I=>[...I,N]),u(I=>({...I,[N]:{initialPrice:parseFloat(b),expectedReturn:parseFloat(_),volatility:parseFloat(M)}})),m({symbol:"",initialPrice:"",expectedReturn:"",volatility:""}),a(!1)},T=g.useCallback(E=>{const k=c[E];k&&!k.closed&&(k.postMessage({type:"STOP_SIMULATION"},"*"),setTimeout(()=>{k.close(),f(b=>{const _={...b};return delete _[E],_})},500))},[c]),P=g.useCallback(()=>{const E=`worker-${Date.now()}`,k=o;if(c[k]){alert(`A simulation for ${k} is already running.`);return}const b=l[k]||{},_=new URLSearchParams({id:E,stock:k,initialPrice:b.initialPrice!=null?b.initialPrice:"",expectedReturn:b.expectedReturn!=null?b.expectedReturn:"",volatility:b.volatility!=null?b.volatility:""}),M=550,N=650,I=window.screenLeft!==void 0?window.screenLeft:window.screenX,B=window.screenTop!==void 0?window.screenTop:window.screenY,j=I+Object.keys(c).length%3*(M+10),$=B+Math.floor(Object.keys(c).length/3)*(N+30),z=`width=${M},height=${N},left=${j},top=${$}`,R=window.open(`/worker.html?${_.toString()}`,"_blank",z);R?(R.name=E,f(L=>({...L,[k]:R}))):alert("Please allow pop-ups for this application.")},[o,l,c]);return g.useEffect(()=>{const E=k=>{if(k.origin!==window.location.origin)return;const{data:b}=k;if(b.type==="SIMULATION_ENDED"){const{stockSymbol:_}=b.payload;f(M=>{const N={...M};return delete N[_],N})}if(b.type==="STOCK_UPDATE"){const{stockSymbol:_,stockUpdate:M}=b.payload,{time:N,price:I}=M;if(!N||isNaN(new Date(N).getTime())||I==null||isNaN(I)){console.warn("Invalid stock update:",{time:N,price:I});return}t(B=>({...B,[_]:[...B[_]||[],{time:N,price:I}]}))}};return window.addEventListener("message",E),()=>window.removeEventListener("message",E)},[]),g.useEffect(()=>{const E=setInterval(()=>{f(k=>{const b={...k};let _=!1;return Object.keys(k).forEach(M=>{k[M].closed&&(delete b[M],_=!0)}),_?b:k})},1e3);return()=>clearInterval(E)},[c]),x.jsx("div",{className:"min-h-screen bg-white text-black",children:x.jsxs("div",{className:"container mx-auto px-4 py-8",children:[x.jsx(UR,{onAddStockClick:()=>a(!0)}),x.jsxs(IE,{defaultValue:"simulator",className:"mb-8",children:[x.jsxs(Rw,{className:"grid w-full grid-cols-2 mb-4 bg-gray-100",children:[x.jsx(pf,{value:"simulator",className:"data-[state=active]:bg-black data-[state=active]:text-white transition-all duration-300",children:"Simulator"}),x.jsx(pf,{value:"running",className:"data-[state=active]:bg-black data-[state=active]:text-white transition-all duration-300",children:"Running Simulations"})]}),x.jsx(mf,{value:"simulator",children:x.jsx(_j,{stockData:e,availableStocks:n,selectedStock:o,setSelectedStock:i,handleStartSimulation:p,isLoading:d,marketSummary:v})}),x.jsx(mf,{value:"running",children:x.jsx(bj,{runningSimulations:c,stopSimulation:T})})]}),x.jsx(f1,{open:s,onOpenChange:a,children:x.jsx(lh,{className:"bg-white text-black",children:x.jsx(Rj,{isOpen:s,onOpenChange:a,newStock:S,handleInputChange:w,handleAddStock:C})})})]})})}vc.createRoot(document.getElementById("root")).render(x.jsx(Yt.StrictMode,{children:x.jsx(Nj,{})})); + */const $R=Dr("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]),zR=ah("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Mo=g.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const s=r?Cr:"button";return x.jsx(s,{className:ae(zR({variant:t,size:n,className:e})),ref:i,...o})});Mo.displayName="Button";const UR=({onAddStockClick:e})=>x.jsxs(nl.header,{className:"flex items-center justify-between mb-8",initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.5},children:[x.jsxs("div",{className:"flex items-center space-x-4",children:[x.jsx(IR,{className:"h-10 w-10 text-black"}),x.jsx("h1",{className:"text-3xl font-bold text-black",children:"TechStock Simulator"})]}),x.jsxs(Mo,{onClick:e,className:"bg-black hover:bg-gray-800 text-white transition-all duration-300 ease-in-out transform hover:scale-105 hover:shadow-lg",children:[x.jsx(jR,{className:"h-5 w-5 mr-2"}),"Add New Stock"]})]});function Xg(e,[t,n]){return Math.min(n,Math.max(t,e))}const BR=["top","right","bottom","left"],Ft=Math.min,tt=Math.max,rl=Math.round,Xs=Math.floor,Gn=e=>({x:e,y:e}),WR={left:"right",right:"left",bottom:"top",top:"bottom"},HR={start:"end",end:"start"};function Df(e,t,n){return tt(e,Ft(t,n))}function gn(e,t){return typeof e=="function"?e(t):e}function vn(e){return e.split("-")[0]}function Wo(e){return e.split("-")[1]}function Oh(e){return e==="x"?"y":"x"}function Ih(e){return e==="y"?"height":"width"}function Kn(e){return["top","bottom"].includes(vn(e))?"y":"x"}function jh(e){return Oh(Kn(e))}function GR(e,t,n){n===void 0&&(n=!1);const r=Wo(e),o=jh(e),i=Ih(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=ol(s)),[s,ol(s)]}function KR(e){const t=ol(e);return[Lf(e),t,Lf(t)]}function Lf(e){return e.replace(/start|end/g,t=>HR[t])}function YR(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function XR(e,t,n,r){const o=Wo(e);let i=YR(vn(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Lf)))),i}function ol(e){return e.replace(/left|right|bottom|top/g,t=>WR[t])}function QR(e){return{top:0,right:0,bottom:0,left:0,...e}}function Wx(e){return typeof e!="number"?QR(e):{top:e,right:e,bottom:e,left:e}}function il(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Qg(e,t,n){let{reference:r,floating:o}=e;const i=Kn(t),s=jh(t),a=Ih(s),l=vn(t),u=i==="y",c=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[a]/2-o[a]/2;let h;switch(l){case"top":h={x:c,y:r.y-o.height};break;case"bottom":h={x:c,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-o.width,y:f};break;default:h={x:r.x,y:r.y}}switch(Wo(t)){case"start":h[s]-=d*(n&&u?-1:1);break;case"end":h[s]+=d*(n&&u?-1:1);break}return h}const ZR=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:f}=Qg(u,r,l),d=r,h={},v=0;for(let y=0;y({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:u,padding:c=0}=gn(e,t)||{};if(u==null)return{};const f=Wx(c),d={x:n,y:r},h=jh(o),v=Ih(h),y=await s.getDimensions(u),S=h==="y",m=S?"top":"left",p=S?"bottom":"right",w=S?"clientHeight":"clientWidth",C=i.reference[v]+i.reference[h]-d[h]-i.floating[v],T=d[h]-i.reference[h],P=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let E=P?P[w]:0;(!E||!await(s.isElement==null?void 0:s.isElement(P)))&&(E=a.floating[w]||i.floating[v]);const k=C/2-T/2,b=E/2-y[v]/2-1,_=Ft(f[m],b),M=Ft(f[p],b),N=_,I=E-y[v]-M,B=E/2-y[v]/2+k,j=Df(N,B,I),$=!l.arrow&&Wo(o)!=null&&B!==j&&i.reference[v]/2-(BB<=0)){var M,N;const B=(((M=i.flip)==null?void 0:M.index)||0)+1,j=E[B];if(j)return{data:{index:B,overflows:_},reset:{placement:j}};let $=(N=_.filter(U=>U.overflows[0]<=0).sort((U,R)=>U.overflows[1]-R.overflows[1])[0])==null?void 0:N.placement;if(!$)switch(h){case"bestFit":{var I;const U=(I=_.filter(R=>{if(P){const L=Kn(R.placement);return L===p||L==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(L=>L>0).reduce((L,W)=>L+W,0)]).sort((R,L)=>R[1]-L[1])[0])==null?void 0:I[0];U&&($=U);break}case"initialPlacement":$=a;break}if(o!==$)return{reset:{placement:$}}}return{}}}};function Zg(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function qg(e){return BR.some(t=>e[t]>=0)}const eN=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=gn(e,t);switch(r){case"referenceHidden":{const i=await ns(t,{...o,elementContext:"reference"}),s=Zg(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:qg(s)}}}case"escaped":{const i=await ns(t,{...o,altBoundary:!0}),s=Zg(i,n.floating);return{data:{escapedOffsets:s,escaped:qg(s)}}}default:return{}}}}};async function tN(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=vn(n),a=Wo(n),l=Kn(n)==="y",u=["left","top"].includes(s)?-1:1,c=i&&l?-1:1,f=gn(t,e);let{mainAxis:d,crossAxis:h,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof v=="number"&&(h=a==="end"?v*-1:v),l?{x:h*c,y:d*u}:{x:d*u,y:h*c}}const nN=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await tN(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},rN=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:S=>{let{x:m,y:p}=S;return{x:m,y:p}}},...l}=gn(e,t),u={x:n,y:r},c=await ns(t,l),f=Kn(vn(o)),d=Oh(f);let h=u[d],v=u[f];if(i){const S=d==="y"?"top":"left",m=d==="y"?"bottom":"right",p=h+c[S],w=h-c[m];h=Df(p,h,w)}if(s){const S=f==="y"?"top":"left",m=f==="y"?"bottom":"right",p=v+c[S],w=v-c[m];v=Df(p,v,w)}const y=a.fn({...t,[d]:h,[f]:v});return{...y,data:{x:y.x-n,y:y.y-r}}}}},oN=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=gn(e,t),c={x:n,y:r},f=Kn(o),d=Oh(f);let h=c[d],v=c[f];const y=gn(a,t),S=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const w=d==="y"?"height":"width",C=i.reference[d]-i.floating[w]+S.mainAxis,T=i.reference[d]+i.reference[w]-S.mainAxis;hT&&(h=T)}if(u){var m,p;const w=d==="y"?"width":"height",C=["top","left"].includes(vn(o)),T=i.reference[f]-i.floating[w]+(C&&((m=s.offset)==null?void 0:m[f])||0)+(C?0:S.crossAxis),P=i.reference[f]+i.reference[w]+(C?0:((p=s.offset)==null?void 0:p[f])||0)-(C?S.crossAxis:0);vP&&(v=P)}return{[d]:h,[f]:v}}}},iN=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:s=()=>{},...a}=gn(e,t),l=await ns(t,a),u=vn(n),c=Wo(n),f=Kn(n)==="y",{width:d,height:h}=r.floating;let v,y;u==="top"||u==="bottom"?(v=u,y=c===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(y=u,v=c==="end"?"top":"bottom");const S=h-l.top-l.bottom,m=d-l.left-l.right,p=Ft(h-l[v],S),w=Ft(d-l[y],m),C=!t.middlewareData.shift;let T=p,P=w;if(f?P=c||C?Ft(w,m):m:T=c||C?Ft(p,S):S,C&&!c){const k=tt(l.left,0),b=tt(l.right,0),_=tt(l.top,0),M=tt(l.bottom,0);f?P=d-2*(k!==0||b!==0?k+b:tt(l.left,l.right)):T=h-2*(_!==0||M!==0?_+M:tt(l.top,l.bottom))}await s({...t,availableWidth:P,availableHeight:T});const E=await o.getDimensions(i.floating);return d!==E.width||h!==E.height?{reset:{rects:!0}}:{}}}};function Ho(e){return Hx(e)?(e.nodeName||"").toLowerCase():"#document"}function ot(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Cn(e){var t;return(t=(Hx(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Hx(e){return e instanceof Node||e instanceof ot(e).Node}function Mt(e){return e instanceof Element||e instanceof ot(e).Element}function Wt(e){return e instanceof HTMLElement||e instanceof ot(e).HTMLElement}function Jg(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ot(e).ShadowRoot}function vs(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Rt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function sN(e){return["table","td","th"].includes(Ho(e))}function Xl(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Fh(e){const t=Vh(),n=Mt(e)?Rt(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function aN(e){let t=Yn(e);for(;Wt(t)&&!Ro(t);){if(Fh(t))return t;if(Xl(t))return null;t=Yn(t)}return null}function Vh(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ro(e){return["html","body","#document"].includes(Ho(e))}function Rt(e){return ot(e).getComputedStyle(e)}function Ql(e){return Mt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yn(e){if(Ho(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Jg(e)&&e.host||Cn(e);return Jg(t)?t.host:t}function Gx(e){const t=Yn(e);return Ro(t)?e.ownerDocument?e.ownerDocument.body:e.body:Wt(t)&&vs(t)?t:Gx(t)}function rs(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Gx(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=ot(o);if(i){const a=Of(s);return t.concat(s,s.visualViewport||[],vs(o)?o:[],a&&n?rs(a):[])}return t.concat(o,rs(o,[],n))}function Of(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Kx(e){const t=Rt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Wt(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=rl(n)!==i||rl(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function $h(e){return Mt(e)?e:e.contextElement}function yo(e){const t=$h(e);if(!Wt(t))return Gn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Kx(t);let s=(i?rl(n.width):n.width)/r,a=(i?rl(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const lN=Gn(0);function Yx(e){const t=ot(e);return!Vh()||!t.visualViewport?lN:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function uN(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ot(e)?!1:t}function Pr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=$h(e);let s=Gn(1);t&&(r?Mt(r)&&(s=yo(r)):s=yo(e));const a=uN(i,n,r)?Yx(i):Gn(0);let l=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,c=o.width/s.x,f=o.height/s.y;if(i){const d=ot(i),h=r&&Mt(r)?ot(r):r;let v=d,y=Of(v);for(;y&&r&&h!==v;){const S=yo(y),m=y.getBoundingClientRect(),p=Rt(y),w=m.left+(y.clientLeft+parseFloat(p.paddingLeft))*S.x,C=m.top+(y.clientTop+parseFloat(p.paddingTop))*S.y;l*=S.x,u*=S.y,c*=S.x,f*=S.y,l+=w,u+=C,v=ot(y),y=Of(v)}}return il({width:c,height:f,x:l,y:u})}function cN(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Cn(r),a=t?Xl(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},u=Gn(1);const c=Gn(0),f=Wt(r);if((f||!f&&!i)&&((Ho(r)!=="body"||vs(s))&&(l=Ql(r)),Wt(r))){const d=Pr(r);u=yo(r),c.x=d.x+r.clientLeft,c.y=d.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x,y:n.y*u.y-l.scrollTop*u.y+c.y}}function fN(e){return Array.from(e.getClientRects())}function Xx(e){return Pr(Cn(e)).left+Ql(e).scrollLeft}function dN(e){const t=Cn(e),n=Ql(e),r=e.ownerDocument.body,o=tt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=tt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Xx(e);const a=-n.scrollTop;return Rt(r).direction==="rtl"&&(s+=tt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function hN(e,t){const n=ot(e),r=Cn(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const u=Vh();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function pN(e,t){const n=Pr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Wt(e)?yo(e):Gn(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,u=r*i.y;return{width:s,height:a,x:l,y:u}}function ev(e,t,n){let r;if(t==="viewport")r=hN(e,n);else if(t==="document")r=dN(Cn(e));else if(Mt(t))r=pN(t,n);else{const o=Yx(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return il(r)}function Qx(e,t){const n=Yn(e);return n===t||!Mt(n)||Ro(n)?!1:Rt(n).position==="fixed"||Qx(n,t)}function mN(e,t){const n=t.get(e);if(n)return n;let r=rs(e,[],!1).filter(a=>Mt(a)&&Ho(a)!=="body"),o=null;const i=Rt(e).position==="fixed";let s=i?Yn(e):e;for(;Mt(s)&&!Ro(s);){const a=Rt(s),l=Fh(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||vs(s)&&!l&&Qx(e,s))?r=r.filter(c=>c!==s):o=a,s=Yn(s)}return t.set(e,r),r}function gN(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Xl(t)?[]:mN(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((u,c)=>{const f=ev(t,c,o);return u.top=tt(f.top,u.top),u.right=Ft(f.right,u.right),u.bottom=Ft(f.bottom,u.bottom),u.left=tt(f.left,u.left),u},ev(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function vN(e){const{width:t,height:n}=Kx(e);return{width:t,height:n}}function yN(e,t,n){const r=Wt(t),o=Cn(t),i=n==="fixed",s=Pr(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Gn(0);if(r||!r&&!i)if((Ho(t)!=="body"||vs(o))&&(a=Ql(t)),r){const f=Pr(t,!0,i,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&(l.x=Xx(o));const u=s.left+a.scrollLeft-l.x,c=s.top+a.scrollTop-l.y;return{x:u,y:c,width:s.width,height:s.height}}function rc(e){return Rt(e).position==="static"}function tv(e,t){return!Wt(e)||Rt(e).position==="fixed"?null:t?t(e):e.offsetParent}function Zx(e,t){const n=ot(e);if(Xl(e))return n;if(!Wt(e)){let o=Yn(e);for(;o&&!Ro(o);){if(Mt(o)&&!rc(o))return o;o=Yn(o)}return n}let r=tv(e,t);for(;r&&sN(r)&&rc(r);)r=tv(r,t);return r&&Ro(r)&&rc(r)&&!Fh(r)?n:r||aN(e)||n}const wN=async function(e){const t=this.getOffsetParent||Zx,n=this.getDimensions,r=await n(e.floating);return{reference:yN(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function xN(e){return Rt(e).direction==="rtl"}const SN={convertOffsetParentRelativeRectToViewportRelativeRect:cN,getDocumentElement:Cn,getClippingRect:gN,getOffsetParent:Zx,getElementRects:wN,getClientRects:fN,getDimensions:vN,getScale:yo,isElement:Mt,isRTL:xN};function CN(e,t){let n=null,r;const o=Cn(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:u,top:c,width:f,height:d}=e.getBoundingClientRect();if(a||t(),!f||!d)return;const h=Xs(c),v=Xs(o.clientWidth-(u+f)),y=Xs(o.clientHeight-(c+d)),S=Xs(u),p={rootMargin:-h+"px "+-v+"px "+-y+"px "+-S+"px",threshold:tt(0,Ft(1,l))||1};let w=!0;function C(T){const P=T[0].intersectionRatio;if(P!==l){if(!w)return s();P?s(!1,P):r=setTimeout(()=>{s(!1,1e-7)},1e3)}w=!1}try{n=new IntersectionObserver(C,{...p,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,p)}n.observe(e)}return s(!0),i}function TN(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=$h(e),c=o||i?[...u?rs(u):[],...rs(t)]:[];c.forEach(m=>{o&&m.addEventListener("scroll",n,{passive:!0}),i&&m.addEventListener("resize",n)});const f=u&&a?CN(u,n):null;let d=-1,h=null;s&&(h=new ResizeObserver(m=>{let[p]=m;p&&p.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let v,y=l?Pr(e):null;l&&S();function S(){const m=Pr(e);y&&(m.x!==y.x||m.y!==y.y||m.width!==y.width||m.height!==y.height)&&n(),y=m,v=requestAnimationFrame(S)}return n(),()=>{var m;c.forEach(p=>{o&&p.removeEventListener("scroll",n),i&&p.removeEventListener("resize",n)}),f==null||f(),(m=h)==null||m.disconnect(),h=null,l&&cancelAnimationFrame(v)}}const PN=nN,kN=rN,EN=JR,_N=iN,bN=eN,nv=qR,AN=oN,MN=(e,t,n)=>{const r=new Map,o={platform:SN,...n},i={...o.platform,_c:r};return ZR(e,t,{...o,platform:i})};var wa=typeof document<"u"?g.useLayoutEffect:g.useEffect;function sl(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!sl(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!sl(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function qx(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function rv(e,t){const n=qx(e);return Math.round(t*n)/n}function ov(e){const t=g.useRef(e);return wa(()=>{t.current=e}),t}function RN(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[c,f]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,h]=g.useState(r);sl(d,r)||h(r);const[v,y]=g.useState(null),[S,m]=g.useState(null),p=g.useCallback(U=>{U!==P.current&&(P.current=U,y(U))},[]),w=g.useCallback(U=>{U!==E.current&&(E.current=U,m(U))},[]),C=i||v,T=s||S,P=g.useRef(null),E=g.useRef(null),k=g.useRef(c),b=l!=null,_=ov(l),M=ov(o),N=g.useCallback(()=>{if(!P.current||!E.current)return;const U={placement:t,strategy:n,middleware:d};M.current&&(U.platform=M.current),MN(P.current,E.current,U).then(R=>{const L={...R,isPositioned:!0};I.current&&!sl(k.current,L)&&(k.current=L,Rr.flushSync(()=>{f(L)}))})},[d,t,n,M]);wa(()=>{u===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,f(U=>({...U,isPositioned:!1})))},[u]);const I=g.useRef(!1);wa(()=>(I.current=!0,()=>{I.current=!1}),[]),wa(()=>{if(C&&(P.current=C),T&&(E.current=T),C&&T){if(_.current)return _.current(C,T,N);N()}},[C,T,N,_,b]);const B=g.useMemo(()=>({reference:P,floating:E,setReference:p,setFloating:w}),[p,w]),j=g.useMemo(()=>({reference:C,floating:T}),[C,T]),$=g.useMemo(()=>{const U={position:n,left:0,top:0};if(!j.floating)return U;const R=rv(j.floating,c.x),L=rv(j.floating,c.y);return a?{...U,transform:"translate("+R+"px, "+L+"px)",...qx(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:R,top:L}},[n,a,j.floating,c.x,c.y]);return g.useMemo(()=>({...c,update:N,refs:B,elements:j,floatingStyles:$}),[c,N,B,j,$])}const NN=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?nv({element:r.current,padding:o}).fn(n):{}:r?nv({element:r,padding:o}).fn(n):{}}}},DN=(e,t)=>({...PN(e),options:[e,t]}),LN=(e,t)=>({...kN(e),options:[e,t]}),ON=(e,t)=>({...AN(e),options:[e,t]}),IN=(e,t)=>({...EN(e),options:[e,t]}),jN=(e,t)=>({..._N(e),options:[e,t]}),FN=(e,t)=>({...bN(e),options:[e,t]}),VN=(e,t)=>({...NN(e),options:[e,t]});var $N="Arrow",Jx=g.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return x.jsx(J.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:x.jsx("polygon",{points:"0,0 30,0 15,10"})})});Jx.displayName=$N;var zN=Jx;function UN(e){const[t,n]=g.useState(void 0);return We(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,a;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;s=u.inlineSize,a=u.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var zh="Popper",[eS,Zl]=Nr(zh),[BN,tS]=eS(zh),nS=e=>{const{__scopePopper:t,children:n}=e,[r,o]=g.useState(null);return x.jsx(BN,{scope:t,anchor:r,onAnchorChange:o,children:n})};nS.displayName=zh;var rS="PopperAnchor",oS=g.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=tS(rS,n),s=g.useRef(null),a=de(t,s);return g.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:x.jsx(J.div,{...o,ref:a})});oS.displayName=rS;var Uh="PopperContent",[WN,HN]=eS(Uh),iS=g.forwardRef((e,t)=>{var H,oe,O,V,z,A;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:f="partial",hideWhenDetached:d=!1,updatePositionStrategy:h="optimized",onPlaced:v,...y}=e,S=tS(Uh,n),[m,p]=g.useState(null),w=de(t,re=>p(re)),[C,T]=g.useState(null),P=UN(C),E=(P==null?void 0:P.width)??0,k=(P==null?void 0:P.height)??0,b=r+(i!=="center"?"-"+i:""),_=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},M=Array.isArray(u)?u:[u],N=M.length>0,I={padding:_,boundary:M.filter(KN),altBoundary:N},{refs:B,floatingStyles:j,placement:$,isPositioned:U,middlewareData:R}=RN({strategy:"fixed",placement:b,whileElementsMounted:(...re)=>TN(...re,{animationFrame:h==="always"}),elements:{reference:S.anchor},middleware:[DN({mainAxis:o+k,alignmentAxis:s}),l&&LN({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?ON():void 0,...I}),l&&IN({...I}),jN({...I,apply:({elements:re,rects:Q,availableWidth:Se,availableHeight:Ce})=>{const{width:Je,height:Cs}=Q.reference,Ts=re.floating.style;Ts.setProperty("--radix-popper-available-width",`${Se}px`),Ts.setProperty("--radix-popper-available-height",`${Ce}px`),Ts.setProperty("--radix-popper-anchor-width",`${Je}px`),Ts.setProperty("--radix-popper-anchor-height",`${Cs}px`)}}),C&&VN({element:C,padding:a}),YN({arrowWidth:E,arrowHeight:k}),d&&FN({strategy:"referenceHidden",...I})]}),[L,W]=lS($),K=Bt(v);We(()=>{U&&(K==null||K())},[U,K]);const ie=(H=R.arrow)==null?void 0:H.x,ct=(oe=R.arrow)==null?void 0:oe.y,Ee=((O=R.arrow)==null?void 0:O.centerOffset)!==0,[ft,Me]=g.useState();return We(()=>{m&&Me(window.getComputedStyle(m).zIndex)},[m]),x.jsx("div",{ref:B.setFloating,"data-radix-popper-content-wrapper":"",style:{...j,transform:U?j.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ft,"--radix-popper-transform-origin":[(V=R.transformOrigin)==null?void 0:V.x,(z=R.transformOrigin)==null?void 0:z.y].join(" "),...((A=R.hide)==null?void 0:A.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:x.jsx(WN,{scope:n,placedSide:L,onArrowChange:T,arrowX:ie,arrowY:ct,shouldHideArrow:Ee,children:x.jsx(J.div,{"data-side":L,"data-align":W,...y,ref:w,style:{...y.style,animation:U?void 0:"none"}})})})});iS.displayName=Uh;var sS="PopperArrow",GN={top:"bottom",right:"left",bottom:"top",left:"right"},aS=g.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=HN(sS,r),s=GN[i.placedSide];return x.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:x.jsx(zN,{...o,ref:n,style:{...o.style,display:"block"}})})});aS.displayName=sS;function KN(e){return e!==null}var YN=e=>({name:"transformOrigin",options:e,fn(t){var S,m,p;const{placement:n,rects:r,middlewareData:o}=t,s=((S=o.arrow)==null?void 0:S.centerOffset)!==0,a=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[u,c]=lS(n),f={start:"0%",center:"50%",end:"100%"}[c],d=(((m=o.arrow)==null?void 0:m.x)??0)+a/2,h=(((p=o.arrow)==null?void 0:p.y)??0)+l/2;let v="",y="";return u==="bottom"?(v=s?f:`${d}px`,y=`${-l}px`):u==="top"?(v=s?f:`${d}px`,y=`${r.floating.height+l}px`):u==="right"?(v=`${-l}px`,y=s?f:`${h}px`):u==="left"&&(v=`${r.floating.width+l}px`,y=s?f:`${h}px`),{data:{x:v,y}}}});function lS(e){const[t,n="center"]=e.split("-");return[t,n]}var uS=nS,cS=oS,fS=iS,dS=aS;function XN(e){const t=g.useRef({value:e,previous:e});return g.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var QN="VisuallyHidden",Bh=g.forwardRef((e,t)=>x.jsx(J.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Bh.displayName=QN;var ZN=Bh,qN=[" ","Enter","ArrowUp","ArrowDown"],JN=[" ","Enter"],ys="Select",[ql,Jl,eD]=iw(ys),[Go,Fj]=Nr(ys,[eD,Zl]),eu=Zl(),[tD,er]=Go(ys),[nD,rD]=Go(ys),hS=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:s,defaultValue:a,onValueChange:l,dir:u,name:c,autoComplete:f,disabled:d,required:h}=e,v=eu(t),[y,S]=g.useState(null),[m,p]=g.useState(null),[w,C]=g.useState(!1),T=Qd(u),[P=!1,E]=_o({prop:r,defaultProp:o,onChange:i}),[k,b]=_o({prop:s,defaultProp:a,onChange:l}),_=g.useRef(null),M=y?!!y.closest("form"):!0,[N,I]=g.useState(new Set),B=Array.from(N).map(j=>j.props.value).join(";");return x.jsx(uS,{...v,children:x.jsxs(tD,{required:h,scope:t,trigger:y,onTriggerChange:S,valueNode:m,onValueNodeChange:p,valueNodeHasChildren:w,onValueNodeHasChildrenChange:C,contentId:on(),value:k,onValueChange:b,open:P,onOpenChange:E,dir:T,triggerPointerDownPosRef:_,disabled:d,children:[x.jsx(ql.Provider,{scope:t,children:x.jsx(nD,{scope:e.__scopeSelect,onNativeOptionAdd:g.useCallback(j=>{I($=>new Set($).add(j))},[]),onNativeOptionRemove:g.useCallback(j=>{I($=>{const U=new Set($);return U.delete(j),U})},[]),children:n})}),M?x.jsxs(VS,{"aria-hidden":!0,required:h,tabIndex:-1,name:c,autoComplete:f,value:k,onChange:j=>b(j.target.value),disabled:d,children:[k===void 0?x.jsx("option",{value:""}):null,Array.from(N)]},B):null]})})};hS.displayName=ys;var pS="SelectTrigger",mS=g.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=eu(n),s=er(pS,n),a=s.disabled||r,l=de(t,s.onTriggerChange),u=Jl(n),[c,f,d]=$S(v=>{const y=u().filter(p=>!p.disabled),S=y.find(p=>p.value===s.value),m=zS(y,v,S);m!==void 0&&s.onValueChange(m.value)}),h=()=>{a||(s.onOpenChange(!0),d())};return x.jsx(cS,{asChild:!0,...i,children:x.jsx(J.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":FS(s.value)?"":void 0,...o,ref:l,onClick:X(o.onClick,v=>{v.currentTarget.focus()}),onPointerDown:X(o.onPointerDown,v=>{const y=v.target;y.hasPointerCapture(v.pointerId)&&y.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&(h(),s.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)},v.preventDefault())}),onKeyDown:X(o.onKeyDown,v=>{const y=c.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&f(v.key),!(y&&v.key===" ")&&qN.includes(v.key)&&(h(),v.preventDefault())})})})});mS.displayName=pS;var gS="SelectValue",vS=g.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:s="",...a}=e,l=er(gS,n),{onValueNodeHasChildrenChange:u}=l,c=i!==void 0,f=de(t,l.onValueNodeChange);return We(()=>{u(c)},[u,c]),x.jsx(J.span,{...a,ref:f,style:{pointerEvents:"none"},children:FS(l.value)?x.jsx(x.Fragment,{children:s}):i})});vS.displayName=gS;var oD="SelectIcon",yS=g.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return x.jsx(J.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});yS.displayName=oD;var iD="SelectPortal",wS=e=>x.jsx(th,{asChild:!0,...e});wS.displayName=iD;var kr="SelectContent",xS=g.forwardRef((e,t)=>{const n=er(kr,e.__scopeSelect),[r,o]=g.useState();if(We(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?Rr.createPortal(x.jsx(SS,{scope:e.__scopeSelect,children:x.jsx(ql.Slot,{scope:e.__scopeSelect,children:x.jsx("div",{children:e.children})})}),i):null}return x.jsx(CS,{...e,ref:t})});xS.displayName=kr;var Qt=10,[SS,tr]=Go(kr),sD="SelectContentImpl",CS=g.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:s,side:a,sideOffset:l,align:u,alignOffset:c,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:v,hideWhenDetached:y,avoidCollisions:S,...m}=e,p=er(kr,n),[w,C]=g.useState(null),[T,P]=g.useState(null),E=de(t,H=>C(H)),[k,b]=g.useState(null),[_,M]=g.useState(null),N=Jl(n),[I,B]=g.useState(!1),j=g.useRef(!1);g.useEffect(()=>{if(w)return Ww(w)},[w]),Ow();const $=g.useCallback(H=>{const[oe,...O]=N().map(A=>A.ref.current),[V]=O.slice(-1),z=document.activeElement;for(const A of H)if(A===z||(A==null||A.scrollIntoView({block:"nearest"}),A===oe&&T&&(T.scrollTop=0),A===V&&T&&(T.scrollTop=T.scrollHeight),A==null||A.focus(),document.activeElement!==z))return},[N,T]),U=g.useCallback(()=>$([k,w]),[$,k,w]);g.useEffect(()=>{I&&U()},[I,U]);const{onOpenChange:R,triggerPointerDownPosRef:L}=p;g.useEffect(()=>{if(w){let H={x:0,y:0};const oe=V=>{var z,A;H={x:Math.abs(Math.round(V.pageX)-(((z=L.current)==null?void 0:z.x)??0)),y:Math.abs(Math.round(V.pageY)-(((A=L.current)==null?void 0:A.y)??0))}},O=V=>{H.x<=10&&H.y<=10?V.preventDefault():w.contains(V.target)||R(!1),document.removeEventListener("pointermove",oe),L.current=null};return L.current!==null&&(document.addEventListener("pointermove",oe),document.addEventListener("pointerup",O,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",oe),document.removeEventListener("pointerup",O,{capture:!0})}}},[w,R,L]),g.useEffect(()=>{const H=()=>R(!1);return window.addEventListener("blur",H),window.addEventListener("resize",H),()=>{window.removeEventListener("blur",H),window.removeEventListener("resize",H)}},[R]);const[W,K]=$S(H=>{const oe=N().filter(z=>!z.disabled),O=oe.find(z=>z.ref.current===document.activeElement),V=zS(oe,H,O);V&&setTimeout(()=>V.ref.current.focus())}),ie=g.useCallback((H,oe,O)=>{const V=!j.current&&!O;(p.value!==void 0&&p.value===oe||V)&&(b(H),V&&(j.current=!0))},[p.value]),ct=g.useCallback(()=>w==null?void 0:w.focus(),[w]),Ee=g.useCallback((H,oe,O)=>{const V=!j.current&&!O;(p.value!==void 0&&p.value===oe||V)&&M(H)},[p.value]),ft=r==="popper"?If:TS,Me=ft===If?{side:a,sideOffset:l,align:u,alignOffset:c,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:v,hideWhenDetached:y,avoidCollisions:S}:{};return x.jsx(SS,{scope:n,content:w,viewport:T,onViewportChange:P,itemRefCallback:ie,selectedItem:k,onItemLeave:ct,itemTextRefCallback:Ee,focusSelectedItem:U,selectedItemText:_,position:r,isPositioned:I,searchRef:W,children:x.jsx(nh,{as:Cr,allowPinchZoom:!0,children:x.jsx(eh,{asChild:!0,trapped:p.open,onMountAutoFocus:H=>{H.preventDefault()},onUnmountAutoFocus:X(o,H=>{var oe;(oe=p.trigger)==null||oe.focus({preventScroll:!0}),H.preventDefault()}),children:x.jsx(Vl,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:H=>H.preventDefault(),onDismiss:()=>p.onOpenChange(!1),children:x.jsx(ft,{role:"listbox",id:p.contentId,"data-state":p.open?"open":"closed",dir:p.dir,onContextMenu:H=>H.preventDefault(),...m,...Me,onPlaced:()=>B(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...m.style},onKeyDown:X(m.onKeyDown,H=>{const oe=H.ctrlKey||H.altKey||H.metaKey;if(H.key==="Tab"&&H.preventDefault(),!oe&&H.key.length===1&&K(H.key),["ArrowUp","ArrowDown","Home","End"].includes(H.key)){let V=N().filter(z=>!z.disabled).map(z=>z.ref.current);if(["ArrowUp","End"].includes(H.key)&&(V=V.slice().reverse()),["ArrowUp","ArrowDown"].includes(H.key)){const z=H.target,A=V.indexOf(z);V=V.slice(A+1)}setTimeout(()=>$(V)),H.preventDefault()}})})})})})})});CS.displayName=sD;var aD="SelectItemAlignedPosition",TS=g.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=er(kr,n),s=tr(kr,n),[a,l]=g.useState(null),[u,c]=g.useState(null),f=de(t,E=>c(E)),d=Jl(n),h=g.useRef(!1),v=g.useRef(!0),{viewport:y,selectedItem:S,selectedItemText:m,focusSelectedItem:p}=s,w=g.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&u&&y&&S&&m){const E=i.trigger.getBoundingClientRect(),k=u.getBoundingClientRect(),b=i.valueNode.getBoundingClientRect(),_=m.getBoundingClientRect();if(i.dir!=="rtl"){const z=_.left-k.left,A=b.left-z,re=E.left-A,Q=E.width+re,Se=Math.max(Q,k.width),Ce=window.innerWidth-Qt,Je=Xg(A,[Qt,Ce-Se]);a.style.minWidth=Q+"px",a.style.left=Je+"px"}else{const z=k.right-_.right,A=window.innerWidth-b.right-z,re=window.innerWidth-E.right-A,Q=E.width+re,Se=Math.max(Q,k.width),Ce=window.innerWidth-Qt,Je=Xg(A,[Qt,Ce-Se]);a.style.minWidth=Q+"px",a.style.right=Je+"px"}const M=d(),N=window.innerHeight-Qt*2,I=y.scrollHeight,B=window.getComputedStyle(u),j=parseInt(B.borderTopWidth,10),$=parseInt(B.paddingTop,10),U=parseInt(B.borderBottomWidth,10),R=parseInt(B.paddingBottom,10),L=j+$+I+R+U,W=Math.min(S.offsetHeight*5,L),K=window.getComputedStyle(y),ie=parseInt(K.paddingTop,10),ct=parseInt(K.paddingBottom,10),Ee=E.top+E.height/2-Qt,ft=N-Ee,Me=S.offsetHeight/2,H=S.offsetTop+Me,oe=j+$+H,O=L-oe;if(oe<=Ee){const z=S===M[M.length-1].ref.current;a.style.bottom="0px";const A=u.clientHeight-y.offsetTop-y.offsetHeight,re=Math.max(ft,Me+(z?ct:0)+A+U),Q=oe+re;a.style.height=Q+"px"}else{const z=S===M[0].ref.current;a.style.top="0px";const re=Math.max(Ee,j+y.offsetTop+(z?ie:0)+Me)+O;a.style.height=re+"px",y.scrollTop=oe-Ee+y.offsetTop}a.style.margin=`${Qt}px 0`,a.style.minHeight=W+"px",a.style.maxHeight=N+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[d,i.trigger,i.valueNode,a,u,y,S,m,i.dir,r]);We(()=>w(),[w]);const[C,T]=g.useState();We(()=>{u&&T(window.getComputedStyle(u).zIndex)},[u]);const P=g.useCallback(E=>{E&&v.current===!0&&(w(),p==null||p(),v.current=!1)},[w,p]);return x.jsx(uD,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:P,children:x.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:x.jsx(J.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});TS.displayName=aD;var lD="SelectPopperPosition",If=g.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Qt,...i}=e,s=eu(n);return x.jsx(fS,{...s,...i,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});If.displayName=lD;var[uD,Wh]=Go(kr,{}),jf="SelectViewport",PS=g.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,i=tr(jf,n),s=Wh(jf,n),a=de(t,i.onViewportChange),l=g.useRef(0);return x.jsxs(x.Fragment,{children:[x.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),x.jsx(ql.Slot,{scope:n,children:x.jsx(J.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"auto",...o.style},onScroll:X(o.onScroll,u=>{const c=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:d}=s;if(d!=null&&d.current&&f){const h=Math.abs(l.current-c.scrollTop);if(h>0){const v=window.innerHeight-Qt*2,y=parseFloat(f.style.minHeight),S=parseFloat(f.style.height),m=Math.max(y,S);if(m0?C:0,f.style.justifyContent="flex-end")}}}l.current=c.scrollTop})})})]})});PS.displayName=jf;var kS="SelectGroup",[cD,fD]=Go(kS),ES=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=on();return x.jsx(cD,{scope:n,id:o,children:x.jsx(J.div,{role:"group","aria-labelledby":o,...r,ref:t})})});ES.displayName=kS;var _S="SelectLabel",bS=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=fD(_S,n);return x.jsx(J.div,{id:o.id,...r,ref:t})});bS.displayName=_S;var al="SelectItem",[dD,AS]=Go(al),MS=g.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...s}=e,a=er(al,n),l=tr(al,n),u=a.value===r,[c,f]=g.useState(i??""),[d,h]=g.useState(!1),v=de(t,m=>{var p;return(p=l.itemRefCallback)==null?void 0:p.call(l,m,r,o)}),y=on(),S=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return x.jsx(dD,{scope:n,value:r,disabled:o,textId:y,isSelected:u,onItemTextChange:g.useCallback(m=>{f(p=>p||((m==null?void 0:m.textContent)??"").trim())},[]),children:x.jsx(ql.ItemSlot,{scope:n,value:r,disabled:o,textValue:c,children:x.jsx(J.div,{role:"option","aria-labelledby":y,"data-highlighted":d?"":void 0,"aria-selected":u&&d,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:v,onFocus:X(s.onFocus,()=>h(!0)),onBlur:X(s.onBlur,()=>h(!1)),onPointerUp:X(s.onPointerUp,S),onPointerMove:X(s.onPointerMove,m=>{var p;o?(p=l.onItemLeave)==null||p.call(l):m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:X(s.onPointerLeave,m=>{var p;m.currentTarget===document.activeElement&&((p=l.onItemLeave)==null||p.call(l))}),onKeyDown:X(s.onKeyDown,m=>{var w;((w=l.searchRef)==null?void 0:w.current)!==""&&m.key===" "||(JN.includes(m.key)&&S(),m.key===" "&&m.preventDefault())})})})})});MS.displayName=al;var pi="SelectItemText",RS=g.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,s=er(pi,n),a=tr(pi,n),l=AS(pi,n),u=rD(pi,n),[c,f]=g.useState(null),d=de(t,m=>f(m),l.onItemTextChange,m=>{var p;return(p=a.itemTextRefCallback)==null?void 0:p.call(a,m,l.value,l.disabled)}),h=c==null?void 0:c.textContent,v=g.useMemo(()=>x.jsx("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:y,onNativeOptionRemove:S}=u;return We(()=>(y(v),()=>S(v)),[y,S,v]),x.jsxs(x.Fragment,{children:[x.jsx(J.span,{id:l.textId,...i,ref:d}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Rr.createPortal(i.children,s.valueNode):null]})});RS.displayName=pi;var NS="SelectItemIndicator",DS=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return AS(NS,n).isSelected?x.jsx(J.span,{"aria-hidden":!0,...r,ref:t}):null});DS.displayName=NS;var Ff="SelectScrollUpButton",LS=g.forwardRef((e,t)=>{const n=tr(Ff,e.__scopeSelect),r=Wh(Ff,e.__scopeSelect),[o,i]=g.useState(!1),s=de(t,r.onScrollButtonChange);return We(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=l.scrollTop>0;i(u)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?x.jsx(IS,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});LS.displayName=Ff;var Vf="SelectScrollDownButton",OS=g.forwardRef((e,t)=>{const n=tr(Vf,e.__scopeSelect),r=Wh(Vf,e.__scopeSelect),[o,i]=g.useState(!1),s=de(t,r.onScrollButtonChange);return We(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=l.scrollHeight-l.clientHeight,c=Math.ceil(l.scrollTop)l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?x.jsx(IS,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});OS.displayName=Vf;var IS=g.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=tr("SelectScrollButton",n),s=g.useRef(null),a=Jl(n),l=g.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return g.useEffect(()=>()=>l(),[l]),We(()=>{var c;const u=a().find(f=>f.ref.current===document.activeElement);(c=u==null?void 0:u.ref.current)==null||c.scrollIntoView({block:"nearest"})},[a]),x.jsx(J.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:X(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:X(o.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:X(o.onPointerLeave,()=>{l()})})}),hD="SelectSeparator",jS=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return x.jsx(J.div,{"aria-hidden":!0,...r,ref:t})});jS.displayName=hD;var $f="SelectArrow",pD=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=eu(n),i=er($f,n),s=tr($f,n);return i.open&&s.position==="popper"?x.jsx(dS,{...o,...r,ref:t}):null});pD.displayName=$f;function FS(e){return e===""||e===void 0}var VS=g.forwardRef((e,t)=>{const{value:n,...r}=e,o=g.useRef(null),i=de(t,o),s=XN(n);return g.useEffect(()=>{const a=o.current,l=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==n&&c){const f=new Event("change",{bubbles:!0});c.call(a,n),a.dispatchEvent(f)}},[s,n]),x.jsx(Bh,{asChild:!0,children:x.jsx("select",{...r,ref:i,defaultValue:n})})});VS.displayName="BubbleSelect";function $S(e){const t=Bt(e),n=g.useRef(""),r=g.useRef(0),o=g.useCallback(s=>{const a=n.current+s;t(a),function l(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),i=g.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return g.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function zS(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let s=mD(e,Math.max(i,0));o.length===1&&(s=s.filter(u=>u!==n));const l=s.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function mD(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var gD=hS,US=mS,vD=vS,yD=yS,wD=wS,BS=xS,xD=PS,SD=ES,WS=bS,HS=MS,CD=RS,TD=DS,GS=LS,KS=OS,YS=jS;const PD=gD,kD=SD,ED=vD,XS=g.forwardRef(({className:e,children:t,...n},r)=>x.jsxs(US,{ref:r,className:ae("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,x.jsx(yD,{asChild:!0,children:x.jsx(Z_,{className:"h-4 w-4 opacity-50"})})]}));XS.displayName=US.displayName;const QS=g.forwardRef(({className:e,...t},n)=>x.jsx(GS,{ref:n,className:ae("flex cursor-default items-center justify-center py-1",e),...t,children:x.jsx(rb,{})}));QS.displayName=GS.displayName;const ZS=g.forwardRef(({className:e,...t},n)=>x.jsx(KS,{ref:n,className:ae("flex cursor-default items-center justify-center py-1",e),...t,children:x.jsx(tb,{})}));ZS.displayName=KS.displayName;const qS=g.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>x.jsx(wD,{children:x.jsxs(BS,{ref:o,className:ae("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[x.jsx(QS,{}),x.jsx(xD,{className:ae("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),x.jsx(ZS,{})]})}));qS.displayName=BS.displayName;const JS=g.forwardRef(({className:e,...t},n)=>x.jsx(WS,{ref:n,className:ae("px-2 py-1.5 text-sm font-semibold",e),...t}));JS.displayName=WS.displayName;const eC=g.forwardRef(({className:e,children:t,...n},r)=>x.jsxs(HS,{ref:r,className:ae("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[x.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:x.jsx(TD,{children:x.jsx(J_,{className:"h-4 w-4"})})}),x.jsx(CD,{children:t})]}));eC.displayName=HS.displayName;const _D=g.forwardRef(({className:e,...t},n)=>x.jsx(YS,{ref:n,className:ae("-mx-1 my-1 h-px bg-muted",e),...t}));_D.displayName=YS.displayName;const io=g.forwardRef(({className:e,...t},n)=>x.jsx("div",{ref:n,className:ae("rounded-xl border bg-card text-card-foreground shadow",e),...t}));io.displayName="Card";const Hh=g.forwardRef(({className:e,...t},n)=>x.jsx("div",{ref:n,className:ae("flex flex-col space-y-1.5 p-6",e),...t}));Hh.displayName="CardHeader";const Gh=g.forwardRef(({className:e,...t},n)=>x.jsx("h3",{ref:n,className:ae("font-semibold leading-none tracking-tight",e),...t}));Gh.displayName="CardTitle";const bD=g.forwardRef(({className:e,...t},n)=>x.jsx("p",{ref:n,className:ae("text-sm text-muted-foreground",e),...t}));bD.displayName="CardDescription";const so=g.forwardRef(({className:e,...t},n)=>x.jsx("div",{ref:n,className:ae("p-6 pt-0",e),...t}));so.displayName="CardContent";const AD=g.forwardRef(({className:e,...t},n)=>x.jsx("div",{ref:n,className:ae("flex items-center p-6 pt-0",e),...t}));AD.displayName="CardFooter";var[tu,Vj]=Nr("Tooltip",[Zl]),nu=Zl(),tC="TooltipProvider",MD=700,zf="tooltip.open",[RD,Kh]=tu(tC),nC=e=>{const{__scopeTooltip:t,delayDuration:n=MD,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,[s,a]=g.useState(!0),l=g.useRef(!1),u=g.useRef(0);return g.useEffect(()=>{const c=u.current;return()=>window.clearTimeout(c)},[]),x.jsx(RD,{scope:t,isOpenDelayed:s,delayDuration:n,onOpen:g.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:g.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:g.useCallback(c=>{l.current=c},[]),disableHoverableContent:o,children:i})};nC.displayName=tC;var ru="Tooltip",[ND,ou]=tu(ru),rC=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:s,delayDuration:a}=e,l=Kh(ru,e.__scopeTooltip),u=nu(t),[c,f]=g.useState(null),d=on(),h=g.useRef(0),v=s??l.disableHoverableContent,y=a??l.delayDuration,S=g.useRef(!1),[m=!1,p]=_o({prop:r,defaultProp:o,onChange:E=>{E?(l.onOpen(),document.dispatchEvent(new CustomEvent(zf))):l.onClose(),i==null||i(E)}}),w=g.useMemo(()=>m?S.current?"delayed-open":"instant-open":"closed",[m]),C=g.useCallback(()=>{window.clearTimeout(h.current),S.current=!1,p(!0)},[p]),T=g.useCallback(()=>{window.clearTimeout(h.current),p(!1)},[p]),P=g.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{S.current=!0,p(!0)},y)},[y,p]);return g.useEffect(()=>()=>window.clearTimeout(h.current),[]),x.jsx(uS,{...u,children:x.jsx(ND,{scope:t,contentId:d,open:m,stateAttribute:w,trigger:c,onTriggerChange:f,onTriggerEnter:g.useCallback(()=>{l.isOpenDelayed?P():C()},[l.isOpenDelayed,P,C]),onTriggerLeave:g.useCallback(()=>{v?T():window.clearTimeout(h.current)},[T,v]),onOpen:C,onClose:T,disableHoverableContent:v,children:n})})};rC.displayName=ru;var Uf="TooltipTrigger",oC=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=ou(Uf,n),i=Kh(Uf,n),s=nu(n),a=g.useRef(null),l=de(t,a,o.onTriggerChange),u=g.useRef(!1),c=g.useRef(!1),f=g.useCallback(()=>u.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),x.jsx(cS,{asChild:!0,...s,children:x.jsx(J.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:X(e.onPointerMove,d=>{d.pointerType!=="touch"&&!c.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),c.current=!0)}),onPointerLeave:X(e.onPointerLeave,()=>{o.onTriggerLeave(),c.current=!1}),onPointerDown:X(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:X(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:X(e.onBlur,o.onClose),onClick:X(e.onClick,o.onClose)})})});oC.displayName=Uf;var DD="TooltipPortal",[$j,LD]=tu(DD,{forceMount:void 0}),No="TooltipContent",iC=g.forwardRef((e,t)=>{const n=LD(No,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,s=ou(No,e.__scopeTooltip);return x.jsx(zo,{present:r||s.open,children:s.disableHoverableContent?x.jsx(sC,{side:o,...i,ref:t}):x.jsx(OD,{side:o,...i,ref:t})})}),OD=g.forwardRef((e,t)=>{const n=ou(No,e.__scopeTooltip),r=Kh(No,e.__scopeTooltip),o=g.useRef(null),i=de(t,o),[s,a]=g.useState(null),{trigger:l,onClose:u}=n,c=o.current,{onPointerInTransitChange:f}=r,d=g.useCallback(()=>{a(null),f(!1)},[f]),h=g.useCallback((v,y)=>{const S=v.currentTarget,m={x:v.clientX,y:v.clientY},p=VD(m,S.getBoundingClientRect()),w=$D(m,p),C=zD(y.getBoundingClientRect()),T=BD([...w,...C]);a(T),f(!0)},[f]);return g.useEffect(()=>()=>d(),[d]),g.useEffect(()=>{if(l&&c){const v=S=>h(S,c),y=S=>h(S,l);return l.addEventListener("pointerleave",v),c.addEventListener("pointerleave",y),()=>{l.removeEventListener("pointerleave",v),c.removeEventListener("pointerleave",y)}}},[l,c,h,d]),g.useEffect(()=>{if(s){const v=y=>{const S=y.target,m={x:y.clientX,y:y.clientY},p=(l==null?void 0:l.contains(S))||(c==null?void 0:c.contains(S)),w=!UD(m,s);p?d():w&&(d(),u())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[l,c,s,u,d]),x.jsx(sC,{...e,ref:i})}),[ID,jD]=tu(ru,{isInside:!1}),sC=g.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...a}=e,l=ou(No,n),u=nu(n),{onClose:c}=l;return g.useEffect(()=>(document.addEventListener(zf,c),()=>document.removeEventListener(zf,c)),[c]),g.useEffect(()=>{if(l.trigger){const f=d=>{const h=d.target;h!=null&&h.contains(l.trigger)&&c()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,c]),x.jsx(Vl,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:c,children:x.jsxs(fS,{"data-state":l.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[x.jsx(ow,{children:r}),x.jsx(ID,{scope:n,isInside:!0,children:x.jsx(ZN,{id:l.contentId,role:"tooltip",children:o||r})})]})})});iC.displayName=No;var aC="TooltipArrow",FD=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=nu(n);return jD(aC,n).isInside?null:x.jsx(dS,{...o,...r,ref:t})});FD.displayName=aC;function VD(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function $D(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function zD(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function UD(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;ir!=c>r&&n<(u-a)*(r-l)/(c-l)+a&&(o=!o)}return o}function BD(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),WD(t)}function WD(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var HD=nC,GD=rC,KD=oC,lC=iC;const oc=HD,ic=GD,sc=KD,xa=g.forwardRef(({className:e,sideOffset:t=4,...n},r)=>x.jsx(lC,{ref:r,sideOffset:t,className:ae("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));xa.displayName=lC.displayName;function Sa(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function YD(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Yh(e){let t,n,r;e.length!==2?(t=Sa,n=(a,l)=>Sa(e(a),l),r=(a,l)=>e(a)-l):(t=e===Sa||e===YD?e:XD,n=e,r=e);function o(a,l,u=0,c=a.length){if(u>>1;n(a[f],l)<0?u=f+1:c=f}while(u>>1;n(a[f],l)<=0?u=f+1:c=f}while(uu&&r(a[f-1],l)>-r(a[f],l)?f-1:f}return{left:o,center:s,right:i}}function XD(){return 0}function QD(e){return e===null?NaN:+e}const ZD=Yh(Sa),qD=ZD.right;Yh(QD).center;function iv(e,t){let n,r;if(t===void 0)for(const o of e)o!=null&&(n===void 0?o>=o&&(n=r=o):(n>o&&(n=o),r=i&&(n=r=i):(n>i&&(n=i),r=JD?10:i>=eL?5:i>=tL?2:1;let a,l,u;return o<0?(u=Math.pow(10,-o)/s,a=Math.round(e*u),l=Math.round(t*u),a/ut&&--l,u=-u):(u=Math.pow(10,o)*s,a=Math.round(e/u),l=Math.round(t/u),a*ut&&--l),l0))return[];if(e===t)return[e];const r=t=o))return[];const a=i-o+1,l=new Array(a);if(r)if(s<0)for(let u=0;u+e(t)}function aL(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function lL(){return!this.__axis}function uC(e,t){var n=[],r=null,o=null,i=6,s=6,a=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,u=e===ac||e===mi?-1:1,c=e===mi||e===lc?"x":"y",f=e===ac||e===Hf?oL:iL;function d(h){var v=r??(t.ticks?t.ticks.apply(t,n):t.domain()),y=o??(t.tickFormat?t.tickFormat.apply(t,n):rL),S=Math.max(i,0)+a,m=t.range(),p=+m[0]+l,w=+m[m.length-1]+l,C=(t.bandwidth?aL:sL)(t.copy(),l),T=h.selection?h.selection():h,P=T.selectAll(".domain").data([null]),E=T.selectAll(".tick").data(v,t).order(),k=E.exit(),b=E.enter().append("g").attr("class","tick"),_=E.select("line"),M=E.select("text");P=P.merge(P.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),E=E.merge(b),_=_.merge(b.append("line").attr("stroke","currentColor").attr(c+"2",u*i)),M=M.merge(b.append("text").attr("fill","currentColor").attr(c,u*S).attr("dy",e===ac?"0em":e===Hf?"0.71em":"0.32em")),h!==T&&(P=P.transition(h),E=E.transition(h),_=_.transition(h),M=M.transition(h),k=k.transition(h).attr("opacity",sv).attr("transform",function(N){return isFinite(N=C(N))?f(N+l):this.getAttribute("transform")}),b.attr("opacity",sv).attr("transform",function(N){var I=this.parentNode.__axis;return f((I&&isFinite(I=I(N))?I:C(N))+l)})),k.remove(),P.attr("d",e===mi||e===lc?s?"M"+u*s+","+p+"H"+l+"V"+w+"H"+u*s:"M"+l+","+p+"V"+w:s?"M"+p+","+u*s+"V"+l+"H"+w+"V"+u*s:"M"+p+","+l+"H"+w),E.attr("opacity",1).attr("transform",function(N){return f(C(N)+l)}),_.attr(c+"2",u*i),M.attr(c,u*S).text(y),T.filter(lL).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===lc?"start":e===mi?"end":"middle"),T.each(function(){this.__axis=C})}return d.scale=function(h){return arguments.length?(t=h,d):t},d.ticks=function(){return n=Array.from(arguments),d},d.tickArguments=function(h){return arguments.length?(n=h==null?[]:Array.from(h),d):n.slice()},d.tickValues=function(h){return arguments.length?(r=h==null?null:Array.from(h),d):r&&r.slice()},d.tickFormat=function(h){return arguments.length?(o=h,d):o},d.tickSize=function(h){return arguments.length?(i=s=+h,d):i},d.tickSizeInner=function(h){return arguments.length?(i=+h,d):i},d.tickSizeOuter=function(h){return arguments.length?(s=+h,d):s},d.tickPadding=function(h){return arguments.length?(a=+h,d):a},d.offset=function(h){return arguments.length?(l=+h,d):l},d}function av(e){return uC(Hf,e)}function lv(e){return uC(mi,e)}var uL={value:()=>{}};function cC(){for(var e=0,t=arguments.length,n={},r;e=0&&(r=n.slice(o+1),n=n.slice(0,o)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Ca.prototype=cC.prototype={constructor:Ca,on:function(e,t){var n=this._,r=cL(e+"",n),o,i=-1,s=r.length;if(arguments.length<2){for(;++i0)for(var n=new Array(o),r=0,o,i;r=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),cv.hasOwnProperty(t)?{space:cv[t],local:e}:e}function dL(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Gf&&t.documentElement.namespaceURI===Gf?t.createElement(e):t.createElementNS(n,e)}}function hL(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function fC(e){var t=iu(e);return(t.local?hL:dL)(t)}function pL(){}function Xh(e){return e==null?pL:function(){return this.querySelector(e)}}function mL(e){typeof e!="function"&&(e=Xh(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o=w&&(w=p+1);!(T=S[w])&&++w=0;)(s=r[o])&&(i&&s.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(s,i),i=s);return this}function $L(e){e||(e=zL);function t(f,d){return f&&d?e(f.__data__,d.__data__):!f-!d}for(var n=this._groups,r=n.length,o=new Array(r),i=0;it?1:e>=t?0:NaN}function UL(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function BL(){return Array.from(this)}function WL(){for(var e=this._groups,t=0,n=e.length;t1?this.each((t==null?t3:typeof t=="function"?r3:n3)(e,t,n??"")):Do(this.node(),e)}function Do(e,t){return e.style.getPropertyValue(t)||gC(e).getComputedStyle(e,null).getPropertyValue(t)}function i3(e){return function(){delete this[e]}}function s3(e,t){return function(){this[e]=t}}function a3(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function l3(e,t){return arguments.length>1?this.each((t==null?i3:typeof t=="function"?a3:s3)(e,t)):this.node()[e]}function vC(e){return e.trim().split(/^|\s+/)}function Qh(e){return e.classList||new yC(e)}function yC(e){this._node=e,this._names=vC(e.getAttribute("class")||"")}yC.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function wC(e,t){for(var n=Qh(e),r=-1,o=t.length;++r=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function I3(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,o=t.length,i;n>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Zs(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Zs(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=H3.exec(e))?new Xe(t[1],t[2],t[3],1):(t=G3.exec(e))?new Xe(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=K3.exec(e))?Zs(t[1],t[2],t[3],t[4]):(t=Y3.exec(e))?Zs(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=X3.exec(e))?vv(t[1],t[2]/100,t[3]/100,1):(t=Q3.exec(e))?vv(t[1],t[2]/100,t[3]/100,t[4]):fv.hasOwnProperty(e)?pv(fv[e]):e==="transparent"?new Xe(NaN,NaN,NaN,0):null}function pv(e){return new Xe(e>>16&255,e>>8&255,e&255,1)}function Zs(e,t,n,r){return r<=0&&(e=t=n=NaN),new Xe(e,t,n,r)}function J3(e){return e instanceof xs||(e=Er(e)),e?(e=e.rgb(),new Xe(e.r,e.g,e.b,e.opacity)):new Xe}function Kf(e,t,n,r){return arguments.length===1?J3(e):new Xe(e,t,n,r??1)}function Xe(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Zh(Xe,Kf,TC(xs,{brighter(e){return e=e==null?cl:Math.pow(cl,e),new Xe(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?os:Math.pow(os,e),new Xe(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xe(gr(this.r),gr(this.g),gr(this.b),fl(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:mv,formatHex:mv,formatHex8:eO,formatRgb:gv,toString:gv}));function mv(){return`#${dr(this.r)}${dr(this.g)}${dr(this.b)}`}function eO(){return`#${dr(this.r)}${dr(this.g)}${dr(this.b)}${dr((isNaN(this.opacity)?1:this.opacity)*255)}`}function gv(){const e=fl(this.opacity);return`${e===1?"rgb(":"rgba("}${gr(this.r)}, ${gr(this.g)}, ${gr(this.b)}${e===1?")":`, ${e})`}`}function fl(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function gr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function dr(e){return e=gr(e),(e<16?"0":"")+e.toString(16)}function vv(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Et(e,t,n,r)}function PC(e){if(e instanceof Et)return new Et(e.h,e.s,e.l,e.opacity);if(e instanceof xs||(e=Er(e)),!e)return new Et;if(e instanceof Et)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),s=NaN,a=i-o,l=(i+o)/2;return a?(t===i?s=(n-r)/a+(n0&&l<1?0:s,new Et(s,a,l,e.opacity)}function tO(e,t,n,r){return arguments.length===1?PC(e):new Et(e,t,n,r??1)}function Et(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Zh(Et,tO,TC(xs,{brighter(e){return e=e==null?cl:Math.pow(cl,e),new Et(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?os:Math.pow(os,e),new Et(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new Xe(uc(e>=240?e-240:e+120,o,r),uc(e,o,r),uc(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new Et(yv(this.h),qs(this.s),qs(this.l),fl(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=fl(this.opacity);return`${e===1?"hsl(":"hsla("}${yv(this.h)}, ${qs(this.s)*100}%, ${qs(this.l)*100}%${e===1?")":`, ${e})`}`}}));function yv(e){return e=(e||0)%360,e<0?e+360:e}function qs(e){return Math.max(0,Math.min(1,e||0))}function uc(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const qh=e=>()=>e;function nO(e,t){return function(n){return e+n*t}}function rO(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function oO(e){return(e=+e)==1?kC:function(t,n){return n-t?rO(t,n,e):qh(isNaN(t)?n:t)}}function kC(e,t){var n=t-e;return n?nO(e,n):qh(isNaN(e)?t:e)}const dl=function e(t){var n=oO(t);function r(o,i){var s=n((o=Kf(o)).r,(i=Kf(i)).r),a=n(o.g,i.g),l=n(o.b,i.b),u=kC(o.opacity,i.opacity);return function(c){return o.r=s(c),o.g=a(c),o.b=l(c),o.opacity=u(c),o+""}}return r.gamma=e,r}(1);function iO(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),o;return function(i){for(o=0;on&&(i=t.slice(n,i),a[s]?a[s]+=i:a[++s]=i),(r=r[0])===(o=o[0])?a[s]?a[s]+=o:a[++s]=o:(a[++s]=null,l.push({i:s,x:kt(r,o)})),n=cc.lastIndex;return n180?c+=360:c-u>180&&(u+=360),d.push({i:f.push(o(f)+"rotate(",null,r)-2,x:kt(u,c)})):c&&f.push(o(f)+"rotate("+c+r)}function a(u,c,f,d){u!==c?d.push({i:f.push(o(f)+"skewX(",null,r)-2,x:kt(u,c)}):c&&f.push(o(f)+"skewX("+c+r)}function l(u,c,f,d,h,v){if(u!==f||c!==d){var y=h.push(o(h)+"scale(",null,",",null,")");v.push({i:y-4,x:kt(u,f)},{i:y-2,x:kt(c,d)})}else(f!==1||d!==1)&&h.push(o(h)+"scale("+f+","+d+")")}return function(u,c){var f=[],d=[];return u=e(u),c=e(c),i(u.translateX,u.translateY,c.translateX,c.translateY,f,d),s(u.rotate,c.rotate,f,d),a(u.skewX,c.skewX,f,d),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,f,d),u=c=null,function(h){for(var v=-1,y=d.length,S;++v=0&&e._call.call(void 0,t),e=e._next;--Lo}function xv(){_r=(pl=ss.now())+su,Lo=gi=0;try{yO()}finally{Lo=0,xO(),_r=0}}function wO(){var e=ss.now(),t=e-pl;t>AC&&(su-=t,pl=e)}function xO(){for(var e,t=hl,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:hl=n);vi=e,Qf(r)}function Qf(e){if(!Lo){gi&&(gi=clearTimeout(gi));var t=e-_r;t>24?(e<1/0&&(gi=setTimeout(xv,e-ss.now()-su)),oi&&(oi=clearInterval(oi))):(oi||(pl=ss.now(),oi=setInterval(wO,AC)),Lo=1,MC(xv))}}function Sv(e,t,n){var r=new ml;return t=t==null?0:+t,r.restart(o=>{r.stop(),e(o+t)},t,n),r}var SO=cC("start","end","cancel","interrupt"),CO=[],NC=0,Cv=1,Zf=2,Ta=3,Tv=4,qf=5,Pa=6;function au(e,t,n,r,o,i){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;TO(e,n,{name:t,index:r,group:o,on:SO,tween:CO,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:NC})}function tp(e,t){var n=Dt(e,t);if(n.state>NC)throw new Error("too late; already scheduled");return n}function Ht(e,t){var n=Dt(e,t);if(n.state>Ta)throw new Error("too late; already running");return n}function Dt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function TO(e,t,n){var r=e.__transition,o;r[t]=n,n.timer=RC(i,0,n.time);function i(u){n.state=Cv,n.timer.restart(s,n.delay,n.time),n.delay<=u&&s(u-n.delay)}function s(u){var c,f,d,h;if(n.state!==Cv)return l();for(c in r)if(h=r[c],h.name===n.name){if(h.state===Ta)return Sv(s);h.state===Tv?(h.state=Pa,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete r[c]):+cZf&&r.state=0&&(t=t.slice(0,n)),!t||t==="start"})}function eI(e,t,n){var r,o,i=JO(t)?tp:Ht;return function(){var s=i(this,e),a=s.on;a!==r&&(o=(r=a).copy()).on(t,n),s.on=o}}function tI(e,t){var n=this._id;return arguments.length<2?Dt(this.node(),n).on.on(e):this.each(eI(n,e,t))}function nI(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function rI(){return this.on("end.remove",nI(this._id))}function oI(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Xh(e));for(var r=this._groups,o=r.length,i=new Array(o),s=0;s=0))throw new Error(`invalid digits: ${e}`);if(t>15)return IC;const n=10**t;return function(r){this._+=r[0];for(let o=1,i=r.length;oar)if(!(Math.abs(f*l-u*c)>ar)||!i)this._append`L${this._x1=t},${this._y1=n}`;else{let h=r-s,v=o-a,y=l*l+u*u,S=h*h+v*v,m=Math.sqrt(y),p=Math.sqrt(d),w=i*Math.tan((Jf-Math.acos((y+d-S)/(2*m*p)))/2),C=w/p,T=w/m;Math.abs(C-1)>ar&&this._append`L${t+C*c},${n+C*f}`,this._append`A${i},${i},0,0,${+(f*h>c*v)},${this._x1=t+T*l},${this._y1=n+T*u}`}}arc(t,n,r,o,i,s){if(t=+t,n=+n,r=+r,s=!!s,r<0)throw new Error(`negative radius: ${r}`);let a=r*Math.cos(o),l=r*Math.sin(o),u=t+a,c=n+l,f=1^s,d=s?o-i:i-o;this._x1===null?this._append`M${u},${c}`:(Math.abs(this._x1-u)>ar||Math.abs(this._y1-c)>ar)&&this._append`L${u},${c}`,r&&(d<0&&(d=d%ed+ed),d>AI?this._append`A${r},${r},0,1,${f},${t-a},${n-l}A${r},${r},0,1,${f},${this._x1=u},${this._y1=c}`:d>ar&&this._append`A${r},${r},0,${+(d>=Jf)},${f},${this._x1=t+r*Math.cos(i)},${this._y1=n+r*Math.sin(i)}`)}rect(t,n,r,o){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+o}h${-r}Z`}toString(){return this._}}function NI(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function gl(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Oo(e){return e=gl(Math.abs(e)),e?e[1]:NaN}function DI(e,t){return function(n,r){for(var o=n.length,i=[],s=0,a=e[0],l=0;o>0&&a>0&&(l+a+1>r&&(a=Math.max(1,r-l)),i.push(n.substring(o-=a,o+a)),!((l+=a+1)>r));)a=e[s=(s+1)%e.length];return i.reverse().join(t)}}function LI(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var OI=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function vl(e){if(!(t=OI.exec(e)))throw new Error("invalid format: "+e);var t;return new rp({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}vl.prototype=rp.prototype;function rp(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}rp.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function II(e){e:for(var t=e.length,n=1,r=-1,o;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(o+1):e}var jC;function jI(e,t){var n=gl(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(jC=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,s=r.length;return i===s?r:i>s?r+new Array(i-s+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+gl(e,Math.max(0,t+i-1))[0]}function Pv(e,t){var n=gl(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}const kv={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:NI,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Pv(e*100,t),r:Pv,s:jI,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Ev(e){return e}var _v=Array.prototype.map,bv=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function FI(e){var t=e.grouping===void 0||e.thousands===void 0?Ev:DI(_v.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",o=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?Ev:LI(_v.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",a=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(f){f=vl(f);var d=f.fill,h=f.align,v=f.sign,y=f.symbol,S=f.zero,m=f.width,p=f.comma,w=f.precision,C=f.trim,T=f.type;T==="n"?(p=!0,T="g"):kv[T]||(w===void 0&&(w=12),C=!0,T="g"),(S||d==="0"&&h==="=")&&(S=!0,d="0",h="=");var P=y==="$"?n:y==="#"&&/[boxX]/.test(T)?"0"+T.toLowerCase():"",E=y==="$"?r:/[%p]/.test(T)?s:"",k=kv[T],b=/[defgprs%]/.test(T);w=w===void 0?6:/[gprs]/.test(T)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function _(M){var N=P,I=E,B,j,$;if(T==="c")I=k(M)+I,M="";else{M=+M;var U=M<0||1/M<0;if(M=isNaN(M)?l:k(Math.abs(M),w),C&&(M=II(M)),U&&+M==0&&v!=="+"&&(U=!1),N=(U?v==="("?v:a:v==="-"||v==="("?"":v)+N,I=(T==="s"?bv[8+jC/3]:"")+I+(U&&v==="("?")":""),b){for(B=-1,j=M.length;++B$||$>57){I=($===46?o+M.slice(B+1):M.slice(B))+I,M=M.slice(0,B);break}}}p&&!S&&(M=t(M,1/0));var R=N.length+M.length+I.length,L=R>1)+N+M+I+L.slice(R);break;default:M=L+N+M+I;break}return i(M)}return _.toString=function(){return f+""},_}function c(f,d){var h=u((f=vl(f),f.type="f",f)),v=Math.max(-8,Math.min(8,Math.floor(Oo(d)/3)))*3,y=Math.pow(10,-v),S=bv[8+v/3];return function(m){return h(y*m)+S}}return{format:u,formatPrefix:c}}var ea,FC,VC;VI({thousands:",",grouping:[3],currency:["$",""]});function VI(e){return ea=FI(e),FC=ea.format,VC=ea.formatPrefix,ea}function $I(e){return Math.max(0,-Oo(Math.abs(e)))}function zI(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Oo(t)/3)))*3-Oo(Math.abs(e)))}function UI(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Oo(t)-Oo(e))+1}function $C(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function BI(e){return function(){return e}}function WI(e){return+e}var Av=[0,1];function ao(e){return e}function td(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:BI(isNaN(t)?NaN:.5)}function HI(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function GI(e,t,n){var r=e[0],o=e[1],i=t[0],s=t[1];return o2?KI:GI,l=u=null,f}function f(d){return d==null||isNaN(d=+d)?i:(l||(l=a(e.map(r),t,n)))(r(s(d)))}return f.invert=function(d){return s(o((u||(u=a(t,e.map(r),kt)))(d)))},f.domain=function(d){return arguments.length?(e=Array.from(d,WI),c()):e.slice()},f.range=function(d){return arguments.length?(t=Array.from(d),c()):t.slice()},f.rangeRound=function(d){return t=Array.from(d),n=dO,c()},f.clamp=function(d){return arguments.length?(s=d?!0:ao,c()):s!==ao},f.interpolate=function(d){return arguments.length?(n=d,c()):n},f.unknown=function(d){return arguments.length?(i=d,f):i},function(d,h){return r=d,o=h,c()}}function UC(){return YI()(ao,ao)}function XI(e,t,n,r){var o=Wf(e,t,n),i;switch(r=vl(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=zI(o,s))&&(r.precision=i),VC(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=UI(o,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=$I(o))&&(r.precision=i-(r.type==="%")*2);break}}return FC(r)}function QI(e){var t=e.domain;return e.ticks=function(n){var r=t();return nL(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var o=t();return XI(o[0],o[o.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),o=0,i=r.length-1,s=r[o],a=r[i],l,u,c=10;for(a0;){if(u=Bf(s,a,n),u===l)return r[o]=s,r[i]=a,t(r);if(u>0)s=Math.floor(s/u)*u,a=Math.ceil(a/u)*u;else if(u<0)s=Math.ceil(s*u)/u,a=Math.floor(a*u)/u;else break;l=u}return e},e}function BC(){var e=UC();return e.copy=function(){return zC(e,BC())},$C.apply(e,arguments),QI(e)}function ZI(e,t){e=e.slice();var n=0,r=e.length-1,o=e[n],i=e[r],s;return i(e(i=new Date(+i)),i),o.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),o.round=i=>{const s=o(i),a=o.ceil(i);return i-s(t(i=new Date(+i),s==null?1:Math.floor(s)),i),o.range=(i,s,a)=>{const l=[];if(i=o.ceil(i),a=a==null?1:Math.floor(a),!(i0))return l;let u;do l.push(u=new Date(+i)),t(i,a),e(i);while(uke(s=>{if(s>=s)for(;e(s),!i(s);)s.setTime(s-1)},(s,a)=>{if(s>=s)if(a<0)for(;++a<=0;)for(;t(s,-1),!i(s););else for(;--a>=0;)for(;t(s,1),!i(s););}),n&&(o.count=(i,s)=>(fc.setTime(+i),dc.setTime(+s),e(fc),e(dc),Math.floor(n(fc,dc))),o.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?o.filter(r?s=>r(s)%i===0:s=>o.count(0,s)%i===0):o)),o}const yl=ke(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);yl.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?ke(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):yl);yl.range;const tn=1e3,vt=tn*60,nn=vt*60,wn=nn*24,op=wn*7,Mv=wn*30,hc=wn*365,lo=ke(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*tn)},(e,t)=>(t-e)/tn,e=>e.getUTCSeconds());lo.range;const ip=ke(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*tn)},(e,t)=>{e.setTime(+e+t*vt)},(e,t)=>(t-e)/vt,e=>e.getMinutes());ip.range;const qI=ke(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*vt)},(e,t)=>(t-e)/vt,e=>e.getUTCMinutes());qI.range;const sp=ke(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*tn-e.getMinutes()*vt)},(e,t)=>{e.setTime(+e+t*nn)},(e,t)=>(t-e)/nn,e=>e.getHours());sp.range;const JI=ke(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*nn)},(e,t)=>(t-e)/nn,e=>e.getUTCHours());JI.range;const Ss=ke(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*vt)/wn,e=>e.getDate()-1);Ss.range;const ap=ke(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/wn,e=>e.getUTCDate()-1);ap.range;const e5=ke(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/wn,e=>Math.floor(e/wn));e5.range;function Lr(e){return ke(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*vt)/op)}const lu=Lr(0),wl=Lr(1),t5=Lr(2),n5=Lr(3),Io=Lr(4),r5=Lr(5),o5=Lr(6);lu.range;wl.range;t5.range;n5.range;Io.range;r5.range;o5.range;function Or(e){return ke(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/op)}const WC=Or(0),xl=Or(1),i5=Or(2),s5=Or(3),jo=Or(4),a5=Or(5),l5=Or(6);WC.range;xl.range;i5.range;s5.range;jo.range;a5.range;l5.range;const lp=ke(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());lp.range;const u5=ke(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());u5.range;const xn=ke(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());xn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ke(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});xn.range;const br=ke(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());br.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ke(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});br.range;function c5(e,t,n,r,o,i){const s=[[lo,1,tn],[lo,5,5*tn],[lo,15,15*tn],[lo,30,30*tn],[i,1,vt],[i,5,5*vt],[i,15,15*vt],[i,30,30*vt],[o,1,nn],[o,3,3*nn],[o,6,6*nn],[o,12,12*nn],[r,1,wn],[r,2,2*wn],[n,1,op],[t,1,Mv],[t,3,3*Mv],[e,1,hc]];function a(u,c,f){const d=cS).right(s,d);if(h===s.length)return e.every(Wf(u/hc,c/hc,f));if(h===0)return yl.every(Math.max(Wf(u,c,f),1));const[v,y]=s[d/s[h-1][2]53)return null;"w"in A||(A.w=1),"Z"in A?(Q=mc(ii(A.y,0,1)),Se=Q.getUTCDay(),Q=Se>4||Se===0?xl.ceil(Q):xl(Q),Q=ap.offset(Q,(A.V-1)*7),A.y=Q.getUTCFullYear(),A.m=Q.getUTCMonth(),A.d=Q.getUTCDate()+(A.w+6)%7):(Q=pc(ii(A.y,0,1)),Se=Q.getDay(),Q=Se>4||Se===0?wl.ceil(Q):wl(Q),Q=Ss.offset(Q,(A.V-1)*7),A.y=Q.getFullYear(),A.m=Q.getMonth(),A.d=Q.getDate()+(A.w+6)%7)}else("W"in A||"U"in A)&&("w"in A||(A.w="u"in A?A.u%7:"W"in A?1:0),Se="Z"in A?mc(ii(A.y,0,1)).getUTCDay():pc(ii(A.y,0,1)).getDay(),A.m=0,A.d="W"in A?(A.w+6)%7+A.W*7-(Se+5)%7:A.w+A.U*7-(Se+6)%7);return"Z"in A?(A.H+=A.Z/100|0,A.M+=A.Z%100,mc(A)):pc(A)}}function k(O,V,z,A){for(var re=0,Q=V.length,Se=z.length,Ce,Je;re=Se)return-1;if(Ce=V.charCodeAt(re++),Ce===37){if(Ce=V.charAt(re++),Je=T[Ce in Rv?V.charAt(re++):Ce],!Je||(A=Je(O,z,A))<0)return-1}else if(Ce!=z.charCodeAt(A++))return-1}return A}function b(O,V,z){var A=u.exec(V.slice(z));return A?(O.p=c.get(A[0].toLowerCase()),z+A[0].length):-1}function _(O,V,z){var A=h.exec(V.slice(z));return A?(O.w=v.get(A[0].toLowerCase()),z+A[0].length):-1}function M(O,V,z){var A=f.exec(V.slice(z));return A?(O.w=d.get(A[0].toLowerCase()),z+A[0].length):-1}function N(O,V,z){var A=m.exec(V.slice(z));return A?(O.m=p.get(A[0].toLowerCase()),z+A[0].length):-1}function I(O,V,z){var A=y.exec(V.slice(z));return A?(O.m=S.get(A[0].toLowerCase()),z+A[0].length):-1}function B(O,V,z){return k(O,t,V,z)}function j(O,V,z){return k(O,n,V,z)}function $(O,V,z){return k(O,r,V,z)}function U(O){return s[O.getDay()]}function R(O){return i[O.getDay()]}function L(O){return l[O.getMonth()]}function W(O){return a[O.getMonth()]}function K(O){return o[+(O.getHours()>=12)]}function ie(O){return 1+~~(O.getMonth()/3)}function ct(O){return s[O.getUTCDay()]}function Ee(O){return i[O.getUTCDay()]}function ft(O){return l[O.getUTCMonth()]}function Me(O){return a[O.getUTCMonth()]}function H(O){return o[+(O.getUTCHours()>=12)]}function oe(O){return 1+~~(O.getUTCMonth()/3)}return{format:function(O){var V=P(O+="",w);return V.toString=function(){return O},V},parse:function(O){var V=E(O+="",!1);return V.toString=function(){return O},V},utcFormat:function(O){var V=P(O+="",C);return V.toString=function(){return O},V},utcParse:function(O){var V=E(O+="",!0);return V.toString=function(){return O},V}}}var Rv={"-":"",_:" ",0:"0"},Ae=/^\s*\d+/,p5=/^%/,m5=/[\\^$*+?|[\]().{}]/g;function ee(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i[t.toLowerCase(),n]))}function v5(e,t,n){var r=Ae.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function y5(e,t,n){var r=Ae.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function w5(e,t,n){var r=Ae.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function x5(e,t,n){var r=Ae.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function S5(e,t,n){var r=Ae.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Nv(e,t,n){var r=Ae.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Dv(e,t,n){var r=Ae.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function C5(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function T5(e,t,n){var r=Ae.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function P5(e,t,n){var r=Ae.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Lv(e,t,n){var r=Ae.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function k5(e,t,n){var r=Ae.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Ov(e,t,n){var r=Ae.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function E5(e,t,n){var r=Ae.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function _5(e,t,n){var r=Ae.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function b5(e,t,n){var r=Ae.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function A5(e,t,n){var r=Ae.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function M5(e,t,n){var r=p5.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function R5(e,t,n){var r=Ae.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function N5(e,t,n){var r=Ae.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Iv(e,t){return ee(e.getDate(),t,2)}function D5(e,t){return ee(e.getHours(),t,2)}function L5(e,t){return ee(e.getHours()%12||12,t,2)}function O5(e,t){return ee(1+Ss.count(xn(e),e),t,3)}function HC(e,t){return ee(e.getMilliseconds(),t,3)}function I5(e,t){return HC(e,t)+"000"}function j5(e,t){return ee(e.getMonth()+1,t,2)}function F5(e,t){return ee(e.getMinutes(),t,2)}function V5(e,t){return ee(e.getSeconds(),t,2)}function $5(e){var t=e.getDay();return t===0?7:t}function z5(e,t){return ee(lu.count(xn(e)-1,e),t,2)}function GC(e){var t=e.getDay();return t>=4||t===0?Io(e):Io.ceil(e)}function U5(e,t){return e=GC(e),ee(Io.count(xn(e),e)+(xn(e).getDay()===4),t,2)}function B5(e){return e.getDay()}function W5(e,t){return ee(wl.count(xn(e)-1,e),t,2)}function H5(e,t){return ee(e.getFullYear()%100,t,2)}function G5(e,t){return e=GC(e),ee(e.getFullYear()%100,t,2)}function K5(e,t){return ee(e.getFullYear()%1e4,t,4)}function Y5(e,t){var n=e.getDay();return e=n>=4||n===0?Io(e):Io.ceil(e),ee(e.getFullYear()%1e4,t,4)}function X5(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ee(t/60|0,"0",2)+ee(t%60,"0",2)}function jv(e,t){return ee(e.getUTCDate(),t,2)}function Q5(e,t){return ee(e.getUTCHours(),t,2)}function Z5(e,t){return ee(e.getUTCHours()%12||12,t,2)}function q5(e,t){return ee(1+ap.count(br(e),e),t,3)}function KC(e,t){return ee(e.getUTCMilliseconds(),t,3)}function J5(e,t){return KC(e,t)+"000"}function ej(e,t){return ee(e.getUTCMonth()+1,t,2)}function tj(e,t){return ee(e.getUTCMinutes(),t,2)}function nj(e,t){return ee(e.getUTCSeconds(),t,2)}function rj(e){var t=e.getUTCDay();return t===0?7:t}function oj(e,t){return ee(WC.count(br(e)-1,e),t,2)}function YC(e){var t=e.getUTCDay();return t>=4||t===0?jo(e):jo.ceil(e)}function ij(e,t){return e=YC(e),ee(jo.count(br(e),e)+(br(e).getUTCDay()===4),t,2)}function sj(e){return e.getUTCDay()}function aj(e,t){return ee(xl.count(br(e)-1,e),t,2)}function lj(e,t){return ee(e.getUTCFullYear()%100,t,2)}function uj(e,t){return e=YC(e),ee(e.getUTCFullYear()%100,t,2)}function cj(e,t){return ee(e.getUTCFullYear()%1e4,t,4)}function fj(e,t){var n=e.getUTCDay();return e=n>=4||n===0?jo(e):jo.ceil(e),ee(e.getUTCFullYear()%1e4,t,4)}function dj(){return"+0000"}function Fv(){return"%"}function Vv(e){return+e}function $v(e){return Math.floor(+e/1e3)}var $r,up;hj({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function hj(e){return $r=h5(e),up=$r.format,$r.parse,$r.utcFormat,$r.utcParse,$r}function pj(e){return new Date(e)}function mj(e){return e instanceof Date?+e:+new Date(+e)}function XC(e,t,n,r,o,i,s,a,l,u){var c=UC(),f=c.invert,d=c.domain,h=u(".%L"),v=u(":%S"),y=u("%I:%M"),S=u("%I %p"),m=u("%a %d"),p=u("%b %d"),w=u("%B"),C=u("%Y");function T(P){return(l(P)=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new RI(t)}function xj(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function QC(e){this._context=e}QC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Sj(e){return new QC(e)}function Cj(e){return e[0]}function Tj(e){return e[1]}function Pj(e,t){var n=zr(!0),r=null,o=Sj,i=null,s=wj(a);e=typeof e=="function"?e:e===void 0?Cj:zr(e),t=typeof t=="function"?t:t===void 0?Tj:zr(t);function a(l){var u,c=(l=xj(l)).length,f,d=!1,h;for(r==null&&(i=o(h=s())),u=0;u<=c;++u)!(u{const t=g.useRef(),[n,r]=g.useState({}),o={top:50,right:80,bottom:70,left:70},i=750;return g.useEffect(()=>{r(s=>{const a={...s};return Object.entries(e).forEach(([l,u])=>{const c=a[l]||[],f=[...c,...u.filter(d=>!c.some(h=>h.time===d.time))];a[l]=f}),a})},[e]),g.useEffect(()=>{if(Object.keys(n).length===0)return;const s=t.current,l=s.parentElement.clientWidth||800,u=500,c=l-o.left-o.right,f=u-o.top-o.bottom;Qs(s).selectAll("*").remove();const h=Qs(s).attr("width",l).attr("height",u).append("g").attr("transform",`translate(${o.left},${o.top})`),y=Object.entries(n).flatMap(([b,_])=>_.map(M=>({...M,stock:b}))).filter(b=>{const _=b.time&&!isNaN(new Date(b.time).getTime()),M=b.price!=null&&!isNaN(b.price);return _&&M});if(y.length===0)return;const S=gj().range([0,c]),m=iv(y,b=>new Date(b.time));S.domain(m);const p=iv(y,b=>b.price),w=BC().domain([p[0]-(p[1]-p[0])*.1,p[1]+(p[1]-p[0])*.1]).range([f,0]),C=av(S).ticks(5).tickFormat(up("%H:%M:%S")),T=av(S).ticks(5).tickSize(-f).tickFormat("");h.append("g").attr("class","x-axis-grid").attr("transform",`translate(0,${f})`).call(T).selectAll("line").attr("stroke","#e0e0e0"),h.append("g").attr("class","x-axis").attr("transform",`translate(0,${f})`).call(C);const P=lv(w).ticks(5).tickFormat(b=>`$${b.toFixed(2)}`),E=lv(w).ticks(5).tickSize(-c).tickFormat("");h.append("g").attr("class","y-axis-grid").call(E).selectAll("line").attr("stroke","#e0e0e0"),h.append("g").attr("class","y-axis").call(P),Object.entries(n).forEach(([b,_],M)=>{const N=ta[M%ta.length],I=Pj().x(j=>S(new Date(j.time))).y(j=>w(j.price)).curve(kj),B=h.selectAll(`.line-${b}`).data([_]);B.enter().append("path").attr("class",`stock-line line-${b}`).attr("fill","none").attr("stroke",N).attr("stroke-width",2).attr("d",I).merge(B).transition().duration(i).attr("d",I),B.exit().remove()});const k=h.append("g").attr("class","legend").attr("transform",`translate(0,${-o.top/2})`);Object.keys(n).forEach((b,_)=>{const M=k.append("g").attr("class",`legend-item legend-${b}`).attr("transform",`translate(${_*120}, 0)`).style("cursor","pointer").on("click",function(){const N=!Qs(this).classed("inactive");Qs(this).classed("inactive",N),h.selectAll(`.line-${b}`).style("opacity",N?0:1)});M.append("rect").attr("width",10).attr("height",10).attr("fill",ta[_%ta.length]),M.append("text").attr("x",15).attr("y",10).text(b).attr("fill","#000").attr("font-size","12px")})},[n]),x.jsx("div",{style:{position:"relative",width:"100%"},children:x.jsx("svg",{ref:t,style:{width:"100%",height:"500px"}})})},_j=({selectedStock:e,setSelectedStock:t,availableStocks:n,handleStartSimulation:r,isLoading:o,stockData:i,marketSummary:s})=>x.jsx(nl.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:.5},children:x.jsxs(io,{className:"bg-white border-gray-200 shadow-lg hover:shadow-xl transition-shadow duration-300",children:[x.jsx(Hh,{children:x.jsxs(Gh,{className:"flex items-center text-black",children:[x.jsx(OR,{className:"h-6 w-6 mr-2 text-black"}),"Stock Simulator"]})}),x.jsxs(so,{children:[x.jsxs("div",{className:"flex space-x-4 mb-6",children:[x.jsxs(PD,{onValueChange:a=>t(a),value:e,children:[x.jsx(XS,{className:"w-[200px] bg-white border-gray-300 text-black hover:border-black transition-colors duration-300",children:x.jsx(ED,{placeholder:"Select Stock Symbol"})}),x.jsx(qS,{className:"bg-white border-gray-300 text-black",children:x.jsxs(kD,{children:[x.jsx(JS,{children:"Available Stocks"}),n.map(a=>x.jsx(eC,{value:a,children:a},a))]})})]}),x.jsx(Mo,{onClick:r,className:"bg-black hover:bg-gray-800 text-white transition-all duration-300 ease-in-out transform hover:scale-105 hover:shadow-lg",disabled:o,children:o?x.jsx(VR,{className:"h-5 w-5 mr-2 animate-spin"}):"Start Simulation"})]}),x.jsx("div",{className:"bg-white border border-gray-200 rounded-lg p-4 mb-6 hover:shadow-md transition-shadow duration-300",children:x.jsx(Ej,{data:i})}),x.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[x.jsx(oc,{children:x.jsxs(ic,{children:[x.jsx(sc,{children:x.jsx(io,{className:"bg-gray-100 hover:bg-gray-200 transition-colors duration-300",children:x.jsxs(so,{className:"flex items-center justify-between p-4",children:[x.jsxs("div",{className:"flex items-center",children:[x.jsx($R,{className:"h-6 w-6 mr-2 text-black"}),x.jsx("span",{className:"font-semibold",children:"Top Performer"})]}),x.jsx("span",{className:"text-black font-bold",children:s.topPerformer})]})})}),x.jsx(xa,{children:x.jsx("p",{children:"Top performing stock today"})})]})}),x.jsx(oc,{children:x.jsxs(ic,{children:[x.jsx(sc,{children:x.jsx(io,{className:"bg-gray-100 hover:bg-gray-200 transition-colors duration-300",children:x.jsxs(so,{className:"flex items-center justify-between p-4",children:[x.jsxs("div",{className:"flex items-center",children:[x.jsx(LR,{className:"h-6 w-6 mr-2 text-black"}),x.jsx("span",{className:"font-semibold",children:"Total Volume"})]}),x.jsx("span",{className:"text-black font-bold",children:s.totalVolume})]})})}),x.jsx(xa,{children:x.jsx("p",{children:"Total trading volume today"})})]})}),x.jsx(oc,{children:x.jsxs(ic,{children:[x.jsx(sc,{children:x.jsx(io,{className:"bg-gray-100 hover:bg-gray-200 transition-colors duration-300",children:x.jsxs(so,{className:"flex items-center justify-between p-4",children:[x.jsxs("div",{className:"flex items-center",children:[x.jsx(FR,{className:"h-6 w-6 mr-2 text-black"}),x.jsx("span",{className:"font-semibold",children:"Market Hours"})]}),x.jsx("span",{className:"text-black font-bold",children:s.marketHours})]})})}),x.jsx(xa,{children:x.jsx("p",{children:"Current market hours"})})]})})]})]})]})}),bj=({runningSimulations:e,stopSimulation:t})=>x.jsx(nl.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:.5},children:x.jsxs(io,{className:"bg-white border-gray-200 shadow-lg hover:shadow-xl transition-shadow duration-300",children:[x.jsx(Hh,{children:x.jsx(Gh,{className:"text-black",children:"Running Simulations"})}),x.jsx(so,{children:Object.keys(e).length===0?x.jsx("p",{className:"text-gray-600",children:"No simulations are currently running."}):x.jsx("ul",{className:"space-y-2",children:Object.keys(e).map(n=>x.jsxs(nl.li,{className:"flex items-center justify-between bg-gray-100 p-3 rounded-lg hover:bg-gray-200 transition-colors duration-300",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[x.jsx("span",{className:"font-semibold text-black",children:n}),x.jsx(Mo,{variant:"destructive",onClick:()=>t(n),className:"bg-black hover:bg-gray-800 text-white transition-all duration-300 ease-in-out transform hover:scale-105",children:"Stop Simulation"})]},n))})})]})}),wi=g.forwardRef(({className:e,type:t,...n},r)=>x.jsx("input",{type:t,className:ae("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));wi.displayName="Input";var Aj="Label",ZC=g.forwardRef((e,t)=>x.jsx(J.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));ZC.displayName=Aj;var qC=ZC;const Mj=ah("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),xi=g.forwardRef(({className:e,...t},n)=>x.jsx(qC,{ref:n,className:ae(Mj(),e),...t}));xi.displayName=qC.displayName;const Rj=({isOpen:e,onOpenChange:t,newStock:n,handleInputChange:r,handleAddStock:o})=>x.jsx(f1,{open:e,onOpenChange:t,children:x.jsxs(lh,{className:"bg-white text-black",children:[x.jsxs(h1,{children:[x.jsx(p1,{className:"text-2xl font-bold text-black",children:"Add New Stock"}),x.jsx(m1,{className:"text-gray-600",children:"Enter the details of the new stock below."})]}),x.jsxs("form",{onSubmit:o,className:"space-y-6 mt-6",children:[x.jsxs("div",{className:"space-y-2",children:[x.jsx(xi,{htmlFor:"symbol",className:"text-gray-700",children:"Stock Symbol"}),x.jsx(wi,{id:"symbol",name:"symbol",value:n.symbol,onChange:r,className:"bg-white border-gray-300 text-black focus:border-black focus:ring-black transition-colors duration-300",required:!0})]}),x.jsxs("div",{className:"space-y-2",children:[x.jsx(xi,{htmlFor:"initialPrice",className:"text-gray-700",children:"Initial Price"}),x.jsx(wi,{id:"initialPrice",name:"initialPrice",type:"number",value:n.initialPrice,onChange:r,className:"bg-white border-gray-300 text-black focus:border-black focus:ring-black transition-colors duration-300",required:!0})]}),x.jsxs("div",{className:"space-y-2",children:[x.jsx(xi,{htmlFor:"expectedReturn",className:"text-gray-700",children:"Expected Return"}),x.jsx(wi,{id:"expectedReturn",name:"expectedReturn",type:"number",value:n.expectedReturn,onChange:r,className:"bg-white border-gray-300 text-black focus:border-black focus:ring-black transition-colors duration-300",required:!0})]}),x.jsxs("div",{className:"space-y-2",children:[x.jsx(xi,{htmlFor:"volatility",className:"text-gray-700",children:"Volatility"}),x.jsx(wi,{id:"volatility",name:"volatility",type:"number",value:n.volatility,onChange:r,className:"bg-white border-gray-300 text-black focus:border-black focus:ring-black transition-colors duration-300",required:!0})]}),x.jsxs("div",{className:"flex space-x-4 mt-6",children:[x.jsx(Mo,{type:"submit",className:"bg-black hover:bg-gray-800 text-white transition-all duration-300 ease-in-out transform hover:scale-105",children:"Add Stock"}),x.jsx(Mo,{variant:"secondary",onClick:()=>t(!1),className:"bg-gray-200 hover:bg-gray-300 text-black transition-all duration-300 ease-in-out transform hover:scale-105",children:"Cancel"})]})]})]})});function Nj(){const[e,t]=g.useState({}),[n,r]=g.useState(["AAPL","GOOGL","AMZN"]),[o,i]=g.useState("AAPL"),[s,a]=g.useState(!1),[l,u]=g.useState({}),[c,f]=g.useState({}),[d,h]=g.useState(!1),[v,y]=g.useState({topPerformer:"AAPL",totalVolume:"1.2M",marketHours:"9:30 AM - 4:00 PM EST"}),[S,m]=g.useState({symbol:"",initialPrice:"",expectedReturn:"",volatility:""}),p=()=>{h(!0),setTimeout(()=>{P(),h(!1)},1500)},w=E=>{const{name:k,value:b}=E.target;m(_=>({..._,[k]:b}))},C=E=>{E.preventDefault();const{symbol:k,initialPrice:b,expectedReturn:_,volatility:M}=S,N=k.toUpperCase();r(I=>[...I,N]),u(I=>({...I,[N]:{initialPrice:parseFloat(b),expectedReturn:parseFloat(_),volatility:parseFloat(M)}})),m({symbol:"",initialPrice:"",expectedReturn:"",volatility:""}),a(!1)},T=g.useCallback(E=>{const k=c[E];k&&!k.closed&&(k.postMessage({type:"STOP_SIMULATION"},"*"),setTimeout(()=>{k.close(),f(b=>{const _={...b};return delete _[E],_})},500))},[c]),P=g.useCallback(()=>{const E=`worker-${Date.now()}`,k=o;if(c[k]){alert(`A simulation for ${k} is already running.`);return}const b=l[k]||{},_=new URLSearchParams({id:E,stock:k,initialPrice:b.initialPrice!=null?b.initialPrice:"",expectedReturn:b.expectedReturn!=null?b.expectedReturn:"",volatility:b.volatility!=null?b.volatility:""}),M=550,N=650,I=window.screenLeft!==void 0?window.screenLeft:window.screenX,B=window.screenTop!==void 0?window.screenTop:window.screenY,j=I+Object.keys(c).length%3*(M+10),$=B+Math.floor(Object.keys(c).length/3)*(N+30),R=`/stock-sim/worker.html?${_.toString()}`,L=`width=${M},height=${N},left=${j},top=${$}`,W=window.open(`${R}?${_.toString()}`,"_blank",L);W?(W.name=E,f(K=>({...K,[k]:W}))):alert("Please allow pop-ups for this application.")},[o,l,c]);return g.useEffect(()=>{const E=k=>{if(k.origin!==window.location.origin)return;const{data:b}=k;if(b.type==="SIMULATION_ENDED"){const{stockSymbol:_}=b.payload;f(M=>{const N={...M};return delete N[_],N})}if(b.type==="STOCK_UPDATE"){const{stockSymbol:_,stockUpdate:M}=b.payload,{time:N,price:I}=M;if(!N||isNaN(new Date(N).getTime())||I==null||isNaN(I)){console.warn("Invalid stock update:",{time:N,price:I});return}t(B=>({...B,[_]:[...B[_]||[],{time:N,price:I}]}))}};return window.addEventListener("message",E),()=>window.removeEventListener("message",E)},[]),g.useEffect(()=>{const E=setInterval(()=>{f(k=>{const b={...k};let _=!1;return Object.keys(k).forEach(M=>{k[M].closed&&(delete b[M],_=!0)}),_?b:k})},1e3);return()=>clearInterval(E)},[c]),x.jsx("div",{className:"min-h-screen bg-white text-black",children:x.jsxs("div",{className:"container mx-auto px-4 py-8",children:[x.jsx(UR,{onAddStockClick:()=>a(!0)}),x.jsxs(IE,{defaultValue:"simulator",className:"mb-8",children:[x.jsxs(Rw,{className:"grid w-full grid-cols-2 mb-4 bg-gray-100",children:[x.jsx(pf,{value:"simulator",className:"data-[state=active]:bg-black data-[state=active]:text-white transition-all duration-300",children:"Simulator"}),x.jsx(pf,{value:"running",className:"data-[state=active]:bg-black data-[state=active]:text-white transition-all duration-300",children:"Running Simulations"})]}),x.jsx(mf,{value:"simulator",children:x.jsx(_j,{stockData:e,availableStocks:n,selectedStock:o,setSelectedStock:i,handleStartSimulation:p,isLoading:d,marketSummary:v})}),x.jsx(mf,{value:"running",children:x.jsx(bj,{runningSimulations:c,stopSimulation:T})})]}),x.jsx(f1,{open:s,onOpenChange:a,children:x.jsx(lh,{className:"bg-white text-black",children:x.jsx(Rj,{isOpen:s,onOpenChange:a,newStock:S,handleInputChange:w,handleAddStock:C})})})]})})}vc.createRoot(document.getElementById("root")).render(x.jsx(Yt.StrictMode,{children:x.jsx(Nj,{})})); diff --git a/index.html b/index.html index 90ea0d3..59fc010 100644 --- a/index.html +++ b/index.html @@ -2,11 +2,11 @@ - + Stock Simulation - - + +