@modelcontextprotocol/inspector-client 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -37,7 +37,7 @@ function Sy(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&
37
37
  `+o[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=i&&0<=a);break}}}finally{al=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?zo(e):""}function Qy(e){switch(e.tag){case 5:return zo(e.type);case 16:return zo("Lazy");case 13:return zo("Suspense");case 19:return zo("SuspenseList");case 0:case 2:case 15:return e=ll(e.type,!1),e;case 11:return e=ll(e.type.render,!1),e;case 1:return e=ll(e.type,!0),e;default:return""}}function Ql(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 Dr:return"Fragment";case Lr:return"Portal";case ql:return"Profiler";case fu:return"StrictMode";case Kl:return"Suspense";case Gl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Mp:return(e.displayName||"Context")+".Consumer";case Op:return(e._context.displayName||"Context")+".Provider";case pu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case mu:return t=e.displayName||null,t!==null?t:Ql(e.type)||"Memo";case Rn:t=e._payload,e=e._init;try{return Ql(e(t))}catch{}}return null}function Yy(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 Ql(t);case 8:return t===fu?"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 Hn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Lp(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Xy(e){var t=Lp(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,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(i){r=""+i,s.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Gs(e){e._valueTracker||(e._valueTracker=Xy(e))}function Dp(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Lp(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Mi(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 Yl(e,t){var n=t.checked;return be({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Dd(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Hn(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 zp(e,t){t=t.checked,t!=null&&du(e,"checked",t,!1)}function Xl(e,t){zp(e,t);var n=Hn(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")?Jl(e,t.type,n):t.hasOwnProperty("defaultValue")&&Jl(e,t.type,Hn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function zd(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 Jl(e,t,n){(t!=="number"||Mi(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var $o=Array.isArray;function Qr(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Hn(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function ec(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(R(91));return be({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function $d(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(R(92));if($o(n)){if(1<n.length)throw Error(R(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Hn(n)}}function $p(e,t){var n=Hn(t.value),r=Hn(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Fd(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Fp(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function tc(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Fp(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Qs,Vp=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Qs=Qs||document.createElement("div"),Qs.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Qs.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ns(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Wo={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},Jy=["Webkit","ms","Moz","O"];Object.keys(Wo).forEach(function(e){Jy.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Wo[t]=Wo[e]})});function Bp(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Wo.hasOwnProperty(e)&&Wo[e]?(""+t).trim():t+"px"}function Up(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Bp(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var e0=be({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 nc(e,t){if(t){if(e0[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(R(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(R(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(R(61))}if(t.style!=null&&typeof t.style!="object")throw Error(R(62))}}function rc(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 oc=null;function hu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var sc=null,Yr=null,Xr=null;function Vd(e){if(e=$s(e)){if(typeof sc!="function")throw Error(R(280));var t=e.stateNode;t&&(t=ka(t),sc(e.stateNode,e.type,t))}}function Hp(e){Yr?Xr?Xr.push(e):Xr=[e]:Yr=e}function Wp(){if(Yr){var e=Yr,t=Xr;if(Xr=Yr=null,Vd(e),t)for(e=0;e<t.length;e++)Vd(t[e])}}function Zp(e,t){return e(t)}function qp(){}var cl=!1;function Kp(e,t,n){if(cl)return e(t,n);cl=!0;try{return Zp(e,t,n)}finally{cl=!1,(Yr!==null||Xr!==null)&&(qp(),Wp())}}function rs(e,t){var n=e.stateNode;if(n===null)return null;var r=ka(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(R(231,t,typeof n));return n}var ic=!1;if(mn)try{var Ro={};Object.defineProperty(Ro,"passive",{get:function(){ic=!0}}),window.addEventListener("test",Ro,Ro),window.removeEventListener("test",Ro,Ro)}catch{ic=!1}function t0(e,t,n,r,o,s,i,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var Zo=!1,Ai=null,Li=!1,ac=null,n0={onError:function(e){Zo=!0,Ai=e}};function r0(e,t,n,r,o,s,i,a,l){Zo=!1,Ai=null,t0.apply(n0,arguments)}function o0(e,t,n,r,o,s,i,a,l){if(r0.apply(this,arguments),Zo){if(Zo){var c=Ai;Zo=!1,Ai=null}else throw Error(R(198));Li||(Li=!0,ac=c)}}function Rr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Gp(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Bd(e){if(Rr(e)!==e)throw Error(R(188))}function s0(e){var t=e.alternate;if(!t){if(t=Rr(e),t===null)throw Error(R(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var s=o.alternate;if(s===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===s.child){for(s=o.child;s;){if(s===n)return Bd(o),e;if(s===r)return Bd(o),t;s=s.sibling}throw Error(R(188))}if(n.return!==r.return)n=o,r=s;else{for(var i=!1,a=o.child;a;){if(a===n){i=!0,n=o,r=s;break}if(a===r){i=!0,r=o,n=s;break}a=a.sibling}if(!i){for(a=s.child;a;){if(a===n){i=!0,n=s,r=o;break}if(a===r){i=!0,r=s,n=o;break}a=a.sibling}if(!i)throw Error(R(189))}}if(n.alternate!==r)throw Error(R(190))}if(n.tag!==3)throw Error(R(188));return n.stateNode.current===n?e:t}function Qp(e){return e=s0(e),e!==null?Yp(e):null}function Yp(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Yp(e);if(t!==null)return t;e=e.sibling}return null}var Xp=vt.unstable_scheduleCallback,Ud=vt.unstable_cancelCallback,i0=vt.unstable_shouldYield,a0=vt.unstable_requestPaint,Re=vt.unstable_now,l0=vt.unstable_getCurrentPriorityLevel,gu=vt.unstable_ImmediatePriority,Jp=vt.unstable_UserBlockingPriority,Di=vt.unstable_NormalPriority,c0=vt.unstable_LowPriority,em=vt.unstable_IdlePriority,wa=null,Gt=null;function u0(e){if(Gt&&typeof Gt.onCommitFiberRoot=="function")try{Gt.onCommitFiberRoot(wa,e,void 0,(e.current.flags&128)===128)}catch{}}var Mt=Math.clz32?Math.clz32:p0,d0=Math.log,f0=Math.LN2;function p0(e){return e>>>=0,e===0?32:31-(d0(e)/f0|0)|0}var Ys=64,Xs=4194304;function Fo(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 zi(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,s=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~o;a!==0?r=Fo(a):(s&=i,s!==0&&(r=Fo(s)))}else i=n&~o,i!==0?r=Fo(i):s!==0&&(r=Fo(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,s=t&-t,o>=s||o===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Mt(t),o=1<<n,r|=e[n],t&=~o;return r}function m0(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function h0(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,s=e.pendingLanes;0<s;){var i=31-Mt(s),a=1<<i,l=o[i];l===-1?(!(a&n)||a&r)&&(o[i]=m0(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function lc(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function tm(){var e=Ys;return Ys<<=1,!(Ys&4194240)&&(Ys=64),e}function ul(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ds(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Mt(t),e[t]=n}function g0(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<n;){var o=31-Mt(n),s=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~s}}function vu(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Mt(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var de=0;function nm(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var rm,yu,om,sm,im,cc=!1,Js=[],Ln=null,Dn=null,zn=null,os=new Map,ss=new Map,jn=[],v0="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Hd(e,t){switch(e){case"focusin":case"focusout":Ln=null;break;case"dragenter":case"dragleave":Dn=null;break;case"mouseover":case"mouseout":zn=null;break;case"pointerover":case"pointerout":os.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ss.delete(t.pointerId)}}function Po(e,t,n,r,o,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[o]},t!==null&&(t=$s(t),t!==null&&yu(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function y0(e,t,n,r,o){switch(t){case"focusin":return Ln=Po(Ln,e,t,n,r,o),!0;case"dragenter":return Dn=Po(Dn,e,t,n,r,o),!0;case"mouseover":return zn=Po(zn,e,t,n,r,o),!0;case"pointerover":var s=o.pointerId;return os.set(s,Po(os.get(s)||null,e,t,n,r,o)),!0;case"gotpointercapture":return s=o.pointerId,ss.set(s,Po(ss.get(s)||null,e,t,n,r,o)),!0}return!1}function am(e){var t=dr(e.target);if(t!==null){var n=Rr(t);if(n!==null){if(t=n.tag,t===13){if(t=Gp(n),t!==null){e.blockedOn=t,im(e.priority,function(){om(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function wi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=uc(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);oc=r,n.target.dispatchEvent(r),oc=null}else return t=$s(n),t!==null&&yu(t),e.blockedOn=n,!1;t.shift()}return!0}function Wd(e,t,n){wi(e)&&n.delete(t)}function x0(){cc=!1,Ln!==null&&wi(Ln)&&(Ln=null),Dn!==null&&wi(Dn)&&(Dn=null),zn!==null&&wi(zn)&&(zn=null),os.forEach(Wd),ss.forEach(Wd)}function jo(e,t){e.blockedOn===t&&(e.blockedOn=null,cc||(cc=!0,vt.unstable_scheduleCallback(vt.unstable_NormalPriority,x0)))}function is(e){function t(o){return jo(o,e)}if(0<Js.length){jo(Js[0],e);for(var n=1;n<Js.length;n++){var r=Js[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Ln!==null&&jo(Ln,e),Dn!==null&&jo(Dn,e),zn!==null&&jo(zn,e),os.forEach(t),ss.forEach(t),n=0;n<jn.length;n++)r=jn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<jn.length&&(n=jn[0],n.blockedOn===null);)am(n),n.blockedOn===null&&jn.shift()}var Jr=Cn.ReactCurrentBatchConfig,$i=!0;function w0(e,t,n,r){var o=de,s=Jr.transition;Jr.transition=null;try{de=1,xu(e,t,n,r)}finally{de=o,Jr.transition=s}}function S0(e,t,n,r){var o=de,s=Jr.transition;Jr.transition=null;try{de=4,xu(e,t,n,r)}finally{de=o,Jr.transition=s}}function xu(e,t,n,r){if($i){var o=uc(e,t,n,r);if(o===null)wl(e,t,r,Fi,n),Hd(e,r);else if(y0(o,e,t,n,r))r.stopPropagation();else if(Hd(e,r),t&4&&-1<v0.indexOf(e)){for(;o!==null;){var s=$s(o);if(s!==null&&rm(s),s=uc(e,t,n,r),s===null&&wl(e,t,r,Fi,n),s===o)break;o=s}o!==null&&r.stopPropagation()}else wl(e,t,r,null,n)}}var Fi=null;function uc(e,t,n,r){if(Fi=null,e=hu(r),e=dr(e),e!==null)if(t=Rr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Gp(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Fi=e,null}function lm(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(l0()){case gu:return 1;case Jp:return 4;case Di:case c0:return 16;case em:return 536870912;default:return 16}default:return 16}}var Mn=null,wu=null,Si=null;function cm(){if(Si)return Si;var e,t=wu,n=t.length,r,o="value"in Mn?Mn.value:Mn.textContent,s=o.length;for(e=0;e<n&&t[e]===o[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===o[s-r];r++);return Si=o.slice(e,1<r?1-r:void 0)}function _i(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ei(){return!0}function Zd(){return!1}function xt(e){function t(n,r,o,s,i){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=s,this.target=i,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?ei:Zd,this.isPropagationStopped=Zd,this}return be(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=ei)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ei)},persist:function(){},isPersistent:ei}),t}var wo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Su=xt(wo),zs=be({},wo,{view:0,detail:0}),_0=xt(zs),dl,fl,Io,Sa=be({},zs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_u,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Io&&(Io&&e.type==="mousemove"?(dl=e.screenX-Io.screenX,fl=e.screenY-Io.screenY):fl=dl=0,Io=e),dl)},movementY:function(e){return"movementY"in e?e.movementY:fl}}),qd=xt(Sa),C0=be({},Sa,{dataTransfer:0}),k0=xt(C0),E0=be({},zs,{relatedTarget:0}),pl=xt(E0),b0=be({},wo,{animationName:0,elapsedTime:0,pseudoElement:0}),N0=xt(b0),T0=be({},wo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),R0=xt(T0),P0=be({},wo,{data:0}),Kd=xt(P0),j0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},I0={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},O0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function M0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=O0[e])?!!t[e]:!1}function _u(){return M0}var A0=be({},zs,{key:function(e){if(e.key){var t=j0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=_i(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?I0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_u,charCode:function(e){return e.type==="keypress"?_i(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?_i(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),L0=xt(A0),D0=be({},Sa,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Gd=xt(D0),z0=be({},zs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_u}),$0=xt(z0),F0=be({},wo,{propertyName:0,elapsedTime:0,pseudoElement:0}),V0=xt(F0),B0=be({},Sa,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),U0=xt(B0),H0=[9,13,27,32],Cu=mn&&"CompositionEvent"in window,qo=null;mn&&"documentMode"in document&&(qo=document.documentMode);var W0=mn&&"TextEvent"in window&&!qo,um=mn&&(!Cu||qo&&8<qo&&11>=qo),Qd=" ",Yd=!1;function dm(e,t){switch(e){case"keyup":return H0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function fm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var zr=!1;function Z0(e,t){switch(e){case"compositionend":return fm(t);case"keypress":return t.which!==32?null:(Yd=!0,Qd);case"textInput":return e=t.data,e===Qd&&Yd?null:e;default:return null}}function q0(e,t){if(zr)return e==="compositionend"||!Cu&&dm(e,t)?(e=cm(),Si=wu=Mn=null,zr=!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.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return um&&t.locale!=="ko"?null:t.data;default:return null}}var K0={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Xd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!K0[e.type]:t==="textarea"}function pm(e,t,n,r){Hp(r),t=Vi(t,"onChange"),0<t.length&&(n=new Su("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Ko=null,as=null;function G0(e){km(e,0)}function _a(e){var t=Vr(e);if(Dp(t))return e}function Q0(e,t){if(e==="change")return t}var mm=!1;if(mn){var ml;if(mn){var hl="oninput"in document;if(!hl){var Jd=document.createElement("div");Jd.setAttribute("oninput","return;"),hl=typeof Jd.oninput=="function"}ml=hl}else ml=!1;mm=ml&&(!document.documentMode||9<document.documentMode)}function ef(){Ko&&(Ko.detachEvent("onpropertychange",hm),as=Ko=null)}function hm(e){if(e.propertyName==="value"&&_a(as)){var t=[];pm(t,as,e,hu(e)),Kp(G0,t)}}function Y0(e,t,n){e==="focusin"?(ef(),Ko=t,as=n,Ko.attachEvent("onpropertychange",hm)):e==="focusout"&&ef()}function X0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return _a(as)}function J0(e,t){if(e==="click")return _a(t)}function e1(e,t){if(e==="input"||e==="change")return _a(t)}function t1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Dt=typeof Object.is=="function"?Object.is:t1;function ls(e,t){if(Dt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!Zl.call(t,o)||!Dt(e[o],t[o]))return!1}return!0}function tf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function nf(e,t){var n=tf(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=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=tf(n)}}function gm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?gm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function vm(){for(var e=window,t=Mi();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Mi(e.document)}return t}function ku(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 n1(e){var t=vm(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&gm(n.ownerDocument.documentElement,n)){if(r!==null&&ku(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,s=Math.min(r.start,o);r=r.end===void 0?s:Math.min(r.end,o),!e.extend&&s>r&&(o=r,r=s,s=o),o=nf(n,s);var i=nf(n,r);o&&i&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.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<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var r1=mn&&"documentMode"in document&&11>=document.documentMode,$r=null,dc=null,Go=null,fc=!1;function rf(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;fc||$r==null||$r!==Mi(r)||(r=$r,"selectionStart"in r&&ku(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}),Go&&ls(Go,r)||(Go=r,r=Vi(dc,"onSelect"),0<r.length&&(t=new Su("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=$r)))}function ti(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Fr={animationend:ti("Animation","AnimationEnd"),animationiteration:ti("Animation","AnimationIteration"),animationstart:ti("Animation","AnimationStart"),transitionend:ti("Transition","TransitionEnd")},gl={},ym={};mn&&(ym=document.createElement("div").style,"AnimationEvent"in window||(delete Fr.animationend.animation,delete Fr.animationiteration.animation,delete Fr.animationstart.animation),"TransitionEvent"in window||delete Fr.transitionend.transition);function Ca(e){if(gl[e])return gl[e];if(!Fr[e])return e;var t=Fr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ym)return gl[e]=t[n];return e}var xm=Ca("animationend"),wm=Ca("animationiteration"),Sm=Ca("animationstart"),_m=Ca("transitionend"),Cm=new Map,of="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Jn(e,t){Cm.set(e,t),Tr(t,[e])}for(var vl=0;vl<of.length;vl++){var yl=of[vl],o1=yl.toLowerCase(),s1=yl[0].toUpperCase()+yl.slice(1);Jn(o1,"on"+s1)}Jn(xm,"onAnimationEnd");Jn(wm,"onAnimationIteration");Jn(Sm,"onAnimationStart");Jn("dblclick","onDoubleClick");Jn("focusin","onFocus");Jn("focusout","onBlur");Jn(_m,"onTransitionEnd");io("onMouseEnter",["mouseout","mouseover"]);io("onMouseLeave",["mouseout","mouseover"]);io("onPointerEnter",["pointerout","pointerover"]);io("onPointerLeave",["pointerout","pointerover"]);Tr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Tr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Tr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Tr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Tr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Tr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),i1=new Set("cancel close invalid load scroll toggle".split(" ").concat(Vo));function sf(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,o0(r,t,void 0,e),e.currentTarget=null}function km(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var i=r.length-1;0<=i;i--){var a=r[i],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==s&&o.isPropagationStopped())break e;sf(o,a,c),s=l}else for(i=0;i<r.length;i++){if(a=r[i],l=a.instance,c=a.currentTarget,a=a.listener,l!==s&&o.isPropagationStopped())break e;sf(o,a,c),s=l}}}if(Li)throw e=ac,Li=!1,ac=null,e}function xe(e,t){var n=t[vc];n===void 0&&(n=t[vc]=new Set);var r=e+"__bubble";n.has(r)||(Em(t,e,2,!1),n.add(r))}function xl(e,t,n){var r=0;t&&(r|=4),Em(n,e,r,t)}var ni="_reactListening"+Math.random().toString(36).slice(2);function cs(e){if(!e[ni]){e[ni]=!0,Ip.forEach(function(n){n!=="selectionchange"&&(i1.has(n)||xl(n,!1,e),xl(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ni]||(t[ni]=!0,xl("selectionchange",!1,t))}}function Em(e,t,n,r){switch(lm(t)){case 1:var o=w0;break;case 4:o=S0;break;default:o=xu}n=o.bind(null,t,n,e),o=void 0,!ic||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function wl(e,t,n,r,o){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var a=r.stateNode.containerInfo;if(a===o||a.nodeType===8&&a.parentNode===o)break;if(i===4)for(i=r.return;i!==null;){var l=i.tag;if((l===3||l===4)&&(l=i.stateNode.containerInfo,l===o||l.nodeType===8&&l.parentNode===o))return;i=i.return}for(;a!==null;){if(i=dr(a),i===null)return;if(l=i.tag,l===5||l===6){r=s=i;continue e}a=a.parentNode}}r=r.return}Kp(function(){var c=s,u=hu(n),f=[];e:{var g=Cm.get(e);if(g!==void 0){var x=Su,w=e;switch(e){case"keypress":if(_i(n)===0)break e;case"keydown":case"keyup":x=L0;break;case"focusin":w="focus",x=pl;break;case"focusout":w="blur",x=pl;break;case"beforeblur":case"afterblur":x=pl;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":x=qd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":x=k0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":x=$0;break;case xm:case wm:case Sm:x=N0;break;case _m:x=V0;break;case"scroll":x=_0;break;case"wheel":x=U0;break;case"copy":case"cut":case"paste":x=R0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":x=Gd}var m=(t&4)!==0,_=!m&&e==="scroll",v=m?g!==null?g+"Capture":null:g;m=[];for(var d=c,y;d!==null;){y=d;var C=y.stateNode;if(y.tag===5&&C!==null&&(y=C,v!==null&&(C=rs(d,v),C!=null&&m.push(us(d,C,y)))),_)break;d=d.return}0<m.length&&(g=new x(g,w,null,n,u),f.push({event:g,listeners:m}))}}if(!(t&7)){e:{if(g=e==="mouseover"||e==="pointerover",x=e==="mouseout"||e==="pointerout",g&&n!==oc&&(w=n.relatedTarget||n.fromElement)&&(dr(w)||w[hn]))break e;if((x||g)&&(g=u.window===u?u:(g=u.ownerDocument)?g.defaultView||g.parentWindow:window,x?(w=n.relatedTarget||n.toElement,x=c,w=w?dr(w):null,w!==null&&(_=Rr(w),w!==_||w.tag!==5&&w.tag!==6)&&(w=null)):(x=null,w=c),x!==w)){if(m=qd,C="onMouseLeave",v="onMouseEnter",d="mouse",(e==="pointerout"||e==="pointerover")&&(m=Gd,C="onPointerLeave",v="onPointerEnter",d="pointer"),_=x==null?g:Vr(x),y=w==null?g:Vr(w),g=new m(C,d+"leave",x,n,u),g.target=_,g.relatedTarget=y,C=null,dr(u)===c&&(m=new m(v,d+"enter",w,n,u),m.target=y,m.relatedTarget=_,C=m),_=C,x&&w)t:{for(m=x,v=w,d=0,y=m;y;y=jr(y))d++;for(y=0,C=v;C;C=jr(C))y++;for(;0<d-y;)m=jr(m),d--;for(;0<y-d;)v=jr(v),y--;for(;d--;){if(m===v||v!==null&&m===v.alternate)break t;m=jr(m),v=jr(v)}m=null}else m=null;x!==null&&af(f,g,x,m,!1),w!==null&&_!==null&&af(f,_,w,m,!0)}}e:{if(g=c?Vr(c):window,x=g.nodeName&&g.nodeName.toLowerCase(),x==="select"||x==="input"&&g.type==="file")var k=Q0;else if(Xd(g))if(mm)k=e1;else{k=X0;var T=Y0}else(x=g.nodeName)&&x.toLowerCase()==="input"&&(g.type==="checkbox"||g.type==="radio")&&(k=J0);if(k&&(k=k(e,c))){pm(f,k,n,u);break e}T&&T(e,g,c),e==="focusout"&&(T=g._wrapperState)&&T.controlled&&g.type==="number"&&Jl(g,"number",g.value)}switch(T=c?Vr(c):window,e){case"focusin":(Xd(T)||T.contentEditable==="true")&&($r=T,dc=c,Go=null);break;case"focusout":Go=dc=$r=null;break;case"mousedown":fc=!0;break;case"contextmenu":case"mouseup":case"dragend":fc=!1,rf(f,n,u);break;case"selectionchange":if(r1)break;case"keydown":case"keyup":rf(f,n,u)}var b;if(Cu)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else zr?dm(e,n)&&(E="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(E="onCompositionStart");E&&(um&&n.locale!=="ko"&&(zr||E!=="onCompositionStart"?E==="onCompositionEnd"&&zr&&(b=cm()):(Mn=u,wu="value"in Mn?Mn.value:Mn.textContent,zr=!0)),T=Vi(c,E),0<T.length&&(E=new Kd(E,e,null,n,u),f.push({event:E,listeners:T}),b?E.data=b:(b=fm(n),b!==null&&(E.data=b)))),(b=W0?Z0(e,n):q0(e,n))&&(c=Vi(c,"onBeforeInput"),0<c.length&&(u=new Kd("onBeforeInput","beforeinput",null,n,u),f.push({event:u,listeners:c}),u.data=b))}km(f,t)})}function us(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Vi(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,s=o.stateNode;o.tag===5&&s!==null&&(o=s,s=rs(e,n),s!=null&&r.unshift(us(e,s,o)),s=rs(e,t),s!=null&&r.push(us(e,s,o))),e=e.return}return r}function jr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function af(e,t,n,r,o){for(var s=t._reactName,i=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,o?(l=rs(n,s),l!=null&&i.unshift(us(n,l,a))):o||(l=rs(n,s),l!=null&&i.push(us(n,l,a)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var a1=/\r\n?/g,l1=/\u0000|\uFFFD/g;function lf(e){return(typeof e=="string"?e:""+e).replace(a1,`
38
38
  `).replace(l1,"")}function ri(e,t,n){if(t=lf(t),lf(e)!==t&&n)throw Error(R(425))}function Bi(){}var pc=null,mc=null;function hc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var gc=typeof setTimeout=="function"?setTimeout:void 0,c1=typeof clearTimeout=="function"?clearTimeout:void 0,cf=typeof Promise=="function"?Promise:void 0,u1=typeof queueMicrotask=="function"?queueMicrotask:typeof cf<"u"?function(e){return cf.resolve(null).then(e).catch(d1)}:gc;function d1(e){setTimeout(function(){throw e})}function Sl(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),is(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);is(t)}function $n(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function uf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var So=Math.random().toString(36).slice(2),Zt="__reactFiber$"+So,ds="__reactProps$"+So,hn="__reactContainer$"+So,vc="__reactEvents$"+So,f1="__reactListeners$"+So,p1="__reactHandles$"+So;function dr(e){var t=e[Zt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[hn]||n[Zt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=uf(e);e!==null;){if(n=e[Zt])return n;e=uf(e)}return t}e=n,n=e.parentNode}return null}function $s(e){return e=e[Zt]||e[hn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Vr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(R(33))}function ka(e){return e[ds]||null}var yc=[],Br=-1;function er(e){return{current:e}}function we(e){0>Br||(e.current=yc[Br],yc[Br]=null,Br--)}function ge(e,t){Br++,yc[Br]=e.current,e.current=t}var Wn={},qe=er(Wn),at=er(!1),xr=Wn;function ao(e,t){var n=e.type.contextTypes;if(!n)return Wn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},s;for(s in n)o[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function lt(e){return e=e.childContextTypes,e!=null}function Ui(){we(at),we(qe)}function df(e,t,n){if(qe.current!==Wn)throw Error(R(168));ge(qe,t),ge(at,n)}function bm(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(R(108,Yy(e)||"Unknown",o));return be({},n,r)}function Hi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Wn,xr=qe.current,ge(qe,e),ge(at,at.current),!0}function ff(e,t,n){var r=e.stateNode;if(!r)throw Error(R(169));n?(e=bm(e,t,xr),r.__reactInternalMemoizedMergedChildContext=e,we(at),we(qe),ge(qe,e)):we(at),ge(at,n)}var cn=null,Ea=!1,_l=!1;function Nm(e){cn===null?cn=[e]:cn.push(e)}function m1(e){Ea=!0,Nm(e)}function tr(){if(!_l&&cn!==null){_l=!0;var e=0,t=de;try{var n=cn;for(de=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}cn=null,Ea=!1}catch(o){throw cn!==null&&(cn=cn.slice(e+1)),Xp(gu,tr),o}finally{de=t,_l=!1}}return null}var Ur=[],Hr=0,Wi=null,Zi=0,St=[],_t=0,wr=null,un=1,dn="";function lr(e,t){Ur[Hr++]=Zi,Ur[Hr++]=Wi,Wi=e,Zi=t}function Tm(e,t,n){St[_t++]=un,St[_t++]=dn,St[_t++]=wr,wr=e;var r=un;e=dn;var o=32-Mt(r)-1;r&=~(1<<o),n+=1;var s=32-Mt(t)+o;if(30<s){var i=o-o%5;s=(r&(1<<i)-1).toString(32),r>>=i,o-=i,un=1<<32-Mt(t)+o|n<<o|r,dn=s+e}else un=1<<s|n<<o|r,dn=e}function Eu(e){e.return!==null&&(lr(e,1),Tm(e,1,0))}function bu(e){for(;e===Wi;)Wi=Ur[--Hr],Ur[Hr]=null,Zi=Ur[--Hr],Ur[Hr]=null;for(;e===wr;)wr=St[--_t],St[_t]=null,dn=St[--_t],St[_t]=null,un=St[--_t],St[_t]=null}var mt=null,ft=null,_e=!1,It=null;function Rm(e,t){var n=Ct(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function pf(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,mt=e,ft=$n(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,mt=e,ft=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=wr!==null?{id:un,overflow:dn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Ct(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,mt=e,ft=null,!0):!1;default:return!1}}function xc(e){return(e.mode&1)!==0&&(e.flags&128)===0}function wc(e){if(_e){var t=ft;if(t){var n=t;if(!pf(e,t)){if(xc(e))throw Error(R(418));t=$n(n.nextSibling);var r=mt;t&&pf(e,t)?Rm(r,n):(e.flags=e.flags&-4097|2,_e=!1,mt=e)}}else{if(xc(e))throw Error(R(418));e.flags=e.flags&-4097|2,_e=!1,mt=e}}}function mf(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;mt=e}function oi(e){if(e!==mt)return!1;if(!_e)return mf(e),_e=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!hc(e.type,e.memoizedProps)),t&&(t=ft)){if(xc(e))throw Pm(),Error(R(418));for(;t;)Rm(e,t),t=$n(t.nextSibling)}if(mf(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(R(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){ft=$n(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}ft=null}}else ft=mt?$n(e.stateNode.nextSibling):null;return!0}function Pm(){for(var e=ft;e;)e=$n(e.nextSibling)}function lo(){ft=mt=null,_e=!1}function Nu(e){It===null?It=[e]:It.push(e)}var h1=Cn.ReactCurrentBatchConfig;function Oo(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(R(309));var r=n.stateNode}if(!r)throw Error(R(147,e));var o=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(i){var a=o.refs;i===null?delete a[s]:a[s]=i},t._stringRef=s,t)}if(typeof e!="string")throw Error(R(284));if(!n._owner)throw Error(R(290,e))}return e}function si(e,t){throw e=Object.prototype.toString.call(t),Error(R(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function hf(e){var t=e._init;return t(e._payload)}function jm(e){function t(v,d){if(e){var y=v.deletions;y===null?(v.deletions=[d],v.flags|=16):y.push(d)}}function n(v,d){if(!e)return null;for(;d!==null;)t(v,d),d=d.sibling;return null}function r(v,d){for(v=new Map;d!==null;)d.key!==null?v.set(d.key,d):v.set(d.index,d),d=d.sibling;return v}function o(v,d){return v=Un(v,d),v.index=0,v.sibling=null,v}function s(v,d,y){return v.index=y,e?(y=v.alternate,y!==null?(y=y.index,y<d?(v.flags|=2,d):y):(v.flags|=2,d)):(v.flags|=1048576,d)}function i(v){return e&&v.alternate===null&&(v.flags|=2),v}function a(v,d,y,C){return d===null||d.tag!==6?(d=Rl(y,v.mode,C),d.return=v,d):(d=o(d,y),d.return=v,d)}function l(v,d,y,C){var k=y.type;return k===Dr?u(v,d,y.props.children,C,y.key):d!==null&&(d.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Rn&&hf(k)===d.type)?(C=o(d,y.props),C.ref=Oo(v,d,y),C.return=v,C):(C=Ri(y.type,y.key,y.props,null,v.mode,C),C.ref=Oo(v,d,y),C.return=v,C)}function c(v,d,y,C){return d===null||d.tag!==4||d.stateNode.containerInfo!==y.containerInfo||d.stateNode.implementation!==y.implementation?(d=Pl(y,v.mode,C),d.return=v,d):(d=o(d,y.children||[]),d.return=v,d)}function u(v,d,y,C,k){return d===null||d.tag!==7?(d=gr(y,v.mode,C,k),d.return=v,d):(d=o(d,y),d.return=v,d)}function f(v,d,y){if(typeof d=="string"&&d!==""||typeof d=="number")return d=Rl(""+d,v.mode,y),d.return=v,d;if(typeof d=="object"&&d!==null){switch(d.$$typeof){case Ks:return y=Ri(d.type,d.key,d.props,null,v.mode,y),y.ref=Oo(v,null,d),y.return=v,y;case Lr:return d=Pl(d,v.mode,y),d.return=v,d;case Rn:var C=d._init;return f(v,C(d._payload),y)}if($o(d)||To(d))return d=gr(d,v.mode,y,null),d.return=v,d;si(v,d)}return null}function g(v,d,y,C){var k=d!==null?d.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return k!==null?null:a(v,d,""+y,C);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Ks:return y.key===k?l(v,d,y,C):null;case Lr:return y.key===k?c(v,d,y,C):null;case Rn:return k=y._init,g(v,d,k(y._payload),C)}if($o(y)||To(y))return k!==null?null:u(v,d,y,C,null);si(v,y)}return null}function x(v,d,y,C,k){if(typeof C=="string"&&C!==""||typeof C=="number")return v=v.get(y)||null,a(d,v,""+C,k);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case Ks:return v=v.get(C.key===null?y:C.key)||null,l(d,v,C,k);case Lr:return v=v.get(C.key===null?y:C.key)||null,c(d,v,C,k);case Rn:var T=C._init;return x(v,d,y,T(C._payload),k)}if($o(C)||To(C))return v=v.get(y)||null,u(d,v,C,k,null);si(d,C)}return null}function w(v,d,y,C){for(var k=null,T=null,b=d,E=d=0,I=null;b!==null&&E<y.length;E++){b.index>E?(I=b,b=null):I=b.sibling;var j=g(v,b,y[E],C);if(j===null){b===null&&(b=I);break}e&&b&&j.alternate===null&&t(v,b),d=s(j,d,E),T===null?k=j:T.sibling=j,T=j,b=I}if(E===y.length)return n(v,b),_e&&lr(v,E),k;if(b===null){for(;E<y.length;E++)b=f(v,y[E],C),b!==null&&(d=s(b,d,E),T===null?k=b:T.sibling=b,T=b);return _e&&lr(v,E),k}for(b=r(v,b);E<y.length;E++)I=x(b,v,E,y[E],C),I!==null&&(e&&I.alternate!==null&&b.delete(I.key===null?E:I.key),d=s(I,d,E),T===null?k=I:T.sibling=I,T=I);return e&&b.forEach(function(V){return t(v,V)}),_e&&lr(v,E),k}function m(v,d,y,C){var k=To(y);if(typeof k!="function")throw Error(R(150));if(y=k.call(y),y==null)throw Error(R(151));for(var T=k=null,b=d,E=d=0,I=null,j=y.next();b!==null&&!j.done;E++,j=y.next()){b.index>E?(I=b,b=null):I=b.sibling;var V=g(v,b,j.value,C);if(V===null){b===null&&(b=I);break}e&&b&&V.alternate===null&&t(v,b),d=s(V,d,E),T===null?k=V:T.sibling=V,T=V,b=I}if(j.done)return n(v,b),_e&&lr(v,E),k;if(b===null){for(;!j.done;E++,j=y.next())j=f(v,j.value,C),j!==null&&(d=s(j,d,E),T===null?k=j:T.sibling=j,T=j);return _e&&lr(v,E),k}for(b=r(v,b);!j.done;E++,j=y.next())j=x(b,v,E,j.value,C),j!==null&&(e&&j.alternate!==null&&b.delete(j.key===null?E:j.key),d=s(j,d,E),T===null?k=j:T.sibling=j,T=j);return e&&b.forEach(function(M){return t(v,M)}),_e&&lr(v,E),k}function _(v,d,y,C){if(typeof y=="object"&&y!==null&&y.type===Dr&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Ks:e:{for(var k=y.key,T=d;T!==null;){if(T.key===k){if(k=y.type,k===Dr){if(T.tag===7){n(v,T.sibling),d=o(T,y.props.children),d.return=v,v=d;break e}}else if(T.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Rn&&hf(k)===T.type){n(v,T.sibling),d=o(T,y.props),d.ref=Oo(v,T,y),d.return=v,v=d;break e}n(v,T);break}else t(v,T);T=T.sibling}y.type===Dr?(d=gr(y.props.children,v.mode,C,y.key),d.return=v,v=d):(C=Ri(y.type,y.key,y.props,null,v.mode,C),C.ref=Oo(v,d,y),C.return=v,v=C)}return i(v);case Lr:e:{for(T=y.key;d!==null;){if(d.key===T)if(d.tag===4&&d.stateNode.containerInfo===y.containerInfo&&d.stateNode.implementation===y.implementation){n(v,d.sibling),d=o(d,y.children||[]),d.return=v,v=d;break e}else{n(v,d);break}else t(v,d);d=d.sibling}d=Pl(y,v.mode,C),d.return=v,v=d}return i(v);case Rn:return T=y._init,_(v,d,T(y._payload),C)}if($o(y))return w(v,d,y,C);if(To(y))return m(v,d,y,C);si(v,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,d!==null&&d.tag===6?(n(v,d.sibling),d=o(d,y),d.return=v,v=d):(n(v,d),d=Rl(y,v.mode,C),d.return=v,v=d),i(v)):n(v,d)}return _}var co=jm(!0),Im=jm(!1),qi=er(null),Ki=null,Wr=null,Tu=null;function Ru(){Tu=Wr=Ki=null}function Pu(e){var t=qi.current;we(qi),e._currentValue=t}function Sc(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function eo(e,t){Ki=e,Tu=Wr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(it=!0),e.firstContext=null)}function Et(e){var t=e._currentValue;if(Tu!==e)if(e={context:e,memoizedValue:t,next:null},Wr===null){if(Ki===null)throw Error(R(308));Wr=e,Ki.dependencies={lanes:0,firstContext:e}}else Wr=Wr.next=e;return t}var fr=null;function ju(e){fr===null?fr=[e]:fr.push(e)}function Om(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,ju(t)):(n.next=o.next,o.next=n),t.interleaved=n,gn(e,r)}function gn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Pn=!1;function Iu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Mm(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function pn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Fn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,se&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,gn(e,n)}return o=r.interleaved,o===null?(t.next=t,ju(r)):(t.next=o.next,o.next=t),r.interleaved=t,gn(e,n)}function Ci(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,vu(e,n)}}function gf(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?o=s=i:s=s.next=i,n=n.next}while(n!==null);s===null?o=s=t:s=s.next=t}else o=s=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Gi(e,t,n,r){var o=e.updateQueue;Pn=!1;var s=o.firstBaseUpdate,i=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,c=l.next;l.next=null,i===null?s=c:i.next=c,i=l;var u=e.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==i&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(s!==null){var f=o.baseState;i=0,u=c=l=null,a=s;do{var g=a.lane,x=a.eventTime;if((r&g)===g){u!==null&&(u=u.next={eventTime:x,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var w=e,m=a;switch(g=t,x=n,m.tag){case 1:if(w=m.payload,typeof w=="function"){f=w.call(x,f,g);break e}f=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=m.payload,g=typeof w=="function"?w.call(x,f,g):w,g==null)break e;f=be({},f,g);break e;case 2:Pn=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,g=o.effects,g===null?o.effects=[a]:g.push(a))}else x={eventTime:x,lane:g,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=x,l=f):u=u.next=x,i|=g;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;g=a,a=g.next,g.next=null,o.lastBaseUpdate=g,o.shared.pending=null}}while(!0);if(u===null&&(l=f),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,t=o.shared.interleaved,t!==null){o=t;do i|=o.lane,o=o.next;while(o!==t)}else s===null&&(o.shared.lanes=0);_r|=i,e.lanes=i,e.memoizedState=f}}function vf(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(R(191,o));o.call(r)}}}var Fs={},Qt=er(Fs),fs=er(Fs),ps=er(Fs);function pr(e){if(e===Fs)throw Error(R(174));return e}function Ou(e,t){switch(ge(ps,t),ge(fs,e),ge(Qt,Fs),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:tc(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=tc(t,e)}we(Qt),ge(Qt,t)}function uo(){we(Qt),we(fs),we(ps)}function Am(e){pr(ps.current);var t=pr(Qt.current),n=tc(t,e.type);t!==n&&(ge(fs,e),ge(Qt,n))}function Mu(e){fs.current===e&&(we(Qt),we(fs))}var ke=er(0);function Qi(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 Cl=[];function Au(){for(var e=0;e<Cl.length;e++)Cl[e]._workInProgressVersionPrimary=null;Cl.length=0}var ki=Cn.ReactCurrentDispatcher,kl=Cn.ReactCurrentBatchConfig,Sr=0,Ee=null,Ie=null,Le=null,Yi=!1,Qo=!1,ms=0,g1=0;function Ue(){throw Error(R(321))}function Lu(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Dt(e[n],t[n]))return!1;return!0}function Du(e,t,n,r,o,s){if(Sr=s,Ee=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ki.current=e===null||e.memoizedState===null?w1:S1,e=n(r,o),Qo){s=0;do{if(Qo=!1,ms=0,25<=s)throw Error(R(301));s+=1,Le=Ie=null,t.updateQueue=null,ki.current=_1,e=n(r,o)}while(Qo)}if(ki.current=Xi,t=Ie!==null&&Ie.next!==null,Sr=0,Le=Ie=Ee=null,Yi=!1,t)throw Error(R(300));return e}function zu(){var e=ms!==0;return ms=0,e}function Wt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Le===null?Ee.memoizedState=Le=e:Le=Le.next=e,Le}function bt(){if(Ie===null){var e=Ee.alternate;e=e!==null?e.memoizedState:null}else e=Ie.next;var t=Le===null?Ee.memoizedState:Le.next;if(t!==null)Le=t,Ie=e;else{if(e===null)throw Error(R(310));Ie=e,e={memoizedState:Ie.memoizedState,baseState:Ie.baseState,baseQueue:Ie.baseQueue,queue:Ie.queue,next:null},Le===null?Ee.memoizedState=Le=e:Le=Le.next=e}return Le}function hs(e,t){return typeof t=="function"?t(e):t}function El(e){var t=bt(),n=t.queue;if(n===null)throw Error(R(311));n.lastRenderedReducer=e;var r=Ie,o=r.baseQueue,s=n.pending;if(s!==null){if(o!==null){var i=o.next;o.next=s.next,s.next=i}r.baseQueue=o=s,n.pending=null}if(o!==null){s=o.next,r=r.baseState;var a=i=null,l=null,c=s;do{var u=c.lane;if((Sr&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var f={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=f,i=r):l=l.next=f,Ee.lanes|=u,_r|=u}c=c.next}while(c!==null&&c!==s);l===null?i=r:l.next=a,Dt(r,t.memoizedState)||(it=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do s=o.lane,Ee.lanes|=s,_r|=s,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function bl(e){var t=bt(),n=t.queue;if(n===null)throw Error(R(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,s=t.memoizedState;if(o!==null){n.pending=null;var i=o=o.next;do s=e(s,i.action),i=i.next;while(i!==o);Dt(s,t.memoizedState)||(it=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function Lm(){}function Dm(e,t){var n=Ee,r=bt(),o=t(),s=!Dt(r.memoizedState,o);if(s&&(r.memoizedState=o,it=!0),r=r.queue,$u(Fm.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Le!==null&&Le.memoizedState.tag&1){if(n.flags|=2048,gs(9,$m.bind(null,n,r,o,t),void 0,null),De===null)throw Error(R(349));Sr&30||zm(n,t,o)}return o}function zm(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ee.updateQueue,t===null?(t={lastEffect:null,stores:null},Ee.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function $m(e,t,n,r){t.value=n,t.getSnapshot=r,Vm(t)&&Bm(e)}function Fm(e,t,n){return n(function(){Vm(t)&&Bm(e)})}function Vm(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Dt(e,n)}catch{return!0}}function Bm(e){var t=gn(e,1);t!==null&&At(t,e,1,-1)}function yf(e){var t=Wt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:hs,lastRenderedState:e},t.queue=e,e=e.dispatch=x1.bind(null,Ee,e),[t.memoizedState,e]}function gs(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ee.updateQueue,t===null?(t={lastEffect:null,stores:null},Ee.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Um(){return bt().memoizedState}function Ei(e,t,n,r){var o=Wt();Ee.flags|=e,o.memoizedState=gs(1|t,n,void 0,r===void 0?null:r)}function ba(e,t,n,r){var o=bt();r=r===void 0?null:r;var s=void 0;if(Ie!==null){var i=Ie.memoizedState;if(s=i.destroy,r!==null&&Lu(r,i.deps)){o.memoizedState=gs(t,n,s,r);return}}Ee.flags|=e,o.memoizedState=gs(1|t,n,s,r)}function xf(e,t){return Ei(8390656,8,e,t)}function $u(e,t){return ba(2048,8,e,t)}function Hm(e,t){return ba(4,2,e,t)}function Wm(e,t){return ba(4,4,e,t)}function Zm(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function qm(e,t,n){return n=n!=null?n.concat([e]):null,ba(4,4,Zm.bind(null,t,e),n)}function Fu(){}function Km(e,t){var n=bt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Lu(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Gm(e,t){var n=bt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Lu(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Qm(e,t,n){return Sr&21?(Dt(n,t)||(n=tm(),Ee.lanes|=n,_r|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,it=!0),e.memoizedState=n)}function v1(e,t){var n=de;de=n!==0&&4>n?n:4,e(!0);var r=kl.transition;kl.transition={};try{e(!1),t()}finally{de=n,kl.transition=r}}function Ym(){return bt().memoizedState}function y1(e,t,n){var r=Bn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Xm(e))Jm(t,n);else if(n=Om(e,t,n,r),n!==null){var o=Xe();At(n,e,r,o),eh(n,t,r)}}function x1(e,t,n){var r=Bn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Xm(e))Jm(t,o);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var i=t.lastRenderedState,a=s(i,n);if(o.hasEagerState=!0,o.eagerState=a,Dt(a,i)){var l=t.interleaved;l===null?(o.next=o,ju(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}n=Om(e,t,o,r),n!==null&&(o=Xe(),At(n,e,r,o),eh(n,t,r))}}function Xm(e){var t=e.alternate;return e===Ee||t!==null&&t===Ee}function Jm(e,t){Qo=Yi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function eh(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,vu(e,n)}}var Xi={readContext:Et,useCallback:Ue,useContext:Ue,useEffect:Ue,useImperativeHandle:Ue,useInsertionEffect:Ue,useLayoutEffect:Ue,useMemo:Ue,useReducer:Ue,useRef:Ue,useState:Ue,useDebugValue:Ue,useDeferredValue:Ue,useTransition:Ue,useMutableSource:Ue,useSyncExternalStore:Ue,useId:Ue,unstable_isNewReconciler:!1},w1={readContext:Et,useCallback:function(e,t){return Wt().memoizedState=[e,t===void 0?null:t],e},useContext:Et,useEffect:xf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ei(4194308,4,Zm.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ei(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ei(4,2,e,t)},useMemo:function(e,t){var n=Wt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Wt();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=y1.bind(null,Ee,e),[r.memoizedState,e]},useRef:function(e){var t=Wt();return e={current:e},t.memoizedState=e},useState:yf,useDebugValue:Fu,useDeferredValue:function(e){return Wt().memoizedState=e},useTransition:function(){var e=yf(!1),t=e[0];return e=v1.bind(null,e[1]),Wt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ee,o=Wt();if(_e){if(n===void 0)throw Error(R(407));n=n()}else{if(n=t(),De===null)throw Error(R(349));Sr&30||zm(r,t,n)}o.memoizedState=n;var s={value:n,getSnapshot:t};return o.queue=s,xf(Fm.bind(null,r,s,e),[e]),r.flags|=2048,gs(9,$m.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=Wt(),t=De.identifierPrefix;if(_e){var n=dn,r=un;n=(r&~(1<<32-Mt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ms++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=g1++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},S1={readContext:Et,useCallback:Km,useContext:Et,useEffect:$u,useImperativeHandle:qm,useInsertionEffect:Hm,useLayoutEffect:Wm,useMemo:Gm,useReducer:El,useRef:Um,useState:function(){return El(hs)},useDebugValue:Fu,useDeferredValue:function(e){var t=bt();return Qm(t,Ie.memoizedState,e)},useTransition:function(){var e=El(hs)[0],t=bt().memoizedState;return[e,t]},useMutableSource:Lm,useSyncExternalStore:Dm,useId:Ym,unstable_isNewReconciler:!1},_1={readContext:Et,useCallback:Km,useContext:Et,useEffect:$u,useImperativeHandle:qm,useInsertionEffect:Hm,useLayoutEffect:Wm,useMemo:Gm,useReducer:bl,useRef:Um,useState:function(){return bl(hs)},useDebugValue:Fu,useDeferredValue:function(e){var t=bt();return Ie===null?t.memoizedState=e:Qm(t,Ie.memoizedState,e)},useTransition:function(){var e=bl(hs)[0],t=bt().memoizedState;return[e,t]},useMutableSource:Lm,useSyncExternalStore:Dm,useId:Ym,unstable_isNewReconciler:!1};function Pt(e,t){if(e&&e.defaultProps){t=be({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function _c(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:be({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Na={isMounted:function(e){return(e=e._reactInternals)?Rr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Xe(),o=Bn(e),s=pn(r,o);s.payload=t,n!=null&&(s.callback=n),t=Fn(e,s,o),t!==null&&(At(t,e,o,r),Ci(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Xe(),o=Bn(e),s=pn(r,o);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Fn(e,s,o),t!==null&&(At(t,e,o,r),Ci(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Xe(),r=Bn(e),o=pn(n,r);o.tag=2,t!=null&&(o.callback=t),t=Fn(e,o,r),t!==null&&(At(t,e,r,n),Ci(t,e,r))}};function wf(e,t,n,r,o,s,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,i):t.prototype&&t.prototype.isPureReactComponent?!ls(n,r)||!ls(o,s):!0}function th(e,t,n){var r=!1,o=Wn,s=t.contextType;return typeof s=="object"&&s!==null?s=Et(s):(o=lt(t)?xr:qe.current,r=t.contextTypes,s=(r=r!=null)?ao(e,o):Wn),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Na,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=s),t}function Sf(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Na.enqueueReplaceState(t,t.state,null)}function Cc(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Iu(e);var s=t.contextType;typeof s=="object"&&s!==null?o.context=Et(s):(s=lt(t)?xr:qe.current,o.context=ao(e,s)),o.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(_c(e,t,s,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&Na.enqueueReplaceState(o,o.state,null),Gi(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function fo(e,t){try{var n="",r=t;do n+=Qy(r),r=r.return;while(r);var o=n}catch(s){o=`
39
39
  Error generating stack: `+s.message+`
40
- `+s.stack}return{value:e,source:t,stack:o,digest:null}}function Nl(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function kc(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var C1=typeof WeakMap=="function"?WeakMap:Map;function nh(e,t,n){n=pn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ea||(ea=!0,Mc=r),kc(e,t)},n}function rh(e,t,n){n=pn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){kc(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){kc(e,t),typeof r!="function"&&(Vn===null?Vn=new Set([this]):Vn.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function _f(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new C1;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=D1.bind(null,e,t,n),t.then(e,e))}function Cf(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function kf(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=pn(-1,1),t.tag=2,Fn(n,t,1))),n.lanes|=1),e)}var k1=Cn.ReactCurrentOwner,it=!1;function Qe(e,t,n,r){t.child=e===null?Im(t,null,n,r):co(t,e.child,n,r)}function Ef(e,t,n,r,o){n=n.render;var s=t.ref;return eo(t,o),r=Du(e,t,n,r,s,o),n=zu(),e!==null&&!it?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,vn(e,t,o)):(_e&&n&&Eu(t),t.flags|=1,Qe(e,t,r,o),t.child)}function bf(e,t,n,r,o){if(e===null){var s=n.type;return typeof s=="function"&&!Ku(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,oh(e,t,s,r,o)):(e=Ri(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&o)){var i=s.memoizedProps;if(n=n.compare,n=n!==null?n:ls,n(i,r)&&e.ref===t.ref)return vn(e,t,o)}return t.flags|=1,e=Un(s,r),e.ref=t.ref,e.return=t,t.child=e}function oh(e,t,n,r,o){if(e!==null){var s=e.memoizedProps;if(ls(s,r)&&e.ref===t.ref)if(it=!1,t.pendingProps=r=s,(e.lanes&o)!==0)e.flags&131072&&(it=!0);else return t.lanes=e.lanes,vn(e,t,o)}return Ec(e,t,n,r,o)}function sh(e,t,n){var r=t.pendingProps,o=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ge(qr,ut),ut|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ge(qr,ut),ut|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,ge(qr,ut),ut|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,ge(qr,ut),ut|=r;return Qe(e,t,o,n),t.child}function ih(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ec(e,t,n,r,o){var s=lt(n)?xr:qe.current;return s=ao(t,s),eo(t,o),n=Du(e,t,n,r,s,o),r=zu(),e!==null&&!it?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,vn(e,t,o)):(_e&&r&&Eu(t),t.flags|=1,Qe(e,t,n,o),t.child)}function Nf(e,t,n,r,o){if(lt(n)){var s=!0;Hi(t)}else s=!1;if(eo(t,o),t.stateNode===null)bi(e,t),th(t,n,r),Cc(t,n,r,o),r=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var l=i.context,c=n.contextType;typeof c=="object"&&c!==null?c=Et(c):(c=lt(n)?xr:qe.current,c=ao(t,c));var u=n.getDerivedStateFromProps,f=typeof u=="function"||typeof i.getSnapshotBeforeUpdate=="function";f||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==r||l!==c)&&Sf(t,i,r,c),Pn=!1;var g=t.memoizedState;i.state=g,Gi(t,r,i,o),l=t.memoizedState,a!==r||g!==l||at.current||Pn?(typeof u=="function"&&(_c(t,n,u,r),l=t.memoizedState),(a=Pn||wf(t,n,a,r,g,l,c))?(f||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),i.props=r,i.state=l,i.context=c,r=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Mm(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:Pt(t.type,a),i.props=c,f=t.pendingProps,g=i.context,l=n.contextType,typeof l=="object"&&l!==null?l=Et(l):(l=lt(n)?xr:qe.current,l=ao(t,l));var x=n.getDerivedStateFromProps;(u=typeof x=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==f||g!==l)&&Sf(t,i,r,l),Pn=!1,g=t.memoizedState,i.state=g,Gi(t,r,i,o);var w=t.memoizedState;a!==f||g!==w||at.current||Pn?(typeof x=="function"&&(_c(t,n,x,r),w=t.memoizedState),(c=Pn||wf(t,n,c,r,g,w,l)||!1)?(u||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,w,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,w,l)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=w),i.props=r,i.state=w,i.context=l,r=c):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),r=!1)}return bc(e,t,n,r,s,o)}function bc(e,t,n,r,o,s){ih(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return o&&ff(t,n,!1),vn(e,t,s);r=t.stateNode,k1.current=t;var a=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=co(t,e.child,null,s),t.child=co(t,null,a,s)):Qe(e,t,a,s),t.memoizedState=r.state,o&&ff(t,n,!0),t.child}function ah(e){var t=e.stateNode;t.pendingContext?df(e,t.pendingContext,t.pendingContext!==t.context):t.context&&df(e,t.context,!1),Ou(e,t.containerInfo)}function Tf(e,t,n,r,o){return lo(),Nu(o),t.flags|=256,Qe(e,t,n,r),t.child}var Nc={dehydrated:null,treeContext:null,retryLane:0};function Tc(e){return{baseLanes:e,cachePool:null,transitions:null}}function lh(e,t,n){var r=t.pendingProps,o=ke.current,s=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(o&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),ge(ke,o&1),e===null)return wc(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=r.children,e=r.fallback,s?(r=t.mode,s=t.child,i={mode:"hidden",children:i},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=i):s=Pa(i,r,0,null),e=gr(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Tc(n),t.memoizedState=Nc,e):Vu(t,i));if(o=e.memoizedState,o!==null&&(a=o.dehydrated,a!==null))return E1(e,t,i,r,a,o,n);if(s){s=r.fallback,i=t.mode,o=e.child,a=o.sibling;var l={mode:"hidden",children:r.children};return!(i&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Un(o,l),r.subtreeFlags=o.subtreeFlags&14680064),a!==null?s=Un(a,s):(s=gr(s,i,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,i=e.child.memoizedState,i=i===null?Tc(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},s.memoizedState=i,s.childLanes=e.childLanes&~n,t.memoizedState=Nc,r}return s=e.child,e=s.sibling,r=Un(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Vu(e,t){return t=Pa({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ii(e,t,n,r){return r!==null&&Nu(r),co(t,e.child,null,n),e=Vu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function E1(e,t,n,r,o,s,i){if(n)return t.flags&256?(t.flags&=-257,r=Nl(Error(R(422))),ii(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,o=t.mode,r=Pa({mode:"visible",children:r.children},o,0,null),s=gr(s,o,i,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&co(t,e.child,null,i),t.child.memoizedState=Tc(i),t.memoizedState=Nc,s);if(!(t.mode&1))return ii(e,t,i,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(R(419)),r=Nl(s,r,void 0),ii(e,t,i,r)}if(a=(i&e.childLanes)!==0,it||a){if(r=De,r!==null){switch(i&-i){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|i)?0:o,o!==0&&o!==s.retryLane&&(s.retryLane=o,gn(e,o),At(r,e,o,-1))}return qu(),r=Nl(Error(R(421))),ii(e,t,i,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=z1.bind(null,e),o._reactRetry=t,null):(e=s.treeContext,ft=$n(o.nextSibling),mt=t,_e=!0,It=null,e!==null&&(St[_t++]=un,St[_t++]=dn,St[_t++]=wr,un=e.id,dn=e.overflow,wr=t),t=Vu(t,r.children),t.flags|=4096,t)}function Rf(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Sc(e.return,t,n)}function Tl(e,t,n,r,o){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=o)}function ch(e,t,n){var r=t.pendingProps,o=r.revealOrder,s=r.tail;if(Qe(e,t,r.children,n),r=ke.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Rf(e,n,t);else if(e.tag===19)Rf(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ge(ke,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Qi(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Tl(t,!1,o,n,s);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Qi(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Tl(t,!0,n,null,s);break;case"together":Tl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function bi(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function vn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),_r|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(R(153));if(t.child!==null){for(e=t.child,n=Un(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Un(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function b1(e,t,n){switch(t.tag){case 3:ah(t),lo();break;case 5:Am(t);break;case 1:lt(t.type)&&Hi(t);break;case 4:Ou(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;ge(qi,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ge(ke,ke.current&1),t.flags|=128,null):n&t.child.childLanes?lh(e,t,n):(ge(ke,ke.current&1),e=vn(e,t,n),e!==null?e.sibling:null);ge(ke,ke.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return ch(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),ge(ke,ke.current),r)break;return null;case 22:case 23:return t.lanes=0,sh(e,t,n)}return vn(e,t,n)}var uh,Rc,dh,fh;uh=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Rc=function(){};dh=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,pr(Qt.current);var s=null;switch(n){case"input":o=Yl(e,o),r=Yl(e,r),s=[];break;case"select":o=be({},o,{value:void 0}),r=be({},r,{value:void 0}),s=[];break;case"textarea":o=ec(e,o),r=ec(e,r),s=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Bi)}nc(n,r);var i;n=null;for(c in o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&o[c]!=null)if(c==="style"){var a=o[c];for(i in a)a.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(ts.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var l=r[c];if(a=o!=null?o[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(i in a)!a.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in l)l.hasOwnProperty(i)&&a[i]!==l[i]&&(n||(n={}),n[i]=l[i])}else n||(s||(s=[]),s.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(ts.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&xe("scroll",e),s||a===l||(s=[])):(s=s||[]).push(c,l))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}};fh=function(e,t,n,r){n!==r&&(t.flags|=4)};function Mo(e,t){if(!_e)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function He(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function N1(e,t,n){var r=t.pendingProps;switch(bu(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return He(t),null;case 1:return lt(t.type)&&Ui(),He(t),null;case 3:return r=t.stateNode,uo(),we(at),we(qe),Au(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(oi(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,It!==null&&(Dc(It),It=null))),Rc(e,t),He(t),null;case 5:Mu(t);var o=pr(ps.current);if(n=t.type,e!==null&&t.stateNode!=null)dh(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(R(166));return He(t),null}if(e=pr(Qt.current),oi(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Zt]=t,r[ds]=s,e=(t.mode&1)!==0,n){case"dialog":xe("cancel",r),xe("close",r);break;case"iframe":case"object":case"embed":xe("load",r);break;case"video":case"audio":for(o=0;o<Vo.length;o++)xe(Vo[o],r);break;case"source":xe("error",r);break;case"img":case"image":case"link":xe("error",r),xe("load",r);break;case"details":xe("toggle",r);break;case"input":Dd(r,s),xe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},xe("invalid",r);break;case"textarea":$d(r,s),xe("invalid",r)}nc(n,s),o=null;for(var i in s)if(s.hasOwnProperty(i)){var a=s[i];i==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&ri(r.textContent,a,e),o=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&ri(r.textContent,a,e),o=["children",""+a]):ts.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&xe("scroll",r)}switch(n){case"input":Gs(r),zd(r,s,!0);break;case"textarea":Gs(r),Fd(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Bi)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Fp(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[Zt]=t,e[ds]=r,uh(e,t,!1,!1),t.stateNode=e;e:{switch(i=rc(n,r),n){case"dialog":xe("cancel",e),xe("close",e),o=r;break;case"iframe":case"object":case"embed":xe("load",e),o=r;break;case"video":case"audio":for(o=0;o<Vo.length;o++)xe(Vo[o],e);o=r;break;case"source":xe("error",e),o=r;break;case"img":case"image":case"link":xe("error",e),xe("load",e),o=r;break;case"details":xe("toggle",e),o=r;break;case"input":Dd(e,r),o=Yl(e,r),xe("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=be({},r,{value:void 0}),xe("invalid",e);break;case"textarea":$d(e,r),o=ec(e,r),xe("invalid",e);break;default:o=r}nc(n,o),a=o;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?Up(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Vp(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&ns(e,l):typeof l=="number"&&ns(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(ts.hasOwnProperty(s)?l!=null&&s==="onScroll"&&xe("scroll",e):l!=null&&du(e,s,l,i))}switch(n){case"input":Gs(e),zd(e,r,!1);break;case"textarea":Gs(e),Fd(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Hn(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?Qr(e,!!r.multiple,s,!1):r.defaultValue!=null&&Qr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Bi)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return He(t),null;case 6:if(e&&t.stateNode!=null)fh(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(R(166));if(n=pr(ps.current),pr(Qt.current),oi(t)){if(r=t.stateNode,n=t.memoizedProps,r[Zt]=t,(s=r.nodeValue!==n)&&(e=mt,e!==null))switch(e.tag){case 3:ri(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ri(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Zt]=t,t.stateNode=r}return He(t),null;case 13:if(we(ke),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(_e&&ft!==null&&t.mode&1&&!(t.flags&128))Pm(),lo(),t.flags|=98560,s=!1;else if(s=oi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(R(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(R(317));s[Zt]=t}else lo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;He(t),s=!1}else It!==null&&(Dc(It),It=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||ke.current&1?Oe===0&&(Oe=3):qu())),t.updateQueue!==null&&(t.flags|=4),He(t),null);case 4:return uo(),Rc(e,t),e===null&&cs(t.stateNode.containerInfo),He(t),null;case 10:return Pu(t.type._context),He(t),null;case 17:return lt(t.type)&&Ui(),He(t),null;case 19:if(we(ke),s=t.memoizedState,s===null)return He(t),null;if(r=(t.flags&128)!==0,i=s.rendering,i===null)if(r)Mo(s,!1);else{if(Oe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Qi(e),i!==null){for(t.flags|=128,Mo(s,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,i=s.alternate,i===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=i.childLanes,s.lanes=i.lanes,s.child=i.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=i.memoizedProps,s.memoizedState=i.memoizedState,s.updateQueue=i.updateQueue,s.type=i.type,e=i.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ge(ke,ke.current&1|2),t.child}e=e.sibling}s.tail!==null&&Re()>po&&(t.flags|=128,r=!0,Mo(s,!1),t.lanes=4194304)}else{if(!r)if(e=Qi(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Mo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!i.alternate&&!_e)return He(t),null}else 2*Re()-s.renderingStartTime>po&&n!==1073741824&&(t.flags|=128,r=!0,Mo(s,!1),t.lanes=4194304);s.isBackwards?(i.sibling=t.child,t.child=i):(n=s.last,n!==null?n.sibling=i:t.child=i,s.last=i)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Re(),t.sibling=null,n=ke.current,ge(ke,r?n&1|2:n&1),t):(He(t),null);case 22:case 23:return Zu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ut&1073741824&&(He(t),t.subtreeFlags&6&&(t.flags|=8192)):He(t),null;case 24:return null;case 25:return null}throw Error(R(156,t.tag))}function T1(e,t){switch(bu(t),t.tag){case 1:return lt(t.type)&&Ui(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return uo(),we(at),we(qe),Au(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Mu(t),null;case 13:if(we(ke),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(R(340));lo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return we(ke),null;case 4:return uo(),null;case 10:return Pu(t.type._context),null;case 22:case 23:return Zu(),null;case 24:return null;default:return null}}var ai=!1,We=!1,R1=typeof WeakSet=="function"?WeakSet:Set,$=null;function Zr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ne(e,t,r)}else n.current=null}function Pc(e,t,n){try{n()}catch(r){Ne(e,t,r)}}var Pf=!1;function P1(e,t){if(pc=$i,e=vm(),ku(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,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var i=0,a=-1,l=-1,c=0,u=0,f=e,g=null;t:for(;;){for(var x;f!==n||o!==0&&f.nodeType!==3||(a=i+o),f!==s||r!==0&&f.nodeType!==3||(l=i+r),f.nodeType===3&&(i+=f.nodeValue.length),(x=f.firstChild)!==null;)g=f,f=x;for(;;){if(f===e)break t;if(g===n&&++c===o&&(a=i),g===s&&++u===r&&(l=i),(x=f.nextSibling)!==null)break;f=g,g=f.parentNode}f=x}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(mc={focusedElem:e,selectionRange:n},$i=!1,$=t;$!==null;)if(t=$,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$=e;else for(;$!==null;){t=$;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var m=w.memoizedProps,_=w.memoizedState,v=t.stateNode,d=v.getSnapshotBeforeUpdate(t.elementType===t.type?m:Pt(t.type,m),_);v.__reactInternalSnapshotBeforeUpdate=d}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(R(163))}}catch(C){Ne(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,$=e;break}$=t.return}return w=Pf,Pf=!1,w}function Yo(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 s=o.destroy;o.destroy=void 0,s!==void 0&&Pc(t,n,s)}o=o.next}while(o!==r)}}function Ta(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 jc(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 ph(e){var t=e.alternate;t!==null&&(e.alternate=null,ph(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Zt],delete t[ds],delete t[vc],delete t[f1],delete t[p1])),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 mh(e){return e.tag===5||e.tag===3||e.tag===4}function jf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||mh(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 Ic(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=Bi));else if(r!==4&&(e=e.child,e!==null))for(Ic(e,t,n),e=e.sibling;e!==null;)Ic(e,t,n),e=e.sibling}function Oc(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(Oc(e,t,n),e=e.sibling;e!==null;)Oc(e,t,n),e=e.sibling}var Fe=null,jt=!1;function En(e,t,n){for(n=n.child;n!==null;)hh(e,t,n),n=n.sibling}function hh(e,t,n){if(Gt&&typeof Gt.onCommitFiberUnmount=="function")try{Gt.onCommitFiberUnmount(wa,n)}catch{}switch(n.tag){case 5:We||Zr(n,t);case 6:var r=Fe,o=jt;Fe=null,En(e,t,n),Fe=r,jt=o,Fe!==null&&(jt?(e=Fe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Fe.removeChild(n.stateNode));break;case 18:Fe!==null&&(jt?(e=Fe,n=n.stateNode,e.nodeType===8?Sl(e.parentNode,n):e.nodeType===1&&Sl(e,n),is(e)):Sl(Fe,n.stateNode));break;case 4:r=Fe,o=jt,Fe=n.stateNode.containerInfo,jt=!0,En(e,t,n),Fe=r,jt=o;break;case 0:case 11:case 14:case 15:if(!We&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var s=o,i=s.destroy;s=s.tag,i!==void 0&&(s&2||s&4)&&Pc(n,t,i),o=o.next}while(o!==r)}En(e,t,n);break;case 1:if(!We&&(Zr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ne(n,t,a)}En(e,t,n);break;case 21:En(e,t,n);break;case 22:n.mode&1?(We=(r=We)||n.memoizedState!==null,En(e,t,n),We=r):En(e,t,n);break;default:En(e,t,n)}}function If(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new R1),t.forEach(function(r){var o=$1.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Tt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var s=e,i=t,a=i;e:for(;a!==null;){switch(a.tag){case 5:Fe=a.stateNode,jt=!1;break e;case 3:Fe=a.stateNode.containerInfo,jt=!0;break e;case 4:Fe=a.stateNode.containerInfo,jt=!0;break e}a=a.return}if(Fe===null)throw Error(R(160));hh(s,i,o),Fe=null,jt=!1;var l=o.alternate;l!==null&&(l.return=null),o.return=null}catch(c){Ne(o,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)gh(t,e),t=t.sibling}function gh(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Tt(t,e),Ht(e),r&4){try{Yo(3,e,e.return),Ta(3,e)}catch(m){Ne(e,e.return,m)}try{Yo(5,e,e.return)}catch(m){Ne(e,e.return,m)}}break;case 1:Tt(t,e),Ht(e),r&512&&n!==null&&Zr(n,n.return);break;case 5:if(Tt(t,e),Ht(e),r&512&&n!==null&&Zr(n,n.return),e.flags&32){var o=e.stateNode;try{ns(o,"")}catch(m){Ne(e,e.return,m)}}if(r&4&&(o=e.stateNode,o!=null)){var s=e.memoizedProps,i=n!==null?n.memoizedProps:s,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&zp(o,s),rc(a,i);var c=rc(a,s);for(i=0;i<l.length;i+=2){var u=l[i],f=l[i+1];u==="style"?Up(o,f):u==="dangerouslySetInnerHTML"?Vp(o,f):u==="children"?ns(o,f):du(o,u,f,c)}switch(a){case"input":Xl(o,s);break;case"textarea":$p(o,s);break;case"select":var g=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!s.multiple;var x=s.value;x!=null?Qr(o,!!s.multiple,x,!1):g!==!!s.multiple&&(s.defaultValue!=null?Qr(o,!!s.multiple,s.defaultValue,!0):Qr(o,!!s.multiple,s.multiple?[]:"",!1))}o[ds]=s}catch(m){Ne(e,e.return,m)}}break;case 6:if(Tt(t,e),Ht(e),r&4){if(e.stateNode===null)throw Error(R(162));o=e.stateNode,s=e.memoizedProps;try{o.nodeValue=s}catch(m){Ne(e,e.return,m)}}break;case 3:if(Tt(t,e),Ht(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{is(t.containerInfo)}catch(m){Ne(e,e.return,m)}break;case 4:Tt(t,e),Ht(e);break;case 13:Tt(t,e),Ht(e),o=e.child,o.flags&8192&&(s=o.memoizedState!==null,o.stateNode.isHidden=s,!s||o.alternate!==null&&o.alternate.memoizedState!==null||(Hu=Re())),r&4&&If(e);break;case 22:if(u=n!==null&&n.memoizedState!==null,e.mode&1?(We=(c=We)||u,Tt(t,e),We=c):Tt(t,e),Ht(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!u&&e.mode&1)for($=e,u=e.child;u!==null;){for(f=$=u;$!==null;){switch(g=$,x=g.child,g.tag){case 0:case 11:case 14:case 15:Yo(4,g,g.return);break;case 1:Zr(g,g.return);var w=g.stateNode;if(typeof w.componentWillUnmount=="function"){r=g,n=g.return;try{t=r,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(m){Ne(r,n,m)}}break;case 5:Zr(g,g.return);break;case 22:if(g.memoizedState!==null){Mf(f);continue}}x!==null?(x.return=g,$=x):Mf(f)}u=u.sibling}e:for(u=null,f=e;;){if(f.tag===5){if(u===null){u=f;try{o=f.stateNode,c?(s=o.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=f.stateNode,l=f.memoizedProps.style,i=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=Bp("display",i))}catch(m){Ne(e,e.return,m)}}}else if(f.tag===6){if(u===null)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(m){Ne(e,e.return,m)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;u===f&&(u=null),f=f.return}u===f&&(u=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Tt(t,e),Ht(e),r&4&&If(e);break;case 21:break;default:Tt(t,e),Ht(e)}}function Ht(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(mh(n)){var r=n;break e}n=n.return}throw Error(R(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(ns(o,""),r.flags&=-33);var s=jf(e);Oc(e,s,o);break;case 3:case 4:var i=r.stateNode.containerInfo,a=jf(e);Ic(e,a,i);break;default:throw Error(R(161))}}catch(l){Ne(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function j1(e,t,n){$=e,vh(e)}function vh(e,t,n){for(var r=(e.mode&1)!==0;$!==null;){var o=$,s=o.child;if(o.tag===22&&r){var i=o.memoizedState!==null||ai;if(!i){var a=o.alternate,l=a!==null&&a.memoizedState!==null||We;a=ai;var c=We;if(ai=i,(We=l)&&!c)for($=o;$!==null;)i=$,l=i.child,i.tag===22&&i.memoizedState!==null?Af(o):l!==null?(l.return=i,$=l):Af(o);for(;s!==null;)$=s,vh(s),s=s.sibling;$=o,ai=a,We=c}Of(e)}else o.subtreeFlags&8772&&s!==null?(s.return=o,$=s):Of(e)}}function Of(e){for(;$!==null;){var t=$;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:We||Ta(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!We)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:Pt(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&vf(t,s,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}vf(t,i,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var f=u.dehydrated;f!==null&&is(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(R(163))}We||t.flags&512&&jc(t)}catch(g){Ne(t,t.return,g)}}if(t===e){$=null;break}if(n=t.sibling,n!==null){n.return=t.return,$=n;break}$=t.return}}function Mf(e){for(;$!==null;){var t=$;if(t===e){$=null;break}var n=t.sibling;if(n!==null){n.return=t.return,$=n;break}$=t.return}}function Af(e){for(;$!==null;){var t=$;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Ta(4,t)}catch(l){Ne(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(l){Ne(t,o,l)}}var s=t.return;try{jc(t)}catch(l){Ne(t,s,l)}break;case 5:var i=t.return;try{jc(t)}catch(l){Ne(t,i,l)}}}catch(l){Ne(t,t.return,l)}if(t===e){$=null;break}var a=t.sibling;if(a!==null){a.return=t.return,$=a;break}$=t.return}}var I1=Math.ceil,Ji=Cn.ReactCurrentDispatcher,Bu=Cn.ReactCurrentOwner,kt=Cn.ReactCurrentBatchConfig,se=0,De=null,je=null,Ve=0,ut=0,qr=er(0),Oe=0,vs=null,_r=0,Ra=0,Uu=0,Xo=null,st=null,Hu=0,po=1/0,ln=null,ea=!1,Mc=null,Vn=null,li=!1,An=null,ta=0,Jo=0,Ac=null,Ni=-1,Ti=0;function Xe(){return se&6?Re():Ni!==-1?Ni:Ni=Re()}function Bn(e){return e.mode&1?se&2&&Ve!==0?Ve&-Ve:h1.transition!==null?(Ti===0&&(Ti=tm()),Ti):(e=de,e!==0||(e=window.event,e=e===void 0?16:lm(e.type)),e):1}function At(e,t,n,r){if(50<Jo)throw Jo=0,Ac=null,Error(R(185));Ds(e,n,r),(!(se&2)||e!==De)&&(e===De&&(!(se&2)&&(Ra|=n),Oe===4&&In(e,Ve)),ct(e,r),n===1&&se===0&&!(t.mode&1)&&(po=Re()+500,Ea&&tr()))}function ct(e,t){var n=e.callbackNode;h0(e,t);var r=zi(e,e===De?Ve:0);if(r===0)n!==null&&Ud(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Ud(n),t===1)e.tag===0?m1(Lf.bind(null,e)):Nm(Lf.bind(null,e)),u1(function(){!(se&6)&&tr()}),n=null;else{switch(nm(r)){case 1:n=gu;break;case 4:n=Jp;break;case 16:n=Di;break;case 536870912:n=em;break;default:n=Di}n=Eh(n,yh.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function yh(e,t){if(Ni=-1,Ti=0,se&6)throw Error(R(327));var n=e.callbackNode;if(to()&&e.callbackNode!==n)return null;var r=zi(e,e===De?Ve:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=na(e,r);else{t=r;var o=se;se|=2;var s=wh();(De!==e||Ve!==t)&&(ln=null,po=Re()+500,hr(e,t));do try{A1();break}catch(a){xh(e,a)}while(!0);Ru(),Ji.current=s,se=o,je!==null?t=0:(De=null,Ve=0,t=Oe)}if(t!==0){if(t===2&&(o=lc(e),o!==0&&(r=o,t=Lc(e,o))),t===1)throw n=vs,hr(e,0),In(e,r),ct(e,Re()),n;if(t===6)In(e,r);else{if(o=e.current.alternate,!(r&30)&&!O1(o)&&(t=na(e,r),t===2&&(s=lc(e),s!==0&&(r=s,t=Lc(e,s))),t===1))throw n=vs,hr(e,0),In(e,r),ct(e,Re()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(R(345));case 2:cr(e,st,ln);break;case 3:if(In(e,r),(r&130023424)===r&&(t=Hu+500-Re(),10<t)){if(zi(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Xe(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=gc(cr.bind(null,e,st,ln),t);break}cr(e,st,ln);break;case 4:if(In(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var i=31-Mt(r);s=1<<i,i=t[i],i>o&&(o=i),r&=~s}if(r=o,r=Re()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*I1(r/1960))-r,10<r){e.timeoutHandle=gc(cr.bind(null,e,st,ln),r);break}cr(e,st,ln);break;case 5:cr(e,st,ln);break;default:throw Error(R(329))}}}return ct(e,Re()),e.callbackNode===n?yh.bind(null,e):null}function Lc(e,t){var n=Xo;return e.current.memoizedState.isDehydrated&&(hr(e,t).flags|=256),e=na(e,t),e!==2&&(t=st,st=n,t!==null&&Dc(t)),e}function Dc(e){st===null?st=e:st.push.apply(st,e)}function O1(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],s=o.getSnapshot;o=o.value;try{if(!Dt(s(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function In(e,t){for(t&=~Uu,t&=~Ra,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Mt(t),r=1<<n;e[n]=-1,t&=~r}}function Lf(e){if(se&6)throw Error(R(327));to();var t=zi(e,0);if(!(t&1))return ct(e,Re()),null;var n=na(e,t);if(e.tag!==0&&n===2){var r=lc(e);r!==0&&(t=r,n=Lc(e,r))}if(n===1)throw n=vs,hr(e,0),In(e,t),ct(e,Re()),n;if(n===6)throw Error(R(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,cr(e,st,ln),ct(e,Re()),null}function Wu(e,t){var n=se;se|=1;try{return e(t)}finally{se=n,se===0&&(po=Re()+500,Ea&&tr())}}function Cr(e){An!==null&&An.tag===0&&!(se&6)&&to();var t=se;se|=1;var n=kt.transition,r=de;try{if(kt.transition=null,de=1,e)return e()}finally{de=r,kt.transition=n,se=t,!(se&6)&&tr()}}function Zu(){ut=qr.current,we(qr)}function hr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,c1(n)),je!==null)for(n=je.return;n!==null;){var r=n;switch(bu(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Ui();break;case 3:uo(),we(at),we(qe),Au();break;case 5:Mu(r);break;case 4:uo();break;case 13:we(ke);break;case 19:we(ke);break;case 10:Pu(r.type._context);break;case 22:case 23:Zu()}n=n.return}if(De=e,je=e=Un(e.current,null),Ve=ut=t,Oe=0,vs=null,Uu=Ra=_r=0,st=Xo=null,fr!==null){for(t=0;t<fr.length;t++)if(n=fr[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,s=n.pending;if(s!==null){var i=s.next;s.next=o,r.next=i}n.pending=r}fr=null}return e}function xh(e,t){do{var n=je;try{if(Ru(),ki.current=Xi,Yi){for(var r=Ee.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Yi=!1}if(Sr=0,Le=Ie=Ee=null,Qo=!1,ms=0,Bu.current=null,n===null||n.return===null){Oe=1,vs=t,je=null;break}e:{var s=e,i=n.return,a=n,l=t;if(t=Ve,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,f=u.tag;if(!(u.mode&1)&&(f===0||f===11||f===15)){var g=u.alternate;g?(u.updateQueue=g.updateQueue,u.memoizedState=g.memoizedState,u.lanes=g.lanes):(u.updateQueue=null,u.memoizedState=null)}var x=Cf(i);if(x!==null){x.flags&=-257,kf(x,i,a,s,t),x.mode&1&&_f(s,c,t),t=x,l=c;var w=t.updateQueue;if(w===null){var m=new Set;m.add(l),t.updateQueue=m}else w.add(l);break e}else{if(!(t&1)){_f(s,c,t),qu();break e}l=Error(R(426))}}else if(_e&&a.mode&1){var _=Cf(i);if(_!==null){!(_.flags&65536)&&(_.flags|=256),kf(_,i,a,s,t),Nu(fo(l,a));break e}}s=l=fo(l,a),Oe!==4&&(Oe=2),Xo===null?Xo=[s]:Xo.push(s),s=i;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var v=nh(s,l,t);gf(s,v);break e;case 1:a=l;var d=s.type,y=s.stateNode;if(!(s.flags&128)&&(typeof d.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Vn===null||!Vn.has(y)))){s.flags|=65536,t&=-t,s.lanes|=t;var C=rh(s,a,t);gf(s,C);break e}}s=s.return}while(s!==null)}_h(n)}catch(k){t=k,je===n&&n!==null&&(je=n=n.return);continue}break}while(!0)}function wh(){var e=Ji.current;return Ji.current=Xi,e===null?Xi:e}function qu(){(Oe===0||Oe===3||Oe===2)&&(Oe=4),De===null||!(_r&268435455)&&!(Ra&268435455)||In(De,Ve)}function na(e,t){var n=se;se|=2;var r=wh();(De!==e||Ve!==t)&&(ln=null,hr(e,t));do try{M1();break}catch(o){xh(e,o)}while(!0);if(Ru(),se=n,Ji.current=r,je!==null)throw Error(R(261));return De=null,Ve=0,Oe}function M1(){for(;je!==null;)Sh(je)}function A1(){for(;je!==null&&!i0();)Sh(je)}function Sh(e){var t=kh(e.alternate,e,ut);e.memoizedProps=e.pendingProps,t===null?_h(e):je=t,Bu.current=null}function _h(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=T1(n,t),n!==null){n.flags&=32767,je=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Oe=6,je=null;return}}else if(n=N1(n,t,ut),n!==null){je=n;return}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);Oe===0&&(Oe=5)}function cr(e,t,n){var r=de,o=kt.transition;try{kt.transition=null,de=1,L1(e,t,n,r)}finally{kt.transition=o,de=r}return null}function L1(e,t,n,r){do to();while(An!==null);if(se&6)throw Error(R(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(R(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(g0(e,s),e===De&&(je=De=null,Ve=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||li||(li=!0,Eh(Di,function(){return to(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=kt.transition,kt.transition=null;var i=de;de=1;var a=se;se|=4,Bu.current=null,P1(e,n),gh(n,e),n1(mc),$i=!!pc,mc=pc=null,e.current=n,j1(n),a0(),se=a,de=i,kt.transition=s}else e.current=n;if(li&&(li=!1,An=e,ta=o),s=e.pendingLanes,s===0&&(Vn=null),u0(n.stateNode),ct(e,Re()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(ea)throw ea=!1,e=Mc,Mc=null,e;return ta&1&&e.tag!==0&&to(),s=e.pendingLanes,s&1?e===Ac?Jo++:(Jo=0,Ac=e):Jo=0,tr(),null}function to(){if(An!==null){var e=nm(ta),t=kt.transition,n=de;try{if(kt.transition=null,de=16>e?16:e,An===null)var r=!1;else{if(e=An,An=null,ta=0,se&6)throw Error(R(331));var o=se;for(se|=4,$=e.current;$!==null;){var s=$,i=s.child;if($.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for($=c;$!==null;){var u=$;switch(u.tag){case 0:case 11:case 15:Yo(8,u,s)}var f=u.child;if(f!==null)f.return=u,$=f;else for(;$!==null;){u=$;var g=u.sibling,x=u.return;if(ph(u),u===c){$=null;break}if(g!==null){g.return=x,$=g;break}$=x}}}var w=s.alternate;if(w!==null){var m=w.child;if(m!==null){w.child=null;do{var _=m.sibling;m.sibling=null,m=_}while(m!==null)}}$=s}}if(s.subtreeFlags&2064&&i!==null)i.return=s,$=i;else e:for(;$!==null;){if(s=$,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Yo(9,s,s.return)}var v=s.sibling;if(v!==null){v.return=s.return,$=v;break e}$=s.return}}var d=e.current;for($=d;$!==null;){i=$;var y=i.child;if(i.subtreeFlags&2064&&y!==null)y.return=i,$=y;else e:for(i=d;$!==null;){if(a=$,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Ta(9,a)}}catch(k){Ne(a,a.return,k)}if(a===i){$=null;break e}var C=a.sibling;if(C!==null){C.return=a.return,$=C;break e}$=a.return}}if(se=o,tr(),Gt&&typeof Gt.onPostCommitFiberRoot=="function")try{Gt.onPostCommitFiberRoot(wa,e)}catch{}r=!0}return r}finally{de=n,kt.transition=t}}return!1}function Df(e,t,n){t=fo(n,t),t=nh(e,t,1),e=Fn(e,t,1),t=Xe(),e!==null&&(Ds(e,1,t),ct(e,t))}function Ne(e,t,n){if(e.tag===3)Df(e,e,n);else for(;t!==null;){if(t.tag===3){Df(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Vn===null||!Vn.has(r))){e=fo(n,e),e=rh(t,e,1),t=Fn(t,e,1),e=Xe(),t!==null&&(Ds(t,1,e),ct(t,e));break}}t=t.return}}function D1(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Xe(),e.pingedLanes|=e.suspendedLanes&n,De===e&&(Ve&n)===n&&(Oe===4||Oe===3&&(Ve&130023424)===Ve&&500>Re()-Hu?hr(e,0):Uu|=n),ct(e,t)}function Ch(e,t){t===0&&(e.mode&1?(t=Xs,Xs<<=1,!(Xs&130023424)&&(Xs=4194304)):t=1);var n=Xe();e=gn(e,t),e!==null&&(Ds(e,t,n),ct(e,n))}function z1(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ch(e,n)}function $1(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(R(314))}r!==null&&r.delete(t),Ch(e,n)}var kh;kh=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||at.current)it=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return it=!1,b1(e,t,n);it=!!(e.flags&131072)}else it=!1,_e&&t.flags&1048576&&Tm(t,Zi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;bi(e,t),e=t.pendingProps;var o=ao(t,qe.current);eo(t,n),o=Du(null,t,r,e,o,n);var s=zu();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,lt(r)?(s=!0,Hi(t)):s=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Iu(t),o.updater=Na,t.stateNode=o,o._reactInternals=t,Cc(t,r,e,n),t=bc(null,t,r,!0,s,n)):(t.tag=0,_e&&s&&Eu(t),Qe(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(bi(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=V1(r),e=Pt(r,e),o){case 0:t=Ec(null,t,r,e,n);break e;case 1:t=Nf(null,t,r,e,n);break e;case 11:t=Ef(null,t,r,e,n);break e;case 14:t=bf(null,t,r,Pt(r.type,e),n);break e}throw Error(R(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Pt(r,o),Ec(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Pt(r,o),Nf(e,t,r,o,n);case 3:e:{if(ah(t),e===null)throw Error(R(387));r=t.pendingProps,s=t.memoizedState,o=s.element,Mm(e,t),Gi(t,r,null,n);var i=t.memoizedState;if(r=i.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){o=fo(Error(R(423)),t),t=Tf(e,t,r,n,o);break e}else if(r!==o){o=fo(Error(R(424)),t),t=Tf(e,t,r,n,o);break e}else for(ft=$n(t.stateNode.containerInfo.firstChild),mt=t,_e=!0,It=null,n=Im(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(lo(),r===o){t=vn(e,t,n);break e}Qe(e,t,r,n)}t=t.child}return t;case 5:return Am(t),e===null&&wc(t),r=t.type,o=t.pendingProps,s=e!==null?e.memoizedProps:null,i=o.children,hc(r,o)?i=null:s!==null&&hc(r,s)&&(t.flags|=32),ih(e,t),Qe(e,t,i,n),t.child;case 6:return e===null&&wc(t),null;case 13:return lh(e,t,n);case 4:return Ou(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=co(t,null,r,n):Qe(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Pt(r,o),Ef(e,t,r,o,n);case 7:return Qe(e,t,t.pendingProps,n),t.child;case 8:return Qe(e,t,t.pendingProps.children,n),t.child;case 12:return Qe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value,ge(qi,r._currentValue),r._currentValue=i,s!==null)if(Dt(s.value,i)){if(s.children===o.children&&!at.current){t=vn(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){i=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=pn(-1,n&-n),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Sc(s.return,n,t),a.lanes|=n;break}l=l.next}}else if(s.tag===10)i=s.type===t.type?null:s.child;else if(s.tag===18){if(i=s.return,i===null)throw Error(R(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Sc(i,n,t),i=s.sibling}else i=s.child;if(i!==null)i.return=s;else for(i=s;i!==null;){if(i===t){i=null;break}if(s=i.sibling,s!==null){s.return=i.return,i=s;break}i=i.return}s=i}Qe(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,eo(t,n),o=Et(o),r=r(o),t.flags|=1,Qe(e,t,r,n),t.child;case 14:return r=t.type,o=Pt(r,t.pendingProps),o=Pt(r.type,o),bf(e,t,r,o,n);case 15:return oh(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Pt(r,o),bi(e,t),t.tag=1,lt(r)?(e=!0,Hi(t)):e=!1,eo(t,n),th(t,r,o),Cc(t,r,o,n),bc(null,t,r,!0,e,n);case 19:return ch(e,t,n);case 22:return sh(e,t,n)}throw Error(R(156,t.tag))};function Eh(e,t){return Xp(e,t)}function F1(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 Ct(e,t,n,r){return new F1(e,t,n,r)}function Ku(e){return e=e.prototype,!(!e||!e.isReactComponent)}function V1(e){if(typeof e=="function")return Ku(e)?1:0;if(e!=null){if(e=e.$$typeof,e===pu)return 11;if(e===mu)return 14}return 2}function Un(e,t){var n=e.alternate;return n===null?(n=Ct(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 Ri(e,t,n,r,o,s){var i=2;if(r=e,typeof e=="function")Ku(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Dr:return gr(n.children,o,s,t);case fu:i=8,o|=8;break;case ql:return e=Ct(12,n,t,o|2),e.elementType=ql,e.lanes=s,e;case Kl:return e=Ct(13,n,t,o),e.elementType=Kl,e.lanes=s,e;case Gl:return e=Ct(19,n,t,o),e.elementType=Gl,e.lanes=s,e;case Ap:return Pa(n,o,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Op:i=10;break e;case Mp:i=9;break e;case pu:i=11;break e;case mu:i=14;break e;case Rn:i=16,r=null;break e}throw Error(R(130,e==null?e:typeof e,""))}return t=Ct(i,n,t,o),t.elementType=e,t.type=r,t.lanes=s,t}function gr(e,t,n,r){return e=Ct(7,e,r,t),e.lanes=n,e}function Pa(e,t,n,r){return e=Ct(22,e,r,t),e.elementType=Ap,e.lanes=n,e.stateNode={isHidden:!1},e}function Rl(e,t,n){return e=Ct(6,e,null,t),e.lanes=n,e}function Pl(e,t,n){return t=Ct(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function B1(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=ul(0),this.expirationTimes=ul(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ul(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Gu(e,t,n,r,o,s,i,a,l){return e=new B1(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Ct(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Iu(s),e}function U1(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Lr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function bh(e){if(!e)return Wn;e=e._reactInternals;e:{if(Rr(e)!==e||e.tag!==1)throw Error(R(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(lt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(R(171))}if(e.tag===1){var n=e.type;if(lt(n))return bm(e,n,t)}return t}function Nh(e,t,n,r,o,s,i,a,l){return e=Gu(n,r,!0,e,o,s,i,a,l),e.context=bh(null),n=e.current,r=Xe(),o=Bn(n),s=pn(r,o),s.callback=t??null,Fn(n,s,o),e.current.lanes=o,Ds(e,o,r),ct(e,r),e}function ja(e,t,n,r){var o=t.current,s=Xe(),i=Bn(o);return n=bh(n),t.context===null?t.context=n:t.pendingContext=n,t=pn(s,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Fn(o,t,i),e!==null&&(At(e,o,i,s),Ci(e,o,i)),i}function ra(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function zf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Qu(e,t){zf(e,t),(e=e.alternate)&&zf(e,t)}function H1(){return null}var Th=typeof reportError=="function"?reportError:function(e){console.error(e)};function Yu(e){this._internalRoot=e}Ia.prototype.render=Yu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(R(409));ja(e,t,null,null)};Ia.prototype.unmount=Yu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Cr(function(){ja(null,e,null,null)}),t[hn]=null}};function Ia(e){this._internalRoot=e}Ia.prototype.unstable_scheduleHydration=function(e){if(e){var t=sm();e={blockedOn:null,target:e,priority:t};for(var n=0;n<jn.length&&t!==0&&t<jn[n].priority;n++);jn.splice(n,0,e),n===0&&am(e)}};function Xu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Oa(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function $f(){}function W1(e,t,n,r,o){if(o){if(typeof r=="function"){var s=r;r=function(){var c=ra(i);s.call(c)}}var i=Nh(t,r,e,0,null,!1,!1,"",$f);return e._reactRootContainer=i,e[hn]=i.current,cs(e.nodeType===8?e.parentNode:e),Cr(),i}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var a=r;r=function(){var c=ra(l);a.call(c)}}var l=Gu(e,0,!1,null,null,!1,!1,"",$f);return e._reactRootContainer=l,e[hn]=l.current,cs(e.nodeType===8?e.parentNode:e),Cr(function(){ja(t,l,n,r)}),l}function Ma(e,t,n,r,o){var s=n._reactRootContainer;if(s){var i=s;if(typeof o=="function"){var a=o;o=function(){var l=ra(i);a.call(l)}}ja(t,i,e,o)}else i=W1(n,t,e,o,r);return ra(i)}rm=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Fo(t.pendingLanes);n!==0&&(vu(t,n|1),ct(t,Re()),!(se&6)&&(po=Re()+500,tr()))}break;case 13:Cr(function(){var r=gn(e,1);if(r!==null){var o=Xe();At(r,e,1,o)}}),Qu(e,1)}};yu=function(e){if(e.tag===13){var t=gn(e,134217728);if(t!==null){var n=Xe();At(t,e,134217728,n)}Qu(e,134217728)}};om=function(e){if(e.tag===13){var t=Bn(e),n=gn(e,t);if(n!==null){var r=Xe();At(n,e,t,r)}Qu(e,t)}};sm=function(){return de};im=function(e,t){var n=de;try{return de=e,t()}finally{de=n}};sc=function(e,t,n){switch(t){case"input":if(Xl(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=ka(r);if(!o)throw Error(R(90));Dp(r),Xl(r,o)}}}break;case"textarea":$p(e,n);break;case"select":t=n.value,t!=null&&Qr(e,!!n.multiple,t,!1)}};Zp=Wu;qp=Cr;var Z1={usingClientEntryPoint:!1,Events:[$s,Vr,ka,Hp,Wp,Wu]},Ao={findFiberByHostInstance:dr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},q1={bundleType:Ao.bundleType,version:Ao.version,rendererPackageName:Ao.rendererPackageName,rendererConfig:Ao.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Cn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Qp(e),e===null?null:e.stateNode},findFiberByHostInstance:Ao.findFiberByHostInstance||H1,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ci=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ci.isDisabled&&ci.supportsFiber)try{wa=ci.inject(q1),Gt=ci}catch{}}yt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Z1;yt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Xu(t))throw Error(R(200));return U1(e,t,null,n)};yt.createRoot=function(e,t){if(!Xu(e))throw Error(R(299));var n=!1,r="",o=Th;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Gu(e,1,!1,null,null,n,!1,r,o),e[hn]=t.current,cs(e.nodeType===8?e.parentNode:e),new Yu(t)};yt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(R(188)):(e=Object.keys(e).join(","),Error(R(268,e)));return e=Qp(t),e=e===null?null:e.stateNode,e};yt.flushSync=function(e){return Cr(e)};yt.hydrate=function(e,t,n){if(!Oa(t))throw Error(R(200));return Ma(null,e,t,!0,n)};yt.hydrateRoot=function(e,t,n){if(!Xu(e))throw Error(R(405));var r=n!=null&&n.hydratedSources||null,o=!1,s="",i=Th;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=Nh(t,null,e,1,n??null,o,!1,s,i),e[hn]=t.current,cs(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Ia(t)};yt.render=function(e,t,n){if(!Oa(t))throw Error(R(200));return Ma(null,e,t,!1,n)};yt.unmountComponentAtNode=function(e){if(!Oa(e))throw Error(R(40));return e._reactRootContainer?(Cr(function(){Ma(null,null,e,!1,function(){e._reactRootContainer=null,e[hn]=null})}),!0):!1};yt.unstable_batchedUpdates=Wu;yt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Oa(n))throw Error(R(200));if(e==null||e._reactInternals===void 0)throw Error(R(38));return Ma(e,t,n,!1,r)};yt.version="18.3.1-next-f1338f8080-20240426";function Rh(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Rh)}catch(e){console.error(e)}}Rh(),Rp.exports=yt;var _o=Rp.exports;const K1=vp(_o);var Ph,Ff=_o;Ph=Ff.createRoot,Ff.hydrateRoot;function jh(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=jh(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function fn(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=jh(e))&&(r&&(r+=" "),r+=t);return r}const ys=e=>typeof e=="number"&&!isNaN(e),vr=e=>typeof e=="string",pt=e=>typeof e=="function",Pi=e=>vr(e)||pt(e)?e:null,zc=e=>h.isValidElement(e)||vr(e)||pt(e)||ys(e);function G1(e,t,n){n===void 0&&(n=300);const{scrollHeight:r,style:o}=e;requestAnimationFrame(()=>{o.minHeight="initial",o.height=r+"px",o.transition=`all ${n}ms`,requestAnimationFrame(()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(t,n)})})}function Aa(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:o=!0,collapseDuration:s=300}=e;return function(i){let{children:a,position:l,preventExitTransition:c,done:u,nodeRef:f,isIn:g,playToast:x}=i;const w=r?`${t}--${l}`:t,m=r?`${n}--${l}`:n,_=h.useRef(0);return h.useLayoutEffect(()=>{const v=f.current,d=w.split(" "),y=C=>{C.target===f.current&&(x(),v.removeEventListener("animationend",y),v.removeEventListener("animationcancel",y),_.current===0&&C.type!=="animationcancel"&&v.classList.remove(...d))};v.classList.add(...d),v.addEventListener("animationend",y),v.addEventListener("animationcancel",y)},[]),h.useEffect(()=>{const v=f.current,d=()=>{v.removeEventListener("animationend",d),o?G1(v,u,s):u()};g||(c?d():(_.current=1,v.className+=` ${m}`,v.addEventListener("animationend",d)))},[g]),ne.createElement(ne.Fragment,null,a)}}function Vf(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const Ye=new Map;let xs=[];const $c=new Set,Q1=e=>$c.forEach(t=>t(e)),Ih=()=>Ye.size>0;function Oh(e,t){var n;if(t)return!((n=Ye.get(t))==null||!n.isToastActive(e));let r=!1;return Ye.forEach(o=>{o.isToastActive(e)&&(r=!0)}),r}function Mh(e,t){zc(e)&&(Ih()||xs.push({content:e,options:t}),Ye.forEach(n=>{n.buildToast(e,t)}))}function Bf(e,t){Ye.forEach(n=>{t!=null&&t!=null&&t.containerId?(t==null?void 0:t.containerId)===n.id&&n.toggle(e,t==null?void 0:t.id):n.toggle(e,t==null?void 0:t.id)})}function Y1(e){const{subscribe:t,getSnapshot:n,setProps:r}=h.useRef(function(s){const i=s.containerId||1;return{subscribe(a){const l=function(u,f,g){let x=1,w=0,m=[],_=[],v=[],d=f;const y=new Map,C=new Set,k=()=>{v=Array.from(y.values()),C.forEach(E=>E())},T=E=>{_=E==null?[]:_.filter(I=>I!==E),k()},b=E=>{const{toastId:I,onOpen:j,updateId:V,children:M}=E.props,q=V==null;E.staleId&&y.delete(E.staleId),y.set(I,E),_=[..._,E.props.toastId].filter(W=>W!==E.staleId),k(),g(Vf(E,q?"added":"updated")),q&&pt(j)&&j(h.isValidElement(M)&&M.props)};return{id:u,props:d,observe:E=>(C.add(E),()=>C.delete(E)),toggle:(E,I)=>{y.forEach(j=>{I!=null&&I!==j.props.toastId||pt(j.toggle)&&j.toggle(E)})},removeToast:T,toasts:y,clearQueue:()=>{w-=m.length,m=[]},buildToast:(E,I)=>{if((J=>{let{containerId:pe,toastId:ie,updateId:Se}=J;const ve=pe?pe!==u:u!==1,B=y.has(ie)&&Se==null;return ve||B})(I))return;const{toastId:j,updateId:V,data:M,staleId:q,delay:W}=I,ee=()=>{T(j)},F=V==null;F&&w++;const K={...d,style:d.toastStyle,key:x++,...Object.fromEntries(Object.entries(I).filter(J=>{let[pe,ie]=J;return ie!=null})),toastId:j,updateId:V,data:M,closeToast:ee,isIn:!1,className:Pi(I.className||d.toastClassName),bodyClassName:Pi(I.bodyClassName||d.bodyClassName),progressClassName:Pi(I.progressClassName||d.progressClassName),autoClose:!I.isLoading&&(N=I.autoClose,O=d.autoClose,N===!1||ys(N)&&N>0?N:O),deleteToast(){const J=y.get(j),{onClose:pe,children:ie}=J.props;pt(pe)&&pe(h.isValidElement(ie)&&ie.props),g(Vf(J,"removed")),y.delete(j),w--,w<0&&(w=0),m.length>0?b(m.shift()):k()}};var N,O;K.closeButton=d.closeButton,I.closeButton===!1||zc(I.closeButton)?K.closeButton=I.closeButton:I.closeButton===!0&&(K.closeButton=!zc(d.closeButton)||d.closeButton);let z=E;h.isValidElement(E)&&!vr(E.type)?z=h.cloneElement(E,{closeToast:ee,toastProps:K,data:M}):pt(E)&&(z=E({closeToast:ee,toastProps:K,data:M}));const H={content:z,props:K,staleId:q};d.limit&&d.limit>0&&w>d.limit&&F?m.push(H):ys(W)?setTimeout(()=>{b(H)},W):b(H)},setProps(E){d=E},setToggle:(E,I)=>{y.get(E).toggle=I},isToastActive:E=>_.some(I=>I===E),getSnapshot:()=>v}}(i,s,Q1);Ye.set(i,l);const c=l.observe(a);return xs.forEach(u=>Mh(u.content,u.options)),xs=[],()=>{c(),Ye.delete(i)}},setProps(a){var l;(l=Ye.get(i))==null||l.setProps(a)},getSnapshot(){var a;return(a=Ye.get(i))==null?void 0:a.getSnapshot()}}}(e)).current;r(e);const o=h.useSyncExternalStore(t,n,n);return{getToastToRender:function(s){if(!o)return[];const i=new Map;return e.newestOnTop&&o.reverse(),o.forEach(a=>{const{position:l}=a.props;i.has(l)||i.set(l,[]),i.get(l).push(a)}),Array.from(i,a=>s(a[0],a[1]))},isToastActive:Oh,count:o==null?void 0:o.length}}function X1(e){const[t,n]=h.useState(!1),[r,o]=h.useState(!1),s=h.useRef(null),i=h.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:a,pauseOnHover:l,closeToast:c,onClick:u,closeOnClick:f}=e;var g,x;function w(){n(!0)}function m(){n(!1)}function _(y){const C=s.current;i.canDrag&&C&&(i.didMove=!0,t&&m(),i.delta=e.draggableDirection==="x"?y.clientX-i.start:y.clientY-i.start,i.start!==y.clientX&&(i.canCloseOnClick=!1),C.style.transform=`translate3d(${e.draggableDirection==="x"?`${i.delta}px, var(--y)`:`0, calc(${i.delta}px + var(--y))`},0)`,C.style.opacity=""+(1-Math.abs(i.delta/i.removalDistance)))}function v(){document.removeEventListener("pointermove",_),document.removeEventListener("pointerup",v);const y=s.current;if(i.canDrag&&i.didMove&&y){if(i.canDrag=!1,Math.abs(i.delta)>i.removalDistance)return o(!0),e.closeToast(),void e.collapseAll();y.style.transition="transform 0.2s, opacity 0.2s",y.style.removeProperty("transform"),y.style.removeProperty("opacity")}}(x=Ye.get((g={id:e.toastId,containerId:e.containerId,fn:n}).containerId||1))==null||x.setToggle(g.id,g.fn),h.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||m(),window.addEventListener("focus",w),window.addEventListener("blur",m),()=>{window.removeEventListener("focus",w),window.removeEventListener("blur",m)}},[e.pauseOnFocusLoss]);const d={onPointerDown:function(y){if(e.draggable===!0||e.draggable===y.pointerType){i.didMove=!1,document.addEventListener("pointermove",_),document.addEventListener("pointerup",v);const C=s.current;i.canCloseOnClick=!0,i.canDrag=!0,C.style.transition="none",e.draggableDirection==="x"?(i.start=y.clientX,i.removalDistance=C.offsetWidth*(e.draggablePercent/100)):(i.start=y.clientY,i.removalDistance=C.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(y){const{top:C,bottom:k,left:T,right:b}=s.current.getBoundingClientRect();y.nativeEvent.type!=="touchend"&&e.pauseOnHover&&y.clientX>=T&&y.clientX<=b&&y.clientY>=C&&y.clientY<=k?m():w()}};return a&&l&&(d.onMouseEnter=m,e.stacked||(d.onMouseLeave=w)),f&&(d.onClick=y=>{u&&u(y),i.canCloseOnClick&&c()}),{playToast:w,pauseToast:m,isRunning:t,preventExitTransition:r,toastRef:s,eventHandlers:d}}function J1(e){let{delay:t,isRunning:n,closeToast:r,type:o="default",hide:s,className:i,style:a,controlledProgress:l,progress:c,rtl:u,isIn:f,theme:g}=e;const x=s||l&&c===0,w={...a,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};l&&(w.transform=`scaleX(${c})`);const m=fn("Toastify__progress-bar",l?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${g}`,`Toastify__progress-bar--${o}`,{"Toastify__progress-bar--rtl":u}),_=pt(i)?i({rtl:u,type:o,defaultClassName:m}):fn(m,i),v={[l&&c>=1?"onTransitionEnd":"onAnimationEnd"]:l&&c<1?null:()=>{f&&r()}};return ne.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":x},ne.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${g} Toastify__progress-bar--${o}`}),ne.createElement("div",{role:"progressbar","aria-hidden":x?"true":"false","aria-label":"notification timer",className:_,style:w,...v}))}let ex=1;const Ah=()=>""+ex++;function tx(e){return e&&(vr(e.toastId)||ys(e.toastId))?e.toastId:Ah()}function es(e,t){return Mh(e,t),t.toastId}function oa(e,t){return{...t,type:t&&t.type||e,toastId:tx(t)}}function ui(e){return(t,n)=>es(t,oa(e,n))}function me(e,t){return es(e,oa("default",t))}me.loading=(e,t)=>es(e,oa("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),me.promise=function(e,t,n){let r,{pending:o,error:s,success:i}=t;o&&(r=vr(o)?me.loading(o,n):me.loading(o.render,{...n,...o}));const a={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},l=(u,f,g)=>{if(f==null)return void me.dismiss(r);const x={type:u,...a,...n,data:g},w=vr(f)?{render:f}:f;return r?me.update(r,{...x,...w}):me(w.render,{...x,...w}),g},c=pt(e)?e():e;return c.then(u=>l("success",i,u)).catch(u=>l("error",s,u)),c},me.success=ui("success"),me.info=ui("info"),me.error=ui("error"),me.warning=ui("warning"),me.warn=me.warning,me.dark=(e,t)=>es(e,oa("default",{theme:"dark",...t})),me.dismiss=function(e){(function(t){var n;if(Ih()){if(t==null||vr(n=t)||ys(n))Ye.forEach(r=>{r.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){const r=Ye.get(t.containerId);r?r.removeToast(t.id):Ye.forEach(o=>{o.removeToast(t.id)})}}else xs=xs.filter(r=>t!=null&&r.options.toastId!==t)})(e)},me.clearWaitingQueue=function(e){e===void 0&&(e={}),Ye.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},me.isActive=Oh,me.update=function(e,t){t===void 0&&(t={});const n=((r,o)=>{var s;let{containerId:i}=o;return(s=Ye.get(i||1))==null?void 0:s.toasts.get(r)})(e,t);if(n){const{props:r,content:o}=n,s={delay:100,...r,...t,toastId:t.toastId||e,updateId:Ah()};s.toastId!==e&&(s.staleId=e);const i=s.render||o;delete s.render,es(i,s)}},me.done=e=>{me.update(e,{progress:1})},me.onChange=function(e){return $c.add(e),()=>{$c.delete(e)}},me.play=e=>Bf(!0,e),me.pause=e=>Bf(!1,e);const nx=typeof window<"u"?h.useLayoutEffect:h.useEffect,di=e=>{let{theme:t,type:n,isLoading:r,...o}=e;return ne.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...o})},jl={info:function(e){return ne.createElement(di,{...e},ne.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return ne.createElement(di,{...e},ne.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return ne.createElement(di,{...e},ne.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return ne.createElement(di,{...e},ne.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return ne.createElement("div",{className:"Toastify__spinner"})}},rx=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:o,playToast:s}=X1(e),{closeButton:i,children:a,autoClose:l,onClick:c,type:u,hideProgressBar:f,closeToast:g,transition:x,position:w,className:m,style:_,bodyClassName:v,bodyStyle:d,progressClassName:y,progressStyle:C,updateId:k,role:T,progress:b,rtl:E,toastId:I,deleteToast:j,isIn:V,isLoading:M,closeOnClick:q,theme:W}=e,ee=fn("Toastify__toast",`Toastify__toast-theme--${W}`,`Toastify__toast--${u}`,{"Toastify__toast--rtl":E},{"Toastify__toast--close-on-click":q}),F=pt(m)?m({rtl:E,position:w,type:u,defaultClassName:ee}):fn(ee,m),K=function(H){let{theme:J,type:pe,isLoading:ie,icon:Se}=H,ve=null;const B={theme:J,type:pe};return Se===!1||(pt(Se)?ve=Se({...B,isLoading:ie}):h.isValidElement(Se)?ve=h.cloneElement(Se,B):ie?ve=jl.spinner():(ce=>ce in jl)(pe)&&(ve=jl[pe](B))),ve}(e),N=!!b||!l,O={closeToast:g,type:u,theme:W};let z=null;return i===!1||(z=pt(i)?i(O):h.isValidElement(i)?h.cloneElement(i,O):function(H){let{closeToast:J,theme:pe,ariaLabel:ie="close"}=H;return ne.createElement("button",{className:`Toastify__close-button Toastify__close-button--${pe}`,type:"button",onClick:Se=>{Se.stopPropagation(),J(Se)},"aria-label":ie},ne.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},ne.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(O)),ne.createElement(x,{isIn:V,done:j,position:w,preventExitTransition:n,nodeRef:r,playToast:s},ne.createElement("div",{id:I,onClick:c,"data-in":V,className:F,...o,style:_,ref:r},ne.createElement("div",{...V&&{role:T},className:pt(v)?v({type:u}):fn("Toastify__toast-body",v),style:d},K!=null&&ne.createElement("div",{className:fn("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!M})},K),ne.createElement("div",null,a)),z,ne.createElement(J1,{...k&&!N?{key:`pb-${k}`}:{},rtl:E,theme:W,delay:l,isRunning:t,isIn:V,closeToast:g,hide:f,type:u,style:C,className:y,controlledProgress:N,progress:b||0})))},La=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},ox=Aa(La("bounce",!0));Aa(La("slide",!0));Aa(La("zoom"));Aa(La("flip"));const sx={position:"top-right",transition:ox,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function ix(e){let t={...sx,...e};const n=e.stacked,[r,o]=h.useState(!0),s=h.useRef(null),{getToastToRender:i,isToastActive:a,count:l}=Y1(t),{className:c,style:u,rtl:f,containerId:g}=t;function x(m){const _=fn("Toastify__toast-container",`Toastify__toast-container--${m}`,{"Toastify__toast-container--rtl":f});return pt(c)?c({position:m,rtl:f,defaultClassName:_}):fn(_,Pi(c))}function w(){n&&(o(!0),me.play())}return nx(()=>{if(n){var m;const _=s.current.querySelectorAll('[data-in="true"]'),v=12,d=(m=t.position)==null?void 0:m.includes("top");let y=0,C=0;Array.from(_).reverse().forEach((k,T)=>{const b=k;b.classList.add("Toastify__toast--stacked"),T>0&&(b.dataset.collapsed=`${r}`),b.dataset.pos||(b.dataset.pos=d?"top":"bot");const E=y*(r?.2:1)+(r?0:v*T);b.style.setProperty("--y",`${d?E:-1*E}px`),b.style.setProperty("--g",`${v}`),b.style.setProperty("--s",""+(1-(r?C:0))),y+=b.offsetHeight,C+=.025})}},[r,l,n]),ne.createElement("div",{ref:s,className:"Toastify",id:g,onMouseEnter:()=>{n&&(o(!1),me.pause())},onMouseLeave:w},i((m,_)=>{const v=_.length?{...u}:{...u,pointerEvents:"none"};return ne.createElement("div",{className:x(m),style:v,key:`container-${m}`},_.map(d=>{let{content:y,props:C}=d;return ne.createElement(rx,{...C,stacked:n,collapseAll:w,isIn:a(C.toastId,C.containerId),style:C.style,key:`toast-${C.key}`},y)}))}))}var oe;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const s={};for(const i of o)s[i]=i;return s},e.getValidEnumValues=o=>{const s=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),i={};for(const a of s)i[a]=o[a];return e.objectValues(i)},e.objectValues=o=>e.objectKeys(o).map(function(s){return o[s]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const s=[];for(const i in o)Object.prototype.hasOwnProperty.call(o,i)&&s.push(i);return s},e.find=(o,s)=>{for(const i of o)if(s(i))return i},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,s=" | "){return o.map(i=>typeof i=="string"?`'${i}'`:i).join(s)}e.joinValues=r,e.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(oe||(oe={}));var Fc;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Fc||(Fc={}));const L=oe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),On=e=>{switch(typeof e){case"undefined":return L.undefined;case"string":return L.string;case"number":return isNaN(e)?L.nan:L.number;case"boolean":return L.boolean;case"function":return L.function;case"bigint":return L.bigint;case"symbol":return L.symbol;case"object":return Array.isArray(e)?L.array:e===null?L.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?L.promise:typeof Map<"u"&&e instanceof Map?L.map:typeof Set<"u"&&e instanceof Set?L.set:typeof Date<"u"&&e instanceof Date?L.date:L.object;default:return L.unknown}},P=oe.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),ax=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class ht extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(s){return s.message},r={_errors:[]},o=s=>{for(const i of s.issues)if(i.code==="invalid_union")i.unionErrors.map(o);else if(i.code==="invalid_return_type")o(i.returnTypeError);else if(i.code==="invalid_arguments")o(i.argumentsError);else if(i.path.length===0)r._errors.push(n(i));else{let a=r,l=0;for(;l<i.path.length;){const c=i.path[l];l===i.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(i))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof ht))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,oe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}ht.create=e=>new ht(e);const mo=(e,t)=>{let n;switch(e.code){case P.invalid_type:e.received===L.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case P.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,oe.jsonStringifyReplacer)}`;break;case P.unrecognized_keys:n=`Unrecognized key(s) in object: ${oe.joinValues(e.keys,", ")}`;break;case P.invalid_union:n="Invalid input";break;case P.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${oe.joinValues(e.options)}`;break;case P.invalid_enum_value:n=`Invalid enum value. Expected ${oe.joinValues(e.options)}, received '${e.received}'`;break;case P.invalid_arguments:n="Invalid function arguments";break;case P.invalid_return_type:n="Invalid function return type";break;case P.invalid_date:n="Invalid date";break;case P.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:oe.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case P.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case P.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case P.custom:n="Invalid input";break;case P.invalid_intersection_types:n="Intersection results could not be merged";break;case P.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case P.not_finite:n="Number must be finite";break;default:n=t.defaultError,oe.assertNever(e)}return{message:n}};let Lh=mo;function lx(e){Lh=e}function sa(){return Lh}const ia=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,s=[...n,...o.path||[]],i={...o,path:s};if(o.message!==void 0)return{...o,path:s,message:o.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(i,{data:t,defaultError:a}).message;return{...o,path:s,message:a}},cx=[];function A(e,t){const n=sa(),r=ia({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===mo?void 0:mo].filter(o=>!!o)});e.common.issues.push(r)}class Ke{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return G;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const s=await o.key,i=await o.value;r.push({key:s,value:i})}return Ke.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:s,value:i}=o;if(s.status==="aborted"||i.status==="aborted")return G;s.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof i.value<"u"||o.alwaysSet)&&(r[s.value]=i.value)}return{status:t.value,value:r}}}const G=Object.freeze({status:"aborted"}),Kr=e=>({status:"dirty",value:e}),Je=e=>({status:"valid",value:e}),Vc=e=>e.status==="aborted",Bc=e=>e.status==="dirty",ws=e=>e.status==="valid",Ss=e=>typeof Promise<"u"&&e instanceof Promise;function aa(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function Dh(e,t,n,r,o){if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var U;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(U||(U={}));var Bo,Uo;class Jt{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Uf=(e,t)=>{if(ws(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new ht(e.common.issues);return this._error=n,this._error}}};function Q(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(i,a)=>{var l,c;const{message:u}=e;return i.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:a.defaultError}},description:o}}class X{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return On(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:On(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Ke,ctx:{common:t.parent.common,data:t.data,parsedType:On(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Ss(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:On(t)},s=this._parseSync({data:t,path:o.path,parent:o});return Uf(o,s)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:On(t)},o=this._parse({data:t,path:r.path,parent:r}),s=await(Ss(o)?o:Promise.resolve(o));return Uf(r,s)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,s)=>{const i=t(o),a=()=>s.addIssue({code:P.custom,...r(o)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new zt({schema:this,typeName:Z.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Yt.create(this,this._def)}nullable(){return Gn.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Lt.create(this,this._def)}promise(){return go.create(this,this._def)}or(t){return Es.create([this,t],this._def)}and(t){return bs.create(this,t,this._def)}transform(t){return new zt({...Q(this._def),schema:this,typeName:Z.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new js({...Q(this._def),innerType:this,defaultValue:n,typeName:Z.ZodDefault})}brand(){return new Ju({typeName:Z.ZodBranded,type:this,...Q(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Is({...Q(this._def),innerType:this,catchValue:n,typeName:Z.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Vs.create(this,t)}readonly(){return Os.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const ux=/^c[^\s-]{8,}$/i,dx=/^[0-9a-z]+$/,fx=/^[0-9A-HJKMNP-TV-Z]{26}$/,px=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,mx=/^[a-z0-9_-]{21}$/i,hx=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,gx=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,vx="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Il;const yx=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,xx=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,wx=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,zh="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Sx=new RegExp(`^${zh}$`);function $h(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function _x(e){return new RegExp(`^${$h(e)}$`)}function Fh(e){let t=`${zh}T${$h(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function Cx(e,t){return!!((t==="v4"||!t)&&yx.test(e)||(t==="v6"||!t)&&xx.test(e))}class Ot extends X{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==L.string){const s=this._getOrReturnCtx(t);return A(s,{code:P.invalid_type,expected:L.string,received:s.parsedType}),G}const r=new Ke;let o;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(o=this._getOrReturnCtx(t,o),A(o,{code:P.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")t.data.length>s.value&&(o=this._getOrReturnCtx(t,o),A(o,{code:P.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const i=t.data.length>s.value,a=t.data.length<s.value;(i||a)&&(o=this._getOrReturnCtx(t,o),i?A(o,{code:P.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&A(o,{code:P.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")gx.test(t.data)||(o=this._getOrReturnCtx(t,o),A(o,{validation:"email",code:P.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")Il||(Il=new RegExp(vx,"u")),Il.test(t.data)||(o=this._getOrReturnCtx(t,o),A(o,{validation:"emoji",code:P.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")px.test(t.data)||(o=this._getOrReturnCtx(t,o),A(o,{validation:"uuid",code:P.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")mx.test(t.data)||(o=this._getOrReturnCtx(t,o),A(o,{validation:"nanoid",code:P.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")ux.test(t.data)||(o=this._getOrReturnCtx(t,o),A(o,{validation:"cuid",code:P.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")dx.test(t.data)||(o=this._getOrReturnCtx(t,o),A(o,{validation:"cuid2",code:P.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")fx.test(t.data)||(o=this._getOrReturnCtx(t,o),A(o,{validation:"ulid",code:P.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),A(o,{validation:"url",code:P.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),A(o,{validation:"regex",code:P.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(t,o),A(o,{code:P.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(o=this._getOrReturnCtx(t,o),A(o,{code:P.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(o=this._getOrReturnCtx(t,o),A(o,{code:P.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?Fh(s).test(t.data)||(o=this._getOrReturnCtx(t,o),A(o,{code:P.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?Sx.test(t.data)||(o=this._getOrReturnCtx(t,o),A(o,{code:P.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?_x(s).test(t.data)||(o=this._getOrReturnCtx(t,o),A(o,{code:P.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?hx.test(t.data)||(o=this._getOrReturnCtx(t,o),A(o,{validation:"duration",code:P.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?Cx(t.data,s.version)||(o=this._getOrReturnCtx(t,o),A(o,{validation:"ip",code:P.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?wx.test(t.data)||(o=this._getOrReturnCtx(t,o),A(o,{validation:"base64",code:P.invalid_string,message:s.message}),r.dirty()):oe.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:P.invalid_string,...U.errToObj(r)})}_addCheck(t){return new Ot({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...U.errToObj(t)})}url(t){return this._addCheck({kind:"url",...U.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...U.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...U.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...U.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...U.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...U.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...U.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...U.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...U.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...U.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...U.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...U.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...U.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...U.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...U.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...U.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...U.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...U.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...U.errToObj(n)})}nonempty(t){return this.min(1,U.errToObj(t))}trim(){return new Ot({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ot({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ot({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ot.create=e=>{var t;return new Ot({checks:[],typeName:Z.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Q(e)})};function kx(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,s=parseInt(e.toFixed(o).replace(".","")),i=parseInt(t.toFixed(o).replace(".",""));return s%i/Math.pow(10,o)}class Zn extends X{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==L.number){const s=this._getOrReturnCtx(t);return A(s,{code:P.invalid_type,expected:L.number,received:s.parsedType}),G}let r;const o=new Ke;for(const s of this._def.checks)s.kind==="int"?oe.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),A(r,{code:P.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),A(r,{code:P.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),A(r,{code:P.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?kx(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),A(r,{code:P.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),A(r,{code:P.not_finite,message:s.message}),o.dirty()):oe.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,U.toString(n))}gt(t,n){return this.setLimit("min",t,!1,U.toString(n))}lte(t,n){return this.setLimit("max",t,!0,U.toString(n))}lt(t,n){return this.setLimit("max",t,!1,U.toString(n))}setLimit(t,n,r,o){return new Zn({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:U.toString(o)}]})}_addCheck(t){return new Zn({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:U.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:U.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:U.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:U.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:U.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:U.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:U.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:U.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:U.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&oe.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Zn.create=e=>new Zn({checks:[],typeName:Z.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Q(e)});class qn extends X{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==L.bigint){const s=this._getOrReturnCtx(t);return A(s,{code:P.invalid_type,expected:L.bigint,received:s.parsedType}),G}let r;const o=new Ke;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),A(r,{code:P.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),A(r,{code:P.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),A(r,{code:P.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):oe.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,U.toString(n))}gt(t,n){return this.setLimit("min",t,!1,U.toString(n))}lte(t,n){return this.setLimit("max",t,!0,U.toString(n))}lt(t,n){return this.setLimit("max",t,!1,U.toString(n))}setLimit(t,n,r,o){return new qn({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:U.toString(o)}]})}_addCheck(t){return new qn({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:U.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:U.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:U.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:U.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:U.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}qn.create=e=>{var t;return new qn({checks:[],typeName:Z.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Q(e)})};class _s extends X{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==L.boolean){const r=this._getOrReturnCtx(t);return A(r,{code:P.invalid_type,expected:L.boolean,received:r.parsedType}),G}return Je(t.data)}}_s.create=e=>new _s({typeName:Z.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Q(e)});class kr extends X{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==L.date){const s=this._getOrReturnCtx(t);return A(s,{code:P.invalid_type,expected:L.date,received:s.parsedType}),G}if(isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return A(s,{code:P.invalid_date}),G}const r=new Ke;let o;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(o=this._getOrReturnCtx(t,o),A(o,{code:P.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(o=this._getOrReturnCtx(t,o),A(o,{code:P.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):oe.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new kr({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:U.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:U.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}kr.create=e=>new kr({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Z.ZodDate,...Q(e)});class la extends X{_parse(t){if(this._getType(t)!==L.symbol){const r=this._getOrReturnCtx(t);return A(r,{code:P.invalid_type,expected:L.symbol,received:r.parsedType}),G}return Je(t.data)}}la.create=e=>new la({typeName:Z.ZodSymbol,...Q(e)});class Cs extends X{_parse(t){if(this._getType(t)!==L.undefined){const r=this._getOrReturnCtx(t);return A(r,{code:P.invalid_type,expected:L.undefined,received:r.parsedType}),G}return Je(t.data)}}Cs.create=e=>new Cs({typeName:Z.ZodUndefined,...Q(e)});class ks extends X{_parse(t){if(this._getType(t)!==L.null){const r=this._getOrReturnCtx(t);return A(r,{code:P.invalid_type,expected:L.null,received:r.parsedType}),G}return Je(t.data)}}ks.create=e=>new ks({typeName:Z.ZodNull,...Q(e)});class ho extends X{constructor(){super(...arguments),this._any=!0}_parse(t){return Je(t.data)}}ho.create=e=>new ho({typeName:Z.ZodAny,...Q(e)});class yr extends X{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Je(t.data)}}yr.create=e=>new yr({typeName:Z.ZodUnknown,...Q(e)});class yn extends X{_parse(t){const n=this._getOrReturnCtx(t);return A(n,{code:P.invalid_type,expected:L.never,received:n.parsedType}),G}}yn.create=e=>new yn({typeName:Z.ZodNever,...Q(e)});class ca extends X{_parse(t){if(this._getType(t)!==L.undefined){const r=this._getOrReturnCtx(t);return A(r,{code:P.invalid_type,expected:L.void,received:r.parsedType}),G}return Je(t.data)}}ca.create=e=>new ca({typeName:Z.ZodVoid,...Q(e)});class Lt extends X{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==L.array)return A(n,{code:P.invalid_type,expected:L.array,received:n.parsedType}),G;if(o.exactLength!==null){const i=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(i||a)&&(A(n,{code:i?P.too_big:P.too_small,minimum:a?o.exactLength.value:void 0,maximum:i?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(A(n,{code:P.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(A(n,{code:P.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((i,a)=>o.type._parseAsync(new Jt(n,i,n.path,a)))).then(i=>Ke.mergeArray(r,i));const s=[...n.data].map((i,a)=>o.type._parseSync(new Jt(n,i,n.path,a)));return Ke.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new Lt({...this._def,minLength:{value:t,message:U.toString(n)}})}max(t,n){return new Lt({...this._def,maxLength:{value:t,message:U.toString(n)}})}length(t,n){return new Lt({...this._def,exactLength:{value:t,message:U.toString(n)}})}nonempty(t){return this.min(1,t)}}Lt.create=(e,t)=>new Lt({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Z.ZodArray,...Q(t)});function Ar(e){if(e instanceof Ce){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Yt.create(Ar(r))}return new Ce({...e._def,shape:()=>t})}else return e instanceof Lt?new Lt({...e._def,type:Ar(e.element)}):e instanceof Yt?Yt.create(Ar(e.unwrap())):e instanceof Gn?Gn.create(Ar(e.unwrap())):e instanceof en?en.create(e.items.map(t=>Ar(t))):e}class Ce extends X{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=oe.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==L.object){const c=this._getOrReturnCtx(t);return A(c,{code:P.invalid_type,expected:L.object,received:c.parsedType}),G}const{status:r,ctx:o}=this._processInputParams(t),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof yn&&this._def.unknownKeys==="strip"))for(const c in o.data)i.includes(c)||a.push(c);const l=[];for(const c of i){const u=s[c],f=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Jt(o,f,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof yn){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")a.length>0&&(A(o,{code:P.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of a){const f=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Jt(o,f,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const f=await u.key,g=await u.value;c.push({key:f,value:g,alwaysSet:u.alwaysSet})}return c}).then(c=>Ke.mergeObjectSync(r,c)):Ke.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return U.errToObj,new Ce({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,s,i,a;const l=(i=(s=(o=this._def).errorMap)===null||s===void 0?void 0:s.call(o,n,r).message)!==null&&i!==void 0?i:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=U.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new Ce({...this._def,unknownKeys:"strip"})}passthrough(){return new Ce({...this._def,unknownKeys:"passthrough"})}extend(t){return new Ce({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Ce({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Z.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Ce({...this._def,catchall:t})}pick(t){const n={};return oe.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Ce({...this._def,shape:()=>n})}omit(t){const n={};return oe.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Ce({...this._def,shape:()=>n})}deepPartial(){return Ar(this)}partial(t){const n={};return oe.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new Ce({...this._def,shape:()=>n})}required(t){const n={};return oe.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof Yt;)s=s._def.innerType;n[r]=s}}),new Ce({...this._def,shape:()=>n})}keyof(){return Vh(oe.objectKeys(this.shape))}}Ce.create=(e,t)=>new Ce({shape:()=>e,unknownKeys:"strip",catchall:yn.create(),typeName:Z.ZodObject,...Q(t)});Ce.strictCreate=(e,t)=>new Ce({shape:()=>e,unknownKeys:"strict",catchall:yn.create(),typeName:Z.ZodObject,...Q(t)});Ce.lazycreate=(e,t)=>new Ce({shape:e,unknownKeys:"strip",catchall:yn.create(),typeName:Z.ZodObject,...Q(t)});class Es extends X{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(s){for(const a of s)if(a.result.status==="valid")return a.result;for(const a of s)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const i=s.map(a=>new ht(a.ctx.common.issues));return A(n,{code:P.invalid_union,unionErrors:i}),G}if(n.common.async)return Promise.all(r.map(async s=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(o);{let s;const i=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!s&&(s={result:u,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(l=>new ht(l));return A(n,{code:P.invalid_union,unionErrors:a}),G}}get options(){return this._def.options}}Es.create=(e,t)=>new Es({options:e,typeName:Z.ZodUnion,...Q(t)});const an=e=>e instanceof Ts?an(e.schema):e instanceof zt?an(e.innerType()):e instanceof Rs?[e.value]:e instanceof Kn?e.options:e instanceof Ps?oe.objectValues(e.enum):e instanceof js?an(e._def.innerType):e instanceof Cs?[void 0]:e instanceof ks?[null]:e instanceof Yt?[void 0,...an(e.unwrap())]:e instanceof Gn?[null,...an(e.unwrap())]:e instanceof Ju||e instanceof Os?an(e.unwrap()):e instanceof Is?an(e._def.innerType):[];class Da extends X{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==L.object)return A(n,{code:P.invalid_type,expected:L.object,received:n.parsedType}),G;const r=this.discriminator,o=n.data[r],s=this.optionsMap.get(o);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(A(n,{code:P.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),G)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const s of n){const i=an(s.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of i){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,s)}}return new Da({typeName:Z.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Q(r)})}}function Uc(e,t){const n=On(e),r=On(t);if(e===t)return{valid:!0,data:e};if(n===L.object&&r===L.object){const o=oe.objectKeys(t),s=oe.objectKeys(e).filter(a=>o.indexOf(a)!==-1),i={...e,...t};for(const a of s){const l=Uc(e[a],t[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(n===L.array&&r===L.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let s=0;s<e.length;s++){const i=e[s],a=t[s],l=Uc(i,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===L.date&&r===L.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class bs extends X{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(s,i)=>{if(Vc(s)||Vc(i))return G;const a=Uc(s.value,i.value);return a.valid?((Bc(s)||Bc(i))&&n.dirty(),{status:n.value,value:a.data}):(A(r,{code:P.invalid_intersection_types}),G)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,i])=>o(s,i)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}bs.create=(e,t,n)=>new bs({left:e,right:t,typeName:Z.ZodIntersection,...Q(n)});class en extends X{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==L.array)return A(r,{code:P.invalid_type,expected:L.array,received:r.parsedType}),G;if(r.data.length<this._def.items.length)return A(r,{code:P.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),G;!this._def.rest&&r.data.length>this._def.items.length&&(A(r,{code:P.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((i,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Jt(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(s).then(i=>Ke.mergeArray(n,i)):Ke.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new en({...this._def,rest:t})}}en.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new en({items:e,typeName:Z.ZodTuple,rest:null,...Q(t)})};class Ns extends X{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==L.object)return A(r,{code:P.invalid_type,expected:L.object,received:r.parsedType}),G;const o=[],s=this._def.keyType,i=this._def.valueType;for(const a in r.data)o.push({key:s._parse(new Jt(r,a,r.path,a)),value:i._parse(new Jt(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?Ke.mergeObjectAsync(n,o):Ke.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof X?new Ns({keyType:t,valueType:n,typeName:Z.ZodRecord,...Q(r)}):new Ns({keyType:Ot.create(),valueType:t,typeName:Z.ZodRecord,...Q(n)})}}class ua extends X{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==L.map)return A(r,{code:P.invalid_type,expected:L.map,received:r.parsedType}),G;const o=this._def.keyType,s=this._def.valueType,i=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new Jt(r,a,r.path,[c,"key"])),value:s._parse(new Jt(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of i){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return G;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of i){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return G;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}ua.create=(e,t,n)=>new ua({valueType:t,keyType:e,typeName:Z.ZodMap,...Q(n)});class Er extends X{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==L.set)return A(r,{code:P.invalid_type,expected:L.set,received:r.parsedType}),G;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(A(r,{code:P.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(A(r,{code:P.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const s=this._def.valueType;function i(l){const c=new Set;for(const u of l){if(u.status==="aborted")return G;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>s._parse(new Jt(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,n){return new Er({...this._def,minSize:{value:t,message:U.toString(n)}})}max(t,n){return new Er({...this._def,maxSize:{value:t,message:U.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Er.create=(e,t)=>new Er({valueType:e,minSize:null,maxSize:null,typeName:Z.ZodSet,...Q(t)});class no extends X{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==L.function)return A(n,{code:P.invalid_type,expected:L.function,received:n.parsedType}),G;function r(a,l){return ia({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,sa(),mo].filter(c=>!!c),issueData:{code:P.invalid_arguments,argumentsError:l}})}function o(a,l){return ia({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,sa(),mo].filter(c=>!!c),issueData:{code:P.invalid_return_type,returnTypeError:l}})}const s={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof go){const a=this;return Je(async function(...l){const c=new ht([]),u=await a._def.args.parseAsync(l,s).catch(x=>{throw c.addIssue(r(l,x)),c}),f=await Reflect.apply(i,this,u);return await a._def.returns._def.type.parseAsync(f,s).catch(x=>{throw c.addIssue(o(f,x)),c})})}else{const a=this;return Je(function(...l){const c=a._def.args.safeParse(l,s);if(!c.success)throw new ht([r(l,c.error)]);const u=Reflect.apply(i,this,c.data),f=a._def.returns.safeParse(u,s);if(!f.success)throw new ht([o(u,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new no({...this._def,args:en.create(t).rest(yr.create())})}returns(t){return new no({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new no({args:t||en.create([]).rest(yr.create()),returns:n||yr.create(),typeName:Z.ZodFunction,...Q(r)})}}class Ts extends X{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Ts.create=(e,t)=>new Ts({getter:e,typeName:Z.ZodLazy,...Q(t)});class Rs extends X{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return A(n,{received:n.data,code:P.invalid_literal,expected:this._def.value}),G}return{status:"valid",value:t.data}}get value(){return this._def.value}}Rs.create=(e,t)=>new Rs({value:e,typeName:Z.ZodLiteral,...Q(t)});function Vh(e,t){return new Kn({values:e,typeName:Z.ZodEnum,...Q(t)})}class Kn extends X{constructor(){super(...arguments),Bo.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return A(n,{expected:oe.joinValues(r),received:n.parsedType,code:P.invalid_type}),G}if(aa(this,Bo)||Dh(this,Bo,new Set(this._def.values)),!aa(this,Bo).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return A(n,{received:n.data,code:P.invalid_enum_value,options:r}),G}return Je(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Kn.create(t,{...this._def,...n})}exclude(t,n=this._def){return Kn.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Bo=new WeakMap;Kn.create=Vh;class Ps extends X{constructor(){super(...arguments),Uo.set(this,void 0)}_parse(t){const n=oe.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==L.string&&r.parsedType!==L.number){const o=oe.objectValues(n);return A(r,{expected:oe.joinValues(o),received:r.parsedType,code:P.invalid_type}),G}if(aa(this,Uo)||Dh(this,Uo,new Set(oe.getValidEnumValues(this._def.values))),!aa(this,Uo).has(t.data)){const o=oe.objectValues(n);return A(r,{received:r.data,code:P.invalid_enum_value,options:o}),G}return Je(t.data)}get enum(){return this._def.values}}Uo=new WeakMap;Ps.create=(e,t)=>new Ps({values:e,typeName:Z.ZodNativeEnum,...Q(t)});class go extends X{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==L.promise&&n.common.async===!1)return A(n,{code:P.invalid_type,expected:L.promise,received:n.parsedType}),G;const r=n.parsedType===L.promise?n.data:Promise.resolve(n.data);return Je(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}go.create=(e,t)=>new go({type:e,typeName:Z.ZodPromise,...Q(t)});class zt extends X{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Z.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,s={addIssue:i=>{A(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){const i=o.transform(r.data,s);if(r.common.async)return Promise.resolve(i).then(async a=>{if(n.value==="aborted")return G;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?G:l.status==="dirty"||n.value==="dirty"?Kr(l.value):l});{if(n.value==="aborted")return G;const a=this._def.schema._parseSync({data:i,path:r.path,parent:r});return a.status==="aborted"?G:a.status==="dirty"||n.value==="dirty"?Kr(a.value):a}}if(o.type==="refinement"){const i=a=>{const l=o.refinement(a,s);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?G:(a.status==="dirty"&&n.dirty(),i(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?G:(a.status==="dirty"&&n.dirty(),i(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!ws(i))return i;const a=o.transform(i.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>ws(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:n.value,value:a})):i);oe.assertNever(o)}}zt.create=(e,t,n)=>new zt({schema:e,typeName:Z.ZodEffects,effect:t,...Q(n)});zt.createWithPreprocess=(e,t,n)=>new zt({schema:t,effect:{type:"preprocess",transform:e},typeName:Z.ZodEffects,...Q(n)});class Yt extends X{_parse(t){return this._getType(t)===L.undefined?Je(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Yt.create=(e,t)=>new Yt({innerType:e,typeName:Z.ZodOptional,...Q(t)});class Gn extends X{_parse(t){return this._getType(t)===L.null?Je(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Gn.create=(e,t)=>new Gn({innerType:e,typeName:Z.ZodNullable,...Q(t)});class js extends X{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===L.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}js.create=(e,t)=>new js({innerType:e,typeName:Z.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Q(t)});class Is extends X{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Ss(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new ht(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new ht(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Is.create=(e,t)=>new Is({innerType:e,typeName:Z.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Q(t)});class da extends X{_parse(t){if(this._getType(t)!==L.nan){const r=this._getOrReturnCtx(t);return A(r,{code:P.invalid_type,expected:L.nan,received:r.parsedType}),G}return{status:"valid",value:t.data}}}da.create=e=>new da({typeName:Z.ZodNaN,...Q(e)});const Ex=Symbol("zod_brand");class Ju extends X{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Vs extends X{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?G:s.status==="dirty"?(n.dirty(),Kr(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?G:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new Vs({in:t,out:n,typeName:Z.ZodPipeline})}}class Os extends X{_parse(t){const n=this._def.innerType._parse(t),r=o=>(ws(o)&&(o.value=Object.freeze(o.value)),o);return Ss(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Os.create=(e,t)=>new Os({innerType:e,typeName:Z.ZodReadonly,...Q(t)});function Bh(e,t={},n){return e?ho.create().superRefine((r,o)=>{var s,i;if(!e(r)){const a=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,l=(i=(s=a.fatal)!==null&&s!==void 0?s:n)!==null&&i!==void 0?i:!0,c=typeof a=="string"?{message:a}:a;o.addIssue({code:"custom",...c,fatal:l})}}):ho.create()}const bx={object:Ce.lazycreate};var Z;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Z||(Z={}));const Nx=(e,t={message:`Input not instance of ${e.name}`})=>Bh(n=>n instanceof e,t),Uh=Ot.create,Hh=Zn.create,Tx=da.create,Rx=qn.create,Wh=_s.create,Px=kr.create,jx=la.create,Ix=Cs.create,Ox=ks.create,Mx=ho.create,Ax=yr.create,Lx=yn.create,Dx=ca.create,zx=Lt.create,$x=Ce.create,Fx=Ce.strictCreate,Vx=Es.create,Bx=Da.create,Ux=bs.create,Hx=en.create,Wx=Ns.create,Zx=ua.create,qx=Er.create,Kx=no.create,Gx=Ts.create,Qx=Rs.create,Yx=Kn.create,Xx=Ps.create,Jx=go.create,Hf=zt.create,ew=Yt.create,tw=Gn.create,nw=zt.createWithPreprocess,rw=Vs.create,ow=()=>Uh().optional(),sw=()=>Hh().optional(),iw=()=>Wh().optional(),aw={string:e=>Ot.create({...e,coerce:!0}),number:e=>Zn.create({...e,coerce:!0}),boolean:e=>_s.create({...e,coerce:!0}),bigint:e=>qn.create({...e,coerce:!0}),date:e=>kr.create({...e,coerce:!0})},lw=G;var S=Object.freeze({__proto__:null,defaultErrorMap:mo,setErrorMap:lx,getErrorMap:sa,makeIssue:ia,EMPTY_PATH:cx,addIssueToContext:A,ParseStatus:Ke,INVALID:G,DIRTY:Kr,OK:Je,isAborted:Vc,isDirty:Bc,isValid:ws,isAsync:Ss,get util(){return oe},get objectUtil(){return Fc},ZodParsedType:L,getParsedType:On,ZodType:X,datetimeRegex:Fh,ZodString:Ot,ZodNumber:Zn,ZodBigInt:qn,ZodBoolean:_s,ZodDate:kr,ZodSymbol:la,ZodUndefined:Cs,ZodNull:ks,ZodAny:ho,ZodUnknown:yr,ZodNever:yn,ZodVoid:ca,ZodArray:Lt,ZodObject:Ce,ZodUnion:Es,ZodDiscriminatedUnion:Da,ZodIntersection:bs,ZodTuple:en,ZodRecord:Ns,ZodMap:ua,ZodSet:Er,ZodFunction:no,ZodLazy:Ts,ZodLiteral:Rs,ZodEnum:Kn,ZodNativeEnum:Ps,ZodPromise:go,ZodEffects:zt,ZodTransformer:zt,ZodOptional:Yt,ZodNullable:Gn,ZodDefault:js,ZodCatch:Is,ZodNaN:da,BRAND:Ex,ZodBranded:Ju,ZodPipeline:Vs,ZodReadonly:Os,custom:Bh,Schema:X,ZodSchema:X,late:bx,get ZodFirstPartyTypeKind(){return Z},coerce:aw,any:Mx,array:zx,bigint:Rx,boolean:Wh,date:Px,discriminatedUnion:Bx,effect:Hf,enum:Yx,function:Kx,instanceof:Nx,intersection:Ux,lazy:Gx,literal:Qx,map:Zx,nan:Tx,nativeEnum:Xx,never:Lx,null:Ox,nullable:tw,number:Hh,object:$x,oboolean:iw,onumber:sw,optional:ew,ostring:ow,pipeline:rw,preprocess:nw,promise:Jx,record:Wx,set:qx,strictObject:Fx,string:Uh,symbol:jx,transformer:Hf,tuple:Hx,undefined:Ix,union:Vx,unknown:Ax,void:Dx,NEVER:lw,ZodIssueCode:P,quotelessJson:ax,ZodError:ht});const Zh="2024-11-05",cw=[Zh,"2024-10-07"],za="2.0",qh=S.union([S.string(),S.number().int()]),Kh=S.string(),Vt=S.object({_meta:S.optional(S.object({progressToken:S.optional(qh)}).passthrough())}).passthrough(),wt=S.object({method:S.string(),params:S.optional(Vt)}),Bs=S.object({_meta:S.optional(S.object({}).passthrough())}).passthrough(),Bt=S.object({method:S.string(),params:S.optional(Bs)}),Ut=S.object({_meta:S.optional(S.object({}).passthrough())}).passthrough(),$a=S.union([S.string(),S.number().int()]),uw=S.object({jsonrpc:S.literal(za),id:$a}).merge(wt).strict(),dw=S.object({jsonrpc:S.literal(za)}).merge(Bt).strict(),fw=S.object({jsonrpc:S.literal(za),id:$a,result:Ut}).strict();var Gr;(function(e){e[e.ConnectionClosed=-1]="ConnectionClosed",e[e.RequestTimeout=-2]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError"})(Gr||(Gr={}));const pw=S.object({jsonrpc:S.literal(za),id:$a,error:S.object({code:S.number().int(),message:S.string(),data:S.optional(S.unknown())})}).strict(),mw=S.union([uw,dw,fw,pw]),mr=Ut.strict(),ed=Bt.extend({method:S.literal("notifications/cancelled"),params:Bs.extend({requestId:$a,reason:S.string().optional()})}),Gh=S.object({name:S.string(),version:S.string()}).passthrough(),hw=S.object({experimental:S.optional(S.object({}).passthrough()),sampling:S.optional(S.object({}).passthrough()),roots:S.optional(S.object({listChanged:S.optional(S.boolean())}).passthrough())}).passthrough(),gw=wt.extend({method:S.literal("initialize"),params:Vt.extend({protocolVersion:S.string(),capabilities:hw,clientInfo:Gh})}),vw=S.object({experimental:S.optional(S.object({}).passthrough()),logging:S.optional(S.object({}).passthrough()),prompts:S.optional(S.object({listChanged:S.optional(S.boolean())}).passthrough()),resources:S.optional(S.object({subscribe:S.optional(S.boolean()),listChanged:S.optional(S.boolean())}).passthrough()),tools:S.optional(S.object({listChanged:S.optional(S.boolean())}).passthrough())}).passthrough(),Qh=Ut.extend({protocolVersion:S.string(),capabilities:vw,serverInfo:Gh}),yw=Bt.extend({method:S.literal("notifications/initialized")}),td=wt.extend({method:S.literal("ping")}),xw=S.object({progress:S.number(),total:S.optional(S.number())}).passthrough(),Fa=Bt.extend({method:S.literal("notifications/progress"),params:Bs.merge(xw).extend({progressToken:qh})}),Va=wt.extend({params:Vt.extend({cursor:S.optional(Kh)}).optional()}),Ba=Ut.extend({nextCursor:S.optional(Kh)}),Yh=S.object({uri:S.string(),mimeType:S.optional(S.string())}).passthrough(),Xh=Yh.extend({text:S.string()}),Jh=Yh.extend({blob:S.string().base64()}),ww=S.object({uri:S.string(),name:S.string(),description:S.optional(S.string()),mimeType:S.optional(S.string())}).passthrough(),Sw=S.object({uriTemplate:S.string(),name:S.string(),description:S.optional(S.string()),mimeType:S.optional(S.string())}).passthrough(),_w=Va.extend({method:S.literal("resources/list")}),nd=Ba.extend({resources:S.array(ww)}),Cw=Va.extend({method:S.literal("resources/templates/list")}),rd=Ba.extend({resourceTemplates:S.array(Sw)}),kw=wt.extend({method:S.literal("resources/read"),params:Vt.extend({uri:S.string()})}),od=Ut.extend({contents:S.array(S.union([Xh,Jh]))}),Ew=Bt.extend({method:S.literal("notifications/resources/list_changed")}),bw=wt.extend({method:S.literal("resources/subscribe"),params:Vt.extend({uri:S.string()})}),Nw=wt.extend({method:S.literal("resources/unsubscribe"),params:Vt.extend({uri:S.string()})}),Tw=Bt.extend({method:S.literal("notifications/resources/updated"),params:Bs.extend({uri:S.string()})}),Rw=S.object({name:S.string(),description:S.optional(S.string()),required:S.optional(S.boolean())}).passthrough(),Pw=S.object({name:S.string(),description:S.optional(S.string()),arguments:S.optional(S.array(Rw))}).passthrough(),jw=Va.extend({method:S.literal("prompts/list")}),sd=Ba.extend({prompts:S.array(Pw)}),Iw=wt.extend({method:S.literal("prompts/get"),params:Vt.extend({name:S.string(),arguments:S.optional(S.record(S.string()))})}),Ua=S.object({type:S.literal("text"),text:S.string()}).passthrough(),Ha=S.object({type:S.literal("image"),data:S.string().base64(),mimeType:S.string()}).passthrough(),eg=S.object({type:S.literal("resource"),resource:S.union([Xh,Jh])}).passthrough(),Ow=S.object({role:S.enum(["user","assistant"]),content:S.union([Ua,Ha,eg])}).passthrough(),id=Ut.extend({description:S.optional(S.string()),messages:S.array(Ow)}),Mw=Bt.extend({method:S.literal("notifications/prompts/list_changed")}),Aw=S.object({name:S.string(),description:S.optional(S.string()),inputSchema:S.object({type:S.literal("object"),properties:S.optional(S.object({}).passthrough())}).passthrough()}).passthrough(),Lw=Va.extend({method:S.literal("tools/list")}),ad=Ba.extend({tools:S.array(Aw)}),ld=Ut.extend({content:S.array(S.union([Ua,Ha,eg])),isError:S.boolean().default(!1).optional()}),Dw=ld.or(Ut.extend({toolResult:S.unknown()})),zw=wt.extend({method:S.literal("tools/call"),params:Vt.extend({name:S.string(),arguments:S.optional(S.record(S.unknown()))})}),$w=Bt.extend({method:S.literal("notifications/tools/list_changed")}),tg=S.enum(["debug","info","notice","warning","error","critical","alert","emergency"]),Fw=wt.extend({method:S.literal("logging/setLevel"),params:Vt.extend({level:tg})}),Vw=Bt.extend({method:S.literal("notifications/message"),params:Bs.extend({level:tg,logger:S.optional(S.string()),data:S.unknown()})}),Bw=S.object({name:S.string().optional()}).passthrough(),Uw=S.object({hints:S.optional(S.array(Bw)),costPriority:S.optional(S.number().min(0).max(1)),speedPriority:S.optional(S.number().min(0).max(1)),intelligencePriority:S.optional(S.number().min(0).max(1))}).passthrough(),Hw=S.object({role:S.enum(["user","assistant"]),content:S.union([Ua,Ha])}).passthrough(),ng=wt.extend({method:S.literal("sampling/createMessage"),params:Vt.extend({messages:S.array(Hw),systemPrompt:S.optional(S.string()),includeContext:S.optional(S.enum(["none","thisServer","allServers"])),temperature:S.optional(S.number()),maxTokens:S.number().int(),stopSequences:S.optional(S.array(S.string())),metadata:S.optional(S.object({}).passthrough()),modelPreferences:S.optional(Uw)})}),Ww=Ut.extend({model:S.string(),stopReason:S.optional(S.enum(["endTurn","stopSequence","maxTokens"]).or(S.string())),role:S.enum(["user","assistant"]),content:S.discriminatedUnion("type",[Ua,Ha])}),Zw=S.object({type:S.literal("ref/resource"),uri:S.string()}).passthrough(),qw=S.object({type:S.literal("ref/prompt"),name:S.string()}).passthrough(),Kw=wt.extend({method:S.literal("completion/complete"),params:Vt.extend({ref:S.union([qw,Zw]),argument:S.object({name:S.string(),value:S.string()}).passthrough()})}),rg=Ut.extend({completion:S.object({values:S.array(S.string()).max(100),total:S.optional(S.number().int()),hasMore:S.optional(S.boolean())}).passthrough()}),Gw=S.object({uri:S.string().startsWith("file://"),name:S.optional(S.string())}).passthrough(),og=wt.extend({method:S.literal("roots/list")}),Qw=Ut.extend({roots:S.array(Gw)}),Yw=Bt.extend({method:S.literal("notifications/roots/list_changed")});S.union([td,gw,Kw,Fw,Iw,jw,_w,Cw,kw,bw,Nw,zw,Lw]);const Xw=S.union([ed,Fa,yw,Yw]);S.union([mr,Ww,Qw]);S.union([td,ng,og]);S.union([ed,Fa,Vw,Tw,Ew,$w,Mw]);S.union([mr,Qh,rg,id,sd,nd,rd,od,ld,ad]);class Ol extends Error{constructor(t,n,r){super(`MCP error ${t}: ${n}`),this.code=t,this.data=r}}const Jw=6e4;class eS{constructor(t){this._options=t,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this.setNotificationHandler(ed,n=>{const r=this._requestHandlerAbortControllers.get(n.params.requestId);r==null||r.abort(n.params.reason)}),this.setNotificationHandler(Fa,n=>{this._onprogress(n)}),this.setRequestHandler(td,n=>({}))}async connect(t){this._transport=t,this._transport.onclose=()=>{this._onclose()},this._transport.onerror=n=>{this._onerror(n)},this._transport.onmessage=n=>{"method"in n?"id"in n?this._onrequest(n):this._onnotification(n):this._onresponse(n)},await this._transport.start()}_onclose(){var t;const n=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._transport=void 0,(t=this.onclose)===null||t===void 0||t.call(this);const r=new Ol(Gr.ConnectionClosed,"Connection closed");for(const o of n.values())o(r)}_onerror(t){var n;(n=this.onerror)===null||n===void 0||n.call(this,t)}_onnotification(t){var n;const r=(n=this._notificationHandlers.get(t.method))!==null&&n!==void 0?n:this.fallbackNotificationHandler;r!==void 0&&Promise.resolve().then(()=>r(t)).catch(o=>this._onerror(new Error(`Uncaught error in notification handler: ${o}`)))}_onrequest(t){var n,r;const o=(n=this._requestHandlers.get(t.method))!==null&&n!==void 0?n:this.fallbackRequestHandler;if(o===void 0){(r=this._transport)===null||r===void 0||r.send({jsonrpc:"2.0",id:t.id,error:{code:Gr.MethodNotFound,message:"Method not found"}}).catch(i=>this._onerror(new Error(`Failed to send an error response: ${i}`)));return}const s=new AbortController;this._requestHandlerAbortControllers.set(t.id,s),Promise.resolve().then(()=>o(t,{signal:s.signal})).then(i=>{var a;if(!s.signal.aborted)return(a=this._transport)===null||a===void 0?void 0:a.send({result:i,jsonrpc:"2.0",id:t.id})},i=>{var a,l;if(!s.signal.aborted)return(a=this._transport)===null||a===void 0?void 0:a.send({jsonrpc:"2.0",id:t.id,error:{code:Number.isSafeInteger(i.code)?i.code:Gr.InternalError,message:(l=i.message)!==null&&l!==void 0?l:"Internal error"}})}).catch(i=>this._onerror(new Error(`Failed to send response: ${i}`))).finally(()=>{this._requestHandlerAbortControllers.delete(t.id)})}_onprogress(t){const{progress:n,total:r,progressToken:o}=t.params,s=this._progressHandlers.get(Number(o));if(s===void 0){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(t)}`));return}s({progress:n,total:r})}_onresponse(t){const n=t.id,r=this._responseHandlers.get(Number(n));if(r===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(t)}`));return}if(this._responseHandlers.delete(Number(n)),this._progressHandlers.delete(Number(n)),"result"in t)r(t);else{const o=new Ol(t.error.code,t.error.message,t.error.data);r(o)}}get transport(){return this._transport}async close(){var t;await((t=this._transport)===null||t===void 0?void 0:t.close())}request(t,n,r){return new Promise((o,s)=>{var i,a,l,c;if(!this._transport){s(new Error("Not connected"));return}((i=this._options)===null||i===void 0?void 0:i.enforceStrictCapabilities)===!0&&this.assertCapabilityForMethod(t.method),(a=r==null?void 0:r.signal)===null||a===void 0||a.throwIfAborted();const u=this._requestMessageId++,f={...t,jsonrpc:"2.0",id:u};r!=null&&r.onprogress&&(this._progressHandlers.set(u,r.onprogress),f.params={...t.params,_meta:{progressToken:u}});let g;this._responseHandlers.set(u,m=>{var _;if(g!==void 0&&clearTimeout(g),!(!((_=r==null?void 0:r.signal)===null||_===void 0)&&_.aborted)){if(m instanceof Error)return s(m);try{const v=n.parse(m.result);o(v)}catch(v){s(v)}}});const x=m=>{var _;this._responseHandlers.delete(u),this._progressHandlers.delete(u),(_=this._transport)===null||_===void 0||_.send({jsonrpc:"2.0",method:"cancelled",params:{requestId:u,reason:String(m)}}).catch(v=>this._onerror(new Error(`Failed to send cancellation: ${v}`))),s(m)};(l=r==null?void 0:r.signal)===null||l===void 0||l.addEventListener("abort",()=>{var m;g!==void 0&&clearTimeout(g),x((m=r==null?void 0:r.signal)===null||m===void 0?void 0:m.reason)});const w=(c=r==null?void 0:r.timeout)!==null&&c!==void 0?c:Jw;g=setTimeout(()=>x(new Ol(Gr.RequestTimeout,"Request timed out",{timeout:w})),w),this._transport.send(f).catch(m=>{g!==void 0&&clearTimeout(g),s(m)})})}async notification(t){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(t.method);const n={...t,jsonrpc:"2.0"};await this._transport.send(n)}setRequestHandler(t,n){const r=t.shape.method.value;this.assertRequestHandlerCapability(r),this._requestHandlers.set(r,(o,s)=>Promise.resolve(n(t.parse(o),s)))}removeRequestHandler(t){this._requestHandlers.delete(t)}setNotificationHandler(t,n){this._notificationHandlers.set(t.shape.method.value,r=>Promise.resolve(n(t.parse(r))))}removeNotificationHandler(t){this._notificationHandlers.delete(t)}}class tS extends eS{constructor(t,n){super(n),this._clientInfo=t,this._capabilities=n.capabilities}assertCapability(t,n){var r;if(!(!((r=this._serverCapabilities)===null||r===void 0)&&r[t]))throw new Error(`Server does not support ${t} (required for ${n})`)}async connect(t){await super.connect(t);try{const n=await this.request({method:"initialize",params:{protocolVersion:Zh,capabilities:this._capabilities,clientInfo:this._clientInfo}},Qh);if(n===void 0)throw new Error(`Server sent invalid initialize result: ${n}`);if(!cw.includes(n.protocolVersion))throw new Error(`Server's protocol version is not supported: ${n.protocolVersion}`);this._serverCapabilities=n.capabilities,this._serverVersion=n.serverInfo,await this.notification({method:"notifications/initialized"})}catch(n){throw this.close(),n}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}assertCapabilityForMethod(t){var n,r,o,s,i;switch(t){case"logging/setLevel":if(!(!((n=this._serverCapabilities)===null||n===void 0)&&n.logging))throw new Error(`Server does not support logging (required for ${t})`);break;case"prompts/get":case"prompts/list":if(!(!((r=this._serverCapabilities)===null||r===void 0)&&r.prompts))throw new Error(`Server does not support prompts (required for ${t})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!(!((o=this._serverCapabilities)===null||o===void 0)&&o.resources))throw new Error(`Server does not support resources (required for ${t})`);if(t==="resources/subscribe"&&!this._serverCapabilities.resources.subscribe)throw new Error(`Server does not support resource subscriptions (required for ${t})`);break;case"tools/call":case"tools/list":if(!(!((s=this._serverCapabilities)===null||s===void 0)&&s.tools))throw new Error(`Server does not support tools (required for ${t})`);break;case"completion/complete":if(!(!((i=this._serverCapabilities)===null||i===void 0)&&i.prompts))throw new Error(`Server does not support prompts (required for ${t})`);break}}assertNotificationCapability(t){var n;switch(t){case"notifications/roots/list_changed":if(!(!((n=this._capabilities.roots)===null||n===void 0)&&n.listChanged))throw new Error(`Client does not support roots list changed notifications (required for ${t})`);break}}assertRequestHandlerCapability(t){switch(t){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Error(`Client does not support sampling capability (required for ${t})`);break;case"roots/list":if(!this._capabilities.roots)throw new Error(`Client does not support roots capability (required for ${t})`);break}}async ping(t){return this.request({method:"ping"},mr,t)}async complete(t,n){return this.request({method:"completion/complete",params:t},rg,n)}async setLoggingLevel(t,n){return this.request({method:"logging/setLevel",params:{level:t}},mr,n)}async getPrompt(t,n){return this.request({method:"prompts/get",params:t},id,n)}async listPrompts(t,n){return this.request({method:"prompts/list",params:t},sd,n)}async listResources(t,n){return this.request({method:"resources/list",params:t},nd,n)}async listResourceTemplates(t,n){return this.request({method:"resources/templates/list",params:t},rd,n)}async readResource(t,n){return this.request({method:"resources/read",params:t},od,n)}async subscribeResource(t,n){return this.request({method:"resources/subscribe",params:t},mr,n)}async unsubscribeResource(t,n){return this.request({method:"resources/unsubscribe",params:t},mr,n)}async callTool(t,n=ld,r){return this.request({method:"tools/call",params:t},n,r)}async listTools(t,n){return this.request({method:"tools/list",params:t},ad,n)}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}}class nS{constructor(t){this._url=t}start(){if(this._eventSource)throw new Error("SSEClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((t,n)=>{this._eventSource=new EventSource(this._url.href),this._abortController=new AbortController,this._eventSource.onerror=r=>{var o;const s=new Error(`SSE error: ${JSON.stringify(r)}`);n(s),(o=this.onerror)===null||o===void 0||o.call(this,s)},this._eventSource.onopen=()=>{},this._eventSource.addEventListener("endpoint",r=>{var o;const s=r;try{if(this._endpoint=new URL(s.data,this._url),this._endpoint.origin!==this._url.origin)throw new Error(`Endpoint origin does not match connection origin: ${this._endpoint.origin}`)}catch(i){n(i),(o=this.onerror)===null||o===void 0||o.call(this,i),this.close();return}t()}),this._eventSource.onmessage=r=>{var o,s;const i=r;let a;try{a=mw.parse(JSON.parse(i.data))}catch(l){(o=this.onerror)===null||o===void 0||o.call(this,l);return}(s=this.onmessage)===null||s===void 0||s.call(this,a)}})}async close(){var t,n,r;(t=this._abortController)===null||t===void 0||t.abort(),(n=this._eventSource)===null||n===void 0||n.close(),(r=this.onclose)===null||r===void 0||r.call(this)}async send(t){var n,r;if(!this._endpoint)throw new Error("Not connected");try{const o=await fetch(this._endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),signal:(n=this._abortController)===null||n===void 0?void 0:n.signal});if(!o.ok){const s=await o.text().catch(()=>null);throw new Error(`Error POSTing to endpoint (HTTP ${o.status}): ${s}`)}}catch(o){throw(r=this.onerror)===null||r===void 0||r.call(this,o),o}}}const sg=Bt.extend({method:S.literal("notifications/stderr"),params:S.object({content:S.string()})});Xw.or(sg);function ue(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function ig(e,t=[]){let n=[];function r(s,i){const a=h.createContext(i),l=n.length;n=[...n,i];const c=f=>{var v;const{scope:g,children:x,...w}=f,m=((v=g==null?void 0:g[e])==null?void 0:v[l])||a,_=h.useMemo(()=>w,Object.values(w));return p.jsx(m.Provider,{value:_,children:x})};c.displayName=s+"Provider";function u(f,g){var m;const x=((m=g==null?void 0:g[e])==null?void 0:m[l])||a,w=h.useContext(x);if(w)return w;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[c,u]}const o=()=>{const s=n.map(i=>h.createContext(i));return function(a){const l=(a==null?void 0:a[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,rS(o,...t)]}function rS(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:l,scopeName:c})=>{const f=l(s)[`__scope${c}`];return{...a,...f}},{});return h.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function oS(e,t=[]){let n=[];function r(s,i){const a=h.createContext(i),l=n.length;n=[...n,i];function c(f){const{scope:g,children:x,...w}=f,m=(g==null?void 0:g[e][l])||a,_=h.useMemo(()=>w,Object.values(w));return p.jsx(m.Provider,{value:_,children:x})}function u(f,g){const x=(g==null?void 0:g[e][l])||a,w=h.useContext(x);if(w)return w;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return c.displayName=s+"Provider",[c,u]}const o=()=>{const s=n.map(i=>h.createContext(i));return function(a){const l=(a==null?void 0:a[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,sS(o,...t)]}function sS(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:l,scopeName:c})=>{const f=l(s)[`__scope${c}`];return{...a,...f}},{});return h.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function iS(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function ag(...e){return t=>e.forEach(n=>iS(n,t))}function Me(...e){return h.useCallback(ag(...e),e)}var vo=h.forwardRef((e,t)=>{const{children:n,...r}=e,o=h.Children.toArray(n),s=o.find(lS);if(s){const i=s.props.children,a=o.map(l=>l===s?h.Children.count(i)>1?h.Children.only(null):h.isValidElement(i)?i.props.children:null:l);return p.jsx(Hc,{...r,ref:t,children:h.isValidElement(i)?h.cloneElement(i,void 0,a):null})}return p.jsx(Hc,{...r,ref:t,children:n})});vo.displayName="Slot";var Hc=h.forwardRef((e,t)=>{const{children:n,...r}=e;if(h.isValidElement(n)){const o=uS(n);return h.cloneElement(n,{...cS(r,n.props),ref:t?ag(t,o):o})}return h.Children.count(n)>1?h.Children.only(null):null});Hc.displayName="SlotClone";var aS=({children:e})=>p.jsx(p.Fragment,{children:e});function lS(e){return h.isValidElement(e)&&e.type===aS}function cS(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{s(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function uS(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function lg(e){const t=e+"CollectionProvider",[n,r]=oS(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=x=>{const{scope:w,children:m}=x,_=ne.useRef(null),v=ne.useRef(new Map).current;return p.jsx(o,{scope:w,itemMap:v,collectionRef:_,children:m})};i.displayName=t;const a=e+"CollectionSlot",l=ne.forwardRef((x,w)=>{const{scope:m,children:_}=x,v=s(a,m),d=Me(w,v.collectionRef);return p.jsx(vo,{ref:d,children:_})});l.displayName=a;const c=e+"CollectionItemSlot",u="data-radix-collection-item",f=ne.forwardRef((x,w)=>{const{scope:m,children:_,...v}=x,d=ne.useRef(null),y=Me(w,d),C=s(c,m);return ne.useEffect(()=>(C.itemMap.set(d,{ref:d,...v}),()=>void C.itemMap.delete(d))),p.jsx(vo,{[u]:"",ref:y,children:_})});f.displayName=c;function g(x){const w=s(e+"CollectionConsumer",x);return ne.useCallback(()=>{const _=w.collectionRef.current;if(!_)return[];const v=Array.from(_.querySelectorAll(`[${u}]`));return Array.from(w.itemMap.values()).sort((C,k)=>v.indexOf(C.ref.current)-v.indexOf(k.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:i,Slot:l,ItemSlot:f},g,r]}function dS(e,t=[]){let n=[];function r(s,i){const a=h.createContext(i),l=n.length;n=[...n,i];function c(f){const{scope:g,children:x,...w}=f,m=(g==null?void 0:g[e][l])||a,_=h.useMemo(()=>w,Object.values(w));return p.jsx(m.Provider,{value:_,children:x})}function u(f,g){const x=(g==null?void 0:g[e][l])||a,w=h.useContext(x);if(w)return w;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return c.displayName=s+"Provider",[c,u]}const o=()=>{const s=n.map(i=>h.createContext(i));return function(a){const l=(a==null?void 0:a[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,fS(o,...t)]}function fS(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:l,scopeName:c})=>{const f=l(s)[`__scope${c}`];return{...a,...f}},{});return h.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var et=globalThis!=null&&globalThis.document?h.useLayoutEffect:()=>{},pS=Dy.useId||(()=>{}),mS=0;function Us(e){const[t,n]=h.useState(pS());return et(()=>{e||n(r=>r??String(mS++))},[e]),e||(t?`radix-${t}`:"")}var hS=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],he=hS.reduce((e,t)=>{const n=h.forwardRef((r,o)=>{const{asChild:s,...i}=r,a=s?vo:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(a,{...i,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function gS(e,t){e&&_o.flushSync(()=>e.dispatchEvent(t))}function tn(e){const t=h.useRef(e);return h.useEffect(()=>{t.current=e}),h.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function fa({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=vS({defaultProp:t,onChange:n}),s=e!==void 0,i=s?e:r,a=tn(n),l=h.useCallback(c=>{if(s){const f=typeof c=="function"?c(e):c;f!==e&&a(f)}else o(c)},[s,e,o,a]);return[i,l]}function vS({defaultProp:e,onChange:t}){const n=h.useState(e),[r]=n,o=h.useRef(r),s=tn(t);return h.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}var yS=h.createContext(void 0);function cd(e){const t=h.useContext(yS);return e||t||"ltr"}var Ml="rovingFocusGroup.onEntryFocus",xS={bubbles:!1,cancelable:!0},Wa="RovingFocusGroup",[Wc,cg,wS]=lg(Wa),[SS,ug]=dS(Wa,[wS]),[_S,CS]=SS(Wa),dg=h.forwardRef((e,t)=>p.jsx(Wc.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Wc.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(kS,{...e,ref:t})})}));dg.displayName=Wa;var kS=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...f}=e,g=h.useRef(null),x=Me(t,g),w=cd(s),[m=null,_]=fa({prop:i,defaultProp:a,onChange:l}),[v,d]=h.useState(!1),y=tn(c),C=cg(n),k=h.useRef(!1),[T,b]=h.useState(0);return h.useEffect(()=>{const E=g.current;if(E)return E.addEventListener(Ml,y),()=>E.removeEventListener(Ml,y)},[y]),p.jsx(_S,{scope:n,orientation:r,dir:w,loop:o,currentTabStopId:m,onItemFocus:h.useCallback(E=>_(E),[_]),onItemShiftTab:h.useCallback(()=>d(!0),[]),onFocusableItemAdd:h.useCallback(()=>b(E=>E+1),[]),onFocusableItemRemove:h.useCallback(()=>b(E=>E-1),[]),children:p.jsx(he.div,{tabIndex:v||T===0?-1:0,"data-orientation":r,...f,ref:x,style:{outline:"none",...e.style},onMouseDown:ue(e.onMouseDown,()=>{k.current=!0}),onFocus:ue(e.onFocus,E=>{const I=!k.current;if(E.target===E.currentTarget&&I&&!v){const j=new CustomEvent(Ml,xS);if(E.currentTarget.dispatchEvent(j),!j.defaultPrevented){const V=C().filter(F=>F.focusable),M=V.find(F=>F.active),q=V.find(F=>F.id===m),ee=[M,q,...V].filter(Boolean).map(F=>F.ref.current);mg(ee,u)}}k.current=!1}),onBlur:ue(e.onBlur,()=>d(!1))})})}),fg="RovingFocusGroupItem",pg=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,...i}=e,a=Us(),l=s||a,c=CS(fg,n),u=c.currentTabStopId===l,f=cg(n),{onFocusableItemAdd:g,onFocusableItemRemove:x}=c;return h.useEffect(()=>{if(r)return g(),()=>x()},[r,g,x]),p.jsx(Wc.ItemSlot,{scope:n,id:l,focusable:r,active:o,children:p.jsx(he.span,{tabIndex:u?0:-1,"data-orientation":c.orientation,...i,ref:t,onMouseDown:ue(e.onMouseDown,w=>{r?c.onItemFocus(l):w.preventDefault()}),onFocus:ue(e.onFocus,()=>c.onItemFocus(l)),onKeyDown:ue(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){c.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const m=NS(w,c.orientation,c.dir);if(m!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let v=f().filter(d=>d.focusable).map(d=>d.ref.current);if(m==="last")v.reverse();else if(m==="prev"||m==="next"){m==="prev"&&v.reverse();const d=v.indexOf(w.currentTarget);v=c.loop?TS(v,d+1):v.slice(d+1)}setTimeout(()=>mg(v))}})})})});pg.displayName=fg;var ES={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function bS(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function NS(e,t,n){const r=bS(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return ES[r]}function mg(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function TS(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var RS=dg,PS=pg;function jS(e,t){return h.useReducer((n,r)=>t[n][r]??n,e)}var hg=e=>{const{present:t,children:n}=e,r=IS(t),o=typeof n=="function"?n({present:r.isPresent}):h.Children.only(n),s=Me(r.ref,OS(o));return typeof n=="function"||r.isPresent?h.cloneElement(o,{ref:s}):null};hg.displayName="Presence";function IS(e){const[t,n]=h.useState(),r=h.useRef({}),o=h.useRef(e),s=h.useRef("none"),i=e?"mounted":"unmounted",[a,l]=jS(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.useEffect(()=>{const c=fi(r.current);s.current=a==="mounted"?c:"none"},[a]),et(()=>{const c=r.current,u=o.current;if(u!==e){const g=s.current,x=fi(c);e?l("MOUNT"):x==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&g!==x?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),et(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,f=x=>{const m=fi(r.current).includes(x.animationName);if(x.target===t&&m&&(l("ANIMATION_END"),!o.current)){const _=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=_)})}},g=x=>{x.target===t&&(s.current=fi(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:h.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function fi(e){return(e==null?void 0:e.animationName)||"none"}function OS(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ud="Tabs",[MS,Y2]=ig(ud,[ug]),gg=ug(),[AS,dd]=MS(ud),vg=h.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:s,orientation:i="horizontal",dir:a,activationMode:l="automatic",...c}=e,u=cd(a),[f,g]=fa({prop:r,onChange:o,defaultProp:s});return p.jsx(AS,{scope:n,baseId:Us(),value:f,onValueChange:g,orientation:i,dir:u,activationMode:l,children:p.jsx(he.div,{dir:u,"data-orientation":i,...c,ref:t})})});vg.displayName=ud;var yg="TabsList",xg=h.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,s=dd(yg,n),i=gg(n);return p.jsx(RS,{asChild:!0,...i,orientation:s.orientation,dir:s.dir,loop:r,children:p.jsx(he.div,{role:"tablist","aria-orientation":s.orientation,...o,ref:t})})});xg.displayName=yg;var wg="TabsTrigger",Sg=h.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...s}=e,i=dd(wg,n),a=gg(n),l=kg(i.baseId,r),c=Eg(i.baseId,r),u=r===i.value;return p.jsx(PS,{asChild:!0,...a,focusable:!o,active:u,children:p.jsx(he.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...s,ref:t,onMouseDown:ue(e.onMouseDown,f=>{!o&&f.button===0&&f.ctrlKey===!1?i.onValueChange(r):f.preventDefault()}),onKeyDown:ue(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&i.onValueChange(r)}),onFocus:ue(e.onFocus,()=>{const f=i.activationMode!=="manual";!u&&!o&&f&&i.onValueChange(r)})})})});Sg.displayName=wg;var _g="TabsContent",Cg=h.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:s,...i}=e,a=dd(_g,n),l=kg(a.baseId,r),c=Eg(a.baseId,r),u=r===a.value,f=h.useRef(u);return h.useEffect(()=>{const g=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(g)},[]),p.jsx(hg,{present:o||u,children:({present:g})=>p.jsx(he.div,{"data-state":u?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!g,id:c,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:g&&s})})});Cg.displayName=_g;function kg(e,t){return`${e}-trigger-${t}`}function Eg(e,t){return`${e}-content-${t}`}var LS=vg,bg=xg,Ng=Sg,Tg=Cg;const fd="-",DS=e=>{const t=$S(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(fd);return a[0]===""&&a.length!==1&&a.shift(),Rg(a,t)||zS(i)},getConflictingClassGroupIds:(i,a)=>{const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}}},Rg=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Rg(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(fd);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId},Wf=/^\[(.+)\]$/,zS=e=>{if(Wf.test(e)){const t=Wf.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},$S=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return VS(Object.entries(e.classGroups),n).forEach(([s,i])=>{Zc(i,r,s,t)}),r},Zc=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:Zf(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(FS(o)){Zc(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{Zc(i,Zf(t,s),n,r)})})},Zf=(e,t)=>{let n=e;return t.split(fd).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},FS=e=>e.isThemeGetter,VS=(e,t)=>t?e.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,a])=>[t+i,a])):s);return[n,o]}):e,BS=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,i)=>{n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}},Pg="!",US=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length,i=a=>{const l=[];let c=0,u=0,f;for(let _=0;_<a.length;_++){let v=a[_];if(c===0){if(v===o&&(r||a.slice(_,_+s)===t)){l.push(a.slice(u,_)),u=_+s;continue}if(v==="/"){f=_;continue}}v==="["?c++:v==="]"&&c--}const g=l.length===0?a:a.substring(u),x=g.startsWith(Pg),w=x?g.substring(1):g,m=f&&f>u?f-u:void 0;return{modifiers:l,hasImportantModifier:x,baseClassName:w,maybePostfixModifierPosition:m}};return n?a=>n({className:a,parseClassName:i}):i},HS=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},WS=e=>({cache:BS(e.cacheSize),parseClassName:US(e),...DS(e)}),ZS=/\s+/,qS=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=[],i=e.trim().split(ZS);let a="";for(let l=i.length-1;l>=0;l-=1){const c=i[l],{modifiers:u,hasImportantModifier:f,baseClassName:g,maybePostfixModifierPosition:x}=n(c);let w=!!x,m=r(w?g.substring(0,x):g);if(!m){if(!w){a=c+(a.length>0?" "+a:a);continue}if(m=r(g),!m){a=c+(a.length>0?" "+a:a);continue}w=!1}const _=HS(u).join(":"),v=f?_+Pg:_,d=v+m;if(s.includes(d))continue;s.push(d);const y=o(m,w);for(let C=0;C<y.length;++C){const k=y[C];s.push(v+k)}a=c+(a.length>0?" "+a:a)}return a};function KS(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=jg(t))&&(r&&(r+=" "),r+=n);return r}const jg=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=jg(e[r]))&&(n&&(n+=" "),n+=t);return n};function GS(e,...t){let n,r,o,s=i;function i(l){const c=t.reduce((u,f)=>f(u),e());return n=WS(c),r=n.cache.get,o=n.cache.set,s=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=qS(l,n);return o(l,u),u}return function(){return s(KS.apply(null,arguments))}}const ye=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Ig=/^\[(?:([a-z-]+):)?(.+)\]$/i,QS=/^\d+\/\d+$/,YS=new Set(["px","full","screen"]),XS=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,JS=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,e_=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,t_=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,n_=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,sn=e=>ro(e)||YS.has(e)||QS.test(e),bn=e=>Co(e,"length",u_),ro=e=>!!e&&!Number.isNaN(Number(e)),Al=e=>Co(e,"number",ro),Lo=e=>!!e&&Number.isInteger(Number(e)),r_=e=>e.endsWith("%")&&ro(e.slice(0,-1)),Y=e=>Ig.test(e),Nn=e=>XS.test(e),o_=new Set(["length","size","percentage"]),s_=e=>Co(e,o_,Og),i_=e=>Co(e,"position",Og),a_=new Set(["image","url"]),l_=e=>Co(e,a_,f_),c_=e=>Co(e,"",d_),Do=()=>!0,Co=(e,t,n)=>{const r=Ig.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},u_=e=>JS.test(e)&&!e_.test(e),Og=()=>!1,d_=e=>t_.test(e),f_=e=>n_.test(e),p_=()=>{const e=ye("colors"),t=ye("spacing"),n=ye("blur"),r=ye("brightness"),o=ye("borderColor"),s=ye("borderRadius"),i=ye("borderSpacing"),a=ye("borderWidth"),l=ye("contrast"),c=ye("grayscale"),u=ye("hueRotate"),f=ye("invert"),g=ye("gap"),x=ye("gradientColorStops"),w=ye("gradientColorStopPositions"),m=ye("inset"),_=ye("margin"),v=ye("opacity"),d=ye("padding"),y=ye("saturate"),C=ye("scale"),k=ye("sepia"),T=ye("skew"),b=ye("space"),E=ye("translate"),I=()=>["auto","contain","none"],j=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto",Y,t],M=()=>[Y,t],q=()=>["",sn,bn],W=()=>["auto",ro,Y],ee=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],N=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",Y],z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],H=()=>[ro,Y];return{cacheSize:500,separator:":",theme:{colors:[Do],spacing:[sn,bn],blur:["none","",Nn,Y],brightness:H(),borderColor:[e],borderRadius:["none","","full",Nn,Y],borderSpacing:M(),borderWidth:q(),contrast:H(),grayscale:O(),hueRotate:H(),invert:O(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[r_,bn],inset:V(),margin:V(),opacity:H(),padding:M(),saturate:H(),scale:H(),sepia:O(),skew:H(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",Y]}],container:["container"],columns:[{columns:[Nn]}],"break-after":[{"break-after":z()}],"break-before":[{"break-before":z()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ee(),Y]}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Lo,Y]}],basis:[{basis:V()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Y]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",Lo,Y]}],"grid-cols":[{"grid-cols":[Do]}],"col-start-end":[{col:["auto",{span:["full",Lo,Y]},Y]}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":[Do]}],"row-start-end":[{row:["auto",{span:[Lo,Y]},Y]}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Y]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Y]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...N()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...N(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...N(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[d]}],px:[{px:[d]}],py:[{py:[d]}],ps:[{ps:[d]}],pe:[{pe:[d]}],pt:[{pt:[d]}],pr:[{pr:[d]}],pb:[{pb:[d]}],pl:[{pl:[d]}],m:[{m:[_]}],mx:[{mx:[_]}],my:[{my:[_]}],ms:[{ms:[_]}],me:[{me:[_]}],mt:[{mt:[_]}],mr:[{mr:[_]}],mb:[{mb:[_]}],ml:[{ml:[_]}],"space-x":[{"space-x":[b]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[b]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Y,t]}],"min-w":[{"min-w":[Y,t,"min","max","fit"]}],"max-w":[{"max-w":[Y,t,"none","full","min","max","fit","prose",{screen:[Nn]},Nn]}],h:[{h:[Y,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Y,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Y,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Y,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Nn,bn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Al]}],"font-family":[{font:[Do]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Y]}],"line-clamp":[{"line-clamp":["none",ro,Al]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",sn,Y]}],"list-image":[{"list-image":["none",Y]}],"list-style-type":[{list:["none","disc","decimal",Y]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",sn,bn]}],"underline-offset":[{"underline-offset":["auto",sn,Y]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Y]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Y]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ee(),i_]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",s_]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},l_]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[x]}],"gradient-via":[{via:[x]}],"gradient-to":[{to:[x]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...F(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:F()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...F()]}],"outline-offset":[{"outline-offset":[sn,Y]}],"outline-w":[{outline:[sn,bn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[sn,bn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Nn,c_]}],"shadow-color":[{shadow:[Do]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...K(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":K()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Nn,Y]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[f]}],saturate:[{saturate:[y]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Y]}],duration:[{duration:H()}],ease:[{ease:["linear","in","out","in-out",Y]}],delay:[{delay:H()}],animate:[{animate:["none","spin","ping","pulse","bounce",Y]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[Lo,Y]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Y]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Y]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Y]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[sn,bn,Al]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},m_=GS(p_);function ze(...e){return m_(fn(e))}const h_=LS,Mg=h.forwardRef(({className:e,...t},n)=>p.jsx(bg,{ref:n,className:ze("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));Mg.displayName=bg.displayName;const ur=h.forwardRef(({className:e,...t},n)=>p.jsx(Ng,{ref:n,className:ze("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));ur.displayName=Ng.displayName;const nr=h.forwardRef(({className:e,...t},n)=>p.jsx(Tg,{ref:n,className:ze("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));nr.displayName=Tg.displayName;/**
40
+ `+s.stack}return{value:e,source:t,stack:o,digest:null}}function Nl(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function kc(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var C1=typeof WeakMap=="function"?WeakMap:Map;function nh(e,t,n){n=pn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ea||(ea=!0,Mc=r),kc(e,t)},n}function rh(e,t,n){n=pn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){kc(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){kc(e,t),typeof r!="function"&&(Vn===null?Vn=new Set([this]):Vn.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function _f(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new C1;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=D1.bind(null,e,t,n),t.then(e,e))}function Cf(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function kf(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=pn(-1,1),t.tag=2,Fn(n,t,1))),n.lanes|=1),e)}var k1=Cn.ReactCurrentOwner,it=!1;function Qe(e,t,n,r){t.child=e===null?Im(t,null,n,r):co(t,e.child,n,r)}function Ef(e,t,n,r,o){n=n.render;var s=t.ref;return eo(t,o),r=Du(e,t,n,r,s,o),n=zu(),e!==null&&!it?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,vn(e,t,o)):(_e&&n&&Eu(t),t.flags|=1,Qe(e,t,r,o),t.child)}function bf(e,t,n,r,o){if(e===null){var s=n.type;return typeof s=="function"&&!Ku(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,oh(e,t,s,r,o)):(e=Ri(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&o)){var i=s.memoizedProps;if(n=n.compare,n=n!==null?n:ls,n(i,r)&&e.ref===t.ref)return vn(e,t,o)}return t.flags|=1,e=Un(s,r),e.ref=t.ref,e.return=t,t.child=e}function oh(e,t,n,r,o){if(e!==null){var s=e.memoizedProps;if(ls(s,r)&&e.ref===t.ref)if(it=!1,t.pendingProps=r=s,(e.lanes&o)!==0)e.flags&131072&&(it=!0);else return t.lanes=e.lanes,vn(e,t,o)}return Ec(e,t,n,r,o)}function sh(e,t,n){var r=t.pendingProps,o=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ge(qr,ut),ut|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ge(qr,ut),ut|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,ge(qr,ut),ut|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,ge(qr,ut),ut|=r;return Qe(e,t,o,n),t.child}function ih(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ec(e,t,n,r,o){var s=lt(n)?xr:qe.current;return s=ao(t,s),eo(t,o),n=Du(e,t,n,r,s,o),r=zu(),e!==null&&!it?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,vn(e,t,o)):(_e&&r&&Eu(t),t.flags|=1,Qe(e,t,n,o),t.child)}function Nf(e,t,n,r,o){if(lt(n)){var s=!0;Hi(t)}else s=!1;if(eo(t,o),t.stateNode===null)bi(e,t),th(t,n,r),Cc(t,n,r,o),r=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var l=i.context,c=n.contextType;typeof c=="object"&&c!==null?c=Et(c):(c=lt(n)?xr:qe.current,c=ao(t,c));var u=n.getDerivedStateFromProps,f=typeof u=="function"||typeof i.getSnapshotBeforeUpdate=="function";f||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==r||l!==c)&&Sf(t,i,r,c),Pn=!1;var g=t.memoizedState;i.state=g,Gi(t,r,i,o),l=t.memoizedState,a!==r||g!==l||at.current||Pn?(typeof u=="function"&&(_c(t,n,u,r),l=t.memoizedState),(a=Pn||wf(t,n,a,r,g,l,c))?(f||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),i.props=r,i.state=l,i.context=c,r=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Mm(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:Pt(t.type,a),i.props=c,f=t.pendingProps,g=i.context,l=n.contextType,typeof l=="object"&&l!==null?l=Et(l):(l=lt(n)?xr:qe.current,l=ao(t,l));var x=n.getDerivedStateFromProps;(u=typeof x=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==f||g!==l)&&Sf(t,i,r,l),Pn=!1,g=t.memoizedState,i.state=g,Gi(t,r,i,o);var w=t.memoizedState;a!==f||g!==w||at.current||Pn?(typeof x=="function"&&(_c(t,n,x,r),w=t.memoizedState),(c=Pn||wf(t,n,c,r,g,w,l)||!1)?(u||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,w,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,w,l)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=w),i.props=r,i.state=w,i.context=l,r=c):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),r=!1)}return bc(e,t,n,r,s,o)}function bc(e,t,n,r,o,s){ih(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return o&&ff(t,n,!1),vn(e,t,s);r=t.stateNode,k1.current=t;var a=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=co(t,e.child,null,s),t.child=co(t,null,a,s)):Qe(e,t,a,s),t.memoizedState=r.state,o&&ff(t,n,!0),t.child}function ah(e){var t=e.stateNode;t.pendingContext?df(e,t.pendingContext,t.pendingContext!==t.context):t.context&&df(e,t.context,!1),Ou(e,t.containerInfo)}function Tf(e,t,n,r,o){return lo(),Nu(o),t.flags|=256,Qe(e,t,n,r),t.child}var Nc={dehydrated:null,treeContext:null,retryLane:0};function Tc(e){return{baseLanes:e,cachePool:null,transitions:null}}function lh(e,t,n){var r=t.pendingProps,o=ke.current,s=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(o&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),ge(ke,o&1),e===null)return wc(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=r.children,e=r.fallback,s?(r=t.mode,s=t.child,i={mode:"hidden",children:i},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=i):s=Pa(i,r,0,null),e=gr(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Tc(n),t.memoizedState=Nc,e):Vu(t,i));if(o=e.memoizedState,o!==null&&(a=o.dehydrated,a!==null))return E1(e,t,i,r,a,o,n);if(s){s=r.fallback,i=t.mode,o=e.child,a=o.sibling;var l={mode:"hidden",children:r.children};return!(i&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Un(o,l),r.subtreeFlags=o.subtreeFlags&14680064),a!==null?s=Un(a,s):(s=gr(s,i,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,i=e.child.memoizedState,i=i===null?Tc(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},s.memoizedState=i,s.childLanes=e.childLanes&~n,t.memoizedState=Nc,r}return s=e.child,e=s.sibling,r=Un(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Vu(e,t){return t=Pa({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ii(e,t,n,r){return r!==null&&Nu(r),co(t,e.child,null,n),e=Vu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function E1(e,t,n,r,o,s,i){if(n)return t.flags&256?(t.flags&=-257,r=Nl(Error(R(422))),ii(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,o=t.mode,r=Pa({mode:"visible",children:r.children},o,0,null),s=gr(s,o,i,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&co(t,e.child,null,i),t.child.memoizedState=Tc(i),t.memoizedState=Nc,s);if(!(t.mode&1))return ii(e,t,i,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(R(419)),r=Nl(s,r,void 0),ii(e,t,i,r)}if(a=(i&e.childLanes)!==0,it||a){if(r=De,r!==null){switch(i&-i){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|i)?0:o,o!==0&&o!==s.retryLane&&(s.retryLane=o,gn(e,o),At(r,e,o,-1))}return qu(),r=Nl(Error(R(421))),ii(e,t,i,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=z1.bind(null,e),o._reactRetry=t,null):(e=s.treeContext,ft=$n(o.nextSibling),mt=t,_e=!0,It=null,e!==null&&(St[_t++]=un,St[_t++]=dn,St[_t++]=wr,un=e.id,dn=e.overflow,wr=t),t=Vu(t,r.children),t.flags|=4096,t)}function Rf(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Sc(e.return,t,n)}function Tl(e,t,n,r,o){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=o)}function ch(e,t,n){var r=t.pendingProps,o=r.revealOrder,s=r.tail;if(Qe(e,t,r.children,n),r=ke.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Rf(e,n,t);else if(e.tag===19)Rf(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ge(ke,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Qi(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Tl(t,!1,o,n,s);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Qi(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Tl(t,!0,n,null,s);break;case"together":Tl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function bi(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function vn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),_r|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(R(153));if(t.child!==null){for(e=t.child,n=Un(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Un(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function b1(e,t,n){switch(t.tag){case 3:ah(t),lo();break;case 5:Am(t);break;case 1:lt(t.type)&&Hi(t);break;case 4:Ou(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;ge(qi,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ge(ke,ke.current&1),t.flags|=128,null):n&t.child.childLanes?lh(e,t,n):(ge(ke,ke.current&1),e=vn(e,t,n),e!==null?e.sibling:null);ge(ke,ke.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return ch(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),ge(ke,ke.current),r)break;return null;case 22:case 23:return t.lanes=0,sh(e,t,n)}return vn(e,t,n)}var uh,Rc,dh,fh;uh=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Rc=function(){};dh=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,pr(Qt.current);var s=null;switch(n){case"input":o=Yl(e,o),r=Yl(e,r),s=[];break;case"select":o=be({},o,{value:void 0}),r=be({},r,{value:void 0}),s=[];break;case"textarea":o=ec(e,o),r=ec(e,r),s=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Bi)}nc(n,r);var i;n=null;for(c in o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&o[c]!=null)if(c==="style"){var a=o[c];for(i in a)a.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(ts.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var l=r[c];if(a=o!=null?o[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(i in a)!a.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in l)l.hasOwnProperty(i)&&a[i]!==l[i]&&(n||(n={}),n[i]=l[i])}else n||(s||(s=[]),s.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(ts.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&xe("scroll",e),s||a===l||(s=[])):(s=s||[]).push(c,l))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}};fh=function(e,t,n,r){n!==r&&(t.flags|=4)};function Mo(e,t){if(!_e)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function He(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function N1(e,t,n){var r=t.pendingProps;switch(bu(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return He(t),null;case 1:return lt(t.type)&&Ui(),He(t),null;case 3:return r=t.stateNode,uo(),we(at),we(qe),Au(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(oi(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,It!==null&&(Dc(It),It=null))),Rc(e,t),He(t),null;case 5:Mu(t);var o=pr(ps.current);if(n=t.type,e!==null&&t.stateNode!=null)dh(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(R(166));return He(t),null}if(e=pr(Qt.current),oi(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Zt]=t,r[ds]=s,e=(t.mode&1)!==0,n){case"dialog":xe("cancel",r),xe("close",r);break;case"iframe":case"object":case"embed":xe("load",r);break;case"video":case"audio":for(o=0;o<Vo.length;o++)xe(Vo[o],r);break;case"source":xe("error",r);break;case"img":case"image":case"link":xe("error",r),xe("load",r);break;case"details":xe("toggle",r);break;case"input":Dd(r,s),xe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},xe("invalid",r);break;case"textarea":$d(r,s),xe("invalid",r)}nc(n,s),o=null;for(var i in s)if(s.hasOwnProperty(i)){var a=s[i];i==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&ri(r.textContent,a,e),o=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&ri(r.textContent,a,e),o=["children",""+a]):ts.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&xe("scroll",r)}switch(n){case"input":Gs(r),zd(r,s,!0);break;case"textarea":Gs(r),Fd(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Bi)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Fp(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[Zt]=t,e[ds]=r,uh(e,t,!1,!1),t.stateNode=e;e:{switch(i=rc(n,r),n){case"dialog":xe("cancel",e),xe("close",e),o=r;break;case"iframe":case"object":case"embed":xe("load",e),o=r;break;case"video":case"audio":for(o=0;o<Vo.length;o++)xe(Vo[o],e);o=r;break;case"source":xe("error",e),o=r;break;case"img":case"image":case"link":xe("error",e),xe("load",e),o=r;break;case"details":xe("toggle",e),o=r;break;case"input":Dd(e,r),o=Yl(e,r),xe("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=be({},r,{value:void 0}),xe("invalid",e);break;case"textarea":$d(e,r),o=ec(e,r),xe("invalid",e);break;default:o=r}nc(n,o),a=o;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?Up(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Vp(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&ns(e,l):typeof l=="number"&&ns(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(ts.hasOwnProperty(s)?l!=null&&s==="onScroll"&&xe("scroll",e):l!=null&&du(e,s,l,i))}switch(n){case"input":Gs(e),zd(e,r,!1);break;case"textarea":Gs(e),Fd(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Hn(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?Qr(e,!!r.multiple,s,!1):r.defaultValue!=null&&Qr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Bi)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return He(t),null;case 6:if(e&&t.stateNode!=null)fh(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(R(166));if(n=pr(ps.current),pr(Qt.current),oi(t)){if(r=t.stateNode,n=t.memoizedProps,r[Zt]=t,(s=r.nodeValue!==n)&&(e=mt,e!==null))switch(e.tag){case 3:ri(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ri(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Zt]=t,t.stateNode=r}return He(t),null;case 13:if(we(ke),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(_e&&ft!==null&&t.mode&1&&!(t.flags&128))Pm(),lo(),t.flags|=98560,s=!1;else if(s=oi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(R(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(R(317));s[Zt]=t}else lo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;He(t),s=!1}else It!==null&&(Dc(It),It=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||ke.current&1?Oe===0&&(Oe=3):qu())),t.updateQueue!==null&&(t.flags|=4),He(t),null);case 4:return uo(),Rc(e,t),e===null&&cs(t.stateNode.containerInfo),He(t),null;case 10:return Pu(t.type._context),He(t),null;case 17:return lt(t.type)&&Ui(),He(t),null;case 19:if(we(ke),s=t.memoizedState,s===null)return He(t),null;if(r=(t.flags&128)!==0,i=s.rendering,i===null)if(r)Mo(s,!1);else{if(Oe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Qi(e),i!==null){for(t.flags|=128,Mo(s,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,i=s.alternate,i===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=i.childLanes,s.lanes=i.lanes,s.child=i.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=i.memoizedProps,s.memoizedState=i.memoizedState,s.updateQueue=i.updateQueue,s.type=i.type,e=i.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ge(ke,ke.current&1|2),t.child}e=e.sibling}s.tail!==null&&Re()>po&&(t.flags|=128,r=!0,Mo(s,!1),t.lanes=4194304)}else{if(!r)if(e=Qi(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Mo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!i.alternate&&!_e)return He(t),null}else 2*Re()-s.renderingStartTime>po&&n!==1073741824&&(t.flags|=128,r=!0,Mo(s,!1),t.lanes=4194304);s.isBackwards?(i.sibling=t.child,t.child=i):(n=s.last,n!==null?n.sibling=i:t.child=i,s.last=i)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Re(),t.sibling=null,n=ke.current,ge(ke,r?n&1|2:n&1),t):(He(t),null);case 22:case 23:return Zu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ut&1073741824&&(He(t),t.subtreeFlags&6&&(t.flags|=8192)):He(t),null;case 24:return null;case 25:return null}throw Error(R(156,t.tag))}function T1(e,t){switch(bu(t),t.tag){case 1:return lt(t.type)&&Ui(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return uo(),we(at),we(qe),Au(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Mu(t),null;case 13:if(we(ke),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(R(340));lo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return we(ke),null;case 4:return uo(),null;case 10:return Pu(t.type._context),null;case 22:case 23:return Zu(),null;case 24:return null;default:return null}}var ai=!1,We=!1,R1=typeof WeakSet=="function"?WeakSet:Set,$=null;function Zr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ne(e,t,r)}else n.current=null}function Pc(e,t,n){try{n()}catch(r){Ne(e,t,r)}}var Pf=!1;function P1(e,t){if(pc=$i,e=vm(),ku(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,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var i=0,a=-1,l=-1,c=0,u=0,f=e,g=null;t:for(;;){for(var x;f!==n||o!==0&&f.nodeType!==3||(a=i+o),f!==s||r!==0&&f.nodeType!==3||(l=i+r),f.nodeType===3&&(i+=f.nodeValue.length),(x=f.firstChild)!==null;)g=f,f=x;for(;;){if(f===e)break t;if(g===n&&++c===o&&(a=i),g===s&&++u===r&&(l=i),(x=f.nextSibling)!==null)break;f=g,g=f.parentNode}f=x}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(mc={focusedElem:e,selectionRange:n},$i=!1,$=t;$!==null;)if(t=$,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$=e;else for(;$!==null;){t=$;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var m=w.memoizedProps,_=w.memoizedState,v=t.stateNode,d=v.getSnapshotBeforeUpdate(t.elementType===t.type?m:Pt(t.type,m),_);v.__reactInternalSnapshotBeforeUpdate=d}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(R(163))}}catch(C){Ne(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,$=e;break}$=t.return}return w=Pf,Pf=!1,w}function Yo(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 s=o.destroy;o.destroy=void 0,s!==void 0&&Pc(t,n,s)}o=o.next}while(o!==r)}}function Ta(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 jc(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 ph(e){var t=e.alternate;t!==null&&(e.alternate=null,ph(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Zt],delete t[ds],delete t[vc],delete t[f1],delete t[p1])),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 mh(e){return e.tag===5||e.tag===3||e.tag===4}function jf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||mh(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 Ic(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=Bi));else if(r!==4&&(e=e.child,e!==null))for(Ic(e,t,n),e=e.sibling;e!==null;)Ic(e,t,n),e=e.sibling}function Oc(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(Oc(e,t,n),e=e.sibling;e!==null;)Oc(e,t,n),e=e.sibling}var Fe=null,jt=!1;function En(e,t,n){for(n=n.child;n!==null;)hh(e,t,n),n=n.sibling}function hh(e,t,n){if(Gt&&typeof Gt.onCommitFiberUnmount=="function")try{Gt.onCommitFiberUnmount(wa,n)}catch{}switch(n.tag){case 5:We||Zr(n,t);case 6:var r=Fe,o=jt;Fe=null,En(e,t,n),Fe=r,jt=o,Fe!==null&&(jt?(e=Fe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Fe.removeChild(n.stateNode));break;case 18:Fe!==null&&(jt?(e=Fe,n=n.stateNode,e.nodeType===8?Sl(e.parentNode,n):e.nodeType===1&&Sl(e,n),is(e)):Sl(Fe,n.stateNode));break;case 4:r=Fe,o=jt,Fe=n.stateNode.containerInfo,jt=!0,En(e,t,n),Fe=r,jt=o;break;case 0:case 11:case 14:case 15:if(!We&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var s=o,i=s.destroy;s=s.tag,i!==void 0&&(s&2||s&4)&&Pc(n,t,i),o=o.next}while(o!==r)}En(e,t,n);break;case 1:if(!We&&(Zr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ne(n,t,a)}En(e,t,n);break;case 21:En(e,t,n);break;case 22:n.mode&1?(We=(r=We)||n.memoizedState!==null,En(e,t,n),We=r):En(e,t,n);break;default:En(e,t,n)}}function If(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new R1),t.forEach(function(r){var o=$1.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Tt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var s=e,i=t,a=i;e:for(;a!==null;){switch(a.tag){case 5:Fe=a.stateNode,jt=!1;break e;case 3:Fe=a.stateNode.containerInfo,jt=!0;break e;case 4:Fe=a.stateNode.containerInfo,jt=!0;break e}a=a.return}if(Fe===null)throw Error(R(160));hh(s,i,o),Fe=null,jt=!1;var l=o.alternate;l!==null&&(l.return=null),o.return=null}catch(c){Ne(o,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)gh(t,e),t=t.sibling}function gh(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Tt(t,e),Ht(e),r&4){try{Yo(3,e,e.return),Ta(3,e)}catch(m){Ne(e,e.return,m)}try{Yo(5,e,e.return)}catch(m){Ne(e,e.return,m)}}break;case 1:Tt(t,e),Ht(e),r&512&&n!==null&&Zr(n,n.return);break;case 5:if(Tt(t,e),Ht(e),r&512&&n!==null&&Zr(n,n.return),e.flags&32){var o=e.stateNode;try{ns(o,"")}catch(m){Ne(e,e.return,m)}}if(r&4&&(o=e.stateNode,o!=null)){var s=e.memoizedProps,i=n!==null?n.memoizedProps:s,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&zp(o,s),rc(a,i);var c=rc(a,s);for(i=0;i<l.length;i+=2){var u=l[i],f=l[i+1];u==="style"?Up(o,f):u==="dangerouslySetInnerHTML"?Vp(o,f):u==="children"?ns(o,f):du(o,u,f,c)}switch(a){case"input":Xl(o,s);break;case"textarea":$p(o,s);break;case"select":var g=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!s.multiple;var x=s.value;x!=null?Qr(o,!!s.multiple,x,!1):g!==!!s.multiple&&(s.defaultValue!=null?Qr(o,!!s.multiple,s.defaultValue,!0):Qr(o,!!s.multiple,s.multiple?[]:"",!1))}o[ds]=s}catch(m){Ne(e,e.return,m)}}break;case 6:if(Tt(t,e),Ht(e),r&4){if(e.stateNode===null)throw Error(R(162));o=e.stateNode,s=e.memoizedProps;try{o.nodeValue=s}catch(m){Ne(e,e.return,m)}}break;case 3:if(Tt(t,e),Ht(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{is(t.containerInfo)}catch(m){Ne(e,e.return,m)}break;case 4:Tt(t,e),Ht(e);break;case 13:Tt(t,e),Ht(e),o=e.child,o.flags&8192&&(s=o.memoizedState!==null,o.stateNode.isHidden=s,!s||o.alternate!==null&&o.alternate.memoizedState!==null||(Hu=Re())),r&4&&If(e);break;case 22:if(u=n!==null&&n.memoizedState!==null,e.mode&1?(We=(c=We)||u,Tt(t,e),We=c):Tt(t,e),Ht(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!u&&e.mode&1)for($=e,u=e.child;u!==null;){for(f=$=u;$!==null;){switch(g=$,x=g.child,g.tag){case 0:case 11:case 14:case 15:Yo(4,g,g.return);break;case 1:Zr(g,g.return);var w=g.stateNode;if(typeof w.componentWillUnmount=="function"){r=g,n=g.return;try{t=r,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(m){Ne(r,n,m)}}break;case 5:Zr(g,g.return);break;case 22:if(g.memoizedState!==null){Mf(f);continue}}x!==null?(x.return=g,$=x):Mf(f)}u=u.sibling}e:for(u=null,f=e;;){if(f.tag===5){if(u===null){u=f;try{o=f.stateNode,c?(s=o.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=f.stateNode,l=f.memoizedProps.style,i=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=Bp("display",i))}catch(m){Ne(e,e.return,m)}}}else if(f.tag===6){if(u===null)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(m){Ne(e,e.return,m)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;u===f&&(u=null),f=f.return}u===f&&(u=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Tt(t,e),Ht(e),r&4&&If(e);break;case 21:break;default:Tt(t,e),Ht(e)}}function Ht(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(mh(n)){var r=n;break e}n=n.return}throw Error(R(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(ns(o,""),r.flags&=-33);var s=jf(e);Oc(e,s,o);break;case 3:case 4:var i=r.stateNode.containerInfo,a=jf(e);Ic(e,a,i);break;default:throw Error(R(161))}}catch(l){Ne(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function j1(e,t,n){$=e,vh(e)}function vh(e,t,n){for(var r=(e.mode&1)!==0;$!==null;){var o=$,s=o.child;if(o.tag===22&&r){var i=o.memoizedState!==null||ai;if(!i){var a=o.alternate,l=a!==null&&a.memoizedState!==null||We;a=ai;var c=We;if(ai=i,(We=l)&&!c)for($=o;$!==null;)i=$,l=i.child,i.tag===22&&i.memoizedState!==null?Af(o):l!==null?(l.return=i,$=l):Af(o);for(;s!==null;)$=s,vh(s),s=s.sibling;$=o,ai=a,We=c}Of(e)}else o.subtreeFlags&8772&&s!==null?(s.return=o,$=s):Of(e)}}function Of(e){for(;$!==null;){var t=$;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:We||Ta(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!We)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:Pt(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&vf(t,s,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}vf(t,i,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var f=u.dehydrated;f!==null&&is(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(R(163))}We||t.flags&512&&jc(t)}catch(g){Ne(t,t.return,g)}}if(t===e){$=null;break}if(n=t.sibling,n!==null){n.return=t.return,$=n;break}$=t.return}}function Mf(e){for(;$!==null;){var t=$;if(t===e){$=null;break}var n=t.sibling;if(n!==null){n.return=t.return,$=n;break}$=t.return}}function Af(e){for(;$!==null;){var t=$;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Ta(4,t)}catch(l){Ne(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(l){Ne(t,o,l)}}var s=t.return;try{jc(t)}catch(l){Ne(t,s,l)}break;case 5:var i=t.return;try{jc(t)}catch(l){Ne(t,i,l)}}}catch(l){Ne(t,t.return,l)}if(t===e){$=null;break}var a=t.sibling;if(a!==null){a.return=t.return,$=a;break}$=t.return}}var I1=Math.ceil,Ji=Cn.ReactCurrentDispatcher,Bu=Cn.ReactCurrentOwner,kt=Cn.ReactCurrentBatchConfig,se=0,De=null,je=null,Ve=0,ut=0,qr=er(0),Oe=0,vs=null,_r=0,Ra=0,Uu=0,Xo=null,st=null,Hu=0,po=1/0,ln=null,ea=!1,Mc=null,Vn=null,li=!1,An=null,ta=0,Jo=0,Ac=null,Ni=-1,Ti=0;function Xe(){return se&6?Re():Ni!==-1?Ni:Ni=Re()}function Bn(e){return e.mode&1?se&2&&Ve!==0?Ve&-Ve:h1.transition!==null?(Ti===0&&(Ti=tm()),Ti):(e=de,e!==0||(e=window.event,e=e===void 0?16:lm(e.type)),e):1}function At(e,t,n,r){if(50<Jo)throw Jo=0,Ac=null,Error(R(185));Ds(e,n,r),(!(se&2)||e!==De)&&(e===De&&(!(se&2)&&(Ra|=n),Oe===4&&In(e,Ve)),ct(e,r),n===1&&se===0&&!(t.mode&1)&&(po=Re()+500,Ea&&tr()))}function ct(e,t){var n=e.callbackNode;h0(e,t);var r=zi(e,e===De?Ve:0);if(r===0)n!==null&&Ud(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Ud(n),t===1)e.tag===0?m1(Lf.bind(null,e)):Nm(Lf.bind(null,e)),u1(function(){!(se&6)&&tr()}),n=null;else{switch(nm(r)){case 1:n=gu;break;case 4:n=Jp;break;case 16:n=Di;break;case 536870912:n=em;break;default:n=Di}n=Eh(n,yh.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function yh(e,t){if(Ni=-1,Ti=0,se&6)throw Error(R(327));var n=e.callbackNode;if(to()&&e.callbackNode!==n)return null;var r=zi(e,e===De?Ve:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=na(e,r);else{t=r;var o=se;se|=2;var s=wh();(De!==e||Ve!==t)&&(ln=null,po=Re()+500,hr(e,t));do try{A1();break}catch(a){xh(e,a)}while(!0);Ru(),Ji.current=s,se=o,je!==null?t=0:(De=null,Ve=0,t=Oe)}if(t!==0){if(t===2&&(o=lc(e),o!==0&&(r=o,t=Lc(e,o))),t===1)throw n=vs,hr(e,0),In(e,r),ct(e,Re()),n;if(t===6)In(e,r);else{if(o=e.current.alternate,!(r&30)&&!O1(o)&&(t=na(e,r),t===2&&(s=lc(e),s!==0&&(r=s,t=Lc(e,s))),t===1))throw n=vs,hr(e,0),In(e,r),ct(e,Re()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(R(345));case 2:cr(e,st,ln);break;case 3:if(In(e,r),(r&130023424)===r&&(t=Hu+500-Re(),10<t)){if(zi(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Xe(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=gc(cr.bind(null,e,st,ln),t);break}cr(e,st,ln);break;case 4:if(In(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var i=31-Mt(r);s=1<<i,i=t[i],i>o&&(o=i),r&=~s}if(r=o,r=Re()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*I1(r/1960))-r,10<r){e.timeoutHandle=gc(cr.bind(null,e,st,ln),r);break}cr(e,st,ln);break;case 5:cr(e,st,ln);break;default:throw Error(R(329))}}}return ct(e,Re()),e.callbackNode===n?yh.bind(null,e):null}function Lc(e,t){var n=Xo;return e.current.memoizedState.isDehydrated&&(hr(e,t).flags|=256),e=na(e,t),e!==2&&(t=st,st=n,t!==null&&Dc(t)),e}function Dc(e){st===null?st=e:st.push.apply(st,e)}function O1(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],s=o.getSnapshot;o=o.value;try{if(!Dt(s(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function In(e,t){for(t&=~Uu,t&=~Ra,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Mt(t),r=1<<n;e[n]=-1,t&=~r}}function Lf(e){if(se&6)throw Error(R(327));to();var t=zi(e,0);if(!(t&1))return ct(e,Re()),null;var n=na(e,t);if(e.tag!==0&&n===2){var r=lc(e);r!==0&&(t=r,n=Lc(e,r))}if(n===1)throw n=vs,hr(e,0),In(e,t),ct(e,Re()),n;if(n===6)throw Error(R(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,cr(e,st,ln),ct(e,Re()),null}function Wu(e,t){var n=se;se|=1;try{return e(t)}finally{se=n,se===0&&(po=Re()+500,Ea&&tr())}}function Cr(e){An!==null&&An.tag===0&&!(se&6)&&to();var t=se;se|=1;var n=kt.transition,r=de;try{if(kt.transition=null,de=1,e)return e()}finally{de=r,kt.transition=n,se=t,!(se&6)&&tr()}}function Zu(){ut=qr.current,we(qr)}function hr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,c1(n)),je!==null)for(n=je.return;n!==null;){var r=n;switch(bu(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Ui();break;case 3:uo(),we(at),we(qe),Au();break;case 5:Mu(r);break;case 4:uo();break;case 13:we(ke);break;case 19:we(ke);break;case 10:Pu(r.type._context);break;case 22:case 23:Zu()}n=n.return}if(De=e,je=e=Un(e.current,null),Ve=ut=t,Oe=0,vs=null,Uu=Ra=_r=0,st=Xo=null,fr!==null){for(t=0;t<fr.length;t++)if(n=fr[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,s=n.pending;if(s!==null){var i=s.next;s.next=o,r.next=i}n.pending=r}fr=null}return e}function xh(e,t){do{var n=je;try{if(Ru(),ki.current=Xi,Yi){for(var r=Ee.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Yi=!1}if(Sr=0,Le=Ie=Ee=null,Qo=!1,ms=0,Bu.current=null,n===null||n.return===null){Oe=1,vs=t,je=null;break}e:{var s=e,i=n.return,a=n,l=t;if(t=Ve,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,f=u.tag;if(!(u.mode&1)&&(f===0||f===11||f===15)){var g=u.alternate;g?(u.updateQueue=g.updateQueue,u.memoizedState=g.memoizedState,u.lanes=g.lanes):(u.updateQueue=null,u.memoizedState=null)}var x=Cf(i);if(x!==null){x.flags&=-257,kf(x,i,a,s,t),x.mode&1&&_f(s,c,t),t=x,l=c;var w=t.updateQueue;if(w===null){var m=new Set;m.add(l),t.updateQueue=m}else w.add(l);break e}else{if(!(t&1)){_f(s,c,t),qu();break e}l=Error(R(426))}}else if(_e&&a.mode&1){var _=Cf(i);if(_!==null){!(_.flags&65536)&&(_.flags|=256),kf(_,i,a,s,t),Nu(fo(l,a));break e}}s=l=fo(l,a),Oe!==4&&(Oe=2),Xo===null?Xo=[s]:Xo.push(s),s=i;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var v=nh(s,l,t);gf(s,v);break e;case 1:a=l;var d=s.type,y=s.stateNode;if(!(s.flags&128)&&(typeof d.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Vn===null||!Vn.has(y)))){s.flags|=65536,t&=-t,s.lanes|=t;var C=rh(s,a,t);gf(s,C);break e}}s=s.return}while(s!==null)}_h(n)}catch(k){t=k,je===n&&n!==null&&(je=n=n.return);continue}break}while(!0)}function wh(){var e=Ji.current;return Ji.current=Xi,e===null?Xi:e}function qu(){(Oe===0||Oe===3||Oe===2)&&(Oe=4),De===null||!(_r&268435455)&&!(Ra&268435455)||In(De,Ve)}function na(e,t){var n=se;se|=2;var r=wh();(De!==e||Ve!==t)&&(ln=null,hr(e,t));do try{M1();break}catch(o){xh(e,o)}while(!0);if(Ru(),se=n,Ji.current=r,je!==null)throw Error(R(261));return De=null,Ve=0,Oe}function M1(){for(;je!==null;)Sh(je)}function A1(){for(;je!==null&&!i0();)Sh(je)}function Sh(e){var t=kh(e.alternate,e,ut);e.memoizedProps=e.pendingProps,t===null?_h(e):je=t,Bu.current=null}function _h(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=T1(n,t),n!==null){n.flags&=32767,je=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Oe=6,je=null;return}}else if(n=N1(n,t,ut),n!==null){je=n;return}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);Oe===0&&(Oe=5)}function cr(e,t,n){var r=de,o=kt.transition;try{kt.transition=null,de=1,L1(e,t,n,r)}finally{kt.transition=o,de=r}return null}function L1(e,t,n,r){do to();while(An!==null);if(se&6)throw Error(R(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(R(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(g0(e,s),e===De&&(je=De=null,Ve=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||li||(li=!0,Eh(Di,function(){return to(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=kt.transition,kt.transition=null;var i=de;de=1;var a=se;se|=4,Bu.current=null,P1(e,n),gh(n,e),n1(mc),$i=!!pc,mc=pc=null,e.current=n,j1(n),a0(),se=a,de=i,kt.transition=s}else e.current=n;if(li&&(li=!1,An=e,ta=o),s=e.pendingLanes,s===0&&(Vn=null),u0(n.stateNode),ct(e,Re()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(ea)throw ea=!1,e=Mc,Mc=null,e;return ta&1&&e.tag!==0&&to(),s=e.pendingLanes,s&1?e===Ac?Jo++:(Jo=0,Ac=e):Jo=0,tr(),null}function to(){if(An!==null){var e=nm(ta),t=kt.transition,n=de;try{if(kt.transition=null,de=16>e?16:e,An===null)var r=!1;else{if(e=An,An=null,ta=0,se&6)throw Error(R(331));var o=se;for(se|=4,$=e.current;$!==null;){var s=$,i=s.child;if($.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for($=c;$!==null;){var u=$;switch(u.tag){case 0:case 11:case 15:Yo(8,u,s)}var f=u.child;if(f!==null)f.return=u,$=f;else for(;$!==null;){u=$;var g=u.sibling,x=u.return;if(ph(u),u===c){$=null;break}if(g!==null){g.return=x,$=g;break}$=x}}}var w=s.alternate;if(w!==null){var m=w.child;if(m!==null){w.child=null;do{var _=m.sibling;m.sibling=null,m=_}while(m!==null)}}$=s}}if(s.subtreeFlags&2064&&i!==null)i.return=s,$=i;else e:for(;$!==null;){if(s=$,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Yo(9,s,s.return)}var v=s.sibling;if(v!==null){v.return=s.return,$=v;break e}$=s.return}}var d=e.current;for($=d;$!==null;){i=$;var y=i.child;if(i.subtreeFlags&2064&&y!==null)y.return=i,$=y;else e:for(i=d;$!==null;){if(a=$,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Ta(9,a)}}catch(k){Ne(a,a.return,k)}if(a===i){$=null;break e}var C=a.sibling;if(C!==null){C.return=a.return,$=C;break e}$=a.return}}if(se=o,tr(),Gt&&typeof Gt.onPostCommitFiberRoot=="function")try{Gt.onPostCommitFiberRoot(wa,e)}catch{}r=!0}return r}finally{de=n,kt.transition=t}}return!1}function Df(e,t,n){t=fo(n,t),t=nh(e,t,1),e=Fn(e,t,1),t=Xe(),e!==null&&(Ds(e,1,t),ct(e,t))}function Ne(e,t,n){if(e.tag===3)Df(e,e,n);else for(;t!==null;){if(t.tag===3){Df(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Vn===null||!Vn.has(r))){e=fo(n,e),e=rh(t,e,1),t=Fn(t,e,1),e=Xe(),t!==null&&(Ds(t,1,e),ct(t,e));break}}t=t.return}}function D1(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Xe(),e.pingedLanes|=e.suspendedLanes&n,De===e&&(Ve&n)===n&&(Oe===4||Oe===3&&(Ve&130023424)===Ve&&500>Re()-Hu?hr(e,0):Uu|=n),ct(e,t)}function Ch(e,t){t===0&&(e.mode&1?(t=Xs,Xs<<=1,!(Xs&130023424)&&(Xs=4194304)):t=1);var n=Xe();e=gn(e,t),e!==null&&(Ds(e,t,n),ct(e,n))}function z1(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ch(e,n)}function $1(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(R(314))}r!==null&&r.delete(t),Ch(e,n)}var kh;kh=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||at.current)it=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return it=!1,b1(e,t,n);it=!!(e.flags&131072)}else it=!1,_e&&t.flags&1048576&&Tm(t,Zi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;bi(e,t),e=t.pendingProps;var o=ao(t,qe.current);eo(t,n),o=Du(null,t,r,e,o,n);var s=zu();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,lt(r)?(s=!0,Hi(t)):s=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Iu(t),o.updater=Na,t.stateNode=o,o._reactInternals=t,Cc(t,r,e,n),t=bc(null,t,r,!0,s,n)):(t.tag=0,_e&&s&&Eu(t),Qe(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(bi(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=V1(r),e=Pt(r,e),o){case 0:t=Ec(null,t,r,e,n);break e;case 1:t=Nf(null,t,r,e,n);break e;case 11:t=Ef(null,t,r,e,n);break e;case 14:t=bf(null,t,r,Pt(r.type,e),n);break e}throw Error(R(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Pt(r,o),Ec(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Pt(r,o),Nf(e,t,r,o,n);case 3:e:{if(ah(t),e===null)throw Error(R(387));r=t.pendingProps,s=t.memoizedState,o=s.element,Mm(e,t),Gi(t,r,null,n);var i=t.memoizedState;if(r=i.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){o=fo(Error(R(423)),t),t=Tf(e,t,r,n,o);break e}else if(r!==o){o=fo(Error(R(424)),t),t=Tf(e,t,r,n,o);break e}else for(ft=$n(t.stateNode.containerInfo.firstChild),mt=t,_e=!0,It=null,n=Im(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(lo(),r===o){t=vn(e,t,n);break e}Qe(e,t,r,n)}t=t.child}return t;case 5:return Am(t),e===null&&wc(t),r=t.type,o=t.pendingProps,s=e!==null?e.memoizedProps:null,i=o.children,hc(r,o)?i=null:s!==null&&hc(r,s)&&(t.flags|=32),ih(e,t),Qe(e,t,i,n),t.child;case 6:return e===null&&wc(t),null;case 13:return lh(e,t,n);case 4:return Ou(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=co(t,null,r,n):Qe(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Pt(r,o),Ef(e,t,r,o,n);case 7:return Qe(e,t,t.pendingProps,n),t.child;case 8:return Qe(e,t,t.pendingProps.children,n),t.child;case 12:return Qe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value,ge(qi,r._currentValue),r._currentValue=i,s!==null)if(Dt(s.value,i)){if(s.children===o.children&&!at.current){t=vn(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){i=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=pn(-1,n&-n),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Sc(s.return,n,t),a.lanes|=n;break}l=l.next}}else if(s.tag===10)i=s.type===t.type?null:s.child;else if(s.tag===18){if(i=s.return,i===null)throw Error(R(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Sc(i,n,t),i=s.sibling}else i=s.child;if(i!==null)i.return=s;else for(i=s;i!==null;){if(i===t){i=null;break}if(s=i.sibling,s!==null){s.return=i.return,i=s;break}i=i.return}s=i}Qe(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,eo(t,n),o=Et(o),r=r(o),t.flags|=1,Qe(e,t,r,n),t.child;case 14:return r=t.type,o=Pt(r,t.pendingProps),o=Pt(r.type,o),bf(e,t,r,o,n);case 15:return oh(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Pt(r,o),bi(e,t),t.tag=1,lt(r)?(e=!0,Hi(t)):e=!1,eo(t,n),th(t,r,o),Cc(t,r,o,n),bc(null,t,r,!0,e,n);case 19:return ch(e,t,n);case 22:return sh(e,t,n)}throw Error(R(156,t.tag))};function Eh(e,t){return Xp(e,t)}function F1(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 Ct(e,t,n,r){return new F1(e,t,n,r)}function Ku(e){return e=e.prototype,!(!e||!e.isReactComponent)}function V1(e){if(typeof e=="function")return Ku(e)?1:0;if(e!=null){if(e=e.$$typeof,e===pu)return 11;if(e===mu)return 14}return 2}function Un(e,t){var n=e.alternate;return n===null?(n=Ct(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 Ri(e,t,n,r,o,s){var i=2;if(r=e,typeof e=="function")Ku(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Dr:return gr(n.children,o,s,t);case fu:i=8,o|=8;break;case ql:return e=Ct(12,n,t,o|2),e.elementType=ql,e.lanes=s,e;case Kl:return e=Ct(13,n,t,o),e.elementType=Kl,e.lanes=s,e;case Gl:return e=Ct(19,n,t,o),e.elementType=Gl,e.lanes=s,e;case Ap:return Pa(n,o,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Op:i=10;break e;case Mp:i=9;break e;case pu:i=11;break e;case mu:i=14;break e;case Rn:i=16,r=null;break e}throw Error(R(130,e==null?e:typeof e,""))}return t=Ct(i,n,t,o),t.elementType=e,t.type=r,t.lanes=s,t}function gr(e,t,n,r){return e=Ct(7,e,r,t),e.lanes=n,e}function Pa(e,t,n,r){return e=Ct(22,e,r,t),e.elementType=Ap,e.lanes=n,e.stateNode={isHidden:!1},e}function Rl(e,t,n){return e=Ct(6,e,null,t),e.lanes=n,e}function Pl(e,t,n){return t=Ct(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function B1(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=ul(0),this.expirationTimes=ul(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ul(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Gu(e,t,n,r,o,s,i,a,l){return e=new B1(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Ct(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Iu(s),e}function U1(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Lr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function bh(e){if(!e)return Wn;e=e._reactInternals;e:{if(Rr(e)!==e||e.tag!==1)throw Error(R(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(lt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(R(171))}if(e.tag===1){var n=e.type;if(lt(n))return bm(e,n,t)}return t}function Nh(e,t,n,r,o,s,i,a,l){return e=Gu(n,r,!0,e,o,s,i,a,l),e.context=bh(null),n=e.current,r=Xe(),o=Bn(n),s=pn(r,o),s.callback=t??null,Fn(n,s,o),e.current.lanes=o,Ds(e,o,r),ct(e,r),e}function ja(e,t,n,r){var o=t.current,s=Xe(),i=Bn(o);return n=bh(n),t.context===null?t.context=n:t.pendingContext=n,t=pn(s,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Fn(o,t,i),e!==null&&(At(e,o,i,s),Ci(e,o,i)),i}function ra(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function zf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Qu(e,t){zf(e,t),(e=e.alternate)&&zf(e,t)}function H1(){return null}var Th=typeof reportError=="function"?reportError:function(e){console.error(e)};function Yu(e){this._internalRoot=e}Ia.prototype.render=Yu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(R(409));ja(e,t,null,null)};Ia.prototype.unmount=Yu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Cr(function(){ja(null,e,null,null)}),t[hn]=null}};function Ia(e){this._internalRoot=e}Ia.prototype.unstable_scheduleHydration=function(e){if(e){var t=sm();e={blockedOn:null,target:e,priority:t};for(var n=0;n<jn.length&&t!==0&&t<jn[n].priority;n++);jn.splice(n,0,e),n===0&&am(e)}};function Xu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Oa(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function $f(){}function W1(e,t,n,r,o){if(o){if(typeof r=="function"){var s=r;r=function(){var c=ra(i);s.call(c)}}var i=Nh(t,r,e,0,null,!1,!1,"",$f);return e._reactRootContainer=i,e[hn]=i.current,cs(e.nodeType===8?e.parentNode:e),Cr(),i}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var a=r;r=function(){var c=ra(l);a.call(c)}}var l=Gu(e,0,!1,null,null,!1,!1,"",$f);return e._reactRootContainer=l,e[hn]=l.current,cs(e.nodeType===8?e.parentNode:e),Cr(function(){ja(t,l,n,r)}),l}function Ma(e,t,n,r,o){var s=n._reactRootContainer;if(s){var i=s;if(typeof o=="function"){var a=o;o=function(){var l=ra(i);a.call(l)}}ja(t,i,e,o)}else i=W1(n,t,e,o,r);return ra(i)}rm=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Fo(t.pendingLanes);n!==0&&(vu(t,n|1),ct(t,Re()),!(se&6)&&(po=Re()+500,tr()))}break;case 13:Cr(function(){var r=gn(e,1);if(r!==null){var o=Xe();At(r,e,1,o)}}),Qu(e,1)}};yu=function(e){if(e.tag===13){var t=gn(e,134217728);if(t!==null){var n=Xe();At(t,e,134217728,n)}Qu(e,134217728)}};om=function(e){if(e.tag===13){var t=Bn(e),n=gn(e,t);if(n!==null){var r=Xe();At(n,e,t,r)}Qu(e,t)}};sm=function(){return de};im=function(e,t){var n=de;try{return de=e,t()}finally{de=n}};sc=function(e,t,n){switch(t){case"input":if(Xl(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=ka(r);if(!o)throw Error(R(90));Dp(r),Xl(r,o)}}}break;case"textarea":$p(e,n);break;case"select":t=n.value,t!=null&&Qr(e,!!n.multiple,t,!1)}};Zp=Wu;qp=Cr;var Z1={usingClientEntryPoint:!1,Events:[$s,Vr,ka,Hp,Wp,Wu]},Ao={findFiberByHostInstance:dr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},q1={bundleType:Ao.bundleType,version:Ao.version,rendererPackageName:Ao.rendererPackageName,rendererConfig:Ao.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Cn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Qp(e),e===null?null:e.stateNode},findFiberByHostInstance:Ao.findFiberByHostInstance||H1,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ci=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ci.isDisabled&&ci.supportsFiber)try{wa=ci.inject(q1),Gt=ci}catch{}}yt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Z1;yt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Xu(t))throw Error(R(200));return U1(e,t,null,n)};yt.createRoot=function(e,t){if(!Xu(e))throw Error(R(299));var n=!1,r="",o=Th;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Gu(e,1,!1,null,null,n,!1,r,o),e[hn]=t.current,cs(e.nodeType===8?e.parentNode:e),new Yu(t)};yt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(R(188)):(e=Object.keys(e).join(","),Error(R(268,e)));return e=Qp(t),e=e===null?null:e.stateNode,e};yt.flushSync=function(e){return Cr(e)};yt.hydrate=function(e,t,n){if(!Oa(t))throw Error(R(200));return Ma(null,e,t,!0,n)};yt.hydrateRoot=function(e,t,n){if(!Xu(e))throw Error(R(405));var r=n!=null&&n.hydratedSources||null,o=!1,s="",i=Th;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=Nh(t,null,e,1,n??null,o,!1,s,i),e[hn]=t.current,cs(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Ia(t)};yt.render=function(e,t,n){if(!Oa(t))throw Error(R(200));return Ma(null,e,t,!1,n)};yt.unmountComponentAtNode=function(e){if(!Oa(e))throw Error(R(40));return e._reactRootContainer?(Cr(function(){Ma(null,null,e,!1,function(){e._reactRootContainer=null,e[hn]=null})}),!0):!1};yt.unstable_batchedUpdates=Wu;yt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Oa(n))throw Error(R(200));if(e==null||e._reactInternals===void 0)throw Error(R(38));return Ma(e,t,n,!1,r)};yt.version="18.3.1-next-f1338f8080-20240426";function Rh(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Rh)}catch(e){console.error(e)}}Rh(),Rp.exports=yt;var _o=Rp.exports;const K1=vp(_o);var Ph,Ff=_o;Ph=Ff.createRoot,Ff.hydrateRoot;function jh(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=jh(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function fn(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=jh(e))&&(r&&(r+=" "),r+=t);return r}const ys=e=>typeof e=="number"&&!isNaN(e),vr=e=>typeof e=="string",pt=e=>typeof e=="function",Pi=e=>vr(e)||pt(e)?e:null,zc=e=>h.isValidElement(e)||vr(e)||pt(e)||ys(e);function G1(e,t,n){n===void 0&&(n=300);const{scrollHeight:r,style:o}=e;requestAnimationFrame(()=>{o.minHeight="initial",o.height=r+"px",o.transition=`all ${n}ms`,requestAnimationFrame(()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(t,n)})})}function Aa(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:o=!0,collapseDuration:s=300}=e;return function(i){let{children:a,position:l,preventExitTransition:c,done:u,nodeRef:f,isIn:g,playToast:x}=i;const w=r?`${t}--${l}`:t,m=r?`${n}--${l}`:n,_=h.useRef(0);return h.useLayoutEffect(()=>{const v=f.current,d=w.split(" "),y=C=>{C.target===f.current&&(x(),v.removeEventListener("animationend",y),v.removeEventListener("animationcancel",y),_.current===0&&C.type!=="animationcancel"&&v.classList.remove(...d))};v.classList.add(...d),v.addEventListener("animationend",y),v.addEventListener("animationcancel",y)},[]),h.useEffect(()=>{const v=f.current,d=()=>{v.removeEventListener("animationend",d),o?G1(v,u,s):u()};g||(c?d():(_.current=1,v.className+=` ${m}`,v.addEventListener("animationend",d)))},[g]),ne.createElement(ne.Fragment,null,a)}}function Vf(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const Ye=new Map;let xs=[];const $c=new Set,Q1=e=>$c.forEach(t=>t(e)),Ih=()=>Ye.size>0;function Oh(e,t){var n;if(t)return!((n=Ye.get(t))==null||!n.isToastActive(e));let r=!1;return Ye.forEach(o=>{o.isToastActive(e)&&(r=!0)}),r}function Mh(e,t){zc(e)&&(Ih()||xs.push({content:e,options:t}),Ye.forEach(n=>{n.buildToast(e,t)}))}function Bf(e,t){Ye.forEach(n=>{t!=null&&t!=null&&t.containerId?(t==null?void 0:t.containerId)===n.id&&n.toggle(e,t==null?void 0:t.id):n.toggle(e,t==null?void 0:t.id)})}function Y1(e){const{subscribe:t,getSnapshot:n,setProps:r}=h.useRef(function(s){const i=s.containerId||1;return{subscribe(a){const l=function(u,f,g){let x=1,w=0,m=[],_=[],v=[],d=f;const y=new Map,C=new Set,k=()=>{v=Array.from(y.values()),C.forEach(E=>E())},T=E=>{_=E==null?[]:_.filter(I=>I!==E),k()},b=E=>{const{toastId:I,onOpen:j,updateId:V,children:M}=E.props,q=V==null;E.staleId&&y.delete(E.staleId),y.set(I,E),_=[..._,E.props.toastId].filter(W=>W!==E.staleId),k(),g(Vf(E,q?"added":"updated")),q&&pt(j)&&j(h.isValidElement(M)&&M.props)};return{id:u,props:d,observe:E=>(C.add(E),()=>C.delete(E)),toggle:(E,I)=>{y.forEach(j=>{I!=null&&I!==j.props.toastId||pt(j.toggle)&&j.toggle(E)})},removeToast:T,toasts:y,clearQueue:()=>{w-=m.length,m=[]},buildToast:(E,I)=>{if((J=>{let{containerId:pe,toastId:ie,updateId:Se}=J;const ve=pe?pe!==u:u!==1,B=y.has(ie)&&Se==null;return ve||B})(I))return;const{toastId:j,updateId:V,data:M,staleId:q,delay:W}=I,ee=()=>{T(j)},F=V==null;F&&w++;const K={...d,style:d.toastStyle,key:x++,...Object.fromEntries(Object.entries(I).filter(J=>{let[pe,ie]=J;return ie!=null})),toastId:j,updateId:V,data:M,closeToast:ee,isIn:!1,className:Pi(I.className||d.toastClassName),bodyClassName:Pi(I.bodyClassName||d.bodyClassName),progressClassName:Pi(I.progressClassName||d.progressClassName),autoClose:!I.isLoading&&(N=I.autoClose,O=d.autoClose,N===!1||ys(N)&&N>0?N:O),deleteToast(){const J=y.get(j),{onClose:pe,children:ie}=J.props;pt(pe)&&pe(h.isValidElement(ie)&&ie.props),g(Vf(J,"removed")),y.delete(j),w--,w<0&&(w=0),m.length>0?b(m.shift()):k()}};var N,O;K.closeButton=d.closeButton,I.closeButton===!1||zc(I.closeButton)?K.closeButton=I.closeButton:I.closeButton===!0&&(K.closeButton=!zc(d.closeButton)||d.closeButton);let z=E;h.isValidElement(E)&&!vr(E.type)?z=h.cloneElement(E,{closeToast:ee,toastProps:K,data:M}):pt(E)&&(z=E({closeToast:ee,toastProps:K,data:M}));const H={content:z,props:K,staleId:q};d.limit&&d.limit>0&&w>d.limit&&F?m.push(H):ys(W)?setTimeout(()=>{b(H)},W):b(H)},setProps(E){d=E},setToggle:(E,I)=>{y.get(E).toggle=I},isToastActive:E=>_.some(I=>I===E),getSnapshot:()=>v}}(i,s,Q1);Ye.set(i,l);const c=l.observe(a);return xs.forEach(u=>Mh(u.content,u.options)),xs=[],()=>{c(),Ye.delete(i)}},setProps(a){var l;(l=Ye.get(i))==null||l.setProps(a)},getSnapshot(){var a;return(a=Ye.get(i))==null?void 0:a.getSnapshot()}}}(e)).current;r(e);const o=h.useSyncExternalStore(t,n,n);return{getToastToRender:function(s){if(!o)return[];const i=new Map;return e.newestOnTop&&o.reverse(),o.forEach(a=>{const{position:l}=a.props;i.has(l)||i.set(l,[]),i.get(l).push(a)}),Array.from(i,a=>s(a[0],a[1]))},isToastActive:Oh,count:o==null?void 0:o.length}}function X1(e){const[t,n]=h.useState(!1),[r,o]=h.useState(!1),s=h.useRef(null),i=h.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:a,pauseOnHover:l,closeToast:c,onClick:u,closeOnClick:f}=e;var g,x;function w(){n(!0)}function m(){n(!1)}function _(y){const C=s.current;i.canDrag&&C&&(i.didMove=!0,t&&m(),i.delta=e.draggableDirection==="x"?y.clientX-i.start:y.clientY-i.start,i.start!==y.clientX&&(i.canCloseOnClick=!1),C.style.transform=`translate3d(${e.draggableDirection==="x"?`${i.delta}px, var(--y)`:`0, calc(${i.delta}px + var(--y))`},0)`,C.style.opacity=""+(1-Math.abs(i.delta/i.removalDistance)))}function v(){document.removeEventListener("pointermove",_),document.removeEventListener("pointerup",v);const y=s.current;if(i.canDrag&&i.didMove&&y){if(i.canDrag=!1,Math.abs(i.delta)>i.removalDistance)return o(!0),e.closeToast(),void e.collapseAll();y.style.transition="transform 0.2s, opacity 0.2s",y.style.removeProperty("transform"),y.style.removeProperty("opacity")}}(x=Ye.get((g={id:e.toastId,containerId:e.containerId,fn:n}).containerId||1))==null||x.setToggle(g.id,g.fn),h.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||m(),window.addEventListener("focus",w),window.addEventListener("blur",m),()=>{window.removeEventListener("focus",w),window.removeEventListener("blur",m)}},[e.pauseOnFocusLoss]);const d={onPointerDown:function(y){if(e.draggable===!0||e.draggable===y.pointerType){i.didMove=!1,document.addEventListener("pointermove",_),document.addEventListener("pointerup",v);const C=s.current;i.canCloseOnClick=!0,i.canDrag=!0,C.style.transition="none",e.draggableDirection==="x"?(i.start=y.clientX,i.removalDistance=C.offsetWidth*(e.draggablePercent/100)):(i.start=y.clientY,i.removalDistance=C.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(y){const{top:C,bottom:k,left:T,right:b}=s.current.getBoundingClientRect();y.nativeEvent.type!=="touchend"&&e.pauseOnHover&&y.clientX>=T&&y.clientX<=b&&y.clientY>=C&&y.clientY<=k?m():w()}};return a&&l&&(d.onMouseEnter=m,e.stacked||(d.onMouseLeave=w)),f&&(d.onClick=y=>{u&&u(y),i.canCloseOnClick&&c()}),{playToast:w,pauseToast:m,isRunning:t,preventExitTransition:r,toastRef:s,eventHandlers:d}}function J1(e){let{delay:t,isRunning:n,closeToast:r,type:o="default",hide:s,className:i,style:a,controlledProgress:l,progress:c,rtl:u,isIn:f,theme:g}=e;const x=s||l&&c===0,w={...a,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};l&&(w.transform=`scaleX(${c})`);const m=fn("Toastify__progress-bar",l?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${g}`,`Toastify__progress-bar--${o}`,{"Toastify__progress-bar--rtl":u}),_=pt(i)?i({rtl:u,type:o,defaultClassName:m}):fn(m,i),v={[l&&c>=1?"onTransitionEnd":"onAnimationEnd"]:l&&c<1?null:()=>{f&&r()}};return ne.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":x},ne.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${g} Toastify__progress-bar--${o}`}),ne.createElement("div",{role:"progressbar","aria-hidden":x?"true":"false","aria-label":"notification timer",className:_,style:w,...v}))}let ex=1;const Ah=()=>""+ex++;function tx(e){return e&&(vr(e.toastId)||ys(e.toastId))?e.toastId:Ah()}function es(e,t){return Mh(e,t),t.toastId}function oa(e,t){return{...t,type:t&&t.type||e,toastId:tx(t)}}function ui(e){return(t,n)=>es(t,oa(e,n))}function me(e,t){return es(e,oa("default",t))}me.loading=(e,t)=>es(e,oa("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),me.promise=function(e,t,n){let r,{pending:o,error:s,success:i}=t;o&&(r=vr(o)?me.loading(o,n):me.loading(o.render,{...n,...o}));const a={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},l=(u,f,g)=>{if(f==null)return void me.dismiss(r);const x={type:u,...a,...n,data:g},w=vr(f)?{render:f}:f;return r?me.update(r,{...x,...w}):me(w.render,{...x,...w}),g},c=pt(e)?e():e;return c.then(u=>l("success",i,u)).catch(u=>l("error",s,u)),c},me.success=ui("success"),me.info=ui("info"),me.error=ui("error"),me.warning=ui("warning"),me.warn=me.warning,me.dark=(e,t)=>es(e,oa("default",{theme:"dark",...t})),me.dismiss=function(e){(function(t){var n;if(Ih()){if(t==null||vr(n=t)||ys(n))Ye.forEach(r=>{r.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){const r=Ye.get(t.containerId);r?r.removeToast(t.id):Ye.forEach(o=>{o.removeToast(t.id)})}}else xs=xs.filter(r=>t!=null&&r.options.toastId!==t)})(e)},me.clearWaitingQueue=function(e){e===void 0&&(e={}),Ye.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},me.isActive=Oh,me.update=function(e,t){t===void 0&&(t={});const n=((r,o)=>{var s;let{containerId:i}=o;return(s=Ye.get(i||1))==null?void 0:s.toasts.get(r)})(e,t);if(n){const{props:r,content:o}=n,s={delay:100,...r,...t,toastId:t.toastId||e,updateId:Ah()};s.toastId!==e&&(s.staleId=e);const i=s.render||o;delete s.render,es(i,s)}},me.done=e=>{me.update(e,{progress:1})},me.onChange=function(e){return $c.add(e),()=>{$c.delete(e)}},me.play=e=>Bf(!0,e),me.pause=e=>Bf(!1,e);const nx=typeof window<"u"?h.useLayoutEffect:h.useEffect,di=e=>{let{theme:t,type:n,isLoading:r,...o}=e;return ne.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...o})},jl={info:function(e){return ne.createElement(di,{...e},ne.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return ne.createElement(di,{...e},ne.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return ne.createElement(di,{...e},ne.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return ne.createElement(di,{...e},ne.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return ne.createElement("div",{className:"Toastify__spinner"})}},rx=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:o,playToast:s}=X1(e),{closeButton:i,children:a,autoClose:l,onClick:c,type:u,hideProgressBar:f,closeToast:g,transition:x,position:w,className:m,style:_,bodyClassName:v,bodyStyle:d,progressClassName:y,progressStyle:C,updateId:k,role:T,progress:b,rtl:E,toastId:I,deleteToast:j,isIn:V,isLoading:M,closeOnClick:q,theme:W}=e,ee=fn("Toastify__toast",`Toastify__toast-theme--${W}`,`Toastify__toast--${u}`,{"Toastify__toast--rtl":E},{"Toastify__toast--close-on-click":q}),F=pt(m)?m({rtl:E,position:w,type:u,defaultClassName:ee}):fn(ee,m),K=function(H){let{theme:J,type:pe,isLoading:ie,icon:Se}=H,ve=null;const B={theme:J,type:pe};return Se===!1||(pt(Se)?ve=Se({...B,isLoading:ie}):h.isValidElement(Se)?ve=h.cloneElement(Se,B):ie?ve=jl.spinner():(ce=>ce in jl)(pe)&&(ve=jl[pe](B))),ve}(e),N=!!b||!l,O={closeToast:g,type:u,theme:W};let z=null;return i===!1||(z=pt(i)?i(O):h.isValidElement(i)?h.cloneElement(i,O):function(H){let{closeToast:J,theme:pe,ariaLabel:ie="close"}=H;return ne.createElement("button",{className:`Toastify__close-button Toastify__close-button--${pe}`,type:"button",onClick:Se=>{Se.stopPropagation(),J(Se)},"aria-label":ie},ne.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},ne.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(O)),ne.createElement(x,{isIn:V,done:j,position:w,preventExitTransition:n,nodeRef:r,playToast:s},ne.createElement("div",{id:I,onClick:c,"data-in":V,className:F,...o,style:_,ref:r},ne.createElement("div",{...V&&{role:T},className:pt(v)?v({type:u}):fn("Toastify__toast-body",v),style:d},K!=null&&ne.createElement("div",{className:fn("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!M})},K),ne.createElement("div",null,a)),z,ne.createElement(J1,{...k&&!N?{key:`pb-${k}`}:{},rtl:E,theme:W,delay:l,isRunning:t,isIn:V,closeToast:g,hide:f,type:u,style:C,className:y,controlledProgress:N,progress:b||0})))},La=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},ox=Aa(La("bounce",!0));Aa(La("slide",!0));Aa(La("zoom"));Aa(La("flip"));const sx={position:"top-right",transition:ox,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function ix(e){let t={...sx,...e};const n=e.stacked,[r,o]=h.useState(!0),s=h.useRef(null),{getToastToRender:i,isToastActive:a,count:l}=Y1(t),{className:c,style:u,rtl:f,containerId:g}=t;function x(m){const _=fn("Toastify__toast-container",`Toastify__toast-container--${m}`,{"Toastify__toast-container--rtl":f});return pt(c)?c({position:m,rtl:f,defaultClassName:_}):fn(_,Pi(c))}function w(){n&&(o(!0),me.play())}return nx(()=>{if(n){var m;const _=s.current.querySelectorAll('[data-in="true"]'),v=12,d=(m=t.position)==null?void 0:m.includes("top");let y=0,C=0;Array.from(_).reverse().forEach((k,T)=>{const b=k;b.classList.add("Toastify__toast--stacked"),T>0&&(b.dataset.collapsed=`${r}`),b.dataset.pos||(b.dataset.pos=d?"top":"bot");const E=y*(r?.2:1)+(r?0:v*T);b.style.setProperty("--y",`${d?E:-1*E}px`),b.style.setProperty("--g",`${v}`),b.style.setProperty("--s",""+(1-(r?C:0))),y+=b.offsetHeight,C+=.025})}},[r,l,n]),ne.createElement("div",{ref:s,className:"Toastify",id:g,onMouseEnter:()=>{n&&(o(!1),me.pause())},onMouseLeave:w},i((m,_)=>{const v=_.length?{...u}:{...u,pointerEvents:"none"};return ne.createElement("div",{className:x(m),style:v,key:`container-${m}`},_.map(d=>{let{content:y,props:C}=d;return ne.createElement(rx,{...C,stacked:n,collapseAll:w,isIn:a(C.toastId,C.containerId),style:C.style,key:`toast-${C.key}`},y)}))}))}var oe;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const s={};for(const i of o)s[i]=i;return s},e.getValidEnumValues=o=>{const s=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),i={};for(const a of s)i[a]=o[a];return e.objectValues(i)},e.objectValues=o=>e.objectKeys(o).map(function(s){return o[s]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const s=[];for(const i in o)Object.prototype.hasOwnProperty.call(o,i)&&s.push(i);return s},e.find=(o,s)=>{for(const i of o)if(s(i))return i},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,s=" | "){return o.map(i=>typeof i=="string"?`'${i}'`:i).join(s)}e.joinValues=r,e.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(oe||(oe={}));var Fc;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Fc||(Fc={}));const L=oe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),On=e=>{switch(typeof e){case"undefined":return L.undefined;case"string":return L.string;case"number":return isNaN(e)?L.nan:L.number;case"boolean":return L.boolean;case"function":return L.function;case"bigint":return L.bigint;case"symbol":return L.symbol;case"object":return Array.isArray(e)?L.array:e===null?L.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?L.promise:typeof Map<"u"&&e instanceof Map?L.map:typeof Set<"u"&&e instanceof Set?L.set:typeof Date<"u"&&e instanceof Date?L.date:L.object;default:return L.unknown}},P=oe.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),ax=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class ht extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(s){return s.message},r={_errors:[]},o=s=>{for(const i of s.issues)if(i.code==="invalid_union")i.unionErrors.map(o);else if(i.code==="invalid_return_type")o(i.returnTypeError);else if(i.code==="invalid_arguments")o(i.argumentsError);else if(i.path.length===0)r._errors.push(n(i));else{let a=r,l=0;for(;l<i.path.length;){const c=i.path[l];l===i.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(i))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof ht))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,oe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}ht.create=e=>new ht(e);const mo=(e,t)=>{let n;switch(e.code){case P.invalid_type:e.received===L.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case P.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,oe.jsonStringifyReplacer)}`;break;case P.unrecognized_keys:n=`Unrecognized key(s) in object: ${oe.joinValues(e.keys,", ")}`;break;case P.invalid_union:n="Invalid input";break;case P.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${oe.joinValues(e.options)}`;break;case P.invalid_enum_value:n=`Invalid enum value. Expected ${oe.joinValues(e.options)}, received '${e.received}'`;break;case P.invalid_arguments:n="Invalid function arguments";break;case P.invalid_return_type:n="Invalid function return type";break;case P.invalid_date:n="Invalid date";break;case P.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:oe.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case P.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case P.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case P.custom:n="Invalid input";break;case P.invalid_intersection_types:n="Intersection results could not be merged";break;case P.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case P.not_finite:n="Number must be finite";break;default:n=t.defaultError,oe.assertNever(e)}return{message:n}};let Lh=mo;function lx(e){Lh=e}function sa(){return Lh}const ia=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,s=[...n,...o.path||[]],i={...o,path:s};if(o.message!==void 0)return{...o,path:s,message:o.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(i,{data:t,defaultError:a}).message;return{...o,path:s,message:a}},cx=[];function A(e,t){const n=sa(),r=ia({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===mo?void 0:mo].filter(o=>!!o)});e.common.issues.push(r)}class Ke{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return G;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const s=await o.key,i=await o.value;r.push({key:s,value:i})}return Ke.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:s,value:i}=o;if(s.status==="aborted"||i.status==="aborted")return G;s.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof i.value<"u"||o.alwaysSet)&&(r[s.value]=i.value)}return{status:t.value,value:r}}}const G=Object.freeze({status:"aborted"}),Kr=e=>({status:"dirty",value:e}),Je=e=>({status:"valid",value:e}),Vc=e=>e.status==="aborted",Bc=e=>e.status==="dirty",ws=e=>e.status==="valid",Ss=e=>typeof Promise<"u"&&e instanceof Promise;function aa(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function Dh(e,t,n,r,o){if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var U;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(U||(U={}));var Bo,Uo;class Jt{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Uf=(e,t)=>{if(ws(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new ht(e.common.issues);return this._error=n,this._error}}};function Q(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(i,a)=>{var l,c;const{message:u}=e;return i.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:a.defaultError}},description:o}}class X{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return On(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:On(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Ke,ctx:{common:t.parent.common,data:t.data,parsedType:On(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Ss(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:On(t)},s=this._parseSync({data:t,path:o.path,parent:o});return Uf(o,s)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:On(t)},o=this._parse({data:t,path:r.path,parent:r}),s=await(Ss(o)?o:Promise.resolve(o));return Uf(r,s)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,s)=>{const i=t(o),a=()=>s.addIssue({code:P.custom,...r(o)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new zt({schema:this,typeName:Z.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Yt.create(this,this._def)}nullable(){return Gn.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Lt.create(this,this._def)}promise(){return go.create(this,this._def)}or(t){return Es.create([this,t],this._def)}and(t){return bs.create(this,t,this._def)}transform(t){return new zt({...Q(this._def),schema:this,typeName:Z.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new js({...Q(this._def),innerType:this,defaultValue:n,typeName:Z.ZodDefault})}brand(){return new Ju({typeName:Z.ZodBranded,type:this,...Q(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Is({...Q(this._def),innerType:this,catchValue:n,typeName:Z.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Vs.create(this,t)}readonly(){return Os.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const ux=/^c[^\s-]{8,}$/i,dx=/^[0-9a-z]+$/,fx=/^[0-9A-HJKMNP-TV-Z]{26}$/,px=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,mx=/^[a-z0-9_-]{21}$/i,hx=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,gx=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,vx="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Il;const yx=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,xx=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,wx=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,zh="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Sx=new RegExp(`^${zh}$`);function $h(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function _x(e){return new RegExp(`^${$h(e)}$`)}function Fh(e){let t=`${zh}T${$h(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function Cx(e,t){return!!((t==="v4"||!t)&&yx.test(e)||(t==="v6"||!t)&&xx.test(e))}class Ot extends X{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==L.string){const s=this._getOrReturnCtx(t);return A(s,{code:P.invalid_type,expected:L.string,received:s.parsedType}),G}const r=new Ke;let o;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(o=this._getOrReturnCtx(t,o),A(o,{code:P.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")t.data.length>s.value&&(o=this._getOrReturnCtx(t,o),A(o,{code:P.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const i=t.data.length>s.value,a=t.data.length<s.value;(i||a)&&(o=this._getOrReturnCtx(t,o),i?A(o,{code:P.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&A(o,{code:P.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")gx.test(t.data)||(o=this._getOrReturnCtx(t,o),A(o,{validation:"email",code:P.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")Il||(Il=new RegExp(vx,"u")),Il.test(t.data)||(o=this._getOrReturnCtx(t,o),A(o,{validation:"emoji",code:P.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")px.test(t.data)||(o=this._getOrReturnCtx(t,o),A(o,{validation:"uuid",code:P.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")mx.test(t.data)||(o=this._getOrReturnCtx(t,o),A(o,{validation:"nanoid",code:P.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")ux.test(t.data)||(o=this._getOrReturnCtx(t,o),A(o,{validation:"cuid",code:P.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")dx.test(t.data)||(o=this._getOrReturnCtx(t,o),A(o,{validation:"cuid2",code:P.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")fx.test(t.data)||(o=this._getOrReturnCtx(t,o),A(o,{validation:"ulid",code:P.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),A(o,{validation:"url",code:P.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),A(o,{validation:"regex",code:P.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(t,o),A(o,{code:P.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(o=this._getOrReturnCtx(t,o),A(o,{code:P.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(o=this._getOrReturnCtx(t,o),A(o,{code:P.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?Fh(s).test(t.data)||(o=this._getOrReturnCtx(t,o),A(o,{code:P.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?Sx.test(t.data)||(o=this._getOrReturnCtx(t,o),A(o,{code:P.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?_x(s).test(t.data)||(o=this._getOrReturnCtx(t,o),A(o,{code:P.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?hx.test(t.data)||(o=this._getOrReturnCtx(t,o),A(o,{validation:"duration",code:P.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?Cx(t.data,s.version)||(o=this._getOrReturnCtx(t,o),A(o,{validation:"ip",code:P.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?wx.test(t.data)||(o=this._getOrReturnCtx(t,o),A(o,{validation:"base64",code:P.invalid_string,message:s.message}),r.dirty()):oe.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:P.invalid_string,...U.errToObj(r)})}_addCheck(t){return new Ot({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...U.errToObj(t)})}url(t){return this._addCheck({kind:"url",...U.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...U.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...U.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...U.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...U.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...U.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...U.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...U.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...U.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...U.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...U.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...U.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...U.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...U.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...U.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...U.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...U.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...U.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...U.errToObj(n)})}nonempty(t){return this.min(1,U.errToObj(t))}trim(){return new Ot({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ot({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ot({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ot.create=e=>{var t;return new Ot({checks:[],typeName:Z.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Q(e)})};function kx(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,s=parseInt(e.toFixed(o).replace(".","")),i=parseInt(t.toFixed(o).replace(".",""));return s%i/Math.pow(10,o)}class Zn extends X{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==L.number){const s=this._getOrReturnCtx(t);return A(s,{code:P.invalid_type,expected:L.number,received:s.parsedType}),G}let r;const o=new Ke;for(const s of this._def.checks)s.kind==="int"?oe.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),A(r,{code:P.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),A(r,{code:P.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),A(r,{code:P.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?kx(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),A(r,{code:P.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),A(r,{code:P.not_finite,message:s.message}),o.dirty()):oe.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,U.toString(n))}gt(t,n){return this.setLimit("min",t,!1,U.toString(n))}lte(t,n){return this.setLimit("max",t,!0,U.toString(n))}lt(t,n){return this.setLimit("max",t,!1,U.toString(n))}setLimit(t,n,r,o){return new Zn({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:U.toString(o)}]})}_addCheck(t){return new Zn({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:U.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:U.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:U.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:U.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:U.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:U.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:U.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:U.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:U.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&oe.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Zn.create=e=>new Zn({checks:[],typeName:Z.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Q(e)});class qn extends X{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==L.bigint){const s=this._getOrReturnCtx(t);return A(s,{code:P.invalid_type,expected:L.bigint,received:s.parsedType}),G}let r;const o=new Ke;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),A(r,{code:P.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),A(r,{code:P.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),A(r,{code:P.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):oe.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,U.toString(n))}gt(t,n){return this.setLimit("min",t,!1,U.toString(n))}lte(t,n){return this.setLimit("max",t,!0,U.toString(n))}lt(t,n){return this.setLimit("max",t,!1,U.toString(n))}setLimit(t,n,r,o){return new qn({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:U.toString(o)}]})}_addCheck(t){return new qn({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:U.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:U.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:U.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:U.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:U.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}qn.create=e=>{var t;return new qn({checks:[],typeName:Z.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Q(e)})};class _s extends X{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==L.boolean){const r=this._getOrReturnCtx(t);return A(r,{code:P.invalid_type,expected:L.boolean,received:r.parsedType}),G}return Je(t.data)}}_s.create=e=>new _s({typeName:Z.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Q(e)});class kr extends X{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==L.date){const s=this._getOrReturnCtx(t);return A(s,{code:P.invalid_type,expected:L.date,received:s.parsedType}),G}if(isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return A(s,{code:P.invalid_date}),G}const r=new Ke;let o;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(o=this._getOrReturnCtx(t,o),A(o,{code:P.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(o=this._getOrReturnCtx(t,o),A(o,{code:P.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):oe.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new kr({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:U.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:U.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}kr.create=e=>new kr({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Z.ZodDate,...Q(e)});class la extends X{_parse(t){if(this._getType(t)!==L.symbol){const r=this._getOrReturnCtx(t);return A(r,{code:P.invalid_type,expected:L.symbol,received:r.parsedType}),G}return Je(t.data)}}la.create=e=>new la({typeName:Z.ZodSymbol,...Q(e)});class Cs extends X{_parse(t){if(this._getType(t)!==L.undefined){const r=this._getOrReturnCtx(t);return A(r,{code:P.invalid_type,expected:L.undefined,received:r.parsedType}),G}return Je(t.data)}}Cs.create=e=>new Cs({typeName:Z.ZodUndefined,...Q(e)});class ks extends X{_parse(t){if(this._getType(t)!==L.null){const r=this._getOrReturnCtx(t);return A(r,{code:P.invalid_type,expected:L.null,received:r.parsedType}),G}return Je(t.data)}}ks.create=e=>new ks({typeName:Z.ZodNull,...Q(e)});class ho extends X{constructor(){super(...arguments),this._any=!0}_parse(t){return Je(t.data)}}ho.create=e=>new ho({typeName:Z.ZodAny,...Q(e)});class yr extends X{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Je(t.data)}}yr.create=e=>new yr({typeName:Z.ZodUnknown,...Q(e)});class yn extends X{_parse(t){const n=this._getOrReturnCtx(t);return A(n,{code:P.invalid_type,expected:L.never,received:n.parsedType}),G}}yn.create=e=>new yn({typeName:Z.ZodNever,...Q(e)});class ca extends X{_parse(t){if(this._getType(t)!==L.undefined){const r=this._getOrReturnCtx(t);return A(r,{code:P.invalid_type,expected:L.void,received:r.parsedType}),G}return Je(t.data)}}ca.create=e=>new ca({typeName:Z.ZodVoid,...Q(e)});class Lt extends X{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==L.array)return A(n,{code:P.invalid_type,expected:L.array,received:n.parsedType}),G;if(o.exactLength!==null){const i=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(i||a)&&(A(n,{code:i?P.too_big:P.too_small,minimum:a?o.exactLength.value:void 0,maximum:i?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(A(n,{code:P.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(A(n,{code:P.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((i,a)=>o.type._parseAsync(new Jt(n,i,n.path,a)))).then(i=>Ke.mergeArray(r,i));const s=[...n.data].map((i,a)=>o.type._parseSync(new Jt(n,i,n.path,a)));return Ke.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new Lt({...this._def,minLength:{value:t,message:U.toString(n)}})}max(t,n){return new Lt({...this._def,maxLength:{value:t,message:U.toString(n)}})}length(t,n){return new Lt({...this._def,exactLength:{value:t,message:U.toString(n)}})}nonempty(t){return this.min(1,t)}}Lt.create=(e,t)=>new Lt({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Z.ZodArray,...Q(t)});function Ar(e){if(e instanceof Ce){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Yt.create(Ar(r))}return new Ce({...e._def,shape:()=>t})}else return e instanceof Lt?new Lt({...e._def,type:Ar(e.element)}):e instanceof Yt?Yt.create(Ar(e.unwrap())):e instanceof Gn?Gn.create(Ar(e.unwrap())):e instanceof en?en.create(e.items.map(t=>Ar(t))):e}class Ce extends X{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=oe.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==L.object){const c=this._getOrReturnCtx(t);return A(c,{code:P.invalid_type,expected:L.object,received:c.parsedType}),G}const{status:r,ctx:o}=this._processInputParams(t),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof yn&&this._def.unknownKeys==="strip"))for(const c in o.data)i.includes(c)||a.push(c);const l=[];for(const c of i){const u=s[c],f=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Jt(o,f,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof yn){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")a.length>0&&(A(o,{code:P.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of a){const f=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Jt(o,f,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const f=await u.key,g=await u.value;c.push({key:f,value:g,alwaysSet:u.alwaysSet})}return c}).then(c=>Ke.mergeObjectSync(r,c)):Ke.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return U.errToObj,new Ce({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,s,i,a;const l=(i=(s=(o=this._def).errorMap)===null||s===void 0?void 0:s.call(o,n,r).message)!==null&&i!==void 0?i:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=U.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new Ce({...this._def,unknownKeys:"strip"})}passthrough(){return new Ce({...this._def,unknownKeys:"passthrough"})}extend(t){return new Ce({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Ce({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Z.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Ce({...this._def,catchall:t})}pick(t){const n={};return oe.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Ce({...this._def,shape:()=>n})}omit(t){const n={};return oe.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Ce({...this._def,shape:()=>n})}deepPartial(){return Ar(this)}partial(t){const n={};return oe.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new Ce({...this._def,shape:()=>n})}required(t){const n={};return oe.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof Yt;)s=s._def.innerType;n[r]=s}}),new Ce({...this._def,shape:()=>n})}keyof(){return Vh(oe.objectKeys(this.shape))}}Ce.create=(e,t)=>new Ce({shape:()=>e,unknownKeys:"strip",catchall:yn.create(),typeName:Z.ZodObject,...Q(t)});Ce.strictCreate=(e,t)=>new Ce({shape:()=>e,unknownKeys:"strict",catchall:yn.create(),typeName:Z.ZodObject,...Q(t)});Ce.lazycreate=(e,t)=>new Ce({shape:e,unknownKeys:"strip",catchall:yn.create(),typeName:Z.ZodObject,...Q(t)});class Es extends X{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(s){for(const a of s)if(a.result.status==="valid")return a.result;for(const a of s)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const i=s.map(a=>new ht(a.ctx.common.issues));return A(n,{code:P.invalid_union,unionErrors:i}),G}if(n.common.async)return Promise.all(r.map(async s=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(o);{let s;const i=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!s&&(s={result:u,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(l=>new ht(l));return A(n,{code:P.invalid_union,unionErrors:a}),G}}get options(){return this._def.options}}Es.create=(e,t)=>new Es({options:e,typeName:Z.ZodUnion,...Q(t)});const an=e=>e instanceof Ts?an(e.schema):e instanceof zt?an(e.innerType()):e instanceof Rs?[e.value]:e instanceof Kn?e.options:e instanceof Ps?oe.objectValues(e.enum):e instanceof js?an(e._def.innerType):e instanceof Cs?[void 0]:e instanceof ks?[null]:e instanceof Yt?[void 0,...an(e.unwrap())]:e instanceof Gn?[null,...an(e.unwrap())]:e instanceof Ju||e instanceof Os?an(e.unwrap()):e instanceof Is?an(e._def.innerType):[];class Da extends X{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==L.object)return A(n,{code:P.invalid_type,expected:L.object,received:n.parsedType}),G;const r=this.discriminator,o=n.data[r],s=this.optionsMap.get(o);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(A(n,{code:P.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),G)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const s of n){const i=an(s.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of i){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,s)}}return new Da({typeName:Z.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Q(r)})}}function Uc(e,t){const n=On(e),r=On(t);if(e===t)return{valid:!0,data:e};if(n===L.object&&r===L.object){const o=oe.objectKeys(t),s=oe.objectKeys(e).filter(a=>o.indexOf(a)!==-1),i={...e,...t};for(const a of s){const l=Uc(e[a],t[a]);if(!l.valid)return{valid:!1};i[a]=l.data}return{valid:!0,data:i}}else if(n===L.array&&r===L.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let s=0;s<e.length;s++){const i=e[s],a=t[s],l=Uc(i,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===L.date&&r===L.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class bs extends X{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(s,i)=>{if(Vc(s)||Vc(i))return G;const a=Uc(s.value,i.value);return a.valid?((Bc(s)||Bc(i))&&n.dirty(),{status:n.value,value:a.data}):(A(r,{code:P.invalid_intersection_types}),G)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,i])=>o(s,i)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}bs.create=(e,t,n)=>new bs({left:e,right:t,typeName:Z.ZodIntersection,...Q(n)});class en extends X{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==L.array)return A(r,{code:P.invalid_type,expected:L.array,received:r.parsedType}),G;if(r.data.length<this._def.items.length)return A(r,{code:P.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),G;!this._def.rest&&r.data.length>this._def.items.length&&(A(r,{code:P.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((i,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Jt(r,i,r.path,a)):null}).filter(i=>!!i);return r.common.async?Promise.all(s).then(i=>Ke.mergeArray(n,i)):Ke.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new en({...this._def,rest:t})}}en.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new en({items:e,typeName:Z.ZodTuple,rest:null,...Q(t)})};class Ns extends X{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==L.object)return A(r,{code:P.invalid_type,expected:L.object,received:r.parsedType}),G;const o=[],s=this._def.keyType,i=this._def.valueType;for(const a in r.data)o.push({key:s._parse(new Jt(r,a,r.path,a)),value:i._parse(new Jt(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?Ke.mergeObjectAsync(n,o):Ke.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof X?new Ns({keyType:t,valueType:n,typeName:Z.ZodRecord,...Q(r)}):new Ns({keyType:Ot.create(),valueType:t,typeName:Z.ZodRecord,...Q(n)})}}class ua extends X{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==L.map)return A(r,{code:P.invalid_type,expected:L.map,received:r.parsedType}),G;const o=this._def.keyType,s=this._def.valueType,i=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new Jt(r,a,r.path,[c,"key"])),value:s._parse(new Jt(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of i){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return G;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of i){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return G;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}ua.create=(e,t,n)=>new ua({valueType:t,keyType:e,typeName:Z.ZodMap,...Q(n)});class Er extends X{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==L.set)return A(r,{code:P.invalid_type,expected:L.set,received:r.parsedType}),G;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(A(r,{code:P.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(A(r,{code:P.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const s=this._def.valueType;function i(l){const c=new Set;for(const u of l){if(u.status==="aborted")return G;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>s._parse(new Jt(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>i(l)):i(a)}min(t,n){return new Er({...this._def,minSize:{value:t,message:U.toString(n)}})}max(t,n){return new Er({...this._def,maxSize:{value:t,message:U.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Er.create=(e,t)=>new Er({valueType:e,minSize:null,maxSize:null,typeName:Z.ZodSet,...Q(t)});class no extends X{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==L.function)return A(n,{code:P.invalid_type,expected:L.function,received:n.parsedType}),G;function r(a,l){return ia({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,sa(),mo].filter(c=>!!c),issueData:{code:P.invalid_arguments,argumentsError:l}})}function o(a,l){return ia({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,sa(),mo].filter(c=>!!c),issueData:{code:P.invalid_return_type,returnTypeError:l}})}const s={errorMap:n.common.contextualErrorMap},i=n.data;if(this._def.returns instanceof go){const a=this;return Je(async function(...l){const c=new ht([]),u=await a._def.args.parseAsync(l,s).catch(x=>{throw c.addIssue(r(l,x)),c}),f=await Reflect.apply(i,this,u);return await a._def.returns._def.type.parseAsync(f,s).catch(x=>{throw c.addIssue(o(f,x)),c})})}else{const a=this;return Je(function(...l){const c=a._def.args.safeParse(l,s);if(!c.success)throw new ht([r(l,c.error)]);const u=Reflect.apply(i,this,c.data),f=a._def.returns.safeParse(u,s);if(!f.success)throw new ht([o(u,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new no({...this._def,args:en.create(t).rest(yr.create())})}returns(t){return new no({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new no({args:t||en.create([]).rest(yr.create()),returns:n||yr.create(),typeName:Z.ZodFunction,...Q(r)})}}class Ts extends X{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Ts.create=(e,t)=>new Ts({getter:e,typeName:Z.ZodLazy,...Q(t)});class Rs extends X{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return A(n,{received:n.data,code:P.invalid_literal,expected:this._def.value}),G}return{status:"valid",value:t.data}}get value(){return this._def.value}}Rs.create=(e,t)=>new Rs({value:e,typeName:Z.ZodLiteral,...Q(t)});function Vh(e,t){return new Kn({values:e,typeName:Z.ZodEnum,...Q(t)})}class Kn extends X{constructor(){super(...arguments),Bo.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return A(n,{expected:oe.joinValues(r),received:n.parsedType,code:P.invalid_type}),G}if(aa(this,Bo)||Dh(this,Bo,new Set(this._def.values)),!aa(this,Bo).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return A(n,{received:n.data,code:P.invalid_enum_value,options:r}),G}return Je(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Kn.create(t,{...this._def,...n})}exclude(t,n=this._def){return Kn.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Bo=new WeakMap;Kn.create=Vh;class Ps extends X{constructor(){super(...arguments),Uo.set(this,void 0)}_parse(t){const n=oe.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==L.string&&r.parsedType!==L.number){const o=oe.objectValues(n);return A(r,{expected:oe.joinValues(o),received:r.parsedType,code:P.invalid_type}),G}if(aa(this,Uo)||Dh(this,Uo,new Set(oe.getValidEnumValues(this._def.values))),!aa(this,Uo).has(t.data)){const o=oe.objectValues(n);return A(r,{received:r.data,code:P.invalid_enum_value,options:o}),G}return Je(t.data)}get enum(){return this._def.values}}Uo=new WeakMap;Ps.create=(e,t)=>new Ps({values:e,typeName:Z.ZodNativeEnum,...Q(t)});class go extends X{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==L.promise&&n.common.async===!1)return A(n,{code:P.invalid_type,expected:L.promise,received:n.parsedType}),G;const r=n.parsedType===L.promise?n.data:Promise.resolve(n.data);return Je(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}go.create=(e,t)=>new go({type:e,typeName:Z.ZodPromise,...Q(t)});class zt extends X{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Z.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,s={addIssue:i=>{A(r,i),i.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){const i=o.transform(r.data,s);if(r.common.async)return Promise.resolve(i).then(async a=>{if(n.value==="aborted")return G;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?G:l.status==="dirty"||n.value==="dirty"?Kr(l.value):l});{if(n.value==="aborted")return G;const a=this._def.schema._parseSync({data:i,path:r.path,parent:r});return a.status==="aborted"?G:a.status==="dirty"||n.value==="dirty"?Kr(a.value):a}}if(o.type==="refinement"){const i=a=>{const l=o.refinement(a,s);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?G:(a.status==="dirty"&&n.dirty(),i(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?G:(a.status==="dirty"&&n.dirty(),i(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!ws(i))return i;const a=o.transform(i.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>ws(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:n.value,value:a})):i);oe.assertNever(o)}}zt.create=(e,t,n)=>new zt({schema:e,typeName:Z.ZodEffects,effect:t,...Q(n)});zt.createWithPreprocess=(e,t,n)=>new zt({schema:t,effect:{type:"preprocess",transform:e},typeName:Z.ZodEffects,...Q(n)});class Yt extends X{_parse(t){return this._getType(t)===L.undefined?Je(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Yt.create=(e,t)=>new Yt({innerType:e,typeName:Z.ZodOptional,...Q(t)});class Gn extends X{_parse(t){return this._getType(t)===L.null?Je(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Gn.create=(e,t)=>new Gn({innerType:e,typeName:Z.ZodNullable,...Q(t)});class js extends X{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===L.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}js.create=(e,t)=>new js({innerType:e,typeName:Z.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Q(t)});class Is extends X{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Ss(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new ht(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new ht(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Is.create=(e,t)=>new Is({innerType:e,typeName:Z.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Q(t)});class da extends X{_parse(t){if(this._getType(t)!==L.nan){const r=this._getOrReturnCtx(t);return A(r,{code:P.invalid_type,expected:L.nan,received:r.parsedType}),G}return{status:"valid",value:t.data}}}da.create=e=>new da({typeName:Z.ZodNaN,...Q(e)});const Ex=Symbol("zod_brand");class Ju extends X{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Vs extends X{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?G:s.status==="dirty"?(n.dirty(),Kr(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?G:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new Vs({in:t,out:n,typeName:Z.ZodPipeline})}}class Os extends X{_parse(t){const n=this._def.innerType._parse(t),r=o=>(ws(o)&&(o.value=Object.freeze(o.value)),o);return Ss(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Os.create=(e,t)=>new Os({innerType:e,typeName:Z.ZodReadonly,...Q(t)});function Bh(e,t={},n){return e?ho.create().superRefine((r,o)=>{var s,i;if(!e(r)){const a=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,l=(i=(s=a.fatal)!==null&&s!==void 0?s:n)!==null&&i!==void 0?i:!0,c=typeof a=="string"?{message:a}:a;o.addIssue({code:"custom",...c,fatal:l})}}):ho.create()}const bx={object:Ce.lazycreate};var Z;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Z||(Z={}));const Nx=(e,t={message:`Input not instance of ${e.name}`})=>Bh(n=>n instanceof e,t),Uh=Ot.create,Hh=Zn.create,Tx=da.create,Rx=qn.create,Wh=_s.create,Px=kr.create,jx=la.create,Ix=Cs.create,Ox=ks.create,Mx=ho.create,Ax=yr.create,Lx=yn.create,Dx=ca.create,zx=Lt.create,$x=Ce.create,Fx=Ce.strictCreate,Vx=Es.create,Bx=Da.create,Ux=bs.create,Hx=en.create,Wx=Ns.create,Zx=ua.create,qx=Er.create,Kx=no.create,Gx=Ts.create,Qx=Rs.create,Yx=Kn.create,Xx=Ps.create,Jx=go.create,Hf=zt.create,ew=Yt.create,tw=Gn.create,nw=zt.createWithPreprocess,rw=Vs.create,ow=()=>Uh().optional(),sw=()=>Hh().optional(),iw=()=>Wh().optional(),aw={string:e=>Ot.create({...e,coerce:!0}),number:e=>Zn.create({...e,coerce:!0}),boolean:e=>_s.create({...e,coerce:!0}),bigint:e=>qn.create({...e,coerce:!0}),date:e=>kr.create({...e,coerce:!0})},lw=G;var S=Object.freeze({__proto__:null,defaultErrorMap:mo,setErrorMap:lx,getErrorMap:sa,makeIssue:ia,EMPTY_PATH:cx,addIssueToContext:A,ParseStatus:Ke,INVALID:G,DIRTY:Kr,OK:Je,isAborted:Vc,isDirty:Bc,isValid:ws,isAsync:Ss,get util(){return oe},get objectUtil(){return Fc},ZodParsedType:L,getParsedType:On,ZodType:X,datetimeRegex:Fh,ZodString:Ot,ZodNumber:Zn,ZodBigInt:qn,ZodBoolean:_s,ZodDate:kr,ZodSymbol:la,ZodUndefined:Cs,ZodNull:ks,ZodAny:ho,ZodUnknown:yr,ZodNever:yn,ZodVoid:ca,ZodArray:Lt,ZodObject:Ce,ZodUnion:Es,ZodDiscriminatedUnion:Da,ZodIntersection:bs,ZodTuple:en,ZodRecord:Ns,ZodMap:ua,ZodSet:Er,ZodFunction:no,ZodLazy:Ts,ZodLiteral:Rs,ZodEnum:Kn,ZodNativeEnum:Ps,ZodPromise:go,ZodEffects:zt,ZodTransformer:zt,ZodOptional:Yt,ZodNullable:Gn,ZodDefault:js,ZodCatch:Is,ZodNaN:da,BRAND:Ex,ZodBranded:Ju,ZodPipeline:Vs,ZodReadonly:Os,custom:Bh,Schema:X,ZodSchema:X,late:bx,get ZodFirstPartyTypeKind(){return Z},coerce:aw,any:Mx,array:zx,bigint:Rx,boolean:Wh,date:Px,discriminatedUnion:Bx,effect:Hf,enum:Yx,function:Kx,instanceof:Nx,intersection:Ux,lazy:Gx,literal:Qx,map:Zx,nan:Tx,nativeEnum:Xx,never:Lx,null:Ox,nullable:tw,number:Hh,object:$x,oboolean:iw,onumber:sw,optional:ew,ostring:ow,pipeline:rw,preprocess:nw,promise:Jx,record:Wx,set:qx,strictObject:Fx,string:Uh,symbol:jx,transformer:Hf,tuple:Hx,undefined:Ix,union:Vx,unknown:Ax,void:Dx,NEVER:lw,ZodIssueCode:P,quotelessJson:ax,ZodError:ht});const Zh="2024-11-05",cw=[Zh,"2024-10-07"],za="2.0",qh=S.union([S.string(),S.number().int()]),Kh=S.string(),Vt=S.object({_meta:S.optional(S.object({progressToken:S.optional(qh)}).passthrough())}).passthrough(),wt=S.object({method:S.string(),params:S.optional(Vt)}),Bs=S.object({_meta:S.optional(S.object({}).passthrough())}).passthrough(),Bt=S.object({method:S.string(),params:S.optional(Bs)}),Ut=S.object({_meta:S.optional(S.object({}).passthrough())}).passthrough(),$a=S.union([S.string(),S.number().int()]),uw=S.object({jsonrpc:S.literal(za),id:$a}).merge(wt).strict(),dw=S.object({jsonrpc:S.literal(za)}).merge(Bt).strict(),fw=S.object({jsonrpc:S.literal(za),id:$a,result:Ut}).strict();var Gr;(function(e){e[e.ConnectionClosed=-1]="ConnectionClosed",e[e.RequestTimeout=-2]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError"})(Gr||(Gr={}));const pw=S.object({jsonrpc:S.literal(za),id:$a,error:S.object({code:S.number().int(),message:S.string(),data:S.optional(S.unknown())})}).strict(),mw=S.union([uw,dw,fw,pw]),mr=Ut.strict(),ed=Bt.extend({method:S.literal("notifications/cancelled"),params:Bs.extend({requestId:$a,reason:S.string().optional()})}),Gh=S.object({name:S.string(),version:S.string()}).passthrough(),hw=S.object({experimental:S.optional(S.object({}).passthrough()),sampling:S.optional(S.object({}).passthrough()),roots:S.optional(S.object({listChanged:S.optional(S.boolean())}).passthrough())}).passthrough(),gw=wt.extend({method:S.literal("initialize"),params:Vt.extend({protocolVersion:S.string(),capabilities:hw,clientInfo:Gh})}),vw=S.object({experimental:S.optional(S.object({}).passthrough()),logging:S.optional(S.object({}).passthrough()),prompts:S.optional(S.object({listChanged:S.optional(S.boolean())}).passthrough()),resources:S.optional(S.object({subscribe:S.optional(S.boolean()),listChanged:S.optional(S.boolean())}).passthrough()),tools:S.optional(S.object({listChanged:S.optional(S.boolean())}).passthrough())}).passthrough(),Qh=Ut.extend({protocolVersion:S.string(),capabilities:vw,serverInfo:Gh}),yw=Bt.extend({method:S.literal("notifications/initialized")}),td=wt.extend({method:S.literal("ping")}),xw=S.object({progress:S.number(),total:S.optional(S.number())}).passthrough(),Fa=Bt.extend({method:S.literal("notifications/progress"),params:Bs.merge(xw).extend({progressToken:qh})}),Va=wt.extend({params:Vt.extend({cursor:S.optional(Kh)}).optional()}),Ba=Ut.extend({nextCursor:S.optional(Kh)}),Yh=S.object({uri:S.string(),mimeType:S.optional(S.string())}).passthrough(),Xh=Yh.extend({text:S.string()}),Jh=Yh.extend({blob:S.string().base64()}),ww=S.object({uri:S.string(),name:S.string(),description:S.optional(S.string()),mimeType:S.optional(S.string())}).passthrough(),Sw=S.object({uriTemplate:S.string(),name:S.string(),description:S.optional(S.string()),mimeType:S.optional(S.string())}).passthrough(),_w=Va.extend({method:S.literal("resources/list")}),nd=Ba.extend({resources:S.array(ww)}),Cw=Va.extend({method:S.literal("resources/templates/list")}),rd=Ba.extend({resourceTemplates:S.array(Sw)}),kw=wt.extend({method:S.literal("resources/read"),params:Vt.extend({uri:S.string()})}),od=Ut.extend({contents:S.array(S.union([Xh,Jh]))}),Ew=Bt.extend({method:S.literal("notifications/resources/list_changed")}),bw=wt.extend({method:S.literal("resources/subscribe"),params:Vt.extend({uri:S.string()})}),Nw=wt.extend({method:S.literal("resources/unsubscribe"),params:Vt.extend({uri:S.string()})}),Tw=Bt.extend({method:S.literal("notifications/resources/updated"),params:Bs.extend({uri:S.string()})}),Rw=S.object({name:S.string(),description:S.optional(S.string()),required:S.optional(S.boolean())}).passthrough(),Pw=S.object({name:S.string(),description:S.optional(S.string()),arguments:S.optional(S.array(Rw))}).passthrough(),jw=Va.extend({method:S.literal("prompts/list")}),sd=Ba.extend({prompts:S.array(Pw)}),Iw=wt.extend({method:S.literal("prompts/get"),params:Vt.extend({name:S.string(),arguments:S.optional(S.record(S.string()))})}),Ua=S.object({type:S.literal("text"),text:S.string()}).passthrough(),Ha=S.object({type:S.literal("image"),data:S.string().base64(),mimeType:S.string()}).passthrough(),eg=S.object({type:S.literal("resource"),resource:S.union([Xh,Jh])}).passthrough(),Ow=S.object({role:S.enum(["user","assistant"]),content:S.union([Ua,Ha,eg])}).passthrough(),id=Ut.extend({description:S.optional(S.string()),messages:S.array(Ow)}),Mw=Bt.extend({method:S.literal("notifications/prompts/list_changed")}),Aw=S.object({name:S.string(),description:S.optional(S.string()),inputSchema:S.object({type:S.literal("object"),properties:S.optional(S.object({}).passthrough())}).passthrough()}).passthrough(),Lw=Va.extend({method:S.literal("tools/list")}),ad=Ba.extend({tools:S.array(Aw)}),ld=Ut.extend({content:S.array(S.union([Ua,Ha,eg])),isError:S.boolean().default(!1).optional()}),Dw=ld.or(Ut.extend({toolResult:S.unknown()})),zw=wt.extend({method:S.literal("tools/call"),params:Vt.extend({name:S.string(),arguments:S.optional(S.record(S.unknown()))})}),$w=Bt.extend({method:S.literal("notifications/tools/list_changed")}),tg=S.enum(["debug","info","notice","warning","error","critical","alert","emergency"]),Fw=wt.extend({method:S.literal("logging/setLevel"),params:Vt.extend({level:tg})}),Vw=Bt.extend({method:S.literal("notifications/message"),params:Bs.extend({level:tg,logger:S.optional(S.string()),data:S.unknown()})}),Bw=S.object({name:S.string().optional()}).passthrough(),Uw=S.object({hints:S.optional(S.array(Bw)),costPriority:S.optional(S.number().min(0).max(1)),speedPriority:S.optional(S.number().min(0).max(1)),intelligencePriority:S.optional(S.number().min(0).max(1))}).passthrough(),Hw=S.object({role:S.enum(["user","assistant"]),content:S.union([Ua,Ha])}).passthrough(),ng=wt.extend({method:S.literal("sampling/createMessage"),params:Vt.extend({messages:S.array(Hw),systemPrompt:S.optional(S.string()),includeContext:S.optional(S.enum(["none","thisServer","allServers"])),temperature:S.optional(S.number()),maxTokens:S.number().int(),stopSequences:S.optional(S.array(S.string())),metadata:S.optional(S.object({}).passthrough()),modelPreferences:S.optional(Uw)})}),Ww=Ut.extend({model:S.string(),stopReason:S.optional(S.enum(["endTurn","stopSequence","maxTokens"]).or(S.string())),role:S.enum(["user","assistant"]),content:S.discriminatedUnion("type",[Ua,Ha])}),Zw=S.object({type:S.literal("ref/resource"),uri:S.string()}).passthrough(),qw=S.object({type:S.literal("ref/prompt"),name:S.string()}).passthrough(),Kw=wt.extend({method:S.literal("completion/complete"),params:Vt.extend({ref:S.union([qw,Zw]),argument:S.object({name:S.string(),value:S.string()}).passthrough()})}),rg=Ut.extend({completion:S.object({values:S.array(S.string()).max(100),total:S.optional(S.number().int()),hasMore:S.optional(S.boolean())}).passthrough()}),Gw=S.object({uri:S.string().startsWith("file://"),name:S.optional(S.string())}).passthrough(),og=wt.extend({method:S.literal("roots/list")}),Qw=Ut.extend({roots:S.array(Gw)}),Yw=Bt.extend({method:S.literal("notifications/roots/list_changed")});S.union([td,gw,Kw,Fw,Iw,jw,_w,Cw,kw,bw,Nw,zw,Lw]);const Xw=S.union([ed,Fa,yw,Yw]);S.union([mr,Ww,Qw]);S.union([td,ng,og]);S.union([ed,Fa,Vw,Tw,Ew,$w,Mw]);S.union([mr,Qh,rg,id,sd,nd,rd,od,ld,ad]);class Ol extends Error{constructor(t,n,r){super(`MCP error ${t}: ${n}`),this.code=t,this.data=r}}const Jw=6e4;class eS{constructor(t){this._options=t,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this.setNotificationHandler(ed,n=>{const r=this._requestHandlerAbortControllers.get(n.params.requestId);r==null||r.abort(n.params.reason)}),this.setNotificationHandler(Fa,n=>{this._onprogress(n)}),this.setRequestHandler(td,n=>({}))}async connect(t){this._transport=t,this._transport.onclose=()=>{this._onclose()},this._transport.onerror=n=>{this._onerror(n)},this._transport.onmessage=n=>{"method"in n?"id"in n?this._onrequest(n):this._onnotification(n):this._onresponse(n)},await this._transport.start()}_onclose(){var t;const n=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._transport=void 0,(t=this.onclose)===null||t===void 0||t.call(this);const r=new Ol(Gr.ConnectionClosed,"Connection closed");for(const o of n.values())o(r)}_onerror(t){var n;(n=this.onerror)===null||n===void 0||n.call(this,t)}_onnotification(t){var n;const r=(n=this._notificationHandlers.get(t.method))!==null&&n!==void 0?n:this.fallbackNotificationHandler;r!==void 0&&Promise.resolve().then(()=>r(t)).catch(o=>this._onerror(new Error(`Uncaught error in notification handler: ${o}`)))}_onrequest(t){var n,r;const o=(n=this._requestHandlers.get(t.method))!==null&&n!==void 0?n:this.fallbackRequestHandler;if(o===void 0){(r=this._transport)===null||r===void 0||r.send({jsonrpc:"2.0",id:t.id,error:{code:Gr.MethodNotFound,message:"Method not found"}}).catch(i=>this._onerror(new Error(`Failed to send an error response: ${i}`)));return}const s=new AbortController;this._requestHandlerAbortControllers.set(t.id,s),Promise.resolve().then(()=>o(t,{signal:s.signal})).then(i=>{var a;if(!s.signal.aborted)return(a=this._transport)===null||a===void 0?void 0:a.send({result:i,jsonrpc:"2.0",id:t.id})},i=>{var a,l;if(!s.signal.aborted)return(a=this._transport)===null||a===void 0?void 0:a.send({jsonrpc:"2.0",id:t.id,error:{code:Number.isSafeInteger(i.code)?i.code:Gr.InternalError,message:(l=i.message)!==null&&l!==void 0?l:"Internal error"}})}).catch(i=>this._onerror(new Error(`Failed to send response: ${i}`))).finally(()=>{this._requestHandlerAbortControllers.delete(t.id)})}_onprogress(t){const{progress:n,total:r,progressToken:o}=t.params,s=this._progressHandlers.get(Number(o));if(s===void 0){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(t)}`));return}s({progress:n,total:r})}_onresponse(t){const n=t.id,r=this._responseHandlers.get(Number(n));if(r===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(t)}`));return}if(this._responseHandlers.delete(Number(n)),this._progressHandlers.delete(Number(n)),"result"in t)r(t);else{const o=new Ol(t.error.code,t.error.message,t.error.data);r(o)}}get transport(){return this._transport}async close(){var t;await((t=this._transport)===null||t===void 0?void 0:t.close())}request(t,n,r){return new Promise((o,s)=>{var i,a,l,c;if(!this._transport){s(new Error("Not connected"));return}((i=this._options)===null||i===void 0?void 0:i.enforceStrictCapabilities)===!0&&this.assertCapabilityForMethod(t.method),(a=r==null?void 0:r.signal)===null||a===void 0||a.throwIfAborted();const u=this._requestMessageId++,f={...t,jsonrpc:"2.0",id:u};r!=null&&r.onprogress&&(this._progressHandlers.set(u,r.onprogress),f.params={...t.params,_meta:{progressToken:u}});let g;this._responseHandlers.set(u,m=>{var _;if(g!==void 0&&clearTimeout(g),!(!((_=r==null?void 0:r.signal)===null||_===void 0)&&_.aborted)){if(m instanceof Error)return s(m);try{const v=n.parse(m.result);o(v)}catch(v){s(v)}}});const x=m=>{var _;this._responseHandlers.delete(u),this._progressHandlers.delete(u),(_=this._transport)===null||_===void 0||_.send({jsonrpc:"2.0",method:"cancelled",params:{requestId:u,reason:String(m)}}).catch(v=>this._onerror(new Error(`Failed to send cancellation: ${v}`))),s(m)};(l=r==null?void 0:r.signal)===null||l===void 0||l.addEventListener("abort",()=>{var m;g!==void 0&&clearTimeout(g),x((m=r==null?void 0:r.signal)===null||m===void 0?void 0:m.reason)});const w=(c=r==null?void 0:r.timeout)!==null&&c!==void 0?c:Jw;g=setTimeout(()=>x(new Ol(Gr.RequestTimeout,"Request timed out",{timeout:w})),w),this._transport.send(f).catch(m=>{g!==void 0&&clearTimeout(g),s(m)})})}async notification(t){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(t.method);const n={...t,jsonrpc:"2.0"};await this._transport.send(n)}setRequestHandler(t,n){const r=t.shape.method.value;this.assertRequestHandlerCapability(r),this._requestHandlers.set(r,(o,s)=>Promise.resolve(n(t.parse(o),s)))}removeRequestHandler(t){this._requestHandlers.delete(t)}setNotificationHandler(t,n){this._notificationHandlers.set(t.shape.method.value,r=>Promise.resolve(n(t.parse(r))))}removeNotificationHandler(t){this._notificationHandlers.delete(t)}}class tS extends eS{constructor(t,n){super(n),this._clientInfo=t,this._capabilities=n.capabilities}assertCapability(t,n){var r;if(!(!((r=this._serverCapabilities)===null||r===void 0)&&r[t]))throw new Error(`Server does not support ${t} (required for ${n})`)}async connect(t){await super.connect(t);try{const n=await this.request({method:"initialize",params:{protocolVersion:Zh,capabilities:this._capabilities,clientInfo:this._clientInfo}},Qh);if(n===void 0)throw new Error(`Server sent invalid initialize result: ${n}`);if(!cw.includes(n.protocolVersion))throw new Error(`Server's protocol version is not supported: ${n.protocolVersion}`);this._serverCapabilities=n.capabilities,this._serverVersion=n.serverInfo,await this.notification({method:"notifications/initialized"})}catch(n){throw this.close(),n}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}assertCapabilityForMethod(t){var n,r,o,s,i;switch(t){case"logging/setLevel":if(!(!((n=this._serverCapabilities)===null||n===void 0)&&n.logging))throw new Error(`Server does not support logging (required for ${t})`);break;case"prompts/get":case"prompts/list":if(!(!((r=this._serverCapabilities)===null||r===void 0)&&r.prompts))throw new Error(`Server does not support prompts (required for ${t})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!(!((o=this._serverCapabilities)===null||o===void 0)&&o.resources))throw new Error(`Server does not support resources (required for ${t})`);if(t==="resources/subscribe"&&!this._serverCapabilities.resources.subscribe)throw new Error(`Server does not support resource subscriptions (required for ${t})`);break;case"tools/call":case"tools/list":if(!(!((s=this._serverCapabilities)===null||s===void 0)&&s.tools))throw new Error(`Server does not support tools (required for ${t})`);break;case"completion/complete":if(!(!((i=this._serverCapabilities)===null||i===void 0)&&i.prompts))throw new Error(`Server does not support prompts (required for ${t})`);break}}assertNotificationCapability(t){var n;switch(t){case"notifications/roots/list_changed":if(!(!((n=this._capabilities.roots)===null||n===void 0)&&n.listChanged))throw new Error(`Client does not support roots list changed notifications (required for ${t})`);break}}assertRequestHandlerCapability(t){switch(t){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Error(`Client does not support sampling capability (required for ${t})`);break;case"roots/list":if(!this._capabilities.roots)throw new Error(`Client does not support roots capability (required for ${t})`);break}}async ping(t){return this.request({method:"ping"},mr,t)}async complete(t,n){return this.request({method:"completion/complete",params:t},rg,n)}async setLoggingLevel(t,n){return this.request({method:"logging/setLevel",params:{level:t}},mr,n)}async getPrompt(t,n){return this.request({method:"prompts/get",params:t},id,n)}async listPrompts(t,n){return this.request({method:"prompts/list",params:t},sd,n)}async listResources(t,n){return this.request({method:"resources/list",params:t},nd,n)}async listResourceTemplates(t,n){return this.request({method:"resources/templates/list",params:t},rd,n)}async readResource(t,n){return this.request({method:"resources/read",params:t},od,n)}async subscribeResource(t,n){return this.request({method:"resources/subscribe",params:t},mr,n)}async unsubscribeResource(t,n){return this.request({method:"resources/unsubscribe",params:t},mr,n)}async callTool(t,n=ld,r){return this.request({method:"tools/call",params:t},n,r)}async listTools(t,n){return this.request({method:"tools/list",params:t},ad,n)}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}}class nS{constructor(t){this._url=t}start(){if(this._eventSource)throw new Error("SSEClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((t,n)=>{this._eventSource=new EventSource(this._url.href),this._abortController=new AbortController,this._eventSource.onerror=r=>{var o;const s=new Error(`SSE error: ${JSON.stringify(r)}`);n(s),(o=this.onerror)===null||o===void 0||o.call(this,s)},this._eventSource.onopen=()=>{},this._eventSource.addEventListener("endpoint",r=>{var o;const s=r;try{if(this._endpoint=new URL(s.data,this._url),this._endpoint.origin!==this._url.origin)throw new Error(`Endpoint origin does not match connection origin: ${this._endpoint.origin}`)}catch(i){n(i),(o=this.onerror)===null||o===void 0||o.call(this,i),this.close();return}t()}),this._eventSource.onmessage=r=>{var o,s;const i=r;let a;try{a=mw.parse(JSON.parse(i.data))}catch(l){(o=this.onerror)===null||o===void 0||o.call(this,l);return}(s=this.onmessage)===null||s===void 0||s.call(this,a)}})}async close(){var t,n,r;(t=this._abortController)===null||t===void 0||t.abort(),(n=this._eventSource)===null||n===void 0||n.close(),(r=this.onclose)===null||r===void 0||r.call(this)}async send(t){var n,r;if(!this._endpoint)throw new Error("Not connected");try{const o=await fetch(this._endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),signal:(n=this._abortController)===null||n===void 0?void 0:n.signal});if(!o.ok){const s=await o.text().catch(()=>null);throw new Error(`Error POSTing to endpoint (HTTP ${o.status}): ${s}`)}}catch(o){throw(r=this.onerror)===null||r===void 0||r.call(this,o),o}}}const sg=Bt.extend({method:S.literal("notifications/stderr"),params:S.object({content:S.string()})});Xw.or(sg);function ue(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function ig(e,t=[]){let n=[];function r(s,i){const a=h.createContext(i),l=n.length;n=[...n,i];const c=f=>{var v;const{scope:g,children:x,...w}=f,m=((v=g==null?void 0:g[e])==null?void 0:v[l])||a,_=h.useMemo(()=>w,Object.values(w));return p.jsx(m.Provider,{value:_,children:x})};c.displayName=s+"Provider";function u(f,g){var m;const x=((m=g==null?void 0:g[e])==null?void 0:m[l])||a,w=h.useContext(x);if(w)return w;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[c,u]}const o=()=>{const s=n.map(i=>h.createContext(i));return function(a){const l=(a==null?void 0:a[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,rS(o,...t)]}function rS(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:l,scopeName:c})=>{const f=l(s)[`__scope${c}`];return{...a,...f}},{});return h.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function oS(e,t=[]){let n=[];function r(s,i){const a=h.createContext(i),l=n.length;n=[...n,i];function c(f){const{scope:g,children:x,...w}=f,m=(g==null?void 0:g[e][l])||a,_=h.useMemo(()=>w,Object.values(w));return p.jsx(m.Provider,{value:_,children:x})}function u(f,g){const x=(g==null?void 0:g[e][l])||a,w=h.useContext(x);if(w)return w;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return c.displayName=s+"Provider",[c,u]}const o=()=>{const s=n.map(i=>h.createContext(i));return function(a){const l=(a==null?void 0:a[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,sS(o,...t)]}function sS(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:l,scopeName:c})=>{const f=l(s)[`__scope${c}`];return{...a,...f}},{});return h.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function iS(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function ag(...e){return t=>e.forEach(n=>iS(n,t))}function Me(...e){return h.useCallback(ag(...e),e)}var vo=h.forwardRef((e,t)=>{const{children:n,...r}=e,o=h.Children.toArray(n),s=o.find(lS);if(s){const i=s.props.children,a=o.map(l=>l===s?h.Children.count(i)>1?h.Children.only(null):h.isValidElement(i)?i.props.children:null:l);return p.jsx(Hc,{...r,ref:t,children:h.isValidElement(i)?h.cloneElement(i,void 0,a):null})}return p.jsx(Hc,{...r,ref:t,children:n})});vo.displayName="Slot";var Hc=h.forwardRef((e,t)=>{const{children:n,...r}=e;if(h.isValidElement(n)){const o=uS(n);return h.cloneElement(n,{...cS(r,n.props),ref:t?ag(t,o):o})}return h.Children.count(n)>1?h.Children.only(null):null});Hc.displayName="SlotClone";var aS=({children:e})=>p.jsx(p.Fragment,{children:e});function lS(e){return h.isValidElement(e)&&e.type===aS}function cS(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{s(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function uS(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function lg(e){const t=e+"CollectionProvider",[n,r]=oS(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=x=>{const{scope:w,children:m}=x,_=ne.useRef(null),v=ne.useRef(new Map).current;return p.jsx(o,{scope:w,itemMap:v,collectionRef:_,children:m})};i.displayName=t;const a=e+"CollectionSlot",l=ne.forwardRef((x,w)=>{const{scope:m,children:_}=x,v=s(a,m),d=Me(w,v.collectionRef);return p.jsx(vo,{ref:d,children:_})});l.displayName=a;const c=e+"CollectionItemSlot",u="data-radix-collection-item",f=ne.forwardRef((x,w)=>{const{scope:m,children:_,...v}=x,d=ne.useRef(null),y=Me(w,d),C=s(c,m);return ne.useEffect(()=>(C.itemMap.set(d,{ref:d,...v}),()=>void C.itemMap.delete(d))),p.jsx(vo,{[u]:"",ref:y,children:_})});f.displayName=c;function g(x){const w=s(e+"CollectionConsumer",x);return ne.useCallback(()=>{const _=w.collectionRef.current;if(!_)return[];const v=Array.from(_.querySelectorAll(`[${u}]`));return Array.from(w.itemMap.values()).sort((C,k)=>v.indexOf(C.ref.current)-v.indexOf(k.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:i,Slot:l,ItemSlot:f},g,r]}function dS(e,t=[]){let n=[];function r(s,i){const a=h.createContext(i),l=n.length;n=[...n,i];function c(f){const{scope:g,children:x,...w}=f,m=(g==null?void 0:g[e][l])||a,_=h.useMemo(()=>w,Object.values(w));return p.jsx(m.Provider,{value:_,children:x})}function u(f,g){const x=(g==null?void 0:g[e][l])||a,w=h.useContext(x);if(w)return w;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return c.displayName=s+"Provider",[c,u]}const o=()=>{const s=n.map(i=>h.createContext(i));return function(a){const l=(a==null?void 0:a[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,fS(o,...t)]}function fS(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:l,scopeName:c})=>{const f=l(s)[`__scope${c}`];return{...a,...f}},{});return h.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var et=globalThis!=null&&globalThis.document?h.useLayoutEffect:()=>{},pS=Dy.useId||(()=>{}),mS=0;function Us(e){const[t,n]=h.useState(pS());return et(()=>{e||n(r=>r??String(mS++))},[e]),e||(t?`radix-${t}`:"")}var hS=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],he=hS.reduce((e,t)=>{const n=h.forwardRef((r,o)=>{const{asChild:s,...i}=r,a=s?vo:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(a,{...i,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function gS(e,t){e&&_o.flushSync(()=>e.dispatchEvent(t))}function tn(e){const t=h.useRef(e);return h.useEffect(()=>{t.current=e}),h.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function fa({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=vS({defaultProp:t,onChange:n}),s=e!==void 0,i=s?e:r,a=tn(n),l=h.useCallback(c=>{if(s){const f=typeof c=="function"?c(e):c;f!==e&&a(f)}else o(c)},[s,e,o,a]);return[i,l]}function vS({defaultProp:e,onChange:t}){const n=h.useState(e),[r]=n,o=h.useRef(r),s=tn(t);return h.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}var yS=h.createContext(void 0);function cd(e){const t=h.useContext(yS);return e||t||"ltr"}var Ml="rovingFocusGroup.onEntryFocus",xS={bubbles:!1,cancelable:!0},Wa="RovingFocusGroup",[Wc,cg,wS]=lg(Wa),[SS,ug]=dS(Wa,[wS]),[_S,CS]=SS(Wa),dg=h.forwardRef((e,t)=>p.jsx(Wc.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Wc.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(kS,{...e,ref:t})})}));dg.displayName=Wa;var kS=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...f}=e,g=h.useRef(null),x=Me(t,g),w=cd(s),[m=null,_]=fa({prop:i,defaultProp:a,onChange:l}),[v,d]=h.useState(!1),y=tn(c),C=cg(n),k=h.useRef(!1),[T,b]=h.useState(0);return h.useEffect(()=>{const E=g.current;if(E)return E.addEventListener(Ml,y),()=>E.removeEventListener(Ml,y)},[y]),p.jsx(_S,{scope:n,orientation:r,dir:w,loop:o,currentTabStopId:m,onItemFocus:h.useCallback(E=>_(E),[_]),onItemShiftTab:h.useCallback(()=>d(!0),[]),onFocusableItemAdd:h.useCallback(()=>b(E=>E+1),[]),onFocusableItemRemove:h.useCallback(()=>b(E=>E-1),[]),children:p.jsx(he.div,{tabIndex:v||T===0?-1:0,"data-orientation":r,...f,ref:x,style:{outline:"none",...e.style},onMouseDown:ue(e.onMouseDown,()=>{k.current=!0}),onFocus:ue(e.onFocus,E=>{const I=!k.current;if(E.target===E.currentTarget&&I&&!v){const j=new CustomEvent(Ml,xS);if(E.currentTarget.dispatchEvent(j),!j.defaultPrevented){const V=C().filter(F=>F.focusable),M=V.find(F=>F.active),q=V.find(F=>F.id===m),ee=[M,q,...V].filter(Boolean).map(F=>F.ref.current);mg(ee,u)}}k.current=!1}),onBlur:ue(e.onBlur,()=>d(!1))})})}),fg="RovingFocusGroupItem",pg=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,...i}=e,a=Us(),l=s||a,c=CS(fg,n),u=c.currentTabStopId===l,f=cg(n),{onFocusableItemAdd:g,onFocusableItemRemove:x}=c;return h.useEffect(()=>{if(r)return g(),()=>x()},[r,g,x]),p.jsx(Wc.ItemSlot,{scope:n,id:l,focusable:r,active:o,children:p.jsx(he.span,{tabIndex:u?0:-1,"data-orientation":c.orientation,...i,ref:t,onMouseDown:ue(e.onMouseDown,w=>{r?c.onItemFocus(l):w.preventDefault()}),onFocus:ue(e.onFocus,()=>c.onItemFocus(l)),onKeyDown:ue(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){c.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const m=NS(w,c.orientation,c.dir);if(m!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let v=f().filter(d=>d.focusable).map(d=>d.ref.current);if(m==="last")v.reverse();else if(m==="prev"||m==="next"){m==="prev"&&v.reverse();const d=v.indexOf(w.currentTarget);v=c.loop?TS(v,d+1):v.slice(d+1)}setTimeout(()=>mg(v))}})})})});pg.displayName=fg;var ES={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function bS(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function NS(e,t,n){const r=bS(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return ES[r]}function mg(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function TS(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var RS=dg,PS=pg;function jS(e,t){return h.useReducer((n,r)=>t[n][r]??n,e)}var hg=e=>{const{present:t,children:n}=e,r=IS(t),o=typeof n=="function"?n({present:r.isPresent}):h.Children.only(n),s=Me(r.ref,OS(o));return typeof n=="function"||r.isPresent?h.cloneElement(o,{ref:s}):null};hg.displayName="Presence";function IS(e){const[t,n]=h.useState(),r=h.useRef({}),o=h.useRef(e),s=h.useRef("none"),i=e?"mounted":"unmounted",[a,l]=jS(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.useEffect(()=>{const c=fi(r.current);s.current=a==="mounted"?c:"none"},[a]),et(()=>{const c=r.current,u=o.current;if(u!==e){const g=s.current,x=fi(c);e?l("MOUNT"):x==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&g!==x?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),et(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,f=x=>{const m=fi(r.current).includes(x.animationName);if(x.target===t&&m&&(l("ANIMATION_END"),!o.current)){const _=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=_)})}},g=x=>{x.target===t&&(s.current=fi(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:h.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function fi(e){return(e==null?void 0:e.animationName)||"none"}function OS(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ud="Tabs",[MS,Y2]=ig(ud,[ug]),gg=ug(),[AS,dd]=MS(ud),vg=h.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:s,orientation:i="horizontal",dir:a,activationMode:l="automatic",...c}=e,u=cd(a),[f,g]=fa({prop:r,onChange:o,defaultProp:s});return p.jsx(AS,{scope:n,baseId:Us(),value:f,onValueChange:g,orientation:i,dir:u,activationMode:l,children:p.jsx(he.div,{dir:u,"data-orientation":i,...c,ref:t})})});vg.displayName=ud;var yg="TabsList",xg=h.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,s=dd(yg,n),i=gg(n);return p.jsx(RS,{asChild:!0,...i,orientation:s.orientation,dir:s.dir,loop:r,children:p.jsx(he.div,{role:"tablist","aria-orientation":s.orientation,...o,ref:t})})});xg.displayName=yg;var wg="TabsTrigger",Sg=h.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...s}=e,i=dd(wg,n),a=gg(n),l=kg(i.baseId,r),c=Eg(i.baseId,r),u=r===i.value;return p.jsx(PS,{asChild:!0,...a,focusable:!o,active:u,children:p.jsx(he.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...s,ref:t,onMouseDown:ue(e.onMouseDown,f=>{!o&&f.button===0&&f.ctrlKey===!1?i.onValueChange(r):f.preventDefault()}),onKeyDown:ue(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&i.onValueChange(r)}),onFocus:ue(e.onFocus,()=>{const f=i.activationMode!=="manual";!u&&!o&&f&&i.onValueChange(r)})})})});Sg.displayName=wg;var _g="TabsContent",Cg=h.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:s,...i}=e,a=dd(_g,n),l=kg(a.baseId,r),c=Eg(a.baseId,r),u=r===a.value,f=h.useRef(u);return h.useEffect(()=>{const g=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(g)},[]),p.jsx(hg,{present:o||u,children:({present:g})=>p.jsx(he.div,{"data-state":u?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!g,id:c,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:g&&s})})});Cg.displayName=_g;function kg(e,t){return`${e}-trigger-${t}`}function Eg(e,t){return`${e}-content-${t}`}var LS=vg,bg=xg,Ng=Sg,Tg=Cg;const fd="-",DS=e=>{const t=$S(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(fd);return a[0]===""&&a.length!==1&&a.shift(),Rg(a,t)||zS(i)},getConflictingClassGroupIds:(i,a)=>{const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}}},Rg=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Rg(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(fd);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId},Wf=/^\[(.+)\]$/,zS=e=>{if(Wf.test(e)){const t=Wf.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},$S=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return VS(Object.entries(e.classGroups),n).forEach(([s,i])=>{Zc(i,r,s,t)}),r},Zc=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:Zf(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(FS(o)){Zc(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{Zc(i,Zf(t,s),n,r)})})},Zf=(e,t)=>{let n=e;return t.split(fd).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},FS=e=>e.isThemeGetter,VS=(e,t)=>t?e.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,a])=>[t+i,a])):s);return[n,o]}):e,BS=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,i)=>{n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}},Pg="!",US=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length,i=a=>{const l=[];let c=0,u=0,f;for(let _=0;_<a.length;_++){let v=a[_];if(c===0){if(v===o&&(r||a.slice(_,_+s)===t)){l.push(a.slice(u,_)),u=_+s;continue}if(v==="/"){f=_;continue}}v==="["?c++:v==="]"&&c--}const g=l.length===0?a:a.substring(u),x=g.startsWith(Pg),w=x?g.substring(1):g,m=f&&f>u?f-u:void 0;return{modifiers:l,hasImportantModifier:x,baseClassName:w,maybePostfixModifierPosition:m}};return n?a=>n({className:a,parseClassName:i}):i},HS=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},WS=e=>({cache:BS(e.cacheSize),parseClassName:US(e),...DS(e)}),ZS=/\s+/,qS=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=[],i=e.trim().split(ZS);let a="";for(let l=i.length-1;l>=0;l-=1){const c=i[l],{modifiers:u,hasImportantModifier:f,baseClassName:g,maybePostfixModifierPosition:x}=n(c);let w=!!x,m=r(w?g.substring(0,x):g);if(!m){if(!w){a=c+(a.length>0?" "+a:a);continue}if(m=r(g),!m){a=c+(a.length>0?" "+a:a);continue}w=!1}const _=HS(u).join(":"),v=f?_+Pg:_,d=v+m;if(s.includes(d))continue;s.push(d);const y=o(m,w);for(let C=0;C<y.length;++C){const k=y[C];s.push(v+k)}a=c+(a.length>0?" "+a:a)}return a};function KS(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=jg(t))&&(r&&(r+=" "),r+=n);return r}const jg=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=jg(e[r]))&&(n&&(n+=" "),n+=t);return n};function GS(e,...t){let n,r,o,s=i;function i(l){const c=t.reduce((u,f)=>f(u),e());return n=WS(c),r=n.cache.get,o=n.cache.set,s=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=qS(l,n);return o(l,u),u}return function(){return s(KS.apply(null,arguments))}}const ye=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Ig=/^\[(?:([a-z-]+):)?(.+)\]$/i,QS=/^\d+\/\d+$/,YS=new Set(["px","full","screen"]),XS=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,JS=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,e_=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,t_=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,n_=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,sn=e=>ro(e)||YS.has(e)||QS.test(e),bn=e=>Co(e,"length",u_),ro=e=>!!e&&!Number.isNaN(Number(e)),Al=e=>Co(e,"number",ro),Lo=e=>!!e&&Number.isInteger(Number(e)),r_=e=>e.endsWith("%")&&ro(e.slice(0,-1)),Y=e=>Ig.test(e),Nn=e=>XS.test(e),o_=new Set(["length","size","percentage"]),s_=e=>Co(e,o_,Og),i_=e=>Co(e,"position",Og),a_=new Set(["image","url"]),l_=e=>Co(e,a_,f_),c_=e=>Co(e,"",d_),Do=()=>!0,Co=(e,t,n)=>{const r=Ig.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},u_=e=>JS.test(e)&&!e_.test(e),Og=()=>!1,d_=e=>t_.test(e),f_=e=>n_.test(e),p_=()=>{const e=ye("colors"),t=ye("spacing"),n=ye("blur"),r=ye("brightness"),o=ye("borderColor"),s=ye("borderRadius"),i=ye("borderSpacing"),a=ye("borderWidth"),l=ye("contrast"),c=ye("grayscale"),u=ye("hueRotate"),f=ye("invert"),g=ye("gap"),x=ye("gradientColorStops"),w=ye("gradientColorStopPositions"),m=ye("inset"),_=ye("margin"),v=ye("opacity"),d=ye("padding"),y=ye("saturate"),C=ye("scale"),k=ye("sepia"),T=ye("skew"),b=ye("space"),E=ye("translate"),I=()=>["auto","contain","none"],j=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto",Y,t],M=()=>[Y,t],q=()=>["",sn,bn],W=()=>["auto",ro,Y],ee=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],N=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",Y],z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],H=()=>[ro,Y];return{cacheSize:500,separator:":",theme:{colors:[Do],spacing:[sn,bn],blur:["none","",Nn,Y],brightness:H(),borderColor:[e],borderRadius:["none","","full",Nn,Y],borderSpacing:M(),borderWidth:q(),contrast:H(),grayscale:O(),hueRotate:H(),invert:O(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[r_,bn],inset:V(),margin:V(),opacity:H(),padding:M(),saturate:H(),scale:H(),sepia:O(),skew:H(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",Y]}],container:["container"],columns:[{columns:[Nn]}],"break-after":[{"break-after":z()}],"break-before":[{"break-before":z()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ee(),Y]}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Lo,Y]}],basis:[{basis:V()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Y]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",Lo,Y]}],"grid-cols":[{"grid-cols":[Do]}],"col-start-end":[{col:["auto",{span:["full",Lo,Y]},Y]}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":[Do]}],"row-start-end":[{row:["auto",{span:[Lo,Y]},Y]}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Y]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Y]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...N()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...N(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...N(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[d]}],px:[{px:[d]}],py:[{py:[d]}],ps:[{ps:[d]}],pe:[{pe:[d]}],pt:[{pt:[d]}],pr:[{pr:[d]}],pb:[{pb:[d]}],pl:[{pl:[d]}],m:[{m:[_]}],mx:[{mx:[_]}],my:[{my:[_]}],ms:[{ms:[_]}],me:[{me:[_]}],mt:[{mt:[_]}],mr:[{mr:[_]}],mb:[{mb:[_]}],ml:[{ml:[_]}],"space-x":[{"space-x":[b]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[b]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Y,t]}],"min-w":[{"min-w":[Y,t,"min","max","fit"]}],"max-w":[{"max-w":[Y,t,"none","full","min","max","fit","prose",{screen:[Nn]},Nn]}],h:[{h:[Y,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Y,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Y,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Y,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Nn,bn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Al]}],"font-family":[{font:[Do]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Y]}],"line-clamp":[{"line-clamp":["none",ro,Al]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",sn,Y]}],"list-image":[{"list-image":["none",Y]}],"list-style-type":[{list:["none","disc","decimal",Y]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",sn,bn]}],"underline-offset":[{"underline-offset":["auto",sn,Y]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Y]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Y]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ee(),i_]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",s_]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},l_]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[x]}],"gradient-via":[{via:[x]}],"gradient-to":[{to:[x]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...F(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:F()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...F()]}],"outline-offset":[{"outline-offset":[sn,Y]}],"outline-w":[{outline:[sn,bn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[sn,bn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Nn,c_]}],"shadow-color":[{shadow:[Do]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...K(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":K()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Nn,Y]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[f]}],saturate:[{saturate:[y]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Y]}],duration:[{duration:H()}],ease:[{ease:["linear","in","out","in-out",Y]}],delay:[{delay:H()}],animate:[{animate:["none","spin","ping","pulse","bounce",Y]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[Lo,Y]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Y]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Y]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Y]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[sn,bn,Al]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},m_=GS(p_);function ze(...e){return m_(fn(e))}const h_=LS,Mg=h.forwardRef(({className:e,...t},n)=>p.jsx(bg,{ref:n,className:ze("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));Mg.displayName=bg.displayName;const ur=h.forwardRef(({className:e,...t},n)=>p.jsx(Ng,{ref:n,className:ze("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-muted data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));ur.displayName=Ng.displayName;const nr=h.forwardRef(({className:e,...t},n)=>p.jsx(Tg,{ref:n,className:ze("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));nr.displayName=Tg.displayName;/**
41
41
  * @license lucide-react v0.447.0 - ISC
42
42
  *
43
43
  * This source code is licensed under the ISC license.
@@ -187,4 +187,4 @@ Error generating stack: `+s.message+`
187
187
  `)},pp=function(){var e=parseInt(document.body.getAttribute(so)||"0",10);return isFinite(e)?e:0},t2=function(){h.useEffect(function(){return document.body.setAttribute(so,(pp()+1).toString()),function(){var e=pp()-1;e<=0?document.body.removeAttribute(so):document.body.setAttribute(so,e.toString())}},[])},n2=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;t2();var s=h.useMemo(function(){return Xk(o)},[o]);return h.createElement(Jk,{styles:e2(s,!t,o,n?"":"!important")})},Xc=!1;if(typeof window<"u")try{var gi=Object.defineProperty({},"passive",{get:function(){return Xc=!0,!0}});window.addEventListener("test",gi,gi),window.removeEventListener("test",gi,gi)}catch{Xc=!1}var Or=Xc?{passive:!1}:!1,r2=function(e){return e.tagName==="TEXTAREA"},vv=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!r2(e)&&n[t]==="visible")},o2=function(e){return vv(e,"overflowY")},s2=function(e){return vv(e,"overflowX")},mp=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=yv(e,r);if(o){var s=xv(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},i2=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},a2=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},yv=function(e,t){return e==="v"?o2(t):s2(t)},xv=function(e,t){return e==="v"?i2(t):a2(t)},l2=function(e,t){return e==="h"&&t==="rtl"?-1:1},c2=function(e,t,n,r,o){var s=l2(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,l=t.contains(a),c=!1,u=i>0,f=0,g=0;do{var x=xv(e,a),w=x[0],m=x[1],_=x[2],v=m-_-s*w;(w||v)&&yv(e,a)&&(f+=v,g+=w),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(u&&(Math.abs(f)<1||!o)||!u&&(Math.abs(g)<1||!o))&&(c=!0),c},vi=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},hp=function(e){return[e.deltaX,e.deltaY]},gp=function(e){return e&&"current"in e?e.current:e},u2=function(e,t){return e[0]===t[0]&&e[1]===t[1]},d2=function(e){return`
188
188
  .block-interactivity-`.concat(e,` {pointer-events: none;}
189
189
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
190
- `)},f2=0,Mr=[];function p2(e){var t=h.useRef([]),n=h.useRef([0,0]),r=h.useRef(),o=h.useState(f2++)[0],s=h.useState(gv)[0],i=h.useRef(e);h.useEffect(function(){i.current=e},[e]),h.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=Mk([e.lockRef.current],(e.shards||[]).map(gp),!0).filter(Boolean);return m.forEach(function(_){return _.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=h.useCallback(function(m,_){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!i.current.allowPinchZoom;var v=vi(m),d=n.current,y="deltaX"in m?m.deltaX:d[0]-v[0],C="deltaY"in m?m.deltaY:d[1]-v[1],k,T=m.target,b=Math.abs(y)>Math.abs(C)?"h":"v";if("touches"in m&&b==="h"&&T.type==="range")return!1;var E=mp(b,T);if(!E)return!0;if(E?k=b:(k=b==="v"?"h":"v",E=mp(b,T)),!E)return!1;if(!r.current&&"changedTouches"in m&&(y||C)&&(r.current=k),!k)return!0;var I=r.current||k;return c2(I,_,m,I==="h"?y:C,!0)},[]),l=h.useCallback(function(m){var _=m;if(!(!Mr.length||Mr[Mr.length-1]!==s)){var v="deltaY"in _?hp(_):vi(_),d=t.current.filter(function(k){return k.name===_.type&&(k.target===_.target||_.target===k.shadowParent)&&u2(k.delta,v)})[0];if(d&&d.should){_.cancelable&&_.preventDefault();return}if(!d){var y=(i.current.shards||[]).map(gp).filter(Boolean).filter(function(k){return k.contains(_.target)}),C=y.length>0?a(_,y[0]):!i.current.noIsolation;C&&_.cancelable&&_.preventDefault()}}},[]),c=h.useCallback(function(m,_,v,d){var y={name:m,delta:_,target:v,should:d,shadowParent:m2(v)};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(C){return C!==y})},1)},[]),u=h.useCallback(function(m){n.current=vi(m),r.current=void 0},[]),f=h.useCallback(function(m){c(m.type,hp(m),m.target,a(m,e.lockRef.current))},[]),g=h.useCallback(function(m){c(m.type,vi(m),m.target,a(m,e.lockRef.current))},[]);h.useEffect(function(){return Mr.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:g}),document.addEventListener("wheel",l,Or),document.addEventListener("touchmove",l,Or),document.addEventListener("touchstart",u,Or),function(){Mr=Mr.filter(function(m){return m!==s}),document.removeEventListener("wheel",l,Or),document.removeEventListener("touchmove",l,Or),document.removeEventListener("touchstart",u,Or)}},[]);var x=e.removeScrollBar,w=e.inert;return h.createElement(h.Fragment,null,w?h.createElement(s,{styles:d2(o)}):null,x?h.createElement(n2,{gapMode:e.gapMode}):null)}function m2(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const h2=Uk(hv,p2);var wv=h.forwardRef(function(e,t){return h.createElement(Ya,Kt({},e,{ref:t,sideCar:h2}))});wv.classNames=Ya.classNames;var g2=[" ","Enter","ArrowUp","ArrowDown"],v2=[" ","Enter"],Ws="Select",[Xa,Ja,y2]=lg(Ws),[bo,X2]=ig(Ws,[y2,tv]),el=tv(),[x2,rr]=bo(Ws),[w2,S2]=bo(Ws),Sv=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:a,onValueChange:l,dir:c,name:u,autoComplete:f,disabled:g,required:x,form:w}=e,m=el(t),[_,v]=h.useState(null),[d,y]=h.useState(null),[C,k]=h.useState(!1),T=cd(c),[b=!1,E]=fa({prop:r,defaultProp:o,onChange:s}),[I,j]=fa({prop:i,defaultProp:a,onChange:l}),V=h.useRef(null),M=_?w||!!_.closest("form"):!0,[q,W]=h.useState(new Set),ee=Array.from(q).map(F=>F.props.value).join(";");return p.jsx(Ck,{...m,children:p.jsxs(x2,{required:x,scope:t,trigger:_,onTriggerChange:v,valueNode:d,onValueNodeChange:y,valueNodeHasChildren:C,onValueNodeHasChildrenChange:k,contentId:Us(),value:I,onValueChange:j,open:b,onOpenChange:E,dir:T,triggerPointerDownPosRef:V,disabled:g,children:[p.jsx(Xa.Provider,{scope:t,children:p.jsx(w2,{scope:e.__scopeSelect,onNativeOptionAdd:h.useCallback(F=>{W(K=>new Set(K).add(F))},[]),onNativeOptionRemove:h.useCallback(F=>{W(K=>{const N=new Set(K);return N.delete(F),N})},[]),children:n})}),M?p.jsxs(Zv,{"aria-hidden":!0,required:x,tabIndex:-1,name:u,autoComplete:f,value:I,onChange:F=>j(F.target.value),disabled:g,form:w,children:[I===void 0?p.jsx("option",{value:""}):null,Array.from(q)]},ee):null]})})};Sv.displayName=Ws;var _v="SelectTrigger",Cv=h.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=el(n),i=rr(_v,n),a=i.disabled||r,l=Me(t,i.onTriggerChange),c=Ja(n),u=h.useRef("touch"),[f,g,x]=qv(m=>{const _=c().filter(y=>!y.disabled),v=_.find(y=>y.value===i.value),d=Kv(_,m,v);d!==void 0&&i.onValueChange(d.value)}),w=m=>{a||(i.onOpenChange(!0),x()),m&&(i.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return p.jsx(kk,{asChild:!0,...s,children:p.jsx(he.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":Wv(i.value)?"":void 0,...o,ref:l,onClick:ue(o.onClick,m=>{m.currentTarget.focus(),u.current!=="mouse"&&w(m)}),onPointerDown:ue(o.onPointerDown,m=>{u.current=m.pointerType;const _=m.target;_.hasPointerCapture(m.pointerId)&&_.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(w(m),m.preventDefault())}),onKeyDown:ue(o.onKeyDown,m=>{const _=f.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&g(m.key),!(_&&m.key===" ")&&g2.includes(m.key)&&(w(),m.preventDefault())})})})});Cv.displayName=_v;var kv="SelectValue",Ev=h.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...a}=e,l=rr(kv,n),{onValueNodeHasChildrenChange:c}=l,u=s!==void 0,f=Me(t,l.onValueNodeChange);return et(()=>{c(u)},[c,u]),p.jsx(he.span,{...a,ref:f,style:{pointerEvents:"none"},children:Wv(l.value)?p.jsx(p.Fragment,{children:i}):s})});Ev.displayName=kv;var _2="SelectIcon",bv=h.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return p.jsx(he.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});bv.displayName=_2;var C2="SelectPortal",Nv=e=>p.jsx(uv,{asChild:!0,...e});Nv.displayName=C2;var Nr="SelectContent",Tv=h.forwardRef((e,t)=>{const n=rr(Nr,e.__scopeSelect),[r,o]=h.useState();if(et(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?_o.createPortal(p.jsx(Rv,{scope:e.__scopeSelect,children:p.jsx(Xa.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),s):null}return p.jsx(Pv,{...e,ref:t})});Tv.displayName=Nr;var Rt=10,[Rv,or]=bo(Nr),k2="SelectContentImpl",Pv=h.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:f,collisionBoundary:g,collisionPadding:x,sticky:w,hideWhenDetached:m,avoidCollisions:_,...v}=e,d=rr(Nr,n),[y,C]=h.useState(null),[k,T]=h.useState(null),b=Me(t,B=>C(B)),[E,I]=h.useState(null),[j,V]=h.useState(null),M=Ja(n),[q,W]=h.useState(!1),ee=h.useRef(!1);h.useEffect(()=>{if(y)return Ok(y)},[y]),aC();const F=h.useCallback(B=>{const[ce,...Ae]=M().map(le=>le.ref.current),[fe]=Ae.slice(-1),ae=document.activeElement;for(const le of B)if(le===ae||(le==null||le.scrollIntoView({block:"nearest"}),le===ce&&k&&(k.scrollTop=0),le===fe&&k&&(k.scrollTop=k.scrollHeight),le==null||le.focus(),document.activeElement!==ae))return},[M,k]),K=h.useCallback(()=>F([E,y]),[F,E,y]);h.useEffect(()=>{q&&K()},[q,K]);const{onOpenChange:N,triggerPointerDownPosRef:O}=d;h.useEffect(()=>{if(y){let B={x:0,y:0};const ce=fe=>{var ae,le;B={x:Math.abs(Math.round(fe.pageX)-(((ae=O.current)==null?void 0:ae.x)??0)),y:Math.abs(Math.round(fe.pageY)-(((le=O.current)==null?void 0:le.y)??0))}},Ae=fe=>{B.x<=10&&B.y<=10?fe.preventDefault():y.contains(fe.target)||N(!1),document.removeEventListener("pointermove",ce),O.current=null};return O.current!==null&&(document.addEventListener("pointermove",ce),document.addEventListener("pointerup",Ae,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ce),document.removeEventListener("pointerup",Ae,{capture:!0})}}},[y,N,O]),h.useEffect(()=>{const B=()=>N(!1);return window.addEventListener("blur",B),window.addEventListener("resize",B),()=>{window.removeEventListener("blur",B),window.removeEventListener("resize",B)}},[N]);const[z,H]=qv(B=>{const ce=M().filter(ae=>!ae.disabled),Ae=ce.find(ae=>ae.ref.current===document.activeElement),fe=Kv(ce,B,Ae);fe&&setTimeout(()=>fe.ref.current.focus())}),J=h.useCallback((B,ce,Ae)=>{const fe=!ee.current&&!Ae;(d.value!==void 0&&d.value===ce||fe)&&(I(B),fe&&(ee.current=!0))},[d.value]),pe=h.useCallback(()=>y==null?void 0:y.focus(),[y]),ie=h.useCallback((B,ce,Ae)=>{const fe=!ee.current&&!Ae;(d.value!==void 0&&d.value===ce||fe)&&V(B)},[d.value]),Se=r==="popper"?Jc:jv,ve=Se===Jc?{side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:f,collisionBoundary:g,collisionPadding:x,sticky:w,hideWhenDetached:m,avoidCollisions:_}:{};return p.jsx(Rv,{scope:n,content:y,viewport:k,onViewportChange:T,itemRefCallback:J,selectedItem:E,onItemLeave:pe,itemTextRefCallback:ie,focusSelectedItem:K,selectedItemText:j,position:r,isPositioned:q,searchRef:z,children:p.jsx(wv,{as:vo,allowPinchZoom:!0,children:p.jsx(Bg,{asChild:!0,trapped:d.open,onMountAutoFocus:B=>{B.preventDefault()},onUnmountAutoFocus:ue(o,B=>{var ce;(ce=d.trigger)==null||ce.focus({preventScroll:!0}),B.preventDefault()}),children:p.jsx(Fg,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:B=>B.preventDefault(),onDismiss:()=>d.onOpenChange(!1),children:p.jsx(Se,{role:"listbox",id:d.contentId,"data-state":d.open?"open":"closed",dir:d.dir,onContextMenu:B=>B.preventDefault(),...v,...ve,onPlaced:()=>W(!0),ref:b,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:ue(v.onKeyDown,B=>{const ce=B.ctrlKey||B.altKey||B.metaKey;if(B.key==="Tab"&&B.preventDefault(),!ce&&B.key.length===1&&H(B.key),["ArrowUp","ArrowDown","Home","End"].includes(B.key)){let fe=M().filter(ae=>!ae.disabled).map(ae=>ae.ref.current);if(["ArrowUp","End"].includes(B.key)&&(fe=fe.slice().reverse()),["ArrowUp","ArrowDown"].includes(B.key)){const ae=B.target,le=fe.indexOf(ae);fe=fe.slice(le+1)}setTimeout(()=>F(fe)),B.preventDefault()}})})})})})})});Pv.displayName=k2;var E2="SelectItemAlignedPosition",jv=h.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=rr(Nr,n),i=or(Nr,n),[a,l]=h.useState(null),[c,u]=h.useState(null),f=Me(t,b=>u(b)),g=Ja(n),x=h.useRef(!1),w=h.useRef(!0),{viewport:m,selectedItem:_,selectedItemText:v,focusSelectedItem:d}=i,y=h.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&c&&m&&_&&v){const b=s.trigger.getBoundingClientRect(),E=c.getBoundingClientRect(),I=s.valueNode.getBoundingClientRect(),j=v.getBoundingClientRect();if(s.dir!=="rtl"){const ae=j.left-E.left,le=I.left-ae,Ge=b.left-le,rt=b.width+Ge,sr=Math.max(rt,E.width),on=window.innerWidth-Rt,ir=Qf(le,[Rt,Math.max(Rt,on-sr)]);a.style.minWidth=rt+"px",a.style.left=ir+"px"}else{const ae=E.right-j.right,le=window.innerWidth-I.right-ae,Ge=window.innerWidth-b.right-le,rt=b.width+Ge,sr=Math.max(rt,E.width),on=window.innerWidth-Rt,ir=Qf(le,[Rt,Math.max(Rt,on-sr)]);a.style.minWidth=rt+"px",a.style.right=ir+"px"}const V=g(),M=window.innerHeight-Rt*2,q=m.scrollHeight,W=window.getComputedStyle(c),ee=parseInt(W.borderTopWidth,10),F=parseInt(W.paddingTop,10),K=parseInt(W.borderBottomWidth,10),N=parseInt(W.paddingBottom,10),O=ee+F+q+N+K,z=Math.min(_.offsetHeight*5,O),H=window.getComputedStyle(m),J=parseInt(H.paddingTop,10),pe=parseInt(H.paddingBottom,10),ie=b.top+b.height/2-Rt,Se=M-ie,ve=_.offsetHeight/2,B=_.offsetTop+ve,ce=ee+F+B,Ae=O-ce;if(ce<=ie){const ae=V.length>0&&_===V[V.length-1].ref.current;a.style.bottom="0px";const le=c.clientHeight-m.offsetTop-m.offsetHeight,Ge=Math.max(Se,ve+(ae?pe:0)+le+K),rt=ce+Ge;a.style.height=rt+"px"}else{const ae=V.length>0&&_===V[0].ref.current;a.style.top="0px";const Ge=Math.max(ie,ee+m.offsetTop+(ae?J:0)+ve)+Ae;a.style.height=Ge+"px",m.scrollTop=ce-ie+m.offsetTop}a.style.margin=`${Rt}px 0`,a.style.minHeight=z+"px",a.style.maxHeight=M+"px",r==null||r(),requestAnimationFrame(()=>x.current=!0)}},[g,s.trigger,s.valueNode,a,c,m,_,v,s.dir,r]);et(()=>y(),[y]);const[C,k]=h.useState();et(()=>{c&&k(window.getComputedStyle(c).zIndex)},[c]);const T=h.useCallback(b=>{b&&w.current===!0&&(y(),d==null||d(),w.current=!1)},[y,d]);return p.jsx(N2,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:x,onScrollButtonChange:T,children:p.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:p.jsx(he.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});jv.displayName=E2;var b2="SelectPopperPosition",Jc=h.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Rt,...s}=e,i=el(n);return p.jsx(Ek,{...i,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Jc.displayName=b2;var[N2,bd]=bo(Nr,{}),eu="SelectViewport",Iv=h.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=or(eu,n),i=bd(eu,n),a=Me(t,s.onViewportChange),l=h.useRef(0);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),p.jsx(Xa.Slot,{scope:n,children:p.jsx(he.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:ue(o.onScroll,c=>{const u=c.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:g}=i;if(g!=null&&g.current&&f){const x=Math.abs(l.current-u.scrollTop);if(x>0){const w=window.innerHeight-Rt*2,m=parseFloat(f.style.minHeight),_=parseFloat(f.style.height),v=Math.max(m,_);if(v<w){const d=v+x,y=Math.min(w,d),C=d-y;f.style.height=y+"px",f.style.bottom==="0px"&&(u.scrollTop=C>0?C:0,f.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});Iv.displayName=eu;var Ov="SelectGroup",[T2,R2]=bo(Ov),P2=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Us();return p.jsx(T2,{scope:n,id:o,children:p.jsx(he.div,{role:"group","aria-labelledby":o,...r,ref:t})})});P2.displayName=Ov;var Mv="SelectLabel",Av=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=R2(Mv,n);return p.jsx(he.div,{id:o.id,...r,ref:t})});Av.displayName=Mv;var ya="SelectItem",[j2,Lv]=bo(ya),Dv=h.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,a=rr(ya,n),l=or(ya,n),c=a.value===r,[u,f]=h.useState(s??""),[g,x]=h.useState(!1),w=Me(t,d=>{var y;return(y=l.itemRefCallback)==null?void 0:y.call(l,d,r,o)}),m=Us(),_=h.useRef("touch"),v=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return p.jsx(j2,{scope:n,value:r,disabled:o,textId:m,isSelected:c,onItemTextChange:h.useCallback(d=>{f(y=>y||((d==null?void 0:d.textContent)??"").trim())},[]),children:p.jsx(Xa.ItemSlot,{scope:n,value:r,disabled:o,textValue:u,children:p.jsx(he.div,{role:"option","aria-labelledby":m,"data-highlighted":g?"":void 0,"aria-selected":c&&g,"data-state":c?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:w,onFocus:ue(i.onFocus,()=>x(!0)),onBlur:ue(i.onBlur,()=>x(!1)),onClick:ue(i.onClick,()=>{_.current!=="mouse"&&v()}),onPointerUp:ue(i.onPointerUp,()=>{_.current==="mouse"&&v()}),onPointerDown:ue(i.onPointerDown,d=>{_.current=d.pointerType}),onPointerMove:ue(i.onPointerMove,d=>{var y;_.current=d.pointerType,o?(y=l.onItemLeave)==null||y.call(l):_.current==="mouse"&&d.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ue(i.onPointerLeave,d=>{var y;d.currentTarget===document.activeElement&&((y=l.onItemLeave)==null||y.call(l))}),onKeyDown:ue(i.onKeyDown,d=>{var C;((C=l.searchRef)==null?void 0:C.current)!==""&&d.key===" "||(v2.includes(d.key)&&v(),d.key===" "&&d.preventDefault())})})})})});Dv.displayName=ya;var Ho="SelectItemText",zv=h.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=rr(Ho,n),a=or(Ho,n),l=Lv(Ho,n),c=S2(Ho,n),[u,f]=h.useState(null),g=Me(t,v=>f(v),l.onItemTextChange,v=>{var d;return(d=a.itemTextRefCallback)==null?void 0:d.call(a,v,l.value,l.disabled)}),x=u==null?void 0:u.textContent,w=h.useMemo(()=>p.jsx("option",{value:l.value,disabled:l.disabled,children:x},l.value),[l.disabled,l.value,x]),{onNativeOptionAdd:m,onNativeOptionRemove:_}=c;return et(()=>(m(w),()=>_(w)),[m,_,w]),p.jsxs(p.Fragment,{children:[p.jsx(he.span,{id:l.textId,...s,ref:g}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?_o.createPortal(s.children,i.valueNode):null]})});zv.displayName=Ho;var $v="SelectItemIndicator",Fv=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Lv($v,n).isSelected?p.jsx(he.span,{"aria-hidden":!0,...r,ref:t}):null});Fv.displayName=$v;var tu="SelectScrollUpButton",Vv=h.forwardRef((e,t)=>{const n=or(tu,e.__scopeSelect),r=bd(tu,e.__scopeSelect),[o,s]=h.useState(!1),i=Me(t,r.onScrollButtonChange);return et(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollTop>0;s(c)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?p.jsx(Uv,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});Vv.displayName=tu;var nu="SelectScrollDownButton",Bv=h.forwardRef((e,t)=>{const n=or(nu,e.__scopeSelect),r=bd(nu,e.__scopeSelect),[o,s]=h.useState(!1),i=Me(t,r.onScrollButtonChange);return et(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollHeight-l.clientHeight,u=Math.ceil(l.scrollTop)<c;s(u)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?p.jsx(Uv,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});Bv.displayName=nu;var Uv=h.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=or("SelectScrollButton",n),i=h.useRef(null),a=Ja(n),l=h.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return h.useEffect(()=>()=>l(),[l]),et(()=>{var u;const c=a().find(f=>f.ref.current===document.activeElement);(u=c==null?void 0:c.ref.current)==null||u.scrollIntoView({block:"nearest"})},[a]),p.jsx(he.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:ue(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:ue(o.onPointerMove,()=>{var c;(c=s.onItemLeave)==null||c.call(s),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:ue(o.onPointerLeave,()=>{l()})})}),I2="SelectSeparator",Hv=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return p.jsx(he.div,{"aria-hidden":!0,...r,ref:t})});Hv.displayName=I2;var ru="SelectArrow",O2=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=el(n),s=rr(ru,n),i=or(ru,n);return s.open&&i.position==="popper"?p.jsx(bk,{...o,...r,ref:t}):null});O2.displayName=ru;function Wv(e){return e===""||e===void 0}var Zv=h.forwardRef((e,t)=>{const{value:n,...r}=e,o=h.useRef(null),s=Me(t,o),i=Tk(n);return h.useEffect(()=>{const a=o.current,l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==n&&u){const f=new Event("change",{bubbles:!0});u.call(a,n),a.dispatchEvent(f)}},[i,n]),p.jsx(dv,{asChild:!0,children:p.jsx("select",{...r,ref:s,defaultValue:n})})});Zv.displayName="BubbleSelect";function qv(e){const t=tn(e),n=h.useRef(""),r=h.useRef(0),o=h.useCallback(i=>{const a=n.current+i;t(a),function l(c){n.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),s=h.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return h.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function Kv(e,t,n){const o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=M2(e,Math.max(s,0));o.length===1&&(i=i.filter(c=>c!==n));const l=i.find(c=>c.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function M2(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var A2=Sv,Gv=Cv,L2=Ev,D2=bv,z2=Nv,Qv=Tv,$2=Iv,Yv=Av,Xv=Dv,F2=zv,V2=Fv,Jv=Vv,ey=Bv,ty=Hv;const B2=A2,U2=L2,ny=h.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(Gv,{ref:r,className:ze("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,p.jsx(D2,{asChild:!0,children:p.jsx(Z_,{className:"h-4 w-4 opacity-50"})})]}));ny.displayName=Gv.displayName;const ry=h.forwardRef(({className:e,...t},n)=>p.jsx(Jv,{ref:n,className:ze("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(X_,{})}));ry.displayName=Jv.displayName;const oy=h.forwardRef(({className:e,...t},n)=>p.jsx(ey,{ref:n,className:ze("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(Q_,{})}));oy.displayName=ey.displayName;const sy=h.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>p.jsx(z2,{children:p.jsxs(Qv,{ref:o,className:ze("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[p.jsx(ry,{}),p.jsx($2,{className:ze("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),p.jsx(oy,{})]})}));sy.displayName=Qv.displayName;const H2=h.forwardRef(({className:e,...t},n)=>p.jsx(Yv,{ref:n,className:ze("px-2 py-1.5 text-sm font-semibold",e),...t}));H2.displayName=Yv.displayName;const ou=h.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(Xv,{ref:r,className:ze("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[p.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(V2,{children:p.jsx(K_,{className:"h-4 w-4"})})}),p.jsx(F2,{children:t})]}));ou.displayName=Xv.displayName;const W2=h.forwardRef(({className:e,...t},n)=>p.jsx(ty,{ref:n,className:ze("-mx-1 my-1 h-px bg-muted",e),...t}));W2.displayName=ty.displayName;const Z2=({connectionStatus:e,transportType:t,setTransportType:n,command:r,setCommand:o,args:s,setArgs:i,url:a,setUrl:l,env:c,setEnv:u,onConnect:f,stdErrNotifications:g})=>{const[x,w]=h.useState(!1);return p.jsxs("div",{className:"w-80 bg-card border-r border-border flex flex-col h-full",children:[p.jsxs("div",{className:"flex items-center p-4 border-b border-gray-200",children:[p.jsx(I_,{className:"w-6 h-6 text-gray-500"}),p.jsx("h1",{className:"ml-2 text-lg font-semibold",children:"MCP Inspector"})]}),p.jsx("div",{className:"p-4 flex-1 overflow-auto",children:p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx("label",{className:"text-sm font-medium",children:"Transport Type"}),p.jsxs(B2,{value:t,onValueChange:m=>n(m),children:[p.jsx(ny,{children:p.jsx(U2,{placeholder:"Select transport type"})}),p.jsxs(sy,{children:[p.jsx(ou,{value:"stdio",children:"STDIO"}),p.jsx(ou,{value:"sse",children:"SSE"})]})]})]}),t==="stdio"?p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx("label",{className:"text-sm font-medium",children:"Command"}),p.jsx(qt,{placeholder:"Command",value:r,onChange:m=>o(m.target.value)})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx("label",{className:"text-sm font-medium",children:"Arguments"}),p.jsx(qt,{placeholder:"Arguments (space-separated)",value:s,onChange:m=>i(m.target.value)})]})]}):p.jsxs("div",{className:"space-y-2",children:[p.jsx("label",{className:"text-sm font-medium",children:"URL"}),p.jsx(qt,{placeholder:"URL",value:a,onChange:m=>l(m.target.value)})]}),t==="stdio"&&p.jsxs("div",{className:"space-y-2",children:[p.jsxs(Ze,{variant:"outline",onClick:()=>w(!x),className:"flex items-center w-full",children:[x?p.jsx(w_,{className:"w-4 h-4 mr-2"}):p.jsx(qc,{className:"w-4 h-4 mr-2"}),"Environment Variables"]}),x&&p.jsxs("div",{className:"space-y-2",children:[Object.entries(c).map(([m,_],v)=>p.jsxs("div",{className:"grid grid-cols-[1fr,auto] gap-2",children:[p.jsxs("div",{className:"space-y-1",children:[p.jsx(qt,{placeholder:"Key",value:m,onChange:d=>{const y={...c};delete y[m],y[d.target.value]=_,u(y)}}),p.jsx(qt,{placeholder:"Value",value:_,onChange:d=>{const y={...c};y[m]=d.target.value,u(y)}})]}),p.jsx(Ze,{variant:"destructive",onClick:()=>{const{[m]:d,...y}=c;u(y)},children:"Remove"})]},v)),p.jsx(Ze,{variant:"outline",onClick:()=>{const m={...c};m[""]="",u(m)},children:"Add Environment Variable"})]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsxs(Ze,{className:"w-full",onClick:f,children:[p.jsx(N_,{className:"w-4 h-4 mr-2"}),"Connect"]}),p.jsxs("div",{className:"flex items-center justify-center space-x-2 mb-4",children:[p.jsx("div",{className:`w-2 h-2 rounded-full ${e==="connected"?"bg-green-500":e==="error"?"bg-red-500":"bg-gray-500"}`}),p.jsx("span",{className:"text-sm text-gray-600",children:e==="connected"?"Connected":e==="error"?"Connection Error":"Disconnected"})]}),g.length>0&&p.jsx(p.Fragment,{children:p.jsxs("div",{className:"mt-4 border-t border-gray-200 pt-4",children:[p.jsx("h3",{className:"text-sm font-medium",children:"Error output from MCP server"}),p.jsx("div",{className:"mt-2 max-h-80 overflow-y-auto",children:g.map((m,_)=>p.jsx("div",{className:"text-sm text-red-500 font-mono py-2 border-b border-gray-200 last:border-b-0",children:m.params.content},_))})]})})]})]})})]})},q2=({tools:e,listTools:t,callTool:n,selectedTool:r,setSelectedTool:o,toolResult:s,nextCursor:i,error:a})=>{const[l,c]=h.useState({}),u=()=>{if(!s)return null;if("content"in s){const f=s,g=f.isError??!1;return p.jsxs(p.Fragment,{children:[p.jsxs("h4",{className:"font-semibold mb-2",children:["Tool Result: ",g?"Error":"Success"]}),f.content.map((x,w)=>p.jsxs("div",{className:"mb-2",children:[x.type==="text"&&p.jsx("pre",{className:"bg-gray-50 p-4 rounded text-sm overflow-auto max-h-64",children:x.text}),x.type==="image"&&p.jsx("img",{src:`data:${x.mimeType};base64,${x.data}`,alt:"Tool result image",className:"max-w-full h-auto"}),x.type==="resource"&&p.jsx("pre",{className:"bg-gray-50 p-4 rounded text-sm overflow-auto max-h-64",children:JSON.stringify(x.resource,null,2)})]},w))]})}else if("toolResult"in s)return p.jsxs(p.Fragment,{children:[p.jsx("h4",{className:"font-semibold mb-2",children:"Tool Result (Legacy):"}),p.jsx("pre",{className:"bg-gray-50 p-4 rounded text-sm overflow-auto max-h-64",children:JSON.stringify(s.toolResult,null,2)})]})};return p.jsxs(nr,{value:"tools",className:"grid grid-cols-2 gap-4",children:[p.jsx(pa,{items:e,listItems:t,setSelectedItem:o,renderItem:f=>p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"flex-1",children:f.name}),p.jsx("span",{className:"text-sm text-gray-500 text-right",children:f.description})]}),title:"Tools",buttonText:i?"List More Tools":"List Tools",isButtonDisabled:!i&&e.length>0}),p.jsxs("div",{className:"bg-card rounded-lg shadow",children:[p.jsx("div",{className:"p-4 border-b border-gray-200",children:p.jsx("h3",{className:"font-semibold",children:r?r.name:"Select a tool"})}),p.jsx("div",{className:"p-4",children:a?p.jsxs(xn,{variant:"destructive",children:[p.jsx(pd,{className:"h-4 w-4"}),p.jsx(Za,{children:"Error"}),p.jsx(wn,{children:a})]}):r?p.jsxs("div",{className:"space-y-4",children:[p.jsx("p",{className:"text-sm text-gray-600",children:r.description}),Object.entries(r.inputSchema.properties??[]).map(([f,g])=>p.jsxs("div",{children:[p.jsx(hd,{htmlFor:f,className:"block text-sm font-medium text-gray-700",children:f}),g.type==="string"?p.jsx(gd,{id:f,name:f,placeholder:g.description,onChange:x=>c({...l,[f]:x.target.value}),className:"mt-1"}):p.jsx(qt,{type:g.type==="number"?"number":"text",id:f,name:f,placeholder:g.description,onChange:x=>c({...l,[f]:g.type==="number"?Number(x.target.value):x.target.value}),className:"mt-1"})]},f)),p.jsxs(Ze,{onClick:()=>n(r.name,l),children:[p.jsx(j_,{className:"w-4 h-4 mr-2"}),"Run Tool"]}),s&&u()]}):p.jsx(xn,{children:p.jsx(wn,{children:"Select a tool from the list to view its details and run it"})})})]})]})},K2=()=>{h.useEffect(()=>{const e=window.matchMedia("(prefers-color-scheme: dark)"),t=n=>{n.matches?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")};return e.matches&&document.documentElement.classList.add("dark"),e.addEventListener("change",t),()=>{e.removeEventListener("change",t)}},[])},G2=1e4,Q2=()=>{const[e,t]=h.useState("disconnected"),[n,r]=h.useState([]),[o,s]=h.useState([]),[i,a]=h.useState(""),[l,c]=h.useState([]),[u,f]=h.useState(""),[g,x]=h.useState([]),[w,m]=h.useState(null),[_,v]=h.useState({resources:null,prompts:null,tools:null}),[d,y]=h.useState(()=>localStorage.getItem("lastCommand")||"mcp-server-everything"),[C,k]=h.useState(()=>localStorage.getItem("lastArgs")||""),[T,b]=h.useState("http://localhost:3001/sse"),[E,I]=h.useState("stdio"),[j,V]=h.useState([]),[M,q]=h.useState(null),[W,ee]=h.useState([]),[F,K]=h.useState([]),[N,O]=h.useState([]),[z,H]=h.useState({}),[J,pe]=h.useState([]),ie=h.useRef(0),Se=h.useRef([]),ve=(D,re)=>{pe(Te=>{const Pe=Te.find(ot=>ot.id===D);return Pe==null||Pe.resolve(re),Te.filter(ot=>ot.id!==D)})},B=D=>{pe(re=>{const Te=re.find(Pe=>Pe.id===D);return Te==null||Te.reject(new Error("Sampling request rejected")),re.filter(Pe=>Pe.id!==D)})},[ce,Ae]=h.useState(null),[fe,ae]=h.useState(null),[le,Ge]=h.useState(null),[rt,sr]=h.useState(),[on,ir]=h.useState(),[No,Pr]=h.useState(),[tl,iy]=h.useState(),ay=h.useRef(0),[nl,ly]=h.useState(300),[Zs,Nd]=h.useState(!1),Td=h.useRef(0),Rd=h.useRef(0);K2();const cy=h.useCallback(D=>{Nd(!0),Td.current=D.clientY,Rd.current=nl,document.body.style.userSelect="none"},[nl]),rl=h.useCallback(D=>{if(!Zs)return;const re=Td.current-D.clientY,Te=Math.max(100,Math.min(800,Rd.current+re));ly(Te)},[Zs]),ol=h.useCallback(()=>{Nd(!1),document.body.style.userSelect=""},[]);h.useEffect(()=>{if(Zs)return window.addEventListener("mousemove",rl),window.addEventListener("mouseup",ol),()=>{window.removeEventListener("mousemove",rl),window.removeEventListener("mouseup",ol)}},[Zs,rl,ol]),h.useEffect(()=>{localStorage.setItem("lastCommand",d)},[d]),h.useEffect(()=>{localStorage.setItem("lastArgs",C)},[C]),h.useEffect(()=>{fetch("http://localhost:3000/config").then(D=>D.json()).then(D=>{H(D.defaultEnvironment),D.defaultCommand&&y(D.defaultCommand),D.defaultArgs&&k(D.defaultArgs)}).catch(D=>console.error("Error fetching default environment:",D))},[]),h.useEffect(()=>{Se.current=N},[N]);const Pd=(D,re)=>{V(Te=>[...Te,{request:JSON.stringify(D),response:re!==void 0?JSON.stringify(re):void 0}])},Nt=D=>{v(re=>({...re,[D]:null}))},kn=async(D,re,Te)=>{if(!M)throw new Error("MCP client not connected");try{const Pe=new AbortController,ot=setTimeout(()=>{Pe.abort("Request timed out")},G2);let ar;try{ar=await M.request(D,re,{signal:Pe.signal})}finally{clearTimeout(ot)}return Pd(D,ar),Te!==void 0&&Nt(Te),ar}catch(Pe){const ot=Pe.message??String(Pe);throw Te===void 0?me.error(ot):v(ar=>({...ar,[Te]:ot})),Pe}},uy=async D=>{if(!M)throw new Error("MCP client not connected");try{await M.notification(D),Pd(D)}catch(re){throw me.error(re.message??String(re)),re}},dy=async()=>{const D=await kn({method:"resources/list",params:rt?{cursor:rt}:{}},nd,"resources");r(n.concat(D.resources??[])),sr(D.nextCursor)},fy=async()=>{const D=await kn({method:"resources/templates/list",params:on?{cursor:on}:{}},rd,"resources");s(o.concat(D.resourceTemplates??[])),ir(D.nextCursor)},py=async D=>{const re=await kn({method:"resources/read",params:{uri:D}},od,"resources");a(JSON.stringify(re,null,2))},my=async()=>{const D=await kn({method:"prompts/list",params:No?{cursor:No}:{}},sd,"prompts");c(D.prompts),Pr(D.nextCursor)},hy=async(D,re={})=>{const Te=await kn({method:"prompts/get",params:{name:D,arguments:re}},id,"prompts");f(JSON.stringify(Te,null,2))},gy=async()=>{const D=await kn({method:"tools/list",params:tl?{cursor:tl}:{}},ad,"tools");x(D.tools),iy(D.nextCursor)},vy=async(D,re)=>{const Te=await kn({method:"tools/call",params:{name:D,arguments:re,_meta:{progressToken:ay.current++}}},Dw,"tools");m(Te)},yy=async()=>{await uy({method:"notifications/roots/list_changed"})},xy=async()=>{try{const D=new tS({name:"mcp-inspector",version:"0.0.1"},{capabilities:{sampling:{},roots:{listChanged:!0}}}),re=new URL("http://localhost:3000/sse");re.searchParams.append("transportType",E),E==="stdio"?(re.searchParams.append("command",d),re.searchParams.append("args",C),re.searchParams.append("env",JSON.stringify(z))):re.searchParams.append("url",T);const Te=new nS(re);D.setNotificationHandler(Fa,Pe=>{ee(ot=>[...ot,Pe])}),D.setNotificationHandler(sg,Pe=>{K(ot=>[...ot,Pe])}),await D.connect(Te),D.setRequestHandler(ng,Pe=>new Promise((ot,ar)=>{pe(wy=>[...wy,{id:ie.current++,request:Pe,resolve:ot,reject:ar}])})),D.setRequestHandler(og,async()=>({roots:Se.current})),q(D),t("connected")}catch(D){console.error(D),t("error")}};return p.jsxs("div",{className:"flex h-screen bg-background",children:[p.jsx(Z2,{connectionStatus:e,transportType:E,setTransportType:I,command:d,setCommand:y,args:C,setArgs:k,url:T,setUrl:b,env:z,setEnv:H,onConnect:xy,stdErrNotifications:F}),p.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[p.jsx("div",{className:"flex-1 overflow-auto",children:M?p.jsxs(h_,{defaultValue:"resources",className:"w-full p-4",children:[p.jsxs(Mg,{className:"mb-4 p-0",children:[p.jsxs(ur,{value:"resources",children:[p.jsx(S_,{className:"w-4 h-4 mr-2"}),"Resources"]}),p.jsxs(ur,{value:"prompts",children:[p.jsx(E_,{className:"w-4 h-4 mr-2"}),"Prompts"]}),p.jsxs(ur,{value:"tools",children:[p.jsx(C_,{className:"w-4 h-4 mr-2"}),"Tools"]}),p.jsxs(ur,{value:"ping",children:[p.jsx(x_,{className:"w-4 h-4 mr-2"}),"Ping"]}),p.jsxs(ur,{value:"sampling",className:"relative",children:[p.jsx(k_,{className:"w-4 h-4 mr-2"}),"Sampling",J.length>0&&p.jsx("span",{className:"absolute -top-1 -right-1 bg-red-500 text-white text-xs rounded-full h-4 w-4 flex items-center justify-center",children:J.length})]}),p.jsxs(ur,{value:"roots",children:[p.jsx(__,{className:"w-4 h-4 mr-2"}),"Roots"]})]}),p.jsxs("div",{className:"w-full",children:[p.jsx(B_,{resources:n,resourceTemplates:o,listResources:()=>{Nt("resources"),dy()},listResourceTemplates:()=>{Nt("resources"),fy()},readResource:D=>{Nt("resources"),py(D)},selectedResource:ce,setSelectedResource:D=>{Nt("resources"),Ae(D)},resourceContent:i,nextCursor:rt,nextTemplateCursor:on,error:_.resources}),p.jsx(V_,{prompts:l,listPrompts:()=>{Nt("prompts"),my()},getPrompt:(D,re)=>{Nt("prompts"),hy(D,re)},selectedPrompt:fe,setSelectedPrompt:D=>{Nt("prompts"),ae(D)},promptContent:u,nextCursor:No,error:_.prompts}),p.jsx(q2,{tools:g,listTools:()=>{Nt("tools"),gy()},callTool:(D,re)=>{Nt("tools"),vy(D,re)},selectedTool:le,setSelectedTool:D=>{Nt("tools"),Ge(D),m(null)},toolResult:w,nextCursor:tl,error:_.tools}),p.jsx(O_,{}),p.jsx(D_,{onPingClick:()=>{kn({method:"ping"},mr)}}),p.jsx(H_,{pendingRequests:J,onApprove:ve,onReject:B}),p.jsx(U_,{roots:N,setRoots:O,onRootsChange:yy})]})]}):p.jsx("div",{className:"flex items-center justify-center h-full",children:p.jsx("p",{className:"text-lg text-gray-500",children:"Connect to an MCP server to start inspecting"})})}),p.jsxs("div",{className:"relative border-t border-border",style:{height:`${nl}px`},children:[p.jsx("div",{className:"absolute w-full h-4 -top-2 cursor-row-resize flex items-center justify-center hover:bg-accent/50",onMouseDown:cy,children:p.jsx("div",{className:"w-8 h-1 rounded-full bg-border"})}),p.jsx("div",{className:"h-full overflow-auto",children:p.jsx(M_,{requestHistory:j,serverNotifications:W})})]})]})]})};Ph(document.getElementById("root")).render(p.jsxs(h.StrictMode,{children:[p.jsx(Q2,{}),p.jsx(ix,{})]}));
190
+ `)},f2=0,Mr=[];function p2(e){var t=h.useRef([]),n=h.useRef([0,0]),r=h.useRef(),o=h.useState(f2++)[0],s=h.useState(gv)[0],i=h.useRef(e);h.useEffect(function(){i.current=e},[e]),h.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=Mk([e.lockRef.current],(e.shards||[]).map(gp),!0).filter(Boolean);return m.forEach(function(_){return _.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=h.useCallback(function(m,_){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!i.current.allowPinchZoom;var v=vi(m),d=n.current,y="deltaX"in m?m.deltaX:d[0]-v[0],C="deltaY"in m?m.deltaY:d[1]-v[1],k,T=m.target,b=Math.abs(y)>Math.abs(C)?"h":"v";if("touches"in m&&b==="h"&&T.type==="range")return!1;var E=mp(b,T);if(!E)return!0;if(E?k=b:(k=b==="v"?"h":"v",E=mp(b,T)),!E)return!1;if(!r.current&&"changedTouches"in m&&(y||C)&&(r.current=k),!k)return!0;var I=r.current||k;return c2(I,_,m,I==="h"?y:C,!0)},[]),l=h.useCallback(function(m){var _=m;if(!(!Mr.length||Mr[Mr.length-1]!==s)){var v="deltaY"in _?hp(_):vi(_),d=t.current.filter(function(k){return k.name===_.type&&(k.target===_.target||_.target===k.shadowParent)&&u2(k.delta,v)})[0];if(d&&d.should){_.cancelable&&_.preventDefault();return}if(!d){var y=(i.current.shards||[]).map(gp).filter(Boolean).filter(function(k){return k.contains(_.target)}),C=y.length>0?a(_,y[0]):!i.current.noIsolation;C&&_.cancelable&&_.preventDefault()}}},[]),c=h.useCallback(function(m,_,v,d){var y={name:m,delta:_,target:v,should:d,shadowParent:m2(v)};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(C){return C!==y})},1)},[]),u=h.useCallback(function(m){n.current=vi(m),r.current=void 0},[]),f=h.useCallback(function(m){c(m.type,hp(m),m.target,a(m,e.lockRef.current))},[]),g=h.useCallback(function(m){c(m.type,vi(m),m.target,a(m,e.lockRef.current))},[]);h.useEffect(function(){return Mr.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:g}),document.addEventListener("wheel",l,Or),document.addEventListener("touchmove",l,Or),document.addEventListener("touchstart",u,Or),function(){Mr=Mr.filter(function(m){return m!==s}),document.removeEventListener("wheel",l,Or),document.removeEventListener("touchmove",l,Or),document.removeEventListener("touchstart",u,Or)}},[]);var x=e.removeScrollBar,w=e.inert;return h.createElement(h.Fragment,null,w?h.createElement(s,{styles:d2(o)}):null,x?h.createElement(n2,{gapMode:e.gapMode}):null)}function m2(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const h2=Uk(hv,p2);var wv=h.forwardRef(function(e,t){return h.createElement(Ya,Kt({},e,{ref:t,sideCar:h2}))});wv.classNames=Ya.classNames;var g2=[" ","Enter","ArrowUp","ArrowDown"],v2=[" ","Enter"],Ws="Select",[Xa,Ja,y2]=lg(Ws),[bo,X2]=ig(Ws,[y2,tv]),el=tv(),[x2,rr]=bo(Ws),[w2,S2]=bo(Ws),Sv=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:a,onValueChange:l,dir:c,name:u,autoComplete:f,disabled:g,required:x,form:w}=e,m=el(t),[_,v]=h.useState(null),[d,y]=h.useState(null),[C,k]=h.useState(!1),T=cd(c),[b=!1,E]=fa({prop:r,defaultProp:o,onChange:s}),[I,j]=fa({prop:i,defaultProp:a,onChange:l}),V=h.useRef(null),M=_?w||!!_.closest("form"):!0,[q,W]=h.useState(new Set),ee=Array.from(q).map(F=>F.props.value).join(";");return p.jsx(Ck,{...m,children:p.jsxs(x2,{required:x,scope:t,trigger:_,onTriggerChange:v,valueNode:d,onValueNodeChange:y,valueNodeHasChildren:C,onValueNodeHasChildrenChange:k,contentId:Us(),value:I,onValueChange:j,open:b,onOpenChange:E,dir:T,triggerPointerDownPosRef:V,disabled:g,children:[p.jsx(Xa.Provider,{scope:t,children:p.jsx(w2,{scope:e.__scopeSelect,onNativeOptionAdd:h.useCallback(F=>{W(K=>new Set(K).add(F))},[]),onNativeOptionRemove:h.useCallback(F=>{W(K=>{const N=new Set(K);return N.delete(F),N})},[]),children:n})}),M?p.jsxs(Zv,{"aria-hidden":!0,required:x,tabIndex:-1,name:u,autoComplete:f,value:I,onChange:F=>j(F.target.value),disabled:g,form:w,children:[I===void 0?p.jsx("option",{value:""}):null,Array.from(q)]},ee):null]})})};Sv.displayName=Ws;var _v="SelectTrigger",Cv=h.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=el(n),i=rr(_v,n),a=i.disabled||r,l=Me(t,i.onTriggerChange),c=Ja(n),u=h.useRef("touch"),[f,g,x]=qv(m=>{const _=c().filter(y=>!y.disabled),v=_.find(y=>y.value===i.value),d=Kv(_,m,v);d!==void 0&&i.onValueChange(d.value)}),w=m=>{a||(i.onOpenChange(!0),x()),m&&(i.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return p.jsx(kk,{asChild:!0,...s,children:p.jsx(he.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":Wv(i.value)?"":void 0,...o,ref:l,onClick:ue(o.onClick,m=>{m.currentTarget.focus(),u.current!=="mouse"&&w(m)}),onPointerDown:ue(o.onPointerDown,m=>{u.current=m.pointerType;const _=m.target;_.hasPointerCapture(m.pointerId)&&_.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(w(m),m.preventDefault())}),onKeyDown:ue(o.onKeyDown,m=>{const _=f.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&g(m.key),!(_&&m.key===" ")&&g2.includes(m.key)&&(w(),m.preventDefault())})})})});Cv.displayName=_v;var kv="SelectValue",Ev=h.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...a}=e,l=rr(kv,n),{onValueNodeHasChildrenChange:c}=l,u=s!==void 0,f=Me(t,l.onValueNodeChange);return et(()=>{c(u)},[c,u]),p.jsx(he.span,{...a,ref:f,style:{pointerEvents:"none"},children:Wv(l.value)?p.jsx(p.Fragment,{children:i}):s})});Ev.displayName=kv;var _2="SelectIcon",bv=h.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return p.jsx(he.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});bv.displayName=_2;var C2="SelectPortal",Nv=e=>p.jsx(uv,{asChild:!0,...e});Nv.displayName=C2;var Nr="SelectContent",Tv=h.forwardRef((e,t)=>{const n=rr(Nr,e.__scopeSelect),[r,o]=h.useState();if(et(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?_o.createPortal(p.jsx(Rv,{scope:e.__scopeSelect,children:p.jsx(Xa.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),s):null}return p.jsx(Pv,{...e,ref:t})});Tv.displayName=Nr;var Rt=10,[Rv,or]=bo(Nr),k2="SelectContentImpl",Pv=h.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:f,collisionBoundary:g,collisionPadding:x,sticky:w,hideWhenDetached:m,avoidCollisions:_,...v}=e,d=rr(Nr,n),[y,C]=h.useState(null),[k,T]=h.useState(null),b=Me(t,B=>C(B)),[E,I]=h.useState(null),[j,V]=h.useState(null),M=Ja(n),[q,W]=h.useState(!1),ee=h.useRef(!1);h.useEffect(()=>{if(y)return Ok(y)},[y]),aC();const F=h.useCallback(B=>{const[ce,...Ae]=M().map(le=>le.ref.current),[fe]=Ae.slice(-1),ae=document.activeElement;for(const le of B)if(le===ae||(le==null||le.scrollIntoView({block:"nearest"}),le===ce&&k&&(k.scrollTop=0),le===fe&&k&&(k.scrollTop=k.scrollHeight),le==null||le.focus(),document.activeElement!==ae))return},[M,k]),K=h.useCallback(()=>F([E,y]),[F,E,y]);h.useEffect(()=>{q&&K()},[q,K]);const{onOpenChange:N,triggerPointerDownPosRef:O}=d;h.useEffect(()=>{if(y){let B={x:0,y:0};const ce=fe=>{var ae,le;B={x:Math.abs(Math.round(fe.pageX)-(((ae=O.current)==null?void 0:ae.x)??0)),y:Math.abs(Math.round(fe.pageY)-(((le=O.current)==null?void 0:le.y)??0))}},Ae=fe=>{B.x<=10&&B.y<=10?fe.preventDefault():y.contains(fe.target)||N(!1),document.removeEventListener("pointermove",ce),O.current=null};return O.current!==null&&(document.addEventListener("pointermove",ce),document.addEventListener("pointerup",Ae,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ce),document.removeEventListener("pointerup",Ae,{capture:!0})}}},[y,N,O]),h.useEffect(()=>{const B=()=>N(!1);return window.addEventListener("blur",B),window.addEventListener("resize",B),()=>{window.removeEventListener("blur",B),window.removeEventListener("resize",B)}},[N]);const[z,H]=qv(B=>{const ce=M().filter(ae=>!ae.disabled),Ae=ce.find(ae=>ae.ref.current===document.activeElement),fe=Kv(ce,B,Ae);fe&&setTimeout(()=>fe.ref.current.focus())}),J=h.useCallback((B,ce,Ae)=>{const fe=!ee.current&&!Ae;(d.value!==void 0&&d.value===ce||fe)&&(I(B),fe&&(ee.current=!0))},[d.value]),pe=h.useCallback(()=>y==null?void 0:y.focus(),[y]),ie=h.useCallback((B,ce,Ae)=>{const fe=!ee.current&&!Ae;(d.value!==void 0&&d.value===ce||fe)&&V(B)},[d.value]),Se=r==="popper"?Jc:jv,ve=Se===Jc?{side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:f,collisionBoundary:g,collisionPadding:x,sticky:w,hideWhenDetached:m,avoidCollisions:_}:{};return p.jsx(Rv,{scope:n,content:y,viewport:k,onViewportChange:T,itemRefCallback:J,selectedItem:E,onItemLeave:pe,itemTextRefCallback:ie,focusSelectedItem:K,selectedItemText:j,position:r,isPositioned:q,searchRef:z,children:p.jsx(wv,{as:vo,allowPinchZoom:!0,children:p.jsx(Bg,{asChild:!0,trapped:d.open,onMountAutoFocus:B=>{B.preventDefault()},onUnmountAutoFocus:ue(o,B=>{var ce;(ce=d.trigger)==null||ce.focus({preventScroll:!0}),B.preventDefault()}),children:p.jsx(Fg,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:B=>B.preventDefault(),onDismiss:()=>d.onOpenChange(!1),children:p.jsx(Se,{role:"listbox",id:d.contentId,"data-state":d.open?"open":"closed",dir:d.dir,onContextMenu:B=>B.preventDefault(),...v,...ve,onPlaced:()=>W(!0),ref:b,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:ue(v.onKeyDown,B=>{const ce=B.ctrlKey||B.altKey||B.metaKey;if(B.key==="Tab"&&B.preventDefault(),!ce&&B.key.length===1&&H(B.key),["ArrowUp","ArrowDown","Home","End"].includes(B.key)){let fe=M().filter(ae=>!ae.disabled).map(ae=>ae.ref.current);if(["ArrowUp","End"].includes(B.key)&&(fe=fe.slice().reverse()),["ArrowUp","ArrowDown"].includes(B.key)){const ae=B.target,le=fe.indexOf(ae);fe=fe.slice(le+1)}setTimeout(()=>F(fe)),B.preventDefault()}})})})})})})});Pv.displayName=k2;var E2="SelectItemAlignedPosition",jv=h.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=rr(Nr,n),i=or(Nr,n),[a,l]=h.useState(null),[c,u]=h.useState(null),f=Me(t,b=>u(b)),g=Ja(n),x=h.useRef(!1),w=h.useRef(!0),{viewport:m,selectedItem:_,selectedItemText:v,focusSelectedItem:d}=i,y=h.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&c&&m&&_&&v){const b=s.trigger.getBoundingClientRect(),E=c.getBoundingClientRect(),I=s.valueNode.getBoundingClientRect(),j=v.getBoundingClientRect();if(s.dir!=="rtl"){const ae=j.left-E.left,le=I.left-ae,Ge=b.left-le,rt=b.width+Ge,sr=Math.max(rt,E.width),on=window.innerWidth-Rt,ir=Qf(le,[Rt,Math.max(Rt,on-sr)]);a.style.minWidth=rt+"px",a.style.left=ir+"px"}else{const ae=E.right-j.right,le=window.innerWidth-I.right-ae,Ge=window.innerWidth-b.right-le,rt=b.width+Ge,sr=Math.max(rt,E.width),on=window.innerWidth-Rt,ir=Qf(le,[Rt,Math.max(Rt,on-sr)]);a.style.minWidth=rt+"px",a.style.right=ir+"px"}const V=g(),M=window.innerHeight-Rt*2,q=m.scrollHeight,W=window.getComputedStyle(c),ee=parseInt(W.borderTopWidth,10),F=parseInt(W.paddingTop,10),K=parseInt(W.borderBottomWidth,10),N=parseInt(W.paddingBottom,10),O=ee+F+q+N+K,z=Math.min(_.offsetHeight*5,O),H=window.getComputedStyle(m),J=parseInt(H.paddingTop,10),pe=parseInt(H.paddingBottom,10),ie=b.top+b.height/2-Rt,Se=M-ie,ve=_.offsetHeight/2,B=_.offsetTop+ve,ce=ee+F+B,Ae=O-ce;if(ce<=ie){const ae=V.length>0&&_===V[V.length-1].ref.current;a.style.bottom="0px";const le=c.clientHeight-m.offsetTop-m.offsetHeight,Ge=Math.max(Se,ve+(ae?pe:0)+le+K),rt=ce+Ge;a.style.height=rt+"px"}else{const ae=V.length>0&&_===V[0].ref.current;a.style.top="0px";const Ge=Math.max(ie,ee+m.offsetTop+(ae?J:0)+ve)+Ae;a.style.height=Ge+"px",m.scrollTop=ce-ie+m.offsetTop}a.style.margin=`${Rt}px 0`,a.style.minHeight=z+"px",a.style.maxHeight=M+"px",r==null||r(),requestAnimationFrame(()=>x.current=!0)}},[g,s.trigger,s.valueNode,a,c,m,_,v,s.dir,r]);et(()=>y(),[y]);const[C,k]=h.useState();et(()=>{c&&k(window.getComputedStyle(c).zIndex)},[c]);const T=h.useCallback(b=>{b&&w.current===!0&&(y(),d==null||d(),w.current=!1)},[y,d]);return p.jsx(N2,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:x,onScrollButtonChange:T,children:p.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:p.jsx(he.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});jv.displayName=E2;var b2="SelectPopperPosition",Jc=h.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Rt,...s}=e,i=el(n);return p.jsx(Ek,{...i,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Jc.displayName=b2;var[N2,bd]=bo(Nr,{}),eu="SelectViewport",Iv=h.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=or(eu,n),i=bd(eu,n),a=Me(t,s.onViewportChange),l=h.useRef(0);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),p.jsx(Xa.Slot,{scope:n,children:p.jsx(he.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:ue(o.onScroll,c=>{const u=c.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:g}=i;if(g!=null&&g.current&&f){const x=Math.abs(l.current-u.scrollTop);if(x>0){const w=window.innerHeight-Rt*2,m=parseFloat(f.style.minHeight),_=parseFloat(f.style.height),v=Math.max(m,_);if(v<w){const d=v+x,y=Math.min(w,d),C=d-y;f.style.height=y+"px",f.style.bottom==="0px"&&(u.scrollTop=C>0?C:0,f.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});Iv.displayName=eu;var Ov="SelectGroup",[T2,R2]=bo(Ov),P2=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Us();return p.jsx(T2,{scope:n,id:o,children:p.jsx(he.div,{role:"group","aria-labelledby":o,...r,ref:t})})});P2.displayName=Ov;var Mv="SelectLabel",Av=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=R2(Mv,n);return p.jsx(he.div,{id:o.id,...r,ref:t})});Av.displayName=Mv;var ya="SelectItem",[j2,Lv]=bo(ya),Dv=h.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,a=rr(ya,n),l=or(ya,n),c=a.value===r,[u,f]=h.useState(s??""),[g,x]=h.useState(!1),w=Me(t,d=>{var y;return(y=l.itemRefCallback)==null?void 0:y.call(l,d,r,o)}),m=Us(),_=h.useRef("touch"),v=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return p.jsx(j2,{scope:n,value:r,disabled:o,textId:m,isSelected:c,onItemTextChange:h.useCallback(d=>{f(y=>y||((d==null?void 0:d.textContent)??"").trim())},[]),children:p.jsx(Xa.ItemSlot,{scope:n,value:r,disabled:o,textValue:u,children:p.jsx(he.div,{role:"option","aria-labelledby":m,"data-highlighted":g?"":void 0,"aria-selected":c&&g,"data-state":c?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:w,onFocus:ue(i.onFocus,()=>x(!0)),onBlur:ue(i.onBlur,()=>x(!1)),onClick:ue(i.onClick,()=>{_.current!=="mouse"&&v()}),onPointerUp:ue(i.onPointerUp,()=>{_.current==="mouse"&&v()}),onPointerDown:ue(i.onPointerDown,d=>{_.current=d.pointerType}),onPointerMove:ue(i.onPointerMove,d=>{var y;_.current=d.pointerType,o?(y=l.onItemLeave)==null||y.call(l):_.current==="mouse"&&d.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ue(i.onPointerLeave,d=>{var y;d.currentTarget===document.activeElement&&((y=l.onItemLeave)==null||y.call(l))}),onKeyDown:ue(i.onKeyDown,d=>{var C;((C=l.searchRef)==null?void 0:C.current)!==""&&d.key===" "||(v2.includes(d.key)&&v(),d.key===" "&&d.preventDefault())})})})})});Dv.displayName=ya;var Ho="SelectItemText",zv=h.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=rr(Ho,n),a=or(Ho,n),l=Lv(Ho,n),c=S2(Ho,n),[u,f]=h.useState(null),g=Me(t,v=>f(v),l.onItemTextChange,v=>{var d;return(d=a.itemTextRefCallback)==null?void 0:d.call(a,v,l.value,l.disabled)}),x=u==null?void 0:u.textContent,w=h.useMemo(()=>p.jsx("option",{value:l.value,disabled:l.disabled,children:x},l.value),[l.disabled,l.value,x]),{onNativeOptionAdd:m,onNativeOptionRemove:_}=c;return et(()=>(m(w),()=>_(w)),[m,_,w]),p.jsxs(p.Fragment,{children:[p.jsx(he.span,{id:l.textId,...s,ref:g}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?_o.createPortal(s.children,i.valueNode):null]})});zv.displayName=Ho;var $v="SelectItemIndicator",Fv=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Lv($v,n).isSelected?p.jsx(he.span,{"aria-hidden":!0,...r,ref:t}):null});Fv.displayName=$v;var tu="SelectScrollUpButton",Vv=h.forwardRef((e,t)=>{const n=or(tu,e.__scopeSelect),r=bd(tu,e.__scopeSelect),[o,s]=h.useState(!1),i=Me(t,r.onScrollButtonChange);return et(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollTop>0;s(c)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?p.jsx(Uv,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});Vv.displayName=tu;var nu="SelectScrollDownButton",Bv=h.forwardRef((e,t)=>{const n=or(nu,e.__scopeSelect),r=bd(nu,e.__scopeSelect),[o,s]=h.useState(!1),i=Me(t,r.onScrollButtonChange);return et(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollHeight-l.clientHeight,u=Math.ceil(l.scrollTop)<c;s(u)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?p.jsx(Uv,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});Bv.displayName=nu;var Uv=h.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=or("SelectScrollButton",n),i=h.useRef(null),a=Ja(n),l=h.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return h.useEffect(()=>()=>l(),[l]),et(()=>{var u;const c=a().find(f=>f.ref.current===document.activeElement);(u=c==null?void 0:c.ref.current)==null||u.scrollIntoView({block:"nearest"})},[a]),p.jsx(he.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:ue(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:ue(o.onPointerMove,()=>{var c;(c=s.onItemLeave)==null||c.call(s),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:ue(o.onPointerLeave,()=>{l()})})}),I2="SelectSeparator",Hv=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return p.jsx(he.div,{"aria-hidden":!0,...r,ref:t})});Hv.displayName=I2;var ru="SelectArrow",O2=h.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=el(n),s=rr(ru,n),i=or(ru,n);return s.open&&i.position==="popper"?p.jsx(bk,{...o,...r,ref:t}):null});O2.displayName=ru;function Wv(e){return e===""||e===void 0}var Zv=h.forwardRef((e,t)=>{const{value:n,...r}=e,o=h.useRef(null),s=Me(t,o),i=Tk(n);return h.useEffect(()=>{const a=o.current,l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==n&&u){const f=new Event("change",{bubbles:!0});u.call(a,n),a.dispatchEvent(f)}},[i,n]),p.jsx(dv,{asChild:!0,children:p.jsx("select",{...r,ref:s,defaultValue:n})})});Zv.displayName="BubbleSelect";function qv(e){const t=tn(e),n=h.useRef(""),r=h.useRef(0),o=h.useCallback(i=>{const a=n.current+i;t(a),function l(c){n.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),s=h.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return h.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function Kv(e,t,n){const o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=M2(e,Math.max(s,0));o.length===1&&(i=i.filter(c=>c!==n));const l=i.find(c=>c.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function M2(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var A2=Sv,Gv=Cv,L2=Ev,D2=bv,z2=Nv,Qv=Tv,$2=Iv,Yv=Av,Xv=Dv,F2=zv,V2=Fv,Jv=Vv,ey=Bv,ty=Hv;const B2=A2,U2=L2,ny=h.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(Gv,{ref:r,className:ze("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,p.jsx(D2,{asChild:!0,children:p.jsx(Z_,{className:"h-4 w-4 opacity-50"})})]}));ny.displayName=Gv.displayName;const ry=h.forwardRef(({className:e,...t},n)=>p.jsx(Jv,{ref:n,className:ze("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(X_,{})}));ry.displayName=Jv.displayName;const oy=h.forwardRef(({className:e,...t},n)=>p.jsx(ey,{ref:n,className:ze("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(Q_,{})}));oy.displayName=ey.displayName;const sy=h.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>p.jsx(z2,{children:p.jsxs(Qv,{ref:o,className:ze("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[p.jsx(ry,{}),p.jsx($2,{className:ze("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),p.jsx(oy,{})]})}));sy.displayName=Qv.displayName;const H2=h.forwardRef(({className:e,...t},n)=>p.jsx(Yv,{ref:n,className:ze("px-2 py-1.5 text-sm font-semibold",e),...t}));H2.displayName=Yv.displayName;const ou=h.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(Xv,{ref:r,className:ze("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[p.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(V2,{children:p.jsx(K_,{className:"h-4 w-4"})})}),p.jsx(F2,{children:t})]}));ou.displayName=Xv.displayName;const W2=h.forwardRef(({className:e,...t},n)=>p.jsx(ty,{ref:n,className:ze("-mx-1 my-1 h-px bg-muted",e),...t}));W2.displayName=ty.displayName;const Z2=({connectionStatus:e,transportType:t,setTransportType:n,command:r,setCommand:o,args:s,setArgs:i,url:a,setUrl:l,env:c,setEnv:u,onConnect:f,stdErrNotifications:g})=>{const[x,w]=h.useState(!1);return p.jsxs("div",{className:"w-80 bg-card border-r border-border flex flex-col h-full",children:[p.jsxs("div",{className:"flex items-center p-4 border-b border-gray-200",children:[p.jsx(I_,{className:"w-6 h-6 text-gray-500"}),p.jsx("h1",{className:"ml-2 text-lg font-semibold",children:"MCP Inspector"})]}),p.jsx("div",{className:"p-4 flex-1 overflow-auto",children:p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx("label",{className:"text-sm font-medium",children:"Transport Type"}),p.jsxs(B2,{value:t,onValueChange:m=>n(m),children:[p.jsx(ny,{children:p.jsx(U2,{placeholder:"Select transport type"})}),p.jsxs(sy,{children:[p.jsx(ou,{value:"stdio",children:"STDIO"}),p.jsx(ou,{value:"sse",children:"SSE"})]})]})]}),t==="stdio"?p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx("label",{className:"text-sm font-medium",children:"Command"}),p.jsx(qt,{placeholder:"Command",value:r,onChange:m=>o(m.target.value)})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx("label",{className:"text-sm font-medium",children:"Arguments"}),p.jsx(qt,{placeholder:"Arguments (space-separated)",value:s,onChange:m=>i(m.target.value)})]})]}):p.jsxs("div",{className:"space-y-2",children:[p.jsx("label",{className:"text-sm font-medium",children:"URL"}),p.jsx(qt,{placeholder:"URL",value:a,onChange:m=>l(m.target.value)})]}),t==="stdio"&&p.jsxs("div",{className:"space-y-2",children:[p.jsxs(Ze,{variant:"outline",onClick:()=>w(!x),className:"flex items-center w-full",children:[x?p.jsx(w_,{className:"w-4 h-4 mr-2"}):p.jsx(qc,{className:"w-4 h-4 mr-2"}),"Environment Variables"]}),x&&p.jsxs("div",{className:"space-y-2",children:[Object.entries(c).map(([m,_],v)=>p.jsxs("div",{className:"grid grid-cols-[1fr,auto] gap-2",children:[p.jsxs("div",{className:"space-y-1",children:[p.jsx(qt,{placeholder:"Key",value:m,onChange:d=>{const y={...c};delete y[m],y[d.target.value]=_,u(y)}}),p.jsx(qt,{placeholder:"Value",value:_,onChange:d=>{const y={...c};y[m]=d.target.value,u(y)}})]}),p.jsx(Ze,{variant:"destructive",onClick:()=>{const{[m]:d,...y}=c;u(y)},children:"Remove"})]},v)),p.jsx(Ze,{variant:"outline",onClick:()=>{const m={...c};m[""]="",u(m)},children:"Add Environment Variable"})]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsxs(Ze,{className:"w-full",onClick:f,children:[p.jsx(N_,{className:"w-4 h-4 mr-2"}),"Connect"]}),p.jsxs("div",{className:"flex items-center justify-center space-x-2 mb-4",children:[p.jsx("div",{className:`w-2 h-2 rounded-full ${e==="connected"?"bg-green-500":e==="error"?"bg-red-500":"bg-gray-500"}`}),p.jsx("span",{className:"text-sm text-gray-600",children:e==="connected"?"Connected":e==="error"?"Connection Error":"Disconnected"})]}),g.length>0&&p.jsx(p.Fragment,{children:p.jsxs("div",{className:"mt-4 border-t border-gray-200 pt-4",children:[p.jsx("h3",{className:"text-sm font-medium",children:"Error output from MCP server"}),p.jsx("div",{className:"mt-2 max-h-80 overflow-y-auto",children:g.map((m,_)=>p.jsx("div",{className:"text-sm text-red-500 font-mono py-2 border-b border-gray-200 last:border-b-0",children:m.params.content},_))})]})})]})]})})]})},q2=({tools:e,listTools:t,callTool:n,selectedTool:r,setSelectedTool:o,toolResult:s,nextCursor:i,error:a})=>{const[l,c]=h.useState({}),u=()=>{if(!s)return null;if("content"in s){const f=s,g=f.isError??!1;return p.jsxs(p.Fragment,{children:[p.jsxs("h4",{className:"font-semibold mb-2",children:["Tool Result: ",g?"Error":"Success"]}),f.content.map((x,w)=>p.jsxs("div",{className:"mb-2",children:[x.type==="text"&&p.jsx("pre",{className:"bg-gray-50 dark:bg-gray-800 dark:text-gray-100 p-4 rounded text-sm overflow-auto max-h-64",children:x.text}),x.type==="image"&&p.jsx("img",{src:`data:${x.mimeType};base64,${x.data}`,alt:"Tool result image",className:"max-w-full h-auto"}),x.type==="resource"&&p.jsx("pre",{className:"bg-gray-50 p-4 rounded text-sm overflow-auto max-h-64",children:JSON.stringify(x.resource,null,2)})]},w))]})}else if("toolResult"in s)return p.jsxs(p.Fragment,{children:[p.jsx("h4",{className:"font-semibold mb-2",children:"Tool Result (Legacy):"}),p.jsx("pre",{className:"bg-gray-50 p-4 rounded text-sm overflow-auto max-h-64",children:JSON.stringify(s.toolResult,null,2)})]})};return p.jsxs(nr,{value:"tools",className:"grid grid-cols-2 gap-4",children:[p.jsx(pa,{items:e,listItems:t,setSelectedItem:o,renderItem:f=>p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"flex-1",children:f.name}),p.jsx("span",{className:"text-sm text-gray-500 text-right",children:f.description})]}),title:"Tools",buttonText:i?"List More Tools":"List Tools",isButtonDisabled:!i&&e.length>0}),p.jsxs("div",{className:"bg-card rounded-lg shadow",children:[p.jsx("div",{className:"p-4 border-b border-gray-200",children:p.jsx("h3",{className:"font-semibold",children:r?r.name:"Select a tool"})}),p.jsx("div",{className:"p-4",children:a?p.jsxs(xn,{variant:"destructive",children:[p.jsx(pd,{className:"h-4 w-4"}),p.jsx(Za,{children:"Error"}),p.jsx(wn,{children:a})]}):r?p.jsxs("div",{className:"space-y-4",children:[p.jsx("p",{className:"text-sm text-gray-600",children:r.description}),Object.entries(r.inputSchema.properties??[]).map(([f,g])=>p.jsxs("div",{children:[p.jsx(hd,{htmlFor:f,className:"block text-sm font-medium text-gray-700",children:f}),g.type==="string"?p.jsx(gd,{id:f,name:f,placeholder:g.description,onChange:x=>c({...l,[f]:x.target.value}),className:"mt-1"}):p.jsx(qt,{type:g.type==="number"?"number":"text",id:f,name:f,placeholder:g.description,onChange:x=>c({...l,[f]:g.type==="number"?Number(x.target.value):x.target.value}),className:"mt-1"})]},f)),p.jsxs(Ze,{onClick:()=>n(r.name,l),children:[p.jsx(j_,{className:"w-4 h-4 mr-2"}),"Run Tool"]}),s&&u()]}):p.jsx(xn,{children:p.jsx(wn,{children:"Select a tool from the list to view its details and run it"})})})]})]})},K2=()=>{h.useEffect(()=>{const e=window.matchMedia("(prefers-color-scheme: dark)"),t=n=>{n.matches?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")};return e.matches&&document.documentElement.classList.add("dark"),e.addEventListener("change",t),()=>{e.removeEventListener("change",t)}},[])},G2=1e4,Q2=()=>{const[e,t]=h.useState("disconnected"),[n,r]=h.useState([]),[o,s]=h.useState([]),[i,a]=h.useState(""),[l,c]=h.useState([]),[u,f]=h.useState(""),[g,x]=h.useState([]),[w,m]=h.useState(null),[_,v]=h.useState({resources:null,prompts:null,tools:null}),[d,y]=h.useState(()=>localStorage.getItem("lastCommand")||"mcp-server-everything"),[C,k]=h.useState(()=>localStorage.getItem("lastArgs")||""),[T,b]=h.useState("http://localhost:3001/sse"),[E,I]=h.useState("stdio"),[j,V]=h.useState([]),[M,q]=h.useState(null),[W,ee]=h.useState([]),[F,K]=h.useState([]),[N,O]=h.useState([]),[z,H]=h.useState({}),[J,pe]=h.useState([]),ie=h.useRef(0),Se=h.useRef([]),ve=(D,re)=>{pe(Te=>{const Pe=Te.find(ot=>ot.id===D);return Pe==null||Pe.resolve(re),Te.filter(ot=>ot.id!==D)})},B=D=>{pe(re=>{const Te=re.find(Pe=>Pe.id===D);return Te==null||Te.reject(new Error("Sampling request rejected")),re.filter(Pe=>Pe.id!==D)})},[ce,Ae]=h.useState(null),[fe,ae]=h.useState(null),[le,Ge]=h.useState(null),[rt,sr]=h.useState(),[on,ir]=h.useState(),[No,Pr]=h.useState(),[tl,iy]=h.useState(),ay=h.useRef(0),[nl,ly]=h.useState(300),[Zs,Nd]=h.useState(!1),Td=h.useRef(0),Rd=h.useRef(0);K2();const cy=h.useCallback(D=>{Nd(!0),Td.current=D.clientY,Rd.current=nl,document.body.style.userSelect="none"},[nl]),rl=h.useCallback(D=>{if(!Zs)return;const re=Td.current-D.clientY,Te=Math.max(100,Math.min(800,Rd.current+re));ly(Te)},[Zs]),ol=h.useCallback(()=>{Nd(!1),document.body.style.userSelect=""},[]);h.useEffect(()=>{if(Zs)return window.addEventListener("mousemove",rl),window.addEventListener("mouseup",ol),()=>{window.removeEventListener("mousemove",rl),window.removeEventListener("mouseup",ol)}},[Zs,rl,ol]),h.useEffect(()=>{localStorage.setItem("lastCommand",d)},[d]),h.useEffect(()=>{localStorage.setItem("lastArgs",C)},[C]),h.useEffect(()=>{fetch("http://localhost:3000/config").then(D=>D.json()).then(D=>{H(D.defaultEnvironment),D.defaultCommand&&y(D.defaultCommand),D.defaultArgs&&k(D.defaultArgs)}).catch(D=>console.error("Error fetching default environment:",D))},[]),h.useEffect(()=>{Se.current=N},[N]);const Pd=(D,re)=>{V(Te=>[...Te,{request:JSON.stringify(D),response:re!==void 0?JSON.stringify(re):void 0}])},Nt=D=>{v(re=>({...re,[D]:null}))},kn=async(D,re,Te)=>{if(!M)throw new Error("MCP client not connected");try{const Pe=new AbortController,ot=setTimeout(()=>{Pe.abort("Request timed out")},G2);let ar;try{ar=await M.request(D,re,{signal:Pe.signal})}finally{clearTimeout(ot)}return Pd(D,ar),Te!==void 0&&Nt(Te),ar}catch(Pe){const ot=Pe.message??String(Pe);throw Te===void 0?me.error(ot):v(ar=>({...ar,[Te]:ot})),Pe}},uy=async D=>{if(!M)throw new Error("MCP client not connected");try{await M.notification(D),Pd(D)}catch(re){throw me.error(re.message??String(re)),re}},dy=async()=>{const D=await kn({method:"resources/list",params:rt?{cursor:rt}:{}},nd,"resources");r(n.concat(D.resources??[])),sr(D.nextCursor)},fy=async()=>{const D=await kn({method:"resources/templates/list",params:on?{cursor:on}:{}},rd,"resources");s(o.concat(D.resourceTemplates??[])),ir(D.nextCursor)},py=async D=>{const re=await kn({method:"resources/read",params:{uri:D}},od,"resources");a(JSON.stringify(re,null,2))},my=async()=>{const D=await kn({method:"prompts/list",params:No?{cursor:No}:{}},sd,"prompts");c(D.prompts),Pr(D.nextCursor)},hy=async(D,re={})=>{const Te=await kn({method:"prompts/get",params:{name:D,arguments:re}},id,"prompts");f(JSON.stringify(Te,null,2))},gy=async()=>{const D=await kn({method:"tools/list",params:tl?{cursor:tl}:{}},ad,"tools");x(D.tools),iy(D.nextCursor)},vy=async(D,re)=>{const Te=await kn({method:"tools/call",params:{name:D,arguments:re,_meta:{progressToken:ay.current++}}},Dw,"tools");m(Te)},yy=async()=>{await uy({method:"notifications/roots/list_changed"})},xy=async()=>{try{const D=new tS({name:"mcp-inspector",version:"0.0.1"},{capabilities:{sampling:{},roots:{listChanged:!0}}}),re=new URL("http://localhost:3000/sse");re.searchParams.append("transportType",E),E==="stdio"?(re.searchParams.append("command",d),re.searchParams.append("args",C),re.searchParams.append("env",JSON.stringify(z))):re.searchParams.append("url",T);const Te=new nS(re);D.setNotificationHandler(Fa,Pe=>{ee(ot=>[...ot,Pe])}),D.setNotificationHandler(sg,Pe=>{K(ot=>[...ot,Pe])}),await D.connect(Te),D.setRequestHandler(ng,Pe=>new Promise((ot,ar)=>{pe(wy=>[...wy,{id:ie.current++,request:Pe,resolve:ot,reject:ar}])})),D.setRequestHandler(og,async()=>({roots:Se.current})),q(D),t("connected")}catch(D){console.error(D),t("error")}};return p.jsxs("div",{className:"flex h-screen bg-background",children:[p.jsx(Z2,{connectionStatus:e,transportType:E,setTransportType:I,command:d,setCommand:y,args:C,setArgs:k,url:T,setUrl:b,env:z,setEnv:H,onConnect:xy,stdErrNotifications:F}),p.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[p.jsx("div",{className:"flex-1 overflow-auto",children:M?p.jsxs(h_,{defaultValue:"resources",className:"w-full p-4",children:[p.jsxs(Mg,{className:"mb-4 p-0",children:[p.jsxs(ur,{value:"resources",children:[p.jsx(S_,{className:"w-4 h-4 mr-2"}),"Resources"]}),p.jsxs(ur,{value:"prompts",children:[p.jsx(E_,{className:"w-4 h-4 mr-2"}),"Prompts"]}),p.jsxs(ur,{value:"tools",children:[p.jsx(C_,{className:"w-4 h-4 mr-2"}),"Tools"]}),p.jsxs(ur,{value:"ping",children:[p.jsx(x_,{className:"w-4 h-4 mr-2"}),"Ping"]}),p.jsxs(ur,{value:"sampling",className:"relative",children:[p.jsx(k_,{className:"w-4 h-4 mr-2"}),"Sampling",J.length>0&&p.jsx("span",{className:"absolute -top-1 -right-1 bg-red-500 text-white text-xs rounded-full h-4 w-4 flex items-center justify-center",children:J.length})]}),p.jsxs(ur,{value:"roots",children:[p.jsx(__,{className:"w-4 h-4 mr-2"}),"Roots"]})]}),p.jsxs("div",{className:"w-full",children:[p.jsx(B_,{resources:n,resourceTemplates:o,listResources:()=>{Nt("resources"),dy()},listResourceTemplates:()=>{Nt("resources"),fy()},readResource:D=>{Nt("resources"),py(D)},selectedResource:ce,setSelectedResource:D=>{Nt("resources"),Ae(D)},resourceContent:i,nextCursor:rt,nextTemplateCursor:on,error:_.resources}),p.jsx(V_,{prompts:l,listPrompts:()=>{Nt("prompts"),my()},getPrompt:(D,re)=>{Nt("prompts"),hy(D,re)},selectedPrompt:fe,setSelectedPrompt:D=>{Nt("prompts"),ae(D)},promptContent:u,nextCursor:No,error:_.prompts}),p.jsx(q2,{tools:g,listTools:()=>{Nt("tools"),gy()},callTool:(D,re)=>{Nt("tools"),vy(D,re)},selectedTool:le,setSelectedTool:D=>{Nt("tools"),Ge(D),m(null)},toolResult:w,nextCursor:tl,error:_.tools}),p.jsx(O_,{}),p.jsx(D_,{onPingClick:()=>{kn({method:"ping"},mr)}}),p.jsx(H_,{pendingRequests:J,onApprove:ve,onReject:B}),p.jsx(U_,{roots:N,setRoots:O,onRootsChange:yy})]})]}):p.jsx("div",{className:"flex items-center justify-center h-full",children:p.jsx("p",{className:"text-lg text-gray-500",children:"Connect to an MCP server to start inspecting"})})}),p.jsxs("div",{className:"relative border-t border-border",style:{height:`${nl}px`},children:[p.jsx("div",{className:"absolute w-full h-4 -top-2 cursor-row-resize flex items-center justify-center hover:bg-accent/50",onMouseDown:cy,children:p.jsx("div",{className:"w-8 h-1 rounded-full bg-border"})}),p.jsx("div",{className:"h-full overflow-auto",children:p.jsx(M_,{requestHistory:j,serverNotifications:W})})]})]})]})};Ph(document.getElementById("root")).render(p.jsxs(h.StrictMode,{children:[p.jsx(Q2,{}),p.jsx(ix,{})]}));