pi-web-ui 0.19.0 → 0.19.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-web-ui",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "description": "Web chat interface for the pi coding agent, powered by the pi SDK (@earendil-works/pi-coding-agent) — one-command run, Docker/systemd/launchd deployable",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -37,7 +37,7 @@
37
37
  `+_[E].replace(" at new "," at ");return i.displayName&&z.includes("<anonymous>")&&(z=z.replace("<anonymous>",i.displayName)),z}while(1<=E&&0<=L);break}}}finally{x=!1,Error.prepareStackTrace=c}return(i=i?i.displayName||i.name:"")?q(i):""}function ge(i){switch(i.tag){case 5:return q(i.type);case 16:return q("Lazy");case 13:return q("Suspense");case 19:return q("SuspenseList");case 0:case 2:case 15:return i=re(i.type,!1),i;case 11:return i=re(i.type.render,!1),i;case 1:return i=re(i.type,!0),i;default:return""}}function ae(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case ne:return"Fragment";case O:return"Portal";case te:return"Profiler";case Z:return"StrictMode";case F:return"Suspense";case W:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case D:return(i.displayName||"Context")+".Consumer";case $:return(i._context.displayName||"Context")+".Provider";case H:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case P:return s=i.displayName||null,s!==null?s:ae(i.type)||"Memo";case Q:s=i._payload,i=i._init;try{return ae(i(s))}catch{}}return null}function Se(i){var s=i.type;switch(i.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=s.render,i=i.displayName||i.name||"",s.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ae(s);case 8:return s===Z?"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 s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Te(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function je(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function Me(i){var s=je(i)?"checked":"value",c=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),f=""+i[s];if(!i.hasOwnProperty(s)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var _=c.get,y=c.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return _.call(this)},set:function(E){f=""+E,y.call(this,E)}}),Object.defineProperty(i,s,{enumerable:c.enumerable}),{getValue:function(){return f},setValue:function(E){f=""+E},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function zt(i){i._valueTracker||(i._valueTracker=Me(i))}function nn(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var c=s.getValue(),f="";return i&&(f=je(i)?i.checked?"true":"false":i.value),i=f,i!==c?(s.setValue(i),!0):!1}function $e(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}function Dn(i,s){var c=s.checked;return k({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:c??i._wrapperState.initialChecked})}function Pi(i,s){var c=s.defaultValue==null?"":s.defaultValue,f=s.checked!=null?s.checked:s.defaultChecked;c=Te(s.value!=null?s.value:c),i._wrapperState={initialChecked:f,initialValue:c,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function et(i,s){s=s.checked,s!=null&&T(i,"checked",s,!1)}function Pn(i,s){et(i,s);var c=Te(s.value),f=s.type;if(c!=null)f==="number"?(c===0&&i.value===""||i.value!=c)&&(i.value=""+c):i.value!==""+c&&(i.value=""+c);else if(f==="submit"||f==="reset"){i.removeAttribute("value");return}s.hasOwnProperty("value")?vi(i,s.type,c):s.hasOwnProperty("defaultValue")&&vi(i,s.type,Te(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function Kn(i,s,c){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var f=s.type;if(!(f!=="submit"&&f!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+i._wrapperState.initialValue,c||s===i.value||(i.value=s),i.defaultValue=s}c=i.name,c!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,c!==""&&(i.name=c)}function vi(i,s,c){(s!=="number"||$e(i.ownerDocument)!==i)&&(c==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+c&&(i.defaultValue=""+c))}var oi=Array.isArray;function yi(i,s,c,f){if(i=i.options,s){s={};for(var _=0;_<c.length;_++)s["$"+c[_]]=!0;for(c=0;c<i.length;c++)_=s.hasOwnProperty("$"+i[c].value),i[c].selected!==_&&(i[c].selected=_),_&&f&&(i[c].defaultSelected=!0)}else{for(c=""+Te(c),s=null,_=0;_<i.length;_++){if(i[_].value===c){i[_].selected=!0,f&&(i[_].defaultSelected=!0);return}s!==null||i[_].disabled||(s=i[_])}s!==null&&(s.selected=!0)}}function Rr(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return k({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Mr(i,s){var c=s.value;if(c==null){if(c=s.children,s=s.defaultValue,c!=null){if(s!=null)throw Error(n(92));if(oi(c)){if(1<c.length)throw Error(n(93));c=c[0]}s=c}s==null&&(s=""),c=s}i._wrapperState={initialValue:Te(c)}}function qn(i,s){var c=Te(s.value),f=Te(s.defaultValue);c!=null&&(c=""+c,c!==i.value&&(i.value=c),s.defaultValue==null&&i.defaultValue!==c&&(i.defaultValue=c)),f!=null&&(i.defaultValue=""+f)}function Ar(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function ee(i){switch(i){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 fe(i,s){return i==null||i==="http://www.w3.org/1999/xhtml"?ee(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var De,We=(function(i){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(s,c,f,_){MSApp.execUnsafeLocalFunction(function(){return i(s,c,f,_)})}:i})(function(i,s){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=s;else{for(De=De||document.createElement("div"),De.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=De.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function Qe(i,s){if(s){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=s;return}}i.textContent=s}var jt={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},ai=["Webkit","ms","Moz","O"];Object.keys(jt).forEach(function(i){ai.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),jt[s]=jt[i]})});function En(i,s,c){return s==null||typeof s=="boolean"||s===""?"":c||typeof s!="number"||s===0||jt.hasOwnProperty(i)&&jt[i]?(""+s).trim():s+"px"}function li(i,s){i=i.style;for(var c in s)if(s.hasOwnProperty(c)){var f=c.indexOf("--")===0,_=En(c,s[c],f);c==="float"&&(c="cssFloat"),f?i.setProperty(c,_):i[c]=_}}var Bi=k({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 Ut(i,s){if(s){if(Bi[i]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function Vn(i,s){if(i.indexOf("-")===-1)return typeof s.is=="string";switch(i){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 rn=null;function fs(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var ps=null,er=null,Fi=null;function zi(i){if(i=xo(i)){if(typeof ps!="function")throw Error(n(280));var s=i.stateNode;s&&(s=Ka(s),ps(i.stateNode,i.type,s))}}function B(i){er?Fi?Fi.push(i):Fi=[i]:er=i}function ie(){if(er){var i=er,s=Fi;if(Fi=er=null,zi(i),s)for(i=0;i<s.length;i++)zi(s[i])}}function _e(i,s){return i(s)}function Be(){}var dt=!1;function gt(i,s,c){if(dt)return i(s,c);dt=!0;try{return _e(i,s,c)}finally{dt=!1,(er!==null||Fi!==null)&&(Be(),ie())}}function we(i,s){var c=i.stateNode;if(c===null)return null;var f=Ka(c);if(f===null)return null;c=f[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(i=i.type,f=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!f;break e;default:i=!1}if(i)return null;if(c&&typeof c!="function")throw Error(n(231,s,typeof c));return c}var be=!1;if(u)try{var Ae={};Object.defineProperty(Ae,"passive",{get:function(){be=!0}}),window.addEventListener("test",Ae,Ae),window.removeEventListener("test",Ae,Ae)}catch{be=!1}function It(i,s,c,f,_,y,E,L,z){var X=Array.prototype.slice.call(arguments,3);try{s.apply(c,X)}catch(le){this.onError(le)}}var ut=!1,bi=null,tr=!1,Lr=null,Ec={onError:function(i){ut=!0,bi=i}};function no(i,s,c,f,_,y,E,L,z){ut=!1,bi=null,It.apply(Ec,arguments)}function Cc(i,s,c,f,_,y,E,L,z){if(no.apply(this,arguments),ut){if(ut){var X=bi;ut=!1,bi=null}else throw Error(n(198));tr||(tr=!0,Lr=X)}}function ji(i){var s=i,c=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(c=s.return),i=s.return;while(i)}return s.tag===3?c:null}function xa(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function io(i){if(ji(i)!==i)throw Error(n(188))}function ms(i){var s=i.alternate;if(!s){if(s=ji(i),s===null)throw Error(n(188));return s!==i?null:i}for(var c=i,f=s;;){var _=c.return;if(_===null)break;var y=_.alternate;if(y===null){if(f=_.return,f!==null){c=f;continue}break}if(_.child===y.child){for(y=_.child;y;){if(y===c)return io(_),i;if(y===f)return io(_),s;y=y.sibling}throw Error(n(188))}if(c.return!==f.return)c=_,f=y;else{for(var E=!1,L=_.child;L;){if(L===c){E=!0,c=_,f=y;break}if(L===f){E=!0,f=_,c=y;break}L=L.sibling}if(!E){for(L=y.child;L;){if(L===c){E=!0,c=y,f=_;break}if(L===f){E=!0,f=y,c=_;break}L=L.sibling}if(!E)throw Error(n(189))}}if(c.alternate!==f)throw Error(n(190))}if(c.tag!==3)throw Error(n(188));return c.stateNode.current===c?i:s}function ka(i){return i=ms(i),i!==null?Ea(i):null}function Ea(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=Ea(i);if(s!==null)return s;i=i.sibling}return null}var Ca=t.unstable_scheduleCallback,ci=t.unstable_cancelCallback,Na=t.unstable_shouldYield,Ta=t.unstable_requestPaint,yt=t.unstable_now,Nc=t.unstable_getCurrentPriorityLevel,ro=t.unstable_ImmediatePriority,Or=t.unstable_UserBlockingPriority,gs=t.unstable_NormalPriority,he=t.unstable_LowPriority,Re=t.unstable_IdlePriority,Ke=null,Ye=null;function Mt(i){if(Ye&&typeof Ye.onCommitFiberRoot=="function")try{Ye.onCommitFiberRoot(Ke,i,void 0,(i.current.flags&128)===128)}catch{}}var bt=Math.clz32?Math.clz32:gn,Si=Math.log,_s=Math.LN2;function gn(i){return i>>>=0,i===0?32:31-(Si(i)/_s|0)|0}var _n=64,Ir=4194304;function nr(i){switch(i&-i){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 i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function Dr(i,s){var c=i.pendingLanes;if(c===0)return 0;var f=0,_=i.suspendedLanes,y=i.pingedLanes,E=c&268435455;if(E!==0){var L=E&~_;L!==0?f=nr(L):(y&=E,y!==0&&(f=nr(y)))}else E=c&~_,E!==0?f=nr(E):y!==0&&(f=nr(y));if(f===0)return 0;if(s!==0&&s!==f&&(s&_)===0&&(_=f&-f,y=s&-s,_>=y||_===16&&(y&4194240)!==0))return s;if((f&4)!==0&&(f|=c&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=f;0<s;)c=31-bt(s),_=1<<c,f|=i[c],s&=~_;return f}function Tc(i,s){switch(i){case 1:case 2:case 4:return s+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 s+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 Rc(i,s){for(var c=i.suspendedLanes,f=i.pingedLanes,_=i.expirationTimes,y=i.pendingLanes;0<y;){var E=31-bt(y),L=1<<E,z=_[E];z===-1?((L&c)===0||(L&f)!==0)&&(_[E]=Tc(L,s)):z<=s&&(i.expiredLanes|=L),y&=~L}}function so(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function Ra(){var i=_n;return _n<<=1,(_n&4194240)===0&&(_n=64),i}function ir(i){for(var s=[],c=0;31>c;c++)s.push(i);return s}function rr(i,s,c){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-bt(s),i[s]=c}function Gn(i,s){var c=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s,s=i.entanglements;var f=i.eventTimes;for(i=i.expirationTimes;0<c;){var _=31-bt(c),y=1<<_;s[_]=0,f[_]=-1,i[_]=-1,c&=~y}}function oo(i,s){var c=i.entangledLanes|=s;for(i=i.entanglements;c;){var f=31-bt(c),_=1<<f;_&s|i[f]&s&&(i[f]|=s),c&=~_}}var nt=0;function Ue(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var ao,At,st,Pr,wi,Br=!1,sr=[],me=null,xe=null,Pe=null,Je=new Map,Et=new Map,Vt=[],Mc="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 Ma(i,s){switch(i){case"focusin":case"focusout":me=null;break;case"dragenter":case"dragleave":xe=null;break;case"mouseover":case"mouseout":Pe=null;break;case"pointerover":case"pointerout":Je.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Et.delete(s.pointerId)}}function lo(i,s,c,f,_,y){return i===null||i.nativeEvent!==y?(i={blockedOn:s,domEventName:c,eventSystemFlags:f,nativeEvent:y,targetContainers:[_]},s!==null&&(s=xo(s),s!==null&&At(s)),i):(i.eventSystemFlags|=f,s=i.targetContainers,_!==null&&s.indexOf(_)===-1&&s.push(_),i)}function eS(i,s,c,f,_){switch(s){case"focusin":return me=lo(me,i,s,c,f,_),!0;case"dragenter":return xe=lo(xe,i,s,c,f,_),!0;case"mouseover":return Pe=lo(Pe,i,s,c,f,_),!0;case"pointerover":var y=_.pointerId;return Je.set(y,lo(Je.get(y)||null,i,s,c,f,_)),!0;case"gotpointercapture":return y=_.pointerId,Et.set(y,lo(Et.get(y)||null,i,s,c,f,_)),!0}return!1}function Tf(i){var s=Fr(i.target);if(s!==null){var c=ji(s);if(c!==null){if(s=c.tag,s===13){if(s=xa(c),s!==null){i.blockedOn=s,wi(i.priority,function(){st(c)});return}}else if(s===3&&c.stateNode.current.memoizedState.isDehydrated){i.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Aa(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var c=Lc(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(c===null){c=i.nativeEvent;var f=new c.constructor(c.type,c);rn=f,c.target.dispatchEvent(f),rn=null}else return s=xo(c),s!==null&&At(s),i.blockedOn=c,!1;s.shift()}return!0}function Rf(i,s,c){Aa(i)&&c.delete(s)}function tS(){Br=!1,me!==null&&Aa(me)&&(me=null),xe!==null&&Aa(xe)&&(xe=null),Pe!==null&&Aa(Pe)&&(Pe=null),Je.forEach(Rf),Et.forEach(Rf)}function co(i,s){i.blockedOn===s&&(i.blockedOn=null,Br||(Br=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,tS)))}function uo(i){function s(_){return co(_,i)}if(0<sr.length){co(sr[0],i);for(var c=1;c<sr.length;c++){var f=sr[c];f.blockedOn===i&&(f.blockedOn=null)}}for(me!==null&&co(me,i),xe!==null&&co(xe,i),Pe!==null&&co(Pe,i),Je.forEach(s),Et.forEach(s),c=0;c<Vt.length;c++)f=Vt[c],f.blockedOn===i&&(f.blockedOn=null);for(;0<Vt.length&&(c=Vt[0],c.blockedOn===null);)Tf(c),c.blockedOn===null&&Vt.shift()}var vs=A.ReactCurrentBatchConfig,La=!0;function nS(i,s,c,f){var _=nt,y=vs.transition;vs.transition=null;try{nt=1,Ac(i,s,c,f)}finally{nt=_,vs.transition=y}}function iS(i,s,c,f){var _=nt,y=vs.transition;vs.transition=null;try{nt=4,Ac(i,s,c,f)}finally{nt=_,vs.transition=y}}function Ac(i,s,c,f){if(La){var _=Lc(i,s,c,f);if(_===null)Yc(i,s,f,Oa,c),Ma(i,f);else if(eS(_,i,s,c,f))f.stopPropagation();else if(Ma(i,f),s&4&&-1<Mc.indexOf(i)){for(;_!==null;){var y=xo(_);if(y!==null&&ao(y),y=Lc(i,s,c,f),y===null&&Yc(i,s,f,Oa,c),y===_)break;_=y}_!==null&&f.stopPropagation()}else Yc(i,s,f,null,c)}}var Oa=null;function Lc(i,s,c,f){if(Oa=null,i=fs(f),i=Fr(i),i!==null)if(s=ji(i),s===null)i=null;else if(c=s.tag,c===13){if(i=xa(s),i!==null)return i;i=null}else if(c===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null);return Oa=i,null}function Mf(i){switch(i){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(Nc()){case ro:return 1;case Or:return 4;case gs:case he:return 16;case Re:return 536870912;default:return 16}default:return 16}}var or=null,Oc=null,Ia=null;function Af(){if(Ia)return Ia;var i,s=Oc,c=s.length,f,_="value"in or?or.value:or.textContent,y=_.length;for(i=0;i<c&&s[i]===_[i];i++);var E=c-i;for(f=1;f<=E&&s[c-f]===_[y-f];f++);return Ia=_.slice(i,1<f?1-f:void 0)}function Da(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function Pa(){return!0}function Lf(){return!1}function Bn(i){function s(c,f,_,y,E){this._reactName=c,this._targetInst=_,this.type=f,this.nativeEvent=y,this.target=E,this.currentTarget=null;for(var L in i)i.hasOwnProperty(L)&&(c=i[L],this[L]=c?c(y):y[L]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?Pa:Lf,this.isPropagationStopped=Lf,this}return k(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=Pa)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Pa)},persist:function(){},isPersistent:Pa}),s}var ys={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ic=Bn(ys),ho=k({},ys,{view:0,detail:0}),rS=Bn(ho),Dc,Pc,fo,Ba=k({},ho,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fc,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==fo&&(fo&&i.type==="mousemove"?(Dc=i.screenX-fo.screenX,Pc=i.screenY-fo.screenY):Pc=Dc=0,fo=i),Dc)},movementY:function(i){return"movementY"in i?i.movementY:Pc}}),Of=Bn(Ba),sS=k({},Ba,{dataTransfer:0}),oS=Bn(sS),aS=k({},ho,{relatedTarget:0}),Bc=Bn(aS),lS=k({},ys,{animationName:0,elapsedTime:0,pseudoElement:0}),cS=Bn(lS),uS=k({},ys,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),hS=Bn(uS),dS=k({},ys,{data:0}),If=Bn(dS),fS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pS={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"},mS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function gS(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=mS[i])?!!s[i]:!1}function Fc(){return gS}var _S=k({},ho,{key:function(i){if(i.key){var s=fS[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Da(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?pS[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fc,charCode:function(i){return i.type==="keypress"?Da(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Da(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),vS=Bn(_S),yS=k({},Ba,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Df=Bn(yS),bS=k({},ho,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fc}),SS=Bn(bS),wS=k({},ys,{propertyName:0,elapsedTime:0,pseudoElement:0}),xS=Bn(wS),kS=k({},Ba,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),ES=Bn(kS),CS=[9,13,27,32],zc=u&&"CompositionEvent"in window,po=null;u&&"documentMode"in document&&(po=document.documentMode);var NS=u&&"TextEvent"in window&&!po,Pf=u&&(!zc||po&&8<po&&11>=po),Bf=" ",Ff=!1;function zf(i,s){switch(i){case"keyup":return CS.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jf(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var bs=!1;function TS(i,s){switch(i){case"compositionend":return jf(s);case"keypress":return s.which!==32?null:(Ff=!0,Bf);case"textInput":return i=s.data,i===Bf&&Ff?null:i;default:return null}}function RS(i,s){if(bs)return i==="compositionend"||!zc&&zf(i,s)?(i=Af(),Ia=Oc=or=null,bs=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return Pf&&s.locale!=="ko"?null:s.data;default:return null}}var MS={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 Uf(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!MS[i.type]:s==="textarea"}function Hf(i,s,c,f){B(f),s=Ha(s,"onChange"),0<s.length&&(c=new Ic("onChange","change",null,c,f),i.push({event:c,listeners:s}))}var mo=null,go=null;function AS(i){op(i,0)}function Fa(i){var s=Es(i);if(nn(s))return i}function LS(i,s){if(i==="change")return s}var $f=!1;if(u){var jc;if(u){var Uc="oninput"in document;if(!Uc){var Wf=document.createElement("div");Wf.setAttribute("oninput","return;"),Uc=typeof Wf.oninput=="function"}jc=Uc}else jc=!1;$f=jc&&(!document.documentMode||9<document.documentMode)}function Kf(){mo&&(mo.detachEvent("onpropertychange",qf),go=mo=null)}function qf(i){if(i.propertyName==="value"&&Fa(go)){var s=[];Hf(s,go,i,fs(i)),gt(AS,s)}}function OS(i,s,c){i==="focusin"?(Kf(),mo=s,go=c,mo.attachEvent("onpropertychange",qf)):i==="focusout"&&Kf()}function IS(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Fa(go)}function DS(i,s){if(i==="click")return Fa(s)}function PS(i,s){if(i==="input"||i==="change")return Fa(s)}function BS(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var ui=typeof Object.is=="function"?Object.is:BS;function _o(i,s){if(ui(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var c=Object.keys(i),f=Object.keys(s);if(c.length!==f.length)return!1;for(f=0;f<c.length;f++){var _=c[f];if(!d.call(s,_)||!ui(i[_],s[_]))return!1}return!0}function Vf(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function Gf(i,s){var c=Vf(i);i=0;for(var f;c;){if(c.nodeType===3){if(f=i+c.textContent.length,i<=s&&f>=s)return{node:c,offset:s-i};i=f}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=Vf(c)}}function Yf(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?Yf(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function Xf(){for(var i=window,s=$e();s instanceof i.HTMLIFrameElement;){try{var c=typeof s.contentWindow.location.href=="string"}catch{c=!1}if(c)i=s.contentWindow;else break;s=$e(i.document)}return s}function Hc(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}function FS(i){var s=Xf(),c=i.focusedElem,f=i.selectionRange;if(s!==c&&c&&c.ownerDocument&&Yf(c.ownerDocument.documentElement,c)){if(f!==null&&Hc(c)){if(s=f.start,i=f.end,i===void 0&&(i=s),"selectionStart"in c)c.selectionStart=s,c.selectionEnd=Math.min(i,c.value.length);else if(i=(s=c.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var _=c.textContent.length,y=Math.min(f.start,_);f=f.end===void 0?y:Math.min(f.end,_),!i.extend&&y>f&&(_=f,f=y,y=_),_=Gf(c,y);var E=Gf(c,f);_&&E&&(i.rangeCount!==1||i.anchorNode!==_.node||i.anchorOffset!==_.offset||i.focusNode!==E.node||i.focusOffset!==E.offset)&&(s=s.createRange(),s.setStart(_.node,_.offset),i.removeAllRanges(),y>f?(i.addRange(s),i.extend(E.node,E.offset)):(s.setEnd(E.node,E.offset),i.addRange(s)))}}for(s=[],i=c;i=i.parentNode;)i.nodeType===1&&s.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c<s.length;c++)i=s[c],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var zS=u&&"documentMode"in document&&11>=document.documentMode,Ss=null,$c=null,vo=null,Wc=!1;function Zf(i,s,c){var f=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;Wc||Ss==null||Ss!==$e(f)||(f=Ss,"selectionStart"in f&&Hc(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),vo&&_o(vo,f)||(vo=f,f=Ha($c,"onSelect"),0<f.length&&(s=new Ic("onSelect","select",null,s,c),i.push({event:s,listeners:f}),s.target=Ss)))}function za(i,s){var c={};return c[i.toLowerCase()]=s.toLowerCase(),c["Webkit"+i]="webkit"+s,c["Moz"+i]="moz"+s,c}var ws={animationend:za("Animation","AnimationEnd"),animationiteration:za("Animation","AnimationIteration"),animationstart:za("Animation","AnimationStart"),transitionend:za("Transition","TransitionEnd")},Kc={},Qf={};u&&(Qf=document.createElement("div").style,"AnimationEvent"in window||(delete ws.animationend.animation,delete ws.animationiteration.animation,delete ws.animationstart.animation),"TransitionEvent"in window||delete ws.transitionend.transition);function ja(i){if(Kc[i])return Kc[i];if(!ws[i])return i;var s=ws[i],c;for(c in s)if(s.hasOwnProperty(c)&&c in Qf)return Kc[i]=s[c];return i}var Jf=ja("animationend"),ep=ja("animationiteration"),tp=ja("animationstart"),np=ja("transitionend"),ip=new Map,rp="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 ar(i,s){ip.set(i,s),a(s,[i])}for(var qc=0;qc<rp.length;qc++){var Vc=rp[qc],jS=Vc.toLowerCase(),US=Vc[0].toUpperCase()+Vc.slice(1);ar(jS,"on"+US)}ar(Jf,"onAnimationEnd"),ar(ep,"onAnimationIteration"),ar(tp,"onAnimationStart"),ar("dblclick","onDoubleClick"),ar("focusin","onFocus"),ar("focusout","onBlur"),ar(np,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var yo="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(" "),HS=new Set("cancel close invalid load scroll toggle".split(" ").concat(yo));function sp(i,s,c){var f=i.type||"unknown-event";i.currentTarget=c,Cc(f,s,void 0,i),i.currentTarget=null}function op(i,s){s=(s&4)!==0;for(var c=0;c<i.length;c++){var f=i[c],_=f.event;f=f.listeners;e:{var y=void 0;if(s)for(var E=f.length-1;0<=E;E--){var L=f[E],z=L.instance,X=L.currentTarget;if(L=L.listener,z!==y&&_.isPropagationStopped())break e;sp(_,L,X),y=z}else for(E=0;E<f.length;E++){if(L=f[E],z=L.instance,X=L.currentTarget,L=L.listener,z!==y&&_.isPropagationStopped())break e;sp(_,L,X),y=z}}}if(tr)throw i=Lr,tr=!1,Lr=null,i}function ft(i,s){var c=s[tu];c===void 0&&(c=s[tu]=new Set);var f=i+"__bubble";c.has(f)||(ap(s,i,2,!1),c.add(f))}function Gc(i,s,c){var f=0;s&&(f|=4),ap(c,i,f,s)}var Ua="_reactListening"+Math.random().toString(36).slice(2);function bo(i){if(!i[Ua]){i[Ua]=!0,r.forEach(function(c){c!=="selectionchange"&&(HS.has(c)||Gc(c,!1,i),Gc(c,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[Ua]||(s[Ua]=!0,Gc("selectionchange",!1,s))}}function ap(i,s,c,f){switch(Mf(s)){case 1:var _=nS;break;case 4:_=iS;break;default:_=Ac}c=_.bind(null,s,c,i),_=void 0,!be||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(_=!0),f?_!==void 0?i.addEventListener(s,c,{capture:!0,passive:_}):i.addEventListener(s,c,!0):_!==void 0?i.addEventListener(s,c,{passive:_}):i.addEventListener(s,c,!1)}function Yc(i,s,c,f,_){var y=f;if((s&1)===0&&(s&2)===0&&f!==null)e:for(;;){if(f===null)return;var E=f.tag;if(E===3||E===4){var L=f.stateNode.containerInfo;if(L===_||L.nodeType===8&&L.parentNode===_)break;if(E===4)for(E=f.return;E!==null;){var z=E.tag;if((z===3||z===4)&&(z=E.stateNode.containerInfo,z===_||z.nodeType===8&&z.parentNode===_))return;E=E.return}for(;L!==null;){if(E=Fr(L),E===null)return;if(z=E.tag,z===5||z===6){f=y=E;continue e}L=L.parentNode}}f=f.return}gt(function(){var X=y,le=fs(c),ce=[];e:{var oe=ip.get(i);if(oe!==void 0){var ye=Ic,Ee=i;switch(i){case"keypress":if(Da(c)===0)break e;case"keydown":case"keyup":ye=vS;break;case"focusin":Ee="focus",ye=Bc;break;case"focusout":Ee="blur",ye=Bc;break;case"beforeblur":case"afterblur":ye=Bc;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ye=Of;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ye=oS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ye=SS;break;case Jf:case ep:case tp:ye=cS;break;case np:ye=xS;break;case"scroll":ye=rS;break;case"wheel":ye=ES;break;case"copy":case"cut":case"paste":ye=hS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ye=Df}var Ce=(s&4)!==0,Lt=!Ce&&i==="scroll",G=Ce?oe!==null?oe+"Capture":null:oe;Ce=[];for(var U=X,Y;U!==null;){Y=U;var de=Y.stateNode;if(Y.tag===5&&de!==null&&(Y=de,G!==null&&(de=we(U,G),de!=null&&Ce.push(So(U,de,Y)))),Lt)break;U=U.return}0<Ce.length&&(oe=new ye(oe,Ee,null,c,le),ce.push({event:oe,listeners:Ce}))}}if((s&7)===0){e:{if(oe=i==="mouseover"||i==="pointerover",ye=i==="mouseout"||i==="pointerout",oe&&c!==rn&&(Ee=c.relatedTarget||c.fromElement)&&(Fr(Ee)||Ee[Ui]))break e;if((ye||oe)&&(oe=le.window===le?le:(oe=le.ownerDocument)?oe.defaultView||oe.parentWindow:window,ye?(Ee=c.relatedTarget||c.toElement,ye=X,Ee=Ee?Fr(Ee):null,Ee!==null&&(Lt=ji(Ee),Ee!==Lt||Ee.tag!==5&&Ee.tag!==6)&&(Ee=null)):(ye=null,Ee=X),ye!==Ee)){if(Ce=Of,de="onMouseLeave",G="onMouseEnter",U="mouse",(i==="pointerout"||i==="pointerover")&&(Ce=Df,de="onPointerLeave",G="onPointerEnter",U="pointer"),Lt=ye==null?oe:Es(ye),Y=Ee==null?oe:Es(Ee),oe=new Ce(de,U+"leave",ye,c,le),oe.target=Lt,oe.relatedTarget=Y,de=null,Fr(le)===X&&(Ce=new Ce(G,U+"enter",Ee,c,le),Ce.target=Y,Ce.relatedTarget=Lt,de=Ce),Lt=de,ye&&Ee)t:{for(Ce=ye,G=Ee,U=0,Y=Ce;Y;Y=xs(Y))U++;for(Y=0,de=G;de;de=xs(de))Y++;for(;0<U-Y;)Ce=xs(Ce),U--;for(;0<Y-U;)G=xs(G),Y--;for(;U--;){if(Ce===G||G!==null&&Ce===G.alternate)break t;Ce=xs(Ce),G=xs(G)}Ce=null}else Ce=null;ye!==null&&lp(ce,oe,ye,Ce,!1),Ee!==null&&Lt!==null&&lp(ce,Lt,Ee,Ce,!0)}}e:{if(oe=X?Es(X):window,ye=oe.nodeName&&oe.nodeName.toLowerCase(),ye==="select"||ye==="input"&&oe.type==="file")var Ne=LS;else if(Uf(oe))if($f)Ne=PS;else{Ne=IS;var Le=OS}else(ye=oe.nodeName)&&ye.toLowerCase()==="input"&&(oe.type==="checkbox"||oe.type==="radio")&&(Ne=DS);if(Ne&&(Ne=Ne(i,X))){Hf(ce,Ne,c,le);break e}Le&&Le(i,oe,X),i==="focusout"&&(Le=oe._wrapperState)&&Le.controlled&&oe.type==="number"&&vi(oe,"number",oe.value)}switch(Le=X?Es(X):window,i){case"focusin":(Uf(Le)||Le.contentEditable==="true")&&(Ss=Le,$c=X,vo=null);break;case"focusout":vo=$c=Ss=null;break;case"mousedown":Wc=!0;break;case"contextmenu":case"mouseup":case"dragend":Wc=!1,Zf(ce,c,le);break;case"selectionchange":if(zS)break;case"keydown":case"keyup":Zf(ce,c,le)}var Oe;if(zc)e:{switch(i){case"compositionstart":var Fe="onCompositionStart";break e;case"compositionend":Fe="onCompositionEnd";break e;case"compositionupdate":Fe="onCompositionUpdate";break e}Fe=void 0}else bs?zf(i,c)&&(Fe="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(Fe="onCompositionStart");Fe&&(Pf&&c.locale!=="ko"&&(bs||Fe!=="onCompositionStart"?Fe==="onCompositionEnd"&&bs&&(Oe=Af()):(or=le,Oc="value"in or?or.value:or.textContent,bs=!0)),Le=Ha(X,Fe),0<Le.length&&(Fe=new If(Fe,i,null,c,le),ce.push({event:Fe,listeners:Le}),Oe?Fe.data=Oe:(Oe=jf(c),Oe!==null&&(Fe.data=Oe)))),(Oe=NS?TS(i,c):RS(i,c))&&(X=Ha(X,"onBeforeInput"),0<X.length&&(le=new If("onBeforeInput","beforeinput",null,c,le),ce.push({event:le,listeners:X}),le.data=Oe))}op(ce,s)})}function So(i,s,c){return{instance:i,listener:s,currentTarget:c}}function Ha(i,s){for(var c=s+"Capture",f=[];i!==null;){var _=i,y=_.stateNode;_.tag===5&&y!==null&&(_=y,y=we(i,c),y!=null&&f.unshift(So(i,y,_)),y=we(i,s),y!=null&&f.push(So(i,y,_))),i=i.return}return f}function xs(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function lp(i,s,c,f,_){for(var y=s._reactName,E=[];c!==null&&c!==f;){var L=c,z=L.alternate,X=L.stateNode;if(z!==null&&z===f)break;L.tag===5&&X!==null&&(L=X,_?(z=we(c,y),z!=null&&E.unshift(So(c,z,L))):_||(z=we(c,y),z!=null&&E.push(So(c,z,L)))),c=c.return}E.length!==0&&i.push({event:s,listeners:E})}var $S=/\r\n?/g,WS=/\u0000|\uFFFD/g;function cp(i){return(typeof i=="string"?i:""+i).replace($S,`
38
38
  `).replace(WS,"")}function $a(i,s,c){if(s=cp(s),cp(i)!==s&&c)throw Error(n(425))}function Wa(){}var Xc=null,Zc=null;function Qc(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Jc=typeof setTimeout=="function"?setTimeout:void 0,KS=typeof clearTimeout=="function"?clearTimeout:void 0,up=typeof Promise=="function"?Promise:void 0,qS=typeof queueMicrotask=="function"?queueMicrotask:typeof up<"u"?function(i){return up.resolve(null).then(i).catch(VS)}:Jc;function VS(i){setTimeout(function(){throw i})}function eu(i,s){var c=s,f=0;do{var _=c.nextSibling;if(i.removeChild(c),_&&_.nodeType===8)if(c=_.data,c==="/$"){if(f===0){i.removeChild(_),uo(s);return}f--}else c!=="$"&&c!=="$?"&&c!=="$!"||f++;c=_}while(c);uo(s)}function lr(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return i}function hp(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var c=i.data;if(c==="$"||c==="$!"||c==="$?"){if(s===0)return i;s--}else c==="/$"&&s++}i=i.previousSibling}return null}var ks=Math.random().toString(36).slice(2),xi="__reactFiber$"+ks,wo="__reactProps$"+ks,Ui="__reactContainer$"+ks,tu="__reactEvents$"+ks,GS="__reactListeners$"+ks,YS="__reactHandles$"+ks;function Fr(i){var s=i[xi];if(s)return s;for(var c=i.parentNode;c;){if(s=c[Ui]||c[xi]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(i=hp(i);i!==null;){if(c=i[xi])return c;i=hp(i)}return s}i=c,c=i.parentNode}return null}function xo(i){return i=i[xi]||i[Ui],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Es(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function Ka(i){return i[wo]||null}var nu=[],Cs=-1;function cr(i){return{current:i}}function pt(i){0>Cs||(i.current=nu[Cs],nu[Cs]=null,Cs--)}function ht(i,s){Cs++,nu[Cs]=i.current,i.current=s}var ur={},cn=cr(ur),Cn=cr(!1),zr=ur;function Ns(i,s){var c=i.type.contextTypes;if(!c)return ur;var f=i.stateNode;if(f&&f.__reactInternalMemoizedUnmaskedChildContext===s)return f.__reactInternalMemoizedMaskedChildContext;var _={},y;for(y in c)_[y]=s[y];return f&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=_),_}function Nn(i){return i=i.childContextTypes,i!=null}function qa(){pt(Cn),pt(cn)}function dp(i,s,c){if(cn.current!==ur)throw Error(n(168));ht(cn,s),ht(Cn,c)}function fp(i,s,c){var f=i.stateNode;if(s=s.childContextTypes,typeof f.getChildContext!="function")return c;f=f.getChildContext();for(var _ in f)if(!(_ in s))throw Error(n(108,Se(i)||"Unknown",_));return k({},c,f)}function Va(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||ur,zr=cn.current,ht(cn,i),ht(Cn,Cn.current),!0}function pp(i,s,c){var f=i.stateNode;if(!f)throw Error(n(169));c?(i=fp(i,s,zr),f.__reactInternalMemoizedMergedChildContext=i,pt(Cn),pt(cn),ht(cn,i)):pt(Cn),ht(Cn,c)}var Hi=null,Ga=!1,iu=!1;function mp(i){Hi===null?Hi=[i]:Hi.push(i)}function XS(i){Ga=!0,mp(i)}function hr(){if(!iu&&Hi!==null){iu=!0;var i=0,s=nt;try{var c=Hi;for(nt=1;i<c.length;i++){var f=c[i];do f=f(!0);while(f!==null)}Hi=null,Ga=!1}catch(_){throw Hi!==null&&(Hi=Hi.slice(i+1)),Ca(ro,hr),_}finally{nt=s,iu=!1}}return null}var Ts=[],Rs=0,Ya=null,Xa=0,Yn=[],Xn=0,jr=null,$i=1,Wi="";function Ur(i,s){Ts[Rs++]=Xa,Ts[Rs++]=Ya,Ya=i,Xa=s}function gp(i,s,c){Yn[Xn++]=$i,Yn[Xn++]=Wi,Yn[Xn++]=jr,jr=i;var f=$i;i=Wi;var _=32-bt(f)-1;f&=~(1<<_),c+=1;var y=32-bt(s)+_;if(30<y){var E=_-_%5;y=(f&(1<<E)-1).toString(32),f>>=E,_-=E,$i=1<<32-bt(s)+_|c<<_|f,Wi=y+i}else $i=1<<y|c<<_|f,Wi=i}function ru(i){i.return!==null&&(Ur(i,1),gp(i,1,0))}function su(i){for(;i===Ya;)Ya=Ts[--Rs],Ts[Rs]=null,Xa=Ts[--Rs],Ts[Rs]=null;for(;i===jr;)jr=Yn[--Xn],Yn[Xn]=null,Wi=Yn[--Xn],Yn[Xn]=null,$i=Yn[--Xn],Yn[Xn]=null}var Fn=null,zn=null,_t=!1,hi=null;function _p(i,s){var c=ei(5,null,null,0);c.elementType="DELETED",c.stateNode=s,c.return=i,s=i.deletions,s===null?(i.deletions=[c],i.flags|=16):s.push(c)}function vp(i,s){switch(i.tag){case 5:var c=i.type;return s=s.nodeType!==1||c.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(i.stateNode=s,Fn=i,zn=lr(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,Fn=i,zn=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(c=jr!==null?{id:$i,overflow:Wi}:null,i.memoizedState={dehydrated:s,treeContext:c,retryLane:1073741824},c=ei(18,null,null,0),c.stateNode=s,c.return=i,i.child=c,Fn=i,zn=null,!0):!1;default:return!1}}function ou(i){return(i.mode&1)!==0&&(i.flags&128)===0}function au(i){if(_t){var s=zn;if(s){var c=s;if(!vp(i,s)){if(ou(i))throw Error(n(418));s=lr(c.nextSibling);var f=Fn;s&&vp(i,s)?_p(f,c):(i.flags=i.flags&-4097|2,_t=!1,Fn=i)}}else{if(ou(i))throw Error(n(418));i.flags=i.flags&-4097|2,_t=!1,Fn=i}}}function yp(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Fn=i}function Za(i){if(i!==Fn)return!1;if(!_t)return yp(i),_t=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!Qc(i.type,i.memoizedProps)),s&&(s=zn)){if(ou(i))throw bp(),Error(n(418));for(;s;)_p(i,s),s=lr(s.nextSibling)}if(yp(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,s=0;i;){if(i.nodeType===8){var c=i.data;if(c==="/$"){if(s===0){zn=lr(i.nextSibling);break e}s--}else c!=="$"&&c!=="$!"&&c!=="$?"||s++}i=i.nextSibling}zn=null}}else zn=Fn?lr(i.stateNode.nextSibling):null;return!0}function bp(){for(var i=zn;i;)i=lr(i.nextSibling)}function Ms(){zn=Fn=null,_t=!1}function lu(i){hi===null?hi=[i]:hi.push(i)}var ZS=A.ReactCurrentBatchConfig;function ko(i,s,c){if(i=c.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(c._owner){if(c=c._owner,c){if(c.tag!==1)throw Error(n(309));var f=c.stateNode}if(!f)throw Error(n(147,i));var _=f,y=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===y?s.ref:(s=function(E){var L=_.refs;E===null?delete L[y]:L[y]=E},s._stringRef=y,s)}if(typeof i!="string")throw Error(n(284));if(!c._owner)throw Error(n(290,i))}return i}function Qa(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function Sp(i){var s=i._init;return s(i._payload)}function wp(i){function s(G,U){if(i){var Y=G.deletions;Y===null?(G.deletions=[U],G.flags|=16):Y.push(U)}}function c(G,U){if(!i)return null;for(;U!==null;)s(G,U),U=U.sibling;return null}function f(G,U){for(G=new Map;U!==null;)U.key!==null?G.set(U.key,U):G.set(U.index,U),U=U.sibling;return G}function _(G,U){return G=yr(G,U),G.index=0,G.sibling=null,G}function y(G,U,Y){return G.index=Y,i?(Y=G.alternate,Y!==null?(Y=Y.index,Y<U?(G.flags|=2,U):Y):(G.flags|=2,U)):(G.flags|=1048576,U)}function E(G){return i&&G.alternate===null&&(G.flags|=2),G}function L(G,U,Y,de){return U===null||U.tag!==6?(U=Ju(Y,G.mode,de),U.return=G,U):(U=_(U,Y),U.return=G,U)}function z(G,U,Y,de){var Ne=Y.type;return Ne===ne?le(G,U,Y.props.children,de,Y.key):U!==null&&(U.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===Q&&Sp(Ne)===U.type)?(de=_(U,Y.props),de.ref=ko(G,U,Y),de.return=G,de):(de=wl(Y.type,Y.key,Y.props,null,G.mode,de),de.ref=ko(G,U,Y),de.return=G,de)}function X(G,U,Y,de){return U===null||U.tag!==4||U.stateNode.containerInfo!==Y.containerInfo||U.stateNode.implementation!==Y.implementation?(U=eh(Y,G.mode,de),U.return=G,U):(U=_(U,Y.children||[]),U.return=G,U)}function le(G,U,Y,de,Ne){return U===null||U.tag!==7?(U=Yr(Y,G.mode,de,Ne),U.return=G,U):(U=_(U,Y),U.return=G,U)}function ce(G,U,Y){if(typeof U=="string"&&U!==""||typeof U=="number")return U=Ju(""+U,G.mode,Y),U.return=G,U;if(typeof U=="object"&&U!==null){switch(U.$$typeof){case V:return Y=wl(U.type,U.key,U.props,null,G.mode,Y),Y.ref=ko(G,null,U),Y.return=G,Y;case O:return U=eh(U,G.mode,Y),U.return=G,U;case Q:var de=U._init;return ce(G,de(U._payload),Y)}if(oi(U)||J(U))return U=Yr(U,G.mode,Y,null),U.return=G,U;Qa(G,U)}return null}function oe(G,U,Y,de){var Ne=U!==null?U.key:null;if(typeof Y=="string"&&Y!==""||typeof Y=="number")return Ne!==null?null:L(G,U,""+Y,de);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case V:return Y.key===Ne?z(G,U,Y,de):null;case O:return Y.key===Ne?X(G,U,Y,de):null;case Q:return Ne=Y._init,oe(G,U,Ne(Y._payload),de)}if(oi(Y)||J(Y))return Ne!==null?null:le(G,U,Y,de,null);Qa(G,Y)}return null}function ye(G,U,Y,de,Ne){if(typeof de=="string"&&de!==""||typeof de=="number")return G=G.get(Y)||null,L(U,G,""+de,Ne);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case V:return G=G.get(de.key===null?Y:de.key)||null,z(U,G,de,Ne);case O:return G=G.get(de.key===null?Y:de.key)||null,X(U,G,de,Ne);case Q:var Le=de._init;return ye(G,U,Y,Le(de._payload),Ne)}if(oi(de)||J(de))return G=G.get(Y)||null,le(U,G,de,Ne,null);Qa(U,de)}return null}function Ee(G,U,Y,de){for(var Ne=null,Le=null,Oe=U,Fe=U=0,Xt=null;Oe!==null&&Fe<Y.length;Fe++){Oe.index>Fe?(Xt=Oe,Oe=null):Xt=Oe.sibling;var rt=oe(G,Oe,Y[Fe],de);if(rt===null){Oe===null&&(Oe=Xt);break}i&&Oe&&rt.alternate===null&&s(G,Oe),U=y(rt,U,Fe),Le===null?Ne=rt:Le.sibling=rt,Le=rt,Oe=Xt}if(Fe===Y.length)return c(G,Oe),_t&&Ur(G,Fe),Ne;if(Oe===null){for(;Fe<Y.length;Fe++)Oe=ce(G,Y[Fe],de),Oe!==null&&(U=y(Oe,U,Fe),Le===null?Ne=Oe:Le.sibling=Oe,Le=Oe);return _t&&Ur(G,Fe),Ne}for(Oe=f(G,Oe);Fe<Y.length;Fe++)Xt=ye(Oe,G,Fe,Y[Fe],de),Xt!==null&&(i&&Xt.alternate!==null&&Oe.delete(Xt.key===null?Fe:Xt.key),U=y(Xt,U,Fe),Le===null?Ne=Xt:Le.sibling=Xt,Le=Xt);return i&&Oe.forEach(function(br){return s(G,br)}),_t&&Ur(G,Fe),Ne}function Ce(G,U,Y,de){var Ne=J(Y);if(typeof Ne!="function")throw Error(n(150));if(Y=Ne.call(Y),Y==null)throw Error(n(151));for(var Le=Ne=null,Oe=U,Fe=U=0,Xt=null,rt=Y.next();Oe!==null&&!rt.done;Fe++,rt=Y.next()){Oe.index>Fe?(Xt=Oe,Oe=null):Xt=Oe.sibling;var br=oe(G,Oe,rt.value,de);if(br===null){Oe===null&&(Oe=Xt);break}i&&Oe&&br.alternate===null&&s(G,Oe),U=y(br,U,Fe),Le===null?Ne=br:Le.sibling=br,Le=br,Oe=Xt}if(rt.done)return c(G,Oe),_t&&Ur(G,Fe),Ne;if(Oe===null){for(;!rt.done;Fe++,rt=Y.next())rt=ce(G,rt.value,de),rt!==null&&(U=y(rt,U,Fe),Le===null?Ne=rt:Le.sibling=rt,Le=rt);return _t&&Ur(G,Fe),Ne}for(Oe=f(G,Oe);!rt.done;Fe++,rt=Y.next())rt=ye(Oe,G,Fe,rt.value,de),rt!==null&&(i&&rt.alternate!==null&&Oe.delete(rt.key===null?Fe:rt.key),U=y(rt,U,Fe),Le===null?Ne=rt:Le.sibling=rt,Le=rt);return i&&Oe.forEach(function(Mw){return s(G,Mw)}),_t&&Ur(G,Fe),Ne}function Lt(G,U,Y,de){if(typeof Y=="object"&&Y!==null&&Y.type===ne&&Y.key===null&&(Y=Y.props.children),typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case V:e:{for(var Ne=Y.key,Le=U;Le!==null;){if(Le.key===Ne){if(Ne=Y.type,Ne===ne){if(Le.tag===7){c(G,Le.sibling),U=_(Le,Y.props.children),U.return=G,G=U;break e}}else if(Le.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===Q&&Sp(Ne)===Le.type){c(G,Le.sibling),U=_(Le,Y.props),U.ref=ko(G,Le,Y),U.return=G,G=U;break e}c(G,Le);break}else s(G,Le);Le=Le.sibling}Y.type===ne?(U=Yr(Y.props.children,G.mode,de,Y.key),U.return=G,G=U):(de=wl(Y.type,Y.key,Y.props,null,G.mode,de),de.ref=ko(G,U,Y),de.return=G,G=de)}return E(G);case O:e:{for(Le=Y.key;U!==null;){if(U.key===Le)if(U.tag===4&&U.stateNode.containerInfo===Y.containerInfo&&U.stateNode.implementation===Y.implementation){c(G,U.sibling),U=_(U,Y.children||[]),U.return=G,G=U;break e}else{c(G,U);break}else s(G,U);U=U.sibling}U=eh(Y,G.mode,de),U.return=G,G=U}return E(G);case Q:return Le=Y._init,Lt(G,U,Le(Y._payload),de)}if(oi(Y))return Ee(G,U,Y,de);if(J(Y))return Ce(G,U,Y,de);Qa(G,Y)}return typeof Y=="string"&&Y!==""||typeof Y=="number"?(Y=""+Y,U!==null&&U.tag===6?(c(G,U.sibling),U=_(U,Y),U.return=G,G=U):(c(G,U),U=Ju(Y,G.mode,de),U.return=G,G=U),E(G)):c(G,U)}return Lt}var As=wp(!0),xp=wp(!1),Ja=cr(null),el=null,Ls=null,cu=null;function uu(){cu=Ls=el=null}function hu(i){var s=Ja.current;pt(Ja),i._currentValue=s}function du(i,s,c){for(;i!==null;){var f=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,f!==null&&(f.childLanes|=s)):f!==null&&(f.childLanes&s)!==s&&(f.childLanes|=s),i===c)break;i=i.return}}function Os(i,s){el=i,cu=Ls=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(Tn=!0),i.firstContext=null)}function Zn(i){var s=i._currentValue;if(cu!==i)if(i={context:i,memoizedValue:s,next:null},Ls===null){if(el===null)throw Error(n(308));Ls=i,el.dependencies={lanes:0,firstContext:i}}else Ls=Ls.next=i;return s}var Hr=null;function fu(i){Hr===null?Hr=[i]:Hr.push(i)}function kp(i,s,c,f){var _=s.interleaved;return _===null?(c.next=c,fu(s)):(c.next=_.next,_.next=c),s.interleaved=c,Ki(i,f)}function Ki(i,s){i.lanes|=s;var c=i.alternate;for(c!==null&&(c.lanes|=s),c=i,i=i.return;i!==null;)i.childLanes|=s,c=i.alternate,c!==null&&(c.childLanes|=s),c=i,i=i.return;return c.tag===3?c.stateNode:null}var dr=!1;function pu(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ep(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function qi(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function fr(i,s,c){var f=i.updateQueue;if(f===null)return null;if(f=f.shared,(it&2)!==0){var _=f.pending;return _===null?s.next=s:(s.next=_.next,_.next=s),f.pending=s,Ki(i,c)}return _=f.interleaved,_===null?(s.next=s,fu(f)):(s.next=_.next,_.next=s),f.interleaved=s,Ki(i,c)}function tl(i,s,c){if(s=s.updateQueue,s!==null&&(s=s.shared,(c&4194240)!==0)){var f=s.lanes;f&=i.pendingLanes,c|=f,s.lanes=c,oo(i,c)}}function Cp(i,s){var c=i.updateQueue,f=i.alternate;if(f!==null&&(f=f.updateQueue,c===f)){var _=null,y=null;if(c=c.firstBaseUpdate,c!==null){do{var E={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};y===null?_=y=E:y=y.next=E,c=c.next}while(c!==null);y===null?_=y=s:y=y.next=s}else _=y=s;c={baseState:f.baseState,firstBaseUpdate:_,lastBaseUpdate:y,shared:f.shared,effects:f.effects},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=s:i.next=s,c.lastBaseUpdate=s}function nl(i,s,c,f){var _=i.updateQueue;dr=!1;var y=_.firstBaseUpdate,E=_.lastBaseUpdate,L=_.shared.pending;if(L!==null){_.shared.pending=null;var z=L,X=z.next;z.next=null,E===null?y=X:E.next=X,E=z;var le=i.alternate;le!==null&&(le=le.updateQueue,L=le.lastBaseUpdate,L!==E&&(L===null?le.firstBaseUpdate=X:L.next=X,le.lastBaseUpdate=z))}if(y!==null){var ce=_.baseState;E=0,le=X=z=null,L=y;do{var oe=L.lane,ye=L.eventTime;if((f&oe)===oe){le!==null&&(le=le.next={eventTime:ye,lane:0,tag:L.tag,payload:L.payload,callback:L.callback,next:null});e:{var Ee=i,Ce=L;switch(oe=s,ye=c,Ce.tag){case 1:if(Ee=Ce.payload,typeof Ee=="function"){ce=Ee.call(ye,ce,oe);break e}ce=Ee;break e;case 3:Ee.flags=Ee.flags&-65537|128;case 0:if(Ee=Ce.payload,oe=typeof Ee=="function"?Ee.call(ye,ce,oe):Ee,oe==null)break e;ce=k({},ce,oe);break e;case 2:dr=!0}}L.callback!==null&&L.lane!==0&&(i.flags|=64,oe=_.effects,oe===null?_.effects=[L]:oe.push(L))}else ye={eventTime:ye,lane:oe,tag:L.tag,payload:L.payload,callback:L.callback,next:null},le===null?(X=le=ye,z=ce):le=le.next=ye,E|=oe;if(L=L.next,L===null){if(L=_.shared.pending,L===null)break;oe=L,L=oe.next,oe.next=null,_.lastBaseUpdate=oe,_.shared.pending=null}}while(!0);if(le===null&&(z=ce),_.baseState=z,_.firstBaseUpdate=X,_.lastBaseUpdate=le,s=_.shared.interleaved,s!==null){_=s;do E|=_.lane,_=_.next;while(_!==s)}else y===null&&(_.shared.lanes=0);Kr|=E,i.lanes=E,i.memoizedState=ce}}function Np(i,s,c){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var f=i[s],_=f.callback;if(_!==null){if(f.callback=null,f=c,typeof _!="function")throw Error(n(191,_));_.call(f)}}}var Eo={},ki=cr(Eo),Co=cr(Eo),No=cr(Eo);function $r(i){if(i===Eo)throw Error(n(174));return i}function mu(i,s){switch(ht(No,s),ht(Co,i),ht(ki,Eo),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:fe(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=fe(s,i)}pt(ki),ht(ki,s)}function Is(){pt(ki),pt(Co),pt(No)}function Tp(i){$r(No.current);var s=$r(ki.current),c=fe(s,i.type);s!==c&&(ht(Co,i),ht(ki,c))}function gu(i){Co.current===i&&(pt(ki),pt(Co))}var St=cr(0);function il(i){for(var s=i;s!==null;){if(s.tag===13){var c=s.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||c.data==="$?"||c.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var _u=[];function vu(){for(var i=0;i<_u.length;i++)_u[i]._workInProgressVersionPrimary=null;_u.length=0}var rl=A.ReactCurrentDispatcher,yu=A.ReactCurrentBatchConfig,Wr=0,wt=null,Ht=null,Gt=null,sl=!1,To=!1,Ro=0,QS=0;function un(){throw Error(n(321))}function bu(i,s){if(s===null)return!1;for(var c=0;c<s.length&&c<i.length;c++)if(!ui(i[c],s[c]))return!1;return!0}function Su(i,s,c,f,_,y){if(Wr=y,wt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,rl.current=i===null||i.memoizedState===null?nw:iw,i=c(f,_),To){y=0;do{if(To=!1,Ro=0,25<=y)throw Error(n(301));y+=1,Gt=Ht=null,s.updateQueue=null,rl.current=rw,i=c(f,_)}while(To)}if(rl.current=ll,s=Ht!==null&&Ht.next!==null,Wr=0,Gt=Ht=wt=null,sl=!1,s)throw Error(n(300));return i}function wu(){var i=Ro!==0;return Ro=0,i}function Ei(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Gt===null?wt.memoizedState=Gt=i:Gt=Gt.next=i,Gt}function Qn(){if(Ht===null){var i=wt.alternate;i=i!==null?i.memoizedState:null}else i=Ht.next;var s=Gt===null?wt.memoizedState:Gt.next;if(s!==null)Gt=s,Ht=i;else{if(i===null)throw Error(n(310));Ht=i,i={memoizedState:Ht.memoizedState,baseState:Ht.baseState,baseQueue:Ht.baseQueue,queue:Ht.queue,next:null},Gt===null?wt.memoizedState=Gt=i:Gt=Gt.next=i}return Gt}function Mo(i,s){return typeof s=="function"?s(i):s}function xu(i){var s=Qn(),c=s.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var f=Ht,_=f.baseQueue,y=c.pending;if(y!==null){if(_!==null){var E=_.next;_.next=y.next,y.next=E}f.baseQueue=_=y,c.pending=null}if(_!==null){y=_.next,f=f.baseState;var L=E=null,z=null,X=y;do{var le=X.lane;if((Wr&le)===le)z!==null&&(z=z.next={lane:0,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null}),f=X.hasEagerState?X.eagerState:i(f,X.action);else{var ce={lane:le,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null};z===null?(L=z=ce,E=f):z=z.next=ce,wt.lanes|=le,Kr|=le}X=X.next}while(X!==null&&X!==y);z===null?E=f:z.next=L,ui(f,s.memoizedState)||(Tn=!0),s.memoizedState=f,s.baseState=E,s.baseQueue=z,c.lastRenderedState=f}if(i=c.interleaved,i!==null){_=i;do y=_.lane,wt.lanes|=y,Kr|=y,_=_.next;while(_!==i)}else _===null&&(c.lanes=0);return[s.memoizedState,c.dispatch]}function ku(i){var s=Qn(),c=s.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var f=c.dispatch,_=c.pending,y=s.memoizedState;if(_!==null){c.pending=null;var E=_=_.next;do y=i(y,E.action),E=E.next;while(E!==_);ui(y,s.memoizedState)||(Tn=!0),s.memoizedState=y,s.baseQueue===null&&(s.baseState=y),c.lastRenderedState=y}return[y,f]}function Rp(){}function Mp(i,s){var c=wt,f=Qn(),_=s(),y=!ui(f.memoizedState,_);if(y&&(f.memoizedState=_,Tn=!0),f=f.queue,Eu(Op.bind(null,c,f,i),[i]),f.getSnapshot!==s||y||Gt!==null&&Gt.memoizedState.tag&1){if(c.flags|=2048,Ao(9,Lp.bind(null,c,f,_,s),void 0,null),Yt===null)throw Error(n(349));(Wr&30)!==0||Ap(c,s,_)}return _}function Ap(i,s,c){i.flags|=16384,i={getSnapshot:s,value:c},s=wt.updateQueue,s===null?(s={lastEffect:null,stores:null},wt.updateQueue=s,s.stores=[i]):(c=s.stores,c===null?s.stores=[i]:c.push(i))}function Lp(i,s,c,f){s.value=c,s.getSnapshot=f,Ip(s)&&Dp(i)}function Op(i,s,c){return c(function(){Ip(s)&&Dp(i)})}function Ip(i){var s=i.getSnapshot;i=i.value;try{var c=s();return!ui(i,c)}catch{return!0}}function Dp(i){var s=Ki(i,1);s!==null&&mi(s,i,1,-1)}function Pp(i){var s=Ei();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Mo,lastRenderedState:i},s.queue=i,i=i.dispatch=tw.bind(null,wt,i),[s.memoizedState,i]}function Ao(i,s,c,f){return i={tag:i,create:s,destroy:c,deps:f,next:null},s=wt.updateQueue,s===null?(s={lastEffect:null,stores:null},wt.updateQueue=s,s.lastEffect=i.next=i):(c=s.lastEffect,c===null?s.lastEffect=i.next=i:(f=c.next,c.next=i,i.next=f,s.lastEffect=i)),i}function Bp(){return Qn().memoizedState}function ol(i,s,c,f){var _=Ei();wt.flags|=i,_.memoizedState=Ao(1|s,c,void 0,f===void 0?null:f)}function al(i,s,c,f){var _=Qn();f=f===void 0?null:f;var y=void 0;if(Ht!==null){var E=Ht.memoizedState;if(y=E.destroy,f!==null&&bu(f,E.deps)){_.memoizedState=Ao(s,c,y,f);return}}wt.flags|=i,_.memoizedState=Ao(1|s,c,y,f)}function Fp(i,s){return ol(8390656,8,i,s)}function Eu(i,s){return al(2048,8,i,s)}function zp(i,s){return al(4,2,i,s)}function jp(i,s){return al(4,4,i,s)}function Up(i,s){if(typeof s=="function")return i=i(),s(i),function(){s(null)};if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function Hp(i,s,c){return c=c!=null?c.concat([i]):null,al(4,4,Up.bind(null,s,i),c)}function Cu(){}function $p(i,s){var c=Qn();s=s===void 0?null:s;var f=c.memoizedState;return f!==null&&s!==null&&bu(s,f[1])?f[0]:(c.memoizedState=[i,s],i)}function Wp(i,s){var c=Qn();s=s===void 0?null:s;var f=c.memoizedState;return f!==null&&s!==null&&bu(s,f[1])?f[0]:(i=i(),c.memoizedState=[i,s],i)}function Kp(i,s,c){return(Wr&21)===0?(i.baseState&&(i.baseState=!1,Tn=!0),i.memoizedState=c):(ui(c,s)||(c=Ra(),wt.lanes|=c,Kr|=c,i.baseState=!0),s)}function JS(i,s){var c=nt;nt=c!==0&&4>c?c:4,i(!0);var f=yu.transition;yu.transition={};try{i(!1),s()}finally{nt=c,yu.transition=f}}function qp(){return Qn().memoizedState}function ew(i,s,c){var f=_r(i);if(c={lane:f,action:c,hasEagerState:!1,eagerState:null,next:null},Vp(i))Gp(s,c);else if(c=kp(i,s,c,f),c!==null){var _=yn();mi(c,i,f,_),Yp(c,s,f)}}function tw(i,s,c){var f=_r(i),_={lane:f,action:c,hasEagerState:!1,eagerState:null,next:null};if(Vp(i))Gp(s,_);else{var y=i.alternate;if(i.lanes===0&&(y===null||y.lanes===0)&&(y=s.lastRenderedReducer,y!==null))try{var E=s.lastRenderedState,L=y(E,c);if(_.hasEagerState=!0,_.eagerState=L,ui(L,E)){var z=s.interleaved;z===null?(_.next=_,fu(s)):(_.next=z.next,z.next=_),s.interleaved=_;return}}catch{}finally{}c=kp(i,s,_,f),c!==null&&(_=yn(),mi(c,i,f,_),Yp(c,s,f))}}function Vp(i){var s=i.alternate;return i===wt||s!==null&&s===wt}function Gp(i,s){To=sl=!0;var c=i.pending;c===null?s.next=s:(s.next=c.next,c.next=s),i.pending=s}function Yp(i,s,c){if((c&4194240)!==0){var f=s.lanes;f&=i.pendingLanes,c|=f,s.lanes=c,oo(i,c)}}var ll={readContext:Zn,useCallback:un,useContext:un,useEffect:un,useImperativeHandle:un,useInsertionEffect:un,useLayoutEffect:un,useMemo:un,useReducer:un,useRef:un,useState:un,useDebugValue:un,useDeferredValue:un,useTransition:un,useMutableSource:un,useSyncExternalStore:un,useId:un,unstable_isNewReconciler:!1},nw={readContext:Zn,useCallback:function(i,s){return Ei().memoizedState=[i,s===void 0?null:s],i},useContext:Zn,useEffect:Fp,useImperativeHandle:function(i,s,c){return c=c!=null?c.concat([i]):null,ol(4194308,4,Up.bind(null,s,i),c)},useLayoutEffect:function(i,s){return ol(4194308,4,i,s)},useInsertionEffect:function(i,s){return ol(4,2,i,s)},useMemo:function(i,s){var c=Ei();return s=s===void 0?null:s,i=i(),c.memoizedState=[i,s],i},useReducer:function(i,s,c){var f=Ei();return s=c!==void 0?c(s):s,f.memoizedState=f.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},f.queue=i,i=i.dispatch=ew.bind(null,wt,i),[f.memoizedState,i]},useRef:function(i){var s=Ei();return i={current:i},s.memoizedState=i},useState:Pp,useDebugValue:Cu,useDeferredValue:function(i){return Ei().memoizedState=i},useTransition:function(){var i=Pp(!1),s=i[0];return i=JS.bind(null,i[1]),Ei().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,c){var f=wt,_=Ei();if(_t){if(c===void 0)throw Error(n(407));c=c()}else{if(c=s(),Yt===null)throw Error(n(349));(Wr&30)!==0||Ap(f,s,c)}_.memoizedState=c;var y={value:c,getSnapshot:s};return _.queue=y,Fp(Op.bind(null,f,y,i),[i]),f.flags|=2048,Ao(9,Lp.bind(null,f,y,c,s),void 0,null),c},useId:function(){var i=Ei(),s=Yt.identifierPrefix;if(_t){var c=Wi,f=$i;c=(f&~(1<<32-bt(f)-1)).toString(32)+c,s=":"+s+"R"+c,c=Ro++,0<c&&(s+="H"+c.toString(32)),s+=":"}else c=QS++,s=":"+s+"r"+c.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},iw={readContext:Zn,useCallback:$p,useContext:Zn,useEffect:Eu,useImperativeHandle:Hp,useInsertionEffect:zp,useLayoutEffect:jp,useMemo:Wp,useReducer:xu,useRef:Bp,useState:function(){return xu(Mo)},useDebugValue:Cu,useDeferredValue:function(i){var s=Qn();return Kp(s,Ht.memoizedState,i)},useTransition:function(){var i=xu(Mo)[0],s=Qn().memoizedState;return[i,s]},useMutableSource:Rp,useSyncExternalStore:Mp,useId:qp,unstable_isNewReconciler:!1},rw={readContext:Zn,useCallback:$p,useContext:Zn,useEffect:Eu,useImperativeHandle:Hp,useInsertionEffect:zp,useLayoutEffect:jp,useMemo:Wp,useReducer:ku,useRef:Bp,useState:function(){return ku(Mo)},useDebugValue:Cu,useDeferredValue:function(i){var s=Qn();return Ht===null?s.memoizedState=i:Kp(s,Ht.memoizedState,i)},useTransition:function(){var i=ku(Mo)[0],s=Qn().memoizedState;return[i,s]},useMutableSource:Rp,useSyncExternalStore:Mp,useId:qp,unstable_isNewReconciler:!1};function di(i,s){if(i&&i.defaultProps){s=k({},s),i=i.defaultProps;for(var c in i)s[c]===void 0&&(s[c]=i[c]);return s}return s}function Nu(i,s,c,f){s=i.memoizedState,c=c(f,s),c=c==null?s:k({},s,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var cl={isMounted:function(i){return(i=i._reactInternals)?ji(i)===i:!1},enqueueSetState:function(i,s,c){i=i._reactInternals;var f=yn(),_=_r(i),y=qi(f,_);y.payload=s,c!=null&&(y.callback=c),s=fr(i,y,_),s!==null&&(mi(s,i,_,f),tl(s,i,_))},enqueueReplaceState:function(i,s,c){i=i._reactInternals;var f=yn(),_=_r(i),y=qi(f,_);y.tag=1,y.payload=s,c!=null&&(y.callback=c),s=fr(i,y,_),s!==null&&(mi(s,i,_,f),tl(s,i,_))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var c=yn(),f=_r(i),_=qi(c,f);_.tag=2,s!=null&&(_.callback=s),s=fr(i,_,f),s!==null&&(mi(s,i,f,c),tl(s,i,f))}};function Xp(i,s,c,f,_,y,E){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(f,y,E):s.prototype&&s.prototype.isPureReactComponent?!_o(c,f)||!_o(_,y):!0}function Zp(i,s,c){var f=!1,_=ur,y=s.contextType;return typeof y=="object"&&y!==null?y=Zn(y):(_=Nn(s)?zr:cn.current,f=s.contextTypes,y=(f=f!=null)?Ns(i,_):ur),s=new s(c,y),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=cl,i.stateNode=s,s._reactInternals=i,f&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=_,i.__reactInternalMemoizedMaskedChildContext=y),s}function Qp(i,s,c,f){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(c,f),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(c,f),s.state!==i&&cl.enqueueReplaceState(s,s.state,null)}function Tu(i,s,c,f){var _=i.stateNode;_.props=c,_.state=i.memoizedState,_.refs={},pu(i);var y=s.contextType;typeof y=="object"&&y!==null?_.context=Zn(y):(y=Nn(s)?zr:cn.current,_.context=Ns(i,y)),_.state=i.memoizedState,y=s.getDerivedStateFromProps,typeof y=="function"&&(Nu(i,s,y,c),_.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof _.getSnapshotBeforeUpdate=="function"||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(s=_.state,typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount(),s!==_.state&&cl.enqueueReplaceState(_,_.state,null),nl(i,c,_,f),_.state=i.memoizedState),typeof _.componentDidMount=="function"&&(i.flags|=4194308)}function Ds(i,s){try{var c="",f=s;do c+=ge(f),f=f.return;while(f);var _=c}catch(y){_=`
39
39
  Error generating stack: `+y.message+`
40
- `+y.stack}return{value:i,source:s,stack:_,digest:null}}function Ru(i,s,c){return{value:i,source:null,stack:c??null,digest:s??null}}function Mu(i,s){try{console.error(s.value)}catch(c){setTimeout(function(){throw c})}}var sw=typeof WeakMap=="function"?WeakMap:Map;function Jp(i,s,c){c=qi(-1,c),c.tag=3,c.payload={element:null};var f=s.value;return c.callback=function(){gl||(gl=!0,Ku=f),Mu(i,s)},c}function em(i,s,c){c=qi(-1,c),c.tag=3;var f=i.type.getDerivedStateFromError;if(typeof f=="function"){var _=s.value;c.payload=function(){return f(_)},c.callback=function(){Mu(i,s)}}var y=i.stateNode;return y!==null&&typeof y.componentDidCatch=="function"&&(c.callback=function(){Mu(i,s),typeof f!="function"&&(mr===null?mr=new Set([this]):mr.add(this));var E=s.stack;this.componentDidCatch(s.value,{componentStack:E!==null?E:""})}),c}function tm(i,s,c){var f=i.pingCache;if(f===null){f=i.pingCache=new sw;var _=new Set;f.set(s,_)}else _=f.get(s),_===void 0&&(_=new Set,f.set(s,_));_.has(c)||(_.add(c),i=yw.bind(null,i,s,c),s.then(i,i))}function nm(i){do{var s;if((s=i.tag===13)&&(s=i.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return i;i=i.return}while(i!==null);return null}function im(i,s,c,f,_){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,c.flags|=131072,c.flags&=-52805,c.tag===1&&(c.alternate===null?c.tag=17:(s=qi(-1,1),s.tag=2,fr(c,s,1))),c.lanes|=1),i):(i.flags|=65536,i.lanes=_,i)}var ow=A.ReactCurrentOwner,Tn=!1;function vn(i,s,c,f){s.child=i===null?xp(s,null,c,f):As(s,i.child,c,f)}function rm(i,s,c,f,_){c=c.render;var y=s.ref;return Os(s,_),f=Su(i,s,c,f,y,_),c=wu(),i!==null&&!Tn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~_,Vi(i,s,_)):(_t&&c&&ru(s),s.flags|=1,vn(i,s,f,_),s.child)}function sm(i,s,c,f,_){if(i===null){var y=c.type;return typeof y=="function"&&!Qu(y)&&y.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(s.tag=15,s.type=y,om(i,s,y,f,_)):(i=wl(c.type,null,f,s,s.mode,_),i.ref=s.ref,i.return=s,s.child=i)}if(y=i.child,(i.lanes&_)===0){var E=y.memoizedProps;if(c=c.compare,c=c!==null?c:_o,c(E,f)&&i.ref===s.ref)return Vi(i,s,_)}return s.flags|=1,i=yr(y,f),i.ref=s.ref,i.return=s,s.child=i}function om(i,s,c,f,_){if(i!==null){var y=i.memoizedProps;if(_o(y,f)&&i.ref===s.ref)if(Tn=!1,s.pendingProps=f=y,(i.lanes&_)!==0)(i.flags&131072)!==0&&(Tn=!0);else return s.lanes=i.lanes,Vi(i,s,_)}return Au(i,s,c,f,_)}function am(i,s,c){var f=s.pendingProps,_=f.children,y=i!==null?i.memoizedState:null;if(f.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},ht(Bs,jn),jn|=c;else{if((c&1073741824)===0)return i=y!==null?y.baseLanes|c:c,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,ht(Bs,jn),jn|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=y!==null?y.baseLanes:c,ht(Bs,jn),jn|=f}else y!==null?(f=y.baseLanes|c,s.memoizedState=null):f=c,ht(Bs,jn),jn|=f;return vn(i,s,_,c),s.child}function lm(i,s){var c=s.ref;(i===null&&c!==null||i!==null&&i.ref!==c)&&(s.flags|=512,s.flags|=2097152)}function Au(i,s,c,f,_){var y=Nn(c)?zr:cn.current;return y=Ns(s,y),Os(s,_),c=Su(i,s,c,f,y,_),f=wu(),i!==null&&!Tn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~_,Vi(i,s,_)):(_t&&f&&ru(s),s.flags|=1,vn(i,s,c,_),s.child)}function cm(i,s,c,f,_){if(Nn(c)){var y=!0;Va(s)}else y=!1;if(Os(s,_),s.stateNode===null)hl(i,s),Zp(s,c,f),Tu(s,c,f,_),f=!0;else if(i===null){var E=s.stateNode,L=s.memoizedProps;E.props=L;var z=E.context,X=c.contextType;typeof X=="object"&&X!==null?X=Zn(X):(X=Nn(c)?zr:cn.current,X=Ns(s,X));var le=c.getDerivedStateFromProps,ce=typeof le=="function"||typeof E.getSnapshotBeforeUpdate=="function";ce||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(L!==f||z!==X)&&Qp(s,E,f,X),dr=!1;var oe=s.memoizedState;E.state=oe,nl(s,f,E,_),z=s.memoizedState,L!==f||oe!==z||Cn.current||dr?(typeof le=="function"&&(Nu(s,c,le,f),z=s.memoizedState),(L=dr||Xp(s,c,L,f,oe,z,X))?(ce||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount()),typeof E.componentDidMount=="function"&&(s.flags|=4194308)):(typeof E.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=f,s.memoizedState=z),E.props=f,E.state=z,E.context=X,f=L):(typeof E.componentDidMount=="function"&&(s.flags|=4194308),f=!1)}else{E=s.stateNode,Ep(i,s),L=s.memoizedProps,X=s.type===s.elementType?L:di(s.type,L),E.props=X,ce=s.pendingProps,oe=E.context,z=c.contextType,typeof z=="object"&&z!==null?z=Zn(z):(z=Nn(c)?zr:cn.current,z=Ns(s,z));var ye=c.getDerivedStateFromProps;(le=typeof ye=="function"||typeof E.getSnapshotBeforeUpdate=="function")||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(L!==ce||oe!==z)&&Qp(s,E,f,z),dr=!1,oe=s.memoizedState,E.state=oe,nl(s,f,E,_);var Ee=s.memoizedState;L!==ce||oe!==Ee||Cn.current||dr?(typeof ye=="function"&&(Nu(s,c,ye,f),Ee=s.memoizedState),(X=dr||Xp(s,c,X,f,oe,Ee,z)||!1)?(le||typeof E.UNSAFE_componentWillUpdate!="function"&&typeof E.componentWillUpdate!="function"||(typeof E.componentWillUpdate=="function"&&E.componentWillUpdate(f,Ee,z),typeof E.UNSAFE_componentWillUpdate=="function"&&E.UNSAFE_componentWillUpdate(f,Ee,z)),typeof E.componentDidUpdate=="function"&&(s.flags|=4),typeof E.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof E.componentDidUpdate!="function"||L===i.memoizedProps&&oe===i.memoizedState||(s.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&oe===i.memoizedState||(s.flags|=1024),s.memoizedProps=f,s.memoizedState=Ee),E.props=f,E.state=Ee,E.context=z,f=X):(typeof E.componentDidUpdate!="function"||L===i.memoizedProps&&oe===i.memoizedState||(s.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&oe===i.memoizedState||(s.flags|=1024),f=!1)}return Lu(i,s,c,f,y,_)}function Lu(i,s,c,f,_,y){lm(i,s);var E=(s.flags&128)!==0;if(!f&&!E)return _&&pp(s,c,!1),Vi(i,s,y);f=s.stateNode,ow.current=s;var L=E&&typeof c.getDerivedStateFromError!="function"?null:f.render();return s.flags|=1,i!==null&&E?(s.child=As(s,i.child,null,y),s.child=As(s,null,L,y)):vn(i,s,L,y),s.memoizedState=f.state,_&&pp(s,c,!0),s.child}function um(i){var s=i.stateNode;s.pendingContext?dp(i,s.pendingContext,s.pendingContext!==s.context):s.context&&dp(i,s.context,!1),mu(i,s.containerInfo)}function hm(i,s,c,f,_){return Ms(),lu(_),s.flags|=256,vn(i,s,c,f),s.child}var Ou={dehydrated:null,treeContext:null,retryLane:0};function Iu(i){return{baseLanes:i,cachePool:null,transitions:null}}function dm(i,s,c){var f=s.pendingProps,_=St.current,y=!1,E=(s.flags&128)!==0,L;if((L=E)||(L=i!==null&&i.memoizedState===null?!1:(_&2)!==0),L?(y=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(_|=1),ht(St,_&1),i===null)return au(s),i=s.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((s.mode&1)===0?s.lanes=1:i.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(E=f.children,i=f.fallback,y?(f=s.mode,y=s.child,E={mode:"hidden",children:E},(f&1)===0&&y!==null?(y.childLanes=0,y.pendingProps=E):y=xl(E,f,0,null),i=Yr(i,f,c,null),y.return=s,i.return=s,y.sibling=i,s.child=y,s.child.memoizedState=Iu(c),s.memoizedState=Ou,i):Du(s,E));if(_=i.memoizedState,_!==null&&(L=_.dehydrated,L!==null))return aw(i,s,E,f,L,_,c);if(y){y=f.fallback,E=s.mode,_=i.child,L=_.sibling;var z={mode:"hidden",children:f.children};return(E&1)===0&&s.child!==_?(f=s.child,f.childLanes=0,f.pendingProps=z,s.deletions=null):(f=yr(_,z),f.subtreeFlags=_.subtreeFlags&14680064),L!==null?y=yr(L,y):(y=Yr(y,E,c,null),y.flags|=2),y.return=s,f.return=s,f.sibling=y,s.child=f,f=y,y=s.child,E=i.child.memoizedState,E=E===null?Iu(c):{baseLanes:E.baseLanes|c,cachePool:null,transitions:E.transitions},y.memoizedState=E,y.childLanes=i.childLanes&~c,s.memoizedState=Ou,f}return y=i.child,i=y.sibling,f=yr(y,{mode:"visible",children:f.children}),(s.mode&1)===0&&(f.lanes=c),f.return=s,f.sibling=null,i!==null&&(c=s.deletions,c===null?(s.deletions=[i],s.flags|=16):c.push(i)),s.child=f,s.memoizedState=null,f}function Du(i,s){return s=xl({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function ul(i,s,c,f){return f!==null&&lu(f),As(s,i.child,null,c),i=Du(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function aw(i,s,c,f,_,y,E){if(c)return s.flags&256?(s.flags&=-257,f=Ru(Error(n(422))),ul(i,s,E,f)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(y=f.fallback,_=s.mode,f=xl({mode:"visible",children:f.children},_,0,null),y=Yr(y,_,E,null),y.flags|=2,f.return=s,y.return=s,f.sibling=y,s.child=f,(s.mode&1)!==0&&As(s,i.child,null,E),s.child.memoizedState=Iu(E),s.memoizedState=Ou,y);if((s.mode&1)===0)return ul(i,s,E,null);if(_.data==="$!"){if(f=_.nextSibling&&_.nextSibling.dataset,f)var L=f.dgst;return f=L,y=Error(n(419)),f=Ru(y,f,void 0),ul(i,s,E,f)}if(L=(E&i.childLanes)!==0,Tn||L){if(f=Yt,f!==null){switch(E&-E){case 4:_=2;break;case 16:_=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:_=32;break;case 536870912:_=268435456;break;default:_=0}_=(_&(f.suspendedLanes|E))!==0?0:_,_!==0&&_!==y.retryLane&&(y.retryLane=_,Ki(i,_),mi(f,i,_,-1))}return Zu(),f=Ru(Error(n(421))),ul(i,s,E,f)}return _.data==="$?"?(s.flags|=128,s.child=i.child,s=bw.bind(null,i),_._reactRetry=s,null):(i=y.treeContext,zn=lr(_.nextSibling),Fn=s,_t=!0,hi=null,i!==null&&(Yn[Xn++]=$i,Yn[Xn++]=Wi,Yn[Xn++]=jr,$i=i.id,Wi=i.overflow,jr=s),s=Du(s,f.children),s.flags|=4096,s)}function fm(i,s,c){i.lanes|=s;var f=i.alternate;f!==null&&(f.lanes|=s),du(i.return,s,c)}function Pu(i,s,c,f,_){var y=i.memoizedState;y===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:f,tail:c,tailMode:_}:(y.isBackwards=s,y.rendering=null,y.renderingStartTime=0,y.last=f,y.tail=c,y.tailMode=_)}function pm(i,s,c){var f=s.pendingProps,_=f.revealOrder,y=f.tail;if(vn(i,s,f.children,c),f=St.current,(f&2)!==0)f=f&1|2,s.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&fm(i,c,s);else if(i.tag===19)fm(i,c,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}f&=1}if(ht(St,f),(s.mode&1)===0)s.memoizedState=null;else switch(_){case"forwards":for(c=s.child,_=null;c!==null;)i=c.alternate,i!==null&&il(i)===null&&(_=c),c=c.sibling;c=_,c===null?(_=s.child,s.child=null):(_=c.sibling,c.sibling=null),Pu(s,!1,_,c,y);break;case"backwards":for(c=null,_=s.child,s.child=null;_!==null;){if(i=_.alternate,i!==null&&il(i)===null){s.child=_;break}i=_.sibling,_.sibling=c,c=_,_=i}Pu(s,!0,c,null,y);break;case"together":Pu(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function hl(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function Vi(i,s,c){if(i!==null&&(s.dependencies=i.dependencies),Kr|=s.lanes,(c&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(n(153));if(s.child!==null){for(i=s.child,c=yr(i,i.pendingProps),s.child=c,c.return=s;i.sibling!==null;)i=i.sibling,c=c.sibling=yr(i,i.pendingProps),c.return=s;c.sibling=null}return s.child}function lw(i,s,c){switch(s.tag){case 3:um(s),Ms();break;case 5:Tp(s);break;case 1:Nn(s.type)&&Va(s);break;case 4:mu(s,s.stateNode.containerInfo);break;case 10:var f=s.type._context,_=s.memoizedProps.value;ht(Ja,f._currentValue),f._currentValue=_;break;case 13:if(f=s.memoizedState,f!==null)return f.dehydrated!==null?(ht(St,St.current&1),s.flags|=128,null):(c&s.child.childLanes)!==0?dm(i,s,c):(ht(St,St.current&1),i=Vi(i,s,c),i!==null?i.sibling:null);ht(St,St.current&1);break;case 19:if(f=(c&s.childLanes)!==0,(i.flags&128)!==0){if(f)return pm(i,s,c);s.flags|=128}if(_=s.memoizedState,_!==null&&(_.rendering=null,_.tail=null,_.lastEffect=null),ht(St,St.current),f)break;return null;case 22:case 23:return s.lanes=0,am(i,s,c)}return Vi(i,s,c)}var mm,Bu,gm,_m;mm=function(i,s){for(var c=s.child;c!==null;){if(c.tag===5||c.tag===6)i.appendChild(c.stateNode);else if(c.tag!==4&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===s)break;for(;c.sibling===null;){if(c.return===null||c.return===s)return;c=c.return}c.sibling.return=c.return,c=c.sibling}},Bu=function(){},gm=function(i,s,c,f){var _=i.memoizedProps;if(_!==f){i=s.stateNode,$r(ki.current);var y=null;switch(c){case"input":_=Dn(i,_),f=Dn(i,f),y=[];break;case"select":_=k({},_,{value:void 0}),f=k({},f,{value:void 0}),y=[];break;case"textarea":_=Rr(i,_),f=Rr(i,f),y=[];break;default:typeof _.onClick!="function"&&typeof f.onClick=="function"&&(i.onclick=Wa)}Ut(c,f);var E;c=null;for(X in _)if(!f.hasOwnProperty(X)&&_.hasOwnProperty(X)&&_[X]!=null)if(X==="style"){var L=_[X];for(E in L)L.hasOwnProperty(E)&&(c||(c={}),c[E]="")}else X!=="dangerouslySetInnerHTML"&&X!=="children"&&X!=="suppressContentEditableWarning"&&X!=="suppressHydrationWarning"&&X!=="autoFocus"&&(o.hasOwnProperty(X)?y||(y=[]):(y=y||[]).push(X,null));for(X in f){var z=f[X];if(L=_!=null?_[X]:void 0,f.hasOwnProperty(X)&&z!==L&&(z!=null||L!=null))if(X==="style")if(L){for(E in L)!L.hasOwnProperty(E)||z&&z.hasOwnProperty(E)||(c||(c={}),c[E]="");for(E in z)z.hasOwnProperty(E)&&L[E]!==z[E]&&(c||(c={}),c[E]=z[E])}else c||(y||(y=[]),y.push(X,c)),c=z;else X==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,L=L?L.__html:void 0,z!=null&&L!==z&&(y=y||[]).push(X,z)):X==="children"?typeof z!="string"&&typeof z!="number"||(y=y||[]).push(X,""+z):X!=="suppressContentEditableWarning"&&X!=="suppressHydrationWarning"&&(o.hasOwnProperty(X)?(z!=null&&X==="onScroll"&&ft("scroll",i),y||L===z||(y=[])):(y=y||[]).push(X,z))}c&&(y=y||[]).push("style",c);var X=y;(s.updateQueue=X)&&(s.flags|=4)}},_m=function(i,s,c,f){c!==f&&(s.flags|=4)};function Lo(i,s){if(!_t)switch(i.tailMode){case"hidden":s=i.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?i.tail=null:c.sibling=null;break;case"collapsed":c=i.tail;for(var f=null;c!==null;)c.alternate!==null&&(f=c),c=c.sibling;f===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:f.sibling=null}}function hn(i){var s=i.alternate!==null&&i.alternate.child===i.child,c=0,f=0;if(s)for(var _=i.child;_!==null;)c|=_.lanes|_.childLanes,f|=_.subtreeFlags&14680064,f|=_.flags&14680064,_.return=i,_=_.sibling;else for(_=i.child;_!==null;)c|=_.lanes|_.childLanes,f|=_.subtreeFlags,f|=_.flags,_.return=i,_=_.sibling;return i.subtreeFlags|=f,i.childLanes=c,s}function cw(i,s,c){var f=s.pendingProps;switch(su(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return hn(s),null;case 1:return Nn(s.type)&&qa(),hn(s),null;case 3:return f=s.stateNode,Is(),pt(Cn),pt(cn),vu(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(i===null||i.child===null)&&(Za(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,hi!==null&&(Gu(hi),hi=null))),Bu(i,s),hn(s),null;case 5:gu(s);var _=$r(No.current);if(c=s.type,i!==null&&s.stateNode!=null)gm(i,s,c,f,_),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!f){if(s.stateNode===null)throw Error(n(166));return hn(s),null}if(i=$r(ki.current),Za(s)){f=s.stateNode,c=s.type;var y=s.memoizedProps;switch(f[xi]=s,f[wo]=y,i=(s.mode&1)!==0,c){case"dialog":ft("cancel",f),ft("close",f);break;case"iframe":case"object":case"embed":ft("load",f);break;case"video":case"audio":for(_=0;_<yo.length;_++)ft(yo[_],f);break;case"source":ft("error",f);break;case"img":case"image":case"link":ft("error",f),ft("load",f);break;case"details":ft("toggle",f);break;case"input":Pi(f,y),ft("invalid",f);break;case"select":f._wrapperState={wasMultiple:!!y.multiple},ft("invalid",f);break;case"textarea":Mr(f,y),ft("invalid",f)}Ut(c,y),_=null;for(var E in y)if(y.hasOwnProperty(E)){var L=y[E];E==="children"?typeof L=="string"?f.textContent!==L&&(y.suppressHydrationWarning!==!0&&$a(f.textContent,L,i),_=["children",L]):typeof L=="number"&&f.textContent!==""+L&&(y.suppressHydrationWarning!==!0&&$a(f.textContent,L,i),_=["children",""+L]):o.hasOwnProperty(E)&&L!=null&&E==="onScroll"&&ft("scroll",f)}switch(c){case"input":zt(f),Kn(f,y,!0);break;case"textarea":zt(f),Ar(f);break;case"select":case"option":break;default:typeof y.onClick=="function"&&(f.onclick=Wa)}f=_,s.updateQueue=f,f!==null&&(s.flags|=4)}else{E=_.nodeType===9?_:_.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=ee(c)),i==="http://www.w3.org/1999/xhtml"?c==="script"?(i=E.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof f.is=="string"?i=E.createElement(c,{is:f.is}):(i=E.createElement(c),c==="select"&&(E=i,f.multiple?E.multiple=!0:f.size&&(E.size=f.size))):i=E.createElementNS(i,c),i[xi]=s,i[wo]=f,mm(i,s,!1,!1),s.stateNode=i;e:{switch(E=Vn(c,f),c){case"dialog":ft("cancel",i),ft("close",i),_=f;break;case"iframe":case"object":case"embed":ft("load",i),_=f;break;case"video":case"audio":for(_=0;_<yo.length;_++)ft(yo[_],i);_=f;break;case"source":ft("error",i),_=f;break;case"img":case"image":case"link":ft("error",i),ft("load",i),_=f;break;case"details":ft("toggle",i),_=f;break;case"input":Pi(i,f),_=Dn(i,f),ft("invalid",i);break;case"option":_=f;break;case"select":i._wrapperState={wasMultiple:!!f.multiple},_=k({},f,{value:void 0}),ft("invalid",i);break;case"textarea":Mr(i,f),_=Rr(i,f),ft("invalid",i);break;default:_=f}Ut(c,_),L=_;for(y in L)if(L.hasOwnProperty(y)){var z=L[y];y==="style"?li(i,z):y==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,z!=null&&We(i,z)):y==="children"?typeof z=="string"?(c!=="textarea"||z!=="")&&Qe(i,z):typeof z=="number"&&Qe(i,""+z):y!=="suppressContentEditableWarning"&&y!=="suppressHydrationWarning"&&y!=="autoFocus"&&(o.hasOwnProperty(y)?z!=null&&y==="onScroll"&&ft("scroll",i):z!=null&&T(i,y,z,E))}switch(c){case"input":zt(i),Kn(i,f,!1);break;case"textarea":zt(i),Ar(i);break;case"option":f.value!=null&&i.setAttribute("value",""+Te(f.value));break;case"select":i.multiple=!!f.multiple,y=f.value,y!=null?yi(i,!!f.multiple,y,!1):f.defaultValue!=null&&yi(i,!!f.multiple,f.defaultValue,!0);break;default:typeof _.onClick=="function"&&(i.onclick=Wa)}switch(c){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}}f&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return hn(s),null;case 6:if(i&&s.stateNode!=null)_m(i,s,i.memoizedProps,f);else{if(typeof f!="string"&&s.stateNode===null)throw Error(n(166));if(c=$r(No.current),$r(ki.current),Za(s)){if(f=s.stateNode,c=s.memoizedProps,f[xi]=s,(y=f.nodeValue!==c)&&(i=Fn,i!==null))switch(i.tag){case 3:$a(f.nodeValue,c,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&$a(f.nodeValue,c,(i.mode&1)!==0)}y&&(s.flags|=4)}else f=(c.nodeType===9?c:c.ownerDocument).createTextNode(f),f[xi]=s,s.stateNode=f}return hn(s),null;case 13:if(pt(St),f=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(_t&&zn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)bp(),Ms(),s.flags|=98560,y=!1;else if(y=Za(s),f!==null&&f.dehydrated!==null){if(i===null){if(!y)throw Error(n(318));if(y=s.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(n(317));y[xi]=s}else Ms(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;hn(s),y=!1}else hi!==null&&(Gu(hi),hi=null),y=!0;if(!y)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=c,s):(f=f!==null,f!==(i!==null&&i.memoizedState!==null)&&f&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(St.current&1)!==0?$t===0&&($t=3):Zu())),s.updateQueue!==null&&(s.flags|=4),hn(s),null);case 4:return Is(),Bu(i,s),i===null&&bo(s.stateNode.containerInfo),hn(s),null;case 10:return hu(s.type._context),hn(s),null;case 17:return Nn(s.type)&&qa(),hn(s),null;case 19:if(pt(St),y=s.memoizedState,y===null)return hn(s),null;if(f=(s.flags&128)!==0,E=y.rendering,E===null)if(f)Lo(y,!1);else{if($t!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(E=il(i),E!==null){for(s.flags|=128,Lo(y,!1),f=E.updateQueue,f!==null&&(s.updateQueue=f,s.flags|=4),s.subtreeFlags=0,f=c,c=s.child;c!==null;)y=c,i=f,y.flags&=14680066,E=y.alternate,E===null?(y.childLanes=0,y.lanes=i,y.child=null,y.subtreeFlags=0,y.memoizedProps=null,y.memoizedState=null,y.updateQueue=null,y.dependencies=null,y.stateNode=null):(y.childLanes=E.childLanes,y.lanes=E.lanes,y.child=E.child,y.subtreeFlags=0,y.deletions=null,y.memoizedProps=E.memoizedProps,y.memoizedState=E.memoizedState,y.updateQueue=E.updateQueue,y.type=E.type,i=E.dependencies,y.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),c=c.sibling;return ht(St,St.current&1|2),s.child}i=i.sibling}y.tail!==null&&yt()>Fs&&(s.flags|=128,f=!0,Lo(y,!1),s.lanes=4194304)}else{if(!f)if(i=il(E),i!==null){if(s.flags|=128,f=!0,c=i.updateQueue,c!==null&&(s.updateQueue=c,s.flags|=4),Lo(y,!0),y.tail===null&&y.tailMode==="hidden"&&!E.alternate&&!_t)return hn(s),null}else 2*yt()-y.renderingStartTime>Fs&&c!==1073741824&&(s.flags|=128,f=!0,Lo(y,!1),s.lanes=4194304);y.isBackwards?(E.sibling=s.child,s.child=E):(c=y.last,c!==null?c.sibling=E:s.child=E,y.last=E)}return y.tail!==null?(s=y.tail,y.rendering=s,y.tail=s.sibling,y.renderingStartTime=yt(),s.sibling=null,c=St.current,ht(St,f?c&1|2:c&1),s):(hn(s),null);case 22:case 23:return Xu(),f=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==f&&(s.flags|=8192),f&&(s.mode&1)!==0?(jn&1073741824)!==0&&(hn(s),s.subtreeFlags&6&&(s.flags|=8192)):hn(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function uw(i,s){switch(su(s),s.tag){case 1:return Nn(s.type)&&qa(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return Is(),pt(Cn),pt(cn),vu(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return gu(s),null;case 13:if(pt(St),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));Ms()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return pt(St),null;case 4:return Is(),null;case 10:return hu(s.type._context),null;case 22:case 23:return Xu(),null;case 24:return null;default:return null}}var dl=!1,dn=!1,hw=typeof WeakSet=="function"?WeakSet:Set,ke=null;function Ps(i,s){var c=i.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(f){Ct(i,s,f)}else c.current=null}function Fu(i,s,c){try{c()}catch(f){Ct(i,s,f)}}var vm=!1;function dw(i,s){if(Xc=La,i=Xf(),Hc(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var f=c.getSelection&&c.getSelection();if(f&&f.rangeCount!==0){c=f.anchorNode;var _=f.anchorOffset,y=f.focusNode;f=f.focusOffset;try{c.nodeType,y.nodeType}catch{c=null;break e}var E=0,L=-1,z=-1,X=0,le=0,ce=i,oe=null;t:for(;;){for(var ye;ce!==c||_!==0&&ce.nodeType!==3||(L=E+_),ce!==y||f!==0&&ce.nodeType!==3||(z=E+f),ce.nodeType===3&&(E+=ce.nodeValue.length),(ye=ce.firstChild)!==null;)oe=ce,ce=ye;for(;;){if(ce===i)break t;if(oe===c&&++X===_&&(L=E),oe===y&&++le===f&&(z=E),(ye=ce.nextSibling)!==null)break;ce=oe,oe=ce.parentNode}ce=ye}c=L===-1||z===-1?null:{start:L,end:z}}else c=null}c=c||{start:0,end:0}}else c=null;for(Zc={focusedElem:i,selectionRange:c},La=!1,ke=s;ke!==null;)if(s=ke,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,ke=i;else for(;ke!==null;){s=ke;try{var Ee=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(Ee!==null){var Ce=Ee.memoizedProps,Lt=Ee.memoizedState,G=s.stateNode,U=G.getSnapshotBeforeUpdate(s.elementType===s.type?Ce:di(s.type,Ce),Lt);G.__reactInternalSnapshotBeforeUpdate=U}break;case 3:var Y=s.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(n(163))}}catch(de){Ct(s,s.return,de)}if(i=s.sibling,i!==null){i.return=s.return,ke=i;break}ke=s.return}return Ee=vm,vm=!1,Ee}function Oo(i,s,c){var f=s.updateQueue;if(f=f!==null?f.lastEffect:null,f!==null){var _=f=f.next;do{if((_.tag&i)===i){var y=_.destroy;_.destroy=void 0,y!==void 0&&Fu(s,c,y)}_=_.next}while(_!==f)}}function fl(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var c=s=s.next;do{if((c.tag&i)===i){var f=c.create;c.destroy=f()}c=c.next}while(c!==s)}}function zu(i){var s=i.ref;if(s!==null){var c=i.stateNode;switch(i.tag){case 5:i=c;break;default:i=c}typeof s=="function"?s(i):s.current=i}}function ym(i){var s=i.alternate;s!==null&&(i.alternate=null,ym(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[xi],delete s[wo],delete s[tu],delete s[GS],delete s[YS])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function bm(i){return i.tag===5||i.tag===3||i.tag===4}function Sm(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||bm(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function ju(i,s,c){var f=i.tag;if(f===5||f===6)i=i.stateNode,s?c.nodeType===8?c.parentNode.insertBefore(i,s):c.insertBefore(i,s):(c.nodeType===8?(s=c.parentNode,s.insertBefore(i,c)):(s=c,s.appendChild(i)),c=c._reactRootContainer,c!=null||s.onclick!==null||(s.onclick=Wa));else if(f!==4&&(i=i.child,i!==null))for(ju(i,s,c),i=i.sibling;i!==null;)ju(i,s,c),i=i.sibling}function Uu(i,s,c){var f=i.tag;if(f===5||f===6)i=i.stateNode,s?c.insertBefore(i,s):c.appendChild(i);else if(f!==4&&(i=i.child,i!==null))for(Uu(i,s,c),i=i.sibling;i!==null;)Uu(i,s,c),i=i.sibling}var sn=null,fi=!1;function pr(i,s,c){for(c=c.child;c!==null;)wm(i,s,c),c=c.sibling}function wm(i,s,c){if(Ye&&typeof Ye.onCommitFiberUnmount=="function")try{Ye.onCommitFiberUnmount(Ke,c)}catch{}switch(c.tag){case 5:dn||Ps(c,s);case 6:var f=sn,_=fi;sn=null,pr(i,s,c),sn=f,fi=_,sn!==null&&(fi?(i=sn,c=c.stateNode,i.nodeType===8?i.parentNode.removeChild(c):i.removeChild(c)):sn.removeChild(c.stateNode));break;case 18:sn!==null&&(fi?(i=sn,c=c.stateNode,i.nodeType===8?eu(i.parentNode,c):i.nodeType===1&&eu(i,c),uo(i)):eu(sn,c.stateNode));break;case 4:f=sn,_=fi,sn=c.stateNode.containerInfo,fi=!0,pr(i,s,c),sn=f,fi=_;break;case 0:case 11:case 14:case 15:if(!dn&&(f=c.updateQueue,f!==null&&(f=f.lastEffect,f!==null))){_=f=f.next;do{var y=_,E=y.destroy;y=y.tag,E!==void 0&&((y&2)!==0||(y&4)!==0)&&Fu(c,s,E),_=_.next}while(_!==f)}pr(i,s,c);break;case 1:if(!dn&&(Ps(c,s),f=c.stateNode,typeof f.componentWillUnmount=="function"))try{f.props=c.memoizedProps,f.state=c.memoizedState,f.componentWillUnmount()}catch(L){Ct(c,s,L)}pr(i,s,c);break;case 21:pr(i,s,c);break;case 22:c.mode&1?(dn=(f=dn)||c.memoizedState!==null,pr(i,s,c),dn=f):pr(i,s,c);break;default:pr(i,s,c)}}function xm(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var c=i.stateNode;c===null&&(c=i.stateNode=new hw),s.forEach(function(f){var _=Sw.bind(null,i,f);c.has(f)||(c.add(f),f.then(_,_))})}}function pi(i,s){var c=s.deletions;if(c!==null)for(var f=0;f<c.length;f++){var _=c[f];try{var y=i,E=s,L=E;e:for(;L!==null;){switch(L.tag){case 5:sn=L.stateNode,fi=!1;break e;case 3:sn=L.stateNode.containerInfo,fi=!0;break e;case 4:sn=L.stateNode.containerInfo,fi=!0;break e}L=L.return}if(sn===null)throw Error(n(160));wm(y,E,_),sn=null,fi=!1;var z=_.alternate;z!==null&&(z.return=null),_.return=null}catch(X){Ct(_,s,X)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)km(s,i),s=s.sibling}function km(i,s){var c=i.alternate,f=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(pi(s,i),Ci(i),f&4){try{Oo(3,i,i.return),fl(3,i)}catch(Ce){Ct(i,i.return,Ce)}try{Oo(5,i,i.return)}catch(Ce){Ct(i,i.return,Ce)}}break;case 1:pi(s,i),Ci(i),f&512&&c!==null&&Ps(c,c.return);break;case 5:if(pi(s,i),Ci(i),f&512&&c!==null&&Ps(c,c.return),i.flags&32){var _=i.stateNode;try{Qe(_,"")}catch(Ce){Ct(i,i.return,Ce)}}if(f&4&&(_=i.stateNode,_!=null)){var y=i.memoizedProps,E=c!==null?c.memoizedProps:y,L=i.type,z=i.updateQueue;if(i.updateQueue=null,z!==null)try{L==="input"&&y.type==="radio"&&y.name!=null&&et(_,y),Vn(L,E);var X=Vn(L,y);for(E=0;E<z.length;E+=2){var le=z[E],ce=z[E+1];le==="style"?li(_,ce):le==="dangerouslySetInnerHTML"?We(_,ce):le==="children"?Qe(_,ce):T(_,le,ce,X)}switch(L){case"input":Pn(_,y);break;case"textarea":qn(_,y);break;case"select":var oe=_._wrapperState.wasMultiple;_._wrapperState.wasMultiple=!!y.multiple;var ye=y.value;ye!=null?yi(_,!!y.multiple,ye,!1):oe!==!!y.multiple&&(y.defaultValue!=null?yi(_,!!y.multiple,y.defaultValue,!0):yi(_,!!y.multiple,y.multiple?[]:"",!1))}_[wo]=y}catch(Ce){Ct(i,i.return,Ce)}}break;case 6:if(pi(s,i),Ci(i),f&4){if(i.stateNode===null)throw Error(n(162));_=i.stateNode,y=i.memoizedProps;try{_.nodeValue=y}catch(Ce){Ct(i,i.return,Ce)}}break;case 3:if(pi(s,i),Ci(i),f&4&&c!==null&&c.memoizedState.isDehydrated)try{uo(s.containerInfo)}catch(Ce){Ct(i,i.return,Ce)}break;case 4:pi(s,i),Ci(i);break;case 13:pi(s,i),Ci(i),_=i.child,_.flags&8192&&(y=_.memoizedState!==null,_.stateNode.isHidden=y,!y||_.alternate!==null&&_.alternate.memoizedState!==null||(Wu=yt())),f&4&&xm(i);break;case 22:if(le=c!==null&&c.memoizedState!==null,i.mode&1?(dn=(X=dn)||le,pi(s,i),dn=X):pi(s,i),Ci(i),f&8192){if(X=i.memoizedState!==null,(i.stateNode.isHidden=X)&&!le&&(i.mode&1)!==0)for(ke=i,le=i.child;le!==null;){for(ce=ke=le;ke!==null;){switch(oe=ke,ye=oe.child,oe.tag){case 0:case 11:case 14:case 15:Oo(4,oe,oe.return);break;case 1:Ps(oe,oe.return);var Ee=oe.stateNode;if(typeof Ee.componentWillUnmount=="function"){f=oe,c=oe.return;try{s=f,Ee.props=s.memoizedProps,Ee.state=s.memoizedState,Ee.componentWillUnmount()}catch(Ce){Ct(f,c,Ce)}}break;case 5:Ps(oe,oe.return);break;case 22:if(oe.memoizedState!==null){Nm(ce);continue}}ye!==null?(ye.return=oe,ke=ye):Nm(ce)}le=le.sibling}e:for(le=null,ce=i;;){if(ce.tag===5){if(le===null){le=ce;try{_=ce.stateNode,X?(y=_.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none"):(L=ce.stateNode,z=ce.memoizedProps.style,E=z!=null&&z.hasOwnProperty("display")?z.display:null,L.style.display=En("display",E))}catch(Ce){Ct(i,i.return,Ce)}}}else if(ce.tag===6){if(le===null)try{ce.stateNode.nodeValue=X?"":ce.memoizedProps}catch(Ce){Ct(i,i.return,Ce)}}else if((ce.tag!==22&&ce.tag!==23||ce.memoizedState===null||ce===i)&&ce.child!==null){ce.child.return=ce,ce=ce.child;continue}if(ce===i)break e;for(;ce.sibling===null;){if(ce.return===null||ce.return===i)break e;le===ce&&(le=null),ce=ce.return}le===ce&&(le=null),ce.sibling.return=ce.return,ce=ce.sibling}}break;case 19:pi(s,i),Ci(i),f&4&&xm(i);break;case 21:break;default:pi(s,i),Ci(i)}}function Ci(i){var s=i.flags;if(s&2){try{e:{for(var c=i.return;c!==null;){if(bm(c)){var f=c;break e}c=c.return}throw Error(n(160))}switch(f.tag){case 5:var _=f.stateNode;f.flags&32&&(Qe(_,""),f.flags&=-33);var y=Sm(i);Uu(i,y,_);break;case 3:case 4:var E=f.stateNode.containerInfo,L=Sm(i);ju(i,L,E);break;default:throw Error(n(161))}}catch(z){Ct(i,i.return,z)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function fw(i,s,c){ke=i,Em(i)}function Em(i,s,c){for(var f=(i.mode&1)!==0;ke!==null;){var _=ke,y=_.child;if(_.tag===22&&f){var E=_.memoizedState!==null||dl;if(!E){var L=_.alternate,z=L!==null&&L.memoizedState!==null||dn;L=dl;var X=dn;if(dl=E,(dn=z)&&!X)for(ke=_;ke!==null;)E=ke,z=E.child,E.tag===22&&E.memoizedState!==null?Tm(_):z!==null?(z.return=E,ke=z):Tm(_);for(;y!==null;)ke=y,Em(y),y=y.sibling;ke=_,dl=L,dn=X}Cm(i)}else(_.subtreeFlags&8772)!==0&&y!==null?(y.return=_,ke=y):Cm(i)}}function Cm(i){for(;ke!==null;){var s=ke;if((s.flags&8772)!==0){var c=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:dn||fl(5,s);break;case 1:var f=s.stateNode;if(s.flags&4&&!dn)if(c===null)f.componentDidMount();else{var _=s.elementType===s.type?c.memoizedProps:di(s.type,c.memoizedProps);f.componentDidUpdate(_,c.memoizedState,f.__reactInternalSnapshotBeforeUpdate)}var y=s.updateQueue;y!==null&&Np(s,y,f);break;case 3:var E=s.updateQueue;if(E!==null){if(c=null,s.child!==null)switch(s.child.tag){case 5:c=s.child.stateNode;break;case 1:c=s.child.stateNode}Np(s,E,c)}break;case 5:var L=s.stateNode;if(c===null&&s.flags&4){c=L;var z=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":z.autoFocus&&c.focus();break;case"img":z.src&&(c.src=z.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var X=s.alternate;if(X!==null){var le=X.memoizedState;if(le!==null){var ce=le.dehydrated;ce!==null&&uo(ce)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}dn||s.flags&512&&zu(s)}catch(oe){Ct(s,s.return,oe)}}if(s===i){ke=null;break}if(c=s.sibling,c!==null){c.return=s.return,ke=c;break}ke=s.return}}function Nm(i){for(;ke!==null;){var s=ke;if(s===i){ke=null;break}var c=s.sibling;if(c!==null){c.return=s.return,ke=c;break}ke=s.return}}function Tm(i){for(;ke!==null;){var s=ke;try{switch(s.tag){case 0:case 11:case 15:var c=s.return;try{fl(4,s)}catch(z){Ct(s,c,z)}break;case 1:var f=s.stateNode;if(typeof f.componentDidMount=="function"){var _=s.return;try{f.componentDidMount()}catch(z){Ct(s,_,z)}}var y=s.return;try{zu(s)}catch(z){Ct(s,y,z)}break;case 5:var E=s.return;try{zu(s)}catch(z){Ct(s,E,z)}}}catch(z){Ct(s,s.return,z)}if(s===i){ke=null;break}var L=s.sibling;if(L!==null){L.return=s.return,ke=L;break}ke=s.return}}var pw=Math.ceil,pl=A.ReactCurrentDispatcher,Hu=A.ReactCurrentOwner,Jn=A.ReactCurrentBatchConfig,it=0,Yt=null,Dt=null,on=0,jn=0,Bs=cr(0),$t=0,Io=null,Kr=0,ml=0,$u=0,Do=null,Rn=null,Wu=0,Fs=1/0,Gi=null,gl=!1,Ku=null,mr=null,_l=!1,gr=null,vl=0,Po=0,qu=null,yl=-1,bl=0;function yn(){return(it&6)!==0?yt():yl!==-1?yl:yl=yt()}function _r(i){return(i.mode&1)===0?1:(it&2)!==0&&on!==0?on&-on:ZS.transition!==null?(bl===0&&(bl=Ra()),bl):(i=nt,i!==0||(i=window.event,i=i===void 0?16:Mf(i.type)),i)}function mi(i,s,c,f){if(50<Po)throw Po=0,qu=null,Error(n(185));rr(i,c,f),((it&2)===0||i!==Yt)&&(i===Yt&&((it&2)===0&&(ml|=c),$t===4&&vr(i,on)),Mn(i,f),c===1&&it===0&&(s.mode&1)===0&&(Fs=yt()+500,Ga&&hr()))}function Mn(i,s){var c=i.callbackNode;Rc(i,s);var f=Dr(i,i===Yt?on:0);if(f===0)c!==null&&ci(c),i.callbackNode=null,i.callbackPriority=0;else if(s=f&-f,i.callbackPriority!==s){if(c!=null&&ci(c),s===1)i.tag===0?XS(Mm.bind(null,i)):mp(Mm.bind(null,i)),qS(function(){(it&6)===0&&hr()}),c=null;else{switch(Ue(f)){case 1:c=ro;break;case 4:c=Or;break;case 16:c=gs;break;case 536870912:c=Re;break;default:c=gs}c=Fm(c,Rm.bind(null,i))}i.callbackPriority=s,i.callbackNode=c}}function Rm(i,s){if(yl=-1,bl=0,(it&6)!==0)throw Error(n(327));var c=i.callbackNode;if(zs()&&i.callbackNode!==c)return null;var f=Dr(i,i===Yt?on:0);if(f===0)return null;if((f&30)!==0||(f&i.expiredLanes)!==0||s)s=Sl(i,f);else{s=f;var _=it;it|=2;var y=Lm();(Yt!==i||on!==s)&&(Gi=null,Fs=yt()+500,Vr(i,s));do try{_w();break}catch(L){Am(i,L)}while(!0);uu(),pl.current=y,it=_,Dt!==null?s=0:(Yt=null,on=0,s=$t)}if(s!==0){if(s===2&&(_=so(i),_!==0&&(f=_,s=Vu(i,_))),s===1)throw c=Io,Vr(i,0),vr(i,f),Mn(i,yt()),c;if(s===6)vr(i,f);else{if(_=i.current.alternate,(f&30)===0&&!mw(_)&&(s=Sl(i,f),s===2&&(y=so(i),y!==0&&(f=y,s=Vu(i,y))),s===1))throw c=Io,Vr(i,0),vr(i,f),Mn(i,yt()),c;switch(i.finishedWork=_,i.finishedLanes=f,s){case 0:case 1:throw Error(n(345));case 2:Gr(i,Rn,Gi);break;case 3:if(vr(i,f),(f&130023424)===f&&(s=Wu+500-yt(),10<s)){if(Dr(i,0)!==0)break;if(_=i.suspendedLanes,(_&f)!==f){yn(),i.pingedLanes|=i.suspendedLanes&_;break}i.timeoutHandle=Jc(Gr.bind(null,i,Rn,Gi),s);break}Gr(i,Rn,Gi);break;case 4:if(vr(i,f),(f&4194240)===f)break;for(s=i.eventTimes,_=-1;0<f;){var E=31-bt(f);y=1<<E,E=s[E],E>_&&(_=E),f&=~y}if(f=_,f=yt()-f,f=(120>f?120:480>f?480:1080>f?1080:1920>f?1920:3e3>f?3e3:4320>f?4320:1960*pw(f/1960))-f,10<f){i.timeoutHandle=Jc(Gr.bind(null,i,Rn,Gi),f);break}Gr(i,Rn,Gi);break;case 5:Gr(i,Rn,Gi);break;default:throw Error(n(329))}}}return Mn(i,yt()),i.callbackNode===c?Rm.bind(null,i):null}function Vu(i,s){var c=Do;return i.current.memoizedState.isDehydrated&&(Vr(i,s).flags|=256),i=Sl(i,s),i!==2&&(s=Rn,Rn=c,s!==null&&Gu(s)),i}function Gu(i){Rn===null?Rn=i:Rn.push.apply(Rn,i)}function mw(i){for(var s=i;;){if(s.flags&16384){var c=s.updateQueue;if(c!==null&&(c=c.stores,c!==null))for(var f=0;f<c.length;f++){var _=c[f],y=_.getSnapshot;_=_.value;try{if(!ui(y(),_))return!1}catch{return!1}}}if(c=s.child,s.subtreeFlags&16384&&c!==null)c.return=s,s=c;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function vr(i,s){for(s&=~$u,s&=~ml,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var c=31-bt(s),f=1<<c;i[c]=-1,s&=~f}}function Mm(i){if((it&6)!==0)throw Error(n(327));zs();var s=Dr(i,0);if((s&1)===0)return Mn(i,yt()),null;var c=Sl(i,s);if(i.tag!==0&&c===2){var f=so(i);f!==0&&(s=f,c=Vu(i,f))}if(c===1)throw c=Io,Vr(i,0),vr(i,s),Mn(i,yt()),c;if(c===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,Gr(i,Rn,Gi),Mn(i,yt()),null}function Yu(i,s){var c=it;it|=1;try{return i(s)}finally{it=c,it===0&&(Fs=yt()+500,Ga&&hr())}}function qr(i){gr!==null&&gr.tag===0&&(it&6)===0&&zs();var s=it;it|=1;var c=Jn.transition,f=nt;try{if(Jn.transition=null,nt=1,i)return i()}finally{nt=f,Jn.transition=c,it=s,(it&6)===0&&hr()}}function Xu(){jn=Bs.current,pt(Bs)}function Vr(i,s){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;if(c!==-1&&(i.timeoutHandle=-1,KS(c)),Dt!==null)for(c=Dt.return;c!==null;){var f=c;switch(su(f),f.tag){case 1:f=f.type.childContextTypes,f!=null&&qa();break;case 3:Is(),pt(Cn),pt(cn),vu();break;case 5:gu(f);break;case 4:Is();break;case 13:pt(St);break;case 19:pt(St);break;case 10:hu(f.type._context);break;case 22:case 23:Xu()}c=c.return}if(Yt=i,Dt=i=yr(i.current,null),on=jn=s,$t=0,Io=null,$u=ml=Kr=0,Rn=Do=null,Hr!==null){for(s=0;s<Hr.length;s++)if(c=Hr[s],f=c.interleaved,f!==null){c.interleaved=null;var _=f.next,y=c.pending;if(y!==null){var E=y.next;y.next=_,f.next=E}c.pending=f}Hr=null}return i}function Am(i,s){do{var c=Dt;try{if(uu(),rl.current=ll,sl){for(var f=wt.memoizedState;f!==null;){var _=f.queue;_!==null&&(_.pending=null),f=f.next}sl=!1}if(Wr=0,Gt=Ht=wt=null,To=!1,Ro=0,Hu.current=null,c===null||c.return===null){$t=1,Io=s,Dt=null;break}e:{var y=i,E=c.return,L=c,z=s;if(s=on,L.flags|=32768,z!==null&&typeof z=="object"&&typeof z.then=="function"){var X=z,le=L,ce=le.tag;if((le.mode&1)===0&&(ce===0||ce===11||ce===15)){var oe=le.alternate;oe?(le.updateQueue=oe.updateQueue,le.memoizedState=oe.memoizedState,le.lanes=oe.lanes):(le.updateQueue=null,le.memoizedState=null)}var ye=nm(E);if(ye!==null){ye.flags&=-257,im(ye,E,L,y,s),ye.mode&1&&tm(y,X,s),s=ye,z=X;var Ee=s.updateQueue;if(Ee===null){var Ce=new Set;Ce.add(z),s.updateQueue=Ce}else Ee.add(z);break e}else{if((s&1)===0){tm(y,X,s),Zu();break e}z=Error(n(426))}}else if(_t&&L.mode&1){var Lt=nm(E);if(Lt!==null){(Lt.flags&65536)===0&&(Lt.flags|=256),im(Lt,E,L,y,s),lu(Ds(z,L));break e}}y=z=Ds(z,L),$t!==4&&($t=2),Do===null?Do=[y]:Do.push(y),y=E;do{switch(y.tag){case 3:y.flags|=65536,s&=-s,y.lanes|=s;var G=Jp(y,z,s);Cp(y,G);break e;case 1:L=z;var U=y.type,Y=y.stateNode;if((y.flags&128)===0&&(typeof U.getDerivedStateFromError=="function"||Y!==null&&typeof Y.componentDidCatch=="function"&&(mr===null||!mr.has(Y)))){y.flags|=65536,s&=-s,y.lanes|=s;var de=em(y,L,s);Cp(y,de);break e}}y=y.return}while(y!==null)}Im(c)}catch(Ne){s=Ne,Dt===c&&c!==null&&(Dt=c=c.return);continue}break}while(!0)}function Lm(){var i=pl.current;return pl.current=ll,i===null?ll:i}function Zu(){($t===0||$t===3||$t===2)&&($t=4),Yt===null||(Kr&268435455)===0&&(ml&268435455)===0||vr(Yt,on)}function Sl(i,s){var c=it;it|=2;var f=Lm();(Yt!==i||on!==s)&&(Gi=null,Vr(i,s));do try{gw();break}catch(_){Am(i,_)}while(!0);if(uu(),it=c,pl.current=f,Dt!==null)throw Error(n(261));return Yt=null,on=0,$t}function gw(){for(;Dt!==null;)Om(Dt)}function _w(){for(;Dt!==null&&!Na();)Om(Dt)}function Om(i){var s=Bm(i.alternate,i,jn);i.memoizedProps=i.pendingProps,s===null?Im(i):Dt=s,Hu.current=null}function Im(i){var s=i;do{var c=s.alternate;if(i=s.return,(s.flags&32768)===0){if(c=cw(c,s,jn),c!==null){Dt=c;return}}else{if(c=uw(c,s),c!==null){c.flags&=32767,Dt=c;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{$t=6,Dt=null;return}}if(s=s.sibling,s!==null){Dt=s;return}Dt=s=i}while(s!==null);$t===0&&($t=5)}function Gr(i,s,c){var f=nt,_=Jn.transition;try{Jn.transition=null,nt=1,vw(i,s,c,f)}finally{Jn.transition=_,nt=f}return null}function vw(i,s,c,f){do zs();while(gr!==null);if((it&6)!==0)throw Error(n(327));c=i.finishedWork;var _=i.finishedLanes;if(c===null)return null;if(i.finishedWork=null,i.finishedLanes=0,c===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var y=c.lanes|c.childLanes;if(Gn(i,y),i===Yt&&(Dt=Yt=null,on=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||_l||(_l=!0,Fm(gs,function(){return zs(),null})),y=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||y){y=Jn.transition,Jn.transition=null;var E=nt;nt=1;var L=it;it|=4,Hu.current=null,dw(i,c),km(c,i),FS(Zc),La=!!Xc,Zc=Xc=null,i.current=c,fw(c),Ta(),it=L,nt=E,Jn.transition=y}else i.current=c;if(_l&&(_l=!1,gr=i,vl=_),y=i.pendingLanes,y===0&&(mr=null),Mt(c.stateNode),Mn(i,yt()),s!==null)for(f=i.onRecoverableError,c=0;c<s.length;c++)_=s[c],f(_.value,{componentStack:_.stack,digest:_.digest});if(gl)throw gl=!1,i=Ku,Ku=null,i;return(vl&1)!==0&&i.tag!==0&&zs(),y=i.pendingLanes,(y&1)!==0?i===qu?Po++:(Po=0,qu=i):Po=0,hr(),null}function zs(){if(gr!==null){var i=Ue(vl),s=Jn.transition,c=nt;try{if(Jn.transition=null,nt=16>i?16:i,gr===null)var f=!1;else{if(i=gr,gr=null,vl=0,(it&6)!==0)throw Error(n(331));var _=it;for(it|=4,ke=i.current;ke!==null;){var y=ke,E=y.child;if((ke.flags&16)!==0){var L=y.deletions;if(L!==null){for(var z=0;z<L.length;z++){var X=L[z];for(ke=X;ke!==null;){var le=ke;switch(le.tag){case 0:case 11:case 15:Oo(8,le,y)}var ce=le.child;if(ce!==null)ce.return=le,ke=ce;else for(;ke!==null;){le=ke;var oe=le.sibling,ye=le.return;if(ym(le),le===X){ke=null;break}if(oe!==null){oe.return=ye,ke=oe;break}ke=ye}}}var Ee=y.alternate;if(Ee!==null){var Ce=Ee.child;if(Ce!==null){Ee.child=null;do{var Lt=Ce.sibling;Ce.sibling=null,Ce=Lt}while(Ce!==null)}}ke=y}}if((y.subtreeFlags&2064)!==0&&E!==null)E.return=y,ke=E;else e:for(;ke!==null;){if(y=ke,(y.flags&2048)!==0)switch(y.tag){case 0:case 11:case 15:Oo(9,y,y.return)}var G=y.sibling;if(G!==null){G.return=y.return,ke=G;break e}ke=y.return}}var U=i.current;for(ke=U;ke!==null;){E=ke;var Y=E.child;if((E.subtreeFlags&2064)!==0&&Y!==null)Y.return=E,ke=Y;else e:for(E=U;ke!==null;){if(L=ke,(L.flags&2048)!==0)try{switch(L.tag){case 0:case 11:case 15:fl(9,L)}}catch(Ne){Ct(L,L.return,Ne)}if(L===E){ke=null;break e}var de=L.sibling;if(de!==null){de.return=L.return,ke=de;break e}ke=L.return}}if(it=_,hr(),Ye&&typeof Ye.onPostCommitFiberRoot=="function")try{Ye.onPostCommitFiberRoot(Ke,i)}catch{}f=!0}return f}finally{nt=c,Jn.transition=s}}return!1}function Dm(i,s,c){s=Ds(c,s),s=Jp(i,s,1),i=fr(i,s,1),s=yn(),i!==null&&(rr(i,1,s),Mn(i,s))}function Ct(i,s,c){if(i.tag===3)Dm(i,i,c);else for(;s!==null;){if(s.tag===3){Dm(s,i,c);break}else if(s.tag===1){var f=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(mr===null||!mr.has(f))){i=Ds(c,i),i=em(s,i,1),s=fr(s,i,1),i=yn(),s!==null&&(rr(s,1,i),Mn(s,i));break}}s=s.return}}function yw(i,s,c){var f=i.pingCache;f!==null&&f.delete(s),s=yn(),i.pingedLanes|=i.suspendedLanes&c,Yt===i&&(on&c)===c&&($t===4||$t===3&&(on&130023424)===on&&500>yt()-Wu?Vr(i,0):$u|=c),Mn(i,s)}function Pm(i,s){s===0&&((i.mode&1)===0?s=1:(s=Ir,Ir<<=1,(Ir&130023424)===0&&(Ir=4194304)));var c=yn();i=Ki(i,s),i!==null&&(rr(i,s,c),Mn(i,c))}function bw(i){var s=i.memoizedState,c=0;s!==null&&(c=s.retryLane),Pm(i,c)}function Sw(i,s){var c=0;switch(i.tag){case 13:var f=i.stateNode,_=i.memoizedState;_!==null&&(c=_.retryLane);break;case 19:f=i.stateNode;break;default:throw Error(n(314))}f!==null&&f.delete(s),Pm(i,c)}var Bm;Bm=function(i,s,c){if(i!==null)if(i.memoizedProps!==s.pendingProps||Cn.current)Tn=!0;else{if((i.lanes&c)===0&&(s.flags&128)===0)return Tn=!1,lw(i,s,c);Tn=(i.flags&131072)!==0}else Tn=!1,_t&&(s.flags&1048576)!==0&&gp(s,Xa,s.index);switch(s.lanes=0,s.tag){case 2:var f=s.type;hl(i,s),i=s.pendingProps;var _=Ns(s,cn.current);Os(s,c),_=Su(null,s,f,i,_,c);var y=wu();return s.flags|=1,typeof _=="object"&&_!==null&&typeof _.render=="function"&&_.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,Nn(f)?(y=!0,Va(s)):y=!1,s.memoizedState=_.state!==null&&_.state!==void 0?_.state:null,pu(s),_.updater=cl,s.stateNode=_,_._reactInternals=s,Tu(s,f,i,c),s=Lu(null,s,f,!0,y,c)):(s.tag=0,_t&&y&&ru(s),vn(null,s,_,c),s=s.child),s;case 16:f=s.elementType;e:{switch(hl(i,s),i=s.pendingProps,_=f._init,f=_(f._payload),s.type=f,_=s.tag=xw(f),i=di(f,i),_){case 0:s=Au(null,s,f,i,c);break e;case 1:s=cm(null,s,f,i,c);break e;case 11:s=rm(null,s,f,i,c);break e;case 14:s=sm(null,s,f,di(f.type,i),c);break e}throw Error(n(306,f,""))}return s;case 0:return f=s.type,_=s.pendingProps,_=s.elementType===f?_:di(f,_),Au(i,s,f,_,c);case 1:return f=s.type,_=s.pendingProps,_=s.elementType===f?_:di(f,_),cm(i,s,f,_,c);case 3:e:{if(um(s),i===null)throw Error(n(387));f=s.pendingProps,y=s.memoizedState,_=y.element,Ep(i,s),nl(s,f,null,c);var E=s.memoizedState;if(f=E.element,y.isDehydrated)if(y={element:f,isDehydrated:!1,cache:E.cache,pendingSuspenseBoundaries:E.pendingSuspenseBoundaries,transitions:E.transitions},s.updateQueue.baseState=y,s.memoizedState=y,s.flags&256){_=Ds(Error(n(423)),s),s=hm(i,s,f,c,_);break e}else if(f!==_){_=Ds(Error(n(424)),s),s=hm(i,s,f,c,_);break e}else for(zn=lr(s.stateNode.containerInfo.firstChild),Fn=s,_t=!0,hi=null,c=xp(s,null,f,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(Ms(),f===_){s=Vi(i,s,c);break e}vn(i,s,f,c)}s=s.child}return s;case 5:return Tp(s),i===null&&au(s),f=s.type,_=s.pendingProps,y=i!==null?i.memoizedProps:null,E=_.children,Qc(f,_)?E=null:y!==null&&Qc(f,y)&&(s.flags|=32),lm(i,s),vn(i,s,E,c),s.child;case 6:return i===null&&au(s),null;case 13:return dm(i,s,c);case 4:return mu(s,s.stateNode.containerInfo),f=s.pendingProps,i===null?s.child=As(s,null,f,c):vn(i,s,f,c),s.child;case 11:return f=s.type,_=s.pendingProps,_=s.elementType===f?_:di(f,_),rm(i,s,f,_,c);case 7:return vn(i,s,s.pendingProps,c),s.child;case 8:return vn(i,s,s.pendingProps.children,c),s.child;case 12:return vn(i,s,s.pendingProps.children,c),s.child;case 10:e:{if(f=s.type._context,_=s.pendingProps,y=s.memoizedProps,E=_.value,ht(Ja,f._currentValue),f._currentValue=E,y!==null)if(ui(y.value,E)){if(y.children===_.children&&!Cn.current){s=Vi(i,s,c);break e}}else for(y=s.child,y!==null&&(y.return=s);y!==null;){var L=y.dependencies;if(L!==null){E=y.child;for(var z=L.firstContext;z!==null;){if(z.context===f){if(y.tag===1){z=qi(-1,c&-c),z.tag=2;var X=y.updateQueue;if(X!==null){X=X.shared;var le=X.pending;le===null?z.next=z:(z.next=le.next,le.next=z),X.pending=z}}y.lanes|=c,z=y.alternate,z!==null&&(z.lanes|=c),du(y.return,c,s),L.lanes|=c;break}z=z.next}}else if(y.tag===10)E=y.type===s.type?null:y.child;else if(y.tag===18){if(E=y.return,E===null)throw Error(n(341));E.lanes|=c,L=E.alternate,L!==null&&(L.lanes|=c),du(E,c,s),E=y.sibling}else E=y.child;if(E!==null)E.return=y;else for(E=y;E!==null;){if(E===s){E=null;break}if(y=E.sibling,y!==null){y.return=E.return,E=y;break}E=E.return}y=E}vn(i,s,_.children,c),s=s.child}return s;case 9:return _=s.type,f=s.pendingProps.children,Os(s,c),_=Zn(_),f=f(_),s.flags|=1,vn(i,s,f,c),s.child;case 14:return f=s.type,_=di(f,s.pendingProps),_=di(f.type,_),sm(i,s,f,_,c);case 15:return om(i,s,s.type,s.pendingProps,c);case 17:return f=s.type,_=s.pendingProps,_=s.elementType===f?_:di(f,_),hl(i,s),s.tag=1,Nn(f)?(i=!0,Va(s)):i=!1,Os(s,c),Zp(s,f,_),Tu(s,f,_,c),Lu(null,s,f,!0,i,c);case 19:return pm(i,s,c);case 22:return am(i,s,c)}throw Error(n(156,s.tag))};function Fm(i,s){return Ca(i,s)}function ww(i,s,c,f){this.tag=i,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ei(i,s,c,f){return new ww(i,s,c,f)}function Qu(i){return i=i.prototype,!(!i||!i.isReactComponent)}function xw(i){if(typeof i=="function")return Qu(i)?1:0;if(i!=null){if(i=i.$$typeof,i===H)return 11;if(i===P)return 14}return 2}function yr(i,s){var c=i.alternate;return c===null?(c=ei(i.tag,s,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c.alternate=i,i.alternate=c):(c.pendingProps=s,c.type=i.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=i.flags&14680064,c.childLanes=i.childLanes,c.lanes=i.lanes,c.child=i.child,c.memoizedProps=i.memoizedProps,c.memoizedState=i.memoizedState,c.updateQueue=i.updateQueue,s=i.dependencies,c.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c}function wl(i,s,c,f,_,y){var E=2;if(f=i,typeof i=="function")Qu(i)&&(E=1);else if(typeof i=="string")E=5;else e:switch(i){case ne:return Yr(c.children,_,y,s);case Z:E=8,_|=8;break;case te:return i=ei(12,c,s,_|2),i.elementType=te,i.lanes=y,i;case F:return i=ei(13,c,s,_),i.elementType=F,i.lanes=y,i;case W:return i=ei(19,c,s,_),i.elementType=W,i.lanes=y,i;case j:return xl(c,_,y,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case $:E=10;break e;case D:E=9;break e;case H:E=11;break e;case P:E=14;break e;case Q:E=16,f=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=ei(E,c,s,_),s.elementType=i,s.type=f,s.lanes=y,s}function Yr(i,s,c,f){return i=ei(7,i,f,s),i.lanes=c,i}function xl(i,s,c,f){return i=ei(22,i,f,s),i.elementType=j,i.lanes=c,i.stateNode={isHidden:!1},i}function Ju(i,s,c){return i=ei(6,i,null,s),i.lanes=c,i}function eh(i,s,c){return s=ei(4,i.children!==null?i.children:[],i.key,s),s.lanes=c,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function kw(i,s,c,f,_){this.tag=s,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ir(0),this.expirationTimes=ir(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ir(0),this.identifierPrefix=f,this.onRecoverableError=_,this.mutableSourceEagerHydrationData=null}function th(i,s,c,f,_,y,E,L,z){return i=new kw(i,s,c,L,z),s===1?(s=1,y===!0&&(s|=8)):s=0,y=ei(3,null,null,s),i.current=y,y.stateNode=i,y.memoizedState={element:f,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},pu(y),i}function Ew(i,s,c){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:O,key:f==null?null:""+f,children:i,containerInfo:s,implementation:c}}function zm(i){if(!i)return ur;i=i._reactInternals;e:{if(ji(i)!==i||i.tag!==1)throw Error(n(170));var s=i;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(Nn(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(i.tag===1){var c=i.type;if(Nn(c))return fp(i,c,s)}return s}function jm(i,s,c,f,_,y,E,L,z){return i=th(c,f,!0,i,_,y,E,L,z),i.context=zm(null),c=i.current,f=yn(),_=_r(c),y=qi(f,_),y.callback=s??null,fr(c,y,_),i.current.lanes=_,rr(i,_,f),Mn(i,f),i}function kl(i,s,c,f){var _=s.current,y=yn(),E=_r(_);return c=zm(c),s.context===null?s.context=c:s.pendingContext=c,s=qi(y,E),s.payload={element:i},f=f===void 0?null:f,f!==null&&(s.callback=f),i=fr(_,s,E),i!==null&&(mi(i,_,E,y),tl(i,_,E)),E}function El(i){if(i=i.current,!i.child)return null;switch(i.child.tag){case 5:return i.child.stateNode;default:return i.child.stateNode}}function Um(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<s?c:s}}function nh(i,s){Um(i,s),(i=i.alternate)&&Um(i,s)}function Cw(){return null}var Hm=typeof reportError=="function"?reportError:function(i){console.error(i)};function ih(i){this._internalRoot=i}Cl.prototype.render=ih.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));kl(i,s,null,null)},Cl.prototype.unmount=ih.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;qr(function(){kl(null,i,null,null)}),s[Ui]=null}};function Cl(i){this._internalRoot=i}Cl.prototype.unstable_scheduleHydration=function(i){if(i){var s=Pr();i={blockedOn:null,target:i,priority:s};for(var c=0;c<Vt.length&&s!==0&&s<Vt[c].priority;c++);Vt.splice(c,0,i),c===0&&Tf(i)}};function rh(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function Nl(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function $m(){}function Nw(i,s,c,f,_){if(_){if(typeof f=="function"){var y=f;f=function(){var X=El(E);y.call(X)}}var E=jm(s,f,i,0,null,!1,!1,"",$m);return i._reactRootContainer=E,i[Ui]=E.current,bo(i.nodeType===8?i.parentNode:i),qr(),E}for(;_=i.lastChild;)i.removeChild(_);if(typeof f=="function"){var L=f;f=function(){var X=El(z);L.call(X)}}var z=th(i,0,!1,null,null,!1,!1,"",$m);return i._reactRootContainer=z,i[Ui]=z.current,bo(i.nodeType===8?i.parentNode:i),qr(function(){kl(s,z,c,f)}),z}function Tl(i,s,c,f,_){var y=c._reactRootContainer;if(y){var E=y;if(typeof _=="function"){var L=_;_=function(){var z=El(E);L.call(z)}}kl(s,E,i,_)}else E=Nw(c,s,i,_,f);return El(E)}ao=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var c=nr(s.pendingLanes);c!==0&&(oo(s,c|1),Mn(s,yt()),(it&6)===0&&(Fs=yt()+500,hr()))}break;case 13:qr(function(){var f=Ki(i,1);if(f!==null){var _=yn();mi(f,i,1,_)}}),nh(i,1)}},At=function(i){if(i.tag===13){var s=Ki(i,134217728);if(s!==null){var c=yn();mi(s,i,134217728,c)}nh(i,134217728)}},st=function(i){if(i.tag===13){var s=_r(i),c=Ki(i,s);if(c!==null){var f=yn();mi(c,i,s,f)}nh(i,s)}},Pr=function(){return nt},wi=function(i,s){var c=nt;try{return nt=i,s()}finally{nt=c}},ps=function(i,s,c){switch(s){case"input":if(Pn(i,c),s=c.name,c.type==="radio"&&s!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<c.length;s++){var f=c[s];if(f!==i&&f.form===i.form){var _=Ka(f);if(!_)throw Error(n(90));nn(f),Pn(f,_)}}}break;case"textarea":qn(i,c);break;case"select":s=c.value,s!=null&&yi(i,!!c.multiple,s,!1)}},_e=Yu,Be=qr;var Tw={usingClientEntryPoint:!1,Events:[xo,Es,Ka,B,ie,Yu]},Bo={findFiberByHostInstance:Fr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Rw={bundleType:Bo.bundleType,version:Bo.version,rendererPackageName:Bo.rendererPackageName,rendererConfig:Bo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:A.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=ka(i),i===null?null:i.stateNode},findFiberByHostInstance:Bo.findFiberByHostInstance||Cw,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 Rl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Rl.isDisabled&&Rl.supportsFiber)try{Ke=Rl.inject(Rw),Ye=Rl}catch{}}return An.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Tw,An.createPortal=function(i,s){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!rh(s))throw Error(n(200));return Ew(i,s,null,c)},An.createRoot=function(i,s){if(!rh(i))throw Error(n(299));var c=!1,f="",_=Hm;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onRecoverableError!==void 0&&(_=s.onRecoverableError)),s=th(i,1,!1,null,null,c,!1,f,_),i[Ui]=s.current,bo(i.nodeType===8?i.parentNode:i),new ih(s)},An.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=ka(s),i=i===null?null:i.stateNode,i},An.flushSync=function(i){return qr(i)},An.hydrate=function(i,s,c){if(!Nl(s))throw Error(n(200));return Tl(null,i,s,!0,c)},An.hydrateRoot=function(i,s,c){if(!rh(i))throw Error(n(405));var f=c!=null&&c.hydratedSources||null,_=!1,y="",E=Hm;if(c!=null&&(c.unstable_strictMode===!0&&(_=!0),c.identifierPrefix!==void 0&&(y=c.identifierPrefix),c.onRecoverableError!==void 0&&(E=c.onRecoverableError)),s=jm(s,null,i,1,c??null,_,!1,y,E),i[Ui]=s.current,bo(i),f)for(i=0;i<f.length;i++)c=f[i],_=c._getVersion,_=_(c._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[c,_]:s.mutableSourceEagerHydrationData.push(c,_);return new Cl(s)},An.render=function(i,s,c){if(!Nl(s))throw Error(n(200));return Tl(null,i,s,!1,c)},An.unmountComponentAtNode=function(i){if(!Nl(i))throw Error(n(40));return i._reactRootContainer?(qr(function(){Tl(null,null,i,!1,function(){i._reactRootContainer=null,i[Ui]=null})}),!0):!1},An.unstable_batchedUpdates=Yu,An.unstable_renderSubtreeIntoContainer=function(i,s,c,f){if(!Nl(c))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return Tl(i,s,c,!1,f)},An.version="18.3.1-next-f1338f8080-20240426",An}var Zm;function mv(){if(Zm)return ah.exports;Zm=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),ah.exports=Pw(),ah.exports}var Qm;function Bw(){if(Qm)return Ml;Qm=1;var e=mv();return Ml.createRoot=e.createRoot,Ml.hydrateRoot=e.hydrateRoot,Ml}var Fw=Bw(),gv={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Jm=is.createContext&&is.createContext(gv),zw=["attr","size","title"];function jw(e,t){if(e==null)return{};var n,r,o=Uw(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Uw(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function ec(){return ec=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ec.apply(null,arguments)}function eg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function tc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?eg(Object(n),!0).forEach(function(r){Hw(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hw(e,t,n){return(t=$w(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $w(e){var t=Ww(e,"string");return typeof t=="symbol"?t:t+""}function Ww(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _v(e){return e&&e.map((t,n)=>is.createElement(t.tag,tc({key:n},t.attr),_v(t.child)))}function Ze(e){return t=>is.createElement(Kw,ec({attr:tc({},e.attr)},t),_v(e.child))}function Kw(e){var t=n=>{var r=e.attr,o=e.size,a=e.title,l=jw(e,zw),u=o||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),is.createElement("svg",ec({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,l,{className:d,style:tc(tc({color:e.color||n.color},n.style),e.style),height:u,width:u,xmlns:"http://www.w3.org/2000/svg"}),a&&is.createElement("title",null,a),e.children)};return Jm!==void 0?is.createElement(Jm.Consumer,null,n=>t(n)):t(gv)}function qw(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"},child:[]}]})(e)}function Vs(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"6",x2:"6",y2:"18"},child:[]},{tag:"line",attr:{x1:"6",y1:"6",x2:"18",y2:"18"},child:[]}]})(e)}function vv(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5"},child:[]},{tag:"path",attr:{d:"M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07"},child:[]}]})(e)}function Vw(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"},child:[]},{tag:"path",attr:{d:"M7 11V7a5 5 0 0 1 9.9-1"},child:[]}]})(e)}function Wh(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"3 6 5 6 21 6"},child:[]},{tag:"path",attr:{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"},child:[]},{tag:"line",attr:{x1:"10",y1:"11",x2:"10",y2:"17"},child:[]},{tag:"line",attr:{x1:"14",y1:"11",x2:"14",y2:"17"},child:[]}]})(e)}function Kd(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"4 17 10 11 4 5"},child:[]},{tag:"line",attr:{x1:"12",y1:"19",x2:"20",y2:"19"},child:[]}]})(e)}function tg(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"circle",attr:{cx:"12",cy:"12",r:"6"},child:[]},{tag:"circle",attr:{cx:"12",cy:"12",r:"2"},child:[]}]})(e)}function Gw(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"},child:[]}]})(e)}function Yw(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"22",y1:"2",x2:"11",y2:"13"},child:[]},{tag:"polygon",attr:{points:"22 2 15 22 11 13 2 9 22 2"},child:[]}]})(e)}function yv(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"23 4 23 10 17 10"},child:[]},{tag:"polyline",attr:{points:"1 20 1 14 7 14"},child:[]},{tag:"path",attr:{d:"M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"},child:[]}]})(e)}function os(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"12",y1:"5",x2:"12",y2:"19"},child:[]},{tag:"line",attr:{x1:"5",y1:"12",x2:"19",y2:"12"},child:[]}]})(e)}function Xw(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"5 3 19 12 5 21 5 3"},child:[]}]})(e)}function ng(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"},child:[]}]})(e)}function Zw(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"1"},child:[]},{tag:"circle",attr:{cx:"19",cy:"12",r:"1"},child:[]},{tag:"circle",attr:{cx:"5",cy:"12",r:"1"},child:[]}]})(e)}function Kh(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"},child:[]}]})(e)}function bv(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"3",y1:"12",x2:"21",y2:"12"},child:[]},{tag:"line",attr:{x1:"3",y1:"6",x2:"21",y2:"6"},child:[]},{tag:"line",attr:{x1:"3",y1:"18",x2:"21",y2:"18"},child:[]}]})(e)}function Qw(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"},child:[]},{tag:"path",attr:{d:"M7 11V7a5 5 0 0 1 10 0v4"},child:[]}]})(e)}function qh(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"},child:[]},{tag:"path",attr:{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"},child:[]}]})(e)}function Jw(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4"},child:[]}]})(e)}function e0(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"line",attr:{x1:"2",y1:"12",x2:"22",y2:"12"},child:[]},{tag:"path",attr:{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"},child:[]}]})(e)}function ig(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"},child:[]}]})(e)}function la(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"},child:[]}]})(e)}function Sv(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"},child:[]},{tag:"polyline",attr:{points:"13 2 13 9 20 9"},child:[]}]})(e)}function rg(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 20h9"},child:[]},{tag:"path",attr:{d:"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"},child:[]}]})(e)}function wv(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"},child:[]}]})(e)}function xv(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"},child:[]},{tag:"polyline",attr:{points:"7 10 12 15 17 10"},child:[]},{tag:"line",attr:{x1:"12",y1:"15",x2:"12",y2:"3"},child:[]}]})(e)}function qd(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"4",y:"4",width:"16",height:"16",rx:"2",ry:"2"},child:[]},{tag:"rect",attr:{x:"9",y:"9",width:"6",height:"6"},child:[]},{tag:"line",attr:{x1:"9",y1:"1",x2:"9",y2:"4"},child:[]},{tag:"line",attr:{x1:"15",y1:"1",x2:"15",y2:"4"},child:[]},{tag:"line",attr:{x1:"9",y1:"20",x2:"9",y2:"23"},child:[]},{tag:"line",attr:{x1:"15",y1:"20",x2:"15",y2:"23"},child:[]},{tag:"line",attr:{x1:"20",y1:"9",x2:"23",y2:"9"},child:[]},{tag:"line",attr:{x1:"20",y1:"14",x2:"23",y2:"14"},child:[]},{tag:"line",attr:{x1:"1",y1:"9",x2:"4",y2:"9"},child:[]},{tag:"line",attr:{x1:"1",y1:"14",x2:"4",y2:"14"},child:[]}]})(e)}function kv(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"},child:[]},{tag:"path",attr:{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"},child:[]}]})(e)}function Vd(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"18 15 12 9 6 15"},child:[]}]})(e)}function mc(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"9 18 15 12 9 6"},child:[]}]})(e)}function Zs(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"6 9 12 15 18 9"},child:[]}]})(e)}function Ev(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"20 6 9 17 4 12"},child:[]}]})(e)}function t0(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"},child:[]},{tag:"polyline",attr:{points:"22 4 12 14.01 9 11.01"},child:[]}]})(e)}function n0(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"},child:[]},{tag:"path",attr:{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"},child:[]}]})(e)}function i0(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"12",y1:"19",x2:"12",y2:"5"},child:[]},{tag:"polyline",attr:{points:"5 12 12 5 19 12"},child:[]}]})(e)}function r0(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"12",y1:"5",x2:"12",y2:"19"},child:[]},{tag:"polyline",attr:{points:"19 12 12 19 5 12"},child:[]}]})(e)}function ts({trigger:e,open:t,onOpenChange:n,children:r,align:o="right",fit:a=!1,direction:l="down"}){const u=K.useRef(null);return K.useEffect(()=>{if(!t)return;const d=m=>{u.current&&!u.current.contains(m.target)&&n(!1)},h=m=>{m.key==="Escape"&&n(!1)};return document.addEventListener("mousedown",d),document.addEventListener("keydown",h),()=>{document.removeEventListener("mousedown",d),document.removeEventListener("keydown",h)}},[t,n]),g.jsxs("div",{className:`dropdown ${o} ${a?"fit":""} ${l==="up"?"dd-up":""}`,ref:u,children:[g.jsxs("button",{type:"button",className:"chip",onClick:()=>n(!t),"aria-expanded":t,children:[e,g.jsx(Zs,{className:`dd-caret ${t?"up":""}`})]}),t&&g.jsx("div",{className:"dd-menu",children:r})]})}function Gs({active:e,disabled:t=!1,title:n,onClick:r,children:o}){return g.jsx("button",{type:"button",className:`dd-item ${e?"active":""}`,disabled:t,title:n,onClick:r,children:o})}const Cv="pi-web-ui:lang",s0={cancel:"取消",ok:"确定",save:"保存",close:"关闭",loading:"加载中…",connected:"已连接",connecting:"连接中…",reconnecting:"重连中…",language:"语言",langZh:"中文",langEn:"English",githubRepo:"GitHub 仓库(xing-shuyin/pi-web-ui)",copy:"复制",viewSwitch:"视图切换",chat:"对话",terminal:"终端",selectModel:"选择模型",availableModels:"可用模型",noModels:"暂无可用模型(请先配置 API 密钥)",reasoning:"推理",vision:"识图",refreshModels:"刷新模型列表",manageModels:"⚙ 管理模型(新增 / 修改)",manageModelsTitle:"管理模型",thinkingLevel:"思考强度",thinking:"思考",thinkingChip:"思考:{level}",sound:"声音",newChat:"新对话",more:"更多",newChatTip:"新建对话(每个浏览器独立保存会话)","thinking.off":"关闭","thinking.minimal":"极简","thinking.low":"低","thinking.medium":"中","thinking.high":"高","thinking.xhigh":"极高","thinking.max":"最大",thinkingUnsupported:"当前模型不支持该级别,已按模型能力就近生效",context:"上下文",contextUsage:"上下文用量",cumulativeCost:"累计成本",sessionMessages:"会话消息数",messages:"消息",pluginStatus:"插件状态",working:"工作中",queued:"排队",enterPath:"输入路径,Enter 切换",cwdTip:"工作目录:{path}(点击切换)",folderRef:"文件夹引用:{path}",refOnly:"仅引用:{path}",attachContent:"附加内容:{path}",attachLines:"附加选中行:{path}(第 {start}-{end} 行)",attachImage:"图片:{name}",attachFile:"文件:{name}",removeAttachment:"移除附件",attachHint:"将随下一条消息发送",uploadFile:"添加文件(图片/文本/任意文件,也可直接拖入或粘贴截图)",dropHereToAttach:"松开以添加文件",imageNotSupported:"当前模型不支持识图,图片可能不会被模型看到",imageLoadFailed:"图片读取失败:{name}",fileLoadFailed:"文件读取失败:{name}",fileTooLarge:"文件过大已跳过(>{size}MB):{name}",foldersNotSupported:"不支持直接拖入文件夹,请展开后选择文件",followUpQueued:"⏳ {n} 条跟进消息排队中",steeringQueued:"⏳ {n} 条转向消息排队中",placeholderStreaming:"智能体正在工作中…(消息可排队发送)",placeholderIdle:"给 pi 发送消息 — Enter 发送,/ 查看命令",placeholderConnecting:"正在连接服务器…",stopAgent:"停止智能体",stop:"停止",supplement:"补充",supplementTip:"当前回复完成后立即发送",sendTip:"发送(Enter)",slashCommands:"命令",slashMenuHint:"↑↓ 选择 · Enter/Tab 补全",slashHelpTitle:"pi 命令",slashHelpHint:"输入 / 随时打开命令列表",slashLoading:"命令列表加载中…(连接服务器后可用)",slashBuiltin:"内置",slashExtension:"扩展",slashPrompt:"模板",slashSkill:"技能",slashCopied:"已复制上一条助手回复",slashCopyFailed:"复制失败,请手动复制",slashCopyEmpty:"还没有可复制的助手回复",recentProjects:"最近项目",runningConversations:"运行的对话",historySessions:"历史对话",openHistory:"历史对话",openFiles:"文件列表",streaming:"进行中…",noHistory:"还没有历史对话",current:"当前",messageCount:"{n} 条消息",tuiTip:"pi 终端(TUI)中的对话",emptyChat:"空对话",editReask:"编辑重问",editReaskTip:"修改此问题,并从这里重新提问(会新建一个分支对话,原对话保留)",reaskFromHere:"从此处重新提问",editPlaceholder:"修改问题内容…",editHint:"⌘/Ctrl+Enter 提交 · Esc 取消",expandMsg:"展开",collapseMsg:"收起",toolCalls:"工具调用",bashRuns:"终端运行",images:"图片",update:"更新",updateTip:"检查并更新 pi-web-ui",currentVersion:"当前版本",latestVersion:"最新版本",checkingUpdate:"检查中…",checkUpdate:"检查更新",upToDate:"已是最新版本",updateAvailable:"发现新版本 v{version}",updateJustPublished:"v{version} 刚刚发布,npm 缓存可能尚未同步——若未检测到新版本,请稍后重新检查",updateNow:"立即更新",confirmUpdate:"确认更新(覆盖全局安装)",updateSuccess:"✅ 已更新,正在重启…",updateFailed:"更新失败:{detail}",restartHint:"重启:pi-web-ui server restart",rootDir:"根目录",noFiles:"暂无文件",filesTruncated:"目录过大,列表已截断,仅显示前 2000 项",linkFolderTip:"链接文件夹路径到对话",attachInlineTip:"附加内容到对话",referenceTip:"仅引用路径(AI 按需读取)",previewFile:"预览",downloadFile:"下载文件",downloadFailed:"下载失败:{error}",selectLinesHint:"点击选择行;拖拽或 Shift+点击选择范围",selectedRange:"已选 {n} 行(第 {start}-{end} 行)",fileLines:"{n} 行",selectAll:"全选",clearSelection:"清除",addToChat:"添加到对话",addedToChat:"已添加",previewTruncated:"⚠ 文件过大,仅预览前 512KB",previewLinesTruncated:"… 文件行数过多,仅显示前 {n} 行",binaryFile:"🔣 二进制文件,已显示前 4KB 十六进制",binaryHexTruncated:"(文件更大,可下载完整文件)",previewNotSupported:"该类型文件不支持预览(仅图片 / 视频 / 文本)",emptyFile:"(空文件)",pluginRequest:"插件请求",noOptions:"(无选项)",inputPlaceholder:"输入内容",soundHeader:"声音提示",enableSound:"启用声音",preview:"试听",volume:"音量","sound.question":"问卷弹出","sound.question.desc":"ask_user_question 出现时","sound.done":"回复结束","sound.done.desc":"智能体完成一轮回答时","sound.start":"回复开始","sound.start.desc":"智能体开始新一轮时","sound.error":"出错","sound.error.desc":"出现错误提示时",setupTitle:"未检测到 pi agent 配置",setupDesc:"pi-web-ui 需要 pi 的配置目录(~/.pi/agent)和至少一个 API 密钥才能运行智能体。pi 内置了 openai、anthropic、deepseek 等服务商——选一个填密钥即可,全程无需打开终端。",installFailed:"✖ pi agent 安装失败:",retryInstall:"重试安装",skip:"跳过",installDone:"✅ pi agent CLI 已安装。选择服务商并填入 API 密钥即可开始对话:",provider:"服务商",configured:"已配置",providerKeyReady:"该服务商已配置密钥,可直接使用或更换新密钥。",apiKey:"API 密钥",saving:"保存中…",saveAndStart:"保存并开始使用",recheck:"重新检测",installing:"正在安装 pi agent CLI…",autoInstall:"自动安装 pi agent",attachment:"附件",plugin:"插件",unknown:"未知",thinkingWait:"正在思考",exitCode:"退出码 {code}",cancelled:"已取消",truncated:"… 内容过长,当前视图已截断",outputTruncated:"… 输出过长,当前视图已截断",refOnlyShort:"仅引用",folderRefShort:"文件夹 · 仅引用",inlineLines:"内联 · {n} 行",inlineLinesRange:"行 {start}-{end}",image:"🖼 图片",folderNotExpanded:"文件夹,未展开内容 —— 智能体会按需浏览目录",fileNotExpanded:"文件较大({size}),未展开内容 —— 智能体会按需读取","role.user":"你","role.assistant":"pi","role.tool":"工具","role.bash":"终端","role.branch":"分支摘要","role.compaction":"上下文已压缩",welcomeTitle:"pi 编码智能体",welcomeSub:"检查、编辑、运行 —— 随时待命",directory:"目录",clickToFill:"点击填入输入框",waitingResponse:"正在等待模型响应…",backToBottom:"回到底部",questionNavTitle:"问题列表",questionNavTip:"本对话的全部问题,悬浮展开,点击跳转","ex.understand":"了解这个项目","ex.understand.prompt":"介绍一下这个项目:整体结构、主要模块和如何运行?","ex.debug":"排查一个问题","ex.debug.prompt":"帮我排查一个 bug,请先说明问题现象,我会补充细节。","ex.test":"编写测试","ex.test.prompt":"为项目的核心模块编写单元测试。","ex.review":"代码审查","ex.review.prompt":"审查最近改动的代码,指出潜在问题和改进建议。",error:"出错",done:"完成",running:"执行中…",toolQueued:"排队中",copyArgs:"复制参数",errorOutput:"错误输出",output:"输出",waitingOutput:"等待输出…",toolDoneWaitingModel:"已结束 · 等模型",waitingModel:"等待模型响应…",thinkingNow:"思考中",thinkingPreview:"思考:{preview}",commands:"命令",newCommand:"新建命令",newTerminal:"新建终端",name:"名称",command:"命令",cwdHint:"(${pwd} = 当前工作目录)",noCommands:"还没有命令,点 + 添加一个",clickToRun:"点击运行",edit:"编辑",delete:"删除",confirmQ:"确认?",builtinTerminal:"内置终端",termEmptySub:"点击左侧命令运行,或点右侧 + 新建终端",noTerminal:"暂无终端",exited:"(已退出{code})",closeTerminal:"关闭终端",rerun:"重新读取 .pi/commands.json",terminalTitle:"终端 {n}",exampleName:"例如:启动开发服务器",exampleCommand:"例如:npm run dev",editProvider:"编辑服务商",builtinProviders:"内置服务商",hintKeyOnly:"只需填入 API 密钥",configuredBadge:"✓ 已配置",keyReady:"密钥已就绪",pasteKey:"粘贴 API 密钥…",savingKey:"保存中",saveKey:"保存密钥",customProviders:"自定义服务商",customDesc:"用于 Ollama / vLLM / 兼容 OpenAI 的代理等,写入 pi 的 models.json,保存后热重载、立即生效。",noCustomProviders:"还没有自定义服务商",modelsCount:"{n} 个模型",addProvider:"新增服务商",providerId:"服务商 ID",providerIdHint:"(必填,如 ollama / my-proxy)",displayName:"显示名",displayNamePh:"我的代理",apiType:"API 类型",baseUrlHint:"(OpenAI 兼容端点)",apiKeyHint:"sk-…(可留空,用 auth.json 的密钥)",authHeader:"自动添加 Authorization 请求头",modelsTitle:"模型",modelIdReq:"模型 ID(必填)",text:"文本",textImage:"文本+图片",contextWindow:"上下文",maxOutput:"最大输出",removeModel:"移除模型",addModel:"添加模型",deleteProviderConfirm:"删除服务商 {id} 及其 {n} 个模型?",goalBarTitle:"🎯 目标",goalBarPlaceholder:"设定一个目标,agent 完成后自动审查…",goalBarSet:"开始",goalBarClear:"取消",goalBarLocked:"锁定:应用到后续所有回合",goalBarUnlocked:"仅本回合(改完自动清除)",goalBarReviewModel:"审查模型",goalBarUseMainModel:"使用主模型",goalBarMaxRounds:"最大轮数",goalBarMaxRoundsTip:"最大审查重改轮数;0 或不填 = 不限(持续改到通过)",goalBarUnlimitedShort:"不限",goalBarReviewing:"审查中…",goalBarRound:"第 {n} 轮",goalBarActive:"目标生效中",goalBarPassed:"已通过",goalBarFailed:"未通过",goalBarStatusPending:"等待生成…",goalWizardBtn:"AI 提炼",goalWizardTip:"让 AI 通过问卷调研细化需求,收敛为目标",goalWizardRunning:"目标调研中",goalWizardAnswer:"回答",goalWizardCard:"目标调研",loadingSession:"正在加载会话…",connectingServer:"正在连接 pi-web-ui 服务器…"},o0={cancel:"Cancel",ok:"OK",save:"Save",close:"Close",loading:"Loading…",connected:"Connected",connecting:"Connecting…",reconnecting:"Reconnecting…",language:"Language",langZh:"中文",langEn:"English",githubRepo:"GitHub repository (xing-shuyin/pi-web-ui)",copy:"Copy",viewSwitch:"Switch view",chat:"Chat",terminal:"Terminal",selectModel:"Select model",availableModels:"Available models",noModels:"No models available (configure an API key first)",reasoning:"reasoning",vision:"vision",refreshModels:"Refresh model list",manageModels:"⚙ Manage models (add / edit)",manageModelsTitle:"Manage models",thinkingLevel:"Thinking level",thinking:"Thinking",thinkingChip:"Thinking: {level}",sound:"Sound",newChat:"New chat",more:"More",newChatTip:"New chat (sessions are saved per browser)","thinking.off":"Off","thinking.minimal":"Minimal","thinking.low":"Low","thinking.medium":"Medium","thinking.high":"High","thinking.xhigh":"Extra high","thinking.max":"Max",thinkingUnsupported:"Not supported by this model — snapped to the nearest supported level",context:"Context",contextUsage:"Context usage",cumulativeCost:"Cumulative cost",sessionMessages:"Session messages",messages:"messages",pluginStatus:"Plugin status",working:"Working",queued:"queued",enterPath:"Type a path, Enter to switch",cwdTip:"Working directory: {path} (click to switch)",folderRef:"Folder reference: {path}",refOnly:"Reference only: {path}",attachContent:"Attached content: {path}",attachLines:"Attached selected lines: {path} (lines {start}-{end})",attachImage:"Image: {name}",attachFile:"File: {name}",removeAttachment:"Remove attachment",attachHint:"Will be sent with the next message",uploadFile:"Add files (images / text / any file — or drag in / paste a screenshot)",dropHereToAttach:"Release to attach file",imageNotSupported:"The current model doesn't support vision — the image may be ignored",imageLoadFailed:"Couldn't read image: {name}",fileLoadFailed:"Couldn't read file: {name}",fileTooLarge:"File too large, skipped (> {size}MB): {name}",foldersNotSupported:"Folders can't be dropped directly — expand and pick files instead",followUpQueued:"⏳ {n} follow-up message(s) queued",steeringQueued:"⏳ {n} steering message(s) queued",placeholderStreaming:"The agent is working… (messages will queue)",placeholderIdle:"Message pi — Enter to send, / for commands",placeholderConnecting:"Connecting to server…",stopAgent:"Stop agent",stop:"Stop",supplement:"Follow-up",supplementTip:"Send immediately after the current reply finishes",sendTip:"Send (Enter)",slashCommands:"Commands",slashMenuHint:"↑↓ select · Enter/Tab complete",slashHelpTitle:"pi commands",slashHelpHint:"Type / anytime to open the command list",slashLoading:"Loading commands… (available once connected)",slashBuiltin:"Builtin",slashExtension:"Extension",slashPrompt:"Template",slashSkill:"Skill",slashCopied:"Copied the last assistant reply",slashCopyFailed:"Copy failed — please copy manually",slashCopyEmpty:"No assistant reply to copy yet",recentProjects:"Recent projects",runningConversations:"Running chats",historySessions:"History",openHistory:"History",openFiles:"Files",streaming:"Streaming…",noHistory:"No previous chats",current:"Current",messageCount:"{n} messages",tuiTip:"Chat in the pi terminal (TUI)",emptyChat:"Empty chat",editReask:"Edit & re-ask",editReaskTip:"Edit this question and re-ask from here (forks a new conversation; the original is kept)",reaskFromHere:"Re-ask from here",editPlaceholder:"Edit the question…",editHint:"⌘/Ctrl+Enter to submit · Esc to cancel",expandMsg:"Expand",collapseMsg:"Collapse",toolCalls:"tool calls",bashRuns:"bash runs",images:"images",update:"Update",updateTip:"Check & update pi-web-ui",currentVersion:"Current version",latestVersion:"Latest version",checkingUpdate:"Checking…",checkUpdate:"Check for updates",upToDate:"You're up to date",updateAvailable:"New version v{version} available",updateJustPublished:"v{version} was just published — npm cache may lag; if the new version isn't detected yet, re-check in a moment",updateNow:"Update now",confirmUpdate:"Confirm (replaces global install)",updateSuccess:"✅ Updated — restarting…",updateFailed:"Update failed: {detail}",restartHint:"Restart: pi-web-ui server restart",rootDir:"Root",noFiles:"No files",filesTruncated:"Directory too large — list truncated (first 2000 shown)",linkFolderTip:"Link folder path to chat",attachInlineTip:"Attach content to chat",referenceTip:"Reference path only (AI reads on demand)",previewFile:"Preview",downloadFile:"Download file",downloadFailed:"Download failed: {error}",selectLinesHint:"Click a line to select; drag or Shift+click for a range",selectedRange:"Selected {n} lines (lines {start}-{end})",fileLines:"{n} lines",selectAll:"Select all",clearSelection:"Clear",addToChat:"Add to chat",addedToChat:"Added",previewTruncated:"⚠ File too large — previewing the first 512KB",previewLinesTruncated:"… too many lines — showing the first {n}",binaryFile:"🔣 Binary file — first 4KB shown as hex",binaryHexTruncated:" (file larger — download for the full file)",previewNotSupported:"This file type can't be previewed (only images / videos / text)",emptyFile:"(empty file)",pluginRequest:"Plugin request",noOptions:"(no options)",inputPlaceholder:"Enter content",soundHeader:"Sound notifications",enableSound:"Enable sound",preview:"Preview",volume:"Volume","sound.question":"Question popup","sound.question.desc":"When ask_user_question appears","sound.done":"Reply finished","sound.done.desc":"When the agent finishes a turn","sound.start":"Reply started","sound.start.desc":"When the agent starts a new turn","sound.error":"Error","sound.error.desc":"When an error notice appears",setupTitle:"pi agent config not detected",setupDesc:"pi-web-ui needs pi's config directory (~/.pi/agent) and at least one API key to run the agent. pi has built-in providers such as openai, anthropic, and deepseek — just pick one and enter a key, no terminal needed.",installFailed:"✖ pi agent installation failed:",retryInstall:"Retry install",skip:"Skip",installDone:"✅ pi agent CLI installed. Pick a provider and enter an API key to start chatting:",provider:"Provider",configured:"configured",providerKeyReady:"This provider already has a key — use it or replace it.",apiKey:"API key",saving:"Saving…",saveAndStart:"Save and start using",recheck:"Recheck",installing:"Installing pi agent CLI…",autoInstall:"Auto-install pi agent",attachment:"Attachment",plugin:"plugin",unknown:"unknown",thinkingWait:"Thinking",exitCode:"Exit code {code}",cancelled:"Cancelled",truncated:"… content too long, truncated in this view",outputTruncated:"… output too long, truncated in this view",refOnlyShort:"Reference only",folderRefShort:"Folder · reference only",inlineLines:"Inline · {n} lines",inlineLinesRange:"Lines {start}-{end}",image:"🖼 Image",folderNotExpanded:"Folder — content not expanded, the agent will browse it as needed",fileNotExpanded:"Large file ({size}) — content not expanded, the agent will read it as needed","role.user":"You","role.assistant":"pi","role.tool":"Tool","role.bash":"Terminal","role.branch":"Branch summary","role.compaction":"Context compacted",welcomeTitle:"pi coding agent",welcomeSub:"Inspect, edit, run — always ready",directory:"Directory",clickToFill:"Click to fill input",waitingResponse:"Waiting for model response…",backToBottom:"Back to bottom",questionNavTitle:"Questions",questionNavTip:"All questions in this conversation — hover to expand, click to jump","ex.understand":"Understand this project","ex.understand.prompt":"Introduce this project: overall structure, main modules, and how to run it?","ex.debug":"Debug an issue","ex.debug.prompt":"Help me debug a bug — describe the symptom first, and I'll add details.","ex.test":"Write tests","ex.test.prompt":"Write unit tests for the core modules.","ex.review":"Code review","ex.review.prompt":"Review the recently changed code and point out potential issues and improvements.",error:"Error",done:"Done",running:"Running…",toolQueued:"Queued",copyArgs:"Copy args",errorOutput:"Error output",output:"Output",waitingOutput:"Waiting for output…",toolDoneWaitingModel:"Done · waiting on model",waitingModel:"Waiting for model response…",thinkingNow:"Thinking",thinkingPreview:"Thinking: {preview}",commands:"Commands",newCommand:"New command",newTerminal:"New terminal",name:"Name",command:"Command",cwdHint:"(${pwd} = current working directory)",noCommands:"No commands yet — click + to add one",clickToRun:"Click to run",edit:"Edit",delete:"Delete",confirmQ:"Confirm?",builtinTerminal:"Built-in terminal",termEmptySub:"Click a command on the left to run it, or + on the right for a new terminal",noTerminal:"No terminals",exited:"(exited{code})",closeTerminal:"Close terminal",rerun:"Reload .pi/commands.json",terminalTitle:"Terminal {n}",exampleName:"e.g. start dev server",exampleCommand:"e.g. npm run dev",editProvider:"Edit provider",builtinProviders:"Built-in providers",hintKeyOnly:"Just enter an API key",configuredBadge:"✓ Configured",keyReady:"Key ready",pasteKey:"Paste API key…",savingKey:"Saving",saveKey:"Save key",customProviders:"Custom providers",customDesc:"For Ollama / vLLM / OpenAI-compatible proxies, etc. Written to pi's models.json — hot-reloaded immediately.",noCustomProviders:"No custom providers yet",modelsCount:"{n} models",addProvider:"Add provider",providerId:"Provider ID",providerIdHint:"(required, e.g. ollama / my-proxy)",displayName:"Display name",displayNamePh:"My proxy",apiType:"API type",baseUrlHint:"(OpenAI-compatible endpoint)",apiKeyHint:"sk-… (optional — uses the auth.json key)",authHeader:"Auto-add Authorization header",modelsTitle:"Models",modelIdReq:"Model ID (required)",text:"Text",textImage:"Text+image",contextWindow:"Context",maxOutput:"Max output",removeModel:"Remove model",addModel:"Add model",deleteProviderConfirm:"Delete provider {id} and its {n} models?",goalBarTitle:"🎯 Goal",goalBarPlaceholder:"Set a goal; the agent's output is auto-reviewed…",goalBarSet:"Start",goalBarClear:"Cancel",goalBarLocked:"Locked: applies to every later turn",goalBarUnlocked:"This turn only (cleared afterwards)",goalBarReviewModel:"Review model",goalBarUseMainModel:"Use the main model",goalBarMaxRounds:"Max rounds",goalBarMaxRoundsTip:"Max review-revision rounds; 0 or empty = unlimited (keep revising until it passes)",goalBarUnlimitedShort:"Unlimited",goalBarReviewing:"Reviewing…",goalBarRound:"Round {n}",goalBarActive:"Goal active",goalBarPassed:"Passed",goalBarFailed:"Failed",goalBarStatusPending:"Waiting to generate…",goalWizardBtn:"AI Scrape",goalWizardTip:"Let AI refine the requirement into a goal via a Q&A survey",goalWizardRunning:"Scoping the goal",goalWizardAnswer:"Answer",goalWizardCard:"Goal survey",loadingSession:"Loading session…",connectingServer:"Connecting to pi-web-ui server…"},Nv=K.createContext(null);function a0(){try{const e=localStorage.getItem(Cv);if(e==="zh"||e==="en")return e}catch{}return"zh"}function l0({children:e}){const[t,n]=K.useState(a0),r=K.useCallback(l=>{n(l);try{localStorage.setItem(Cv,l)}catch{}},[]),o=K.useCallback((l,u)=>{let d=o0[l];if(t==="zh"&&(d=s0[l]),u)for(const[h,m]of Object.entries(u))d=d.replaceAll(`{${h}}`,String(m));return d},[t]);K.useEffect(()=>{document.documentElement.lang=t==="zh"?"zh-CN":"en"},[t]);const a=K.useMemo(()=>({locale:t,setLocale:r,t:o}),[t,r,o]);return g.jsx(Nv.Provider,{value:a,children:e})}function Tv(){const e=K.useContext(Nv);if(!e)throw new Error("useI18n must be used within LanguageProvider");return e}function Tt(){return Tv().t}const c0=["off","minimal","low","medium","high","xhigh","max"];function Rv({chat:e,send:t,onManageModels:n,compact:r=!1}){const o=Tt(),a=e.state,l=a==null?void 0:a.model,u=l?`${l.provider}/${l.id}`:null,[d,h]=K.useState(!1),[m,p]=K.useState(!1),[v,b]=K.useState(!1),S=a!=null&&a.availableThinkingLevels&&a.availableThinkingLevels.length>0?new Set(a.availableThinkingLevels):null,w=c0.map(C=>({value:C,label:o(`thinking.${C}`),supported:S?S.has(C):!0})),N=C=>{var M;return((M=w.find(T=>T.value===C))==null?void 0:M.label)??C};return K.useEffect(()=>{d&&e.models.length===0&&!v&&(b(!0),t({type:"list_models"}))},[d,e.models.length,v,t]),K.useEffect(()=>{e.models.length>0&&b(!1)},[e.models.length]),g.jsxs(g.Fragment,{children:[g.jsxs(ts,{trigger:g.jsxs(g.Fragment,{children:[g.jsx(qd,{}),g.jsx("span",{className:"chip-model",children:l?l.name:o("selectModel")}),!r&&(l==null?void 0:l.vision)&&g.jsx("span",{className:"chip-vision",title:o("vision"),children:"🖼"}),!r&&l&&g.jsx("span",{className:"chip-sub",children:l.provider})]}),open:d,onOpenChange:h,children:[g.jsx("div",{className:"dd-header",children:o("availableModels")}),(v||e.modelsLoading)&&g.jsx("div",{className:"dd-loading",children:o("loading")}),e.models.length===0&&!v&&!e.modelsLoading&&g.jsx("div",{className:"dd-loading",children:o("noModels")}),e.models.map(C=>g.jsx(Gs,{active:u===C.id,onClick:()=>{u!==C.id&&t({type:"set_model",modelId:C.id}),h(!1)},children:g.jsxs("span",{className:"dd-model-cell",children:[g.jsx("span",{className:"dd-model-name",children:C.name}),g.jsxs("span",{className:"dd-model-meta",children:[g.jsx("span",{className:"dd-model-provider",children:C.provider}),(C.reasoning||C.vision)&&g.jsxs("span",{className:"dd-model-badges",children:[C.reasoning&&g.jsx("span",{className:"dd-model-badge",children:o("reasoning")}),C.vision&&g.jsx("span",{className:"dd-model-badge",children:o("vision")})]})]})]})},C.id)),g.jsx("button",{type:"button",className:"dd-refresh",onClick:()=>t({type:"list_models"}),children:o("refreshModels")}),g.jsx("button",{type:"button",className:"dd-refresh",onClick:()=>{h(!1),n()},children:o("manageModels")})]}),g.jsxs(ts,{trigger:g.jsxs(g.Fragment,{children:[g.jsx(qw,{}),g.jsx("span",{className:"chip-sub",children:o("thinkingChip",{level:a?N(a.thinkingLevel):"—"})})]}),open:m,onOpenChange:p,children:[g.jsx("div",{className:"dd-header",children:o("thinkingLevel")}),w.map(C=>g.jsx(Gs,{active:(a==null?void 0:a.thinkingLevel)===C.value,disabled:!C.supported,title:C.supported?void 0:o("thinkingUnsupported"),onClick:()=>{(a==null?void 0:a.thinkingLevel)!==C.value&&t({type:"set_thinking",level:C.value}),p(!1)},children:C.label},C.value))]})]})}const u0=[{kind:"question",labelKey:"sound.question",descKey:"sound.question.desc"},{kind:"done",labelKey:"sound.done",descKey:"sound.done.desc"},{kind:"start",labelKey:"sound.start",descKey:"sound.start.desc"},{kind:"error",labelKey:"sound.error",descKey:"sound.error.desc"}];function sg({settings:e,onChange:t,onPreview:n}){const r=Tt(),o=a=>t({...e,...a});return g.jsxs("div",{className:"sound-menu",children:[g.jsx("div",{className:"dd-header",children:r("soundHeader")}),g.jsxs("label",{className:"sound-row sound-master",children:[g.jsxs("span",{className:"sound-label",children:[g.jsx(vv,{className:"sound-icon"}),g.jsx("span",{children:r("enableSound")})]}),g.jsx("input",{type:"checkbox",checked:e.enabled,onChange:a=>o({enabled:a.target.checked})})]}),u0.map(({kind:a,labelKey:l,descKey:u})=>g.jsxs("label",{className:`sound-row ${e.enabled?"":"disabled"}`,children:[g.jsxs("span",{className:"sound-label",children:[g.jsx("span",{className:"sound-name",children:r(l)}),g.jsx("span",{className:"sound-desc",children:r(u)})]}),g.jsxs("span",{className:"sound-right",children:[g.jsx("button",{type:"button",className:"sound-preview",title:r("preview"),disabled:!e.enabled,onClick:d=>{d.preventDefault(),n(a)},children:r("preview")}),g.jsx("input",{type:"checkbox",checked:e[a],disabled:!e.enabled,onChange:d=>o({[a]:d.target.checked})})]})]},a)),g.jsxs("div",{className:`sound-volume ${e.enabled?"":"disabled"}`,children:[g.jsx("span",{className:"sound-name",children:r("volume")}),g.jsx("input",{type:"range",min:0,max:100,step:5,value:e.volume,disabled:!e.enabled,onChange:a=>o({volume:Number(a.target.value)})}),g.jsxs("span",{className:"sound-vol-num",children:[e.volume,"%"]})]})]})}function h0({chat:e,send:t,view:n,onViewChange:r,onOpenPanel:o,onManageModels:a,sound:l,onSoundChange:u,onSoundPreview:d}){var $;const{locale:h,setLocale:m,t:p}=Tv();e.state;const[v,b]=K.useState(!1),[S,w]=K.useState(!1),[N,C]=K.useState(!1),[M,T]=K.useState(!1),[A,V]=K.useState(!1),O=[{value:"zh",label:p("langZh")},{value:"en",label:p("langEn")}],ne=e.ready?p("connected"):e.status==="closed"?p("reconnecting"):p("connecting"),Z=e.ready?"ok":"busy",te=()=>{var D,H,F,W;return g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"dd-update",children:[g.jsxs("div",{className:"dd-row",children:[g.jsx("span",{children:p("currentVersion")}),g.jsxs("b",{children:["v",((D=e.update)==null?void 0:D.current)??"…"]})]}),g.jsxs("div",{className:"dd-row",children:[g.jsx("span",{children:p("latestVersion")}),g.jsx("b",{children:e.update===null?p("checkingUpdate"):e.update.error?e.update.error:e.update.latest?`v${e.update.latest}`:p("checkingUpdate")})]}),((H=e.update)==null?void 0:H.pendingRestart)&&g.jsx("div",{className:"dd-note ok",children:p("updateSuccess")}),e.update&&!e.update.pendingRestart&&e.update.upToDate&&g.jsx("div",{className:"dd-note ok",children:p("upToDate")}),e.update&&!e.update.pendingRestart&&!e.update.upToDate&&e.update.latest&&g.jsx("div",{className:"dd-note warn",children:p("updateAvailable",{version:e.update.latest})}),((F=e.update)==null?void 0:F.latestPublishedAt)&&Date.now()-new Date(e.update.latestPublishedAt).getTime()<30*6e4&&g.jsx("div",{className:"dd-note warn",children:p("updateJustPublished",{version:e.update.latest??""})}),e.updateResult&&!e.updateResult.ok&&g.jsx("div",{className:"dd-note err",children:p("updateFailed",{detail:e.updateResult.detail})}),((W=e.update)==null?void 0:W.pendingRestart)&&g.jsx("div",{className:"dd-note",children:p("restartHint")})]}),g.jsxs("div",{className:"dd-actions",children:[g.jsx("button",{type:"button",className:"dd-refresh",onClick:()=>t({type:"check_update"}),children:e.update===null?p("checkingUpdate"):p("checkUpdate")}),e.update&&!e.update.pendingRestart&&!e.update.upToDate&&e.update.latest&&g.jsx("button",{type:"button",className:`dd-refresh accent ${A?"armed":""}`,onClick:()=>{if(!A){V(!0);return}V(!1),C(!1),T(!1),t({type:"update_app"})},children:p(A?"confirmUpdate":"updateNow")})]})]})};return g.jsxs("header",{className:"topbar",children:[g.jsxs("div",{className:"brand",children:[g.jsx("button",{type:"button",className:"panel-toggle",title:p("openHistory"),onClick:()=>o("left"),children:g.jsx(bv,{})}),g.jsx("span",{className:"brand-logo",children:"π"}),g.jsx("span",{className:"brand-name",children:"pi-web-ui"}),g.jsx("span",{className:`conn-dot ${Z}`,title:ne}),g.jsx("span",{className:"conn-label",children:ne})]}),g.jsxs("div",{className:"topbar-actions",children:[g.jsxs("div",{className:"view-switch",role:"tablist","aria-label":p("viewSwitch"),children:[g.jsxs("button",{type:"button",role:"tab","aria-selected":n==="chat",className:n==="chat"?"active":"",onClick:()=>r("chat"),children:[g.jsx(Kh,{}),g.jsx("span",{children:p("chat")})]}),g.jsxs("button",{type:"button",role:"tab","aria-selected":n==="terminal",className:n==="terminal"?"active":"",onClick:()=>r("terminal"),children:[g.jsx(Kd,{}),g.jsx("span",{children:p("terminal")})]})]}),g.jsxs("div",{className:"topbar-desktop",children:[g.jsx(Rv,{chat:e,send:t,onManageModels:a}),g.jsx(ts,{trigger:g.jsxs(g.Fragment,{children:[g.jsx(vv,{}),g.jsx("span",{className:"chip-sub",children:p("sound")})]}),open:v,onOpenChange:b,children:g.jsx(sg,{settings:l,onChange:u,onPreview:d})}),g.jsxs(ts,{trigger:g.jsxs(g.Fragment,{children:[g.jsx(e0,{}),g.jsx("span",{className:"chip-sub",children:h==="zh"?p("langZh"):"EN"})]}),open:S,onOpenChange:w,children:[g.jsx("div",{className:"dd-header",children:p("language")}),O.map(D=>g.jsx(Gs,{active:h===D.value,onClick:()=>{m(D.value),w(!1)},children:D.label},D.value))]}),g.jsxs(ts,{trigger:g.jsxs(g.Fragment,{children:[g.jsx(xv,{}),g.jsxs("span",{className:"chip-sub",children:["v",(($=e.update)==null?void 0:$.current)??"…"]}),e.update&&!e.update.upToDate&&!e.update.pendingRestart&&g.jsx("span",{className:"update-dot",title:p("updateAvailable",{version:e.update.latest??""})})]}),open:N,onOpenChange:D=>{C(D),V(!1),D&&t({type:"check_update"})},fit:!0,children:[g.jsx("div",{className:"dd-header",children:p("update")}),te()]}),g.jsx("a",{className:"chip github",href:"https://github.com/xing-shuyin/pi-web-ui",target:"_blank",rel:"noreferrer noopener",title:p("githubRepo"),children:g.jsx(ig,{})})]}),g.jsxs("button",{type:"button",className:"chip newchat","data-tip":p("newChatTip"),onClick:()=>t({type:"new_chat"}),children:[g.jsx(os,{}),g.jsx("span",{children:p("newChat")})]}),g.jsx("div",{className:"topbar-more",children:g.jsxs(ts,{trigger:g.jsxs(g.Fragment,{children:[g.jsx(Zw,{}),g.jsx("span",{className:"chip-sub",children:p("more")}),e.update&&!e.update.upToDate&&!e.update.pendingRestart&&g.jsx("span",{className:"update-dot"})]}),open:M,onOpenChange:D=>{T(D),V(!1),D&&t({type:"check_update"})},children:[g.jsx("div",{className:"dd-header",children:p("sound")}),g.jsx(sg,{settings:l,onChange:u,onPreview:d}),g.jsx("div",{className:"dd-header",children:p("language")}),O.map(D=>g.jsx(Gs,{active:h===D.value,onClick:()=>m(D.value),children:D.label},D.value)),g.jsx("div",{className:"dd-header",children:p("update")}),te(),g.jsxs("a",{className:"dd-refresh dd-more-link",href:"https://github.com/xing-shuyin/pi-web-ui",target:"_blank",rel:"noreferrer noopener",children:[g.jsx(ig,{})," ",p("githubRepo")]})]})}),g.jsx("button",{type:"button",className:"panel-toggle",title:p("openFiles"),onClick:()=>o("right"),children:g.jsx(la,{})})]})]})}function og(e){const t=new Date(e),n=new Date;return t.toDateString()===n.toDateString()?`${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}`:`${t.getMonth()+1}/${t.getDate()}`}function d0({chat:e,send:t}){var h,m;const n=Tt(),r=(h=e.state)==null?void 0:h.sessionFile,o=(m=e.state)==null?void 0:m.cwd,a=e.sessions,l=e.projects,u=p=>{const v=p.name||p.firstMessage.trim();return v.length>0?v:n("emptyChat")},d=p=>p.split(/[\\/]/).pop()||p;return g.jsxs("aside",{className:"panel panel-left",children:[l.length>0&&g.jsxs("div",{className:"panel-projects",children:[g.jsx("div",{className:"panel-section-title",children:n("recentProjects")}),g.jsx("div",{className:"projects-scroll",children:l.map(p=>{const v=o===p.path;return g.jsxs("button",{type:"button",className:`project-item ${v?"active":""}`,title:p.path,onClick:()=>{v||t({type:"set_cwd",path:p.path})},children:[g.jsx(la,{className:"project-icon"}),g.jsxs("span",{className:"project-info",children:[g.jsx("span",{className:"project-name",children:d(p.path)}),g.jsx("span",{className:"project-path",children:p.path})]}),g.jsx("span",{className:"project-time",children:og(p.lastUsed)})]},p.path)})})]}),e.conversations.length>0&&g.jsxs("div",{className:"panel-convs",children:[g.jsx("div",{className:"panel-section-title",children:n("runningConversations")}),e.conversations.map(p=>{const v=e.activeConversationId===p.id;return g.jsxs("button",{type:"button",className:`session-item ${v?"active":""}`,title:p.title,onClick:()=>{v||t({type:"switch_conversation",id:p.id})},children:[g.jsx(Kh,{className:"session-icon"}),g.jsxs("span",{className:"session-info",children:[g.jsx("span",{className:"session-title",children:p.title}),g.jsx("span",{className:"session-sub",children:v?n("current"):n("messageCount",{n:p.messageCount})})]}),p.isStreaming&&g.jsx("span",{className:"conv-streaming",title:n("streaming")})]},p.id)}),g.jsx("div",{className:"panel-section-divider"})]}),g.jsxs("div",{className:"panel-sessions",children:[g.jsx("div",{className:"panel-section-title",children:n("historySessions")}),g.jsxs("div",{className:"sessions-scroll",children:[a.length===0&&g.jsx("div",{className:"panel-empty",children:n("noHistory")}),a.map(p=>{const v=r===p.path;return g.jsxs("button",{type:"button",className:`session-item ${v?"active":""}`,title:p.path,onClick:()=>{v||t({type:"switch_session",path:p.path})},children:[g.jsx(Kh,{className:"session-icon"}),g.jsxs("span",{className:"session-info",children:[g.jsx("span",{className:"session-title",children:u(p)}),g.jsxs("span",{className:"session-sub",children:[v?n("current"):n("messageCount",{n:p.messageCount}),p.source==="tui"&&g.jsx("span",{className:"session-src",title:n("tuiTip"),children:"TUI"})]})]}),g.jsx("span",{className:"session-time",children:og(p.modified)})]},p.path)})]})]})]})}function Mv(){if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID();const e=new Uint8Array(16);if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function")crypto.getRandomValues(e);else for(let n=0;n<16;n++)e[n]=Math.floor(Math.random()*256);e[6]=e[6]&15|64,e[8]=e[8]&63|128;const t=[...e].map(n=>n.toString(16).padStart(2,"0")).join("");return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}const ag=2e5,f0=2e5,p0={goal:null,reviewModel:null,maxRounds:3,locked:!0,reviewing:!1,round:0,status:"",verdict:"pending",wizard:{active:!1,draft:"",model:null,step:0,maxSteps:6,status:""}};function m0(){const e=new Map,t=new Map;return{write(n,r){const o=e.get(n);if(o){o.write(r);return}const a=t.get(n)??"",l=a.length+r.length>f0?r:a+r;t.set(n,l)},register(n,r){e.set(n,r);const o=t.get(n);if(o){try{r.write(o)}catch{}t.delete(n)}return()=>{e.get(n)===r&&e.delete(n),t.delete(n)}},clear(){e.clear(),t.clear()}}}function g0(e,t){const n=new Set;for(const o of t.messages)o.role==="toolResult"&&o.toolCallId&&n.add(o.toolCallId),o.role==="bashExecution"&&n.add(`bash-${o.id}`);let r=!1;for(const o of e.keys())n.has(o)&&(e.delete(o),r=!0);return r?new Map(e):e}function _0(e,t){let n=!1;for(const r of e.keys())t.messages.some(a=>a.role==="toolResult"&&a.toolCallId===r)&&(e.delete(r),n=!0);return n?new Map(e):e}function v0(e,t){switch(t.type){case"status":return{...e,status:t.status,ready:t.status==="open"?e.ready:!1,terminals:t.status==="open"?e.terminals:[]};case"ready":return{...e,serverVersion:t.serverVersion,ready:!0};case"snapshot":return{...e,ready:!0,state:t.state,activeConversationId:t.state.conversationId,liveOutputs:g0(e.liveOutputs,t.state),toolStatuses:_0(e.toolStatuses,t.state)};case"tool_delta":{const n=e.liveOutputs.get(t.toolCallId),r=((n==null?void 0:n.text)??"")+t.delta,o=r.length>ag?r.slice(0,ag):r,a=new Map(e.liveOutputs);return a.set(t.toolCallId,{toolName:t.toolName,text:o}),{...e,liveOutputs:a}}case"tool_status":return{...e,toolStatuses:new Map(e.toolStatuses).set(t.status.toolCallId,t.status)};case"notice":return{...e,notices:[...e.notices,t.notice].slice(-6)};case"dismiss_notice":return{...e,notices:e.notices.filter(n=>n.id!==t.id)};case"sessions":return{...e,sessions:t.sessions};case"conversations":return{...e,conversations:t.conversations,activeConversationId:t.activeId};case"projects":return{...e,projects:t.projects};case"files":return{...e,files:t.files};case"file_changed":return{...e,fileChanged:{path:t.path}};case"file_content":return{...e,fileContent:t.content};case"models":return{...e,models:t.models,modelsLoading:t.loading};case"models_config":return{...e,modelsConfig:t.providers};case"providers_status":return{...e,providers:t.providers};case"install_result":return{...e,installResult:t.result};case"path_completions":return{...e,pathCompletions:t.completions};case"update_status":return{...e,update:t.status};case"update_result":return{...e,updateResult:t.result};case"widgets":return{...e,widgets:t.widgets};case"statuses":return{...e,statuses:t.statuses};case"dialog":return{...e,dialog:t.dialog};case"commands":return{...e,commands:t.commands,commandsPath:t.path};case"slash_commands":return{...e,slashCommands:t.commands};case"goal_status":return{...e,goal:t.status};case"terminal_add":return{...e,terminals:[...e.terminals,t.meta]};case"terminal_remove":return{...e,terminals:e.terminals.filter(n=>n.id!==t.id)};case"terminal_exit":return{...e,terminals:e.terminals.map(n=>n.id===t.terminalId?{...n,running:!1,exitCode:t.exitCode}:n)};case"terminal_restart":return{...e,terminals:e.terminals.map(n=>n.id===t.terminalId?{...n,running:!0,exitCode:null}:n)};default:return e}}const lg="pi-web-client-id";function Gd(){let e=localStorage.getItem(lg);return e||(e=Mv(),localStorage.setItem(lg,e)),e}function y0(){return`${location.protocol==="https:"?"wss:":"ws:"}//${location.host}/ws`}function b0(){const[e,t]=K.useReducer(v0,{status:"connecting",ready:!1,state:null,liveOutputs:new Map,toolStatuses:new Map,notices:[],sessions:[],conversations:[],activeConversationId:"",projects:[],files:null,fileChanged:null,fileContent:null,models:[],modelsLoading:!1,modelsConfig:[],providers:[],installResult:null,pathCompletions:[],update:null,updateResult:null,widgets:[],statuses:[],dialog:null,commands:[],commandsPath:"",slashCommands:[],terminals:[],goal:p0}),n=K.useRef(null),r=K.useRef(m0()),o=K.useRef(0),a=K.useRef(null),l=K.useRef(!0),u=K.useRef(0),d=K.useRef(0),h=K.useCallback((M,T)=>{const A=++d.current;t({type:"notice",notice:{id:A,level:M,text:T}}),setTimeout(()=>t({type:"dismiss_notice",id:A}),M==="error"?12e3:7e3)},[]),m=K.useCallback(M=>{const T=n.current;return T&&T.readyState===WebSocket.OPEN?(T.send(JSON.stringify(M)),!0):!1},[]),p=K.useCallback(()=>{if(!l.current)return;t({type:"status",status:"connecting"});const M=new WebSocket(y0());n.current=M,M.onopen=()=>{n.current===M&&(t({type:"status",status:"open"}),o.current=0,u.current=Date.now(),M.send(JSON.stringify({type:"hello",clientId:Gd()})))},M.onmessage=T=>{if(n.current!==M)return;u.current=Date.now();let A;try{A=JSON.parse(T.data)}catch{return}switch(A.type){case"ready":t({type:"ready",serverVersion:A.serverVersion}),M.send(JSON.stringify({type:"get_state"})),M.send(JSON.stringify({type:"list_sessions"})),M.send(JSON.stringify({type:"list_projects"})),M.send(JSON.stringify({type:"list_files"})),M.send(JSON.stringify({type:"list_models"})),M.send(JSON.stringify({type:"list_commands"})),M.send(JSON.stringify({type:"get_commands"})),M.send(JSON.stringify({type:"check_update"}));break;case"snapshot":t({type:"snapshot",state:A.state});break;case"tool_delta":t({type:"tool_delta",toolCallId:A.toolCallId,toolName:A.toolName,delta:A.delta});break;case"tool_status":t({type:"tool_status",status:A});break;case"notice":{const V=++d.current;t({type:"notice",notice:{id:V,level:A.level,text:A.text}}),setTimeout(()=>t({type:"dismiss_notice",id:V}),A.level==="error"?12e3:7e3);break}case"sessions":t({type:"sessions",sessions:A.sessions});break;case"conversations":t({type:"conversations",conversations:A.conversations,activeId:A.activeId});break;case"projects":t({type:"projects",projects:A.projects});break;case"files":t({type:"files",files:A});break;case"file_changed":t({type:"file_changed",path:A.path});break;case"file_content":t({type:"file_content",content:A});break;case"models":t({type:"models",models:A.models,loading:!1});break;case"models_config":t({type:"models_config",providers:A.providers});break;case"providers_status":t({type:"providers_status",providers:A.providers});break;case"install_result":t({type:"install_result",result:A});break;case"path_completions":t({type:"path_completions",completions:A.completions});break;case"update_status":t({type:"update_status",status:A});break;case"update_result":t({type:"update_result",result:A});break;case"widgets":t({type:"widgets",widgets:A.widgets});break;case"statuses":t({type:"statuses",statuses:A.statuses});break;case"dialog":t({type:"dialog",dialog:{id:A.id,kind:A.kind,title:A.title,args:A.args}});break;case"dialog_closed":t({type:"dialog",dialog:null});break;case"terminal_output":r.current.write(A.terminalId,A.data);break;case"terminal_exit":t({type:"terminal_exit",terminalId:A.terminalId,exitCode:A.exitCode});break;case"commands":t({type:"commands",commands:A.commands,path:A.path});break;case"slash_commands":t({type:"slash_commands",commands:A.commands});break;case"goal_status":t({type:"goal_status",status:A.status});break}},M.onclose=()=>{if(n.current===M&&(n.current=null),r.current.clear(),!l.current)return;t({type:"status",status:"closed"});const T=Math.min(1e3*2**o.current,1e4);o.current+=1,a.current=setTimeout(()=>{a.current=null,p()},T)},M.onerror=()=>{M.close()}},[]);K.useEffect(()=>{l.current=!0,p();const M=setInterval(()=>{if(!l.current)return;const T=n.current;T&&T.readyState===WebSocket.OPEN&&Date.now()-u.current>3e4&&T.close()},5e3);return()=>{var T;l.current=!1,clearInterval(M),a.current&&(clearTimeout(a.current),a.current=null),(T=n.current)==null||T.close(),n.current=null}},[p]);const v=K.useCallback(M=>t({type:"dismiss_notice",id:M}),[]),b=K.useCallback(M=>t({type:"terminal_add",meta:M}),[]),S=K.useCallback(M=>t({type:"terminal_remove",id:M}),[]),w=K.useCallback(M=>t({type:"terminal_restart",terminalId:M}),[]),N=K.useCallback((M,T)=>r.current.register(M,T),[]),C=K.useRef({chat:e,send:m,pushNotice:h,dismissNotice:v,terminal:{create:b,close:S,register:N,restart:w}});return C.current={chat:e,send:m,pushNotice:h,dismissNotice:v,terminal:{create:b,close:S,register:N,restart:w}},C.current}const S0=200*1024*1024,w0=/windows/i.test(navigator.userAgent),x0=/[<>:"/\\|?*\u0000-\u001f]/g,k0=/[. ]+$/,E0=/^(con|prn|aux|nul|com[1-9]|lpt[1-9])(\..*)?$/i;function C0(e){const t=e.replace(x0,"_").replace(k0,"");return t?E0.test(t)?`_${t}`:t:"_"}function cg(e,t=!0){return`/api/file?${new URLSearchParams({clientId:Gd(),path:e,...t?{download:"1"}:{}})}`}async function N0(e,t){const n=w0?C0(t):t;try{const r=await fetch(cg(e));if(!r.ok)return{ok:!1,cancelled:!1,error:await r.text().catch(()=>"")||(r.status===404?"文件不存在":`HTTP ${r.status}`)};if(Number(r.headers.get("content-length")??"0")>S0)return window.location.assign(cg(e)),{ok:!0};const a=await r.blob();return window.showSaveFilePicker&&window.isSecureContext?T0(a,n):Vh(a,n)}catch(r){return{ok:!1,cancelled:!1,error:r instanceof Error?r.message:String(r)}}}async function T0(e,t){let n;const r=window.showSaveFilePicker;if(!r)return Vh(e,t);try{n=await r({suggestedName:t})}catch(o){return o instanceof DOMException&&o.name==="AbortError"?{ok:!1,cancelled:!0}:Vh(e,t)}try{const o=await n.createWritable();return await o.write(e),await o.close(),{ok:!0}}catch(o){return{ok:!1,cancelled:!1,error:o instanceof Error?o.message:String(o)}}}function Vh(e,t){const n=URL.createObjectURL(e),r=document.createElement("a");return r.href=n,r.download=t,document.body.appendChild(r),r.click(),r.remove(),setTimeout(()=>URL.revokeObjectURL(n),1e4),{ok:!0}}function R0({chat:e,send:t,onAttach:n,onPreview:r,onNotice:o}){var M;const a=Tt(),[l,u]=K.useState(""),[d,h]=K.useState(!1),m=e.files,p=1e4,v=K.useRef(0),b=K.useRef(void 0),S=K.useCallback((T,A)=>{const V=++v.current;u(T),A!=null&&A.silent||h(!0),t({type:"list_files",path:T===""?void 0:T})||v.current===V&&h(!1)},[t]);K.useEffect(()=>{m&&m.path===l&&h(!1)},[m,l]),K.useEffect(()=>{var V;const T=(V=e.state)==null?void 0:V.cwd;if(T!==b.current){b.current=T,S("",{silent:!0});return}const A=setInterval(()=>{document.visibilityState!=="hidden"&&S(l,{silent:!0})},p);return()=>clearInterval(A)},[(M=e.state)==null?void 0:M.cwd,l,S]),K.useEffect(()=>{const T=e.fileChanged;T&&T.path===l&&S(l,{silent:!0})},[e.fileChanged,l,S]);const w=T=>S(T),N=()=>{(m==null?void 0:m.parent)!==null&&(m==null?void 0:m.parent)!==void 0&&S(m.parent)},C=l.split("/").filter(Boolean);return g.jsxs("aside",{className:"panel panel-right",children:[g.jsxs("div",{className:"panel-crumbs",children:[g.jsx("button",{type:"button",className:`crumb ${l===""?"active":""}`,onClick:()=>S(""),children:a("rootDir")}),C.map((T,A)=>{const V=C.slice(0,A+1).join("/");return g.jsxs("span",{className:"crumb-seg",children:[g.jsx(mc,{}),g.jsx("button",{type:"button",className:`crumb ${V===l?"active":""}`,onClick:()=>S(V),children:T})]},V)})]}),g.jsxs("div",{className:"panel-body",children:[d&&g.jsx("div",{className:"panel-empty",children:a("loading")}),!d&&m&&m.path===l&&g.jsxs(g.Fragment,{children:[m.path!==""&&g.jsxs("button",{type:"button",className:"file-item dir",onClick:N,children:[g.jsx(la,{className:"file-icon"}),g.jsx("span",{className:"file-name",children:".."})]}),m.entries.map(T=>T.type==="dir"?g.jsxs("div",{className:"file-item dir",children:[g.jsxs("button",{type:"button",className:"file-dir-main",onClick:()=>w(T.path),children:[g.jsx(la,{className:"file-icon"}),g.jsx("span",{className:"file-name",children:T.name})]}),g.jsx("button",{type:"button",className:"file-attach ref","data-tip":a("linkFolderTip"),onClick:()=>n(T.path,T.name,"reference",!0),children:g.jsx(qh,{})})]},T.path):g.jsxs("div",{className:"file-item file",children:[g.jsxs("button",{type:"button",className:"file-name",title:`${T.path} — ${a("previewFile")}`,onClick:()=>r(T.path,T.name),children:[g.jsx(Sv,{className:"file-icon"}),g.jsx("span",{className:"file-name-text",children:T.name})]}),g.jsx("button",{type:"button",className:"file-attach download","data-tip":a("downloadFile"),onClick:()=>{N0(T.path,T.name).then(A=>{A.ok||A.cancelled||o("error",a("downloadFailed",{error:A.error}))})},children:g.jsx(xv,{})}),g.jsx("button",{type:"button",className:"file-attach inline","data-tip":a("attachInlineTip"),onClick:()=>n(T.path,T.name,"inline"),children:g.jsx(os,{})}),g.jsx("button",{type:"button",className:"file-attach ref","data-tip":a("referenceTip"),onClick:()=>n(T.path,T.name,"reference"),children:g.jsx(qh,{})})]},T.path)),m.truncated&&g.jsx("div",{className:"panel-empty files-truncated",children:a("filesTruncated")})]}),!d&&!m&&g.jsx("div",{className:"panel-empty",children:a("noFiles")})]}),e.widgets.filter(T=>T.lines.length>0).length>0&&g.jsx("div",{className:"panel-widgets",children:e.widgets.filter(T=>T.lines.length>0).map(T=>g.jsxs("div",{className:"widget",children:[g.jsx("div",{className:"widget-title",children:T.key}),g.jsx("pre",{className:"widget-lines",children:T.lines.join(`
40
+ `+y.stack}return{value:i,source:s,stack:_,digest:null}}function Ru(i,s,c){return{value:i,source:null,stack:c??null,digest:s??null}}function Mu(i,s){try{console.error(s.value)}catch(c){setTimeout(function(){throw c})}}var sw=typeof WeakMap=="function"?WeakMap:Map;function Jp(i,s,c){c=qi(-1,c),c.tag=3,c.payload={element:null};var f=s.value;return c.callback=function(){gl||(gl=!0,Ku=f),Mu(i,s)},c}function em(i,s,c){c=qi(-1,c),c.tag=3;var f=i.type.getDerivedStateFromError;if(typeof f=="function"){var _=s.value;c.payload=function(){return f(_)},c.callback=function(){Mu(i,s)}}var y=i.stateNode;return y!==null&&typeof y.componentDidCatch=="function"&&(c.callback=function(){Mu(i,s),typeof f!="function"&&(mr===null?mr=new Set([this]):mr.add(this));var E=s.stack;this.componentDidCatch(s.value,{componentStack:E!==null?E:""})}),c}function tm(i,s,c){var f=i.pingCache;if(f===null){f=i.pingCache=new sw;var _=new Set;f.set(s,_)}else _=f.get(s),_===void 0&&(_=new Set,f.set(s,_));_.has(c)||(_.add(c),i=yw.bind(null,i,s,c),s.then(i,i))}function nm(i){do{var s;if((s=i.tag===13)&&(s=i.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return i;i=i.return}while(i!==null);return null}function im(i,s,c,f,_){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,c.flags|=131072,c.flags&=-52805,c.tag===1&&(c.alternate===null?c.tag=17:(s=qi(-1,1),s.tag=2,fr(c,s,1))),c.lanes|=1),i):(i.flags|=65536,i.lanes=_,i)}var ow=A.ReactCurrentOwner,Tn=!1;function vn(i,s,c,f){s.child=i===null?xp(s,null,c,f):As(s,i.child,c,f)}function rm(i,s,c,f,_){c=c.render;var y=s.ref;return Os(s,_),f=Su(i,s,c,f,y,_),c=wu(),i!==null&&!Tn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~_,Vi(i,s,_)):(_t&&c&&ru(s),s.flags|=1,vn(i,s,f,_),s.child)}function sm(i,s,c,f,_){if(i===null){var y=c.type;return typeof y=="function"&&!Qu(y)&&y.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(s.tag=15,s.type=y,om(i,s,y,f,_)):(i=wl(c.type,null,f,s,s.mode,_),i.ref=s.ref,i.return=s,s.child=i)}if(y=i.child,(i.lanes&_)===0){var E=y.memoizedProps;if(c=c.compare,c=c!==null?c:_o,c(E,f)&&i.ref===s.ref)return Vi(i,s,_)}return s.flags|=1,i=yr(y,f),i.ref=s.ref,i.return=s,s.child=i}function om(i,s,c,f,_){if(i!==null){var y=i.memoizedProps;if(_o(y,f)&&i.ref===s.ref)if(Tn=!1,s.pendingProps=f=y,(i.lanes&_)!==0)(i.flags&131072)!==0&&(Tn=!0);else return s.lanes=i.lanes,Vi(i,s,_)}return Au(i,s,c,f,_)}function am(i,s,c){var f=s.pendingProps,_=f.children,y=i!==null?i.memoizedState:null;if(f.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},ht(Bs,jn),jn|=c;else{if((c&1073741824)===0)return i=y!==null?y.baseLanes|c:c,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,ht(Bs,jn),jn|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=y!==null?y.baseLanes:c,ht(Bs,jn),jn|=f}else y!==null?(f=y.baseLanes|c,s.memoizedState=null):f=c,ht(Bs,jn),jn|=f;return vn(i,s,_,c),s.child}function lm(i,s){var c=s.ref;(i===null&&c!==null||i!==null&&i.ref!==c)&&(s.flags|=512,s.flags|=2097152)}function Au(i,s,c,f,_){var y=Nn(c)?zr:cn.current;return y=Ns(s,y),Os(s,_),c=Su(i,s,c,f,y,_),f=wu(),i!==null&&!Tn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~_,Vi(i,s,_)):(_t&&f&&ru(s),s.flags|=1,vn(i,s,c,_),s.child)}function cm(i,s,c,f,_){if(Nn(c)){var y=!0;Va(s)}else y=!1;if(Os(s,_),s.stateNode===null)hl(i,s),Zp(s,c,f),Tu(s,c,f,_),f=!0;else if(i===null){var E=s.stateNode,L=s.memoizedProps;E.props=L;var z=E.context,X=c.contextType;typeof X=="object"&&X!==null?X=Zn(X):(X=Nn(c)?zr:cn.current,X=Ns(s,X));var le=c.getDerivedStateFromProps,ce=typeof le=="function"||typeof E.getSnapshotBeforeUpdate=="function";ce||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(L!==f||z!==X)&&Qp(s,E,f,X),dr=!1;var oe=s.memoizedState;E.state=oe,nl(s,f,E,_),z=s.memoizedState,L!==f||oe!==z||Cn.current||dr?(typeof le=="function"&&(Nu(s,c,le,f),z=s.memoizedState),(L=dr||Xp(s,c,L,f,oe,z,X))?(ce||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount()),typeof E.componentDidMount=="function"&&(s.flags|=4194308)):(typeof E.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=f,s.memoizedState=z),E.props=f,E.state=z,E.context=X,f=L):(typeof E.componentDidMount=="function"&&(s.flags|=4194308),f=!1)}else{E=s.stateNode,Ep(i,s),L=s.memoizedProps,X=s.type===s.elementType?L:di(s.type,L),E.props=X,ce=s.pendingProps,oe=E.context,z=c.contextType,typeof z=="object"&&z!==null?z=Zn(z):(z=Nn(c)?zr:cn.current,z=Ns(s,z));var ye=c.getDerivedStateFromProps;(le=typeof ye=="function"||typeof E.getSnapshotBeforeUpdate=="function")||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(L!==ce||oe!==z)&&Qp(s,E,f,z),dr=!1,oe=s.memoizedState,E.state=oe,nl(s,f,E,_);var Ee=s.memoizedState;L!==ce||oe!==Ee||Cn.current||dr?(typeof ye=="function"&&(Nu(s,c,ye,f),Ee=s.memoizedState),(X=dr||Xp(s,c,X,f,oe,Ee,z)||!1)?(le||typeof E.UNSAFE_componentWillUpdate!="function"&&typeof E.componentWillUpdate!="function"||(typeof E.componentWillUpdate=="function"&&E.componentWillUpdate(f,Ee,z),typeof E.UNSAFE_componentWillUpdate=="function"&&E.UNSAFE_componentWillUpdate(f,Ee,z)),typeof E.componentDidUpdate=="function"&&(s.flags|=4),typeof E.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof E.componentDidUpdate!="function"||L===i.memoizedProps&&oe===i.memoizedState||(s.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&oe===i.memoizedState||(s.flags|=1024),s.memoizedProps=f,s.memoizedState=Ee),E.props=f,E.state=Ee,E.context=z,f=X):(typeof E.componentDidUpdate!="function"||L===i.memoizedProps&&oe===i.memoizedState||(s.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&oe===i.memoizedState||(s.flags|=1024),f=!1)}return Lu(i,s,c,f,y,_)}function Lu(i,s,c,f,_,y){lm(i,s);var E=(s.flags&128)!==0;if(!f&&!E)return _&&pp(s,c,!1),Vi(i,s,y);f=s.stateNode,ow.current=s;var L=E&&typeof c.getDerivedStateFromError!="function"?null:f.render();return s.flags|=1,i!==null&&E?(s.child=As(s,i.child,null,y),s.child=As(s,null,L,y)):vn(i,s,L,y),s.memoizedState=f.state,_&&pp(s,c,!0),s.child}function um(i){var s=i.stateNode;s.pendingContext?dp(i,s.pendingContext,s.pendingContext!==s.context):s.context&&dp(i,s.context,!1),mu(i,s.containerInfo)}function hm(i,s,c,f,_){return Ms(),lu(_),s.flags|=256,vn(i,s,c,f),s.child}var Ou={dehydrated:null,treeContext:null,retryLane:0};function Iu(i){return{baseLanes:i,cachePool:null,transitions:null}}function dm(i,s,c){var f=s.pendingProps,_=St.current,y=!1,E=(s.flags&128)!==0,L;if((L=E)||(L=i!==null&&i.memoizedState===null?!1:(_&2)!==0),L?(y=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(_|=1),ht(St,_&1),i===null)return au(s),i=s.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((s.mode&1)===0?s.lanes=1:i.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(E=f.children,i=f.fallback,y?(f=s.mode,y=s.child,E={mode:"hidden",children:E},(f&1)===0&&y!==null?(y.childLanes=0,y.pendingProps=E):y=xl(E,f,0,null),i=Yr(i,f,c,null),y.return=s,i.return=s,y.sibling=i,s.child=y,s.child.memoizedState=Iu(c),s.memoizedState=Ou,i):Du(s,E));if(_=i.memoizedState,_!==null&&(L=_.dehydrated,L!==null))return aw(i,s,E,f,L,_,c);if(y){y=f.fallback,E=s.mode,_=i.child,L=_.sibling;var z={mode:"hidden",children:f.children};return(E&1)===0&&s.child!==_?(f=s.child,f.childLanes=0,f.pendingProps=z,s.deletions=null):(f=yr(_,z),f.subtreeFlags=_.subtreeFlags&14680064),L!==null?y=yr(L,y):(y=Yr(y,E,c,null),y.flags|=2),y.return=s,f.return=s,f.sibling=y,s.child=f,f=y,y=s.child,E=i.child.memoizedState,E=E===null?Iu(c):{baseLanes:E.baseLanes|c,cachePool:null,transitions:E.transitions},y.memoizedState=E,y.childLanes=i.childLanes&~c,s.memoizedState=Ou,f}return y=i.child,i=y.sibling,f=yr(y,{mode:"visible",children:f.children}),(s.mode&1)===0&&(f.lanes=c),f.return=s,f.sibling=null,i!==null&&(c=s.deletions,c===null?(s.deletions=[i],s.flags|=16):c.push(i)),s.child=f,s.memoizedState=null,f}function Du(i,s){return s=xl({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function ul(i,s,c,f){return f!==null&&lu(f),As(s,i.child,null,c),i=Du(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function aw(i,s,c,f,_,y,E){if(c)return s.flags&256?(s.flags&=-257,f=Ru(Error(n(422))),ul(i,s,E,f)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(y=f.fallback,_=s.mode,f=xl({mode:"visible",children:f.children},_,0,null),y=Yr(y,_,E,null),y.flags|=2,f.return=s,y.return=s,f.sibling=y,s.child=f,(s.mode&1)!==0&&As(s,i.child,null,E),s.child.memoizedState=Iu(E),s.memoizedState=Ou,y);if((s.mode&1)===0)return ul(i,s,E,null);if(_.data==="$!"){if(f=_.nextSibling&&_.nextSibling.dataset,f)var L=f.dgst;return f=L,y=Error(n(419)),f=Ru(y,f,void 0),ul(i,s,E,f)}if(L=(E&i.childLanes)!==0,Tn||L){if(f=Yt,f!==null){switch(E&-E){case 4:_=2;break;case 16:_=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:_=32;break;case 536870912:_=268435456;break;default:_=0}_=(_&(f.suspendedLanes|E))!==0?0:_,_!==0&&_!==y.retryLane&&(y.retryLane=_,Ki(i,_),mi(f,i,_,-1))}return Zu(),f=Ru(Error(n(421))),ul(i,s,E,f)}return _.data==="$?"?(s.flags|=128,s.child=i.child,s=bw.bind(null,i),_._reactRetry=s,null):(i=y.treeContext,zn=lr(_.nextSibling),Fn=s,_t=!0,hi=null,i!==null&&(Yn[Xn++]=$i,Yn[Xn++]=Wi,Yn[Xn++]=jr,$i=i.id,Wi=i.overflow,jr=s),s=Du(s,f.children),s.flags|=4096,s)}function fm(i,s,c){i.lanes|=s;var f=i.alternate;f!==null&&(f.lanes|=s),du(i.return,s,c)}function Pu(i,s,c,f,_){var y=i.memoizedState;y===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:f,tail:c,tailMode:_}:(y.isBackwards=s,y.rendering=null,y.renderingStartTime=0,y.last=f,y.tail=c,y.tailMode=_)}function pm(i,s,c){var f=s.pendingProps,_=f.revealOrder,y=f.tail;if(vn(i,s,f.children,c),f=St.current,(f&2)!==0)f=f&1|2,s.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&fm(i,c,s);else if(i.tag===19)fm(i,c,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}f&=1}if(ht(St,f),(s.mode&1)===0)s.memoizedState=null;else switch(_){case"forwards":for(c=s.child,_=null;c!==null;)i=c.alternate,i!==null&&il(i)===null&&(_=c),c=c.sibling;c=_,c===null?(_=s.child,s.child=null):(_=c.sibling,c.sibling=null),Pu(s,!1,_,c,y);break;case"backwards":for(c=null,_=s.child,s.child=null;_!==null;){if(i=_.alternate,i!==null&&il(i)===null){s.child=_;break}i=_.sibling,_.sibling=c,c=_,_=i}Pu(s,!0,c,null,y);break;case"together":Pu(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function hl(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function Vi(i,s,c){if(i!==null&&(s.dependencies=i.dependencies),Kr|=s.lanes,(c&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(n(153));if(s.child!==null){for(i=s.child,c=yr(i,i.pendingProps),s.child=c,c.return=s;i.sibling!==null;)i=i.sibling,c=c.sibling=yr(i,i.pendingProps),c.return=s;c.sibling=null}return s.child}function lw(i,s,c){switch(s.tag){case 3:um(s),Ms();break;case 5:Tp(s);break;case 1:Nn(s.type)&&Va(s);break;case 4:mu(s,s.stateNode.containerInfo);break;case 10:var f=s.type._context,_=s.memoizedProps.value;ht(Ja,f._currentValue),f._currentValue=_;break;case 13:if(f=s.memoizedState,f!==null)return f.dehydrated!==null?(ht(St,St.current&1),s.flags|=128,null):(c&s.child.childLanes)!==0?dm(i,s,c):(ht(St,St.current&1),i=Vi(i,s,c),i!==null?i.sibling:null);ht(St,St.current&1);break;case 19:if(f=(c&s.childLanes)!==0,(i.flags&128)!==0){if(f)return pm(i,s,c);s.flags|=128}if(_=s.memoizedState,_!==null&&(_.rendering=null,_.tail=null,_.lastEffect=null),ht(St,St.current),f)break;return null;case 22:case 23:return s.lanes=0,am(i,s,c)}return Vi(i,s,c)}var mm,Bu,gm,_m;mm=function(i,s){for(var c=s.child;c!==null;){if(c.tag===5||c.tag===6)i.appendChild(c.stateNode);else if(c.tag!==4&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===s)break;for(;c.sibling===null;){if(c.return===null||c.return===s)return;c=c.return}c.sibling.return=c.return,c=c.sibling}},Bu=function(){},gm=function(i,s,c,f){var _=i.memoizedProps;if(_!==f){i=s.stateNode,$r(ki.current);var y=null;switch(c){case"input":_=Dn(i,_),f=Dn(i,f),y=[];break;case"select":_=k({},_,{value:void 0}),f=k({},f,{value:void 0}),y=[];break;case"textarea":_=Rr(i,_),f=Rr(i,f),y=[];break;default:typeof _.onClick!="function"&&typeof f.onClick=="function"&&(i.onclick=Wa)}Ut(c,f);var E;c=null;for(X in _)if(!f.hasOwnProperty(X)&&_.hasOwnProperty(X)&&_[X]!=null)if(X==="style"){var L=_[X];for(E in L)L.hasOwnProperty(E)&&(c||(c={}),c[E]="")}else X!=="dangerouslySetInnerHTML"&&X!=="children"&&X!=="suppressContentEditableWarning"&&X!=="suppressHydrationWarning"&&X!=="autoFocus"&&(o.hasOwnProperty(X)?y||(y=[]):(y=y||[]).push(X,null));for(X in f){var z=f[X];if(L=_!=null?_[X]:void 0,f.hasOwnProperty(X)&&z!==L&&(z!=null||L!=null))if(X==="style")if(L){for(E in L)!L.hasOwnProperty(E)||z&&z.hasOwnProperty(E)||(c||(c={}),c[E]="");for(E in z)z.hasOwnProperty(E)&&L[E]!==z[E]&&(c||(c={}),c[E]=z[E])}else c||(y||(y=[]),y.push(X,c)),c=z;else X==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,L=L?L.__html:void 0,z!=null&&L!==z&&(y=y||[]).push(X,z)):X==="children"?typeof z!="string"&&typeof z!="number"||(y=y||[]).push(X,""+z):X!=="suppressContentEditableWarning"&&X!=="suppressHydrationWarning"&&(o.hasOwnProperty(X)?(z!=null&&X==="onScroll"&&ft("scroll",i),y||L===z||(y=[])):(y=y||[]).push(X,z))}c&&(y=y||[]).push("style",c);var X=y;(s.updateQueue=X)&&(s.flags|=4)}},_m=function(i,s,c,f){c!==f&&(s.flags|=4)};function Lo(i,s){if(!_t)switch(i.tailMode){case"hidden":s=i.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?i.tail=null:c.sibling=null;break;case"collapsed":c=i.tail;for(var f=null;c!==null;)c.alternate!==null&&(f=c),c=c.sibling;f===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:f.sibling=null}}function hn(i){var s=i.alternate!==null&&i.alternate.child===i.child,c=0,f=0;if(s)for(var _=i.child;_!==null;)c|=_.lanes|_.childLanes,f|=_.subtreeFlags&14680064,f|=_.flags&14680064,_.return=i,_=_.sibling;else for(_=i.child;_!==null;)c|=_.lanes|_.childLanes,f|=_.subtreeFlags,f|=_.flags,_.return=i,_=_.sibling;return i.subtreeFlags|=f,i.childLanes=c,s}function cw(i,s,c){var f=s.pendingProps;switch(su(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return hn(s),null;case 1:return Nn(s.type)&&qa(),hn(s),null;case 3:return f=s.stateNode,Is(),pt(Cn),pt(cn),vu(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(i===null||i.child===null)&&(Za(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,hi!==null&&(Gu(hi),hi=null))),Bu(i,s),hn(s),null;case 5:gu(s);var _=$r(No.current);if(c=s.type,i!==null&&s.stateNode!=null)gm(i,s,c,f,_),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!f){if(s.stateNode===null)throw Error(n(166));return hn(s),null}if(i=$r(ki.current),Za(s)){f=s.stateNode,c=s.type;var y=s.memoizedProps;switch(f[xi]=s,f[wo]=y,i=(s.mode&1)!==0,c){case"dialog":ft("cancel",f),ft("close",f);break;case"iframe":case"object":case"embed":ft("load",f);break;case"video":case"audio":for(_=0;_<yo.length;_++)ft(yo[_],f);break;case"source":ft("error",f);break;case"img":case"image":case"link":ft("error",f),ft("load",f);break;case"details":ft("toggle",f);break;case"input":Pi(f,y),ft("invalid",f);break;case"select":f._wrapperState={wasMultiple:!!y.multiple},ft("invalid",f);break;case"textarea":Mr(f,y),ft("invalid",f)}Ut(c,y),_=null;for(var E in y)if(y.hasOwnProperty(E)){var L=y[E];E==="children"?typeof L=="string"?f.textContent!==L&&(y.suppressHydrationWarning!==!0&&$a(f.textContent,L,i),_=["children",L]):typeof L=="number"&&f.textContent!==""+L&&(y.suppressHydrationWarning!==!0&&$a(f.textContent,L,i),_=["children",""+L]):o.hasOwnProperty(E)&&L!=null&&E==="onScroll"&&ft("scroll",f)}switch(c){case"input":zt(f),Kn(f,y,!0);break;case"textarea":zt(f),Ar(f);break;case"select":case"option":break;default:typeof y.onClick=="function"&&(f.onclick=Wa)}f=_,s.updateQueue=f,f!==null&&(s.flags|=4)}else{E=_.nodeType===9?_:_.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=ee(c)),i==="http://www.w3.org/1999/xhtml"?c==="script"?(i=E.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof f.is=="string"?i=E.createElement(c,{is:f.is}):(i=E.createElement(c),c==="select"&&(E=i,f.multiple?E.multiple=!0:f.size&&(E.size=f.size))):i=E.createElementNS(i,c),i[xi]=s,i[wo]=f,mm(i,s,!1,!1),s.stateNode=i;e:{switch(E=Vn(c,f),c){case"dialog":ft("cancel",i),ft("close",i),_=f;break;case"iframe":case"object":case"embed":ft("load",i),_=f;break;case"video":case"audio":for(_=0;_<yo.length;_++)ft(yo[_],i);_=f;break;case"source":ft("error",i),_=f;break;case"img":case"image":case"link":ft("error",i),ft("load",i),_=f;break;case"details":ft("toggle",i),_=f;break;case"input":Pi(i,f),_=Dn(i,f),ft("invalid",i);break;case"option":_=f;break;case"select":i._wrapperState={wasMultiple:!!f.multiple},_=k({},f,{value:void 0}),ft("invalid",i);break;case"textarea":Mr(i,f),_=Rr(i,f),ft("invalid",i);break;default:_=f}Ut(c,_),L=_;for(y in L)if(L.hasOwnProperty(y)){var z=L[y];y==="style"?li(i,z):y==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,z!=null&&We(i,z)):y==="children"?typeof z=="string"?(c!=="textarea"||z!=="")&&Qe(i,z):typeof z=="number"&&Qe(i,""+z):y!=="suppressContentEditableWarning"&&y!=="suppressHydrationWarning"&&y!=="autoFocus"&&(o.hasOwnProperty(y)?z!=null&&y==="onScroll"&&ft("scroll",i):z!=null&&T(i,y,z,E))}switch(c){case"input":zt(i),Kn(i,f,!1);break;case"textarea":zt(i),Ar(i);break;case"option":f.value!=null&&i.setAttribute("value",""+Te(f.value));break;case"select":i.multiple=!!f.multiple,y=f.value,y!=null?yi(i,!!f.multiple,y,!1):f.defaultValue!=null&&yi(i,!!f.multiple,f.defaultValue,!0);break;default:typeof _.onClick=="function"&&(i.onclick=Wa)}switch(c){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}}f&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return hn(s),null;case 6:if(i&&s.stateNode!=null)_m(i,s,i.memoizedProps,f);else{if(typeof f!="string"&&s.stateNode===null)throw Error(n(166));if(c=$r(No.current),$r(ki.current),Za(s)){if(f=s.stateNode,c=s.memoizedProps,f[xi]=s,(y=f.nodeValue!==c)&&(i=Fn,i!==null))switch(i.tag){case 3:$a(f.nodeValue,c,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&$a(f.nodeValue,c,(i.mode&1)!==0)}y&&(s.flags|=4)}else f=(c.nodeType===9?c:c.ownerDocument).createTextNode(f),f[xi]=s,s.stateNode=f}return hn(s),null;case 13:if(pt(St),f=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(_t&&zn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)bp(),Ms(),s.flags|=98560,y=!1;else if(y=Za(s),f!==null&&f.dehydrated!==null){if(i===null){if(!y)throw Error(n(318));if(y=s.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(n(317));y[xi]=s}else Ms(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;hn(s),y=!1}else hi!==null&&(Gu(hi),hi=null),y=!0;if(!y)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=c,s):(f=f!==null,f!==(i!==null&&i.memoizedState!==null)&&f&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(St.current&1)!==0?$t===0&&($t=3):Zu())),s.updateQueue!==null&&(s.flags|=4),hn(s),null);case 4:return Is(),Bu(i,s),i===null&&bo(s.stateNode.containerInfo),hn(s),null;case 10:return hu(s.type._context),hn(s),null;case 17:return Nn(s.type)&&qa(),hn(s),null;case 19:if(pt(St),y=s.memoizedState,y===null)return hn(s),null;if(f=(s.flags&128)!==0,E=y.rendering,E===null)if(f)Lo(y,!1);else{if($t!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(E=il(i),E!==null){for(s.flags|=128,Lo(y,!1),f=E.updateQueue,f!==null&&(s.updateQueue=f,s.flags|=4),s.subtreeFlags=0,f=c,c=s.child;c!==null;)y=c,i=f,y.flags&=14680066,E=y.alternate,E===null?(y.childLanes=0,y.lanes=i,y.child=null,y.subtreeFlags=0,y.memoizedProps=null,y.memoizedState=null,y.updateQueue=null,y.dependencies=null,y.stateNode=null):(y.childLanes=E.childLanes,y.lanes=E.lanes,y.child=E.child,y.subtreeFlags=0,y.deletions=null,y.memoizedProps=E.memoizedProps,y.memoizedState=E.memoizedState,y.updateQueue=E.updateQueue,y.type=E.type,i=E.dependencies,y.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),c=c.sibling;return ht(St,St.current&1|2),s.child}i=i.sibling}y.tail!==null&&yt()>Fs&&(s.flags|=128,f=!0,Lo(y,!1),s.lanes=4194304)}else{if(!f)if(i=il(E),i!==null){if(s.flags|=128,f=!0,c=i.updateQueue,c!==null&&(s.updateQueue=c,s.flags|=4),Lo(y,!0),y.tail===null&&y.tailMode==="hidden"&&!E.alternate&&!_t)return hn(s),null}else 2*yt()-y.renderingStartTime>Fs&&c!==1073741824&&(s.flags|=128,f=!0,Lo(y,!1),s.lanes=4194304);y.isBackwards?(E.sibling=s.child,s.child=E):(c=y.last,c!==null?c.sibling=E:s.child=E,y.last=E)}return y.tail!==null?(s=y.tail,y.rendering=s,y.tail=s.sibling,y.renderingStartTime=yt(),s.sibling=null,c=St.current,ht(St,f?c&1|2:c&1),s):(hn(s),null);case 22:case 23:return Xu(),f=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==f&&(s.flags|=8192),f&&(s.mode&1)!==0?(jn&1073741824)!==0&&(hn(s),s.subtreeFlags&6&&(s.flags|=8192)):hn(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function uw(i,s){switch(su(s),s.tag){case 1:return Nn(s.type)&&qa(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return Is(),pt(Cn),pt(cn),vu(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return gu(s),null;case 13:if(pt(St),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));Ms()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return pt(St),null;case 4:return Is(),null;case 10:return hu(s.type._context),null;case 22:case 23:return Xu(),null;case 24:return null;default:return null}}var dl=!1,dn=!1,hw=typeof WeakSet=="function"?WeakSet:Set,ke=null;function Ps(i,s){var c=i.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(f){Ct(i,s,f)}else c.current=null}function Fu(i,s,c){try{c()}catch(f){Ct(i,s,f)}}var vm=!1;function dw(i,s){if(Xc=La,i=Xf(),Hc(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var f=c.getSelection&&c.getSelection();if(f&&f.rangeCount!==0){c=f.anchorNode;var _=f.anchorOffset,y=f.focusNode;f=f.focusOffset;try{c.nodeType,y.nodeType}catch{c=null;break e}var E=0,L=-1,z=-1,X=0,le=0,ce=i,oe=null;t:for(;;){for(var ye;ce!==c||_!==0&&ce.nodeType!==3||(L=E+_),ce!==y||f!==0&&ce.nodeType!==3||(z=E+f),ce.nodeType===3&&(E+=ce.nodeValue.length),(ye=ce.firstChild)!==null;)oe=ce,ce=ye;for(;;){if(ce===i)break t;if(oe===c&&++X===_&&(L=E),oe===y&&++le===f&&(z=E),(ye=ce.nextSibling)!==null)break;ce=oe,oe=ce.parentNode}ce=ye}c=L===-1||z===-1?null:{start:L,end:z}}else c=null}c=c||{start:0,end:0}}else c=null;for(Zc={focusedElem:i,selectionRange:c},La=!1,ke=s;ke!==null;)if(s=ke,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,ke=i;else for(;ke!==null;){s=ke;try{var Ee=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(Ee!==null){var Ce=Ee.memoizedProps,Lt=Ee.memoizedState,G=s.stateNode,U=G.getSnapshotBeforeUpdate(s.elementType===s.type?Ce:di(s.type,Ce),Lt);G.__reactInternalSnapshotBeforeUpdate=U}break;case 3:var Y=s.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(n(163))}}catch(de){Ct(s,s.return,de)}if(i=s.sibling,i!==null){i.return=s.return,ke=i;break}ke=s.return}return Ee=vm,vm=!1,Ee}function Oo(i,s,c){var f=s.updateQueue;if(f=f!==null?f.lastEffect:null,f!==null){var _=f=f.next;do{if((_.tag&i)===i){var y=_.destroy;_.destroy=void 0,y!==void 0&&Fu(s,c,y)}_=_.next}while(_!==f)}}function fl(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var c=s=s.next;do{if((c.tag&i)===i){var f=c.create;c.destroy=f()}c=c.next}while(c!==s)}}function zu(i){var s=i.ref;if(s!==null){var c=i.stateNode;switch(i.tag){case 5:i=c;break;default:i=c}typeof s=="function"?s(i):s.current=i}}function ym(i){var s=i.alternate;s!==null&&(i.alternate=null,ym(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[xi],delete s[wo],delete s[tu],delete s[GS],delete s[YS])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function bm(i){return i.tag===5||i.tag===3||i.tag===4}function Sm(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||bm(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function ju(i,s,c){var f=i.tag;if(f===5||f===6)i=i.stateNode,s?c.nodeType===8?c.parentNode.insertBefore(i,s):c.insertBefore(i,s):(c.nodeType===8?(s=c.parentNode,s.insertBefore(i,c)):(s=c,s.appendChild(i)),c=c._reactRootContainer,c!=null||s.onclick!==null||(s.onclick=Wa));else if(f!==4&&(i=i.child,i!==null))for(ju(i,s,c),i=i.sibling;i!==null;)ju(i,s,c),i=i.sibling}function Uu(i,s,c){var f=i.tag;if(f===5||f===6)i=i.stateNode,s?c.insertBefore(i,s):c.appendChild(i);else if(f!==4&&(i=i.child,i!==null))for(Uu(i,s,c),i=i.sibling;i!==null;)Uu(i,s,c),i=i.sibling}var sn=null,fi=!1;function pr(i,s,c){for(c=c.child;c!==null;)wm(i,s,c),c=c.sibling}function wm(i,s,c){if(Ye&&typeof Ye.onCommitFiberUnmount=="function")try{Ye.onCommitFiberUnmount(Ke,c)}catch{}switch(c.tag){case 5:dn||Ps(c,s);case 6:var f=sn,_=fi;sn=null,pr(i,s,c),sn=f,fi=_,sn!==null&&(fi?(i=sn,c=c.stateNode,i.nodeType===8?i.parentNode.removeChild(c):i.removeChild(c)):sn.removeChild(c.stateNode));break;case 18:sn!==null&&(fi?(i=sn,c=c.stateNode,i.nodeType===8?eu(i.parentNode,c):i.nodeType===1&&eu(i,c),uo(i)):eu(sn,c.stateNode));break;case 4:f=sn,_=fi,sn=c.stateNode.containerInfo,fi=!0,pr(i,s,c),sn=f,fi=_;break;case 0:case 11:case 14:case 15:if(!dn&&(f=c.updateQueue,f!==null&&(f=f.lastEffect,f!==null))){_=f=f.next;do{var y=_,E=y.destroy;y=y.tag,E!==void 0&&((y&2)!==0||(y&4)!==0)&&Fu(c,s,E),_=_.next}while(_!==f)}pr(i,s,c);break;case 1:if(!dn&&(Ps(c,s),f=c.stateNode,typeof f.componentWillUnmount=="function"))try{f.props=c.memoizedProps,f.state=c.memoizedState,f.componentWillUnmount()}catch(L){Ct(c,s,L)}pr(i,s,c);break;case 21:pr(i,s,c);break;case 22:c.mode&1?(dn=(f=dn)||c.memoizedState!==null,pr(i,s,c),dn=f):pr(i,s,c);break;default:pr(i,s,c)}}function xm(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var c=i.stateNode;c===null&&(c=i.stateNode=new hw),s.forEach(function(f){var _=Sw.bind(null,i,f);c.has(f)||(c.add(f),f.then(_,_))})}}function pi(i,s){var c=s.deletions;if(c!==null)for(var f=0;f<c.length;f++){var _=c[f];try{var y=i,E=s,L=E;e:for(;L!==null;){switch(L.tag){case 5:sn=L.stateNode,fi=!1;break e;case 3:sn=L.stateNode.containerInfo,fi=!0;break e;case 4:sn=L.stateNode.containerInfo,fi=!0;break e}L=L.return}if(sn===null)throw Error(n(160));wm(y,E,_),sn=null,fi=!1;var z=_.alternate;z!==null&&(z.return=null),_.return=null}catch(X){Ct(_,s,X)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)km(s,i),s=s.sibling}function km(i,s){var c=i.alternate,f=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(pi(s,i),Ci(i),f&4){try{Oo(3,i,i.return),fl(3,i)}catch(Ce){Ct(i,i.return,Ce)}try{Oo(5,i,i.return)}catch(Ce){Ct(i,i.return,Ce)}}break;case 1:pi(s,i),Ci(i),f&512&&c!==null&&Ps(c,c.return);break;case 5:if(pi(s,i),Ci(i),f&512&&c!==null&&Ps(c,c.return),i.flags&32){var _=i.stateNode;try{Qe(_,"")}catch(Ce){Ct(i,i.return,Ce)}}if(f&4&&(_=i.stateNode,_!=null)){var y=i.memoizedProps,E=c!==null?c.memoizedProps:y,L=i.type,z=i.updateQueue;if(i.updateQueue=null,z!==null)try{L==="input"&&y.type==="radio"&&y.name!=null&&et(_,y),Vn(L,E);var X=Vn(L,y);for(E=0;E<z.length;E+=2){var le=z[E],ce=z[E+1];le==="style"?li(_,ce):le==="dangerouslySetInnerHTML"?We(_,ce):le==="children"?Qe(_,ce):T(_,le,ce,X)}switch(L){case"input":Pn(_,y);break;case"textarea":qn(_,y);break;case"select":var oe=_._wrapperState.wasMultiple;_._wrapperState.wasMultiple=!!y.multiple;var ye=y.value;ye!=null?yi(_,!!y.multiple,ye,!1):oe!==!!y.multiple&&(y.defaultValue!=null?yi(_,!!y.multiple,y.defaultValue,!0):yi(_,!!y.multiple,y.multiple?[]:"",!1))}_[wo]=y}catch(Ce){Ct(i,i.return,Ce)}}break;case 6:if(pi(s,i),Ci(i),f&4){if(i.stateNode===null)throw Error(n(162));_=i.stateNode,y=i.memoizedProps;try{_.nodeValue=y}catch(Ce){Ct(i,i.return,Ce)}}break;case 3:if(pi(s,i),Ci(i),f&4&&c!==null&&c.memoizedState.isDehydrated)try{uo(s.containerInfo)}catch(Ce){Ct(i,i.return,Ce)}break;case 4:pi(s,i),Ci(i);break;case 13:pi(s,i),Ci(i),_=i.child,_.flags&8192&&(y=_.memoizedState!==null,_.stateNode.isHidden=y,!y||_.alternate!==null&&_.alternate.memoizedState!==null||(Wu=yt())),f&4&&xm(i);break;case 22:if(le=c!==null&&c.memoizedState!==null,i.mode&1?(dn=(X=dn)||le,pi(s,i),dn=X):pi(s,i),Ci(i),f&8192){if(X=i.memoizedState!==null,(i.stateNode.isHidden=X)&&!le&&(i.mode&1)!==0)for(ke=i,le=i.child;le!==null;){for(ce=ke=le;ke!==null;){switch(oe=ke,ye=oe.child,oe.tag){case 0:case 11:case 14:case 15:Oo(4,oe,oe.return);break;case 1:Ps(oe,oe.return);var Ee=oe.stateNode;if(typeof Ee.componentWillUnmount=="function"){f=oe,c=oe.return;try{s=f,Ee.props=s.memoizedProps,Ee.state=s.memoizedState,Ee.componentWillUnmount()}catch(Ce){Ct(f,c,Ce)}}break;case 5:Ps(oe,oe.return);break;case 22:if(oe.memoizedState!==null){Nm(ce);continue}}ye!==null?(ye.return=oe,ke=ye):Nm(ce)}le=le.sibling}e:for(le=null,ce=i;;){if(ce.tag===5){if(le===null){le=ce;try{_=ce.stateNode,X?(y=_.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none"):(L=ce.stateNode,z=ce.memoizedProps.style,E=z!=null&&z.hasOwnProperty("display")?z.display:null,L.style.display=En("display",E))}catch(Ce){Ct(i,i.return,Ce)}}}else if(ce.tag===6){if(le===null)try{ce.stateNode.nodeValue=X?"":ce.memoizedProps}catch(Ce){Ct(i,i.return,Ce)}}else if((ce.tag!==22&&ce.tag!==23||ce.memoizedState===null||ce===i)&&ce.child!==null){ce.child.return=ce,ce=ce.child;continue}if(ce===i)break e;for(;ce.sibling===null;){if(ce.return===null||ce.return===i)break e;le===ce&&(le=null),ce=ce.return}le===ce&&(le=null),ce.sibling.return=ce.return,ce=ce.sibling}}break;case 19:pi(s,i),Ci(i),f&4&&xm(i);break;case 21:break;default:pi(s,i),Ci(i)}}function Ci(i){var s=i.flags;if(s&2){try{e:{for(var c=i.return;c!==null;){if(bm(c)){var f=c;break e}c=c.return}throw Error(n(160))}switch(f.tag){case 5:var _=f.stateNode;f.flags&32&&(Qe(_,""),f.flags&=-33);var y=Sm(i);Uu(i,y,_);break;case 3:case 4:var E=f.stateNode.containerInfo,L=Sm(i);ju(i,L,E);break;default:throw Error(n(161))}}catch(z){Ct(i,i.return,z)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function fw(i,s,c){ke=i,Em(i)}function Em(i,s,c){for(var f=(i.mode&1)!==0;ke!==null;){var _=ke,y=_.child;if(_.tag===22&&f){var E=_.memoizedState!==null||dl;if(!E){var L=_.alternate,z=L!==null&&L.memoizedState!==null||dn;L=dl;var X=dn;if(dl=E,(dn=z)&&!X)for(ke=_;ke!==null;)E=ke,z=E.child,E.tag===22&&E.memoizedState!==null?Tm(_):z!==null?(z.return=E,ke=z):Tm(_);for(;y!==null;)ke=y,Em(y),y=y.sibling;ke=_,dl=L,dn=X}Cm(i)}else(_.subtreeFlags&8772)!==0&&y!==null?(y.return=_,ke=y):Cm(i)}}function Cm(i){for(;ke!==null;){var s=ke;if((s.flags&8772)!==0){var c=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:dn||fl(5,s);break;case 1:var f=s.stateNode;if(s.flags&4&&!dn)if(c===null)f.componentDidMount();else{var _=s.elementType===s.type?c.memoizedProps:di(s.type,c.memoizedProps);f.componentDidUpdate(_,c.memoizedState,f.__reactInternalSnapshotBeforeUpdate)}var y=s.updateQueue;y!==null&&Np(s,y,f);break;case 3:var E=s.updateQueue;if(E!==null){if(c=null,s.child!==null)switch(s.child.tag){case 5:c=s.child.stateNode;break;case 1:c=s.child.stateNode}Np(s,E,c)}break;case 5:var L=s.stateNode;if(c===null&&s.flags&4){c=L;var z=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":z.autoFocus&&c.focus();break;case"img":z.src&&(c.src=z.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var X=s.alternate;if(X!==null){var le=X.memoizedState;if(le!==null){var ce=le.dehydrated;ce!==null&&uo(ce)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}dn||s.flags&512&&zu(s)}catch(oe){Ct(s,s.return,oe)}}if(s===i){ke=null;break}if(c=s.sibling,c!==null){c.return=s.return,ke=c;break}ke=s.return}}function Nm(i){for(;ke!==null;){var s=ke;if(s===i){ke=null;break}var c=s.sibling;if(c!==null){c.return=s.return,ke=c;break}ke=s.return}}function Tm(i){for(;ke!==null;){var s=ke;try{switch(s.tag){case 0:case 11:case 15:var c=s.return;try{fl(4,s)}catch(z){Ct(s,c,z)}break;case 1:var f=s.stateNode;if(typeof f.componentDidMount=="function"){var _=s.return;try{f.componentDidMount()}catch(z){Ct(s,_,z)}}var y=s.return;try{zu(s)}catch(z){Ct(s,y,z)}break;case 5:var E=s.return;try{zu(s)}catch(z){Ct(s,E,z)}}}catch(z){Ct(s,s.return,z)}if(s===i){ke=null;break}var L=s.sibling;if(L!==null){L.return=s.return,ke=L;break}ke=s.return}}var pw=Math.ceil,pl=A.ReactCurrentDispatcher,Hu=A.ReactCurrentOwner,Jn=A.ReactCurrentBatchConfig,it=0,Yt=null,Dt=null,on=0,jn=0,Bs=cr(0),$t=0,Io=null,Kr=0,ml=0,$u=0,Do=null,Rn=null,Wu=0,Fs=1/0,Gi=null,gl=!1,Ku=null,mr=null,_l=!1,gr=null,vl=0,Po=0,qu=null,yl=-1,bl=0;function yn(){return(it&6)!==0?yt():yl!==-1?yl:yl=yt()}function _r(i){return(i.mode&1)===0?1:(it&2)!==0&&on!==0?on&-on:ZS.transition!==null?(bl===0&&(bl=Ra()),bl):(i=nt,i!==0||(i=window.event,i=i===void 0?16:Mf(i.type)),i)}function mi(i,s,c,f){if(50<Po)throw Po=0,qu=null,Error(n(185));rr(i,c,f),((it&2)===0||i!==Yt)&&(i===Yt&&((it&2)===0&&(ml|=c),$t===4&&vr(i,on)),Mn(i,f),c===1&&it===0&&(s.mode&1)===0&&(Fs=yt()+500,Ga&&hr()))}function Mn(i,s){var c=i.callbackNode;Rc(i,s);var f=Dr(i,i===Yt?on:0);if(f===0)c!==null&&ci(c),i.callbackNode=null,i.callbackPriority=0;else if(s=f&-f,i.callbackPriority!==s){if(c!=null&&ci(c),s===1)i.tag===0?XS(Mm.bind(null,i)):mp(Mm.bind(null,i)),qS(function(){(it&6)===0&&hr()}),c=null;else{switch(Ue(f)){case 1:c=ro;break;case 4:c=Or;break;case 16:c=gs;break;case 536870912:c=Re;break;default:c=gs}c=Fm(c,Rm.bind(null,i))}i.callbackPriority=s,i.callbackNode=c}}function Rm(i,s){if(yl=-1,bl=0,(it&6)!==0)throw Error(n(327));var c=i.callbackNode;if(zs()&&i.callbackNode!==c)return null;var f=Dr(i,i===Yt?on:0);if(f===0)return null;if((f&30)!==0||(f&i.expiredLanes)!==0||s)s=Sl(i,f);else{s=f;var _=it;it|=2;var y=Lm();(Yt!==i||on!==s)&&(Gi=null,Fs=yt()+500,Vr(i,s));do try{_w();break}catch(L){Am(i,L)}while(!0);uu(),pl.current=y,it=_,Dt!==null?s=0:(Yt=null,on=0,s=$t)}if(s!==0){if(s===2&&(_=so(i),_!==0&&(f=_,s=Vu(i,_))),s===1)throw c=Io,Vr(i,0),vr(i,f),Mn(i,yt()),c;if(s===6)vr(i,f);else{if(_=i.current.alternate,(f&30)===0&&!mw(_)&&(s=Sl(i,f),s===2&&(y=so(i),y!==0&&(f=y,s=Vu(i,y))),s===1))throw c=Io,Vr(i,0),vr(i,f),Mn(i,yt()),c;switch(i.finishedWork=_,i.finishedLanes=f,s){case 0:case 1:throw Error(n(345));case 2:Gr(i,Rn,Gi);break;case 3:if(vr(i,f),(f&130023424)===f&&(s=Wu+500-yt(),10<s)){if(Dr(i,0)!==0)break;if(_=i.suspendedLanes,(_&f)!==f){yn(),i.pingedLanes|=i.suspendedLanes&_;break}i.timeoutHandle=Jc(Gr.bind(null,i,Rn,Gi),s);break}Gr(i,Rn,Gi);break;case 4:if(vr(i,f),(f&4194240)===f)break;for(s=i.eventTimes,_=-1;0<f;){var E=31-bt(f);y=1<<E,E=s[E],E>_&&(_=E),f&=~y}if(f=_,f=yt()-f,f=(120>f?120:480>f?480:1080>f?1080:1920>f?1920:3e3>f?3e3:4320>f?4320:1960*pw(f/1960))-f,10<f){i.timeoutHandle=Jc(Gr.bind(null,i,Rn,Gi),f);break}Gr(i,Rn,Gi);break;case 5:Gr(i,Rn,Gi);break;default:throw Error(n(329))}}}return Mn(i,yt()),i.callbackNode===c?Rm.bind(null,i):null}function Vu(i,s){var c=Do;return i.current.memoizedState.isDehydrated&&(Vr(i,s).flags|=256),i=Sl(i,s),i!==2&&(s=Rn,Rn=c,s!==null&&Gu(s)),i}function Gu(i){Rn===null?Rn=i:Rn.push.apply(Rn,i)}function mw(i){for(var s=i;;){if(s.flags&16384){var c=s.updateQueue;if(c!==null&&(c=c.stores,c!==null))for(var f=0;f<c.length;f++){var _=c[f],y=_.getSnapshot;_=_.value;try{if(!ui(y(),_))return!1}catch{return!1}}}if(c=s.child,s.subtreeFlags&16384&&c!==null)c.return=s,s=c;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function vr(i,s){for(s&=~$u,s&=~ml,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var c=31-bt(s),f=1<<c;i[c]=-1,s&=~f}}function Mm(i){if((it&6)!==0)throw Error(n(327));zs();var s=Dr(i,0);if((s&1)===0)return Mn(i,yt()),null;var c=Sl(i,s);if(i.tag!==0&&c===2){var f=so(i);f!==0&&(s=f,c=Vu(i,f))}if(c===1)throw c=Io,Vr(i,0),vr(i,s),Mn(i,yt()),c;if(c===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,Gr(i,Rn,Gi),Mn(i,yt()),null}function Yu(i,s){var c=it;it|=1;try{return i(s)}finally{it=c,it===0&&(Fs=yt()+500,Ga&&hr())}}function qr(i){gr!==null&&gr.tag===0&&(it&6)===0&&zs();var s=it;it|=1;var c=Jn.transition,f=nt;try{if(Jn.transition=null,nt=1,i)return i()}finally{nt=f,Jn.transition=c,it=s,(it&6)===0&&hr()}}function Xu(){jn=Bs.current,pt(Bs)}function Vr(i,s){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;if(c!==-1&&(i.timeoutHandle=-1,KS(c)),Dt!==null)for(c=Dt.return;c!==null;){var f=c;switch(su(f),f.tag){case 1:f=f.type.childContextTypes,f!=null&&qa();break;case 3:Is(),pt(Cn),pt(cn),vu();break;case 5:gu(f);break;case 4:Is();break;case 13:pt(St);break;case 19:pt(St);break;case 10:hu(f.type._context);break;case 22:case 23:Xu()}c=c.return}if(Yt=i,Dt=i=yr(i.current,null),on=jn=s,$t=0,Io=null,$u=ml=Kr=0,Rn=Do=null,Hr!==null){for(s=0;s<Hr.length;s++)if(c=Hr[s],f=c.interleaved,f!==null){c.interleaved=null;var _=f.next,y=c.pending;if(y!==null){var E=y.next;y.next=_,f.next=E}c.pending=f}Hr=null}return i}function Am(i,s){do{var c=Dt;try{if(uu(),rl.current=ll,sl){for(var f=wt.memoizedState;f!==null;){var _=f.queue;_!==null&&(_.pending=null),f=f.next}sl=!1}if(Wr=0,Gt=Ht=wt=null,To=!1,Ro=0,Hu.current=null,c===null||c.return===null){$t=1,Io=s,Dt=null;break}e:{var y=i,E=c.return,L=c,z=s;if(s=on,L.flags|=32768,z!==null&&typeof z=="object"&&typeof z.then=="function"){var X=z,le=L,ce=le.tag;if((le.mode&1)===0&&(ce===0||ce===11||ce===15)){var oe=le.alternate;oe?(le.updateQueue=oe.updateQueue,le.memoizedState=oe.memoizedState,le.lanes=oe.lanes):(le.updateQueue=null,le.memoizedState=null)}var ye=nm(E);if(ye!==null){ye.flags&=-257,im(ye,E,L,y,s),ye.mode&1&&tm(y,X,s),s=ye,z=X;var Ee=s.updateQueue;if(Ee===null){var Ce=new Set;Ce.add(z),s.updateQueue=Ce}else Ee.add(z);break e}else{if((s&1)===0){tm(y,X,s),Zu();break e}z=Error(n(426))}}else if(_t&&L.mode&1){var Lt=nm(E);if(Lt!==null){(Lt.flags&65536)===0&&(Lt.flags|=256),im(Lt,E,L,y,s),lu(Ds(z,L));break e}}y=z=Ds(z,L),$t!==4&&($t=2),Do===null?Do=[y]:Do.push(y),y=E;do{switch(y.tag){case 3:y.flags|=65536,s&=-s,y.lanes|=s;var G=Jp(y,z,s);Cp(y,G);break e;case 1:L=z;var U=y.type,Y=y.stateNode;if((y.flags&128)===0&&(typeof U.getDerivedStateFromError=="function"||Y!==null&&typeof Y.componentDidCatch=="function"&&(mr===null||!mr.has(Y)))){y.flags|=65536,s&=-s,y.lanes|=s;var de=em(y,L,s);Cp(y,de);break e}}y=y.return}while(y!==null)}Im(c)}catch(Ne){s=Ne,Dt===c&&c!==null&&(Dt=c=c.return);continue}break}while(!0)}function Lm(){var i=pl.current;return pl.current=ll,i===null?ll:i}function Zu(){($t===0||$t===3||$t===2)&&($t=4),Yt===null||(Kr&268435455)===0&&(ml&268435455)===0||vr(Yt,on)}function Sl(i,s){var c=it;it|=2;var f=Lm();(Yt!==i||on!==s)&&(Gi=null,Vr(i,s));do try{gw();break}catch(_){Am(i,_)}while(!0);if(uu(),it=c,pl.current=f,Dt!==null)throw Error(n(261));return Yt=null,on=0,$t}function gw(){for(;Dt!==null;)Om(Dt)}function _w(){for(;Dt!==null&&!Na();)Om(Dt)}function Om(i){var s=Bm(i.alternate,i,jn);i.memoizedProps=i.pendingProps,s===null?Im(i):Dt=s,Hu.current=null}function Im(i){var s=i;do{var c=s.alternate;if(i=s.return,(s.flags&32768)===0){if(c=cw(c,s,jn),c!==null){Dt=c;return}}else{if(c=uw(c,s),c!==null){c.flags&=32767,Dt=c;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{$t=6,Dt=null;return}}if(s=s.sibling,s!==null){Dt=s;return}Dt=s=i}while(s!==null);$t===0&&($t=5)}function Gr(i,s,c){var f=nt,_=Jn.transition;try{Jn.transition=null,nt=1,vw(i,s,c,f)}finally{Jn.transition=_,nt=f}return null}function vw(i,s,c,f){do zs();while(gr!==null);if((it&6)!==0)throw Error(n(327));c=i.finishedWork;var _=i.finishedLanes;if(c===null)return null;if(i.finishedWork=null,i.finishedLanes=0,c===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var y=c.lanes|c.childLanes;if(Gn(i,y),i===Yt&&(Dt=Yt=null,on=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||_l||(_l=!0,Fm(gs,function(){return zs(),null})),y=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||y){y=Jn.transition,Jn.transition=null;var E=nt;nt=1;var L=it;it|=4,Hu.current=null,dw(i,c),km(c,i),FS(Zc),La=!!Xc,Zc=Xc=null,i.current=c,fw(c),Ta(),it=L,nt=E,Jn.transition=y}else i.current=c;if(_l&&(_l=!1,gr=i,vl=_),y=i.pendingLanes,y===0&&(mr=null),Mt(c.stateNode),Mn(i,yt()),s!==null)for(f=i.onRecoverableError,c=0;c<s.length;c++)_=s[c],f(_.value,{componentStack:_.stack,digest:_.digest});if(gl)throw gl=!1,i=Ku,Ku=null,i;return(vl&1)!==0&&i.tag!==0&&zs(),y=i.pendingLanes,(y&1)!==0?i===qu?Po++:(Po=0,qu=i):Po=0,hr(),null}function zs(){if(gr!==null){var i=Ue(vl),s=Jn.transition,c=nt;try{if(Jn.transition=null,nt=16>i?16:i,gr===null)var f=!1;else{if(i=gr,gr=null,vl=0,(it&6)!==0)throw Error(n(331));var _=it;for(it|=4,ke=i.current;ke!==null;){var y=ke,E=y.child;if((ke.flags&16)!==0){var L=y.deletions;if(L!==null){for(var z=0;z<L.length;z++){var X=L[z];for(ke=X;ke!==null;){var le=ke;switch(le.tag){case 0:case 11:case 15:Oo(8,le,y)}var ce=le.child;if(ce!==null)ce.return=le,ke=ce;else for(;ke!==null;){le=ke;var oe=le.sibling,ye=le.return;if(ym(le),le===X){ke=null;break}if(oe!==null){oe.return=ye,ke=oe;break}ke=ye}}}var Ee=y.alternate;if(Ee!==null){var Ce=Ee.child;if(Ce!==null){Ee.child=null;do{var Lt=Ce.sibling;Ce.sibling=null,Ce=Lt}while(Ce!==null)}}ke=y}}if((y.subtreeFlags&2064)!==0&&E!==null)E.return=y,ke=E;else e:for(;ke!==null;){if(y=ke,(y.flags&2048)!==0)switch(y.tag){case 0:case 11:case 15:Oo(9,y,y.return)}var G=y.sibling;if(G!==null){G.return=y.return,ke=G;break e}ke=y.return}}var U=i.current;for(ke=U;ke!==null;){E=ke;var Y=E.child;if((E.subtreeFlags&2064)!==0&&Y!==null)Y.return=E,ke=Y;else e:for(E=U;ke!==null;){if(L=ke,(L.flags&2048)!==0)try{switch(L.tag){case 0:case 11:case 15:fl(9,L)}}catch(Ne){Ct(L,L.return,Ne)}if(L===E){ke=null;break e}var de=L.sibling;if(de!==null){de.return=L.return,ke=de;break e}ke=L.return}}if(it=_,hr(),Ye&&typeof Ye.onPostCommitFiberRoot=="function")try{Ye.onPostCommitFiberRoot(Ke,i)}catch{}f=!0}return f}finally{nt=c,Jn.transition=s}}return!1}function Dm(i,s,c){s=Ds(c,s),s=Jp(i,s,1),i=fr(i,s,1),s=yn(),i!==null&&(rr(i,1,s),Mn(i,s))}function Ct(i,s,c){if(i.tag===3)Dm(i,i,c);else for(;s!==null;){if(s.tag===3){Dm(s,i,c);break}else if(s.tag===1){var f=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(mr===null||!mr.has(f))){i=Ds(c,i),i=em(s,i,1),s=fr(s,i,1),i=yn(),s!==null&&(rr(s,1,i),Mn(s,i));break}}s=s.return}}function yw(i,s,c){var f=i.pingCache;f!==null&&f.delete(s),s=yn(),i.pingedLanes|=i.suspendedLanes&c,Yt===i&&(on&c)===c&&($t===4||$t===3&&(on&130023424)===on&&500>yt()-Wu?Vr(i,0):$u|=c),Mn(i,s)}function Pm(i,s){s===0&&((i.mode&1)===0?s=1:(s=Ir,Ir<<=1,(Ir&130023424)===0&&(Ir=4194304)));var c=yn();i=Ki(i,s),i!==null&&(rr(i,s,c),Mn(i,c))}function bw(i){var s=i.memoizedState,c=0;s!==null&&(c=s.retryLane),Pm(i,c)}function Sw(i,s){var c=0;switch(i.tag){case 13:var f=i.stateNode,_=i.memoizedState;_!==null&&(c=_.retryLane);break;case 19:f=i.stateNode;break;default:throw Error(n(314))}f!==null&&f.delete(s),Pm(i,c)}var Bm;Bm=function(i,s,c){if(i!==null)if(i.memoizedProps!==s.pendingProps||Cn.current)Tn=!0;else{if((i.lanes&c)===0&&(s.flags&128)===0)return Tn=!1,lw(i,s,c);Tn=(i.flags&131072)!==0}else Tn=!1,_t&&(s.flags&1048576)!==0&&gp(s,Xa,s.index);switch(s.lanes=0,s.tag){case 2:var f=s.type;hl(i,s),i=s.pendingProps;var _=Ns(s,cn.current);Os(s,c),_=Su(null,s,f,i,_,c);var y=wu();return s.flags|=1,typeof _=="object"&&_!==null&&typeof _.render=="function"&&_.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,Nn(f)?(y=!0,Va(s)):y=!1,s.memoizedState=_.state!==null&&_.state!==void 0?_.state:null,pu(s),_.updater=cl,s.stateNode=_,_._reactInternals=s,Tu(s,f,i,c),s=Lu(null,s,f,!0,y,c)):(s.tag=0,_t&&y&&ru(s),vn(null,s,_,c),s=s.child),s;case 16:f=s.elementType;e:{switch(hl(i,s),i=s.pendingProps,_=f._init,f=_(f._payload),s.type=f,_=s.tag=xw(f),i=di(f,i),_){case 0:s=Au(null,s,f,i,c);break e;case 1:s=cm(null,s,f,i,c);break e;case 11:s=rm(null,s,f,i,c);break e;case 14:s=sm(null,s,f,di(f.type,i),c);break e}throw Error(n(306,f,""))}return s;case 0:return f=s.type,_=s.pendingProps,_=s.elementType===f?_:di(f,_),Au(i,s,f,_,c);case 1:return f=s.type,_=s.pendingProps,_=s.elementType===f?_:di(f,_),cm(i,s,f,_,c);case 3:e:{if(um(s),i===null)throw Error(n(387));f=s.pendingProps,y=s.memoizedState,_=y.element,Ep(i,s),nl(s,f,null,c);var E=s.memoizedState;if(f=E.element,y.isDehydrated)if(y={element:f,isDehydrated:!1,cache:E.cache,pendingSuspenseBoundaries:E.pendingSuspenseBoundaries,transitions:E.transitions},s.updateQueue.baseState=y,s.memoizedState=y,s.flags&256){_=Ds(Error(n(423)),s),s=hm(i,s,f,c,_);break e}else if(f!==_){_=Ds(Error(n(424)),s),s=hm(i,s,f,c,_);break e}else for(zn=lr(s.stateNode.containerInfo.firstChild),Fn=s,_t=!0,hi=null,c=xp(s,null,f,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(Ms(),f===_){s=Vi(i,s,c);break e}vn(i,s,f,c)}s=s.child}return s;case 5:return Tp(s),i===null&&au(s),f=s.type,_=s.pendingProps,y=i!==null?i.memoizedProps:null,E=_.children,Qc(f,_)?E=null:y!==null&&Qc(f,y)&&(s.flags|=32),lm(i,s),vn(i,s,E,c),s.child;case 6:return i===null&&au(s),null;case 13:return dm(i,s,c);case 4:return mu(s,s.stateNode.containerInfo),f=s.pendingProps,i===null?s.child=As(s,null,f,c):vn(i,s,f,c),s.child;case 11:return f=s.type,_=s.pendingProps,_=s.elementType===f?_:di(f,_),rm(i,s,f,_,c);case 7:return vn(i,s,s.pendingProps,c),s.child;case 8:return vn(i,s,s.pendingProps.children,c),s.child;case 12:return vn(i,s,s.pendingProps.children,c),s.child;case 10:e:{if(f=s.type._context,_=s.pendingProps,y=s.memoizedProps,E=_.value,ht(Ja,f._currentValue),f._currentValue=E,y!==null)if(ui(y.value,E)){if(y.children===_.children&&!Cn.current){s=Vi(i,s,c);break e}}else for(y=s.child,y!==null&&(y.return=s);y!==null;){var L=y.dependencies;if(L!==null){E=y.child;for(var z=L.firstContext;z!==null;){if(z.context===f){if(y.tag===1){z=qi(-1,c&-c),z.tag=2;var X=y.updateQueue;if(X!==null){X=X.shared;var le=X.pending;le===null?z.next=z:(z.next=le.next,le.next=z),X.pending=z}}y.lanes|=c,z=y.alternate,z!==null&&(z.lanes|=c),du(y.return,c,s),L.lanes|=c;break}z=z.next}}else if(y.tag===10)E=y.type===s.type?null:y.child;else if(y.tag===18){if(E=y.return,E===null)throw Error(n(341));E.lanes|=c,L=E.alternate,L!==null&&(L.lanes|=c),du(E,c,s),E=y.sibling}else E=y.child;if(E!==null)E.return=y;else for(E=y;E!==null;){if(E===s){E=null;break}if(y=E.sibling,y!==null){y.return=E.return,E=y;break}E=E.return}y=E}vn(i,s,_.children,c),s=s.child}return s;case 9:return _=s.type,f=s.pendingProps.children,Os(s,c),_=Zn(_),f=f(_),s.flags|=1,vn(i,s,f,c),s.child;case 14:return f=s.type,_=di(f,s.pendingProps),_=di(f.type,_),sm(i,s,f,_,c);case 15:return om(i,s,s.type,s.pendingProps,c);case 17:return f=s.type,_=s.pendingProps,_=s.elementType===f?_:di(f,_),hl(i,s),s.tag=1,Nn(f)?(i=!0,Va(s)):i=!1,Os(s,c),Zp(s,f,_),Tu(s,f,_,c),Lu(null,s,f,!0,i,c);case 19:return pm(i,s,c);case 22:return am(i,s,c)}throw Error(n(156,s.tag))};function Fm(i,s){return Ca(i,s)}function ww(i,s,c,f){this.tag=i,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ei(i,s,c,f){return new ww(i,s,c,f)}function Qu(i){return i=i.prototype,!(!i||!i.isReactComponent)}function xw(i){if(typeof i=="function")return Qu(i)?1:0;if(i!=null){if(i=i.$$typeof,i===H)return 11;if(i===P)return 14}return 2}function yr(i,s){var c=i.alternate;return c===null?(c=ei(i.tag,s,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c.alternate=i,i.alternate=c):(c.pendingProps=s,c.type=i.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=i.flags&14680064,c.childLanes=i.childLanes,c.lanes=i.lanes,c.child=i.child,c.memoizedProps=i.memoizedProps,c.memoizedState=i.memoizedState,c.updateQueue=i.updateQueue,s=i.dependencies,c.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c}function wl(i,s,c,f,_,y){var E=2;if(f=i,typeof i=="function")Qu(i)&&(E=1);else if(typeof i=="string")E=5;else e:switch(i){case ne:return Yr(c.children,_,y,s);case Z:E=8,_|=8;break;case te:return i=ei(12,c,s,_|2),i.elementType=te,i.lanes=y,i;case F:return i=ei(13,c,s,_),i.elementType=F,i.lanes=y,i;case W:return i=ei(19,c,s,_),i.elementType=W,i.lanes=y,i;case j:return xl(c,_,y,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case $:E=10;break e;case D:E=9;break e;case H:E=11;break e;case P:E=14;break e;case Q:E=16,f=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=ei(E,c,s,_),s.elementType=i,s.type=f,s.lanes=y,s}function Yr(i,s,c,f){return i=ei(7,i,f,s),i.lanes=c,i}function xl(i,s,c,f){return i=ei(22,i,f,s),i.elementType=j,i.lanes=c,i.stateNode={isHidden:!1},i}function Ju(i,s,c){return i=ei(6,i,null,s),i.lanes=c,i}function eh(i,s,c){return s=ei(4,i.children!==null?i.children:[],i.key,s),s.lanes=c,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function kw(i,s,c,f,_){this.tag=s,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ir(0),this.expirationTimes=ir(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ir(0),this.identifierPrefix=f,this.onRecoverableError=_,this.mutableSourceEagerHydrationData=null}function th(i,s,c,f,_,y,E,L,z){return i=new kw(i,s,c,L,z),s===1?(s=1,y===!0&&(s|=8)):s=0,y=ei(3,null,null,s),i.current=y,y.stateNode=i,y.memoizedState={element:f,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},pu(y),i}function Ew(i,s,c){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:O,key:f==null?null:""+f,children:i,containerInfo:s,implementation:c}}function zm(i){if(!i)return ur;i=i._reactInternals;e:{if(ji(i)!==i||i.tag!==1)throw Error(n(170));var s=i;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(Nn(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(i.tag===1){var c=i.type;if(Nn(c))return fp(i,c,s)}return s}function jm(i,s,c,f,_,y,E,L,z){return i=th(c,f,!0,i,_,y,E,L,z),i.context=zm(null),c=i.current,f=yn(),_=_r(c),y=qi(f,_),y.callback=s??null,fr(c,y,_),i.current.lanes=_,rr(i,_,f),Mn(i,f),i}function kl(i,s,c,f){var _=s.current,y=yn(),E=_r(_);return c=zm(c),s.context===null?s.context=c:s.pendingContext=c,s=qi(y,E),s.payload={element:i},f=f===void 0?null:f,f!==null&&(s.callback=f),i=fr(_,s,E),i!==null&&(mi(i,_,E,y),tl(i,_,E)),E}function El(i){if(i=i.current,!i.child)return null;switch(i.child.tag){case 5:return i.child.stateNode;default:return i.child.stateNode}}function Um(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<s?c:s}}function nh(i,s){Um(i,s),(i=i.alternate)&&Um(i,s)}function Cw(){return null}var Hm=typeof reportError=="function"?reportError:function(i){console.error(i)};function ih(i){this._internalRoot=i}Cl.prototype.render=ih.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));kl(i,s,null,null)},Cl.prototype.unmount=ih.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;qr(function(){kl(null,i,null,null)}),s[Ui]=null}};function Cl(i){this._internalRoot=i}Cl.prototype.unstable_scheduleHydration=function(i){if(i){var s=Pr();i={blockedOn:null,target:i,priority:s};for(var c=0;c<Vt.length&&s!==0&&s<Vt[c].priority;c++);Vt.splice(c,0,i),c===0&&Tf(i)}};function rh(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function Nl(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function $m(){}function Nw(i,s,c,f,_){if(_){if(typeof f=="function"){var y=f;f=function(){var X=El(E);y.call(X)}}var E=jm(s,f,i,0,null,!1,!1,"",$m);return i._reactRootContainer=E,i[Ui]=E.current,bo(i.nodeType===8?i.parentNode:i),qr(),E}for(;_=i.lastChild;)i.removeChild(_);if(typeof f=="function"){var L=f;f=function(){var X=El(z);L.call(X)}}var z=th(i,0,!1,null,null,!1,!1,"",$m);return i._reactRootContainer=z,i[Ui]=z.current,bo(i.nodeType===8?i.parentNode:i),qr(function(){kl(s,z,c,f)}),z}function Tl(i,s,c,f,_){var y=c._reactRootContainer;if(y){var E=y;if(typeof _=="function"){var L=_;_=function(){var z=El(E);L.call(z)}}kl(s,E,i,_)}else E=Nw(c,s,i,_,f);return El(E)}ao=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var c=nr(s.pendingLanes);c!==0&&(oo(s,c|1),Mn(s,yt()),(it&6)===0&&(Fs=yt()+500,hr()))}break;case 13:qr(function(){var f=Ki(i,1);if(f!==null){var _=yn();mi(f,i,1,_)}}),nh(i,1)}},At=function(i){if(i.tag===13){var s=Ki(i,134217728);if(s!==null){var c=yn();mi(s,i,134217728,c)}nh(i,134217728)}},st=function(i){if(i.tag===13){var s=_r(i),c=Ki(i,s);if(c!==null){var f=yn();mi(c,i,s,f)}nh(i,s)}},Pr=function(){return nt},wi=function(i,s){var c=nt;try{return nt=i,s()}finally{nt=c}},ps=function(i,s,c){switch(s){case"input":if(Pn(i,c),s=c.name,c.type==="radio"&&s!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<c.length;s++){var f=c[s];if(f!==i&&f.form===i.form){var _=Ka(f);if(!_)throw Error(n(90));nn(f),Pn(f,_)}}}break;case"textarea":qn(i,c);break;case"select":s=c.value,s!=null&&yi(i,!!c.multiple,s,!1)}},_e=Yu,Be=qr;var Tw={usingClientEntryPoint:!1,Events:[xo,Es,Ka,B,ie,Yu]},Bo={findFiberByHostInstance:Fr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Rw={bundleType:Bo.bundleType,version:Bo.version,rendererPackageName:Bo.rendererPackageName,rendererConfig:Bo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:A.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=ka(i),i===null?null:i.stateNode},findFiberByHostInstance:Bo.findFiberByHostInstance||Cw,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 Rl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Rl.isDisabled&&Rl.supportsFiber)try{Ke=Rl.inject(Rw),Ye=Rl}catch{}}return An.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Tw,An.createPortal=function(i,s){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!rh(s))throw Error(n(200));return Ew(i,s,null,c)},An.createRoot=function(i,s){if(!rh(i))throw Error(n(299));var c=!1,f="",_=Hm;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onRecoverableError!==void 0&&(_=s.onRecoverableError)),s=th(i,1,!1,null,null,c,!1,f,_),i[Ui]=s.current,bo(i.nodeType===8?i.parentNode:i),new ih(s)},An.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=ka(s),i=i===null?null:i.stateNode,i},An.flushSync=function(i){return qr(i)},An.hydrate=function(i,s,c){if(!Nl(s))throw Error(n(200));return Tl(null,i,s,!0,c)},An.hydrateRoot=function(i,s,c){if(!rh(i))throw Error(n(405));var f=c!=null&&c.hydratedSources||null,_=!1,y="",E=Hm;if(c!=null&&(c.unstable_strictMode===!0&&(_=!0),c.identifierPrefix!==void 0&&(y=c.identifierPrefix),c.onRecoverableError!==void 0&&(E=c.onRecoverableError)),s=jm(s,null,i,1,c??null,_,!1,y,E),i[Ui]=s.current,bo(i),f)for(i=0;i<f.length;i++)c=f[i],_=c._getVersion,_=_(c._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[c,_]:s.mutableSourceEagerHydrationData.push(c,_);return new Cl(s)},An.render=function(i,s,c){if(!Nl(s))throw Error(n(200));return Tl(null,i,s,!1,c)},An.unmountComponentAtNode=function(i){if(!Nl(i))throw Error(n(40));return i._reactRootContainer?(qr(function(){Tl(null,null,i,!1,function(){i._reactRootContainer=null,i[Ui]=null})}),!0):!1},An.unstable_batchedUpdates=Yu,An.unstable_renderSubtreeIntoContainer=function(i,s,c,f){if(!Nl(c))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return Tl(i,s,c,!1,f)},An.version="18.3.1-next-f1338f8080-20240426",An}var Zm;function mv(){if(Zm)return ah.exports;Zm=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),ah.exports=Pw(),ah.exports}var Qm;function Bw(){if(Qm)return Ml;Qm=1;var e=mv();return Ml.createRoot=e.createRoot,Ml.hydrateRoot=e.hydrateRoot,Ml}var Fw=Bw(),gv={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Jm=is.createContext&&is.createContext(gv),zw=["attr","size","title"];function jw(e,t){if(e==null)return{};var n,r,o=Uw(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Uw(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function ec(){return ec=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ec.apply(null,arguments)}function eg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function tc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?eg(Object(n),!0).forEach(function(r){Hw(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hw(e,t,n){return(t=$w(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $w(e){var t=Ww(e,"string");return typeof t=="symbol"?t:t+""}function Ww(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _v(e){return e&&e.map((t,n)=>is.createElement(t.tag,tc({key:n},t.attr),_v(t.child)))}function Ze(e){return t=>is.createElement(Kw,ec({attr:tc({},e.attr)},t),_v(e.child))}function Kw(e){var t=n=>{var r=e.attr,o=e.size,a=e.title,l=jw(e,zw),u=o||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),is.createElement("svg",ec({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,l,{className:d,style:tc(tc({color:e.color||n.color},n.style),e.style),height:u,width:u,xmlns:"http://www.w3.org/2000/svg"}),a&&is.createElement("title",null,a),e.children)};return Jm!==void 0?is.createElement(Jm.Consumer,null,n=>t(n)):t(gv)}function qw(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"},child:[]}]})(e)}function Vs(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"6",x2:"6",y2:"18"},child:[]},{tag:"line",attr:{x1:"6",y1:"6",x2:"18",y2:"18"},child:[]}]})(e)}function vv(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5"},child:[]},{tag:"path",attr:{d:"M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07"},child:[]}]})(e)}function Vw(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"},child:[]},{tag:"path",attr:{d:"M7 11V7a5 5 0 0 1 9.9-1"},child:[]}]})(e)}function Wh(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"3 6 5 6 21 6"},child:[]},{tag:"path",attr:{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"},child:[]},{tag:"line",attr:{x1:"10",y1:"11",x2:"10",y2:"17"},child:[]},{tag:"line",attr:{x1:"14",y1:"11",x2:"14",y2:"17"},child:[]}]})(e)}function Kd(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"4 17 10 11 4 5"},child:[]},{tag:"line",attr:{x1:"12",y1:"19",x2:"20",y2:"19"},child:[]}]})(e)}function tg(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"circle",attr:{cx:"12",cy:"12",r:"6"},child:[]},{tag:"circle",attr:{cx:"12",cy:"12",r:"2"},child:[]}]})(e)}function Gw(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"},child:[]}]})(e)}function Yw(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"22",y1:"2",x2:"11",y2:"13"},child:[]},{tag:"polygon",attr:{points:"22 2 15 22 11 13 2 9 22 2"},child:[]}]})(e)}function yv(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"23 4 23 10 17 10"},child:[]},{tag:"polyline",attr:{points:"1 20 1 14 7 14"},child:[]},{tag:"path",attr:{d:"M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"},child:[]}]})(e)}function os(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"12",y1:"5",x2:"12",y2:"19"},child:[]},{tag:"line",attr:{x1:"5",y1:"12",x2:"19",y2:"12"},child:[]}]})(e)}function Xw(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"5 3 19 12 5 21 5 3"},child:[]}]})(e)}function ng(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"},child:[]}]})(e)}function Zw(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"1"},child:[]},{tag:"circle",attr:{cx:"19",cy:"12",r:"1"},child:[]},{tag:"circle",attr:{cx:"5",cy:"12",r:"1"},child:[]}]})(e)}function Kh(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"},child:[]}]})(e)}function bv(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"3",y1:"12",x2:"21",y2:"12"},child:[]},{tag:"line",attr:{x1:"3",y1:"6",x2:"21",y2:"6"},child:[]},{tag:"line",attr:{x1:"3",y1:"18",x2:"21",y2:"18"},child:[]}]})(e)}function Qw(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"},child:[]},{tag:"path",attr:{d:"M7 11V7a5 5 0 0 1 10 0v4"},child:[]}]})(e)}function qh(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"},child:[]},{tag:"path",attr:{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"},child:[]}]})(e)}function Jw(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4"},child:[]}]})(e)}function e0(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"line",attr:{x1:"2",y1:"12",x2:"22",y2:"12"},child:[]},{tag:"path",attr:{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"},child:[]}]})(e)}function ig(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"},child:[]}]})(e)}function la(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"},child:[]}]})(e)}function Sv(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"},child:[]},{tag:"polyline",attr:{points:"13 2 13 9 20 9"},child:[]}]})(e)}function rg(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 20h9"},child:[]},{tag:"path",attr:{d:"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"},child:[]}]})(e)}function wv(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"},child:[]}]})(e)}function xv(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"},child:[]},{tag:"polyline",attr:{points:"7 10 12 15 17 10"},child:[]},{tag:"line",attr:{x1:"12",y1:"15",x2:"12",y2:"3"},child:[]}]})(e)}function qd(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"4",y:"4",width:"16",height:"16",rx:"2",ry:"2"},child:[]},{tag:"rect",attr:{x:"9",y:"9",width:"6",height:"6"},child:[]},{tag:"line",attr:{x1:"9",y1:"1",x2:"9",y2:"4"},child:[]},{tag:"line",attr:{x1:"15",y1:"1",x2:"15",y2:"4"},child:[]},{tag:"line",attr:{x1:"9",y1:"20",x2:"9",y2:"23"},child:[]},{tag:"line",attr:{x1:"15",y1:"20",x2:"15",y2:"23"},child:[]},{tag:"line",attr:{x1:"20",y1:"9",x2:"23",y2:"9"},child:[]},{tag:"line",attr:{x1:"20",y1:"14",x2:"23",y2:"14"},child:[]},{tag:"line",attr:{x1:"1",y1:"9",x2:"4",y2:"9"},child:[]},{tag:"line",attr:{x1:"1",y1:"14",x2:"4",y2:"14"},child:[]}]})(e)}function kv(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"},child:[]},{tag:"path",attr:{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"},child:[]}]})(e)}function Vd(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"18 15 12 9 6 15"},child:[]}]})(e)}function mc(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"9 18 15 12 9 6"},child:[]}]})(e)}function Zs(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"6 9 12 15 18 9"},child:[]}]})(e)}function Ev(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"20 6 9 17 4 12"},child:[]}]})(e)}function t0(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"},child:[]},{tag:"polyline",attr:{points:"22 4 12 14.01 9 11.01"},child:[]}]})(e)}function n0(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"},child:[]},{tag:"path",attr:{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"},child:[]}]})(e)}function i0(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"12",y1:"19",x2:"12",y2:"5"},child:[]},{tag:"polyline",attr:{points:"5 12 12 5 19 12"},child:[]}]})(e)}function r0(e){return Ze({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"12",y1:"5",x2:"12",y2:"19"},child:[]},{tag:"polyline",attr:{points:"19 12 12 19 5 12"},child:[]}]})(e)}function ts({trigger:e,open:t,onOpenChange:n,children:r,align:o="right",fit:a=!1,direction:l="down"}){const u=K.useRef(null);return K.useEffect(()=>{if(!t)return;const d=m=>{u.current&&!u.current.contains(m.target)&&n(!1)},h=m=>{m.key==="Escape"&&n(!1)};return document.addEventListener("mousedown",d),document.addEventListener("keydown",h),()=>{document.removeEventListener("mousedown",d),document.removeEventListener("keydown",h)}},[t,n]),g.jsxs("div",{className:`dropdown ${o} ${a?"fit":""} ${l==="up"?"dd-up":""}`,ref:u,children:[g.jsxs("button",{type:"button",className:"chip",onClick:()=>n(!t),"aria-expanded":t,children:[e,g.jsx(Zs,{className:`dd-caret ${t?"up":""}`})]}),t&&g.jsx("div",{className:"dd-menu",children:r})]})}function Gs({active:e,disabled:t=!1,title:n,onClick:r,children:o}){return g.jsx("button",{type:"button",className:`dd-item ${e?"active":""}`,disabled:t,title:n,onClick:r,children:o})}const Cv="pi-web-ui:lang",s0={cancel:"取消",ok:"确定",save:"保存",close:"关闭",loading:"加载中…",connected:"已连接",connecting:"连接中…",reconnecting:"重连中…",language:"语言",langZh:"中文",langEn:"English",githubRepo:"GitHub 仓库(xing-shuyin/pi-web-ui)",copy:"复制",viewSwitch:"视图切换",chat:"对话",terminal:"终端",selectModel:"选择模型",availableModels:"可用模型",noModels:"暂无可用模型(请先配置 API 密钥)",reasoning:"推理",vision:"识图",refreshModels:"刷新模型列表",manageModels:"⚙ 管理模型(新增 / 修改)",manageModelsTitle:"管理模型",thinkingLevel:"思考强度",thinking:"思考",thinkingChip:"思考:{level}",sound:"声音",newChat:"新对话",more:"更多",newChatTip:"新建对话(每个浏览器独立保存会话)","thinking.off":"关闭","thinking.minimal":"极简","thinking.low":"低","thinking.medium":"中","thinking.high":"高","thinking.xhigh":"极高","thinking.max":"最大",thinkingUnsupported:"当前模型不支持该级别,已按模型能力就近生效",context:"上下文",contextUsage:"上下文用量",cumulativeCost:"累计成本",sessionMessages:"会话消息数",messages:"消息",pluginStatus:"插件状态",working:"工作中",queued:"排队",enterPath:"输入路径,Enter 切换",cwdTip:"工作目录:{path}(点击切换)",folderRef:"文件夹引用:{path}",refOnly:"仅引用:{path}",attachContent:"附加内容:{path}",attachLines:"附加选中行:{path}(第 {start}-{end} 行)",attachImage:"图片:{name}",attachFile:"文件:{name}",removeAttachment:"移除附件",attachHint:"将随下一条消息发送",uploadFile:"添加文件(图片/文本/任意文件,也可直接拖入或粘贴截图)",dropHereToAttach:"松开以添加文件",imageNotSupported:"当前模型不支持识图,图片可能不会被模型看到",imageLoadFailed:"图片读取失败:{name}",fileLoadFailed:"文件读取失败:{name}",fileTooLarge:"文件过大已跳过(>{size}MB):{name}",foldersNotSupported:"不支持直接拖入文件夹,请展开后选择文件",followUpQueued:"⏳ {n} 条跟进消息排队中",steeringQueued:"⏳ {n} 条转向消息排队中",placeholderStreaming:"智能体正在工作中…(消息可排队发送)",placeholderIdle:"给 pi 发送消息 — Enter 发送,/ 查看命令",placeholderConnecting:"正在连接服务器…",stopAgent:"停止智能体",stop:"停止",supplement:"补充",supplementTip:"当前回复完成后立即发送",sendTip:"发送(Enter)",slashCommands:"命令",slashMenuHint:"↑↓ 选择 · Enter/Tab 补全",slashHelpTitle:"pi 命令",slashHelpHint:"输入 / 随时打开命令列表",slashLoading:"命令列表加载中…(连接服务器后可用)",slashBuiltin:"内置",slashExtension:"扩展",slashPrompt:"模板",slashSkill:"技能",slashCopied:"已复制上一条助手回复",slashCopyFailed:"复制失败,请手动复制",slashCopyEmpty:"还没有可复制的助手回复",recentProjects:"最近项目",runningConversations:"运行的对话",historySessions:"历史对话",openHistory:"历史对话",openFiles:"文件列表",streaming:"进行中…",noHistory:"还没有历史对话",current:"当前",messageCount:"{n} 条消息",tuiTip:"pi 终端(TUI)中的对话",emptyChat:"空对话",editReask:"编辑重问",editReaskTip:"修改此问题,并从这里重新提问(会新建一个分支对话,原对话保留)",reaskFromHere:"从此处重新提问",editPlaceholder:"修改问题内容…",editHint:"⌘/Ctrl+Enter 提交 · Esc 取消",expandMsg:"展开",collapseMsg:"收起",toolCalls:"工具调用",bashRuns:"终端运行",images:"图片",update:"更新",updateTip:"检查并更新 pi-web-ui",currentVersion:"当前版本",latestVersion:"最新版本",checkingUpdate:"检查中…",checkUpdate:"检查更新",upToDate:"已是最新版本",updateAvailable:"发现新版本 v{version}",updateJustPublished:"v{version} 刚刚发布,npm 缓存可能尚未同步——若未检测到新版本,请稍后重新检查",updateNow:"立即更新",confirmUpdate:"确认更新(覆盖全局安装)",updateSuccess:"✅ 已更新,正在重启…",updateFailed:"更新失败:{detail}",restartHint:"重启:pi-web-ui server restart",rootDir:"根目录",noFiles:"暂无文件",filesTruncated:"目录过大,列表已截断,仅显示前 2000 项",linkFolderTip:"链接文件夹路径到对话",attachInlineTip:"附加内容到对话",referenceTip:"仅引用路径(AI 按需读取)",previewFile:"预览",downloadFile:"下载文件",downloadFailed:"下载失败:{error}",selectLinesHint:"点击选择行;拖拽或 Shift+点击选择范围",selectedRange:"已选 {n} 行(第 {start}-{end} 行)",fileLines:"{n} 行",selectAll:"全选",clearSelection:"清除",addToChat:"添加到对话",addedToChat:"已添加",previewTruncated:"⚠ 文件过大,仅预览前 512KB",previewLinesTruncated:"… 文件行数过多,仅显示前 {n} 行",binaryFile:"🔣 二进制文件,已显示前 4KB 十六进制",binaryHexTruncated:"(文件更大,可下载完整文件)",previewNotSupported:"该类型文件不支持预览(仅图片 / 视频 / 文本)",emptyFile:"(空文件)",pluginRequest:"插件请求",noOptions:"(无选项)",inputPlaceholder:"输入内容",soundHeader:"声音提示",enableSound:"启用声音",preview:"试听",volume:"音量","sound.question":"问卷弹出","sound.question.desc":"ask_user_question 出现时","sound.done":"回复结束","sound.done.desc":"智能体完成一轮回答时","sound.start":"回复开始","sound.start.desc":"智能体开始新一轮时","sound.error":"出错","sound.error.desc":"出现错误提示时",setupTitle:"未检测到 pi agent 配置",setupDesc:"pi-web-ui 需要 pi 的配置目录(~/.pi/agent)和至少一个 API 密钥才能运行智能体。pi 内置了 openai、anthropic、deepseek 等服务商——选一个填密钥即可,全程无需打开终端。",installFailed:"✖ pi agent 安装失败:",retryInstall:"重试安装",skip:"跳过",installDone:"✅ pi agent CLI 已安装。选择服务商并填入 API 密钥即可开始对话:",provider:"服务商",configured:"已配置",providerKeyReady:"该服务商已配置密钥,可直接使用或更换新密钥。",apiKey:"API 密钥",saving:"保存中…",saveAndStart:"保存并开始使用",recheck:"重新检测",installing:"正在安装 pi agent CLI…",autoInstall:"自动安装 pi agent",attachment:"附件",plugin:"插件",unknown:"未知",thinkingWait:"正在思考",exitCode:"退出码 {code}",cancelled:"已取消",truncated:"… 内容过长,当前视图已截断",outputTruncated:"… 输出过长,当前视图已截断",refOnlyShort:"仅引用",folderRefShort:"文件夹 · 仅引用",inlineLines:"内联 · {n} 行",inlineLinesRange:"行 {start}-{end}",image:"🖼 图片",folderNotExpanded:"文件夹,未展开内容 —— 智能体会按需浏览目录",fileNotExpanded:"文件较大({size}),未展开内容 —— 智能体会按需读取","role.user":"你","role.assistant":"pi","role.tool":"工具","role.bash":"终端","role.branch":"分支摘要","role.compaction":"上下文已压缩",welcomeTitle:"pi 编码智能体",welcomeSub:"检查、编辑、运行 —— 随时待命",directory:"目录",clickToFill:"点击填入输入框",waitingResponse:"正在等待模型响应…",backToBottom:"回到底部",questionNavTitle:"问题列表",questionNavTip:"本对话的全部问题,悬浮展开,点击跳转","ex.understand":"了解这个项目","ex.understand.prompt":"介绍一下这个项目:整体结构、主要模块和如何运行?","ex.debug":"排查一个问题","ex.debug.prompt":"帮我排查一个 bug,请先说明问题现象,我会补充细节。","ex.test":"编写测试","ex.test.prompt":"为项目的核心模块编写单元测试。","ex.review":"代码审查","ex.review.prompt":"审查最近改动的代码,指出潜在问题和改进建议。",error:"出错",done:"完成",running:"执行中…",toolQueued:"排队中",copyArgs:"复制参数",errorOutput:"错误输出",output:"输出",waitingOutput:"等待输出…",toolDoneWaitingModel:"已结束 · 等模型",waitingModel:"等待模型响应…",thinkingNow:"思考中",thinkingPreview:"思考:{preview}",commands:"命令",newCommand:"新建命令",newTerminal:"新建终端",name:"名称",command:"命令",cwdHint:"(${pwd} = 当前工作目录)",noCommands:"还没有命令,点 + 添加一个",clickToRun:"点击运行",edit:"编辑",delete:"删除",confirmQ:"确认?",builtinTerminal:"内置终端",termEmptySub:"点击左侧命令运行,或点右侧 + 新建终端",noTerminal:"暂无终端",exited:"(已退出{code})",closeTerminal:"关闭终端",rerun:"重新读取 .pi/commands.json",terminalTitle:"终端 {n}",exampleName:"例如:启动开发服务器",exampleCommand:"例如:npm run dev",editProvider:"编辑服务商",builtinProviders:"内置服务商",hintKeyOnly:"只需填入 API 密钥",configuredBadge:"✓ 已配置",keyReady:"密钥已就绪",pasteKey:"粘贴 API 密钥…",savingKey:"保存中",saveKey:"保存密钥",customProviders:"自定义服务商",customDesc:"用于 Ollama / vLLM / 兼容 OpenAI 的代理等,写入 pi 的 models.json,保存后热重载、立即生效。",noCustomProviders:"还没有自定义服务商",modelsCount:"{n} 个模型",addProvider:"新增服务商",providerId:"服务商 ID",providerIdHint:"(必填,如 ollama / my-proxy)",displayName:"显示名",displayNamePh:"我的代理",apiType:"API 类型",baseUrlHint:"(OpenAI 兼容端点)",apiKeyHint:"sk-…(可留空,用 auth.json 的密钥)",authHeader:"自动添加 Authorization 请求头",modelsTitle:"模型",modelIdReq:"模型 ID(必填)",text:"文本",textImage:"文本+图片",contextWindow:"上下文",maxOutput:"最大输出",removeModel:"移除模型",addModel:"添加模型",deleteProviderConfirm:"删除服务商 {id} 及其 {n} 个模型?",goalBarTitle:"目标",goalBarPlaceholder:"设定一个目标,agent 完成后自动审查…",goalBarSet:"开始",goalBarClear:"取消",goalBarLocked:"锁定:应用到后续所有回合",goalBarUnlocked:"仅本回合(改完自动清除)",goalBarReviewModel:"审查模型",goalBarUseMainModel:"使用主模型",goalBarMaxRounds:"最大轮数",goalBarMaxRoundsTip:"最大审查重改轮数;0 或不填 = 不限(持续改到通过)",goalBarUnlimitedShort:"不限",goalBarReviewing:"审查中…",goalBarRound:"第 {n} 轮",goalBarActive:"目标生效中",goalBarPassed:"已通过",goalBarFailed:"未通过",goalBarStatusPending:"等待生成…",goalWizardBtn:"AI 提炼",goalWizardTip:"让 AI 通过问卷调研细化需求,收敛为目标",goalWizardRunning:"目标调研中",goalWizardAnswer:"回答",goalWizardCard:"目标调研",loadingSession:"正在加载会话…",connectingServer:"正在连接 pi-web-ui 服务器…"},o0={cancel:"Cancel",ok:"OK",save:"Save",close:"Close",loading:"Loading…",connected:"Connected",connecting:"Connecting…",reconnecting:"Reconnecting…",language:"Language",langZh:"中文",langEn:"English",githubRepo:"GitHub repository (xing-shuyin/pi-web-ui)",copy:"Copy",viewSwitch:"Switch view",chat:"Chat",terminal:"Terminal",selectModel:"Select model",availableModels:"Available models",noModels:"No models available (configure an API key first)",reasoning:"reasoning",vision:"vision",refreshModels:"Refresh model list",manageModels:"⚙ Manage models (add / edit)",manageModelsTitle:"Manage models",thinkingLevel:"Thinking level",thinking:"Thinking",thinkingChip:"Thinking: {level}",sound:"Sound",newChat:"New chat",more:"More",newChatTip:"New chat (sessions are saved per browser)","thinking.off":"Off","thinking.minimal":"Minimal","thinking.low":"Low","thinking.medium":"Medium","thinking.high":"High","thinking.xhigh":"Extra high","thinking.max":"Max",thinkingUnsupported:"Not supported by this model — snapped to the nearest supported level",context:"Context",contextUsage:"Context usage",cumulativeCost:"Cumulative cost",sessionMessages:"Session messages",messages:"messages",pluginStatus:"Plugin status",working:"Working",queued:"queued",enterPath:"Type a path, Enter to switch",cwdTip:"Working directory: {path} (click to switch)",folderRef:"Folder reference: {path}",refOnly:"Reference only: {path}",attachContent:"Attached content: {path}",attachLines:"Attached selected lines: {path} (lines {start}-{end})",attachImage:"Image: {name}",attachFile:"File: {name}",removeAttachment:"Remove attachment",attachHint:"Will be sent with the next message",uploadFile:"Add files (images / text / any file — or drag in / paste a screenshot)",dropHereToAttach:"Release to attach file",imageNotSupported:"The current model doesn't support vision — the image may be ignored",imageLoadFailed:"Couldn't read image: {name}",fileLoadFailed:"Couldn't read file: {name}",fileTooLarge:"File too large, skipped (> {size}MB): {name}",foldersNotSupported:"Folders can't be dropped directly — expand and pick files instead",followUpQueued:"⏳ {n} follow-up message(s) queued",steeringQueued:"⏳ {n} steering message(s) queued",placeholderStreaming:"The agent is working… (messages will queue)",placeholderIdle:"Message pi — Enter to send, / for commands",placeholderConnecting:"Connecting to server…",stopAgent:"Stop agent",stop:"Stop",supplement:"Follow-up",supplementTip:"Send immediately after the current reply finishes",sendTip:"Send (Enter)",slashCommands:"Commands",slashMenuHint:"↑↓ select · Enter/Tab complete",slashHelpTitle:"pi commands",slashHelpHint:"Type / anytime to open the command list",slashLoading:"Loading commands… (available once connected)",slashBuiltin:"Builtin",slashExtension:"Extension",slashPrompt:"Template",slashSkill:"Skill",slashCopied:"Copied the last assistant reply",slashCopyFailed:"Copy failed — please copy manually",slashCopyEmpty:"No assistant reply to copy yet",recentProjects:"Recent projects",runningConversations:"Running chats",historySessions:"History",openHistory:"History",openFiles:"Files",streaming:"Streaming…",noHistory:"No previous chats",current:"Current",messageCount:"{n} messages",tuiTip:"Chat in the pi terminal (TUI)",emptyChat:"Empty chat",editReask:"Edit & re-ask",editReaskTip:"Edit this question and re-ask from here (forks a new conversation; the original is kept)",reaskFromHere:"Re-ask from here",editPlaceholder:"Edit the question…",editHint:"⌘/Ctrl+Enter to submit · Esc to cancel",expandMsg:"Expand",collapseMsg:"Collapse",toolCalls:"tool calls",bashRuns:"bash runs",images:"images",update:"Update",updateTip:"Check & update pi-web-ui",currentVersion:"Current version",latestVersion:"Latest version",checkingUpdate:"Checking…",checkUpdate:"Check for updates",upToDate:"You're up to date",updateAvailable:"New version v{version} available",updateJustPublished:"v{version} was just published — npm cache may lag; if the new version isn't detected yet, re-check in a moment",updateNow:"Update now",confirmUpdate:"Confirm (replaces global install)",updateSuccess:"✅ Updated — restarting…",updateFailed:"Update failed: {detail}",restartHint:"Restart: pi-web-ui server restart",rootDir:"Root",noFiles:"No files",filesTruncated:"Directory too large — list truncated (first 2000 shown)",linkFolderTip:"Link folder path to chat",attachInlineTip:"Attach content to chat",referenceTip:"Reference path only (AI reads on demand)",previewFile:"Preview",downloadFile:"Download file",downloadFailed:"Download failed: {error}",selectLinesHint:"Click a line to select; drag or Shift+click for a range",selectedRange:"Selected {n} lines (lines {start}-{end})",fileLines:"{n} lines",selectAll:"Select all",clearSelection:"Clear",addToChat:"Add to chat",addedToChat:"Added",previewTruncated:"⚠ File too large — previewing the first 512KB",previewLinesTruncated:"… too many lines — showing the first {n}",binaryFile:"🔣 Binary file — first 4KB shown as hex",binaryHexTruncated:" (file larger — download for the full file)",previewNotSupported:"This file type can't be previewed (only images / videos / text)",emptyFile:"(empty file)",pluginRequest:"Plugin request",noOptions:"(no options)",inputPlaceholder:"Enter content",soundHeader:"Sound notifications",enableSound:"Enable sound",preview:"Preview",volume:"Volume","sound.question":"Question popup","sound.question.desc":"When ask_user_question appears","sound.done":"Reply finished","sound.done.desc":"When the agent finishes a turn","sound.start":"Reply started","sound.start.desc":"When the agent starts a new turn","sound.error":"Error","sound.error.desc":"When an error notice appears",setupTitle:"pi agent config not detected",setupDesc:"pi-web-ui needs pi's config directory (~/.pi/agent) and at least one API key to run the agent. pi has built-in providers such as openai, anthropic, and deepseek — just pick one and enter a key, no terminal needed.",installFailed:"✖ pi agent installation failed:",retryInstall:"Retry install",skip:"Skip",installDone:"✅ pi agent CLI installed. Pick a provider and enter an API key to start chatting:",provider:"Provider",configured:"configured",providerKeyReady:"This provider already has a key — use it or replace it.",apiKey:"API key",saving:"Saving…",saveAndStart:"Save and start using",recheck:"Recheck",installing:"Installing pi agent CLI…",autoInstall:"Auto-install pi agent",attachment:"Attachment",plugin:"plugin",unknown:"unknown",thinkingWait:"Thinking",exitCode:"Exit code {code}",cancelled:"Cancelled",truncated:"… content too long, truncated in this view",outputTruncated:"… output too long, truncated in this view",refOnlyShort:"Reference only",folderRefShort:"Folder · reference only",inlineLines:"Inline · {n} lines",inlineLinesRange:"Lines {start}-{end}",image:"🖼 Image",folderNotExpanded:"Folder — content not expanded, the agent will browse it as needed",fileNotExpanded:"Large file ({size}) — content not expanded, the agent will read it as needed","role.user":"You","role.assistant":"pi","role.tool":"Tool","role.bash":"Terminal","role.branch":"Branch summary","role.compaction":"Context compacted",welcomeTitle:"pi coding agent",welcomeSub:"Inspect, edit, run — always ready",directory:"Directory",clickToFill:"Click to fill input",waitingResponse:"Waiting for model response…",backToBottom:"Back to bottom",questionNavTitle:"Questions",questionNavTip:"All questions in this conversation — hover to expand, click to jump","ex.understand":"Understand this project","ex.understand.prompt":"Introduce this project: overall structure, main modules, and how to run it?","ex.debug":"Debug an issue","ex.debug.prompt":"Help me debug a bug — describe the symptom first, and I'll add details.","ex.test":"Write tests","ex.test.prompt":"Write unit tests for the core modules.","ex.review":"Code review","ex.review.prompt":"Review the recently changed code and point out potential issues and improvements.",error:"Error",done:"Done",running:"Running…",toolQueued:"Queued",copyArgs:"Copy args",errorOutput:"Error output",output:"Output",waitingOutput:"Waiting for output…",toolDoneWaitingModel:"Done · waiting on model",waitingModel:"Waiting for model response…",thinkingNow:"Thinking",thinkingPreview:"Thinking: {preview}",commands:"Commands",newCommand:"New command",newTerminal:"New terminal",name:"Name",command:"Command",cwdHint:"(${pwd} = current working directory)",noCommands:"No commands yet — click + to add one",clickToRun:"Click to run",edit:"Edit",delete:"Delete",confirmQ:"Confirm?",builtinTerminal:"Built-in terminal",termEmptySub:"Click a command on the left to run it, or + on the right for a new terminal",noTerminal:"No terminals",exited:"(exited{code})",closeTerminal:"Close terminal",rerun:"Reload .pi/commands.json",terminalTitle:"Terminal {n}",exampleName:"e.g. start dev server",exampleCommand:"e.g. npm run dev",editProvider:"Edit provider",builtinProviders:"Built-in providers",hintKeyOnly:"Just enter an API key",configuredBadge:"✓ Configured",keyReady:"Key ready",pasteKey:"Paste API key…",savingKey:"Saving",saveKey:"Save key",customProviders:"Custom providers",customDesc:"For Ollama / vLLM / OpenAI-compatible proxies, etc. Written to pi's models.json — hot-reloaded immediately.",noCustomProviders:"No custom providers yet",modelsCount:"{n} models",addProvider:"Add provider",providerId:"Provider ID",providerIdHint:"(required, e.g. ollama / my-proxy)",displayName:"Display name",displayNamePh:"My proxy",apiType:"API type",baseUrlHint:"(OpenAI-compatible endpoint)",apiKeyHint:"sk-… (optional — uses the auth.json key)",authHeader:"Auto-add Authorization header",modelsTitle:"Models",modelIdReq:"Model ID (required)",text:"Text",textImage:"Text+image",contextWindow:"Context",maxOutput:"Max output",removeModel:"Remove model",addModel:"Add model",deleteProviderConfirm:"Delete provider {id} and its {n} models?",goalBarTitle:"Goal",goalBarPlaceholder:"Set a goal; the agent's output is auto-reviewed…",goalBarSet:"Start",goalBarClear:"Cancel",goalBarLocked:"Locked: applies to every later turn",goalBarUnlocked:"This turn only (cleared afterwards)",goalBarReviewModel:"Review model",goalBarUseMainModel:"Use the main model",goalBarMaxRounds:"Max rounds",goalBarMaxRoundsTip:"Max review-revision rounds; 0 or empty = unlimited (keep revising until it passes)",goalBarUnlimitedShort:"Unlimited",goalBarReviewing:"Reviewing…",goalBarRound:"Round {n}",goalBarActive:"Goal active",goalBarPassed:"Passed",goalBarFailed:"Failed",goalBarStatusPending:"Waiting to generate…",goalWizardBtn:"AI Scrape",goalWizardTip:"Let AI refine the requirement into a goal via a Q&A survey",goalWizardRunning:"Scoping the goal",goalWizardAnswer:"Answer",goalWizardCard:"Goal survey",loadingSession:"Loading session…",connectingServer:"Connecting to pi-web-ui server…"},Nv=K.createContext(null);function a0(){try{const e=localStorage.getItem(Cv);if(e==="zh"||e==="en")return e}catch{}return"zh"}function l0({children:e}){const[t,n]=K.useState(a0),r=K.useCallback(l=>{n(l);try{localStorage.setItem(Cv,l)}catch{}},[]),o=K.useCallback((l,u)=>{let d=o0[l];if(t==="zh"&&(d=s0[l]),u)for(const[h,m]of Object.entries(u))d=d.replaceAll(`{${h}}`,String(m));return d},[t]);K.useEffect(()=>{document.documentElement.lang=t==="zh"?"zh-CN":"en"},[t]);const a=K.useMemo(()=>({locale:t,setLocale:r,t:o}),[t,r,o]);return g.jsx(Nv.Provider,{value:a,children:e})}function Tv(){const e=K.useContext(Nv);if(!e)throw new Error("useI18n must be used within LanguageProvider");return e}function Tt(){return Tv().t}const c0=["off","minimal","low","medium","high","xhigh","max"];function Rv({chat:e,send:t,onManageModels:n,compact:r=!1}){const o=Tt(),a=e.state,l=a==null?void 0:a.model,u=l?`${l.provider}/${l.id}`:null,[d,h]=K.useState(!1),[m,p]=K.useState(!1),[v,b]=K.useState(!1),S=a!=null&&a.availableThinkingLevels&&a.availableThinkingLevels.length>0?new Set(a.availableThinkingLevels):null,w=c0.map(C=>({value:C,label:o(`thinking.${C}`),supported:S?S.has(C):!0})),N=C=>{var M;return((M=w.find(T=>T.value===C))==null?void 0:M.label)??C};return K.useEffect(()=>{d&&e.models.length===0&&!v&&(b(!0),t({type:"list_models"}))},[d,e.models.length,v,t]),K.useEffect(()=>{e.models.length>0&&b(!1)},[e.models.length]),g.jsxs(g.Fragment,{children:[g.jsxs(ts,{trigger:g.jsxs(g.Fragment,{children:[g.jsx(qd,{}),g.jsx("span",{className:"chip-model",children:l?l.name:o("selectModel")}),!r&&(l==null?void 0:l.vision)&&g.jsx("span",{className:"chip-vision",title:o("vision"),children:"🖼"}),!r&&l&&g.jsx("span",{className:"chip-sub",children:l.provider})]}),open:d,onOpenChange:h,children:[g.jsx("div",{className:"dd-header",children:o("availableModels")}),(v||e.modelsLoading)&&g.jsx("div",{className:"dd-loading",children:o("loading")}),e.models.length===0&&!v&&!e.modelsLoading&&g.jsx("div",{className:"dd-loading",children:o("noModels")}),e.models.map(C=>g.jsx(Gs,{active:u===C.id,onClick:()=>{u!==C.id&&t({type:"set_model",modelId:C.id}),h(!1)},children:g.jsxs("span",{className:"dd-model-cell",children:[g.jsx("span",{className:"dd-model-name",children:C.name}),g.jsxs("span",{className:"dd-model-meta",children:[g.jsx("span",{className:"dd-model-provider",children:C.provider}),(C.reasoning||C.vision)&&g.jsxs("span",{className:"dd-model-badges",children:[C.reasoning&&g.jsx("span",{className:"dd-model-badge",children:o("reasoning")}),C.vision&&g.jsx("span",{className:"dd-model-badge",children:o("vision")})]})]})]})},C.id)),g.jsx("button",{type:"button",className:"dd-refresh",onClick:()=>t({type:"list_models"}),children:o("refreshModels")}),g.jsx("button",{type:"button",className:"dd-refresh",onClick:()=>{h(!1),n()},children:o("manageModels")})]}),g.jsxs(ts,{trigger:g.jsxs(g.Fragment,{children:[g.jsx(qw,{}),g.jsx("span",{className:"chip-sub",children:o("thinkingChip",{level:a?N(a.thinkingLevel):"—"})})]}),open:m,onOpenChange:p,children:[g.jsx("div",{className:"dd-header",children:o("thinkingLevel")}),w.map(C=>g.jsx(Gs,{active:(a==null?void 0:a.thinkingLevel)===C.value,disabled:!C.supported,title:C.supported?void 0:o("thinkingUnsupported"),onClick:()=>{(a==null?void 0:a.thinkingLevel)!==C.value&&t({type:"set_thinking",level:C.value}),p(!1)},children:C.label},C.value))]})]})}const u0=[{kind:"question",labelKey:"sound.question",descKey:"sound.question.desc"},{kind:"done",labelKey:"sound.done",descKey:"sound.done.desc"},{kind:"start",labelKey:"sound.start",descKey:"sound.start.desc"},{kind:"error",labelKey:"sound.error",descKey:"sound.error.desc"}];function sg({settings:e,onChange:t,onPreview:n}){const r=Tt(),o=a=>t({...e,...a});return g.jsxs("div",{className:"sound-menu",children:[g.jsx("div",{className:"dd-header",children:r("soundHeader")}),g.jsxs("label",{className:"sound-row sound-master",children:[g.jsxs("span",{className:"sound-label",children:[g.jsx(vv,{className:"sound-icon"}),g.jsx("span",{children:r("enableSound")})]}),g.jsx("input",{type:"checkbox",checked:e.enabled,onChange:a=>o({enabled:a.target.checked})})]}),u0.map(({kind:a,labelKey:l,descKey:u})=>g.jsxs("label",{className:`sound-row ${e.enabled?"":"disabled"}`,children:[g.jsxs("span",{className:"sound-label",children:[g.jsx("span",{className:"sound-name",children:r(l)}),g.jsx("span",{className:"sound-desc",children:r(u)})]}),g.jsxs("span",{className:"sound-right",children:[g.jsx("button",{type:"button",className:"sound-preview",title:r("preview"),disabled:!e.enabled,onClick:d=>{d.preventDefault(),n(a)},children:r("preview")}),g.jsx("input",{type:"checkbox",checked:e[a],disabled:!e.enabled,onChange:d=>o({[a]:d.target.checked})})]})]},a)),g.jsxs("div",{className:`sound-volume ${e.enabled?"":"disabled"}`,children:[g.jsx("span",{className:"sound-name",children:r("volume")}),g.jsx("input",{type:"range",min:0,max:100,step:5,value:e.volume,disabled:!e.enabled,onChange:a=>o({volume:Number(a.target.value)})}),g.jsxs("span",{className:"sound-vol-num",children:[e.volume,"%"]})]})]})}function h0({chat:e,send:t,view:n,onViewChange:r,onOpenPanel:o,onManageModels:a,sound:l,onSoundChange:u,onSoundPreview:d}){var $;const{locale:h,setLocale:m,t:p}=Tv();e.state;const[v,b]=K.useState(!1),[S,w]=K.useState(!1),[N,C]=K.useState(!1),[M,T]=K.useState(!1),[A,V]=K.useState(!1),O=[{value:"zh",label:p("langZh")},{value:"en",label:p("langEn")}],ne=e.ready?p("connected"):e.status==="closed"?p("reconnecting"):p("connecting"),Z=e.ready?"ok":"busy",te=()=>{var D,H,F,W;return g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"dd-update",children:[g.jsxs("div",{className:"dd-row",children:[g.jsx("span",{children:p("currentVersion")}),g.jsxs("b",{children:["v",((D=e.update)==null?void 0:D.current)??"…"]})]}),g.jsxs("div",{className:"dd-row",children:[g.jsx("span",{children:p("latestVersion")}),g.jsx("b",{children:e.update===null?p("checkingUpdate"):e.update.error?e.update.error:e.update.latest?`v${e.update.latest}`:p("checkingUpdate")})]}),((H=e.update)==null?void 0:H.pendingRestart)&&g.jsx("div",{className:"dd-note ok",children:p("updateSuccess")}),e.update&&!e.update.pendingRestart&&e.update.upToDate&&g.jsx("div",{className:"dd-note ok",children:p("upToDate")}),e.update&&!e.update.pendingRestart&&!e.update.upToDate&&e.update.latest&&g.jsx("div",{className:"dd-note warn",children:p("updateAvailable",{version:e.update.latest})}),((F=e.update)==null?void 0:F.latestPublishedAt)&&Date.now()-new Date(e.update.latestPublishedAt).getTime()<30*6e4&&g.jsx("div",{className:"dd-note warn",children:p("updateJustPublished",{version:e.update.latest??""})}),e.updateResult&&!e.updateResult.ok&&g.jsx("div",{className:"dd-note err",children:p("updateFailed",{detail:e.updateResult.detail})}),((W=e.update)==null?void 0:W.pendingRestart)&&g.jsx("div",{className:"dd-note",children:p("restartHint")})]}),g.jsxs("div",{className:"dd-actions",children:[g.jsx("button",{type:"button",className:"dd-refresh",onClick:()=>t({type:"check_update"}),children:e.update===null?p("checkingUpdate"):p("checkUpdate")}),e.update&&!e.update.pendingRestart&&!e.update.upToDate&&e.update.latest&&g.jsx("button",{type:"button",className:`dd-refresh accent ${A?"armed":""}`,onClick:()=>{if(!A){V(!0);return}V(!1),C(!1),T(!1),t({type:"update_app"})},children:p(A?"confirmUpdate":"updateNow")})]})]})};return g.jsxs("header",{className:"topbar",children:[g.jsxs("div",{className:"brand",children:[g.jsx("button",{type:"button",className:"panel-toggle",title:p("openHistory"),onClick:()=>o("left"),children:g.jsx(bv,{})}),g.jsx("span",{className:"brand-logo",children:"π"}),g.jsx("span",{className:"brand-name",children:"pi-web-ui"}),g.jsx("span",{className:`conn-dot ${Z}`,title:ne}),g.jsx("span",{className:"conn-label",children:ne})]}),g.jsxs("div",{className:"topbar-actions",children:[g.jsxs("div",{className:"view-switch",role:"tablist","aria-label":p("viewSwitch"),children:[g.jsxs("button",{type:"button",role:"tab","aria-selected":n==="chat",className:n==="chat"?"active":"",onClick:()=>r("chat"),children:[g.jsx(Kh,{}),g.jsx("span",{children:p("chat")})]}),g.jsxs("button",{type:"button",role:"tab","aria-selected":n==="terminal",className:n==="terminal"?"active":"",onClick:()=>r("terminal"),children:[g.jsx(Kd,{}),g.jsx("span",{children:p("terminal")})]})]}),g.jsxs("div",{className:"topbar-desktop",children:[g.jsx(Rv,{chat:e,send:t,onManageModels:a}),g.jsx(ts,{trigger:g.jsxs(g.Fragment,{children:[g.jsx(vv,{}),g.jsx("span",{className:"chip-sub",children:p("sound")})]}),open:v,onOpenChange:b,children:g.jsx(sg,{settings:l,onChange:u,onPreview:d})}),g.jsxs(ts,{trigger:g.jsxs(g.Fragment,{children:[g.jsx(e0,{}),g.jsx("span",{className:"chip-sub",children:h==="zh"?p("langZh"):"EN"})]}),open:S,onOpenChange:w,children:[g.jsx("div",{className:"dd-header",children:p("language")}),O.map(D=>g.jsx(Gs,{active:h===D.value,onClick:()=>{m(D.value),w(!1)},children:D.label},D.value))]}),g.jsxs(ts,{trigger:g.jsxs(g.Fragment,{children:[g.jsx(xv,{}),g.jsxs("span",{className:"chip-sub",children:["v",(($=e.update)==null?void 0:$.current)??"…"]}),e.update&&!e.update.upToDate&&!e.update.pendingRestart&&g.jsx("span",{className:"update-dot",title:p("updateAvailable",{version:e.update.latest??""})})]}),open:N,onOpenChange:D=>{C(D),V(!1),D&&t({type:"check_update"})},fit:!0,children:[g.jsx("div",{className:"dd-header",children:p("update")}),te()]}),g.jsx("a",{className:"chip github",href:"https://github.com/xing-shuyin/pi-web-ui",target:"_blank",rel:"noreferrer noopener",title:p("githubRepo"),children:g.jsx(ig,{})})]}),g.jsxs("button",{type:"button",className:"chip newchat","data-tip":p("newChatTip"),onClick:()=>t({type:"new_chat"}),children:[g.jsx(os,{}),g.jsx("span",{children:p("newChat")})]}),g.jsx("div",{className:"topbar-more",children:g.jsxs(ts,{trigger:g.jsxs(g.Fragment,{children:[g.jsx(Zw,{}),g.jsx("span",{className:"chip-sub",children:p("more")}),e.update&&!e.update.upToDate&&!e.update.pendingRestart&&g.jsx("span",{className:"update-dot"})]}),open:M,onOpenChange:D=>{T(D),V(!1),D&&t({type:"check_update"})},children:[g.jsx("div",{className:"dd-header",children:p("sound")}),g.jsx(sg,{settings:l,onChange:u,onPreview:d}),g.jsx("div",{className:"dd-header",children:p("language")}),O.map(D=>g.jsx(Gs,{active:h===D.value,onClick:()=>m(D.value),children:D.label},D.value)),g.jsx("div",{className:"dd-header",children:p("update")}),te(),g.jsxs("a",{className:"dd-refresh dd-more-link",href:"https://github.com/xing-shuyin/pi-web-ui",target:"_blank",rel:"noreferrer noopener",children:[g.jsx(ig,{})," ",p("githubRepo")]})]})}),g.jsx("button",{type:"button",className:"panel-toggle",title:p("openFiles"),onClick:()=>o("right"),children:g.jsx(la,{})})]})]})}function og(e){const t=new Date(e),n=new Date;return t.toDateString()===n.toDateString()?`${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}`:`${t.getMonth()+1}/${t.getDate()}`}function d0({chat:e,send:t}){var h,m;const n=Tt(),r=(h=e.state)==null?void 0:h.sessionFile,o=(m=e.state)==null?void 0:m.cwd,a=e.sessions,l=e.projects,u=p=>{const v=p.name||p.firstMessage.trim();return v.length>0?v:n("emptyChat")},d=p=>p.split(/[\\/]/).pop()||p;return g.jsxs("aside",{className:"panel panel-left",children:[l.length>0&&g.jsxs("div",{className:"panel-projects",children:[g.jsx("div",{className:"panel-section-title",children:n("recentProjects")}),g.jsx("div",{className:"projects-scroll",children:l.map(p=>{const v=o===p.path;return g.jsxs("button",{type:"button",className:`project-item ${v?"active":""}`,title:p.path,onClick:()=>{v||t({type:"set_cwd",path:p.path})},children:[g.jsx(la,{className:"project-icon"}),g.jsxs("span",{className:"project-info",children:[g.jsx("span",{className:"project-name",children:d(p.path)}),g.jsx("span",{className:"project-path",children:p.path})]}),g.jsx("span",{className:"project-time",children:og(p.lastUsed)})]},p.path)})})]}),e.conversations.length>0&&g.jsxs("div",{className:"panel-convs",children:[g.jsx("div",{className:"panel-section-title",children:n("runningConversations")}),e.conversations.map(p=>{const v=e.activeConversationId===p.id;return g.jsxs("button",{type:"button",className:`session-item ${v?"active":""}`,title:p.title,onClick:()=>{v||t({type:"switch_conversation",id:p.id})},children:[g.jsx(Kh,{className:"session-icon"}),g.jsxs("span",{className:"session-info",children:[g.jsx("span",{className:"session-title",children:p.title}),g.jsx("span",{className:"session-sub",children:v?n("current"):n("messageCount",{n:p.messageCount})})]}),p.isStreaming&&g.jsx("span",{className:"conv-streaming",title:n("streaming")})]},p.id)}),g.jsx("div",{className:"panel-section-divider"})]}),g.jsxs("div",{className:"panel-sessions",children:[g.jsx("div",{className:"panel-section-title",children:n("historySessions")}),g.jsxs("div",{className:"sessions-scroll",children:[a.length===0&&g.jsx("div",{className:"panel-empty",children:n("noHistory")}),a.map(p=>{const v=r===p.path;return g.jsxs("button",{type:"button",className:`session-item ${v?"active":""}`,title:p.path,onClick:()=>{v||t({type:"switch_session",path:p.path})},children:[g.jsx(Kh,{className:"session-icon"}),g.jsxs("span",{className:"session-info",children:[g.jsx("span",{className:"session-title",children:u(p)}),g.jsxs("span",{className:"session-sub",children:[v?n("current"):n("messageCount",{n:p.messageCount}),p.source==="tui"&&g.jsx("span",{className:"session-src",title:n("tuiTip"),children:"TUI"})]})]}),g.jsx("span",{className:"session-time",children:og(p.modified)})]},p.path)})]})]})]})}function Mv(){if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID();const e=new Uint8Array(16);if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function")crypto.getRandomValues(e);else for(let n=0;n<16;n++)e[n]=Math.floor(Math.random()*256);e[6]=e[6]&15|64,e[8]=e[8]&63|128;const t=[...e].map(n=>n.toString(16).padStart(2,"0")).join("");return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}const ag=2e5,f0=2e5,p0={goal:null,reviewModel:null,maxRounds:3,locked:!0,reviewing:!1,round:0,status:"",verdict:"pending",wizard:{active:!1,draft:"",model:null,step:0,maxSteps:6,status:""}};function m0(){const e=new Map,t=new Map;return{write(n,r){const o=e.get(n);if(o){o.write(r);return}const a=t.get(n)??"",l=a.length+r.length>f0?r:a+r;t.set(n,l)},register(n,r){e.set(n,r);const o=t.get(n);if(o){try{r.write(o)}catch{}t.delete(n)}return()=>{e.get(n)===r&&e.delete(n),t.delete(n)}},clear(){e.clear(),t.clear()}}}function g0(e,t){const n=new Set;for(const o of t.messages)o.role==="toolResult"&&o.toolCallId&&n.add(o.toolCallId),o.role==="bashExecution"&&n.add(`bash-${o.id}`);let r=!1;for(const o of e.keys())n.has(o)&&(e.delete(o),r=!0);return r?new Map(e):e}function _0(e,t){let n=!1;for(const r of e.keys())t.messages.some(a=>a.role==="toolResult"&&a.toolCallId===r)&&(e.delete(r),n=!0);return n?new Map(e):e}function v0(e,t){switch(t.type){case"status":return{...e,status:t.status,ready:t.status==="open"?e.ready:!1,terminals:t.status==="open"?e.terminals:[]};case"ready":return{...e,serverVersion:t.serverVersion,ready:!0};case"snapshot":return{...e,ready:!0,state:t.state,activeConversationId:t.state.conversationId,liveOutputs:g0(e.liveOutputs,t.state),toolStatuses:_0(e.toolStatuses,t.state)};case"tool_delta":{const n=e.liveOutputs.get(t.toolCallId),r=((n==null?void 0:n.text)??"")+t.delta,o=r.length>ag?r.slice(0,ag):r,a=new Map(e.liveOutputs);return a.set(t.toolCallId,{toolName:t.toolName,text:o}),{...e,liveOutputs:a}}case"tool_status":return{...e,toolStatuses:new Map(e.toolStatuses).set(t.status.toolCallId,t.status)};case"notice":return{...e,notices:[...e.notices,t.notice].slice(-6)};case"dismiss_notice":return{...e,notices:e.notices.filter(n=>n.id!==t.id)};case"sessions":return{...e,sessions:t.sessions};case"conversations":return{...e,conversations:t.conversations,activeConversationId:t.activeId};case"projects":return{...e,projects:t.projects};case"files":return{...e,files:t.files};case"file_changed":return{...e,fileChanged:{path:t.path}};case"file_content":return{...e,fileContent:t.content};case"models":return{...e,models:t.models,modelsLoading:t.loading};case"models_config":return{...e,modelsConfig:t.providers};case"providers_status":return{...e,providers:t.providers};case"install_result":return{...e,installResult:t.result};case"path_completions":return{...e,pathCompletions:t.completions};case"update_status":return{...e,update:t.status};case"update_result":return{...e,updateResult:t.result};case"widgets":return{...e,widgets:t.widgets};case"statuses":return{...e,statuses:t.statuses};case"dialog":return{...e,dialog:t.dialog};case"commands":return{...e,commands:t.commands,commandsPath:t.path};case"slash_commands":return{...e,slashCommands:t.commands};case"goal_status":return{...e,goal:t.status};case"terminal_add":return{...e,terminals:[...e.terminals,t.meta]};case"terminal_remove":return{...e,terminals:e.terminals.filter(n=>n.id!==t.id)};case"terminal_exit":return{...e,terminals:e.terminals.map(n=>n.id===t.terminalId?{...n,running:!1,exitCode:t.exitCode}:n)};case"terminal_restart":return{...e,terminals:e.terminals.map(n=>n.id===t.terminalId?{...n,running:!0,exitCode:null}:n)};default:return e}}const lg="pi-web-client-id";function Gd(){let e=localStorage.getItem(lg);return e||(e=Mv(),localStorage.setItem(lg,e)),e}function y0(){return`${location.protocol==="https:"?"wss:":"ws:"}//${location.host}/ws`}function b0(){const[e,t]=K.useReducer(v0,{status:"connecting",ready:!1,state:null,liveOutputs:new Map,toolStatuses:new Map,notices:[],sessions:[],conversations:[],activeConversationId:"",projects:[],files:null,fileChanged:null,fileContent:null,models:[],modelsLoading:!1,modelsConfig:[],providers:[],installResult:null,pathCompletions:[],update:null,updateResult:null,widgets:[],statuses:[],dialog:null,commands:[],commandsPath:"",slashCommands:[],terminals:[],goal:p0}),n=K.useRef(null),r=K.useRef(m0()),o=K.useRef(0),a=K.useRef(null),l=K.useRef(!0),u=K.useRef(0),d=K.useRef(0),h=K.useCallback((M,T)=>{const A=++d.current;t({type:"notice",notice:{id:A,level:M,text:T}}),setTimeout(()=>t({type:"dismiss_notice",id:A}),M==="error"?12e3:7e3)},[]),m=K.useCallback(M=>{const T=n.current;return T&&T.readyState===WebSocket.OPEN?(T.send(JSON.stringify(M)),!0):!1},[]),p=K.useCallback(()=>{if(!l.current)return;t({type:"status",status:"connecting"});const M=new WebSocket(y0());n.current=M,M.onopen=()=>{n.current===M&&(t({type:"status",status:"open"}),o.current=0,u.current=Date.now(),M.send(JSON.stringify({type:"hello",clientId:Gd()})))},M.onmessage=T=>{if(n.current!==M)return;u.current=Date.now();let A;try{A=JSON.parse(T.data)}catch{return}switch(A.type){case"ready":t({type:"ready",serverVersion:A.serverVersion}),M.send(JSON.stringify({type:"get_state"})),M.send(JSON.stringify({type:"list_sessions"})),M.send(JSON.stringify({type:"list_projects"})),M.send(JSON.stringify({type:"list_files"})),M.send(JSON.stringify({type:"list_models"})),M.send(JSON.stringify({type:"list_commands"})),M.send(JSON.stringify({type:"get_commands"})),M.send(JSON.stringify({type:"check_update"}));break;case"snapshot":t({type:"snapshot",state:A.state});break;case"tool_delta":t({type:"tool_delta",toolCallId:A.toolCallId,toolName:A.toolName,delta:A.delta});break;case"tool_status":t({type:"tool_status",status:A});break;case"notice":{const V=++d.current;t({type:"notice",notice:{id:V,level:A.level,text:A.text}}),setTimeout(()=>t({type:"dismiss_notice",id:V}),A.level==="error"?12e3:7e3);break}case"sessions":t({type:"sessions",sessions:A.sessions});break;case"conversations":t({type:"conversations",conversations:A.conversations,activeId:A.activeId});break;case"projects":t({type:"projects",projects:A.projects});break;case"files":t({type:"files",files:A});break;case"file_changed":t({type:"file_changed",path:A.path});break;case"file_content":t({type:"file_content",content:A});break;case"models":t({type:"models",models:A.models,loading:!1});break;case"models_config":t({type:"models_config",providers:A.providers});break;case"providers_status":t({type:"providers_status",providers:A.providers});break;case"install_result":t({type:"install_result",result:A});break;case"path_completions":t({type:"path_completions",completions:A.completions});break;case"update_status":t({type:"update_status",status:A});break;case"update_result":t({type:"update_result",result:A});break;case"widgets":t({type:"widgets",widgets:A.widgets});break;case"statuses":t({type:"statuses",statuses:A.statuses});break;case"dialog":t({type:"dialog",dialog:{id:A.id,kind:A.kind,title:A.title,args:A.args}});break;case"dialog_closed":t({type:"dialog",dialog:null});break;case"terminal_output":r.current.write(A.terminalId,A.data);break;case"terminal_exit":t({type:"terminal_exit",terminalId:A.terminalId,exitCode:A.exitCode});break;case"commands":t({type:"commands",commands:A.commands,path:A.path});break;case"slash_commands":t({type:"slash_commands",commands:A.commands});break;case"goal_status":t({type:"goal_status",status:A.status});break}},M.onclose=()=>{if(n.current===M&&(n.current=null),r.current.clear(),!l.current)return;t({type:"status",status:"closed"});const T=Math.min(1e3*2**o.current,1e4);o.current+=1,a.current=setTimeout(()=>{a.current=null,p()},T)},M.onerror=()=>{M.close()}},[]);K.useEffect(()=>{l.current=!0,p();const M=setInterval(()=>{if(!l.current)return;const T=n.current;T&&T.readyState===WebSocket.OPEN&&Date.now()-u.current>3e4&&T.close()},5e3);return()=>{var T;l.current=!1,clearInterval(M),a.current&&(clearTimeout(a.current),a.current=null),(T=n.current)==null||T.close(),n.current=null}},[p]);const v=K.useCallback(M=>t({type:"dismiss_notice",id:M}),[]),b=K.useCallback(M=>t({type:"terminal_add",meta:M}),[]),S=K.useCallback(M=>t({type:"terminal_remove",id:M}),[]),w=K.useCallback(M=>t({type:"terminal_restart",terminalId:M}),[]),N=K.useCallback((M,T)=>r.current.register(M,T),[]),C=K.useRef({chat:e,send:m,pushNotice:h,dismissNotice:v,terminal:{create:b,close:S,register:N,restart:w}});return C.current={chat:e,send:m,pushNotice:h,dismissNotice:v,terminal:{create:b,close:S,register:N,restart:w}},C.current}const S0=200*1024*1024,w0=/windows/i.test(navigator.userAgent),x0=/[<>:"/\\|?*\u0000-\u001f]/g,k0=/[. ]+$/,E0=/^(con|prn|aux|nul|com[1-9]|lpt[1-9])(\..*)?$/i;function C0(e){const t=e.replace(x0,"_").replace(k0,"");return t?E0.test(t)?`_${t}`:t:"_"}function cg(e,t=!0){return`/api/file?${new URLSearchParams({clientId:Gd(),path:e,...t?{download:"1"}:{}})}`}async function N0(e,t){const n=w0?C0(t):t;try{const r=await fetch(cg(e));if(!r.ok)return{ok:!1,cancelled:!1,error:await r.text().catch(()=>"")||(r.status===404?"文件不存在":`HTTP ${r.status}`)};if(Number(r.headers.get("content-length")??"0")>S0)return window.location.assign(cg(e)),{ok:!0};const a=await r.blob();return window.showSaveFilePicker&&window.isSecureContext?T0(a,n):Vh(a,n)}catch(r){return{ok:!1,cancelled:!1,error:r instanceof Error?r.message:String(r)}}}async function T0(e,t){let n;const r=window.showSaveFilePicker;if(!r)return Vh(e,t);try{n=await r({suggestedName:t})}catch(o){return o instanceof DOMException&&o.name==="AbortError"?{ok:!1,cancelled:!0}:Vh(e,t)}try{const o=await n.createWritable();return await o.write(e),await o.close(),{ok:!0}}catch(o){return{ok:!1,cancelled:!1,error:o instanceof Error?o.message:String(o)}}}function Vh(e,t){const n=URL.createObjectURL(e),r=document.createElement("a");return r.href=n,r.download=t,document.body.appendChild(r),r.click(),r.remove(),setTimeout(()=>URL.revokeObjectURL(n),1e4),{ok:!0}}function R0({chat:e,send:t,onAttach:n,onPreview:r,onNotice:o}){var M;const a=Tt(),[l,u]=K.useState(""),[d,h]=K.useState(!1),m=e.files,p=1e4,v=K.useRef(0),b=K.useRef(void 0),S=K.useCallback((T,A)=>{const V=++v.current;u(T),A!=null&&A.silent||h(!0),t({type:"list_files",path:T===""?void 0:T})||v.current===V&&h(!1)},[t]);K.useEffect(()=>{m&&m.path===l&&h(!1)},[m,l]),K.useEffect(()=>{var V;const T=(V=e.state)==null?void 0:V.cwd;if(T!==b.current){b.current=T,S("",{silent:!0});return}const A=setInterval(()=>{document.visibilityState!=="hidden"&&S(l,{silent:!0})},p);return()=>clearInterval(A)},[(M=e.state)==null?void 0:M.cwd,l,S]),K.useEffect(()=>{const T=e.fileChanged;T&&T.path===l&&S(l,{silent:!0})},[e.fileChanged,l,S]);const w=T=>S(T),N=()=>{(m==null?void 0:m.parent)!==null&&(m==null?void 0:m.parent)!==void 0&&S(m.parent)},C=l.split("/").filter(Boolean);return g.jsxs("aside",{className:"panel panel-right",children:[g.jsxs("div",{className:"panel-crumbs",children:[g.jsx("button",{type:"button",className:`crumb ${l===""?"active":""}`,onClick:()=>S(""),children:a("rootDir")}),C.map((T,A)=>{const V=C.slice(0,A+1).join("/");return g.jsxs("span",{className:"crumb-seg",children:[g.jsx(mc,{}),g.jsx("button",{type:"button",className:`crumb ${V===l?"active":""}`,onClick:()=>S(V),children:T})]},V)})]}),g.jsxs("div",{className:"panel-body",children:[d&&g.jsx("div",{className:"panel-empty",children:a("loading")}),!d&&m&&m.path===l&&g.jsxs(g.Fragment,{children:[m.path!==""&&g.jsxs("button",{type:"button",className:"file-item dir",onClick:N,children:[g.jsx(la,{className:"file-icon"}),g.jsx("span",{className:"file-name",children:".."})]}),m.entries.map(T=>T.type==="dir"?g.jsxs("div",{className:"file-item dir",children:[g.jsxs("button",{type:"button",className:"file-dir-main",onClick:()=>w(T.path),children:[g.jsx(la,{className:"file-icon"}),g.jsx("span",{className:"file-name",children:T.name})]}),g.jsx("button",{type:"button",className:"file-attach ref","data-tip":a("linkFolderTip"),onClick:()=>n(T.path,T.name,"reference",!0),children:g.jsx(qh,{})})]},T.path):g.jsxs("div",{className:"file-item file",children:[g.jsxs("button",{type:"button",className:"file-name",title:`${T.path} — ${a("previewFile")}`,onClick:()=>r(T.path,T.name),children:[g.jsx(Sv,{className:"file-icon"}),g.jsx("span",{className:"file-name-text",children:T.name})]}),g.jsx("button",{type:"button",className:"file-attach download","data-tip":a("downloadFile"),onClick:()=>{N0(T.path,T.name).then(A=>{A.ok||A.cancelled||o("error",a("downloadFailed",{error:A.error}))})},children:g.jsx(xv,{})}),g.jsx("button",{type:"button",className:"file-attach inline","data-tip":a("attachInlineTip"),onClick:()=>n(T.path,T.name,"inline"),children:g.jsx(os,{})}),g.jsx("button",{type:"button",className:"file-attach ref","data-tip":a("referenceTip"),onClick:()=>n(T.path,T.name,"reference"),children:g.jsx(qh,{})})]},T.path)),m.truncated&&g.jsx("div",{className:"panel-empty files-truncated",children:a("filesTruncated")})]}),!d&&!m&&g.jsx("div",{className:"panel-empty",children:a("noFiles")})]}),e.widgets.filter(T=>T.lines.length>0).length>0&&g.jsx("div",{className:"panel-widgets",children:e.widgets.filter(T=>T.lines.length>0).map(T=>g.jsxs("div",{className:"widget",children:[g.jsx("div",{className:"widget-title",children:T.key}),g.jsx("pre",{className:"widget-lines",children:T.lines.join(`
41
41
  `)})]},T.key))})]})}var M0=mv();function A0(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const L0=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,O0=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,I0={};function ug(e,t){return(I0.jsx?O0:L0).test(e)}const D0=/[ \t\n\f\r]/g;function P0(e){return typeof e=="object"?e.type==="text"?hg(e.value):!1:hg(e)}function hg(e){return e.replace(D0,"")===""}class ma{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ma.prototype.normal={};ma.prototype.property={};ma.prototype.space=void 0;function Av(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new ma(n,r,t)}function Gh(e){return e.toLowerCase()}class In{constructor(t,n){this.attribute=n,this.property=t}}In.prototype.attribute="";In.prototype.booleanish=!1;In.prototype.boolean=!1;In.prototype.commaOrSpaceSeparated=!1;In.prototype.commaSeparated=!1;In.prototype.defined=!1;In.prototype.mustUseProperty=!1;In.prototype.number=!1;In.prototype.overloadedBoolean=!1;In.prototype.property="";In.prototype.spaceSeparated=!1;In.prototype.space=void 0;let B0=0;const He=us(),Pt=us(),Yh=us(),ue=us(),lt=us(),rs=us(),$n=us();function us(){return 2**++B0}const Xh=Object.freeze(Object.defineProperty({__proto__:null,boolean:He,booleanish:Pt,commaOrSpaceSeparated:$n,commaSeparated:rs,number:ue,overloadedBoolean:Yh,spaceSeparated:lt},Symbol.toStringTag,{value:"Module"})),uh=Object.keys(Xh);class Yd extends In{constructor(t,n,r,o){let a=-1;if(super(t,n),dg(this,"space",o),typeof r=="number")for(;++a<uh.length;){const l=uh[a];dg(this,uh[a],(r&Xh[l])===Xh[l])}}}Yd.prototype.defined=!0;function dg(e,t,n){n&&(e[t]=n)}function Qs(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new Yd(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Gh(r)]=r,n[Gh(a.attribute)]=r}return new ma(t,n,e.space)}const Lv=Qs({properties:{ariaActiveDescendant:null,ariaAtomic:Pt,ariaAutoComplete:null,ariaBusy:Pt,ariaChecked:Pt,ariaColCount:ue,ariaColIndex:ue,ariaColSpan:ue,ariaControls:lt,ariaCurrent:null,ariaDescribedBy:lt,ariaDetails:null,ariaDisabled:Pt,ariaDropEffect:lt,ariaErrorMessage:null,ariaExpanded:Pt,ariaFlowTo:lt,ariaGrabbed:Pt,ariaHasPopup:null,ariaHidden:Pt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:lt,ariaLevel:ue,ariaLive:null,ariaModal:Pt,ariaMultiLine:Pt,ariaMultiSelectable:Pt,ariaOrientation:null,ariaOwns:lt,ariaPlaceholder:null,ariaPosInSet:ue,ariaPressed:Pt,ariaReadOnly:Pt,ariaRelevant:null,ariaRequired:Pt,ariaRoleDescription:lt,ariaRowCount:ue,ariaRowIndex:ue,ariaRowSpan:ue,ariaSelected:Pt,ariaSetSize:ue,ariaSort:null,ariaValueMax:ue,ariaValueMin:ue,ariaValueNow:ue,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Ov(e,t){return t in e?e[t]:t}function Iv(e,t){return Ov(e,t.toLowerCase())}const F0=Qs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:rs,acceptCharset:lt,accessKey:lt,action:null,allow:null,allowFullScreen:He,allowPaymentRequest:He,allowUserMedia:He,alpha:He,alt:null,as:null,async:He,autoCapitalize:null,autoComplete:lt,autoFocus:He,autoPlay:He,blocking:lt,capture:null,charSet:null,checked:He,cite:null,className:lt,closedBy:null,colorSpace:null,cols:ue,colSpan:ue,command:null,commandFor:null,content:null,contentEditable:Pt,controls:He,controlsList:lt,coords:ue|rs,crossOrigin:null,data:null,dateTime:null,decoding:null,default:He,defer:He,dir:null,dirName:null,disabled:He,download:Yh,draggable:Pt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:He,formTarget:null,headers:lt,height:ue,hidden:Yh,high:ue,href:null,hrefLang:null,htmlFor:lt,httpEquiv:lt,id:null,imageSizes:null,imageSrcSet:null,inert:He,inputMode:null,integrity:null,is:null,isMap:He,itemId:null,itemProp:lt,itemRef:lt,itemScope:He,itemType:lt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:He,low:ue,manifest:null,max:null,maxLength:ue,media:null,method:null,min:null,minLength:ue,multiple:He,muted:He,name:null,nonce:null,noModule:He,noValidate:He,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:He,optimum:ue,pattern:null,ping:lt,placeholder:null,playsInline:He,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:He,referrerPolicy:null,rel:lt,required:He,reversed:He,rows:ue,rowSpan:ue,sandbox:lt,scope:null,scoped:He,seamless:He,selected:He,shadowRootClonable:He,shadowRootCustomElementRegistry:He,shadowRootDelegatesFocus:He,shadowRootMode:null,shadowRootSerializable:He,shape:null,size:ue,sizes:null,slot:null,span:ue,spellCheck:Pt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ue,step:null,style:null,tabIndex:ue,target:null,title:null,translate:null,type:null,typeMustMatch:He,useMap:null,value:Pt,width:ue,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:lt,axis:null,background:null,bgColor:null,border:ue,borderColor:null,bottomMargin:ue,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:He,declare:He,event:null,face:null,frame:null,frameBorder:null,hSpace:ue,leftMargin:ue,link:null,longDesc:null,lowSrc:null,marginHeight:ue,marginWidth:ue,noResize:He,noHref:He,noShade:He,noWrap:He,object:null,profile:null,prompt:null,rev:null,rightMargin:ue,rules:null,scheme:null,scrolling:Pt,standby:null,summary:null,text:null,topMargin:ue,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ue,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:He,disablePictureInPicture:He,disableRemotePlayback:He,exportParts:rs,part:lt,prefix:null,property:null,results:ue,security:null,unselectable:null},space:"html",transform:Iv}),z0=Qs({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:$n,accentHeight:ue,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ue,amplitude:ue,arabicForm:null,ascent:ue,attributeName:null,attributeType:null,azimuth:ue,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ue,by:null,calcMode:null,capHeight:ue,className:lt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ue,diffuseConstant:ue,direction:null,display:null,dur:null,divisor:ue,dominantBaseline:null,download:He,dx:null,dy:null,edgeMode:null,editable:null,elevation:ue,enableBackground:null,end:null,event:null,exponent:ue,externalResourcesRequired:null,fill:null,fillOpacity:ue,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:rs,g2:rs,glyphName:rs,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ue,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ue,horizOriginX:ue,horizOriginY:ue,id:null,ideographic:ue,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ue,k:ue,k1:ue,k2:ue,k3:ue,k4:ue,kernelMatrix:$n,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ue,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ue,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ue,overlineThickness:ue,paintOrder:null,panose1:null,path:null,pathLength:ue,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:lt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ue,pointsAtY:ue,pointsAtZ:ue,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:$n,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:$n,rev:$n,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:$n,requiredFeatures:$n,requiredFonts:$n,requiredFormats:$n,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ue,specularExponent:ue,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ue,strikethroughThickness:ue,string:null,stroke:null,strokeDashArray:$n,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ue,strokeOpacity:ue,strokeWidth:null,style:null,surfaceScale:ue,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:$n,tabIndex:ue,tableValues:null,target:null,targetX:ue,targetY:ue,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:$n,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ue,underlineThickness:ue,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ue,values:null,vAlphabetic:ue,vMathematical:ue,vectorEffect:null,vHanging:ue,vIdeographic:ue,version:null,vertAdvY:ue,vertOriginX:ue,vertOriginY:ue,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ue,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Ov}),Dv=Qs({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Pv=Qs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Iv}),Bv=Qs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),j0={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},U0=/[A-Z]/g,fg=/-[a-z]/g,H0=/^data[-\w.:]+$/i;function $0(e,t){const n=Gh(t);let r=t,o=In;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&H0.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(fg,K0);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!fg.test(a)){let l=a.replace(U0,W0);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}o=Yd}return new o(r,t)}function W0(e){return"-"+e.toLowerCase()}function K0(e){return e.charAt(1).toUpperCase()}const q0=Av([Lv,F0,Dv,Pv,Bv],"html"),Xd=Av([Lv,z0,Dv,Pv,Bv],"svg");function V0(e){return e.join(" ").trim()}var js={},hh,pg;function G0(){if(pg)return hh;pg=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,u=/^\s+|\s+$/g,d=`
42
42
  `,h="/",m="*",p="",v="comment",b="declaration";function S(N,C){if(typeof N!="string")throw new TypeError("First argument must be a string");if(!N)return[];C=C||{};var M=1,T=1;function A(W){var P=W.match(t);P&&(M+=P.length);var Q=W.lastIndexOf(d);T=~Q?W.length-Q:T+W.length}function V(){var W={line:M,column:T};return function(P){return P.position=new O(W),te(),P}}function O(W){this.start=W,this.end={line:M,column:T},this.source=C.source}O.prototype.content=N;function ne(W){var P=new Error(C.source+":"+M+":"+T+": "+W);if(P.reason=W,P.filename=C.source,P.line=M,P.column=T,P.source=N,!C.silent)throw P}function Z(W){var P=W.exec(N);if(P){var Q=P[0];return A(Q),N=N.slice(Q.length),P}}function te(){Z(n)}function $(W){var P;for(W=W||[];P=D();)P!==!1&&W.push(P);return W}function D(){var W=V();if(!(h!=N.charAt(0)||m!=N.charAt(1))){for(var P=2;p!=N.charAt(P)&&(m!=N.charAt(P)||h!=N.charAt(P+1));)++P;if(P+=2,p===N.charAt(P-1))return ne("End of comment missing");var Q=N.slice(2,P-2);return T+=2,A(Q),N=N.slice(P),T+=2,W({type:v,comment:Q})}}function H(){var W=V(),P=Z(r);if(P){if(D(),!Z(o))return ne("property missing ':'");var Q=Z(a),j=W({type:b,property:w(P[0].replace(e,p)),value:Q?w(Q[0].replace(e,p)):p});return Z(l),j}}function F(){var W=[];$(W);for(var P;P=H();)P!==!1&&(W.push(P),$(W));return W}return te(),F()}function w(N){return N?N.replace(u,p):p}return hh=S,hh}var mg;function Y0(){if(mg)return js;mg=1;var e=js&&js.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(js,"__esModule",{value:!0}),js.default=n;const t=e(G0());function n(r,o){let a=null;if(!r||typeof r!="string")return a;const l=(0,t.default)(r),u=typeof o=="function";return l.forEach(d=>{if(d.type!=="declaration")return;const{property:h,value:m}=d;u?o(h,m,d):m&&(a=a||{},a[h]=m)}),a}return js}var zo={},gg;function X0(){if(gg)return zo;gg=1,Object.defineProperty(zo,"__esModule",{value:!0}),zo.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,a=function(h){return!h||n.test(h)||e.test(h)},l=function(h,m){return m.toUpperCase()},u=function(h,m){return"".concat(m,"-")},d=function(h,m){return m===void 0&&(m={}),a(h)?h:(h=h.toLowerCase(),m.reactCompat?h=h.replace(o,u):h=h.replace(r,u),h.replace(t,l))};return zo.camelCase=d,zo}var jo,_g;function Z0(){if(_g)return jo;_g=1;var e=jo&&jo.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(Y0()),n=X0();function r(o,a){var l={};return!o||typeof o!="string"||(0,t.default)(o,function(u,d){u&&d&&(l[(0,n.camelCase)(u,a)]=d)}),l}return r.default=r,jo=r,jo}var Q0=Z0();const J0=pc(Q0),Fv=zv("end"),Zd=zv("start");function zv(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function ex(e){const t=Zd(e),n=Fv(e);if(t&&n)return{start:t,end:n}}function ra(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?vg(e.position):"start"in e||"end"in e?vg(e):"line"in e||"column"in e?Zh(e):""}function Zh(e){return yg(e&&e.line)+":"+yg(e&&e.column)}function vg(e){return Zh(e&&e.start)+"-"+Zh(e&&e.end)}function yg(e){return e&&typeof e=="number"?e:1}class mn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",a={},l=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?o=t:!a.cause&&t&&(l=!0,o=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const u=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=u?u.line:void 0,this.name=ra(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=l&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}mn.prototype.file="";mn.prototype.name="";mn.prototype.reason="";mn.prototype.message="";mn.prototype.stack="";mn.prototype.column=void 0;mn.prototype.line=void 0;mn.prototype.ancestors=void 0;mn.prototype.cause=void 0;mn.prototype.fatal=void 0;mn.prototype.place=void 0;mn.prototype.ruleId=void 0;mn.prototype.source=void 0;const Qd={}.hasOwnProperty,tx=new Map,nx=/[A-Z]/g,ix=new Set(["table","tbody","thead","tfoot","tr"]),rx=new Set(["td","th"]),jv="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function sx(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=fx(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=dx(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Xd:q0,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Uv(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function Uv(e,t,n){if(t.type==="element")return ox(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return ax(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return cx(e,t,n);if(t.type==="mdxjsEsm")return lx(e,t);if(t.type==="root")return ux(e,t,n);if(t.type==="text")return hx(e,t)}function ox(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Xd,e.schema=o),e.ancestors.push(t);const a=$v(e,t.tagName,!1),l=px(e,t);let u=ef(e,t);return ix.has(t.tagName)&&(u=u.filter(function(d){return typeof d=="string"?!P0(d):!0})),Hv(e,l,a,t),Jd(l,u),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function ax(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}ca(e,t.position)}function lx(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ca(e,t.position)}function cx(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Xd,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:$v(e,t.name,!0),l=mx(e,t),u=ef(e,t);return Hv(e,l,a,t),Jd(l,u),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function ux(e,t,n){const r={};return Jd(r,ef(e,t)),e.create(t,e.Fragment,r,n)}function hx(e,t){return t.value}function Hv(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Jd(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function dx(e,t,n){return r;function r(o,a,l,u){const h=Array.isArray(l.children)?n:t;return u?h(a,l,u):h(a,l)}}function fx(e,t){return n;function n(r,o,a,l){const u=Array.isArray(a.children),d=Zd(r);return t(o,a,l,u,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function px(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Qd.call(t.properties,o)){const a=gx(e,o,t.properties[o]);if(a){const[l,u]=a;e.tableCellAlignToStyle&&l==="align"&&typeof u=="string"&&rx.has(t.tagName)?r=u:n[l]=u}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function mx(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const l=a.expression;l.type;const u=l.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else ca(e,t.position);else{const o=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,a=e.evaluater.evaluateExpression(u.expression)}else ca(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function ef(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:tx;for(;++r<t.children.length;){const a=t.children[r];let l;if(e.passKeys){const d=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(d){const h=o.get(d)||0;l=d+"-"+h,o.set(d,h+1)}}const u=Uv(e,a,l);u!==void 0&&n.push(u)}return n}function gx(e,t,n){const r=$0(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?A0(n):V0(n)),r.property==="style"){let o=typeof n=="object"?n:_x(e,String(n));return e.stylePropertyNameCase==="css"&&(o=vx(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?j0[r.property]||r.property:r.attribute,n]}}function _x(e,t){try{return J0(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new mn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=jv+"#cannot-parse-style-attribute",o}}function $v(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let a=-1,l;for(;++a<o.length;){const u=ug(o[a])?{type:"Identifier",name:o[a]}:{type:"Literal",value:o[a]};l=l?{type:"MemberExpression",object:l,property:u,computed:!!(a&&u.type==="Literal"),optional:!1}:u}r=l}else r=ug(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Qd.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);ca(e)}function ca(e,t){const n=new mn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=jv+"#cannot-handle-mdx-estrees-without-createevaluater",n}function vx(e){const t={};let n;for(n in e)Qd.call(e,n)&&(t[yx(n)]=e[n]);return t}function yx(e){let t=e.replace(nx,bx);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function bx(e){return"-"+e.toLowerCase()}const dh={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Sx={};function tf(e,t){const n=Sx,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Wv(e,r,o)}function Wv(e,t,n){if(wx(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return bg(e.children,t,n)}return Array.isArray(e)?bg(e,t,n):""}function bg(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=Wv(e[o],t,n);return r.join("")}function wx(e){return!!(e&&typeof e=="object")}const Sg=document.createElement("i");function nf(e){const t="&"+e+";";Sg.innerHTML=t;const n=Sg.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Wn(e,t,n,r){const o=e.length;let a=0,l;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);a<r.length;)l=r.slice(a,a+1e4),l.unshift(t,0),e.splice(...l),a+=1e4,t+=1e4}function ri(e,t){return e.length>0?(Wn(e,e.length,0,t),e):t}const wg={}.hasOwnProperty;function Kv(e){const t={};let n=-1;for(;++n<e.length;)xx(t,e[n]);return t}function xx(e,t){let n;for(n in t){const o=(wg.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let l;if(a)for(l in a){wg.call(o,l)||(o[l]=[]);const u=a[l];kx(o[l],Array.isArray(u)?u:u?[u]:[])}}}function kx(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Wn(e,0,0,r)}function qv(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function _i(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const wn=Tr(/[A-Za-z]/),pn=Tr(/[\dA-Za-z]/),Ex=Tr(/[#-'*+\--9=?A-Z^-~]/);function nc(e){return e!==null&&(e<32||e===127)}const Qh=Tr(/\d/),Cx=Tr(/[\dA-Fa-f]/),Nx=Tr(/[!-/:-@[-`{-~]/);function Ie(e){return e!==null&&e<-2}function ct(e){return e!==null&&(e<0||e===32)}function Xe(e){return e===-2||e===-1||e===32}const gc=Tr(new RegExp("\\p{P}|\\p{S}","u")),as=Tr(/\s/);function Tr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Js(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let l="";if(a===37&&pn(e.charCodeAt(n+1))&&pn(e.charCodeAt(n+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(l=String.fromCharCode(a));else if(a>55295&&a<57344){const u=e.charCodeAt(n+1);a<56320&&u>56319&&u<57344?(l=String.fromCharCode(a,u),o=1):l="�"}else l=String.fromCharCode(a);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+o+1,l=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function tt(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let a=0;return l;function l(d){return Xe(d)?(e.enter(n),u(d)):t(d)}function u(d){return Xe(d)&&a++<o?(e.consume(d),u):(e.exit(n),t(d))}}const Tx={tokenize:Rx};function Rx(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),tt(e,t,"linePrefix")}function o(u){return e.enter("paragraph"),a(u)}function a(u){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,l(u)}function l(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return Ie(u)?(e.consume(u),e.exit("chunkText"),a):(e.consume(u),l)}}const Mx={tokenize:Ax},xg={tokenize:Lx};function Ax(e){const t=this,n=[];let r=0,o,a,l;return u;function u(T){if(r<n.length){const A=n[r];return t.containerState=A[1],e.attempt(A[0].continuation,d,h)(T)}return h(T)}function d(T){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&M();const A=t.events.length;let V=A,O;for(;V--;)if(t.events[V][0]==="exit"&&t.events[V][1].type==="chunkFlow"){O=t.events[V][1].end;break}C(r);let ne=A;for(;ne<t.events.length;)t.events[ne][1].end={...O},ne++;return Wn(t.events,V+1,0,t.events.slice(A)),t.events.length=ne,h(T)}return u(T)}function h(T){if(r===n.length){if(!o)return v(T);if(o.currentConstruct&&o.currentConstruct.concrete)return S(T);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(xg,m,p)(T)}function m(T){return o&&M(),C(r),v(T)}function p(T){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,S(T)}function v(T){return t.containerState={},e.attempt(xg,b,S)(T)}function b(T){return r++,n.push([t.currentConstruct,t.containerState]),v(T)}function S(T){if(T===null){o&&M(),C(0),e.consume(T);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:a}),w(T)}function w(T){if(T===null){N(e.exit("chunkFlow"),!0),C(0),e.consume(T);return}return Ie(T)?(e.consume(T),N(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(T),w)}function N(T,A){const V=t.sliceStream(T);if(A&&V.push(null),T.previous=a,a&&(a.next=T),a=T,o.defineSkip(T.start),o.write(V),t.parser.lazy[T.start.line]){let O=o.events.length;for(;O--;)if(o.events[O][1].start.offset<l&&(!o.events[O][1].end||o.events[O][1].end.offset>l))return;const ne=t.events.length;let Z=ne,te,$;for(;Z--;)if(t.events[Z][0]==="exit"&&t.events[Z][1].type==="chunkFlow"){if(te){$=t.events[Z][1].end;break}te=!0}for(C(r),O=ne;O<t.events.length;)t.events[O][1].end={...$},O++;Wn(t.events,Z+1,0,t.events.slice(ne)),t.events.length=O}}function C(T){let A=n.length;for(;A-- >T;){const V=n[A];t.containerState=V[1],V[0].exit.call(t,e)}n.length=T}function M(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function Lx(e,t,n){return tt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ys(e){if(e===null||ct(e)||as(e))return 1;if(gc(e))return 2}function _c(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const a=e[o].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Jh={name:"attention",resolveAll:Ox,tokenize:Ix};function Ox(e,t){let n=-1,r,o,a,l,u,d,h,m;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const p={...e[r][1].end},v={...e[n][1].start};kg(p,-d),kg(v,d),l={type:d>1?"strongSequence":"emphasisSequence",start:p,end:{...e[r][1].end}},u={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:v},a={type:d>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},o={type:d>1?"strong":"emphasis",start:{...l.start},end:{...u.end}},e[r][1].end={...l.start},e[n][1].start={...u.end},h=[],e[r][1].end.offset-e[r][1].start.offset&&(h=ri(h,[["enter",e[r][1],t],["exit",e[r][1],t]])),h=ri(h,[["enter",o,t],["enter",l,t],["exit",l,t],["enter",a,t]]),h=ri(h,_c(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),h=ri(h,[["exit",a,t],["enter",u,t],["exit",u,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,h=ri(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,Wn(e,r-1,n-r+3,h),n=r+h.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Ix(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=Ys(r);let a;return l;function l(d){return a=d,e.enter("attentionSequence"),u(d)}function u(d){if(d===a)return e.consume(d),u;const h=e.exit("attentionSequence"),m=Ys(d),p=!m||m===2&&o||n.includes(d),v=!o||o===2&&m||n.includes(r);return h._open=!!(a===42?p:p&&(o||!v)),h._close=!!(a===42?v:v&&(m||!p)),t(d)}}function kg(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Dx={name:"autolink",tokenize:Px};function Px(e,t,n){let r=0;return o;function o(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(b){return wn(b)?(e.consume(b),l):b===64?n(b):h(b)}function l(b){return b===43||b===45||b===46||pn(b)?(r=1,u(b)):h(b)}function u(b){return b===58?(e.consume(b),r=0,d):(b===43||b===45||b===46||pn(b))&&r++<32?(e.consume(b),u):(r=0,h(b))}function d(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):b===null||b===32||b===60||nc(b)?n(b):(e.consume(b),d)}function h(b){return b===64?(e.consume(b),m):Ex(b)?(e.consume(b),h):n(b)}function m(b){return pn(b)?p(b):n(b)}function p(b){return b===46?(e.consume(b),r=0,m):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):v(b)}function v(b){if((b===45||pn(b))&&r++<63){const S=b===45?v:p;return e.consume(b),S}return n(b)}}const ga={partial:!0,tokenize:Bx};function Bx(e,t,n){return r;function r(a){return Xe(a)?tt(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||Ie(a)?t(a):n(a)}}const Vv={continuation:{tokenize:zx},exit:jx,name:"blockQuote",tokenize:Fx};function Fx(e,t,n){const r=this;return o;function o(l){if(l===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),a}return n(l)}function a(l){return Xe(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function zx(e,t,n){const r=this;return o;function o(l){return Xe(l)?tt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):a(l)}function a(l){return e.attempt(Vv,t,n)(l)}}function jx(e){e.exit("blockQuote")}const Gv={name:"characterEscape",tokenize:Ux};function Ux(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),o}function o(a){return Nx(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Yv={name:"characterReference",tokenize:Hx};function Hx(e,t,n){const r=this;let o=0,a,l;return u;function u(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),d}function d(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),a=31,l=pn,m(p))}function h(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,l=Cx,m):(e.enter("characterReferenceValue"),a=7,l=Qh,m(p))}function m(p){if(p===59&&o){const v=e.exit("characterReferenceValue");return l===pn&&!nf(r.sliceSerialize(v))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(p)&&o++<a?(e.consume(p),m):n(p)}}const Eg={partial:!0,tokenize:Wx},Cg={concrete:!0,name:"codeFenced",tokenize:$x};function $x(e,t,n){const r=this,o={partial:!0,tokenize:V};let a=0,l=0,u;return d;function d(O){return h(O)}function h(O){const ne=r.events[r.events.length-1];return a=ne&&ne[1].type==="linePrefix"?ne[2].sliceSerialize(ne[1],!0).length:0,u=O,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(O)}function m(O){return O===u?(l++,e.consume(O),m):l<3?n(O):(e.exit("codeFencedFenceSequence"),Xe(O)?tt(e,p,"whitespace")(O):p(O))}function p(O){return O===null||Ie(O)?(e.exit("codeFencedFence"),r.interrupt?t(O):e.check(Eg,w,A)(O)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(O))}function v(O){return O===null||Ie(O)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(O)):Xe(O)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),tt(e,b,"whitespace")(O)):O===96&&O===u?n(O):(e.consume(O),v)}function b(O){return O===null||Ie(O)?p(O):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(O))}function S(O){return O===null||Ie(O)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(O)):O===96&&O===u?n(O):(e.consume(O),S)}function w(O){return e.attempt(o,A,N)(O)}function N(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),C}function C(O){return a>0&&Xe(O)?tt(e,M,"linePrefix",a+1)(O):M(O)}function M(O){return O===null||Ie(O)?e.check(Eg,w,A)(O):(e.enter("codeFlowValue"),T(O))}function T(O){return O===null||Ie(O)?(e.exit("codeFlowValue"),M(O)):(e.consume(O),T)}function A(O){return e.exit("codeFenced"),t(O)}function V(O,ne,Z){let te=0;return $;function $(P){return O.enter("lineEnding"),O.consume(P),O.exit("lineEnding"),D}function D(P){return O.enter("codeFencedFence"),Xe(P)?tt(O,H,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):H(P)}function H(P){return P===u?(O.enter("codeFencedFenceSequence"),F(P)):Z(P)}function F(P){return P===u?(te++,O.consume(P),F):te>=l?(O.exit("codeFencedFenceSequence"),Xe(P)?tt(O,W,"whitespace")(P):W(P)):Z(P)}function W(P){return P===null||Ie(P)?(O.exit("codeFencedFence"),ne(P)):Z(P)}}}function Wx(e,t,n){const r=this;return o;function o(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a)}function a(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const fh={name:"codeIndented",tokenize:qx},Kx={partial:!0,tokenize:Vx};function qx(e,t,n){const r=this;return o;function o(h){return e.enter("codeIndented"),tt(e,a,"linePrefix",5)(h)}function a(h){const m=r.events[r.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?l(h):n(h)}function l(h){return h===null?d(h):Ie(h)?e.attempt(Kx,l,d)(h):(e.enter("codeFlowValue"),u(h))}function u(h){return h===null||Ie(h)?(e.exit("codeFlowValue"),l(h)):(e.consume(h),u)}function d(h){return e.exit("codeIndented"),t(h)}}function Vx(e,t,n){const r=this;return o;function o(l){return r.parser.lazy[r.now().line]?n(l):Ie(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):tt(e,a,"linePrefix",5)(l)}function a(l){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(l):Ie(l)?o(l):n(l)}}const Gx={name:"codeText",previous:Xx,resolve:Yx,tokenize:Zx};function Yx(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function Xx(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Zx(e,t,n){let r=0,o,a;return l;function l(p){return e.enter("codeText"),e.enter("codeTextSequence"),u(p)}function u(p){return p===96?(e.consume(p),r++,u):(e.exit("codeTextSequence"),d(p))}function d(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),d):p===96?(a=e.enter("codeTextSequence"),o=0,m(p)):Ie(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(p))}function h(p){return p===null||p===32||p===96||Ie(p)?(e.exit("codeTextData"),d(p)):(e.consume(p),h)}function m(p){return p===96?(e.consume(p),o++,m):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(a.type="codeTextData",h(p))}}class Qx{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&Uo(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Uo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Uo(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Uo(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Uo(this.left,n.reverse())}}}function Uo(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Xv(e){const t={};let n=-1,r,o,a,l,u,d,h;const m=new Qx(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(r=m.get(n),n&&r[1].type==="chunkFlow"&&m.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,a=0,a<d.length&&d[a][1].type==="lineEndingBlank"&&(a+=2),a<d.length&&d[a][1].type==="content"))for(;++a<d.length&&d[a][1].type!=="content";)d[a][1].type==="chunkText"&&(d[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Jx(m,n)),n=t[n],h=!0);else if(r[1]._container){for(a=n,o=void 0;a--;)if(l=m.get(a),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(o&&(m.get(o)[1].type="lineEndingBlank"),l[1].type="lineEnding",o=a);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;o&&(r[1].end={...m.get(o)[1].start},u=m.slice(o,n),u.unshift(r),m.splice(o,n-o+1,u))}}return Wn(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!h}function Jx(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const a=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const u=l.events,d=[],h={};let m,p,v=-1,b=n,S=0,w=0;const N=[w];for(;b;){for(;e.get(++o)[1]!==b;);a.push(o),b._tokenizer||(m=r.sliceStream(b),b.next||m.push(null),p&&l.defineSkip(b.start),b._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(m),b._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),p=b,b=b.next}for(b=n;++v<u.length;)u[v][0]==="exit"&&u[v-1][0]==="enter"&&u[v][1].type===u[v-1][1].type&&u[v][1].start.line!==u[v][1].end.line&&(w=v+1,N.push(w),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(l.events=[],b?(b._tokenizer=void 0,b.previous=void 0):N.pop(),v=N.length;v--;){const C=u.slice(N[v],N[v+1]),M=a.pop();d.push([M,M+C.length-1]),e.splice(M,2,C)}for(d.reverse(),v=-1;++v<d.length;)h[S+d[v][0]]=S+d[v][1],S+=d[v][1]-d[v][0]-1;return h}const ek={resolve:nk,tokenize:ik},tk={partial:!0,tokenize:rk};function nk(e){return Xv(e),e}function ik(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(u)}function o(u){return u===null?a(u):Ie(u)?e.check(tk,l,a)(u):(e.consume(u),o)}function a(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function l(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function rk(e,t,n){const r=this;return o;function o(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),tt(e,a,"linePrefix")}function a(l){if(l===null||Ie(l))return n(l);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function Zv(e,t,n,r,o,a,l,u,d){const h=d||Number.POSITIVE_INFINITY;let m=0;return p;function p(C){return C===60?(e.enter(r),e.enter(o),e.enter(a),e.consume(C),e.exit(a),v):C===null||C===32||C===41||nc(C)?n(C):(e.enter(r),e.enter(l),e.enter(u),e.enter("chunkString",{contentType:"string"}),w(C))}function v(C){return C===62?(e.enter(a),e.consume(C),e.exit(a),e.exit(o),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),b(C))}function b(C){return C===62?(e.exit("chunkString"),e.exit(u),v(C)):C===null||C===60||Ie(C)?n(C):(e.consume(C),C===92?S:b)}function S(C){return C===60||C===62||C===92?(e.consume(C),b):b(C)}function w(C){return!m&&(C===null||C===41||ct(C))?(e.exit("chunkString"),e.exit(u),e.exit(l),e.exit(r),t(C)):m<h&&C===40?(e.consume(C),m++,w):C===41?(e.consume(C),m--,w):C===null||C===32||C===40||nc(C)?n(C):(e.consume(C),C===92?N:w)}function N(C){return C===40||C===41||C===92?(e.consume(C),w):w(C)}}function Qv(e,t,n,r,o,a){const l=this;let u=0,d;return h;function h(b){return e.enter(r),e.enter(o),e.consume(b),e.exit(o),e.enter(a),m}function m(b){return u>999||b===null||b===91||b===93&&!d||b===94&&!u&&"_hiddenFootnoteSupport"in l.parser.constructs?n(b):b===93?(e.exit(a),e.enter(o),e.consume(b),e.exit(o),e.exit(r),t):Ie(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===null||b===91||b===93||Ie(b)||u++>999?(e.exit("chunkString"),m(b)):(e.consume(b),d||(d=!Xe(b)),b===92?v:p)}function v(b){return b===91||b===92||b===93?(e.consume(b),u++,p):p(b)}}function Jv(e,t,n,r,o,a){let l;return u;function u(v){return v===34||v===39||v===40?(e.enter(r),e.enter(o),e.consume(v),e.exit(o),l=v===40?41:v,d):n(v)}function d(v){return v===l?(e.enter(o),e.consume(v),e.exit(o),e.exit(r),t):(e.enter(a),h(v))}function h(v){return v===l?(e.exit(a),d(l)):v===null?n(v):Ie(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),tt(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(v))}function m(v){return v===l||v===null||Ie(v)?(e.exit("chunkString"),h(v)):(e.consume(v),v===92?p:m)}function p(v){return v===l||v===92?(e.consume(v),m):m(v)}}function sa(e,t){let n;return r;function r(o){return Ie(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Xe(o)?tt(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const sk={name:"definition",tokenize:ak},ok={partial:!0,tokenize:lk};function ak(e,t,n){const r=this;let o;return a;function a(b){return e.enter("definition"),l(b)}function l(b){return Qv.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function u(b){return o=_i(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),d):n(b)}function d(b){return ct(b)?sa(e,h)(b):h(b)}function h(b){return Zv(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function m(b){return e.attempt(ok,p,p)(b)}function p(b){return Xe(b)?tt(e,v,"whitespace")(b):v(b)}function v(b){return b===null||Ie(b)?(e.exit("definition"),r.parser.defined.push(o),t(b)):n(b)}}function lk(e,t,n){return r;function r(u){return ct(u)?sa(e,o)(u):n(u)}function o(u){return Jv(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function a(u){return Xe(u)?tt(e,l,"whitespace")(u):l(u)}function l(u){return u===null||Ie(u)?t(u):n(u)}}const ck={name:"hardBreakEscape",tokenize:uk};function uk(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return Ie(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const hk={name:"headingAtx",resolve:dk,tokenize:fk};function dk(e,t){let n=e.length-2,r=3,o,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Wn(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function fk(e,t,n){let r=0;return o;function o(m){return e.enter("atxHeading"),a(m)}function a(m){return e.enter("atxHeadingSequence"),l(m)}function l(m){return m===35&&r++<6?(e.consume(m),l):m===null||ct(m)?(e.exit("atxHeadingSequence"),u(m)):n(m)}function u(m){return m===35?(e.enter("atxHeadingSequence"),d(m)):m===null||Ie(m)?(e.exit("atxHeading"),t(m)):Xe(m)?tt(e,u,"whitespace")(m):(e.enter("atxHeadingText"),h(m))}function d(m){return m===35?(e.consume(m),d):(e.exit("atxHeadingSequence"),u(m))}function h(m){return m===null||m===35||ct(m)?(e.exit("atxHeadingText"),u(m)):(e.consume(m),h)}}const pk=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Ng=["pre","script","style","textarea"],mk={concrete:!0,name:"htmlFlow",resolveTo:vk,tokenize:yk},gk={partial:!0,tokenize:Sk},_k={partial:!0,tokenize:bk};function vk(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function yk(e,t,n){const r=this;let o,a,l,u,d;return h;function h(x){return m(x)}function m(x){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(x),p}function p(x){return x===33?(e.consume(x),v):x===47?(e.consume(x),a=!0,w):x===63?(e.consume(x),o=3,r.interrupt?t:k):wn(x)?(e.consume(x),l=String.fromCharCode(x),N):n(x)}function v(x){return x===45?(e.consume(x),o=2,b):x===91?(e.consume(x),o=5,u=0,S):wn(x)?(e.consume(x),o=4,r.interrupt?t:k):n(x)}function b(x){return x===45?(e.consume(x),r.interrupt?t:k):n(x)}function S(x){const re="CDATA[";return x===re.charCodeAt(u++)?(e.consume(x),u===re.length?r.interrupt?t:H:S):n(x)}function w(x){return wn(x)?(e.consume(x),l=String.fromCharCode(x),N):n(x)}function N(x){if(x===null||x===47||x===62||ct(x)){const re=x===47,ge=l.toLowerCase();return!re&&!a&&Ng.includes(ge)?(o=1,r.interrupt?t(x):H(x)):pk.includes(l.toLowerCase())?(o=6,re?(e.consume(x),C):r.interrupt?t(x):H(x)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(x):a?M(x):T(x))}return x===45||pn(x)?(e.consume(x),l+=String.fromCharCode(x),N):n(x)}function C(x){return x===62?(e.consume(x),r.interrupt?t:H):n(x)}function M(x){return Xe(x)?(e.consume(x),M):$(x)}function T(x){return x===47?(e.consume(x),$):x===58||x===95||wn(x)?(e.consume(x),A):Xe(x)?(e.consume(x),T):$(x)}function A(x){return x===45||x===46||x===58||x===95||pn(x)?(e.consume(x),A):V(x)}function V(x){return x===61?(e.consume(x),O):Xe(x)?(e.consume(x),V):T(x)}function O(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),d=x,ne):Xe(x)?(e.consume(x),O):Z(x)}function ne(x){return x===d?(e.consume(x),d=null,te):x===null||Ie(x)?n(x):(e.consume(x),ne)}function Z(x){return x===null||x===34||x===39||x===47||x===60||x===61||x===62||x===96||ct(x)?V(x):(e.consume(x),Z)}function te(x){return x===47||x===62||Xe(x)?T(x):n(x)}function $(x){return x===62?(e.consume(x),D):n(x)}function D(x){return x===null||Ie(x)?H(x):Xe(x)?(e.consume(x),D):n(x)}function H(x){return x===45&&o===2?(e.consume(x),Q):x===60&&o===1?(e.consume(x),j):x===62&&o===4?(e.consume(x),R):x===63&&o===3?(e.consume(x),k):x===93&&o===5?(e.consume(x),J):Ie(x)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(gk,q,F)(x)):x===null||Ie(x)?(e.exit("htmlFlowData"),F(x)):(e.consume(x),H)}function F(x){return e.check(_k,W,q)(x)}function W(x){return e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),P}function P(x){return x===null||Ie(x)?F(x):(e.enter("htmlFlowData"),H(x))}function Q(x){return x===45?(e.consume(x),k):H(x)}function j(x){return x===47?(e.consume(x),l="",I):H(x)}function I(x){if(x===62){const re=l.toLowerCase();return Ng.includes(re)?(e.consume(x),R):H(x)}return wn(x)&&l.length<8?(e.consume(x),l+=String.fromCharCode(x),I):H(x)}function J(x){return x===93?(e.consume(x),k):H(x)}function k(x){return x===62?(e.consume(x),R):x===45&&o===2?(e.consume(x),k):H(x)}function R(x){return x===null||Ie(x)?(e.exit("htmlFlowData"),q(x)):(e.consume(x),R)}function q(x){return e.exit("htmlFlow"),t(x)}}function bk(e,t,n){const r=this;return o;function o(l){return Ie(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):n(l)}function a(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function Sk(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(ga,t,n)}}const wk={name:"htmlText",tokenize:xk};function xk(e,t,n){const r=this;let o,a,l;return u;function u(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),d}function d(k){return k===33?(e.consume(k),h):k===47?(e.consume(k),V):k===63?(e.consume(k),T):wn(k)?(e.consume(k),Z):n(k)}function h(k){return k===45?(e.consume(k),m):k===91?(e.consume(k),a=0,S):wn(k)?(e.consume(k),M):n(k)}function m(k){return k===45?(e.consume(k),b):n(k)}function p(k){return k===null?n(k):k===45?(e.consume(k),v):Ie(k)?(l=p,j(k)):(e.consume(k),p)}function v(k){return k===45?(e.consume(k),b):p(k)}function b(k){return k===62?Q(k):k===45?v(k):p(k)}function S(k){const R="CDATA[";return k===R.charCodeAt(a++)?(e.consume(k),a===R.length?w:S):n(k)}function w(k){return k===null?n(k):k===93?(e.consume(k),N):Ie(k)?(l=w,j(k)):(e.consume(k),w)}function N(k){return k===93?(e.consume(k),C):w(k)}function C(k){return k===62?Q(k):k===93?(e.consume(k),C):w(k)}function M(k){return k===null||k===62?Q(k):Ie(k)?(l=M,j(k)):(e.consume(k),M)}function T(k){return k===null?n(k):k===63?(e.consume(k),A):Ie(k)?(l=T,j(k)):(e.consume(k),T)}function A(k){return k===62?Q(k):T(k)}function V(k){return wn(k)?(e.consume(k),O):n(k)}function O(k){return k===45||pn(k)?(e.consume(k),O):ne(k)}function ne(k){return Ie(k)?(l=ne,j(k)):Xe(k)?(e.consume(k),ne):Q(k)}function Z(k){return k===45||pn(k)?(e.consume(k),Z):k===47||k===62||ct(k)?te(k):n(k)}function te(k){return k===47?(e.consume(k),Q):k===58||k===95||wn(k)?(e.consume(k),$):Ie(k)?(l=te,j(k)):Xe(k)?(e.consume(k),te):Q(k)}function $(k){return k===45||k===46||k===58||k===95||pn(k)?(e.consume(k),$):D(k)}function D(k){return k===61?(e.consume(k),H):Ie(k)?(l=D,j(k)):Xe(k)?(e.consume(k),D):te(k)}function H(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),o=k,F):Ie(k)?(l=H,j(k)):Xe(k)?(e.consume(k),H):(e.consume(k),W)}function F(k){return k===o?(e.consume(k),o=void 0,P):k===null?n(k):Ie(k)?(l=F,j(k)):(e.consume(k),F)}function W(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||ct(k)?te(k):(e.consume(k),W)}function P(k){return k===47||k===62||ct(k)?te(k):n(k)}function Q(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function j(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),I}function I(k){return Xe(k)?tt(e,J,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):J(k)}function J(k){return e.enter("htmlTextData"),l(k)}}const rf={name:"labelEnd",resolveAll:Nk,resolveTo:Tk,tokenize:Rk},kk={tokenize:Mk},Ek={tokenize:Ak},Ck={tokenize:Lk};function Nk(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&Wn(e,0,e.length,n),e}function Tk(e,t){let n=e.length,r=0,o,a,l,u;for(;n--;)if(o=e[n][1],a){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(a=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(l=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[a][1].start},end:{...e[l][1].end}},m={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[l-2][1].start}};return u=[["enter",d,t],["enter",h,t]],u=ri(u,e.slice(a+1,a+r+3)),u=ri(u,[["enter",m,t]]),u=ri(u,_c(t.parser.constructs.insideSpan.null,e.slice(a+r+4,l-3),t)),u=ri(u,[["exit",m,t],e[l-2],e[l-1],["exit",h,t]]),u=ri(u,e.slice(l+1)),u=ri(u,[["exit",d,t]]),Wn(e,a,e.length,u),e}function Rk(e,t,n){const r=this;let o=r.events.length,a,l;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){a=r.events[o][1];break}return u;function u(v){return a?a._inactive?p(v):(l=r.parser.defined.includes(_i(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(v),e.exit("labelMarker"),e.exit("labelEnd"),d):n(v)}function d(v){return v===40?e.attempt(kk,m,l?m:p)(v):v===91?e.attempt(Ek,m,l?h:p)(v):l?m(v):p(v)}function h(v){return e.attempt(Ck,m,p)(v)}function m(v){return t(v)}function p(v){return a._balanced=!0,n(v)}}function Mk(e,t,n){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),o}function o(p){return ct(p)?sa(e,a)(p):a(p)}function a(p){return p===41?m(p):Zv(e,l,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function l(p){return ct(p)?sa(e,d)(p):m(p)}function u(p){return n(p)}function d(p){return p===34||p===39||p===40?Jv(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):m(p)}function h(p){return ct(p)?sa(e,m)(p):m(p)}function m(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function Ak(e,t,n){const r=this;return o;function o(u){return Qv.call(r,e,a,l,"reference","referenceMarker","referenceString")(u)}function a(u){return r.parser.defined.includes(_i(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function l(u){return n(u)}}function Lk(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),o}function o(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const Ok={name:"labelStartImage",resolveAll:rf.resolveAll,tokenize:Ik};function Ik(e,t,n){const r=this;return o;function o(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),a}function a(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),l):n(u)}function l(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const Dk={name:"labelStartLink",resolveAll:rf.resolveAll,tokenize:Pk};function Pk(e,t,n){const r=this;return o;function o(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),a}function a(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const ph={name:"lineEnding",tokenize:Bk};function Bk(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),tt(e,t,"linePrefix")}}const ql={name:"thematicBreak",tokenize:Fk};function Fk(e,t,n){let r=0,o;return a;function a(h){return e.enter("thematicBreak"),l(h)}function l(h){return o=h,u(h)}function u(h){return h===o?(e.enter("thematicBreakSequence"),d(h)):r>=3&&(h===null||Ie(h))?(e.exit("thematicBreak"),t(h)):n(h)}function d(h){return h===o?(e.consume(h),r++,d):(e.exit("thematicBreakSequence"),Xe(h)?tt(e,u,"whitespace")(h):u(h))}}const On={continuation:{tokenize:Hk},exit:Wk,name:"list",tokenize:Uk},zk={partial:!0,tokenize:Kk},jk={partial:!0,tokenize:$k};function Uk(e,t,n){const r=this,o=r.events[r.events.length-1];let a=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,l=0;return u;function u(b){const S=r.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!r.containerState.marker||b===r.containerState.marker:Qh(b)){if(r.containerState.type||(r.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(ql,n,h)(b):h(b);if(!r.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(b)}return n(b)}function d(b){return Qh(b)&&++l<10?(e.consume(b),d):(!r.interrupt||l<2)&&(r.containerState.marker?b===r.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),h(b)):n(b)}function h(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||b,e.check(ga,r.interrupt?n:m,e.attempt(zk,v,p))}function m(b){return r.containerState.initialBlankLine=!0,a++,v(b)}function p(b){return Xe(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),v):n(b)}function v(b){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(b)}}function Hk(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ga,o,a);function o(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,tt(e,t,"listItemIndent",r.containerState.size+1)(u)}function a(u){return r.containerState.furtherBlankLines||!Xe(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(jk,t,l)(u))}function l(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,tt(e,e.attempt(On,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function $k(e,t,n){const r=this;return tt(e,o,"listItemIndent",r.containerState.size+1);function o(a){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(a):n(a)}}function Wk(e){e.exit(this.containerState.type)}function Kk(e,t,n){const r=this;return tt(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(a){const l=r.events[r.events.length-1];return!Xe(a)&&l&&l[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const Tg={name:"setextUnderline",resolveTo:qk,tokenize:Vk};function qk(e,t){let n=e.length,r,o,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",a?(e.splice(o,0,["enter",l,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function Vk(e,t,n){const r=this;let o;return a;function a(h){let m=r.events.length,p;for(;m--;)if(r.events[m][1].type!=="lineEnding"&&r.events[m][1].type!=="linePrefix"&&r.events[m][1].type!=="content"){p=r.events[m][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),o=h,l(h)):n(h)}function l(h){return e.enter("setextHeadingLineSequence"),u(h)}function u(h){return h===o?(e.consume(h),u):(e.exit("setextHeadingLineSequence"),Xe(h)?tt(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||Ie(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const Gk={tokenize:Yk};function Yk(e){const t=this,n=e.attempt(ga,r,e.attempt(this.parser.constructs.flowInitial,o,tt(e,e.attempt(this.parser.constructs.flow,o,e.attempt(ek,o)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Xk={resolveAll:ty()},Zk=ey("string"),Qk=ey("text");function ey(e){return{resolveAll:ty(e==="text"?Jk:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],a=n.attempt(o,l,u);return l;function l(m){return h(m)?a(m):u(m)}function u(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),d}function d(m){return h(m)?(n.exit("data"),a(m)):(n.consume(m),d)}function h(m){if(m===null)return!0;const p=o[m];let v=-1;if(p)for(;++v<p.length;){const b=p[v];if(!b.previous||b.previous.call(r,r.previous))return!0}return!1}}}function ty(e){return t;function t(n,r){let o=-1,a;for(;++o<=n.length;)a===void 0?n[o]&&n[o][1].type==="data"&&(a=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==a+2&&(n[a][1].end=n[o-1][1].end,n.splice(a+2,o-a-2),o=a+2),a=void 0);return e?e(n,r):n}}function Jk(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let a=o.length,l=-1,u=0,d;for(;a--;){const h=o[a];if(typeof h=="string"){for(l=h.length;h.charCodeAt(l-1)===32;)u++,l--;if(l)break;l=-1}else if(h===-2)d=!0,u++;else if(h!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const h={type:n===e.length||d||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?l:r.start._bufferIndex+l,_index:r.start._index+a,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...h.start},r.start.offset===r.end.offset?Object.assign(r,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const e1={42:On,43:On,45:On,48:On,49:On,50:On,51:On,52:On,53:On,54:On,55:On,56:On,57:On,62:Vv},t1={91:sk},n1={[-2]:fh,[-1]:fh,32:fh},i1={35:hk,42:ql,45:[Tg,ql],60:mk,61:Tg,95:ql,96:Cg,126:Cg},r1={38:Yv,92:Gv},s1={[-5]:ph,[-4]:ph,[-3]:ph,33:Ok,38:Yv,42:Jh,60:[Dx,wk],91:Dk,92:[ck,Gv],93:rf,95:Jh,96:Gx},o1={null:[Jh,Xk]},a1={null:[42,95]},l1={null:[]},c1=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:a1,contentInitial:t1,disable:l1,document:e1,flow:i1,flowInitial:n1,insideSpan:o1,string:r1,text:s1},Symbol.toStringTag,{value:"Module"}));function u1(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},a=[];let l=[],u=[];const d={attempt:ne(V),check:ne(O),consume:M,enter:T,exit:A,interrupt:ne(O,{interrupt:!0})},h={code:null,containerState:{},defineSkip:w,events:[],now:S,parser:e,previous:null,sliceSerialize:v,sliceStream:b,write:p};let m=t.tokenize.call(h,d);return t.resolveAll&&a.push(t),h;function p(D){return l=ri(l,D),N(),l[l.length-1]!==null?[]:(Z(t,0),h.events=_c(a,h.events,h),h.events)}function v(D,H){return d1(b(D),H)}function b(D){return h1(l,D)}function S(){const{_bufferIndex:D,_index:H,line:F,column:W,offset:P}=r;return{_bufferIndex:D,_index:H,line:F,column:W,offset:P}}function w(D){o[D.line]=D.column,$()}function N(){let D;for(;r._index<l.length;){const H=l[r._index];if(typeof H=="string")for(D=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===D&&r._bufferIndex<H.length;)C(H.charCodeAt(r._bufferIndex));else C(H)}}function C(D){m=m(D)}function M(D){Ie(D)?(r.line++,r.column=1,r.offset+=D===-3?2:1,$()):D!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=D}function T(D,H){const F=H||{};return F.type=D,F.start=S(),h.events.push(["enter",F,h]),u.push(F),F}function A(D){const H=u.pop();return H.end=S(),h.events.push(["exit",H,h]),H}function V(D,H){Z(D,H.from)}function O(D,H){H.restore()}function ne(D,H){return F;function F(W,P,Q){let j,I,J,k;return Array.isArray(W)?q(W):"tokenize"in W?q([W]):R(W);function R(ae){return Se;function Se(Te){const je=Te!==null&&ae[Te],Me=Te!==null&&ae.null,zt=[...Array.isArray(je)?je:je?[je]:[],...Array.isArray(Me)?Me:Me?[Me]:[]];return q(zt)(Te)}}function q(ae){return j=ae,I=0,ae.length===0?Q:x(ae[I])}function x(ae){return Se;function Se(Te){return k=te(),J=ae,ae.partial||(h.currentConstruct=ae),ae.name&&h.parser.constructs.disable.null.includes(ae.name)?ge():ae.tokenize.call(H?Object.assign(Object.create(h),H):h,d,re,ge)(Te)}}function re(ae){return D(J,k),P}function ge(ae){return k.restore(),++I<j.length?x(j[I]):Q}}}function Z(D,H){D.resolveAll&&!a.includes(D)&&a.push(D),D.resolve&&Wn(h.events,H,h.events.length-H,D.resolve(h.events.slice(H),h)),D.resolveTo&&(h.events=D.resolveTo(h.events,h))}function te(){const D=S(),H=h.previous,F=h.currentConstruct,W=h.events.length,P=Array.from(u);return{from:W,restore:Q};function Q(){r=D,h.previous=H,h.currentConstruct=F,h.events.length=W,u=P,$()}}function $(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function h1(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;let l;if(n===o)l=[e[n].slice(r,a)];else{if(l=e.slice(n,o),r>-1){const u=l[0];typeof u=="string"?l[0]=u.slice(r):l.shift()}a>0&&l.push(e[o].slice(0,a))}return l}function d1(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const a=e[n];let l;if(typeof a=="string")l=a;else switch(a){case-5:{l="\r";break}case-4:{l=`
43
43
  `;break}case-3:{l=`\r
@@ -6,7 +6,7 @@
6
6
  <meta name="color-scheme" content="dark" />
7
7
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
8
8
  <title>pi-web-ui — pi 编码智能体</title>
9
- <script type="module" crossorigin src="/assets/index-CqoLzUOT.js"></script>
9
+ <script type="module" crossorigin src="/assets/index-HKKXtrGa.js"></script>
10
10
  <link rel="stylesheet" crossorigin href="/assets/index-CdMheYs9.css">
11
11
  </head>
12
12
  <body>