var ob=Object.defineProperty;var ib=(e,t,n)=>t in e?ob(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ef=(e,t,n)=>(ib(e,typeof t!="symbol"?t+"":t,n),n);function sb(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var Zl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _m(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Dm={exports:{}},ma={},Im={exports:{}},ee={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var vi=Symbol.for("react.element"),ab=Symbol.for("react.portal"),lb=Symbol.for("react.fragment"),ub=Symbol.for("react.strict_mode"),cb=Symbol.for("react.profiler"),db=Symbol.for("react.provider"),fb=Symbol.for("react.context"),pb=Symbol.for("react.forward_ref"),hb=Symbol.for("react.suspense"),mb=Symbol.for("react.memo"),gb=Symbol.for("react.lazy"),kf=Symbol.iterator;function vb(e){return e===null||typeof e!="object"?null:(e=kf&&e[kf]||e["@@iterator"],typeof e=="function"?e:null)}var Fm={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Vm=Object.assign,Bm={};function Jr(e,t,n){this.props=e,this.context=t,this.refs=Bm,this.updater=n||Fm}Jr.prototype.isReactComponent={};Jr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Jr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function zm(){}zm.prototype=Jr.prototype;function Oc(e,t,n){this.props=e,this.context=t,this.refs=Bm,this.updater=n||Fm}var jc=Oc.prototype=new zm;jc.constructor=Oc;Vm(jc,Jr.prototype);jc.isPureReactComponent=!0;var Tf=Array.isArray,Um=Object.prototype.hasOwnProperty,_c={current:null},Wm={key:!0,ref:!0,__self:!0,__source:!0};function Hm(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)Um.call(t,r)&&!Wm.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1>>1,k=O[w];if(0>>1;w<_;){var V=2*(w+1)-1,W=O[V],H=V+1,Q=O[H];if(0>o(W,I))Ho(Q,W)?(O[w]=Q,O[H]=I,w=H):(O[w]=W,O[V]=I,w=V);else if(Ho(Q,I))O[w]=Q,O[H]=I,w=H;else break e}}return L}function o(O,L){var I=O.sortIndex-L.sortIndex;return I!==0?I:O.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,d=null,f=3,p=!1,m=!1,y=!1,P=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(O){for(var L=n(u);L!==null;){if(L.callback===null)r(u);else if(L.startTime<=O)r(u),L.sortIndex=L.expirationTime,t(l,L);else break;L=n(u)}}function S(O){if(y=!1,v(O),!m)if(n(l)!==null)m=!0,Y(E);else{var L=n(u);L!==null&&ie(S,L.startTime-O)}}function E(O,L){m=!1,y&&(y=!1,b(x),x=-1),p=!0;var I=f;try{for(v(L),d=n(l);d!==null&&(!(d.expirationTime>L)||O&&!M());){var w=d.callback;if(typeof w=="function"){d.callback=null,f=d.priorityLevel;var k=w(d.expirationTime<=L);L=e.unstable_now(),typeof k=="function"?d.callback=k:d===n(l)&&r(l),v(L)}else r(l);d=n(l)}if(d!==null)var _=!0;else{var V=n(u);V!==null&&ie(S,V.startTime-L),_=!1}return _}finally{d=null,f=I,p=!1}}var R=!1,T=null,x=-1,N=5,F=-1;function M(){return!(e.unstable_now()-FO||125w?(O.sortIndex=I,t(u,O),n(l)===null&&O===n(u)&&(y?(b(x),x=-1):y=!0,ie(S,I-w))):(O.sortIndex=k,t(l,O),m||p||(m=!0,Y(E))),O},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(O){var L=f;return function(){var I=f;f=L;try{return O.apply(this,arguments)}finally{f=I}}}})(Xm);Qm.exports=Xm;var Nb=Qm.exports;/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Ym=g,lt=Nb;function D(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),tu=Object.prototype.hasOwnProperty,$b=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Nf={},$f={};function Mb(e){return tu.call($f,e)?!0:tu.call(Nf,e)?!1:$b.test(e)?$f[e]=!0:(Nf[e]=!0,!1)}function Lb(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Ab(e,t,n,r){if(t===null||typeof t>"u"||Lb(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ye(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var De={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){De[e]=new Ye(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];De[t]=new Ye(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){De[e]=new Ye(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){De[e]=new Ye(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){De[e]=new Ye(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){De[e]=new Ye(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){De[e]=new Ye(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){De[e]=new Ye(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){De[e]=new Ye(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ic=/[\-:]([a-z])/g;function Fc(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Ic,Fc);De[t]=new Ye(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Ic,Fc);De[t]=new Ye(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Ic,Fc);De[t]=new Ye(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){De[e]=new Ye(e,1,!1,e.toLowerCase(),null,!1,!1)});De.xlinkHref=new Ye("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){De[e]=new Ye(e,1,!1,e.toLowerCase(),null,!0,!0)});function Vc(e,t,n,r){var o=De.hasOwnProperty(t)?De[t]:null;(o!==null?o.type!==0:r||!(2a||o[s]!==i[a]){var l=` `+o[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{nl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Eo(e):""}function Ob(e){switch(e.tag){case 5:return Eo(e.type);case 16:return Eo("Lazy");case 13:return Eo("Suspense");case 19:return Eo("SuspenseList");case 0:case 2:case 15:return e=rl(e.type,!1),e;case 11:return e=rl(e.type.render,!1),e;case 1:return e=rl(e.type,!0),e;default:return""}}function iu(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 yr:return"Portal";case nu:return"Profiler";case Bc:return"StrictMode";case ru:return"Suspense";case ou:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Zm:return(e.displayName||"Context")+".Consumer";case Jm:return(e._context.displayName||"Context")+".Provider";case zc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Uc:return t=e.displayName||null,t!==null?t:iu(e.type)||"Memo";case cn:t=e._payload,e=e._init;try{return iu(e(t))}catch{}}return null}function jb(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 iu(t);case 8:return t===Bc?"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 $n(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function tg(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function _b(e){var t=tg(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 Ai(e){e._valueTracker||(e._valueTracker=_b(e))}function ng(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=tg(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ks(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 su(e,t){var n=t.checked;return Se({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Lf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=$n(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 rg(e,t){t=t.checked,t!=null&&Vc(e,"checked",t,!1)}function au(e,t){rg(e,t);var n=$n(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")?lu(e,t.type,n):t.hasOwnProperty("defaultValue")&&lu(e,t.type,$n(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Af(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 lu(e,t,n){(t!=="number"||ks(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ko=Array.isArray;function _r(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=Oi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Go(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ao={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},Db=["Webkit","ms","Moz","O"];Object.keys(Ao).forEach(function(e){Db.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ao[t]=Ao[e]})});function ag(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ao.hasOwnProperty(e)&&Ao[e]?(""+t).trim():t+"px"}function lg(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=ag(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var Ib=Se({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 du(e,t){if(t){if(Ib[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 fu(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 pu=null;function Wc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var hu=null,Dr=null,Ir=null;function _f(e){if(e=xi(e)){if(typeof hu!="function")throw Error(D(280));var t=e.stateNode;t&&(t=xa(t),hu(e.stateNode,e.type,t))}}function ug(e){Dr?Ir?Ir.push(e):Ir=[e]:Dr=e}function cg(){if(Dr){var e=Dr,t=Ir;if(Ir=Dr=null,_f(e),t)for(e=0;e>>=0,e===0?32:31-(Xb(e)/Yb|0)|0}var ji=64,_i=4194304;function To(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 $s(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=To(a):(i&=s,i!==0&&(r=To(i)))}else s=n&~o,s!==0?r=To(s):i!==0&&(r=To(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 yi(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Et(t),e[t]=n}function ex(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=jo),Hf=String.fromCharCode(32),Kf=!1;function $g(e,t){switch(e){case"keyup":return Rx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Mg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var xr=!1;function $x(e,t){switch(e){case"compositionend":return Mg(t);case"keypress":return t.which!==32?null:(Kf=!0,Hf);case"textInput":return e=t.data,e===Hf&&Kf?null:e;default:return null}}function Mx(e,t){if(xr)return e==="compositionend"||!Jc&&$g(e,t)?(e=Rg(),as=Xc=mn=null,xr=!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=Yf(n)}}function jg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?jg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function _g(){for(var e=window,t=ks();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ks(e.document)}return t}function Zc(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 Vx(e){var t=_g(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&jg(n.ownerDocument.documentElement,n)){if(r!==null&&Zc(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=qf(n,i);var s=qf(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,wr=null,xu=null,Do=null,wu=!1;function Jf(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;wu||wr==null||wr!==ks(r)||(r=wr,"selectionStart"in r&&Zc(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}),Do&&Zo(Do,r)||(Do=r,r=As(xu,"onSelect"),0Cr||(e.current=Tu[Cr],Tu[Cr]=null,Cr--)}function ce(e,t){Cr++,Tu[Cr]=e.current,e.current=t}var Mn={},We=jn(Mn),Ze=jn(!1),qn=Mn;function Ur(e,t){var n=e.type.contextTypes;if(!n)return Mn;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 et(e){return e=e.childContextTypes,e!=null}function js(){pe(Ze),pe(We)}function ip(e,t,n){if(We.current!==Mn)throw Error(D(168));ce(We,t),ce(Ze,n)}function Hg(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,jb(e)||"Unknown",o));return Se({},n,r)}function _s(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Mn,qn=We.current,ce(We,e),ce(Ze,Ze.current),!0}function sp(e,t,n){var r=e.stateNode;if(!r)throw Error(D(169));n?(e=Hg(e,t,qn),r.__reactInternalMemoizedMergedChildContext=e,pe(Ze),pe(We),ce(We,e)):pe(Ze),ce(Ze,n)}var Ut=null,wa=!1,vl=!1;function Kg(e){Ut===null?Ut=[e]:Ut.push(e)}function Jx(e){wa=!0,Kg(e)}function _n(){if(!vl&&Ut!==null){vl=!0;var e=0,t=se;try{var n=Ut;for(se=1;e>=s,o-=s,Wt=1<<32-Et(t)+o|n<x?(N=T,T=null):N=T.sibling;var F=f(b,T,v[x],S);if(F===null){T===null&&(T=N);break}e&&T&&F.alternate===null&&t(b,T),h=i(F,h,x),R===null?E=F:R.sibling=F,R=F,T=N}if(x===v.length)return n(b,T),me&&Fn(b,x),E;if(T===null){for(;xx?(N=T,T=null):N=T.sibling;var M=f(b,T,F.value,S);if(M===null){T===null&&(T=N);break}e&&T&&M.alternate===null&&t(b,T),h=i(M,h,x),R===null?E=M:R.sibling=M,R=M,T=N}if(F.done)return n(b,T),me&&Fn(b,x),E;if(T===null){for(;!F.done;x++,F=v.next())F=d(b,F.value,S),F!==null&&(h=i(F,h,x),R===null?E=F:R.sibling=F,R=F);return me&&Fn(b,x),E}for(T=r(b,T);!F.done;x++,F=v.next())F=p(T,b,x,F.value,S),F!==null&&(e&&F.alternate!==null&&T.delete(F.key===null?x:F.key),h=i(F,h,x),R===null?E=F:R.sibling=F,R=F);return e&&T.forEach(function(B){return t(b,B)}),me&&Fn(b,x),E}function P(b,h,v,S){if(typeof v=="object"&&v!==null&&v.type===br&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Li:e:{for(var E=v.key,R=h;R!==null;){if(R.key===E){if(E=v.type,E===br){if(R.tag===7){n(b,R.sibling),h=o(R,v.props.children),h.return=b,b=h;break e}}else if(R.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===cn&&pp(E)===R.type){n(b,R.sibling),h=o(R,v.props),h.ref=go(b,R,v),h.return=b,b=h;break e}n(b,R);break}else t(b,R);R=R.sibling}v.type===br?(h=Yn(v.props.children,b.mode,S,v.key),h.return=b,b=h):(S=ms(v.type,v.key,v.props,null,b.mode,S),S.ref=go(b,h,v),S.return=b,b=S)}return s(b);case yr:e:{for(R=v.key;h!==null;){if(h.key===R)if(h.tag===4&&h.stateNode.containerInfo===v.containerInfo&&h.stateNode.implementation===v.implementation){n(b,h.sibling),h=o(h,v.children||[]),h.return=b,b=h;break e}else{n(b,h);break}else t(b,h);h=h.sibling}h=El(v,b.mode,S),h.return=b,b=h}return s(b);case cn:return R=v._init,P(b,h,R(v._payload),S)}if(ko(v))return m(b,h,v,S);if(co(v))return y(b,h,v,S);Ui(b,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,h!==null&&h.tag===6?(n(b,h.sibling),h=o(h,v),h.return=b,b=h):(n(b,h),h=Cl(v,b.mode,S),h.return=b,b=h),s(b)):n(b,h)}return P}var Hr=ev(!0),tv=ev(!1),wi={},jt=jn(wi),ri=jn(wi),oi=jn(wi);function Hn(e){if(e===wi)throw Error(D(174));return e}function ld(e,t){switch(ce(oi,t),ce(ri,e),ce(jt,wi),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:cu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=cu(t,e)}pe(jt),ce(jt,t)}function Kr(){pe(jt),pe(ri),pe(oi)}function nv(e){Hn(oi.current);var t=Hn(jt.current),n=cu(t,e.type);t!==n&&(ce(ri,e),ce(jt,n))}function ud(e){ri.current===e&&(pe(jt),pe(ri))}var ye=jn(0);function zs(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var yl=[];function cd(){for(var e=0;en?n:4,e(!0);var r=bl.transition;bl.transition={};try{e(!1),t()}finally{se=n,bl.transition=r}}function yv(){return bt().memoizedState}function nw(e,t,n){var r=En(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},bv(e))xv(t,n);else if(n=Yg(e,t,n,r),n!==null){var o=Qe();kt(n,e,r,o),wv(n,t,r)}}function rw(e,t,n){var r=En(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(bv(e))xv(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,Tt(a,s)){var l=t.interleaved;l===null?(o.next=o,sd(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}n=Yg(e,t,o,r),n!==null&&(o=Qe(),kt(n,e,r,o),wv(n,t,r))}}function bv(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function xv(e,t){Io=Us=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function wv(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Kc(e,n)}}var Ws={readContext:yt,useCallback:Fe,useContext:Fe,useEffect:Fe,useImperativeHandle:Fe,useInsertionEffect:Fe,useLayoutEffect:Fe,useMemo:Fe,useReducer:Fe,useRef:Fe,useState:Fe,useDebugValue:Fe,useDeferredValue:Fe,useTransition:Fe,useMutableSource:Fe,useSyncExternalStore:Fe,useId:Fe,unstable_isNewReconciler:!1},ow={readContext:yt,useCallback:function(e,t){return Nt().memoizedState=[e,t===void 0?null:t],e},useContext:yt,useEffect:mp,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ds(4194308,4,pv.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ds(4194308,4,e,t)},useInsertionEffect:function(e,t){return ds(4,2,e,t)},useMemo:function(e,t){var n=Nt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Nt();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=nw.bind(null,xe,e),[r.memoizedState,e]},useRef:function(e){var t=Nt();return e={current:e},t.memoizedState=e},useState:hp,useDebugValue:md,useDeferredValue:function(e){return Nt().memoizedState=e},useTransition:function(){var e=hp(!1),t=e[0];return e=tw.bind(null,e[1]),Nt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=xe,o=Nt();if(me){if(n===void 0)throw Error(D(407));n=n()}else{if(n=t(),Oe===null)throw Error(D(349));Zn&30||iv(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,mp(av.bind(null,r,i,e),[e]),r.flags|=2048,ai(9,sv.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Nt(),t=Oe.identifierPrefix;if(me){var n=Ht,r=Wt;n=(r&~(1<<32-Et(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ii++,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[Mt]=t,e[ni]=r,$v(e,t,!1,!1),t.stateNode=e;e:{switch(s=fu(n,r),n){case"dialog":fe("cancel",e),fe("close",e),o=r;break;case"iframe":case"object":case"embed":fe("load",e),o=r;break;case"video":case"audio":for(o=0;oQr&&(t.flags|=128,r=!0,vo(i,!1),t.lanes=4194304)}else{if(!r)if(e=zs(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),vo(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!me)return Ve(t),null}else 2*ke()-i.renderingStartTime>Qr&&n!==1073741824&&(t.flags|=128,r=!0,vo(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=ke(),t.sibling=null,n=ye.current,ce(ye,r?n&1|2:n&1),t):(Ve(t),null);case 22:case 23:return wd(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?it&1073741824&&(Ve(t),t.subtreeFlags&6&&(t.flags|=8192)):Ve(t),null;case 24:return null;case 25:return null}throw Error(D(156,t.tag))}function fw(e,t){switch(td(t),t.tag){case 1:return et(t.type)&&js(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Kr(),pe(Ze),pe(We),cd(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ud(t),null;case 13:if(pe(ye),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(D(340));Wr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return pe(ye),null;case 4:return Kr(),null;case 10:return id(t.type._context),null;case 22:case 23:return wd(),null;case 24:return null;default:return null}}var Hi=!1,ze=!1,pw=typeof WeakSet=="function"?WeakSet:Set,z=null;function Rr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Pe(e,t,r)}else n.current=null}function Fu(e,t,n){try{n()}catch(r){Pe(e,t,r)}}var Cp=!1;function hw(e,t){if(Su=Ms,e=_g(),Zc(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,d=e,f=null;t:for(;;){for(var p;d!==n||o!==0&&d.nodeType!==3||(a=s+o),d!==i||r!==0&&d.nodeType!==3||(l=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++u===o&&(a=s),f===i&&++c===r&&(l=s),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Pu={focusedElem:e,selectionRange:n},Ms=!1,z=t;z!==null;)if(t=z,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,z=e;else for(;z!==null;){t=z;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var y=m.memoizedProps,P=m.memoizedState,b=t.stateNode,h=b.getSnapshotBeforeUpdate(t.elementType===t.type?y:St(t.type,y),P);b.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(D(163))}}catch(S){Pe(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,z=e;break}z=t.return}return m=Cp,Cp=!1,m}function Fo(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&&Fu(t,n,i)}o=o.next}while(o!==r)}}function Ca(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 Vu(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 Av(e){var t=e.alternate;t!==null&&(e.alternate=null,Av(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Mt],delete t[ni],delete t[ku],delete t[Yx],delete t[qx])),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 Ov(e){return e.tag===5||e.tag===3||e.tag===4}function Ep(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ov(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 Bu(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=Os));else if(r!==4&&(e=e.child,e!==null))for(Bu(e,t,n),e=e.sibling;e!==null;)Bu(e,t,n),e=e.sibling}function zu(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(zu(e,t,n),e=e.sibling;e!==null;)zu(e,t,n),e=e.sibling}var je=null,Pt=!1;function sn(e,t,n){for(n=n.child;n!==null;)jv(e,t,n),n=n.sibling}function jv(e,t,n){if(Ot&&typeof Ot.onCommitFiberUnmount=="function")try{Ot.onCommitFiberUnmount(ga,n)}catch{}switch(n.tag){case 5:ze||Rr(n,t);case 6:var r=je,o=Pt;je=null,sn(e,t,n),je=r,Pt=o,je!==null&&(Pt?(e=je,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):je.removeChild(n.stateNode));break;case 18:je!==null&&(Pt?(e=je,n=n.stateNode,e.nodeType===8?gl(e.parentNode,n):e.nodeType===1&&gl(e,n),qo(e)):gl(je,n.stateNode));break;case 4:r=je,o=Pt,je=n.stateNode.containerInfo,Pt=!0,sn(e,t,n),je=r,Pt=o;break;case 0:case 11:case 14:case 15:if(!ze&&(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)&&Fu(n,t,s),o=o.next}while(o!==r)}sn(e,t,n);break;case 1:if(!ze&&(Rr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Pe(n,t,a)}sn(e,t,n);break;case 21:sn(e,t,n);break;case 22:n.mode&1?(ze=(r=ze)||n.memoizedState!==null,sn(e,t,n),ze=r):sn(e,t,n);break;default:sn(e,t,n)}}function kp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new pw),t.forEach(function(r){var o=Pw.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function xt(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=ke()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*gw(r/1960))-r,10e?16:e,gn===null)var r=!1;else{if(e=gn,gn=null,Gs=0,re&6)throw Error(D(331));var o=re;for(re|=4,z=e.current;z!==null;){var i=z,s=i.child;if(z.flags&16){var a=i.deletions;if(a!==null){for(var l=0;lke()-bd?Xn(e,0):yd|=n),tt(e,t)}function Uv(e,t){t===0&&(e.mode&1?(t=_i,_i<<=1,!(_i&130023424)&&(_i=4194304)):t=1);var n=Qe();e=en(e,t),e!==null&&(yi(e,t,n),tt(e,n))}function Sw(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Uv(e,n)}function Pw(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),Uv(e,n)}var Wv;Wv=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ze.current)Je=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Je=!1,cw(e,t,n);Je=!!(e.flags&131072)}else Je=!1,me&&t.flags&1048576&&Gg(t,Is,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;fs(e,t),e=t.pendingProps;var o=Ur(t,We.current);Vr(t,n),o=fd(null,t,r,e,o,n);var i=pd();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,et(r)?(i=!0,_s(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,ad(t),o.updater=Sa,t.stateNode=o,o._reactInternals=t,Lu(t,r,e,n),t=ju(null,t,r,!0,i,n)):(t.tag=0,me&&i&&ed(t),Ge(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(fs(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=Ew(r),e=St(r,e),o){case 0:t=Ou(null,t,r,e,n);break e;case 1:t=wp(null,t,r,e,n);break e;case 11:t=bp(null,t,r,e,n);break e;case 14:t=xp(null,t,r,St(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:St(r,o),Ou(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:St(r,o),wp(e,t,r,o,n);case 3:e:{if(Tv(t),e===null)throw Error(D(387));r=t.pendingProps,i=t.memoizedState,o=i.element,qg(e,t),Bs(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=Gr(Error(D(423)),t),t=Sp(e,t,r,n,o);break e}else if(r!==o){o=Gr(Error(D(424)),t),t=Sp(e,t,r,n,o);break e}else for(st=Sn(t.stateNode.containerInfo.firstChild),at=t,me=!0,Ct=null,n=tv(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Wr(),r===o){t=tn(e,t,n);break e}Ge(e,t,r,n)}t=t.child}return t;case 5:return nv(t),e===null&&Nu(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Cu(r,o)?s=null:i!==null&&Cu(r,i)&&(t.flags|=32),kv(e,t),Ge(e,t,s,n),t.child;case 6:return e===null&&Nu(t),null;case 13:return Rv(e,t,n);case 4:return ld(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Hr(t,null,r,n):Ge(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:St(r,o),bp(e,t,r,o,n);case 7:return Ge(e,t,t.pendingProps,n),t.child;case 8:return Ge(e,t,t.pendingProps.children,n),t.child;case 12:return Ge(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,ce(Fs,r._currentValue),r._currentValue=s,i!==null)if(Tt(i.value,s)){if(i.children===o.children&&!Ze.current){t=tn(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=Qt(-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),$u(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),$u(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}Ge(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Vr(t,n),o=yt(o),r=r(o),t.flags|=1,Ge(e,t,r,n),t.child;case 14:return r=t.type,o=St(r,t.pendingProps),o=St(r.type,o),xp(e,t,r,o,n);case 15:return Cv(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:St(r,o),fs(e,t),t.tag=1,et(r)?(e=!0,_s(t)):e=!1,Vr(t,n),Zg(t,r,o),Lu(t,r,o,n),ju(null,t,r,!0,e,n);case 19:return Nv(e,t,n);case 22:return Ev(e,t,n)}throw Error(D(156,t.tag))};function Hv(e,t){return vg(e,t)}function Cw(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 mt(e,t,n,r){return new Cw(e,t,n,r)}function Pd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ew(e){if(typeof e=="function")return Pd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===zc)return 11;if(e===Uc)return 14}return 2}function kn(e,t){var n=e.alternate;return n===null?(n=mt(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 ms(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")Pd(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case br:return Yn(n.children,o,i,t);case Bc:s=8,o|=8;break;case nu:return e=mt(12,n,t,o|2),e.elementType=nu,e.lanes=i,e;case ru:return e=mt(13,n,t,o),e.elementType=ru,e.lanes=i,e;case ou:return e=mt(19,n,t,o),e.elementType=ou,e.lanes=i,e;case eg:return ka(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Jm:s=10;break e;case Zm:s=9;break e;case zc:s=11;break e;case Uc:s=14;break e;case cn:s=16,r=null;break e}throw Error(D(130,e==null?e:typeof e,""))}return t=mt(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Yn(e,t,n,r){return e=mt(7,e,r,t),e.lanes=n,e}function ka(e,t,n,r){return e=mt(22,e,r,t),e.elementType=eg,e.lanes=n,e.stateNode={isHidden:!1},e}function Cl(e,t,n){return e=mt(6,e,null,t),e.lanes=n,e}function El(e,t,n){return t=mt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function kw(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=il(0),this.expirationTimes=il(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=il(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Cd(e,t,n,r,o,i,s,a,l){return e=new kw(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=mt(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 Tw(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Xv)}catch(e){console.error(e)}}Xv(),Gm.exports=ct;var Yv=Gm.exports;const Lw=_m(Yv);var Op=Yv;eu.createRoot=Op.createRoot,eu.hydrateRoot=Op.hydrateRoot;var Rd={};function qv(e,t){return function(){return e.apply(t,arguments)}}const{toString:Aw}=Object.prototype,{getPrototypeOf:Nd}=Object,Ma=(e=>t=>{const n=Aw.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Dt=e=>(e=e.toLowerCase(),t=>Ma(t)===e),La=e=>t=>typeof t===e,{isArray:to}=Array,ui=La("undefined");function Ow(e){return e!==null&&!ui(e)&&e.constructor!==null&&!ui(e.constructor)&&vt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Jv=Dt("ArrayBuffer");function jw(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Jv(e.buffer),t}const _w=La("string"),vt=La("function"),Zv=La("number"),Aa=e=>e!==null&&typeof e=="object",Dw=e=>e===!0||e===!1,gs=e=>{if(Ma(e)!=="object")return!1;const t=Nd(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Iw=Dt("Date"),Fw=Dt("File"),Vw=Dt("Blob"),Bw=Dt("FileList"),zw=e=>Aa(e)&&vt(e.pipe),Uw=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||vt(e.append)&&((t=Ma(e))==="formdata"||t==="object"&&vt(e.toString)&&e.toString()==="[object FormData]"))},Ww=Dt("URLSearchParams"),Hw=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Si(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),to(e))for(r=0,o=e.length;r0;)if(o=n[r],t===o.toLowerCase())return o;return null}const ty=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:Zl)(),ny=e=>!ui(e)&&e!==ty;function Gu(){const{caseless:e}=ny(this)&&this||{},t={},n=(r,o)=>{const i=e&&ey(t,o)||o;gs(t[i])&&gs(r)?t[i]=Gu(t[i],r):gs(r)?t[i]=Gu({},r):to(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r(Si(t,(o,i)=>{n&&vt(o)?e[i]=qv(o,n):e[i]=o},{allOwnKeys:r}),e),Gw=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Qw=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Xw=(e,t,n,r)=>{let o,i,s;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],(!r||r(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=n!==!1&&Nd(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Yw=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},qw=e=>{if(!e)return null;if(to(e))return e;let t=e.length;if(!Zv(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Jw=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Nd(Uint8Array)),Zw=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},eS=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},tS=Dt("HTMLFormElement"),nS=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),jp=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),rS=Dt("RegExp"),ry=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Si(n,(o,i)=>{t(o,i,e)!==!1&&(r[i]=o)}),Object.defineProperties(e,r)},oS=e=>{ry(e,(t,n)=>{if(vt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(vt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},iS=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return to(e)?r(e):r(String(e).split(t)),n},sS=()=>{},aS=(e,t)=>(e=+e,Number.isFinite(e)?e:t),kl="abcdefghijklmnopqrstuvwxyz",_p="0123456789",oy={DIGIT:_p,ALPHA:kl,ALPHA_DIGIT:kl+kl.toUpperCase()+_p},lS=(e=16,t=oy.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function uS(e){return!!(e&&vt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const cS=e=>{const t=new Array(10),n=(r,o)=>{if(Aa(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=to(r)?[]:{};return Si(r,(s,a)=>{const l=n(s,o+1);!ui(l)&&(i[a]=l)}),t[o]=void 0,i}}return r};return n(e,0)},dS=Dt("AsyncFunction"),fS=e=>e&&(Aa(e)||vt(e))&&vt(e.then)&&vt(e.catch);var $={isArray:to,isArrayBuffer:Jv,isBuffer:Ow,isFormData:Uw,isArrayBufferView:jw,isString:_w,isNumber:Zv,isBoolean:Dw,isObject:Aa,isPlainObject:gs,isUndefined:ui,isDate:Iw,isFile:Fw,isBlob:Vw,isRegExp:rS,isFunction:vt,isStream:zw,isURLSearchParams:Ww,isTypedArray:Jw,isFileList:Bw,forEach:Si,merge:Gu,extend:Kw,trim:Hw,stripBOM:Gw,inherits:Qw,toFlatObject:Xw,kindOf:Ma,kindOfTest:Dt,endsWith:Yw,toArray:qw,forEachEntry:Zw,matchAll:eS,isHTMLForm:tS,hasOwnProperty:jp,hasOwnProp:jp,reduceDescriptors:ry,freezeMethods:oS,toObjectSet:iS,toCamelCase:nS,noop:sS,toFiniteNumber:aS,findKey:ey,global:ty,isContextDefined:ny,ALPHABET:oy,generateString:lS,isSpecCompliantForm:uS,toJSONObject:cS,isAsyncFn:dS,isThenable:fS};function ne(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}$.inherits(ne,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:$.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const iy=ne.prototype,sy={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{sy[e]={value:e}});Object.defineProperties(ne,sy);Object.defineProperty(iy,"isAxiosError",{value:!0});ne.from=(e,t,n,r,o,i)=>{const s=Object.create(iy);return $.toFlatObject(e,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),ne.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};var pS=null;function Qu(e){return $.isPlainObject(e)||$.isArray(e)}function ay(e){return $.endsWith(e,"[]")?e.slice(0,-2):e}function Dp(e,t,n){return e?e.concat(t).map(function(o,i){return o=ay(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function hS(e){return $.isArray(e)&&!e.some(Qu)}const mS=$.toFlatObject($,{},null,function(t){return/^is[A-Z]/.test(t)});function Oa(e,t,n){if(!$.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=$.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,P){return!$.isUndefined(P[y])});const r=n.metaTokens,o=n.visitor||c,i=n.dots,s=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&$.isSpecCompliantForm(t);if(!$.isFunction(o))throw new TypeError("visitor must be a function");function u(m){if(m===null)return"";if($.isDate(m))return m.toISOString();if(!l&&$.isBlob(m))throw new ne("Blob is not supported. Use a Buffer instead.");return $.isArrayBuffer(m)||$.isTypedArray(m)?l&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function c(m,y,P){let b=m;if(m&&!P&&typeof m=="object"){if($.endsWith(y,"{}"))y=r?y:y.slice(0,-2),m=JSON.stringify(m);else if($.isArray(m)&&hS(m)||($.isFileList(m)||$.endsWith(y,"[]"))&&(b=$.toArray(m)))return y=ay(y),b.forEach(function(v,S){!($.isUndefined(v)||v===null)&&t.append(s===!0?Dp([y],S,i):s===null?y:y+"[]",u(v))}),!1}return Qu(m)?!0:(t.append(Dp(P,y,i),u(m)),!1)}const d=[],f=Object.assign(mS,{defaultVisitor:c,convertValue:u,isVisitable:Qu});function p(m,y){if(!$.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+y.join("."));d.push(m),$.forEach(m,function(b,h){(!($.isUndefined(b)||b===null)&&o.call(t,b,$.isString(h)?h.trim():h,y,f))===!0&&p(b,y?y.concat(h):[h])}),d.pop()}}if(!$.isObject(e))throw new TypeError("data must be an object");return p(e),t}function Ip(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function $d(e,t){this._pairs=[],e&&Oa(e,this,t)}const ly=$d.prototype;ly.append=function(t,n){this._pairs.push([t,n])};ly.toString=function(t){const n=t?function(r){return t.call(this,r,Ip)}:Ip;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function gS(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function uy(e,t,n){if(!t)return e;const r=n&&n.encode||gS,o=n&&n.serialize;let i;if(o?i=o(t,n):i=$.isURLSearchParams(t)?t.toString():new $d(t,n).toString(r),i){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class vS{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){$.forEach(this.handlers,function(r){r!==null&&t(r)})}}var Fp=vS,cy={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},yS=typeof URLSearchParams<"u"?URLSearchParams:$d,bS=typeof FormData<"u"?FormData:null,xS=typeof Blob<"u"?Blob:null;const wS=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),SS=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")();var At={isBrowser:!0,classes:{URLSearchParams:yS,FormData:bS,Blob:xS},isStandardBrowserEnv:wS,isStandardBrowserWebWorkerEnv:SS,protocols:["http","https","file","blob","url","data"]};function PS(e,t){return Oa(e,new At.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return At.isNode&&$.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function CS(e){return $.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function ES(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r=n.length;return s=!s&&$.isArray(o)?o.length:s,l?($.hasOwnProp(o,s)?o[s]=[o[s],r]:o[s]=r,!a):((!o[s]||!$.isObject(o[s]))&&(o[s]=[]),t(n,r,o[s],i)&&$.isArray(o[s])&&(o[s]=ES(o[s])),!a)}if($.isFormData(e)&&$.isFunction(e.entries)){const n={};return $.forEachEntry(e,(r,o)=>{t(CS(r),o,n,0)}),n}return null}const kS={"Content-Type":void 0};function TS(e,t,n){if($.isString(e))try{return(t||JSON.parse)(e),$.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ja={transitional:cy,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=$.isObject(t);if(i&&$.isHTMLForm(t)&&(t=new FormData(t)),$.isFormData(t))return o&&o?JSON.stringify(dy(t)):t;if($.isArrayBuffer(t)||$.isBuffer(t)||$.isStream(t)||$.isFile(t)||$.isBlob(t))return t;if($.isArrayBufferView(t))return t.buffer;if($.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return PS(t,this.formSerializer).toString();if((a=$.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Oa(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),TS(t)):t}],transformResponse:[function(t){const n=this.transitional||ja.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(t&&$.isString(t)&&(r&&!this.responseType||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(a){if(s)throw a.name==="SyntaxError"?ne.from(a,ne.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:At.classes.FormData,Blob:At.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};$.forEach(["delete","get","head"],function(t){ja.headers[t]={}});$.forEach(["post","put","patch"],function(t){ja.headers[t]=$.merge(kS)});var Md=ja;const RS=$.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var NS=e=>{const t={};let n,r,o;return e&&e.split(` `).forEach(function(s){o=s.indexOf(":"),n=s.substring(0,o).trim().toLowerCase(),r=s.substring(o+1).trim(),!(!n||t[n]&&RS[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};const Vp=Symbol("internals");function bo(e){return e&&String(e).trim().toLowerCase()}function vs(e){return e===!1||e==null?e:$.isArray(e)?e.map(vs):String(e)}function $S(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const MS=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Tl(e,t,n,r,o){if($.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!$.isString(t)){if($.isString(r))return t.indexOf(r)!==-1;if($.isRegExp(r))return r.test(t)}}function LS(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function AS(e,t){const n=$.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,s){return this[r].call(this,t,o,i,s)},configurable:!0})})}class _a{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(a,l,u){const c=bo(l);if(!c)throw new Error("header name must be a non-empty string");const d=$.findKey(o,c);(!d||o[d]===void 0||u===!0||u===void 0&&o[d]!==!1)&&(o[d||l]=vs(a))}const s=(a,l)=>$.forEach(a,(u,c)=>i(u,c,l));return $.isPlainObject(t)||t instanceof this.constructor?s(t,n):$.isString(t)&&(t=t.trim())&&!MS(t)?s(NS(t),n):t!=null&&i(n,t,r),this}get(t,n){if(t=bo(t),t){const r=$.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return $S(o);if($.isFunction(n))return n.call(this,o,r);if($.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=bo(t),t){const r=$.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Tl(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(s){if(s=bo(s),s){const a=$.findKey(r,s);a&&(!n||Tl(r,r[a],a,n))&&(delete r[a],o=!0)}}return $.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||Tl(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return $.forEach(this,(o,i)=>{const s=$.findKey(r,i);if(s){n[s]=vs(o),delete n[i];return}const a=t?LS(i):String(i).trim();a!==i&&delete n[i],n[a]=vs(o),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return $.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&$.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[Vp]=this[Vp]={accessors:{}}).accessors,o=this.prototype;function i(s){const a=bo(s);r[a]||(AS(o,s),r[a]=!0)}return $.isArray(t)?t.forEach(i):i(t),this}}_a.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);$.freezeMethods(_a.prototype);$.freezeMethods(_a);var Xt=_a;function Rl(e,t){const n=this||Md,r=t||n,o=Xt.from(r.headers);let i=r.data;return $.forEach(e,function(a){i=a.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function fy(e){return!!(e&&e.__CANCEL__)}function Pi(e,t,n){ne.call(this,e??"canceled",ne.ERR_CANCELED,t,n),this.name="CanceledError"}$.inherits(Pi,ne,{__CANCEL__:!0});function OS(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ne("Request failed with status code "+n.status,[ne.ERR_BAD_REQUEST,ne.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}var jS=At.isStandardBrowserEnv?function(){return{write:function(n,r,o,i,s,a){const l=[];l.push(n+"="+encodeURIComponent(r)),$.isNumber(o)&&l.push("expires="+new Date(o).toGMTString()),$.isString(i)&&l.push("path="+i),$.isString(s)&&l.push("domain="+s),a===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function _S(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function DS(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function py(e,t){return e&&!_S(t)?DS(e,t):t}var IS=At.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function o(i){let s=i;return t&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(s){const a=$.isString(s)?o(s):s;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function FS(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function VS(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,s;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=r[i];s||(s=u),n[o]=l,r[o]=u;let d=i,f=0;for(;d!==o;)f+=n[d++],d=d%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),u-s{const i=o.loaded,s=o.lengthComputable?o.total:void 0,a=i-n,l=r(a),u=i<=s;n=i;const c={loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&u?(s-i)/l:void 0,event:o};c[t?"download":"upload"]=!0,e(c)}}const BS=typeof XMLHttpRequest<"u";var zS=BS&&function(e){return new Promise(function(n,r){let o=e.data;const i=Xt.from(e.headers).normalize(),s=e.responseType;let a;function l(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}$.isFormData(o)&&(At.isStandardBrowserEnv||At.isStandardBrowserWebWorkerEnv?i.setContentType(!1):i.setContentType("multipart/form-data;",!1));let u=new XMLHttpRequest;if(e.auth){const p=e.auth.username||"",m=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(p+":"+m))}const c=py(e.baseURL,e.url);u.open(e.method.toUpperCase(),uy(c,e.params,e.paramsSerializer),!0),u.timeout=e.timeout;function d(){if(!u)return;const p=Xt.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),y={data:!s||s==="text"||s==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:p,config:e,request:u};OS(function(b){n(b),l()},function(b){r(b),l()},y),u=null}if("onloadend"in u?u.onloadend=d:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(d)},u.onabort=function(){u&&(r(new ne("Request aborted",ne.ECONNABORTED,e,u)),u=null)},u.onerror=function(){r(new ne("Network Error",ne.ERR_NETWORK,e,u)),u=null},u.ontimeout=function(){let m=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const y=e.transitional||cy;e.timeoutErrorMessage&&(m=e.timeoutErrorMessage),r(new ne(m,y.clarifyTimeoutError?ne.ETIMEDOUT:ne.ECONNABORTED,e,u)),u=null},At.isStandardBrowserEnv){const p=(e.withCredentials||IS(c))&&e.xsrfCookieName&&jS.read(e.xsrfCookieName);p&&i.set(e.xsrfHeaderName,p)}o===void 0&&i.setContentType(null),"setRequestHeader"in u&&$.forEach(i.toJSON(),function(m,y){u.setRequestHeader(y,m)}),$.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),s&&s!=="json"&&(u.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&u.addEventListener("progress",Bp(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",Bp(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=p=>{u&&(r(!p||p.type?new Pi(null,e,u):p),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const f=FS(c);if(f&&At.protocols.indexOf(f)===-1){r(new ne("Unsupported protocol "+f+":",ne.ERR_BAD_REQUEST,e));return}u.send(o||null)})};const ys={http:pS,xhr:zS};$.forEach(ys,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var US={getAdapter:e=>{e=$.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let o=0;oe instanceof Xt?e.toJSON():e;function Xr(e,t){t=t||{};const n={};function r(u,c,d){return $.isPlainObject(u)&&$.isPlainObject(c)?$.merge.call({caseless:d},u,c):$.isPlainObject(c)?$.merge({},c):$.isArray(c)?c.slice():c}function o(u,c,d){if($.isUndefined(c)){if(!$.isUndefined(u))return r(void 0,u,d)}else return r(u,c,d)}function i(u,c){if(!$.isUndefined(c))return r(void 0,c)}function s(u,c){if($.isUndefined(c)){if(!$.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function a(u,c,d){if(d in t)return r(u,c);if(d in e)return r(void 0,u)}const l={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(u,c)=>o(Up(u),Up(c),!0)};return $.forEach(Object.keys(Object.assign({},e,t)),function(c){const d=l[c]||o,f=d(e[c],t[c],c);$.isUndefined(f)&&d!==a||(n[c]=f)}),n}const hy="1.4.0",Ld={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ld[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Wp={};Ld.transitional=function(t,n,r){function o(i,s){return"[Axios v"+hy+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,a)=>{if(t===!1)throw new ne(o(s," has been removed"+(n?" in "+n:"")),ne.ERR_DEPRECATED);return n&&!Wp[s]&&(Wp[s]=!0,console.warn(o(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,s,a):!0}};function WS(e,t,n){if(typeof e!="object")throw new ne("options must be an object",ne.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],s=t[i];if(s){const a=e[i],l=a===void 0||s(a,i,e);if(l!==!0)throw new ne("option "+i+" must be "+l,ne.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ne("Unknown option "+i,ne.ERR_BAD_OPTION)}}var Xu={assertOptions:WS,validators:Ld};const an=Xu.validators;class Ys{constructor(t){this.defaults=t,this.interceptors={request:new Fp,response:new Fp}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Xr(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&Xu.assertOptions(r,{silentJSONParsing:an.transitional(an.boolean),forcedJSONParsing:an.transitional(an.boolean),clarifyTimeoutError:an.transitional(an.boolean)},!1),o!=null&&($.isFunction(o)?n.paramsSerializer={serialize:o}:Xu.assertOptions(o,{encode:an.function,serialize:an.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s;s=i&&$.merge(i.common,i[n.method]),s&&$.forEach(["delete","get","head","post","put","patch","common"],m=>{delete i[m]}),n.headers=Xt.concat(s,i);const a=[];let l=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(l=l&&y.synchronous,a.unshift(y.fulfilled,y.rejected))});const u=[];this.interceptors.response.forEach(function(y){u.push(y.fulfilled,y.rejected)});let c,d=0,f;if(!l){const m=[zp.bind(this),void 0];for(m.unshift.apply(m,a),m.push.apply(m,u),f=m.length,c=Promise.resolve(n);d{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(a=>{r.subscribe(a),i=a}).then(o);return s.cancel=function(){r.unsubscribe(i)},s},t(function(i,s,a){r.reason||(r.reason=new Pi(i,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Ad(function(o){t=o}),cancel:t}}}var HS=Ad;function KS(e){return function(n){return e.apply(null,n)}}function GS(e){return $.isObject(e)&&e.isAxiosError===!0}const Yu={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Yu).forEach(([e,t])=>{Yu[t]=e});var QS=Yu;function my(e){const t=new bs(e),n=qv(bs.prototype.request,t);return $.extend(n,bs.prototype,t,{allOwnKeys:!0}),$.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return my(Xr(e,o))},n}const Le=my(Md);Le.Axios=bs;Le.CanceledError=Pi;Le.CancelToken=HS;Le.isCancel=fy;Le.VERSION=hy;Le.toFormData=Oa;Le.AxiosError=ne;Le.Cancel=Le.CanceledError;Le.all=function(t){return Promise.all(t)};Le.spread=KS;Le.isAxiosError=GS;Le.mergeConfig=Xr;Le.AxiosHeaders=Xt;Le.formToJSON=e=>dy($.isHTMLForm(e)?new FormData(e):e);Le.HttpStatusCode=QS;Le.default=Le;var XS=Le,YS=Zl&&Zl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Rd,"__esModule",{value:!0});var gy=Rd.PipedAPI=void 0;const qS=YS(XS);class JS{constructor(t="https://pipedapi.kavin.rocks"){this.host=t}async _get(t){return(await qS.default.get(`${this.host}${t}`)).data}async trending(t){return await this._get(`/trending?region=${t}`)}async streams(t){return await this._get(`/streams/${t}`)}async comments(t,n){return n?await this._get(`/nextpage/comments/${t}?nextpage=${n}`):await this._get(`/comments/${t}`)}async channel(t,n){return n?await this._get(`/nextpage/channel/${t}?nextpage=${n}`):await this._get(`/channel/${t}`)}async channelTabs(t){return await this._get(`/channels/tabs/?data=${t}`)}async channelByName(t){return await this._get(`/c/${t}`)}async user(t){return await this._get(`/user/${t}`)}async playlist(t,n){return n?await this._get(`/nextpage/playlists/${t}?nextpage=${n}`):await this._get(`/playlists/${t}`)}async suggestions(t){return await this._get(`/suggestions?query=${t}`)}async sponsors(t,n=["sponsor"]){return await this._get(`/sponsors/${t}?category=${JSON.stringify(n)}`)}async search(t,n="all"){return await this._get(`/search?q=${t}&filter=${n}`)}}gy=Rd.PipedAPI=JS;/** * @remix-run/router v1.7.2 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function ci(){return ci=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Da(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function eP(){return Math.random().toString(36).substr(2,8)}function Kp(e,t){return{usr:e.state,key:e.key,idx:t}}function qu(e,t,n,r){return n===void 0&&(n=null),ci({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?sr(t):t,{state:n,key:t&&t.key||r||eP()})}function qs(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function sr(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function tP(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,s=o.history,a=vn.Pop,l=null,u=c();u==null&&(u=0,s.replaceState(ci({},s.state,{idx:u}),""));function c(){return(s.state||{idx:null}).idx}function d(){a=vn.Pop;let P=c(),b=P==null?null:P-u;u=P,l&&l({action:a,location:y.location,delta:b})}function f(P,b){a=vn.Push;let h=qu(y.location,P,b);n&&n(h,P),u=c()+1;let v=Kp(h,u),S=y.createHref(h);try{s.pushState(v,"",S)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;o.location.assign(S)}i&&l&&l({action:a,location:y.location,delta:1})}function p(P,b){a=vn.Replace;let h=qu(y.location,P,b);n&&n(h,P),u=c();let v=Kp(h,u),S=y.createHref(h);s.replaceState(v,"",S),i&&l&&l({action:a,location:y.location,delta:0})}function m(P){let b=o.location.origin!=="null"?o.location.origin:o.location.href,h=typeof P=="string"?P:qs(P);return Te(b,"No window.location.(origin|href) available to create URL for href: "+h),new URL(h,b)}let y={get action(){return a},get location(){return e(o,s)},listen(P){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(Hp,d),l=P,()=>{o.removeEventListener(Hp,d),l=null}},createHref(P){return t(o,P)},createURL:m,encodeLocation(P){let b=m(P);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:f,replace:p,go(P){return s.go(P)}};return y}var Gp;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Gp||(Gp={}));function nP(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?sr(t):t,o=Od(r.pathname||"/",n);if(o==null)return null;let i=vy(e);rP(i);let s=null;for(let a=0;s==null&&a{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:s,route:i};l.relativePath.startsWith("/")&&(Te(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=Tn([r,l.relativePath]),c=n.concat(l);i.children&&i.children.length>0&&(Te(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),vy(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:cP(u,i.index),routesMeta:c})};return e.forEach((i,s)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))o(i,s);else for(let l of yy(i.path))o(i,s,l)}),t}function yy(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let s=yy(r.join("/")),a=[];return a.push(...s.map(l=>l===""?i:[i,l].join("/"))),o&&a.push(...s),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function rP(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:dP(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const oP=/^:\w+$/,iP=3,sP=2,aP=1,lP=10,uP=-2,Qp=e=>e==="*";function cP(e,t){let n=e.split("/"),r=n.length;return n.some(Qp)&&(r+=uP),t&&(r+=sP),n.filter(o=>!Qp(o)).reduce((o,i)=>o+(oP.test(i)?iP:i===""?aP:lP),r)}function dP(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function fP(e,t){let{routesMeta:n}=e,r={},o="/",i=[];for(let s=0;s{if(c==="*"){let f=a[d]||"";s=i.slice(0,i.length-f.length).replace(/(.)\/+$/,"$1")}return u[c]=gP(a[d]||"",c),u},{}),pathname:i,pathnameBase:s,pattern:e}}function hP(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Da(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(s,a)=>(r.push(a),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function mP(e){try{return decodeURI(e)}catch(t){return Da(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function gP(e,t){try{return decodeURIComponent(e)}catch(n){return Da(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function Od(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function vP(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?sr(e):e;return{pathname:n?n.startsWith("/")?n:yP(n,t):t,search:xP(r),hash:wP(o)}}function yP(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function $l(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function jd(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function _d(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=sr(e):(o=ci({},e),Te(!o.pathname||!o.pathname.includes("?"),$l("?","pathname","search",o)),Te(!o.pathname||!o.pathname.includes("#"),$l("#","pathname","hash",o)),Te(!o.search||!o.search.includes("#"),$l("#","search","hash",o)));let i=e===""||o.pathname==="",s=i?"/":o.pathname,a;if(r||s==null)a=n;else{let d=t.length-1;if(s.startsWith("..")){let f=s.split("/");for(;f[0]==="..";)f.shift(),d-=1;o.pathname=f.join("/")}a=d>=0?t[d]:"/"}let l=vP(o,a),u=s&&s!=="/"&&s.endsWith("/"),c=(i||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const Tn=e=>e.join("/").replace(/\/\/+/g,"/"),bP=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),xP=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,wP=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function SP(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const by=["post","put","patch","delete"];new Set(by);const PP=["get",...by];new Set(PP);/** * React Router v6.14.2 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Js(){return Js=Object.assign?Object.assign.bind():function(e){for(var t=1;tl.pathnameBase)),s=g.useRef(!1);return wy(()=>{s.current=!0}),g.useCallback(function(l,u){if(u===void 0&&(u={}),!s.current)return;if(typeof l=="number"){n.go(l);return}let c=_d(l,JSON.parse(i),o,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Tn([t,c.pathname])),(u.replace?n.replace:n.push)(c,u.state,u)},[t,n,i,o,e])}function TP(){let{matches:e}=g.useContext(on),t=e[e.length-1];return t?t.params:{}}function Sy(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=g.useContext(on),{pathname:o}=oo(),i=JSON.stringify(jd(r).map(s=>s.pathnameBase));return g.useMemo(()=>_d(e,JSON.parse(i),o,n==="path"),[e,i,o,n])}function RP(e,t){return NP(e,t)}function NP(e,t,n){ro()||Te(!1);let{navigator:r}=g.useContext(no),{matches:o}=g.useContext(on),i=o[o.length-1],s=i?i.params:{};i&&i.pathname;let a=i?i.pathnameBase:"/";i&&i.route;let l=oo(),u;if(t){var c;let y=typeof t=="string"?sr(t):t;a==="/"||(c=y.pathname)!=null&&c.startsWith(a)||Te(!1),u=y}else u=l;let d=u.pathname||"/",f=a==="/"?d:d.slice(a.length)||"/",p=nP(e,{pathname:f}),m=OP(p&&p.map(y=>Object.assign({},y,{params:Object.assign({},s,y.params),pathname:Tn([a,r.encodeLocation?r.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?a:Tn([a,r.encodeLocation?r.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),o,n);return t&&m?g.createElement(Ia.Provider,{value:{location:Js({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:vn.Pop}},m):m}function $P(){let e=IP(),t=SP(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},i=null;return g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),n?g.createElement("pre",{style:o},n):null,i)}const MP=g.createElement($P,null);class LP extends g.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?g.createElement(on.Provider,{value:this.props.routeContext},g.createElement(xy.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function AP(e){let{routeContext:t,match:n,children:r}=e,o=g.useContext(Dd);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),g.createElement(on.Provider,{value:t},r)}function OP(e,t,n){var r;if(t===void 0&&(t=[]),n===void 0&&(n=null),e==null){var o;if((o=n)!=null&&o.errors)e=n.matches;else return null}let i=e,s=(r=n)==null?void 0:r.errors;if(s!=null){let a=i.findIndex(l=>l.route.id&&(s==null?void 0:s[l.route.id]));a>=0||Te(!1),i=i.slice(0,Math.min(i.length,a+1))}return i.reduceRight((a,l,u)=>{let c=l.route.id?s==null?void 0:s[l.route.id]:null,d=null;n&&(d=l.route.errorElement||MP);let f=t.concat(i.slice(0,u+1)),p=()=>{let m;return c?m=d:l.route.Component?m=g.createElement(l.route.Component,null):l.route.element?m=l.route.element:m=a,g.createElement(AP,{match:l,routeContext:{outlet:a,matches:f,isDataRoute:n!=null},children:m})};return n&&(l.route.ErrorBoundary||l.route.errorElement||u===0)?g.createElement(LP,{location:n.location,revalidation:n.revalidation,component:d,error:c,children:p(),routeContext:{outlet:null,matches:f,isDataRoute:!0}}):p()},null)}var Ju;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"})(Ju||(Ju={}));var di;(function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"})(di||(di={}));function jP(e){let t=g.useContext(Dd);return t||Te(!1),t}function _P(e){let t=g.useContext(CP);return t||Te(!1),t}function DP(e){let t=g.useContext(on);return t||Te(!1),t}function Py(e){let t=DP(),n=t.matches[t.matches.length-1];return n.route.id||Te(!1),n.route.id}function IP(){var e;let t=g.useContext(xy),n=_P(di.UseRouteError),r=Py(di.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function FP(){let{router:e}=jP(Ju.UseNavigateStable),t=Py(di.UseNavigateStable),n=g.useRef(!1);return wy(()=>{n.current=!0}),g.useCallback(function(o,i){i===void 0&&(i={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,Js({fromRouteId:t},i)))},[e,t])}function VP(e){let{to:t,replace:n,state:r,relative:o}=e;ro()||Te(!1);let{matches:i}=g.useContext(on),{pathname:s}=oo(),a=io(),l=_d(t,jd(i).map(c=>c.pathnameBase),s,o==="path"),u=JSON.stringify(l);return g.useEffect(()=>a(JSON.parse(u),{replace:n,state:r,relative:o}),[a,u,o,n,r]),null}function xs(e){Te(!1)}function BP(e){let{basename:t="/",children:n=null,location:r,navigationType:o=vn.Pop,navigator:i,static:s=!1}=e;ro()&&Te(!1);let a=t.replace(/^\/*/,"/"),l=g.useMemo(()=>({basename:a,navigator:i,static:s}),[a,i,s]);typeof r=="string"&&(r=sr(r));let{pathname:u="/",search:c="",hash:d="",state:f=null,key:p="default"}=r,m=g.useMemo(()=>{let y=Od(u,a);return y==null?null:{location:{pathname:y,search:c,hash:d,state:f,key:p},navigationType:o}},[a,u,c,d,f,p,o]);return m==null?null:g.createElement(no.Provider,{value:l},g.createElement(Ia.Provider,{children:n,value:m}))}function zP(e){let{children:t,location:n}=e;return RP(Zu(t),n)}var Xp;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(Xp||(Xp={}));new Promise(()=>{});function Zu(e,t){t===void 0&&(t=[]);let n=[];return g.Children.forEach(e,(r,o)=>{if(!g.isValidElement(r))return;let i=[...t,o];if(r.type===g.Fragment){n.push.apply(n,Zu(r.props.children,i));return}r.type!==xs&&Te(!1),!r.props.index||!r.props.children||Te(!1);let s={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=Zu(r.props.children,i)),n.push(s)}),n}/** * React Router DOM v6.14.2 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function ec(){return ec=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function WP(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function HP(e,t){return e.button===0&&(!t||t==="_self")&&!WP(e)}function tc(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(o=>[n,o]):[[n,r]])},[]))}function KP(e,t){let n=tc(e);if(t)for(let r of t.keys())n.has(r)||t.getAll(r).forEach(o=>{n.append(r,o)});return n}const GP=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],QP="startTransition",Yp=Sb[QP];function XP(e){let{basename:t,children:n,future:r,window:o}=e,i=g.useRef();i.current==null&&(i.current=ZS({window:o,v5Compat:!0}));let s=i.current,[a,l]=g.useState({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},c=g.useCallback(d=>{u&&Yp?Yp(()=>l(d)):l(d)},[l,u]);return g.useLayoutEffect(()=>s.listen(c),[s,c]),g.createElement(BP,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:s})}const YP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",qP=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,No=g.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:i,replace:s,state:a,target:l,to:u,preventScrollReset:c}=t,d=UP(t,GP),{basename:f}=g.useContext(no),p,m=!1;if(typeof u=="string"&&qP.test(u)&&(p=u,YP))try{let h=new URL(window.location.href),v=u.startsWith("//")?new URL(h.protocol+u):new URL(u),S=Od(v.pathname,f);v.origin===h.origin&&S!=null?u=S+v.search+v.hash:m=!0}catch{}let y=EP(u,{relative:o}),P=JP(u,{replace:s,state:a,target:l,preventScrollReset:c,relative:o});function b(h){r&&r(h),h.defaultPrevented||P(h)}return g.createElement("a",ec({},d,{href:p||y,onClick:m||i?r:b,ref:n,target:l}))});var qp;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(qp||(qp={}));var Jp;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Jp||(Jp={}));function JP(e,t){let{target:n,replace:r,state:o,preventScrollReset:i,relative:s}=t===void 0?{}:t,a=io(),l=oo(),u=Sy(e,{relative:s});return g.useCallback(c=>{if(HP(c,n)){c.preventDefault();let d=r!==void 0?r:qs(l)===qs(u);a(e,{replace:d,state:o,preventScrollReset:i,relative:s})}},[l,a,u,r,o,n,e,i,s])}function ZP(e){let t=g.useRef(tc(e)),n=g.useRef(!1),r=oo(),o=g.useMemo(()=>KP(r.search,n.current?null:t.current),[r.search]),i=io(),s=g.useCallback((a,l)=>{const u=tc(typeof a=="function"?a(o):a);n.current=!0,i("?"+u,l)},[i,o]);return[o,s]}const Id={prefix:String(Math.round(Math.random()*1e10)),current:0,isSSR:!1},Fd=oe.createContext(Id);let eC=!!(typeof window<"u"&&window.document&&window.document.createElement),Ml=new WeakMap;function tC(e=!1){let t=g.useContext(Fd),n=g.useRef(null);if(n.current===null&&!e){var r,o;let i=(r=oe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||r===void 0||(o=r.ReactCurrentOwner)===null||o===void 0?void 0:o.current;if(i){let s=Ml.get(i);s==null?Ml.set(i,{id:t.current,state:i.memoizedState}):i.memoizedState!==s.state&&(t.current=s.id,Ml.delete(i))}n.current=++t.current}return n.current}function nC(e){let t=g.useContext(Fd);t===Id&&!eC&&console.warn("When server rendering, you must wrap your application in an to ensure consistent ids are generated between the client and server.");let n=tC(!!e);return e||`react-aria${t.prefix}-${n}`}function rC(e){let t=oe.useId(),[n]=g.useState(Vd()),r=n?"react-aria":`react-aria${Id.prefix}`;return e||`${r}-${t}`}const oC=typeof oe.useId=="function"?rC:nC;function iC(){return!1}function sC(){return!0}function aC(e){return()=>{}}function Vd(){return typeof oe.useSyncExternalStore=="function"?oe.useSyncExternalStore(aC,iC,sC):g.useContext(Fd).isSSR}function Bd(e,t,n){let[r,o]=g.useState(e||t),i=g.useRef(e!==void 0),s=e!==void 0;g.useEffect(()=>{let u=i.current;u!==s&&console.warn(`WARN: A component changed from ${u?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}.`),i.current=s},[s]);let a=s?e:r,l=g.useCallback((u,...c)=>{let d=(f,...p)=>{n&&(Object.is(a,f)||n(f,...p)),s||(a=f)};typeof u=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),o((p,...m)=>{let y=u(s?a:p,...m);return d(y,...c),s?p:y})):(s||o(u),d(u,...c))},[s,a,n]);return[a,l]}function Cy(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;t{};function uC(e){let[t,n]=g.useState(e),r=g.useRef(t),o=g.useRef(null),i=g.useCallback(()=>{let a=o.current.next();for(;!a.done&&r.current===a.value;)a=o.current.next();if(a.done){o.current=null;return}n(a.value),r.current=a.value},[n,r,o]);nt(()=>{o.current&&i()});let s=g.useCallback(a=>{o.current=a(r.current),i()},[i,o,r]);return[t,s]}let Zs=new Map;function ea(e){let[t,n]=g.useState(e),r=g.useRef(null),o=oC(t),i=g.useCallback(s=>{r.current=s},[]);return Zs.set(o,i),nt(()=>{let s=o;return()=>{Zs.delete(s)}},[o]),g.useEffect(()=>{let s=r.current;s&&(r.current=null,n(s))}),o}function cC(e,t){if(e===t)return e;let n=Zs.get(e);if(n)return n(t),t;let r=Zs.get(t);return r?(r(e),e):t}function Zp(e=[]){let t=ea(),[n,r]=uC(t),o=g.useCallback(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return nt(o,[t,o,...e]),n}function Ci(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}function we(...e){let t={...e[0]};for(let n=1;n=65&&o.charCodeAt(2)<=90?t[o]=Ci(i,s):(o==="className"||o==="UNSAFE_className")&&typeof i=="string"&&typeof s=="string"?t[o]=lC(i,s):o==="id"&&i&&s?t.id=cC(i,s):t[o]=s!==void 0?s:i}}return t}const dC=new Set(["id"]),fC=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),pC=/^(data-.*)$/;function zd(e,t={}){let{labelable:n,propNames:r}=t,o={};for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(dC.has(i)||n&&fC.has(i)||r!=null&&r.has(i)||pC.test(i))&&(o[i]=e[i]);return o}function $r(e){if(hC())e.focus({preventScroll:!0});else{let t=mC(e);e.focus(),gC(t)}}let Qi=null;function hC(){if(Qi==null){Qi=!1;try{var e=document.createElement("div");e.focus({get preventScroll(){return Qi=!0,!0}})}catch{}}return Qi}function mC(e){for(var t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;t instanceof HTMLElement&&t!==r;)(t.offsetHeight"u")return;let e=n=>{let r=mr.get(n.target);r||(r=new Set,mr.set(n.target,r),n.target.addEventListener("transitioncancel",t)),r.add(n.propertyName)},t=n=>{let r=mr.get(n.target);if(r&&(r.delete(n.propertyName),r.size===0&&(n.target.removeEventListener("transitioncancel",t),mr.delete(n.target)),mr.size===0)){for(let o of nc)o();nc.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document<"u"&&(document.readyState!=="loading"?eh():document.addEventListener("DOMContentLoaded",eh));function Ey(e){requestAnimationFrame(()=>{mr.size===0?e():nc.add(e)})}function vC(){let e=g.useRef(new Map),t=g.useCallback((o,i,s,a)=>{let l=a!=null&&a.once?(...u)=>{e.current.delete(s),s(...u)}:s;e.current.set(s,{type:i,eventTarget:o,fn:l,options:a}),o.addEventListener(i,s,a)},[]),n=g.useCallback((o,i,s,a)=>{var l;let u=((l=e.current.get(s))===null||l===void 0?void 0:l.fn)||s;o.removeEventListener(i,u,a),e.current.delete(s)},[]),r=g.useCallback(()=>{e.current.forEach((o,i)=>{n(o.eventTarget,o.type,i,o.options)})},[n]);return g.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function yC(e,t){let{id:n,"aria-label":r,"aria-labelledby":o}=e;return n=ea(n),o&&r?o=[...new Set([n,...o.trim().split(/\s+/)])].join(" "):o&&(o=o.trim().split(/\s+/).join(" ")),!r&&!o&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":o}}function bC(){return typeof window.ResizeObserver<"u"}function xC(e){const{ref:t,onResize:n}=e;g.useEffect(()=>{let r=t==null?void 0:t.current;if(r)if(bC()){const o=new window.ResizeObserver(i=>{i.length&&n()});return o.observe(r),()=>{r&&o.unobserve(r)}}else return window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)}},[n,t])}function ky(e,t){nt(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref.current=null}},[e,t])}function wC(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function Ud(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function Ty(){return Ud(/^Mac/i)}function SC(){return Ud(/^iPhone/i)}function PC(){return Ud(/^iPad/i)||Ty()&&navigator.maxTouchPoints>1}function Ry(){return SC()||PC()}function CC(){return wC(/Android/i)}function gr(e){const t=g.useRef(null);return nt(()=>{t.current=e},[e]),g.useCallback((...n)=>{const r=t.current;return r(...n)},[])}function rc(e){return e.mozInputSource===0&&e.isTrusted?!0:CC()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function EC(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}const kC=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),TC=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function Ny(e){if(Intl.Locale){let n=new Intl.Locale(e).maximize().script;return kC.has(n)}let t=e.split("-")[0];return TC.has(t)}function $y(){let e=typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:Ny(e)?"rtl":"ltr"}}let oc=$y(),$o=new Set;function th(){oc=$y();for(let e of $o)e(oc)}function RC(){let e=Vd(),[t,n]=g.useState(oc);return g.useEffect(()=>($o.size===0&&window.addEventListener("languagechange",th),$o.add(n),()=>{$o.delete(n),$o.size===0&&window.removeEventListener("languagechange",th)}),[]),e?{locale:"en-US",direction:"ltr"}:t}const NC=oe.createContext(null);function $C(e){let{locale:t,children:n}=e,r=RC(),o=t?{locale:t,direction:Ny(t)?"rtl":"ltr"}:r;return oe.createElement(NC.Provider,{value:o},n)}var Lt=function(){return Lt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r{Ey(()=>{Mr==="restoring"&&(document.documentElement.style.webkitUserSelect==="none"&&(document.documentElement.style.webkitUserSelect=ic||""),ic="",Mr="default")})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&ws.has(e)){let t=ws.get(e);e.style.userSelect==="none"&&(e.style.userSelect=t),e.getAttribute("style")===""&&e.removeAttribute("style"),ws.delete(e)}}const Ly=oe.createContext(null);Ly.displayName="PressResponderContext";function LC(e){let t=g.useContext(Ly);if(t){let{register:n,...r}=t;e=we(r,e),n()}return ky(t,e.ref),e}function Wd(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:o,onPressUp:i,isDisabled:s,isPressed:a,preventFocusOnPress:l,shouldCancelOnPointerExit:u,allowTextSelectionOnPress:c,ref:d,...f}=LC(e),[p,m]=g.useState(!1),y=g.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:P,removeAllGlobalListeners:b}=vC(),h=gr((x,N)=>{let F=y.current;s||F.didFirePressStart||(r&&r({type:"pressstart",pointerType:N,target:x.currentTarget,shiftKey:x.shiftKey,metaKey:x.metaKey,ctrlKey:x.ctrlKey,altKey:x.altKey}),n&&n(!0),F.didFirePressStart=!0,m(!0))}),v=gr((x,N,F=!0)=>{let M=y.current;M.didFirePressStart&&(M.ignoreClickAfterPress=!0,M.didFirePressStart=!1,o&&o({type:"pressend",pointerType:N,target:x.currentTarget,shiftKey:x.shiftKey,metaKey:x.metaKey,ctrlKey:x.ctrlKey,altKey:x.altKey}),n&&n(!1),m(!1),t&&F&&!s&&t({type:"press",pointerType:N,target:x.currentTarget,shiftKey:x.shiftKey,metaKey:x.metaKey,ctrlKey:x.ctrlKey,altKey:x.altKey}))}),S=gr((x,N)=>{s||i&&i({type:"pressup",pointerType:N,target:x.currentTarget,shiftKey:x.shiftKey,metaKey:x.metaKey,ctrlKey:x.ctrlKey,altKey:x.altKey})}),E=gr(x=>{let N=y.current;N.isPressed&&(N.isOverTarget&&v(Bt(N.target,x),N.pointerType,!1),N.isPressed=!1,N.isOverTarget=!1,N.activePointerId=null,N.pointerType=null,b(),c||Xi(N.target))}),R=gr(x=>{u&&E(x)}),T=g.useMemo(()=>{let x=y.current,N={onKeyDown(M){Ll(M.nativeEvent,M.currentTarget)&&M.currentTarget.contains(M.target)?(oh(M.target,M.key)&&M.preventDefault(),M.stopPropagation(),!x.isPressed&&!M.repeat&&(x.target=M.currentTarget,x.isPressed=!0,h(M,"keyboard"),P(document,"keyup",F,!1))):M.key==="Enter"&&sc(M.currentTarget)&&M.stopPropagation()},onKeyUp(M){Ll(M.nativeEvent,M.currentTarget)&&!M.repeat&&M.currentTarget.contains(M.target)&&S(Bt(x.target,M),"keyboard")},onClick(M){M&&!M.currentTarget.contains(M.target)||M&&M.button===0&&(M.stopPropagation(),s&&M.preventDefault(),!x.ignoreClickAfterPress&&!x.ignoreEmulatedMouseEvents&&(x.pointerType==="virtual"||rc(M.nativeEvent))&&(!s&&!l&&$r(M.currentTarget),h(M,"virtual"),S(M,"virtual"),v(M,"virtual")),x.ignoreEmulatedMouseEvents=!1,x.ignoreClickAfterPress=!1)}},F=M=>{if(x.isPressed&&Ll(M,x.target)){oh(M.target,M.key)&&M.preventDefault(),M.stopPropagation(),x.isPressed=!1;let B=M.target;v(Bt(x.target,M),"keyboard",x.target.contains(B)),b(),x.target instanceof HTMLElement&&x.target.contains(B)&&(sc(x.target)||x.target.getAttribute("role")==="link")&&x.target.click()}};if(typeof PointerEvent<"u"){N.onPointerDown=j=>{if(!(j.button!==0||!j.currentTarget.contains(j.target))){if(EC(j.nativeEvent)){x.pointerType="virtual";return}Al(j.currentTarget)&&j.preventDefault(),x.pointerType=j.pointerType,j.stopPropagation(),x.isPressed||(x.isPressed=!0,x.isOverTarget=!0,x.activePointerId=j.pointerId,x.target=j.currentTarget,!s&&!l&&$r(j.currentTarget),c||nh(x.target),h(j,x.pointerType),P(document,"pointermove",M,!1),P(document,"pointerup",B,!1),P(document,"pointercancel",A,!1))}},N.onMouseDown=j=>{j.currentTarget.contains(j.target)&&j.button===0&&(Al(j.currentTarget)&&j.preventDefault(),j.stopPropagation())},N.onPointerUp=j=>{!j.currentTarget.contains(j.target)||x.pointerType==="virtual"||j.button===0&&dr(j,j.currentTarget)&&S(j,x.pointerType||j.pointerType)};let M=j=>{j.pointerId===x.activePointerId&&(dr(j,x.target)?x.isOverTarget||(x.isOverTarget=!0,h(Bt(x.target,j),x.pointerType)):x.isOverTarget&&(x.isOverTarget=!1,v(Bt(x.target,j),x.pointerType,!1),R(j)))},B=j=>{j.pointerId===x.activePointerId&&x.isPressed&&j.button===0&&(dr(j,x.target)?v(Bt(x.target,j),x.pointerType):x.isOverTarget&&v(Bt(x.target,j),x.pointerType,!1),x.isPressed=!1,x.isOverTarget=!1,x.activePointerId=null,x.pointerType=null,b(),c||Xi(x.target))},A=j=>{E(j)};N.onDragStart=j=>{j.currentTarget.contains(j.target)&&E(j)}}else{N.onMouseDown=A=>{A.button!==0||!A.currentTarget.contains(A.target)||(Al(A.currentTarget)&&A.preventDefault(),A.stopPropagation(),!x.ignoreEmulatedMouseEvents&&(x.isPressed=!0,x.isOverTarget=!0,x.target=A.currentTarget,x.pointerType=rc(A.nativeEvent)?"virtual":"mouse",!s&&!l&&$r(A.currentTarget),h(A,x.pointerType),P(document,"mouseup",M,!1)))},N.onMouseEnter=A=>{A.currentTarget.contains(A.target)&&(A.stopPropagation(),x.isPressed&&!x.ignoreEmulatedMouseEvents&&(x.isOverTarget=!0,h(A,x.pointerType)))},N.onMouseLeave=A=>{A.currentTarget.contains(A.target)&&(A.stopPropagation(),x.isPressed&&!x.ignoreEmulatedMouseEvents&&(x.isOverTarget=!1,v(A,x.pointerType,!1),R(A)))},N.onMouseUp=A=>{A.currentTarget.contains(A.target)&&!x.ignoreEmulatedMouseEvents&&A.button===0&&S(A,x.pointerType)};let M=A=>{if(A.button===0){if(x.isPressed=!1,b(),x.ignoreEmulatedMouseEvents){x.ignoreEmulatedMouseEvents=!1;return}dr(A,x.target)?v(Bt(x.target,A),x.pointerType):x.isOverTarget&&v(Bt(x.target,A),x.pointerType,!1),x.isOverTarget=!1}};N.onTouchStart=A=>{if(!A.currentTarget.contains(A.target))return;A.stopPropagation();let j=AC(A.nativeEvent);j&&(x.activePointerId=j.identifier,x.ignoreEmulatedMouseEvents=!0,x.isOverTarget=!0,x.isPressed=!0,x.target=A.currentTarget,x.pointerType="touch",!s&&!l&&$r(A.currentTarget),c||nh(x.target),h(A,x.pointerType),P(window,"scroll",B,!0))},N.onTouchMove=A=>{if(!A.currentTarget.contains(A.target)||(A.stopPropagation(),!x.isPressed))return;let j=rh(A.nativeEvent,x.activePointerId);j&&dr(j,A.currentTarget)?x.isOverTarget||(x.isOverTarget=!0,h(A,x.pointerType)):x.isOverTarget&&(x.isOverTarget=!1,v(A,x.pointerType,!1),R(A))},N.onTouchEnd=A=>{if(!A.currentTarget.contains(A.target)||(A.stopPropagation(),!x.isPressed))return;let j=rh(A.nativeEvent,x.activePointerId);j&&dr(j,A.currentTarget)?(S(A,x.pointerType),v(A,x.pointerType)):x.isOverTarget&&v(A,x.pointerType,!1),x.isPressed=!1,x.activePointerId=null,x.isOverTarget=!1,x.ignoreEmulatedMouseEvents=!0,c||Xi(x.target),b()},N.onTouchCancel=A=>{A.currentTarget.contains(A.target)&&(A.stopPropagation(),x.isPressed&&E(A))};let B=A=>{x.isPressed&&A.target.contains(x.target)&&E({currentTarget:x.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};N.onDragStart=A=>{A.currentTarget.contains(A.target)&&E(A)}}return N},[P,s,l,b,c,E,R,v,h,S]);return g.useEffect(()=>()=>{c||Xi(y.current.target)},[c]),{isPressed:a||p,pressProps:we(f,T)}}function sc(e){return e.tagName==="A"&&e.hasAttribute("href")}function Ll(e,t){const{key:n,code:r}=e,o=t,i=o.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(o instanceof HTMLInputElement&&!Ay(o,n)||o instanceof HTMLTextAreaElement||o.isContentEditable)&&(!sc(o)||i==="button"&&n!=="Enter")&&!(i==="link"&&n!=="Enter")}function AC(e){const{targetTouches:t}=e;return t.length>0?t[0]:null}function rh(e,t){const n=e.changedTouches;for(let r=0;rt.right||t.left>e.right||e.top>t.bottom||t.top>e.bottom)}function dr(e,t){let n=t.getBoundingClientRect(),r=OC(e);return jC(n,r)}function Al(e){return!(e instanceof HTMLElement)||!e.draggable}function oh(e,t){return e instanceof HTMLInputElement?!Ay(e,t):e instanceof HTMLButtonElement?e.type!=="submit":!0}const _C=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Ay(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":_C.has(e.type)}class DC{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(t,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=t}}function Oy(e){let t=g.useRef({isFocused:!1,observer:null});nt(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=gr(r=>{e==null||e(r)});return g.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let o=r.target,i=s=>{t.current.isFocused=!1,o.disabled&&n(new DC("blur",s)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};o.addEventListener("focusout",i,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&o.disabled){t.current.observer.disconnect();let s=o===document.activeElement?null:document.activeElement;o.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),t.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function jy(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:o}=e;const i=g.useCallback(l=>{if(l.target===l.currentTarget)return r&&r(l),o&&o(!1),!0},[r,o]),s=Oy(i),a=g.useCallback(l=>{l.target===l.currentTarget&&document.activeElement===l.target&&(n&&n(l),o&&o(!0),s(l))},[o,n,s]);return{focusProps:{onFocus:!t&&(n||o||r)?a:void 0,onBlur:!t&&(r||o)?i:void 0}}}let so=null,ac=new Set,ih=!1,nr=!1,lc=!1;const IC={Tab:!0,Escape:!0};function Hd(e,t){for(let n of ac)n(e,t)}function FC(e){return!(e.metaKey||!Ty()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function sh(e){nr=!0,FC(e)&&(so="keyboard",Hd("keyboard",e))}function fr(e){so="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(nr=!0,Hd("pointer",e))}function VC(e){rc(e)&&(nr=!0,so="virtual")}function BC(e){e.target===window||e.target===document||(!nr&&!lc&&(so="virtual",Hd("virtual",e)),nr=!1,lc=!1)}function zC(){nr=!1,lc=!0}function uc(){if(typeof window>"u"||ih)return;let e=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(){nr=!0,e.apply(this,arguments)},document.addEventListener("keydown",sh,!0),document.addEventListener("keyup",sh,!0),document.addEventListener("click",VC,!0),window.addEventListener("focus",BC,!0),window.addEventListener("blur",zC,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",fr,!0),document.addEventListener("pointermove",fr,!0),document.addEventListener("pointerup",fr,!0)):(document.addEventListener("mousedown",fr,!0),document.addEventListener("mousemove",fr,!0),document.addEventListener("mouseup",fr,!0)),ih=!0}typeof document<"u"&&(document.readyState!=="loading"?uc():document.addEventListener("DOMContentLoaded",uc));function _y(){return so!=="pointer"}function UC(){return so}function WC(e,t,n){return!(e&&t==="keyboard"&&n instanceof KeyboardEvent&&!IC[n.key])}function HC(e,t,n){uc(),g.useEffect(()=>{let r=(o,i)=>{WC(n==null?void 0:n.isTextInput,o,i)&&e(_y())};return ac.add(r),()=>{ac.delete(r)}},t)}function KC(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:o}=e,i=g.useRef({isFocusWithin:!1}),s=g.useCallback(u=>{i.current.isFocusWithin&&!u.currentTarget.contains(u.relatedTarget)&&(i.current.isFocusWithin=!1,n&&n(u),o&&o(!1))},[n,o,i]),a=Oy(s),l=g.useCallback(u=>{!i.current.isFocusWithin&&document.activeElement===u.target&&(r&&r(u),o&&o(!0),i.current.isFocusWithin=!0,a(u))},[r,o,a]);return t?{focusWithinProps:{onFocus:null,onBlur:null}}:{focusWithinProps:{onFocus:l,onBlur:s}}}let ta=!1,Ol=0;function cc(){ta=!0,setTimeout(()=>{ta=!1},50)}function ah(e){e.pointerType==="touch"&&cc()}function GC(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",ah):document.addEventListener("touchend",cc),Ol++,()=>{Ol--,!(Ol>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",ah):document.removeEventListener("touchend",cc))}}function Ei(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:o}=e,[i,s]=g.useState(!1),a=g.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;g.useEffect(GC,[]);let{hoverProps:l,triggerHoverEnd:u}=g.useMemo(()=>{let c=(p,m)=>{if(a.pointerType=m,o||m==="touch"||a.isHovered||!p.currentTarget.contains(p.target))return;a.isHovered=!0;let y=p.currentTarget;a.target=y,t&&t({type:"hoverstart",target:y,pointerType:m}),n&&n(!0),s(!0)},d=(p,m)=>{if(a.pointerType="",a.target=null,m==="touch"||!a.isHovered)return;a.isHovered=!1;let y=p.currentTarget;r&&r({type:"hoverend",target:y,pointerType:m}),n&&n(!1),s(!1)},f={};return typeof PointerEvent<"u"?(f.onPointerEnter=p=>{ta&&p.pointerType==="mouse"||c(p,p.pointerType)},f.onPointerLeave=p=>{!o&&p.currentTarget.contains(p.target)&&d(p,p.pointerType)}):(f.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},f.onMouseEnter=p=>{!a.ignoreEmulatedMouseEvents&&!ta&&c(p,"mouse"),a.ignoreEmulatedMouseEvents=!1},f.onMouseLeave=p=>{!o&&p.currentTarget.contains(p.target)&&d(p,"mouse")}),{hoverProps:f,triggerHoverEnd:d}},[t,n,r,o,a]);return g.useEffect(()=>{o&&u({currentTarget:a.target},a.pointerType)},[o]),{hoverProps:l,isHovered:i}}function lh(e){if(!e)return;let t=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.")},continuePropagation(){t=!1}};e(r),t&&n.stopPropagation()}}function QC(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:lh(e.onKeyDown),onKeyUp:lh(e.onKeyUp)}}}function Dy(e){if(UC()==="virtual"){let t=document.activeElement;Ey(()=>{document.activeElement===t&&document.contains(e)&&$r(e)})}else $r(e)}function XC(e){if(!(e instanceof HTMLElement)&&!(e instanceof SVGElement))return!1;let{display:t,visibility:n}=e.style,r=t!=="none"&&n!=="hidden"&&n!=="collapse";if(r){const{getComputedStyle:o}=e.ownerDocument.defaultView;let{display:i,visibility:s}=o(e);r=i!=="none"&&s!=="hidden"&&s!=="collapse"}return r}function YC(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function Iy(e,t){return e.nodeName!=="#comment"&&XC(e)&&YC(e,t)&&(!e.parentElement||Iy(e.parentElement,e))}const uh=oe.createContext(null);let he=null;function qC(e){let{children:t,contain:n,restoreFocus:r,autoFocus:o}=e,i=g.useRef(),s=g.useRef(),a=g.useRef([]),{parentNode:l}=g.useContext(uh)||{},u=g.useMemo(()=>new fc({scopeRef:a}),[a]);nt(()=>{let f=l||Ee.root;if(Ee.getTreeNode(f.scopeRef)&&he&&!na(he,f.scopeRef)){let p=Ee.getTreeNode(he);p&&(f=p)}f.addChild(u),Ee.addNode(u)},[u,l]),nt(()=>{let f=Ee.getTreeNode(a);f.contain=n},[n]),nt(()=>{let f=i.current.nextSibling,p=[];for(;f&&f!==s.current;)p.push(f),f=f.nextSibling;a.current=p},[t]),rE(a,r,n),tE(a,n),iE(a,r,n),nE(a,o),g.useEffect(()=>{if(a){let f=document.activeElement,p=null;if(Ue(f,a.current)){for(let m of Ee.traverse())Ue(f,m.scopeRef.current)&&(p=m);p===Ee.getTreeNode(a)&&(he=p.scopeRef)}return()=>{let m=Ee.getTreeNode(a).parent.scopeRef;(a===he||na(a,he))&&(!m||Ee.getTreeNode(m))&&(he=m),Ee.removeTreeNode(a)}}},[a]);let c=g.useMemo(()=>JC(a),[]),d=g.useMemo(()=>({focusManager:c,parentNode:u}),[u,c]);return oe.createElement(uh.Provider,{value:d},oe.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:i}),t,oe.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:s}))}function JC(e){return{focusNext(t={}){let n=e.current,{from:r,tabbable:o,wrap:i,accept:s}=t,a=r||document.activeElement,l=n[0].previousElementSibling,u=yn(Kn(n),{tabbable:o,accept:s},n);u.currentNode=Ue(a,n)?a:l;let c=u.nextNode();return!c&&i&&(u.currentNode=l,c=u.nextNode()),c&&Kt(c,!0),c},focusPrevious(t={}){let n=e.current,{from:r,tabbable:o,wrap:i,accept:s}=t,a=r||document.activeElement,l=n[n.length-1].nextElementSibling,u=yn(Kn(n),{tabbable:o,accept:s},n);u.currentNode=Ue(a,n)?a:l;let c=u.previousNode();return!c&&i&&(u.currentNode=l,c=u.previousNode()),c&&Kt(c,!0),c},focusFirst(t={}){let n=e.current,{tabbable:r,accept:o}=t,i=yn(Kn(n),{tabbable:r,accept:o},n);i.currentNode=n[0].previousElementSibling;let s=i.nextNode();return s&&Kt(s,!0),s},focusLast(t={}){let n=e.current,{tabbable:r,accept:o}=t,i=yn(Kn(n),{tabbable:r,accept:o},n);i.currentNode=n[n.length-1].nextElementSibling;let s=i.previousNode();return s&&Kt(s,!0),s}}}const Kd=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]"],ZC=Kd.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";Kd.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const eE=Kd.join(':not([hidden]):not([tabindex="-1"]),');function Kn(e){return e[0].parentElement}function Mo(e){let t=Ee.getTreeNode(he);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function tE(e,t){let n=g.useRef(),r=g.useRef(null);nt(()=>{let o=e.current;if(!t){r.current&&(cancelAnimationFrame(r.current),r.current=null);return}let i=l=>{if(l.key!=="Tab"||l.altKey||l.ctrlKey||l.metaKey||!Mo(e))return;let u=document.activeElement,c=e.current;if(!Ue(u,c))return;let d=yn(Kn(c),{tabbable:!0},c);d.currentNode=u;let f=l.shiftKey?d.previousNode():d.nextNode();f||(d.currentNode=l.shiftKey?c[c.length-1].nextElementSibling:c[0].previousElementSibling,f=l.shiftKey?d.previousNode():d.nextNode()),l.preventDefault(),f&&Kt(f,!0)},s=l=>{(!he||na(he,e))&&Ue(l.target,e.current)?(he=e,n.current=l.target):Mo(e)&&!dc(l.target,e)?n.current?n.current.focus():he&&ra(he.current):Mo(e)&&(n.current=l.target)},a=l=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{Mo(e)&&!dc(document.activeElement,e)&&(he=e,document.body.contains(l.target)?(n.current=l.target,n.current.focus()):he&&ra(he.current))})};return document.addEventListener("keydown",i,!1),document.addEventListener("focusin",s,!1),o.forEach(l=>l.addEventListener("focusin",s,!1)),o.forEach(l=>l.addEventListener("focusout",a,!1)),()=>{document.removeEventListener("keydown",i,!1),document.removeEventListener("focusin",s,!1),o.forEach(l=>l.removeEventListener("focusin",s,!1)),o.forEach(l=>l.removeEventListener("focusout",a,!1))}},[e,t]),nt(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function Fy(e){return dc(e)}function Ue(e,t){return t.some(n=>n.contains(e))}function dc(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of Ee.traverse(Ee.getTreeNode(t)))if(Ue(e,n.current))return!0;return!1}function na(e,t){var n;let r=(n=Ee.getTreeNode(t))===null||n===void 0?void 0:n.parent;for(;r;){if(r.scopeRef===e)return!0;r=r.parent}return!1}function Kt(e,t=!1){if(e!=null&&!t)try{Dy(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function ra(e,t=!0){let n=e[0].previousElementSibling,r=yn(Kn(e),{tabbable:t},e);r.currentNode=n;let o=r.nextNode();t&&!o&&(r=yn(Kn(e),{tabbable:!1},e),r.currentNode=n,o=r.nextNode()),Kt(o)}function nE(e,t){const n=oe.useRef(t);g.useEffect(()=>{n.current&&(he=e,Ue(document.activeElement,he.current)||ra(e.current)),n.current=!1},[e])}function rE(e,t,n){nt(()=>{if(t||n)return;let r=e.current,o=i=>{let s=i.target;Ue(s,e.current)?he=e:Fy(s)||(he=null)};return document.addEventListener("focusin",o,!1),r.forEach(i=>i.addEventListener("focusin",o,!1)),()=>{document.removeEventListener("focusin",o,!1),r.forEach(i=>i.removeEventListener("focusin",o,!1))}},[e,t,n])}function oE(e){let t=Ee.getTreeNode(he);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(t==null?void 0:t.scopeRef)===e}function iE(e,t,n){const r=g.useRef(typeof document<"u"?document.activeElement:null);nt(()=>{let o=e.current;if(!t||n)return;let i=()=>{(!he||na(he,e))&&Ue(document.activeElement,e.current)&&(he=e)};return document.addEventListener("focusin",i,!1),o.forEach(s=>s.addEventListener("focusin",i,!1)),()=>{document.removeEventListener("focusin",i,!1),o.forEach(s=>s.removeEventListener("focusin",i,!1))}},[e,n]),nt(()=>{if(!t)return;Ee.getTreeNode(e).nodeToRestore=r.current;let o=i=>{if(i.key!=="Tab"||i.altKey||i.ctrlKey||i.metaKey||!Mo(e))return;let s=document.activeElement;if(!Ue(s,e.current))return;let a=Ee.getTreeNode(e).nodeToRestore,l=yn(document.body,{tabbable:!0});l.currentNode=s;let u=i.shiftKey?l.previousNode():l.nextNode();if((!document.body.contains(a)||a===document.body)&&(a=null,Ee.getTreeNode(e).nodeToRestore=null),(!u||!Ue(u,e.current))&&a){l.currentNode=a;do u=i.shiftKey?l.previousNode():l.nextNode();while(Ue(u,e.current));i.preventDefault(),i.stopPropagation(),u?Kt(u,!0):Fy(a)?Kt(a,!0):s.blur()}};return n||document.addEventListener("keydown",o,!0),()=>{n||document.removeEventListener("keydown",o,!0);let i=Ee.getTreeNode(e).nodeToRestore;if(t&&i&&(Ue(document.activeElement,e.current)||document.activeElement===document.body&&oE(e))){let s=Ee.clone();requestAnimationFrame(()=>{if(document.activeElement===document.body){let a=s.getTreeNode(e);for(;a;){if(a.nodeToRestore&&document.body.contains(a.nodeToRestore)){Kt(a.nodeToRestore);return}a=a.parent}for(a=s.getTreeNode(e);a;){if(a.scopeRef&&Ee.getTreeNode(a.scopeRef)){ra(a.scopeRef.current,!0);return}a=a.parent}}})}}},[e,t,n])}function yn(e,t,n){let r=t!=null&&t.tabbable?eE:ZC,o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(i){var s;return!(t==null||(s=t.from)===null||s===void 0)&&s.contains(i)?NodeFilter.FILTER_REJECT:i.matches(r)&&Iy(i)&&(!n||Ue(i,n))&&(!(t!=null&&t.accept)||t.accept(i))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t!=null&&t.from&&(o.currentNode=t.from),o}class Gd{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let o=this.fastMap.get(n??null),i=new fc({scopeRef:t});o.addChild(i),i.parent=o,this.fastMap.set(t,i),r&&(i.nodeToRestore=r)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let n=this.fastMap.get(t),r=n.parent;for(let i of this.traverse())i!==n&&n.nodeToRestore&&i.nodeToRestore&&n.scopeRef.current&&Ue(i.nodeToRestore,n.scopeRef.current)&&(i.nodeToRestore=n.nodeToRestore);let o=n.children;r.removeChild(n),o.size>0&&o.forEach(i=>r.addChild(i)),this.fastMap.delete(n.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let n of t.children)yield*this.traverse(n)}clone(){let t=new Gd;for(let n of this.traverse())t.addTreeNode(n.scopeRef,n.parent.scopeRef,n.nodeToRestore);return t}constructor(){this.fastMap=new Map,this.root=new fc({scopeRef:null}),this.fastMap.set(null,this.root)}}class fc{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}let Ee=new Gd;function rr(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,o=g.useRef({isFocused:!1,isFocusVisible:t||_y()}),[i,s]=g.useState(!1),[a,l]=g.useState(()=>o.current.isFocused&&o.current.isFocusVisible),u=g.useCallback(()=>l(o.current.isFocused&&o.current.isFocusVisible),[]),c=g.useCallback(p=>{o.current.isFocused=p,s(p),u()},[u]);HC(p=>{o.current.isFocusVisible=p,u()},[],{isTextInput:n});let{focusProps:d}=jy({isDisabled:r,onFocusChange:c}),{focusWithinProps:f}=KC({isDisabled:!r,onFocusWithinChange:c});return{isFocused:i,isFocusVisible:a,focusProps:r?f:d}}let sE=oe.createContext(null);function aE(e){let t=g.useContext(sE)||{};ky(t,e);let{ref:n,...r}=t;return r}function Qd(e,t){let{focusProps:n}=jy(e),{keyboardProps:r}=QC(e),o=we(n,r),i=aE(t),s=e.isDisabled?{}:i,a=g.useRef(e.autoFocus);return g.useEffect(()=>{a.current&&t.current&&Dy(t.current),a.current=!1},[t]),{focusableProps:we({...o,tabIndex:e.excludeFromTabOrder&&!e.isDisabled?-1:void 0},s)}}const pc=oe.createContext(null);function lE(e){let{children:t}=e,n=g.useContext(pc),[r,o]=g.useState(0),i=g.useMemo(()=>({parent:n,modalCount:r,addModal(){o(s=>s+1),n&&n.addModal()},removeModal(){o(s=>s-1),n&&n.removeModal()}}),[n,r]);return oe.createElement(pc.Provider,{value:i},t)}function uE(){let e=g.useContext(pc);return{modalProviderProps:{"aria-hidden":e&&e.modalCount>0?!0:null}}}function cE(e){let{modalProviderProps:t}=uE();return oe.createElement("div",{"data-overlay-container":!0,...e,...t})}function dE(e){return oe.createElement(lE,null,oe.createElement(cE,e))}const ch=oe.createContext(null);function fE(e){let t=Vd(),{portalContainer:n=t?null:document.body}=e,[r,o]=g.useState(!1),i=g.useMemo(()=>({contain:r,setContain:o}),[r,o]);if(!n)return null;let s;return e.disableFocusManagement?s=oe.createElement(ch.Provider,{value:i},e.children):s=oe.createElement(ch.Provider,{value:i},oe.createElement(qC,{restoreFocus:!0,contain:r},e.children)),Lw.createPortal(s,n)}var pE=({children:e,locale:t="en"})=>C.jsx($C,{locale:t,children:C.jsx(dE,{children:e})});function Ie(e){return g.forwardRef(e)}var ao=(e,t,n=!0)=>{if(!t)return[e,{}];const r=t.reduce((o,i)=>i in e?{...o,[i]:e[i]}:o,{});return n?[Object.keys(e).filter(i=>!t.includes(i)).reduce((i,s)=>({...i,[s]:e[s]}),{}),r]:[e,r]},dh=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ot=e=>!e||typeof e!="object"||Object.keys(e).length===0,hE=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function Vy(e,t){e.forEach(function(n){Array.isArray(n)?Vy(n,t):t.push(n)})}function By(e){let t=[];return Vy(e,t),t}var mE=(...e)=>By(e).filter(Boolean),zy=(e,t)=>{let n={};for(let r in e)t!=null&&t.hasOwnProperty(r)?n[r]=typeof e[r]=="object"?zy(e[r],t[r]):t[r]+" "+e[r]:n[r]=e[r];for(let r in t)n.hasOwnProperty(r)||(n[r]=t[r]);return n},fh=e=>!e||typeof e!="string"?e:e.replace(/\s+/g," ").trim();function gE(){for(var e=0,t,n,r="";ee&&(t=0,r=n,n=new Map)}return{get:function(s){var a=n.get(s);if(a!==void 0)return a;if((a=r.get(s))!==void 0)return o(s,a),a},set:function(s,a){n.has(s)?n.set(s,a):o(s,a)}}}var Hy="!";function PE(e){var t=e.separator||":",n=t.length===1,r=t[0],o=t.length;return function(s){for(var a=[],l=0,u=0,c,d=0;du?c-u:void 0;return{modifiers:a,hasImportantModifier:m,baseClassName:y,maybePostfixModifierPosition:P}}}function CE(e){if(e.length<=1)return e;var t=[],n=[];return e.forEach(function(r){var o=r[0]==="[";o?(t.push.apply(t,n.sort().concat([r])),n=[]):n.push(r)}),t.push.apply(t,n.sort()),t}function EE(e){return{cache:SE(e.cacheSize),splitModifiers:PE(e),...vE(e)}}var kE=/\s+/;function TE(e,t){var n=t.splitModifiers,r=t.getClassGroupId,o=t.getConflictingClassGroupIds,i=new Set;return e.trim().split(kE).map(function(s){var a=n(s),l=a.modifiers,u=a.hasImportantModifier,c=a.baseClassName,d=a.maybePostfixModifierPosition,f=r(d?c.substring(0,d):c),p=!!d;if(!f){if(!d)return{isTailwindClass:!1,originalClassName:s};if(f=r(c),!f)return{isTailwindClass:!1,originalClassName:s};p=!1}var m=CE(l).join(":"),y=u?m+Hy:m;return{isTailwindClass:!0,modifierId:y,classGroupId:f,originalClassName:s,hasPostfixModifier:p}}).reverse().filter(function(s){if(!s.isTailwindClass)return!0;var a=s.modifierId,l=s.classGroupId,u=s.hasPostfixModifier,c=a+l;return i.has(c)?!1:(i.add(c),o(l,u).forEach(function(d){return i.add(a+d)}),!0)}).reverse().map(function(s){return s.originalClassName}).join(" ")}function mc(){for(var e=arguments.length,t=new Array(e),n=0;n1?t-1:0),r=1;re||void 0,oa=(...e)=>Xy(By(e).filter(Boolean).join(" ")),jl=null,ia={},yc=!1,So=(...e)=>t=>t.twMerge?((!jl||yc)&&(yc=!1,jl=ot(ia)?HE:WE(ia)),Xy(jl(oa(e)))):oa(e),gh=(e,t)=>{for(let n in t)e.hasOwnProperty(n)?e[n]=oa(e[n],t[n]):e[n]=t[n];return e},GE=(e,t)=>{var n,r,o,i,s;let{slots:a={},variants:l={},compoundVariants:u=[],compoundSlots:c=[],defaultVariants:d={}}=e,f={...KE,...t},p=oa((n=e==null?void 0:e.extend)==null?void 0:n.base,e==null?void 0:e.base),m=zy(l,(r=e==null?void 0:e.extend)==null?void 0:r.variants),y={...(o=e==null?void 0:e.extend)==null?void 0:o.defaultVariants,...d};!ot(f.twMergeConfig)&&!hE(f.twMergeConfig,ia)&&(yc=!0,ia=f.twMergeConfig);let P=ot(a)?{}:{base:e==null?void 0:e.base,...a},b=ot((i=e==null?void 0:e.extend)==null?void 0:i.slots)?P:gh((s=e==null?void 0:e.extend)==null?void 0:s.slots,ot(P)?{base:e==null?void 0:e.base}:P),h=S=>{var E,R,T,x;if(ot(m)&&ot(a)&&ot((E=e==null?void 0:e.extend)==null?void 0:E.slots))return So(p,S==null?void 0:S.class,S==null?void 0:S.className)(f);if(u&&!Array.isArray(u))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof u}`);if(c&&!Array.isArray(c))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof c}`);let N=(L,I,w=[],k)=>{let _=w;if(typeof I=="string")_.push(fh(I).split(" ").map(V=>`${L}:${V}`));else if(Array.isArray(I))_.push(I.flatMap(V=>`${L}:${V}`));else if(typeof I=="object"&&typeof k=="string"){let V=I==null?void 0:I[k];if(V&&typeof V=="string"){let W=fh(V);_[k]=_[k]?[..._[k],...W.split(" ").map(H=>`${L}:${H}`)]:W.split(" ").map(H=>`${L}:${H}`)}else Array.isArray(V)&&V.length>0&&(_[k]=V.flatMap(W=>`${L}:${W}`))}return _},F=(L,I=m,w=null)=>{let k=I==null?void 0:I[L];if(!k||ot(k))return null;let _=S==null?void 0:S[L];if(_===null)return null;let V=dh(_),W=Array.isArray(f.responsiveVariants)&&f.responsiveVariants.length>0||f.responsiveVariants===!0,H=y==null?void 0:y[L],Q=[];typeof V=="object"&&W&&(Q=Object.keys(V).reduce((q,ae)=>{let ve=V[ae],Ft=k==null?void 0:k[ve];return ae==="initial"?(H=ve,q):Array.isArray(f.responsiveVariants)&&!f.responsiveVariants.includes(ae)?q:N(ae,Ft,q,w)},[]));let te=k[V]||k[dh(H)];return typeof Q=="object"&&typeof w=="string"&&Q[w]?gh(Q,te):Q.length>0?[te,...Q]:te},M=()=>m?Object.keys(m).map(L=>F(L,m)):null,B=L=>!m||typeof m!="object"?null:Object.keys(m).reduce((I,w)=>{let k=F(w,m,L),_=L==="base"&&typeof k=="string"?k:k&&k[L];return _&&I.push(_),I},[]),A=S&&Object.fromEntries(Object.entries(S).filter(([,L])=>L!==void 0)),j=L=>{var I;let w=typeof(S==null?void 0:S[L])=="object"?{[L]:(I=S[L])==null?void 0:I.initial}:{};return{...y,...A,...w}},U=(L=[])=>L==null?void 0:L.filter(({class:I,className:w,...k})=>Object.entries(k).every(([_,V])=>{let W=j(_);return Array.isArray(V)?V.includes(W[_]):W[_]===V})).flatMap(({class:I,className:w})=>[I,w]),Y=()=>{var L;let I=U(u),w=U((L=e==null?void 0:e.extend)==null?void 0:L.compoundVariants);return mE(w,I)},ie=()=>{let L=Y();return Array.isArray(L)?L.reduce((I,w)=>{if(typeof w=="string"&&(I.base=So(I.base,w)(f)),typeof w=="object"){let k=Object.keys(w);for(let _ of k)I[_]=So(I[_],w[_])(f)}return I},{}):L},O=()=>c.length<1?null:c.reduce((L,I)=>{let{slots:w=[],class:k,className:_,...V}=I;if(!ot(V)){let W=Object.keys(V);for(let H of W){let Q=j(H)[H];if(!Q||Q!==V[H])return L}}for(let W of w)L[W]||(L[W]=[]),L[W].push([k,_]);return L},{});if(!ot(a)||!ot((R=e==null?void 0:e.extend)==null?void 0:R.slots)){let L=(T=ie())!=null?T:[],I=(x=O())!=null?x:[];return{...typeof b=="object"&&!ot(b)?Object.keys(b).reduce((w,k)=>(w[k]=_=>So(b[k],B(k),L==null?void 0:L[k],I==null?void 0:I[k],_==null?void 0:_.class,_==null?void 0:_.className)(f),w),{}):{}}}return So(p,M(),Y(),S==null?void 0:S.class,S==null?void 0:S.className)(f)},v=()=>{if(!(!m||typeof m!="object"))return Object.keys(m)};return h.variantKeys=v(),h.base=p,h.slots=b,h.variants=m,h.defaultVariants=y,h.compoundSlots=c,h.compoundVariants=u,h},QE=["0","xs","sm","md","lg","xl","2xl","3xl","4xl","5xl","6xl","7xl","8xl","9xl","1","2","3","3.5","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","20","24","28","32","36","40","44","48","52","56","60","64","72","80","96"],_l=QE.map(e=>`unit-${e}`),qi=["small","medium","large"],It=(e,t)=>{var n,r,o;return GE(e,{...t,twMerge:(n=t==null?void 0:t.twMerge)!=null?n:!0,twMergeConfig:{...t==null?void 0:t.twMergeConfig,theme:{...(r=t==null?void 0:t.twMergeConfig)==null?void 0:r.theme,opacity:["disabled"],spacing:["divider","unit",..._l],borderWidth:qi,borderRadius:qi},classGroups:{...(o=t==null?void 0:t.twMergeConfig)==null?void 0:o.classGroups,shadow:[{shadow:qi}],"font-size":[{text:["tiny",...qi]}],"bg-image":["bg-stripe-gradient"],"min-w":[{"min-w":["unit",..._l]}],"min-h":[{"min-h":["unit",..._l]}]}}})},lo=["outline-none","data-[focus-visible=true]:z-10","data-[focus-visible=true]:outline-2","data-[focus-visible=true]:outline-focus","data-[focus-visible=true]:outline-offset-2"],XE=["outline-none","group-data-[focus-visible=true]:z-10","group-data-[focus-visible=true]:ring-2","group-data-[focus-visible=true]:ring-focus","group-data-[focus-visible=true]:ring-offset-2","group-data-[focus-visible=true]:ring-offset-background"],Dl=["absolute","top-1/2","left-1/2","-translate-x-1/2","-translate-y-1/2"],vh=It({slots:{base:["group","relative","overflow-hidden","bg-content3 dark:bg-content2","before:opacity-100","before:absolute","before:inset-0","before:-translate-x-full","before:animate-[shimmer_2s_infinite]","before:border-t","before:border-content4/30","before:bg-gradient-to-r","before:from-transparent","before:via-content4","dark:before:via-default-700/10","before:to-transparent","after:opacity-100","after:absolute","after:inset-0","after:-z-10","after:bg-content3","dark:after:bg-content2","data-[loaded=true]:bg-transparent","data-[loaded=true]:before:opacity-0 data-[loaded=true]:before:animate-none","data-[loaded=true]:after:opacity-0"],content:["opacity-0","group-data-[loaded=true]:opacity-100"]},variants:{disableAnimation:{true:{base:"before:transition-none",content:"transition-none"},false:{base:"transition-background !duration-300 before:transition-opacity before:!duration-300",content:"transition-opacity motion-reduce:transition-none !duration-300"}}},defaultVariants:{disableAnimation:!1}}),YE={default:"bg-default text-default-foreground",primary:"bg-primary text-primary-foreground",secondary:"bg-secondary text-secondary-foreground",success:"bg-success text-success-foreground",warning:"bg-warning text-warning-foreground",danger:"bg-danger text-danger-foreground",foreground:"bg-foreground text-background"},qE={default:"shadow-lg shadow-default/50 bg-default text-default-foreground",primary:"shadow-lg shadow-primary/40 bg-primary text-primary-foreground",secondary:"shadow-lg shadow-secondary/40 bg-secondary text-secondary-foreground",success:"shadow-lg shadow-success/40 bg-success text-success-foreground",warning:"shadow-lg shadow-warning/40 bg-warning text-warning-foreground",danger:"shadow-lg shadow-danger/40 bg-danger text-danger-foreground",foreground:"shadow-lg shadow-foreground/40 bg-foreground text-background"},JE={default:"bg-transparent border-default text-foreground",primary:"bg-transparent border-primary text-primary",secondary:"bg-transparent border-secondary text-secondary",success:"bg-transparent border-success text-success",warning:"bg-transparent border-warning text-warning",danger:"bg-transparent border-danger text-danger",foreground:"bg-transparent border-foreground text-foreground"},ZE={default:"bg-default/40 text-default-foreground",primary:"bg-primary/20 text-primary",secondary:"bg-secondary/20 text-secondary",success:"bg-success/20 text-success-600 dark:text-success",warning:"bg-warning/20 text-warning-600 dark:text-warning",danger:"bg-danger/20 text-danger dark:text-danger-500",foreground:"bg-foreground/10 text-foreground"},ek={default:"border-default bg-default-100 text-default-foreground",primary:"border-default bg-default-100 text-primary",secondary:"border-default bg-default-100 text-secondary",success:"border-default bg-default-100 text-success",warning:"border-default bg-default-100 text-warning",danger:"border-default bg-default-100 text-danger",foreground:"border-default bg-default-100 text-foreground"},tk={default:"bg-transparent text-default-foreground",primary:"bg-transparent text-primary",secondary:"bg-transparent text-secondary",success:"bg-transparent text-success",warning:"bg-transparent text-warning",danger:"bg-transparent text-danger",foreground:"bg-transparent text-foreground"},nk={default:"border-default text-default-foreground hover:!bg-default",primary:"border-primary text-primary hover:!text-primary-foreground hover:!bg-primary",secondary:"border-secondary text-secondary hover:text-secondary-foreground hover:!bg-secondary",success:"border-success text-success hover:!text-success-foreground hover:!bg-success",warning:"border-warning text-warning hover:!text-warning-foreground hover:!bg-warning",danger:"border-danger text-danger hover:!text-danger-foreground hover:!bg-danger",foreground:"border-foreground text-foreground hover:!bg-foreground"},G={solid:YE,shadow:qE,bordered:JE,flat:ZE,faded:ek,light:tk,ghost:nk},yh=It({slots:{base:"relative inline-flex flex-col gap-2 items-center justify-center",wrapper:"relative flex",circle1:["absolute","w-full","h-full","rounded-full","animate-spinner-ease-spin","border-2","border-solid","border-t-transparent","border-l-transparent","border-r-transparent"],circle2:["absolute","w-full","h-full","rounded-full","opacity-75","animate-spinner-linear-spin","border-2","border-dotted","border-t-transparent","border-l-transparent","border-r-transparent"],label:"text-foreground dark:text-foreground-dark font-regular"},variants:{size:{sm:{wrapper:"w-5 h-5",circle1:"border-2",circle2:"border-2",label:"text-small"},md:{wrapper:"w-8 h-8",circle1:"border-3",circle2:"border-3",label:"text-medium"},lg:{wrapper:"w-10 h-10",circle1:"border-3",circle2:"border-3",label:"text-large"}},color:{current:{circle1:"border-b-current",circle2:"border-b-current"},white:{circle1:"border-b-white",circle2:"border-b-white"},default:{circle1:"border-b-default",circle2:"border-b-default"},primary:{circle1:"border-b-primary",circle2:"border-b-primary"},secondary:{circle1:"border-b-secondary",circle2:"border-b-secondary"},success:{circle1:"border-b-success",circle2:"border-b-success"},warning:{circle1:"border-b-warning",circle2:"border-b-warning"},danger:{circle1:"border-b-danger",circle2:"border-b-danger"}},labelColor:{foreground:{label:"text-foreground"},primary:{label:"text-primary"},secondary:{label:"text-secondary"},success:{label:"text-success"},warning:{label:"text-warning"},danger:{label:"text-danger"}}},defaultVariants:{size:"md",color:"primary",labelColor:"foreground"}}),bh=It({slots:{base:"group flex flex-col",label:"block text-small font-medium text-foreground-600",mainWrapper:"",inputWrapper:"relative w-full inline-flex flex-row items-center shadow-sm px-3 gap-3",innerWrapper:"inline-flex h-full items-center w-full gap-1.5 box-border",input:"w-full h-full font-normal !bg-transparent outline-none placeholder:text-foreground-500",clearButton:["p-2","-m-2","z-10","hidden","absolute","right-3","appearance-none","outline-none","select-none","opacity-0","hover:!opacity-100","cursor-pointer","active:!opacity-70","rounded-full",...lo],helperWrapper:"flex relative flex-col gap-1.5 pt-1 px-1",description:"text-tiny text-foreground-400",errorMessage:"text-tiny text-danger"},variants:{variant:{flat:{inputWrapper:["bg-default-100","data-[hover=true]:bg-default-200","group-data-[focus=true]:bg-default-100"]},faded:{inputWrapper:["bg-default-100","border-medium","border-default-200","data-[hover=true]:border-default-400"]},bordered:{inputWrapper:["border-medium","border-default-200","data-[hover=true]:border-default-400","group-data-[focus=true]:border-foreground"]},underlined:{inputWrapper:["!px-1","!pb-0","!gap-0","relative","box-border","border-b-medium","shadow-[0_1px_0px_0_rgba(0,0,0,0.05)]","border-default-200","!rounded-none","hover:border-default-300","after:content-['']","after:w-0","after:origin-center","after:bg-foreground","after:absolute","after:left-1/2","after:-translate-x-1/2","after:-bottom-[2px]","after:h-[2px]","group-data-[focus=true]:after:w-full"]}},color:{default:{},primary:{label:"text-primary"},secondary:{label:"text-secondary"},success:{label:"text-success-600 dark:text-success"},warning:{label:"text-warning-600 dark:text-warning"},danger:{label:"text-danger dark:text-danger-500"}},size:{sm:{label:"text-tiny",inputWrapper:"h-unit-8 min-h-unit-8 px-2 rounded-small",input:"text-small",clearButton:"text-medium"},md:{inputWrapper:"h-unit-10 min-h-unit-10 rounded-medium",input:"text-small",clearButton:"text-large"},lg:{inputWrapper:"h-unit-12 min-h-unit-12 rounded-large",input:"text-medium",clearButton:"text-large"}},radius:{none:{inputWrapper:"rounded-none"},sm:{inputWrapper:"rounded-small"},md:{inputWrapper:"rounded-medium"},lg:{inputWrapper:"rounded-large"},full:{inputWrapper:"rounded-full"}},labelPlacement:{outside:{base:"data-[has-helper=true]:pb-4",label:"text-foreground pb-1.5",mainWrapper:"flex flex-col",description:"absolute left-1",errorMessage:"absolute left-1"},"outside-left":{base:"flex-row items-center flex-nowrap data-[has-helper=true]:pb-4",inputWrapper:"flex-1",mainWrapper:"flex flex-col",label:"text-foreground pr-2",description:"absolute left-1",errorMessage:"absolute left-1"},inside:{label:"text-tiny",inputWrapper:"flex-col items-start justify-center gap-0"}},fullWidth:{true:{base:"w-full"}},isLabelPlaceholder:{true:{label:"absolute z-10 pointer-events-none"}},isClearable:{true:{input:"peer pr-6",clearButton:"peer-[.is-filled]:opacity-70 peer-[.is-filled]:block"}},isDisabled:{true:{base:"opacity-disabled pointer-events-none"}},isInvalid:{true:{label:"!text-danger",input:"placeholder:text-danger text-danger"}},isRequired:{true:{label:"after:content-['*'] after:text-danger after:ml-0.5"}},isMultiline:{true:{inputWrapper:"!h-auto",input:"resize-none py-2"}},disableAnimation:{true:{inputWrapper:"transition-none",label:"transition-none"},false:{inputWrapper:"transition-background motion-reduce:transition-none !duration-150",label:["will-change-auto","origin-top-left","transition-all","!duration-200","!ease-[cubic-bezier(0,0,0.2,1)]","motion-reduce:transition-none"],clearButton:["transition-opacity","motion-reduce:transition-none"]}}},defaultVariants:{variant:"flat",color:"default",size:"md",fullWidth:!0,labelPlacement:"inside",isDisabled:!1,disableAnimation:!1},compoundVariants:[{variant:"flat",color:"primary",class:{inputWrapper:["bg-primary-50","data-[hover=true]:bg-primary-100","text-primary","group-data-[focus=true]:bg-primary-50","placeholder:text-primary"],input:"placeholder:text-primary"}},{variant:"flat",color:"secondary",class:{inputWrapper:["bg-secondary-50","text-secondary","data-[hover=true]:bg-secondary-100","group-data-[focus=true]:bg-secondary-50","placeholder:text-secondary"],input:"placeholder:text-secondary"}},{variant:"flat",color:"success",class:{inputWrapper:["bg-success-50","text-success-600","dark:text-success","placeholder:text-success-600","dark:placeholder:text-success","data-[hover=true]:bg-success-100","group-data-[focus=true]:bg-success-50"],input:"placeholder:text-success-600 dark:placeholder:text-success"}},{variant:"flat",color:"warning",class:{inputWrapper:["bg-warning-50","text-warning-600","dark:text-warning","placeholder:text-warning-600","dark:placeholder:text-warning","data-[hover=true]:bg-warning-100","group-data-[focus=true]:bg-warning-50"],input:"placeholder:text-warning-600 dark:placeholder:text-warning"}},{variant:"flat",color:"danger",class:{inputWrapper:["bg-danger-50","text-danger","dark:text-danger-500","placeholder:text-danger","dark:placeholder:text-danger-500","data-[hover=true]:bg-danger-100","group-data-[focus=true]:bg-danger-50"],input:"placeholder:text-danger dark:placeholder:text-danger-500"}},{variant:"faded",color:"primary",class:{label:"text-primary",inputWrapper:"data-[hover=true]:border-primary focus-within:border-primary"}},{variant:"faded",color:"secondary",class:{label:"text-secondary",inputWrapper:"data-[hover=true]:border-secondary focus-within:border-secondary"}},{variant:"faded",color:"success",class:{label:"text-success",inputWrapper:"data-[hover=true]:border-success focus-within:border-success"}},{variant:"faded",color:"warning",class:{label:"text-warning",inputWrapper:"data-[hover=true]:border-warning focus-within:border-warning"}},{variant:"faded",color:"danger",class:{label:"text-danger",inputWrapper:"data-[hover=true]:border-danger focus-within:border-danger"}},{variant:"underlined",color:"primary",class:{inputWrapper:"after:bg-primary"}},{variant:"underlined",color:"secondary",class:{inputWrapper:"after:bg-secondary"}},{variant:"underlined",color:"success",class:{inputWrapper:"after:bg-success"}},{variant:"underlined",color:"warning",class:{inputWrapper:"after:bg-warning"}},{variant:"underlined",color:"danger",class:{inputWrapper:"after:bg-danger"}},{variant:"bordered",color:"primary",class:{inputWrapper:"group-data-[focus=true]:border-primary"}},{variant:"bordered",color:"secondary",class:{inputWrapper:"group-data-[focus=true]:border-secondary"}},{variant:"bordered",color:"success",class:{inputWrapper:"group-data-[focus=true]:border-success"}},{variant:"bordered",color:"warning",class:{inputWrapper:"group-data-[focus=true]:border-warning"}},{variant:"bordered",color:"danger",class:{inputWrapper:"group-data-[focus=true]:border-danger"}},{radius:"full",size:["sm"],class:{inputWrapper:"px-3"}},{radius:"full",size:"md",class:{inputWrapper:"px-4"}},{radius:"full",size:"lg",class:{inputWrapper:"px-5"}},{disableAnimation:!1,variant:["faded","bordered"],class:{inputWrapper:"transition-colors motion-reduce:transition-none"}},{disableAnimation:!1,variant:"underlined",class:{inputWrapper:"after:transition-width motion-reduce:after:transition-none"}},{variant:["flat","faded"],class:{inputWrapper:[...XE]}},{isInvalid:!0,variant:"flat",class:{inputWrapper:["bg-danger-50","data-[hover=true]:bg-danger-100","group-data-[focus=true]:bg-danger-50"]}},{isInvalid:!0,variant:"bordered",class:{inputWrapper:"!border-danger group-data-[focus=true]:border-danger"}},{isInvalid:!0,variant:"underlined",class:{inputWrapper:"after:bg-danger"}},{labelPlacement:"inside",size:"sm",class:{inputWrapper:"h-12 py-1.5 px-3"}},{labelPlacement:"inside",size:"md",class:{inputWrapper:"h-14 py-2"}},{labelPlacement:"inside",size:"lg",class:{label:"text-small",inputWrapper:"h-16 py-2.5 gap-1"}},{isLabelPlaceholder:!0,labelPlacement:["inside","outside"],class:{label:["font-normal","text-foreground-500","group-focus-within:font-medium","group-[.is-filled]:font-medium","group-focus-within:pointer-events-auto","group-[.is-filled]:pointer-events-auto"]}},{isLabelPlaceholder:!0,labelPlacement:"inside",class:{inputWrapper:"group",label:["group-focus-within:text-foreground-600","group-[.is-filled]:text-foreground-600"]}},{isLabelPlaceholder:!0,labelPlacement:"outside",class:{base:"group relative justify-end",label:["pb-0","group-focus-within:left-0","group-[.is-filled]:left-0","group-focus-within:text-foreground","group-[.is-filled]:text-foreground"]}},{isLabelPlaceholder:!0,color:"primary",class:{label:["group-focus-within:text-primary","group-[.is-filled]:text-primary"]}},{isLabelPlaceholder:!0,color:"secondary",class:{label:["group-focus-within:text-secondary","group-[.is-filled]:text-secondary"]}},{isLabelPlaceholder:!0,color:"success",class:{label:["group-focus-within:text-success","group-[.is-filled]:text-success"]}},{isLabelPlaceholder:!0,color:"warning",class:{label:["group-focus-within:text-warning","group-[.is-filled]:text-warning"]}},{isLabelPlaceholder:!0,color:"danger",class:{label:["group-focus-within:text-danger","group-[.is-filled]:text-danger"]}},{isLabelPlaceholder:!0,variant:"underlined",class:{label:["group-focus-within:pt-0","group-[.is-filled]:pt-0"]}},{isLabelPlaceholder:!0,variant:"underlined",size:"sm",class:{label:["pt-3"]}},{isLabelPlaceholder:!0,variant:"underlined",size:"md",class:{label:["pt-4"]}},{isLabelPlaceholder:!0,variant:"underlined",size:"lg",class:{label:["pt-5"]}},{isLabelPlaceholder:!0,labelPlacement:"inside",size:["sm","md"],class:{label:["text-small","group-focus-within:text-tiny","group-[.is-filled]:text-tiny"],input:"pt-4"}},{isLabelPlaceholder:!0,labelPlacement:"inside",size:"sm",class:{label:["group-focus-within:-translate-y-2.5","group-[.is-filled]:-translate-y-2.5"],input:"pt-4"}},{isLabelPlaceholder:!0,labelPlacement:"inside",size:"md",class:{label:["group-focus-within:-translate-y-3","group-[.is-filled]:-translate-y-3"],input:"pt-4"}},{isLabelPlaceholder:!0,labelPlacement:"inside",size:"lg",class:{label:["text-medium","group-focus-within:text-small","group-focus-within:-translate-y-3","group-[.is-filled]:text-small","group-[.is-filled]:-translate-y-3"],input:"pt-6"}},{isLabelPlaceholder:!0,labelPlacement:"outside",size:"sm",class:{label:["text-tiny","bottom-2","left-2","group-focus-within:bottom-10","group-[.is-filled]:bottom-10"]}},{isLabelPlaceholder:!0,labelPlacement:"outside",size:"md",class:{label:["text-small","bottom-2.5","left-3","group-focus-within:bottom-12","group-[.is-filled]:bottom-12"]}},{isLabelPlaceholder:!0,labelPlacement:"outside",size:"lg",class:{label:["text-medium","bottom-3","left-3","group-focus-within:text-small","group-[.is-filled]:bottom-sm","group-focus-within:bottom-14","group-[.is-filled]:bottom-14"]}}]}),xh=It({base:["relative inline-flex items-center outline-none tap-highlight-transparent",...lo],variants:{size:{sm:"text-small",md:"text-medium",lg:"text-large"},color:{foreground:"text-foreground",primary:"text-primary",secondary:"text-secondary",success:"text-success",warning:"text-warning",danger:"text-danger"},underline:{none:"no-underline",hover:"hover:underline",always:"underline",active:"active:underline",focus:"focus:underline"},isBlock:{true:["px-2","py-1","hover:after:opacity-100","after:content-['']","after:inset-0","after:opacity-0","after:w-full","after:h-full","after:rounded-xl","after:transition-background","after:absolute"],false:"hover:opacity-80 active:opacity-disabled transition-opacity"},isDisabled:{true:"opacity-disabled cursor-default pointer-events-none"},disableAnimation:{true:"after:transition-none transition-none"}},compoundVariants:[{isBlock:!0,color:"foreground",class:"hover:after:bg-foreground/10"},{isBlock:!0,color:"primary",class:"hover:after:bg-primary/20"},{isBlock:!0,color:"secondary",class:"hover:after:bg-secondary/20"},{isBlock:!0,color:"success",class:"hover:after:bg-success/20"},{isBlock:!0,color:"warning",class:"hover:after:bg-warning/20"},{isBlock:!0,color:"danger",class:"hover:after:bg-danger/20"},{underline:["hover","always","active","focus"],class:"underline-offset-4"}],defaultVariants:{color:"primary",size:"md",isBlock:!1,underline:"none",isDisabled:!1,disableAnimation:!1}}),rk="flex mx-1 text-current self-center",wh=It({slots:{base:["flex","z-40","w-full","h-auto","items-center","justify-center","data-[menu-open=true]:border-none"],wrapper:["z-40","flex","px-6","gap-4","w-full","flex-row","relative","flex-nowrap","items-center","justify-between","h-[var(--navbar-height)]"],toggle:["group","flex","items-center","justify-center","w-6","h-full","outline-none","rounded-small","tap-highlight-transparent",...lo],srOnly:["sr-only"],toggleIcon:["w-full","h-full","pointer-events-none","flex","flex-col","items-center","justify-center","text-inherit","group-data-[pressed=true]:opacity-70","transition-opacity","before:content-['']","before:block","before:h-px","before:w-6","before:bg-current","before:transition-transform","before:duration-150","before:-translate-y-1","before:rotate-0","group-data-[open=true]:before:translate-y-px","group-data-[open=true]:before:rotate-45","after:content-['']","after:block","after:h-px","after:w-6","after:bg-current","after:transition-transform","after:duration-150","after:translate-y-1","after:rotate-0","group-data-[open=true]:after:translate-y-0","group-data-[open=true]:after:-rotate-45"],brand:["flex","basis-0","flex-row","flex-grow","flex-nowrap","justify-start","bg-transparent","items-center","no-underline","text-medium","whitespace-nowrap","box-border"],content:["flex","gap-4","h-full","flex-row","flex-nowrap","items-center","data-[justify=start]:justify-start","data-[justify=start]:flex-grow","data-[justify=start]:basis-0","data-[justify=center]:justify-center","data-[justify=end]:justify-end","data-[justify=end]:flex-grow","data-[justify=end]:basis-0"],item:["text-medium","whitespace-nowrap","box-border","list-none","data-[active=true]:font-semibold"],menu:["z-30","px-6","pt-2","fixed","flex","max-w-full","top-[var(--navbar-height)]","inset-x-0","bottom-0","w-screen","flex-col","gap-2","overflow-y-auto"],menuItem:["text-large"]},variants:{position:{static:{base:"static"},sticky:{base:"sticky top-0 inset-x-0"}},maxWidth:{sm:{wrapper:"max-w-[640px]"},md:{wrapper:"max-w-[768px]"},lg:{wrapper:"max-w-[1024px]"},xl:{wrapper:"max-w-[1280px]"},"2xl":{wrapper:"max-w-[1536px]"},full:{wrapper:"max-w-full"}},hideOnScroll:{true:{base:["sticky","top-0","inset-x-0"]}},isBordered:{true:{base:["border-b","border-divider"]}},isBlurred:{false:{base:"bg-background",menu:"bg-background"},true:{base:["backdrop-blur-lg","data-[menu-open=true]:backdrop-blur-xl","backdrop-saturate-150","bg-background/70"],menu:["backdrop-blur-xl","backdrop-saturate-150","bg-background/70"]}},disableAnimation:{true:{menu:["hidden","h-[calc(100dvh_-_var(--navbar-height)_-_1px)]","data-[open=true]:flex"]}}},defaultVariants:{maxWidth:"lg",position:"sticky",isBlurred:!0}}),ok=It({slots:{base:["flex","relative","justify-center","items-center","box-border","overflow-hidden","align-middle","text-white","z-10",...lo],img:["flex","object-cover","w-full","h-full","transition-opacity","!duration-500","opacity-0","data-[loaded=true]:opacity-100"],fallback:[...Dl,"flex","items-center","justify-center"],name:[...Dl,"font-normal","text-center","text-inherit"],icon:[...Dl,"flex","items-center","justify-center","text-inherit","w-full","h-full"]},variants:{size:{sm:{base:"w-8 h-8 text-tiny"},md:{base:"w-10 h-10 text-tiny"},lg:{base:"w-14 h-14 text-small"}},color:{default:{base:G.solid.default},primary:{base:G.solid.primary},secondary:{base:G.solid.secondary},success:{base:G.solid.success},warning:{base:G.solid.warning},danger:{base:G.solid.danger}},radius:{none:{base:"rounded-none"},sm:{base:"rounded-small"},md:{base:"rounded-medium"},lg:{base:"rounded-large"},full:{base:"rounded-full"}},isBordered:{true:{base:"ring-2 ring-offset-2 ring-offset-background dark:ring-offset-background-dark"}},isDisabled:{true:{base:"opacity-disabled"}},isInGroup:{true:{base:["-ml-2 data-[hover=true]:-translate-x-3 transition-transform","data-[focus-visible=true]:-translate-x-3"]}},isInGridGroup:{true:{base:"m-0 data-[hover=true]:translate-x-0"}}},defaultVariants:{size:"md",color:"default",radius:"full"},compoundVariants:[{color:"default",isBordered:!0,class:{base:"ring-default"}},{color:"primary",isBordered:!0,class:{base:"ring-focus"}},{color:"secondary",isBordered:!0,class:{base:"ring-secondary"}},{color:"success",isBordered:!0,class:{base:"ring-success"}},{color:"warning",isBordered:!0,class:{base:"ring-warning"}},{color:"danger",isBordered:!0,class:{base:"ring-danger"}}]});It({base:"flex items-center justify-center h-auto w-max-content",variants:{isGrid:{true:"inline-grid grid-cols-4 gap-3"}}});var ik=It({base:["z-0","group","relative","inline-flex","items-center","justify-center","box-border","appearance-none","outline-none","select-none","whitespace-nowrap","min-w-max","font-normal","subpixel-antialiased","overflow-hidden","tap-highlight-transparent",...lo],variants:{variant:{solid:"",bordered:"border-medium bg-transparent",light:"bg-transparent",flat:"",faded:"border-medium",shadow:"",ghost:"border-medium bg-transparent"},size:{sm:"px-unit-3 min-w-unit-16 h-unit-8 text-tiny gap-unit-2 rounded-small",md:"px-unit-4 min-w-unit-20 h-unit-10 text-small gap-unit-2 rounded-medium",lg:"px-unit-6 min-w-unit-24 h-unit-12 text-medium gap-unit-3 rounded-large"},color:{default:"",primary:"",secondary:"",success:"",warning:"",danger:""},radius:{none:"rounded-none",sm:"rounded-small",md:"rounded-medium",lg:"rounded-large",full:"rounded-full"},fullWidth:{true:"w-full"},isDisabled:{true:"opacity-disabled pointer-events-none"},isInGroup:{true:"[&:not(:first-child):not(:last-child)]:rounded-none"},isIconOnly:{true:"px-unit-0 !gap-unit-0",false:"[&>svg]:max-w-[theme(spacing.unit-8)]"},disableAnimation:{true:"!transition-none",false:"data-[pressed=true]:scale-[0.97] transition-transform-colors motion-reduce:transition-none"}},defaultVariants:{size:"md",variant:"solid",color:"default",fullWidth:!1,isDisabled:!1,isInGroup:!1,disableAnimation:!1},compoundVariants:[{variant:"solid",color:"default",class:G.solid.default},{variant:"solid",color:"primary",class:G.solid.primary},{variant:"solid",color:"secondary",class:G.solid.secondary},{variant:"solid",color:"success",class:G.solid.success},{variant:"solid",color:"warning",class:G.solid.warning},{variant:"solid",color:"danger",class:G.solid.danger},{variant:"shadow",color:"default",class:G.shadow.default},{variant:"shadow",color:"primary",class:G.shadow.primary},{variant:"shadow",color:"secondary",class:G.shadow.secondary},{variant:"shadow",color:"success",class:G.shadow.success},{variant:"shadow",color:"warning",class:G.shadow.warning},{variant:"shadow",color:"danger",class:G.shadow.danger},{variant:"bordered",color:"default",class:G.bordered.default},{variant:"bordered",color:"primary",class:G.bordered.primary},{variant:"bordered",color:"secondary",class:G.bordered.secondary},{variant:"bordered",color:"success",class:G.bordered.success},{variant:"bordered",color:"warning",class:G.bordered.warning},{variant:"bordered",color:"danger",class:G.bordered.danger},{variant:"flat",color:"default",class:G.flat.default},{variant:"flat",color:"primary",class:G.flat.primary},{variant:"flat",color:"secondary",class:G.flat.secondary},{variant:"flat",color:"success",class:G.flat.success},{variant:"flat",color:"warning",class:G.flat.warning},{variant:"flat",color:"danger",class:G.flat.danger},{variant:"faded",color:"default",class:G.faded.default},{variant:"faded",color:"primary",class:G.faded.primary},{variant:"faded",color:"secondary",class:G.faded.secondary},{variant:"faded",color:"success",class:G.faded.success},{variant:"faded",color:"warning",class:G.faded.warning},{variant:"faded",color:"danger",class:G.faded.danger},{variant:"light",color:"default",class:[G.light.default,"data-[hover=true]:bg-default/40"]},{variant:"light",color:"primary",class:[G.light.primary,"data-[hover=true]:bg-primary/20"]},{variant:"light",color:"secondary",class:[G.light.secondary,"data-[hover=true]:bg-secondary/20"]},{variant:"light",color:"success",class:[G.light.success,"data-[hover=true]:bg-success/20"]},{variant:"light",color:"warning",class:[G.light.warning,"data-[hover=true]:bg-warning/20"]},{variant:"light",color:"danger",class:[G.light.danger,"data-[hover=true]:bg-danger/20"]},{variant:"ghost",color:"default",class:G.ghost.default},{variant:"ghost",color:"primary",class:G.ghost.primary},{variant:"ghost",color:"secondary",class:G.ghost.secondary},{variant:"ghost",color:"success",class:G.ghost.success},{variant:"ghost",color:"warning",class:G.ghost.warning},{variant:"ghost",color:"danger",class:G.ghost.danger},{isInGroup:!0,size:"sm",class:"rounded-none first:rounded-l-small last:rounded-r-small"},{isInGroup:!0,size:"md",class:"rounded-none first:rounded-l-medium last:rounded-r-medium"},{isInGroup:!0,size:"lg",class:"rounded-none first:rounded-l-large last:rounded-r-large"},{isInGroup:!0,isRounded:!0,class:"rounded-none first:rounded-l-full last:rounded-r-full"},{isInGroup:!0,variant:["bordered","ghost"],class:"[&:not(:first-child)]:ml-[calc(theme(borderWidth.medium)*-1)]"},{isIconOnly:!0,size:"sm",class:"min-w-unit-8 w-unit-8 h-unit-8"},{isIconOnly:!0,size:"md",class:"min-w-unit-10 w-unit-10 h-unit-10"},{isIconOnly:!0,size:"lg",class:"min-w-unit-12 w-unit-12 h-unit-12"}]});It({base:"inline-flex items-center justify-center h-auto",variants:{fullWidth:{true:"w-full"}},defaultVariants:{fullWidth:!1}});var Sh=It({slots:{base:["flex","flex-col","relative","overflow-hidden","height-auto","outline-none","text-foreground","box-border","bg-content1",...lo],header:["flex","p-3","z-10","w-full","justify-start","items-center","shrink-0","overflow-inherit","color-inherit","subpixel-antialiased"],body:["relative","flex","flex-1","w-full","p-5","flex-auto","flex-col","place-content-inherit","align-items-inherit","h-auto","break-words","text-left","overflow-y-auto","subpixel-antialiased"],footer:["p-3","h-auto","flex","w-full","items-center","overflow-hidden","color-inherit","subpixel-antialiased"]},variants:{shadow:{none:{base:"shadow-none"},sm:{base:"shadow-small"},md:{base:"shadow-medium"},lg:{base:"shadow-large"}},radius:{none:{base:"rounded-none",header:"rounded-none",footer:"rounded-none"},sm:{base:"rounded-small",header:"rounded-t-small",footer:"rounded-b-small"},md:{base:"rounded-medium",header:"rounded-t-medium",footer:"rounded-b-medium"},lg:{base:"rounded-large",header:"rounded-t-large",footer:"rounded-b-large"}},fullWidth:{true:{base:"w-full"}},isHoverable:{true:{base:"data-[hover=true]:bg-content2 dark:data-[hover=true]:bg-content2"}},isPressable:{true:{base:"cursor-pointer"}},isBlurred:{true:{base:["bg-background/80","dark:bg-background/20","backdrop-blur-md","backdrop-saturate-150"]}},isFooterBlurred:{true:{footer:["bg-background/10","backdrop-blur","backdrop-saturate-150"]}},isDisabled:{true:{base:"opacity-disabled cursor-not-allowed"}},disableAnimation:{true:"",false:{base:"transition-transform-background motion-reduce:transition-none"}}},compoundVariants:[{isPressable:!0,disableAnimation:!1,class:"data-[pressed=true]:scale-[0.97] tap-highlight-transparent"}],defaultVariants:{radius:"lg",shadow:"md",fullWidth:!1,isHoverable:!1,isPressable:!1,isDisabled:!1,disableAnimation:!1,isFooterBlurred:!1}}),sk=e=>(e==null?void 0:e.length)<=4?e:e==null?void 0:e.slice(0,3),ak=(...e)=>{let t=" ";for(const n of e)if(typeof n=="string"&&n.length>0){t=n;break}return t};function Yy(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;te?"true":void 0;function Fa(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,o=g.createContext(void 0);o.displayName=r;function i(){var s;const a=g.useContext(o);if(!a&&t){const l=new Error(n);throw l.name="ContextError",(s=Error.captureStackTrace)==null||s.call(Error,l,i),l}return a}return[o.Provider,i,o]}function He(e){const t=g.useRef(null);return g.useImperativeHandle(e,()=>t.current),t}var lk=Object.create,qy=Object.defineProperty,uk=Object.getOwnPropertyDescriptor,Jy=Object.getOwnPropertyNames,ck=Object.getPrototypeOf,dk=Object.prototype.hasOwnProperty,Zy=(e,t)=>function(){return t||(0,e[Jy(e)[0]])((t={exports:{}}).exports,t),t.exports},fk=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Jy(t))!dk.call(e,o)&&o!==n&&qy(e,o,{get:()=>t[o],enumerable:!(r=uk(t,o))||r.enumerable});return e},pk=(e,t,n)=>(n=e!=null?lk(ck(e)):{},fk(t||!e||!e.__esModule?qy(n,"default",{value:e,enumerable:!0}):n,e)),hk=Zy({"../../../node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react.production.min.js"(e){var t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.iterator;function p(w){return w===null||typeof w!="object"?null:(w=f&&w[f]||w["@@iterator"],typeof w=="function"?w:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,P={};function b(w,k,_){this.props=w,this.context=k,this.refs=P,this.updater=_||m}b.prototype.isReactComponent={},b.prototype.setState=function(w,k){if(typeof w!="object"&&typeof w!="function"&&w!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,w,k,"setState")},b.prototype.forceUpdate=function(w){this.updater.enqueueForceUpdate(this,w,"forceUpdate")};function h(){}h.prototype=b.prototype;function v(w,k,_){this.props=w,this.context=k,this.refs=P,this.updater=_||m}var S=v.prototype=new h;S.constructor=v,y(S,b.prototype),S.isPureReactComponent=!0;var E=Array.isArray,R=Object.prototype.hasOwnProperty,T={current:null},x={key:!0,ref:!0,__self:!0,__source:!0};function N(w,k,_){var V,W={},H=null,Q=null;if(k!=null)for(V in k.ref!==void 0&&(Q=k.ref),k.key!==void 0&&(H=""+k.key),k)R.call(k,V)&&!x.hasOwnProperty(V)&&(W[V]=k[V]);var te=arguments.length-2;if(te===1)W.children=_;else if(1{let n=[];const r=Ph.Children.map(e,i=>(0,Ph.isValidElement)(i)&&i.type===t?(n.push(i),null):i),o=n.length>=0?n:void 0;return[r,o]};/** * @license React * react.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. *//** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var vk=new Set(["id","type","className","style","title","role","tabIndex","htmlFor","width","height"]),yk=/^(data-.*)$/,bk=/^(aria-.*)$/,xk=/^(on[A-Z].*)$/;function fi(e,t={labelable:!0,enabled:!0}){let{labelable:n,propNames:r}=t,o={};if(!t.enabled)return e;for(const i in e)(Object.prototype.hasOwnProperty.call(e,i)&&(vk.has(i)||n&&bk.test(i)||r!=null&&r.has(i)||yk.test(i))||xk.test(i))&&(o[i]=e[i]);return o}var wk=e=>C.jsxs("svg",{"aria-hidden":"true",fill:"none",focusable:"false",height:"1em",shapeRendering:"geometricPrecision",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",viewBox:"0 0 24 24",width:"1em",...e,children:[C.jsx("path",{d:"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"}),C.jsx("path",{d:"M15 3h6v6"}),C.jsx("path",{d:"M10 14L21 3"})]}),Sk=e=>C.jsx("svg",{"aria-hidden":"true",focusable:"false",height:"1em",role:"presentation",viewBox:"0 0 24 24",width:"1em",...e,children:C.jsx("path",{d:"M12 2a10 10 0 1010 10A10.016 10.016 0 0012 2zm3.36 12.3a.754.754 0 010 1.06.748.748 0 01-1.06 0l-2.3-2.3-2.3 2.3a.748.748 0 01-1.06 0 .754.754 0 010-1.06l2.3-2.3-2.3-2.3A.75.75 0 019.7 8.64l2.3 2.3 2.3-2.3a.75.75 0 011.06 1.06l-2.3 2.3z",fill:"currentColor"})});const e0=g.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Va=g.createContext({}),Ba=g.createContext(null),za=typeof document<"u",sa=za?g.useLayoutEffect:g.useEffect,t0=g.createContext({strict:!1});function Pk(e,t,n,r){const{visualElement:o}=g.useContext(Va),i=g.useContext(t0),s=g.useContext(Ba),a=g.useContext(e0).reducedMotion,l=g.useRef();r=r||i.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:o,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:a}));const u=l.current;return g.useInsertionEffect(()=>{u&&u.update(n,s)}),sa(()=>{u&&u.render()}),g.useEffect(()=>{u&&u.updateFeatures()}),(window.HandoffAppearAnimations?sa:g.useEffect)(()=>{u&&u.animationState&&u.animationState.animateChanges()}),u}function Lr(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Ck(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):Lr(n)&&(n.current=r))},[t])}function pi(e){return typeof e=="string"||Array.isArray(e)}function Ua(e){return typeof e=="object"&&typeof e.start=="function"}const Yd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],qd=["initial",...Yd];function Wa(e){return Ua(e.animate)||qd.some(t=>pi(e[t]))}function n0(e){return!!(Wa(e)||e.variants)}function Ek(e,t){if(Wa(e)){const{initial:n,animate:r}=e;return{initial:n===!1||pi(n)?n:void 0,animate:pi(r)?r:void 0}}return e.inherit!==!1?t:{}}function kk(e){const{initial:t,animate:n}=Ek(e,g.useContext(Va));return g.useMemo(()=>({initial:t,animate:n}),[Ch(t),Ch(n)])}function Ch(e){return Array.isArray(e)?e.join(" "):e}const Eh={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"]},hi={};for(const e in Eh)hi[e]={isEnabled:t=>Eh[e].some(n=>!!t[n])};function Tk(e){for(const t in e)hi[t]={...hi[t],...e[t]}}const Jd=g.createContext({}),r0=g.createContext({}),Rk=Symbol.for("motionComponentSymbol");function Nk({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&Tk(e);function i(a,l){let u;const c={...g.useContext(e0),...a,layoutId:$k(a)},{isStatic:d}=c,f=kk(a),p=r(a,d);if(!d&&za){f.visualElement=Pk(o,p,c,t);const m=g.useContext(r0),y=g.useContext(t0).strict;f.visualElement&&(u=f.visualElement.loadFeatures(c,y,e,m))}return g.createElement(Va.Provider,{value:f},u&&f.visualElement?g.createElement(u,{visualElement:f.visualElement,...c}):null,n(o,a,Ck(p,f.visualElement,l),p,d,f.visualElement))}const s=g.forwardRef(i);return s[Rk]=o,s}function $k({layoutId:e}){const t=g.useContext(Jd).id;return t&&e!==void 0?t+"-"+e:e}function Mk(e){function t(r,o={}){return Nk(e(r,o))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,o)=>(n.has(o)||n.set(o,t(o)),n.get(o))})}const Lk=["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 Zd(e){return typeof e!="string"||e.includes("-")?!1:!!(Lk.indexOf(e)>-1||/[A-Z]/.test(e))}const aa={};function Ak(e){Object.assign(aa,e)}const ki=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],lr=new Set(ki);function o0(e,{layout:t,layoutId:n}){return lr.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!aa[e]||e==="opacity")}const rt=e=>!!(e&&e.getVelocity),Ok={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},jk=ki.length;function _k(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,o){let i="";for(let s=0;st=>typeof t=="string"&&t.startsWith(e),s0=i0("--"),bc=i0("var(--"),Dk=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,Ik=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Ln=(e,t,n)=>Math.min(Math.max(n,e),t),ur={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},zo={...ur,transform:e=>Ln(0,1,e)},Ji={...ur,default:1},Uo=e=>Math.round(e*1e5)/1e5,Ha=/(-)?([\d]*\.?[\d])+/g,a0=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Fk=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Ti(e){return typeof e=="string"}const Ri=e=>({test:t=>Ti(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),un=Ri("deg"),_t=Ri("%"),K=Ri("px"),Vk=Ri("vh"),Bk=Ri("vw"),kh={..._t,parse:e=>_t.parse(e)/100,transform:e=>_t.transform(e*100)},Th={...ur,transform:Math.round},l0={borderWidth:K,borderTopWidth:K,borderRightWidth:K,borderBottomWidth:K,borderLeftWidth:K,borderRadius:K,radius:K,borderTopLeftRadius:K,borderTopRightRadius:K,borderBottomRightRadius:K,borderBottomLeftRadius:K,width:K,maxWidth:K,height:K,maxHeight:K,size:K,top:K,right:K,bottom:K,left:K,padding:K,paddingTop:K,paddingRight:K,paddingBottom:K,paddingLeft:K,margin:K,marginTop:K,marginRight:K,marginBottom:K,marginLeft:K,rotate:un,rotateX:un,rotateY:un,rotateZ:un,scale:Ji,scaleX:Ji,scaleY:Ji,scaleZ:Ji,skew:un,skewX:un,skewY:un,distance:K,translateX:K,translateY:K,translateZ:K,x:K,y:K,z:K,perspective:K,transformPerspective:K,opacity:zo,originX:kh,originY:kh,originZ:K,zIndex:Th,fillOpacity:zo,strokeOpacity:zo,numOctaves:Th};function ef(e,t,n,r){const{style:o,vars:i,transform:s,transformOrigin:a}=e;let l=!1,u=!1,c=!0;for(const d in t){const f=t[d];if(s0(d)){i[d]=f;continue}const p=l0[d],m=Ik(f,p);if(lr.has(d)){if(l=!0,s[d]=m,!c)continue;f!==(p.default||0)&&(c=!1)}else d.startsWith("origin")?(u=!0,a[d]=m):o[d]=m}if(t.transform||(l||r?o.transform=_k(e.transform,n,c,r):o.transform&&(o.transform="none")),u){const{originX:d="50%",originY:f="50%",originZ:p=0}=a;o.transformOrigin=`${d} ${f} ${p}`}}const tf=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function u0(e,t,n){for(const r in t)!rt(t[r])&&!o0(r,n)&&(e[r]=t[r])}function zk({transformTemplate:e},t,n){return g.useMemo(()=>{const r=tf();return ef(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function Uk(e,t,n){const r=e.style||{},o={};return u0(o,r,e),Object.assign(o,zk(e,t,n)),e.transformValues?e.transformValues(o):o}function Wk(e,t,n){const r={},o=Uk(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=o,r}const Hk=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function la(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||Hk.has(e)}let c0=e=>!la(e);function Kk(e){e&&(c0=t=>t.startsWith("on")?!la(t):e(t))}try{Kk(require("@emotion/is-prop-valid").default)}catch{}function Gk(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(c0(o)||n===!0&&la(o)||!t&&!la(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Rh(e,t,n){return typeof e=="string"?e:K.transform(t+n*e)}function Qk(e,t,n){const r=Rh(t,e.x,e.width),o=Rh(n,e.y,e.height);return`${r} ${o}`}const Xk={offset:"stroke-dashoffset",array:"stroke-dasharray"},Yk={offset:"strokeDashoffset",array:"strokeDasharray"};function qk(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?Xk:Yk;e[i.offset]=K.transform(-r);const s=K.transform(t),a=K.transform(n);e[i.array]=`${s} ${a}`}function nf(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...u},c,d,f){if(ef(e,u,c,f),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:m,dimensions:y}=e;p.transform&&(y&&(m.transform=p.transform),delete p.transform),y&&(o!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=Qk(y,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),s!==void 0&&qk(p,s,a,l,!1)}const d0=()=>({...tf(),attrs:{}}),rf=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Jk(e,t,n,r){const o=g.useMemo(()=>{const i=d0();return nf(i,t,{enableHardwareAcceleration:!1},rf(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};u0(i,e.style,e),o.style={...i,...o.style}}return o}function Zk(e=!1){return(n,r,o,{latestValues:i},s)=>{const l=(Zd(n)?Jk:Wk)(r,i,s,n),c={...Gk(r,typeof n=="string",e),...l,ref:o},{children:d}=r,f=g.useMemo(()=>rt(d)?d.get():d,[d]);return g.createElement(n,{...c,children:f})}}const of=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function f0(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 p0=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 h0(e,t,n,r){f0(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(p0.has(o)?o:of(o),t.attrs[o])}function sf(e,t){const{style:n}=e,r={};for(const o in n)(rt(n[o])||t.style&&rt(t.style[o])||o0(o,e))&&(r[o]=n[o]);return r}function m0(e,t){const n=sf(e,t);for(const r in e)if(rt(e[r])||rt(t[r])){const o=ki.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[o]=e[r]}return n}function af(e,t,n,r={},o={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,o)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,o)),t}function g0(e){const t=g.useRef(null);return t.current===null&&(t.current=e()),t.current}const ua=e=>Array.isArray(e),eT=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),tT=e=>ua(e)?e[e.length-1]||0:e;function Ss(e){const t=rt(e)?e.get():e;return eT(t)?t.toValue():t}function nT({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,o,i){const s={latestValues:rT(r,o,i,e),renderState:t()};return n&&(s.mount=a=>n(r,a,s)),s}const v0=e=>(t,n)=>{const r=g.useContext(Va),o=g.useContext(Ba),i=()=>nT(e,t,r,o);return n?i():g0(i)};function rT(e,t,n,r){const o={},i=r(e,{});for(const f in i)o[f]=Ss(i[f]);let{initial:s,animate:a}=e;const l=Wa(e),u=n0(e);t&&u&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||s===!1;const d=c?a:s;return d&&typeof d!="boolean"&&!Ua(d)&&(Array.isArray(d)?d:[d]).forEach(p=>{const m=af(e,p);if(!m)return;const{transitionEnd:y,transition:P,...b}=m;for(const h in b){let v=b[h];if(Array.isArray(v)){const S=c?v.length-1:0;v=v[S]}v!==null&&(o[h]=v)}for(const h in y)o[h]=y[h]}),o}const oT={useVisualState:v0({scrapeMotionValuesFromProps:m0,createRenderState:d0,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}nf(n,r,{enableHardwareAcceleration:!1},rf(t.tagName),e.transformTemplate),h0(t,n)}})},iT={useVisualState:v0({scrapeMotionValuesFromProps:sf,createRenderState:tf})};function sT(e,{forwardMotionProps:t=!1},n,r){return{...Zd(e)?oT:iT,preloadedFeatures:n,useRender:Zk(t),createVisualElement:r,Component:e}}function Gt(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const y0=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Ka(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const aT=e=>t=>y0(t)&&e(t,Ka(t));function Yt(e,t,n,r){return Gt(e,t,aT(n),r)}const lT=(e,t)=>n=>t(e(n)),Rn=(...e)=>e.reduce(lT);function b0(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const Nh=b0("dragHorizontal"),$h=b0("dragVertical");function x0(e){let t=!1;if(e==="y")t=$h();else if(e==="x")t=Nh();else{const n=Nh(),r=$h();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function w0(){const e=x0(!0);return e?(e(),!1):!0}class Dn{constructor(t){this.isMounted=!1,this.node=t}update(){}}const Ce=e=>e;function uT(e){let t=[],n=[],r=0,o=!1,i=!1;const s=new WeakSet,a={schedule:(l,u=!1,c=!1)=>{const d=c&&o,f=d?t:n;return u&&s.add(l),f.indexOf(l)===-1&&(f.push(l),d&&o&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),s.delete(l)},process:l=>{if(o){i=!0;return}if(o=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(d[f]=uT(()=>n=!0),d),{}),s=d=>i[d].process(o),a=()=>{const d=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(d-o.timestamp,cT),1),o.timestamp=d,o.isProcessing=!0,Zi.forEach(s),o.isProcessing=!1,n&&t&&(r=!1,e(a))},l=()=>{n=!0,r=!0,o.isProcessing||e(a)};return{schedule:Zi.reduce((d,f)=>{const p=i[f];return d[f]=(m,y=!1,P=!1)=>(n||l(),p.schedule(m,y,P)),d},{}),cancel:d=>Zi.forEach(f=>i[f].cancel(d)),state:o,steps:i}}const{schedule:ge,cancel:nn,state:Be,steps:Il}=dT(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ce,!0);function Mh(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),o=(i,s)=>{if(i.type==="touch"||w0())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t),a[r]&&ge.update(()=>a[r](i,s))};return Yt(e.current,n,o,{passive:!e.getProps()[r]})}class fT extends Dn{mount(){this.unmount=Rn(Mh(this.node,!0),Mh(this.node,!1))}unmount(){}}class pT extends Dn{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=Rn(Gt(this.node.current,"focus",()=>this.onFocus()),Gt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const S0=(e,t)=>t?e===t?!0:S0(e,t.parentElement):!1;function Fl(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Ka(n))}class hT extends Dn{constructor(){super(...arguments),this.removeStartListeners=Ce,this.removeEndListeners=Ce,this.removeAccessibleListeners=Ce,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),i=Yt(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:c}=this.node.getProps();ge.update(()=>{S0(this.node.current,a.target)?u&&u(a,l):c&&c(a,l)})},{passive:!(r.onTap||r.onPointerUp)}),s=Yt(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Rn(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()||Fl("up",(l,u)=>{const{onTap:c}=this.node.getProps();c&&ge.update(()=>c(l,u))})};this.removeEndListeners(),this.removeEndListeners=Gt(this.node.current,"keyup",s),Fl("down",(a,l)=>{this.startPress(a,l)})},n=Gt(this.node.current,"keydown",t),r=()=>{this.isPressing&&Fl("cancel",(i,s)=>this.cancelPress(i,s))},o=Gt(this.node.current,"blur",r);this.removeAccessibleListeners=Rn(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&&ge.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!w0()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&ge.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=Yt(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=Gt(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Rn(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const xc=new WeakMap,Vl=new WeakMap,mT=e=>{const t=xc.get(e.target);t&&t(e)},gT=e=>{e.forEach(mT)};function vT({root:e,...t}){const n=e||document;Vl.has(n)||Vl.set(n,{});const r=Vl.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(gT,{root:e,...t})),r[o]}function yT(e,t,n){const r=vT(t);return xc.set(e,n),r.observe(e),()=>{xc.delete(e),r.unobserve(e)}}const bT={some:0,all:1};class xT extends Dn{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:bT[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:d}=this.node.getProps(),f=u?c:d;f&&f(l)};return yT(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(wT(t,n))&&this.startObserver()}unmount(){}}function wT({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const ST={inView:{Feature:xT},tap:{Feature:hT},focus:{Feature:pT},hover:{Feature:fT}};function P0(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rt[r]=n.get()),t}function CT(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function Ga(e,t,n){const r=e.getProps();return af(r,t,n!==void 0?n:r.custom,PT(e),CT(e))}const ET="framerAppearId",kT="data-"+of(ET);let TT=Ce,lf=Ce;const Nn=e=>e*1e3,qt=e=>e/1e3,RT={current:!1},C0=e=>Array.isArray(e)&&typeof e[0]=="number";function E0(e){return!!(!e||typeof e=="string"&&k0[e]||C0(e)||Array.isArray(e)&&e.every(E0))}const Lo=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,k0={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Lo([0,.65,.55,1]),circOut:Lo([.55,0,1,.45]),backIn:Lo([.31,.01,.66,-.59]),backOut:Lo([.33,1.53,.69,.99])};function T0(e){if(e)return C0(e)?Lo(e):Array.isArray(e)?e.map(T0):k0[e]}function NT(e,t,n,{delay:r=0,duration:o,repeat:i=0,repeatType:s="loop",ease:a,times:l}={}){const u={[t]:n};l&&(u.offset=l);const c=T0(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"})}function $T(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const R0=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,MT=1e-7,LT=12;function AT(e,t,n,r,o){let i,s,a=0;do s=t+(n-t)/2,i=R0(s,r,o)-e,i>0?n=s:t=s;while(Math.abs(i)>MT&&++aAT(i,0,1,e,n);return i=>i===0||i===1?i:R0(o(i),t,r)}const OT=Ni(.42,0,1,1),jT=Ni(0,0,.58,1),N0=Ni(.42,0,.58,1),_T=e=>Array.isArray(e)&&typeof e[0]!="number",$0=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,M0=e=>t=>1-e(1-t),L0=e=>1-Math.sin(Math.acos(e)),uf=M0(L0),DT=$0(uf),A0=Ni(.33,1.53,.69,.99),cf=M0(A0),IT=$0(cf),FT=e=>(e*=2)<1?.5*cf(e):.5*(2-Math.pow(2,-10*(e-1))),VT={linear:Ce,easeIn:OT,easeInOut:N0,easeOut:jT,circIn:L0,circInOut:DT,circOut:uf,backIn:cf,backInOut:IT,backOut:A0,anticipate:FT},Lh=e=>{if(Array.isArray(e)){lf(e.length===4);const[t,n,r,o]=e;return Ni(t,n,r,o)}else if(typeof e=="string")return VT[e];return e},df=(e,t)=>n=>!!(Ti(n)&&Fk.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),O0=(e,t,n)=>r=>{if(!Ti(r))return r;const[o,i,s,a]=r.match(Ha);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},BT=e=>Ln(0,255,e),Bl={...ur,transform:e=>Math.round(BT(e))},Qn={test:df("rgb","red"),parse:O0("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Bl.transform(e)+", "+Bl.transform(t)+", "+Bl.transform(n)+", "+Uo(zo.transform(r))+")"};function zT(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 wc={test:df("#"),parse:zT,transform:Qn.transform},Ar={test:df("hsl","hue"),parse:O0("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+_t.transform(Uo(t))+", "+_t.transform(Uo(n))+", "+Uo(zo.transform(r))+")"},Ke={test:e=>Qn.test(e)||wc.test(e)||Ar.test(e),parse:e=>Qn.test(e)?Qn.parse(e):Ar.test(e)?Ar.parse(e):wc.parse(e),transform:e=>Ti(e)?e:e.hasOwnProperty("red")?Qn.transform(e):Ar.transform(e)},be=(e,t,n)=>-n*e+n*t+e;function zl(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 UT({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=zl(l,a,e+1/3),i=zl(l,a,e),s=zl(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}const Ul=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},WT=[wc,Qn,Ar],HT=e=>WT.find(t=>t.test(e));function Ah(e){const t=HT(e);let n=t.parse(e);return t===Ar&&(n=UT(n)),n}const j0=(e,t)=>{const n=Ah(e),r=Ah(t),o={...n};return i=>(o.red=Ul(n.red,r.red,i),o.green=Ul(n.green,r.green,i),o.blue=Ul(n.blue,r.blue,i),o.alpha=be(n.alpha,r.alpha,i),Qn.transform(o))};function KT(e){var t,n;return isNaN(e)&&Ti(e)&&(((t=e.match(Ha))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(a0))===null||n===void 0?void 0:n.length)||0)>0}const _0={regex:Dk,countKey:"Vars",token:"${v}",parse:Ce},D0={regex:a0,countKey:"Colors",token:"${c}",parse:Ke.parse},I0={regex:Ha,countKey:"Numbers",token:"${n}",parse:ur.parse};function Wl(e,{regex:t,countKey:n,token:r,parse:o}){const i=e.tokenised.match(t);i&&(e["num"+n]=i.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...i.map(o)))}function ca(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&Wl(n,_0),Wl(n,D0),Wl(n,I0),n}function F0(e){return ca(e).values}function V0(e){const{values:t,numColors:n,numVars:r,tokenised:o}=ca(e),i=t.length;return s=>{let a=o;for(let l=0;ltypeof e=="number"?0:e;function QT(e){const t=F0(e);return V0(e)(t.map(GT))}const An={test:KT,parse:F0,createTransformer:V0,getAnimatableNone:QT},B0=(e,t)=>n=>`${n>0?t:e}`;function z0(e,t){return typeof e=="number"?n=>be(e,t,n):Ke.test(e)?j0(e,t):e.startsWith("var(")?B0(e,t):W0(e,t)}const U0=(e,t)=>{const n=[...e],r=n.length,o=e.map((i,s)=>z0(i,t[s]));return i=>{for(let s=0;s{const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=z0(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}},W0=(e,t)=>{const n=An.createTransformer(t),r=ca(e),o=ca(t);return r.numVars===o.numVars&&r.numColors===o.numColors&&r.numNumbers>=o.numNumbers?Rn(U0(r.values,o.values),n):B0(e,t)},mi=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Oh=(e,t)=>n=>be(e,t,n);function YT(e){return typeof e=="number"?Oh:typeof e=="string"?Ke.test(e)?j0:W0:Array.isArray(e)?U0:typeof e=="object"?XT:Oh}function qT(e,t,n){const r=[],o=n||YT(e[0]),i=e.length-1;for(let s=0;st[0];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=qT(t,r,o),a=s.length,l=u=>{let c=0;if(a>1)for(;cl(Ln(e[0],e[i-1],u)):l}function JT(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=mi(0,t,r);e.push(be(n,1,o))}}function ZT(e){const t=[0];return JT(t,e.length-1),t}function e2(e,t){return e.map(n=>n*t)}function t2(e,t){return e.map(()=>t||N0).splice(0,e.length-1)}function da({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=_T(r)?r.map(Lh):Lh(r),i={done:!1,value:t[0]},s=e2(n&&n.length===t.length?n:ZT(t),e),a=H0(s,t,{ease:Array.isArray(o)?o:t2(t,o)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}function K0(e,t){return t?e*(1e3/t):0}const n2=5;function G0(e,t,n){const r=Math.max(t-n2,0);return K0(n-e(r),t-r)}const Hl=.001,r2=.01,jh=10,o2=.05,i2=1;function s2({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i;TT(e<=Nn(jh));let s=1-t;s=Ln(o2,i2,s),e=Ln(r2,jh,qt(e)),s<1?(o=u=>{const c=u*s,d=c*e,f=c-n,p=Sc(u,s),m=Math.exp(-d);return Hl-f/p*m},i=u=>{const d=u*s*e,f=d*n+n,p=Math.pow(s,2)*Math.pow(u,2)*e,m=Math.exp(-d),y=Sc(Math.pow(u,2),s);return(-o(u)+Hl>0?-1:1)*((f-p)*m)/y}):(o=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-Hl+c*d},i=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const a=5/e,l=l2(o,i,a);if(e=Nn(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 a2=12;function l2(e,t,n){let r=n;for(let o=1;oe[n]!==void 0)}function d2(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!_h(e,c2)&&_h(e,u2)){const n=s2(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function Q0({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,velocity:c,duration:d,isResolvedFromDuration:f}=d2(r),p=c?-qt(c):0,m=l/(2*Math.sqrt(a*u)),y=i-o,P=qt(Math.sqrt(a/u)),b=Math.abs(y)<5;n||(n=b?.01:2),t||(t=b?.005:.5);let h;if(m<1){const v=Sc(P,m);h=S=>{const E=Math.exp(-m*P*S);return i-E*((p+m*P*y)/v*Math.sin(v*S)+y*Math.cos(v*S))}}else if(m===1)h=v=>i-Math.exp(-P*v)*(y+(p+P*y)*v);else{const v=P*Math.sqrt(m*m-1);h=S=>{const E=Math.exp(-m*P*S),R=Math.min(v*S,300);return i-E*((p+m*P*y)*Math.sinh(R)+v*y*Math.cosh(R))/v}}return{calculatedDuration:f&&d||null,next:v=>{const S=h(v);if(f)s.done=v>=d;else{let E=p;v!==0&&(m<1?E=G0(h,v,S):E=0);const R=Math.abs(E)<=n,T=Math.abs(i-S)<=t;s.done=R&&T}return s.value=s.done?i:S,s}}}function Dh({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 d=e[0],f={done:!1,value:d},p=x=>a!==void 0&&xl,m=x=>a===void 0?l:l===void 0||Math.abs(a-x)-y*Math.exp(-x/r),v=x=>b+h(x),S=x=>{const N=h(x),F=v(x);f.done=Math.abs(N)<=u,f.value=f.done?b:F};let E,R;const T=x=>{p(f.value)&&(E=x,R=Q0({keyframes:[f.value,m(f.value)],velocity:G0(v,x,f.value),damping:o,stiffness:i,restDelta:u,restSpeed:c}))};return T(0),{calculatedDuration:null,next:x=>{let N=!1;return!R&&E===void 0&&(N=!0,S(x),T(x)),E!==void 0&&x>E?R.next(x-E):(!N&&S(x),f)}}}const f2=e=>{const t=({timestamp:n})=>e(n);return{start:()=>ge.update(t,!0),stop:()=>nn(t),now:()=>Be.isProcessing?Be.timestamp:performance.now()}},Ih=2e4;function Fh(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t=Ih?1/0:t}const p2={decay:Dh,inertia:Dh,tween:da,keyframes:da,spring:Q0};function fa({autoplay:e=!0,delay:t=0,driver:n=f2,keyframes:r,type:o="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:a="loop",onPlay:l,onStop:u,onComplete:c,onUpdate:d,...f}){let p=1,m=!1,y,P;const b=()=>{P=new Promise(w=>{y=w})};b();let h;const v=p2[o]||da;let S;v!==da&&typeof r[0]!="number"&&(S=H0([0,100],r,{clamp:!1}),r=[0,100]);const E=v({...f,keyframes:r});let R;a==="mirror"&&(R=v({...f,keyframes:[...r].reverse(),velocity:-(f.velocity||0)}));let T="idle",x=null,N=null,F=null;E.calculatedDuration===null&&i&&(E.calculatedDuration=Fh(E));const{calculatedDuration:M}=E;let B=1/0,A=1/0;M!==null&&(B=M+s,A=B*(i+1)-s);let j=0;const U=w=>{if(N===null)return;p>0&&(N=Math.min(N,w)),p<0&&(N=Math.min(w-A/p,N)),x!==null?j=x:j=Math.round(w-N)*p;const k=j-t*(p>=0?1:-1),_=p>=0?k<0:k>A;j=Math.max(k,0),T==="finished"&&x===null&&(j=A);let V=j,W=E;if(i){const q=j/B;let ae=Math.floor(q),ve=q%1;!ve&&q>=1&&(ve=1),ve===1&&ae--,ae=Math.min(ae,i+1);const Ft=!!(ae%2);Ft&&(a==="reverse"?(ve=1-ve,s&&(ve-=s/B)):a==="mirror"&&(W=R));let ue=Ln(0,1,ve);j>A&&(ue=a==="reverse"&&Ft?1:0),V=ue*B}const H=_?{done:!1,value:r[0]}:W.next(V);S&&(H.value=S(H.value));let{done:Q}=H;!_&&M!==null&&(Q=p>=0?j>=A:j<=0);const te=x===null&&(T==="finished"||T==="running"&&Q);return d&&d(H.value),te&&O(),H},Y=()=>{h&&h.stop(),h=void 0},ie=()=>{T="idle",Y(),y(),b(),N=F=null},O=()=>{T="finished",c&&c(),Y(),y()},L=()=>{if(m)return;h||(h=n(U));const w=h.now();l&&l(),x!==null?N=w-x:(!N||T==="finished")&&(N=w),T==="finished"&&b(),F=N,x=null,T="running",h.start()};e&&L();const I={then(w,k){return P.then(w,k)},get time(){return qt(j)},set time(w){w=Nn(w),j=w,x!==null||!h||p===0?x=w:N=h.now()-w/p},get duration(){const w=E.calculatedDuration===null?Fh(E):E.calculatedDuration;return qt(w)},get speed(){return p},set speed(w){w===p||!h||(p=w,I.time=qt(j))},get state(){return T},play:L,pause:()=>{T="paused",x=j},stop:()=>{m=!0,T!=="idle"&&(T="idle",u&&u(),ie())},cancel:()=>{F!==null&&U(F),ie()},complete:()=>{T="finished"},sample:w=>(N=0,U(w))};return I}function h2(e){let t;return()=>(t===void 0&&(t=e()),t)}const m2=h2(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),g2=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),es=10,v2=2e4,y2=(e,t)=>t.type==="spring"||e==="backgroundColor"||!E0(t.ease);function b2(e,t,{onUpdate:n,onComplete:r,...o}){if(!(m2()&&g2.has(t)&&!o.repeatDelay&&o.repeatType!=="mirror"&&o.damping!==0&&o.type!=="inertia"))return!1;let s=!1,a,l;const u=()=>{l=new Promise(h=>{a=h})};u();let{keyframes:c,duration:d=300,ease:f,times:p}=o;if(y2(t,o)){const h=fa({...o,repeat:0,delay:0});let v={done:!1,value:c[0]};const S=[];let E=0;for(;!v.done&&Em.cancel(),P=()=>{ge.update(y),a(),u()};return m.onfinish=()=>{e.set($T(c,o)),r&&r(),P()},{then(h,v){return l.then(h,v)},attachTimeline(h){return m.timeline=h,m.onfinish=null,Ce},get time(){return qt(m.currentTime||0)},set time(h){m.currentTime=Nn(h)},get speed(){return m.playbackRate},set speed(h){m.playbackRate=h},get duration(){return qt(d)},play:()=>{s||(m.play(),nn(y))},pause:()=>m.pause(),stop:()=>{if(s=!0,m.playState==="idle")return;const{currentTime:h}=m;if(h){const v=fa({...o,autoplay:!1});e.setWithVelocity(v.sample(h-es).value,v.sample(h).value,es)}P()},complete:()=>m.finish(),cancel:P}}function x2({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const o=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:Ce,pause:Ce,stop:Ce,then:i=>(i(),Promise.resolve()),cancel:Ce,complete:Ce});return t?fa({keyframes:[0,1],duration:0,delay:t,onComplete:o}):o()}const w2={type:"spring",stiffness:500,damping:25,restSpeed:10},S2=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),P2={type:"keyframes",duration:.8},C2={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},E2=(e,{keyframes:t})=>t.length>2?P2:lr.has(e)?e.startsWith("scale")?S2(t[1]):w2:C2,Pc=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(An.test(t)||t==="0")&&!t.startsWith("url(")),k2=new Set(["brightness","contrast","saturate","opacity"]);function T2(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Ha)||[];if(!r)return e;const o=n.replace(r,"");let i=k2.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const R2=/([a-z-]*)\(.*?\)/g,Cc={...An,getAnimatableNone:e=>{const t=e.match(R2);return t?t.map(T2).join(" "):e}},N2={...l0,color:Ke,backgroundColor:Ke,outlineColor:Ke,fill:Ke,stroke:Ke,borderColor:Ke,borderTopColor:Ke,borderRightColor:Ke,borderBottomColor:Ke,borderLeftColor:Ke,filter:Cc,WebkitFilter:Cc},ff=e=>N2[e];function X0(e,t){let n=ff(e);return n!==Cc&&(n=An),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Y0=e=>/^0[^.\s]+$/.test(e);function $2(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||Y0(e)}function M2(e,t,n,r){const o=Pc(t,n);let i;Array.isArray(n)?i=[...n]:i=[null,n];const s=r.from!==void 0?r.from:e.get();let a;const l=[];for(let u=0;uo=>{const i=q0(r,e)||{},s=i.delay||r.delay||0;let{elapsed:a=0}=r;a=a-Nn(s);const l=M2(t,e,n,i),u=l[0],c=l[l.length-1],d=Pc(e,u),f=Pc(e,c);let p={keyframes:l,velocity:t.getVelocity(),ease:"easeOut",...i,delay:-a,onUpdate:m=>{t.set(m),i.onUpdate&&i.onUpdate(m)},onComplete:()=>{o(),i.onComplete&&i.onComplete()}};if(L2(i)||(p={...p,...E2(e,p)}),p.duration&&(p.duration=Nn(p.duration)),p.repeatDelay&&(p.repeatDelay=Nn(p.repeatDelay)),!d||!f||RT.current||i.type===!1)return x2(p);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const m=b2(t,e,p);if(m)return m}return fa(p)};function pa(e){return!!(rt(e)&&e.add)}const A2=e=>/^\-?\d*\.?\d+$/.test(e);function hf(e,t){e.indexOf(t)===-1&&e.push(t)}function mf(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class gf{constructor(){this.subscriptions=[]}add(t){return hf(this.subscriptions,t),()=>mf(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 j2{constructor(t,n={}){this.version="10.15.1",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,o=!0)=>{this.prev=this.current,this.current=r;const{delta:i,timestamp:s}=Be;this.lastUpdated!==s&&(this.timeDelta=i,this.lastUpdated=s,ge.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>ge.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=O2(this.current),this.owner=n.owner}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new gf);const r=this.events[t].add(n);return t==="change"?()=>{r(),ge.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=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?K0(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}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 Yr(e,t){return new j2(e,t)}const J0=e=>t=>t.test(e),_2={test:e=>e==="auto",parse:e=>e},Z0=[ur,K,_t,un,Bk,Vk,_2],Po=e=>Z0.find(J0(e)),D2=[...Z0,Ke,An],I2=e=>D2.find(J0(e));function F2(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Yr(n))}function V2(e,t){const n=Ga(e,t);let{transitionEnd:r={},transition:o={},...i}=n?e.makeTargetAnimatable(n,!1):{};i={...i,...r};for(const s in i){const a=tT(i[s]);F2(e,s,a)}}function B2(e,t,n){var r,o;const i=Object.keys(t).filter(a=>!e.hasValue(a)),s=i.length;if(s)for(let a=0;al.remove(d))),u.push(y)}return s&&Promise.all(u).then(()=>{s&&V2(e,s)}),u}function Ec(e,t,n={}){const r=Ga(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(e1(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:d}=o;return H2(e,t,u+l,c,d,n)}:()=>Promise.resolve(),{when:a}=o;if(a){const[l,u]=a==="beforeChildren"?[i,s]:[s,i];return l().then(()=>u())}else return Promise.all([i(),s(n.delay)])}function H2(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(K2).forEach((u,c)=>{u.notify("AnimationStart",t),s.push(Ec(u,t,{...i,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(s)}function K2(e,t){return e.sortNodePosition(t)}function G2(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Ec(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Ec(e,t,n);else{const o=typeof t=="function"?Ga(e,t,n.custom):t;r=Promise.all(e1(e,o,n))}return r.then(()=>e.notify("AnimationComplete",t))}const Q2=[...Yd].reverse(),X2=Yd.length;function Y2(e){return t=>Promise.all(t.map(({animation:n,options:r})=>G2(e,n,r)))}function q2(e){let t=Y2(e);const n=Z2();let r=!0;const o=(l,u)=>{const c=Ga(e,u);if(c){const{transition:d,transitionEnd:f,...p}=c;l={...l,...p,...f}}return l};function i(l){t=l(e)}function s(l,u){const c=e.getProps(),d=e.getVariantContext(!0)||{},f=[],p=new Set;let m={},y=1/0;for(let b=0;by&&E;const F=Array.isArray(S)?S:[S];let M=F.reduce(o,{});R===!1&&(M={});const{prevResolvedValues:B={}}=v,A={...B,...M},j=U=>{N=!0,p.delete(U),v.needsAnimating[U]=!0};for(const U in A){const Y=M[U],ie=B[U];m.hasOwnProperty(U)||(Y!==ie?ua(Y)&&ua(ie)?!P0(Y,ie)||x?j(U):v.protectedKeys[U]=!0:Y!==void 0?j(U):p.add(U):Y!==void 0&&p.has(U)?j(U):v.protectedKeys[U]=!0)}v.prevProp=S,v.prevResolvedValues=M,v.isActive&&(m={...m,...M}),r&&e.blockInitialAnimation&&(N=!1),N&&!T&&f.push(...F.map(U=>({animation:U,options:{type:h,...l}})))}if(p.size){const b={};p.forEach(h=>{const v=e.getBaseTarget(h);v!==void 0&&(b[h]=v)}),f.push({animation:b})}let P=!!f.length;return r&&c.initial===!1&&!e.manuallyAnimateOnMount&&(P=!1),r=!1,P?t(f):Promise.resolve()}function a(l,u,c){var d;if(n[l].isActive===u)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(p=>{var m;return(m=p.animationState)===null||m===void 0?void 0:m.setActive(l,u)}),n[l].isActive=u;const f=s(c,l);for(const p in n)n[p].protectedKeys={};return f}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n}}function J2(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!P0(t,e):!1}function In(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Z2(){return{animate:In(!0),whileInView:In(),whileHover:In(),whileTap:In(),whileDrag:In(),whileFocus:In(),exit:In()}}class eR extends Dn{constructor(t){super(t),t.animationState||(t.animationState=q2(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),Ua(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let tR=0;class nR extends Dn{constructor(){super(...arguments),this.id=tR++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;const i=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const rR={animation:{Feature:eR},exit:{Feature:nR}},Vh=(e,t)=>Math.abs(e-t);function oR(e,t){const n=Vh(e.x,t.x),r=Vh(e.y,t.y);return Math.sqrt(n**2+r**2)}class t1{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=Gl(this.lastMoveEventInfo,this.history),c=this.startEvent!==null,d=oR(u.offset,{x:0,y:0})>=3;if(!c&&!d)return;const{point:f}=u,{timestamp:p}=Be;this.history.push({...f,timestamp:p});const{onStart:m,onMove:y}=this.handlers;c||(m&&m(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,u)},this.handlePointerMove=(u,c)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=Kl(c,this.transformPagePoint),ge.update(this.updatePoint,!0)},this.handlePointerUp=(u,c)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:d,onSessionEnd:f}=this.handlers,p=Gl(u.type==="pointercancel"?this.lastMoveEventInfo:Kl(c,this.transformPagePoint),this.history);this.startEvent&&d&&d(u,p),f&&f(u,p)},!y0(t))return;this.handlers=n,this.transformPagePoint=r;const o=Ka(t),i=Kl(o,this.transformPagePoint),{point:s}=i,{timestamp:a}=Be;this.history=[{...s,timestamp:a}];const{onSessionStart:l}=n;l&&l(t,Gl(i,this.history)),this.removeListeners=Rn(Yt(window,"pointermove",this.handlePointerMove),Yt(window,"pointerup",this.handlePointerUp),Yt(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),nn(this.updatePoint)}}function Kl(e,t){return t?{point:t(e.point)}:e}function Bh(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Gl({point:e},t){return{point:e,delta:Bh(e,n1(t)),offset:Bh(e,iR(t)),velocity:sR(t,.1)}}function iR(e){return e[0]}function n1(e){return e[e.length-1]}function sR(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=n1(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Nn(t)));)n--;if(!r)return{x:0,y:0};const i=qt(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 ut(e){return e.max-e.min}function kc(e,t=0,n=.01){return Math.abs(e-t)<=n}function zh(e,t,n,r=.5){e.origin=r,e.originPoint=be(t.min,t.max,e.origin),e.scale=ut(n)/ut(t),(kc(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=be(n.min,n.max,e.origin)-e.originPoint,(kc(e.translate)||isNaN(e.translate))&&(e.translate=0)}function Wo(e,t,n,r){zh(e.x,t.x,n.x,r?r.originX:void 0),zh(e.y,t.y,n.y,r?r.originY:void 0)}function Uh(e,t,n){e.min=n.min+t.min,e.max=e.min+ut(t)}function aR(e,t,n){Uh(e.x,t.x,n.x),Uh(e.y,t.y,n.y)}function Wh(e,t,n){e.min=t.min-n.min,e.max=e.min+ut(t)}function Ho(e,t,n){Wh(e.x,t.x,n.x),Wh(e.y,t.y,n.y)}function lR(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?be(n,e,r.max):Math.min(e,n)),e}function Hh(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 uR(e,{top:t,left:n,bottom:r,right:o}){return{x:Hh(e.x,n,o),y:Hh(e.y,t,r)}}function Kh(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=mi(t.min,t.max-r,e.min):r>o&&(n=mi(e.min,e.max-o,t.min)),Ln(0,1,n)}function fR(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 Tc=.35;function pR(e=Tc){return e===!1?e=0:e===!0&&(e=Tc),{x:Gh(e,"left","right"),y:Gh(e,"top","bottom")}}function Gh(e,t,n){return{min:Qh(e,t),max:Qh(e,n)}}function Qh(e,t){return typeof e=="number"?e:e[t]||0}const Xh=()=>({translate:0,scale:1,origin:0,originPoint:0}),Or=()=>({x:Xh(),y:Xh()}),Yh=()=>({min:0,max:0}),Re=()=>({x:Yh(),y:Yh()});function $t(e){return[e("x"),e("y")]}function r1({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function hR({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function mR(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 Ql(e){return e===void 0||e===1}function Rc({scale:e,scaleX:t,scaleY:n}){return!Ql(e)||!Ql(t)||!Ql(n)}function Bn(e){return Rc(e)||o1(e)||e.z||e.rotate||e.rotateX||e.rotateY}function o1(e){return qh(e.x)||qh(e.y)}function qh(e){return e&&e!=="0%"}function ha(e,t,n){const r=e-n,o=t*r;return n+o}function Jh(e,t,n,r,o){return o!==void 0&&(e=ha(e,o,r)),ha(e,n,r)+t}function Nc(e,t=0,n=1,r,o){e.min=Jh(e.min,t,n,r,o),e.max=Jh(e.max,t,n,r,o)}function i1(e,{x:t,y:n}){Nc(e.x,t.translate,t.scale,t.originPoint),Nc(e.y,n.translate,n.scale,n.originPoint)}function gR(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,s;for(let a=0;a1.0000000000001||e<.999999999999?e:1}function fn(e,t){e.min=e.min+t,e.max=e.max+t}function em(e,t,[n,r,o]){const i=t[o]!==void 0?t[o]:.5,s=be(e.min,e.max,i);Nc(e,t[n],t[r],s,t.scale)}const vR=["x","scaleX","originX"],yR=["y","scaleY","originY"];function jr(e,t){em(e.x,t,vR),em(e.y,t,yR)}function s1(e,t){return r1(mR(e.getBoundingClientRect(),t))}function bR(e,t,n){const r=s1(e,n),{scroll:o}=t;return o&&(fn(r.x,o.offset.x),fn(r.y,o.offset.y)),r}const xR=new WeakMap;class wR{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=Re(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=l=>{this.stopAnimation(),n&&this.snapToCursor(Ka(l,"page").point)},i=(l,u)=>{const{drag:c,dragPropagation:d,onDragStart:f}=this.getProps();if(c&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=x0(c),!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),$t(m=>{let y=this.getAxisMotionValue(m).get()||0;if(_t.test(y)){const{projection:P}=this.visualElement;if(P&&P.layout){const b=P.layout.layoutBox[m];b&&(y=ut(b)*(parseFloat(y)/100))}}this.originPoint[m]=y}),f&&ge.update(()=>f(l,u),!1,!0);const{animationState:p}=this.visualElement;p&&p.setActive("whileDrag",!0)},s=(l,u)=>{const{dragPropagation:c,dragDirectionLock:d,onDirectionLock:f,onDrag:p}=this.getProps();if(!c&&!this.openGlobalLock)return;const{offset:m}=u;if(d&&this.currentDirection===null){this.currentDirection=SR(m),this.currentDirection!==null&&f&&f(this.currentDirection);return}this.updateAxis("x",u.point,m),this.updateAxis("y",u.point,m),this.visualElement.render(),p&&p(l,u)},a=(l,u)=>this.stop(l,u);this.panSession=new t1(t,{onSessionStart:o,onStart:i,onMove:s,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:i}=this.getProps();i&&ge.update(()=>i(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||!ts(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=lR(s,this.constraints[t],this.elastic[t])),i.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},o=this.constraints;t&&Lr(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=uR(r.layoutBox,t):this.constraints=!1,this.elastic=pR(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&$t(i=>{this.getAxisMotionValue(i)&&(this.constraints[i]=fR(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Lr(t))return!1;const r=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=bR(r,o.root,this.visualElement.getTransformPagePoint());let s=cR(o.layout.layoutBox,i);if(n){const a=n(hR(s));this.hasMutatedConstraints=!!a,a&&(s=r1(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=$t(c=>{if(!ts(c,n,this.currentDirection))return;let d=l&&l[c]||{};s&&(d={min:0,max:0});const f=o?200:1e6,p=o?40:1e7,m={type:"inertia",velocity:r?t[c]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(pf(t,r,0,n))}stopAnimation(){$t(t=>this.getAxisMotionValue(t).stop())}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){$t(n=>{const{drag:r}=this.getProps();if(!ts(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]-be(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Lr(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};$t(s=>{const a=this.getAxisMotionValue(s);if(a){const l=a.get();o[s]=dR({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(),$t(s=>{if(!ts(s,t,null))return;const a=this.getAxisMotionValue(s),{min:l,max:u}=this.constraints[s];a.set(be(l,u,o[s]))})}addListeners(){if(!this.visualElement.current)return;xR.set(this.visualElement,this);const t=this.visualElement.current,n=Yt(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Lr(l)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),r();const s=Gt(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&($t(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.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=Tc,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:s,dragMomentum:a}}}function ts(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function SR(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class PR extends Dn{constructor(t){super(t),this.removeGroupControls=Ce,this.removeListeners=Ce,this.controls=new wR(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ce}unmount(){this.removeGroupControls(),this.removeListeners()}}const tm=e=>(t,n)=>{e&&ge.update(()=>e(t,n))};class CR extends Dn{constructor(){super(...arguments),this.removePointerDownListener=Ce}onPointerDown(t){this.session=new t1(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:tm(t),onStart:tm(n),onMove:r,onEnd:(i,s)=>{delete this.session,o&&ge.update(()=>o(i,s))}}}mount(){this.removePointerDownListener=Yt(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function ER(){const e=g.useContext(Ba);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=g.useId();return g.useEffect(()=>r(o),[]),!t&&n?[!1,()=>n&&n(o)]:[!0]}const Ps={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function nm(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Co={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(K.test(e))e=parseFloat(e);else return e;const n=nm(e,t.target.x),r=nm(e,t.target.y);return`${n}% ${r}%`}},kR={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=An.parse(e);if(o.length>5)return r;const i=An.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=be(a,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=u),typeof o[3+s]=="number"&&(o[3+s]/=u),i(o)}};class TR extends oe.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;Ak(RR),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()})),Ps.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()||ge.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!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 a1(e){const[t,n]=ER(),r=g.useContext(Jd);return oe.createElement(TR,{...e,layoutGroup:r,switchLayoutGroup:g.useContext(r0),isPresent:t,safeToRemove:n})}const RR={borderRadius:{...Co,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Co,borderTopRightRadius:Co,borderBottomLeftRadius:Co,borderBottomRightRadius:Co,boxShadow:kR},l1=["TopLeft","TopRight","BottomLeft","BottomRight"],NR=l1.length,rm=e=>typeof e=="string"?parseFloat(e):e,om=e=>typeof e=="number"||K.test(e);function $R(e,t,n,r,o,i){o?(e.opacity=be(0,n.opacity!==void 0?n.opacity:1,MR(r)),e.opacityExit=be(t.opacity!==void 0?t.opacity:1,0,LR(r))):i&&(e.opacity=be(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;srt?1:n(mi(e,t,r))}function sm(e,t){e.min=t.min,e.max=t.max}function ft(e,t){sm(e.x,t.x),sm(e.y,t.y)}function am(e,t,n,r,o){return e-=t,e=ha(e,1/n,r),o!==void 0&&(e=ha(e,1/o,r)),e}function AR(e,t=0,n=1,r=.5,o,i=e,s=e){if(_t.test(t)&&(t=parseFloat(t),t=be(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=be(i.min,i.max,r);e===i&&(a-=t),e.min=am(e.min,t,n,a,o),e.max=am(e.max,t,n,a,o)}function lm(e,t,[n,r,o],i,s){AR(e,t[n],t[r],t[o],t.scale,i,s)}const OR=["x","scaleX","originX"],jR=["y","scaleY","originY"];function um(e,t,n,r){lm(e.x,t,OR,n?n.x:void 0,r?r.x:void 0),lm(e.y,t,jR,n?n.y:void 0,r?r.y:void 0)}function cm(e){return e.translate===0&&e.scale===1}function c1(e){return cm(e.x)&&cm(e.y)}function _R(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function d1(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function dm(e){return ut(e.x)/ut(e.y)}class DR{constructor(){this.members=[]}add(t){hf(this.members,t),t.scheduleRender()}remove(t){if(mf(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 fm(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y;if((o||i)&&(r=`translate3d(${o}px, ${i}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:l,rotateX:u,rotateY:c}=n;l&&(r+=`rotate(${l}deg) `),u&&(r+=`rotateX(${u}deg) `),c&&(r+=`rotateY(${c}deg) `)}const s=e.x.scale*t.x,a=e.y.scale*t.y;return(s!==1||a!==1)&&(r+=`scale(${s}, ${a})`),r||"none"}const IR=(e,t)=>e.depth-t.depth;class FR{constructor(){this.children=[],this.isDirty=!1}add(t){hf(this.children,t),this.isDirty=!0}remove(t){mf(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(IR),this.isDirty=!1,this.children.forEach(t)}}function VR(e,t){const n=performance.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(nn(r),e(i-t))};return ge.read(r,!0),()=>nn(r)}function BR(e){window.MotionDebug&&window.MotionDebug.record(e)}function zR(e){return e instanceof SVGElement&&e.tagName!=="svg"}function UR(e,t,n){const r=rt(e)?e:Yr(e);return r.start(pf("",r,t,n)),r.animation}const pm=["","X","Y","Z"],hm=1e3;let WR=0;const zn={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function f1({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(s={},a=t==null?void 0:t()){this.id=WR++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{zn.totalNodes=zn.resolvedTargetDeltas=zn.recalculatedProjection=0,this.nodes.forEach(GR),this.nodes.forEach(JR),this.nodes.forEach(ZR),this.nodes.forEach(QR),BR(zn)},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,d&&d(),d=VR(f,250),Ps.hasAnimatedSinceResize&&(Ps.hasAnimatedSinceResize=!1,this.nodes.forEach(gm))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||c.getDefaultTransition()||oN,{onLayoutAnimationStart:P,onLayoutAnimationComplete:b}=c.getProps(),h=!this.targetLayout||!d1(this.targetLayout,m)||p,v=!f&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||v||f&&(h||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,v);const S={...q0(y,"layout"),onPlay:P,onComplete:b};(c.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else f||gm(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}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,nn(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(eN),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(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;cthis.update()))}clearAllSnapshots(){this.nodes.forEach(XR),this.sharedNodes.forEach(tN)}scheduleUpdateProjection(){ge.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){ge.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const E=S/1e3;vm(d.x,s.x,E),vm(d.y,s.y,E),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ho(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),nN(this.relativeTarget,this.relativeTargetOrigin,f,E),v&&_R(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=Re()),ft(v,this.relativeTarget)),y&&(this.animationValues=c,$R(c,u,this.latestValues,E,h,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},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&&(nn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ge.update(()=>{Ps.hasAnimatedSinceResize=!0,this.currentAnimation=UR(0,hm,{...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(hm),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&&p1(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Re();const d=ut(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;const f=ut(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+f}ft(a,l),jr(a,c),Wo(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new DR),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}resetRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const u={};for(let c=0;c{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(mm),this.root.sharedNodes.clear()}}}function HR(e){e.updateLayout()}function KR(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"?$t(d=>{const f=s?n.measuredBox[d]:n.layoutBox[d],p=ut(f);f.min=r[d].min,f.max=f.min+p}):p1(i,n.layoutBox,r)&&$t(d=>{const f=s?n.measuredBox[d]:n.layoutBox[d],p=ut(r[d]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const a=Or();Wo(a,r,n.layoutBox);const l=Or();s?Wo(l,e.applyTransform(o,!0),n.measuredBox):Wo(l,r,n.layoutBox);const u=!c1(a);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:p}=d;if(f&&p){const m=Re();Ho(m,n.layoutBox,f.layoutBox);const y=Re();Ho(y,r,p.layoutBox),d1(m,y)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=m,e.relativeParent=d)}}}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 GR(e){zn.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 QR(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function XR(e){e.clearSnapshot()}function mm(e){e.clearMeasurements()}function YR(e){e.isLayoutDirty=!1}function qR(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function gm(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function JR(e){e.resolveTargetDelta()}function ZR(e){e.calcProjection()}function eN(e){e.resetRotation()}function tN(e){e.removeLeadSnapshot()}function vm(e,t,n){e.translate=be(t.translate,0,n),e.scale=be(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ym(e,t,n,r){e.min=be(t.min,n.min,r),e.max=be(t.max,n.max,r)}function nN(e,t,n,r){ym(e.x,t.x,n.x,r),ym(e.y,t.y,n.y,r)}function rN(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const oN={duration:.45,ease:[.4,0,.1,1]},bm=e=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(e),xm=bm("applewebkit/")&&!bm("chrome/")?Math.round:Ce;function wm(e){e.min=xm(e.min),e.max=xm(e.max)}function iN(e){wm(e.x),wm(e.y)}function p1(e,t,n){return e==="position"||e==="preserve-aspect"&&!kc(dm(t),dm(n),.2)}const sN=f1({attachResizeListener:(e,t)=>Gt(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Xl={current:void 0},h1=f1({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Xl.current){const e=new sN({});e.mount(window),e.setOptions({layoutScroll:!0}),Xl.current=e}return Xl.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),aN={pan:{Feature:CR},drag:{Feature:PR,ProjectionNode:h1,MeasureLayout:a1}},lN=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function uN(e){const t=lN.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function $c(e,t,n=1){const[r,o]=uN(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);return i?i.trim():bc(o)?$c(o,t,n+1):o}function cN(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(o=>{const i=o.get();if(!bc(i))return;const s=$c(i,r);s&&o.set(s)});for(const o in t){const i=t[o];if(!bc(i))continue;const s=$c(i,r);s&&(t[o]=s,n||(n={}),n[o]===void 0&&(n[o]=i))}return{target:t,transitionEnd:n}}const dN=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),m1=e=>dN.has(e),fN=e=>Object.keys(e).some(m1),Sm=e=>e===ur||e===K,Pm=(e,t)=>parseFloat(e.split(", ")[t]),Cm=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/);if(o)return Pm(o[1],t);{const i=r.match(/^matrix\((.+)\)$/);return i?Pm(i[1],e):0}},pN=new Set(["x","y","z"]),hN=ki.filter(e=>!pN.has(e));function mN(e){const t=[];return hN.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const qr={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:Cm(4,13),y:Cm(5,14)};qr.translateX=qr.x;qr.translateY=qr.y;const gN=(e,t,n)=>{const r=t.measureViewportBox(),o=t.current,i=getComputedStyle(o),{display:s}=i,a={};s==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{a[u]=qr[u](r,i)}),t.render();const l=t.measureViewportBox();return n.forEach(u=>{const c=t.getValue(u);c&&c.jump(a[u]),e[u]=qr[u](l,i)}),e},vN=(e,t,n={},r={})=>{t={...t},r={...r};const o=Object.keys(t).filter(m1);let i=[],s=!1;const a=[];if(o.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let c=n[l],d=Po(c);const f=t[l];let p;if(ua(f)){const m=f.length,y=f[0]===null?1:0;c=f[y],d=Po(c);for(let P=y;P=0?window.pageYOffset:null,u=gN(t,e,a);return i.length&&i.forEach(([c,d])=>{e.getValue(c).set(d)}),e.render(),za&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function yN(e,t,n,r){return fN(t)?vN(e,t,n,r):{target:t,transitionEnd:r}}const bN=(e,t,n,r)=>{const o=cN(e,t,r);return t=o.target,r=o.transitionEnd,yN(e,t,n,r)},Mc={current:null},g1={current:!1};function xN(){if(g1.current=!0,!!za)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Mc.current=e.matches;e.addListener(t),t()}else Mc.current=!1}function wN(e,t,n){const{willChange:r}=t;for(const o in t){const i=t[o],s=n[o];if(rt(i))e.addValue(o,i),pa(r)&&r.add(o);else if(rt(s))e.addValue(o,Yr(i,{owner:e})),pa(r)&&r.remove(o);else if(s!==i)if(e.hasValue(o)){const a=e.getValue(o);!a.hasAnimated&&a.set(i)}else{const a=e.getStaticValue(o);e.addValue(o,Yr(a!==void 0?a:i,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const Em=new WeakMap,v1=Object.keys(hi),SN=v1.length,km=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],PN=qd.length;class CN{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,visualState:i},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>ge.render(this.render,!1,!0);const{latestValues:a,renderState:l}=i;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=s,this.isControllingVariants=Wa(n),this.isVariantNode=n0(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...c}=this.scrapeMotionValuesFromProps(n,{});for(const d in c){const f=c[d];a[d]!==void 0&&rt(f)&&(f.set(a[d],!1),pa(u)&&u.add(d))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,Em.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)),g1.current||xN(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Mc.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Em.delete(this.current),this.projection&&this.projection.unmount(),nn(this.notifyUpdate),nn(this.render),this.valueSubscriptions.forEach(t=>t()),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)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=lr.has(t),o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&ge.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{o(),i()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,o,i){let s,a;for(let l=0;lthis.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:i,layoutScroll:f,layoutRoot:p})}return a}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Re()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,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){n!==this.values.get(t)&&(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=Yr(n,{owner:this}),this.addValue(t,r)),r}readValue(t){var n;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,o=typeof r=="string"||typeof r=="object"?(n=af(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!rt(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 gf),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class y1 extends CN{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]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:o},i){let s=U2(r,t||{},this);if(o&&(n&&(n=o(n)),r&&(r=o(r)),s&&(s=o(s))),i){B2(this,r,s);const a=bN(this,r,s,n);n=a.transitionEnd,r=a.target}return{transition:t,transitionEnd:n,...r}}}function EN(e){return window.getComputedStyle(e)}class kN extends y1{readValueFromInstance(t,n){if(lr.has(n)){const r=ff(n);return r&&r.default||0}else{const r=EN(t),o=(s0(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return s1(t,n)}build(t,n,r,o){ef(t,n,r,o.transformTemplate)}scrapeMotionValuesFromProps(t,n){return sf(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;rt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,o){f0(t,n,r,o)}}class TN extends y1{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(lr.has(n)){const r=ff(n);return r&&r.default||0}return n=p0.has(n)?n:of(n),t.getAttribute(n)}measureInstanceViewportBox(){return Re()}scrapeMotionValuesFromProps(t,n){return m0(t,n)}build(t,n,r,o){nf(t,n,r,this.isSVGTag,o.transformTemplate)}renderInstance(t,n,r,o){h0(t,n,r,o)}mount(t){this.isSVGTag=rf(t.tagName),super.mount(t)}}const RN=(e,t)=>Zd(e)?new TN(t,{enableHardwareAcceleration:!1}):new kN(t,{enableHardwareAcceleration:!0}),NN={layout:{ProjectionNode:h1,MeasureLayout:a1}},$N={...rR,...ST,...aN,...NN},vf=Mk((e,t)=>sT(e,t,$N,RN));function b1(){const e=g.useRef(!1);return sa(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function MN(){const e=b1(),[t,n]=g.useState(0),r=g.useCallback(()=>{e.current&&n(t+1)},[t]);return[g.useCallback(()=>ge.postRender(r),[r]),t]}class LN extends g.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function AN({children:e,isPresent:t}){const n=g.useId(),r=g.useRef(null),o=g.useRef({width:0,height:0,top:0,left:0});return g.useInsertionEffect(()=>{const{width:i,height:s,top:a,left:l}=o.current;if(t||!r.current||!i||!s)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` [data-motion-pop-id="${n}"] { position: absolute !important; width: ${i}px !important; height: ${s}px !important; top: ${a}px !important; left: ${l}px !important; } `),()=>{document.head.removeChild(u)}},[t]),g.createElement(LN,{isPresent:t,childRef:r,sizeRef:o},g.cloneElement(e,{ref:r}))}const Yl=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:s})=>{const a=g0(ON),l=g.useId(),u=g.useMemo(()=>({id:l,initial:t,isPresent:n,custom:o,onExitComplete:c=>{a.set(c,!0);for(const d of a.values())if(!d)return;r&&r()},register:c=>(a.set(c,!1),()=>a.delete(c))}),i?void 0:[n]);return g.useMemo(()=>{a.forEach((c,d)=>a.set(d,!1))},[n]),g.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),s==="popLayout"&&(e=g.createElement(AN,{isPresent:n},e)),g.createElement(Ba.Provider,{value:u},e)};function ON(){return new Map}function jN(e){return g.useEffect(()=>()=>e(),[])}const vr=e=>e.key||"";function _N(e,t){e.forEach(n=>{const r=vr(n);t.set(r,n)})}function DN(e){const t=[];return g.Children.forEach(e,n=>{g.isValidElement(n)&&t.push(n)}),t}const x1=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:i=!0,mode:s="sync"})=>{const a=g.useContext(Jd).forceRender||MN()[0],l=b1(),u=DN(e);let c=u;const d=g.useRef(new Map).current,f=g.useRef(c),p=g.useRef(new Map).current,m=g.useRef(!0);if(sa(()=>{m.current=!1,_N(u,p),f.current=c}),jN(()=>{m.current=!0,p.clear(),d.clear()}),m.current)return g.createElement(g.Fragment,null,c.map(h=>g.createElement(Yl,{key:vr(h),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:i,mode:s},h)));c=[...c];const y=f.current.map(vr),P=u.map(vr),b=y.length;for(let h=0;h{if(P.indexOf(v)!==-1)return;const S=p.get(v);if(!S)return;const E=y.indexOf(v);let R=h;if(!R){const T=()=>{p.delete(v),d.delete(v);const x=f.current.findIndex(N=>N.key===v);if(f.current.splice(x,1),!d.size){if(f.current=u,l.current===!1)return;a(),r&&r()}};R=g.createElement(Yl,{key:vr(S),isPresent:!1,onExitComplete:T,custom:t,presenceAffectsLayout:i,mode:s},S),d.set(v,R)}c.splice(E,0,R)}),c=c.map(h=>{const v=h.key;return d.has(v)?h:g.createElement(Yl,{key:vr(h),isPresent:!0,presenceAffectsLayout:i,mode:s},h)}),g.createElement(g.Fragment,null,d.size?c:c.map(h=>g.cloneElement(h)))};var Tm={ease:[.36,.66,.4,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1],spring:[.155,1.105,.295,1.12],springOut:[.57,-.15,.62,.07],softSpring:[.16,1.11,.3,1.02]},IN=()=>C.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"80%",role:"presentation",viewBox:"0 0 24 24",width:"80%",children:[C.jsx("path",{d:"M12 2C9.38 2 7.25 4.13 7.25 6.75C7.25 9.32 9.26 11.4 11.88 11.49C11.96 11.48 12.04 11.48 12.1 11.49C12.12 11.49 12.13 11.49 12.15 11.49C12.16 11.49 12.16 11.49 12.17 11.49C14.73 11.4 16.74 9.32 16.75 6.75C16.75 4.13 14.62 2 12 2Z",fill:"currentColor"}),C.jsx("path",{d:"M17.0809 14.1489C14.2909 12.2889 9.74094 12.2889 6.93094 14.1489C5.66094 14.9989 4.96094 16.1489 4.96094 17.3789C4.96094 18.6089 5.66094 19.7489 6.92094 20.5889C8.32094 21.5289 10.1609 21.9989 12.0009 21.9989C13.8409 21.9989 15.6809 21.5289 17.0809 20.5889C18.3409 19.7389 19.0409 18.5989 19.0409 17.3589C19.0309 16.1289 18.3409 14.9889 17.0809 14.1489Z",fill:"currentColor"})]}),[bM,FN]=Fa({name:"AvatarGroupContext",strict:!1}),VN=globalThis!=null&&globalThis.document?g.useLayoutEffect:g.useEffect;function BN(e={}){const{loading:t,src:n,srcSet:r,onLoad:o,onError:i,crossOrigin:s,sizes:a,ignoreFallback:l}=e,[u,c]=g.useState("pending");g.useEffect(()=>{c(n?"loading":"pending")},[n]);const d=g.useRef(),f=g.useCallback(()=>{if(!n)return;p();const m=new Image;m.src=n,s&&(m.crossOrigin=s),r&&(m.srcset=r),a&&(m.sizes=a),t&&(m.loading=t),m.onload=y=>{p(),c("loaded"),o==null||o(y)},m.onerror=y=>{p(),c("failed"),i==null||i(y)},d.current=m},[n,s,r,a,o,i,t]),p=()=>{d.current&&(d.current.onload=null,d.current.onerror=null,d.current=null)};return VN(()=>{if(!l)return u==="loading"&&f(),()=>{p()}},[u,f,l]),l?"loaded":u}function zN(e={}){var t,n,r,o,i;const s=FN(),a=!!s,{as:l,ref:u,src:c,name:d,icon:f,classNames:p,fallback:m,alt:y=d||"avatar",imgRef:P,color:b=(t=s==null?void 0:s.color)!=null?t:"default",radius:h=(n=s==null?void 0:s.radius)!=null?n:"full",size:v=(r=s==null?void 0:s.size)!=null?r:"md",isBordered:S=(o=s==null?void 0:s.isBordered)!=null?o:!1,isDisabled:E=(i=s==null?void 0:s.isDisabled)!=null?i:!1,isFocusable:R=!1,getInitials:T=sk,ignoreFallback:x=!1,showFallback:N=!1,ImgComponent:F="img",imgProps:M,className:B,onError:A,...j}=e,U=l||"span",Y=He(u),ie=He(P),{isFocusVisible:O,isFocused:L,focusProps:I}=rr(),{isHovered:w,hoverProps:k}=Ei({isDisabled:E}),V=BN({src:c,onError:A,ignoreFallback:x})==="loaded",W=(!c||!V)&&N,H=g.useMemo(()=>{var ve;return ok({color:b,radius:h,size:v,isBordered:S,isDisabled:E,isInGroup:a,isInGridGroup:(ve=s==null?void 0:s.isGrid)!=null?ve:!1})},[b,h,v,S,E,a,s==null?void 0:s.isGrid]),Q=le(p==null?void 0:p.base,B),te=g.useMemo(()=>R||l==="button",[R,l]),q=g.useCallback((ve={})=>({ref:Y,tabIndex:te?0:-1,"data-hover":X(w),"data-focus":X(L),"data-focus-visible":X(O),className:H.base({class:le(Q,ve==null?void 0:ve.className)}),...we(j,k,te?I:{})}),[te,H,Q,I,j]),ae=g.useCallback((ve={})=>({ref:ie,src:c,"data-loaded":X(V),className:H.img({class:p==null?void 0:p.img}),...we(M,ve)}),[H,V,M,c,ie]);return{Component:U,ImgComponent:F,src:c,alt:y,icon:f,name:d,imgRef:ie,slots:H,classNames:p,fallback:m,isImgLoaded:V,showFallback:W,ignoreFallback:x,getInitials:T,getAvatarProps:q,getImageProps:ae}}var w1=Ie((e,t)=>{const{Component:n,ImgComponent:r,src:o,icon:i=C.jsx(IN,{}),alt:s,classNames:a,slots:l,name:u,showFallback:c,fallback:d,getInitials:f,getAvatarProps:p,getImageProps:m}=zN({...e,ref:t}),y=g.useMemo(()=>!c&&o?null:d?C.jsx("div",{"aria-label":s,className:l.fallback({class:a==null?void 0:a.fallback}),role:"img",children:d}):u?C.jsx("span",{"aria-label":s,className:l.name({class:a==null?void 0:a.name}),role:"img",children:f(u)}):C.jsx("span",{"aria-label":s,className:l.icon({class:a==null?void 0:a.icon}),role:"img",children:i}),[c,o,d,u,a]);return C.jsxs(n,{...p(),children:[o&&C.jsx(r,{...m(),alt:s}),y]})});w1.displayName="NextUI.Avatar";var yf=w1,[xM,UN]=Fa({name:"ButtonGroupContext",strict:!1});function bf(e,t){let{elementType:n="button",isDisabled:r,onPress:o,onPressStart:i,onPressEnd:s,onPressChange:a,preventFocusOnPress:l,allowFocusWhenDisabled:u,onClick:c,href:d,target:f,rel:p,type:m="button",allowTextSelectionOnPress:y}=e,P;n==="button"?P={type:m,disabled:r}:P={role:"button",tabIndex:r?void 0:0,href:n==="a"&&r?void 0:d,target:n==="a"?f:void 0,type:n==="input"?m:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?p:void 0};let{pressProps:b,isPressed:h}=Wd({onPressStart:i,onPressEnd:s,onPressChange:a,onPress:o,isDisabled:r,preventFocusOnPress:l,allowTextSelectionOnPress:y,ref:t}),{focusableProps:v}=Qd(e,t);u&&(v.tabIndex=r?-1:v.tabIndex);let S=we(v,b,zd(e,{labelable:!0}));return{isPressed:h,buttonProps:we(P,S,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],onClick:E=>{c&&c(E)}})}}var WN=(e,t,n)=>Math.min(Math.max(e,t),n),S1=({ripples:e=[],motionProps:t,color:n="currentColor",style:r})=>C.jsx(C.Fragment,{children:e.map(o=>{const i=WN(.01*o.size,.2,o.size>100?.75:.5);return C.jsx(x1,{mode:"popLayout",children:C.jsx(vf.span,{animate:{transform:"scale(2)",opacity:0},className:"nextui-ripple",exit:{opacity:0},initial:{transform:"scale(0)",opacity:.35},style:{position:"absolute",backgroundColor:n,borderRadius:"100%",transformOrigin:"center",pointerEvents:"none",zIndex:10,top:o.y,left:o.x,width:`${o.size}px`,height:`${o.size}px`,...r},transition:{duration:i},...t})},o.key)})});S1.displayName="NextUI.Ripple";var P1=S1;function C1(e={}){const{removeAfter:t=1e3,...n}=e,[r,o]=g.useState([]);g.useEffect(()=>{const s=r.map((a,l)=>setTimeout(()=>{o(u=>u.filter((c,d)=>d!==l))},t));return()=>{s.forEach(a=>clearTimeout(a))}},[r]);const i=g.useCallback(s=>{const a=s.currentTarget,l=Math.max(a.clientWidth,a.clientHeight),u=a.getBoundingClientRect();o(c=>[...c,{key:new Date().getTime(),size:l,x:s.clientX-u.x-l/2,y:s.clientY-u.y-l/2}])},[]);return{ripples:r,onClick:i,...n}}function HN(e){var t,n,r,o,i,s,a,l;const u=UN(),c=!!u,{ref:d,as:f,children:p,startContent:m,endContent:y,autoFocus:P,className:b,spinner:h,fullWidth:v=(t=u==null?void 0:u.fullWidth)!=null?t:!1,size:S=(n=u==null?void 0:u.size)!=null?n:"md",color:E=(r=u==null?void 0:u.color)!=null?r:"default",variant:R=(o=u==null?void 0:u.variant)!=null?o:"solid",disableAnimation:T=(i=u==null?void 0:u.disableAnimation)!=null?i:!1,radius:x=u==null?void 0:u.radius,disableRipple:N=(s=u==null?void 0:u.disableRipple)!=null?s:!1,isDisabled:F=(a=u==null?void 0:u.isDisabled)!=null?a:!1,isIconOnly:M=(l=u==null?void 0:u.isIconOnly)!=null?l:!1,isLoading:B=!1,spinnerPlacement:A="start",onPress:j,onClick:U,...Y}=e,ie=f||"button",O=typeof ie=="string",L=He(d),{isFocusVisible:I,isFocused:w,focusProps:k}=rr({autoFocus:P}),_=F||B,V=g.useMemo(()=>ik({size:S,color:E,variant:R,radius:x,fullWidth:v,isDisabled:_,isInGroup:c,disableAnimation:T,isIconOnly:M,className:b}),[S,E,R,x,v,_,c,M,T,b]),{onClick:W,ripples:H}=C1(),Q=g.useCallback(Vt=>{N||_||T||L.current&&W(Vt)},[N,_,T,L,W]),{buttonProps:te,isPressed:q}=bf({elementType:f,isDisabled:_,onPress:j,onClick:Ci(U,Q),...Y},L),{isHovered:ae,hoverProps:ve}=Ei({isDisabled:_}),Ft=g.useCallback((Vt={})=>({"data-disabled":X(_),"data-focus":X(w),"data-pressed":X(q),"data-focus-visible":X(I),"data-hover":X(ae),"data-loading":X(B),...we(te,k,ve,fi(Y,{enabled:O}),fi(Vt))}),[B,_,w,q,O,I,ae,te,k,ve,Y]),ue=Vt=>g.isValidElement(Vt)?g.cloneElement(Vt,{"aria-hidden":!0,focusable:!1,tabIndex:-1}):null,qa=ue(m),Ja=ue(y),Za=g.useMemo(()=>({sm:"sm",md:"sm",lg:"md"})[S],[S]);return{Component:ie,children:p,domRef:L,ripples:H,spinner:h,styles:V,startContent:qa,endContent:Ja,isLoading:B,spinnerPlacement:A,spinnerSize:Za,disableRipple:N,getButtonProps:Ft}}function KN(e){const[t,n]=ao(e,yh.variantKeys),{children:r,className:o,classNames:i,label:s,...a}=t,l=g.useMemo(()=>yh({...n}),[...Object.values(n)]),u=le(i==null?void 0:i.base,o),c=s||r,d=g.useMemo(()=>c&&typeof c=="string"?c:a["aria-label"]?"":"Loading",[r,c,a["aria-label"]]),f=g.useCallback(()=>({"aria-label":d,className:l.base({class:u}),...a}),[d,l,u,a]);return{label:c,slots:l,classNames:i,getSpinnerProps:f}}var E1=Ie((e,t)=>{const{slots:n,classNames:r,label:o,getSpinnerProps:i}=KN({...e});return C.jsxs("div",{ref:t,...i(),children:[C.jsxs("div",{className:n.wrapper({class:r==null?void 0:r.wrapper}),children:[C.jsx("i",{className:n.circle1({class:r==null?void 0:r.circle1})}),C.jsx("i",{className:n.circle2({class:r==null?void 0:r.circle2})})]}),o&&C.jsx("span",{className:n.label(),children:o})]})});E1.displayName="NextUI.Spinner";var GN=E1,k1=Ie((e,t)=>{const{Component:n,domRef:r,children:o,styles:i,ripples:s,spinnerSize:a,spinner:l=C.jsx(GN,{color:"current",size:a}),spinnerPlacement:u,startContent:c,endContent:d,isLoading:f,disableRipple:p,getButtonProps:m}=HN({...e,ref:t});return C.jsxs(n,{ref:r,className:i,...m(),children:[c,f&&u==="start"&&l,o,f&&u==="end"&&l,d,!p&&C.jsx(P1,{ripples:s})]})});k1.displayName="NextUI.Button";var Rm=k1,[QN,xf]=Fa({name:"CardContext",strict:!0,errorMessage:"useCardContext: `context` is undefined. Seems you forgot to wrap component within "}),T1=Ie((e,t)=>{var n;const{as:r,className:o,children:i,...s}=e,a=r||"div",l=He(t),{slots:u,classNames:c}=xf(),d=le(c==null?void 0:c.body,o);return C.jsx(a,{ref:l,className:(n=u.body)==null?void 0:n.call(u,{class:d}),...s,children:i})});T1.displayName="NextUI.CardBody";var Qa=T1,R1=Ie((e,t)=>{var n;const{as:r,className:o,children:i,...s}=e,a=r||"div",l=He(t),{slots:u,classNames:c}=xf(),d=le(c==null?void 0:c.body,o);return C.jsx(a,{ref:l,className:(n=u.footer)==null?void 0:n.call(u,{class:d}),...s,children:i})});R1.displayName="NextUI.CardFooter";var XN=R1,N1=Ie((e,t)=>{var n;const{as:r,className:o,children:i,...s}=e,a=r||"div",l=He(t),{slots:u,classNames:c}=xf(),d=le(c==null?void 0:c.header,o);return C.jsx(a,{ref:l,className:(n=u.header)==null?void 0:n.call(u,{class:d}),...s,children:i})});N1.displayName="NextUI.CardHeader";var wf=N1;function YN(e){const[t,n]=ao(e,Sh.variantKeys),{ref:r,as:o,children:i,disableRipple:s=!1,onClick:a,onPress:l,autoFocus:u,className:c,classNames:d,allowTextSelectionOnPress:f=!0,...p}=t,m=He(r),y=o||(e.isPressable?"button":"div"),P=typeof y=="string",b=le(d==null?void 0:d.base,c),{onClick:h,ripples:v}=C1(),S=U=>{!e.disableAnimation&&!s&&m.current&&h(U)},{buttonProps:E,isPressed:R}=bf({onPress:l,elementType:o,isDisabled:!e.isPressable,onClick:Ci(a,S),allowTextSelectionOnPress:f,...p},m),{hoverProps:T,isHovered:x}=Ei({isDisabled:!e.isHoverable,...p}),{isFocusVisible:N,isFocused:F,focusProps:M}=rr({autoFocus:u}),B=g.useMemo(()=>Sh({...n}),[...Object.values(n)]),A=g.useMemo(()=>({isDisabled:e.isDisabled,isFooterBlurred:e.isFooterBlurred,disableAnimation:e.disableAnimation,fullWidth:e.fullWidth,slots:B,classNames:d}),[B,d,e.isDisabled,e.isFooterBlurred,e.disableAnimation,e.fullWidth]),j=g.useCallback((U={})=>({ref:m,className:B.base({class:b}),tabIndex:e.isPressable?0:-1,"data-hover":X(x),"data-pressed":X(R),"data-focus":X(F),"data-focus-visible":X(N),"data-disabled":X(e.isDisabled),...we(e.isPressable?{...E,...M,role:"button"}:{},e.isHoverable?T:{},fi(p,{enabled:P}),fi(U))}),[m,B,b,P,e.isPressable,e.isHoverable,e.isDisabled,x,R,N,E,M,T,p]);return{context:A,domRef:m,Component:y,classNames:d,children:i,ripples:v,isHovered:x,isPressed:R,isPressable:e.isPressable,isHoverable:e.isHoverable,disableAnimation:e.disableAnimation,disableRipple:s,handleClick:S,isFocusVisible:N,getCardProps:j}}var $1=Ie((e,t)=>{const{children:n,context:r,Component:o,ripples:i,isPressable:s,disableAnimation:a,disableRipple:l,getCardProps:u}=YN({...e,ref:t});return C.jsxs(o,{...u(),children:[C.jsx(QN,{value:r,children:n}),s&&!a&&!l&&C.jsx(P1,{ripples:i})]})});$1.displayName="NextUI.Card";var $i=$1;function qN(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":o,labelElementType:i="label"}=e;t=ea(t);let s=ea(),a={};n?(r=r?`${s} ${r}`:s,a={id:s,htmlFor:i==="label"?t:void 0}):!r&&!o&&console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let l=yC({id:t,"aria-label":o,"aria-labelledby":r});return{labelProps:a,fieldProps:l}}function JN(e){let{description:t,errorMessage:n,validationState:r}=e,{labelProps:o,fieldProps:i}=qN(e),s=Zp([!!t,!!n,r]),a=Zp([!!t,!!n,r]);return i=we(i,{"aria-describedby":[s,a,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:o,fieldProps:i,descriptionProps:{id:s},errorMessageProps:{id:a}}}function ZN(e={}){let{isReadOnly:t}=e,[n,r]=Bd(e.isSelected,e.defaultSelected||!1,e.onChange);function o(s){t||r(s)}function i(){t||r(!n)}return{isSelected:n,setSelected:o,toggle:i}}function e$(e,t){let{elementType:n="a",onPress:r,onPressStart:o,onPressEnd:i,onClick:s,isDisabled:a,...l}=e,u={};n!=="a"&&(u={role:"link",tabIndex:a?void 0:0});let{focusableProps:c}=Qd(e,t),{pressProps:d,isPressed:f}=Wd({onPress:r,onPressStart:o,onPressEnd:i,isDisabled:a,ref:t}),p=zd(l,{labelable:!0}),m=we(c,d);return{isPressed:f,linkProps:we(p,{...m,...u,"aria-disabled":a||void 0,"aria-current":e["aria-current"],onClick:y=>{var P;(P=d.onClick)===null||P===void 0||P.call(d,y),s&&(s(y),console.warn("onClick is deprecated, please use onPress"))}})}}function t$(e){var t,n;const[r,o]=ao(e,xh.variantKeys),{ref:i,as:s,children:a,anchorIcon:l,isExternal:u=!1,showAnchorIcon:c=!1,autoFocus:d=!1,className:f,onPress:p,onPressStart:m,onPressEnd:y,onClick:P,...b}=r,h=s||"a",v=He(i),{linkProps:S}=e$({...b,onPress:p,onPressStart:m,onPressEnd:y,onClick:P,isDisabled:e.isDisabled,elementType:`${s}`},v),{isFocused:E,isFocusVisible:R,focusProps:T}=rr({autoFocus:d});u&&(b.rel=(t=b.rel)!=null?t:"noopener noreferrer",b.target=(n=b.target)!=null?n:"_blank");const x=g.useMemo(()=>xh({...o,className:f}),[...Object.values(o),f]),N=g.useCallback(()=>({ref:v,className:x,"data-focus":X(E),"data-disabled":X(e.isDisabled),"data-focus-visible":X(R),...we(T,S,b)}),[x,E,R,T,S,b]);return{Component:h,children:a,anchorIcon:l,showAnchorIcon:c,getLinkProps:N}}var M1=Ie((e,t)=>{const{Component:n,children:r,showAnchorIcon:o,anchorIcon:i=C.jsx(wk,{className:rk}),getLinkProps:s}=t$({ref:t,...e});return C.jsx(n,{...s(),children:C.jsxs(C.Fragment,{children:[r,o&&i]})})});M1.displayName="NextUI.Link";var gi=M1;function n$(e,t){let{inputElementType:n="input",isDisabled:r=!1,isRequired:o=!1,isReadOnly:i=!1,validationState:s,type:a="text",onChange:l=()=>{}}=e,{focusableProps:u}=Qd(e,t),{labelProps:c,fieldProps:d,descriptionProps:f,errorMessageProps:p}=JN(e),m=zd(e,{labelable:!0});const y={type:a,pattern:e.pattern};return{labelProps:c,inputProps:we(m,n==="input"&&y,{disabled:r,readOnly:i,"aria-required":o||void 0,"aria-invalid":s==="invalid"||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],value:e.value,defaultValue:e.value?void 0:e.defaultValue,onChange:P=>l(P.target.value),autoComplete:e.autoComplete,maxLength:e.maxLength,minLength:e.minLength,name:e.name,placeholder:e.placeholder,inputMode:e.inputMode,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...u,...d}),descriptionProps:f,errorMessageProps:p}}function r$(e){var t,n;const[r,o]=ao(e,bh.variantKeys),{ref:i,as:s,label:a,description:l,errorMessage:u,className:c,classNames:d,autoFocus:f,startContent:p,endContent:m,onClear:y,onChange:P,onValueChange:b=()=>{},...h}=r,v=g.useCallback(J=>{b(J??"")},[b]),[S,E]=Bd((t=r.value)!=null?t:void 0,(n=r.defaultValue)!=null?n:void 0,v),R=s||"div",T=le(d==null?void 0:d.base,c,S?"is-filled":""),x=e.isMultiline,N=He(i),F=g.useCallback(()=>{E(""),N.current&&(N.current.value="",N.current.focus()),y==null||y()},[N,E,y]),{labelProps:M,inputProps:B,descriptionProps:A,errorMessageProps:j}=n$({...e,"aria-label":ak(e==null?void 0:e["aria-label"],e==null?void 0:e.label,e==null?void 0:e.placeholder),inputElementType:x?"textarea":"input",value:S,onChange:E},N),{isFocusVisible:U,isFocused:Y,focusProps:ie}=rr({autoFocus:f,isTextInput:!0}),{isHovered:O,hoverProps:L}=Ei({isDisabled:!!(e!=null&&e.isDisabled)}),{focusProps:I,isFocusVisible:w}=rr(),{pressProps:k}=Wd({isDisabled:!!(e!=null&&e.isDisabled),onPress:F}),_=r.validationState==="invalid",V=g.useMemo(()=>{var J;return(!e.labelPlacement||e.labelPlacement==="inside")&&!a?"outside":(J=e.labelPlacement)!=null?J:"inside"},[e.labelPlacement,a]),W=!r.placeholder&&V!=="outside-left"&&!x,H=!!y||e.isClearable,Q=!!a||!!l||!!u,te=!!r.placeholder,q=!!l||!!u,ae=V==="outside"||V==="outside-left",ve=V==="inside",Ft=!!p,ue=g.useMemo(()=>bh({...o,isInvalid:_,isClearable:H,labelPlacement:V,isLabelPlaceholder:W&&!Ft}),[...Object.values(o),_,V,H,W,Ft]),qa=g.useCallback((J={})=>({className:ue.base({class:T}),"data-focus-visible":X(U),"data-readonly":X(e.isReadOnly),"data-focus":X(Y),"data-hover":X(O),"data-required":X(e.isRequired),"data-invalid":X(_),"data-disabled":X(e.isDisabled),"data-has-elements":X(Q),"data-has-helper":X(q),...J}),[ue,T,Y,O,_,q,Q,U,e.isReadOnly,e.isRequired,e.isDisabled]),Ja=g.useCallback((J={})=>({className:ue.label({class:d==null?void 0:d.label}),...M,...J}),[ue,M,d==null?void 0:d.label]),Za=g.useCallback((J={})=>({ref:N,className:ue.input({class:le(d==null?void 0:d.input,S?"is-filled":"")}),...we(ie,B,fi(h),J),required:e.isRequired,"aria-readonly":X(e.isReadOnly),"aria-required":X(e.isRequired),onChange:Ci(B.onChange,P)}),[ue,S,ie,B,h,d==null?void 0:d.input,e.isReadOnly,e.isRequired,P]),Vt=g.useCallback((J={})=>({"data-hover":X(O),className:ue.inputWrapper({class:le(d==null?void 0:d.inputWrapper,S?"is-filled":"")}),onClick:Pf=>{var Cf;Pf.target===Pf.currentTarget&&((Cf=N.current)==null||Cf.focus())},...we(J,L),style:{cursor:"text",...J.style}}),[ue,O,S,d==null?void 0:d.inputWrapper]),J1=g.useCallback((J={})=>({...J,className:ue.innerWrapper({class:le(d==null?void 0:d.innerWrapper,J==null?void 0:J.className)})}),[ue,d==null?void 0:d.innerWrapper]),Z1=g.useCallback((J={})=>({...J,className:ue.mainWrapper({class:le(d==null?void 0:d.mainWrapper,J==null?void 0:J.className)})}),[ue,d==null?void 0:d.mainWrapper]),eb=g.useCallback((J={})=>({...J,className:ue.helperWrapper({class:le(d==null?void 0:d.helperWrapper,J==null?void 0:J.className)})}),[ue,d==null?void 0:d.helperWrapper]),tb=g.useCallback((J={})=>({...J,...A,className:ue.description({class:le(d==null?void 0:d.description,J==null?void 0:J.className)})}),[ue,d==null?void 0:d.description]),nb=g.useCallback((J={})=>({...J,...j,className:ue.errorMessage({class:le(d==null?void 0:d.errorMessage,J==null?void 0:J.className)})}),[ue,j,d==null?void 0:d.errorMessage]),rb=g.useCallback((J={})=>({...J,role:"button",tabIndex:0,"data-focus-visible":X(w),className:ue.clearButton({class:le(d==null?void 0:d.clearButton,J==null?void 0:J.className)}),...we(k,I)}),[ue,w,k,I,d==null?void 0:d.clearButton]);return{Component:R,classNames:d,domRef:N,label:a,description:l,startContent:p,endContent:m,labelPlacement:V,isClearable:H,isInvalid:_,hasHelper:q,shouldLabelBeOutside:ae,shouldLabelBeInside:ve,hasPlaceholder:te,errorMessage:u,getBaseProps:qa,getLabelProps:Ja,getInputProps:Za,getMainWrapperProps:Z1,getInputWrapperProps:Vt,getInnerWrapperProps:J1,getHelperWrapperProps:eb,getDescriptionProps:tb,getErrorMessageProps:nb,getClearButtonProps:rb}}var L1=Ie((e,t)=>{const{Component:n,label:r,description:o,isClearable:i,startContent:s,endContent:a,labelPlacement:l,hasPlaceholder:u,hasHelper:c,shouldLabelBeOutside:d,shouldLabelBeInside:f,errorMessage:p,getBaseProps:m,getLabelProps:y,getInputProps:P,getInnerWrapperProps:b,getInputWrapperProps:h,getMainWrapperProps:v,getHelperWrapperProps:S,getDescriptionProps:E,getErrorMessageProps:R,getClearButtonProps:T}=r$({...e,ref:t}),x=r?C.jsx("label",{...y(),children:r}):null,N=g.useMemo(()=>i?C.jsx("span",{...T(),children:a||C.jsx(Sk,{})}):a,[i,T]),F=g.useMemo(()=>c?C.jsx("div",{...S(),children:p?C.jsx("div",{...R(),children:p}):o?C.jsx("div",{...E(),children:o}):null}):null,[c,p,o,S,R,E]),M=g.useMemo(()=>s||N?C.jsxs("div",{...b(),children:[s,C.jsx("input",{...P()}),N]}):C.jsx("input",{...P()}),[s,N,P,b]),B=g.useMemo(()=>d?C.jsxs("div",{...v(),children:[C.jsxs("div",{...h(),children:[l==="outside"&&!u?x:null,M]}),F]}):C.jsxs(C.Fragment,{children:[C.jsxs("div",{...h(),children:[x,M]}),F]}),[l,F,d,f,u,x,M,p,o,v,h,R,E]);return C.jsxs(n,{...m(),children:[d&&(l==="outside-left"||u)?x:null,B]})});L1.displayName="NextUI.Input";var o$=L1,Cs="right-scroll-bar-position",Es="width-before-scroll-bar",i$="with-scroll-bars-hidden",s$="--removed-body-scroll-bar-size";function a$(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function l$(e,t){var n=g.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}function u$(e,t){return l$(t||null,function(n){return e.forEach(function(r){return a$(r,n)})})}function c$(e){return e}function d$(e,t){t===void 0&&(t=c$);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var s=t(i,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(i),s=n}var l=function(){var c=s;s=[],c.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(c){s.push(c),u()},filter:function(c){return s=s.filter(c),n}}}};return o}function f$(e){e===void 0&&(e={});var t=d$(null);return t.options=Lt({async:!0,ssr:!1},e),t}var A1=function(e){var t=e.sideCar,n=My(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return g.createElement(r,Lt({},n))};A1.isSideCarExport=!0;function p$(e,t){return e.useMedium(t),A1}var O1=f$(),ql=function(){},Xa=g.forwardRef(function(e,t){var n=g.useRef(null),r=g.useState({onScrollCapture:ql,onWheelCapture:ql,onTouchMoveCapture:ql}),o=r[0],i=r[1],s=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,p=e.noIsolation,m=e.inert,y=e.allowPinchZoom,P=e.as,b=P===void 0?"div":P,h=e.gapMode,v=My(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=f,E=u$([n,t]),R=Lt(Lt({},v),o);return g.createElement(g.Fragment,null,c&&g.createElement(S,{sideCar:O1,removeScrollBar:u,shards:d,noIsolation:p,inert:m,setCallbacks:i,allowPinchZoom:!!y,lockRef:n,gapMode:h}),s?g.cloneElement(g.Children.only(a),Lt(Lt({},R),{ref:E})):g.createElement(b,Lt({},R,{className:l,ref:E}),a))});Xa.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Xa.classNames={fullWidth:Es,zeroRight:Cs};var Nm,h$=function(){if(Nm)return Nm;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function m$(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=h$();return t&&e.setAttribute("nonce",t),e}function g$(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function v$(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var y$=function(){var e=0,t=null;return{add:function(n){e==0&&(t=m$())&&(g$(t,n),v$(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},b$=function(){var e=y$();return function(t,n){g.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},j1=function(){var e=b$(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},x$={left:0,top:0,right:0,gap:0},Jl=function(e){return parseInt(e||"",10)||0},w$=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Jl(n),Jl(r),Jl(o)]},S$=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return x$;var t=w$(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])}},P$=j1(),C$=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(i$,` { overflow: hidden `).concat(r,`; padding-right: `).concat(a,"px ").concat(r,`; } body { overflow: hidden `).concat(r,`; overscroll-behavior: contain; `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` padding-left: `.concat(o,`px; padding-top: `).concat(i,`px; padding-right: `).concat(s,`px; margin-left:0; margin-top:0; margin-right: `).concat(a,"px ").concat(r,`; `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),` } .`).concat(Cs,` { right: `).concat(a,"px ").concat(r,`; } .`).concat(Es,` { margin-right: `).concat(a,"px ").concat(r,`; } .`).concat(Cs," .").concat(Cs,` { right: 0 `).concat(r,`; } .`).concat(Es," .").concat(Es,` { margin-right: 0 `).concat(r,`; } body { `).concat(s$,": ").concat(a,`px; } `)},E$=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,i=g.useMemo(function(){return S$(o)},[o]);return g.createElement(P$,{styles:C$(i,!t,o,n?"":"!important")})},Lc=!1;if(typeof window<"u")try{var ns=Object.defineProperty({},"passive",{get:function(){return Lc=!0,!0}});window.addEventListener("test",ns,ns),window.removeEventListener("test",ns,ns)}catch{Lc=!1}var pr=Lc?{passive:!1}:!1,k$=function(e){return e.tagName==="TEXTAREA"},_1=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!k$(e)&&n[t]==="visible")},T$=function(e){return _1(e,"overflowY")},R$=function(e){return _1(e,"overflowX")},$m=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=D1(e,r);if(o){var i=I1(e,r),s=i[1],a=i[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},N$=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},$$=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},D1=function(e,t){return e==="v"?T$(t):R$(t)},I1=function(e,t){return e==="v"?N$(t):$$(t)},M$=function(e,t){return e==="h"&&t==="rtl"?-1:1},L$=function(e,t,n,r,o){var i=M$(e,window.getComputedStyle(t).direction),s=i*r,a=n.target,l=t.contains(a),u=!1,c=s>0,d=0,f=0;do{var p=I1(e,a),m=p[0],y=p[1],P=p[2],b=y-P-i*m;(m||b)&&D1(e,a)&&(d+=b,f+=m),a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(c&&(o&&d===0||!o&&s>d)||!c&&(o&&f===0||!o&&-s>f))&&(u=!0),u},rs=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Mm=function(e){return[e.deltaX,e.deltaY]},Lm=function(e){return e&&"current"in e?e.current:e},A$=function(e,t){return e[0]===t[0]&&e[1]===t[1]},O$=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} `)},j$=0,hr=[];function _$(e){var t=g.useRef([]),n=g.useRef([0,0]),r=g.useRef(),o=g.useState(j$++)[0],i=g.useState(j1)[0],s=g.useRef(e);g.useEffect(function(){s.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var y=MC([e.lockRef.current],(e.shards||[]).map(Lm),!0).filter(Boolean);return y.forEach(function(P){return P.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),y.forEach(function(P){return P.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=g.useCallback(function(y,P){if("touches"in y&&y.touches.length===2)return!s.current.allowPinchZoom;var b=rs(y),h=n.current,v="deltaX"in y?y.deltaX:h[0]-b[0],S="deltaY"in y?y.deltaY:h[1]-b[1],E,R=y.target,T=Math.abs(v)>Math.abs(S)?"h":"v";if("touches"in y&&T==="h"&&R.type==="range")return!1;var x=$m(T,R);if(!x)return!0;if(x?E=T:(E=T==="v"?"h":"v",x=$m(T,R)),!x)return!1;if(!r.current&&"changedTouches"in y&&(v||S)&&(r.current=E),!E)return!0;var N=r.current||E;return L$(N,P,y,N==="h"?v:S,!0)},[]),l=g.useCallback(function(y){var P=y;if(!(!hr.length||hr[hr.length-1]!==i)){var b="deltaY"in P?Mm(P):rs(P),h=t.current.filter(function(E){return E.name===P.type&&E.target===P.target&&A$(E.delta,b)})[0];if(h&&h.should){P.cancelable&&P.preventDefault();return}if(!h){var v=(s.current.shards||[]).map(Lm).filter(Boolean).filter(function(E){return E.contains(P.target)}),S=v.length>0?a(P,v[0]):!s.current.noIsolation;S&&P.cancelable&&P.preventDefault()}}},[]),u=g.useCallback(function(y,P,b,h){var v={name:y,delta:P,target:b,should:h};t.current.push(v),setTimeout(function(){t.current=t.current.filter(function(S){return S!==v})},1)},[]),c=g.useCallback(function(y){n.current=rs(y),r.current=void 0},[]),d=g.useCallback(function(y){u(y.type,Mm(y),y.target,a(y,e.lockRef.current))},[]),f=g.useCallback(function(y){u(y.type,rs(y),y.target,a(y,e.lockRef.current))},[]);g.useEffect(function(){return hr.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,pr),document.addEventListener("touchmove",l,pr),document.addEventListener("touchstart",c,pr),function(){hr=hr.filter(function(y){return y!==i}),document.removeEventListener("wheel",l,pr),document.removeEventListener("touchmove",l,pr),document.removeEventListener("touchstart",c,pr)}},[]);var p=e.removeScrollBar,m=e.inert;return g.createElement(g.Fragment,null,m?g.createElement(i,{styles:O$(o)}):null,p?g.createElement(E$,{gapMode:e.gapMode}):null)}const D$=p$(O1,_$);var F1=g.forwardRef(function(e,t){return g.createElement(Xa,Lt({},e,{ref:t,sideCar:D$}))});F1.classNames=Xa.classNames;const I$=F1;var[F$,uo]=Fa({name:"NavbarContext",strict:!0,errorMessage:"useNavbarContext: `context` is undefined. Seems you forgot to wrap component within "}),V$={enter:{height:"calc(100vh - var(--navbar-height) - 1px)",transition:{duration:.3,easings:"easeOut"}},exit:{height:0,transition:{duration:.25,easings:"easeIn"}}},V1=Ie((e,t)=>{var n,r;const{className:o,children:i,portalContainer:s,motionProps:a,style:l,...u}=e,c=He(t),{slots:d,isMenuOpen:f,height:p,disableAnimation:m,classNames:y}=uo(),P=le(y==null?void 0:y.menu,o),b=g.useCallback(({children:v})=>C.jsx(I$,{forwardProps:!0,enabled:f,removeScrollBar:!1,children:v}),[f]),h=m?C.jsx(b,{children:C.jsx("ul",{ref:c,className:(n=d.menu)==null?void 0:n.call(d,{class:P}),"data-open":X(f),style:{"--navbar-height":p},...u,children:i})}):C.jsx(x1,{children:f?C.jsx(b,{children:C.jsx(vf.ul,{ref:c,layoutScroll:!0,animate:"enter",className:(r=d.menu)==null?void 0:r.call(d,{class:P}),"data-open":X(f),exit:"exit",initial:"exit",style:{"--navbar-height":p,...l},variants:V$,...we(a,u),children:i})}):null});return C.jsx(fE,{portalContainer:s,children:h})});V1.displayName="NextUI.NavbarMenu";var B1=V1,B$={visible:{y:0,transition:{ease:Tm.easeOut}},hidden:{y:"-100%",transition:{ease:Tm.easeIn}}},z$=typeof window<"u";function Am(e){return z$?e?{x:e.scrollLeft,y:e.scrollTop}:{x:window.scrollX,y:window.scrollY}:{x:0,y:0}}var U$=e=>{const{elementRef:t,delay:n=30,callback:r,isEnabled:o}=e,i=g.useRef(o?Am(t==null?void 0:t.current):{x:0,y:0});let s=null;const a=()=>{const l=Am(t==null?void 0:t.current);typeof r=="function"&&r({prevPos:i.current,currPos:l}),i.current=l,s=null};return g.useEffect(()=>{if(!o)return;const l=()=>{n?s===null&&(s=setTimeout(a,n)):a()},u=(t==null?void 0:t.current)||window;return u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)},[t==null?void 0:t.current,n,o]),i.current};function W$(e){var t;const[n,r]=ao(e,wh.variantKeys),{ref:o,as:i,parentRef:s,height:a="4rem",shouldHideOnScroll:l=!1,disableScrollHandler:u=!1,onScrollPositionChange:c,isMenuOpen:d,isMenuDefaultOpen:f,onMenuOpenChange:p=()=>{},motionProps:m,className:y,classNames:P,...b}=n,h=i||"nav",v=He(o),S=g.useRef(0),E=g.useRef(0),[R,T]=g.useState(!1),[x,N]=Bd(d,f,p),F=()=>{if(v.current){const U=v.current.offsetWidth;U!==S.current&&(S.current=U)}};xC({ref:v,onResize:()=>{var U;((U=v.current)==null?void 0:U.offsetWidth)!==S.current&&(F(),N(!1))}}),g.useEffect(()=>{var U;F(),E.current=((U=v.current)==null?void 0:U.offsetHeight)||0},[]);const M=g.useMemo(()=>wh({...r,hideOnScroll:l}),[...Object.values(r),l]),B=le(P==null?void 0:P.base,y);U$({elementRef:s,isEnabled:l||!u,callback:({prevPos:U,currPos:Y})=>{c==null||c(Y.y),l&&T(ie=>{const O=Y.y>U.y&&Y.y>E.current;return O!==ie?O:ie})}});const A=(U={})=>({...we(b,U),"data-hidden":X(R),"data-menu-open":X(x),ref:v,className:M.base({class:le(B,U==null?void 0:U.className)}),style:{"--navbar-height":a,...U==null?void 0:U.style}}),j=(U={})=>({...U,"data-menu-open":X(x),className:M.wrapper({class:le(P==null?void 0:P.wrapper,U==null?void 0:U.className)})});return{Component:h,slots:M,domRef:v,height:a,isHidden:R,disableAnimation:(t=e.disableAnimation)!=null?t:!1,shouldHideOnScroll:l,isMenuOpen:x,classNames:P,setIsMenuOpen:N,motionProps:m,getBaseProps:A,getWrapperProps:j}}var z1=Ie((e,t)=>{const{children:n,...r}=e,o=W$({...r,ref:t}),i=o.Component,[s,a]=gk(n,B1),l=C.jsxs(C.Fragment,{children:[C.jsx("header",{...o.getWrapperProps(),children:s}),a]});return C.jsx(F$,{value:o,children:o.shouldHideOnScroll?C.jsx(vf.nav,{animate:o.isHidden?"hidden":"visible",initial:!1,variants:B$,...we(o.getBaseProps(),o.motionProps),children:l}):C.jsx(i,{...o.getBaseProps(),children:l})})});z1.displayName="NextUI.Navbar";var H$=z1,U1=Ie((e,t)=>{var n;const{as:r,className:o,children:i,...s}=e,a=r||"div",l=He(t),{slots:u,classNames:c}=uo(),d=le(c==null?void 0:c.brand,o);return C.jsx(a,{ref:l,className:(n=u.brand)==null?void 0:n.call(u,{class:d}),...s,children:i})});U1.displayName="NextUI.NavbarBrand";var K$=U1,W1=Ie((e,t)=>{var n;const{as:r,className:o,children:i,justify:s="start",...a}=e,l=r||"ul",u=He(t),{slots:c,classNames:d}=uo(),f=le(d==null?void 0:d.content,o);return C.jsx(l,{ref:u,className:(n=c.content)==null?void 0:n.call(c,{class:f}),"data-justify":s,...a,children:i})});W1.displayName="NextUI.NavbarContent";var Ac=W1,H1=Ie((e,t)=>{var n;const{as:r,className:o,children:i,isActive:s,...a}=e,l=r||"li",u=He(t),{slots:c,classNames:d}=uo(),f=le(d==null?void 0:d.item,o);return C.jsx(l,{ref:u,className:(n=c.item)==null?void 0:n.call(c,{class:f}),"data-active":X(s),...a,children:i})});H1.displayName="NextUI.NavbarItem";var K1=H1,G1=Ie((e,t)=>{var n;const{className:r,children:o,...i}=e,s=He(t),{slots:a,isMenuOpen:l,classNames:u}=uo(),c=le(u==null?void 0:u.menuItem,r);return C.jsx("li",{ref:s,className:(n=a.menuItem)==null?void 0:n.call(a,{class:c}),"data-open":X(l),...i,children:o})});G1.displayName="NextUI.NavbarMenuItem";var G$=G1;function Q$(e,t,n){const{isSelected:r}=t,{isPressed:o,buttonProps:i}=bf({...e,onPress:Ci(t.toggle,e.onPress)},n);return{isPressed:o,buttonProps:we(i,{"aria-pressed":r})}}var Q1=Ie((e,t)=>{var n;const{as:r,icon:o,className:i,onChange:s,autoFocus:a,srOnlyText:l,...u}=e,c=r||"button",d=He(t),{slots:f,classNames:p,isMenuOpen:m,setIsMenuOpen:y}=uo(),b=ZN({...u,isSelected:m,onChange:M=>{s==null||s(M),y(M)}}),{buttonProps:h,isPressed:v}=Q$(e,b,d),{isFocusVisible:S,focusProps:E}=rr({autoFocus:a}),{isHovered:R,hoverProps:T}=Ei({}),x=le(p==null?void 0:p.toggle,i),N=g.useMemo(()=>typeof o=="function"?o(m):o||C.jsx("span",{className:f.toggleIcon({class:p==null?void 0:p.toggleIcon})}),[o,f.toggleIcon,p==null?void 0:p.toggleIcon]),F=g.useMemo(()=>l||(b.isSelected?"close navigation menu":"open navigation menu"),[l,m]);return C.jsxs(c,{ref:d,className:(n=f.toggle)==null?void 0:n.call(f,{class:x}),"data-focus-visible":X(S),"data-hover":X(R),"data-open":X(m),"data-pressed":X(v),...we(h,E,T,u),children:[C.jsx("span",{className:f.srOnly(),children:F}),N]})});Q1.displayName="NextUI.NavbarMenuToggle";var X$=Q1;function Y$(e){const[t,n]=ao(e,vh.variantKeys),{as:r,children:o,isLoaded:i=!1,className:s,classNames:a,...l}=t,u=r||"div",c=g.useMemo(()=>vh({...n}),[...Object.values(n),o]),d=le(a==null?void 0:a.base,s);return{Component:u,children:o,slots:c,classNames:a,getSkeletonProps:(m={})=>({"data-loaded":X(i),className:c.base({class:le(d,m==null?void 0:m.className)}),...l}),getContentProps:(m={})=>({className:c.content({class:le(a==null?void 0:a.content,m==null?void 0:m.className)})})}}var X1=Ie((e,t)=>{const{Component:n,children:r,getSkeletonProps:o,getContentProps:i}=Y$({...e});return C.jsx(n,{ref:t,...o(),children:C.jsx("div",{...i(),children:r})})});X1.displayName="NextUI.Skeleton";var Om=X1;function q$({title:e,titleId:t,...n},r){return g.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?g.createElement("title",{id:t},e):null,g.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z",clipRule:"evenodd"}))}const J$=g.forwardRef(q$),Ya=J$;function Z$({title:e,titleId:t,...n},r){return g.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?g.createElement("title",{id:t},e):null,g.createElement("path",{d:"M12 15a3 3 0 100-6 3 3 0 000 6z"}),g.createElement("path",{fillRule:"evenodd",d:"M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 010-1.113zM17.25 12a5.25 5.25 0 11-10.5 0 5.25 5.25 0 0110.5 0z",clipRule:"evenodd"}))}const eM=g.forwardRef(Z$),tM=eM;function nM({title:e,titleId:t,...n},r){return g.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),e?g.createElement("title",{id:t},e):null,g.createElement("path",{fillRule:"evenodd",d:"M10.5 3.75a6.75 6.75 0 100 13.5 6.75 6.75 0 000-13.5zM2.25 10.5a8.25 8.25 0 1114.59 5.28l4.69 4.69a.75.75 0 11-1.06 1.06l-4.69-4.69A8.25 8.25 0 012.25 10.5z",clipRule:"evenodd"}))}const rM=g.forwardRef(nM),oM=rM;function Sf(e){return e>=1e6?(e/1e6).toFixed(2)+"M":e>=1e3?(e/1e3).toFixed(1)+"k":e.toString()}function iM(e){return e.charAt(0).toUpperCase()+e.slice(1)}function sM(){return window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Y1({video:e,uploaderAvatar:t}){const n=io();return C.jsxs($i,{isPressable:!0,onPress:()=>n(e.url),shadow:"none",children:[C.jsx(wf,{children:C.jsx("img",{className:"w-full rounded-xl",src:e.thumbnail})}),C.jsxs(Qa,{className:"flex gap-3 flex-row",children:[C.jsx(yf,{className:"flex-none",src:t||e.uploaderAvatar}),C.jsxs("div",{className:"flex gap-3 flex-col",children:[C.jsx(gi,{color:"foreground",href:`#${e.url}`,children:e.title}),C.jsx(gi,{color:"foreground",href:`#${e.uploaderUrl}`,children:C.jsxs("div",{className:"flex flex-row items-center",children:[C.jsx("p",{className:"text-md",children:e.uploaderName}),e.uploaderVerified&&C.jsx(Ya,{className:"w-6 h-6 p-1"})]})}),C.jsxs("div",{className:"flex flex-row items-center",children:[C.jsx(tM,{className:"w-6 h-6 p-1"}),C.jsx("p",{className:"flex-none text-md",children:`${Sf(e.views)}${e.uploadedDate?` • ${e.uploadedDate}`:""}`})]})]})]})]})}function q1(){return C.jsxs($i,{isPressable:!0,shadow:"none",className:"space-y-5 p-4",children:[C.jsx(Om,{className:"rounded-lg",children:C.jsx("div",{className:"rounded-lg h-56 bg-default-300 p-4"})}),C.jsx(Qa,{className:"flex gap-3 flex-row",children:C.jsx(Om,{className:"flex rounded-full w-12 h-12"})})]})}function aM({children:e}){return C.jsx("div",{className:"grid md:grid-cols-2 xl:grid-cols-4 2xl:grid-cols-5 gap-2 p-4",children:e})}class lM extends oe.Component{constructor(){super(...arguments);Ef(this,"state",{trending:[]})}async componentDidMount(){console.log("trending");const n=await window.piped_api.trending(localStorage.getItem("region")||"US");this.setState({trending:n})}render(){const{trending:n}=this.state;return n.length===0?C.jsx("div",{className:"grid md:grid-cols-2 xl:grid-cols-4 2xl:grid-cols-5 gap-2 p-4",children:[...Array(20).keys()].map(r=>C.jsx(q1,{},r))}):C.jsx("div",{className:"grid md:grid-cols-2 xl:grid-cols-4 2xl:grid-cols-5 gap-2 p-4",children:n.map(r=>C.jsx(Y1,{video:r},r.url))})}}function uM(){return C.jsxs(H$,{children:[C.jsxs(Ac,{children:[C.jsx(X$,{className:"sm:hidden"}),C.jsx(K$,{children:C.jsx(No,{className:"font-bold text-inherit",to:"/trending",children:"ULTYT"})})]}),C.jsx(Ac,{className:"sm:flex gap-4",justify:"start",children:C.jsx(K1,{children:C.jsx(o$,{isClearable:!0,radius:"lg",placeholder:"Type to search...",startContent:C.jsx(oM,{className:"h-6 w-6"})})})}),C.jsx(cM,{})]})}function jm(e){let t,n;return e?(t=G$,n=B1):(t=K1,n=Ac),C.jsxs(n,{className:"hidden sm:flex gap-4",justify:"center",children:[C.jsx(t,{children:C.jsx(No,{to:"/trending",children:"Trending"})}),C.jsx(t,{children:C.jsx(No,{to:"/feed",children:"Feed"})}),C.jsx(t,{children:C.jsx(No,{to:"/playlists",children:"Playlists"})}),C.jsx(t,{children:C.jsx(No,{to:"/preferences",children:"Preferences"})})]})}function cM(){return C.jsxs(C.Fragment,{children:[jm(!1),jm(!0)]})}function dM({playlist:e,uploaderAvatar:t}){const n=io();return C.jsxs($i,{isPressable:!0,onPress:()=>n(e.url),shadow:"none",children:[C.jsx(wf,{children:C.jsx("img",{className:"w-full rounded-xl",src:e.thumbnail})}),C.jsxs(Qa,{className:"flex gap-3 flex-row",children:[C.jsx(yf,{className:"flex-none",src:t||e.uploaderAvatar}),C.jsxs("div",{className:"flex gap-3 flex-col",children:[C.jsx(gi,{color:"foreground",href:`#${e.url}`,children:e.name}),C.jsx(gi,{color:"foreground",href:`#${e.uploaderUrl}`,children:C.jsxs("div",{className:"flex flex-row items-center",children:[C.jsx("p",{className:"text-md",children:e.uploaderName}),e.uploaderVerified&&C.jsx(Ya,{className:"w-6 h-6 p-1"})]})}),C.jsx("div",{className:"flex flex-row items-center",children:C.jsx("p",{className:"flex-none text-md",children:`${Sf(e.videos)} videos`})})]})]})]})}function fM({channel:e,uploaderAvatar:t}){const n=io();return C.jsxs($i,{isPressable:!0,onPress:()=>{n(e.url||"")},shadow:"none",children:[C.jsxs(wf,{children:[C.jsx(yf,{className:"flex-none",src:t||e.thumbnail}),C.jsx(gi,{color:"foreground",className:"pl-4",href:`#${e.url}`,children:C.jsxs("div",{className:"flex flex-row items-center",children:[C.jsx("p",{className:"text-md",children:e.name}),e.verified&&C.jsx(Ya,{className:"w-6 h-6 p-1"})]})})]}),C.jsx(Qa,{className:"flex gap-3 flex-row",children:C.jsx("p",{className:"flex-none text-md",children:`${Sf(e.videos||-1)} videos`})})]})}function pM({item:e,channel:t}){if(e.type==="stream")return e=e,C.jsx(Y1,{video:e,uploaderAvatar:t.avatarUrl});if(e.type==="playlist")return e=e,C.jsx(dM,{playlist:e,uploaderAvatar:t.avatarUrl});if(e.type==="channel")return e=e,C.jsx(fM,{channel:e})}function hM(){const{id:e}=TP(),[t,n]=ZP(),r=t.get("tabId")||"videos";return C.jsx(mM,{id:e,setSearchParams:n,tabId:r})}class mM extends oe.Component{async componentDidMount(){var n;const t=await window.piped_api.channel(this.props.id||"");if(this.props.tabId==="videos")return this.setState({channel:t});if(!((n=this.state)!=null&&n.tab)){const r=await window.piped_api.channelTabs(t.tabs[this.props.tabId].data);this.setState({channel:t,tab:r})}}async updateTab(){if(this.props.tabId==="videos")return;const{channel:t}=this.state,n=await window.piped_api.channelTabs(t.tabs[this.props.tabId].data);this.setState({channel:t,tab:n})}async updateChannel(){const t=await window.piped_api.channel(this.props.id||"");this.setState({...this.state,channel:t})}async componentDidUpdate(){var t,n;this.props.id!==((n=(t=this.state)==null?void 0:t.channel)==null?void 0:n.id)&&await this.updateChannel()}render(){if(!this.state)return null;const{channel:t,tab:n}=this.state,{setSearchParams:r,tabId:o}=this.props;return t?C.jsxs("div",{className:"grid grid-rows p-4",children:[C.jsxs($i,{radius:"lg",shadow:"none",children:[C.jsx("div",{className:"p-4",children:C.jsx("img",{className:"w-full rounded-xl",src:t.bannerUrl})}),C.jsx(XN,{className:"p-4 justify-between ",children:C.jsxs("div",{className:"flex flex-row",children:[C.jsx("div",{className:"flex flex-row gap-2 text-xl font-bold pl-2",children:t.name}),t.verified&&C.jsx(Ya,{className:"w-6 h-6 p-1"})]})})]}),C.jsxs("div",{className:"flex flex-row flex-wrap gap-2 mt-4",children:[C.jsx(Rm,{onClick:()=>{r({tabId:"videos"})},className:"text-xl font-bold mt-4",children:"Videos"},"videos"),t.tabs.map((i,s)=>C.jsx(Rm,{onClick:async()=>{await r({tabId:String(s)}),await this.updateTab()},className:"text-xl font-bold mt-4",children:iM(i.name)},i.name))]}),C.jsx(aM,{children:(o!=="videos"?(n==null?void 0:n.content)||[]:t.relatedStreams).map(i=>C.jsx(pM,{item:i,channel:t},Math.random()))})]}):C.jsx("div",{className:"grid md:grid-cols-2 xl:grid-cols-4 2xl:grid-cols-5 gap-2 p-4",children:[...Array(20).keys()].map(i=>C.jsx(q1,{},i))})}}function gM(){window.piped_api=new gy;const[e,t]=g.useState(Math.random());return window.addEventListener("reRenderPage",()=>{t(Math.random())}),C.jsxs(XP,{children:[C.jsx(uM,{}),C.jsxs(zP,{children:[C.jsx(xs,{path:"/",element:C.jsx(VP,{to:"/trending"})}),C.jsx(xs,{path:"/trending",element:C.jsx(lM,{})}),C.jsx(xs,{path:"/channel/:id",element:C.jsx(hM,{})})]})]},e)}eu.createRoot(document.getElementById("root")).render(C.jsx(oe.StrictMode,{children:C.jsx(pE,{children:C.jsx("main",{className:`${localStorage.getItem("theme")||sM()} text-foreground bg-background`,children:C.jsx(gM,{})})})}));