volute 0.13.2 → 0.14.0

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.
Files changed (94) hide show
  1. package/dist/{channel-JZJJRRWT.js → channel-SLURLIRV.js} +28 -28
  2. package/dist/{chunk-KRJ6KCBI.js → chunk-2Y77MCFG.js} +3 -3
  3. package/dist/{chunk-AA5TDLXB.js → chunk-3FC42ZBM.js} +24 -24
  4. package/dist/{chunk-YYUSXARD.js → chunk-6BDNWYKG.js} +2 -2
  5. package/dist/{chunk-KN4WBLH2.js → chunk-GR3OG4QK.js} +2 -2
  6. package/dist/{chunk-FE5O5RSL.js → chunk-GSPWIM5E.js} +25 -25
  7. package/dist/{chunk-QRRXD2V7.js → chunk-J52CJCVI.js} +71 -69
  8. package/dist/{chunk-LGSW7T7K.js → chunk-M77QBTEH.js} +60 -57
  9. package/dist/{chunk-KXOFPDO6.js → chunk-MVSXRMJJ.js} +1 -1
  10. package/dist/chunk-NAOW2CLO.js +15 -0
  11. package/dist/{chunk-VQIJUR43.js → chunk-OJQ47SCA.js} +1 -1
  12. package/dist/{chunk-O4BN3ZIY.js → chunk-OYSZNX5I.js} +7 -7
  13. package/dist/{chunk-AOSGW3MX.js → chunk-PDLAZJGC.js} +28 -28
  14. package/dist/{chunk-XUA3JUFK.js → chunk-PO5Q2AYN.js} +2 -2
  15. package/dist/{chunk-6BQHEIDO.js → chunk-QJIIHU32.js} +2 -2
  16. package/dist/{chunk-NXT67PPK.js → chunk-ZCEYUUID.js} +19 -19
  17. package/dist/cli.js +42 -42
  18. package/dist/{connector-WFT5KK67.js → connector-JFAHYFQX.js} +21 -21
  19. package/dist/connectors/discord.js +7 -7
  20. package/dist/connectors/slack.js +7 -7
  21. package/dist/connectors/telegram.js +9 -9
  22. package/dist/{create-HT47ZH5T.js → create-ZWHCRT5F.js} +7 -7
  23. package/dist/{daemon-client-DEF7IFEJ.js → daemon-client-ODKDUYDE.js} +2 -2
  24. package/dist/{daemon-restart-P3FEE3QJ.js → daemon-restart-KNJHZ7FP.js} +6 -6
  25. package/dist/daemon.js +2281 -1998
  26. package/dist/{delete-YG3RVURA.js → delete-6G6WEX4F.js} +8 -8
  27. package/dist/down-A56B5JLK.js +14 -0
  28. package/dist/{env-BQYYF4YL.js → env-6LXDUZDA.js} +25 -25
  29. package/dist/{history-I4KIKIUX.js → history-LKCJJMUV.js} +7 -7
  30. package/dist/{import-UHCK6PRC.js → import-EDGRLIGO.js} +3 -3
  31. package/dist/{logs-2DWFES6A.js → logs-GYOR3L2L.js} +8 -8
  32. package/dist/mind-OJN6RBZW.js +79 -0
  33. package/dist/mind-manager-PN5SUDJ4.js +15 -0
  34. package/dist/{package-MMTPOMUN.js → package-EYUA3AMC.js} +4 -4
  35. package/dist/{restart-6PE3GWYZ.js → restart-YFAWFS5T.js} +9 -9
  36. package/dist/{schedule-5AYTQM3N.js → schedule-AGYLDMNS.js} +17 -17
  37. package/dist/{seed-3QQVFMBU.js → seed-AP4Q7RZ7.js} +9 -9
  38. package/dist/{send-FPFW7J5Q.js → send-SV4K2TDE.js} +32 -24
  39. package/dist/{service-5X5EKPVM.js → service-U7MZ2H7F.js} +4 -4
  40. package/dist/{setup-5NXV25ZS.js → setup-DJKIZKGW.js} +21 -16
  41. package/dist/{sprout-VOUJ4Y3I.js → sprout-2V3MWONK.js} +18 -18
  42. package/dist/{start-ICPSQ2ZK.js → start-3YYRXBKP.js} +7 -7
  43. package/dist/{status-JBT7ENQN.js → status-VSFZYX7S.js} +14 -14
  44. package/dist/{stop-IXJGAG4T.js → stop-AA5K5LYG.js} +9 -9
  45. package/dist/{up-ROC7LJ7G.js → up-SUZ6C5PY.js} +5 -5
  46. package/dist/{update-GU6JYDSN.js → update-YAGN5ODG.js} +5 -5
  47. package/dist/{update-check-MUPZYTW4.js → update-check-APLTH4IN.js} +2 -2
  48. package/dist/{upgrade-275LKIEG.js → upgrade-KXZCQSZN.js} +8 -10
  49. package/dist/{variant-RE45F2IY.js → variant-X5QFG6KK.js} +30 -30
  50. package/dist/web-assets/assets/index-CeFLp8DZ.js +307 -0
  51. package/dist/web-assets/index.html +1 -1
  52. package/drizzle/0005_rename_agents_to_minds.sql +11 -0
  53. package/drizzle/meta/0005_snapshot.json +410 -0
  54. package/drizzle/meta/_journal.json +7 -0
  55. package/package.json +4 -4
  56. package/templates/_base/.init/.config/scripts/session-reader.ts +1 -1
  57. package/templates/_base/.init/SOUL.md +1 -1
  58. package/templates/_base/_skills/memory/SKILL.md +1 -1
  59. package/templates/_base/_skills/orientation/SKILL.md +6 -6
  60. package/templates/_base/_skills/sessions/SKILL.md +1 -1
  61. package/templates/_base/_skills/{volute-agent → volute-mind}/SKILL.md +21 -21
  62. package/templates/_base/home/VOLUTE.md +7 -7
  63. package/templates/_base/src/lib/auto-commit.ts +1 -1
  64. package/templates/_base/src/lib/auto-reply.ts +1 -1
  65. package/templates/_base/src/lib/daemon-client.ts +8 -8
  66. package/templates/_base/src/lib/router.ts +6 -6
  67. package/templates/_base/src/lib/routing.ts +9 -6
  68. package/templates/_base/src/lib/startup.ts +1 -1
  69. package/templates/_base/src/lib/volute-server.ts +1 -1
  70. package/templates/{agent-sdk → claude}/.init/CLAUDE.md +3 -3
  71. package/templates/{agent-sdk → claude}/src/agent.ts +10 -10
  72. package/templates/{agent-sdk → claude}/src/lib/hooks/pre-compact.ts +2 -2
  73. package/templates/{agent-sdk → claude}/src/lib/session-store.ts +2 -2
  74. package/templates/{agent-sdk → claude}/src/lib/stream-consumer.ts +1 -1
  75. package/templates/{agent-sdk → claude}/src/server.ts +4 -4
  76. package/templates/pi/.init/{AGENTS.md → MINDS.md} +3 -3
  77. package/templates/pi/home/.config/config.json.tmpl +1 -1
  78. package/templates/pi/src/agent.ts +12 -12
  79. package/templates/pi/src/lib/event-handler.ts +39 -4
  80. package/templates/pi/src/server.ts +3 -3
  81. package/dist/agent-IUSETOXJ.js +0 -79
  82. package/dist/agent-manager-4O4AC2S6.js +0 -15
  83. package/dist/chunk-AZEL2IEK.js +0 -15
  84. package/dist/down-36YCOZ7V.js +0 -14
  85. package/dist/web-assets/assets/index-TqXd1QOX.js +0 -307
  86. /package/templates/{agent-sdk → claude}/.init/.claude/settings.json +0 -0
  87. /package/templates/{agent-sdk → claude}/.init/.config/routes.json +0 -0
  88. /package/templates/{agent-sdk → claude}/package.json.tmpl +0 -0
  89. /package/templates/{agent-sdk → claude}/src/lib/content.ts +0 -0
  90. /package/templates/{agent-sdk → claude}/src/lib/hooks/auto-commit.ts +0 -0
  91. /package/templates/{agent-sdk → claude}/src/lib/hooks/identity-reload.ts +0 -0
  92. /package/templates/{agent-sdk → claude}/src/lib/hooks/session-context.ts +0 -0
  93. /package/templates/{agent-sdk → claude}/src/lib/message-channel.ts +0 -0
  94. /package/templates/{agent-sdk → claude}/volute-template.json +0 -0
@@ -0,0 +1,307 @@
1
+ (function(){const u=document.createElement("link").relList;if(u&&u.supports&&u.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))c(f);new MutationObserver(f=>{for(const p of f)if(p.type==="childList")for(const g of p.addedNodes)g.tagName==="LINK"&&g.rel==="modulepreload"&&c(g)}).observe(document,{childList:!0,subtree:!0});function s(f){const p={};return f.integrity&&(p.integrity=f.integrity),f.referrerPolicy&&(p.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?p.credentials="include":f.crossOrigin==="anonymous"?p.credentials="omit":p.credentials="same-origin",p}function c(f){if(f.ep)return;f.ep=!0;const p=s(f);fetch(f.href,p)}})();var Ts={exports:{}},Ei={};var Gh;function Im(){if(Gh)return Ei;Gh=1;var r=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function s(c,f,p){var g=null;if(p!==void 0&&(g=""+p),f.key!==void 0&&(g=""+f.key),"key"in f){p={};for(var T in f)T!=="key"&&(p[T]=f[T])}else p=f;return f=p.ref,{$$typeof:r,type:c,key:g,ref:f!==void 0?f:null,props:p}}return Ei.Fragment=u,Ei.jsx=s,Ei.jsxs=s,Ei}var Yh;function Pm(){return Yh||(Yh=1,Ts.exports=Im()),Ts.exports}var d=Pm(),Es={exports:{}},le={};var Xh;function ey(){if(Xh)return le;Xh=1;var r=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),p=Symbol.for("react.consumer"),g=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),A=Symbol.for("react.activity"),j=Symbol.iterator;function X(b){return b===null||typeof b!="object"?null:(b=j&&b[j]||b["@@iterator"],typeof b=="function"?b:null)}var Y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},q=Object.assign,I={};function ne(b,U,L){this.props=b,this.context=U,this.refs=I,this.updater=L||Y}ne.prototype.isReactComponent={},ne.prototype.setState=function(b,U){if(typeof b!="object"&&typeof b!="function"&&b!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,b,U,"setState")},ne.prototype.forceUpdate=function(b){this.updater.enqueueForceUpdate(this,b,"forceUpdate")};function $e(){}$e.prototype=ne.prototype;function Oe(b,U,L){this.props=b,this.context=U,this.refs=I,this.updater=L||Y}var oe=Oe.prototype=new $e;oe.constructor=Oe,q(oe,ne.prototype),oe.isPureReactComponent=!0;var Ee=Array.isArray;function Ne(){}var ue={H:null,A:null,T:null,S:null},Ye=Object.prototype.hasOwnProperty;function rt(b,U,L){var V=L.ref;return{$$typeof:r,type:b,key:U,ref:V!==void 0?V:null,props:L}}function wt(b,U){return rt(b.type,U,b.props)}function Ae(b){return typeof b=="object"&&b!==null&&b.$$typeof===r}function $(b){var U={"=":"=0",":":"=2"};return"$"+b.replace(/[=:]/g,function(L){return U[L]})}var G=/\/+/g;function Q(b,U){return typeof b=="object"&&b!==null&&b.key!=null?$(""+b.key):U.toString(36)}function re(b){switch(b.status){case"fulfilled":return b.value;case"rejected":throw b.reason;default:switch(typeof b.status=="string"?b.then(Ne,Ne):(b.status="pending",b.then(function(U){b.status==="pending"&&(b.status="fulfilled",b.value=U)},function(U){b.status==="pending"&&(b.status="rejected",b.reason=U)})),b.status){case"fulfilled":return b.value;case"rejected":throw b.reason}}throw b}function k(b,U,L,V,J){var ae=typeof b;(ae==="undefined"||ae==="boolean")&&(b=null);var ve=!1;if(b===null)ve=!0;else switch(ae){case"bigint":case"string":case"number":ve=!0;break;case"object":switch(b.$$typeof){case r:case u:ve=!0;break;case _:return ve=b._init,k(ve(b._payload),U,L,V,J)}}if(ve)return J=J(b),ve=V===""?"."+Q(b,0):V,Ee(J)?(L="",ve!=null&&(L=ve.replace(G,"$&/")+"/"),k(J,U,L,"",function(pl){return pl})):J!=null&&(Ae(J)&&(J=wt(J,L+(J.key==null||b&&b.key===J.key?"":(""+J.key).replace(G,"$&/")+"/")+ve)),U.push(J)),1;ve=0;var Xe=V===""?".":V+":";if(Ee(b))for(var Le=0;Le<b.length;Le++)V=b[Le],ae=Xe+Q(V,Le),ve+=k(V,U,L,ae,J);else if(Le=X(b),typeof Le=="function")for(b=Le.call(b),Le=0;!(V=b.next()).done;)V=V.value,ae=Xe+Q(V,Le++),ve+=k(V,U,L,ae,J);else if(ae==="object"){if(typeof b.then=="function")return k(re(b),U,L,V,J);throw U=String(b),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(b).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.")}return ve}function B(b,U,L){if(b==null)return b;var V=[],J=0;return k(b,V,"","",function(ae){return U.call(L,ae,J++)}),V}function P(b){if(b._status===-1){var U=b._result;U=U(),U.then(function(L){(b._status===0||b._status===-1)&&(b._status=1,b._result=L)},function(L){(b._status===0||b._status===-1)&&(b._status=2,b._result=L)}),b._status===-1&&(b._status=0,b._result=U)}if(b._status===1)return b._result.default;throw b._result}var ye=typeof reportError=="function"?reportError:function(b){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var U=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof b=="object"&&b!==null&&typeof b.message=="string"?String(b.message):String(b),error:b});if(!window.dispatchEvent(U))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",b);return}console.error(b)},_e={map:B,forEach:function(b,U,L){B(b,function(){U.apply(this,arguments)},L)},count:function(b){var U=0;return B(b,function(){U++}),U},toArray:function(b){return B(b,function(U){return U})||[]},only:function(b){if(!Ae(b))throw Error("React.Children.only expected to receive a single React element child.");return b}};return le.Activity=A,le.Children=_e,le.Component=ne,le.Fragment=s,le.Profiler=f,le.PureComponent=Oe,le.StrictMode=c,le.Suspense=y,le.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ue,le.__COMPILER_RUNTIME={__proto__:null,c:function(b){return ue.H.useMemoCache(b)}},le.cache=function(b){return function(){return b.apply(null,arguments)}},le.cacheSignal=function(){return null},le.cloneElement=function(b,U,L){if(b==null)throw Error("The argument must be a React element, but you passed "+b+".");var V=q({},b.props),J=b.key;if(U!=null)for(ae in U.key!==void 0&&(J=""+U.key),U)!Ye.call(U,ae)||ae==="key"||ae==="__self"||ae==="__source"||ae==="ref"&&U.ref===void 0||(V[ae]=U[ae]);var ae=arguments.length-2;if(ae===1)V.children=L;else if(1<ae){for(var ve=Array(ae),Xe=0;Xe<ae;Xe++)ve[Xe]=arguments[Xe+2];V.children=ve}return rt(b.type,J,V)},le.createContext=function(b){return b={$$typeof:g,_currentValue:b,_currentValue2:b,_threadCount:0,Provider:null,Consumer:null},b.Provider=b,b.Consumer={$$typeof:p,_context:b},b},le.createElement=function(b,U,L){var V,J={},ae=null;if(U!=null)for(V in U.key!==void 0&&(ae=""+U.key),U)Ye.call(U,V)&&V!=="key"&&V!=="__self"&&V!=="__source"&&(J[V]=U[V]);var ve=arguments.length-2;if(ve===1)J.children=L;else if(1<ve){for(var Xe=Array(ve),Le=0;Le<ve;Le++)Xe[Le]=arguments[Le+2];J.children=Xe}if(b&&b.defaultProps)for(V in ve=b.defaultProps,ve)J[V]===void 0&&(J[V]=ve[V]);return rt(b,ae,J)},le.createRef=function(){return{current:null}},le.forwardRef=function(b){return{$$typeof:T,render:b}},le.isValidElement=Ae,le.lazy=function(b){return{$$typeof:_,_payload:{_status:-1,_result:b},_init:P}},le.memo=function(b,U){return{$$typeof:m,type:b,compare:U===void 0?null:U}},le.startTransition=function(b){var U=ue.T,L={};ue.T=L;try{var V=b(),J=ue.S;J!==null&&J(L,V),typeof V=="object"&&V!==null&&typeof V.then=="function"&&V.then(Ne,ye)}catch(ae){ye(ae)}finally{U!==null&&L.types!==null&&(U.types=L.types),ue.T=U}},le.unstable_useCacheRefresh=function(){return ue.H.useCacheRefresh()},le.use=function(b){return ue.H.use(b)},le.useActionState=function(b,U,L){return ue.H.useActionState(b,U,L)},le.useCallback=function(b,U){return ue.H.useCallback(b,U)},le.useContext=function(b){return ue.H.useContext(b)},le.useDebugValue=function(){},le.useDeferredValue=function(b,U){return ue.H.useDeferredValue(b,U)},le.useEffect=function(b,U){return ue.H.useEffect(b,U)},le.useEffectEvent=function(b){return ue.H.useEffectEvent(b)},le.useId=function(){return ue.H.useId()},le.useImperativeHandle=function(b,U,L){return ue.H.useImperativeHandle(b,U,L)},le.useInsertionEffect=function(b,U){return ue.H.useInsertionEffect(b,U)},le.useLayoutEffect=function(b,U){return ue.H.useLayoutEffect(b,U)},le.useMemo=function(b,U){return ue.H.useMemo(b,U)},le.useOptimistic=function(b,U){return ue.H.useOptimistic(b,U)},le.useReducer=function(b,U,L){return ue.H.useReducer(b,U,L)},le.useRef=function(b){return ue.H.useRef(b)},le.useState=function(b){return ue.H.useState(b)},le.useSyncExternalStore=function(b,U,L){return ue.H.useSyncExternalStore(b,U,L)},le.useTransition=function(){return ue.H.useTransition()},le.version="19.2.4",le}var Qh;function Xs(){return Qh||(Qh=1,Es.exports=ey()),Es.exports}var O=Xs(),As={exports:{}},Ai={},_s={exports:{}},zs={};var Zh;function ty(){return Zh||(Zh=1,(function(r){function u(k,B){var P=k.length;k.push(B);e:for(;0<P;){var ye=P-1>>>1,_e=k[ye];if(0<f(_e,B))k[ye]=B,k[P]=_e,P=ye;else break e}}function s(k){return k.length===0?null:k[0]}function c(k){if(k.length===0)return null;var B=k[0],P=k.pop();if(P!==B){k[0]=P;e:for(var ye=0,_e=k.length,b=_e>>>1;ye<b;){var U=2*(ye+1)-1,L=k[U],V=U+1,J=k[V];if(0>f(L,P))V<_e&&0>f(J,L)?(k[ye]=J,k[V]=P,ye=V):(k[ye]=L,k[U]=P,ye=U);else if(V<_e&&0>f(J,P))k[ye]=J,k[V]=P,ye=V;else break e}}return B}function f(k,B){var P=k.sortIndex-B.sortIndex;return P!==0?P:k.id-B.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var p=performance;r.unstable_now=function(){return p.now()}}else{var g=Date,T=g.now();r.unstable_now=function(){return g.now()-T}}var y=[],m=[],_=1,A=null,j=3,X=!1,Y=!1,q=!1,I=!1,ne=typeof setTimeout=="function"?setTimeout:null,$e=typeof clearTimeout=="function"?clearTimeout:null,Oe=typeof setImmediate<"u"?setImmediate:null;function oe(k){for(var B=s(m);B!==null;){if(B.callback===null)c(m);else if(B.startTime<=k)c(m),B.sortIndex=B.expirationTime,u(y,B);else break;B=s(m)}}function Ee(k){if(q=!1,oe(k),!Y)if(s(y)!==null)Y=!0,Ne||(Ne=!0,$());else{var B=s(m);B!==null&&re(Ee,B.startTime-k)}}var Ne=!1,ue=-1,Ye=5,rt=-1;function wt(){return I?!0:!(r.unstable_now()-rt<Ye)}function Ae(){if(I=!1,Ne){var k=r.unstable_now();rt=k;var B=!0;try{e:{Y=!1,q&&(q=!1,$e(ue),ue=-1),X=!0;var P=j;try{t:{for(oe(k),A=s(y);A!==null&&!(A.expirationTime>k&&wt());){var ye=A.callback;if(typeof ye=="function"){A.callback=null,j=A.priorityLevel;var _e=ye(A.expirationTime<=k);if(k=r.unstable_now(),typeof _e=="function"){A.callback=_e,oe(k),B=!0;break t}A===s(y)&&c(y),oe(k)}else c(y);A=s(y)}if(A!==null)B=!0;else{var b=s(m);b!==null&&re(Ee,b.startTime-k),B=!1}}break e}finally{A=null,j=P,X=!1}B=void 0}}finally{B?$():Ne=!1}}}var $;if(typeof Oe=="function")$=function(){Oe(Ae)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,Q=G.port2;G.port1.onmessage=Ae,$=function(){Q.postMessage(null)}}else $=function(){ne(Ae,0)};function re(k,B){ue=ne(function(){k(r.unstable_now())},B)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(k){k.callback=null},r.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Ye=0<k?Math.floor(1e3/k):5},r.unstable_getCurrentPriorityLevel=function(){return j},r.unstable_next=function(k){switch(j){case 1:case 2:case 3:var B=3;break;default:B=j}var P=j;j=B;try{return k()}finally{j=P}},r.unstable_requestPaint=function(){I=!0},r.unstable_runWithPriority=function(k,B){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var P=j;j=k;try{return B()}finally{j=P}},r.unstable_scheduleCallback=function(k,B,P){var ye=r.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?ye+P:ye):P=ye,k){case 1:var _e=-1;break;case 2:_e=250;break;case 5:_e=1073741823;break;case 4:_e=1e4;break;default:_e=5e3}return _e=P+_e,k={id:_++,callback:B,priorityLevel:k,startTime:P,expirationTime:_e,sortIndex:-1},P>ye?(k.sortIndex=P,u(m,k),s(y)===null&&k===s(m)&&(q?($e(ue),ue=-1):q=!0,re(Ee,P-ye))):(k.sortIndex=_e,u(y,k),Y||X||(Y=!0,Ne||(Ne=!0,$()))),k},r.unstable_shouldYield=wt,r.unstable_wrapCallback=function(k){var B=j;return function(){var P=j;j=B;try{return k.apply(this,arguments)}finally{j=P}}}})(zs)),zs}var Vh;function ly(){return Vh||(Vh=1,_s.exports=ty()),_s.exports}var Rs={exports:{}},pt={};var Kh;function ay(){if(Kh)return pt;Kh=1;var r=Xs();function u(y){var m="https://react.dev/errors/"+y;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var _=2;_<arguments.length;_++)m+="&args[]="+encodeURIComponent(arguments[_])}return"Minified React error #"+y+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var c={d:{f:s,r:function(){throw Error(u(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},f=Symbol.for("react.portal");function p(y,m,_){var A=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:A==null?null:""+A,children:y,containerInfo:m,implementation:_}}var g=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function T(y,m){if(y==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return pt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,pt.createPortal=function(y,m){var _=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(u(299));return p(y,m,null,_)},pt.flushSync=function(y){var m=g.T,_=c.p;try{if(g.T=null,c.p=2,y)return y()}finally{g.T=m,c.p=_,c.d.f()}},pt.preconnect=function(y,m){typeof y=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,c.d.C(y,m))},pt.prefetchDNS=function(y){typeof y=="string"&&c.d.D(y)},pt.preinit=function(y,m){if(typeof y=="string"&&m&&typeof m.as=="string"){var _=m.as,A=T(_,m.crossOrigin),j=typeof m.integrity=="string"?m.integrity:void 0,X=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;_==="style"?c.d.S(y,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:A,integrity:j,fetchPriority:X}):_==="script"&&c.d.X(y,{crossOrigin:A,integrity:j,fetchPriority:X,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},pt.preinitModule=function(y,m){if(typeof y=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var _=T(m.as,m.crossOrigin);c.d.M(y,{crossOrigin:_,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&c.d.M(y)},pt.preload=function(y,m){if(typeof y=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var _=m.as,A=T(_,m.crossOrigin);c.d.L(y,_,{crossOrigin:A,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},pt.preloadModule=function(y,m){if(typeof y=="string")if(m){var _=T(m.as,m.crossOrigin);c.d.m(y,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:_,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else c.d.m(y)},pt.requestFormReset=function(y){c.d.r(y)},pt.unstable_batchedUpdates=function(y,m){return y(m)},pt.useFormState=function(y,m,_){return g.H.useFormState(y,m,_)},pt.useFormStatus=function(){return g.H.useHostTransitionStatus()},pt.version="19.2.4",pt}var Jh;function ny(){if(Jh)return Rs.exports;Jh=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(u){console.error(u)}}return r(),Rs.exports=ay(),Rs.exports}var $h;function iy(){if($h)return Ai;$h=1;var r=ly(),u=Xs(),s=ny();function c(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function p(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(l=t.return),e=t.return;while(e)}return t.tag===3?l:null}function g(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function T(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function y(e){if(p(e)!==e)throw Error(c(188))}function m(e){var t=e.alternate;if(!t){if(t=p(e),t===null)throw Error(c(188));return t!==e?null:e}for(var l=e,a=t;;){var n=l.return;if(n===null)break;var i=n.alternate;if(i===null){if(a=n.return,a!==null){l=a;continue}break}if(n.child===i.child){for(i=n.child;i;){if(i===l)return y(n),e;if(i===a)return y(n),t;i=i.sibling}throw Error(c(188))}if(l.return!==a.return)l=n,a=i;else{for(var o=!1,h=n.child;h;){if(h===l){o=!0,l=n,a=i;break}if(h===a){o=!0,a=n,l=i;break}h=h.sibling}if(!o){for(h=i.child;h;){if(h===l){o=!0,l=i,a=n;break}if(h===a){o=!0,a=i,l=n;break}h=h.sibling}if(!o)throw Error(c(189))}}if(l.alternate!==a)throw Error(c(190))}if(l.tag!==3)throw Error(c(188));return l.stateNode.current===l?e:t}function _(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=_(e),t!==null)return t;e=e.sibling}return null}var A=Object.assign,j=Symbol.for("react.element"),X=Symbol.for("react.transitional.element"),Y=Symbol.for("react.portal"),q=Symbol.for("react.fragment"),I=Symbol.for("react.strict_mode"),ne=Symbol.for("react.profiler"),$e=Symbol.for("react.consumer"),Oe=Symbol.for("react.context"),oe=Symbol.for("react.forward_ref"),Ee=Symbol.for("react.suspense"),Ne=Symbol.for("react.suspense_list"),ue=Symbol.for("react.memo"),Ye=Symbol.for("react.lazy"),rt=Symbol.for("react.activity"),wt=Symbol.for("react.memo_cache_sentinel"),Ae=Symbol.iterator;function $(e){return e===null||typeof e!="object"?null:(e=Ae&&e[Ae]||e["@@iterator"],typeof e=="function"?e:null)}var G=Symbol.for("react.client.reference");function Q(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===G?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case q:return"Fragment";case ne:return"Profiler";case I:return"StrictMode";case Ee:return"Suspense";case Ne:return"SuspenseList";case rt:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case Y:return"Portal";case Oe:return e.displayName||"Context";case $e:return(e._context.displayName||"Context")+".Consumer";case oe:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ue:return t=e.displayName||null,t!==null?t:Q(e.type)||"Memo";case Ye:t=e._payload,e=e._init;try{return Q(e(t))}catch{}}return null}var re=Array.isArray,k=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P={pending:!1,data:null,method:null,action:null},ye=[],_e=-1;function b(e){return{current:e}}function U(e){0>_e||(e.current=ye[_e],ye[_e]=null,_e--)}function L(e,t){_e++,ye[_e]=e.current,e.current=t}var V=b(null),J=b(null),ae=b(null),ve=b(null);function Xe(e,t){switch(L(ae,t),L(J,e),L(V,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?oh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=oh(t),e=fh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}U(V),L(V,e)}function Le(){U(V),U(J),U(ae)}function pl(e){e.memoizedState!==null&&L(ve,e);var t=V.current,l=fh(t,e.type);t!==l&&(L(J,e),L(V,l))}function pa(e){J.current===e&&(U(V),U(J)),ve.current===e&&(U(ve),bi._currentValue=P)}var Ua,gl;function Bt(e){if(Ua===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);Ua=t&&t[1]||"",gl=-1<l.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+Ua+e+gl}var Pt=!1;function ga(e,t){if(!e||Pt)return"";Pt=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var N=function(){throw Error()};if(Object.defineProperty(N.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(N,[])}catch(M){var w=M}Reflect.construct(e,[],N)}else{try{N.call()}catch(M){w=M}e.call(N.prototype)}}else{try{throw Error()}catch(M){w=M}(N=e())&&typeof N.catch=="function"&&N.catch(function(){})}}catch(M){if(M&&w&&typeof M.stack=="string")return[M.stack,w.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var n=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");n&&n.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=a.DetermineComponentFrameRoot(),o=i[0],h=i[1];if(o&&h){var v=o.split(`
4
+ `),R=h.split(`
5
+ `);for(n=a=0;a<v.length&&!v[a].includes("DetermineComponentFrameRoot");)a++;for(;n<R.length&&!R[n].includes("DetermineComponentFrameRoot");)n++;if(a===v.length||n===R.length)for(a=v.length-1,n=R.length-1;1<=a&&0<=n&&v[a]!==R[n];)n--;for(;1<=a&&0<=n;a--,n--)if(v[a]!==R[n]){if(a!==1||n!==1)do if(a--,n--,0>n||v[a]!==R[n]){var C=`
6
+ `+v[a].replace(" at new "," at ");return e.displayName&&C.includes("<anonymous>")&&(C=C.replace("<anonymous>",e.displayName)),C}while(1<=a&&0<=n);break}}}finally{Pt=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Bt(l):""}function En(e,t){switch(e.tag){case 26:case 27:case 5:return Bt(e.type);case 16:return Bt("Lazy");case 13:return e.child!==t&&t!==null?Bt("Suspense Fallback"):Bt("Suspense");case 19:return Bt("SuspenseList");case 0:case 15:return ga(e.type,!1);case 11:return ga(e.type.render,!1);case 1:return ga(e.type,!0);case 31:return Bt("Activity");default:return""}}function ml(e){try{var t="",l=null;do t+=En(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
7
+ Error generating stack: `+a.message+`
8
+ `+a.stack}}var Gl=Object.prototype.hasOwnProperty,Yl=r.unstable_scheduleCallback,Ha=r.unstable_cancelCallback,Ni=r.unstable_shouldYield,hr=r.unstable_requestPaint,ct=r.unstable_now,ma=r.unstable_getCurrentPriorityLevel,yl=r.unstable_ImmediatePriority,jt=r.unstable_UserBlockingPriority,Xl=r.unstable_NormalPriority,Ui=r.unstable_LowPriority,An=r.unstable_IdlePriority,_n=r.log,Hi=r.unstable_setDisableYieldValue,rl=null,nt=null;function it(e){if(typeof _n=="function"&&Hi(e),nt&&typeof nt.setStrictMode=="function")try{nt.setStrictMode(rl,e)}catch{}}var We=Math.clz32?Math.clz32:pr,zn=Math.log,Rn=Math.LN2;function pr(e){return e>>>=0,e===0?32:31-(zn(e)/Rn|0)|0}var vl=256,bl=262144,La=4194304;function Mt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ba(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var n=0,i=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var h=a&134217727;return h!==0?(a=h&~i,a!==0?n=Mt(a):(o&=h,o!==0?n=Mt(o):l||(l=h&~e,l!==0&&(n=Mt(l))))):(h=a&~i,h!==0?n=Mt(h):o!==0?n=Mt(o):l||(l=a&~e,l!==0&&(n=Mt(l)))),n===0?0:t!==0&&t!==n&&(t&i)===0&&(i=n&-n,l=t&-t,i>=l||i===32&&(l&4194048)!==0)?t:n}function ya(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ve(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function xl(){var e=La;return La<<=1,(La&62914560)===0&&(La=4194304),e}function kn(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Ql(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function wn(e,t,l,a,n,i){var o=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var h=e.entanglements,v=e.expirationTimes,R=e.hiddenUpdates;for(l=o&~l;0<l;){var C=31-We(l),N=1<<C;h[C]=0,v[C]=-1;var w=R[C];if(w!==null)for(R[C]=null,C=0;C<w.length;C++){var M=w[C];M!==null&&(M.lane&=-536870913)}l&=~N}a!==0&&jn(e,a,0),i!==0&&n===0&&e.tag!==0&&(e.suspendedLanes|=i&~(o&~t))}function jn(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-We(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function Mn(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-We(l),n=1<<a;n&t|e[a]&t&&(e[a]|=t),l&=~n}}function Li(e,t){var l=t&-t;return l=(l&42)!==0?1:xt(l),(l&(e.suspendedLanes|t))!==0?0:l}function xt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function el(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Cn(){var e=B.p;return e!==0?e:(e=window.event,e===void 0?32:Dh(e.type))}function On(e,t){var l=B.p;try{return B.p=e,t()}finally{B.p=l}}var qt=Math.random().toString(36).slice(2),Fe="__reactFiber$"+qt,Be="__reactProps$"+qt,Sl="__reactContainer$"+qt,qa="__reactEvents$"+qt,Bi="__reactListeners$"+qt,qi="__reactHandles$"+qt,Gi="__reactResources$"+qt,W="__reactMarker$"+qt;function x(e){delete e[Fe],delete e[Be],delete e[qa],delete e[Bi],delete e[qi]}function H(e){var t=e[Fe];if(t)return t;for(var l=e.parentNode;l;){if(t=l[Sl]||l[Fe]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=vh(e);e!==null;){if(l=e[Fe])return l;e=vh(e)}return t}e=l,l=e.parentNode}return null}function Z(e){if(e=e[Fe]||e[Sl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ze(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function Ge(e){var t=e[Gi];return t||(t=e[Gi]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function se(e){e[W]=!0}var st=new Set,Gt={};function St(e,t){cl(e,t),cl(e+"Capture",t)}function cl(e,t){for(Gt[e]=t,e=0;e<t.length;e++)st.add(t[e])}var lt=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Dn={},Nn={};function Qp(e){return Gl.call(Nn,e)?!0:Gl.call(Dn,e)?!1:lt.test(e)?Nn[e]=!0:(Dn[e]=!0,!1)}function Yi(e,t,l){if(Qp(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function Xi(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+l)}}function Tl(e,t,l,a){if(a===null)e.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+a)}}function Yt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function eo(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Zp(e,t,l){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var n=a.get,i=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(o){l=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(o){l=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function gr(e){if(!e._valueTracker){var t=eo(e)?"checked":"value";e._valueTracker=Zp(e,t,""+e[t])}}function to(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=eo(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}function Qi(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Vp=/[\n"\\]/g;function Xt(e){return e.replace(Vp,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function mr(e,t,l,a,n,i,o,h){e.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.type=o:e.removeAttribute("type"),t!=null?o==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Yt(t)):e.value!==""+Yt(t)&&(e.value=""+Yt(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?yr(e,o,Yt(t)):l!=null?yr(e,o,Yt(l)):a!=null&&e.removeAttribute("value"),n==null&&i!=null&&(e.defaultChecked=!!i),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.name=""+Yt(h):e.removeAttribute("name")}function lo(e,t,l,a,n,i,o,h){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||l!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){gr(e);return}l=l!=null?""+Yt(l):"",t=t!=null?""+Yt(t):l,h||t===e.value||(e.value=t),e.defaultValue=t}a=a??n,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=h?e.checked:!!a,e.defaultChecked=!!a,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o),gr(e)}function yr(e,t,l){t==="number"&&Qi(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function Ga(e,t,l,a){if(e=e.options,t){t={};for(var n=0;n<l.length;n++)t["$"+l[n]]=!0;for(l=0;l<e.length;l++)n=t.hasOwnProperty("$"+e[l].value),e[l].selected!==n&&(e[l].selected=n),n&&a&&(e[l].defaultSelected=!0)}else{for(l=""+Yt(l),t=null,n=0;n<e.length;n++){if(e[n].value===l){e[n].selected=!0,a&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function ao(e,t,l){if(t!=null&&(t=""+Yt(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+Yt(l):""}function no(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(c(92));if(re(a)){if(1<a.length)throw Error(c(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=Yt(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),gr(e)}function Ya(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var Kp=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function io(e,t,l){var a=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,l):typeof l!="number"||l===0||Kp.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function uo(e,t,l){if(t!=null&&typeof t!="object")throw Error(c(62));if(e=e.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var n in t)a=t[n],t.hasOwnProperty(n)&&l[n]!==a&&io(e,n,a)}else for(var i in t)t.hasOwnProperty(i)&&io(e,i,t[i])}function vr(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Jp=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["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"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["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"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["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"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),$p=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Zi(e){return $p.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function El(){}var br=null;function xr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Xa=null,Qa=null;function ro(e){var t=Z(e);if(t&&(e=t.stateNode)){var l=e[Be]||null;e:switch(e=t.stateNode,t.type){case"input":if(mr(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Xt(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var n=a[Be]||null;if(!n)throw Error(c(90));mr(a,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&to(a)}break e;case"textarea":ao(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&Ga(e,!!l.multiple,t,!1)}}}var Sr=!1;function co(e,t,l){if(Sr)return e(t,l);Sr=!0;try{var a=e(t);return a}finally{if(Sr=!1,(Xa!==null||Qa!==null)&&(Cu(),Xa&&(t=Xa,e=Qa,Qa=Xa=null,ro(t),e)))for(t=0;t<e.length;t++)ro(e[t])}}function Un(e,t){var l=e.stateNode;if(l===null)return null;var a=l[Be]||null;if(a===null)return null;l=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(c(231,t,typeof l));return l}var Al=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Tr=!1;if(Al)try{var Hn={};Object.defineProperty(Hn,"passive",{get:function(){Tr=!0}}),window.addEventListener("test",Hn,Hn),window.removeEventListener("test",Hn,Hn)}catch{Tr=!1}var Zl=null,Er=null,Vi=null;function so(){if(Vi)return Vi;var e,t=Er,l=t.length,a,n="value"in Zl?Zl.value:Zl.textContent,i=n.length;for(e=0;e<l&&t[e]===n[e];e++);var o=l-e;for(a=1;a<=o&&t[l-a]===n[i-a];a++);return Vi=n.slice(e,1<a?1-a:void 0)}function Ki(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ji(){return!0}function oo(){return!1}function Tt(e){function t(l,a,n,i,o){this._reactName=l,this._targetInst=n,this.type=a,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var h in e)e.hasOwnProperty(h)&&(l=e[h],this[h]=l?l(i):i[h]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Ji:oo,this.isPropagationStopped=oo,this}return A(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Ji)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Ji)},persist:function(){},isPersistent:Ji}),t}var va={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},$i=Tt(va),Ln=A({},va,{view:0,detail:0}),Wp=Tt(Ln),Ar,_r,Bn,Wi=A({},Ln,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Rr,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Bn&&(Bn&&e.type==="mousemove"?(Ar=e.screenX-Bn.screenX,_r=e.screenY-Bn.screenY):_r=Ar=0,Bn=e),Ar)},movementY:function(e){return"movementY"in e?e.movementY:_r}}),fo=Tt(Wi),Fp=A({},Wi,{dataTransfer:0}),Ip=Tt(Fp),Pp=A({},Ln,{relatedTarget:0}),zr=Tt(Pp),eg=A({},va,{animationName:0,elapsedTime:0,pseudoElement:0}),tg=Tt(eg),lg=A({},va,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ag=Tt(lg),ng=A({},va,{data:0}),ho=Tt(ng),ig={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ug={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"},rg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function cg(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=rg[e])?!!t[e]:!1}function Rr(){return cg}var sg=A({},Ln,{key:function(e){if(e.key){var t=ig[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ki(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ug[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Rr,charCode:function(e){return e.type==="keypress"?Ki(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ki(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),og=Tt(sg),fg=A({},Wi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),po=Tt(fg),dg=A({},Ln,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Rr}),hg=Tt(dg),pg=A({},va,{propertyName:0,elapsedTime:0,pseudoElement:0}),gg=Tt(pg),mg=A({},Wi,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),yg=Tt(mg),vg=A({},va,{newState:0,oldState:0}),bg=Tt(vg),xg=[9,13,27,32],kr=Al&&"CompositionEvent"in window,qn=null;Al&&"documentMode"in document&&(qn=document.documentMode);var Sg=Al&&"TextEvent"in window&&!qn,go=Al&&(!kr||qn&&8<qn&&11>=qn),mo=" ",yo=!1;function vo(e,t){switch(e){case"keyup":return xg.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bo(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Za=!1;function Tg(e,t){switch(e){case"compositionend":return bo(t);case"keypress":return t.which!==32?null:(yo=!0,mo);case"textInput":return e=t.data,e===mo&&yo?null:e;default:return null}}function Eg(e,t){if(Za)return e==="compositionend"||!kr&&vo(e,t)?(e=so(),Vi=Er=Zl=null,Za=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return go&&t.locale!=="ko"?null:t.data;default:return null}}var Ag={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 xo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Ag[e.type]:t==="textarea"}function So(e,t,l,a){Xa?Qa?Qa.push(a):Qa=[a]:Xa=a,t=Bu(t,"onChange"),0<t.length&&(l=new $i("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var Gn=null,Yn=null;function _g(e){nh(e,0)}function Fi(e){var t=ze(e);if(to(t))return e}function To(e,t){if(e==="change")return t}var Eo=!1;if(Al){var wr;if(Al){var jr="oninput"in document;if(!jr){var Ao=document.createElement("div");Ao.setAttribute("oninput","return;"),jr=typeof Ao.oninput=="function"}wr=jr}else wr=!1;Eo=wr&&(!document.documentMode||9<document.documentMode)}function _o(){Gn&&(Gn.detachEvent("onpropertychange",zo),Yn=Gn=null)}function zo(e){if(e.propertyName==="value"&&Fi(Yn)){var t=[];So(t,Yn,e,xr(e)),co(_g,t)}}function zg(e,t,l){e==="focusin"?(_o(),Gn=t,Yn=l,Gn.attachEvent("onpropertychange",zo)):e==="focusout"&&_o()}function Rg(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Fi(Yn)}function kg(e,t){if(e==="click")return Fi(t)}function wg(e,t){if(e==="input"||e==="change")return Fi(t)}function jg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ct=typeof Object.is=="function"?Object.is:jg;function Xn(e,t){if(Ct(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),a=Object.keys(t);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var n=l[a];if(!Gl.call(t,n)||!Ct(e[n],t[n]))return!1}return!0}function Ro(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ko(e,t){var l=Ro(e);e=0;for(var a;l;){if(l.nodeType===3){if(a=e+l.textContent.length,e<=t&&a>=t)return{node:l,offset:t-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Ro(l)}}function wo(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?wo(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function jo(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Qi(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Qi(e.document)}return t}function Mr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Mg=Al&&"documentMode"in document&&11>=document.documentMode,Va=null,Cr=null,Qn=null,Or=!1;function Mo(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Or||Va==null||Va!==Qi(a)||(a=Va,"selectionStart"in a&&Mr(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Qn&&Xn(Qn,a)||(Qn=a,a=Bu(Cr,"onSelect"),0<a.length&&(t=new $i("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=Va)))}function ba(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var Ka={animationend:ba("Animation","AnimationEnd"),animationiteration:ba("Animation","AnimationIteration"),animationstart:ba("Animation","AnimationStart"),transitionrun:ba("Transition","TransitionRun"),transitionstart:ba("Transition","TransitionStart"),transitioncancel:ba("Transition","TransitionCancel"),transitionend:ba("Transition","TransitionEnd")},Dr={},Co={};Al&&(Co=document.createElement("div").style,"AnimationEvent"in window||(delete Ka.animationend.animation,delete Ka.animationiteration.animation,delete Ka.animationstart.animation),"TransitionEvent"in window||delete Ka.transitionend.transition);function xa(e){if(Dr[e])return Dr[e];if(!Ka[e])return e;var t=Ka[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in Co)return Dr[e]=t[l];return e}var Oo=xa("animationend"),Do=xa("animationiteration"),No=xa("animationstart"),Cg=xa("transitionrun"),Og=xa("transitionstart"),Dg=xa("transitioncancel"),Uo=xa("transitionend"),Ho=new Map,Nr="abort auxClick beforeToggle 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(" ");Nr.push("scrollEnd");function tl(e,t){Ho.set(e,t),St(t,[e])}var Ii=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Qt=[],Ja=0,Ur=0;function Pi(){for(var e=Ja,t=Ur=Ja=0;t<e;){var l=Qt[t];Qt[t++]=null;var a=Qt[t];Qt[t++]=null;var n=Qt[t];Qt[t++]=null;var i=Qt[t];if(Qt[t++]=null,a!==null&&n!==null){var o=a.pending;o===null?n.next=n:(n.next=o.next,o.next=n),a.pending=n}i!==0&&Lo(l,n,i)}}function eu(e,t,l,a){Qt[Ja++]=e,Qt[Ja++]=t,Qt[Ja++]=l,Qt[Ja++]=a,Ur|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Hr(e,t,l,a){return eu(e,t,l,a),tu(e)}function Sa(e,t){return eu(e,null,null,t),tu(e)}function Lo(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var n=!1,i=e.return;i!==null;)i.childLanes|=l,a=i.alternate,a!==null&&(a.childLanes|=l),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(n=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,n&&t!==null&&(n=31-We(l),e=i.hiddenUpdates,a=e[n],a===null?e[n]=[t]:a.push(t),t.lane=l|536870912),i):null}function tu(e){if(50<di)throw di=0,Vc=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var $a={};function Ng(e,t,l,a){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ot(e,t,l,a){return new Ng(e,t,l,a)}function Lr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _l(e,t){var l=e.alternate;return l===null?(l=Ot(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function Bo(e,t){e.flags&=65011714;var l=e.alternate;return l===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function lu(e,t,l,a,n,i){var o=0;if(a=e,typeof e=="function")Lr(e)&&(o=1);else if(typeof e=="string")o=qm(e,l,V.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case rt:return e=Ot(31,l,t,n),e.elementType=rt,e.lanes=i,e;case q:return Ta(l.children,n,i,t);case I:o=8,n|=24;break;case ne:return e=Ot(12,l,t,n|2),e.elementType=ne,e.lanes=i,e;case Ee:return e=Ot(13,l,t,n),e.elementType=Ee,e.lanes=i,e;case Ne:return e=Ot(19,l,t,n),e.elementType=Ne,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Oe:o=10;break e;case $e:o=9;break e;case oe:o=11;break e;case ue:o=14;break e;case Ye:o=16,a=null;break e}o=29,l=Error(c(130,e===null?"null":typeof e,"")),a=null}return t=Ot(o,l,t,n),t.elementType=e,t.type=a,t.lanes=i,t}function Ta(e,t,l,a){return e=Ot(7,e,a,t),e.lanes=l,e}function Br(e,t,l){return e=Ot(6,e,null,t),e.lanes=l,e}function qo(e){var t=Ot(18,null,null,0);return t.stateNode=e,t}function qr(e,t,l){return t=Ot(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Go=new WeakMap;function Zt(e,t){if(typeof e=="object"&&e!==null){var l=Go.get(e);return l!==void 0?l:(t={value:e,source:t,stack:ml(t)},Go.set(e,t),t)}return{value:e,source:t,stack:ml(t)}}var Wa=[],Fa=0,au=null,Zn=0,Vt=[],Kt=0,Vl=null,sl=1,ol="";function zl(e,t){Wa[Fa++]=Zn,Wa[Fa++]=au,au=e,Zn=t}function Yo(e,t,l){Vt[Kt++]=sl,Vt[Kt++]=ol,Vt[Kt++]=Vl,Vl=e;var a=sl;e=ol;var n=32-We(a)-1;a&=~(1<<n),l+=1;var i=32-We(t)+n;if(30<i){var o=n-n%5;i=(a&(1<<o)-1).toString(32),a>>=o,n-=o,sl=1<<32-We(t)+n|l<<n|a,ol=i+e}else sl=1<<i|l<<n|a,ol=e}function Gr(e){e.return!==null&&(zl(e,1),Yo(e,1,0))}function Yr(e){for(;e===au;)au=Wa[--Fa],Wa[Fa]=null,Zn=Wa[--Fa],Wa[Fa]=null;for(;e===Vl;)Vl=Vt[--Kt],Vt[Kt]=null,ol=Vt[--Kt],Vt[Kt]=null,sl=Vt[--Kt],Vt[Kt]=null}function Xo(e,t){Vt[Kt++]=sl,Vt[Kt++]=ol,Vt[Kt++]=Vl,sl=t.id,ol=t.overflow,Vl=e}var ot=null,Ue=null,me=!1,Kl=null,Jt=!1,Xr=Error(c(519));function Jl(e){var t=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Vn(Zt(t,e)),Xr}function Qo(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[Fe]=e,t[Be]=a,l){case"dialog":he("cancel",t),he("close",t);break;case"iframe":case"object":case"embed":he("load",t);break;case"video":case"audio":for(l=0;l<pi.length;l++)he(pi[l],t);break;case"source":he("error",t);break;case"img":case"image":case"link":he("error",t),he("load",t);break;case"details":he("toggle",t);break;case"input":he("invalid",t),lo(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":he("invalid",t);break;case"textarea":he("invalid",t),no(t,a.value,a.defaultValue,a.children)}l=a.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||a.suppressHydrationWarning===!0||ch(t.textContent,l)?(a.popover!=null&&(he("beforetoggle",t),he("toggle",t)),a.onScroll!=null&&he("scroll",t),a.onScrollEnd!=null&&he("scrollend",t),a.onClick!=null&&(t.onclick=El),t=!0):t=!1,t||Jl(e,!0)}function Zo(e){for(ot=e.return;ot;)switch(ot.tag){case 5:case 31:case 13:Jt=!1;return;case 27:case 3:Jt=!0;return;default:ot=ot.return}}function Ia(e){if(e!==ot)return!1;if(!me)return Zo(e),me=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||rs(e.type,e.memoizedProps)),l=!l),l&&Ue&&Jl(e),Zo(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Ue=yh(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Ue=yh(e)}else t===27?(t=Ue,ca(e.type)?(e=ds,ds=null,Ue=e):Ue=t):Ue=ot?Wt(e.stateNode.nextSibling):null;return!0}function Ea(){Ue=ot=null,me=!1}function Qr(){var e=Kl;return e!==null&&(zt===null?zt=e:zt.push.apply(zt,e),Kl=null),e}function Vn(e){Kl===null?Kl=[e]:Kl.push(e)}var Zr=b(null),Aa=null,Rl=null;function $l(e,t,l){L(Zr,t._currentValue),t._currentValue=l}function kl(e){e._currentValue=Zr.current,U(Zr)}function Vr(e,t,l){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===l)break;e=e.return}}function Kr(e,t,l,a){var n=e.child;for(n!==null&&(n.return=e);n!==null;){var i=n.dependencies;if(i!==null){var o=n.child;i=i.firstContext;e:for(;i!==null;){var h=i;i=n;for(var v=0;v<t.length;v++)if(h.context===t[v]){i.lanes|=l,h=i.alternate,h!==null&&(h.lanes|=l),Vr(i.return,l,e),a||(o=null);break e}i=h.next}}else if(n.tag===18){if(o=n.return,o===null)throw Error(c(341));o.lanes|=l,i=o.alternate,i!==null&&(i.lanes|=l),Vr(o,l,e),o=null}else o=n.child;if(o!==null)o.return=n;else for(o=n;o!==null;){if(o===e){o=null;break}if(n=o.sibling,n!==null){n.return=o.return,o=n;break}o=o.return}n=o}}function Pa(e,t,l,a){e=null;for(var n=t,i=!1;n!==null;){if(!i){if((n.flags&524288)!==0)i=!0;else if((n.flags&262144)!==0)break}if(n.tag===10){var o=n.alternate;if(o===null)throw Error(c(387));if(o=o.memoizedProps,o!==null){var h=n.type;Ct(n.pendingProps.value,o.value)||(e!==null?e.push(h):e=[h])}}else if(n===ve.current){if(o=n.alternate,o===null)throw Error(c(387));o.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(e!==null?e.push(bi):e=[bi])}n=n.return}e!==null&&Kr(t,e,l,a),t.flags|=262144}function nu(e){for(e=e.firstContext;e!==null;){if(!Ct(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function _a(e){Aa=e,Rl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ft(e){return Vo(Aa,e)}function iu(e,t){return Aa===null&&_a(e),Vo(e,t)}function Vo(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Rl===null){if(e===null)throw Error(c(308));Rl=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Rl=Rl.next=t;return l}var Ug=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},Hg=r.unstable_scheduleCallback,Lg=r.unstable_NormalPriority,Ie={$$typeof:Oe,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Jr(){return{controller:new Ug,data:new Map,refCount:0}}function Kn(e){e.refCount--,e.refCount===0&&Hg(Lg,function(){e.controller.abort()})}var Jn=null,$r=0,en=0,tn=null;function Bg(e,t){if(Jn===null){var l=Jn=[];$r=0,en=Ic(),tn={status:"pending",value:void 0,then:function(a){l.push(a)}}}return $r++,t.then(Ko,Ko),t}function Ko(){if(--$r===0&&Jn!==null){tn!==null&&(tn.status="fulfilled");var e=Jn;Jn=null,en=0,tn=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function qg(e,t){var l=[],a={status:"pending",value:null,reason:null,then:function(n){l.push(n)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var n=0;n<l.length;n++)(0,l[n])(t)},function(n){for(a.status="rejected",a.reason=n,n=0;n<l.length;n++)(0,l[n])(void 0)}),a}var Jo=k.S;k.S=function(e,t){Cd=ct(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Bg(e,t),Jo!==null&&Jo(e,t)};var za=b(null);function Wr(){var e=za.current;return e!==null?e:De.pooledCache}function uu(e,t){t===null?L(za,za.current):L(za,t.pool)}function $o(){var e=Wr();return e===null?null:{parent:Ie._currentValue,pool:e}}var ln=Error(c(460)),Fr=Error(c(474)),ru=Error(c(542)),cu={then:function(){}};function Wo(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Fo(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(El,El),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Po(e),e;default:if(typeof t.status=="string")t.then(El,El);else{if(e=De,e!==null&&100<e.shellSuspendCounter)throw Error(c(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var n=t;n.status="fulfilled",n.value=a}},function(a){if(t.status==="pending"){var n=t;n.status="rejected",n.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Po(e),e}throw ka=t,ln}}function Ra(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(ka=l,ln):l}}var ka=null;function Io(){if(ka===null)throw Error(c(459));var e=ka;return ka=null,e}function Po(e){if(e===ln||e===ru)throw Error(c(483))}var an=null,$n=0;function su(e){var t=$n;return $n+=1,an===null&&(an=[]),Fo(an,e,t)}function Wn(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ou(e,t){throw t.$$typeof===j?Error(c(525)):(e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function ef(e){function t(E,S){if(e){var z=E.deletions;z===null?(E.deletions=[S],E.flags|=16):z.push(S)}}function l(E,S){if(!e)return null;for(;S!==null;)t(E,S),S=S.sibling;return null}function a(E){for(var S=new Map;E!==null;)E.key!==null?S.set(E.key,E):S.set(E.index,E),E=E.sibling;return S}function n(E,S){return E=_l(E,S),E.index=0,E.sibling=null,E}function i(E,S,z){return E.index=z,e?(z=E.alternate,z!==null?(z=z.index,z<S?(E.flags|=67108866,S):z):(E.flags|=67108866,S)):(E.flags|=1048576,S)}function o(E){return e&&E.alternate===null&&(E.flags|=67108866),E}function h(E,S,z,D){return S===null||S.tag!==6?(S=Br(z,E.mode,D),S.return=E,S):(S=n(S,z),S.return=E,S)}function v(E,S,z,D){var ee=z.type;return ee===q?C(E,S,z.props.children,D,z.key):S!==null&&(S.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===Ye&&Ra(ee)===S.type)?(S=n(S,z.props),Wn(S,z),S.return=E,S):(S=lu(z.type,z.key,z.props,null,E.mode,D),Wn(S,z),S.return=E,S)}function R(E,S,z,D){return S===null||S.tag!==4||S.stateNode.containerInfo!==z.containerInfo||S.stateNode.implementation!==z.implementation?(S=qr(z,E.mode,D),S.return=E,S):(S=n(S,z.children||[]),S.return=E,S)}function C(E,S,z,D,ee){return S===null||S.tag!==7?(S=Ta(z,E.mode,D,ee),S.return=E,S):(S=n(S,z),S.return=E,S)}function N(E,S,z){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return S=Br(""+S,E.mode,z),S.return=E,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case X:return z=lu(S.type,S.key,S.props,null,E.mode,z),Wn(z,S),z.return=E,z;case Y:return S=qr(S,E.mode,z),S.return=E,S;case Ye:return S=Ra(S),N(E,S,z)}if(re(S)||$(S))return S=Ta(S,E.mode,z,null),S.return=E,S;if(typeof S.then=="function")return N(E,su(S),z);if(S.$$typeof===Oe)return N(E,iu(E,S),z);ou(E,S)}return null}function w(E,S,z,D){var ee=S!==null?S.key:null;if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return ee!==null?null:h(E,S,""+z,D);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case X:return z.key===ee?v(E,S,z,D):null;case Y:return z.key===ee?R(E,S,z,D):null;case Ye:return z=Ra(z),w(E,S,z,D)}if(re(z)||$(z))return ee!==null?null:C(E,S,z,D,null);if(typeof z.then=="function")return w(E,S,su(z),D);if(z.$$typeof===Oe)return w(E,S,iu(E,z),D);ou(E,z)}return null}function M(E,S,z,D,ee){if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return E=E.get(z)||null,h(S,E,""+D,ee);if(typeof D=="object"&&D!==null){switch(D.$$typeof){case X:return E=E.get(D.key===null?z:D.key)||null,v(S,E,D,ee);case Y:return E=E.get(D.key===null?z:D.key)||null,R(S,E,D,ee);case Ye:return D=Ra(D),M(E,S,z,D,ee)}if(re(D)||$(D))return E=E.get(z)||null,C(S,E,D,ee,null);if(typeof D.then=="function")return M(E,S,z,su(D),ee);if(D.$$typeof===Oe)return M(E,S,z,iu(S,D),ee);ou(S,D)}return null}function K(E,S,z,D){for(var ee=null,be=null,F=S,ce=S=0,ge=null;F!==null&&ce<z.length;ce++){F.index>ce?(ge=F,F=null):ge=F.sibling;var xe=w(E,F,z[ce],D);if(xe===null){F===null&&(F=ge);break}e&&F&&xe.alternate===null&&t(E,F),S=i(xe,S,ce),be===null?ee=xe:be.sibling=xe,be=xe,F=ge}if(ce===z.length)return l(E,F),me&&zl(E,ce),ee;if(F===null){for(;ce<z.length;ce++)F=N(E,z[ce],D),F!==null&&(S=i(F,S,ce),be===null?ee=F:be.sibling=F,be=F);return me&&zl(E,ce),ee}for(F=a(F);ce<z.length;ce++)ge=M(F,E,ce,z[ce],D),ge!==null&&(e&&ge.alternate!==null&&F.delete(ge.key===null?ce:ge.key),S=i(ge,S,ce),be===null?ee=ge:be.sibling=ge,be=ge);return e&&F.forEach(function(ha){return t(E,ha)}),me&&zl(E,ce),ee}function te(E,S,z,D){if(z==null)throw Error(c(151));for(var ee=null,be=null,F=S,ce=S=0,ge=null,xe=z.next();F!==null&&!xe.done;ce++,xe=z.next()){F.index>ce?(ge=F,F=null):ge=F.sibling;var ha=w(E,F,xe.value,D);if(ha===null){F===null&&(F=ge);break}e&&F&&ha.alternate===null&&t(E,F),S=i(ha,S,ce),be===null?ee=ha:be.sibling=ha,be=ha,F=ge}if(xe.done)return l(E,F),me&&zl(E,ce),ee;if(F===null){for(;!xe.done;ce++,xe=z.next())xe=N(E,xe.value,D),xe!==null&&(S=i(xe,S,ce),be===null?ee=xe:be.sibling=xe,be=xe);return me&&zl(E,ce),ee}for(F=a(F);!xe.done;ce++,xe=z.next())xe=M(F,E,ce,xe.value,D),xe!==null&&(e&&xe.alternate!==null&&F.delete(xe.key===null?ce:xe.key),S=i(xe,S,ce),be===null?ee=xe:be.sibling=xe,be=xe);return e&&F.forEach(function(Fm){return t(E,Fm)}),me&&zl(E,ce),ee}function Me(E,S,z,D){if(typeof z=="object"&&z!==null&&z.type===q&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case X:e:{for(var ee=z.key;S!==null;){if(S.key===ee){if(ee=z.type,ee===q){if(S.tag===7){l(E,S.sibling),D=n(S,z.props.children),D.return=E,E=D;break e}}else if(S.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===Ye&&Ra(ee)===S.type){l(E,S.sibling),D=n(S,z.props),Wn(D,z),D.return=E,E=D;break e}l(E,S);break}else t(E,S);S=S.sibling}z.type===q?(D=Ta(z.props.children,E.mode,D,z.key),D.return=E,E=D):(D=lu(z.type,z.key,z.props,null,E.mode,D),Wn(D,z),D.return=E,E=D)}return o(E);case Y:e:{for(ee=z.key;S!==null;){if(S.key===ee)if(S.tag===4&&S.stateNode.containerInfo===z.containerInfo&&S.stateNode.implementation===z.implementation){l(E,S.sibling),D=n(S,z.children||[]),D.return=E,E=D;break e}else{l(E,S);break}else t(E,S);S=S.sibling}D=qr(z,E.mode,D),D.return=E,E=D}return o(E);case Ye:return z=Ra(z),Me(E,S,z,D)}if(re(z))return K(E,S,z,D);if($(z)){if(ee=$(z),typeof ee!="function")throw Error(c(150));return z=ee.call(z),te(E,S,z,D)}if(typeof z.then=="function")return Me(E,S,su(z),D);if(z.$$typeof===Oe)return Me(E,S,iu(E,z),D);ou(E,z)}return typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint"?(z=""+z,S!==null&&S.tag===6?(l(E,S.sibling),D=n(S,z),D.return=E,E=D):(l(E,S),D=Br(z,E.mode,D),D.return=E,E=D),o(E)):l(E,S)}return function(E,S,z,D){try{$n=0;var ee=Me(E,S,z,D);return an=null,ee}catch(F){if(F===ln||F===ru)throw F;var be=Ot(29,F,null,E.mode);return be.lanes=D,be.return=E,be}}}var wa=ef(!0),tf=ef(!1),Wl=!1;function Ir(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Pr(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Fl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Il(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Te&2)!==0){var n=a.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),a.pending=t,t=tu(e),Lo(e,null,l),t}return eu(e,a,t,l),tu(e)}function Fn(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,Mn(e,l)}}function ec(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var n=null,i=null;if(l=l.firstBaseUpdate,l!==null){do{var o={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};i===null?n=i=o:i=i.next=o,l=l.next}while(l!==null);i===null?n=i=t:i=i.next=t}else n=i=t;l={baseState:a.baseState,firstBaseUpdate:n,lastBaseUpdate:i,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var tc=!1;function In(){if(tc){var e=tn;if(e!==null)throw e}}function Pn(e,t,l,a){tc=!1;var n=e.updateQueue;Wl=!1;var i=n.firstBaseUpdate,o=n.lastBaseUpdate,h=n.shared.pending;if(h!==null){n.shared.pending=null;var v=h,R=v.next;v.next=null,o===null?i=R:o.next=R,o=v;var C=e.alternate;C!==null&&(C=C.updateQueue,h=C.lastBaseUpdate,h!==o&&(h===null?C.firstBaseUpdate=R:h.next=R,C.lastBaseUpdate=v))}if(i!==null){var N=n.baseState;o=0,C=R=v=null,h=i;do{var w=h.lane&-536870913,M=w!==h.lane;if(M?(pe&w)===w:(a&w)===w){w!==0&&w===en&&(tc=!0),C!==null&&(C=C.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});e:{var K=e,te=h;w=t;var Me=l;switch(te.tag){case 1:if(K=te.payload,typeof K=="function"){N=K.call(Me,N,w);break e}N=K;break e;case 3:K.flags=K.flags&-65537|128;case 0:if(K=te.payload,w=typeof K=="function"?K.call(Me,N,w):K,w==null)break e;N=A({},N,w);break e;case 2:Wl=!0}}w=h.callback,w!==null&&(e.flags|=64,M&&(e.flags|=8192),M=n.callbacks,M===null?n.callbacks=[w]:M.push(w))}else M={lane:w,tag:h.tag,payload:h.payload,callback:h.callback,next:null},C===null?(R=C=M,v=N):C=C.next=M,o|=w;if(h=h.next,h===null){if(h=n.shared.pending,h===null)break;M=h,h=M.next,M.next=null,n.lastBaseUpdate=M,n.shared.pending=null}}while(!0);C===null&&(v=N),n.baseState=v,n.firstBaseUpdate=R,n.lastBaseUpdate=C,i===null&&(n.shared.lanes=0),aa|=o,e.lanes=o,e.memoizedState=N}}function lf(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function af(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)lf(l[e],t)}var nn=b(null),fu=b(0);function nf(e,t){e=Hl,L(fu,e),L(nn,t),Hl=e|t.baseLanes}function lc(){L(fu,Hl),L(nn,nn.current)}function ac(){Hl=fu.current,U(nn),U(fu)}var Dt=b(null),$t=null;function Pl(e){var t=e.alternate;L(Ke,Ke.current&1),L(Dt,e),$t===null&&(t===null||nn.current!==null||t.memoizedState!==null)&&($t=e)}function nc(e){L(Ke,Ke.current),L(Dt,e),$t===null&&($t=e)}function uf(e){e.tag===22?(L(Ke,Ke.current),L(Dt,e),$t===null&&($t=e)):ea()}function ea(){L(Ke,Ke.current),L(Dt,Dt.current)}function Nt(e){U(Dt),$t===e&&($t=null),U(Ke)}var Ke=b(0);function du(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||os(l)||fs(l)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var wl=0,ie=null,we=null,Pe=null,hu=!1,un=!1,ja=!1,pu=0,ei=0,rn=null,Gg=0;function Qe(){throw Error(c(321))}function ic(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!Ct(e[l],t[l]))return!1;return!0}function uc(e,t,l,a,n,i){return wl=i,ie=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,k.H=e===null||e.memoizedState===null?Xf:Sc,ja=!1,i=l(a,n),ja=!1,un&&(i=cf(t,l,a,n)),rf(e),i}function rf(e){k.H=ai;var t=we!==null&&we.next!==null;if(wl=0,Pe=we=ie=null,hu=!1,ei=0,rn=null,t)throw Error(c(300));e===null||et||(e=e.dependencies,e!==null&&nu(e)&&(et=!0))}function cf(e,t,l,a){ie=e;var n=0;do{if(un&&(rn=null),ei=0,un=!1,25<=n)throw Error(c(301));if(n+=1,Pe=we=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}k.H=Qf,i=t(l,a)}while(un);return i}function Yg(){var e=k.H,t=e.useState()[0];return t=typeof t.then=="function"?ti(t):t,e=e.useState()[0],(we!==null?we.memoizedState:null)!==e&&(ie.flags|=1024),t}function rc(){var e=pu!==0;return pu=0,e}function cc(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function sc(e){if(hu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}hu=!1}wl=0,Pe=we=ie=null,un=!1,ei=pu=0,rn=null}function gt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Pe===null?ie.memoizedState=Pe=e:Pe=Pe.next=e,Pe}function Je(){if(we===null){var e=ie.alternate;e=e!==null?e.memoizedState:null}else e=we.next;var t=Pe===null?ie.memoizedState:Pe.next;if(t!==null)Pe=t,we=e;else{if(e===null)throw ie.alternate===null?Error(c(467)):Error(c(310));we=e,e={memoizedState:we.memoizedState,baseState:we.baseState,baseQueue:we.baseQueue,queue:we.queue,next:null},Pe===null?ie.memoizedState=Pe=e:Pe=Pe.next=e}return Pe}function gu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ti(e){var t=ei;return ei+=1,rn===null&&(rn=[]),e=Fo(rn,e,t),t=ie,(Pe===null?t.memoizedState:Pe.next)===null&&(t=t.alternate,k.H=t===null||t.memoizedState===null?Xf:Sc),e}function mu(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ti(e);if(e.$$typeof===Oe)return ft(e)}throw Error(c(438,String(e)))}function oc(e){var t=null,l=ie.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=ie.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(n){return n.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=gu(),ie.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),a=0;a<e;a++)l[a]=wt;return t.index++,l}function jl(e,t){return typeof t=="function"?t(e):t}function yu(e){var t=Je();return fc(t,we,e)}function fc(e,t,l){var a=e.queue;if(a===null)throw Error(c(311));a.lastRenderedReducer=l;var n=e.baseQueue,i=a.pending;if(i!==null){if(n!==null){var o=n.next;n.next=i.next,i.next=o}t.baseQueue=n=i,a.pending=null}if(i=e.baseState,n===null)e.memoizedState=i;else{t=n.next;var h=o=null,v=null,R=t,C=!1;do{var N=R.lane&-536870913;if(N!==R.lane?(pe&N)===N:(wl&N)===N){var w=R.revertLane;if(w===0)v!==null&&(v=v.next={lane:0,revertLane:0,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null}),N===en&&(C=!0);else if((wl&w)===w){R=R.next,w===en&&(C=!0);continue}else N={lane:0,revertLane:R.revertLane,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},v===null?(h=v=N,o=i):v=v.next=N,ie.lanes|=w,aa|=w;N=R.action,ja&&l(i,N),i=R.hasEagerState?R.eagerState:l(i,N)}else w={lane:N,revertLane:R.revertLane,gesture:R.gesture,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},v===null?(h=v=w,o=i):v=v.next=w,ie.lanes|=N,aa|=N;R=R.next}while(R!==null&&R!==t);if(v===null?o=i:v.next=h,!Ct(i,e.memoizedState)&&(et=!0,C&&(l=tn,l!==null)))throw l;e.memoizedState=i,e.baseState=o,e.baseQueue=v,a.lastRenderedState=i}return n===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function dc(e){var t=Je(),l=t.queue;if(l===null)throw Error(c(311));l.lastRenderedReducer=e;var a=l.dispatch,n=l.pending,i=t.memoizedState;if(n!==null){l.pending=null;var o=n=n.next;do i=e(i,o.action),o=o.next;while(o!==n);Ct(i,t.memoizedState)||(et=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),l.lastRenderedState=i}return[i,a]}function sf(e,t,l){var a=ie,n=Je(),i=me;if(i){if(l===void 0)throw Error(c(407));l=l()}else l=t();var o=!Ct((we||n).memoizedState,l);if(o&&(n.memoizedState=l,et=!0),n=n.queue,gc(df.bind(null,a,n,e),[e]),n.getSnapshot!==t||o||Pe!==null&&Pe.memoizedState.tag&1){if(a.flags|=2048,cn(9,{destroy:void 0},ff.bind(null,a,n,l,t),null),De===null)throw Error(c(349));i||(wl&127)!==0||of(a,t,l)}return l}function of(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=ie.updateQueue,t===null?(t=gu(),ie.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function ff(e,t,l,a){t.value=l,t.getSnapshot=a,hf(t)&&pf(e)}function df(e,t,l){return l(function(){hf(t)&&pf(e)})}function hf(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!Ct(e,l)}catch{return!0}}function pf(e){var t=Sa(e,2);t!==null&&Rt(t,e,2)}function hc(e){var t=gt();if(typeof e=="function"){var l=e;if(e=l(),ja){it(!0);try{l()}finally{it(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jl,lastRenderedState:e},t}function gf(e,t,l,a){return e.baseState=l,fc(e,we,typeof a=="function"?a:jl)}function Xg(e,t,l,a,n){if(xu(e))throw Error(c(485));if(e=t.action,e!==null){var i={payload:n,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){i.listeners.push(o)}};k.T!==null?l(!0):i.isTransition=!1,a(i),l=t.pending,l===null?(i.next=t.pending=i,mf(t,i)):(i.next=l.next,t.pending=l.next=i)}}function mf(e,t){var l=t.action,a=t.payload,n=e.state;if(t.isTransition){var i=k.T,o={};k.T=o;try{var h=l(n,a),v=k.S;v!==null&&v(o,h),yf(e,t,h)}catch(R){pc(e,t,R)}finally{i!==null&&o.types!==null&&(i.types=o.types),k.T=i}}else try{i=l(n,a),yf(e,t,i)}catch(R){pc(e,t,R)}}function yf(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){vf(e,t,a)},function(a){return pc(e,t,a)}):vf(e,t,l)}function vf(e,t,l){t.status="fulfilled",t.value=l,bf(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,mf(e,l)))}function pc(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,bf(t),t=t.next;while(t!==a)}e.action=null}function bf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function xf(e,t){return t}function Sf(e,t){if(me){var l=De.formState;if(l!==null){e:{var a=ie;if(me){if(Ue){t:{for(var n=Ue,i=Jt;n.nodeType!==8;){if(!i){n=null;break t}if(n=Wt(n.nextSibling),n===null){n=null;break t}}i=n.data,n=i==="F!"||i==="F"?n:null}if(n){Ue=Wt(n.nextSibling),a=n.data==="F!";break e}}Jl(a)}a=!1}a&&(t=l[0])}}return l=gt(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xf,lastRenderedState:t},l.queue=a,l=qf.bind(null,ie,a),a.dispatch=l,a=hc(!1),i=xc.bind(null,ie,!1,a.queue),a=gt(),n={state:t,dispatch:null,action:e,pending:null},a.queue=n,l=Xg.bind(null,ie,n,i,l),n.dispatch=l,a.memoizedState=e,[t,l,!1]}function Tf(e){var t=Je();return Ef(t,we,e)}function Ef(e,t,l){if(t=fc(e,t,xf)[0],e=yu(jl)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=ti(t)}catch(o){throw o===ln?ru:o}else a=t;t=Je();var n=t.queue,i=n.dispatch;return l!==t.memoizedState&&(ie.flags|=2048,cn(9,{destroy:void 0},Qg.bind(null,n,l),null)),[a,i,e]}function Qg(e,t){e.action=t}function Af(e){var t=Je(),l=we;if(l!==null)return Ef(t,l,e);Je(),t=t.memoizedState,l=Je();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function cn(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=ie.updateQueue,t===null&&(t=gu(),ie.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(a=l.next,l.next=e,e.next=a,t.lastEffect=e),e}function _f(){return Je().memoizedState}function vu(e,t,l,a){var n=gt();ie.flags|=e,n.memoizedState=cn(1|t,{destroy:void 0},l,a===void 0?null:a)}function bu(e,t,l,a){var n=Je();a=a===void 0?null:a;var i=n.memoizedState.inst;we!==null&&a!==null&&ic(a,we.memoizedState.deps)?n.memoizedState=cn(t,i,l,a):(ie.flags|=e,n.memoizedState=cn(1|t,i,l,a))}function zf(e,t){vu(8390656,8,e,t)}function gc(e,t){bu(2048,8,e,t)}function Zg(e){ie.flags|=4;var t=ie.updateQueue;if(t===null)t=gu(),ie.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Rf(e){var t=Je().memoizedState;return Zg({ref:t,nextImpl:e}),function(){if((Te&2)!==0)throw Error(c(440));return t.impl.apply(void 0,arguments)}}function kf(e,t){return bu(4,2,e,t)}function wf(e,t){return bu(4,4,e,t)}function jf(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Mf(e,t,l){l=l!=null?l.concat([e]):null,bu(4,4,jf.bind(null,t,e),l)}function mc(){}function Cf(e,t){var l=Je();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&ic(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function Of(e,t){var l=Je();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&ic(t,a[1]))return a[0];if(a=e(),ja){it(!0);try{e()}finally{it(!1)}}return l.memoizedState=[a,t],a}function yc(e,t,l){return l===void 0||(wl&1073741824)!==0&&(pe&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=Dd(),ie.lanes|=e,aa|=e,l)}function Df(e,t,l,a){return Ct(l,t)?l:nn.current!==null?(e=yc(e,l,a),Ct(e,t)||(et=!0),e):(wl&42)===0||(wl&1073741824)!==0&&(pe&261930)===0?(et=!0,e.memoizedState=l):(e=Dd(),ie.lanes|=e,aa|=e,t)}function Nf(e,t,l,a,n){var i=B.p;B.p=i!==0&&8>i?i:8;var o=k.T,h={};k.T=h,xc(e,!1,t,l);try{var v=n(),R=k.S;if(R!==null&&R(h,v),v!==null&&typeof v=="object"&&typeof v.then=="function"){var C=qg(v,a);li(e,t,C,Lt(e))}else li(e,t,a,Lt(e))}catch(N){li(e,t,{then:function(){},status:"rejected",reason:N},Lt())}finally{B.p=i,o!==null&&h.types!==null&&(o.types=h.types),k.T=o}}function Vg(){}function vc(e,t,l,a){if(e.tag!==5)throw Error(c(476));var n=Uf(e).queue;Nf(e,n,t,P,l===null?Vg:function(){return Hf(e),l(a)})}function Uf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:P,baseState:P,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jl,lastRenderedState:P},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jl,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Hf(e){var t=Uf(e);t.next===null&&(t=e.alternate.memoizedState),li(e,t.next.queue,{},Lt())}function bc(){return ft(bi)}function Lf(){return Je().memoizedState}function Bf(){return Je().memoizedState}function Kg(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Lt();e=Fl(l);var a=Il(t,e,l);a!==null&&(Rt(a,t,l),Fn(a,t,l)),t={cache:Jr()},e.payload=t;return}t=t.return}}function Jg(e,t,l){var a=Lt();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},xu(e)?Gf(t,l):(l=Hr(e,t,l,a),l!==null&&(Rt(l,e,a),Yf(l,t,a)))}function qf(e,t,l){var a=Lt();li(e,t,l,a)}function li(e,t,l,a){var n={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(xu(e))Gf(t,n);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,h=i(o,l);if(n.hasEagerState=!0,n.eagerState=h,Ct(h,o))return eu(e,t,n,0),De===null&&Pi(),!1}catch{}if(l=Hr(e,t,n,a),l!==null)return Rt(l,e,a),Yf(l,t,a),!0}return!1}function xc(e,t,l,a){if(a={lane:2,revertLane:Ic(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},xu(e)){if(t)throw Error(c(479))}else t=Hr(e,l,a,2),t!==null&&Rt(t,e,2)}function xu(e){var t=e.alternate;return e===ie||t!==null&&t===ie}function Gf(e,t){un=hu=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Yf(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,Mn(e,l)}}var ai={readContext:ft,use:mu,useCallback:Qe,useContext:Qe,useEffect:Qe,useImperativeHandle:Qe,useLayoutEffect:Qe,useInsertionEffect:Qe,useMemo:Qe,useReducer:Qe,useRef:Qe,useState:Qe,useDebugValue:Qe,useDeferredValue:Qe,useTransition:Qe,useSyncExternalStore:Qe,useId:Qe,useHostTransitionStatus:Qe,useFormState:Qe,useActionState:Qe,useOptimistic:Qe,useMemoCache:Qe,useCacheRefresh:Qe};ai.useEffectEvent=Qe;var Xf={readContext:ft,use:mu,useCallback:function(e,t){return gt().memoizedState=[e,t===void 0?null:t],e},useContext:ft,useEffect:zf,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,vu(4194308,4,jf.bind(null,t,e),l)},useLayoutEffect:function(e,t){return vu(4194308,4,e,t)},useInsertionEffect:function(e,t){vu(4,2,e,t)},useMemo:function(e,t){var l=gt();t=t===void 0?null:t;var a=e();if(ja){it(!0);try{e()}finally{it(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=gt();if(l!==void 0){var n=l(t);if(ja){it(!0);try{l(t)}finally{it(!1)}}}else n=t;return a.memoizedState=a.baseState=n,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},a.queue=e,e=e.dispatch=Jg.bind(null,ie,e),[a.memoizedState,e]},useRef:function(e){var t=gt();return e={current:e},t.memoizedState=e},useState:function(e){e=hc(e);var t=e.queue,l=qf.bind(null,ie,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:mc,useDeferredValue:function(e,t){var l=gt();return yc(l,e,t)},useTransition:function(){var e=hc(!1);return e=Nf.bind(null,ie,e.queue,!0,!1),gt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=ie,n=gt();if(me){if(l===void 0)throw Error(c(407));l=l()}else{if(l=t(),De===null)throw Error(c(349));(pe&127)!==0||of(a,t,l)}n.memoizedState=l;var i={value:l,getSnapshot:t};return n.queue=i,zf(df.bind(null,a,i,e),[e]),a.flags|=2048,cn(9,{destroy:void 0},ff.bind(null,a,i,l,t),null),l},useId:function(){var e=gt(),t=De.identifierPrefix;if(me){var l=ol,a=sl;l=(a&~(1<<32-We(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=pu++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=Gg++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:bc,useFormState:Sf,useActionState:Sf,useOptimistic:function(e){var t=gt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=xc.bind(null,ie,!0,l),l.dispatch=t,[e,t]},useMemoCache:oc,useCacheRefresh:function(){return gt().memoizedState=Kg.bind(null,ie)},useEffectEvent:function(e){var t=gt(),l={impl:e};return t.memoizedState=l,function(){if((Te&2)!==0)throw Error(c(440));return l.impl.apply(void 0,arguments)}}},Sc={readContext:ft,use:mu,useCallback:Cf,useContext:ft,useEffect:gc,useImperativeHandle:Mf,useInsertionEffect:kf,useLayoutEffect:wf,useMemo:Of,useReducer:yu,useRef:_f,useState:function(){return yu(jl)},useDebugValue:mc,useDeferredValue:function(e,t){var l=Je();return Df(l,we.memoizedState,e,t)},useTransition:function(){var e=yu(jl)[0],t=Je().memoizedState;return[typeof e=="boolean"?e:ti(e),t]},useSyncExternalStore:sf,useId:Lf,useHostTransitionStatus:bc,useFormState:Tf,useActionState:Tf,useOptimistic:function(e,t){var l=Je();return gf(l,we,e,t)},useMemoCache:oc,useCacheRefresh:Bf};Sc.useEffectEvent=Rf;var Qf={readContext:ft,use:mu,useCallback:Cf,useContext:ft,useEffect:gc,useImperativeHandle:Mf,useInsertionEffect:kf,useLayoutEffect:wf,useMemo:Of,useReducer:dc,useRef:_f,useState:function(){return dc(jl)},useDebugValue:mc,useDeferredValue:function(e,t){var l=Je();return we===null?yc(l,e,t):Df(l,we.memoizedState,e,t)},useTransition:function(){var e=dc(jl)[0],t=Je().memoizedState;return[typeof e=="boolean"?e:ti(e),t]},useSyncExternalStore:sf,useId:Lf,useHostTransitionStatus:bc,useFormState:Af,useActionState:Af,useOptimistic:function(e,t){var l=Je();return we!==null?gf(l,we,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:oc,useCacheRefresh:Bf};Qf.useEffectEvent=Rf;function Tc(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:A({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var Ec={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=Lt(),n=Fl(a);n.payload=t,l!=null&&(n.callback=l),t=Il(e,n,a),t!==null&&(Rt(t,e,a),Fn(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=Lt(),n=Fl(a);n.tag=1,n.payload=t,l!=null&&(n.callback=l),t=Il(e,n,a),t!==null&&(Rt(t,e,a),Fn(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=Lt(),a=Fl(l);a.tag=2,t!=null&&(a.callback=t),t=Il(e,a,l),t!==null&&(Rt(t,e,l),Fn(t,e,l))}};function Zf(e,t,l,a,n,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,i,o):t.prototype&&t.prototype.isPureReactComponent?!Xn(l,a)||!Xn(n,i):!0}function Vf(e,t,l,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,a),t.state!==e&&Ec.enqueueReplaceState(t,t.state,null)}function Ma(e,t){var l=t;if("ref"in t){l={};for(var a in t)a!=="ref"&&(l[a]=t[a])}if(e=e.defaultProps){l===t&&(l=A({},l));for(var n in e)l[n]===void 0&&(l[n]=e[n])}return l}function Kf(e){Ii(e)}function Jf(e){console.error(e)}function $f(e){Ii(e)}function Su(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Wf(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(n){setTimeout(function(){throw n})}}function Ac(e,t,l){return l=Fl(l),l.tag=3,l.payload={element:null},l.callback=function(){Su(e,t)},l}function Ff(e){return e=Fl(e),e.tag=3,e}function If(e,t,l,a){var n=l.type.getDerivedStateFromError;if(typeof n=="function"){var i=a.value;e.payload=function(){return n(i)},e.callback=function(){Wf(t,l,a)}}var o=l.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(e.callback=function(){Wf(t,l,a),typeof n!="function"&&(na===null?na=new Set([this]):na.add(this));var h=a.stack;this.componentDidCatch(a.value,{componentStack:h!==null?h:""})})}function $g(e,t,l,a,n){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&Pa(t,l,n,!0),l=Dt.current,l!==null){switch(l.tag){case 31:case 13:return $t===null?Ou():l.alternate===null&&Ze===0&&(Ze=3),l.flags&=-257,l.flags|=65536,l.lanes=n,a===cu?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),$c(e,a,n)),!1;case 22:return l.flags|=65536,a===cu?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([a]):l.add(a)),$c(e,a,n)),!1}throw Error(c(435,l.tag))}return $c(e,a,n),Ou(),!1}if(me)return t=Dt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=n,a!==Xr&&(e=Error(c(422),{cause:a}),Vn(Zt(e,l)))):(a!==Xr&&(t=Error(c(423),{cause:a}),Vn(Zt(t,l))),e=e.current.alternate,e.flags|=65536,n&=-n,e.lanes|=n,a=Zt(a,l),n=Ac(e.stateNode,a,n),ec(e,n),Ze!==4&&(Ze=2)),!1;var i=Error(c(520),{cause:a});if(i=Zt(i,l),fi===null?fi=[i]:fi.push(i),Ze!==4&&(Ze=2),t===null)return!0;a=Zt(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=n&-n,l.lanes|=e,e=Ac(l.stateNode,a,e),ec(l,e),!1;case 1:if(t=l.type,i=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(na===null||!na.has(i))))return l.flags|=65536,n&=-n,l.lanes|=n,n=Ff(n),If(n,e,l,a),ec(l,n),!1}l=l.return}while(l!==null);return!1}var _c=Error(c(461)),et=!1;function dt(e,t,l,a){t.child=e===null?tf(t,null,l,a):wa(t,e.child,l,a)}function Pf(e,t,l,a,n){l=l.render;var i=t.ref;if("ref"in a){var o={};for(var h in a)h!=="ref"&&(o[h]=a[h])}else o=a;return _a(t),a=uc(e,t,l,o,i,n),h=rc(),e!==null&&!et?(cc(e,t,n),Ml(e,t,n)):(me&&h&&Gr(t),t.flags|=1,dt(e,t,a,n),t.child)}function ed(e,t,l,a,n){if(e===null){var i=l.type;return typeof i=="function"&&!Lr(i)&&i.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=i,td(e,t,i,a,n)):(e=lu(l.type,null,a,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!Oc(e,n)){var o=i.memoizedProps;if(l=l.compare,l=l!==null?l:Xn,l(o,a)&&e.ref===t.ref)return Ml(e,t,n)}return t.flags|=1,e=_l(i,a),e.ref=t.ref,e.return=t,t.child=e}function td(e,t,l,a,n){if(e!==null){var i=e.memoizedProps;if(Xn(i,a)&&e.ref===t.ref)if(et=!1,t.pendingProps=a=i,Oc(e,n))(e.flags&131072)!==0&&(et=!0);else return t.lanes=e.lanes,Ml(e,t,n)}return zc(e,t,l,a,n)}function ld(e,t,l,a){var n=a.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(i=i!==null?i.baseLanes|l:l,e!==null){for(a=t.child=e.child,n=0;a!==null;)n=n|a.lanes|a.childLanes,a=a.sibling;a=n&~i}else a=0,t.child=null;return ad(e,t,i,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&uu(t,i!==null?i.cachePool:null),i!==null?nf(t,i):lc(),uf(t);else return a=t.lanes=536870912,ad(e,t,i!==null?i.baseLanes|l:l,l,a)}else i!==null?(uu(t,i.cachePool),nf(t,i),ea(),t.memoizedState=null):(e!==null&&uu(t,null),lc(),ea());return dt(e,t,n,l),t.child}function ni(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ad(e,t,l,a,n){var i=Wr();return i=i===null?null:{parent:Ie._currentValue,pool:i},t.memoizedState={baseLanes:l,cachePool:i},e!==null&&uu(t,null),lc(),uf(t),e!==null&&Pa(e,t,a,!0),t.childLanes=n,null}function Tu(e,t){return t=Au({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function nd(e,t,l){return wa(t,e.child,null,l),e=Tu(t,t.pendingProps),e.flags|=2,Nt(t),t.memoizedState=null,e}function Wg(e,t,l){var a=t.pendingProps,n=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(me){if(a.mode==="hidden")return e=Tu(t,a),t.lanes=536870912,ni(null,e);if(nc(t),(e=Ue)?(e=mh(e,Jt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Vl!==null?{id:sl,overflow:ol}:null,retryLane:536870912,hydrationErrors:null},l=qo(e),l.return=t,t.child=l,ot=t,Ue=null)):e=null,e===null)throw Jl(t);return t.lanes=536870912,null}return Tu(t,a)}var i=e.memoizedState;if(i!==null){var o=i.dehydrated;if(nc(t),n)if(t.flags&256)t.flags&=-257,t=nd(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(c(558));else if(et||Pa(e,t,l,!1),n=(l&e.childLanes)!==0,et||n){if(a=De,a!==null&&(o=Li(a,l),o!==0&&o!==i.retryLane))throw i.retryLane=o,Sa(e,o),Rt(a,e,o),_c;Ou(),t=nd(e,t,l)}else e=i.treeContext,Ue=Wt(o.nextSibling),ot=t,me=!0,Kl=null,Jt=!1,e!==null&&Xo(t,e),t=Tu(t,a),t.flags|=4096;return t}return e=_l(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Eu(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(c(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function zc(e,t,l,a,n){return _a(t),l=uc(e,t,l,a,void 0,n),a=rc(),e!==null&&!et?(cc(e,t,n),Ml(e,t,n)):(me&&a&&Gr(t),t.flags|=1,dt(e,t,l,n),t.child)}function id(e,t,l,a,n,i){return _a(t),t.updateQueue=null,l=cf(t,a,l,n),rf(e),a=rc(),e!==null&&!et?(cc(e,t,i),Ml(e,t,i)):(me&&a&&Gr(t),t.flags|=1,dt(e,t,l,i),t.child)}function ud(e,t,l,a,n){if(_a(t),t.stateNode===null){var i=$a,o=l.contextType;typeof o=="object"&&o!==null&&(i=ft(o)),i=new l(a,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Ec,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=a,i.state=t.memoizedState,i.refs={},Ir(t),o=l.contextType,i.context=typeof o=="object"&&o!==null?ft(o):$a,i.state=t.memoizedState,o=l.getDerivedStateFromProps,typeof o=="function"&&(Tc(t,l,o,a),i.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(o=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),o!==i.state&&Ec.enqueueReplaceState(i,i.state,null),Pn(t,a,i,n),In(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){i=t.stateNode;var h=t.memoizedProps,v=Ma(l,h);i.props=v;var R=i.context,C=l.contextType;o=$a,typeof C=="object"&&C!==null&&(o=ft(C));var N=l.getDerivedStateFromProps;C=typeof N=="function"||typeof i.getSnapshotBeforeUpdate=="function",h=t.pendingProps!==h,C||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(h||R!==o)&&Vf(t,i,a,o),Wl=!1;var w=t.memoizedState;i.state=w,Pn(t,a,i,n),In(),R=t.memoizedState,h||w!==R||Wl?(typeof N=="function"&&(Tc(t,l,N,a),R=t.memoizedState),(v=Wl||Zf(t,l,v,a,w,R,o))?(C||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=R),i.props=a,i.state=R,i.context=o,a=v):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{i=t.stateNode,Pr(e,t),o=t.memoizedProps,C=Ma(l,o),i.props=C,N=t.pendingProps,w=i.context,R=l.contextType,v=$a,typeof R=="object"&&R!==null&&(v=ft(R)),h=l.getDerivedStateFromProps,(R=typeof h=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o!==N||w!==v)&&Vf(t,i,a,v),Wl=!1,w=t.memoizedState,i.state=w,Pn(t,a,i,n),In();var M=t.memoizedState;o!==N||w!==M||Wl||e!==null&&e.dependencies!==null&&nu(e.dependencies)?(typeof h=="function"&&(Tc(t,l,h,a),M=t.memoizedState),(C=Wl||Zf(t,l,C,a,w,M,v)||e!==null&&e.dependencies!==null&&nu(e.dependencies))?(R||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(a,M,v),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(a,M,v)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&w===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&w===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=M),i.props=a,i.state=M,i.context=v,a=C):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&w===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&w===e.memoizedState||(t.flags|=1024),a=!1)}return i=a,Eu(e,t),a=(t.flags&128)!==0,i||a?(i=t.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&a?(t.child=wa(t,e.child,null,n),t.child=wa(t,null,l,n)):dt(e,t,l,n),t.memoizedState=i.state,e=t.child):e=Ml(e,t,n),e}function rd(e,t,l,a){return Ea(),t.flags|=256,dt(e,t,l,a),t.child}var Rc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function kc(e){return{baseLanes:e,cachePool:$o()}}function wc(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=Ht),e}function cd(e,t,l){var a=t.pendingProps,n=!1,i=(t.flags&128)!==0,o;if((o=i)||(o=e!==null&&e.memoizedState===null?!1:(Ke.current&2)!==0),o&&(n=!0,t.flags&=-129),o=(t.flags&32)!==0,t.flags&=-33,e===null){if(me){if(n?Pl(t):ea(),(e=Ue)?(e=mh(e,Jt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Vl!==null?{id:sl,overflow:ol}:null,retryLane:536870912,hydrationErrors:null},l=qo(e),l.return=t,t.child=l,ot=t,Ue=null)):e=null,e===null)throw Jl(t);return fs(e)?t.lanes=32:t.lanes=536870912,null}var h=a.children;return a=a.fallback,n?(ea(),n=t.mode,h=Au({mode:"hidden",children:h},n),a=Ta(a,n,l,null),h.return=t,a.return=t,h.sibling=a,t.child=h,a=t.child,a.memoizedState=kc(l),a.childLanes=wc(e,o,l),t.memoizedState=Rc,ni(null,a)):(Pl(t),jc(t,h))}var v=e.memoizedState;if(v!==null&&(h=v.dehydrated,h!==null)){if(i)t.flags&256?(Pl(t),t.flags&=-257,t=Mc(e,t,l)):t.memoizedState!==null?(ea(),t.child=e.child,t.flags|=128,t=null):(ea(),h=a.fallback,n=t.mode,a=Au({mode:"visible",children:a.children},n),h=Ta(h,n,l,null),h.flags|=2,a.return=t,h.return=t,a.sibling=h,t.child=a,wa(t,e.child,null,l),a=t.child,a.memoizedState=kc(l),a.childLanes=wc(e,o,l),t.memoizedState=Rc,t=ni(null,a));else if(Pl(t),fs(h)){if(o=h.nextSibling&&h.nextSibling.dataset,o)var R=o.dgst;o=R,a=Error(c(419)),a.stack="",a.digest=o,Vn({value:a,source:null,stack:null}),t=Mc(e,t,l)}else if(et||Pa(e,t,l,!1),o=(l&e.childLanes)!==0,et||o){if(o=De,o!==null&&(a=Li(o,l),a!==0&&a!==v.retryLane))throw v.retryLane=a,Sa(e,a),Rt(o,e,a),_c;os(h)||Ou(),t=Mc(e,t,l)}else os(h)?(t.flags|=192,t.child=e.child,t=null):(e=v.treeContext,Ue=Wt(h.nextSibling),ot=t,me=!0,Kl=null,Jt=!1,e!==null&&Xo(t,e),t=jc(t,a.children),t.flags|=4096);return t}return n?(ea(),h=a.fallback,n=t.mode,v=e.child,R=v.sibling,a=_l(v,{mode:"hidden",children:a.children}),a.subtreeFlags=v.subtreeFlags&65011712,R!==null?h=_l(R,h):(h=Ta(h,n,l,null),h.flags|=2),h.return=t,a.return=t,a.sibling=h,t.child=a,ni(null,a),a=t.child,h=e.child.memoizedState,h===null?h=kc(l):(n=h.cachePool,n!==null?(v=Ie._currentValue,n=n.parent!==v?{parent:v,pool:v}:n):n=$o(),h={baseLanes:h.baseLanes|l,cachePool:n}),a.memoizedState=h,a.childLanes=wc(e,o,l),t.memoizedState=Rc,ni(e.child,a)):(Pl(t),l=e.child,e=l.sibling,l=_l(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=l,t.memoizedState=null,l)}function jc(e,t){return t=Au({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Au(e,t){return e=Ot(22,e,null,t),e.lanes=0,e}function Mc(e,t,l){return wa(t,e.child,null,l),e=jc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function sd(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Vr(e.return,t,l)}function Cc(e,t,l,a,n,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:n,treeForkCount:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=a,o.tail=l,o.tailMode=n,o.treeForkCount=i)}function od(e,t,l){var a=t.pendingProps,n=a.revealOrder,i=a.tail;a=a.children;var o=Ke.current,h=(o&2)!==0;if(h?(o=o&1|2,t.flags|=128):o&=1,L(Ke,o),dt(e,t,a,l),a=me?Zn:0,!h&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&sd(e,l,t);else if(e.tag===19)sd(e,l,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(n){case"forwards":for(l=t.child,n=null;l!==null;)e=l.alternate,e!==null&&du(e)===null&&(n=l),l=l.sibling;l=n,l===null?(n=t.child,t.child=null):(n=l.sibling,l.sibling=null),Cc(t,!1,n,l,i,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&du(e)===null){t.child=n;break}e=n.sibling,n.sibling=l,l=n,n=e}Cc(t,!0,l,null,i,a);break;case"together":Cc(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function Ml(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),aa|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(Pa(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(c(153));if(t.child!==null){for(e=t.child,l=_l(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=_l(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function Oc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&nu(e)))}function Fg(e,t,l){switch(t.tag){case 3:Xe(t,t.stateNode.containerInfo),$l(t,Ie,e.memoizedState.cache),Ea();break;case 27:case 5:pl(t);break;case 4:Xe(t,t.stateNode.containerInfo);break;case 10:$l(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,nc(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(Pl(t),t.flags|=128,null):(l&t.child.childLanes)!==0?cd(e,t,l):(Pl(t),e=Ml(e,t,l),e!==null?e.sibling:null);Pl(t);break;case 19:var n=(e.flags&128)!==0;if(a=(l&t.childLanes)!==0,a||(Pa(e,t,l,!1),a=(l&t.childLanes)!==0),n){if(a)return od(e,t,l);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),L(Ke,Ke.current),a)break;return null;case 22:return t.lanes=0,ld(e,t,l,t.pendingProps);case 24:$l(t,Ie,e.memoizedState.cache)}return Ml(e,t,l)}function fd(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)et=!0;else{if(!Oc(e,l)&&(t.flags&128)===0)return et=!1,Fg(e,t,l);et=(e.flags&131072)!==0}else et=!1,me&&(t.flags&1048576)!==0&&Yo(t,Zn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=Ra(t.elementType),t.type=e,typeof e=="function")Lr(e)?(a=Ma(e,a),t.tag=1,t=ud(null,t,e,a,l)):(t.tag=0,t=zc(null,t,e,a,l));else{if(e!=null){var n=e.$$typeof;if(n===oe){t.tag=11,t=Pf(null,t,e,a,l);break e}else if(n===ue){t.tag=14,t=ed(null,t,e,a,l);break e}}throw t=Q(e)||e,Error(c(306,t,""))}}return t;case 0:return zc(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,n=Ma(a,t.pendingProps),ud(e,t,a,n,l);case 3:e:{if(Xe(t,t.stateNode.containerInfo),e===null)throw Error(c(387));a=t.pendingProps;var i=t.memoizedState;n=i.element,Pr(e,t),Pn(t,a,null,l);var o=t.memoizedState;if(a=o.cache,$l(t,Ie,a),a!==i.cache&&Kr(t,[Ie],l,!0),In(),a=o.element,i.isDehydrated)if(i={element:a,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=rd(e,t,a,l);break e}else if(a!==n){n=Zt(Error(c(424)),t),Vn(n),t=rd(e,t,a,l);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Ue=Wt(e.firstChild),ot=t,me=!0,Kl=null,Jt=!0,l=tf(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Ea(),a===n){t=Ml(e,t,l);break e}dt(e,t,a,l)}t=t.child}return t;case 26:return Eu(e,t),e===null?(l=Th(t.type,null,t.pendingProps,null))?t.memoizedState=l:me||(l=t.type,e=t.pendingProps,a=qu(ae.current).createElement(l),a[Fe]=t,a[Be]=e,ht(a,l,e),se(a),t.stateNode=a):t.memoizedState=Th(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return pl(t),e===null&&me&&(a=t.stateNode=bh(t.type,t.pendingProps,ae.current),ot=t,Jt=!0,n=Ue,ca(t.type)?(ds=n,Ue=Wt(a.firstChild)):Ue=n),dt(e,t,t.pendingProps.children,l),Eu(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&me&&((n=a=Ue)&&(a=Rm(a,t.type,t.pendingProps,Jt),a!==null?(t.stateNode=a,ot=t,Ue=Wt(a.firstChild),Jt=!1,n=!0):n=!1),n||Jl(t)),pl(t),n=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,rs(n,i)?a=null:o!==null&&rs(n,o)&&(t.flags|=32),t.memoizedState!==null&&(n=uc(e,t,Yg,null,null,l),bi._currentValue=n),Eu(e,t),dt(e,t,a,l),t.child;case 6:return e===null&&me&&((e=l=Ue)&&(l=km(l,t.pendingProps,Jt),l!==null?(t.stateNode=l,ot=t,Ue=null,e=!0):e=!1),e||Jl(t)),null;case 13:return cd(e,t,l);case 4:return Xe(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=wa(t,null,a,l):dt(e,t,a,l),t.child;case 11:return Pf(e,t,t.type,t.pendingProps,l);case 7:return dt(e,t,t.pendingProps,l),t.child;case 8:return dt(e,t,t.pendingProps.children,l),t.child;case 12:return dt(e,t,t.pendingProps.children,l),t.child;case 10:return a=t.pendingProps,$l(t,t.type,a.value),dt(e,t,a.children,l),t.child;case 9:return n=t.type._context,a=t.pendingProps.children,_a(t),n=ft(n),a=a(n),t.flags|=1,dt(e,t,a,l),t.child;case 14:return ed(e,t,t.type,t.pendingProps,l);case 15:return td(e,t,t.type,t.pendingProps,l);case 19:return od(e,t,l);case 31:return Wg(e,t,l);case 22:return ld(e,t,l,t.pendingProps);case 24:return _a(t),a=ft(Ie),e===null?(n=Wr(),n===null&&(n=De,i=Jr(),n.pooledCache=i,i.refCount++,i!==null&&(n.pooledCacheLanes|=l),n=i),t.memoizedState={parent:a,cache:n},Ir(t),$l(t,Ie,n)):((e.lanes&l)!==0&&(Pr(e,t),Pn(t,null,null,l),In()),n=e.memoizedState,i=t.memoizedState,n.parent!==a?(n={parent:a,cache:a},t.memoizedState=n,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=n),$l(t,Ie,a)):(a=i.cache,$l(t,Ie,a),a!==n.cache&&Kr(t,[Ie],l,!0))),dt(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(c(156,t.tag))}function Cl(e){e.flags|=4}function Dc(e,t,l,a,n){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(n&335544128)===n)if(e.stateNode.complete)e.flags|=8192;else if(Ld())e.flags|=8192;else throw ka=cu,Fr}else e.flags&=-16777217}function dd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Rh(t))if(Ld())e.flags|=8192;else throw ka=cu,Fr}function _u(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?xl():536870912,e.lanes|=t,dn|=t)}function ii(e,t){if(!me)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function He(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var n=e.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags&65011712,a|=n.flags&65011712,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags,a|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function Ig(e,t,l){var a=t.pendingProps;switch(Yr(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return He(t),null;case 1:return He(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),kl(Ie),Le(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Ia(t)?Cl(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Qr())),He(t),null;case 26:var n=t.type,i=t.memoizedState;return e===null?(Cl(t),i!==null?(He(t),dd(t,i)):(He(t),Dc(t,n,null,a,l))):i?i!==e.memoizedState?(Cl(t),He(t),dd(t,i)):(He(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&Cl(t),He(t),Dc(t,n,e,a,l)),null;case 27:if(pa(t),l=ae.current,n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Cl(t);else{if(!a){if(t.stateNode===null)throw Error(c(166));return He(t),null}e=V.current,Ia(t)?Qo(t):(e=bh(n,a,l),t.stateNode=e,Cl(t))}return He(t),null;case 5:if(pa(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Cl(t);else{if(!a){if(t.stateNode===null)throw Error(c(166));return He(t),null}if(i=V.current,Ia(t))Qo(t);else{var o=qu(ae.current);switch(i){case 1:i=o.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:i=o.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":i=o.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":i=o.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":i=o.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof a.is=="string"?o.createElement("select",{is:a.is}):o.createElement("select"),a.multiple?i.multiple=!0:a.size&&(i.size=a.size);break;default:i=typeof a.is=="string"?o.createElement(n,{is:a.is}):o.createElement(n)}}i[Fe]=t,i[Be]=a;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)i.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=i;e:switch(ht(i,n,a),n){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Cl(t)}}return He(t),Dc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Cl(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(c(166));if(e=ae.current,Ia(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,n=ot,n!==null)switch(n.tag){case 27:case 5:a=n.memoizedProps}e[Fe]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||ch(e.nodeValue,l)),e||Jl(t,!0)}else e=qu(e).createTextNode(a),e[Fe]=t,t.stateNode=e}return He(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=Ia(t),l!==null){if(e===null){if(!a)throw Error(c(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(557));e[Fe]=t}else Ea(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;He(t),e=!1}else l=Qr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(Nt(t),t):(Nt(t),null);if((t.flags&128)!==0)throw Error(c(558))}return He(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=Ia(t),a!==null&&a.dehydrated!==null){if(e===null){if(!n)throw Error(c(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(c(317));n[Fe]=t}else Ea(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;He(t),n=!1}else n=Qr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(Nt(t),t):(Nt(t),null)}return Nt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,n=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(n=a.alternate.memoizedState.cachePool.pool),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==n&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),_u(t,t.updateQueue),He(t),null);case 4:return Le(),e===null&&ls(t.stateNode.containerInfo),He(t),null;case 10:return kl(t.type),He(t),null;case 19:if(U(Ke),a=t.memoizedState,a===null)return He(t),null;if(n=(t.flags&128)!==0,i=a.rendering,i===null)if(n)ii(a,!1);else{if(Ze!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=du(e),i!==null){for(t.flags|=128,ii(a,!1),e=i.updateQueue,t.updateQueue=e,_u(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Bo(l,e),l=l.sibling;return L(Ke,Ke.current&1|2),me&&zl(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&ct()>ju&&(t.flags|=128,n=!0,ii(a,!1),t.lanes=4194304)}else{if(!n)if(e=du(i),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,_u(t,e),ii(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!me)return He(t),null}else 2*ct()-a.renderingStartTime>ju&&l!==536870912&&(t.flags|=128,n=!0,ii(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(e=a.last,e!==null?e.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=ct(),e.sibling=null,l=Ke.current,L(Ke,n?l&1|2:l&1),me&&zl(t,a.treeForkCount),e):(He(t),null);case 22:case 23:return Nt(t),ac(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(l&536870912)!==0&&(t.flags&128)===0&&(He(t),t.subtreeFlags&6&&(t.flags|=8192)):He(t),l=t.updateQueue,l!==null&&_u(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&U(za),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),kl(Ie),He(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function Pg(e,t){switch(Yr(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return kl(Ie),Le(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return pa(t),null;case 31:if(t.memoizedState!==null){if(Nt(t),t.alternate===null)throw Error(c(340));Ea()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Nt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));Ea()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return U(Ke),null;case 4:return Le(),null;case 10:return kl(t.type),null;case 22:case 23:return Nt(t),ac(),e!==null&&U(za),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return kl(Ie),null;case 25:return null;default:return null}}function hd(e,t){switch(Yr(t),t.tag){case 3:kl(Ie),Le();break;case 26:case 27:case 5:pa(t);break;case 4:Le();break;case 31:t.memoizedState!==null&&Nt(t);break;case 13:Nt(t);break;case 19:U(Ke);break;case 10:kl(t.type);break;case 22:case 23:Nt(t),ac(),e!==null&&U(za);break;case 24:kl(Ie)}}function ui(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var n=a.next;l=n;do{if((l.tag&e)===e){a=void 0;var i=l.create,o=l.inst;a=i(),o.destroy=a}l=l.next}while(l!==n)}}catch(h){ke(t,t.return,h)}}function ta(e,t,l){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var i=n.next;a=i;do{if((a.tag&e)===e){var o=a.inst,h=o.destroy;if(h!==void 0){o.destroy=void 0,n=t;var v=l,R=h;try{R()}catch(C){ke(n,v,C)}}}a=a.next}while(a!==i)}}catch(C){ke(t,t.return,C)}}function pd(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{af(t,l)}catch(a){ke(e,e.return,a)}}}function gd(e,t,l){l.props=Ma(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){ke(e,t,a)}}function ri(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(n){ke(e,t,n)}}function fl(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(n){ke(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(n){ke(e,t,n)}else l.current=null}function md(e){var t=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(n){ke(e,e.return,n)}}function Nc(e,t,l){try{var a=e.stateNode;Sm(a,e.type,l,t),a[Be]=t}catch(n){ke(e,e.return,n)}}function yd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ca(e.type)||e.tag===4}function Uc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||yd(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ca(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Hc(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=El));else if(a!==4&&(a===27&&ca(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(Hc(e,t,l),e=e.sibling;e!==null;)Hc(e,t,l),e=e.sibling}function zu(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(a!==4&&(a===27&&ca(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(zu(e,t,l),e=e.sibling;e!==null;)zu(e,t,l),e=e.sibling}function vd(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,n=t.attributes;n.length;)t.removeAttributeNode(n[0]);ht(t,a,l),t[Fe]=e,t[Be]=l}catch(i){ke(e,e.return,i)}}var Ol=!1,tt=!1,Lc=!1,bd=typeof WeakSet=="function"?WeakSet:Set,ut=null;function em(e,t){if(e=e.containerInfo,is=Ku,e=jo(e),Mr(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var n=a.anchorOffset,i=a.focusNode;a=a.focusOffset;try{l.nodeType,i.nodeType}catch{l=null;break e}var o=0,h=-1,v=-1,R=0,C=0,N=e,w=null;t:for(;;){for(var M;N!==l||n!==0&&N.nodeType!==3||(h=o+n),N!==i||a!==0&&N.nodeType!==3||(v=o+a),N.nodeType===3&&(o+=N.nodeValue.length),(M=N.firstChild)!==null;)w=N,N=M;for(;;){if(N===e)break t;if(w===l&&++R===n&&(h=o),w===i&&++C===a&&(v=o),(M=N.nextSibling)!==null)break;N=w,w=N.parentNode}N=M}l=h===-1||v===-1?null:{start:h,end:v}}else l=null}l=l||{start:0,end:0}}else l=null;for(us={focusedElem:e,selectionRange:l},Ku=!1,ut=t;ut!==null;)if(t=ut,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ut=e;else for(;ut!==null;){switch(t=ut,i=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l<e.length;l++)n=e[l],n.ref.impl=n.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,l=t,n=i.memoizedProps,i=i.memoizedState,a=l.stateNode;try{var K=Ma(l.type,n);e=a.getSnapshotBeforeUpdate(K,i),a.__reactInternalSnapshotBeforeUpdate=e}catch(te){ke(l,l.return,te)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)ss(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":ss(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(c(163))}if(e=t.sibling,e!==null){e.return=t.return,ut=e;break}ut=t.return}}function xd(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:Nl(e,l),a&4&&ui(5,l);break;case 1:if(Nl(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(o){ke(l,l.return,o)}else{var n=Ma(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(n,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){ke(l,l.return,o)}}a&64&&pd(l),a&512&&ri(l,l.return);break;case 3:if(Nl(e,l),a&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{af(e,t)}catch(o){ke(l,l.return,o)}}break;case 27:t===null&&a&4&&vd(l);case 26:case 5:Nl(e,l),t===null&&a&4&&md(l),a&512&&ri(l,l.return);break;case 12:Nl(e,l);break;case 31:Nl(e,l),a&4&&Ed(e,l);break;case 13:Nl(e,l),a&4&&Ad(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=sm.bind(null,l),wm(e,l))));break;case 22:if(a=l.memoizedState!==null||Ol,!a){t=t!==null&&t.memoizedState!==null||tt,n=Ol;var i=tt;Ol=a,(tt=t)&&!i?Ul(e,l,(l.subtreeFlags&8772)!==0):Nl(e,l),Ol=n,tt=i}break;case 30:break;default:Nl(e,l)}}function Sd(e){var t=e.alternate;t!==null&&(e.alternate=null,Sd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&x(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var qe=null,Et=!1;function Dl(e,t,l){for(l=l.child;l!==null;)Td(e,t,l),l=l.sibling}function Td(e,t,l){if(nt&&typeof nt.onCommitFiberUnmount=="function")try{nt.onCommitFiberUnmount(rl,l)}catch{}switch(l.tag){case 26:tt||fl(l,t),Dl(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:tt||fl(l,t);var a=qe,n=Et;ca(l.type)&&(qe=l.stateNode,Et=!1),Dl(e,t,l),mi(l.stateNode),qe=a,Et=n;break;case 5:tt||fl(l,t);case 6:if(a=qe,n=Et,qe=null,Dl(e,t,l),qe=a,Et=n,qe!==null)if(Et)try{(qe.nodeType===9?qe.body:qe.nodeName==="HTML"?qe.ownerDocument.body:qe).removeChild(l.stateNode)}catch(i){ke(l,t,i)}else try{qe.removeChild(l.stateNode)}catch(i){ke(l,t,i)}break;case 18:qe!==null&&(Et?(e=qe,ph(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),xn(e)):ph(qe,l.stateNode));break;case 4:a=qe,n=Et,qe=l.stateNode.containerInfo,Et=!0,Dl(e,t,l),qe=a,Et=n;break;case 0:case 11:case 14:case 15:ta(2,l,t),tt||ta(4,l,t),Dl(e,t,l);break;case 1:tt||(fl(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&gd(l,t,a)),Dl(e,t,l);break;case 21:Dl(e,t,l);break;case 22:tt=(a=tt)||l.memoizedState!==null,Dl(e,t,l),tt=a;break;default:Dl(e,t,l)}}function Ed(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{xn(e)}catch(l){ke(t,t.return,l)}}}function Ad(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{xn(e)}catch(l){ke(t,t.return,l)}}function tm(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new bd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new bd),t;default:throw Error(c(435,e.tag))}}function Ru(e,t){var l=tm(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var n=om.bind(null,e,a);a.then(n,n)}})}function At(e,t){var l=t.deletions;if(l!==null)for(var a=0;a<l.length;a++){var n=l[a],i=e,o=t,h=o;e:for(;h!==null;){switch(h.tag){case 27:if(ca(h.type)){qe=h.stateNode,Et=!1;break e}break;case 5:qe=h.stateNode,Et=!1;break e;case 3:case 4:qe=h.stateNode.containerInfo,Et=!0;break e}h=h.return}if(qe===null)throw Error(c(160));Td(i,o,n),qe=null,Et=!1,i=n.alternate,i!==null&&(i.return=null),n.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)_d(t,e),t=t.sibling}var ll=null;function _d(e,t){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:At(t,e),_t(e),a&4&&(ta(3,e,e.return),ui(3,e),ta(5,e,e.return));break;case 1:At(t,e),_t(e),a&512&&(tt||l===null||fl(l,l.return)),a&64&&Ol&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?a:l.concat(a))));break;case 26:var n=ll;if(At(t,e),_t(e),a&512&&(tt||l===null||fl(l,l.return)),a&4){var i=l!==null?l.memoizedState:null;if(a=e.memoizedState,l===null)if(a===null)if(e.stateNode===null){e:{a=e.type,l=e.memoizedProps,n=n.ownerDocument||n;t:switch(a){case"title":i=n.getElementsByTagName("title")[0],(!i||i[W]||i[Fe]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=n.createElement(a),n.head.insertBefore(i,n.querySelector("head > title"))),ht(i,a,l),i[Fe]=e,se(i),a=i;break e;case"link":var o=_h("link","href",n).get(a+(l.href||""));if(o){for(var h=0;h<o.length;h++)if(i=o[h],i.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&i.getAttribute("rel")===(l.rel==null?null:l.rel)&&i.getAttribute("title")===(l.title==null?null:l.title)&&i.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){o.splice(h,1);break t}}i=n.createElement(a),ht(i,a,l),n.head.appendChild(i);break;case"meta":if(o=_h("meta","content",n).get(a+(l.content||""))){for(h=0;h<o.length;h++)if(i=o[h],i.getAttribute("content")===(l.content==null?null:""+l.content)&&i.getAttribute("name")===(l.name==null?null:l.name)&&i.getAttribute("property")===(l.property==null?null:l.property)&&i.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&i.getAttribute("charset")===(l.charSet==null?null:l.charSet)){o.splice(h,1);break t}}i=n.createElement(a),ht(i,a,l),n.head.appendChild(i);break;default:throw Error(c(468,a))}i[Fe]=e,se(i),a=i}e.stateNode=a}else zh(n,e.type,e.stateNode);else e.stateNode=Ah(n,a,e.memoizedProps);else i!==a?(i===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):i.count--,a===null?zh(n,e.type,e.stateNode):Ah(n,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Nc(e,e.memoizedProps,l.memoizedProps)}break;case 27:At(t,e),_t(e),a&512&&(tt||l===null||fl(l,l.return)),l!==null&&a&4&&Nc(e,e.memoizedProps,l.memoizedProps);break;case 5:if(At(t,e),_t(e),a&512&&(tt||l===null||fl(l,l.return)),e.flags&32){n=e.stateNode;try{Ya(n,"")}catch(K){ke(e,e.return,K)}}a&4&&e.stateNode!=null&&(n=e.memoizedProps,Nc(e,n,l!==null?l.memoizedProps:n)),a&1024&&(Lc=!0);break;case 6:if(At(t,e),_t(e),a&4){if(e.stateNode===null)throw Error(c(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(K){ke(e,e.return,K)}}break;case 3:if(Xu=null,n=ll,ll=Gu(t.containerInfo),At(t,e),ll=n,_t(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{xn(t.containerInfo)}catch(K){ke(e,e.return,K)}Lc&&(Lc=!1,zd(e));break;case 4:a=ll,ll=Gu(e.stateNode.containerInfo),At(t,e),_t(e),ll=a;break;case 12:At(t,e),_t(e);break;case 31:At(t,e),_t(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Ru(e,a)));break;case 13:At(t,e),_t(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(wu=ct()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Ru(e,a)));break;case 22:n=e.memoizedState!==null;var v=l!==null&&l.memoizedState!==null,R=Ol,C=tt;if(Ol=R||n,tt=C||v,At(t,e),tt=C,Ol=R,_t(e),a&8192)e:for(t=e.stateNode,t._visibility=n?t._visibility&-2:t._visibility|1,n&&(l===null||v||Ol||tt||Ca(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){v=l=t;try{if(i=v.stateNode,n)o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none";else{h=v.stateNode;var N=v.memoizedProps.style,w=N!=null&&N.hasOwnProperty("display")?N.display:null;h.style.display=w==null||typeof w=="boolean"?"":(""+w).trim()}}catch(K){ke(v,v.return,K)}}}else if(t.tag===6){if(l===null){v=t;try{v.stateNode.nodeValue=n?"":v.memoizedProps}catch(K){ke(v,v.return,K)}}}else if(t.tag===18){if(l===null){v=t;try{var M=v.stateNode;n?gh(M,!0):gh(v.stateNode,!1)}catch(K){ke(v,v.return,K)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(l=a.retryQueue,l!==null&&(a.retryQueue=null,Ru(e,l))));break;case 19:At(t,e),_t(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Ru(e,a)));break;case 30:break;case 21:break;default:At(t,e),_t(e)}}function _t(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(yd(a)){l=a;break}a=a.return}if(l==null)throw Error(c(160));switch(l.tag){case 27:var n=l.stateNode,i=Uc(e);zu(e,i,n);break;case 5:var o=l.stateNode;l.flags&32&&(Ya(o,""),l.flags&=-33);var h=Uc(e);zu(e,h,o);break;case 3:case 4:var v=l.stateNode.containerInfo,R=Uc(e);Hc(e,R,v);break;default:throw Error(c(161))}}catch(C){ke(e,e.return,C)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function zd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;zd(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Nl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)xd(e,t.alternate,t),t=t.sibling}function Ca(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:ta(4,t,t.return),Ca(t);break;case 1:fl(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&gd(t,t.return,l),Ca(t);break;case 27:mi(t.stateNode);case 26:case 5:fl(t,t.return),Ca(t);break;case 22:t.memoizedState===null&&Ca(t);break;case 30:Ca(t);break;default:Ca(t)}e=e.sibling}}function Ul(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,n=e,i=t,o=i.flags;switch(i.tag){case 0:case 11:case 15:Ul(n,i,l),ui(4,i);break;case 1:if(Ul(n,i,l),a=i,n=a.stateNode,typeof n.componentDidMount=="function")try{n.componentDidMount()}catch(R){ke(a,a.return,R)}if(a=i,n=a.updateQueue,n!==null){var h=a.stateNode;try{var v=n.shared.hiddenCallbacks;if(v!==null)for(n.shared.hiddenCallbacks=null,n=0;n<v.length;n++)lf(v[n],h)}catch(R){ke(a,a.return,R)}}l&&o&64&&pd(i),ri(i,i.return);break;case 27:vd(i);case 26:case 5:Ul(n,i,l),l&&a===null&&o&4&&md(i),ri(i,i.return);break;case 12:Ul(n,i,l);break;case 31:Ul(n,i,l),l&&o&4&&Ed(n,i);break;case 13:Ul(n,i,l),l&&o&4&&Ad(n,i);break;case 22:i.memoizedState===null&&Ul(n,i,l),ri(i,i.return);break;case 30:break;default:Ul(n,i,l)}t=t.sibling}}function Bc(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&Kn(l))}function qc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Kn(e))}function al(e,t,l,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Rd(e,t,l,a),t=t.sibling}function Rd(e,t,l,a){var n=t.flags;switch(t.tag){case 0:case 11:case 15:al(e,t,l,a),n&2048&&ui(9,t);break;case 1:al(e,t,l,a);break;case 3:al(e,t,l,a),n&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Kn(e)));break;case 12:if(n&2048){al(e,t,l,a),e=t.stateNode;try{var i=t.memoizedProps,o=i.id,h=i.onPostCommit;typeof h=="function"&&h(o,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(v){ke(t,t.return,v)}}else al(e,t,l,a);break;case 31:al(e,t,l,a);break;case 13:al(e,t,l,a);break;case 23:break;case 22:i=t.stateNode,o=t.alternate,t.memoizedState!==null?i._visibility&2?al(e,t,l,a):ci(e,t):i._visibility&2?al(e,t,l,a):(i._visibility|=2,sn(e,t,l,a,(t.subtreeFlags&10256)!==0||!1)),n&2048&&Bc(o,t);break;case 24:al(e,t,l,a),n&2048&&qc(t.alternate,t);break;default:al(e,t,l,a)}}function sn(e,t,l,a,n){for(n=n&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,o=t,h=l,v=a,R=o.flags;switch(o.tag){case 0:case 11:case 15:sn(i,o,h,v,n),ui(8,o);break;case 23:break;case 22:var C=o.stateNode;o.memoizedState!==null?C._visibility&2?sn(i,o,h,v,n):ci(i,o):(C._visibility|=2,sn(i,o,h,v,n)),n&&R&2048&&Bc(o.alternate,o);break;case 24:sn(i,o,h,v,n),n&&R&2048&&qc(o.alternate,o);break;default:sn(i,o,h,v,n)}t=t.sibling}}function ci(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,n=a.flags;switch(a.tag){case 22:ci(l,a),n&2048&&Bc(a.alternate,a);break;case 24:ci(l,a),n&2048&&qc(a.alternate,a);break;default:ci(l,a)}t=t.sibling}}var si=8192;function on(e,t,l){if(e.subtreeFlags&si)for(e=e.child;e!==null;)kd(e,t,l),e=e.sibling}function kd(e,t,l){switch(e.tag){case 26:on(e,t,l),e.flags&si&&e.memoizedState!==null&&Gm(l,ll,e.memoizedState,e.memoizedProps);break;case 5:on(e,t,l);break;case 3:case 4:var a=ll;ll=Gu(e.stateNode.containerInfo),on(e,t,l),ll=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=si,si=16777216,on(e,t,l),si=a):on(e,t,l));break;default:on(e,t,l)}}function wd(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function oi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];ut=a,Md(a,e)}wd(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)jd(e),e=e.sibling}function jd(e){switch(e.tag){case 0:case 11:case 15:oi(e),e.flags&2048&&ta(9,e,e.return);break;case 3:oi(e);break;case 12:oi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ku(e)):oi(e);break;default:oi(e)}}function ku(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];ut=a,Md(a,e)}wd(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ta(8,t,t.return),ku(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,ku(t));break;default:ku(t)}e=e.sibling}}function Md(e,t){for(;ut!==null;){var l=ut;switch(l.tag){case 0:case 11:case 15:ta(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var a=l.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:Kn(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,ut=a;else e:for(l=e;ut!==null;){a=ut;var n=a.sibling,i=a.return;if(Sd(a),a===l){ut=null;break e}if(n!==null){n.return=i,ut=n;break e}ut=i}}}var lm={getCacheForType:function(e){var t=ft(Ie),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return ft(Ie).controller.signal}},am=typeof WeakMap=="function"?WeakMap:Map,Te=0,De=null,de=null,pe=0,Re=0,Ut=null,la=!1,fn=!1,Gc=!1,Hl=0,Ze=0,aa=0,Oa=0,Yc=0,Ht=0,dn=0,fi=null,zt=null,Xc=!1,wu=0,Cd=0,ju=1/0,Mu=null,na=null,at=0,ia=null,hn=null,Ll=0,Qc=0,Zc=null,Od=null,di=0,Vc=null;function Lt(){return(Te&2)!==0&&pe!==0?pe&-pe:k.T!==null?Ic():Cn()}function Dd(){if(Ht===0)if((pe&536870912)===0||me){var e=bl;bl<<=1,(bl&3932160)===0&&(bl=262144),Ht=e}else Ht=536870912;return e=Dt.current,e!==null&&(e.flags|=32),Ht}function Rt(e,t,l){(e===De&&(Re===2||Re===9)||e.cancelPendingCommit!==null)&&(pn(e,0),ua(e,pe,Ht,!1)),Ql(e,l),((Te&2)===0||e!==De)&&(e===De&&((Te&2)===0&&(Oa|=l),Ze===4&&ua(e,pe,Ht,!1)),dl(e))}function Nd(e,t,l){if((Te&6)!==0)throw Error(c(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||ya(e,t),n=a?um(e,t):Jc(e,t,!0),i=a;do{if(n===0){fn&&!a&&ua(e,t,0,!1);break}else{if(l=e.current.alternate,i&&!nm(l)){n=Jc(e,t,!1),i=!1;continue}if(n===2){if(i=t,e.errorRecoveryDisabledLanes&i)var o=0;else o=e.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){t=o;e:{var h=e;n=fi;var v=h.current.memoizedState.isDehydrated;if(v&&(pn(h,o).flags|=256),o=Jc(h,o,!1),o!==2){if(Gc&&!v){h.errorRecoveryDisabledLanes|=i,Oa|=i,n=4;break e}i=zt,zt=n,i!==null&&(zt===null?zt=i:zt.push.apply(zt,i))}n=o}if(i=!1,n!==2)continue}}if(n===1){pn(e,0),ua(e,t,0,!0);break}e:{switch(a=e,i=n,i){case 0:case 1:throw Error(c(345));case 4:if((t&4194048)!==t)break;case 6:ua(a,t,Ht,!la);break e;case 2:zt=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(n=wu+300-ct(),10<n)){if(ua(a,t,Ht,!la),Ba(a,0,!0)!==0)break e;Ll=t,a.timeoutHandle=dh(Ud.bind(null,a,l,zt,Mu,Xc,t,Ht,Oa,dn,la,i,"Throttled",-0,0),n);break e}Ud(a,l,zt,Mu,Xc,t,Ht,Oa,dn,la,i,null,-0,0)}}break}while(!0);dl(e)}function Ud(e,t,l,a,n,i,o,h,v,R,C,N,w,M){if(e.timeoutHandle=-1,N=t.subtreeFlags,N&8192||(N&16785408)===16785408){N={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:El},kd(t,i,N);var K=(i&62914560)===i?wu-ct():(i&4194048)===i?Cd-ct():0;if(K=Ym(N,K),K!==null){Ll=i,e.cancelPendingCommit=K(Qd.bind(null,e,t,i,l,a,n,o,h,v,C,N,null,w,M)),ua(e,i,o,!R);return}}Qd(e,t,i,l,a,n,o,h,v)}function nm(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var n=l[a],i=n.getSnapshot;n=n.value;try{if(!Ct(i(),n))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ua(e,t,l,a){t&=~Yc,t&=~Oa,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var n=t;0<n;){var i=31-We(n),o=1<<i;a[i]=-1,n&=~o}l!==0&&jn(e,l,t)}function Cu(){return(Te&6)===0?(hi(0),!1):!0}function Kc(){if(de!==null){if(Re===0)var e=de.return;else e=de,Rl=Aa=null,sc(e),an=null,$n=0,e=de;for(;e!==null;)hd(e.alternate,e),e=e.return;de=null}}function pn(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,Am(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),Ll=0,Kc(),De=e,de=l=_l(e.current,null),pe=t,Re=0,Ut=null,la=!1,fn=ya(e,t),Gc=!1,dn=Ht=Yc=Oa=aa=Ze=0,zt=fi=null,Xc=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var n=31-We(a),i=1<<n;t|=e[n],a&=~i}return Hl=t,Pi(),l}function Hd(e,t){ie=null,k.H=ai,t===ln||t===ru?(t=Io(),Re=3):t===Fr?(t=Io(),Re=4):Re=t===_c?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ut=t,de===null&&(Ze=1,Su(e,Zt(t,e.current)))}function Ld(){var e=Dt.current;return e===null?!0:(pe&4194048)===pe?$t===null:(pe&62914560)===pe||(pe&536870912)!==0?e===$t:!1}function Bd(){var e=k.H;return k.H=ai,e===null?ai:e}function qd(){var e=k.A;return k.A=lm,e}function Ou(){Ze=4,la||(pe&4194048)!==pe&&Dt.current!==null||(fn=!0),(aa&134217727)===0&&(Oa&134217727)===0||De===null||ua(De,pe,Ht,!1)}function Jc(e,t,l){var a=Te;Te|=2;var n=Bd(),i=qd();(De!==e||pe!==t)&&(Mu=null,pn(e,t)),t=!1;var o=Ze;e:do try{if(Re!==0&&de!==null){var h=de,v=Ut;switch(Re){case 8:Kc(),o=6;break e;case 3:case 2:case 9:case 6:Dt.current===null&&(t=!0);var R=Re;if(Re=0,Ut=null,gn(e,h,v,R),l&&fn){o=0;break e}break;default:R=Re,Re=0,Ut=null,gn(e,h,v,R)}}im(),o=Ze;break}catch(C){Hd(e,C)}while(!0);return t&&e.shellSuspendCounter++,Rl=Aa=null,Te=a,k.H=n,k.A=i,de===null&&(De=null,pe=0,Pi()),o}function im(){for(;de!==null;)Gd(de)}function um(e,t){var l=Te;Te|=2;var a=Bd(),n=qd();De!==e||pe!==t?(Mu=null,ju=ct()+500,pn(e,t)):fn=ya(e,t);e:do try{if(Re!==0&&de!==null){t=de;var i=Ut;t:switch(Re){case 1:Re=0,Ut=null,gn(e,t,i,1);break;case 2:case 9:if(Wo(i)){Re=0,Ut=null,Yd(t);break}t=function(){Re!==2&&Re!==9||De!==e||(Re=7),dl(e)},i.then(t,t);break e;case 3:Re=7;break e;case 4:Re=5;break e;case 7:Wo(i)?(Re=0,Ut=null,Yd(t)):(Re=0,Ut=null,gn(e,t,i,7));break;case 5:var o=null;switch(de.tag){case 26:o=de.memoizedState;case 5:case 27:var h=de;if(o?Rh(o):h.stateNode.complete){Re=0,Ut=null;var v=h.sibling;if(v!==null)de=v;else{var R=h.return;R!==null?(de=R,Du(R)):de=null}break t}}Re=0,Ut=null,gn(e,t,i,5);break;case 6:Re=0,Ut=null,gn(e,t,i,6);break;case 8:Kc(),Ze=6;break e;default:throw Error(c(462))}}rm();break}catch(C){Hd(e,C)}while(!0);return Rl=Aa=null,k.H=a,k.A=n,Te=l,de!==null?0:(De=null,pe=0,Pi(),Ze)}function rm(){for(;de!==null&&!Ni();)Gd(de)}function Gd(e){var t=fd(e.alternate,e,Hl);e.memoizedProps=e.pendingProps,t===null?Du(e):de=t}function Yd(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=id(l,t,t.pendingProps,t.type,void 0,pe);break;case 11:t=id(l,t,t.pendingProps,t.type.render,t.ref,pe);break;case 5:sc(t);default:hd(l,t),t=de=Bo(t,Hl),t=fd(l,t,Hl)}e.memoizedProps=e.pendingProps,t===null?Du(e):de=t}function gn(e,t,l,a){Rl=Aa=null,sc(t),an=null,$n=0;var n=t.return;try{if($g(e,n,t,l,pe)){Ze=1,Su(e,Zt(l,e.current)),de=null;return}}catch(i){if(n!==null)throw de=n,i;Ze=1,Su(e,Zt(l,e.current)),de=null;return}t.flags&32768?(me||a===1?e=!0:fn||(pe&536870912)!==0?e=!1:(la=e=!0,(a===2||a===9||a===3||a===6)&&(a=Dt.current,a!==null&&a.tag===13&&(a.flags|=16384))),Xd(t,e)):Du(t)}function Du(e){var t=e;do{if((t.flags&32768)!==0){Xd(t,la);return}e=t.return;var l=Ig(t.alternate,t,Hl);if(l!==null){de=l;return}if(t=t.sibling,t!==null){de=t;return}de=t=e}while(t!==null);Ze===0&&(Ze=5)}function Xd(e,t){do{var l=Pg(e.alternate,e);if(l!==null){l.flags&=32767,de=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){de=e;return}de=e=l}while(e!==null);Ze=6,de=null}function Qd(e,t,l,a,n,i,o,h,v){e.cancelPendingCommit=null;do Nu();while(at!==0);if((Te&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));if(i=t.lanes|t.childLanes,i|=Ur,wn(e,l,i,o,h,v),e===De&&(de=De=null,pe=0),hn=t,ia=e,Ll=l,Qc=i,Zc=n,Od=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,fm(Xl,function(){return $d(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=k.T,k.T=null,n=B.p,B.p=2,o=Te,Te|=4;try{em(e,t,l)}finally{Te=o,B.p=n,k.T=a}}at=1,Zd(),Vd(),Kd()}}function Zd(){if(at===1){at=0;var e=ia,t=hn,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=k.T,k.T=null;var a=B.p;B.p=2;var n=Te;Te|=4;try{_d(t,e);var i=us,o=jo(e.containerInfo),h=i.focusedElem,v=i.selectionRange;if(o!==h&&h&&h.ownerDocument&&wo(h.ownerDocument.documentElement,h)){if(v!==null&&Mr(h)){var R=v.start,C=v.end;if(C===void 0&&(C=R),"selectionStart"in h)h.selectionStart=R,h.selectionEnd=Math.min(C,h.value.length);else{var N=h.ownerDocument||document,w=N&&N.defaultView||window;if(w.getSelection){var M=w.getSelection(),K=h.textContent.length,te=Math.min(v.start,K),Me=v.end===void 0?te:Math.min(v.end,K);!M.extend&&te>Me&&(o=Me,Me=te,te=o);var E=ko(h,te),S=ko(h,Me);if(E&&S&&(M.rangeCount!==1||M.anchorNode!==E.node||M.anchorOffset!==E.offset||M.focusNode!==S.node||M.focusOffset!==S.offset)){var z=N.createRange();z.setStart(E.node,E.offset),M.removeAllRanges(),te>Me?(M.addRange(z),M.extend(S.node,S.offset)):(z.setEnd(S.node,S.offset),M.addRange(z))}}}}for(N=[],M=h;M=M.parentNode;)M.nodeType===1&&N.push({element:M,left:M.scrollLeft,top:M.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<N.length;h++){var D=N[h];D.element.scrollLeft=D.left,D.element.scrollTop=D.top}}Ku=!!is,us=is=null}finally{Te=n,B.p=a,k.T=l}}e.current=t,at=2}}function Vd(){if(at===2){at=0;var e=ia,t=hn,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=k.T,k.T=null;var a=B.p;B.p=2;var n=Te;Te|=4;try{xd(e,t.alternate,t)}finally{Te=n,B.p=a,k.T=l}}at=3}}function Kd(){if(at===4||at===3){at=0,hr();var e=ia,t=hn,l=Ll,a=Od;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?at=5:(at=0,hn=ia=null,Jd(e,e.pendingLanes));var n=e.pendingLanes;if(n===0&&(na=null),el(l),t=t.stateNode,nt&&typeof nt.onCommitFiberRoot=="function")try{nt.onCommitFiberRoot(rl,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=k.T,n=B.p,B.p=2,k.T=null;try{for(var i=e.onRecoverableError,o=0;o<a.length;o++){var h=a[o];i(h.value,{componentStack:h.stack})}}finally{k.T=t,B.p=n}}(Ll&3)!==0&&Nu(),dl(e),n=e.pendingLanes,(l&261930)!==0&&(n&42)!==0?e===Vc?di++:(di=0,Vc=e):di=0,hi(0)}}function Jd(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Kn(t)))}function Nu(){return Zd(),Vd(),Kd(),$d()}function $d(){if(at!==5)return!1;var e=ia,t=Qc;Qc=0;var l=el(Ll),a=k.T,n=B.p;try{B.p=32>l?32:l,k.T=null,l=Zc,Zc=null;var i=ia,o=Ll;if(at=0,hn=ia=null,Ll=0,(Te&6)!==0)throw Error(c(331));var h=Te;if(Te|=4,jd(i.current),Rd(i,i.current,o,l),Te=h,hi(0,!1),nt&&typeof nt.onPostCommitFiberRoot=="function")try{nt.onPostCommitFiberRoot(rl,i)}catch{}return!0}finally{B.p=n,k.T=a,Jd(e,t)}}function Wd(e,t,l){t=Zt(l,t),t=Ac(e.stateNode,t,2),e=Il(e,t,2),e!==null&&(Ql(e,2),dl(e))}function ke(e,t,l){if(e.tag===3)Wd(e,e,l);else for(;t!==null;){if(t.tag===3){Wd(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(na===null||!na.has(a))){e=Zt(l,e),l=Ff(2),a=Il(t,l,2),a!==null&&(If(l,a,t,e),Ql(a,2),dl(a));break}}t=t.return}}function $c(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new am;var n=new Set;a.set(t,n)}else n=a.get(t),n===void 0&&(n=new Set,a.set(t,n));n.has(l)||(Gc=!0,n.add(l),e=cm.bind(null,e,t,l),t.then(e,e))}function cm(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,De===e&&(pe&l)===l&&(Ze===4||Ze===3&&(pe&62914560)===pe&&300>ct()-wu?(Te&2)===0&&pn(e,0):Yc|=l,dn===pe&&(dn=0)),dl(e)}function Fd(e,t){t===0&&(t=xl()),e=Sa(e,t),e!==null&&(Ql(e,t),dl(e))}function sm(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),Fd(e,l)}function om(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,n=e.memoizedState;n!==null&&(l=n.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(c(314))}a!==null&&a.delete(t),Fd(e,l)}function fm(e,t){return Yl(e,t)}var Uu=null,mn=null,Wc=!1,Hu=!1,Fc=!1,ra=0;function dl(e){e!==mn&&e.next===null&&(mn===null?Uu=mn=e:mn=mn.next=e),Hu=!0,Wc||(Wc=!0,hm())}function hi(e,t){if(!Fc&&Hu){Fc=!0;do for(var l=!1,a=Uu;a!==null;){if(e!==0){var n=a.pendingLanes;if(n===0)var i=0;else{var o=a.suspendedLanes,h=a.pingedLanes;i=(1<<31-We(42|e)+1)-1,i&=n&~(o&~h),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(l=!0,th(a,i))}else i=pe,i=Ba(a,a===De?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(i&3)===0||ya(a,i)||(l=!0,th(a,i));a=a.next}while(l);Fc=!1}}function dm(){Id()}function Id(){Hu=Wc=!1;var e=0;ra!==0&&Em()&&(e=ra);for(var t=ct(),l=null,a=Uu;a!==null;){var n=a.next,i=Pd(a,t);i===0?(a.next=null,l===null?Uu=n:l.next=n,n===null&&(mn=l)):(l=a,(e!==0||(i&3)!==0)&&(Hu=!0)),a=n}at!==0&&at!==5||hi(e),ra!==0&&(ra=0)}function Pd(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,n=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var o=31-We(i),h=1<<o,v=n[o];v===-1?((h&l)===0||(h&a)!==0)&&(n[o]=Ve(h,t)):v<=t&&(e.expiredLanes|=h),i&=~h}if(t=De,l=pe,l=Ba(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(Re===2||Re===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Ha(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||ya(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&Ha(a),el(l)){case 2:case 8:l=jt;break;case 32:l=Xl;break;case 268435456:l=An;break;default:l=Xl}return a=eh.bind(null,e),l=Yl(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&Ha(a),e.callbackPriority=2,e.callbackNode=null,2}function eh(e,t){if(at!==0&&at!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(Nu()&&e.callbackNode!==l)return null;var a=pe;return a=Ba(e,e===De?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Nd(e,a,t),Pd(e,ct()),e.callbackNode!=null&&e.callbackNode===l?eh.bind(null,e):null)}function th(e,t){if(Nu())return null;Nd(e,t,!0)}function hm(){_m(function(){(Te&6)!==0?Yl(yl,dm):Id()})}function Ic(){if(ra===0){var e=en;e===0&&(e=vl,vl<<=1,(vl&261888)===0&&(vl=256)),ra=e}return ra}function lh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Zi(""+e)}function ah(e,t){var l=t.ownerDocument.createElement("input");return l.name=t.name,l.value=t.value,e.id&&l.setAttribute("form",e.id),t.parentNode.insertBefore(l,t),e=new FormData(e),l.parentNode.removeChild(l),e}function pm(e,t,l,a,n){if(t==="submit"&&l&&l.stateNode===n){var i=lh((n[Be]||null).action),o=a.submitter;o&&(t=(t=o[Be]||null)?lh(t.formAction):o.getAttribute("formAction"),t!==null&&(i=t,o=null));var h=new $i("action","action",null,a,n);e.push({event:h,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(ra!==0){var v=o?ah(n,o):new FormData(n);vc(l,{pending:!0,data:v,method:n.method,action:i},null,v)}}else typeof i=="function"&&(h.preventDefault(),v=o?ah(n,o):new FormData(n),vc(l,{pending:!0,data:v,method:n.method,action:i},i,v))},currentTarget:n}]})}}for(var Pc=0;Pc<Nr.length;Pc++){var es=Nr[Pc],gm=es.toLowerCase(),mm=es[0].toUpperCase()+es.slice(1);tl(gm,"on"+mm)}tl(Oo,"onAnimationEnd"),tl(Do,"onAnimationIteration"),tl(No,"onAnimationStart"),tl("dblclick","onDoubleClick"),tl("focusin","onFocus"),tl("focusout","onBlur"),tl(Cg,"onTransitionRun"),tl(Og,"onTransitionStart"),tl(Dg,"onTransitionCancel"),tl(Uo,"onTransitionEnd"),cl("onMouseEnter",["mouseout","mouseover"]),cl("onMouseLeave",["mouseout","mouseover"]),cl("onPointerEnter",["pointerout","pointerover"]),cl("onPointerLeave",["pointerout","pointerover"]),St("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),St("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),St("onBeforeInput",["compositionend","keypress","textInput","paste"]),St("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),St("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),St("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var pi="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(" "),ym=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(pi));function nh(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],n=a.event;a=a.listeners;e:{var i=void 0;if(t)for(var o=a.length-1;0<=o;o--){var h=a[o],v=h.instance,R=h.currentTarget;if(h=h.listener,v!==i&&n.isPropagationStopped())break e;i=h,n.currentTarget=R;try{i(n)}catch(C){Ii(C)}n.currentTarget=null,i=v}else for(o=0;o<a.length;o++){if(h=a[o],v=h.instance,R=h.currentTarget,h=h.listener,v!==i&&n.isPropagationStopped())break e;i=h,n.currentTarget=R;try{i(n)}catch(C){Ii(C)}n.currentTarget=null,i=v}}}}function he(e,t){var l=t[qa];l===void 0&&(l=t[qa]=new Set);var a=e+"__bubble";l.has(a)||(ih(t,e,2,!1),l.add(a))}function ts(e,t,l){var a=0;t&&(a|=4),ih(l,e,a,t)}var Lu="_reactListening"+Math.random().toString(36).slice(2);function ls(e){if(!e[Lu]){e[Lu]=!0,st.forEach(function(l){l!=="selectionchange"&&(ym.has(l)||ts(l,!1,e),ts(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Lu]||(t[Lu]=!0,ts("selectionchange",!1,t))}}function ih(e,t,l,a){switch(Dh(t)){case 2:var n=Zm;break;case 8:n=Vm;break;default:n=ys}l=n.bind(null,t,l,e),n=void 0,!Tr||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),a?n!==void 0?e.addEventListener(t,l,{capture:!0,passive:n}):e.addEventListener(t,l,!0):n!==void 0?e.addEventListener(t,l,{passive:n}):e.addEventListener(t,l,!1)}function as(e,t,l,a,n){var i=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var o=a.tag;if(o===3||o===4){var h=a.stateNode.containerInfo;if(h===n)break;if(o===4)for(o=a.return;o!==null;){var v=o.tag;if((v===3||v===4)&&o.stateNode.containerInfo===n)return;o=o.return}for(;h!==null;){if(o=H(h),o===null)return;if(v=o.tag,v===5||v===6||v===26||v===27){a=i=o;continue e}h=h.parentNode}}a=a.return}co(function(){var R=i,C=xr(l),N=[];e:{var w=Ho.get(e);if(w!==void 0){var M=$i,K=e;switch(e){case"keypress":if(Ki(l)===0)break e;case"keydown":case"keyup":M=og;break;case"focusin":K="focus",M=zr;break;case"focusout":K="blur",M=zr;break;case"beforeblur":case"afterblur":M=zr;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":M=fo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":M=Ip;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":M=hg;break;case Oo:case Do:case No:M=tg;break;case Uo:M=gg;break;case"scroll":case"scrollend":M=Wp;break;case"wheel":M=yg;break;case"copy":case"cut":case"paste":M=ag;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":M=po;break;case"toggle":case"beforetoggle":M=bg}var te=(t&4)!==0,Me=!te&&(e==="scroll"||e==="scrollend"),E=te?w!==null?w+"Capture":null:w;te=[];for(var S=R,z;S!==null;){var D=S;if(z=D.stateNode,D=D.tag,D!==5&&D!==26&&D!==27||z===null||E===null||(D=Un(S,E),D!=null&&te.push(gi(S,D,z))),Me)break;S=S.return}0<te.length&&(w=new M(w,K,null,l,C),N.push({event:w,listeners:te}))}}if((t&7)===0){e:{if(w=e==="mouseover"||e==="pointerover",M=e==="mouseout"||e==="pointerout",w&&l!==br&&(K=l.relatedTarget||l.fromElement)&&(H(K)||K[Sl]))break e;if((M||w)&&(w=C.window===C?C:(w=C.ownerDocument)?w.defaultView||w.parentWindow:window,M?(K=l.relatedTarget||l.toElement,M=R,K=K?H(K):null,K!==null&&(Me=p(K),te=K.tag,K!==Me||te!==5&&te!==27&&te!==6)&&(K=null)):(M=null,K=R),M!==K)){if(te=fo,D="onMouseLeave",E="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(te=po,D="onPointerLeave",E="onPointerEnter",S="pointer"),Me=M==null?w:ze(M),z=K==null?w:ze(K),w=new te(D,S+"leave",M,l,C),w.target=Me,w.relatedTarget=z,D=null,H(C)===R&&(te=new te(E,S+"enter",K,l,C),te.target=z,te.relatedTarget=Me,D=te),Me=D,M&&K)t:{for(te=vm,E=M,S=K,z=0,D=E;D;D=te(D))z++;D=0;for(var ee=S;ee;ee=te(ee))D++;for(;0<z-D;)E=te(E),z--;for(;0<D-z;)S=te(S),D--;for(;z--;){if(E===S||S!==null&&E===S.alternate){te=E;break t}E=te(E),S=te(S)}te=null}else te=null;M!==null&&uh(N,w,M,te,!1),K!==null&&Me!==null&&uh(N,Me,K,te,!0)}}e:{if(w=R?ze(R):window,M=w.nodeName&&w.nodeName.toLowerCase(),M==="select"||M==="input"&&w.type==="file")var be=To;else if(xo(w))if(Eo)be=wg;else{be=Rg;var F=zg}else M=w.nodeName,!M||M.toLowerCase()!=="input"||w.type!=="checkbox"&&w.type!=="radio"?R&&vr(R.elementType)&&(be=To):be=kg;if(be&&(be=be(e,R))){So(N,be,l,C);break e}F&&F(e,w,R),e==="focusout"&&R&&w.type==="number"&&R.memoizedProps.value!=null&&yr(w,"number",w.value)}switch(F=R?ze(R):window,e){case"focusin":(xo(F)||F.contentEditable==="true")&&(Va=F,Cr=R,Qn=null);break;case"focusout":Qn=Cr=Va=null;break;case"mousedown":Or=!0;break;case"contextmenu":case"mouseup":case"dragend":Or=!1,Mo(N,l,C);break;case"selectionchange":if(Mg)break;case"keydown":case"keyup":Mo(N,l,C)}var ce;if(kr)e:{switch(e){case"compositionstart":var ge="onCompositionStart";break e;case"compositionend":ge="onCompositionEnd";break e;case"compositionupdate":ge="onCompositionUpdate";break e}ge=void 0}else Za?vo(e,l)&&(ge="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(ge="onCompositionStart");ge&&(go&&l.locale!=="ko"&&(Za||ge!=="onCompositionStart"?ge==="onCompositionEnd"&&Za&&(ce=so()):(Zl=C,Er="value"in Zl?Zl.value:Zl.textContent,Za=!0)),F=Bu(R,ge),0<F.length&&(ge=new ho(ge,e,null,l,C),N.push({event:ge,listeners:F}),ce?ge.data=ce:(ce=bo(l),ce!==null&&(ge.data=ce)))),(ce=Sg?Tg(e,l):Eg(e,l))&&(ge=Bu(R,"onBeforeInput"),0<ge.length&&(F=new ho("onBeforeInput","beforeinput",null,l,C),N.push({event:F,listeners:ge}),F.data=ce)),pm(N,e,R,l,C)}nh(N,t)})}function gi(e,t,l){return{instance:e,listener:t,currentTarget:l}}function Bu(e,t){for(var l=t+"Capture",a=[];e!==null;){var n=e,i=n.stateNode;if(n=n.tag,n!==5&&n!==26&&n!==27||i===null||(n=Un(e,l),n!=null&&a.unshift(gi(e,n,i)),n=Un(e,t),n!=null&&a.push(gi(e,n,i))),e.tag===3)return a;e=e.return}return[]}function vm(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function uh(e,t,l,a,n){for(var i=t._reactName,o=[];l!==null&&l!==a;){var h=l,v=h.alternate,R=h.stateNode;if(h=h.tag,v!==null&&v===a)break;h!==5&&h!==26&&h!==27||R===null||(v=R,n?(R=Un(l,i),R!=null&&o.unshift(gi(l,R,v))):n||(R=Un(l,i),R!=null&&o.push(gi(l,R,v)))),l=l.return}o.length!==0&&e.push({event:t,listeners:o})}var bm=/\r\n?/g,xm=/\u0000|\uFFFD/g;function rh(e){return(typeof e=="string"?e:""+e).replace(bm,`
9
+ `).replace(xm,"")}function ch(e,t){return t=rh(t),rh(e)===t}function je(e,t,l,a,n,i){switch(l){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Ya(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Ya(e,""+a);break;case"className":Xi(e,"class",a);break;case"tabIndex":Xi(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Xi(e,l,a);break;case"style":uo(e,a,i);break;case"data":if(t!=="object"){Xi(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=Zi(""+a),e.setAttribute(l,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(l==="formAction"?(t!=="input"&&je(e,t,"name",n.name,n,null),je(e,t,"formEncType",n.formEncType,n,null),je(e,t,"formMethod",n.formMethod,n,null),je(e,t,"formTarget",n.formTarget,n,null)):(je(e,t,"encType",n.encType,n,null),je(e,t,"method",n.method,n,null),je(e,t,"target",n.target,n,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=Zi(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=El);break;case"onScroll":a!=null&&he("scroll",e);break;case"onScrollEnd":a!=null&&he("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(c(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(c(60));e.innerHTML=l}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}l=Zi(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""+a):e.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":a===!0?e.setAttribute(l,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(l,a):e.removeAttribute(l);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(l):e.setAttribute(l,a);break;case"popover":he("beforetoggle",e),he("toggle",e),Yi(e,"popover",a);break;case"xlinkActuate":Tl(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Tl(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Tl(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Tl(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Tl(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Tl(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Tl(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Tl(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Tl(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Yi(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=Jp.get(l)||l,Yi(e,l,a))}}function ns(e,t,l,a,n,i){switch(l){case"style":uo(e,a,i);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(c(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(c(60));e.innerHTML=l}}break;case"children":typeof a=="string"?Ya(e,a):(typeof a=="number"||typeof a=="bigint")&&Ya(e,""+a);break;case"onScroll":a!=null&&he("scroll",e);break;case"onScrollEnd":a!=null&&he("scrollend",e);break;case"onClick":a!=null&&(e.onclick=El);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Gt.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(n=l.endsWith("Capture"),t=l.slice(2,n?l.length-7:void 0),i=e[Be]||null,i=i!=null?i[l]:null,typeof i=="function"&&e.removeEventListener(t,i,n),typeof a=="function")){typeof i!="function"&&i!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,a,n);break e}l in e?e[l]=a:a===!0?e.setAttribute(l,""):Yi(e,l,a)}}}function ht(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":he("error",e),he("load",e);var a=!1,n=!1,i;for(i in l)if(l.hasOwnProperty(i)){var o=l[i];if(o!=null)switch(i){case"src":a=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:je(e,t,i,o,l,null)}}n&&je(e,t,"srcSet",l.srcSet,l,null),a&&je(e,t,"src",l.src,l,null);return;case"input":he("invalid",e);var h=i=o=n=null,v=null,R=null;for(a in l)if(l.hasOwnProperty(a)){var C=l[a];if(C!=null)switch(a){case"name":n=C;break;case"type":o=C;break;case"checked":v=C;break;case"defaultChecked":R=C;break;case"value":i=C;break;case"defaultValue":h=C;break;case"children":case"dangerouslySetInnerHTML":if(C!=null)throw Error(c(137,t));break;default:je(e,t,a,C,l,null)}}lo(e,i,h,v,R,o,n,!1);return;case"select":he("invalid",e),a=o=i=null;for(n in l)if(l.hasOwnProperty(n)&&(h=l[n],h!=null))switch(n){case"value":i=h;break;case"defaultValue":o=h;break;case"multiple":a=h;default:je(e,t,n,h,l,null)}t=i,l=o,e.multiple=!!a,t!=null?Ga(e,!!a,t,!1):l!=null&&Ga(e,!!a,l,!0);return;case"textarea":he("invalid",e),i=n=a=null;for(o in l)if(l.hasOwnProperty(o)&&(h=l[o],h!=null))switch(o){case"value":a=h;break;case"defaultValue":n=h;break;case"children":i=h;break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(c(91));break;default:je(e,t,o,h,l,null)}no(e,a,n,i);return;case"option":for(v in l)l.hasOwnProperty(v)&&(a=l[v],a!=null)&&(v==="selected"?e.selected=a&&typeof a!="function"&&typeof a!="symbol":je(e,t,v,a,l,null));return;case"dialog":he("beforetoggle",e),he("toggle",e),he("cancel",e),he("close",e);break;case"iframe":case"object":he("load",e);break;case"video":case"audio":for(a=0;a<pi.length;a++)he(pi[a],e);break;case"image":he("error",e),he("load",e);break;case"details":he("toggle",e);break;case"embed":case"source":case"link":he("error",e),he("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(R in l)if(l.hasOwnProperty(R)&&(a=l[R],a!=null))switch(R){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:je(e,t,R,a,l,null)}return;default:if(vr(t)){for(C in l)l.hasOwnProperty(C)&&(a=l[C],a!==void 0&&ns(e,t,C,a,l,void 0));return}}for(h in l)l.hasOwnProperty(h)&&(a=l[h],a!=null&&je(e,t,h,a,l,null))}function Sm(e,t,l,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var n=null,i=null,o=null,h=null,v=null,R=null,C=null;for(M in l){var N=l[M];if(l.hasOwnProperty(M)&&N!=null)switch(M){case"checked":break;case"value":break;case"defaultValue":v=N;default:a.hasOwnProperty(M)||je(e,t,M,null,a,N)}}for(var w in a){var M=a[w];if(N=l[w],a.hasOwnProperty(w)&&(M!=null||N!=null))switch(w){case"type":i=M;break;case"name":n=M;break;case"checked":R=M;break;case"defaultChecked":C=M;break;case"value":o=M;break;case"defaultValue":h=M;break;case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(c(137,t));break;default:M!==N&&je(e,t,w,M,a,N)}}mr(e,o,h,v,R,C,i,n);return;case"select":M=o=h=w=null;for(i in l)if(v=l[i],l.hasOwnProperty(i)&&v!=null)switch(i){case"value":break;case"multiple":M=v;default:a.hasOwnProperty(i)||je(e,t,i,null,a,v)}for(n in a)if(i=a[n],v=l[n],a.hasOwnProperty(n)&&(i!=null||v!=null))switch(n){case"value":w=i;break;case"defaultValue":h=i;break;case"multiple":o=i;default:i!==v&&je(e,t,n,i,a,v)}t=h,l=o,a=M,w!=null?Ga(e,!!l,w,!1):!!a!=!!l&&(t!=null?Ga(e,!!l,t,!0):Ga(e,!!l,l?[]:"",!1));return;case"textarea":M=w=null;for(h in l)if(n=l[h],l.hasOwnProperty(h)&&n!=null&&!a.hasOwnProperty(h))switch(h){case"value":break;case"children":break;default:je(e,t,h,null,a,n)}for(o in a)if(n=a[o],i=l[o],a.hasOwnProperty(o)&&(n!=null||i!=null))switch(o){case"value":w=n;break;case"defaultValue":M=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(c(91));break;default:n!==i&&je(e,t,o,n,a,i)}ao(e,w,M);return;case"option":for(var K in l)w=l[K],l.hasOwnProperty(K)&&w!=null&&!a.hasOwnProperty(K)&&(K==="selected"?e.selected=!1:je(e,t,K,null,a,w));for(v in a)w=a[v],M=l[v],a.hasOwnProperty(v)&&w!==M&&(w!=null||M!=null)&&(v==="selected"?e.selected=w&&typeof w!="function"&&typeof w!="symbol":je(e,t,v,w,a,M));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var te in l)w=l[te],l.hasOwnProperty(te)&&w!=null&&!a.hasOwnProperty(te)&&je(e,t,te,null,a,w);for(R in a)if(w=a[R],M=l[R],a.hasOwnProperty(R)&&w!==M&&(w!=null||M!=null))switch(R){case"children":case"dangerouslySetInnerHTML":if(w!=null)throw Error(c(137,t));break;default:je(e,t,R,w,a,M)}return;default:if(vr(t)){for(var Me in l)w=l[Me],l.hasOwnProperty(Me)&&w!==void 0&&!a.hasOwnProperty(Me)&&ns(e,t,Me,void 0,a,w);for(C in a)w=a[C],M=l[C],!a.hasOwnProperty(C)||w===M||w===void 0&&M===void 0||ns(e,t,C,w,a,M);return}}for(var E in l)w=l[E],l.hasOwnProperty(E)&&w!=null&&!a.hasOwnProperty(E)&&je(e,t,E,null,a,w);for(N in a)w=a[N],M=l[N],!a.hasOwnProperty(N)||w===M||w==null&&M==null||je(e,t,N,w,a,M)}function sh(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Tm(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var n=l[a],i=n.transferSize,o=n.initiatorType,h=n.duration;if(i&&h&&sh(o)){for(o=0,h=n.responseEnd,a+=1;a<l.length;a++){var v=l[a],R=v.startTime;if(R>h)break;var C=v.transferSize,N=v.initiatorType;C&&sh(N)&&(v=v.responseEnd,o+=C*(v<h?1:(h-R)/(v-R)))}if(--a,t+=8*(i+o)/(n.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var is=null,us=null;function qu(e){return e.nodeType===9?e:e.ownerDocument}function oh(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function fh(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function rs(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var cs=null;function Em(){var e=window.event;return e&&e.type==="popstate"?e===cs?!1:(cs=e,!0):(cs=null,!1)}var dh=typeof setTimeout=="function"?setTimeout:void 0,Am=typeof clearTimeout=="function"?clearTimeout:void 0,hh=typeof Promise=="function"?Promise:void 0,_m=typeof queueMicrotask=="function"?queueMicrotask:typeof hh<"u"?function(e){return hh.resolve(null).then(e).catch(zm)}:dh;function zm(e){setTimeout(function(){throw e})}function ca(e){return e==="head"}function ph(e,t){var l=t,a=0;do{var n=l.nextSibling;if(e.removeChild(l),n&&n.nodeType===8)if(l=n.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(n),xn(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")mi(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,mi(l);for(var i=l.firstChild;i;){var o=i.nextSibling,h=i.nodeName;i[W]||h==="SCRIPT"||h==="STYLE"||h==="LINK"&&i.rel.toLowerCase()==="stylesheet"||l.removeChild(i),i=o}}else l==="body"&&mi(e.ownerDocument.body);l=n}while(l);xn(t)}function gh(e,t){var l=e;e=0;do{var a=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),a&&a.nodeType===8)if(l=a.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=a}while(l)}function ss(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":ss(l),x(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Rm(e,t,l,a){for(;e.nodeType===1;){var n=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[W])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==n.rel||e.getAttribute("href")!==(n.href==null||n.href===""?null:n.href)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin)||e.getAttribute("title")!==(n.title==null?null:n.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(n.src==null?null:n.src)||e.getAttribute("type")!==(n.type==null?null:n.type)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=n.name==null?null:""+n.name;if(n.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=Wt(e.nextSibling),e===null)break}return null}function km(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=Wt(e.nextSibling),e===null))return null;return e}function mh(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Wt(e.nextSibling),e===null))return null;return e}function os(e){return e.data==="$?"||e.data==="$~"}function fs(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function wm(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var a=function(){t(),l.removeEventListener("DOMContentLoaded",a)};l.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function Wt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var ds=null;function yh(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return Wt(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function vh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function bh(e,t,l){switch(t=qu(l),e){case"html":if(e=t.documentElement,!e)throw Error(c(452));return e;case"head":if(e=t.head,!e)throw Error(c(453));return e;case"body":if(e=t.body,!e)throw Error(c(454));return e;default:throw Error(c(451))}}function mi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);x(e)}var Ft=new Map,xh=new Set;function Gu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Bl=B.d;B.d={f:jm,r:Mm,D:Cm,C:Om,L:Dm,m:Nm,X:Hm,S:Um,M:Lm};function jm(){var e=Bl.f(),t=Cu();return e||t}function Mm(e){var t=Z(e);t!==null&&t.tag===5&&t.type==="form"?Hf(t):Bl.r(e)}var yn=typeof document>"u"?null:document;function Sh(e,t,l){var a=yn;if(a&&typeof t=="string"&&t){var n=Xt(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof l=="string"&&(n+='[crossorigin="'+l+'"]'),xh.has(n)||(xh.add(n),e={rel:e,crossOrigin:l,href:t},a.querySelector(n)===null&&(t=a.createElement("link"),ht(t,"link",e),se(t),a.head.appendChild(t)))}}function Cm(e){Bl.D(e),Sh("dns-prefetch",e,null)}function Om(e,t){Bl.C(e,t),Sh("preconnect",e,t)}function Dm(e,t,l){Bl.L(e,t,l);var a=yn;if(a&&e&&t){var n='link[rel="preload"][as="'+Xt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(n+='[imagesrcset="'+Xt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(n+='[imagesizes="'+Xt(l.imageSizes)+'"]')):n+='[href="'+Xt(e)+'"]';var i=n;switch(t){case"style":i=vn(e);break;case"script":i=bn(e)}Ft.has(i)||(e=A({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Ft.set(i,e),a.querySelector(n)!==null||t==="style"&&a.querySelector(yi(i))||t==="script"&&a.querySelector(vi(i))||(t=a.createElement("link"),ht(t,"link",e),se(t),a.head.appendChild(t)))}}function Nm(e,t){Bl.m(e,t);var l=yn;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",n='link[rel="modulepreload"][as="'+Xt(a)+'"][href="'+Xt(e)+'"]',i=n;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=bn(e)}if(!Ft.has(i)&&(e=A({rel:"modulepreload",href:e},t),Ft.set(i,e),l.querySelector(n)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(vi(i)))return}a=l.createElement("link"),ht(a,"link",e),se(a),l.head.appendChild(a)}}}function Um(e,t,l){Bl.S(e,t,l);var a=yn;if(a&&e){var n=Ge(a).hoistableStyles,i=vn(e);t=t||"default";var o=n.get(i);if(!o){var h={loading:0,preload:null};if(o=a.querySelector(yi(i)))h.loading=5;else{e=A({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Ft.get(i))&&hs(e,l);var v=o=a.createElement("link");se(v),ht(v,"link",e),v._p=new Promise(function(R,C){v.onload=R,v.onerror=C}),v.addEventListener("load",function(){h.loading|=1}),v.addEventListener("error",function(){h.loading|=2}),h.loading|=4,Yu(o,t,a)}o={type:"stylesheet",instance:o,count:1,state:h},n.set(i,o)}}}function Hm(e,t){Bl.X(e,t);var l=yn;if(l&&e){var a=Ge(l).hoistableScripts,n=bn(e),i=a.get(n);i||(i=l.querySelector(vi(n)),i||(e=A({src:e,async:!0},t),(t=Ft.get(n))&&ps(e,t),i=l.createElement("script"),se(i),ht(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(n,i))}}function Lm(e,t){Bl.M(e,t);var l=yn;if(l&&e){var a=Ge(l).hoistableScripts,n=bn(e),i=a.get(n);i||(i=l.querySelector(vi(n)),i||(e=A({src:e,async:!0,type:"module"},t),(t=Ft.get(n))&&ps(e,t),i=l.createElement("script"),se(i),ht(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(n,i))}}function Th(e,t,l,a){var n=(n=ae.current)?Gu(n):null;if(!n)throw Error(c(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=vn(l.href),l=Ge(n).hoistableStyles,a=l.get(t),a||(a={type:"style",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=vn(l.href);var i=Ge(n).hoistableStyles,o=i.get(e);if(o||(n=n.ownerDocument||n,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,o),(i=n.querySelector(yi(e)))&&!i._p&&(o.instance=i,o.state.loading=5),Ft.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Ft.set(e,l),i||Bm(n,e,l,o.state))),t&&a===null)throw Error(c(528,""));return o}if(t&&a!==null)throw Error(c(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=bn(l),l=Ge(n).hoistableScripts,a=l.get(t),a||(a={type:"script",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,e))}}function vn(e){return'href="'+Xt(e)+'"'}function yi(e){return'link[rel="stylesheet"]['+e+"]"}function Eh(e){return A({},e,{"data-precedence":e.precedence,precedence:null})}function Bm(e,t,l,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),ht(t,"link",l),se(t),e.head.appendChild(t))}function bn(e){return'[src="'+Xt(e)+'"]'}function vi(e){return"script[async]"+e}function Ah(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Xt(l.href)+'"]');if(a)return t.instance=a,se(a),a;var n=A({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),se(a),ht(a,"style",n),Yu(a,l.precedence,e),t.instance=a;case"stylesheet":n=vn(l.href);var i=e.querySelector(yi(n));if(i)return t.state.loading|=4,t.instance=i,se(i),i;a=Eh(l),(n=Ft.get(n))&&hs(a,n),i=(e.ownerDocument||e).createElement("link"),se(i);var o=i;return o._p=new Promise(function(h,v){o.onload=h,o.onerror=v}),ht(i,"link",a),t.state.loading|=4,Yu(i,l.precedence,e),t.instance=i;case"script":return i=bn(l.src),(n=e.querySelector(vi(i)))?(t.instance=n,se(n),n):(a=l,(n=Ft.get(i))&&(a=A({},l),ps(a,n)),e=e.ownerDocument||e,n=e.createElement("script"),se(n),ht(n,"link",a),e.head.appendChild(n),t.instance=n);case"void":return null;default:throw Error(c(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Yu(a,l.precedence,e));return t.instance}function Yu(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=a.length?a[a.length-1]:null,i=n,o=0;o<a.length;o++){var h=a[o];if(h.dataset.precedence===t)i=h;else if(i!==n)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function hs(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function ps(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Xu=null;function _h(e,t,l){if(Xu===null){var a=new Map,n=Xu=new Map;n.set(l,a)}else n=Xu,a=n.get(l),a||(a=new Map,n.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),n=0;n<l.length;n++){var i=l[n];if(!(i[W]||i[Fe]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var o=i.getAttribute(t)||"";o=e+o;var h=a.get(o);h?h.push(i):a.set(o,[i])}}return a}function zh(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function qm(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Rh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Gm(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var n=vn(a.href),i=t.querySelector(yi(n));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Qu.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=i,se(i);return}i=t.ownerDocument||t,a=Eh(a),(n=Ft.get(n))&&hs(a,n),i=i.createElement("link"),se(i);var o=i;o._p=new Promise(function(h,v){o.onload=h,o.onerror=v}),ht(i,"link",a),l.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Qu.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var gs=0;function Ym(e,t){return e.stylesheets&&e.count===0&&Vu(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&Vu(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&gs===0&&(gs=62500*Tm());var n=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Vu(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>gs?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(n)}}:null}function Qu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Vu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Zu=null;function Vu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Zu=new Map,t.forEach(Xm,e),Zu=null,Qu.call(e))}function Xm(e,t){if(!(t.state.loading&4)){var l=Zu.get(e);if(l)var a=l.get(null);else{l=new Map,Zu.set(e,l);for(var n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<n.length;i++){var o=n[i];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(l.set(o.dataset.precedence,o),a=o)}a&&l.set(null,a)}n=t.instance,o=n.getAttribute("data-precedence"),i=l.get(o)||a,i===a&&l.set(null,n),l.set(o,n),this.count++,a=Qu.bind(this),n.addEventListener("load",a),n.addEventListener("error",a),i?i.parentNode.insertBefore(n,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(n,e.firstChild)),t.state.loading|=4}}var bi={$$typeof:Oe,Provider:null,Consumer:null,_currentValue:P,_currentValue2:P,_threadCount:0};function Qm(e,t,l,a,n,i,o,h,v){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=kn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=kn(0),this.hiddenUpdates=kn(null),this.identifierPrefix=a,this.onUncaughtError=n,this.onCaughtError=i,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=v,this.incompleteTransitions=new Map}function kh(e,t,l,a,n,i,o,h,v,R,C,N){return e=new Qm(e,t,l,o,v,R,C,N,h),t=1,i===!0&&(t|=24),i=Ot(3,null,null,t),e.current=i,i.stateNode=e,t=Jr(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:a,isDehydrated:l,cache:t},Ir(i),e}function wh(e){return e?(e=$a,e):$a}function jh(e,t,l,a,n,i){n=wh(n),a.context===null?a.context=n:a.pendingContext=n,a=Fl(t),a.payload={element:l},i=i===void 0?null:i,i!==null&&(a.callback=i),l=Il(e,a,t),l!==null&&(Rt(l,e,t),Fn(l,e,t))}function Mh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function ms(e,t){Mh(e,t),(e=e.alternate)&&Mh(e,t)}function Ch(e){if(e.tag===13||e.tag===31){var t=Sa(e,67108864);t!==null&&Rt(t,e,67108864),ms(e,67108864)}}function Oh(e){if(e.tag===13||e.tag===31){var t=Lt();t=xt(t);var l=Sa(e,t);l!==null&&Rt(l,e,t),ms(e,t)}}var Ku=!0;function Zm(e,t,l,a){var n=k.T;k.T=null;var i=B.p;try{B.p=2,ys(e,t,l,a)}finally{B.p=i,k.T=n}}function Vm(e,t,l,a){var n=k.T;k.T=null;var i=B.p;try{B.p=8,ys(e,t,l,a)}finally{B.p=i,k.T=n}}function ys(e,t,l,a){if(Ku){var n=vs(a);if(n===null)as(e,t,a,Ju,l),Nh(e,a);else if(Jm(n,e,t,l,a))a.stopPropagation();else if(Nh(e,a),t&4&&-1<Km.indexOf(e)){for(;n!==null;){var i=Z(n);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var o=Mt(i.pendingLanes);if(o!==0){var h=i;for(h.pendingLanes|=2,h.entangledLanes|=2;o;){var v=1<<31-We(o);h.entanglements[1]|=v,o&=~v}dl(i),(Te&6)===0&&(ju=ct()+500,hi(0))}}break;case 31:case 13:h=Sa(i,2),h!==null&&Rt(h,i,2),Cu(),ms(i,2)}if(i=vs(a),i===null&&as(e,t,a,Ju,l),i===n)break;n=i}n!==null&&a.stopPropagation()}else as(e,t,a,null,l)}}function vs(e){return e=xr(e),bs(e)}var Ju=null;function bs(e){if(Ju=null,e=H(e),e!==null){var t=p(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=g(t),e!==null)return e;e=null}else if(l===31){if(e=T(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ju=e,null}function Dh(e){switch(e){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ma()){case yl:return 2;case jt:return 8;case Xl:case Ui:return 32;case An:return 268435456;default:return 32}default:return 32}}var xs=!1,sa=null,oa=null,fa=null,xi=new Map,Si=new Map,da=[],Km="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".split(" ");function Nh(e,t){switch(e){case"focusin":case"focusout":sa=null;break;case"dragenter":case"dragleave":oa=null;break;case"mouseover":case"mouseout":fa=null;break;case"pointerover":case"pointerout":xi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Si.delete(t.pointerId)}}function Ti(e,t,l,a,n,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:i,targetContainers:[n]},t!==null&&(t=Z(t),t!==null&&Ch(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function Jm(e,t,l,a,n){switch(t){case"focusin":return sa=Ti(sa,e,t,l,a,n),!0;case"dragenter":return oa=Ti(oa,e,t,l,a,n),!0;case"mouseover":return fa=Ti(fa,e,t,l,a,n),!0;case"pointerover":var i=n.pointerId;return xi.set(i,Ti(xi.get(i)||null,e,t,l,a,n)),!0;case"gotpointercapture":return i=n.pointerId,Si.set(i,Ti(Si.get(i)||null,e,t,l,a,n)),!0}return!1}function Uh(e){var t=H(e.target);if(t!==null){var l=p(t);if(l!==null){if(t=l.tag,t===13){if(t=g(l),t!==null){e.blockedOn=t,On(e.priority,function(){Oh(l)});return}}else if(t===31){if(t=T(l),t!==null){e.blockedOn=t,On(e.priority,function(){Oh(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function $u(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=vs(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);br=a,l.target.dispatchEvent(a),br=null}else return t=Z(l),t!==null&&Ch(t),e.blockedOn=l,!1;t.shift()}return!0}function Hh(e,t,l){$u(e)&&l.delete(t)}function $m(){xs=!1,sa!==null&&$u(sa)&&(sa=null),oa!==null&&$u(oa)&&(oa=null),fa!==null&&$u(fa)&&(fa=null),xi.forEach(Hh),Si.forEach(Hh)}function Wu(e,t){e.blockedOn===t&&(e.blockedOn=null,xs||(xs=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,$m)))}var Fu=null;function Lh(e){Fu!==e&&(Fu=e,r.unstable_scheduleCallback(r.unstable_NormalPriority,function(){Fu===e&&(Fu=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],n=e[t+2];if(typeof a!="function"){if(bs(a||l)===null)continue;break}var i=Z(l);i!==null&&(e.splice(t,3),t-=3,vc(i,{pending:!0,data:n,method:l.method,action:a},a,n))}}))}function xn(e){function t(v){return Wu(v,e)}sa!==null&&Wu(sa,e),oa!==null&&Wu(oa,e),fa!==null&&Wu(fa,e),xi.forEach(t),Si.forEach(t);for(var l=0;l<da.length;l++){var a=da[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<da.length&&(l=da[0],l.blockedOn===null);)Uh(l),l.blockedOn===null&&da.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var n=l[a],i=l[a+1],o=n[Be]||null;if(typeof i=="function")o||Lh(l);else if(o){var h=null;if(i&&i.hasAttribute("formAction")){if(n=i,o=i[Be]||null)h=o.formAction;else if(bs(n)!==null)continue}else h=o.action;typeof h=="function"?l[a+1]=h:(l.splice(a,3),a-=3),Lh(l)}}}function Bh(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(o){return n=o})},focusReset:"manual",scroll:"manual"})}function t(){n!==null&&(n(),n=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,n=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),n!==null&&(n(),n=null)}}}function Ss(e){this._internalRoot=e}Iu.prototype.render=Ss.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var l=t.current,a=Lt();jh(l,a,e,t,null,null)},Iu.prototype.unmount=Ss.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;jh(e.current,2,null,e,null,null),Cu(),t[Sl]=null}};function Iu(e){this._internalRoot=e}Iu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Cn();e={blockedOn:null,target:e,priority:t};for(var l=0;l<da.length&&t!==0&&t<da[l].priority;l++);da.splice(l,0,e),l===0&&Uh(e)}};var qh=u.version;if(qh!=="19.2.4")throw Error(c(527,qh,"19.2.4"));B.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(c(188)):(e=Object.keys(e).join(","),Error(c(268,e)));return e=m(t),e=e!==null?_(e):null,e=e===null?null:e.stateNode,e};var Wm={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Pu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pu.isDisabled&&Pu.supportsFiber)try{rl=Pu.inject(Wm),nt=Pu}catch{}}return Ai.createRoot=function(e,t){if(!f(e))throw Error(c(299));var l=!1,a="",n=Kf,i=Jf,o=$f;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(n=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=kh(e,1,!1,null,null,l,a,null,n,i,o,Bh),e[Sl]=t.current,ls(e),new Ss(t)},Ai.hydrateRoot=function(e,t,l){if(!f(e))throw Error(c(299));var a=!1,n="",i=Kf,o=Jf,h=$f,v=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(n=l.identifierPrefix),l.onUncaughtError!==void 0&&(i=l.onUncaughtError),l.onCaughtError!==void 0&&(o=l.onCaughtError),l.onRecoverableError!==void 0&&(h=l.onRecoverableError),l.formState!==void 0&&(v=l.formState)),t=kh(e,1,!0,t,l??null,a,n,v,i,o,h,Bh),t.context=wh(null),l=t.current,a=Lt(),a=xt(a),n=Fl(a),n.callback=null,Il(l,n,a),l=a,t.current.lanes=l,Ql(t,l),dl(t),e[Sl]=t.current,ls(e),new Iu(t)},Ai.version="19.2.4",Ai}var Wh;function uy(){if(Wh)return As.exports;Wh=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(u){console.error(u)}}return r(),As.exports=iy(),As.exports}var ry=uy(),cy=(r,u,s={})=>{let c=`${r}=${u}`;if(r.startsWith("__Secure-")&&!s.secure)throw new Error("__Secure- Cookie must have Secure attributes");if(r.startsWith("__Host-")){if(!s.secure)throw new Error("__Host- Cookie must have Secure attributes");if(s.path!=="/")throw new Error('__Host- Cookie must have Path attributes with "/"');if(s.domain)throw new Error("__Host- Cookie must not have Domain attributes")}if(s&&typeof s.maxAge=="number"&&s.maxAge>=0){if(s.maxAge>3456e4)throw new Error("Cookies Max-Age SHOULD NOT be greater than 400 days (34560000 seconds) in duration.");c+=`; Max-Age=${s.maxAge|0}`}if(s.domain&&s.prefix!=="host"&&(c+=`; Domain=${s.domain}`),s.path&&(c+=`; Path=${s.path}`),s.expires){if(s.expires.getTime()-Date.now()>3456e7)throw new Error("Cookies Expires SHOULD NOT be greater than 400 days (34560000 seconds) in the future.");c+=`; Expires=${s.expires.toUTCString()}`}if(s.httpOnly&&(c+="; HttpOnly"),s.secure&&(c+="; Secure"),s.sameSite&&(c+=`; SameSite=${s.sameSite.charAt(0).toUpperCase()+s.sameSite.slice(1)}`),s.priority&&(c+=`; Priority=${s.priority.charAt(0).toUpperCase()+s.priority.slice(1)}`),s.partitioned){if(!s.secure)throw new Error("Partitioned Cookie must have Secure attributes");c+="; Partitioned"}return c},sy=(r,u,s)=>(u=encodeURIComponent(u),cy(r,u,s)),oy=(r,u)=>(r=r.replace(/\/+$/,""),r=r+"/",u=u.replace(/^\/+/,""),r+u),Us=(r,u)=>{for(const[s,c]of Object.entries(u)){const f=new RegExp("/:"+s+"(?:{[^/]+})?\\??");r=r.replace(f,c?`/${c}`:"")}return r},fy=r=>{const u=new URLSearchParams;for(const[s,c]of Object.entries(r))if(c!==void 0)if(Array.isArray(c))for(const f of c)u.append(s,f);else u.set(s,c);return u},dy=(r,u)=>{switch(u){case"ws":return r.replace(/^http/,"ws");case"http":return r.replace(/^ws/,"http")}},Sp=r=>/^https?:\/\/[^\/]+?\/index(?=\?|$)/.test(r)?r.replace(/\/index(?=\?|$)/,"/"):r.replace(/\/index(?=\?|$)/,"");function er(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function Tp(r,u){if(!er(r)&&!er(u))return u;const s={...r};for(const c in u){const f=u[c];er(s[c])&&er(f)?s[c]=Tp(s[c],f):s[c]=f}return s}var Ep=(r,u)=>new Proxy(()=>{},{get(c,f){if(!(typeof f!="string"||f==="then"))return Ep(r,[...u,f])},apply(c,f,p){return r({path:u,args:p})}}),hy=class{url;method;buildSearchParams;queryParams=void 0;pathParams={};rBody;cType=void 0;constructor(r,u,s){this.url=r,this.method=u,this.buildSearchParams=s.buildSearchParams}fetch=async(r,u)=>{if(r){if(r.query&&(this.queryParams=this.buildSearchParams(r.query)),r.form){const T=new FormData;for(const[y,m]of Object.entries(r.form))if(Array.isArray(m))for(const _ of m)T.append(y,_);else T.append(y,m);this.rBody=T}r.json&&(this.rBody=JSON.stringify(r.json),this.cType="application/json"),r.param&&(this.pathParams=r.param)}let s=this.method.toUpperCase();const c={...r?.header,...typeof u?.headers=="function"?await u.headers():u?.headers};if(r?.cookie){const T=[];for(const[y,m]of Object.entries(r.cookie))T.push(sy(y,m,{path:"/"}));c.Cookie=T.join(",")}this.cType&&(c["Content-Type"]=this.cType);const f=new Headers(c??void 0);let p=this.url;p=Sp(p),p=Us(p,this.pathParams),this.queryParams&&(p=p+"?"+this.queryParams.toString()),s=this.method.toUpperCase();const g=!(s==="GET"||s==="HEAD");return(u?.fetch||fetch)(p,{body:g?this.rBody:void 0,method:s,headers:f,...u?.init})}},Ap=(r,u)=>Ep(function s(c){const f=u?.buildSearchParams??fy,p=[...c.path],g=p.slice(-3).reverse();if(g[0]==="toString")return g[1]==="name"?g[2]||"":s.toString();if(g[0]==="valueOf")return g[1]==="name"?g[2]||"":s;let T="";if(/^\$/.test(g[0])){const A=p.pop();A&&(T=A.replace(/^\$/,""))}const y=p.join("/"),m=oy(r,y);if(T==="url"){let A=m;return c.args[0]&&(c.args[0].param&&(A=Us(m,c.args[0].param)),c.args[0].query&&(A=A+"?"+f(c.args[0].query).toString())),A=Sp(A),new URL(A)}if(T==="ws"){const A=dy(c.args[0]&&c.args[0].param?Us(m,c.args[0].param):m,"ws"),j=new URL(A),X=c.args[0]?.query;return X&&Object.entries(X).forEach(([q,I])=>{Array.isArray(I)?I.forEach(ne=>j.searchParams.append(q,ne)):j.searchParams.set(q,I)}),((...q)=>u?.webSocket!==void 0&&typeof u.webSocket=="function"?u.webSocket(...q):new WebSocket(...q))(j.toString())}const _=new hy(m,T,{buildSearchParams:f});if(T){u??={};const A=Tp(u,{...c.args[1]});return _.fetch(c.args[0],A)}return _},[]);const Tn=Ap("/");async function py(){const r=await Tn.api.auth.me.$get();return r.ok?r.json():null}async function gy(r,u){const s=await Tn.api.auth.login.$post({json:{username:r,password:u}});if(!s.ok){const c=await s.json();throw new Error(c.error||"Login failed")}return s.json()}async function my(r,u){const s=await Tn.api.auth.register.$post({json:{username:r,password:u}});if(!s.ok){const c=await s.json();throw new Error(c.error||"Registration failed")}return s.json()}async function yy(){await Tn.api.auth.logout.$post()}async function vy(){const r=await Tn.api.auth.users.$get();if(!r.ok)throw new Error("Failed to fetch users");return r.json()}async function by(r){if(!(await Tn.api.auth.users[":id"].approve.$post({param:{id:r.toString()}})).ok)throw new Error("Failed to approve user")}function xy({onAuth:r}){const[u,s]=O.useState("login"),[c,f]=O.useState(""),[p,g]=O.useState(""),[T,y]=O.useState(""),[m,_]=O.useState(!1),[A,j]=O.useState(""),X=async Y=>{if(Y.preventDefault(),!(!c.trim()||!p.trim())){y(""),_(!0);try{if(u==="login"){const q=await gy(c,p);q.role==="pending"?j("Your account is pending approval by an admin."):r(q)}else{const q=await my(c,p);q.role==="admin"?r(q):j("Account created. Waiting for admin approval.")}}catch(q){y(q instanceof Error?q.message:"Something went wrong")}_(!1)}};return A?d.jsx("div",{style:Fh,children:d.jsxs("div",{style:Ih,children:[d.jsx("div",{style:{color:"var(--yellow)",marginBottom:16},children:A}),d.jsx("button",{onClick:()=>{j(""),s("login")},style:ep,children:"Back to login"})]})}):d.jsx("div",{style:Fh,children:d.jsxs("div",{style:Ih,children:[d.jsxs("div",{style:{marginBottom:24,textAlign:"center"},children:[d.jsxs("div",{style:{fontSize:18,fontWeight:600,marginBottom:4},children:[d.jsx("span",{style:{color:"var(--accent)"},children:">"})," volute"]}),d.jsx("div",{style:{color:"var(--text-2)",fontSize:12},children:u==="login"?"Sign in to continue":"Create an account"})]}),d.jsxs("form",{onSubmit:X,children:[d.jsx("input",{type:"text",placeholder:"username",value:c,onChange:Y=>f(Y.target.value),style:Ph,onFocus:Y=>Y.currentTarget.style.borderColor="var(--border-bright)",onBlur:Y=>Y.currentTarget.style.borderColor="var(--border)"}),d.jsx("input",{type:"password",placeholder:"password",value:p,onChange:Y=>g(Y.target.value),style:{...Ph,marginTop:8},onFocus:Y=>Y.currentTarget.style.borderColor="var(--border-bright)",onBlur:Y=>Y.currentTarget.style.borderColor="var(--border)"}),T&&d.jsx("div",{style:{color:"var(--red)",fontSize:12,marginTop:8},children:T}),d.jsx("button",{type:"submit",disabled:m||!c.trim()||!p.trim(),style:{...Sy,marginTop:16,opacity:m?.5:1},children:m?"...":u==="login"?"Sign in":"Create account"})]}),d.jsx("div",{style:{marginTop:16,textAlign:"center"},children:d.jsx("button",{onClick:()=>{s(u==="login"?"register":"login"),y("")},style:ep,children:u==="login"?"Need an account? Register":"Have an account? Sign in"})})]})})}const Fh={display:"flex",alignItems:"center",justifyContent:"center",height:"100%",padding:24},Ih={width:320,padding:32,background:"var(--bg-1)",border:"1px solid var(--border)",borderRadius:"var(--radius-lg)"},Ph={width:"100%",padding:"10px 12px",background:"var(--bg-2)",border:"1px solid var(--border)",borderRadius:"var(--radius)",color:"var(--text-0)",fontFamily:"var(--mono)",fontSize:13,outline:"none"},Sy={width:"100%",padding:"10px 16px",background:"var(--accent-dim)",color:"var(--accent)",borderRadius:"var(--radius)",fontSize:13,fontWeight:500,fontFamily:"var(--mono)",border:"none",cursor:"pointer"},ep={background:"transparent",color:"var(--text-2)",fontSize:12,fontFamily:"var(--mono)",border:"none",cursor:"pointer",padding:0};function Ty(r,u){return{send:O.useCallback(async(c,f,p,g)=>{const y=await fetch(`/api/minds/${g||r}/chat`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:c||void 0,conversationId:f,images:p&&p.length>0?p:void 0})});if(!y.ok){const _=await y.json().catch(()=>({error:`HTTP ${y.status}`}));throw new Error(_.error??`Chat request failed: ${y.status}`)}const m=await y.json();u({type:"meta",conversationId:m.conversationId}),u({type:"done"})},[r,u])}}function Ey(r,u){const s=O.useRef(null),c=O.useCallback(()=>{s.current?.abort();const p=new AbortController;s.current=p,fetch(`/api/minds/${r}/logs`,{signal:p.signal}).then(async g=>{if(!g.ok||!g.body)return;const T=g.body.getReader(),y=new TextDecoder;let m="";for(;;){const{done:_,value:A}=await T.read();if(_)break;m+=y.decode(A,{stream:!0});const j=m.split(`
10
+ `);m=j.pop()||"";for(const X of j){if(!X.startsWith("data: "))continue;const Y=X.slice(6);Y&&u(Y)}}}).catch(g=>{g instanceof DOMException&&g.name==="AbortError"||console.warn("[logs] stream error:",g)})},[r,u]),f=O.useCallback(()=>{s.current?.abort()},[]);return{start:c,stop:f}}function Ay(r){const u=O.useRef(null),s=O.useCallback(()=>{u.current?.abort();const f=new AbortController;u.current=f,fetch("/api/system/logs",{signal:f.signal}).then(async p=>{if(!p.ok||!p.body)return;const g=p.body.getReader(),T=new TextDecoder;let y="";for(;;){const{done:m,value:_}=await g.read();if(m)break;y+=T.decode(_,{stream:!0});const A=y.split(`
11
+ `);y=A.pop()||"";for(const j of A){if(!j.startsWith("data: "))continue;const X=j.slice(6);X&&r(X)}}}).catch(p=>{p instanceof DOMException&&p.name==="AbortError"||console.warn("[system-logs] stream error:",p)})},[r]),c=O.useCallback(()=>{u.current?.abort()},[]);return{start:s,stop:c}}const _y={info:"var(--text-2)",warn:"var(--yellow)",error:"var(--red)"};function zy(){const[r,u]=O.useState([]),[s,c]=O.useState(!0),f=O.useRef(null),p=O.useCallback(A=>{try{const j=JSON.parse(A);u(X=>{const Y=[...X,j];return Y.length>2e3?Y.slice(-2e3):Y})}catch{}},[]),{start:g,stop:T}=Ay(p);O.useEffect(()=>(g(),T),[g,T]),O.useEffect(()=>{s&&f.current&&(f.current.scrollTop=f.current.scrollHeight)},[r,s]);const y=()=>{const A=f.current;if(!A)return;const j=A.scrollHeight-A.scrollTop-A.clientHeight<30;c(j)},m=A=>{try{return new Date(A).toLocaleTimeString()}catch{return A}},_=A=>Object.entries(A).map(([j,X])=>`${j}=${typeof X=="string"?X:JSON.stringify(X)}`).join(" ");return d.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"calc(100vh - 48px - 48px)"},children:[d.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:12,flexShrink:0},children:[d.jsx("span",{style:{color:"var(--text-1)",fontSize:13,fontWeight:500},children:"System Logs"}),d.jsxs("span",{style:{color:"var(--text-2)",fontSize:11},children:[r.length," entries"]})]}),!s&&d.jsxs("div",{style:{padding:"6px 12px",background:"var(--bg-3)",borderBottom:"1px solid var(--border)",display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:11,color:"var(--text-2)",flexShrink:0},children:[d.jsx("span",{children:"Scroll paused"}),d.jsx("button",{onClick:()=>{c(!0),f.current&&(f.current.scrollTop=f.current.scrollHeight)},style:{background:"var(--accent-dim)",color:"var(--accent)",padding:"2px 10px",borderRadius:"var(--radius)",fontSize:11},children:"Resume"})]}),d.jsxs("div",{ref:f,onScroll:y,style:{flex:1,overflow:"auto",padding:12,fontFamily:"var(--mono)",fontSize:11,lineHeight:1.7,color:"var(--text-1)",background:"var(--bg-0)",border:"1px solid var(--border)",borderRadius:"var(--radius-lg)"},children:[r.length===0&&d.jsx("span",{style:{color:"var(--text-2)"},children:"Waiting for logs..."}),r.map((A,j)=>d.jsxs("div",{style:{animation:"fadeIn 0.1s ease both",whiteSpace:"pre-wrap"},children:[d.jsx("span",{style:{color:"var(--text-2)"},children:m(A.ts)})," ",d.jsx("span",{style:{color:_y[A.level]||"var(--text-2)"},children:A.level.padEnd(5)})," ",d.jsx("span",{style:{color:"var(--text-0)"},children:A.msg}),A.data&&d.jsxs("span",{style:{color:"var(--text-2)"},children:[" ",_(A.data)]})]},j))]})]})}function Ry(){const[r,u]=O.useState(null),[s,c]=O.useState(!1),[f,p]=O.useState(!1),[g,T]=O.useState(null);if(O.useEffect(()=>{let m=!0;async function _(){try{const j=await fetch("/api/health");if(!j.ok)return;const X=await j.json();m&&X.updateAvailable?u({current:X.version,latest:X.latest,updateAvailable:!0}):m&&u(null)}catch{}}_();const A=setInterval(_,6e4);return()=>{m=!1,clearInterval(A)}},[]),!r?.updateAvailable||s)return null;async function y(){p(!0);try{if(!(await fetch("/api/system/update",{method:"POST"})).ok){p(!1),T("Update failed"),setTimeout(()=>T(null),5e3);return}const _=Date.now(),A=6e4;for(await new Promise(j=>setTimeout(j,3e3));Date.now()-_<A;){try{const j=await fetch("/api/health");if(j.ok&&(await j.json()).version!==r?.current){window.location.reload();return}}catch{}await new Promise(j=>setTimeout(j,2e3))}window.location.reload()}catch{p(!1),T("Update failed"),setTimeout(()=>T(null),5e3)}}return d.jsx("div",{style:ky,children:g?d.jsx("span",{style:{color:"var(--error, #f44)"},children:g}):f?d.jsx("span",{style:{animation:"pulse 1.5s ease-in-out infinite"},children:"Updating..."}):d.jsxs(d.Fragment,{children:[d.jsxs("span",{children:["Update available: v",r.current," → v",r.latest]}),d.jsx("button",{onClick:y,style:wy,children:"update"}),d.jsx("button",{onClick:()=>c(!0),style:jy,children:"×"})]})})}const ky={display:"flex",alignItems:"center",justifyContent:"center",gap:12,padding:"6px 16px",background:"var(--accent-bg)",borderBottom:"1px solid var(--accent-dim)",color:"var(--accent)",fontSize:12,fontFamily:"var(--mono)",flexShrink:0},wy={background:"var(--accent-dim)",color:"var(--accent)",border:"1px solid var(--accent)",borderRadius:"var(--radius)",padding:"2px 10px",fontSize:11,fontFamily:"var(--mono)",cursor:"pointer"},jy={background:"transparent",color:"var(--accent)",border:"none",fontSize:16,lineHeight:1,cursor:"pointer",padding:"0 4px"};function My({onClose:r}){const[u,s]=O.useState([]),c=()=>{vy().then(s).catch(()=>{})};O.useEffect(()=>{c()},[c]);const f=async p=>{await by(p),c()};return d.jsxs("div",{style:{maxWidth:600,animation:"fadeIn 0.2s ease both"},children:[d.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:16},children:[d.jsx("h2",{style:{fontSize:15,fontWeight:600},children:"Users"}),d.jsx("button",{onClick:r,style:{background:"transparent",color:"var(--text-2)",fontSize:12},children:"back"})]}),d.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[u.map(p=>d.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 14px",background:"var(--bg-2)",border:"1px solid var(--border)",borderRadius:"var(--radius)"},children:[d.jsxs("div",{children:[d.jsx("span",{style:{color:"var(--text-0)",marginRight:12},children:p.username}),d.jsx("span",{style:{fontSize:11,color:p.role==="admin"?"var(--accent)":p.role==="pending"?"var(--yellow)":"var(--text-2)"},children:p.role})]}),p.role==="pending"&&d.jsx("button",{onClick:()=>f(p.id),style:{padding:"4px 12px",background:"var(--accent-dim)",color:"var(--accent)",borderRadius:"var(--radius)",fontSize:11,fontWeight:500},children:"approve"})]},p.id)),u.length===0&&d.jsx("div",{style:{color:"var(--text-2)",textAlign:"center",padding:24},children:"No users yet."})]})]})}const kt=Ap("/");async function or(){const r=await kt.api.minds.$get();if(!r.ok)throw new Error("Failed to fetch minds");return r.json()}async function Cy(r){const u=await kt.api.minds[":name"].$get({param:{name:r}});if(!u.ok)throw new Error("Failed to fetch mind");return u.json()}async function _p(r){const u=await kt.api.minds[":name"].start.$post({param:{name:r}});if(!u.ok){const s=await u.json();throw new Error(s.error||"Failed to start")}}async function Oy(r){const u=await kt.api.minds[":name"].stop.$post({param:{name:r}});if(!u.ok){const s=await u.json();throw new Error(s.error||"Failed to stop")}}async function Dy(r){const u=await kt.api.minds[":name"].variants.$get({param:{name:r}});if(!u.ok)throw new Error("Failed to fetch variants");return u.json()}async function Ny(r){const u=await kt.api.minds[":name"].files.$get({param:{name:r}});if(!u.ok)throw new Error("Failed to fetch files");return u.json()}async function Uy(r,u){const s=await kt.api.minds[":name"].files[":filename"].$get({param:{name:r,filename:u}});if(!s.ok)throw new Error("Failed to fetch file");return s.json()}async function Hy(r,u){const s=await kt.api.minds[":name"].conversations[":id"].messages.$get({param:{name:r,id:u}});if(!s.ok)throw new Error("Failed to fetch messages");return s.json()}async function Ly(r,u){const s=new URLSearchParams;u?.channel&&s.set("channel",u.channel),s.set("limit",String(u.limit)),u?.offset&&s.set("offset",String(u.offset));const c=s.toString(),f=await fetch(`/api/minds/${encodeURIComponent(r)}/history${c?`?${c}`:""}`);if(!f.ok)throw new Error("Failed to fetch history");return f.json()}async function By(r){const u=await fetch(`/api/minds/${encodeURIComponent(r)}/history/channels`);if(!u.ok)throw new Error("Failed to fetch channels");return u.json()}async function qy(r){const s=await fetch("/api/auth/users",{credentials:"include"});if(!s.ok)throw new Error("Failed to fetch users");return s.json()}async function zp(){const r=await kt.api.conversations.$get();if(!r.ok)throw new Error("Failed to fetch conversations");return r.json()}async function Gy(r){const u=await kt.api.conversations[":id"].messages.$get({param:{id:r}});if(!u.ok)throw new Error("Failed to fetch messages");return u.json()}async function Yy(r){if(!(await kt.api.conversations[":id"].$delete({param:{id:r}})).ok)throw new Error("Failed to delete conversation")}async function Xy(r,u){const s=await kt.api.conversations.$post({json:{participantNames:r,title:u}});if(!s.ok){const c=await s.json();throw new Error(c.error||"Failed to create conversation")}return s.json()}async function Qy(){const r=await kt.api.minds.pages.recent.$get();if(!r.ok)throw new Error("Failed to fetch recent pages");return r.json()}function tr(r,u,s,c){fetch(`/api/minds/${encodeURIComponent(r)}/typing`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({channel:u,sender:s,active:c})}).catch(()=>{})}async function Zy(r,u){const s=await fetch(`/api/minds/${encodeURIComponent(r)}/typing?channel=${encodeURIComponent(u)}`);if(!s.ok)throw new Error(`Failed to fetch typing (${s.status})`);return(await s.json()).typing}async function Vy(r,u){const s=await kt.api.minds.$post({json:{name:r,stage:"seed",description:u?.description,template:u?.template,model:u?.model}});if(!s.ok){const c=await s.json();throw new Error(c.error||"Failed to create mind")}return s.json()}const{entries:Rp,setPrototypeOf:tp,isFrozen:Ky,getPrototypeOf:Jy,getOwnPropertyDescriptor:$y}=Object;let{freeze:vt,seal:It,create:Hs}=Object,{apply:Ls,construct:Bs}=typeof Reflect<"u"&&Reflect;vt||(vt=function(u){return u});It||(It=function(u){return u});Ls||(Ls=function(u,s){for(var c=arguments.length,f=new Array(c>2?c-2:0),p=2;p<c;p++)f[p-2]=arguments[p];return u.apply(s,f)});Bs||(Bs=function(u){for(var s=arguments.length,c=new Array(s>1?s-1:0),f=1;f<s;f++)c[f-1]=arguments[f];return new u(...c)});const lr=bt(Array.prototype.forEach),Wy=bt(Array.prototype.lastIndexOf),lp=bt(Array.prototype.pop),_i=bt(Array.prototype.push),Fy=bt(Array.prototype.splice),ur=bt(String.prototype.toLowerCase),ks=bt(String.prototype.toString),ws=bt(String.prototype.match),zi=bt(String.prototype.replace),Iy=bt(String.prototype.indexOf),Py=bt(String.prototype.trim),nl=bt(Object.prototype.hasOwnProperty),mt=bt(RegExp.prototype.test),Ri=e0(TypeError);function bt(r){return function(u){u instanceof RegExp&&(u.lastIndex=0);for(var s=arguments.length,c=new Array(s>1?s-1:0),f=1;f<s;f++)c[f-1]=arguments[f];return Ls(r,u,c)}}function e0(r){return function(){for(var u=arguments.length,s=new Array(u),c=0;c<u;c++)s[c]=arguments[c];return Bs(r,s)}}function fe(r,u){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ur;tp&&tp(r,null);let c=u.length;for(;c--;){let f=u[c];if(typeof f=="string"){const p=s(f);p!==f&&(Ky(u)||(u[c]=p),f=p)}r[f]=!0}return r}function t0(r){for(let u=0;u<r.length;u++)nl(r,u)||(r[u]=null);return r}function hl(r){const u=Hs(null);for(const[s,c]of Rp(r))nl(r,s)&&(Array.isArray(c)?u[s]=t0(c):c&&typeof c=="object"&&c.constructor===Object?u[s]=hl(c):u[s]=c);return u}function ki(r,u){for(;r!==null;){const c=$y(r,u);if(c){if(c.get)return bt(c.get);if(typeof c.value=="function")return bt(c.value)}r=Jy(r)}function s(){return null}return s}const ap=vt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),js=vt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ms=vt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),l0=vt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Cs=vt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),a0=vt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),np=vt(["#text"]),ip=vt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Os=vt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),up=vt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ar=vt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),n0=It(/\{\{[\w\W]*|[\w\W]*\}\}/gm),i0=It(/<%[\w\W]*|[\w\W]*%>/gm),u0=It(/\$\{[\w\W]*/gm),r0=It(/^data-[\-\w.\u00B7-\uFFFF]+$/),c0=It(/^aria-[\-\w]+$/),kp=It(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),s0=It(/^(?:\w+script|data):/i),o0=It(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),wp=It(/^html$/i),f0=It(/^[a-z][.\w]*(-[.\w]+)+$/i);var rp=Object.freeze({__proto__:null,ARIA_ATTR:c0,ATTR_WHITESPACE:o0,CUSTOM_ELEMENT:f0,DATA_ATTR:r0,DOCTYPE_NAME:wp,ERB_EXPR:i0,IS_ALLOWED_URI:kp,IS_SCRIPT_OR_DATA:s0,MUSTACHE_EXPR:n0,TMPLIT_EXPR:u0});const wi={element:1,text:3,progressingInstruction:7,comment:8,document:9},d0=function(){return typeof window>"u"?null:window},h0=function(u,s){if(typeof u!="object"||typeof u.createPolicy!="function")return null;let c=null;const f="data-tt-policy-suffix";s&&s.hasAttribute(f)&&(c=s.getAttribute(f));const p="dompurify"+(c?"#"+c:"");try{return u.createPolicy(p,{createHTML(g){return g},createScriptURL(g){return g}})}catch{return console.warn("TrustedTypes policy "+p+" could not be created."),null}},cp=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function jp(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d0();const u=W=>jp(W);if(u.version="3.3.1",u.removed=[],!r||!r.document||r.document.nodeType!==wi.document||!r.Element)return u.isSupported=!1,u;let{document:s}=r;const c=s,f=c.currentScript,{DocumentFragment:p,HTMLTemplateElement:g,Node:T,Element:y,NodeFilter:m,NamedNodeMap:_=r.NamedNodeMap||r.MozNamedAttrMap,HTMLFormElement:A,DOMParser:j,trustedTypes:X}=r,Y=y.prototype,q=ki(Y,"cloneNode"),I=ki(Y,"remove"),ne=ki(Y,"nextSibling"),$e=ki(Y,"childNodes"),Oe=ki(Y,"parentNode");if(typeof g=="function"){const W=s.createElement("template");W.content&&W.content.ownerDocument&&(s=W.content.ownerDocument)}let oe,Ee="";const{implementation:Ne,createNodeIterator:ue,createDocumentFragment:Ye,getElementsByTagName:rt}=s,{importNode:wt}=c;let Ae=cp();u.isSupported=typeof Rp=="function"&&typeof Oe=="function"&&Ne&&Ne.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:$,ERB_EXPR:G,TMPLIT_EXPR:Q,DATA_ATTR:re,ARIA_ATTR:k,IS_SCRIPT_OR_DATA:B,ATTR_WHITESPACE:P,CUSTOM_ELEMENT:ye}=rp;let{IS_ALLOWED_URI:_e}=rp,b=null;const U=fe({},[...ap,...js,...Ms,...Cs,...np]);let L=null;const V=fe({},[...ip,...Os,...up,...ar]);let J=Object.seal(Hs(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ae=null,ve=null;const Xe=Object.seal(Hs(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Le=!0,pl=!0,pa=!1,Ua=!0,gl=!1,Bt=!0,Pt=!1,ga=!1,En=!1,ml=!1,Gl=!1,Yl=!1,Ha=!0,Ni=!1;const hr="user-content-";let ct=!0,ma=!1,yl={},jt=null;const Xl=fe({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ui=null;const An=fe({},["audio","video","img","source","image","track"]);let _n=null;const Hi=fe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),rl="http://www.w3.org/1998/Math/MathML",nt="http://www.w3.org/2000/svg",it="http://www.w3.org/1999/xhtml";let We=it,zn=!1,Rn=null;const pr=fe({},[rl,nt,it],ks);let vl=fe({},["mi","mo","mn","ms","mtext"]),bl=fe({},["annotation-xml"]);const La=fe({},["title","style","font","a","script"]);let Mt=null;const Ba=["application/xhtml+xml","text/html"],ya="text/html";let Ve=null,xl=null;const kn=s.createElement("form"),Ql=function(x){return x instanceof RegExp||x instanceof Function},wn=function(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(xl&&xl===x)){if((!x||typeof x!="object")&&(x={}),x=hl(x),Mt=Ba.indexOf(x.PARSER_MEDIA_TYPE)===-1?ya:x.PARSER_MEDIA_TYPE,Ve=Mt==="application/xhtml+xml"?ks:ur,b=nl(x,"ALLOWED_TAGS")?fe({},x.ALLOWED_TAGS,Ve):U,L=nl(x,"ALLOWED_ATTR")?fe({},x.ALLOWED_ATTR,Ve):V,Rn=nl(x,"ALLOWED_NAMESPACES")?fe({},x.ALLOWED_NAMESPACES,ks):pr,_n=nl(x,"ADD_URI_SAFE_ATTR")?fe(hl(Hi),x.ADD_URI_SAFE_ATTR,Ve):Hi,Ui=nl(x,"ADD_DATA_URI_TAGS")?fe(hl(An),x.ADD_DATA_URI_TAGS,Ve):An,jt=nl(x,"FORBID_CONTENTS")?fe({},x.FORBID_CONTENTS,Ve):Xl,ae=nl(x,"FORBID_TAGS")?fe({},x.FORBID_TAGS,Ve):hl({}),ve=nl(x,"FORBID_ATTR")?fe({},x.FORBID_ATTR,Ve):hl({}),yl=nl(x,"USE_PROFILES")?x.USE_PROFILES:!1,Le=x.ALLOW_ARIA_ATTR!==!1,pl=x.ALLOW_DATA_ATTR!==!1,pa=x.ALLOW_UNKNOWN_PROTOCOLS||!1,Ua=x.ALLOW_SELF_CLOSE_IN_ATTR!==!1,gl=x.SAFE_FOR_TEMPLATES||!1,Bt=x.SAFE_FOR_XML!==!1,Pt=x.WHOLE_DOCUMENT||!1,ml=x.RETURN_DOM||!1,Gl=x.RETURN_DOM_FRAGMENT||!1,Yl=x.RETURN_TRUSTED_TYPE||!1,En=x.FORCE_BODY||!1,Ha=x.SANITIZE_DOM!==!1,Ni=x.SANITIZE_NAMED_PROPS||!1,ct=x.KEEP_CONTENT!==!1,ma=x.IN_PLACE||!1,_e=x.ALLOWED_URI_REGEXP||kp,We=x.NAMESPACE||it,vl=x.MATHML_TEXT_INTEGRATION_POINTS||vl,bl=x.HTML_INTEGRATION_POINTS||bl,J=x.CUSTOM_ELEMENT_HANDLING||{},x.CUSTOM_ELEMENT_HANDLING&&Ql(x.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(J.tagNameCheck=x.CUSTOM_ELEMENT_HANDLING.tagNameCheck),x.CUSTOM_ELEMENT_HANDLING&&Ql(x.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(J.attributeNameCheck=x.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),x.CUSTOM_ELEMENT_HANDLING&&typeof x.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(J.allowCustomizedBuiltInElements=x.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),gl&&(pl=!1),Gl&&(ml=!0),yl&&(b=fe({},np),L=[],yl.html===!0&&(fe(b,ap),fe(L,ip)),yl.svg===!0&&(fe(b,js),fe(L,Os),fe(L,ar)),yl.svgFilters===!0&&(fe(b,Ms),fe(L,Os),fe(L,ar)),yl.mathMl===!0&&(fe(b,Cs),fe(L,up),fe(L,ar))),x.ADD_TAGS&&(typeof x.ADD_TAGS=="function"?Xe.tagCheck=x.ADD_TAGS:(b===U&&(b=hl(b)),fe(b,x.ADD_TAGS,Ve))),x.ADD_ATTR&&(typeof x.ADD_ATTR=="function"?Xe.attributeCheck=x.ADD_ATTR:(L===V&&(L=hl(L)),fe(L,x.ADD_ATTR,Ve))),x.ADD_URI_SAFE_ATTR&&fe(_n,x.ADD_URI_SAFE_ATTR,Ve),x.FORBID_CONTENTS&&(jt===Xl&&(jt=hl(jt)),fe(jt,x.FORBID_CONTENTS,Ve)),x.ADD_FORBID_CONTENTS&&(jt===Xl&&(jt=hl(jt)),fe(jt,x.ADD_FORBID_CONTENTS,Ve)),ct&&(b["#text"]=!0),Pt&&fe(b,["html","head","body"]),b.table&&(fe(b,["tbody"]),delete ae.tbody),x.TRUSTED_TYPES_POLICY){if(typeof x.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ri('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof x.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ri('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');oe=x.TRUSTED_TYPES_POLICY,Ee=oe.createHTML("")}else oe===void 0&&(oe=h0(X,f)),oe!==null&&typeof Ee=="string"&&(Ee=oe.createHTML(""));vt&&vt(x),xl=x}},jn=fe({},[...js,...Ms,...l0]),Mn=fe({},[...Cs,...a0]),Li=function(x){let H=Oe(x);(!H||!H.tagName)&&(H={namespaceURI:We,tagName:"template"});const Z=ur(x.tagName),ze=ur(H.tagName);return Rn[x.namespaceURI]?x.namespaceURI===nt?H.namespaceURI===it?Z==="svg":H.namespaceURI===rl?Z==="svg"&&(ze==="annotation-xml"||vl[ze]):!!jn[Z]:x.namespaceURI===rl?H.namespaceURI===it?Z==="math":H.namespaceURI===nt?Z==="math"&&bl[ze]:!!Mn[Z]:x.namespaceURI===it?H.namespaceURI===nt&&!bl[ze]||H.namespaceURI===rl&&!vl[ze]?!1:!Mn[Z]&&(La[Z]||!jn[Z]):!!(Mt==="application/xhtml+xml"&&Rn[x.namespaceURI]):!1},xt=function(x){_i(u.removed,{element:x});try{Oe(x).removeChild(x)}catch{I(x)}},el=function(x,H){try{_i(u.removed,{attribute:H.getAttributeNode(x),from:H})}catch{_i(u.removed,{attribute:null,from:H})}if(H.removeAttribute(x),x==="is")if(ml||Gl)try{xt(H)}catch{}else try{H.setAttribute(x,"")}catch{}},Cn=function(x){let H=null,Z=null;if(En)x="<remove></remove>"+x;else{const se=ws(x,/^[\r\n\t ]+/);Z=se&&se[0]}Mt==="application/xhtml+xml"&&We===it&&(x='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+x+"</body></html>");const ze=oe?oe.createHTML(x):x;if(We===it)try{H=new j().parseFromString(ze,Mt)}catch{}if(!H||!H.documentElement){H=Ne.createDocument(We,"template",null);try{H.documentElement.innerHTML=zn?Ee:ze}catch{}}const Ge=H.body||H.documentElement;return x&&Z&&Ge.insertBefore(s.createTextNode(Z),Ge.childNodes[0]||null),We===it?rt.call(H,Pt?"html":"body")[0]:Pt?H.documentElement:Ge},On=function(x){return ue.call(x.ownerDocument||x,x,m.SHOW_ELEMENT|m.SHOW_COMMENT|m.SHOW_TEXT|m.SHOW_PROCESSING_INSTRUCTION|m.SHOW_CDATA_SECTION,null)},qt=function(x){return x instanceof A&&(typeof x.nodeName!="string"||typeof x.textContent!="string"||typeof x.removeChild!="function"||!(x.attributes instanceof _)||typeof x.removeAttribute!="function"||typeof x.setAttribute!="function"||typeof x.namespaceURI!="string"||typeof x.insertBefore!="function"||typeof x.hasChildNodes!="function")},Fe=function(x){return typeof T=="function"&&x instanceof T};function Be(W,x,H){lr(W,Z=>{Z.call(u,x,H,xl)})}const Sl=function(x){let H=null;if(Be(Ae.beforeSanitizeElements,x,null),qt(x))return xt(x),!0;const Z=Ve(x.nodeName);if(Be(Ae.uponSanitizeElement,x,{tagName:Z,allowedTags:b}),Bt&&x.hasChildNodes()&&!Fe(x.firstElementChild)&&mt(/<[/\w!]/g,x.innerHTML)&&mt(/<[/\w!]/g,x.textContent)||x.nodeType===wi.progressingInstruction||Bt&&x.nodeType===wi.comment&&mt(/<[/\w]/g,x.data))return xt(x),!0;if(!(Xe.tagCheck instanceof Function&&Xe.tagCheck(Z))&&(!b[Z]||ae[Z])){if(!ae[Z]&&Bi(Z)&&(J.tagNameCheck instanceof RegExp&&mt(J.tagNameCheck,Z)||J.tagNameCheck instanceof Function&&J.tagNameCheck(Z)))return!1;if(ct&&!jt[Z]){const ze=Oe(x)||x.parentNode,Ge=$e(x)||x.childNodes;if(Ge&&ze){const se=Ge.length;for(let st=se-1;st>=0;--st){const Gt=q(Ge[st],!0);Gt.__removalCount=(x.__removalCount||0)+1,ze.insertBefore(Gt,ne(x))}}}return xt(x),!0}return x instanceof y&&!Li(x)||(Z==="noscript"||Z==="noembed"||Z==="noframes")&&mt(/<\/no(script|embed|frames)/i,x.innerHTML)?(xt(x),!0):(gl&&x.nodeType===wi.text&&(H=x.textContent,lr([$,G,Q],ze=>{H=zi(H,ze," ")}),x.textContent!==H&&(_i(u.removed,{element:x.cloneNode()}),x.textContent=H)),Be(Ae.afterSanitizeElements,x,null),!1)},qa=function(x,H,Z){if(Ha&&(H==="id"||H==="name")&&(Z in s||Z in kn))return!1;if(!(pl&&!ve[H]&&mt(re,H))){if(!(Le&&mt(k,H))){if(!(Xe.attributeCheck instanceof Function&&Xe.attributeCheck(H,x))){if(!L[H]||ve[H]){if(!(Bi(x)&&(J.tagNameCheck instanceof RegExp&&mt(J.tagNameCheck,x)||J.tagNameCheck instanceof Function&&J.tagNameCheck(x))&&(J.attributeNameCheck instanceof RegExp&&mt(J.attributeNameCheck,H)||J.attributeNameCheck instanceof Function&&J.attributeNameCheck(H,x))||H==="is"&&J.allowCustomizedBuiltInElements&&(J.tagNameCheck instanceof RegExp&&mt(J.tagNameCheck,Z)||J.tagNameCheck instanceof Function&&J.tagNameCheck(Z))))return!1}else if(!_n[H]){if(!mt(_e,zi(Z,P,""))){if(!((H==="src"||H==="xlink:href"||H==="href")&&x!=="script"&&Iy(Z,"data:")===0&&Ui[x])){if(!(pa&&!mt(B,zi(Z,P,"")))){if(Z)return!1}}}}}}}return!0},Bi=function(x){return x!=="annotation-xml"&&ws(x,ye)},qi=function(x){Be(Ae.beforeSanitizeAttributes,x,null);const{attributes:H}=x;if(!H||qt(x))return;const Z={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:L,forceKeepAttr:void 0};let ze=H.length;for(;ze--;){const Ge=H[ze],{name:se,namespaceURI:st,value:Gt}=Ge,St=Ve(se),cl=Gt;let lt=se==="value"?cl:Py(cl);if(Z.attrName=St,Z.attrValue=lt,Z.keepAttr=!0,Z.forceKeepAttr=void 0,Be(Ae.uponSanitizeAttribute,x,Z),lt=Z.attrValue,Ni&&(St==="id"||St==="name")&&(el(se,x),lt=hr+lt),Bt&&mt(/((--!?|])>)|<\/(style|title|textarea)/i,lt)){el(se,x);continue}if(St==="attributename"&&ws(lt,"href")){el(se,x);continue}if(Z.forceKeepAttr)continue;if(!Z.keepAttr){el(se,x);continue}if(!Ua&&mt(/\/>/i,lt)){el(se,x);continue}gl&&lr([$,G,Q],Nn=>{lt=zi(lt,Nn," ")});const Dn=Ve(x.nodeName);if(!qa(Dn,St,lt)){el(se,x);continue}if(oe&&typeof X=="object"&&typeof X.getAttributeType=="function"&&!st)switch(X.getAttributeType(Dn,St)){case"TrustedHTML":{lt=oe.createHTML(lt);break}case"TrustedScriptURL":{lt=oe.createScriptURL(lt);break}}if(lt!==cl)try{st?x.setAttributeNS(st,se,lt):x.setAttribute(se,lt),qt(x)?xt(x):lp(u.removed)}catch{el(se,x)}}Be(Ae.afterSanitizeAttributes,x,null)},Gi=function W(x){let H=null;const Z=On(x);for(Be(Ae.beforeSanitizeShadowDOM,x,null);H=Z.nextNode();)Be(Ae.uponSanitizeShadowNode,H,null),Sl(H),qi(H),H.content instanceof p&&W(H.content);Be(Ae.afterSanitizeShadowDOM,x,null)};return u.sanitize=function(W){let x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},H=null,Z=null,ze=null,Ge=null;if(zn=!W,zn&&(W="<!-->"),typeof W!="string"&&!Fe(W))if(typeof W.toString=="function"){if(W=W.toString(),typeof W!="string")throw Ri("dirty is not a string, aborting")}else throw Ri("toString is not a function");if(!u.isSupported)return W;if(ga||wn(x),u.removed=[],typeof W=="string"&&(ma=!1),ma){if(W.nodeName){const Gt=Ve(W.nodeName);if(!b[Gt]||ae[Gt])throw Ri("root node is forbidden and cannot be sanitized in-place")}}else if(W instanceof T)H=Cn("<!---->"),Z=H.ownerDocument.importNode(W,!0),Z.nodeType===wi.element&&Z.nodeName==="BODY"||Z.nodeName==="HTML"?H=Z:H.appendChild(Z);else{if(!ml&&!gl&&!Pt&&W.indexOf("<")===-1)return oe&&Yl?oe.createHTML(W):W;if(H=Cn(W),!H)return ml?null:Yl?Ee:""}H&&En&&xt(H.firstChild);const se=On(ma?W:H);for(;ze=se.nextNode();)Sl(ze),qi(ze),ze.content instanceof p&&Gi(ze.content);if(ma)return W;if(ml){if(Gl)for(Ge=Ye.call(H.ownerDocument);H.firstChild;)Ge.appendChild(H.firstChild);else Ge=H;return(L.shadowroot||L.shadowrootmode)&&(Ge=wt.call(c,Ge,!0)),Ge}let st=Pt?H.outerHTML:H.innerHTML;return Pt&&b["!doctype"]&&H.ownerDocument&&H.ownerDocument.doctype&&H.ownerDocument.doctype.name&&mt(wp,H.ownerDocument.doctype.name)&&(st="<!DOCTYPE "+H.ownerDocument.doctype.name+`>
12
+ `+st),gl&&lr([$,G,Q],Gt=>{st=zi(st,Gt," ")}),oe&&Yl?oe.createHTML(st):st},u.setConfig=function(){let W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};wn(W),ga=!0},u.clearConfig=function(){xl=null,ga=!1},u.isValidAttribute=function(W,x,H){xl||wn({});const Z=Ve(W),ze=Ve(x);return qa(Z,ze,H)},u.addHook=function(W,x){typeof x=="function"&&_i(Ae[W],x)},u.removeHook=function(W,x){if(x!==void 0){const H=Wy(Ae[W],x);return H===-1?void 0:Fy(Ae[W],H,1)[0]}return lp(Ae[W])},u.removeHooks=function(W){Ae[W]=[]},u.removeAllHooks=function(){Ae=cp()},u}var p0=jp();function Qs(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Na=Qs();function Mp(r){Na=r}var Oi={exec:()=>null};function Se(r,u=""){let s=typeof r=="string"?r:r.source,c={replace:(f,p)=>{let g=typeof p=="string"?p:p.source;return g=g.replace(yt.caret,"$1"),s=s.replace(f,g),c},getRegex:()=>new RegExp(s,u)};return c}var g0=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),yt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}#`),htmlBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}<(?:[a-z].*>|!--)`,"i")},m0=/^(?:[ \t]*(?:\n|$))+/,y0=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,v0=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Di=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,b0=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Zs=/(?:[*+-]|\d{1,9}[.)])/,Cp=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Op=Se(Cp).replace(/bull/g,Zs).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),x0=Se(Cp).replace(/bull/g,Zs).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Vs=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,S0=/^[^\n]+/,Ks=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,T0=Se(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ks).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),E0=Se(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Zs).getRegex(),fr="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Js=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,A0=Se("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Js).replace("tag",fr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Dp=Se(Vs).replace("hr",Di).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",fr).getRegex(),_0=Se(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Dp).getRegex(),$s={blockquote:_0,code:y0,def:T0,fences:v0,heading:b0,hr:Di,html:A0,lheading:Op,list:E0,newline:m0,paragraph:Dp,table:Oi,text:S0},sp=Se("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Di).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",fr).getRegex(),z0={...$s,lheading:x0,table:sp,paragraph:Se(Vs).replace("hr",Di).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",sp).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",fr).getRegex()},R0={...$s,html:Se(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Js).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Oi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Se(Vs).replace("hr",Di).replace("heading",` *#{1,6} *[^
13
+ ]`).replace("lheading",Op).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},k0=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,w0=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Np=/^( {2,}|\\)\n(?!\s*$)/,j0=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,dr=/[\p{P}\p{S}]/u,Ws=/[\s\p{P}\p{S}]/u,Up=/[^\s\p{P}\p{S}]/u,M0=Se(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ws).getRegex(),Hp=/(?!~)[\p{P}\p{S}]/u,C0=/(?!~)[\s\p{P}\p{S}]/u,O0=/(?:[^\s\p{P}\p{S}]|~)/u,D0=Se(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",g0?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Lp=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,N0=Se(Lp,"u").replace(/punct/g,dr).getRegex(),U0=Se(Lp,"u").replace(/punct/g,Hp).getRegex(),Bp="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",H0=Se(Bp,"gu").replace(/notPunctSpace/g,Up).replace(/punctSpace/g,Ws).replace(/punct/g,dr).getRegex(),L0=Se(Bp,"gu").replace(/notPunctSpace/g,O0).replace(/punctSpace/g,C0).replace(/punct/g,Hp).getRegex(),B0=Se("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Up).replace(/punctSpace/g,Ws).replace(/punct/g,dr).getRegex(),q0=Se(/\\(punct)/,"gu").replace(/punct/g,dr).getRegex(),G0=Se(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Y0=Se(Js).replace("(?:-->|$)","-->").getRegex(),X0=Se("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Y0).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),rr=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Q0=Se(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",rr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),qp=Se(/^!?\[(label)\]\[(ref)\]/).replace("label",rr).replace("ref",Ks).getRegex(),Gp=Se(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ks).getRegex(),Z0=Se("reflink|nolink(?!\\()","g").replace("reflink",qp).replace("nolink",Gp).getRegex(),op=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Fs={_backpedal:Oi,anyPunctuation:q0,autolink:G0,blockSkip:D0,br:Np,code:w0,del:Oi,emStrongLDelim:N0,emStrongRDelimAst:H0,emStrongRDelimUnd:B0,escape:k0,link:Q0,nolink:Gp,punctuation:M0,reflink:qp,reflinkSearch:Z0,tag:X0,text:j0,url:Oi},V0={...Fs,link:Se(/^!?\[(label)\]\((.*?)\)/).replace("label",rr).getRegex(),reflink:Se(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",rr).getRegex()},qs={...Fs,emStrongRDelimAst:L0,emStrongLDelim:U0,url:Se(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",op).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Se(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",op).getRegex()},K0={...qs,br:Se(Np).replace("{2,}","*").getRegex(),text:Se(qs.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},nr={normal:$s,gfm:z0,pedantic:R0},ji={normal:Fs,gfm:qs,breaks:K0,pedantic:V0},J0={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},fp=r=>J0[r];function ql(r,u){if(u){if(yt.escapeTest.test(r))return r.replace(yt.escapeReplace,fp)}else if(yt.escapeTestNoEncode.test(r))return r.replace(yt.escapeReplaceNoEncode,fp);return r}function dp(r){try{r=encodeURI(r).replace(yt.percentDecode,"%")}catch{return null}return r}function hp(r,u){let s=r.replace(yt.findPipe,(p,g,T)=>{let y=!1,m=g;for(;--m>=0&&T[m]==="\\";)y=!y;return y?"|":" |"}),c=s.split(yt.splitPipe),f=0;if(c[0].trim()||c.shift(),c.length>0&&!c.at(-1)?.trim()&&c.pop(),u)if(c.length>u)c.splice(u);else for(;c.length<u;)c.push("");for(;f<c.length;f++)c[f]=c[f].trim().replace(yt.slashPipe,"|");return c}function Mi(r,u,s){let c=r.length;if(c===0)return"";let f=0;for(;f<c&&r.charAt(c-f-1)===u;)f++;return r.slice(0,c-f)}function $0(r,u){if(r.indexOf(u[1])===-1)return-1;let s=0;for(let c=0;c<r.length;c++)if(r[c]==="\\")c++;else if(r[c]===u[0])s++;else if(r[c]===u[1]&&(s--,s<0))return c;return s>0?-2:-1}function pp(r,u,s,c,f){let p=u.href,g=u.title||null,T=r[1].replace(f.other.outputLinkReplace,"$1");c.state.inLink=!0;let y={type:r[0].charAt(0)==="!"?"image":"link",raw:s,href:p,title:g,text:T,tokens:c.inlineTokens(T)};return c.state.inLink=!1,y}function W0(r,u,s){let c=r.match(s.other.indentCodeCompensation);if(c===null)return u;let f=c[1];return u.split(`
14
+ `).map(p=>{let g=p.match(s.other.beginningSpace);if(g===null)return p;let[T]=g;return T.length>=f.length?p.slice(f.length):p}).join(`
15
+ `)}var cr=class{options;rules;lexer;constructor(r){this.options=r||Na}space(r){let u=this.rules.block.newline.exec(r);if(u&&u[0].length>0)return{type:"space",raw:u[0]}}code(r){let u=this.rules.block.code.exec(r);if(u){let s=u[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:u[0],codeBlockStyle:"indented",text:this.options.pedantic?s:Mi(s,`
16
+ `)}}}fences(r){let u=this.rules.block.fences.exec(r);if(u){let s=u[0],c=W0(s,u[3]||"",this.rules);return{type:"code",raw:s,lang:u[2]?u[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):u[2],text:c}}}heading(r){let u=this.rules.block.heading.exec(r);if(u){let s=u[2].trim();if(this.rules.other.endingHash.test(s)){let c=Mi(s,"#");(this.options.pedantic||!c||this.rules.other.endingSpaceChar.test(c))&&(s=c.trim())}return{type:"heading",raw:u[0],depth:u[1].length,text:s,tokens:this.lexer.inline(s)}}}hr(r){let u=this.rules.block.hr.exec(r);if(u)return{type:"hr",raw:Mi(u[0],`
17
+ `)}}blockquote(r){let u=this.rules.block.blockquote.exec(r);if(u){let s=Mi(u[0],`
18
+ `).split(`
19
+ `),c="",f="",p=[];for(;s.length>0;){let g=!1,T=[],y;for(y=0;y<s.length;y++)if(this.rules.other.blockquoteStart.test(s[y]))T.push(s[y]),g=!0;else if(!g)T.push(s[y]);else break;s=s.slice(y);let m=T.join(`
20
+ `),_=m.replace(this.rules.other.blockquoteSetextReplace,`
21
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");c=c?`${c}
22
+ ${m}`:m,f=f?`${f}
23
+ ${_}`:_;let A=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(_,p,!0),this.lexer.state.top=A,s.length===0)break;let j=p.at(-1);if(j?.type==="code")break;if(j?.type==="blockquote"){let X=j,Y=X.raw+`
24
+ `+s.join(`
25
+ `),q=this.blockquote(Y);p[p.length-1]=q,c=c.substring(0,c.length-X.raw.length)+q.raw,f=f.substring(0,f.length-X.text.length)+q.text;break}else if(j?.type==="list"){let X=j,Y=X.raw+`
26
+ `+s.join(`
27
+ `),q=this.list(Y);p[p.length-1]=q,c=c.substring(0,c.length-j.raw.length)+q.raw,f=f.substring(0,f.length-X.raw.length)+q.raw,s=Y.substring(p.at(-1).raw.length).split(`
28
+ `);continue}}return{type:"blockquote",raw:c,tokens:p,text:f}}}list(r){let u=this.rules.block.list.exec(r);if(u){let s=u[1].trim(),c=s.length>1,f={type:"list",raw:"",ordered:c,start:c?+s.slice(0,-1):"",loose:!1,items:[]};s=c?`\\d{1,9}\\${s.slice(-1)}`:`\\${s}`,this.options.pedantic&&(s=c?s:"[*+-]");let p=this.rules.other.listItemRegex(s),g=!1;for(;r;){let y=!1,m="",_="";if(!(u=p.exec(r))||this.rules.block.hr.test(r))break;m=u[0],r=r.substring(m.length);let A=u[2].split(`
29
+ `,1)[0].replace(this.rules.other.listReplaceTabs,q=>" ".repeat(3*q.length)),j=r.split(`
30
+ `,1)[0],X=!A.trim(),Y=0;if(this.options.pedantic?(Y=2,_=A.trimStart()):X?Y=u[1].length+1:(Y=u[2].search(this.rules.other.nonSpaceChar),Y=Y>4?1:Y,_=A.slice(Y),Y+=u[1].length),X&&this.rules.other.blankLine.test(j)&&(m+=j+`
31
+ `,r=r.substring(j.length+1),y=!0),!y){let q=this.rules.other.nextBulletRegex(Y),I=this.rules.other.hrRegex(Y),ne=this.rules.other.fencesBeginRegex(Y),$e=this.rules.other.headingBeginRegex(Y),Oe=this.rules.other.htmlBeginRegex(Y);for(;r;){let oe=r.split(`
32
+ `,1)[0],Ee;if(j=oe,this.options.pedantic?(j=j.replace(this.rules.other.listReplaceNesting," "),Ee=j):Ee=j.replace(this.rules.other.tabCharGlobal," "),ne.test(j)||$e.test(j)||Oe.test(j)||q.test(j)||I.test(j))break;if(Ee.search(this.rules.other.nonSpaceChar)>=Y||!j.trim())_+=`
33
+ `+Ee.slice(Y);else{if(X||A.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||ne.test(A)||$e.test(A)||I.test(A))break;_+=`
34
+ `+j}!X&&!j.trim()&&(X=!0),m+=oe+`
35
+ `,r=r.substring(oe.length+1),A=Ee.slice(Y)}}f.loose||(g?f.loose=!0:this.rules.other.doubleBlankLine.test(m)&&(g=!0)),f.items.push({type:"list_item",raw:m,task:!!this.options.gfm&&this.rules.other.listIsTask.test(_),loose:!1,text:_,tokens:[]}),f.raw+=m}let T=f.items.at(-1);if(T)T.raw=T.raw.trimEnd(),T.text=T.text.trimEnd();else return;f.raw=f.raw.trimEnd();for(let y of f.items){if(this.lexer.state.top=!1,y.tokens=this.lexer.blockTokens(y.text,[]),y.task){if(y.text=y.text.replace(this.rules.other.listReplaceTask,""),y.tokens[0]?.type==="text"||y.tokens[0]?.type==="paragraph"){y.tokens[0].raw=y.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),y.tokens[0].text=y.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let _=this.lexer.inlineQueue.length-1;_>=0;_--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[_].src)){this.lexer.inlineQueue[_].src=this.lexer.inlineQueue[_].src.replace(this.rules.other.listReplaceTask,"");break}}let m=this.rules.other.listTaskCheckbox.exec(y.raw);if(m){let _={type:"checkbox",raw:m[0]+" ",checked:m[0]!=="[ ]"};y.checked=_.checked,f.loose?y.tokens[0]&&["paragraph","text"].includes(y.tokens[0].type)&&"tokens"in y.tokens[0]&&y.tokens[0].tokens?(y.tokens[0].raw=_.raw+y.tokens[0].raw,y.tokens[0].text=_.raw+y.tokens[0].text,y.tokens[0].tokens.unshift(_)):y.tokens.unshift({type:"paragraph",raw:_.raw,text:_.raw,tokens:[_]}):y.tokens.unshift(_)}}if(!f.loose){let m=y.tokens.filter(A=>A.type==="space"),_=m.length>0&&m.some(A=>this.rules.other.anyLine.test(A.raw));f.loose=_}}if(f.loose)for(let y of f.items){y.loose=!0;for(let m of y.tokens)m.type==="text"&&(m.type="paragraph")}return f}}html(r){let u=this.rules.block.html.exec(r);if(u)return{type:"html",block:!0,raw:u[0],pre:u[1]==="pre"||u[1]==="script"||u[1]==="style",text:u[0]}}def(r){let u=this.rules.block.def.exec(r);if(u){let s=u[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),c=u[2]?u[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",f=u[3]?u[3].substring(1,u[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):u[3];return{type:"def",tag:s,raw:u[0],href:c,title:f}}}table(r){let u=this.rules.block.table.exec(r);if(!u||!this.rules.other.tableDelimiter.test(u[2]))return;let s=hp(u[1]),c=u[2].replace(this.rules.other.tableAlignChars,"").split("|"),f=u[3]?.trim()?u[3].replace(this.rules.other.tableRowBlankLine,"").split(`
36
+ `):[],p={type:"table",raw:u[0],header:[],align:[],rows:[]};if(s.length===c.length){for(let g of c)this.rules.other.tableAlignRight.test(g)?p.align.push("right"):this.rules.other.tableAlignCenter.test(g)?p.align.push("center"):this.rules.other.tableAlignLeft.test(g)?p.align.push("left"):p.align.push(null);for(let g=0;g<s.length;g++)p.header.push({text:s[g],tokens:this.lexer.inline(s[g]),header:!0,align:p.align[g]});for(let g of f)p.rows.push(hp(g,p.header.length).map((T,y)=>({text:T,tokens:this.lexer.inline(T),header:!1,align:p.align[y]})));return p}}lheading(r){let u=this.rules.block.lheading.exec(r);if(u)return{type:"heading",raw:u[0],depth:u[2].charAt(0)==="="?1:2,text:u[1],tokens:this.lexer.inline(u[1])}}paragraph(r){let u=this.rules.block.paragraph.exec(r);if(u){let s=u[1].charAt(u[1].length-1)===`
37
+ `?u[1].slice(0,-1):u[1];return{type:"paragraph",raw:u[0],text:s,tokens:this.lexer.inline(s)}}}text(r){let u=this.rules.block.text.exec(r);if(u)return{type:"text",raw:u[0],text:u[0],tokens:this.lexer.inline(u[0])}}escape(r){let u=this.rules.inline.escape.exec(r);if(u)return{type:"escape",raw:u[0],text:u[1]}}tag(r){let u=this.rules.inline.tag.exec(r);if(u)return!this.lexer.state.inLink&&this.rules.other.startATag.test(u[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(u[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(u[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(u[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:u[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:u[0]}}link(r){let u=this.rules.inline.link.exec(r);if(u){let s=u[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(s)){if(!this.rules.other.endAngleBracket.test(s))return;let p=Mi(s.slice(0,-1),"\\");if((s.length-p.length)%2===0)return}else{let p=$0(u[2],"()");if(p===-2)return;if(p>-1){let g=(u[0].indexOf("!")===0?5:4)+u[1].length+p;u[2]=u[2].substring(0,p),u[0]=u[0].substring(0,g).trim(),u[3]=""}}let c=u[2],f="";if(this.options.pedantic){let p=this.rules.other.pedanticHrefTitle.exec(c);p&&(c=p[1],f=p[3])}else f=u[3]?u[3].slice(1,-1):"";return c=c.trim(),this.rules.other.startAngleBracket.test(c)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(s)?c=c.slice(1):c=c.slice(1,-1)),pp(u,{href:c&&c.replace(this.rules.inline.anyPunctuation,"$1"),title:f&&f.replace(this.rules.inline.anyPunctuation,"$1")},u[0],this.lexer,this.rules)}}reflink(r,u){let s;if((s=this.rules.inline.reflink.exec(r))||(s=this.rules.inline.nolink.exec(r))){let c=(s[2]||s[1]).replace(this.rules.other.multipleSpaceGlobal," "),f=u[c.toLowerCase()];if(!f){let p=s[0].charAt(0);return{type:"text",raw:p,text:p}}return pp(s,f,s[0],this.lexer,this.rules)}}emStrong(r,u,s=""){let c=this.rules.inline.emStrongLDelim.exec(r);if(!(!c||c[3]&&s.match(this.rules.other.unicodeAlphaNumeric))&&(!(c[1]||c[2])||!s||this.rules.inline.punctuation.exec(s))){let f=[...c[0]].length-1,p,g,T=f,y=0,m=c[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(m.lastIndex=0,u=u.slice(-1*r.length+f);(c=m.exec(u))!=null;){if(p=c[1]||c[2]||c[3]||c[4]||c[5]||c[6],!p)continue;if(g=[...p].length,c[3]||c[4]){T+=g;continue}else if((c[5]||c[6])&&f%3&&!((f+g)%3)){y+=g;continue}if(T-=g,T>0)continue;g=Math.min(g,g+T+y);let _=[...c[0]][0].length,A=r.slice(0,f+c.index+_+g);if(Math.min(f,g)%2){let X=A.slice(1,-1);return{type:"em",raw:A,text:X,tokens:this.lexer.inlineTokens(X)}}let j=A.slice(2,-2);return{type:"strong",raw:A,text:j,tokens:this.lexer.inlineTokens(j)}}}}codespan(r){let u=this.rules.inline.code.exec(r);if(u){let s=u[2].replace(this.rules.other.newLineCharGlobal," "),c=this.rules.other.nonSpaceChar.test(s),f=this.rules.other.startingSpaceChar.test(s)&&this.rules.other.endingSpaceChar.test(s);return c&&f&&(s=s.substring(1,s.length-1)),{type:"codespan",raw:u[0],text:s}}}br(r){let u=this.rules.inline.br.exec(r);if(u)return{type:"br",raw:u[0]}}del(r){let u=this.rules.inline.del.exec(r);if(u)return{type:"del",raw:u[0],text:u[2],tokens:this.lexer.inlineTokens(u[2])}}autolink(r){let u=this.rules.inline.autolink.exec(r);if(u){let s,c;return u[2]==="@"?(s=u[1],c="mailto:"+s):(s=u[1],c=s),{type:"link",raw:u[0],text:s,href:c,tokens:[{type:"text",raw:s,text:s}]}}}url(r){let u;if(u=this.rules.inline.url.exec(r)){let s,c;if(u[2]==="@")s=u[0],c="mailto:"+s;else{let f;do f=u[0],u[0]=this.rules.inline._backpedal.exec(u[0])?.[0]??"";while(f!==u[0]);s=u[0],u[1]==="www."?c="http://"+u[0]:c=u[0]}return{type:"link",raw:u[0],text:s,href:c,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(r){let u=this.rules.inline.text.exec(r);if(u){let s=this.lexer.state.inRawBlock;return{type:"text",raw:u[0],text:u[0],escaped:s}}}},il=class Gs{tokens;options;state;inlineQueue;tokenizer;constructor(u){this.tokens=[],this.tokens.links=Object.create(null),this.options=u||Na,this.options.tokenizer=this.options.tokenizer||new cr,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let s={other:yt,block:nr.normal,inline:ji.normal};this.options.pedantic?(s.block=nr.pedantic,s.inline=ji.pedantic):this.options.gfm&&(s.block=nr.gfm,this.options.breaks?s.inline=ji.breaks:s.inline=ji.gfm),this.tokenizer.rules=s}static get rules(){return{block:nr,inline:ji}}static lex(u,s){return new Gs(s).lex(u)}static lexInline(u,s){return new Gs(s).inlineTokens(u)}lex(u){u=u.replace(yt.carriageReturn,`
38
+ `),this.blockTokens(u,this.tokens);for(let s=0;s<this.inlineQueue.length;s++){let c=this.inlineQueue[s];this.inlineTokens(c.src,c.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(u,s=[],c=!1){for(this.options.pedantic&&(u=u.replace(yt.tabCharGlobal," ").replace(yt.spaceLine,""));u;){let f;if(this.options.extensions?.block?.some(g=>(f=g.call({lexer:this},u,s))?(u=u.substring(f.raw.length),s.push(f),!0):!1))continue;if(f=this.tokenizer.space(u)){u=u.substring(f.raw.length);let g=s.at(-1);f.raw.length===1&&g!==void 0?g.raw+=`
39
+ `:s.push(f);continue}if(f=this.tokenizer.code(u)){u=u.substring(f.raw.length);let g=s.at(-1);g?.type==="paragraph"||g?.type==="text"?(g.raw+=(g.raw.endsWith(`
40
+ `)?"":`
41
+ `)+f.raw,g.text+=`
42
+ `+f.text,this.inlineQueue.at(-1).src=g.text):s.push(f);continue}if(f=this.tokenizer.fences(u)){u=u.substring(f.raw.length),s.push(f);continue}if(f=this.tokenizer.heading(u)){u=u.substring(f.raw.length),s.push(f);continue}if(f=this.tokenizer.hr(u)){u=u.substring(f.raw.length),s.push(f);continue}if(f=this.tokenizer.blockquote(u)){u=u.substring(f.raw.length),s.push(f);continue}if(f=this.tokenizer.list(u)){u=u.substring(f.raw.length),s.push(f);continue}if(f=this.tokenizer.html(u)){u=u.substring(f.raw.length),s.push(f);continue}if(f=this.tokenizer.def(u)){u=u.substring(f.raw.length);let g=s.at(-1);g?.type==="paragraph"||g?.type==="text"?(g.raw+=(g.raw.endsWith(`
43
+ `)?"":`
44
+ `)+f.raw,g.text+=`
45
+ `+f.raw,this.inlineQueue.at(-1).src=g.text):this.tokens.links[f.tag]||(this.tokens.links[f.tag]={href:f.href,title:f.title},s.push(f));continue}if(f=this.tokenizer.table(u)){u=u.substring(f.raw.length),s.push(f);continue}if(f=this.tokenizer.lheading(u)){u=u.substring(f.raw.length),s.push(f);continue}let p=u;if(this.options.extensions?.startBlock){let g=1/0,T=u.slice(1),y;this.options.extensions.startBlock.forEach(m=>{y=m.call({lexer:this},T),typeof y=="number"&&y>=0&&(g=Math.min(g,y))}),g<1/0&&g>=0&&(p=u.substring(0,g+1))}if(this.state.top&&(f=this.tokenizer.paragraph(p))){let g=s.at(-1);c&&g?.type==="paragraph"?(g.raw+=(g.raw.endsWith(`
46
+ `)?"":`
47
+ `)+f.raw,g.text+=`
48
+ `+f.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=g.text):s.push(f),c=p.length!==u.length,u=u.substring(f.raw.length);continue}if(f=this.tokenizer.text(u)){u=u.substring(f.raw.length);let g=s.at(-1);g?.type==="text"?(g.raw+=(g.raw.endsWith(`
49
+ `)?"":`
50
+ `)+f.raw,g.text+=`
51
+ `+f.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=g.text):s.push(f);continue}if(u){let g="Infinite loop on byte: "+u.charCodeAt(0);if(this.options.silent){console.error(g);break}else throw new Error(g)}}return this.state.top=!0,s}inline(u,s=[]){return this.inlineQueue.push({src:u,tokens:s}),s}inlineTokens(u,s=[]){let c=u,f=null;if(this.tokens.links){let y=Object.keys(this.tokens.links);if(y.length>0)for(;(f=this.tokenizer.rules.inline.reflinkSearch.exec(c))!=null;)y.includes(f[0].slice(f[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,f.index)+"["+"a".repeat(f[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(f=this.tokenizer.rules.inline.anyPunctuation.exec(c))!=null;)c=c.slice(0,f.index)+"++"+c.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let p;for(;(f=this.tokenizer.rules.inline.blockSkip.exec(c))!=null;)p=f[2]?f[2].length:0,c=c.slice(0,f.index+p)+"["+"a".repeat(f[0].length-p-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);c=this.options.hooks?.emStrongMask?.call({lexer:this},c)??c;let g=!1,T="";for(;u;){g||(T=""),g=!1;let y;if(this.options.extensions?.inline?.some(_=>(y=_.call({lexer:this},u,s))?(u=u.substring(y.raw.length),s.push(y),!0):!1))continue;if(y=this.tokenizer.escape(u)){u=u.substring(y.raw.length),s.push(y);continue}if(y=this.tokenizer.tag(u)){u=u.substring(y.raw.length),s.push(y);continue}if(y=this.tokenizer.link(u)){u=u.substring(y.raw.length),s.push(y);continue}if(y=this.tokenizer.reflink(u,this.tokens.links)){u=u.substring(y.raw.length);let _=s.at(-1);y.type==="text"&&_?.type==="text"?(_.raw+=y.raw,_.text+=y.text):s.push(y);continue}if(y=this.tokenizer.emStrong(u,c,T)){u=u.substring(y.raw.length),s.push(y);continue}if(y=this.tokenizer.codespan(u)){u=u.substring(y.raw.length),s.push(y);continue}if(y=this.tokenizer.br(u)){u=u.substring(y.raw.length),s.push(y);continue}if(y=this.tokenizer.del(u)){u=u.substring(y.raw.length),s.push(y);continue}if(y=this.tokenizer.autolink(u)){u=u.substring(y.raw.length),s.push(y);continue}if(!this.state.inLink&&(y=this.tokenizer.url(u))){u=u.substring(y.raw.length),s.push(y);continue}let m=u;if(this.options.extensions?.startInline){let _=1/0,A=u.slice(1),j;this.options.extensions.startInline.forEach(X=>{j=X.call({lexer:this},A),typeof j=="number"&&j>=0&&(_=Math.min(_,j))}),_<1/0&&_>=0&&(m=u.substring(0,_+1))}if(y=this.tokenizer.inlineText(m)){u=u.substring(y.raw.length),y.raw.slice(-1)!=="_"&&(T=y.raw.slice(-1)),g=!0;let _=s.at(-1);_?.type==="text"?(_.raw+=y.raw,_.text+=y.text):s.push(y);continue}if(u){let _="Infinite loop on byte: "+u.charCodeAt(0);if(this.options.silent){console.error(_);break}else throw new Error(_)}}return s}},sr=class{options;parser;constructor(r){this.options=r||Na}space(r){return""}code({text:r,lang:u,escaped:s}){let c=(u||"").match(yt.notSpaceStart)?.[0],f=r.replace(yt.endingNewline,"")+`
52
+ `;return c?'<pre><code class="language-'+ql(c)+'">'+(s?f:ql(f,!0))+`</code></pre>
53
+ `:"<pre><code>"+(s?f:ql(f,!0))+`</code></pre>
54
+ `}blockquote({tokens:r}){return`<blockquote>
55
+ ${this.parser.parse(r)}</blockquote>
56
+ `}html({text:r}){return r}def(r){return""}heading({tokens:r,depth:u}){return`<h${u}>${this.parser.parseInline(r)}</h${u}>
57
+ `}hr(r){return`<hr>
58
+ `}list(r){let u=r.ordered,s=r.start,c="";for(let g=0;g<r.items.length;g++){let T=r.items[g];c+=this.listitem(T)}let f=u?"ol":"ul",p=u&&s!==1?' start="'+s+'"':"";return"<"+f+p+`>
59
+ `+c+"</"+f+`>
60
+ `}listitem(r){return`<li>${this.parser.parse(r.tokens)}</li>
61
+ `}checkbox({checked:r}){return"<input "+(r?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:r}){return`<p>${this.parser.parseInline(r)}</p>
62
+ `}table(r){let u="",s="";for(let f=0;f<r.header.length;f++)s+=this.tablecell(r.header[f]);u+=this.tablerow({text:s});let c="";for(let f=0;f<r.rows.length;f++){let p=r.rows[f];s="";for(let g=0;g<p.length;g++)s+=this.tablecell(p[g]);c+=this.tablerow({text:s})}return c&&(c=`<tbody>${c}</tbody>`),`<table>
63
+ <thead>
64
+ `+u+`</thead>
65
+ `+c+`</table>
66
+ `}tablerow({text:r}){return`<tr>
67
+ ${r}</tr>
68
+ `}tablecell(r){let u=this.parser.parseInline(r.tokens),s=r.header?"th":"td";return(r.align?`<${s} align="${r.align}">`:`<${s}>`)+u+`</${s}>
69
+ `}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${ql(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:u,tokens:s}){let c=this.parser.parseInline(s),f=dp(r);if(f===null)return c;r=f;let p='<a href="'+r+'"';return u&&(p+=' title="'+ql(u)+'"'),p+=">"+c+"</a>",p}image({href:r,title:u,text:s,tokens:c}){c&&(s=this.parser.parseInline(c,this.parser.textRenderer));let f=dp(r);if(f===null)return ql(s);r=f;let p=`<img src="${r}" alt="${s}"`;return u&&(p+=` title="${ql(u)}"`),p+=">",p}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):"escaped"in r&&r.escaped?r.text:ql(r.text)}},Is=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}checkbox({raw:r}){return r}},ul=class Ys{options;renderer;textRenderer;constructor(u){this.options=u||Na,this.options.renderer=this.options.renderer||new sr,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Is}static parse(u,s){return new Ys(s).parse(u)}static parseInline(u,s){return new Ys(s).parseInline(u)}parse(u){let s="";for(let c=0;c<u.length;c++){let f=u[c];if(this.options.extensions?.renderers?.[f.type]){let g=f,T=this.options.extensions.renderers[g.type].call({parser:this},g);if(T!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(g.type)){s+=T||"";continue}}let p=f;switch(p.type){case"space":{s+=this.renderer.space(p);break}case"hr":{s+=this.renderer.hr(p);break}case"heading":{s+=this.renderer.heading(p);break}case"code":{s+=this.renderer.code(p);break}case"table":{s+=this.renderer.table(p);break}case"blockquote":{s+=this.renderer.blockquote(p);break}case"list":{s+=this.renderer.list(p);break}case"checkbox":{s+=this.renderer.checkbox(p);break}case"html":{s+=this.renderer.html(p);break}case"def":{s+=this.renderer.def(p);break}case"paragraph":{s+=this.renderer.paragraph(p);break}case"text":{s+=this.renderer.text(p);break}default:{let g='Token with "'+p.type+'" type was not found.';if(this.options.silent)return console.error(g),"";throw new Error(g)}}}return s}parseInline(u,s=this.renderer){let c="";for(let f=0;f<u.length;f++){let p=u[f];if(this.options.extensions?.renderers?.[p.type]){let T=this.options.extensions.renderers[p.type].call({parser:this},p);if(T!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(p.type)){c+=T||"";continue}}let g=p;switch(g.type){case"escape":{c+=s.text(g);break}case"html":{c+=s.html(g);break}case"link":{c+=s.link(g);break}case"image":{c+=s.image(g);break}case"checkbox":{c+=s.checkbox(g);break}case"strong":{c+=s.strong(g);break}case"em":{c+=s.em(g);break}case"codespan":{c+=s.codespan(g);break}case"br":{c+=s.br(g);break}case"del":{c+=s.del(g);break}case"text":{c+=s.text(g);break}default:{let T='Token with "'+g.type+'" type was not found.';if(this.options.silent)return console.error(T),"";throw new Error(T)}}}return c}},Ci=class{options;block;constructor(r){this.options=r||Na}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}emStrongMask(r){return r}provideLexer(){return this.block?il.lex:il.lexInline}provideParser(){return this.block?ul.parse:ul.parseInline}},Yp=class{defaults=Qs();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=ul;Renderer=sr;TextRenderer=Is;Lexer=il;Tokenizer=cr;Hooks=Ci;constructor(...r){this.use(...r)}walkTokens(r,u){let s=[];for(let c of r)switch(s=s.concat(u.call(this,c)),c.type){case"table":{let f=c;for(let p of f.header)s=s.concat(this.walkTokens(p.tokens,u));for(let p of f.rows)for(let g of p)s=s.concat(this.walkTokens(g.tokens,u));break}case"list":{let f=c;s=s.concat(this.walkTokens(f.items,u));break}default:{let f=c;this.defaults.extensions?.childTokens?.[f.type]?this.defaults.extensions.childTokens[f.type].forEach(p=>{let g=f[p].flat(1/0);s=s.concat(this.walkTokens(g,u))}):f.tokens&&(s=s.concat(this.walkTokens(f.tokens,u)))}}return s}use(...r){let u=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach(s=>{let c={...s};if(c.async=this.defaults.async||c.async||!1,s.extensions&&(s.extensions.forEach(f=>{if(!f.name)throw new Error("extension name required");if("renderer"in f){let p=u.renderers[f.name];p?u.renderers[f.name]=function(...g){let T=f.renderer.apply(this,g);return T===!1&&(T=p.apply(this,g)),T}:u.renderers[f.name]=f.renderer}if("tokenizer"in f){if(!f.level||f.level!=="block"&&f.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let p=u[f.level];p?p.unshift(f.tokenizer):u[f.level]=[f.tokenizer],f.start&&(f.level==="block"?u.startBlock?u.startBlock.push(f.start):u.startBlock=[f.start]:f.level==="inline"&&(u.startInline?u.startInline.push(f.start):u.startInline=[f.start]))}"childTokens"in f&&f.childTokens&&(u.childTokens[f.name]=f.childTokens)}),c.extensions=u),s.renderer){let f=this.defaults.renderer||new sr(this.defaults);for(let p in s.renderer){if(!(p in f))throw new Error(`renderer '${p}' does not exist`);if(["options","parser"].includes(p))continue;let g=p,T=s.renderer[g],y=f[g];f[g]=(...m)=>{let _=T.apply(f,m);return _===!1&&(_=y.apply(f,m)),_||""}}c.renderer=f}if(s.tokenizer){let f=this.defaults.tokenizer||new cr(this.defaults);for(let p in s.tokenizer){if(!(p in f))throw new Error(`tokenizer '${p}' does not exist`);if(["options","rules","lexer"].includes(p))continue;let g=p,T=s.tokenizer[g],y=f[g];f[g]=(...m)=>{let _=T.apply(f,m);return _===!1&&(_=y.apply(f,m)),_}}c.tokenizer=f}if(s.hooks){let f=this.defaults.hooks||new Ci;for(let p in s.hooks){if(!(p in f))throw new Error(`hook '${p}' does not exist`);if(["options","block"].includes(p))continue;let g=p,T=s.hooks[g],y=f[g];Ci.passThroughHooks.has(p)?f[g]=m=>{if(this.defaults.async&&Ci.passThroughHooksRespectAsync.has(p))return(async()=>{let A=await T.call(f,m);return y.call(f,A)})();let _=T.call(f,m);return y.call(f,_)}:f[g]=(...m)=>{if(this.defaults.async)return(async()=>{let A=await T.apply(f,m);return A===!1&&(A=await y.apply(f,m)),A})();let _=T.apply(f,m);return _===!1&&(_=y.apply(f,m)),_}}c.hooks=f}if(s.walkTokens){let f=this.defaults.walkTokens,p=s.walkTokens;c.walkTokens=function(g){let T=[];return T.push(p.call(this,g)),f&&(T=T.concat(f.call(this,g))),T}}this.defaults={...this.defaults,...c}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,u){return il.lex(r,u??this.defaults)}parser(r,u){return ul.parse(r,u??this.defaults)}parseMarkdown(r){return(u,s)=>{let c={...s},f={...this.defaults,...c},p=this.onError(!!f.silent,!!f.async);if(this.defaults.async===!0&&c.async===!1)return p(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof u>"u"||u===null)return p(new Error("marked(): input parameter is undefined or null"));if(typeof u!="string")return p(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(u)+", string expected"));if(f.hooks&&(f.hooks.options=f,f.hooks.block=r),f.async)return(async()=>{let g=f.hooks?await f.hooks.preprocess(u):u,T=await(f.hooks?await f.hooks.provideLexer():r?il.lex:il.lexInline)(g,f),y=f.hooks?await f.hooks.processAllTokens(T):T;f.walkTokens&&await Promise.all(this.walkTokens(y,f.walkTokens));let m=await(f.hooks?await f.hooks.provideParser():r?ul.parse:ul.parseInline)(y,f);return f.hooks?await f.hooks.postprocess(m):m})().catch(p);try{f.hooks&&(u=f.hooks.preprocess(u));let g=(f.hooks?f.hooks.provideLexer():r?il.lex:il.lexInline)(u,f);f.hooks&&(g=f.hooks.processAllTokens(g)),f.walkTokens&&this.walkTokens(g,f.walkTokens);let T=(f.hooks?f.hooks.provideParser():r?ul.parse:ul.parseInline)(g,f);return f.hooks&&(T=f.hooks.postprocess(T)),T}catch(g){return p(g)}}}onError(r,u){return s=>{if(s.message+=`
70
+ Please report this to https://github.com/markedjs/marked.`,r){let c="<p>An error occurred:</p><pre>"+ql(s.message+"",!0)+"</pre>";return u?Promise.resolve(c):c}if(u)return Promise.reject(s);throw s}}},Da=new Yp;function Ce(r,u){return Da.parse(r,u)}Ce.options=Ce.setOptions=function(r){return Da.setOptions(r),Ce.defaults=Da.defaults,Mp(Ce.defaults),Ce};Ce.getDefaults=Qs;Ce.defaults=Na;Ce.use=function(...r){return Da.use(...r),Ce.defaults=Da.defaults,Mp(Ce.defaults),Ce};Ce.walkTokens=function(r,u){return Da.walkTokens(r,u)};Ce.parseInline=Da.parseInline;Ce.Parser=ul;Ce.parser=ul.parse;Ce.Renderer=sr;Ce.TextRenderer=Is;Ce.Lexer=il;Ce.lexer=il.lex;Ce.Tokenizer=cr;Ce.Hooks=Ci;Ce.parse=Ce;Ce.options;Ce.setOptions;Ce.use;Ce.walkTokens;Ce.parseInline;ul.parse;il.lex;const F0=new Yp({breaks:!0,gfm:!0});function Xp(r){return p0.sanitize(F0.parse(r))}function I0(r){return Array.isArray(r)?r:[{type:"text",text:String(r)}]}function P0({name:r,username:u,conversationId:s,onConversationId:c,stage:f}){const[p,g]=O.useState([]),[T,y]=O.useState(""),[m,_]=O.useState(!1),[A,j]=O.useState([]),X=O.useRef(null),Y=O.useRef(null),q=O.useRef(null),I=O.useRef(s),ne=O.useRef(0),[$e,Oe]=O.useState([]),oe=O.useRef(""),Ee=O.useCallback(G=>{requestAnimationFrame(()=>{const Q=X.current;if(!Q)return;if(G){Q.scrollTop=Q.scrollHeight;return}Q.scrollHeight-Q.scrollTop-Q.clientHeight<100&&(Q.scrollTop=Q.scrollHeight)})},[]),Ne=O.useCallback((G,Q)=>(r?Hy(r,G):Gy(G)).then(k=>{const B=`${k.length}:${k[k.length-1]?.id??""}`;if(!Q&&B===oe.current)return;oe.current=B;const P=k.map(ye=>({role:ye.role,blocks:I0(ye.content),senderName:ye.sender_name??void 0}));g(P),Q&&Ee(!0)}).catch(k=>console.error("Failed to load messages:",k)),[r,Ee]);O.useEffect(()=>{if(I.current=s,oe.current="",!s){g([]);return}Ne(s,!0)},[s,Ne]),O.useEffect(()=>{if(!s||!r)return;const G=new EventSource(`/api/minds/${encodeURIComponent(r)}/conversations/${encodeURIComponent(s)}/events`);return G.onmessage=Q=>{if(!Q.data)return;let re;try{re=JSON.parse(Q.data)}catch(k){console.warn("[chat] failed to parse SSE event:",k);return}re.type==="message"&&(Ne(s,!1),Ee())},G.onopen=()=>{Ne(s,!1)},()=>G.close()},[s,r,Ne,Ee]),O.useEffect(()=>{if(!s||!r)return;let G=!1;const Q=()=>{Zy(r,`volute:${s}`).then(k=>{G||Oe(k.filter(B=>B!==u))}).catch(k=>{G||console.warn("[chat] typing poll error:",k)})};Q();const re=setInterval(Q,5e3);return()=>{G=!0,clearInterval(re)}},[s,r,u]),O.useEffect(()=>()=>{I.current&&r&&u&&ne.current>0&&tr(r,`volute:${I.current}`,u,!1)},[r,u]);const ue=O.useCallback(G=>{G.type==="meta"&&(I.current=G.conversationId,c(G.conversationId)),G.type==="done"&&_(!1)},[c]),{send:Ye}=Ty(r,ue),rt=O.useMemo(()=>ev(p),[p]),wt=async()=>{const G=T.trim();if(!G&&A.length===0||m)return;const Q=A.map(({media_type:k,data:B})=>({media_type:k,data:B})),re=[];G&&re.push({type:"text",text:G});for(const k of A)re.push({type:"image",media_type:k.media_type,data:k.data});y(""),j([]),Y.current&&(Y.current.style.height="auto",Y.current.style.overflow="hidden"),g(k=>[...k,{role:"user",blocks:re,senderName:u}]),_(!0),I.current&&r&&u&&(tr(r,`volute:${I.current}`,u,!1),ne.current=0),Ee(!0);try{await Ye(G,I.current??void 0,Q.length>0?Q:void 0)}catch(k){console.error("Failed to send message:",k),g(B=>[...B,{role:"assistant",blocks:[{type:"text",text:"*Failed to send message. Please try again.*"}],senderName:"system"}]),_(!1)}},Ae=G=>{G.key==="Enter"&&!G.shiftKey&&(G.preventDefault(),wt())},$=G=>{if(G)for(const Q of Array.from(G)){if(!Q.type.startsWith("image/"))continue;const re=new FileReader;re.onload=()=>{const k=re.result,B=k.split(",")[1];j(P=>[...P,{media_type:Q.type,data:B,preview:k}])},re.readAsDataURL(Q)}};return d.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%"},children:[f==="seed"&&d.jsx("div",{style:{padding:"6px 12px",textAlign:"center",color:"var(--yellow)",fontSize:11,fontWeight:500,letterSpacing:"0.05em",textTransform:"uppercase",opacity:.6,borderBottom:"1px solid rgba(251, 191, 36, 0.1)"},children:"orientation"}),d.jsxs("div",{ref:X,style:{flex:1,overflow:"auto",padding:"16px 0"},children:[p.length===0&&d.jsx("div",{style:{color:"var(--text-2)",textAlign:"center",padding:40,fontSize:13},children:"Send a message to start chatting."}),p.map((G,Q)=>{if(G.senderName==="system"&&G.blocks.length===1&&G.blocks[0].type==="text"){const k=G.blocks[0].text.match(/^\[(.+)\]$/);if(k)return d.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,margin:"20px 0",color:"var(--text-2)",fontSize:11,letterSpacing:"0.03em"},children:[d.jsx("div",{style:{flex:1,height:1,background:"var(--border)"}}),d.jsx("span",{children:k[1]}),d.jsx("div",{style:{flex:1,height:1,background:"var(--border)"}})]},Q)}return d.jsx("div",{style:{marginBottom:16,animation:"fadeIn 0.2s ease both"},children:G.role==="user"?d.jsx(tv,{blocks:G.blocks,senderName:G.senderName,color:G.senderName?rt.get(G.senderName):void 0}):d.jsx(lv,{blocks:G.blocks,senderName:G.senderName,color:G.senderName?rt.get(G.senderName):void 0})},Q)})]}),A.length>0&&d.jsx("div",{style:{display:"flex",gap:8,padding:"8px 0",borderTop:"1px solid var(--border)",overflowX:"auto"},children:A.map((G,Q)=>d.jsxs("div",{style:{position:"relative",flexShrink:0},children:[d.jsx("img",{src:G.preview,alt:"",style:{height:60,borderRadius:"var(--radius)",border:"1px solid var(--border)"}}),d.jsx("button",{onClick:()=>j(re=>re.filter((k,B)=>B!==Q)),style:{position:"absolute",top:-4,right:-4,width:18,height:18,borderRadius:"50%",background:"var(--bg-3)",color:"var(--text-1)",fontSize:11,display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid var(--border)",cursor:"pointer",padding:0},children:"x"})]},Q))}),$e.length>0&&d.jsx("div",{style:{padding:"4px 0",fontSize:12,color:"var(--text-2)",animation:"pulse 1.5s ease infinite"},children:$e.length===1?`${$e[0]} is typing...`:`${$e.join(", ")} are typing...`}),d.jsx("input",{ref:q,type:"file",accept:"image/*",multiple:!0,style:{display:"none"},onChange:G=>$(G.target.files)}),d.jsxs("div",{style:{borderTop:"1px solid var(--border)",padding:"12px 0 0",display:"flex",gap:8},children:[d.jsx("button",{onClick:()=>q.current?.click(),style:{padding:"0 10px",background:"var(--bg-2)",color:"var(--text-1)",borderRadius:"var(--radius)",fontSize:16,border:"1px solid var(--border)",cursor:"pointer",flexShrink:0},children:"+"}),d.jsx("textarea",{ref:Y,value:T,onChange:G=>{if(y(G.target.value),I.current&&r&&u){const Q=Date.now();Q-ne.current>3e3&&(ne.current=Q,tr(r,`volute:${I.current}`,u,!0))}},onKeyDown:Ae,onInput:G=>{const Q=G.currentTarget;Q.style.height="auto";const re=120;Q.style.height=`${Math.min(Q.scrollHeight,re)}px`,Q.style.overflow=Q.scrollHeight>re?"auto":"hidden"},placeholder:"Send a message...",rows:1,style:{flex:1,background:"var(--bg-2)",border:"1px solid var(--border)",borderRadius:"var(--radius)",padding:"10px 12px",color:"var(--text-0)",fontFamily:"var(--mono)",fontSize:13,resize:"none",outline:"none",overflow:"hidden",transition:"border-color 0.15s"},onFocus:G=>G.currentTarget.style.borderColor="var(--border-bright)",onBlur:G=>{G.currentTarget.style.borderColor="var(--border)",I.current&&r&&u&&ne.current>0&&(tr(r,`volute:${I.current}`,u,!1),ne.current=0)}}),d.jsx("button",{onClick:wt,disabled:m||!T.trim()&&A.length===0,style:{padding:"0 16px",background:T.trim()||A.length>0?"var(--accent-dim)":"var(--bg-3)",color:T.trim()||A.length>0?"var(--accent)":"var(--text-2)",borderRadius:"var(--radius)",fontSize:12,fontWeight:500,transition:"all 0.15s"},children:m?"sending...":"send"})]})]})}const gp=["var(--blue)","var(--purple)","var(--yellow)","var(--red)","var(--accent)"];function ev(r){const u=new Map;for(const s of r){const c=s.senderName;c&&!u.has(c)&&u.set(c,gp[u.size%gp.length])}return u}function tv({blocks:r,senderName:u,color:s}){const c=u||"you";return d.jsxs("div",{style:{display:"flex",gap:10},children:[d.jsx("span",{style:{color:s??"var(--blue)",fontSize:11,fontWeight:600,flexShrink:0,marginTop:2,textTransform:"uppercase"},children:c}),d.jsx("div",{style:{flex:1,minWidth:0},children:r.map((f,p)=>f.type==="text"?d.jsx("div",{style:{color:"var(--text-0)",whiteSpace:"pre-wrap"},children:f.text},p):f.type==="image"?d.jsx("img",{src:`data:${f.media_type};base64,${f.data}`,alt:"",style:{maxWidth:300,maxHeight:200,borderRadius:"var(--radius)",marginTop:4}},p):null)})]})}function lv({blocks:r,senderName:u,color:s}){const c=[];for(let f=0;f<r.length;f++){const p=r[f];if(p.type==="text")c.push({kind:"text",text:p.text});else if(p.type==="tool_use"){const g={name:p.name,input:p.input},T=r[f+1];T&&T.type==="tool_result"&&(g.output=T.output,g.isError=T.is_error,f++),c.push({kind:"tool",tool:g})}else p.type==="tool_result"||p.type==="image"&&c.push({kind:"image",media_type:p.media_type,data:p.data})}return d.jsxs("div",{style:{display:"flex",gap:10},children:[d.jsx("span",{style:{color:s??"var(--accent)",fontSize:11,fontWeight:600,flexShrink:0,marginTop:2,textTransform:"uppercase"},children:u||"mind"}),d.jsx("div",{style:{flex:1,minWidth:0},children:c.map((f,p)=>f.kind==="tool"?d.jsx(nv,{tool:f.tool},p):f.kind==="image"?d.jsx("img",{src:`data:${f.media_type};base64,${f.data}`,alt:"",style:{maxWidth:300,maxHeight:200,borderRadius:"var(--radius)",marginTop:4}},p):d.jsx("div",{style:{color:"var(--text-0)"},children:d.jsx("div",{className:"markdown-body",dangerouslySetInnerHTML:{__html:Xp(f.text)}})},p))})]})}function av(r){const u=r.input;switch(r.name){case"Read":return{label:`Read ${u.file_path??""}`,color:"var(--blue)"};case"Write":return{label:`Write ${u.file_path??""}`,color:"var(--blue)"};case"Edit":return{label:`Edit ${u.file_path??""}`,color:"var(--blue)"};case"Glob":return{label:`Glob ${u.pattern??""}`,color:"var(--yellow)"};case"Grep":return{label:`Grep "${u.pattern??""}"${u.path?` in ${u.path}`:""}`,color:"var(--yellow)"};case"Bash":return{label:`Bash: ${String(u.command??"").split(`
71
+ `)[0]}`,color:"var(--red)"};case"WebSearch":return{label:`Search: "${u.query??""}"`,color:"var(--purple)"};case"WebFetch":return{label:`Fetch: ${u.url??""}`,color:"var(--purple)"};case"Task":return{label:`Task: ${u.description??""}`,color:"var(--accent)"};default:return{label:r.name,color:"var(--purple)"}}}function nv({tool:r}){const[u,s]=O.useState(!1),c=av(r);return d.jsxs("div",{style:{marginBottom:8,border:"1px solid var(--border)",borderRadius:"var(--radius)",overflow:"hidden",fontSize:12},children:[d.jsxs("button",{onClick:()=>s(!u),style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",padding:"6px 10px",background:"var(--bg-3)",color:c.color,fontSize:12,fontFamily:"var(--mono)",textAlign:"left"},children:[d.jsxs("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1,minWidth:0},children:[d.jsx("span",{style:{color:"var(--text-2)",marginRight:6},children:u?"▾":"▸"}),c.label]}),r.output!==void 0&&d.jsx("span",{style:{color:r.isError?"var(--red)":"var(--accent)",fontSize:10,flexShrink:0,marginLeft:8},children:r.isError?"error":"done"})]}),u&&d.jsxs("div",{style:{padding:10,background:"var(--bg-1)"},children:[d.jsx("div",{style:{marginBottom:6,color:"var(--text-2)"},children:"input:"}),d.jsx("pre",{style:{color:"var(--text-1)",whiteSpace:"pre-wrap",wordBreak:"break-all",fontSize:11,lineHeight:1.5},children:JSON.stringify(r.input,null,2)}),r.output!==void 0&&d.jsxs(d.Fragment,{children:[d.jsx("div",{style:{marginTop:8,marginBottom:6,color:"var(--text-2)"},children:"output:"}),d.jsx("pre",{style:{color:r.isError?"var(--red)":"var(--text-1)",whiteSpace:"pre-wrap",wordBreak:"break-all",fontSize:11,lineHeight:1.5,maxHeight:200,overflow:"auto"},children:r.output})]})]})]})}function iv({conversationId:r,mindName:u,username:s}){const[c,f]=O.useState([]),[p,g]=O.useState(r??null),[T,y]=O.useState(!1),[m,_]=O.useState(!1),[A,j]=O.useState(u??null),[X,Y]=O.useState([]),q=c.find($=>$.id===p),I=q?.mind_name??"",ne=O.useCallback(()=>{zp().then(f).catch($=>console.error("Failed to fetch conversations:",$)),or().then(Y).catch($=>console.error("Failed to fetch minds:",$))},[]);O.useEffect(()=>{ne();const $=setInterval(ne,5e3);return()=>clearInterval($)},[ne]),O.useEffect(()=>{g(r??null)},[r]),O.useEffect(()=>{if(p){const $=`#/chats/${p}`;window.location.hash!==$&&window.history.replaceState(null,"",$)}else(window.location.hash.slice(1)||"/").startsWith("/chats/")&&window.history.replaceState(null,"","#/chats")},[p]);const $e=$=>{g($.id)},Oe=()=>{g(null),window.history.replaceState(null,"","#/chats")},oe=async($,G)=>{$.stopPropagation();try{await Yy(G)}catch(Q){console.error("Failed to delete conversation:",Q);return}ne(),p===G&&Oe()},Ee=$=>{g($),ne()},Ne=$=>{y(!1),g(null),j($)};O.useEffect(()=>{p&&q&&j(null)},[p,q]);const ue=$=>{_(!1),ne(),g($.id)},Ye=A||I,rt=X.find($=>$.name===Ye);function wt($){const G=$.participants??[];if(G.length===2){const re=G.find(k=>k.username!==s);if(re)return`@${re.username}`}if($.title)return $.title;const Q=G.filter(re=>re.userType==="mind");return Q.length>0?Q.map(re=>re.username).join(", "):"Untitled"}function Ae($){return $.participants?.filter(G=>G.userType==="mind")??[]}return d.jsxs("div",{style:{display:"flex",height:"100%",animation:"fadeIn 0.2s ease both"},children:[d.jsxs("div",{style:{display:"flex",flexDirection:"column",width:240,flexShrink:0,borderRight:"1px solid var(--border)"},children:[d.jsxs("div",{style:{display:"flex",gap:4,padding:"8px 8px 8px"},children:[d.jsx("button",{onClick:()=>y(!0),style:{flex:1,padding:"8px 12px",background:"var(--accent-dim)",color:"var(--accent)",borderRadius:"var(--radius)",fontSize:12,fontWeight:500,textAlign:"left"},children:"+ new chat"}),d.jsx("button",{onClick:()=>_(!0),style:{padding:"8px 10px",background:"var(--bg-2)",color:"var(--text-1)",borderRadius:"var(--radius)",fontSize:12,border:"1px solid var(--border)"},title:"New group",children:"++"})]}),d.jsxs("div",{style:{flex:1,overflow:"auto"},children:[c.map($=>{const G=Ae($);return d.jsxs("div",{onClick:()=>$e($),style:{padding:"8px 12px",margin:"0 4px",cursor:"pointer",borderRadius:"var(--radius)",background:$.id===p?"var(--bg-3)":"transparent",display:"flex",flexDirection:"column",gap:2,transition:"background 0.1s"},onMouseEnter:Q=>{$.id!==p&&(Q.currentTarget.style.background="var(--bg-2)")},onMouseLeave:Q=>{$.id!==p&&(Q.currentTarget.style.background="transparent")},children:[d.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:4},children:[d.jsxs("div",{style:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:12,color:$.id===p?"var(--text-0)":"var(--text-1)",display:"flex",alignItems:"center",gap:6},children:[d.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis"},children:wt($)}),X.find(Q=>Q.name===$.mind_name)?.stage==="seed"&&d.jsx("span",{style:{fontSize:9,color:"var(--yellow)",flexShrink:0},children:"seed"})]}),d.jsx("button",{onClick:Q=>oe(Q,$.id),style:{background:"transparent",color:"var(--text-2)",fontSize:11,padding:"0 4px",flexShrink:0,visibility:$.id===p?"visible":"hidden"},children:"x"})]}),G.length>0&&d.jsx("div",{style:{display:"flex",gap:4,flexWrap:"wrap"},children:G.map(Q=>d.jsx("span",{style:{fontSize:10,color:"var(--accent)",background:"var(--accent-bg)",padding:"1px 5px",borderRadius:3},children:Q.username},Q.userId))})]},$.id)}),c.length===0&&d.jsx("div",{style:{color:"var(--text-2)",fontSize:12,padding:"16px 12px",textAlign:"center"},children:"No conversations yet"})]})]}),d.jsx("div",{style:{flex:1,paddingLeft:16,minWidth:0},children:Ye?d.jsx(P0,{name:Ye,username:s,conversationId:p,onConversationId:Ee,stage:rt?.stage}):d.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",color:"var(--text-2)",fontSize:13},children:"Select a conversation or start a new chat"})}),T&&d.jsx(uv,{onClose:()=>y(!1),onPick:Ne}),m&&d.jsx(rv,{onClose:()=>_(!1),onCreated:ue})]})}function uv({onClose:r,onPick:u}){const[s,c]=O.useState([]),[f,p]=O.useState(!0),[g,T]=O.useState("");return O.useEffect(()=>{or().then(y=>{c(y),p(!1)}).catch(y=>{console.error("Failed to fetch minds:",y),p(!1),T("Failed to load minds")})},[]),d.jsx("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:100},onClick:r,children:d.jsxs("div",{style:{background:"var(--bg-1)",border:"1px solid var(--border)",borderRadius:"var(--radius-lg)",padding:20,width:280,maxHeight:"50vh",display:"flex",flexDirection:"column",gap:12},onClick:y=>y.stopPropagation(),children:[d.jsx("div",{style:{fontWeight:600,color:"var(--text-0)",fontSize:14},children:"New chat with..."}),f?d.jsx("div",{style:{color:"var(--text-2)",fontSize:12},children:"Loading minds..."}):g?d.jsx("div",{style:{color:"var(--red)",fontSize:12,padding:8},children:g}):d.jsxs("div",{style:{flex:1,overflow:"auto"},children:[s.map(y=>d.jsxs("button",{onClick:()=>u(y.name),style:{display:"flex",alignItems:"center",gap:8,width:"100%",padding:"8px 10px",background:"transparent",color:"var(--text-0)",fontSize:13,borderRadius:"var(--radius)",textAlign:"left",transition:"background 0.1s"},onMouseEnter:m=>m.currentTarget.style.background="var(--bg-2)",onMouseLeave:m=>m.currentTarget.style.background="transparent",children:[d.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:y.status==="running"?"var(--accent)":"var(--text-2)",flexShrink:0}}),y.name]},y.name)),s.length===0&&d.jsx("div",{style:{color:"var(--text-2)",fontSize:12,padding:8},children:"No minds found"})]}),d.jsx("button",{onClick:r,style:{padding:"6px 14px",background:"var(--bg-2)",color:"var(--text-1)",borderRadius:"var(--radius)",fontSize:12,border:"1px solid var(--border)",alignSelf:"flex-end"},children:"Cancel"})]})})}function rv({onClose:r,onCreated:u}){const[s,c]=O.useState([]),[f,p]=O.useState(new Set),[g,T]=O.useState(""),[y,m]=O.useState(!1),[_,A]=O.useState("");O.useEffect(()=>{qy().then(c).catch(()=>A("Failed to load users"))},[]);const j=q=>{p(I=>{const ne=new Set(I);return ne.has(q)?ne.delete(q):ne.add(q),ne})},X=s.some(q=>q.user_type==="mind"&&f.has(q.username)),Y=async()=>{if(!X){A("Select at least one mind");return}m(!0),A("");try{const q=await Xy([...f],g||void 0);u(q)}catch(q){A(q instanceof Error?q.message:"Failed to create"),m(!1)}};return d.jsx("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:100},onClick:r,children:d.jsxs("div",{style:{background:"var(--bg-1)",border:"1px solid var(--border)",borderRadius:"var(--radius-lg)",padding:20,width:340,maxHeight:"70vh",display:"flex",flexDirection:"column",gap:12},onClick:q=>q.stopPropagation(),children:[d.jsx("div",{style:{fontWeight:600,color:"var(--text-0)",fontSize:14},children:"New group conversation"}),d.jsx("input",{value:g,onChange:q=>T(q.target.value),placeholder:"Title (optional)",style:{background:"var(--bg-2)",border:"1px solid var(--border)",borderRadius:"var(--radius)",padding:"8px 10px",color:"var(--text-0)",fontSize:12,outline:"none",fontFamily:"var(--mono)"}}),d.jsx("div",{style:{color:"var(--text-2)",fontSize:11},children:"Select participants (at least one mind):"}),d.jsx("div",{style:{flex:1,overflow:"auto",maxHeight:250},children:s.map(q=>d.jsxs("label",{style:{display:"flex",alignItems:"center",gap:8,padding:"6px 4px",cursor:"pointer",fontSize:12,color:"var(--text-0)"},children:[d.jsx("input",{type:"checkbox",checked:f.has(q.username),onChange:()=>j(q.username)}),d.jsx("span",{children:q.username}),d.jsx("span",{style:{color:q.user_type==="mind"?"var(--accent)":"var(--text-2)",fontSize:10,marginLeft:"auto"},children:q.user_type})]},q.id))}),_&&d.jsx("div",{style:{color:"var(--red)",fontSize:11},children:_}),d.jsxs("div",{style:{display:"flex",gap:8,justifyContent:"flex-end"},children:[d.jsx("button",{onClick:r,style:{padding:"6px 14px",background:"var(--bg-2)",color:"var(--text-1)",borderRadius:"var(--radius)",fontSize:12,border:"1px solid var(--border)"},children:"Cancel"}),d.jsx("button",{onClick:Y,disabled:y||!X,style:{padding:"6px 14px",background:"var(--accent-dim)",color:"var(--accent)",borderRadius:"var(--radius)",fontSize:12,fontWeight:500,opacity:y||!X?.5:1},children:y?"Creating...":"Create"})]})]})})}const mp={active:{color:"var(--accent)",bg:"var(--accent-bg)",glow:!0,label:"active"},running:{color:"var(--accent)",bg:"var(--accent-bg)",glow:!0,label:"awake"},starting:{color:"var(--yellow)",bg:"rgba(251, 191, 36, 0.08)",label:"waking"},stopped:{color:"var(--text-2)",bg:"rgba(106, 117, 136, 0.08)",label:"asleep"},connected:{color:"var(--blue)",bg:"rgba(96, 165, 250, 0.08)",label:"connected"},disconnected:{color:"var(--text-2)",bg:"rgba(106, 117, 136, 0.08)",label:"disconnected"},dead:{color:"var(--red)",bg:"rgba(248, 113, 113, 0.08)",label:"dead"},"no-server":{color:"var(--text-2)",bg:"rgba(106, 117, 136, 0.08)",label:"no-server"}};function Sn({status:r}){const u=mp[r]??mp.stopped;return d.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:5,padding:"2px 8px",borderRadius:"var(--radius)",background:u.bg,color:u.color,fontSize:11,fontWeight:500,letterSpacing:"0.02em",textTransform:"uppercase"},children:[d.jsx("span",{style:{width:5,height:5,borderRadius:"50%",background:u.color,boxShadow:u.glow?`0 0 6px ${u.color}`:"none",animation:r==="starting"?"pulse 1.5s ease infinite":"none"}}),u.label]})}function cv({mind:r}){return d.jsxs("a",{href:`#/mind/${r.name}`,style:{display:"block",padding:20,background:"var(--bg-2)",border:"1px solid var(--border)",borderRadius:"var(--radius-lg)",cursor:"pointer",transition:"all 0.15s ease"},onMouseEnter:u=>{u.currentTarget.style.borderColor="var(--border-bright)",u.currentTarget.style.background="var(--bg-3)"},onMouseLeave:u=>{u.currentTarget.style.borderColor="var(--border)",u.currentTarget.style.background="var(--bg-2)"},children:[d.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:12},children:[d.jsx("span",{style:{fontSize:15,fontWeight:600,color:"var(--text-0)"},children:r.name}),r.stage==="seed"&&d.jsx("span",{style:{display:"inline-flex",alignItems:"center",gap:5,padding:"2px 8px",borderRadius:"var(--radius)",background:"rgba(251, 191, 36, 0.08)",color:"var(--yellow)",fontSize:11,fontWeight:500,letterSpacing:"0.02em",textTransform:"uppercase"},children:"seed"}),d.jsx(Sn,{status:r.status})]}),d.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,color:"var(--text-2)",fontSize:12},children:[d.jsxs("span",{children:[":",r.port]}),r.channels.filter(u=>u.name!=="web"&&u.status==="connected").map(u=>d.jsx("span",{style:{fontSize:10,padding:"2px 6px",borderRadius:"var(--radius)",background:"var(--accent-dim)",color:"var(--accent)"},children:u.displayName||u.name},u.name))]})]})}const ir={background:"var(--bg-2)",border:"1px solid var(--border)",borderRadius:"var(--radius)",padding:"8px 10px",color:"var(--text-0)",fontSize:13,outline:"none",fontFamily:"var(--mono)"};function yp({onClose:r,onCreated:u}){const[s,c]=O.useState(""),[f,p]=O.useState(""),[g,T]=O.useState("claude"),[y,m]=O.useState(""),[_,A]=O.useState(!1),[j,X]=O.useState(""),Y=O.useRef(null);O.useEffect(()=>{Y.current?.focus()},[]);const q=async()=>{const I=s.trim();if(I){A(!0),X("");try{await Vy(I,{description:f.trim()||void 0,template:g,model:y.trim()||void 0}),await _p(I),u(I)}catch(ne){X(ne instanceof Error?ne.message:"Failed to create"),A(!1)}}};return d.jsx("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:100},onClick:r,children:d.jsxs("div",{style:{background:"var(--bg-1)",border:"1px solid var(--border)",borderRadius:"var(--radius-lg)",padding:24,width:340,display:"flex",flexDirection:"column",gap:14},onClick:I=>I.stopPropagation(),children:[d.jsx("div",{style:{fontWeight:600,color:"var(--text-0)",fontSize:14},children:"Plant a seed"}),d.jsxs("label",{style:{display:"flex",flexDirection:"column",gap:4},children:[d.jsx("span",{style:{color:"var(--text-2)",fontSize:11},children:"Name"}),d.jsx("input",{ref:Y,value:s,onChange:I=>c(I.target.value),placeholder:"e.g. luna",onKeyDown:I=>I.key==="Enter"&&q(),style:ir})]}),d.jsxs("label",{style:{display:"flex",flexDirection:"column",gap:4},children:[d.jsx("span",{style:{color:"var(--text-2)",fontSize:11},children:"Description (optional)"}),d.jsx("input",{value:f,onChange:I=>p(I.target.value),placeholder:"A curious mind who loves poetry...",onKeyDown:I=>I.key==="Enter"&&q(),style:ir})]}),d.jsxs("label",{style:{display:"flex",flexDirection:"column",gap:4},children:[d.jsx("span",{style:{color:"var(--text-2)",fontSize:11},children:"Template"}),d.jsxs("select",{value:g,onChange:I=>T(I.target.value),style:{...ir,appearance:"auto"},children:[d.jsx("option",{value:"claude",children:"claude"}),d.jsx("option",{value:"pi",children:"pi"})]})]}),d.jsxs("label",{style:{display:"flex",flexDirection:"column",gap:4},children:[d.jsx("span",{style:{color:"var(--text-2)",fontSize:11},children:"Model (optional)"}),d.jsx("input",{value:y,onChange:I=>m(I.target.value),placeholder:"e.g. claude-sonnet-4-5-20250929",onKeyDown:I=>I.key==="Enter"&&q(),style:ir})]}),j&&d.jsx("div",{style:{color:"var(--red)",fontSize:11},children:j}),d.jsxs("div",{style:{display:"flex",gap:8,justifyContent:"flex-end"},children:[d.jsx("button",{onClick:r,style:{padding:"6px 14px",background:"var(--bg-2)",color:"var(--text-1)",borderRadius:"var(--radius)",fontSize:12,border:"1px solid var(--border)"},children:"Cancel"}),d.jsx("button",{onClick:q,disabled:_||!s.trim(),style:{padding:"6px 14px",background:"var(--yellow)",color:"var(--bg-0)",borderRadius:"var(--radius)",fontSize:12,fontWeight:600,opacity:_||!s.trim()?.5:1},children:_?"Planting...":"Plant"})]})]})})}function sv(){const[r,u]=O.useState([]),[s,c]=O.useState(""),[f,p]=O.useState(!0),[g,T]=O.useState(!1);O.useEffect(()=>{let m=!0;const _=async()=>{try{const j=await or();m&&(u(j),c(""),p(!1))}catch{m&&(c("Failed to connect to API"),p(!1))}};_();const A=setInterval(_,5e3);return()=>{m=!1,clearInterval(A)}},[]);const y=m=>{T(!1),window.location.hash=`#/chats?mind=${m}`};return s?d.jsx("div",{style:{color:"var(--red)",padding:40,textAlign:"center"},children:s}):f?null:r.length===0?d.jsxs("div",{style:{color:"var(--text-2)",padding:40,textAlign:"center",fontSize:14},children:[d.jsx("div",{style:{marginBottom:8},children:"No minds registered."}),d.jsxs("div",{style:{display:"flex",gap:12,justifyContent:"center",marginTop:16},children:[d.jsx("code",{style:{color:"var(--text-1)"},children:"volute mind create <name>"}),d.jsx("span",{style:{color:"var(--text-2)"},children:"or"}),d.jsx("button",{onClick:()=>T(!0),style:{padding:"4px 12px",background:"rgba(251, 191, 36, 0.08)",color:"var(--yellow)",borderRadius:"var(--radius)",fontSize:12,fontWeight:500,border:"1px solid rgba(251, 191, 36, 0.2)",cursor:"pointer"},children:"plant a seed"})]}),g&&d.jsx(yp,{onClose:()=>T(!1),onCreated:y})]}):d.jsxs(d.Fragment,{children:[d.jsx("div",{style:{marginBottom:16},children:d.jsx("button",{onClick:()=>T(!0),style:{padding:"6px 14px",background:"rgba(251, 191, 36, 0.08)",color:"var(--yellow)",borderRadius:"var(--radius)",fontSize:12,fontWeight:500,border:"1px solid rgba(251, 191, 36, 0.2)",cursor:"pointer"},children:"plant a seed"})}),d.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(280px, 1fr))",gap:16,maxWidth:1200},children:r.map((m,_)=>d.jsx("div",{style:{animation:"fadeIn 0.3s ease both",animationDelay:`${_*50}ms`},children:d.jsx(cv,{mind:m})},m.name))}),g&&d.jsx(yp,{onClose:()=>T(!1),onCreated:y})]})}function ov(r,u){const s=r.participants??[];if(s.length===2){const f=s.find(p=>p.username!==u);if(f)return`@${f.username}`}if(r.title)return r.title;const c=s.filter(f=>f.userType==="mind");return c.length>0?c.map(f=>f.username).join(", "):"Untitled"}function fv({username:r}){const[u,s]=O.useState([]),[c,f]=O.useState([]),[p,g]=O.useState([]);O.useEffect(()=>{or().then(s).catch(()=>{}),zp().then(f).catch(()=>{}),Qy().then(g).catch(()=>{})},[]);const T=[...u].sort((m,_)=>{if(m.status==="running"&&_.status!=="running")return-1;if(m.status!=="running"&&_.status==="running")return 1;const A=m.lastActiveAt??"";return(_.lastActiveAt??"").localeCompare(A)}),y=[...c].sort((m,_)=>{const A=j=>j.endsWith("Z")?j:`${j}Z`;return new Date(A(_.updated_at)).getTime()-new Date(A(m.updated_at)).getTime()}).slice(0,5);return d.jsxs("div",{style:{maxWidth:800,animation:"fadeIn 0.2s ease both"},children:[d.jsx(Ds,{title:"minds",href:"#/minds",linkLabel:"all minds",children:u.length===0?d.jsxs("div",{style:{color:"var(--text-2)",fontSize:12},children:["No minds registered. Run"," ",d.jsx("code",{style:{color:"var(--text-1)"},children:"volute mind create <name>"})," to get started."]}):d.jsx("div",{style:{display:"flex",gap:10,overflowX:"auto",paddingBottom:4},children:T.map(m=>d.jsx(hv,{mind:m},m.name))})}),y.length>0&&d.jsx(Ds,{title:"recent conversations",href:"#/chats",linkLabel:"open chat",children:d.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:y.map(m=>d.jsx(pv,{conv:m,username:r,minds:u},m.id))})}),p.length>0&&d.jsx(Ds,{title:"recent pages",children:d.jsx("div",{style:{display:"flex",flexDirection:"column",gap:4},children:p.map(m=>d.jsxs("a",{href:m.url,target:"_blank",rel:"noopener noreferrer",style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 12px",borderRadius:"var(--radius)",background:"var(--bg-2)",border:"1px solid var(--border)",textDecoration:"none",color:"var(--text-0)",fontSize:12,transition:"border-color 0.15s"},onMouseEnter:_=>_.currentTarget.style.borderColor="var(--border-bright)",onMouseLeave:_=>_.currentTarget.style.borderColor="var(--border)",children:[d.jsxs("span",{children:[d.jsxs("span",{style:{color:"var(--text-2)"},children:[m.mind,"/"]}),m.file]}),d.jsx("span",{style:{color:"var(--text-2)",fontSize:10},children:Ps(m.modified)})]},`${m.mind}/${m.file}`))})})]})}function Ds({title:r,href:u,linkLabel:s,children:c}){return d.jsxs("div",{style:{marginBottom:24},children:[d.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontSize:11,textTransform:"uppercase",letterSpacing:"0.05em",marginBottom:8},children:[d.jsx("span",{style:{color:"var(--text-2)"},children:r}),u&&s&&d.jsxs("a",{href:u,style:{color:"var(--text-2)",fontSize:10,textTransform:"none"},onMouseEnter:f=>f.currentTarget.style.color="var(--text-1)",onMouseLeave:f=>f.currentTarget.style.color="var(--text-2)",children:[s," →"]})]}),c]})}function dv(r){return r.status!=="running"?r.status:r.lastActiveAt&&Date.now()-new Date(`${r.lastActiveAt}Z`).getTime()<5*6e4?"active":"running"}function hv({mind:r}){const u=r.channels.filter(s=>s.name!=="web"&&s.name!=="volute"&&s.status==="connected");return d.jsxs("a",{href:`#/mind/${r.name}`,style:{display:"flex",flexDirection:"column",gap:6,padding:"10px 14px",borderRadius:"var(--radius-lg)",background:"var(--bg-2)",border:"1px solid var(--border)",minWidth:150,transition:"border-color 0.15s",flexShrink:0},onMouseEnter:s=>s.currentTarget.style.borderColor="var(--border-bright)",onMouseLeave:s=>s.currentTarget.style.borderColor="var(--border)",children:[d.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[d.jsx("span",{style:{color:"var(--text-0)",fontWeight:500,fontSize:13},children:r.name}),d.jsx(Sn,{status:dv(r)}),r.stage==="seed"&&d.jsx("span",{style:{fontSize:9,color:"var(--yellow)"},children:"seed"})]}),u.length>0&&d.jsx("div",{style:{display:"flex",gap:4,flexWrap:"wrap"},children:u.map(s=>d.jsx("span",{style:{fontSize:10,padding:"1px 5px",borderRadius:3,background:"var(--accent-dim)",color:"var(--accent)"},children:s.displayName||s.name},s.name))}),d.jsx("div",{style:{fontSize:10,color:"var(--text-2)"},children:r.lastActiveAt?`active ${Ps(r.lastActiveAt)}`:"no activity"})]})}function pv({conv:r,username:u,minds:s}){const c=ov(r,u),f=s.find(T=>T.name===r.mind_name)?.stage==="seed",p=r.lastMessage;let g="";return p&&(g=(p.senderName?`${p.senderName}: `:"")+p.text),d.jsxs("a",{href:`#/chats/${r.id}`,style:{display:"flex",alignItems:"center",gap:12,padding:"10px 14px",borderRadius:"var(--radius-lg)",background:"var(--bg-2)",border:"1px solid var(--border)",transition:"border-color 0.15s"},onMouseEnter:T=>T.currentTarget.style.borderColor="var(--border-bright)",onMouseLeave:T=>T.currentTarget.style.borderColor="var(--border)",children:[d.jsxs("div",{style:{flex:1,minWidth:0},children:[d.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:2},children:[d.jsx("span",{style:{color:"var(--text-0)",fontWeight:500,fontSize:12},children:c}),f&&d.jsx("span",{style:{fontSize:9,color:"var(--yellow)"},children:"seed"})]}),g&&d.jsx("div",{style:{fontSize:11,color:"var(--text-2)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:g})]}),d.jsx("span",{style:{color:"var(--text-2)",fontSize:10,flexShrink:0},children:Ps(r.updated_at)})]})}function Ps(r){const u=Date.now(),s=r.endsWith("Z")?r:`${r}Z`,c=new Date(s).getTime(),f=u-c,p=Math.floor(f/6e4);if(p<1)return"just now";if(p<60)return`${p}m ago`;const g=Math.floor(p/60);return g<24?`${g}h ago`:`${Math.floor(g/24)}d ago`}function gv({name:r}){const[u,s]=O.useState([]),[c,f]=O.useState(null),[p,g]=O.useState(""),[T,y]=O.useState("");return O.useEffect(()=>{Ny(r).then(m=>{s(m),m.length>0&&!c&&f(m[0])}).catch(()=>y("Failed to load files"))},[r,c]),O.useEffect(()=>{c&&Uy(r,c).then(m=>{g(m.content),y("")}).catch(()=>y("Failed to load file"))},[r,c]),d.jsxs("div",{style:{display:"flex",height:"100%",gap:0},children:[d.jsx("div",{style:{width:160,flexShrink:0,borderRight:"1px solid var(--border)",padding:"8px 0",overflow:"auto"},children:u.map(m=>d.jsx("button",{onClick:()=>f(m),style:{display:"block",width:"100%",padding:"6px 12px",textAlign:"left",background:m===c?"var(--accent-bg)":"transparent",color:m===c?"var(--accent)":"var(--text-1)",fontSize:12,fontFamily:"var(--mono)",borderLeft:m===c?"2px solid var(--accent)":"2px solid transparent",transition:"all 0.1s"},children:m},m))}),d.jsx("div",{style:{flex:1,display:"flex",flexDirection:"column",minWidth:0},children:c&&d.jsxs(d.Fragment,{children:[d.jsxs("div",{style:{padding:"8px 12px",borderBottom:"1px solid var(--border)",display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:12},children:[d.jsx("span",{style:{color:"var(--text-1)"},children:c}),T&&d.jsx("span",{style:{color:"var(--red)",fontSize:11},children:T})]}),d.jsx("textarea",{value:p,readOnly:!0,spellCheck:!1,style:{flex:1,padding:12,background:"var(--bg-0)",color:"var(--text-0)",fontFamily:"var(--mono)",fontSize:12,lineHeight:1.7,border:"none",outline:"none",resize:"none",tabSize:2}})]})})]})}const vp=50,mv={background:"var(--bg-2)",color:"var(--text-0)",border:"1px solid var(--border)",borderRadius:"var(--radius)",padding:"4px 8px",fontSize:12,fontFamily:"var(--mono)"};function yv({name:r}){const[u,s]=O.useState([]),[c,f]=O.useState([]),[p,g]=O.useState(""),[T,y]=O.useState(!0),[m,_]=O.useState(!1);O.useEffect(()=>{By(r).then(f).catch(()=>{})},[r]);const A=O.useCallback(async j=>{_(!0);try{const X=await Ly(r,{channel:p||void 0,limit:vp,offset:j});s(j===0?X:Y=>[...Y,...X]),y(X.length===vp)}catch{}_(!1)},[r,p]);return O.useEffect(()=>{A(0)},[A]),d.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",overflow:"hidden"},children:[d.jsx("div",{style:{display:"flex",gap:12,padding:"0 0 12px",borderBottom:"1px solid var(--border)",flexShrink:0},children:d.jsxs("select",{value:p,onChange:j=>g(j.target.value),style:mv,children:[d.jsx("option",{value:"",children:"all channels"}),c.map(j=>d.jsx("option",{value:j,children:j},j))]})}),d.jsxs("div",{style:{flex:1,overflow:"auto",paddingTop:12},children:[u.length===0&&!m&&d.jsx("div",{style:{color:"var(--text-2)",textAlign:"center",padding:40,fontSize:13},children:"No messages found."}),u.map(j=>d.jsx(vv,{msg:j,name:r},j.id)),T&&d.jsx("div",{style:{padding:"16px 0",textAlign:"center"},children:d.jsx("button",{onClick:()=>A(u.length),disabled:m,style:{padding:"6px 16px",background:"var(--bg-3)",color:"var(--text-1)",borderRadius:"var(--radius)",fontSize:12,opacity:m?.5:1},children:m?"loading...":"load more"})})]})]})}function vv({msg:r,name:u}){const s=r.sender===u,f=new Date(r.created_at).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});return d.jsx("div",{style:{marginBottom:16,animation:"fadeIn 0.2s ease both"},children:d.jsxs("div",{style:{display:"flex",gap:10},children:[d.jsx("span",{style:{color:s?"var(--accent)":"var(--blue)",fontSize:11,fontWeight:600,flexShrink:0,marginTop:2,textTransform:"uppercase"},children:s?"mind":r.sender??"user"}),d.jsx("div",{style:{flex:1,minWidth:0},children:s?d.jsx("div",{className:"markdown-body",dangerouslySetInnerHTML:{__html:Xp(r.content)}}):d.jsx("div",{style:{color:"var(--text-0)",whiteSpace:"pre-wrap"},children:r.content})}),d.jsxs("div",{style:{flexShrink:0,display:"flex",flexDirection:"column",alignItems:"flex-end",gap:2},children:[d.jsx("span",{style:{fontSize:10,color:"var(--text-2)"},children:f}),d.jsx("span",{style:{fontSize:10,color:"var(--text-2)",background:"var(--bg-3)",padding:"1px 6px",borderRadius:"var(--radius)"},children:r.channel})]})]})})}function bv({name:r}){const[u,s]=O.useState([]),[c,f]=O.useState(!0),p=O.useRef(null),g=O.useCallback(_=>{s(A=>{const j=[...A,_];return j.length>2e3?j.slice(-2e3):j})},[]),{start:T,stop:y}=Ey(r,g);O.useEffect(()=>(T(),y),[T,y]),O.useEffect(()=>{c&&p.current&&(p.current.scrollTop=p.current.scrollHeight)},[c,u.length]);const m=()=>{const _=p.current;if(!_)return;const A=_.scrollHeight-_.scrollTop-_.clientHeight<30;f(A)};return d.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%"},children:[!c&&d.jsxs("div",{style:{padding:"6px 12px",background:"var(--bg-3)",borderBottom:"1px solid var(--border)",display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:11,color:"var(--text-2)"},children:[d.jsx("span",{children:"Scroll paused"}),d.jsx("button",{onClick:()=>{f(!0),p.current&&(p.current.scrollTop=p.current.scrollHeight)},style:{background:"var(--accent-dim)",color:"var(--accent)",padding:"2px 10px",borderRadius:"var(--radius)",fontSize:11},children:"Resume"})]}),d.jsxs("div",{ref:p,onScroll:m,style:{flex:1,overflow:"auto",padding:12,fontFamily:"var(--mono)",fontSize:11,lineHeight:1.7,whiteSpace:"pre-wrap",wordBreak:"break-all",color:"var(--text-1)",background:"var(--bg-0)"},children:[u.length===0&&d.jsx("span",{style:{color:"var(--text-2)"},children:"Waiting for logs..."}),u.map((_,A)=>d.jsx("div",{style:{animation:"fadeIn 0.1s ease both"},children:_},A))]})]})}function xv({name:r}){const[u,s]=O.useState([]),[c,f]=O.useState("");return O.useEffect(()=>{Dy(r).then(s).catch(()=>f("Failed to load variants"))},[r]),c?d.jsx("div",{style:{color:"var(--red)",padding:16},children:c}):u.length===0?d.jsx("div",{style:{color:"var(--text-2)",padding:24,textAlign:"center"},children:"No variants."}):d.jsx("div",{style:{overflow:"auto"},children:d.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:13},children:[d.jsx("thead",{children:d.jsxs("tr",{style:{textAlign:"left",color:"var(--text-2)",fontSize:11,textTransform:"uppercase",letterSpacing:"0.04em"},children:[d.jsx("th",{style:{padding:"8px 12px",borderBottom:"1px solid var(--border)"},children:"Name"}),d.jsx("th",{style:{padding:"8px 12px",borderBottom:"1px solid var(--border)"},children:"Branch"}),d.jsx("th",{style:{padding:"8px 12px",borderBottom:"1px solid var(--border)"},children:"Port"}),d.jsx("th",{style:{padding:"8px 12px",borderBottom:"1px solid var(--border)"},children:"Status"})]})}),d.jsx("tbody",{children:u.map(p=>d.jsxs("tr",{style:{animation:"fadeIn 0.2s ease both"},children:[d.jsx("td",{style:{padding:"10px 12px",borderBottom:"1px solid var(--border)",color:"var(--text-0)",fontWeight:500},children:p.name}),d.jsx("td",{style:{padding:"10px 12px",borderBottom:"1px solid var(--border)",color:"var(--text-1)"},children:p.branch}),d.jsx("td",{style:{padding:"10px 12px",borderBottom:"1px solid var(--border)",color:"var(--text-2)"},children:p.port||"-"}),d.jsx("td",{style:{padding:"10px 12px",borderBottom:"1px solid var(--border)"},children:d.jsx(Sn,{status:p.status})})]},p.name))})]})})}const Sv=["History","Logs","Files","Variants","Connections"];function Tv({name:r}){const[u,s]=O.useState(null),[c,f]=O.useState("History"),[p,g]=O.useState(""),[T,y]=O.useState(!1),m=O.useCallback(()=>{Cy(r).then(j=>{s(j),g("")}).catch(()=>g("Mind not found"))},[r]);O.useEffect(()=>{m();const j=setInterval(m,5e3);return()=>clearInterval(j)},[m]);const _=async()=>{y(!0);try{await _p(r),m()}catch(j){g(j instanceof Error?j.message:"Failed to start")}y(!1)},A=async()=>{y(!0);try{await Oy(r),m()}catch(j){g(j instanceof Error?j.message:"Failed to stop")}y(!1)};return p&&!u?d.jsx("div",{style:{color:"var(--red)",padding:24},children:p}):u?d.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"calc(100vh - 48px - 48px)",animation:"fadeIn 0.2s ease both"},children:[d.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:16,flexShrink:0},children:[d.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[d.jsx(Sn,{status:u.status}),d.jsxs("span",{style:{color:"var(--text-2)",fontSize:12},children:[":",u.port]}),u.channels.filter(j=>j.name!=="web"&&j.status==="connected").map(j=>d.jsx(Sn,{status:"connected"},j.name))]}),d.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[u.hasPages&&d.jsx("a",{href:`/pages/${u.name}/`,target:"_blank",rel:"noopener noreferrer",style:{padding:"6px 16px",background:"var(--bg-2)",color:"var(--text-1)",borderRadius:"var(--radius)",fontSize:12,fontWeight:500,textDecoration:"none",border:"1px solid var(--border)"},children:"Pages"}),u.status==="stopped"?d.jsx("button",{onClick:_,disabled:T,style:{padding:"6px 16px",background:"var(--accent-dim)",color:"var(--accent)",borderRadius:"var(--radius)",fontSize:12,fontWeight:500,opacity:T?.5:1,transition:"opacity 0.15s"},children:T?"Starting...":"Start"}):d.jsx("button",{onClick:A,disabled:T,style:{padding:"6px 16px",background:"var(--red-dim)",color:"var(--red)",borderRadius:"var(--radius)",fontSize:12,fontWeight:500,opacity:T?.5:1,transition:"opacity 0.15s"},children:T?"Stopping...":"Stop"})]})]}),d.jsx("div",{style:{display:"flex",gap:0,borderBottom:"1px solid var(--border)",marginBottom:0,flexShrink:0},children:Sv.map(j=>d.jsx("button",{onClick:()=>f(j),style:{padding:"8px 16px",background:"transparent",color:j===c?"var(--accent)":"var(--text-2)",fontSize:12,fontWeight:500,borderBottom:j===c?"2px solid var(--accent)":"2px solid transparent",transition:"all 0.15s",marginBottom:-1},children:j},j))}),d.jsxs("div",{style:{flex:1,overflow:"hidden",paddingTop:12},children:[c==="History"&&d.jsx(yv,{name:r}),c==="Logs"&&d.jsx(bv,{name:r}),c==="Files"&&d.jsx(gv,{name:r}),c==="Variants"&&d.jsx(xv,{name:r}),c==="Connections"&&d.jsx(Ev,{mind:u})]})]}):d.jsx("div",{style:{color:"var(--text-2)",padding:24},children:"Loading..."})}function Ev({mind:r}){const u=r.channels.filter(s=>s.name!=="web"&&s.status==="connected");return u.length===0?d.jsx("div",{style:{color:"var(--text-2)",padding:24,textAlign:"center"},children:"No active connections."}):d.jsx("div",{style:{padding:"8px 0",display:"flex",flexDirection:"column",gap:12},children:u.map(s=>d.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:16,padding:16,background:"var(--bg-2)",border:"1px solid var(--border)",borderRadius:"var(--radius-lg)"},children:[d.jsx("div",{style:{width:40,height:40,borderRadius:"var(--radius)",background:"var(--bg-3)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:18,color:"var(--accent)",flexShrink:0},children:"⦿"}),d.jsxs("div",{style:{flex:1,minWidth:0},children:[d.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:6},children:[d.jsx("span",{style:{fontWeight:600,color:"var(--text-0)"},children:s.displayName}),d.jsx(Sn,{status:"connected"})]}),s.username&&d.jsxs("div",{style:{fontSize:13,color:"var(--text-1)",marginBottom:4},children:["Bot: ",d.jsx("span",{style:{color:"var(--text-0)"},children:s.username})]}),s.connectedAt&&d.jsxs("div",{style:{fontSize:11,color:"var(--text-2)"},children:["Connected ",Av(s.connectedAt)]})]})]},s.name))})}function Av(r){const u=new Date(r),c=new Date().getTime()-u.getTime(),f=Math.floor(c/6e4),p=Math.floor(f/60),g=Math.floor(p/24);return f<1?"just now":f<60?`${f}m ago`:p<24?`${p}h ago`:`${g}d ago`}function bp(){const r=window.location.hash.slice(1)||"/";if(r==="/"||r==="")return{page:"home"};if(r==="/minds")return{page:"minds"};if(r==="/chats")return{page:"chats"};if(r==="/logs")return{page:"logs"};const u=r.match(/^\/chats\/(.+)$/);if(u)return{page:"chats",conversationId:u[1]};const s=r.match(/^\/chats\?mind=(.+)$/);if(s)return{page:"chats",mindName:decodeURIComponent(s[1])};const c=r.match(/^\/mind\/(.+)$/);return c?{page:"mind",name:c[1]}:{page:"home"}}function _v(){const[r,u]=O.useState(bp),[s,c]=O.useState(null),[f,p]=O.useState(!1),[g,T]=O.useState(!1);O.useEffect(()=>{py().then(m=>{c(m),p(!0)})},[]),O.useEffect(()=>{const m=()=>{u(bp()),T(!1)};return window.addEventListener("hashchange",m),()=>window.removeEventListener("hashchange",m)},[]);const y=async()=>{await yy(),c(null)};return f?s?d.jsxs(d.Fragment,{children:[d.jsx("style",{children:Ns}),d.jsxs("div",{className:"app",children:[s.role==="admin"&&d.jsx(Ry,{}),d.jsxs("header",{className:"app-header",children:[d.jsxs("a",{href:"#/",className:"logo",children:[d.jsx("span",{className:"logo-symbol",children:">"})," volute"]}),r.page==="mind"&&r.name&&d.jsxs("nav",{className:"breadcrumb",children:[d.jsx("span",{className:"breadcrumb-sep",children:"/"}),d.jsx("span",{className:"breadcrumb-name",children:r.name})]}),r.page==="minds"&&d.jsxs("nav",{className:"breadcrumb",children:[d.jsx("span",{className:"breadcrumb-sep",children:"/"}),d.jsx("span",{className:"breadcrumb-name",children:"minds"})]}),r.page==="chats"&&d.jsxs("nav",{className:"breadcrumb",children:[d.jsx("span",{className:"breadcrumb-sep",children:"/"}),d.jsx("span",{className:"breadcrumb-name",children:"chat"})]}),r.page==="logs"&&d.jsxs("nav",{className:"breadcrumb",children:[d.jsx("span",{className:"breadcrumb-sep",children:"/"}),d.jsx("span",{className:"breadcrumb-name",children:"system logs"})]}),d.jsxs("div",{style:{marginLeft:"auto",display:"flex",alignItems:"center",gap:12},children:[d.jsx(xp,{href:"#/chats",active:r.page==="chats",children:"chat"}),d.jsx(xp,{href:"#/minds",active:r.page==="minds"||r.page==="mind",children:"minds"}),d.jsx(zv,{username:s.username,isAdmin:s.role==="admin",onLogout:y,onUsers:()=>T(!g),currentPage:r.page})]})]}),d.jsx("main",{className:"app-main",style:r.page==="chats"&&!g?{padding:0,overflow:"hidden"}:void 0,children:g?d.jsx(My,{onClose:()=>T(!1)}):d.jsxs(d.Fragment,{children:[r.page==="home"&&d.jsx(fv,{username:s.username}),r.page==="minds"&&d.jsx(sv,{}),r.page==="chats"&&d.jsx(iv,{conversationId:r.conversationId,mindName:r.mindName,username:s.username}),r.page==="mind"&&r.name&&d.jsx(Tv,{name:r.name}),r.page==="logs"&&d.jsx(zy,{})]})})]})]}):d.jsxs(d.Fragment,{children:[d.jsx("style",{children:Ns}),d.jsx("div",{className:"app",style:{height:"100%"},children:d.jsx(xy,{onAuth:c})})]}):d.jsxs(d.Fragment,{children:[d.jsx("style",{children:Ns}),d.jsx("div",{className:"app",children:d.jsx("div",{style:{color:"var(--text-2)",padding:24,textAlign:"center"},children:"Loading..."})})]})}function xp({href:r,active:u,children:s}){return d.jsx("a",{href:r,style:{color:u?"var(--accent)":"var(--text-2)",fontSize:12,fontFamily:"var(--mono)",transition:"color 0.15s"},onMouseEnter:c=>{u||(c.currentTarget.style.color="var(--text-0)")},onMouseLeave:c=>{u||(c.currentTarget.style.color="var(--text-2)")},children:s})}function zv({username:r,isAdmin:u,onLogout:s,onUsers:c,currentPage:f}){const[p,g]=O.useState(!1);return d.jsxs("div",{style:{position:"relative"},children:[d.jsxs("button",{onClick:()=>g(!p),style:{background:"transparent",color:"var(--text-2)",fontSize:12,fontFamily:"var(--mono)",border:"none",cursor:"pointer",transition:"color 0.15s",display:"flex",alignItems:"center",gap:4},onMouseEnter:T=>T.currentTarget.style.color="var(--text-0)",onMouseLeave:T=>{p||(T.currentTarget.style.color="var(--text-2)")},children:[r,d.jsx("span",{style:{fontSize:8},children:p?"▲":"▼"})]}),p&&d.jsxs(d.Fragment,{children:[d.jsx("div",{style:{position:"fixed",inset:0,zIndex:99},onClick:()=>g(!1)}),d.jsxs("div",{style:{position:"absolute",right:0,top:"100%",marginTop:6,background:"var(--bg-2)",border:"1px solid var(--border)",borderRadius:"var(--radius)",padding:"4px 0",minWidth:120,zIndex:100},children:[u&&d.jsx("button",{onClick:()=>{window.location.hash="#/logs",g(!1)},style:{display:"block",width:"100%",padding:"6px 12px",fontSize:12,color:f==="logs"?"var(--accent)":"var(--text-1)",background:"transparent",textAlign:"left",fontFamily:"var(--mono)",transition:"background 0.1s"},onMouseEnter:T=>T.currentTarget.style.background="var(--bg-3)",onMouseLeave:T=>T.currentTarget.style.background="transparent",children:"system logs"}),u&&d.jsx("button",{onClick:()=>{c(),g(!1)},style:{display:"block",width:"100%",padding:"6px 12px",fontSize:12,color:"var(--text-1)",background:"transparent",textAlign:"left",fontFamily:"var(--mono)",transition:"background 0.1s"},onMouseEnter:T=>T.currentTarget.style.background="var(--bg-3)",onMouseLeave:T=>T.currentTarget.style.background="transparent",children:"manage users"}),u&&d.jsx("div",{style:{borderTop:"1px solid var(--border)",margin:"4px 0"}}),d.jsx("button",{onClick:()=>{s(),g(!1)},style:{display:"block",width:"100%",padding:"6px 12px",fontSize:12,color:"var(--text-2)",background:"transparent",textAlign:"left",fontFamily:"var(--mono)",transition:"background 0.1s"},onMouseEnter:T=>T.currentTarget.style.background="var(--bg-3)",onMouseLeave:T=>T.currentTarget.style.background="transparent",children:"logout"})]})]})]})}const Ns=`
72
+ :root {
73
+ --bg-0: #0a0c0f;
74
+ --bg-1: #11141a;
75
+ --bg-2: #181c24;
76
+ --bg-3: #1f2430;
77
+ --border: #2a3040;
78
+ --border-bright: #3a4560;
79
+ --text-0: #e8ecf4;
80
+ --text-1: #a0aabb;
81
+ --text-2: #6a7588;
82
+ --accent: #4ade80;
83
+ --accent-dim: #22613e;
84
+ --accent-bg: rgba(74, 222, 128, 0.08);
85
+ --red: #f87171;
86
+ --red-dim: #7f1d1d;
87
+ --yellow: #fbbf24;
88
+ --yellow-dim: #78350f;
89
+ --blue: #60a5fa;
90
+ --purple: #c084fc;
91
+ --mono: 'IBM Plex Mono', 'SF Mono', 'Fira Code', monospace;
92
+ --radius: 6px;
93
+ --radius-lg: 10px;
94
+ }
95
+
96
+ * {
97
+ margin: 0;
98
+ padding: 0;
99
+ box-sizing: border-box;
100
+ }
101
+
102
+ html, body, #root {
103
+ height: 100%;
104
+ background: var(--bg-0);
105
+ color: var(--text-0);
106
+ font-family: var(--mono);
107
+ font-size: 13px;
108
+ line-height: 1.6;
109
+ -webkit-font-smoothing: antialiased;
110
+ }
111
+
112
+ ::selection {
113
+ background: var(--accent-dim);
114
+ color: var(--accent);
115
+ }
116
+
117
+ ::-webkit-scrollbar {
118
+ width: 6px;
119
+ height: 6px;
120
+ }
121
+ ::-webkit-scrollbar-track {
122
+ background: transparent;
123
+ }
124
+ ::-webkit-scrollbar-thumb {
125
+ background: var(--border);
126
+ border-radius: 3px;
127
+ }
128
+ ::-webkit-scrollbar-thumb:hover {
129
+ background: var(--border-bright);
130
+ }
131
+
132
+ a {
133
+ color: inherit;
134
+ text-decoration: none;
135
+ }
136
+
137
+ button {
138
+ font-family: var(--mono);
139
+ cursor: pointer;
140
+ border: none;
141
+ }
142
+
143
+ button:focus {
144
+ outline: none;
145
+ }
146
+
147
+ button:focus-visible {
148
+ outline: 1px solid var(--accent);
149
+ outline-offset: 2px;
150
+ }
151
+
152
+ a:focus-visible {
153
+ outline: 1px solid var(--accent);
154
+ outline-offset: 2px;
155
+ }
156
+
157
+ .app {
158
+ height: 100%;
159
+ display: flex;
160
+ flex-direction: column;
161
+ }
162
+
163
+ .app-header {
164
+ display: flex;
165
+ align-items: center;
166
+ gap: 0;
167
+ padding: 0 24px;
168
+ height: 48px;
169
+ background: var(--bg-1);
170
+ border-bottom: 1px solid var(--border);
171
+ flex-shrink: 0;
172
+ }
173
+
174
+ .logo {
175
+ font-family: var(--mono);
176
+ font-size: 15px;
177
+ font-weight: 600;
178
+ letter-spacing: -0.02em;
179
+ color: var(--text-0);
180
+ display: flex;
181
+ align-items: center;
182
+ gap: 0;
183
+ }
184
+
185
+ .logo-symbol {
186
+ color: var(--accent);
187
+ margin-right: 6px;
188
+ }
189
+
190
+ .logo:hover .logo-symbol {
191
+ text-shadow: 0 0 8px var(--accent);
192
+ }
193
+
194
+ .breadcrumb {
195
+ display: flex;
196
+ align-items: center;
197
+ font-size: 13px;
198
+ }
199
+
200
+ .breadcrumb-sep {
201
+ color: var(--text-2);
202
+ margin: 0 8px;
203
+ }
204
+
205
+ .breadcrumb-name {
206
+ color: var(--text-1);
207
+ }
208
+
209
+ .app-main {
210
+ flex: 1;
211
+ overflow: auto;
212
+ padding: 24px;
213
+ }
214
+
215
+ @keyframes fadeIn {
216
+ from { opacity: 0; transform: translateY(6px); }
217
+ to { opacity: 1; transform: translateY(0); }
218
+ }
219
+
220
+ @keyframes pulse {
221
+ 0%, 100% { opacity: 1; }
222
+ 50% { opacity: 0.5; }
223
+ }
224
+
225
+ @keyframes slideIn {
226
+ from { opacity: 0; transform: translateX(-8px); }
227
+ to { opacity: 1; transform: translateX(0); }
228
+ }
229
+
230
+ /* Markdown rendering */
231
+ .markdown-body {
232
+ word-break: break-word;
233
+ color: var(--text-0);
234
+ line-height: 1.6;
235
+ }
236
+ .markdown-body p {
237
+ margin: 0 0 8px;
238
+ }
239
+ .markdown-body p:last-child {
240
+ margin-bottom: 0;
241
+ }
242
+ .markdown-body pre {
243
+ background: var(--bg-3);
244
+ border: 1px solid var(--border);
245
+ border-radius: var(--radius);
246
+ padding: 10px 12px;
247
+ overflow-x: auto;
248
+ margin: 8px 0;
249
+ font-size: 12px;
250
+ line-height: 1.5;
251
+ }
252
+ .markdown-body code {
253
+ font-family: var(--mono);
254
+ font-size: 12px;
255
+ background: var(--bg-3);
256
+ padding: 1px 4px;
257
+ border-radius: 3px;
258
+ }
259
+ .markdown-body pre code {
260
+ background: none;
261
+ padding: 0;
262
+ }
263
+ .markdown-body a {
264
+ color: var(--blue);
265
+ text-decoration: underline;
266
+ }
267
+ .markdown-body ul, .markdown-body ol {
268
+ margin: 4px 0;
269
+ padding-left: 20px;
270
+ }
271
+ .markdown-body li {
272
+ margin: 2px 0;
273
+ }
274
+ .markdown-body h1, .markdown-body h2, .markdown-body h3,
275
+ .markdown-body h4, .markdown-body h5, .markdown-body h6 {
276
+ margin: 12px 0 6px;
277
+ font-weight: 600;
278
+ color: var(--text-0);
279
+ }
280
+ .markdown-body h1 { font-size: 18px; }
281
+ .markdown-body h2 { font-size: 16px; }
282
+ .markdown-body h3 { font-size: 14px; }
283
+ .markdown-body blockquote {
284
+ border-left: 3px solid var(--border-bright);
285
+ margin: 8px 0;
286
+ padding: 4px 12px;
287
+ color: var(--text-1);
288
+ }
289
+ .markdown-body table {
290
+ border-collapse: collapse;
291
+ margin: 8px 0;
292
+ }
293
+ .markdown-body th, .markdown-body td {
294
+ border: 1px solid var(--border);
295
+ padding: 6px 10px;
296
+ font-size: 12px;
297
+ }
298
+ .markdown-body th {
299
+ background: var(--bg-3);
300
+ font-weight: 600;
301
+ }
302
+ .markdown-body hr {
303
+ border: none;
304
+ border-top: 1px solid var(--border);
305
+ margin: 12px 0;
306
+ }
307
+ `;ry.createRoot(document.getElementById("root")).render(d.jsx(O.StrictMode,{children:d.jsx(_v,{})}));