@taico/taico 0.0.2 → 0.0.3

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 (181) hide show
  1. package/dist/agents/agent.entity.d.ts +2 -0
  2. package/dist/agents/agent.entity.js +10 -0
  3. package/dist/agents/agent.entity.js.map +1 -1
  4. package/dist/agents/agents.controller.js +6 -0
  5. package/dist/agents/agents.controller.js.map +1 -1
  6. package/dist/agents/agents.service.d.ts +1 -0
  7. package/dist/agents/agents.service.js +36 -7
  8. package/dist/agents/agents.service.js.map +1 -1
  9. package/dist/agents/dto/agent-response.dto.d.ts +3 -0
  10. package/dist/agents/dto/agent-response.dto.js +46 -9
  11. package/dist/agents/dto/agent-response.dto.js.map +1 -1
  12. package/dist/agents/dto/create-agent.dto.d.ts +3 -0
  13. package/dist/agents/dto/create-agent.dto.js +37 -5
  14. package/dist/agents/dto/create-agent.dto.js.map +1 -1
  15. package/dist/agents/dto/patch-agent.dto.d.ts +3 -0
  16. package/dist/agents/dto/patch-agent.dto.js +37 -5
  17. package/dist/agents/dto/patch-agent.dto.js.map +1 -1
  18. package/dist/agents/dto/service/agents.service.types.d.ts +9 -2
  19. package/dist/agents/enums/agent-type.enum.d.ts +1 -0
  20. package/dist/agents/enums/agent-type.enum.js +2 -0
  21. package/dist/agents/enums/agent-type.enum.js.map +1 -1
  22. package/dist/app-init/agent/code-reviewer.agent.js +1 -0
  23. package/dist/app-init/agent/code-reviewer.agent.js.map +1 -1
  24. package/dist/app-init/agent/prompts.d.ts +3 -3
  25. package/dist/app-init/agent/prompts.js +10 -9
  26. package/dist/app-init/agent/prompts.js.map +1 -1
  27. package/dist/app-init/agent/qwen3-coder-next.d.ts +2 -0
  28. package/dist/app-init/agent/qwen3-coder-next.js +22 -0
  29. package/dist/app-init/agent/qwen3-coder-next.js.map +1 -0
  30. package/dist/app-init/app-init.runner.js +7 -0
  31. package/dist/app-init/app-init.runner.js.map +1 -1
  32. package/dist/app.module.js +4 -3
  33. package/dist/app.module.js.map +1 -1
  34. package/dist/authorization-server/authorization.controller.d.ts +1 -0
  35. package/dist/authorization-server/authorization.controller.js +13 -1
  36. package/dist/authorization-server/authorization.controller.js.map +1 -1
  37. package/dist/authorization-server/authorization.service.js.map +1 -1
  38. package/dist/authorization-server/client-registration.service.d.ts +1 -0
  39. package/dist/authorization-server/client-registration.service.js +41 -3
  40. package/dist/authorization-server/client-registration.service.js.map +1 -1
  41. package/dist/authorization-server/dto/consent-metadata-response.dto.d.ts +1 -1
  42. package/dist/authorization-server/dto/consent-metadata-response.dto.js +1 -1
  43. package/dist/authorization-server/dto/consent-metadata-response.dto.js.map +1 -1
  44. package/dist/authorization-server/errors/web-auth.errors.d.ts +16 -0
  45. package/dist/authorization-server/errors/web-auth.errors.js +33 -0
  46. package/dist/authorization-server/errors/web-auth.errors.js.map +1 -0
  47. package/dist/authorization-server/web-auth.service.js +11 -2
  48. package/dist/authorization-server/web-auth.service.js.map +1 -1
  49. package/dist/config/env.config.d.ts +0 -2
  50. package/dist/config/env.config.js +8 -31
  51. package/dist/config/env.config.js.map +1 -1
  52. package/dist/context/context.module.js +2 -0
  53. package/dist/context/context.module.js.map +1 -1
  54. package/dist/context/context.service.d.ts +3 -1
  55. package/dist/context/context.service.js +11 -2
  56. package/dist/context/context.service.js.map +1 -1
  57. package/dist/context/errors/context.errors.d.ts +4 -0
  58. package/dist/context/errors/context.errors.js +8 -1
  59. package/dist/context/errors/context.errors.js.map +1 -1
  60. package/dist/discovery/discovery.controller.d.ts +4 -2
  61. package/dist/discovery/discovery.controller.js +30 -2
  62. package/dist/discovery/discovery.controller.js.map +1 -1
  63. package/dist/discovery/dto/protected-resource-metadata-response.dto.d.ts +7 -0
  64. package/dist/discovery/dto/protected-resource-metadata-response.dto.js +60 -0
  65. package/dist/discovery/dto/protected-resource-metadata-response.dto.js.map +1 -0
  66. package/dist/errors/http/error-catalog.js +18 -0
  67. package/dist/errors/http/error-catalog.js.map +1 -1
  68. package/dist/identity-provider/actor.controller.d.ts +2 -0
  69. package/dist/identity-provider/actor.controller.js +31 -0
  70. package/dist/identity-provider/actor.controller.js.map +1 -1
  71. package/dist/identity-provider/actor.service.js +1 -0
  72. package/dist/identity-provider/actor.service.js.map +1 -1
  73. package/dist/identity-provider/dto/search-actors-query.dto.d.ts +5 -0
  74. package/dist/identity-provider/dto/search-actors-query.dto.js +60 -0
  75. package/dist/identity-provider/dto/search-actors-query.dto.js.map +1 -0
  76. package/dist/main.js +26 -2
  77. package/dist/main.js.map +1 -1
  78. package/dist/meta/meta.service.js +25 -3
  79. package/dist/meta/meta.service.js.map +1 -1
  80. package/dist/{context/migrations/1765060392-AddNestedPageSchema.d.ts → migrations/1700000000000-BaselineSchema.d.ts} +1 -1
  81. package/dist/migrations/1700000000000-BaselineSchema.js +480 -0
  82. package/dist/migrations/1700000000000-BaselineSchema.js.map +1 -0
  83. package/dist/{mcp-registry/migrations/1733964000000-AddProvidedIdToMcpConnections.d.ts → migrations/1700000000001-UpdateAgentTypeConstraint.d.ts} +2 -1
  84. package/dist/migrations/1700000000001-UpdateAgentTypeConstraint.js +142 -0
  85. package/dist/migrations/1700000000001-UpdateAgentTypeConstraint.js.map +1 -0
  86. package/dist/public/assets/index-BCPnRhO0.js +11 -0
  87. package/dist/public/assets/index-_FDBdUKK.css +1 -0
  88. package/dist/public/beta/assets/index-S66NF8rC.js +85 -0
  89. package/dist/public/beta/index.html +1 -1
  90. package/dist/public/icons/cockatoo.png +0 -0
  91. package/dist/public/icons/qwen.png +0 -0
  92. package/dist/public/index.html +2 -2
  93. package/dist/search/search.service.js +10 -1
  94. package/dist/search/search.service.js.map +1 -1
  95. package/dist/search/search.types.d.ts +1 -0
  96. package/dist/tasks/artefact.entity.d.ts +12 -0
  97. package/dist/tasks/artefact.entity.js +67 -0
  98. package/dist/tasks/artefact.entity.js.map +1 -0
  99. package/dist/tasks/dto/artefact-response.dto.d.ts +11 -0
  100. package/dist/tasks/dto/artefact-response.dto.js +75 -0
  101. package/dist/tasks/dto/artefact-response.dto.js.map +1 -0
  102. package/dist/tasks/dto/create-artefact.dto.d.ts +4 -0
  103. package/dist/tasks/dto/create-artefact.dto.js +38 -0
  104. package/dist/tasks/dto/create-artefact.dto.js.map +1 -0
  105. package/dist/tasks/dto/service/tasks.service.types.d.ts +12 -0
  106. package/dist/tasks/dto/task-response.dto.d.ts +2 -0
  107. package/dist/tasks/dto/task-response.dto.js +11 -0
  108. package/dist/tasks/dto/task-response.dto.js.map +1 -1
  109. package/dist/tasks/errors/tasks.errors.d.ts +8 -0
  110. package/dist/tasks/errors/tasks.errors.js +15 -1
  111. package/dist/tasks/errors/tasks.errors.js.map +1 -1
  112. package/dist/tasks/events/tasks.events.d.ts +5 -0
  113. package/dist/tasks/events/tasks.events.js +8 -1
  114. package/dist/tasks/events/tasks.events.js.map +1 -1
  115. package/dist/tasks/task.entity.d.ts +2 -0
  116. package/dist/tasks/task.entity.js +6 -0
  117. package/dist/tasks/task.entity.js.map +1 -1
  118. package/dist/tasks/tasks.controller.d.ts +3 -0
  119. package/dist/tasks/tasks.controller.js +27 -0
  120. package/dist/tasks/tasks.controller.js.map +1 -1
  121. package/dist/tasks/tasks.gateway.d.ts +2 -1
  122. package/dist/tasks/tasks.gateway.js +23 -0
  123. package/dist/tasks/tasks.gateway.js.map +1 -1
  124. package/dist/tasks/tasks.mcp.gateway.js +28 -1
  125. package/dist/tasks/tasks.mcp.gateway.js.map +1 -1
  126. package/dist/tasks/tasks.module.js +2 -1
  127. package/dist/tasks/tasks.module.js.map +1 -1
  128. package/dist/tasks/tasks.service.d.ts +6 -2
  129. package/dist/tasks/tasks.service.js +68 -4
  130. package/dist/tasks/tasks.service.js.map +1 -1
  131. package/dist/threads/dto/append-thread-state.dto.d.ts +3 -0
  132. package/dist/threads/dto/append-thread-state.dto.js +28 -0
  133. package/dist/threads/dto/append-thread-state.dto.js.map +1 -0
  134. package/dist/threads/dto/create-thread.dto.d.ts +1 -0
  135. package/dist/threads/dto/create-thread.dto.js +9 -0
  136. package/dist/threads/dto/create-thread.dto.js.map +1 -1
  137. package/dist/threads/dto/service/threads.service.types.d.ts +3 -1
  138. package/dist/threads/dto/thread-response.dto.d.ts +2 -1
  139. package/dist/threads/dto/thread-response.dto.js +12 -5
  140. package/dist/threads/dto/thread-response.dto.js.map +1 -1
  141. package/dist/threads/dto/thread-state-response.dto.d.ts +3 -0
  142. package/dist/threads/dto/thread-state-response.dto.js +25 -0
  143. package/dist/threads/dto/thread-state-response.dto.js.map +1 -0
  144. package/dist/threads/dto/update-thread-state.dto.d.ts +3 -0
  145. package/dist/threads/dto/update-thread-state.dto.js +28 -0
  146. package/dist/threads/dto/update-thread-state.dto.js.map +1 -0
  147. package/dist/threads/thread.entity.d.ts +4 -0
  148. package/dist/threads/thread.entity.js +22 -0
  149. package/dist/threads/thread.entity.js.map +1 -1
  150. package/dist/threads/threads-state.service.spec.d.ts +1 -0
  151. package/dist/threads/threads-state.service.spec.js +415 -0
  152. package/dist/threads/threads-state.service.spec.js.map +1 -0
  153. package/dist/threads/threads.controller.d.ts +7 -0
  154. package/dist/threads/threads.controller.js +79 -0
  155. package/dist/threads/threads.controller.js.map +1 -1
  156. package/dist/threads/threads.module.js +2 -0
  157. package/dist/threads/threads.module.js.map +1 -1
  158. package/dist/threads/threads.service.d.ts +9 -2
  159. package/dist/threads/threads.service.js +149 -22
  160. package/dist/threads/threads.service.js.map +1 -1
  161. package/dist/threads/threads.service.spec.d.ts +1 -0
  162. package/dist/threads/threads.service.spec.js +431 -0
  163. package/dist/threads/threads.service.spec.js.map +1 -0
  164. package/dist/tsconfig.tsbuildinfo +1 -1
  165. package/package.json +6 -4
  166. package/dist/context/migrations/1765060392-AddNestedPageSchema.js +0 -61
  167. package/dist/context/migrations/1765060392-AddNestedPageSchema.js.map +0 -1
  168. package/dist/llm-helper/llm-helper.module.d.ts +0 -2
  169. package/dist/llm-helper/llm-helper.module.js +0 -21
  170. package/dist/llm-helper/llm-helper.module.js.map +0 -1
  171. package/dist/llm-helper/llm-helper.service.d.ts +0 -9
  172. package/dist/llm-helper/llm-helper.service.js +0 -71
  173. package/dist/llm-helper/llm-helper.service.js.map +0 -1
  174. package/dist/mcp-registry/migrations/1733964000000-AddProvidedIdToMcpConnections.js +0 -25
  175. package/dist/mcp-registry/migrations/1733964000000-AddProvidedIdToMcpConnections.js.map +0 -1
  176. package/dist/mcp-registry/migrations/1734184000000-AddUrlToMcpServers.d.ts +0 -5
  177. package/dist/mcp-registry/migrations/1734184000000-AddUrlToMcpServers.js +0 -19
  178. package/dist/mcp-registry/migrations/1734184000000-AddUrlToMcpServers.js.map +0 -1
  179. package/dist/public/assets/index-CQNjiEI4.css +0 -1
  180. package/dist/public/assets/index-DAZtEION.js +0 -11
  181. package/dist/public/beta/assets/index-BakZ6bA-.js +0 -85
@@ -0,0 +1,11 @@
1
+ (function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))o(d);new MutationObserver(d=>{for(const f of d)if(f.type==="childList")for(const g of f.addedNodes)g.tagName==="LINK"&&g.rel==="modulepreload"&&o(g)}).observe(document,{childList:!0,subtree:!0});function r(d){const f={};return d.integrity&&(f.integrity=d.integrity),d.referrerPolicy&&(f.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?f.credentials="include":d.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function o(d){if(d.ep)return;d.ep=!0;const f=r(d);fetch(d.href,f)}})();function Up(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Zc={exports:{}},zs={};var Vm;function tx(){if(Vm)return zs;Vm=1;var s=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function r(o,d,f){var g=null;if(f!==void 0&&(g=""+f),d.key!==void 0&&(g=""+d.key),"key"in d){f={};for(var y in d)y!=="key"&&(f[y]=d[y])}else f=d;return d=f.ref,{$$typeof:s,type:o,key:g,ref:d!==void 0?d:null,props:f}}return zs.Fragment=l,zs.jsx=r,zs.jsxs=r,zs}var Xm;function nx(){return Xm||(Xm=1,Zc.exports=tx()),Zc.exports}var i=nx(),$c={exports:{}},ve={};var Im;function ax(){if(Im)return ve;Im=1;var s=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),g=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),S=Symbol.for("react.activity"),j=Symbol.iterator;function E(N){return N===null||typeof N!="object"?null:(N=j&&N[j]||N["@@iterator"],typeof N=="function"?N:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,k={};function q(N,X,J){this.props=N,this.context=X,this.refs=k,this.updater=J||b}q.prototype.isReactComponent={},q.prototype.setState=function(N,X){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,X,"setState")},q.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function Q(){}Q.prototype=q.prototype;function $(N,X,J){this.props=N,this.context=X,this.refs=k,this.updater=J||b}var ae=$.prototype=new Q;ae.constructor=$,w(ae,q.prototype),ae.isPureReactComponent=!0;var O=Array.isArray;function L(){}var U={H:null,A:null,T:null,S:null},F=Object.prototype.hasOwnProperty;function ie(N,X,J){var ee=J.ref;return{$$typeof:s,type:N,key:X,ref:ee!==void 0?ee:null,props:J}}function te(N,X){return ie(N.type,X,N.props)}function Z(N){return typeof N=="object"&&N!==null&&N.$$typeof===s}function be(N){var X={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(J){return X[J]})}var Ee=/\/+/g;function Fe(N,X){return typeof N=="object"&&N!==null&&N.key!=null?be(""+N.key):X.toString(36)}function Xe(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(L,L):(N.status="pending",N.then(function(X){N.status==="pending"&&(N.status="fulfilled",N.value=X)},function(X){N.status==="pending"&&(N.status="rejected",N.reason=X)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function H(N,X,J,ee,he){var xe=typeof N;(xe==="undefined"||xe==="boolean")&&(N=null);var Ce=!1;if(N===null)Ce=!0;else switch(xe){case"bigint":case"string":case"number":Ce=!0;break;case"object":switch(N.$$typeof){case s:case l:Ce=!0;break;case T:return Ce=N._init,H(Ce(N._payload),X,J,ee,he)}}if(Ce)return he=he(N),Ce=ee===""?"."+Fe(N,0):ee,O(he)?(J="",Ce!=null&&(J=Ce.replace(Ee,"$&/")+"/"),H(he,X,J,"",function(Ae){return Ae})):he!=null&&(Z(he)&&(he=te(he,J+(he.key==null||N&&N.key===he.key?"":(""+he.key).replace(Ee,"$&/")+"/")+Ce)),X.push(he)),1;Ce=0;var et=ee===""?".":ee+":";if(O(N))for(var oe=0;oe<N.length;oe++)ee=N[oe],xe=et+Fe(ee,oe),Ce+=H(ee,X,J,xe,he);else if(oe=E(N),typeof oe=="function")for(N=oe.call(N),oe=0;!(ee=N.next()).done;)ee=ee.value,xe=et+Fe(ee,oe++),Ce+=H(ee,X,J,xe,he);else if(xe==="object"){if(typeof N.then=="function")return H(Xe(N),X,J,ee,he);throw X=String(N),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return Ce}function P(N,X,J){if(N==null)return N;var ee=[],he=0;return H(N,ee,"","",function(xe){return X.call(J,xe,he++)}),ee}function ne(N){if(N._status===-1){var X=N._result;X=X(),X.then(function(J){(N._status===0||N._status===-1)&&(N._status=1,N._result=J)},function(J){(N._status===0||N._status===-1)&&(N._status=2,N._result=J)}),N._status===-1&&(N._status=0,N._result=X)}if(N._status===1)return N._result.default;throw N._result}var ye=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},je={map:P,forEach:function(N,X,J){P(N,function(){X.apply(this,arguments)},J)},count:function(N){var X=0;return P(N,function(){X++}),X},toArray:function(N){return P(N,function(X){return X})||[]},only:function(N){if(!Z(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return ve.Activity=S,ve.Children=je,ve.Component=q,ve.Fragment=r,ve.Profiler=d,ve.PureComponent=$,ve.StrictMode=o,ve.Suspense=v,ve.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=U,ve.__COMPILER_RUNTIME={__proto__:null,c:function(N){return U.H.useMemoCache(N)}},ve.cache=function(N){return function(){return N.apply(null,arguments)}},ve.cacheSignal=function(){return null},ve.cloneElement=function(N,X,J){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var ee=w({},N.props),he=N.key;if(X!=null)for(xe in X.key!==void 0&&(he=""+X.key),X)!F.call(X,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&X.ref===void 0||(ee[xe]=X[xe]);var xe=arguments.length-2;if(xe===1)ee.children=J;else if(1<xe){for(var Ce=Array(xe),et=0;et<xe;et++)Ce[et]=arguments[et+2];ee.children=Ce}return ie(N.type,he,ee)},ve.createContext=function(N){return N={$$typeof:g,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:f,_context:N},N},ve.createElement=function(N,X,J){var ee,he={},xe=null;if(X!=null)for(ee in X.key!==void 0&&(xe=""+X.key),X)F.call(X,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(he[ee]=X[ee]);var Ce=arguments.length-2;if(Ce===1)he.children=J;else if(1<Ce){for(var et=Array(Ce),oe=0;oe<Ce;oe++)et[oe]=arguments[oe+2];he.children=et}if(N&&N.defaultProps)for(ee in Ce=N.defaultProps,Ce)he[ee]===void 0&&(he[ee]=Ce[ee]);return ie(N,xe,he)},ve.createRef=function(){return{current:null}},ve.forwardRef=function(N){return{$$typeof:y,render:N}},ve.isValidElement=Z,ve.lazy=function(N){return{$$typeof:T,_payload:{_status:-1,_result:N},_init:ne}},ve.memo=function(N,X){return{$$typeof:p,type:N,compare:X===void 0?null:X}},ve.startTransition=function(N){var X=U.T,J={};U.T=J;try{var ee=N(),he=U.S;he!==null&&he(J,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(L,ye)}catch(xe){ye(xe)}finally{X!==null&&J.types!==null&&(X.types=J.types),U.T=X}},ve.unstable_useCacheRefresh=function(){return U.H.useCacheRefresh()},ve.use=function(N){return U.H.use(N)},ve.useActionState=function(N,X,J){return U.H.useActionState(N,X,J)},ve.useCallback=function(N,X){return U.H.useCallback(N,X)},ve.useContext=function(N){return U.H.useContext(N)},ve.useDebugValue=function(){},ve.useDeferredValue=function(N,X){return U.H.useDeferredValue(N,X)},ve.useEffect=function(N,X){return U.H.useEffect(N,X)},ve.useEffectEvent=function(N){return U.H.useEffectEvent(N)},ve.useId=function(){return U.H.useId()},ve.useImperativeHandle=function(N,X,J){return U.H.useImperativeHandle(N,X,J)},ve.useInsertionEffect=function(N,X){return U.H.useInsertionEffect(N,X)},ve.useLayoutEffect=function(N,X){return U.H.useLayoutEffect(N,X)},ve.useMemo=function(N,X){return U.H.useMemo(N,X)},ve.useOptimistic=function(N,X){return U.H.useOptimistic(N,X)},ve.useReducer=function(N,X,J){return U.H.useReducer(N,X,J)},ve.useRef=function(N){return U.H.useRef(N)},ve.useState=function(N){return U.H.useState(N)},ve.useSyncExternalStore=function(N,X,J){return U.H.useSyncExternalStore(N,X,J)},ve.useTransition=function(){return U.H.useTransition()},ve.version="19.2.3",ve}var Qm;function Cu(){return Qm||(Qm=1,$c.exports=ax()),$c.exports}var m=Cu();const lx=Up(m);var Jc={exports:{}},Ds={},Fc={exports:{}},Pc={};var Km;function sx(){return Km||(Km=1,(function(s){function l(H,P){var ne=H.length;H.push(P);e:for(;0<ne;){var ye=ne-1>>>1,je=H[ye];if(0<d(je,P))H[ye]=P,H[ne]=je,ne=ye;else break e}}function r(H){return H.length===0?null:H[0]}function o(H){if(H.length===0)return null;var P=H[0],ne=H.pop();if(ne!==P){H[0]=ne;e:for(var ye=0,je=H.length,N=je>>>1;ye<N;){var X=2*(ye+1)-1,J=H[X],ee=X+1,he=H[ee];if(0>d(J,ne))ee<je&&0>d(he,J)?(H[ye]=he,H[ee]=ne,ye=ee):(H[ye]=J,H[X]=ne,ye=X);else if(ee<je&&0>d(he,ne))H[ye]=he,H[ee]=ne,ye=ee;else break e}}return P}function d(H,P){var ne=H.sortIndex-P.sortIndex;return ne!==0?ne:H.id-P.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;s.unstable_now=function(){return f.now()}}else{var g=Date,y=g.now();s.unstable_now=function(){return g.now()-y}}var v=[],p=[],T=1,S=null,j=3,E=!1,b=!1,w=!1,k=!1,q=typeof setTimeout=="function"?setTimeout:null,Q=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;function ae(H){for(var P=r(p);P!==null;){if(P.callback===null)o(p);else if(P.startTime<=H)o(p),P.sortIndex=P.expirationTime,l(v,P);else break;P=r(p)}}function O(H){if(w=!1,ae(H),!b)if(r(v)!==null)b=!0,L||(L=!0,be());else{var P=r(p);P!==null&&Xe(O,P.startTime-H)}}var L=!1,U=-1,F=5,ie=-1;function te(){return k?!0:!(s.unstable_now()-ie<F)}function Z(){if(k=!1,L){var H=s.unstable_now();ie=H;var P=!0;try{e:{b=!1,w&&(w=!1,Q(U),U=-1),E=!0;var ne=j;try{t:{for(ae(H),S=r(v);S!==null&&!(S.expirationTime>H&&te());){var ye=S.callback;if(typeof ye=="function"){S.callback=null,j=S.priorityLevel;var je=ye(S.expirationTime<=H);if(H=s.unstable_now(),typeof je=="function"){S.callback=je,ae(H),P=!0;break t}S===r(v)&&o(v),ae(H)}else o(v);S=r(v)}if(S!==null)P=!0;else{var N=r(p);N!==null&&Xe(O,N.startTime-H),P=!1}}break e}finally{S=null,j=ne,E=!1}P=void 0}}finally{P?be():L=!1}}}var be;if(typeof $=="function")be=function(){$(Z)};else if(typeof MessageChannel<"u"){var Ee=new MessageChannel,Fe=Ee.port2;Ee.port1.onmessage=Z,be=function(){Fe.postMessage(null)}}else be=function(){q(Z,0)};function Xe(H,P){U=q(function(){H(s.unstable_now())},P)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(H){H.callback=null},s.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<H?Math.floor(1e3/H):5},s.unstable_getCurrentPriorityLevel=function(){return j},s.unstable_next=function(H){switch(j){case 1:case 2:case 3:var P=3;break;default:P=j}var ne=j;j=P;try{return H()}finally{j=ne}},s.unstable_requestPaint=function(){k=!0},s.unstable_runWithPriority=function(H,P){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var ne=j;j=H;try{return P()}finally{j=ne}},s.unstable_scheduleCallback=function(H,P,ne){var ye=s.unstable_now();switch(typeof ne=="object"&&ne!==null?(ne=ne.delay,ne=typeof ne=="number"&&0<ne?ye+ne:ye):ne=ye,H){case 1:var je=-1;break;case 2:je=250;break;case 5:je=1073741823;break;case 4:je=1e4;break;default:je=5e3}return je=ne+je,H={id:T++,callback:P,priorityLevel:H,startTime:ne,expirationTime:je,sortIndex:-1},ne>ye?(H.sortIndex=ne,l(p,H),r(v)===null&&H===r(p)&&(w?(Q(U),U=-1):w=!0,Xe(O,ne-ye))):(H.sortIndex=je,l(v,H),b||E||(b=!0,L||(L=!0,be()))),H},s.unstable_shouldYield=te,s.unstable_wrapCallback=function(H){var P=j;return function(){var ne=j;j=P;try{return H.apply(this,arguments)}finally{j=ne}}}})(Pc)),Pc}var Zm;function ix(){return Zm||(Zm=1,Fc.exports=sx()),Fc.exports}var Wc={exports:{}},Tt={};var $m;function rx(){if($m)return Tt;$m=1;var s=Cu();function l(v){var p="https://react.dev/errors/"+v;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var T=2;T<arguments.length;T++)p+="&args[]="+encodeURIComponent(arguments[T])}return"Minified React error #"+v+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var o={d:{f:r,r:function(){throw Error(l(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},d=Symbol.for("react.portal");function f(v,p,T){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:S==null?null:""+S,children:v,containerInfo:p,implementation:T}}var g=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function y(v,p){if(v==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Tt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Tt.createPortal=function(v,p){var T=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(l(299));return f(v,p,null,T)},Tt.flushSync=function(v){var p=g.T,T=o.p;try{if(g.T=null,o.p=2,v)return v()}finally{g.T=p,o.p=T,o.d.f()}},Tt.preconnect=function(v,p){typeof v=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,o.d.C(v,p))},Tt.prefetchDNS=function(v){typeof v=="string"&&o.d.D(v)},Tt.preinit=function(v,p){if(typeof v=="string"&&p&&typeof p.as=="string"){var T=p.as,S=y(T,p.crossOrigin),j=typeof p.integrity=="string"?p.integrity:void 0,E=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;T==="style"?o.d.S(v,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:S,integrity:j,fetchPriority:E}):T==="script"&&o.d.X(v,{crossOrigin:S,integrity:j,fetchPriority:E,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Tt.preinitModule=function(v,p){if(typeof v=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var T=y(p.as,p.crossOrigin);o.d.M(v,{crossOrigin:T,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&o.d.M(v)},Tt.preload=function(v,p){if(typeof v=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var T=p.as,S=y(T,p.crossOrigin);o.d.L(v,T,{crossOrigin:S,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Tt.preloadModule=function(v,p){if(typeof v=="string")if(p){var T=y(p.as,p.crossOrigin);o.d.m(v,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:T,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else o.d.m(v)},Tt.requestFormReset=function(v){o.d.r(v)},Tt.unstable_batchedUpdates=function(v,p){return v(p)},Tt.useFormState=function(v,p,T){return g.H.useFormState(v,p,T)},Tt.useFormStatus=function(){return g.H.useHostTransitionStatus()},Tt.version="19.2.3",Tt}var Jm;function ox(){if(Jm)return Wc.exports;Jm=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(l){console.error(l)}}return s(),Wc.exports=rx(),Wc.exports}var Fm;function cx(){if(Fm)return Ds;Fm=1;var s=ix(),l=Cu(),r=ox();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}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 d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n: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 y(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 v(e){if(f(e)!==e)throw Error(o(188))}function p(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(o(188));return t!==e?null:e}for(var n=e,a=t;;){var c=n.return;if(c===null)break;var u=c.alternate;if(u===null){if(a=c.return,a!==null){n=a;continue}break}if(c.child===u.child){for(u=c.child;u;){if(u===n)return v(c),e;if(u===a)return v(c),t;u=u.sibling}throw Error(o(188))}if(n.return!==a.return)n=c,a=u;else{for(var h=!1,x=c.child;x;){if(x===n){h=!0,n=c,a=u;break}if(x===a){h=!0,a=c,n=u;break}x=x.sibling}if(!h){for(x=u.child;x;){if(x===n){h=!0,n=u,a=c;break}if(x===a){h=!0,a=u,n=c;break}x=x.sibling}if(!h)throw Error(o(189))}}if(n.alternate!==a)throw Error(o(190))}if(n.tag!==3)throw Error(o(188));return n.stateNode.current===n?e:t}function T(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=T(e),t!==null)return t;e=e.sibling}return null}var S=Object.assign,j=Symbol.for("react.element"),E=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),q=Symbol.for("react.profiler"),Q=Symbol.for("react.consumer"),$=Symbol.for("react.context"),ae=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),U=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),ie=Symbol.for("react.activity"),te=Symbol.for("react.memo_cache_sentinel"),Z=Symbol.iterator;function be(e){return e===null||typeof e!="object"?null:(e=Z&&e[Z]||e["@@iterator"],typeof e=="function"?e:null)}var Ee=Symbol.for("react.client.reference");function Fe(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Ee?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case w:return"Fragment";case q:return"Profiler";case k:return"StrictMode";case O:return"Suspense";case L:return"SuspenseList";case ie:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case b:return"Portal";case $:return e.displayName||"Context";case Q:return(e._context.displayName||"Context")+".Consumer";case ae:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case U:return t=e.displayName||null,t!==null?t:Fe(e.type)||"Memo";case F:t=e._payload,e=e._init;try{return Fe(e(t))}catch{}}return null}var Xe=Array.isArray,H=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},ye=[],je=-1;function N(e){return{current:e}}function X(e){0>je||(e.current=ye[je],ye[je]=null,je--)}function J(e,t){je++,ye[je]=e.current,e.current=t}var ee=N(null),he=N(null),xe=N(null),Ce=N(null);function et(e,t){switch(J(xe,t),J(he,e),J(ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?fm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=fm(t),e=hm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}X(ee),J(ee,e)}function oe(){X(ee),X(he),X(xe)}function Ae(e){e.memoizedState!==null&&J(Ce,e);var t=ee.current,n=hm(t,e.type);t!==n&&(J(he,e),J(ee,n))}function Sn(e){he.current===e&&(X(ee),X(he)),Ce.current===e&&(X(Ce),Ns._currentValue=ne)}var Ie,bt;function St(e){if(Ie===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ie=t&&t[1]||"",bt=-1<n.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+Ie+e+bt}var _n=!1;function fn(e,t){if(!e||_n)return"";_n=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var I=function(){throw Error()};if(Object.defineProperty(I.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(I,[])}catch(B){var M=B}Reflect.construct(e,[],I)}else{try{I.call()}catch(B){M=B}e.call(I.prototype)}}else{try{throw Error()}catch(B){M=B}(I=e())&&typeof I.catch=="function"&&I.catch(function(){})}}catch(B){if(B&&M&&typeof B.stack=="string")return[B.stack,M.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=a.DetermineComponentFrameRoot(),h=u[0],x=u[1];if(h&&x){var C=h.split(`
4
+ `),D=x.split(`
5
+ `);for(c=a=0;a<C.length&&!C[a].includes("DetermineComponentFrameRoot");)a++;for(;c<D.length&&!D[c].includes("DetermineComponentFrameRoot");)c++;if(a===C.length||c===D.length)for(a=C.length-1,c=D.length-1;1<=a&&0<=c&&C[a]!==D[c];)c--;for(;1<=a&&0<=c;a--,c--)if(C[a]!==D[c]){if(a!==1||c!==1)do if(a--,c--,0>c||C[a]!==D[c]){var G=`
6
+ `+C[a].replace(" at new "," at ");return e.displayName&&G.includes("<anonymous>")&&(G=G.replace("<anonymous>",e.displayName)),G}while(1<=a&&0<=c);break}}}finally{_n=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?St(n):""}function va(e,t){switch(e.tag){case 26:case 27:case 5:return St(e.type);case 16:return St("Lazy");case 13:return e.child!==t&&t!==null?St("Suspense Fallback"):St("Suspense");case 19:return St("SuspenseList");case 0:case 15:return fn(e.type,!1);case 11:return fn(e.type.render,!1);case 1:return fn(e.type,!0);case 31:return St("Activity");default:return""}}function xa(e){try{var t="",n=null;do t+=va(e,n),n=e,e=e.return;while(e);return t}catch(a){return`
7
+ Error generating stack: `+a.message+`
8
+ `+a.stack}}var hn=Object.prototype.hasOwnProperty,Ta=s.unstable_scheduleCallback,Sa=s.unstable_cancelCallback,ql=s.unstable_shouldYield,_a=s.unstable_requestPaint,_t=s.unstable_now,zr=s.unstable_getCurrentPriorityLevel,Qs=s.unstable_ImmediatePriority,Ks=s.unstable_UserBlockingPriority,Xa=s.unstable_NormalPriority,Zs=s.unstable_LowPriority,Ia=s.unstable_IdlePriority,Dr=s.log,kr=s.unstable_setDisableYieldValue,W=null,fe=null;function ut(e){if(typeof Dr=="function"&&kr(e),fe&&typeof fe.setStrictMode=="function")try{fe.setStrictMode(W,e)}catch{}}var Mt=Math.clz32?Math.clz32:Gg,Hg=Math.log,qg=Math.LN2;function Gg(e){return e>>>=0,e===0?32:31-(Hg(e)/qg|0)|0}var $s=256,Js=262144,Fs=4194304;function Ea(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 Ps(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var c=0,u=e.suspendedLanes,h=e.pingedLanes;e=e.warmLanes;var x=a&134217727;return x!==0?(a=x&~u,a!==0?c=Ea(a):(h&=x,h!==0?c=Ea(h):n||(n=x&~e,n!==0&&(c=Ea(n))))):(x=a&~u,x!==0?c=Ea(x):h!==0?c=Ea(h):n||(n=a&~e,n!==0&&(c=Ea(n)))),c===0?0:t!==0&&t!==c&&(t&u)===0&&(u=c&-c,n=t&-t,u>=n||u===32&&(n&4194048)!==0)?t:c}function Gl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Yg(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 Qu(){var e=Fs;return Fs<<=1,(Fs&62914560)===0&&(Fs=4194304),e}function Mr(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Yl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Vg(e,t,n,a,c,u){var h=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var x=e.entanglements,C=e.expirationTimes,D=e.hiddenUpdates;for(n=h&~n;0<n;){var G=31-Mt(n),I=1<<G;x[G]=0,C[G]=-1;var M=D[G];if(M!==null)for(D[G]=null,G=0;G<M.length;G++){var B=M[G];B!==null&&(B.lane&=-536870913)}n&=~I}a!==0&&Ku(e,a,0),u!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=u&~(h&~t))}function Ku(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Mt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&261930}function Zu(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-Mt(n),c=1<<a;c&t|e[a]&t&&(e[a]|=t),n&=~c}}function $u(e,t){var n=t&-t;return n=(n&42)!==0?1:Ur(n),(n&(e.suspendedLanes|t))!==0?0:n}function Ur(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 Br(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ju(){var e=P.p;return e!==0?e:(e=window.event,e===void 0?32:Um(e.type))}function Fu(e,t){var n=P.p;try{return P.p=e,t()}finally{P.p=n}}var In=Math.random().toString(36).slice(2),mt="__reactFiber$"+In,jt="__reactProps$"+In,Qa="__reactContainer$"+In,Lr="__reactEvents$"+In,Xg="__reactListeners$"+In,Ig="__reactHandles$"+In,Pu="__reactResources$"+In,Vl="__reactMarker$"+In;function Hr(e){delete e[mt],delete e[jt],delete e[Lr],delete e[Xg],delete e[Ig]}function Ka(e){var t=e[mt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Qa]||n[mt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Tm(e);e!==null;){if(n=e[mt])return n;e=Tm(e)}return t}e=n,n=e.parentNode}return null}function Za(e){if(e=e[mt]||e[Qa]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Xl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function $a(e){var t=e[Pu];return t||(t=e[Pu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ft(e){e[Vl]=!0}var Wu=new Set,ed={};function ba(e,t){Ja(e,t),Ja(e+"Capture",t)}function Ja(e,t){for(ed[e]=t,e=0;e<t.length;e++)Wu.add(t[e])}var Qg=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]*$"),td={},nd={};function Kg(e){return hn.call(nd,e)?!0:hn.call(td,e)?!1:Qg.test(e)?nd[e]=!0:(td[e]=!0,!1)}function Ws(e,t,n){if(Kg(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){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,""+n)}}function ei(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function En(e,t,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+a)}}function Kt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ad(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Zg(e,t,n){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var c=a.get,u=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(h){n=""+h,u.call(this,h)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(h){n=""+h},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function qr(e){if(!e._valueTracker){var t=ad(e)?"checked":"value";e._valueTracker=Zg(e,t,""+e[t])}}function ld(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=ad(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function ti(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 $g=/[\n"\\]/g;function Zt(e){return e.replace($g,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Gr(e,t,n,a,c,u,h,x){e.name="",h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.type=h:e.removeAttribute("type"),t!=null?h==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Kt(t)):e.value!==""+Kt(t)&&(e.value=""+Kt(t)):h!=="submit"&&h!=="reset"||e.removeAttribute("value"),t!=null?Yr(e,h,Kt(t)):n!=null?Yr(e,h,Kt(n)):a!=null&&e.removeAttribute("value"),c==null&&u!=null&&(e.defaultChecked=!!u),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.name=""+Kt(x):e.removeAttribute("name")}function sd(e,t,n,a,c,u,h,x){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||n!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){qr(e);return}n=n!=null?""+Kt(n):"",t=t!=null?""+Kt(t):n,x||t===e.value||(e.value=t),e.defaultValue=t}a=a??c,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=x?e.checked:!!a,e.defaultChecked=!!a,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.name=h),qr(e)}function Yr(e,t,n){t==="number"&&ti(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Fa(e,t,n,a){if(e=e.options,t){t={};for(var c=0;c<n.length;c++)t["$"+n[c]]=!0;for(n=0;n<e.length;n++)c=t.hasOwnProperty("$"+e[n].value),e[n].selected!==c&&(e[n].selected=c),c&&a&&(e[n].defaultSelected=!0)}else{for(n=""+Kt(n),t=null,c=0;c<e.length;c++){if(e[c].value===n){e[c].selected=!0,a&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function id(e,t,n){if(t!=null&&(t=""+Kt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Kt(n):""}function rd(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(o(92));if(Xe(a)){if(1<a.length)throw Error(o(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=Kt(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a),qr(e)}function Pa(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Jg=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 od(e,t,n){var a=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,n):typeof n!="number"||n===0||Jg.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function cd(e,t,n){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,n!=null){for(var a in n)!n.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var c in t)a=t[c],t.hasOwnProperty(c)&&n[c]!==a&&od(e,c,a)}else for(var u in t)t.hasOwnProperty(u)&&od(e,u,t[u])}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 Fg=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"]]),Pg=/^[\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 ni(e){return Pg.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function bn(){}var Xr=null;function Ir(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Wa=null,el=null;function ud(e){var t=Za(e);if(t&&(e=t.stateNode)){var n=e[jt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Gr(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+Zt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var c=a[jt]||null;if(!c)throw Error(o(90));Gr(a,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<n.length;t++)a=n[t],a.form===e.form&&ld(a)}break e;case"textarea":id(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Fa(e,!!n.multiple,t,!1)}}}var Qr=!1;function dd(e,t,n){if(Qr)return e(t,n);Qr=!0;try{var a=e(t);return a}finally{if(Qr=!1,(Wa!==null||el!==null)&&(Vi(),Wa&&(t=Wa,e=el,el=Wa=null,ud(t),e)))for(t=0;t<e.length;t++)ud(e[t])}}function Il(e,t){var n=e.stateNode;if(n===null)return null;var a=n[jt]||null;if(a===null)return null;n=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(n&&typeof n!="function")throw Error(o(231,t,typeof n));return n}var jn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Kr=!1;if(jn)try{var Ql={};Object.defineProperty(Ql,"passive",{get:function(){Kr=!0}}),window.addEventListener("test",Ql,Ql),window.removeEventListener("test",Ql,Ql)}catch{Kr=!1}var Qn=null,Zr=null,ai=null;function fd(){if(ai)return ai;var e,t=Zr,n=t.length,a,c="value"in Qn?Qn.value:Qn.textContent,u=c.length;for(e=0;e<n&&t[e]===c[e];e++);var h=n-e;for(a=1;a<=h&&t[n-a]===c[u-a];a++);return ai=c.slice(e,1<a?1-a:void 0)}function li(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 si(){return!0}function hd(){return!1}function Ct(e){function t(n,a,c,u,h){this._reactName=n,this._targetInst=c,this.type=a,this.nativeEvent=u,this.target=h,this.currentTarget=null;for(var x in e)e.hasOwnProperty(x)&&(n=e[x],this[x]=n?n(u):u[x]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?si:hd,this.isPropagationStopped=hd,this}return S(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=si)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=si)},persist:function(){},isPersistent:si}),t}var ja={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ii=Ct(ja),Kl=S({},ja,{view:0,detail:0}),Wg=Ct(Kl),$r,Jr,Zl,ri=S({},Kl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Pr,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!==Zl&&(Zl&&e.type==="mousemove"?($r=e.screenX-Zl.screenX,Jr=e.screenY-Zl.screenY):Jr=$r=0,Zl=e),$r)},movementY:function(e){return"movementY"in e?e.movementY:Jr}}),md=Ct(ri),ey=S({},ri,{dataTransfer:0}),ty=Ct(ey),ny=S({},Kl,{relatedTarget:0}),Fr=Ct(ny),ay=S({},ja,{animationName:0,elapsedTime:0,pseudoElement:0}),ly=Ct(ay),sy=S({},ja,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),iy=Ct(sy),ry=S({},ja,{data:0}),pd=Ct(ry),oy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},cy={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"},uy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function dy(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=uy[e])?!!t[e]:!1}function Pr(){return dy}var fy=S({},Kl,{key:function(e){if(e.key){var t=oy[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=li(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?cy[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Pr,charCode:function(e){return e.type==="keypress"?li(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?li(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),hy=Ct(fy),my=S({},ri,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),gd=Ct(my),py=S({},Kl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Pr}),gy=Ct(py),yy=S({},ja,{propertyName:0,elapsedTime:0,pseudoElement:0}),vy=Ct(yy),xy=S({},ri,{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}),Ty=Ct(xy),Sy=S({},ja,{newState:0,oldState:0}),_y=Ct(Sy),Ey=[9,13,27,32],Wr=jn&&"CompositionEvent"in window,$l=null;jn&&"documentMode"in document&&($l=document.documentMode);var by=jn&&"TextEvent"in window&&!$l,yd=jn&&(!Wr||$l&&8<$l&&11>=$l),vd=" ",xd=!1;function Td(e,t){switch(e){case"keyup":return Ey.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Sd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var tl=!1;function jy(e,t){switch(e){case"compositionend":return Sd(t);case"keypress":return t.which!==32?null:(xd=!0,vd);case"textInput":return e=t.data,e===vd&&xd?null:e;default:return null}}function Cy(e,t){if(tl)return e==="compositionend"||!Wr&&Td(e,t)?(e=fd(),ai=Zr=Qn=null,tl=!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 yd&&t.locale!=="ko"?null:t.data;default:return null}}var Ay={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 _d(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Ay[e.type]:t==="textarea"}function Ed(e,t,n,a){Wa?el?el.push(a):el=[a]:Wa=a,t=Ji(t,"onChange"),0<t.length&&(n=new ii("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var Jl=null,Fl=null;function Ny(e){im(e,0)}function oi(e){var t=Xl(e);if(ld(t))return e}function bd(e,t){if(e==="change")return t}var jd=!1;if(jn){var eo;if(jn){var to="oninput"in document;if(!to){var Cd=document.createElement("div");Cd.setAttribute("oninput","return;"),to=typeof Cd.oninput=="function"}eo=to}else eo=!1;jd=eo&&(!document.documentMode||9<document.documentMode)}function Ad(){Jl&&(Jl.detachEvent("onpropertychange",Nd),Fl=Jl=null)}function Nd(e){if(e.propertyName==="value"&&oi(Fl)){var t=[];Ed(t,Fl,e,Ir(e)),dd(Ny,t)}}function wy(e,t,n){e==="focusin"?(Ad(),Jl=t,Fl=n,Jl.attachEvent("onpropertychange",Nd)):e==="focusout"&&Ad()}function Ry(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return oi(Fl)}function Oy(e,t){if(e==="click")return oi(t)}function zy(e,t){if(e==="input"||e==="change")return oi(t)}function Dy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ut=typeof Object.is=="function"?Object.is:Dy;function Pl(e,t){if(Ut(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var c=n[a];if(!hn.call(t,c)||!Ut(e[c],t[c]))return!1}return!0}function wd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Rd(e,t){var n=wd(e);e=0;for(var a;n;){if(n.nodeType===3){if(a=e+n.textContent.length,e<=t&&a>=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=wd(n)}}function Od(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Od(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function zd(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ti(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ti(e.document)}return t}function no(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 ky=jn&&"documentMode"in document&&11>=document.documentMode,nl=null,ao=null,Wl=null,lo=!1;function Dd(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;lo||nl==null||nl!==ti(a)||(a=nl,"selectionStart"in a&&no(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}),Wl&&Pl(Wl,a)||(Wl=a,a=Ji(ao,"onSelect"),0<a.length&&(t=new ii("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=nl)))}function Ca(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var al={animationend:Ca("Animation","AnimationEnd"),animationiteration:Ca("Animation","AnimationIteration"),animationstart:Ca("Animation","AnimationStart"),transitionrun:Ca("Transition","TransitionRun"),transitionstart:Ca("Transition","TransitionStart"),transitioncancel:Ca("Transition","TransitionCancel"),transitionend:Ca("Transition","TransitionEnd")},so={},kd={};jn&&(kd=document.createElement("div").style,"AnimationEvent"in window||(delete al.animationend.animation,delete al.animationiteration.animation,delete al.animationstart.animation),"TransitionEvent"in window||delete al.transitionend.transition);function Aa(e){if(so[e])return so[e];if(!al[e])return e;var t=al[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in kd)return so[e]=t[n];return e}var Md=Aa("animationend"),Ud=Aa("animationiteration"),Bd=Aa("animationstart"),My=Aa("transitionrun"),Uy=Aa("transitionstart"),By=Aa("transitioncancel"),Ld=Aa("transitionend"),Hd=new Map,io="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(" ");io.push("scrollEnd");function rn(e,t){Hd.set(e,t),ba(t,[e])}var ci=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)},$t=[],ll=0,ro=0;function ui(){for(var e=ll,t=ro=ll=0;t<e;){var n=$t[t];$t[t++]=null;var a=$t[t];$t[t++]=null;var c=$t[t];$t[t++]=null;var u=$t[t];if($t[t++]=null,a!==null&&c!==null){var h=a.pending;h===null?c.next=c:(c.next=h.next,h.next=c),a.pending=c}u!==0&&qd(n,c,u)}}function di(e,t,n,a){$t[ll++]=e,$t[ll++]=t,$t[ll++]=n,$t[ll++]=a,ro|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function oo(e,t,n,a){return di(e,t,n,a),fi(e)}function Na(e,t){return di(e,null,null,t),fi(e)}function qd(e,t,n){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n);for(var c=!1,u=e.return;u!==null;)u.childLanes|=n,a=u.alternate,a!==null&&(a.childLanes|=n),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(c=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,c&&t!==null&&(c=31-Mt(n),e=u.hiddenUpdates,a=e[c],a===null?e[c]=[t]:a.push(t),t.lane=n|536870912),u):null}function fi(e){if(50<Ss)throw Ss=0,vc=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var sl={};function Ly(e,t,n,a){this.tag=e,this.key=n,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 Bt(e,t,n,a){return new Ly(e,t,n,a)}function co(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Cn(e,t){var n=e.alternate;return n===null?(n=Bt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Gd(e,t){e.flags&=65011714;var n=e.alternate;return n===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=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function hi(e,t,n,a,c,u){var h=0;if(a=e,typeof e=="function")co(e)&&(h=1);else if(typeof e=="string")h=Vv(e,n,ee.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ie:return e=Bt(31,n,t,c),e.elementType=ie,e.lanes=u,e;case w:return wa(n.children,c,u,t);case k:h=8,c|=24;break;case q:return e=Bt(12,n,t,c|2),e.elementType=q,e.lanes=u,e;case O:return e=Bt(13,n,t,c),e.elementType=O,e.lanes=u,e;case L:return e=Bt(19,n,t,c),e.elementType=L,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case $:h=10;break e;case Q:h=9;break e;case ae:h=11;break e;case U:h=14;break e;case F:h=16,a=null;break e}h=29,n=Error(o(130,e===null?"null":typeof e,"")),a=null}return t=Bt(h,n,t,c),t.elementType=e,t.type=a,t.lanes=u,t}function wa(e,t,n,a){return e=Bt(7,e,a,t),e.lanes=n,e}function uo(e,t,n){return e=Bt(6,e,null,t),e.lanes=n,e}function Yd(e){var t=Bt(18,null,null,0);return t.stateNode=e,t}function fo(e,t,n){return t=Bt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Vd=new WeakMap;function Jt(e,t){if(typeof e=="object"&&e!==null){var n=Vd.get(e);return n!==void 0?n:(t={value:e,source:t,stack:xa(t)},Vd.set(e,t),t)}return{value:e,source:t,stack:xa(t)}}var il=[],rl=0,mi=null,es=0,Ft=[],Pt=0,Kn=null,mn=1,pn="";function An(e,t){il[rl++]=es,il[rl++]=mi,mi=e,es=t}function Xd(e,t,n){Ft[Pt++]=mn,Ft[Pt++]=pn,Ft[Pt++]=Kn,Kn=e;var a=mn;e=pn;var c=32-Mt(a)-1;a&=~(1<<c),n+=1;var u=32-Mt(t)+c;if(30<u){var h=c-c%5;u=(a&(1<<h)-1).toString(32),a>>=h,c-=h,mn=1<<32-Mt(t)+c|n<<c|a,pn=u+e}else mn=1<<u|n<<c|a,pn=e}function ho(e){e.return!==null&&(An(e,1),Xd(e,1,0))}function mo(e){for(;e===mi;)mi=il[--rl],il[rl]=null,es=il[--rl],il[rl]=null;for(;e===Kn;)Kn=Ft[--Pt],Ft[Pt]=null,pn=Ft[--Pt],Ft[Pt]=null,mn=Ft[--Pt],Ft[Pt]=null}function Id(e,t){Ft[Pt++]=mn,Ft[Pt++]=pn,Ft[Pt++]=Kn,mn=t.id,pn=t.overflow,Kn=e}var pt=null,Qe=null,ze=!1,Zn=null,Wt=!1,po=Error(o(519));function $n(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ts(Jt(t,e)),po}function Qd(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[mt]=e,t[jt]=a,n){case"dialog":we("cancel",t),we("close",t);break;case"iframe":case"object":case"embed":we("load",t);break;case"video":case"audio":for(n=0;n<Es.length;n++)we(Es[n],t);break;case"source":we("error",t);break;case"img":case"image":case"link":we("error",t),we("load",t);break;case"details":we("toggle",t);break;case"input":we("invalid",t),sd(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":we("invalid",t);break;case"textarea":we("invalid",t),rd(t,a.value,a.defaultValue,a.children)}n=a.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||a.suppressHydrationWarning===!0||um(t.textContent,n)?(a.popover!=null&&(we("beforetoggle",t),we("toggle",t)),a.onScroll!=null&&we("scroll",t),a.onScrollEnd!=null&&we("scrollend",t),a.onClick!=null&&(t.onclick=bn),t=!0):t=!1,t||$n(e,!0)}function Kd(e){for(pt=e.return;pt;)switch(pt.tag){case 5:case 31:case 13:Wt=!1;return;case 27:case 3:Wt=!0;return;default:pt=pt.return}}function ol(e){if(e!==pt)return!1;if(!ze)return Kd(e),ze=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Dc(e.type,e.memoizedProps)),n=!n),n&&Qe&&$n(e),Kd(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Qe=xm(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Qe=xm(e)}else t===27?(t=Qe,ca(e.type)?(e=Lc,Lc=null,Qe=e):Qe=t):Qe=pt?tn(e.stateNode.nextSibling):null;return!0}function Ra(){Qe=pt=null,ze=!1}function go(){var e=Zn;return e!==null&&(Rt===null?Rt=e:Rt.push.apply(Rt,e),Zn=null),e}function ts(e){Zn===null?Zn=[e]:Zn.push(e)}var yo=N(null),Oa=null,Nn=null;function Jn(e,t,n){J(yo,t._currentValue),t._currentValue=n}function wn(e){e._currentValue=yo.current,X(yo)}function vo(e,t,n){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===n)break;e=e.return}}function xo(e,t,n,a){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var u=c.dependencies;if(u!==null){var h=c.child;u=u.firstContext;e:for(;u!==null;){var x=u;u=c;for(var C=0;C<t.length;C++)if(x.context===t[C]){u.lanes|=n,x=u.alternate,x!==null&&(x.lanes|=n),vo(u.return,n,e),a||(h=null);break e}u=x.next}}else if(c.tag===18){if(h=c.return,h===null)throw Error(o(341));h.lanes|=n,u=h.alternate,u!==null&&(u.lanes|=n),vo(h,n,e),h=null}else h=c.child;if(h!==null)h.return=c;else for(h=c;h!==null;){if(h===e){h=null;break}if(c=h.sibling,c!==null){c.return=h.return,h=c;break}h=h.return}c=h}}function cl(e,t,n,a){e=null;for(var c=t,u=!1;c!==null;){if(!u){if((c.flags&524288)!==0)u=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var h=c.alternate;if(h===null)throw Error(o(387));if(h=h.memoizedProps,h!==null){var x=c.type;Ut(c.pendingProps.value,h.value)||(e!==null?e.push(x):e=[x])}}else if(c===Ce.current){if(h=c.alternate,h===null)throw Error(o(387));h.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(Ns):e=[Ns])}c=c.return}e!==null&&xo(t,e,n,a),t.flags|=262144}function pi(e){for(e=e.firstContext;e!==null;){if(!Ut(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function za(e){Oa=e,Nn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function gt(e){return Zd(Oa,e)}function gi(e,t){return Oa===null&&za(e),Zd(e,t)}function Zd(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Nn===null){if(e===null)throw Error(o(308));Nn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Nn=Nn.next=t;return n}var Hy=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},qy=s.unstable_scheduleCallback,Gy=s.unstable_NormalPriority,lt={$$typeof:$,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function To(){return{controller:new Hy,data:new Map,refCount:0}}function ns(e){e.refCount--,e.refCount===0&&qy(Gy,function(){e.controller.abort()})}var as=null,So=0,ul=0,dl=null;function Yy(e,t){if(as===null){var n=as=[];So=0,ul=bc(),dl={status:"pending",value:void 0,then:function(a){n.push(a)}}}return So++,t.then($d,$d),t}function $d(){if(--So===0&&as!==null){dl!==null&&(dl.status="fulfilled");var e=as;as=null,ul=0,dl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Vy(e,t){var n=[],a={status:"pending",value:null,reason:null,then:function(c){n.push(c)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var c=0;c<n.length;c++)(0,n[c])(t)},function(c){for(a.status="rejected",a.reason=c,c=0;c<n.length;c++)(0,n[c])(void 0)}),a}var Jd=H.S;H.S=function(e,t){kh=_t(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Yy(e,t),Jd!==null&&Jd(e,t)};var Da=N(null);function _o(){var e=Da.current;return e!==null?e:Ye.pooledCache}function yi(e,t){t===null?J(Da,Da.current):J(Da,t.pool)}function Fd(){var e=_o();return e===null?null:{parent:lt._currentValue,pool:e}}var fl=Error(o(460)),Eo=Error(o(474)),vi=Error(o(542)),xi={then:function(){}};function Pd(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Wd(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(bn,bn),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,tf(e),e;default:if(typeof t.status=="string")t.then(bn,bn);else{if(e=Ye,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=a}},function(a){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,tf(e),e}throw Ma=t,fl}}function ka(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Ma=n,fl):n}}var Ma=null;function ef(){if(Ma===null)throw Error(o(459));var e=Ma;return Ma=null,e}function tf(e){if(e===fl||e===vi)throw Error(o(483))}var hl=null,ls=0;function Ti(e){var t=ls;return ls+=1,hl===null&&(hl=[]),Wd(hl,e,t)}function ss(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Si(e,t){throw t.$$typeof===j?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function nf(e){function t(R,A){if(e){var z=R.deletions;z===null?(R.deletions=[A],R.flags|=16):z.push(A)}}function n(R,A){if(!e)return null;for(;A!==null;)t(R,A),A=A.sibling;return null}function a(R){for(var A=new Map;R!==null;)R.key!==null?A.set(R.key,R):A.set(R.index,R),R=R.sibling;return A}function c(R,A){return R=Cn(R,A),R.index=0,R.sibling=null,R}function u(R,A,z){return R.index=z,e?(z=R.alternate,z!==null?(z=z.index,z<A?(R.flags|=67108866,A):z):(R.flags|=67108866,A)):(R.flags|=1048576,A)}function h(R){return e&&R.alternate===null&&(R.flags|=67108866),R}function x(R,A,z,Y){return A===null||A.tag!==6?(A=uo(z,R.mode,Y),A.return=R,A):(A=c(A,z),A.return=R,A)}function C(R,A,z,Y){var ue=z.type;return ue===w?G(R,A,z.props.children,Y,z.key):A!==null&&(A.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===F&&ka(ue)===A.type)?(A=c(A,z.props),ss(A,z),A.return=R,A):(A=hi(z.type,z.key,z.props,null,R.mode,Y),ss(A,z),A.return=R,A)}function D(R,A,z,Y){return A===null||A.tag!==4||A.stateNode.containerInfo!==z.containerInfo||A.stateNode.implementation!==z.implementation?(A=fo(z,R.mode,Y),A.return=R,A):(A=c(A,z.children||[]),A.return=R,A)}function G(R,A,z,Y,ue){return A===null||A.tag!==7?(A=wa(z,R.mode,Y,ue),A.return=R,A):(A=c(A,z),A.return=R,A)}function I(R,A,z){if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return A=uo(""+A,R.mode,z),A.return=R,A;if(typeof A=="object"&&A!==null){switch(A.$$typeof){case E:return z=hi(A.type,A.key,A.props,null,R.mode,z),ss(z,A),z.return=R,z;case b:return A=fo(A,R.mode,z),A.return=R,A;case F:return A=ka(A),I(R,A,z)}if(Xe(A)||be(A))return A=wa(A,R.mode,z,null),A.return=R,A;if(typeof A.then=="function")return I(R,Ti(A),z);if(A.$$typeof===$)return I(R,gi(R,A),z);Si(R,A)}return null}function M(R,A,z,Y){var ue=A!==null?A.key:null;if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return ue!==null?null:x(R,A,""+z,Y);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case E:return z.key===ue?C(R,A,z,Y):null;case b:return z.key===ue?D(R,A,z,Y):null;case F:return z=ka(z),M(R,A,z,Y)}if(Xe(z)||be(z))return ue!==null?null:G(R,A,z,Y,null);if(typeof z.then=="function")return M(R,A,Ti(z),Y);if(z.$$typeof===$)return M(R,A,gi(R,z),Y);Si(R,z)}return null}function B(R,A,z,Y,ue){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return R=R.get(z)||null,x(A,R,""+Y,ue);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case E:return R=R.get(Y.key===null?z:Y.key)||null,C(A,R,Y,ue);case b:return R=R.get(Y.key===null?z:Y.key)||null,D(A,R,Y,ue);case F:return Y=ka(Y),B(R,A,z,Y,ue)}if(Xe(Y)||be(Y))return R=R.get(z)||null,G(A,R,Y,ue,null);if(typeof Y.then=="function")return B(R,A,z,Ti(Y),ue);if(Y.$$typeof===$)return B(R,A,z,gi(A,Y),ue);Si(A,Y)}return null}function le(R,A,z,Y){for(var ue=null,ke=null,se=A,_e=A=0,Oe=null;se!==null&&_e<z.length;_e++){se.index>_e?(Oe=se,se=null):Oe=se.sibling;var Me=M(R,se,z[_e],Y);if(Me===null){se===null&&(se=Oe);break}e&&se&&Me.alternate===null&&t(R,se),A=u(Me,A,_e),ke===null?ue=Me:ke.sibling=Me,ke=Me,se=Oe}if(_e===z.length)return n(R,se),ze&&An(R,_e),ue;if(se===null){for(;_e<z.length;_e++)se=I(R,z[_e],Y),se!==null&&(A=u(se,A,_e),ke===null?ue=se:ke.sibling=se,ke=se);return ze&&An(R,_e),ue}for(se=a(se);_e<z.length;_e++)Oe=B(se,R,_e,z[_e],Y),Oe!==null&&(e&&Oe.alternate!==null&&se.delete(Oe.key===null?_e:Oe.key),A=u(Oe,A,_e),ke===null?ue=Oe:ke.sibling=Oe,ke=Oe);return e&&se.forEach(function(ma){return t(R,ma)}),ze&&An(R,_e),ue}function me(R,A,z,Y){if(z==null)throw Error(o(151));for(var ue=null,ke=null,se=A,_e=A=0,Oe=null,Me=z.next();se!==null&&!Me.done;_e++,Me=z.next()){se.index>_e?(Oe=se,se=null):Oe=se.sibling;var ma=M(R,se,Me.value,Y);if(ma===null){se===null&&(se=Oe);break}e&&se&&ma.alternate===null&&t(R,se),A=u(ma,A,_e),ke===null?ue=ma:ke.sibling=ma,ke=ma,se=Oe}if(Me.done)return n(R,se),ze&&An(R,_e),ue;if(se===null){for(;!Me.done;_e++,Me=z.next())Me=I(R,Me.value,Y),Me!==null&&(A=u(Me,A,_e),ke===null?ue=Me:ke.sibling=Me,ke=Me);return ze&&An(R,_e),ue}for(se=a(se);!Me.done;_e++,Me=z.next())Me=B(se,R,_e,Me.value,Y),Me!==null&&(e&&Me.alternate!==null&&se.delete(Me.key===null?_e:Me.key),A=u(Me,A,_e),ke===null?ue=Me:ke.sibling=Me,ke=Me);return e&&se.forEach(function(ex){return t(R,ex)}),ze&&An(R,_e),ue}function Ge(R,A,z,Y){if(typeof z=="object"&&z!==null&&z.type===w&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case E:e:{for(var ue=z.key;A!==null;){if(A.key===ue){if(ue=z.type,ue===w){if(A.tag===7){n(R,A.sibling),Y=c(A,z.props.children),Y.return=R,R=Y;break e}}else if(A.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===F&&ka(ue)===A.type){n(R,A.sibling),Y=c(A,z.props),ss(Y,z),Y.return=R,R=Y;break e}n(R,A);break}else t(R,A);A=A.sibling}z.type===w?(Y=wa(z.props.children,R.mode,Y,z.key),Y.return=R,R=Y):(Y=hi(z.type,z.key,z.props,null,R.mode,Y),ss(Y,z),Y.return=R,R=Y)}return h(R);case b:e:{for(ue=z.key;A!==null;){if(A.key===ue)if(A.tag===4&&A.stateNode.containerInfo===z.containerInfo&&A.stateNode.implementation===z.implementation){n(R,A.sibling),Y=c(A,z.children||[]),Y.return=R,R=Y;break e}else{n(R,A);break}else t(R,A);A=A.sibling}Y=fo(z,R.mode,Y),Y.return=R,R=Y}return h(R);case F:return z=ka(z),Ge(R,A,z,Y)}if(Xe(z))return le(R,A,z,Y);if(be(z)){if(ue=be(z),typeof ue!="function")throw Error(o(150));return z=ue.call(z),me(R,A,z,Y)}if(typeof z.then=="function")return Ge(R,A,Ti(z),Y);if(z.$$typeof===$)return Ge(R,A,gi(R,z),Y);Si(R,z)}return typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint"?(z=""+z,A!==null&&A.tag===6?(n(R,A.sibling),Y=c(A,z),Y.return=R,R=Y):(n(R,A),Y=uo(z,R.mode,Y),Y.return=R,R=Y),h(R)):n(R,A)}return function(R,A,z,Y){try{ls=0;var ue=Ge(R,A,z,Y);return hl=null,ue}catch(se){if(se===fl||se===vi)throw se;var ke=Bt(29,se,null,R.mode);return ke.lanes=Y,ke.return=R,ke}}}var Ua=nf(!0),af=nf(!1),Fn=!1;function bo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function jo(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 Pn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Wn(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Ue&2)!==0){var c=a.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),a.pending=t,t=fi(e),qd(e,null,n),t}return di(e,a,t,n),fi(e)}function is(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,Zu(e,n)}}function Co(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var c=null,u=null;if(n=n.firstBaseUpdate,n!==null){do{var h={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};u===null?c=u=h:u=u.next=h,n=n.next}while(n!==null);u===null?c=u=t:u=u.next=t}else c=u=t;n={baseState:a.baseState,firstBaseUpdate:c,lastBaseUpdate:u,shared:a.shared,callbacks:a.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ao=!1;function rs(){if(Ao){var e=dl;if(e!==null)throw e}}function os(e,t,n,a){Ao=!1;var c=e.updateQueue;Fn=!1;var u=c.firstBaseUpdate,h=c.lastBaseUpdate,x=c.shared.pending;if(x!==null){c.shared.pending=null;var C=x,D=C.next;C.next=null,h===null?u=D:h.next=D,h=C;var G=e.alternate;G!==null&&(G=G.updateQueue,x=G.lastBaseUpdate,x!==h&&(x===null?G.firstBaseUpdate=D:x.next=D,G.lastBaseUpdate=C))}if(u!==null){var I=c.baseState;h=0,G=D=C=null,x=u;do{var M=x.lane&-536870913,B=M!==x.lane;if(B?(Re&M)===M:(a&M)===M){M!==0&&M===ul&&(Ao=!0),G!==null&&(G=G.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var le=e,me=x;M=t;var Ge=n;switch(me.tag){case 1:if(le=me.payload,typeof le=="function"){I=le.call(Ge,I,M);break e}I=le;break e;case 3:le.flags=le.flags&-65537|128;case 0:if(le=me.payload,M=typeof le=="function"?le.call(Ge,I,M):le,M==null)break e;I=S({},I,M);break e;case 2:Fn=!0}}M=x.callback,M!==null&&(e.flags|=64,B&&(e.flags|=8192),B=c.callbacks,B===null?c.callbacks=[M]:B.push(M))}else B={lane:M,tag:x.tag,payload:x.payload,callback:x.callback,next:null},G===null?(D=G=B,C=I):G=G.next=B,h|=M;if(x=x.next,x===null){if(x=c.shared.pending,x===null)break;B=x,x=B.next,B.next=null,c.lastBaseUpdate=B,c.shared.pending=null}}while(!0);G===null&&(C=I),c.baseState=C,c.firstBaseUpdate=D,c.lastBaseUpdate=G,u===null&&(c.shared.lanes=0),la|=h,e.lanes=h,e.memoizedState=I}}function lf(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function sf(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)lf(n[e],t)}var ml=N(null),_i=N(0);function rf(e,t){e=Ln,J(_i,e),J(ml,t),Ln=e|t.baseLanes}function No(){J(_i,Ln),J(ml,ml.current)}function wo(){Ln=_i.current,X(ml),X(_i)}var Lt=N(null),en=null;function ea(e){var t=e.alternate;J(tt,tt.current&1),J(Lt,e),en===null&&(t===null||ml.current!==null||t.memoizedState!==null)&&(en=e)}function Ro(e){J(tt,tt.current),J(Lt,e),en===null&&(en=e)}function of(e){e.tag===22?(J(tt,tt.current),J(Lt,e),en===null&&(en=e)):ta()}function ta(){J(tt,tt.current),J(Lt,Lt.current)}function Ht(e){X(Lt),en===e&&(en=null),X(tt)}var tt=N(0);function Ei(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Uc(n)||Bc(n)))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 Rn=0,Te=null,He=null,st=null,bi=!1,pl=!1,Ba=!1,ji=0,cs=0,gl=null,Xy=0;function Pe(){throw Error(o(321))}function Oo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ut(e[n],t[n]))return!1;return!0}function zo(e,t,n,a,c,u){return Rn=u,Te=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,H.H=e===null||e.memoizedState===null?If:Ko,Ba=!1,u=n(a,c),Ba=!1,pl&&(u=uf(t,n,a,c)),cf(e),u}function cf(e){H.H=fs;var t=He!==null&&He.next!==null;if(Rn=0,st=He=Te=null,bi=!1,cs=0,gl=null,t)throw Error(o(300));e===null||it||(e=e.dependencies,e!==null&&pi(e)&&(it=!0))}function uf(e,t,n,a){Te=e;var c=0;do{if(pl&&(gl=null),cs=0,pl=!1,25<=c)throw Error(o(301));if(c+=1,st=He=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}H.H=Qf,u=t(n,a)}while(pl);return u}function Iy(){var e=H.H,t=e.useState()[0];return t=typeof t.then=="function"?us(t):t,e=e.useState()[0],(He!==null?He.memoizedState:null)!==e&&(Te.flags|=1024),t}function Do(){var e=ji!==0;return ji=0,e}function ko(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Mo(e){if(bi){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}bi=!1}Rn=0,st=He=Te=null,pl=!1,cs=ji=0,gl=null}function Et(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return st===null?Te.memoizedState=st=e:st=st.next=e,st}function nt(){if(He===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=He.next;var t=st===null?Te.memoizedState:st.next;if(t!==null)st=t,He=e;else{if(e===null)throw Te.alternate===null?Error(o(467)):Error(o(310));He=e,e={memoizedState:He.memoizedState,baseState:He.baseState,baseQueue:He.baseQueue,queue:He.queue,next:null},st===null?Te.memoizedState=st=e:st=st.next=e}return st}function Ci(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function us(e){var t=cs;return cs+=1,gl===null&&(gl=[]),e=Wd(gl,e,t),t=Te,(st===null?t.memoizedState:st.next)===null&&(t=t.alternate,H.H=t===null||t.memoizedState===null?If:Ko),e}function Ai(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return us(e);if(e.$$typeof===$)return gt(e)}throw Error(o(438,String(e)))}function Uo(e){var t=null,n=Te.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=Te.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Ci(),Te.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),a=0;a<e;a++)n[a]=te;return t.index++,n}function On(e,t){return typeof t=="function"?t(e):t}function Ni(e){var t=nt();return Bo(t,He,e)}function Bo(e,t,n){var a=e.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=n;var c=e.baseQueue,u=a.pending;if(u!==null){if(c!==null){var h=c.next;c.next=u.next,u.next=h}t.baseQueue=c=u,a.pending=null}if(u=e.baseState,c===null)e.memoizedState=u;else{t=c.next;var x=h=null,C=null,D=t,G=!1;do{var I=D.lane&-536870913;if(I!==D.lane?(Re&I)===I:(Rn&I)===I){var M=D.revertLane;if(M===0)C!==null&&(C=C.next={lane:0,revertLane:0,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),I===ul&&(G=!0);else if((Rn&M)===M){D=D.next,M===ul&&(G=!0);continue}else I={lane:0,revertLane:D.revertLane,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},C===null?(x=C=I,h=u):C=C.next=I,Te.lanes|=M,la|=M;I=D.action,Ba&&n(u,I),u=D.hasEagerState?D.eagerState:n(u,I)}else M={lane:I,revertLane:D.revertLane,gesture:D.gesture,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},C===null?(x=C=M,h=u):C=C.next=M,Te.lanes|=I,la|=I;D=D.next}while(D!==null&&D!==t);if(C===null?h=u:C.next=x,!Ut(u,e.memoizedState)&&(it=!0,G&&(n=dl,n!==null)))throw n;e.memoizedState=u,e.baseState=h,e.baseQueue=C,a.lastRenderedState=u}return c===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Lo(e){var t=nt(),n=t.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=e;var a=n.dispatch,c=n.pending,u=t.memoizedState;if(c!==null){n.pending=null;var h=c=c.next;do u=e(u,h.action),h=h.next;while(h!==c);Ut(u,t.memoizedState)||(it=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),n.lastRenderedState=u}return[u,a]}function df(e,t,n){var a=Te,c=nt(),u=ze;if(u){if(n===void 0)throw Error(o(407));n=n()}else n=t();var h=!Ut((He||c).memoizedState,n);if(h&&(c.memoizedState=n,it=!0),c=c.queue,Go(mf.bind(null,a,c,e),[e]),c.getSnapshot!==t||h||st!==null&&st.memoizedState.tag&1){if(a.flags|=2048,yl(9,{destroy:void 0},hf.bind(null,a,c,n,t),null),Ye===null)throw Error(o(349));u||(Rn&127)!==0||ff(a,t,n)}return n}function ff(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Te.updateQueue,t===null?(t=Ci(),Te.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function hf(e,t,n,a){t.value=n,t.getSnapshot=a,pf(t)&&gf(e)}function mf(e,t,n){return n(function(){pf(t)&&gf(e)})}function pf(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ut(e,n)}catch{return!0}}function gf(e){var t=Na(e,2);t!==null&&Ot(t,e,2)}function Ho(e){var t=Et();if(typeof e=="function"){var n=e;if(e=n(),Ba){ut(!0);try{n()}finally{ut(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:On,lastRenderedState:e},t}function yf(e,t,n,a){return e.baseState=n,Bo(e,He,typeof a=="function"?a:On)}function Qy(e,t,n,a,c){if(Oi(e))throw Error(o(485));if(e=t.action,e!==null){var u={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(h){u.listeners.push(h)}};H.T!==null?n(!0):u.isTransition=!1,a(u),n=t.pending,n===null?(u.next=t.pending=u,vf(t,u)):(u.next=n.next,t.pending=n.next=u)}}function vf(e,t){var n=t.action,a=t.payload,c=e.state;if(t.isTransition){var u=H.T,h={};H.T=h;try{var x=n(c,a),C=H.S;C!==null&&C(h,x),xf(e,t,x)}catch(D){qo(e,t,D)}finally{u!==null&&h.types!==null&&(u.types=h.types),H.T=u}}else try{u=n(c,a),xf(e,t,u)}catch(D){qo(e,t,D)}}function xf(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){Tf(e,t,a)},function(a){return qo(e,t,a)}):Tf(e,t,n)}function Tf(e,t,n){t.status="fulfilled",t.value=n,Sf(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,vf(e,n)))}function qo(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,Sf(t),t=t.next;while(t!==a)}e.action=null}function Sf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function _f(e,t){return t}function Ef(e,t){if(ze){var n=Ye.formState;if(n!==null){e:{var a=Te;if(ze){if(Qe){t:{for(var c=Qe,u=Wt;c.nodeType!==8;){if(!u){c=null;break t}if(c=tn(c.nextSibling),c===null){c=null;break t}}u=c.data,c=u==="F!"||u==="F"?c:null}if(c){Qe=tn(c.nextSibling),a=c.data==="F!";break e}}$n(a)}a=!1}a&&(t=n[0])}}return n=Et(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_f,lastRenderedState:t},n.queue=a,n=Yf.bind(null,Te,a),a.dispatch=n,a=Ho(!1),u=Qo.bind(null,Te,!1,a.queue),a=Et(),c={state:t,dispatch:null,action:e,pending:null},a.queue=c,n=Qy.bind(null,Te,c,u,n),c.dispatch=n,a.memoizedState=e,[t,n,!1]}function bf(e){var t=nt();return jf(t,He,e)}function jf(e,t,n){if(t=Bo(e,t,_f)[0],e=Ni(On)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=us(t)}catch(h){throw h===fl?vi:h}else a=t;t=nt();var c=t.queue,u=c.dispatch;return n!==t.memoizedState&&(Te.flags|=2048,yl(9,{destroy:void 0},Ky.bind(null,c,n),null)),[a,u,e]}function Ky(e,t){e.action=t}function Cf(e){var t=nt(),n=He;if(n!==null)return jf(t,n,e);nt(),t=t.memoizedState,n=nt();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function yl(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=Te.updateQueue,t===null&&(t=Ci(),Te.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(a=n.next,n.next=e,e.next=a,t.lastEffect=e),e}function Af(){return nt().memoizedState}function wi(e,t,n,a){var c=Et();Te.flags|=e,c.memoizedState=yl(1|t,{destroy:void 0},n,a===void 0?null:a)}function Ri(e,t,n,a){var c=nt();a=a===void 0?null:a;var u=c.memoizedState.inst;He!==null&&a!==null&&Oo(a,He.memoizedState.deps)?c.memoizedState=yl(t,u,n,a):(Te.flags|=e,c.memoizedState=yl(1|t,u,n,a))}function Nf(e,t){wi(8390656,8,e,t)}function Go(e,t){Ri(2048,8,e,t)}function Zy(e){Te.flags|=4;var t=Te.updateQueue;if(t===null)t=Ci(),Te.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function wf(e){var t=nt().memoizedState;return Zy({ref:t,nextImpl:e}),function(){if((Ue&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function Rf(e,t){return Ri(4,2,e,t)}function Of(e,t){return Ri(4,4,e,t)}function zf(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Df(e,t,n){n=n!=null?n.concat([e]):null,Ri(4,4,zf.bind(null,t,e),n)}function Yo(){}function kf(e,t){var n=nt();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&Oo(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function Mf(e,t){var n=nt();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&Oo(t,a[1]))return a[0];if(a=e(),Ba){ut(!0);try{e()}finally{ut(!1)}}return n.memoizedState=[a,t],a}function Vo(e,t,n){return n===void 0||(Rn&1073741824)!==0&&(Re&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Uh(),Te.lanes|=e,la|=e,n)}function Uf(e,t,n,a){return Ut(n,t)?n:ml.current!==null?(e=Vo(e,n,a),Ut(e,t)||(it=!0),e):(Rn&42)===0||(Rn&1073741824)!==0&&(Re&261930)===0?(it=!0,e.memoizedState=n):(e=Uh(),Te.lanes|=e,la|=e,t)}function Bf(e,t,n,a,c){var u=P.p;P.p=u!==0&&8>u?u:8;var h=H.T,x={};H.T=x,Qo(e,!1,t,n);try{var C=c(),D=H.S;if(D!==null&&D(x,C),C!==null&&typeof C=="object"&&typeof C.then=="function"){var G=Vy(C,a);ds(e,t,G,Yt(e))}else ds(e,t,a,Yt(e))}catch(I){ds(e,t,{then:function(){},status:"rejected",reason:I},Yt())}finally{P.p=u,h!==null&&x.types!==null&&(h.types=x.types),H.T=h}}function $y(){}function Xo(e,t,n,a){if(e.tag!==5)throw Error(o(476));var c=Lf(e).queue;Bf(e,c,t,ne,n===null?$y:function(){return Hf(e),n(a)})}function Lf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:On,lastRenderedState:ne},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:On,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Hf(e){var t=Lf(e);t.next===null&&(t=e.alternate.memoizedState),ds(e,t.next.queue,{},Yt())}function Io(){return gt(Ns)}function qf(){return nt().memoizedState}function Gf(){return nt().memoizedState}function Jy(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Yt();e=Pn(n);var a=Wn(t,e,n);a!==null&&(Ot(a,t,n),is(a,t,n)),t={cache:To()},e.payload=t;return}t=t.return}}function Fy(e,t,n){var a=Yt();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Oi(e)?Vf(t,n):(n=oo(e,t,n,a),n!==null&&(Ot(n,e,a),Xf(n,t,a)))}function Yf(e,t,n){var a=Yt();ds(e,t,n,a)}function ds(e,t,n,a){var c={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Oi(e))Vf(t,c);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var h=t.lastRenderedState,x=u(h,n);if(c.hasEagerState=!0,c.eagerState=x,Ut(x,h))return di(e,t,c,0),Ye===null&&ui(),!1}catch{}if(n=oo(e,t,c,a),n!==null)return Ot(n,e,a),Xf(n,t,a),!0}return!1}function Qo(e,t,n,a){if(a={lane:2,revertLane:bc(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Oi(e)){if(t)throw Error(o(479))}else t=oo(e,n,a,2),t!==null&&Ot(t,e,2)}function Oi(e){var t=e.alternate;return e===Te||t!==null&&t===Te}function Vf(e,t){pl=bi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Xf(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,Zu(e,n)}}var fs={readContext:gt,use:Ai,useCallback:Pe,useContext:Pe,useEffect:Pe,useImperativeHandle:Pe,useLayoutEffect:Pe,useInsertionEffect:Pe,useMemo:Pe,useReducer:Pe,useRef:Pe,useState:Pe,useDebugValue:Pe,useDeferredValue:Pe,useTransition:Pe,useSyncExternalStore:Pe,useId:Pe,useHostTransitionStatus:Pe,useFormState:Pe,useActionState:Pe,useOptimistic:Pe,useMemoCache:Pe,useCacheRefresh:Pe};fs.useEffectEvent=Pe;var If={readContext:gt,use:Ai,useCallback:function(e,t){return Et().memoizedState=[e,t===void 0?null:t],e},useContext:gt,useEffect:Nf,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,wi(4194308,4,zf.bind(null,t,e),n)},useLayoutEffect:function(e,t){return wi(4194308,4,e,t)},useInsertionEffect:function(e,t){wi(4,2,e,t)},useMemo:function(e,t){var n=Et();t=t===void 0?null:t;var a=e();if(Ba){ut(!0);try{e()}finally{ut(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=Et();if(n!==void 0){var c=n(t);if(Ba){ut(!0);try{n(t)}finally{ut(!1)}}}else c=t;return a.memoizedState=a.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},a.queue=e,e=e.dispatch=Fy.bind(null,Te,e),[a.memoizedState,e]},useRef:function(e){var t=Et();return e={current:e},t.memoizedState=e},useState:function(e){e=Ho(e);var t=e.queue,n=Yf.bind(null,Te,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Yo,useDeferredValue:function(e,t){var n=Et();return Vo(n,e,t)},useTransition:function(){var e=Ho(!1);return e=Bf.bind(null,Te,e.queue,!0,!1),Et().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=Te,c=Et();if(ze){if(n===void 0)throw Error(o(407));n=n()}else{if(n=t(),Ye===null)throw Error(o(349));(Re&127)!==0||ff(a,t,n)}c.memoizedState=n;var u={value:n,getSnapshot:t};return c.queue=u,Nf(mf.bind(null,a,u,e),[e]),a.flags|=2048,yl(9,{destroy:void 0},hf.bind(null,a,u,n,t),null),n},useId:function(){var e=Et(),t=Ye.identifierPrefix;if(ze){var n=pn,a=mn;n=(a&~(1<<32-Mt(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=ji++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=Xy++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Io,useFormState:Ef,useActionState:Ef,useOptimistic:function(e){var t=Et();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Qo.bind(null,Te,!0,n),n.dispatch=t,[e,t]},useMemoCache:Uo,useCacheRefresh:function(){return Et().memoizedState=Jy.bind(null,Te)},useEffectEvent:function(e){var t=Et(),n={impl:e};return t.memoizedState=n,function(){if((Ue&2)!==0)throw Error(o(440));return n.impl.apply(void 0,arguments)}}},Ko={readContext:gt,use:Ai,useCallback:kf,useContext:gt,useEffect:Go,useImperativeHandle:Df,useInsertionEffect:Rf,useLayoutEffect:Of,useMemo:Mf,useReducer:Ni,useRef:Af,useState:function(){return Ni(On)},useDebugValue:Yo,useDeferredValue:function(e,t){var n=nt();return Uf(n,He.memoizedState,e,t)},useTransition:function(){var e=Ni(On)[0],t=nt().memoizedState;return[typeof e=="boolean"?e:us(e),t]},useSyncExternalStore:df,useId:qf,useHostTransitionStatus:Io,useFormState:bf,useActionState:bf,useOptimistic:function(e,t){var n=nt();return yf(n,He,e,t)},useMemoCache:Uo,useCacheRefresh:Gf};Ko.useEffectEvent=wf;var Qf={readContext:gt,use:Ai,useCallback:kf,useContext:gt,useEffect:Go,useImperativeHandle:Df,useInsertionEffect:Rf,useLayoutEffect:Of,useMemo:Mf,useReducer:Lo,useRef:Af,useState:function(){return Lo(On)},useDebugValue:Yo,useDeferredValue:function(e,t){var n=nt();return He===null?Vo(n,e,t):Uf(n,He.memoizedState,e,t)},useTransition:function(){var e=Lo(On)[0],t=nt().memoizedState;return[typeof e=="boolean"?e:us(e),t]},useSyncExternalStore:df,useId:qf,useHostTransitionStatus:Io,useFormState:Cf,useActionState:Cf,useOptimistic:function(e,t){var n=nt();return He!==null?yf(n,He,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Uo,useCacheRefresh:Gf};Qf.useEffectEvent=wf;function Zo(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:S({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var $o={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=Yt(),c=Pn(a);c.payload=t,n!=null&&(c.callback=n),t=Wn(e,c,a),t!==null&&(Ot(t,e,a),is(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=Yt(),c=Pn(a);c.tag=1,c.payload=t,n!=null&&(c.callback=n),t=Wn(e,c,a),t!==null&&(Ot(t,e,a),is(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Yt(),a=Pn(n);a.tag=2,t!=null&&(a.callback=t),t=Wn(e,a,n),t!==null&&(Ot(t,e,n),is(t,e,n))}};function Kf(e,t,n,a,c,u,h){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,u,h):t.prototype&&t.prototype.isPureReactComponent?!Pl(n,a)||!Pl(c,u):!0}function Zf(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&$o.enqueueReplaceState(t,t.state,null)}function La(e,t){var n=t;if("ref"in t){n={};for(var a in t)a!=="ref"&&(n[a]=t[a])}if(e=e.defaultProps){n===t&&(n=S({},n));for(var c in e)n[c]===void 0&&(n[c]=e[c])}return n}function $f(e){ci(e)}function Jf(e){console.error(e)}function Ff(e){ci(e)}function zi(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Pf(e,t,n){try{var a=e.onCaughtError;a(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Jo(e,t,n){return n=Pn(n),n.tag=3,n.payload={element:null},n.callback=function(){zi(e,t)},n}function Wf(e){return e=Pn(e),e.tag=3,e}function eh(e,t,n,a){var c=n.type.getDerivedStateFromError;if(typeof c=="function"){var u=a.value;e.payload=function(){return c(u)},e.callback=function(){Pf(t,n,a)}}var h=n.stateNode;h!==null&&typeof h.componentDidCatch=="function"&&(e.callback=function(){Pf(t,n,a),typeof c!="function"&&(sa===null?sa=new Set([this]):sa.add(this));var x=a.stack;this.componentDidCatch(a.value,{componentStack:x!==null?x:""})})}function Py(e,t,n,a,c){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&cl(t,n,c,!0),n=Lt.current,n!==null){switch(n.tag){case 31:case 13:return en===null?Xi():n.alternate===null&&We===0&&(We=3),n.flags&=-257,n.flags|=65536,n.lanes=c,a===xi?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),Sc(e,a,c)),!1;case 22:return n.flags|=65536,a===xi?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([a]):n.add(a)),Sc(e,a,c)),!1}throw Error(o(435,n.tag))}return Sc(e,a,c),Xi(),!1}if(ze)return t=Lt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,a!==po&&(e=Error(o(422),{cause:a}),ts(Jt(e,n)))):(a!==po&&(t=Error(o(423),{cause:a}),ts(Jt(t,n))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,a=Jt(a,n),c=Jo(e.stateNode,a,c),Co(e,c),We!==4&&(We=2)),!1;var u=Error(o(520),{cause:a});if(u=Jt(u,n),Ts===null?Ts=[u]:Ts.push(u),We!==4&&(We=2),t===null)return!0;a=Jt(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=c&-c,n.lanes|=e,e=Jo(n.stateNode,a,e),Co(n,e),!1;case 1:if(t=n.type,u=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(sa===null||!sa.has(u))))return n.flags|=65536,c&=-c,n.lanes|=c,c=Wf(c),eh(c,e,n,a),Co(n,c),!1}n=n.return}while(n!==null);return!1}var Fo=Error(o(461)),it=!1;function yt(e,t,n,a){t.child=e===null?af(t,null,n,a):Ua(t,e.child,n,a)}function th(e,t,n,a,c){n=n.render;var u=t.ref;if("ref"in a){var h={};for(var x in a)x!=="ref"&&(h[x]=a[x])}else h=a;return za(t),a=zo(e,t,n,h,u,c),x=Do(),e!==null&&!it?(ko(e,t,c),zn(e,t,c)):(ze&&x&&ho(t),t.flags|=1,yt(e,t,a,c),t.child)}function nh(e,t,n,a,c){if(e===null){var u=n.type;return typeof u=="function"&&!co(u)&&u.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=u,ah(e,t,u,a,c)):(e=hi(n.type,null,a,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!sc(e,c)){var h=u.memoizedProps;if(n=n.compare,n=n!==null?n:Pl,n(h,a)&&e.ref===t.ref)return zn(e,t,c)}return t.flags|=1,e=Cn(u,a),e.ref=t.ref,e.return=t,t.child=e}function ah(e,t,n,a,c){if(e!==null){var u=e.memoizedProps;if(Pl(u,a)&&e.ref===t.ref)if(it=!1,t.pendingProps=a=u,sc(e,c))(e.flags&131072)!==0&&(it=!0);else return t.lanes=e.lanes,zn(e,t,c)}return Po(e,t,n,a,c)}function lh(e,t,n,a){var c=a.children,u=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(u=u!==null?u.baseLanes|n:n,e!==null){for(a=t.child=e.child,c=0;a!==null;)c=c|a.lanes|a.childLanes,a=a.sibling;a=c&~u}else a=0,t.child=null;return sh(e,t,u,n,a)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&yi(t,u!==null?u.cachePool:null),u!==null?rf(t,u):No(),of(t);else return a=t.lanes=536870912,sh(e,t,u!==null?u.baseLanes|n:n,n,a)}else u!==null?(yi(t,u.cachePool),rf(t,u),ta(),t.memoizedState=null):(e!==null&&yi(t,null),No(),ta());return yt(e,t,c,n),t.child}function hs(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function sh(e,t,n,a,c){var u=_o();return u=u===null?null:{parent:lt._currentValue,pool:u},t.memoizedState={baseLanes:n,cachePool:u},e!==null&&yi(t,null),No(),of(t),e!==null&&cl(e,t,a,!0),t.childLanes=c,null}function Di(e,t){return t=Mi({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function ih(e,t,n){return Ua(t,e.child,null,n),e=Di(t,t.pendingProps),e.flags|=2,Ht(t),t.memoizedState=null,e}function Wy(e,t,n){var a=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ze){if(a.mode==="hidden")return e=Di(t,a),t.lanes=536870912,hs(null,e);if(Ro(t),(e=Qe)?(e=vm(e,Wt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Kn!==null?{id:mn,overflow:pn}:null,retryLane:536870912,hydrationErrors:null},n=Yd(e),n.return=t,t.child=n,pt=t,Qe=null)):e=null,e===null)throw $n(t);return t.lanes=536870912,null}return Di(t,a)}var u=e.memoizedState;if(u!==null){var h=u.dehydrated;if(Ro(t),c)if(t.flags&256)t.flags&=-257,t=ih(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(it||cl(e,t,n,!1),c=(n&e.childLanes)!==0,it||c){if(a=Ye,a!==null&&(h=$u(a,n),h!==0&&h!==u.retryLane))throw u.retryLane=h,Na(e,h),Ot(a,e,h),Fo;Xi(),t=ih(e,t,n)}else e=u.treeContext,Qe=tn(h.nextSibling),pt=t,ze=!0,Zn=null,Wt=!1,e!==null&&Id(t,e),t=Di(t,a),t.flags|=4096;return t}return e=Cn(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ki(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(o(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Po(e,t,n,a,c){return za(t),n=zo(e,t,n,a,void 0,c),a=Do(),e!==null&&!it?(ko(e,t,c),zn(e,t,c)):(ze&&a&&ho(t),t.flags|=1,yt(e,t,n,c),t.child)}function rh(e,t,n,a,c,u){return za(t),t.updateQueue=null,n=uf(t,a,n,c),cf(e),a=Do(),e!==null&&!it?(ko(e,t,u),zn(e,t,u)):(ze&&a&&ho(t),t.flags|=1,yt(e,t,n,u),t.child)}function oh(e,t,n,a,c){if(za(t),t.stateNode===null){var u=sl,h=n.contextType;typeof h=="object"&&h!==null&&(u=gt(h)),u=new n(a,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=$o,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=a,u.state=t.memoizedState,u.refs={},bo(t),h=n.contextType,u.context=typeof h=="object"&&h!==null?gt(h):sl,u.state=t.memoizedState,h=n.getDerivedStateFromProps,typeof h=="function"&&(Zo(t,n,h,a),u.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(h=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),h!==u.state&&$o.enqueueReplaceState(u,u.state,null),os(t,a,u,c),rs(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){u=t.stateNode;var x=t.memoizedProps,C=La(n,x);u.props=C;var D=u.context,G=n.contextType;h=sl,typeof G=="object"&&G!==null&&(h=gt(G));var I=n.getDerivedStateFromProps;G=typeof I=="function"||typeof u.getSnapshotBeforeUpdate=="function",x=t.pendingProps!==x,G||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(x||D!==h)&&Zf(t,u,a,h),Fn=!1;var M=t.memoizedState;u.state=M,os(t,a,u,c),rs(),D=t.memoizedState,x||M!==D||Fn?(typeof I=="function"&&(Zo(t,n,I,a),D=t.memoizedState),(C=Fn||Kf(t,n,C,a,M,D,h))?(G||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=D),u.props=a,u.state=D,u.context=h,a=C):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{u=t.stateNode,jo(e,t),h=t.memoizedProps,G=La(n,h),u.props=G,I=t.pendingProps,M=u.context,D=n.contextType,C=sl,typeof D=="object"&&D!==null&&(C=gt(D)),x=n.getDerivedStateFromProps,(D=typeof x=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(h!==I||M!==C)&&Zf(t,u,a,C),Fn=!1,M=t.memoizedState,u.state=M,os(t,a,u,c),rs();var B=t.memoizedState;h!==I||M!==B||Fn||e!==null&&e.dependencies!==null&&pi(e.dependencies)?(typeof x=="function"&&(Zo(t,n,x,a),B=t.memoizedState),(G=Fn||Kf(t,n,G,a,M,B,C)||e!==null&&e.dependencies!==null&&pi(e.dependencies))?(D||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(a,B,C),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(a,B,C)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||h===e.memoizedProps&&M===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&M===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=B),u.props=a,u.state=B,u.context=C,a=G):(typeof u.componentDidUpdate!="function"||h===e.memoizedProps&&M===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&M===e.memoizedState||(t.flags|=1024),a=!1)}return u=a,ki(e,t),a=(t.flags&128)!==0,u||a?(u=t.stateNode,n=a&&typeof n.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&a?(t.child=Ua(t,e.child,null,c),t.child=Ua(t,null,n,c)):yt(e,t,n,c),t.memoizedState=u.state,e=t.child):e=zn(e,t,c),e}function ch(e,t,n,a){return Ra(),t.flags|=256,yt(e,t,n,a),t.child}var Wo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ec(e){return{baseLanes:e,cachePool:Fd()}}function tc(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Gt),e}function uh(e,t,n){var a=t.pendingProps,c=!1,u=(t.flags&128)!==0,h;if((h=u)||(h=e!==null&&e.memoizedState===null?!1:(tt.current&2)!==0),h&&(c=!0,t.flags&=-129),h=(t.flags&32)!==0,t.flags&=-33,e===null){if(ze){if(c?ea(t):ta(),(e=Qe)?(e=vm(e,Wt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Kn!==null?{id:mn,overflow:pn}:null,retryLane:536870912,hydrationErrors:null},n=Yd(e),n.return=t,t.child=n,pt=t,Qe=null)):e=null,e===null)throw $n(t);return Bc(e)?t.lanes=32:t.lanes=536870912,null}var x=a.children;return a=a.fallback,c?(ta(),c=t.mode,x=Mi({mode:"hidden",children:x},c),a=wa(a,c,n,null),x.return=t,a.return=t,x.sibling=a,t.child=x,a=t.child,a.memoizedState=ec(n),a.childLanes=tc(e,h,n),t.memoizedState=Wo,hs(null,a)):(ea(t),nc(t,x))}var C=e.memoizedState;if(C!==null&&(x=C.dehydrated,x!==null)){if(u)t.flags&256?(ea(t),t.flags&=-257,t=ac(e,t,n)):t.memoizedState!==null?(ta(),t.child=e.child,t.flags|=128,t=null):(ta(),x=a.fallback,c=t.mode,a=Mi({mode:"visible",children:a.children},c),x=wa(x,c,n,null),x.flags|=2,a.return=t,x.return=t,a.sibling=x,t.child=a,Ua(t,e.child,null,n),a=t.child,a.memoizedState=ec(n),a.childLanes=tc(e,h,n),t.memoizedState=Wo,t=hs(null,a));else if(ea(t),Bc(x)){if(h=x.nextSibling&&x.nextSibling.dataset,h)var D=h.dgst;h=D,a=Error(o(419)),a.stack="",a.digest=h,ts({value:a,source:null,stack:null}),t=ac(e,t,n)}else if(it||cl(e,t,n,!1),h=(n&e.childLanes)!==0,it||h){if(h=Ye,h!==null&&(a=$u(h,n),a!==0&&a!==C.retryLane))throw C.retryLane=a,Na(e,a),Ot(h,e,a),Fo;Uc(x)||Xi(),t=ac(e,t,n)}else Uc(x)?(t.flags|=192,t.child=e.child,t=null):(e=C.treeContext,Qe=tn(x.nextSibling),pt=t,ze=!0,Zn=null,Wt=!1,e!==null&&Id(t,e),t=nc(t,a.children),t.flags|=4096);return t}return c?(ta(),x=a.fallback,c=t.mode,C=e.child,D=C.sibling,a=Cn(C,{mode:"hidden",children:a.children}),a.subtreeFlags=C.subtreeFlags&65011712,D!==null?x=Cn(D,x):(x=wa(x,c,n,null),x.flags|=2),x.return=t,a.return=t,a.sibling=x,t.child=a,hs(null,a),a=t.child,x=e.child.memoizedState,x===null?x=ec(n):(c=x.cachePool,c!==null?(C=lt._currentValue,c=c.parent!==C?{parent:C,pool:C}:c):c=Fd(),x={baseLanes:x.baseLanes|n,cachePool:c}),a.memoizedState=x,a.childLanes=tc(e,h,n),t.memoizedState=Wo,hs(e.child,a)):(ea(t),n=e.child,e=n.sibling,n=Cn(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(h=t.deletions,h===null?(t.deletions=[e],t.flags|=16):h.push(e)),t.child=n,t.memoizedState=null,n)}function nc(e,t){return t=Mi({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Mi(e,t){return e=Bt(22,e,null,t),e.lanes=0,e}function ac(e,t,n){return Ua(t,e.child,null,n),e=nc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function dh(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),vo(e.return,t,n)}function lc(e,t,n,a,c,u){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:c,treeForkCount:u}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=a,h.tail=n,h.tailMode=c,h.treeForkCount=u)}function fh(e,t,n){var a=t.pendingProps,c=a.revealOrder,u=a.tail;a=a.children;var h=tt.current,x=(h&2)!==0;if(x?(h=h&1|2,t.flags|=128):h&=1,J(tt,h),yt(e,t,a,n),a=ze?es:0,!x&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&dh(e,n,t);else if(e.tag===19)dh(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(c){case"forwards":for(n=t.child,c=null;n!==null;)e=n.alternate,e!==null&&Ei(e)===null&&(c=n),n=n.sibling;n=c,n===null?(c=t.child,t.child=null):(c=n.sibling,n.sibling=null),lc(t,!1,c,n,u,a);break;case"backwards":case"unstable_legacy-backwards":for(n=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&Ei(e)===null){t.child=c;break}e=c.sibling,c.sibling=n,n=c,c=e}lc(t,!0,n,null,u,a);break;case"together":lc(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function zn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),la|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(cl(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,n=Cn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Cn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function sc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&pi(e)))}function ev(e,t,n){switch(t.tag){case 3:et(t,t.stateNode.containerInfo),Jn(t,lt,e.memoizedState.cache),Ra();break;case 27:case 5:Ae(t);break;case 4:et(t,t.stateNode.containerInfo);break;case 10:Jn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ro(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(ea(t),t.flags|=128,null):(n&t.child.childLanes)!==0?uh(e,t,n):(ea(t),e=zn(e,t,n),e!==null?e.sibling:null);ea(t);break;case 19:var c=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(cl(e,t,n,!1),a=(n&t.childLanes)!==0),c){if(a)return fh(e,t,n);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),J(tt,tt.current),a)break;return null;case 22:return t.lanes=0,lh(e,t,n,t.pendingProps);case 24:Jn(t,lt,e.memoizedState.cache)}return zn(e,t,n)}function hh(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)it=!0;else{if(!sc(e,n)&&(t.flags&128)===0)return it=!1,ev(e,t,n);it=(e.flags&131072)!==0}else it=!1,ze&&(t.flags&1048576)!==0&&Xd(t,es,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=ka(t.elementType),t.type=e,typeof e=="function")co(e)?(a=La(e,a),t.tag=1,t=oh(null,t,e,a,n)):(t.tag=0,t=Po(null,t,e,a,n));else{if(e!=null){var c=e.$$typeof;if(c===ae){t.tag=11,t=th(null,t,e,a,n);break e}else if(c===U){t.tag=14,t=nh(null,t,e,a,n);break e}}throw t=Fe(e)||e,Error(o(306,t,""))}}return t;case 0:return Po(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,c=La(a,t.pendingProps),oh(e,t,a,c,n);case 3:e:{if(et(t,t.stateNode.containerInfo),e===null)throw Error(o(387));a=t.pendingProps;var u=t.memoizedState;c=u.element,jo(e,t),os(t,a,null,n);var h=t.memoizedState;if(a=h.cache,Jn(t,lt,a),a!==u.cache&&xo(t,[lt],n,!0),rs(),a=h.element,u.isDehydrated)if(u={element:a,isDehydrated:!1,cache:h.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=ch(e,t,a,n);break e}else if(a!==c){c=Jt(Error(o(424)),t),ts(c),t=ch(e,t,a,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Qe=tn(e.firstChild),pt=t,ze=!0,Zn=null,Wt=!0,n=af(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ra(),a===c){t=zn(e,t,n);break e}yt(e,t,a,n)}t=t.child}return t;case 26:return ki(e,t),e===null?(n=bm(t.type,null,t.pendingProps,null))?t.memoizedState=n:ze||(n=t.type,e=t.pendingProps,a=Fi(xe.current).createElement(n),a[mt]=t,a[jt]=e,vt(a,n,e),ft(a),t.stateNode=a):t.memoizedState=bm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ae(t),e===null&&ze&&(a=t.stateNode=Sm(t.type,t.pendingProps,xe.current),pt=t,Wt=!0,c=Qe,ca(t.type)?(Lc=c,Qe=tn(a.firstChild)):Qe=c),yt(e,t,t.pendingProps.children,n),ki(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ze&&((c=a=Qe)&&(a=Rv(a,t.type,t.pendingProps,Wt),a!==null?(t.stateNode=a,pt=t,Qe=tn(a.firstChild),Wt=!1,c=!0):c=!1),c||$n(t)),Ae(t),c=t.type,u=t.pendingProps,h=e!==null?e.memoizedProps:null,a=u.children,Dc(c,u)?a=null:h!==null&&Dc(c,h)&&(t.flags|=32),t.memoizedState!==null&&(c=zo(e,t,Iy,null,null,n),Ns._currentValue=c),ki(e,t),yt(e,t,a,n),t.child;case 6:return e===null&&ze&&((e=n=Qe)&&(n=Ov(n,t.pendingProps,Wt),n!==null?(t.stateNode=n,pt=t,Qe=null,e=!0):e=!1),e||$n(t)),null;case 13:return uh(e,t,n);case 4:return et(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Ua(t,null,a,n):yt(e,t,a,n),t.child;case 11:return th(e,t,t.type,t.pendingProps,n);case 7:return yt(e,t,t.pendingProps,n),t.child;case 8:return yt(e,t,t.pendingProps.children,n),t.child;case 12:return yt(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,Jn(t,t.type,a.value),yt(e,t,a.children,n),t.child;case 9:return c=t.type._context,a=t.pendingProps.children,za(t),c=gt(c),a=a(c),t.flags|=1,yt(e,t,a,n),t.child;case 14:return nh(e,t,t.type,t.pendingProps,n);case 15:return ah(e,t,t.type,t.pendingProps,n);case 19:return fh(e,t,n);case 31:return Wy(e,t,n);case 22:return lh(e,t,n,t.pendingProps);case 24:return za(t),a=gt(lt),e===null?(c=_o(),c===null&&(c=Ye,u=To(),c.pooledCache=u,u.refCount++,u!==null&&(c.pooledCacheLanes|=n),c=u),t.memoizedState={parent:a,cache:c},bo(t),Jn(t,lt,c)):((e.lanes&n)!==0&&(jo(e,t),os(t,null,null,n),rs()),c=e.memoizedState,u=t.memoizedState,c.parent!==a?(c={parent:a,cache:a},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),Jn(t,lt,a)):(a=u.cache,Jn(t,lt,a),a!==c.cache&&xo(t,[lt],n,!0))),yt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Dn(e){e.flags|=4}function ic(e,t,n,a,c){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(qh())e.flags|=8192;else throw Ma=xi,Eo}else e.flags&=-16777217}function mh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!wm(t))if(qh())e.flags|=8192;else throw Ma=xi,Eo}function Ui(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Qu():536870912,e.lanes|=t,Sl|=t)}function ms(e,t){if(!ze)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Ke(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,a=0;if(t)for(var c=e.child;c!==null;)n|=c.lanes|c.childLanes,a|=c.subtreeFlags&65011712,a|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)n|=c.lanes|c.childLanes,a|=c.subtreeFlags,a|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=a,e.childLanes=n,t}function tv(e,t,n){var a=t.pendingProps;switch(mo(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ke(t),null;case 1:return Ke(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),wn(lt),oe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ol(t)?Dn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,go())),Ke(t),null;case 26:var c=t.type,u=t.memoizedState;return e===null?(Dn(t),u!==null?(Ke(t),mh(t,u)):(Ke(t),ic(t,c,null,a,n))):u?u!==e.memoizedState?(Dn(t),Ke(t),mh(t,u)):(Ke(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&Dn(t),Ke(t),ic(t,c,e,a,n)),null;case 27:if(Sn(t),n=xe.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Dn(t);else{if(!a){if(t.stateNode===null)throw Error(o(166));return Ke(t),null}e=ee.current,ol(t)?Qd(t):(e=Sm(c,a,n),t.stateNode=e,Dn(t))}return Ke(t),null;case 5:if(Sn(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Dn(t);else{if(!a){if(t.stateNode===null)throw Error(o(166));return Ke(t),null}if(u=ee.current,ol(t))Qd(t);else{var h=Fi(xe.current);switch(u){case 1:u=h.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:u=h.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":u=h.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":u=h.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":u=h.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof a.is=="string"?h.createElement("select",{is:a.is}):h.createElement("select"),a.multiple?u.multiple=!0:a.size&&(u.size=a.size);break;default:u=typeof a.is=="string"?h.createElement(c,{is:a.is}):h.createElement(c)}}u[mt]=t,u[jt]=a;e:for(h=t.child;h!==null;){if(h.tag===5||h.tag===6)u.appendChild(h.stateNode);else if(h.tag!==4&&h.tag!==27&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===t)break e;for(;h.sibling===null;){if(h.return===null||h.return===t)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}t.stateNode=u;e:switch(vt(u,c,a),c){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Dn(t)}}return Ke(t),ic(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Dn(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(o(166));if(e=xe.current,ol(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,c=pt,c!==null)switch(c.tag){case 27:case 5:a=c.memoizedProps}e[mt]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||um(e.nodeValue,n)),e||$n(t,!0)}else e=Fi(e).createTextNode(a),e[mt]=t,t.stateNode=e}return Ke(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=ol(t),n!==null){if(e===null){if(!a)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[mt]=t}else Ra(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ke(t),e=!1}else n=go(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Ht(t),t):(Ht(t),null);if((t.flags&128)!==0)throw Error(o(558))}return Ke(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=ol(t),a!==null&&a.dehydrated!==null){if(e===null){if(!c)throw Error(o(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(o(317));c[mt]=t}else Ra(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ke(t),c=!1}else c=go(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(Ht(t),t):(Ht(t),null)}return Ht(t),(t.flags&128)!==0?(t.lanes=n,t):(n=a!==null,e=e!==null&&e.memoizedState!==null,n&&(a=t.child,c=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(c=a.alternate.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==c&&(a.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ui(t,t.updateQueue),Ke(t),null);case 4:return oe(),e===null&&Nc(t.stateNode.containerInfo),Ke(t),null;case 10:return wn(t.type),Ke(t),null;case 19:if(X(tt),a=t.memoizedState,a===null)return Ke(t),null;if(c=(t.flags&128)!==0,u=a.rendering,u===null)if(c)ms(a,!1);else{if(We!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=Ei(e),u!==null){for(t.flags|=128,ms(a,!1),e=u.updateQueue,t.updateQueue=e,Ui(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Gd(n,e),n=n.sibling;return J(tt,tt.current&1|2),ze&&An(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&_t()>Gi&&(t.flags|=128,c=!0,ms(a,!1),t.lanes=4194304)}else{if(!c)if(e=Ei(u),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,Ui(t,e),ms(a,!0),a.tail===null&&a.tailMode==="hidden"&&!u.alternate&&!ze)return Ke(t),null}else 2*_t()-a.renderingStartTime>Gi&&n!==536870912&&(t.flags|=128,c=!0,ms(a,!1),t.lanes=4194304);a.isBackwards?(u.sibling=t.child,t.child=u):(e=a.last,e!==null?e.sibling=u:t.child=u,a.last=u)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=_t(),e.sibling=null,n=tt.current,J(tt,c?n&1|2:n&1),ze&&An(t,a.treeForkCount),e):(Ke(t),null);case 22:case 23:return Ht(t),wo(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(n&536870912)!==0&&(t.flags&128)===0&&(Ke(t),t.subtreeFlags&6&&(t.flags|=8192)):Ke(t),n=t.updateQueue,n!==null&&Ui(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),e!==null&&X(Da),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),wn(lt),Ke(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function nv(e,t){switch(mo(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return wn(lt),oe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Sn(t),null;case 31:if(t.memoizedState!==null){if(Ht(t),t.alternate===null)throw Error(o(340));Ra()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Ht(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Ra()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return X(tt),null;case 4:return oe(),null;case 10:return wn(t.type),null;case 22:case 23:return Ht(t),wo(),e!==null&&X(Da),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return wn(lt),null;case 25:return null;default:return null}}function ph(e,t){switch(mo(t),t.tag){case 3:wn(lt),oe();break;case 26:case 27:case 5:Sn(t);break;case 4:oe();break;case 31:t.memoizedState!==null&&Ht(t);break;case 13:Ht(t);break;case 19:X(tt);break;case 10:wn(t.type);break;case 22:case 23:Ht(t),wo(),e!==null&&X(Da);break;case 24:wn(lt)}}function ps(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var c=a.next;n=c;do{if((n.tag&e)===e){a=void 0;var u=n.create,h=n.inst;a=u(),h.destroy=a}n=n.next}while(n!==c)}}catch(x){Le(t,t.return,x)}}function na(e,t,n){try{var a=t.updateQueue,c=a!==null?a.lastEffect:null;if(c!==null){var u=c.next;a=u;do{if((a.tag&e)===e){var h=a.inst,x=h.destroy;if(x!==void 0){h.destroy=void 0,c=t;var C=n,D=x;try{D()}catch(G){Le(c,C,G)}}}a=a.next}while(a!==u)}}catch(G){Le(t,t.return,G)}}function gh(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{sf(t,n)}catch(a){Le(e,e.return,a)}}}function yh(e,t,n){n.props=La(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){Le(e,t,a)}}function gs(e,t){try{var n=e.ref;if(n!==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 n=="function"?e.refCleanup=n(a):n.current=a}}catch(c){Le(e,t,c)}}function gn(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(c){Le(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(c){Le(e,t,c)}else n.current=null}function vh(e){var t=e.type,n=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(c){Le(e,e.return,c)}}function rc(e,t,n){try{var a=e.stateNode;bv(a,e.type,n,t),a[jt]=t}catch(c){Le(e,e.return,c)}}function xh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ca(e.type)||e.tag===4}function oc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||xh(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 cc(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=bn));else if(a!==4&&(a===27&&ca(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(cc(e,t,n),e=e.sibling;e!==null;)cc(e,t,n),e=e.sibling}function Bi(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(a===27&&ca(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Bi(e,t,n),e=e.sibling;e!==null;)Bi(e,t,n),e=e.sibling}function Th(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);vt(t,a,n),t[mt]=e,t[jt]=n}catch(u){Le(e,e.return,u)}}var kn=!1,rt=!1,uc=!1,Sh=typeof WeakSet=="function"?WeakSet:Set,ht=null;function av(e,t){if(e=e.containerInfo,Oc=lr,e=zd(e),no(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var c=a.anchorOffset,u=a.focusNode;a=a.focusOffset;try{n.nodeType,u.nodeType}catch{n=null;break e}var h=0,x=-1,C=-1,D=0,G=0,I=e,M=null;t:for(;;){for(var B;I!==n||c!==0&&I.nodeType!==3||(x=h+c),I!==u||a!==0&&I.nodeType!==3||(C=h+a),I.nodeType===3&&(h+=I.nodeValue.length),(B=I.firstChild)!==null;)M=I,I=B;for(;;){if(I===e)break t;if(M===n&&++D===c&&(x=h),M===u&&++G===a&&(C=h),(B=I.nextSibling)!==null)break;I=M,M=I.parentNode}I=B}n=x===-1||C===-1?null:{start:x,end:C}}else n=null}n=n||{start:0,end:0}}else n=null;for(zc={focusedElem:e,selectionRange:n},lr=!1,ht=t;ht!==null;)if(t=ht,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ht=e;else for(;ht!==null;){switch(t=ht,u=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(n=0;n<e.length;n++)c=e[n],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,n=t,c=u.memoizedProps,u=u.memoizedState,a=n.stateNode;try{var le=La(n.type,c);e=a.getSnapshotBeforeUpdate(le,u),a.__reactInternalSnapshotBeforeUpdate=e}catch(me){Le(n,n.return,me)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Mc(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Mc(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(o(163))}if(e=t.sibling,e!==null){e.return=t.return,ht=e;break}ht=t.return}}function _h(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:Un(e,n),a&4&&ps(5,n);break;case 1:if(Un(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(h){Le(n,n.return,h)}else{var c=La(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(h){Le(n,n.return,h)}}a&64&&gh(n),a&512&&gs(n,n.return);break;case 3:if(Un(e,n),a&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{sf(e,t)}catch(h){Le(n,n.return,h)}}break;case 27:t===null&&a&4&&Th(n);case 26:case 5:Un(e,n),t===null&&a&4&&vh(n),a&512&&gs(n,n.return);break;case 12:Un(e,n);break;case 31:Un(e,n),a&4&&jh(e,n);break;case 13:Un(e,n),a&4&&Ch(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=fv.bind(null,n),zv(e,n))));break;case 22:if(a=n.memoizedState!==null||kn,!a){t=t!==null&&t.memoizedState!==null||rt,c=kn;var u=rt;kn=a,(rt=t)&&!u?Bn(e,n,(n.subtreeFlags&8772)!==0):Un(e,n),kn=c,rt=u}break;case 30:break;default:Un(e,n)}}function Eh(e){var t=e.alternate;t!==null&&(e.alternate=null,Eh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Hr(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 Ze=null,At=!1;function Mn(e,t,n){for(n=n.child;n!==null;)bh(e,t,n),n=n.sibling}function bh(e,t,n){if(fe&&typeof fe.onCommitFiberUnmount=="function")try{fe.onCommitFiberUnmount(W,n)}catch{}switch(n.tag){case 26:rt||gn(n,t),Mn(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:rt||gn(n,t);var a=Ze,c=At;ca(n.type)&&(Ze=n.stateNode,At=!1),Mn(e,t,n),js(n.stateNode),Ze=a,At=c;break;case 5:rt||gn(n,t);case 6:if(a=Ze,c=At,Ze=null,Mn(e,t,n),Ze=a,At=c,Ze!==null)if(At)try{(Ze.nodeType===9?Ze.body:Ze.nodeName==="HTML"?Ze.ownerDocument.body:Ze).removeChild(n.stateNode)}catch(u){Le(n,t,u)}else try{Ze.removeChild(n.stateNode)}catch(u){Le(n,t,u)}break;case 18:Ze!==null&&(At?(e=Ze,gm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),wl(e)):gm(Ze,n.stateNode));break;case 4:a=Ze,c=At,Ze=n.stateNode.containerInfo,At=!0,Mn(e,t,n),Ze=a,At=c;break;case 0:case 11:case 14:case 15:na(2,n,t),rt||na(4,n,t),Mn(e,t,n);break;case 1:rt||(gn(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&yh(n,t,a)),Mn(e,t,n);break;case 21:Mn(e,t,n);break;case 22:rt=(a=rt)||n.memoizedState!==null,Mn(e,t,n),rt=a;break;default:Mn(e,t,n)}}function jh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{wl(e)}catch(n){Le(t,t.return,n)}}}function Ch(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{wl(e)}catch(n){Le(t,t.return,n)}}function lv(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Sh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Sh),t;default:throw Error(o(435,e.tag))}}function Li(e,t){var n=lv(e);t.forEach(function(a){if(!n.has(a)){n.add(a);var c=hv.bind(null,e,a);a.then(c,c)}})}function Nt(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var c=n[a],u=e,h=t,x=h;e:for(;x!==null;){switch(x.tag){case 27:if(ca(x.type)){Ze=x.stateNode,At=!1;break e}break;case 5:Ze=x.stateNode,At=!1;break e;case 3:case 4:Ze=x.stateNode.containerInfo,At=!0;break e}x=x.return}if(Ze===null)throw Error(o(160));bh(u,h,c),Ze=null,At=!1,u=c.alternate,u!==null&&(u.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Ah(t,e),t=t.sibling}var on=null;function Ah(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Nt(t,e),wt(e),a&4&&(na(3,e,e.return),ps(3,e),na(5,e,e.return));break;case 1:Nt(t,e),wt(e),a&512&&(rt||n===null||gn(n,n.return)),a&64&&kn&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?a:n.concat(a))));break;case 26:var c=on;if(Nt(t,e),wt(e),a&512&&(rt||n===null||gn(n,n.return)),a&4){var u=n!==null?n.memoizedState:null;if(a=e.memoizedState,n===null)if(a===null)if(e.stateNode===null){e:{a=e.type,n=e.memoizedProps,c=c.ownerDocument||c;t:switch(a){case"title":u=c.getElementsByTagName("title")[0],(!u||u[Vl]||u[mt]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=c.createElement(a),c.head.insertBefore(u,c.querySelector("head > title"))),vt(u,a,n),u[mt]=e,ft(u),a=u;break e;case"link":var h=Am("link","href",c).get(a+(n.href||""));if(h){for(var x=0;x<h.length;x++)if(u=h[x],u.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&u.getAttribute("rel")===(n.rel==null?null:n.rel)&&u.getAttribute("title")===(n.title==null?null:n.title)&&u.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){h.splice(x,1);break t}}u=c.createElement(a),vt(u,a,n),c.head.appendChild(u);break;case"meta":if(h=Am("meta","content",c).get(a+(n.content||""))){for(x=0;x<h.length;x++)if(u=h[x],u.getAttribute("content")===(n.content==null?null:""+n.content)&&u.getAttribute("name")===(n.name==null?null:n.name)&&u.getAttribute("property")===(n.property==null?null:n.property)&&u.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&u.getAttribute("charset")===(n.charSet==null?null:n.charSet)){h.splice(x,1);break t}}u=c.createElement(a),vt(u,a,n),c.head.appendChild(u);break;default:throw Error(o(468,a))}u[mt]=e,ft(u),a=u}e.stateNode=a}else Nm(c,e.type,e.stateNode);else e.stateNode=Cm(c,a,e.memoizedProps);else u!==a?(u===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):u.count--,a===null?Nm(c,e.type,e.stateNode):Cm(c,a,e.memoizedProps)):a===null&&e.stateNode!==null&&rc(e,e.memoizedProps,n.memoizedProps)}break;case 27:Nt(t,e),wt(e),a&512&&(rt||n===null||gn(n,n.return)),n!==null&&a&4&&rc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Nt(t,e),wt(e),a&512&&(rt||n===null||gn(n,n.return)),e.flags&32){c=e.stateNode;try{Pa(c,"")}catch(le){Le(e,e.return,le)}}a&4&&e.stateNode!=null&&(c=e.memoizedProps,rc(e,c,n!==null?n.memoizedProps:c)),a&1024&&(uc=!0);break;case 6:if(Nt(t,e),wt(e),a&4){if(e.stateNode===null)throw Error(o(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(le){Le(e,e.return,le)}}break;case 3:if(er=null,c=on,on=Pi(t.containerInfo),Nt(t,e),on=c,wt(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{wl(t.containerInfo)}catch(le){Le(e,e.return,le)}uc&&(uc=!1,Nh(e));break;case 4:a=on,on=Pi(e.stateNode.containerInfo),Nt(t,e),wt(e),on=a;break;case 12:Nt(t,e),wt(e);break;case 31:Nt(t,e),wt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Li(e,a)));break;case 13:Nt(t,e),wt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(qi=_t()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Li(e,a)));break;case 22:c=e.memoizedState!==null;var C=n!==null&&n.memoizedState!==null,D=kn,G=rt;if(kn=D||c,rt=G||C,Nt(t,e),rt=G,kn=D,wt(e),a&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(n===null||C||kn||rt||Ha(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){C=n=t;try{if(u=C.stateNode,c)h=u.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none";else{x=C.stateNode;var I=C.memoizedProps.style,M=I!=null&&I.hasOwnProperty("display")?I.display:null;x.style.display=M==null||typeof M=="boolean"?"":(""+M).trim()}}catch(le){Le(C,C.return,le)}}}else if(t.tag===6){if(n===null){C=t;try{C.stateNode.nodeValue=c?"":C.memoizedProps}catch(le){Le(C,C.return,le)}}}else if(t.tag===18){if(n===null){C=t;try{var B=C.stateNode;c?ym(B,!0):ym(C.stateNode,!1)}catch(le){Le(C,C.return,le)}}}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;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(n=a.retryQueue,n!==null&&(a.retryQueue=null,Li(e,n))));break;case 19:Nt(t,e),wt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Li(e,a)));break;case 30:break;case 21:break;default:Nt(t,e),wt(e)}}function wt(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(xh(a)){n=a;break}a=a.return}if(n==null)throw Error(o(160));switch(n.tag){case 27:var c=n.stateNode,u=oc(e);Bi(e,u,c);break;case 5:var h=n.stateNode;n.flags&32&&(Pa(h,""),n.flags&=-33);var x=oc(e);Bi(e,x,h);break;case 3:case 4:var C=n.stateNode.containerInfo,D=oc(e);cc(e,D,C);break;default:throw Error(o(161))}}catch(G){Le(e,e.return,G)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Nh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Nh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Un(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)_h(e,t.alternate,t),t=t.sibling}function Ha(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:na(4,t,t.return),Ha(t);break;case 1:gn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&yh(t,t.return,n),Ha(t);break;case 27:js(t.stateNode);case 26:case 5:gn(t,t.return),Ha(t);break;case 22:t.memoizedState===null&&Ha(t);break;case 30:Ha(t);break;default:Ha(t)}e=e.sibling}}function Bn(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,c=e,u=t,h=u.flags;switch(u.tag){case 0:case 11:case 15:Bn(c,u,n),ps(4,u);break;case 1:if(Bn(c,u,n),a=u,c=a.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(D){Le(a,a.return,D)}if(a=u,c=a.updateQueue,c!==null){var x=a.stateNode;try{var C=c.shared.hiddenCallbacks;if(C!==null)for(c.shared.hiddenCallbacks=null,c=0;c<C.length;c++)lf(C[c],x)}catch(D){Le(a,a.return,D)}}n&&h&64&&gh(u),gs(u,u.return);break;case 27:Th(u);case 26:case 5:Bn(c,u,n),n&&a===null&&h&4&&vh(u),gs(u,u.return);break;case 12:Bn(c,u,n);break;case 31:Bn(c,u,n),n&&h&4&&jh(c,u);break;case 13:Bn(c,u,n),n&&h&4&&Ch(c,u);break;case 22:u.memoizedState===null&&Bn(c,u,n),gs(u,u.return);break;case 30:break;default:Bn(c,u,n)}t=t.sibling}}function dc(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ns(n))}function fc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ns(e))}function cn(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)wh(e,t,n,a),t=t.sibling}function wh(e,t,n,a){var c=t.flags;switch(t.tag){case 0:case 11:case 15:cn(e,t,n,a),c&2048&&ps(9,t);break;case 1:cn(e,t,n,a);break;case 3:cn(e,t,n,a),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ns(e)));break;case 12:if(c&2048){cn(e,t,n,a),e=t.stateNode;try{var u=t.memoizedProps,h=u.id,x=u.onPostCommit;typeof x=="function"&&x(h,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(C){Le(t,t.return,C)}}else cn(e,t,n,a);break;case 31:cn(e,t,n,a);break;case 13:cn(e,t,n,a);break;case 23:break;case 22:u=t.stateNode,h=t.alternate,t.memoizedState!==null?u._visibility&2?cn(e,t,n,a):ys(e,t):u._visibility&2?cn(e,t,n,a):(u._visibility|=2,vl(e,t,n,a,(t.subtreeFlags&10256)!==0||!1)),c&2048&&dc(h,t);break;case 24:cn(e,t,n,a),c&2048&&fc(t.alternate,t);break;default:cn(e,t,n,a)}}function vl(e,t,n,a,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,h=t,x=n,C=a,D=h.flags;switch(h.tag){case 0:case 11:case 15:vl(u,h,x,C,c),ps(8,h);break;case 23:break;case 22:var G=h.stateNode;h.memoizedState!==null?G._visibility&2?vl(u,h,x,C,c):ys(u,h):(G._visibility|=2,vl(u,h,x,C,c)),c&&D&2048&&dc(h.alternate,h);break;case 24:vl(u,h,x,C,c),c&&D&2048&&fc(h.alternate,h);break;default:vl(u,h,x,C,c)}t=t.sibling}}function ys(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,a=t,c=a.flags;switch(a.tag){case 22:ys(n,a),c&2048&&dc(a.alternate,a);break;case 24:ys(n,a),c&2048&&fc(a.alternate,a);break;default:ys(n,a)}t=t.sibling}}var vs=8192;function xl(e,t,n){if(e.subtreeFlags&vs)for(e=e.child;e!==null;)Rh(e,t,n),e=e.sibling}function Rh(e,t,n){switch(e.tag){case 26:xl(e,t,n),e.flags&vs&&e.memoizedState!==null&&Xv(n,on,e.memoizedState,e.memoizedProps);break;case 5:xl(e,t,n);break;case 3:case 4:var a=on;on=Pi(e.stateNode.containerInfo),xl(e,t,n),on=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=vs,vs=16777216,xl(e,t,n),vs=a):xl(e,t,n));break;default:xl(e,t,n)}}function Oh(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 xs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];ht=a,Dh(a,e)}Oh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)zh(e),e=e.sibling}function zh(e){switch(e.tag){case 0:case 11:case 15:xs(e),e.flags&2048&&na(9,e,e.return);break;case 3:xs(e);break;case 12:xs(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Hi(e)):xs(e);break;default:xs(e)}}function Hi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];ht=a,Dh(a,e)}Oh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:na(8,t,t.return),Hi(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Hi(t));break;default:Hi(t)}e=e.sibling}}function Dh(e,t){for(;ht!==null;){var n=ht;switch(n.tag){case 0:case 11:case 15:na(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var a=n.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:ns(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,ht=a;else e:for(n=e;ht!==null;){a=ht;var c=a.sibling,u=a.return;if(Eh(a),a===n){ht=null;break e}if(c!==null){c.return=u,ht=c;break e}ht=u}}}var sv={getCacheForType:function(e){var t=gt(lt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return gt(lt).controller.signal}},iv=typeof WeakMap=="function"?WeakMap:Map,Ue=0,Ye=null,Ne=null,Re=0,Be=0,qt=null,aa=!1,Tl=!1,hc=!1,Ln=0,We=0,la=0,qa=0,mc=0,Gt=0,Sl=0,Ts=null,Rt=null,pc=!1,qi=0,kh=0,Gi=1/0,Yi=null,sa=null,dt=0,ia=null,_l=null,Hn=0,gc=0,yc=null,Mh=null,Ss=0,vc=null;function Yt(){return(Ue&2)!==0&&Re!==0?Re&-Re:H.T!==null?bc():Ju()}function Uh(){if(Gt===0)if((Re&536870912)===0||ze){var e=Js;Js<<=1,(Js&3932160)===0&&(Js=262144),Gt=e}else Gt=536870912;return e=Lt.current,e!==null&&(e.flags|=32),Gt}function Ot(e,t,n){(e===Ye&&(Be===2||Be===9)||e.cancelPendingCommit!==null)&&(El(e,0),ra(e,Re,Gt,!1)),Yl(e,n),((Ue&2)===0||e!==Ye)&&(e===Ye&&((Ue&2)===0&&(qa|=n),We===4&&ra(e,Re,Gt,!1)),yn(e))}function Bh(e,t,n){if((Ue&6)!==0)throw Error(o(327));var a=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Gl(e,t),c=a?cv(e,t):Tc(e,t,!0),u=a;do{if(c===0){Tl&&!a&&ra(e,t,0,!1);break}else{if(n=e.current.alternate,u&&!rv(n)){c=Tc(e,t,!1),u=!1;continue}if(c===2){if(u=t,e.errorRecoveryDisabledLanes&u)var h=0;else h=e.pendingLanes&-536870913,h=h!==0?h:h&536870912?536870912:0;if(h!==0){t=h;e:{var x=e;c=Ts;var C=x.current.memoizedState.isDehydrated;if(C&&(El(x,h).flags|=256),h=Tc(x,h,!1),h!==2){if(hc&&!C){x.errorRecoveryDisabledLanes|=u,qa|=u,c=4;break e}u=Rt,Rt=c,u!==null&&(Rt===null?Rt=u:Rt.push.apply(Rt,u))}c=h}if(u=!1,c!==2)continue}}if(c===1){El(e,0),ra(e,t,0,!0);break}e:{switch(a=e,u=c,u){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:ra(a,t,Gt,!aa);break e;case 2:Rt=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(c=qi+300-_t(),10<c)){if(ra(a,t,Gt,!aa),Ps(a,0,!0)!==0)break e;Hn=t,a.timeoutHandle=mm(Lh.bind(null,a,n,Rt,Yi,pc,t,Gt,qa,Sl,aa,u,"Throttled",-0,0),c);break e}Lh(a,n,Rt,Yi,pc,t,Gt,qa,Sl,aa,u,null,-0,0)}}break}while(!0);yn(e)}function Lh(e,t,n,a,c,u,h,x,C,D,G,I,M,B){if(e.timeoutHandle=-1,I=t.subtreeFlags,I&8192||(I&16785408)===16785408){I={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:bn},Rh(t,u,I);var le=(u&62914560)===u?qi-_t():(u&4194048)===u?kh-_t():0;if(le=Iv(I,le),le!==null){Hn=u,e.cancelPendingCommit=le(Qh.bind(null,e,t,u,n,a,c,h,x,C,G,I,null,M,B)),ra(e,u,h,!D);return}}Qh(e,t,u,n,a,c,h,x,C)}function rv(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var a=0;a<n.length;a++){var c=n[a],u=c.getSnapshot;c=c.value;try{if(!Ut(u(),c))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ra(e,t,n,a){t&=~mc,t&=~qa,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var c=t;0<c;){var u=31-Mt(c),h=1<<u;a[u]=-1,c&=~h}n!==0&&Ku(e,n,t)}function Vi(){return(Ue&6)===0?(_s(0),!1):!0}function xc(){if(Ne!==null){if(Be===0)var e=Ne.return;else e=Ne,Nn=Oa=null,Mo(e),hl=null,ls=0,e=Ne;for(;e!==null;)ph(e.alternate,e),e=e.return;Ne=null}}function El(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Av(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Hn=0,xc(),Ye=e,Ne=n=Cn(e.current,null),Re=t,Be=0,qt=null,aa=!1,Tl=Gl(e,t),hc=!1,Sl=Gt=mc=qa=la=We=0,Rt=Ts=null,pc=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var c=31-Mt(a),u=1<<c;t|=e[c],a&=~u}return Ln=t,ui(),n}function Hh(e,t){Te=null,H.H=fs,t===fl||t===vi?(t=ef(),Be=3):t===Eo?(t=ef(),Be=4):Be=t===Fo?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,qt=t,Ne===null&&(We=1,zi(e,Jt(t,e.current)))}function qh(){var e=Lt.current;return e===null?!0:(Re&4194048)===Re?en===null:(Re&62914560)===Re||(Re&536870912)!==0?e===en:!1}function Gh(){var e=H.H;return H.H=fs,e===null?fs:e}function Yh(){var e=H.A;return H.A=sv,e}function Xi(){We=4,aa||(Re&4194048)!==Re&&Lt.current!==null||(Tl=!0),(la&134217727)===0&&(qa&134217727)===0||Ye===null||ra(Ye,Re,Gt,!1)}function Tc(e,t,n){var a=Ue;Ue|=2;var c=Gh(),u=Yh();(Ye!==e||Re!==t)&&(Yi=null,El(e,t)),t=!1;var h=We;e:do try{if(Be!==0&&Ne!==null){var x=Ne,C=qt;switch(Be){case 8:xc(),h=6;break e;case 3:case 2:case 9:case 6:Lt.current===null&&(t=!0);var D=Be;if(Be=0,qt=null,bl(e,x,C,D),n&&Tl){h=0;break e}break;default:D=Be,Be=0,qt=null,bl(e,x,C,D)}}ov(),h=We;break}catch(G){Hh(e,G)}while(!0);return t&&e.shellSuspendCounter++,Nn=Oa=null,Ue=a,H.H=c,H.A=u,Ne===null&&(Ye=null,Re=0,ui()),h}function ov(){for(;Ne!==null;)Vh(Ne)}function cv(e,t){var n=Ue;Ue|=2;var a=Gh(),c=Yh();Ye!==e||Re!==t?(Yi=null,Gi=_t()+500,El(e,t)):Tl=Gl(e,t);e:do try{if(Be!==0&&Ne!==null){t=Ne;var u=qt;t:switch(Be){case 1:Be=0,qt=null,bl(e,t,u,1);break;case 2:case 9:if(Pd(u)){Be=0,qt=null,Xh(t);break}t=function(){Be!==2&&Be!==9||Ye!==e||(Be=7),yn(e)},u.then(t,t);break e;case 3:Be=7;break e;case 4:Be=5;break e;case 7:Pd(u)?(Be=0,qt=null,Xh(t)):(Be=0,qt=null,bl(e,t,u,7));break;case 5:var h=null;switch(Ne.tag){case 26:h=Ne.memoizedState;case 5:case 27:var x=Ne;if(h?wm(h):x.stateNode.complete){Be=0,qt=null;var C=x.sibling;if(C!==null)Ne=C;else{var D=x.return;D!==null?(Ne=D,Ii(D)):Ne=null}break t}}Be=0,qt=null,bl(e,t,u,5);break;case 6:Be=0,qt=null,bl(e,t,u,6);break;case 8:xc(),We=6;break e;default:throw Error(o(462))}}uv();break}catch(G){Hh(e,G)}while(!0);return Nn=Oa=null,H.H=a,H.A=c,Ue=n,Ne!==null?0:(Ye=null,Re=0,ui(),We)}function uv(){for(;Ne!==null&&!ql();)Vh(Ne)}function Vh(e){var t=hh(e.alternate,e,Ln);e.memoizedProps=e.pendingProps,t===null?Ii(e):Ne=t}function Xh(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=rh(n,t,t.pendingProps,t.type,void 0,Re);break;case 11:t=rh(n,t,t.pendingProps,t.type.render,t.ref,Re);break;case 5:Mo(t);default:ph(n,t),t=Ne=Gd(t,Ln),t=hh(n,t,Ln)}e.memoizedProps=e.pendingProps,t===null?Ii(e):Ne=t}function bl(e,t,n,a){Nn=Oa=null,Mo(t),hl=null,ls=0;var c=t.return;try{if(Py(e,c,t,n,Re)){We=1,zi(e,Jt(n,e.current)),Ne=null;return}}catch(u){if(c!==null)throw Ne=c,u;We=1,zi(e,Jt(n,e.current)),Ne=null;return}t.flags&32768?(ze||a===1?e=!0:Tl||(Re&536870912)!==0?e=!1:(aa=e=!0,(a===2||a===9||a===3||a===6)&&(a=Lt.current,a!==null&&a.tag===13&&(a.flags|=16384))),Ih(t,e)):Ii(t)}function Ii(e){var t=e;do{if((t.flags&32768)!==0){Ih(t,aa);return}e=t.return;var n=tv(t.alternate,t,Ln);if(n!==null){Ne=n;return}if(t=t.sibling,t!==null){Ne=t;return}Ne=t=e}while(t!==null);We===0&&(We=5)}function Ih(e,t){do{var n=nv(e.alternate,e);if(n!==null){n.flags&=32767,Ne=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Ne=e;return}Ne=e=n}while(e!==null);We=6,Ne=null}function Qh(e,t,n,a,c,u,h,x,C){e.cancelPendingCommit=null;do Qi();while(dt!==0);if((Ue&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(u=t.lanes|t.childLanes,u|=ro,Vg(e,n,u,h,x,C),e===Ye&&(Ne=Ye=null,Re=0),_l=t,ia=e,Hn=n,gc=u,yc=c,Mh=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,mv(Xa,function(){return Fh(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=H.T,H.T=null,c=P.p,P.p=2,h=Ue,Ue|=4;try{av(e,t,n)}finally{Ue=h,P.p=c,H.T=a}}dt=1,Kh(),Zh(),$h()}}function Kh(){if(dt===1){dt=0;var e=ia,t=_l,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=H.T,H.T=null;var a=P.p;P.p=2;var c=Ue;Ue|=4;try{Ah(t,e);var u=zc,h=zd(e.containerInfo),x=u.focusedElem,C=u.selectionRange;if(h!==x&&x&&x.ownerDocument&&Od(x.ownerDocument.documentElement,x)){if(C!==null&&no(x)){var D=C.start,G=C.end;if(G===void 0&&(G=D),"selectionStart"in x)x.selectionStart=D,x.selectionEnd=Math.min(G,x.value.length);else{var I=x.ownerDocument||document,M=I&&I.defaultView||window;if(M.getSelection){var B=M.getSelection(),le=x.textContent.length,me=Math.min(C.start,le),Ge=C.end===void 0?me:Math.min(C.end,le);!B.extend&&me>Ge&&(h=Ge,Ge=me,me=h);var R=Rd(x,me),A=Rd(x,Ge);if(R&&A&&(B.rangeCount!==1||B.anchorNode!==R.node||B.anchorOffset!==R.offset||B.focusNode!==A.node||B.focusOffset!==A.offset)){var z=I.createRange();z.setStart(R.node,R.offset),B.removeAllRanges(),me>Ge?(B.addRange(z),B.extend(A.node,A.offset)):(z.setEnd(A.node,A.offset),B.addRange(z))}}}}for(I=[],B=x;B=B.parentNode;)B.nodeType===1&&I.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<I.length;x++){var Y=I[x];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}lr=!!Oc,zc=Oc=null}finally{Ue=c,P.p=a,H.T=n}}e.current=t,dt=2}}function Zh(){if(dt===2){dt=0;var e=ia,t=_l,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=H.T,H.T=null;var a=P.p;P.p=2;var c=Ue;Ue|=4;try{_h(e,t.alternate,t)}finally{Ue=c,P.p=a,H.T=n}}dt=3}}function $h(){if(dt===4||dt===3){dt=0,_a();var e=ia,t=_l,n=Hn,a=Mh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?dt=5:(dt=0,_l=ia=null,Jh(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(sa=null),Br(n),t=t.stateNode,fe&&typeof fe.onCommitFiberRoot=="function")try{fe.onCommitFiberRoot(W,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=H.T,c=P.p,P.p=2,H.T=null;try{for(var u=e.onRecoverableError,h=0;h<a.length;h++){var x=a[h];u(x.value,{componentStack:x.stack})}}finally{H.T=t,P.p=c}}(Hn&3)!==0&&Qi(),yn(e),c=e.pendingLanes,(n&261930)!==0&&(c&42)!==0?e===vc?Ss++:(Ss=0,vc=e):Ss=0,_s(0)}}function Jh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ns(t)))}function Qi(){return Kh(),Zh(),$h(),Fh()}function Fh(){if(dt!==5)return!1;var e=ia,t=gc;gc=0;var n=Br(Hn),a=H.T,c=P.p;try{P.p=32>n?32:n,H.T=null,n=yc,yc=null;var u=ia,h=Hn;if(dt=0,_l=ia=null,Hn=0,(Ue&6)!==0)throw Error(o(331));var x=Ue;if(Ue|=4,zh(u.current),wh(u,u.current,h,n),Ue=x,_s(0,!1),fe&&typeof fe.onPostCommitFiberRoot=="function")try{fe.onPostCommitFiberRoot(W,u)}catch{}return!0}finally{P.p=c,H.T=a,Jh(e,t)}}function Ph(e,t,n){t=Jt(n,t),t=Jo(e.stateNode,t,2),e=Wn(e,t,2),e!==null&&(Yl(e,2),yn(e))}function Le(e,t,n){if(e.tag===3)Ph(e,e,n);else for(;t!==null;){if(t.tag===3){Ph(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(sa===null||!sa.has(a))){e=Jt(n,e),n=Wf(2),a=Wn(t,n,2),a!==null&&(eh(n,a,t,e),Yl(a,2),yn(a));break}}t=t.return}}function Sc(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new iv;var c=new Set;a.set(t,c)}else c=a.get(t),c===void 0&&(c=new Set,a.set(t,c));c.has(n)||(hc=!0,c.add(n),e=dv.bind(null,e,t,n),t.then(e,e))}function dv(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ye===e&&(Re&n)===n&&(We===4||We===3&&(Re&62914560)===Re&&300>_t()-qi?(Ue&2)===0&&El(e,0):mc|=n,Sl===Re&&(Sl=0)),yn(e)}function Wh(e,t){t===0&&(t=Qu()),e=Na(e,t),e!==null&&(Yl(e,t),yn(e))}function fv(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Wh(e,n)}function hv(e,t){var n=0;switch(e.tag){case 31:case 13:var a=e.stateNode,c=e.memoizedState;c!==null&&(n=c.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(o(314))}a!==null&&a.delete(t),Wh(e,n)}function mv(e,t){return Ta(e,t)}var Ki=null,jl=null,_c=!1,Zi=!1,Ec=!1,oa=0;function yn(e){e!==jl&&e.next===null&&(jl===null?Ki=jl=e:jl=jl.next=e),Zi=!0,_c||(_c=!0,gv())}function _s(e,t){if(!Ec&&Zi){Ec=!0;do for(var n=!1,a=Ki;a!==null;){if(e!==0){var c=a.pendingLanes;if(c===0)var u=0;else{var h=a.suspendedLanes,x=a.pingedLanes;u=(1<<31-Mt(42|e)+1)-1,u&=c&~(h&~x),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(n=!0,am(a,u))}else u=Re,u=Ps(a,a===Ye?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(u&3)===0||Gl(a,u)||(n=!0,am(a,u));a=a.next}while(n);Ec=!1}}function pv(){em()}function em(){Zi=_c=!1;var e=0;oa!==0&&Cv()&&(e=oa);for(var t=_t(),n=null,a=Ki;a!==null;){var c=a.next,u=tm(a,t);u===0?(a.next=null,n===null?Ki=c:n.next=c,c===null&&(jl=n)):(n=a,(e!==0||(u&3)!==0)&&(Zi=!0)),a=c}dt!==0&&dt!==5||_s(e),oa!==0&&(oa=0)}function tm(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,c=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var h=31-Mt(u),x=1<<h,C=c[h];C===-1?((x&n)===0||(x&a)!==0)&&(c[h]=Yg(x,t)):C<=t&&(e.expiredLanes|=x),u&=~x}if(t=Ye,n=Re,n=Ps(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(Be===2||Be===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Sa(a),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Gl(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&Sa(a),Br(n)){case 2:case 8:n=Ks;break;case 32:n=Xa;break;case 268435456:n=Ia;break;default:n=Xa}return a=nm.bind(null,e),n=Ta(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&Sa(a),e.callbackPriority=2,e.callbackNode=null,2}function nm(e,t){if(dt!==0&&dt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Qi()&&e.callbackNode!==n)return null;var a=Re;return a=Ps(e,e===Ye?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Bh(e,a,t),tm(e,_t()),e.callbackNode!=null&&e.callbackNode===n?nm.bind(null,e):null)}function am(e,t){if(Qi())return null;Bh(e,t,!0)}function gv(){Nv(function(){(Ue&6)!==0?Ta(Qs,pv):em()})}function bc(){if(oa===0){var e=ul;e===0&&(e=$s,$s<<=1,($s&261888)===0&&($s=256)),oa=e}return oa}function lm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ni(""+e)}function sm(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function yv(e,t,n,a,c){if(t==="submit"&&n&&n.stateNode===c){var u=lm((c[jt]||null).action),h=a.submitter;h&&(t=(t=h[jt]||null)?lm(t.formAction):h.getAttribute("formAction"),t!==null&&(u=t,h=null));var x=new ii("action","action",null,a,c);e.push({event:x,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(oa!==0){var C=h?sm(c,h):new FormData(c);Xo(n,{pending:!0,data:C,method:c.method,action:u},null,C)}}else typeof u=="function"&&(x.preventDefault(),C=h?sm(c,h):new FormData(c),Xo(n,{pending:!0,data:C,method:c.method,action:u},u,C))},currentTarget:c}]})}}for(var jc=0;jc<io.length;jc++){var Cc=io[jc],vv=Cc.toLowerCase(),xv=Cc[0].toUpperCase()+Cc.slice(1);rn(vv,"on"+xv)}rn(Md,"onAnimationEnd"),rn(Ud,"onAnimationIteration"),rn(Bd,"onAnimationStart"),rn("dblclick","onDoubleClick"),rn("focusin","onFocus"),rn("focusout","onBlur"),rn(My,"onTransitionRun"),rn(Uy,"onTransitionStart"),rn(By,"onTransitionCancel"),rn(Ld,"onTransitionEnd"),Ja("onMouseEnter",["mouseout","mouseover"]),Ja("onMouseLeave",["mouseout","mouseover"]),Ja("onPointerEnter",["pointerout","pointerover"]),Ja("onPointerLeave",["pointerout","pointerover"]),ba("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ba("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ba("onBeforeInput",["compositionend","keypress","textInput","paste"]),ba("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ba("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ba("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Es="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(" "),Tv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Es));function im(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],c=a.event;a=a.listeners;e:{var u=void 0;if(t)for(var h=a.length-1;0<=h;h--){var x=a[h],C=x.instance,D=x.currentTarget;if(x=x.listener,C!==u&&c.isPropagationStopped())break e;u=x,c.currentTarget=D;try{u(c)}catch(G){ci(G)}c.currentTarget=null,u=C}else for(h=0;h<a.length;h++){if(x=a[h],C=x.instance,D=x.currentTarget,x=x.listener,C!==u&&c.isPropagationStopped())break e;u=x,c.currentTarget=D;try{u(c)}catch(G){ci(G)}c.currentTarget=null,u=C}}}}function we(e,t){var n=t[Lr];n===void 0&&(n=t[Lr]=new Set);var a=e+"__bubble";n.has(a)||(rm(t,e,2,!1),n.add(a))}function Ac(e,t,n){var a=0;t&&(a|=4),rm(n,e,a,t)}var $i="_reactListening"+Math.random().toString(36).slice(2);function Nc(e){if(!e[$i]){e[$i]=!0,Wu.forEach(function(n){n!=="selectionchange"&&(Tv.has(n)||Ac(n,!1,e),Ac(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[$i]||(t[$i]=!0,Ac("selectionchange",!1,t))}}function rm(e,t,n,a){switch(Um(t)){case 2:var c=Zv;break;case 8:c=$v;break;default:c=Vc}n=c.bind(null,t,n,e),c=void 0,!Kr||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),a?c!==void 0?e.addEventListener(t,n,{capture:!0,passive:c}):e.addEventListener(t,n,!0):c!==void 0?e.addEventListener(t,n,{passive:c}):e.addEventListener(t,n,!1)}function wc(e,t,n,a,c){var u=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var h=a.tag;if(h===3||h===4){var x=a.stateNode.containerInfo;if(x===c)break;if(h===4)for(h=a.return;h!==null;){var C=h.tag;if((C===3||C===4)&&h.stateNode.containerInfo===c)return;h=h.return}for(;x!==null;){if(h=Ka(x),h===null)return;if(C=h.tag,C===5||C===6||C===26||C===27){a=u=h;continue e}x=x.parentNode}}a=a.return}dd(function(){var D=u,G=Ir(n),I=[];e:{var M=Hd.get(e);if(M!==void 0){var B=ii,le=e;switch(e){case"keypress":if(li(n)===0)break e;case"keydown":case"keyup":B=hy;break;case"focusin":le="focus",B=Fr;break;case"focusout":le="blur",B=Fr;break;case"beforeblur":case"afterblur":B=Fr;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":B=md;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":B=ty;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":B=gy;break;case Md:case Ud:case Bd:B=ly;break;case Ld:B=vy;break;case"scroll":case"scrollend":B=Wg;break;case"wheel":B=Ty;break;case"copy":case"cut":case"paste":B=iy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":B=gd;break;case"toggle":case"beforetoggle":B=_y}var me=(t&4)!==0,Ge=!me&&(e==="scroll"||e==="scrollend"),R=me?M!==null?M+"Capture":null:M;me=[];for(var A=D,z;A!==null;){var Y=A;if(z=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||z===null||R===null||(Y=Il(A,R),Y!=null&&me.push(bs(A,Y,z))),Ge)break;A=A.return}0<me.length&&(M=new B(M,le,null,n,G),I.push({event:M,listeners:me}))}}if((t&7)===0){e:{if(M=e==="mouseover"||e==="pointerover",B=e==="mouseout"||e==="pointerout",M&&n!==Xr&&(le=n.relatedTarget||n.fromElement)&&(Ka(le)||le[Qa]))break e;if((B||M)&&(M=G.window===G?G:(M=G.ownerDocument)?M.defaultView||M.parentWindow:window,B?(le=n.relatedTarget||n.toElement,B=D,le=le?Ka(le):null,le!==null&&(Ge=f(le),me=le.tag,le!==Ge||me!==5&&me!==27&&me!==6)&&(le=null)):(B=null,le=D),B!==le)){if(me=md,Y="onMouseLeave",R="onMouseEnter",A="mouse",(e==="pointerout"||e==="pointerover")&&(me=gd,Y="onPointerLeave",R="onPointerEnter",A="pointer"),Ge=B==null?M:Xl(B),z=le==null?M:Xl(le),M=new me(Y,A+"leave",B,n,G),M.target=Ge,M.relatedTarget=z,Y=null,Ka(G)===D&&(me=new me(R,A+"enter",le,n,G),me.target=z,me.relatedTarget=Ge,Y=me),Ge=Y,B&&le)t:{for(me=Sv,R=B,A=le,z=0,Y=R;Y;Y=me(Y))z++;Y=0;for(var ue=A;ue;ue=me(ue))Y++;for(;0<z-Y;)R=me(R),z--;for(;0<Y-z;)A=me(A),Y--;for(;z--;){if(R===A||A!==null&&R===A.alternate){me=R;break t}R=me(R),A=me(A)}me=null}else me=null;B!==null&&om(I,M,B,me,!1),le!==null&&Ge!==null&&om(I,Ge,le,me,!0)}}e:{if(M=D?Xl(D):window,B=M.nodeName&&M.nodeName.toLowerCase(),B==="select"||B==="input"&&M.type==="file")var ke=bd;else if(_d(M))if(jd)ke=zy;else{ke=Ry;var se=wy}else B=M.nodeName,!B||B.toLowerCase()!=="input"||M.type!=="checkbox"&&M.type!=="radio"?D&&Vr(D.elementType)&&(ke=bd):ke=Oy;if(ke&&(ke=ke(e,D))){Ed(I,ke,n,G);break e}se&&se(e,M,D),e==="focusout"&&D&&M.type==="number"&&D.memoizedProps.value!=null&&Yr(M,"number",M.value)}switch(se=D?Xl(D):window,e){case"focusin":(_d(se)||se.contentEditable==="true")&&(nl=se,ao=D,Wl=null);break;case"focusout":Wl=ao=nl=null;break;case"mousedown":lo=!0;break;case"contextmenu":case"mouseup":case"dragend":lo=!1,Dd(I,n,G);break;case"selectionchange":if(ky)break;case"keydown":case"keyup":Dd(I,n,G)}var _e;if(Wr)e:{switch(e){case"compositionstart":var Oe="onCompositionStart";break e;case"compositionend":Oe="onCompositionEnd";break e;case"compositionupdate":Oe="onCompositionUpdate";break e}Oe=void 0}else tl?Td(e,n)&&(Oe="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Oe="onCompositionStart");Oe&&(yd&&n.locale!=="ko"&&(tl||Oe!=="onCompositionStart"?Oe==="onCompositionEnd"&&tl&&(_e=fd()):(Qn=G,Zr="value"in Qn?Qn.value:Qn.textContent,tl=!0)),se=Ji(D,Oe),0<se.length&&(Oe=new pd(Oe,e,null,n,G),I.push({event:Oe,listeners:se}),_e?Oe.data=_e:(_e=Sd(n),_e!==null&&(Oe.data=_e)))),(_e=by?jy(e,n):Cy(e,n))&&(Oe=Ji(D,"onBeforeInput"),0<Oe.length&&(se=new pd("onBeforeInput","beforeinput",null,n,G),I.push({event:se,listeners:Oe}),se.data=_e)),yv(I,e,D,n,G)}im(I,t)})}function bs(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ji(e,t){for(var n=t+"Capture",a=[];e!==null;){var c=e,u=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||u===null||(c=Il(e,n),c!=null&&a.unshift(bs(e,c,u)),c=Il(e,t),c!=null&&a.push(bs(e,c,u))),e.tag===3)return a;e=e.return}return[]}function Sv(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function om(e,t,n,a,c){for(var u=t._reactName,h=[];n!==null&&n!==a;){var x=n,C=x.alternate,D=x.stateNode;if(x=x.tag,C!==null&&C===a)break;x!==5&&x!==26&&x!==27||D===null||(C=D,c?(D=Il(n,u),D!=null&&h.unshift(bs(n,D,C))):c||(D=Il(n,u),D!=null&&h.push(bs(n,D,C)))),n=n.return}h.length!==0&&e.push({event:t,listeners:h})}var _v=/\r\n?/g,Ev=/\u0000|\uFFFD/g;function cm(e){return(typeof e=="string"?e:""+e).replace(_v,`
9
+ `).replace(Ev,"")}function um(e,t){return t=cm(t),cm(e)===t}function qe(e,t,n,a,c,u){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Pa(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Pa(e,""+a);break;case"className":ei(e,"class",a);break;case"tabIndex":ei(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":ei(e,n,a);break;case"style":cd(e,a,u);break;case"data":if(t!=="object"){ei(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=ni(""+a),e.setAttribute(n,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(n,"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 u=="function"&&(n==="formAction"?(t!=="input"&&qe(e,t,"name",c.name,c,null),qe(e,t,"formEncType",c.formEncType,c,null),qe(e,t,"formMethod",c.formMethod,c,null),qe(e,t,"formTarget",c.formTarget,c,null)):(qe(e,t,"encType",c.encType,c,null),qe(e,t,"method",c.method,c,null),qe(e,t,"target",c.target,c,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=ni(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=bn);break;case"onScroll":a!=null&&we("scroll",e);break;case"onScrollEnd":a!=null&&we("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(o(61));if(n=a.__html,n!=null){if(c.children!=null)throw Error(o(60));e.innerHTML=n}}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}n=ni(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);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(n,""+a):e.removeAttribute(n);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(n,""):e.removeAttribute(n);break;case"capture":case"download":a===!0?e.setAttribute(n,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,a):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(n,a):e.removeAttribute(n);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(n):e.setAttribute(n,a);break;case"popover":we("beforetoggle",e),we("toggle",e),Ws(e,"popover",a);break;case"xlinkActuate":En(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":En(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":En(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":En(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":En(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":En(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":En(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":En(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":En(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Ws(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Fg.get(n)||n,Ws(e,n,a))}}function Rc(e,t,n,a,c,u){switch(n){case"style":cd(e,a,u);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(o(61));if(n=a.__html,n!=null){if(c.children!=null)throw Error(o(60));e.innerHTML=n}}break;case"children":typeof a=="string"?Pa(e,a):(typeof a=="number"||typeof a=="bigint")&&Pa(e,""+a);break;case"onScroll":a!=null&&we("scroll",e);break;case"onScrollEnd":a!=null&&we("scrollend",e);break;case"onClick":a!=null&&(e.onclick=bn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ed.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(c=n.endsWith("Capture"),t=n.slice(2,c?n.length-7:void 0),u=e[jt]||null,u=u!=null?u[n]:null,typeof u=="function"&&e.removeEventListener(t,u,c),typeof a=="function")){typeof u!="function"&&u!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,a,c);break e}n in e?e[n]=a:a===!0?e.setAttribute(n,""):Ws(e,n,a)}}}function vt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":we("error",e),we("load",e);var a=!1,c=!1,u;for(u in n)if(n.hasOwnProperty(u)){var h=n[u];if(h!=null)switch(u){case"src":a=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:qe(e,t,u,h,n,null)}}c&&qe(e,t,"srcSet",n.srcSet,n,null),a&&qe(e,t,"src",n.src,n,null);return;case"input":we("invalid",e);var x=u=h=c=null,C=null,D=null;for(a in n)if(n.hasOwnProperty(a)){var G=n[a];if(G!=null)switch(a){case"name":c=G;break;case"type":h=G;break;case"checked":C=G;break;case"defaultChecked":D=G;break;case"value":u=G;break;case"defaultValue":x=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(o(137,t));break;default:qe(e,t,a,G,n,null)}}sd(e,u,x,C,D,h,c,!1);return;case"select":we("invalid",e),a=h=u=null;for(c in n)if(n.hasOwnProperty(c)&&(x=n[c],x!=null))switch(c){case"value":u=x;break;case"defaultValue":h=x;break;case"multiple":a=x;default:qe(e,t,c,x,n,null)}t=u,n=h,e.multiple=!!a,t!=null?Fa(e,!!a,t,!1):n!=null&&Fa(e,!!a,n,!0);return;case"textarea":we("invalid",e),u=c=a=null;for(h in n)if(n.hasOwnProperty(h)&&(x=n[h],x!=null))switch(h){case"value":a=x;break;case"defaultValue":c=x;break;case"children":u=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(o(91));break;default:qe(e,t,h,x,n,null)}rd(e,a,c,u);return;case"option":for(C in n)n.hasOwnProperty(C)&&(a=n[C],a!=null)&&(C==="selected"?e.selected=a&&typeof a!="function"&&typeof a!="symbol":qe(e,t,C,a,n,null));return;case"dialog":we("beforetoggle",e),we("toggle",e),we("cancel",e),we("close",e);break;case"iframe":case"object":we("load",e);break;case"video":case"audio":for(a=0;a<Es.length;a++)we(Es[a],e);break;case"image":we("error",e),we("load",e);break;case"details":we("toggle",e);break;case"embed":case"source":case"link":we("error",e),we("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(D in n)if(n.hasOwnProperty(D)&&(a=n[D],a!=null))switch(D){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:qe(e,t,D,a,n,null)}return;default:if(Vr(t)){for(G in n)n.hasOwnProperty(G)&&(a=n[G],a!==void 0&&Rc(e,t,G,a,n,void 0));return}}for(x in n)n.hasOwnProperty(x)&&(a=n[x],a!=null&&qe(e,t,x,a,n,null))}function bv(e,t,n,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,u=null,h=null,x=null,C=null,D=null,G=null;for(B in n){var I=n[B];if(n.hasOwnProperty(B)&&I!=null)switch(B){case"checked":break;case"value":break;case"defaultValue":C=I;default:a.hasOwnProperty(B)||qe(e,t,B,null,a,I)}}for(var M in a){var B=a[M];if(I=n[M],a.hasOwnProperty(M)&&(B!=null||I!=null))switch(M){case"type":u=B;break;case"name":c=B;break;case"checked":D=B;break;case"defaultChecked":G=B;break;case"value":h=B;break;case"defaultValue":x=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(o(137,t));break;default:B!==I&&qe(e,t,M,B,a,I)}}Gr(e,h,x,C,D,G,u,c);return;case"select":B=h=x=M=null;for(u in n)if(C=n[u],n.hasOwnProperty(u)&&C!=null)switch(u){case"value":break;case"multiple":B=C;default:a.hasOwnProperty(u)||qe(e,t,u,null,a,C)}for(c in a)if(u=a[c],C=n[c],a.hasOwnProperty(c)&&(u!=null||C!=null))switch(c){case"value":M=u;break;case"defaultValue":x=u;break;case"multiple":h=u;default:u!==C&&qe(e,t,c,u,a,C)}t=x,n=h,a=B,M!=null?Fa(e,!!n,M,!1):!!a!=!!n&&(t!=null?Fa(e,!!n,t,!0):Fa(e,!!n,n?[]:"",!1));return;case"textarea":B=M=null;for(x in n)if(c=n[x],n.hasOwnProperty(x)&&c!=null&&!a.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:qe(e,t,x,null,a,c)}for(h in a)if(c=a[h],u=n[h],a.hasOwnProperty(h)&&(c!=null||u!=null))switch(h){case"value":M=c;break;case"defaultValue":B=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(o(91));break;default:c!==u&&qe(e,t,h,c,a,u)}id(e,M,B);return;case"option":for(var le in n)M=n[le],n.hasOwnProperty(le)&&M!=null&&!a.hasOwnProperty(le)&&(le==="selected"?e.selected=!1:qe(e,t,le,null,a,M));for(C in a)M=a[C],B=n[C],a.hasOwnProperty(C)&&M!==B&&(M!=null||B!=null)&&(C==="selected"?e.selected=M&&typeof M!="function"&&typeof M!="symbol":qe(e,t,C,M,a,B));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 me in n)M=n[me],n.hasOwnProperty(me)&&M!=null&&!a.hasOwnProperty(me)&&qe(e,t,me,null,a,M);for(D in a)if(M=a[D],B=n[D],a.hasOwnProperty(D)&&M!==B&&(M!=null||B!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(o(137,t));break;default:qe(e,t,D,M,a,B)}return;default:if(Vr(t)){for(var Ge in n)M=n[Ge],n.hasOwnProperty(Ge)&&M!==void 0&&!a.hasOwnProperty(Ge)&&Rc(e,t,Ge,void 0,a,M);for(G in a)M=a[G],B=n[G],!a.hasOwnProperty(G)||M===B||M===void 0&&B===void 0||Rc(e,t,G,M,a,B);return}}for(var R in n)M=n[R],n.hasOwnProperty(R)&&M!=null&&!a.hasOwnProperty(R)&&qe(e,t,R,null,a,M);for(I in a)M=a[I],B=n[I],!a.hasOwnProperty(I)||M===B||M==null&&B==null||qe(e,t,I,M,a,B)}function dm(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function jv(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),a=0;a<n.length;a++){var c=n[a],u=c.transferSize,h=c.initiatorType,x=c.duration;if(u&&x&&dm(h)){for(h=0,x=c.responseEnd,a+=1;a<n.length;a++){var C=n[a],D=C.startTime;if(D>x)break;var G=C.transferSize,I=C.initiatorType;G&&dm(I)&&(C=C.responseEnd,h+=G*(C<x?1:(x-D)/(C-D)))}if(--a,t+=8*(u+h)/(c.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 Oc=null,zc=null;function Fi(e){return e.nodeType===9?e:e.ownerDocument}function fm(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 hm(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 Dc(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 kc=null;function Cv(){var e=window.event;return e&&e.type==="popstate"?e===kc?!1:(kc=e,!0):(kc=null,!1)}var mm=typeof setTimeout=="function"?setTimeout:void 0,Av=typeof clearTimeout=="function"?clearTimeout:void 0,pm=typeof Promise=="function"?Promise:void 0,Nv=typeof queueMicrotask=="function"?queueMicrotask:typeof pm<"u"?function(e){return pm.resolve(null).then(e).catch(wv)}:mm;function wv(e){setTimeout(function(){throw e})}function ca(e){return e==="head"}function gm(e,t){var n=t,a=0;do{var c=n.nextSibling;if(e.removeChild(n),c&&c.nodeType===8)if(n=c.data,n==="/$"||n==="/&"){if(a===0){e.removeChild(c),wl(t);return}a--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")a++;else if(n==="html")js(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,js(n);for(var u=n.firstChild;u;){var h=u.nextSibling,x=u.nodeName;u[Vl]||x==="SCRIPT"||x==="STYLE"||x==="LINK"&&u.rel.toLowerCase()==="stylesheet"||n.removeChild(u),u=h}}else n==="body"&&js(e.ownerDocument.body);n=c}while(n);wl(t)}function ym(e,t){var n=e;e=0;do{var a=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),a&&a.nodeType===8)if(n=a.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=a}while(n)}function Mc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Mc(n),Hr(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Rv(e,t,n,a){for(;e.nodeType===1;){var c=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Vl])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=tn(e.nextSibling),e===null)break}return null}function Ov(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=tn(e.nextSibling),e===null))return null;return e}function vm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=tn(e.nextSibling),e===null))return null;return e}function Uc(e){return e.data==="$?"||e.data==="$~"}function Bc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function zv(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var a=function(){t(),n.removeEventListener("DOMContentLoaded",a)};n.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function tn(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 Lc=null;function xm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return tn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function Tm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function Sm(e,t,n){switch(t=Fi(n),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function js(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Hr(e)}var nn=new Map,_m=new Set;function Pi(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var qn=P.d;P.d={f:Dv,r:kv,D:Mv,C:Uv,L:Bv,m:Lv,X:qv,S:Hv,M:Gv};function Dv(){var e=qn.f(),t=Vi();return e||t}function kv(e){var t=Za(e);t!==null&&t.tag===5&&t.type==="form"?Hf(t):qn.r(e)}var Cl=typeof document>"u"?null:document;function Em(e,t,n){var a=Cl;if(a&&typeof t=="string"&&t){var c=Zt(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof n=="string"&&(c+='[crossorigin="'+n+'"]'),_m.has(c)||(_m.add(c),e={rel:e,crossOrigin:n,href:t},a.querySelector(c)===null&&(t=a.createElement("link"),vt(t,"link",e),ft(t),a.head.appendChild(t)))}}function Mv(e){qn.D(e),Em("dns-prefetch",e,null)}function Uv(e,t){qn.C(e,t),Em("preconnect",e,t)}function Bv(e,t,n){qn.L(e,t,n);var a=Cl;if(a&&e&&t){var c='link[rel="preload"][as="'+Zt(t)+'"]';t==="image"&&n&&n.imageSrcSet?(c+='[imagesrcset="'+Zt(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(c+='[imagesizes="'+Zt(n.imageSizes)+'"]')):c+='[href="'+Zt(e)+'"]';var u=c;switch(t){case"style":u=Al(e);break;case"script":u=Nl(e)}nn.has(u)||(e=S({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),nn.set(u,e),a.querySelector(c)!==null||t==="style"&&a.querySelector(Cs(u))||t==="script"&&a.querySelector(As(u))||(t=a.createElement("link"),vt(t,"link",e),ft(t),a.head.appendChild(t)))}}function Lv(e,t){qn.m(e,t);var n=Cl;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+Zt(a)+'"][href="'+Zt(e)+'"]',u=c;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Nl(e)}if(!nn.has(u)&&(e=S({rel:"modulepreload",href:e},t),nn.set(u,e),n.querySelector(c)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(As(u)))return}a=n.createElement("link"),vt(a,"link",e),ft(a),n.head.appendChild(a)}}}function Hv(e,t,n){qn.S(e,t,n);var a=Cl;if(a&&e){var c=$a(a).hoistableStyles,u=Al(e);t=t||"default";var h=c.get(u);if(!h){var x={loading:0,preload:null};if(h=a.querySelector(Cs(u)))x.loading=5;else{e=S({rel:"stylesheet",href:e,"data-precedence":t},n),(n=nn.get(u))&&Hc(e,n);var C=h=a.createElement("link");ft(C),vt(C,"link",e),C._p=new Promise(function(D,G){C.onload=D,C.onerror=G}),C.addEventListener("load",function(){x.loading|=1}),C.addEventListener("error",function(){x.loading|=2}),x.loading|=4,Wi(h,t,a)}h={type:"stylesheet",instance:h,count:1,state:x},c.set(u,h)}}}function qv(e,t){qn.X(e,t);var n=Cl;if(n&&e){var a=$a(n).hoistableScripts,c=Nl(e),u=a.get(c);u||(u=n.querySelector(As(c)),u||(e=S({src:e,async:!0},t),(t=nn.get(c))&&qc(e,t),u=n.createElement("script"),ft(u),vt(u,"link",e),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(c,u))}}function Gv(e,t){qn.M(e,t);var n=Cl;if(n&&e){var a=$a(n).hoistableScripts,c=Nl(e),u=a.get(c);u||(u=n.querySelector(As(c)),u||(e=S({src:e,async:!0,type:"module"},t),(t=nn.get(c))&&qc(e,t),u=n.createElement("script"),ft(u),vt(u,"link",e),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(c,u))}}function bm(e,t,n,a){var c=(c=xe.current)?Pi(c):null;if(!c)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Al(n.href),n=$a(c).hoistableStyles,a=n.get(t),a||(a={type:"style",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Al(n.href);var u=$a(c).hoistableStyles,h=u.get(e);if(h||(c=c.ownerDocument||c,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,h),(u=c.querySelector(Cs(e)))&&!u._p&&(h.instance=u,h.state.loading=5),nn.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},nn.set(e,n),u||Yv(c,e,n,h.state))),t&&a===null)throw Error(o(528,""));return h}if(t&&a!==null)throw Error(o(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Nl(n),n=$a(c).hoistableScripts,a=n.get(t),a||(a={type:"script",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Al(e){return'href="'+Zt(e)+'"'}function Cs(e){return'link[rel="stylesheet"]['+e+"]"}function jm(e){return S({},e,{"data-precedence":e.precedence,precedence:null})}function Yv(e,t,n,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}),vt(t,"link",n),ft(t),e.head.appendChild(t))}function Nl(e){return'[src="'+Zt(e)+'"]'}function As(e){return"script[async]"+e}function Cm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Zt(n.href)+'"]');if(a)return t.instance=a,ft(a),a;var c=S({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),ft(a),vt(a,"style",c),Wi(a,n.precedence,e),t.instance=a;case"stylesheet":c=Al(n.href);var u=e.querySelector(Cs(c));if(u)return t.state.loading|=4,t.instance=u,ft(u),u;a=jm(n),(c=nn.get(c))&&Hc(a,c),u=(e.ownerDocument||e).createElement("link"),ft(u);var h=u;return h._p=new Promise(function(x,C){h.onload=x,h.onerror=C}),vt(u,"link",a),t.state.loading|=4,Wi(u,n.precedence,e),t.instance=u;case"script":return u=Nl(n.src),(c=e.querySelector(As(u)))?(t.instance=c,ft(c),c):(a=n,(c=nn.get(u))&&(a=S({},n),qc(a,c)),e=e.ownerDocument||e,c=e.createElement("script"),ft(c),vt(c,"link",a),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Wi(a,n.precedence,e));return t.instance}function Wi(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=a.length?a[a.length-1]:null,u=c,h=0;h<a.length;h++){var x=a[h];if(x.dataset.precedence===t)u=x;else if(u!==c)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Hc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function qc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var er=null;function Am(e,t,n){if(er===null){var a=new Map,c=er=new Map;c.set(n,a)}else c=er,a=c.get(n),a||(a=new Map,c.set(n,a));if(a.has(e))return a;for(a.set(e,null),n=n.getElementsByTagName(e),c=0;c<n.length;c++){var u=n[c];if(!(u[Vl]||u[mt]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var h=u.getAttribute(t)||"";h=e+h;var x=a.get(h);x?x.push(u):a.set(h,[u])}}return a}function Nm(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function Vv(e,t,n){if(n===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 wm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Xv(e,t,n,a){if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var c=Al(a.href),u=t.querySelector(Cs(c));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=tr.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=u,ft(u);return}u=t.ownerDocument||t,a=jm(a),(c=nn.get(c))&&Hc(a,c),u=u.createElement("link"),ft(u);var h=u;h._p=new Promise(function(x,C){h.onload=x,h.onerror=C}),vt(u,"link",a),n.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=tr.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Gc=0;function Iv(e,t){return e.stylesheets&&e.count===0&&ar(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var a=setTimeout(function(){if(e.stylesheets&&ar(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&Gc===0&&(Gc=62500*jv());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ar(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>Gc?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(c)}}:null}function tr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ar(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var nr=null;function ar(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,nr=new Map,t.forEach(Qv,e),nr=null,tr.call(e))}function Qv(e,t){if(!(t.state.loading&4)){var n=nr.get(e);if(n)var a=n.get(null);else{n=new Map,nr.set(e,n);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<c.length;u++){var h=c[u];(h.nodeName==="LINK"||h.getAttribute("media")!=="not all")&&(n.set(h.dataset.precedence,h),a=h)}a&&n.set(null,a)}c=t.instance,h=c.getAttribute("data-precedence"),u=n.get(h)||a,u===a&&n.set(null,c),n.set(h,c),this.count++,a=tr.bind(this),c.addEventListener("load",a),c.addEventListener("error",a),u?u.parentNode.insertBefore(c,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var Ns={$$typeof:$,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function Kv(e,t,n,a,c,u,h,x,C){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=Mr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mr(0),this.hiddenUpdates=Mr(null),this.identifierPrefix=a,this.onUncaughtError=c,this.onCaughtError=u,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=C,this.incompleteTransitions=new Map}function Rm(e,t,n,a,c,u,h,x,C,D,G,I){return e=new Kv(e,t,n,h,C,D,G,I,x),t=1,u===!0&&(t|=24),u=Bt(3,null,null,t),e.current=u,u.stateNode=e,t=To(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:a,isDehydrated:n,cache:t},bo(u),e}function Om(e){return e?(e=sl,e):sl}function zm(e,t,n,a,c,u){c=Om(c),a.context===null?a.context=c:a.pendingContext=c,a=Pn(t),a.payload={element:n},u=u===void 0?null:u,u!==null&&(a.callback=u),n=Wn(e,a,t),n!==null&&(Ot(n,e,t),is(n,e,t))}function Dm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Yc(e,t){Dm(e,t),(e=e.alternate)&&Dm(e,t)}function km(e){if(e.tag===13||e.tag===31){var t=Na(e,67108864);t!==null&&Ot(t,e,67108864),Yc(e,67108864)}}function Mm(e){if(e.tag===13||e.tag===31){var t=Yt();t=Ur(t);var n=Na(e,t);n!==null&&Ot(n,e,t),Yc(e,t)}}var lr=!0;function Zv(e,t,n,a){var c=H.T;H.T=null;var u=P.p;try{P.p=2,Vc(e,t,n,a)}finally{P.p=u,H.T=c}}function $v(e,t,n,a){var c=H.T;H.T=null;var u=P.p;try{P.p=8,Vc(e,t,n,a)}finally{P.p=u,H.T=c}}function Vc(e,t,n,a){if(lr){var c=Xc(a);if(c===null)wc(e,t,a,sr,n),Bm(e,a);else if(Fv(c,e,t,n,a))a.stopPropagation();else if(Bm(e,a),t&4&&-1<Jv.indexOf(e)){for(;c!==null;){var u=Za(c);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var h=Ea(u.pendingLanes);if(h!==0){var x=u;for(x.pendingLanes|=2,x.entangledLanes|=2;h;){var C=1<<31-Mt(h);x.entanglements[1]|=C,h&=~C}yn(u),(Ue&6)===0&&(Gi=_t()+500,_s(0))}}break;case 31:case 13:x=Na(u,2),x!==null&&Ot(x,u,2),Vi(),Yc(u,2)}if(u=Xc(a),u===null&&wc(e,t,a,sr,n),u===c)break;c=u}c!==null&&a.stopPropagation()}else wc(e,t,a,null,n)}}function Xc(e){return e=Ir(e),Ic(e)}var sr=null;function Ic(e){if(sr=null,e=Ka(e),e!==null){var t=f(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=g(t),e!==null)return e;e=null}else if(n===31){if(e=y(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return sr=e,null}function Um(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(zr()){case Qs:return 2;case Ks:return 8;case Xa:case Zs:return 32;case Ia:return 268435456;default:return 32}default:return 32}}var Qc=!1,ua=null,da=null,fa=null,ws=new Map,Rs=new Map,ha=[],Jv="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 Bm(e,t){switch(e){case"focusin":case"focusout":ua=null;break;case"dragenter":case"dragleave":da=null;break;case"mouseover":case"mouseout":fa=null;break;case"pointerover":case"pointerout":ws.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Rs.delete(t.pointerId)}}function Os(e,t,n,a,c,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:u,targetContainers:[c]},t!==null&&(t=Za(t),t!==null&&km(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function Fv(e,t,n,a,c){switch(t){case"focusin":return ua=Os(ua,e,t,n,a,c),!0;case"dragenter":return da=Os(da,e,t,n,a,c),!0;case"mouseover":return fa=Os(fa,e,t,n,a,c),!0;case"pointerover":var u=c.pointerId;return ws.set(u,Os(ws.get(u)||null,e,t,n,a,c)),!0;case"gotpointercapture":return u=c.pointerId,Rs.set(u,Os(Rs.get(u)||null,e,t,n,a,c)),!0}return!1}function Lm(e){var t=Ka(e.target);if(t!==null){var n=f(t);if(n!==null){if(t=n.tag,t===13){if(t=g(n),t!==null){e.blockedOn=t,Fu(e.priority,function(){Mm(n)});return}}else if(t===31){if(t=y(n),t!==null){e.blockedOn=t,Fu(e.priority,function(){Mm(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ir(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Xc(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);Xr=a,n.target.dispatchEvent(a),Xr=null}else return t=Za(n),t!==null&&km(t),e.blockedOn=n,!1;t.shift()}return!0}function Hm(e,t,n){ir(e)&&n.delete(t)}function Pv(){Qc=!1,ua!==null&&ir(ua)&&(ua=null),da!==null&&ir(da)&&(da=null),fa!==null&&ir(fa)&&(fa=null),ws.forEach(Hm),Rs.forEach(Hm)}function rr(e,t){e.blockedOn===t&&(e.blockedOn=null,Qc||(Qc=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,Pv)))}var or=null;function qm(e){or!==e&&(or=e,s.unstable_scheduleCallback(s.unstable_NormalPriority,function(){or===e&&(or=null);for(var t=0;t<e.length;t+=3){var n=e[t],a=e[t+1],c=e[t+2];if(typeof a!="function"){if(Ic(a||n)===null)continue;break}var u=Za(n);u!==null&&(e.splice(t,3),t-=3,Xo(u,{pending:!0,data:c,method:n.method,action:a},a,c))}}))}function wl(e){function t(C){return rr(C,e)}ua!==null&&rr(ua,e),da!==null&&rr(da,e),fa!==null&&rr(fa,e),ws.forEach(t),Rs.forEach(t);for(var n=0;n<ha.length;n++){var a=ha[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<ha.length&&(n=ha[0],n.blockedOn===null);)Lm(n),n.blockedOn===null&&ha.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(a=0;a<n.length;a+=3){var c=n[a],u=n[a+1],h=c[jt]||null;if(typeof u=="function")h||qm(n);else if(h){var x=null;if(u&&u.hasAttribute("formAction")){if(c=u,h=u[jt]||null)x=h.formAction;else if(Ic(c)!==null)continue}else x=h.action;typeof x=="function"?n[a+1]=x:(n.splice(a,3),a-=3),qm(n)}}}function Gm(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(h){return c=h})},focusReset:"manual",scroll:"manual"})}function t(){c!==null&&(c(),c=null),a||setTimeout(n,20)}function n(){if(!a&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),c!==null&&(c(),c=null)}}}function Kc(e){this._internalRoot=e}cr.prototype.render=Kc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var n=t.current,a=Yt();zm(n,a,e,t,null,null)},cr.prototype.unmount=Kc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;zm(e.current,2,null,e,null,null),Vi(),t[Qa]=null}};function cr(e){this._internalRoot=e}cr.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ju();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ha.length&&t!==0&&t<ha[n].priority;n++);ha.splice(n,0,e),n===0&&Lm(e)}};var Ym=l.version;if(Ym!=="19.2.3")throw Error(o(527,Ym,"19.2.3"));P.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=p(t),e=e!==null?T(e):null,e=e===null?null:e.stateNode,e};var Wv={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ur=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ur.isDisabled&&ur.supportsFiber)try{W=ur.inject(Wv),fe=ur}catch{}}return Ds.createRoot=function(e,t){if(!d(e))throw Error(o(299));var n=!1,a="",c=$f,u=Jf,h=Ff;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(h=t.onRecoverableError)),t=Rm(e,1,!1,null,null,n,a,null,c,u,h,Gm),e[Qa]=t.current,Nc(e),new Kc(t)},Ds.hydrateRoot=function(e,t,n){if(!d(e))throw Error(o(299));var a=!1,c="",u=$f,h=Jf,x=Ff,C=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(c=n.identifierPrefix),n.onUncaughtError!==void 0&&(u=n.onUncaughtError),n.onCaughtError!==void 0&&(h=n.onCaughtError),n.onRecoverableError!==void 0&&(x=n.onRecoverableError),n.formState!==void 0&&(C=n.formState)),t=Rm(e,1,!0,t,n??null,a,c,C,u,h,x,Gm),t.context=Om(null),n=t.current,a=Yt(),a=Ur(a),c=Pn(a),c.callback=null,Wn(n,c,a),n=a,t.current.lanes=n,Yl(t,n),yn(t),e[Qa]=t.current,Nc(e),new cr(t)},Ds.version="19.2.3",Ds}var Pm;function ux(){if(Pm)return Jc.exports;Pm=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(l){console.error(l)}}return s(),Jc.exports=cx(),Jc.exports}var dx=ux();const fx=Up(dx);var Wm="popstate";function hx(s={}){function l(o,d){let{pathname:f,search:g,hash:y}=o.location;return mu("",{pathname:f,search:g,hash:y},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function r(o,d){return typeof d=="string"?d:qs(d)}return px(l,r,null,s)}function $e(s,l){if(s===!1||s===null||typeof s>"u")throw new Error(l)}function Xt(s,l){if(!s){typeof console<"u"&&console.warn(l);try{throw new Error(l)}catch{}}}function mx(){return Math.random().toString(36).substring(2,10)}function ep(s,l){return{usr:s.state,key:s.key,idx:l}}function mu(s,l,r=null,o){return{pathname:typeof s=="string"?s:s.pathname,search:"",hash:"",...typeof l=="string"?Dl(l):l,state:r,key:l&&l.key||o||mx()}}function qs({pathname:s="/",search:l="",hash:r=""}){return l&&l!=="?"&&(s+=l.charAt(0)==="?"?l:"?"+l),r&&r!=="#"&&(s+=r.charAt(0)==="#"?r:"#"+r),s}function Dl(s){let l={};if(s){let r=s.indexOf("#");r>=0&&(l.hash=s.substring(r),s=s.substring(0,r));let o=s.indexOf("?");o>=0&&(l.search=s.substring(o),s=s.substring(0,o)),s&&(l.pathname=s)}return l}function px(s,l,r,o={}){let{window:d=document.defaultView,v5Compat:f=!1}=o,g=d.history,y="POP",v=null,p=T();p==null&&(p=0,g.replaceState({...g.state,idx:p},""));function T(){return(g.state||{idx:null}).idx}function S(){y="POP";let k=T(),q=k==null?null:k-p;p=k,v&&v({action:y,location:w.location,delta:q})}function j(k,q){y="PUSH";let Q=mu(w.location,k,q);p=T()+1;let $=ep(Q,p),ae=w.createHref(Q);try{g.pushState($,"",ae)}catch(O){if(O instanceof DOMException&&O.name==="DataCloneError")throw O;d.location.assign(ae)}f&&v&&v({action:y,location:w.location,delta:1})}function E(k,q){y="REPLACE";let Q=mu(w.location,k,q);p=T();let $=ep(Q,p),ae=w.createHref(Q);g.replaceState($,"",ae),f&&v&&v({action:y,location:w.location,delta:0})}function b(k){return gx(k)}let w={get action(){return y},get location(){return s(d,g)},listen(k){if(v)throw new Error("A history only accepts one active listener");return d.addEventListener(Wm,S),v=k,()=>{d.removeEventListener(Wm,S),v=null}},createHref(k){return l(d,k)},createURL:b,encodeLocation(k){let q=b(k);return{pathname:q.pathname,search:q.search,hash:q.hash}},push:j,replace:E,go(k){return g.go(k)}};return w}function gx(s,l=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),$e(r,"No window.location.(origin|href) available to create URL");let o=typeof s=="string"?s:qs(s);return o=o.replace(/ $/,"%20"),!l&&o.startsWith("//")&&(o=r+o),new URL(o,r)}function Bp(s,l,r="/"){return yx(s,l,r,!1)}function yx(s,l,r,o){let d=typeof l=="string"?Dl(l):l,f=Yn(d.pathname||"/",r);if(f==null)return null;let g=Lp(s);vx(g);let y=null;for(let v=0;y==null&&v<g.length;++v){let p=wx(f);y=Ax(g[v],p,o)}return y}function Lp(s,l=[],r=[],o="",d=!1){let f=(g,y,v=d,p)=>{let T={relativePath:p===void 0?g.path||"":p,caseSensitive:g.caseSensitive===!0,childrenIndex:y,route:g};if(T.relativePath.startsWith("/")){if(!T.relativePath.startsWith(o)&&v)return;$e(T.relativePath.startsWith(o),`Absolute route path "${T.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),T.relativePath=T.relativePath.slice(o.length)}let S=Gn([o,T.relativePath]),j=r.concat(T);g.children&&g.children.length>0&&($e(g.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${S}".`),Lp(g.children,l,j,S,v)),!(g.path==null&&!g.index)&&l.push({path:S,score:jx(S,g.index),routesMeta:j})};return s.forEach((g,y)=>{if(g.path===""||!g.path?.includes("?"))f(g,y);else for(let v of Hp(g.path))f(g,y,!0,v)}),l}function Hp(s){let l=s.split("/");if(l.length===0)return[];let[r,...o]=l,d=r.endsWith("?"),f=r.replace(/\?$/,"");if(o.length===0)return d?[f,""]:[f];let g=Hp(o.join("/")),y=[];return y.push(...g.map(v=>v===""?f:[f,v].join("/"))),d&&y.push(...g),y.map(v=>s.startsWith("/")&&v===""?"/":v)}function vx(s){s.sort((l,r)=>l.score!==r.score?r.score-l.score:Cx(l.routesMeta.map(o=>o.childrenIndex),r.routesMeta.map(o=>o.childrenIndex)))}var xx=/^:[\w-]+$/,Tx=3,Sx=2,_x=1,Ex=10,bx=-2,tp=s=>s==="*";function jx(s,l){let r=s.split("/"),o=r.length;return r.some(tp)&&(o+=bx),l&&(o+=Sx),r.filter(d=>!tp(d)).reduce((d,f)=>d+(xx.test(f)?Tx:f===""?_x:Ex),o)}function Cx(s,l){return s.length===l.length&&s.slice(0,-1).every((o,d)=>o===l[d])?s[s.length-1]-l[l.length-1]:0}function Ax(s,l,r=!1){let{routesMeta:o}=s,d={},f="/",g=[];for(let y=0;y<o.length;++y){let v=o[y],p=y===o.length-1,T=f==="/"?l:l.slice(f.length)||"/",S=Er({path:v.relativePath,caseSensitive:v.caseSensitive,end:p},T),j=v.route;if(!S&&p&&r&&!o[o.length-1].route.index&&(S=Er({path:v.relativePath,caseSensitive:v.caseSensitive,end:!1},T)),!S)return null;Object.assign(d,S.params),g.push({params:d,pathname:Gn([f,S.pathname]),pathnameBase:Dx(Gn([f,S.pathnameBase])),route:j}),S.pathnameBase!=="/"&&(f=Gn([f,S.pathnameBase]))}return g}function Er(s,l){typeof s=="string"&&(s={path:s,caseSensitive:!1,end:!0});let[r,o]=Nx(s.path,s.caseSensitive,s.end),d=l.match(r);if(!d)return null;let f=d[0],g=f.replace(/(.)\/+$/,"$1"),y=d.slice(1);return{params:o.reduce((p,{paramName:T,isOptional:S},j)=>{if(T==="*"){let b=y[j]||"";g=f.slice(0,f.length-b.length).replace(/(.)\/+$/,"$1")}const E=y[j];return S&&!E?p[T]=void 0:p[T]=(E||"").replace(/%2F/g,"/"),p},{}),pathname:f,pathnameBase:g,pattern:s}}function Nx(s,l=!1,r=!0){Xt(s==="*"||!s.endsWith("*")||s.endsWith("/*"),`Route path "${s}" will be treated as if it were "${s.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${s.replace(/\*$/,"/*")}".`);let o=[],d="^"+s.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(g,y,v)=>(o.push({paramName:y,isOptional:v!=null}),v?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return s.endsWith("*")?(o.push({paramName:"*"}),d+=s==="*"||s==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?d+="\\/*$":s!==""&&s!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,l?void 0:"i"),o]}function wx(s){try{return s.split("/").map(l=>decodeURIComponent(l).replace(/\//g,"%2F")).join("/")}catch(l){return Xt(!1,`The URL path "${s}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${l}).`),s}}function Yn(s,l){if(l==="/")return s;if(!s.toLowerCase().startsWith(l.toLowerCase()))return null;let r=l.endsWith("/")?l.length-1:l.length,o=s.charAt(r);return o&&o!=="/"?null:s.slice(r)||"/"}var qp=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Rx=s=>qp.test(s);function Ox(s,l="/"){let{pathname:r,search:o="",hash:d=""}=typeof s=="string"?Dl(s):s,f;if(r)if(Rx(r))f=r;else{if(r.includes("//")){let g=r;r=r.replace(/\/\/+/g,"/"),Xt(!1,`Pathnames cannot have embedded double slashes - normalizing ${g} -> ${r}`)}r.startsWith("/")?f=np(r.substring(1),"/"):f=np(r,l)}else f=l;return{pathname:f,search:kx(o),hash:Mx(d)}}function np(s,l){let r=l.replace(/\/+$/,"").split("/");return s.split("/").forEach(d=>{d===".."?r.length>1&&r.pop():d!=="."&&r.push(d)}),r.length>1?r.join("/"):"/"}function eu(s,l,r,o){return`Cannot include a '${s}' character in a manually specified \`to.${l}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function zx(s){return s.filter((l,r)=>r===0||l.route.path&&l.route.path.length>0)}function Au(s){let l=zx(s);return l.map((r,o)=>o===l.length-1?r.pathname:r.pathnameBase)}function Nu(s,l,r,o=!1){let d;typeof s=="string"?d=Dl(s):(d={...s},$e(!d.pathname||!d.pathname.includes("?"),eu("?","pathname","search",d)),$e(!d.pathname||!d.pathname.includes("#"),eu("#","pathname","hash",d)),$e(!d.search||!d.search.includes("#"),eu("#","search","hash",d)));let f=s===""||d.pathname==="",g=f?"/":d.pathname,y;if(g==null)y=r;else{let S=l.length-1;if(!o&&g.startsWith("..")){let j=g.split("/");for(;j[0]==="..";)j.shift(),S-=1;d.pathname=j.join("/")}y=S>=0?l[S]:"/"}let v=Ox(d,y),p=g&&g!=="/"&&g.endsWith("/"),T=(f||g===".")&&r.endsWith("/");return!v.pathname.endsWith("/")&&(p||T)&&(v.pathname+="/"),v}var Gn=s=>s.join("/").replace(/\/\/+/g,"/"),Dx=s=>s.replace(/\/+$/,"").replace(/^\/*/,"/"),kx=s=>!s||s==="?"?"":s.startsWith("?")?s:"?"+s,Mx=s=>!s||s==="#"?"":s.startsWith("#")?s:"#"+s,Ux=class{constructor(s,l,r,o=!1){this.status=s,this.statusText=l||"",this.internal=o,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function Bx(s){return s!=null&&typeof s.status=="number"&&typeof s.statusText=="string"&&typeof s.internal=="boolean"&&"data"in s}function Lx(s){return s.map(l=>l.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Gp=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Yp(s,l){let r=s;if(typeof r!="string"||!qp.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let o=r,d=!1;if(Gp)try{let f=new URL(window.location.href),g=r.startsWith("//")?new URL(f.protocol+r):new URL(r),y=Yn(g.pathname,l);g.origin===f.origin&&y!=null?r=y+g.search+g.hash:d=!0}catch{Xt(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:d,to:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Vp=["POST","PUT","PATCH","DELETE"];new Set(Vp);var Hx=["GET",...Vp];new Set(Hx);var kl=m.createContext(null);kl.displayName="DataRouter";var jr=m.createContext(null);jr.displayName="DataRouterState";var qx=m.createContext(!1),Xp=m.createContext({isTransitioning:!1});Xp.displayName="ViewTransition";var Gx=m.createContext(new Map);Gx.displayName="Fetchers";var Yx=m.createContext(null);Yx.displayName="Await";var It=m.createContext(null);It.displayName="Navigation";var Gs=m.createContext(null);Gs.displayName="Location";var ln=m.createContext({outlet:null,matches:[],isDataRoute:!1});ln.displayName="Route";var wu=m.createContext(null);wu.displayName="RouteError";var Ip="REACT_ROUTER_ERROR",Vx="REDIRECT",Xx="ROUTE_ERROR_RESPONSE";function Ix(s){if(s.startsWith(`${Ip}:${Vx}:{`))try{let l=JSON.parse(s.slice(28));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.location=="string"&&typeof l.reloadDocument=="boolean"&&typeof l.replace=="boolean")return l}catch{}}function Qx(s){if(s.startsWith(`${Ip}:${Xx}:{`))try{let l=JSON.parse(s.slice(40));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string")return new Ux(l.status,l.statusText,l.data)}catch{}}function Kx(s,{relative:l}={}){$e(Ml(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:o}=m.useContext(It),{hash:d,pathname:f,search:g}=Ys(s,{relative:l}),y=f;return r!=="/"&&(y=f==="/"?r:Gn([r,f])),o.createHref({pathname:y,search:g,hash:d})}function Ml(){return m.useContext(Gs)!=null}function kt(){return $e(Ml(),"useLocation() may be used only in the context of a <Router> component."),m.useContext(Gs).location}var Qp="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Kp(s){m.useContext(It).static||m.useLayoutEffect(s)}function Je(){let{isDataRoute:s}=m.useContext(ln);return s?oT():Zx()}function Zx(){$e(Ml(),"useNavigate() may be used only in the context of a <Router> component.");let s=m.useContext(kl),{basename:l,navigator:r}=m.useContext(It),{matches:o}=m.useContext(ln),{pathname:d}=kt(),f=JSON.stringify(Au(o)),g=m.useRef(!1);return Kp(()=>{g.current=!0}),m.useCallback((v,p={})=>{if(Xt(g.current,Qp),!g.current)return;if(typeof v=="number"){r.go(v);return}let T=Nu(v,JSON.parse(f),d,p.relative==="path");s==null&&l!=="/"&&(T.pathname=T.pathname==="/"?l:Gn([l,T.pathname])),(p.replace?r.replace:r.push)(T,p.state,p)},[l,r,f,d,s])}var $x=m.createContext(null);function Jx(s){let l=m.useContext(ln).outlet;return m.useMemo(()=>l&&m.createElement($x.Provider,{value:s},l),[l,s])}function ya(){let{matches:s}=m.useContext(ln),l=s[s.length-1];return l?l.params:{}}function Ys(s,{relative:l}={}){let{matches:r}=m.useContext(ln),{pathname:o}=kt(),d=JSON.stringify(Au(r));return m.useMemo(()=>Nu(s,JSON.parse(d),o,l==="path"),[s,d,o,l])}function Fx(s,l){return Zp(s,l)}function Zp(s,l,r,o,d){$e(Ml(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:f}=m.useContext(It),{matches:g}=m.useContext(ln),y=g[g.length-1],v=y?y.params:{},p=y?y.pathname:"/",T=y?y.pathnameBase:"/",S=y&&y.route;{let Q=S&&S.path||"";Jp(p,!S||Q.endsWith("*")||Q.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${Q}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
10
+
11
+ Please change the parent <Route path="${Q}"> to <Route path="${Q==="/"?"*":`${Q}/*`}">.`)}let j=kt(),E;if(l){let Q=typeof l=="string"?Dl(l):l;$e(T==="/"||Q.pathname?.startsWith(T),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${T}" but pathname "${Q.pathname}" was given in the \`location\` prop.`),E=Q}else E=j;let b=E.pathname||"/",w=b;if(T!=="/"){let Q=T.replace(/^\//,"").split("/");w="/"+b.replace(/^\//,"").split("/").slice(Q.length).join("/")}let k=Bp(s,{pathname:w});Xt(S||k!=null,`No routes matched location "${E.pathname}${E.search}${E.hash}" `),Xt(k==null||k[k.length-1].route.element!==void 0||k[k.length-1].route.Component!==void 0||k[k.length-1].route.lazy!==void 0,`Matched leaf route at location "${E.pathname}${E.search}${E.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let q=nT(k&&k.map(Q=>Object.assign({},Q,{params:Object.assign({},v,Q.params),pathname:Gn([T,f.encodeLocation?f.encodeLocation(Q.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Q.pathname]),pathnameBase:Q.pathnameBase==="/"?T:Gn([T,f.encodeLocation?f.encodeLocation(Q.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Q.pathnameBase])})),g,r,o,d);return l&&q?m.createElement(Gs.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...E},navigationType:"POP"}},q):q}function Px(){let s=rT(),l=Bx(s)?`${s.status} ${s.statusText}`:s instanceof Error?s.message:JSON.stringify(s),r=s instanceof Error?s.stack:null,o="rgba(200,200,200, 0.5)",d={padding:"0.5rem",backgroundColor:o},f={padding:"2px 4px",backgroundColor:o},g=null;return console.error("Error handled by React Router default ErrorBoundary:",s),g=m.createElement(m.Fragment,null,m.createElement("p",null,"💿 Hey developer 👋"),m.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",m.createElement("code",{style:f},"ErrorBoundary")," or"," ",m.createElement("code",{style:f},"errorElement")," prop on your route.")),m.createElement(m.Fragment,null,m.createElement("h2",null,"Unexpected Application Error!"),m.createElement("h3",{style:{fontStyle:"italic"}},l),r?m.createElement("pre",{style:d},r):null,g)}var Wx=m.createElement(Px,null),$p=class extends m.Component{constructor(s){super(s),this.state={location:s.location,revalidation:s.revalidation,error:s.error}}static getDerivedStateFromError(s){return{error:s}}static getDerivedStateFromProps(s,l){return l.location!==s.location||l.revalidation!=="idle"&&s.revalidation==="idle"?{error:s.error,location:s.location,revalidation:s.revalidation}:{error:s.error!==void 0?s.error:l.error,location:l.location,revalidation:s.revalidation||l.revalidation}}componentDidCatch(s,l){this.props.onError?this.props.onError(s,l):console.error("React Router caught the following error during render",s)}render(){let s=this.state.error;if(this.context&&typeof s=="object"&&s&&"digest"in s&&typeof s.digest=="string"){const r=Qx(s.digest);r&&(s=r)}let l=s!==void 0?m.createElement(ln.Provider,{value:this.props.routeContext},m.createElement(wu.Provider,{value:s,children:this.props.component})):this.props.children;return this.context?m.createElement(eT,{error:s},l):l}};$p.contextType=qx;var tu=new WeakMap;function eT({children:s,error:l}){let{basename:r}=m.useContext(It);if(typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){let o=Ix(l.digest);if(o){let d=tu.get(l);if(d)throw d;let f=Yp(o.location,r);if(Gp&&!tu.get(l))if(f.isExternal||o.reloadDocument)window.location.href=f.absoluteURL||f.to;else{const g=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:o.replace}));throw tu.set(l,g),g}return m.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return s}function tT({routeContext:s,match:l,children:r}){let o=m.useContext(kl);return o&&o.static&&o.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=l.route.id),m.createElement(ln.Provider,{value:s},r)}function nT(s,l=[],r=null,o=null,d=null){if(s==null){if(!r)return null;if(r.errors)s=r.matches;else if(l.length===0&&!r.initialized&&r.matches.length>0)s=r.matches;else return null}let f=s,g=r?.errors;if(g!=null){let T=f.findIndex(S=>S.route.id&&g?.[S.route.id]!==void 0);$e(T>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(g).join(",")}`),f=f.slice(0,Math.min(f.length,T+1))}let y=!1,v=-1;if(r)for(let T=0;T<f.length;T++){let S=f[T];if((S.route.HydrateFallback||S.route.hydrateFallbackElement)&&(v=T),S.route.id){let{loaderData:j,errors:E}=r,b=S.route.loader&&!j.hasOwnProperty(S.route.id)&&(!E||E[S.route.id]===void 0);if(S.route.lazy||b){y=!0,v>=0?f=f.slice(0,v+1):f=[f[0]];break}}}let p=r&&o?(T,S)=>{o(T,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:Lx(r.matches),errorInfo:S})}:void 0;return f.reduceRight((T,S,j)=>{let E,b=!1,w=null,k=null;r&&(E=g&&S.route.id?g[S.route.id]:void 0,w=S.route.errorElement||Wx,y&&(v<0&&j===0?(Jp("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),b=!0,k=null):v===j&&(b=!0,k=S.route.hydrateFallbackElement||null)));let q=l.concat(f.slice(0,j+1)),Q=()=>{let $;return E?$=w:b?$=k:S.route.Component?$=m.createElement(S.route.Component,null):S.route.element?$=S.route.element:$=T,m.createElement(tT,{match:S,routeContext:{outlet:T,matches:q,isDataRoute:r!=null},children:$})};return r&&(S.route.ErrorBoundary||S.route.errorElement||j===0)?m.createElement($p,{location:r.location,revalidation:r.revalidation,component:w,error:E,children:Q(),routeContext:{outlet:null,matches:q,isDataRoute:!0},onError:p}):Q()},null)}function Ru(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function aT(s){let l=m.useContext(kl);return $e(l,Ru(s)),l}function lT(s){let l=m.useContext(jr);return $e(l,Ru(s)),l}function sT(s){let l=m.useContext(ln);return $e(l,Ru(s)),l}function Ou(s){let l=sT(s),r=l.matches[l.matches.length-1];return $e(r.route.id,`${s} can only be used on routes that contain a unique "id"`),r.route.id}function iT(){return Ou("useRouteId")}function rT(){let s=m.useContext(wu),l=lT("useRouteError"),r=Ou("useRouteError");return s!==void 0?s:l.errors?.[r]}function oT(){let{router:s}=aT("useNavigate"),l=Ou("useNavigate"),r=m.useRef(!1);return Kp(()=>{r.current=!0}),m.useCallback(async(d,f={})=>{Xt(r.current,Qp),r.current&&(typeof d=="number"?await s.navigate(d):await s.navigate(d,{fromRouteId:l,...f}))},[s,l])}var ap={};function Jp(s,l,r){!l&&!ap[s]&&(ap[s]=!0,Xt(!1,r))}m.memo(cT);function cT({routes:s,future:l,state:r,onError:o}){return Zp(s,void 0,r,o,l)}function Cr({to:s,replace:l,state:r,relative:o}){$e(Ml(),"<Navigate> may be used only in the context of a <Router> component.");let{static:d}=m.useContext(It);Xt(!d,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:f}=m.useContext(ln),{pathname:g}=kt(),y=Je(),v=Nu(s,Au(f),g,o==="path"),p=JSON.stringify(v);return m.useEffect(()=>{y(JSON.parse(p),{replace:l,state:r,relative:o})},[y,p,o,l,r]),null}function Dt(s){return Jx(s.context)}function Se(s){$e(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function uT({basename:s="/",children:l=null,location:r,navigationType:o="POP",navigator:d,static:f=!1,unstable_useTransitions:g}){$e(!Ml(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let y=s.replace(/^\/*/,"/"),v=m.useMemo(()=>({basename:y,navigator:d,static:f,unstable_useTransitions:g,future:{}}),[y,d,f,g]);typeof r=="string"&&(r=Dl(r));let{pathname:p="/",search:T="",hash:S="",state:j=null,key:E="default"}=r,b=m.useMemo(()=>{let w=Yn(p,y);return w==null?null:{location:{pathname:w,search:T,hash:S,state:j,key:E},navigationType:o}},[y,p,T,S,j,E,o]);return Xt(b!=null,`<Router basename="${y}"> is not able to match the URL "${p}${T}${S}" because it does not start with the basename, so the <Router> won't render anything.`),b==null?null:m.createElement(It.Provider,{value:v},m.createElement(Gs.Provider,{children:l,value:b}))}function Vn({children:s,location:l}){return Fx(pu(s),l)}function pu(s,l=[]){let r=[];return m.Children.forEach(s,(o,d)=>{if(!m.isValidElement(o))return;let f=[...l,d];if(o.type===m.Fragment){r.push.apply(r,pu(o.props.children,f));return}$e(o.type===Se,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),$e(!o.props.index||!o.props.children,"An index route cannot have child routes.");let g={id:o.props.id||f.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(g.children=pu(o.props.children,f)),r.push(g)}),r}var vr="get",xr="application/x-www-form-urlencoded";function Ar(s){return typeof HTMLElement<"u"&&s instanceof HTMLElement}function dT(s){return Ar(s)&&s.tagName.toLowerCase()==="button"}function fT(s){return Ar(s)&&s.tagName.toLowerCase()==="form"}function hT(s){return Ar(s)&&s.tagName.toLowerCase()==="input"}function mT(s){return!!(s.metaKey||s.altKey||s.ctrlKey||s.shiftKey)}function pT(s,l){return s.button===0&&(!l||l==="_self")&&!mT(s)}function gu(s=""){return new URLSearchParams(typeof s=="string"||Array.isArray(s)||s instanceof URLSearchParams?s:Object.keys(s).reduce((l,r)=>{let o=s[r];return l.concat(Array.isArray(o)?o.map(d=>[r,d]):[[r,o]])},[]))}function gT(s,l){let r=gu(s);return l&&l.forEach((o,d)=>{r.has(d)||l.getAll(d).forEach(f=>{r.append(d,f)})}),r}var dr=null;function yT(){if(dr===null)try{new FormData(document.createElement("form"),0),dr=!1}catch{dr=!0}return dr}var vT=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function nu(s){return s!=null&&!vT.has(s)?(Xt(!1,`"${s}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${xr}"`),null):s}function xT(s,l){let r,o,d,f,g;if(fT(s)){let y=s.getAttribute("action");o=y?Yn(y,l):null,r=s.getAttribute("method")||vr,d=nu(s.getAttribute("enctype"))||xr,f=new FormData(s)}else if(dT(s)||hT(s)&&(s.type==="submit"||s.type==="image")){let y=s.form;if(y==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let v=s.getAttribute("formaction")||y.getAttribute("action");if(o=v?Yn(v,l):null,r=s.getAttribute("formmethod")||y.getAttribute("method")||vr,d=nu(s.getAttribute("formenctype"))||nu(y.getAttribute("enctype"))||xr,f=new FormData(y,s),!yT()){let{name:p,type:T,value:S}=s;if(T==="image"){let j=p?`${p}.`:"";f.append(`${j}x`,"0"),f.append(`${j}y`,"0")}else p&&f.append(p,S)}}else{if(Ar(s))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=vr,o=null,d=xr,g=s}return f&&d==="text/plain"&&(g=f,f=void 0),{action:o,method:r.toLowerCase(),encType:d,formData:f,body:g}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function zu(s,l){if(s===!1||s===null||typeof s>"u")throw new Error(l)}function TT(s,l,r){let o=typeof s=="string"?new URL(s,typeof window>"u"?"server://singlefetch/":window.location.origin):s;return o.pathname==="/"?o.pathname=`_root.${r}`:l&&Yn(o.pathname,l)==="/"?o.pathname=`${l.replace(/\/$/,"")}/_root.${r}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${r}`,o}async function ST(s,l){if(s.id in l)return l[s.id];try{let r=await import(s.module);return l[s.id]=r,r}catch(r){return console.error(`Error loading route module \`${s.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function _T(s){return s==null?!1:s.href==null?s.rel==="preload"&&typeof s.imageSrcSet=="string"&&typeof s.imageSizes=="string":typeof s.rel=="string"&&typeof s.href=="string"}async function ET(s,l,r){let o=await Promise.all(s.map(async d=>{let f=l.routes[d.route.id];if(f){let g=await ST(f,r);return g.links?g.links():[]}return[]}));return AT(o.flat(1).filter(_T).filter(d=>d.rel==="stylesheet"||d.rel==="preload").map(d=>d.rel==="stylesheet"?{...d,rel:"prefetch",as:"style"}:{...d,rel:"prefetch"}))}function lp(s,l,r,o,d,f){let g=(v,p)=>r[p]?v.route.id!==r[p].route.id:!0,y=(v,p)=>r[p].pathname!==v.pathname||r[p].route.path?.endsWith("*")&&r[p].params["*"]!==v.params["*"];return f==="assets"?l.filter((v,p)=>g(v,p)||y(v,p)):f==="data"?l.filter((v,p)=>{let T=o.routes[v.route.id];if(!T||!T.hasLoader)return!1;if(g(v,p)||y(v,p))return!0;if(v.route.shouldRevalidate){let S=v.route.shouldRevalidate({currentUrl:new URL(d.pathname+d.search+d.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(s,window.origin),nextParams:v.params,defaultShouldRevalidate:!0});if(typeof S=="boolean")return S}return!0}):[]}function bT(s,l,{includeHydrateFallback:r}={}){return jT(s.map(o=>{let d=l.routes[o.route.id];if(!d)return[];let f=[d.module];return d.clientActionModule&&(f=f.concat(d.clientActionModule)),d.clientLoaderModule&&(f=f.concat(d.clientLoaderModule)),r&&d.hydrateFallbackModule&&(f=f.concat(d.hydrateFallbackModule)),d.imports&&(f=f.concat(d.imports)),f}).flat(1))}function jT(s){return[...new Set(s)]}function CT(s){let l={},r=Object.keys(s).sort();for(let o of r)l[o]=s[o];return l}function AT(s,l){let r=new Set;return new Set(l),s.reduce((o,d)=>{let f=JSON.stringify(CT(d));return r.has(f)||(r.add(f),o.push({key:f,link:d})),o},[])}function Fp(){let s=m.useContext(kl);return zu(s,"You must render this element inside a <DataRouterContext.Provider> element"),s}function NT(){let s=m.useContext(jr);return zu(s,"You must render this element inside a <DataRouterStateContext.Provider> element"),s}var Du=m.createContext(void 0);Du.displayName="FrameworkContext";function Pp(){let s=m.useContext(Du);return zu(s,"You must render this element inside a <HydratedRouter> element"),s}function wT(s,l){let r=m.useContext(Du),[o,d]=m.useState(!1),[f,g]=m.useState(!1),{onFocus:y,onBlur:v,onMouseEnter:p,onMouseLeave:T,onTouchStart:S}=l,j=m.useRef(null);m.useEffect(()=>{if(s==="render"&&g(!0),s==="viewport"){let w=q=>{q.forEach(Q=>{g(Q.isIntersecting)})},k=new IntersectionObserver(w,{threshold:.5});return j.current&&k.observe(j.current),()=>{k.disconnect()}}},[s]),m.useEffect(()=>{if(o){let w=setTimeout(()=>{g(!0)},100);return()=>{clearTimeout(w)}}},[o]);let E=()=>{d(!0)},b=()=>{d(!1),g(!1)};return r?s!=="intent"?[f,j,{}]:[f,j,{onFocus:ks(y,E),onBlur:ks(v,b),onMouseEnter:ks(p,E),onMouseLeave:ks(T,b),onTouchStart:ks(S,E)}]:[!1,j,{}]}function ks(s,l){return r=>{s&&s(r),r.defaultPrevented||l(r)}}function RT({page:s,...l}){let{router:r}=Fp(),o=m.useMemo(()=>Bp(r.routes,s,r.basename),[r.routes,s,r.basename]);return o?m.createElement(zT,{page:s,matches:o,...l}):null}function OT(s){let{manifest:l,routeModules:r}=Pp(),[o,d]=m.useState([]);return m.useEffect(()=>{let f=!1;return ET(s,l,r).then(g=>{f||d(g)}),()=>{f=!0}},[s,l,r]),o}function zT({page:s,matches:l,...r}){let o=kt(),{manifest:d,routeModules:f}=Pp(),{basename:g}=Fp(),{loaderData:y,matches:v}=NT(),p=m.useMemo(()=>lp(s,l,v,d,o,"data"),[s,l,v,d,o]),T=m.useMemo(()=>lp(s,l,v,d,o,"assets"),[s,l,v,d,o]),S=m.useMemo(()=>{if(s===o.pathname+o.search+o.hash)return[];let b=new Set,w=!1;if(l.forEach(q=>{let Q=d.routes[q.route.id];!Q||!Q.hasLoader||(!p.some($=>$.route.id===q.route.id)&&q.route.id in y&&f[q.route.id]?.shouldRevalidate||Q.hasClientLoader?w=!0:b.add(q.route.id))}),b.size===0)return[];let k=TT(s,g,"data");return w&&b.size>0&&k.searchParams.set("_routes",l.filter(q=>b.has(q.route.id)).map(q=>q.route.id).join(",")),[k.pathname+k.search]},[g,y,o,d,p,l,s,f]),j=m.useMemo(()=>bT(T,d),[T,d]),E=OT(T);return m.createElement(m.Fragment,null,S.map(b=>m.createElement("link",{key:b,rel:"prefetch",as:"fetch",href:b,...r})),j.map(b=>m.createElement("link",{key:b,rel:"modulepreload",href:b,...r})),E.map(({key:b,link:w})=>m.createElement("link",{key:b,nonce:r.nonce,...w})))}function DT(...s){return l=>{s.forEach(r=>{typeof r=="function"?r(l):r!=null&&(r.current=l)})}}var kT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{kT&&(window.__reactRouterVersion="7.11.0")}catch{}function MT({basename:s,children:l,unstable_useTransitions:r,window:o}){let d=m.useRef();d.current==null&&(d.current=hx({window:o,v5Compat:!0}));let f=d.current,[g,y]=m.useState({action:f.action,location:f.location}),v=m.useCallback(p=>{r===!1?y(p):m.startTransition(()=>y(p))},[r]);return m.useLayoutEffect(()=>f.listen(v),[f,v]),m.createElement(uT,{basename:s,children:l,location:g.location,navigationType:g.action,navigator:f,unstable_useTransitions:r})}var Wp=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ul=m.forwardRef(function({onClick:l,discover:r="render",prefetch:o="none",relative:d,reloadDocument:f,replace:g,state:y,target:v,to:p,preventScrollReset:T,viewTransition:S,unstable_defaultShouldRevalidate:j,...E},b){let{basename:w,unstable_useTransitions:k}=m.useContext(It),q=typeof p=="string"&&Wp.test(p),Q=Yp(p,w);p=Q.to;let $=Kx(p,{relative:d}),[ae,O,L]=wT(o,E),U=HT(p,{replace:g,state:y,target:v,preventScrollReset:T,relative:d,viewTransition:S,unstable_defaultShouldRevalidate:j,unstable_useTransitions:k});function F(te){l&&l(te),te.defaultPrevented||U(te)}let ie=m.createElement("a",{...E,...L,href:Q.absoluteURL||$,onClick:Q.isExternal||f?l:F,ref:DT(b,O),target:v,"data-discover":!q&&r==="render"?"true":void 0});return ae&&!q?m.createElement(m.Fragment,null,ie,m.createElement(RT,{page:$})):ie});Ul.displayName="Link";var UT=m.forwardRef(function({"aria-current":l="page",caseSensitive:r=!1,className:o="",end:d=!1,style:f,to:g,viewTransition:y,children:v,...p},T){let S=Ys(g,{relative:p.relative}),j=kt(),E=m.useContext(jr),{navigator:b,basename:w}=m.useContext(It),k=E!=null&&IT(S)&&y===!0,q=b.encodeLocation?b.encodeLocation(S).pathname:S.pathname,Q=j.pathname,$=E&&E.navigation&&E.navigation.location?E.navigation.location.pathname:null;r||(Q=Q.toLowerCase(),$=$?$.toLowerCase():null,q=q.toLowerCase()),$&&w&&($=Yn($,w)||$);const ae=q!=="/"&&q.endsWith("/")?q.length-1:q.length;let O=Q===q||!d&&Q.startsWith(q)&&Q.charAt(ae)==="/",L=$!=null&&($===q||!d&&$.startsWith(q)&&$.charAt(q.length)==="/"),U={isActive:O,isPending:L,isTransitioning:k},F=O?l:void 0,ie;typeof o=="function"?ie=o(U):ie=[o,O?"active":null,L?"pending":null,k?"transitioning":null].filter(Boolean).join(" ");let te=typeof f=="function"?f(U):f;return m.createElement(Ul,{...p,"aria-current":F,className:ie,ref:T,style:te,to:g,viewTransition:y},typeof v=="function"?v(U):v)});UT.displayName="NavLink";var BT=m.forwardRef(({discover:s="render",fetcherKey:l,navigate:r,reloadDocument:o,replace:d,state:f,method:g=vr,action:y,onSubmit:v,relative:p,preventScrollReset:T,viewTransition:S,unstable_defaultShouldRevalidate:j,...E},b)=>{let{unstable_useTransitions:w}=m.useContext(It),k=VT(),q=XT(y,{relative:p}),Q=g.toLowerCase()==="get"?"get":"post",$=typeof y=="string"&&Wp.test(y),ae=O=>{if(v&&v(O),O.defaultPrevented)return;O.preventDefault();let L=O.nativeEvent.submitter,U=L?.getAttribute("formmethod")||g,F=()=>k(L||O.currentTarget,{fetcherKey:l,method:U,navigate:r,replace:d,state:f,relative:p,preventScrollReset:T,viewTransition:S,unstable_defaultShouldRevalidate:j});w&&r!==!1?m.startTransition(()=>F()):F()};return m.createElement("form",{ref:b,method:Q,action:q,onSubmit:o?v:ae,...E,"data-discover":!$&&s==="render"?"true":void 0})});BT.displayName="Form";function LT(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function eg(s){let l=m.useContext(kl);return $e(l,LT(s)),l}function HT(s,{target:l,replace:r,state:o,preventScrollReset:d,relative:f,viewTransition:g,unstable_defaultShouldRevalidate:y,unstable_useTransitions:v}={}){let p=Je(),T=kt(),S=Ys(s,{relative:f});return m.useCallback(j=>{if(pT(j,l)){j.preventDefault();let E=r!==void 0?r:qs(T)===qs(S),b=()=>p(s,{replace:E,state:o,preventScrollReset:d,relative:f,viewTransition:g,unstable_defaultShouldRevalidate:y});v?m.startTransition(()=>b()):b()}},[T,p,S,r,o,l,s,d,f,g,y,v])}function qT(s){Xt(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let l=m.useRef(gu(s)),r=m.useRef(!1),o=kt(),d=m.useMemo(()=>gT(o.search,r.current?null:l.current),[o.search]),f=Je(),g=m.useCallback((y,v)=>{const p=gu(typeof y=="function"?y(new URLSearchParams(d)):y);r.current=!0,f("?"+p,v)},[f,d]);return[d,g]}var GT=0,YT=()=>`__${String(++GT)}__`;function VT(){let{router:s}=eg("useSubmit"),{basename:l}=m.useContext(It),r=iT(),o=s.fetch,d=s.navigate;return m.useCallback(async(f,g={})=>{let{action:y,method:v,encType:p,formData:T,body:S}=xT(f,l);if(g.navigate===!1){let j=g.fetcherKey||YT();await o(j,r,g.action||y,{unstable_defaultShouldRevalidate:g.unstable_defaultShouldRevalidate,preventScrollReset:g.preventScrollReset,formData:T,body:S,formMethod:g.method||v,formEncType:g.encType||p,flushSync:g.flushSync})}else await d(g.action||y,{unstable_defaultShouldRevalidate:g.unstable_defaultShouldRevalidate,preventScrollReset:g.preventScrollReset,formData:T,body:S,formMethod:g.method||v,formEncType:g.encType||p,replace:g.replace,state:g.state,fromRouteId:r,flushSync:g.flushSync,viewTransition:g.viewTransition})},[o,d,l,r])}function XT(s,{relative:l}={}){let{basename:r}=m.useContext(It),o=m.useContext(ln);$e(o,"useFormAction must be used inside a RouteContext");let[d]=o.matches.slice(-1),f={...Ys(s||".",{relative:l})},g=kt();if(s==null){f.search=g.search;let y=new URLSearchParams(f.search),v=y.getAll("index");if(v.some(T=>T==="")){y.delete("index"),v.filter(S=>S).forEach(S=>y.append("index",S));let T=y.toString();f.search=T?`?${T}`:""}}return(!s||s===".")&&d.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(f.pathname=f.pathname==="/"?r:Gn([r,f.pathname])),qs(f)}function IT(s,{relative:l}={}){let r=m.useContext(Xp);$e(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=eg("useViewTransitionState"),d=Ys(s,{relative:l});if(!r.isTransitioning)return!1;let f=Yn(r.currentLocation.pathname,o)||r.currentLocation.pathname,g=Yn(r.nextLocation.pathname,o)||r.nextLocation.pathname;return Er(d.pathname,g)!=null||Er(d.pathname,f)!=null}const tg=m.createContext(void 0);function QT({children:s}){const[l,r]=m.useState(()=>localStorage.getItem("theme")||"light");m.useEffect(()=>{document.documentElement.setAttribute("data-theme",l),localStorage.setItem("theme",l)},[l]);const o=d=>{r(d)};return i.jsx(tg.Provider,{value:{theme:l,setTheme:o},children:s})}function KT(){const s=m.useContext(tg);if(!s)throw new Error("useTheme must be used within ThemeProvider");return s}class sp extends Error{url;status;statusText;body;request;constructor(l,r,o){super(o),this.name="ApiError",this.url=r.url,this.status=r.status,this.statusText=r.statusText,this.body=r.body,this.request=l}}class ZT extends Error{constructor(l){super(l),this.name="CancelError"}get isCancelled(){return!0}}class $T{#t;#n;#e;#a;#s;#i;#l;constructor(l){this.#t=!1,this.#n=!1,this.#e=!1,this.#a=[],this.#s=new Promise((r,o)=>{this.#i=r,this.#l=o;const d=y=>{this.#t||this.#n||this.#e||(this.#t=!0,this.#i&&this.#i(y))},f=y=>{this.#t||this.#n||this.#e||(this.#n=!0,this.#l&&this.#l(y))},g=y=>{this.#t||this.#n||this.#e||this.#a.push(y)};return Object.defineProperty(g,"isResolved",{get:()=>this.#t}),Object.defineProperty(g,"isRejected",{get:()=>this.#n}),Object.defineProperty(g,"isCancelled",{get:()=>this.#e}),l(d,f,g)})}get[Symbol.toStringTag](){return"Cancellable Promise"}then(l,r){return this.#s.then(l,r)}catch(l){return this.#s.catch(l)}finally(l){return this.#s.finally(l)}cancel(){if(!(this.#t||this.#n||this.#e)){if(this.#e=!0,this.#a.length)try{for(const l of this.#a)l()}catch(l){console.warn("Cancellation threw an error",l);return}this.#a.length=0,this.#l&&this.#l(new ZT("Request aborted"))}}get isCancelled(){return this.#e}}const V={BASE:"",VERSION:"1.0",WITH_CREDENTIALS:!1,CREDENTIALS:"include",TOKEN:void 0,USERNAME:void 0,PASSWORD:void 0,HEADERS:void 0,ENCODE_PATH:void 0};var ip;(function(s){(function(l){l.HUMAN="human",l.AGENT="agent"})(s.type||(s.type={}))})(ip||(ip={}));var ot;(function(s){(function(l){l.CLAUDE="claude",l.CODEX="codex",l.OPENCODE="opencode",l.ADK="adk",l.GITHUBCOPILOT="githubcopilot",l.OTHER="other"})(s.type||(s.type={}))})(ot||(ot={}));var rp;(function(s){(function(l){l.NOT_STARTED="not_started",l.USER_CONSENT_REJECTED="USER_CONSENT_REJECTED",l.MCP_AUTH_FLOW_STARTED="mcp_auth_flow_started",l.MCP_AUTH_FLOW_COMPLETED="mcp_auth_flow_completed",l.CONNECTIONS_FLOW_STARTED="connections_flow_started",l.CONNECTIONS_FLOW_COMPLETED="connections_flow_completed",l.AUTHORIZATION_CODE_ISSUED="authorization_code_issued",l.AUTHORIZATION_CODE_EXCHANGED="authorization_code_exchanged"})(s.status||(s.status={}))})(rp||(rp={}));var op;(function(s){(function(l){l.NOT_STARTED="NOT_STARTED",l.IN_PROGRESS="IN_PROGRESS",l.FOR_REVIEW="FOR_REVIEW",l.DONE="DONE"})(s.status||(s.status={}))})(op||(op={}));var cp;(function(s){(function(l){l.NONE="none",l.CLIENT_SECRET_BASIC="client_secret_basic"})(s.token_endpoint_auth_method||(s.token_endpoint_auth_method={}))})(cp||(cp={}));var up;(function(s){(function(l){l.PENDING="pending",l.AUTHORIZED="authorized",l.FAILED="failed"})(s.status||(s.status={}))})(up||(up={}));var dp;(function(s){(function(l){l.CLAUDE="claude",l.CODEX="codex",l.OPENCODE="opencode",l.ADK="adk",l.GITHUBCOPILOT="githubcopilot",l.OTHER="other"})(s.type||(s.type={}))})(dp||(dp={}));var fp;(function(s){(function(l){l.CLIENT_NOT_REGISTERED="CLIENT_NOT_REGISTERED",l.CLIENT_REGISTERED="CLIENT_REGISTERED",l.AUTHORIZATION_REQUEST_STARTED="AUTHORIZATION_REQUEST_STARTED",l.USER_CONSENT_OK="USER_CONSENT_OK",l.USER_CONSENT_REJECTED="USER_CONSENT_REJECTED",l.WAITING_ON_DOWNSTREAM_AUTH="WAITING_ON_DOWNSTREAM_AUTH",l.AUTHORIZATION_CODE_ISSUED="AUTHORIZATION_CODE_ISSUED",l.AUTHORIZATION_CODE_EXCHANGED="AUTHORIZATION_CODE_EXCHANGED"})(s.status||(s.status={}))})(fp||(fp={}));var hp;(function(s){(function(l){l.ACCESS_TOKEN="access_token",l.REFRESH_TOKEN="refresh_token"})(s.token_type_hint||(s.token_type_hint={}))})(hp||(hp={}));var mp;(function(s){(function(l){l.BEARER="Bearer"})(s.token_type||(s.token_type={}))})(mp||(mp={}));var pp;(function(s){(function(l){l.CLIENT_NOT_REGISTERED="CLIENT_NOT_REGISTERED",l.CLIENT_REGISTERED="CLIENT_REGISTERED",l.AUTHORIZATION_REQUEST_STARTED="AUTHORIZATION_REQUEST_STARTED",l.USER_CONSENT_OK="USER_CONSENT_OK",l.USER_CONSENT_REJECTED="USER_CONSENT_REJECTED",l.WAITING_ON_DOWNSTREAM_AUTH="WAITING_ON_DOWNSTREAM_AUTH",l.AUTHORIZATION_CODE_ISSUED="AUTHORIZATION_CODE_ISSUED",l.AUTHORIZATION_CODE_EXCHANGED="AUTHORIZATION_CODE_EXCHANGED"})(s.status||(s.status={}))})(pp||(pp={}));var gp;(function(s){(function(l){l.CLAUDE="claude",l.CODEX="codex",l.OPENCODE="opencode",l.ADK="adk",l.GITHUBCOPILOT="githubcopilot",l.OTHER="other"})(s.type||(s.type={}))})(gp||(gp={}));var yp;(function(s){(function(l){l.NONE="none",l.CLIENT_SECRET_BASIC="client_secret_basic"})(s.token_endpoint_auth_method||(s.token_endpoint_auth_method={}))})(yp||(yp={}));var yu;(function(s){(function(l){l.NOT_STARTED="NOT_STARTED",l.IN_PROGRESS="IN_PROGRESS",l.FOR_REVIEW="FOR_REVIEW",l.DONE="DONE"})(s.status||(s.status={}))})(yu||(yu={}));var vp;(function(s){(function(l){l.NOT_STARTED="NOT_STARTED",l.IN_PROGRESS="IN_PROGRESS",l.FOR_REVIEW="FOR_REVIEW",l.DONE="DONE"})(s.status||(s.status={}))})(vp||(vp={}));var xp;(function(s){(function(l){l.URN_IETF_PARAMS_OAUTH_GRANT_TYPE_TOKEN_EXCHANGE="urn:ietf:params:oauth:grant-type:token-exchange"})(s.grant_type||(s.grant_type={})),(function(l){l.URN_IETF_PARAMS_OAUTH_TOKEN_TYPE_ACCESS_TOKEN="urn:ietf:params:oauth:token-type:access_token"})(s.subject_token_type||(s.subject_token_type={}))})(xp||(xp={}));var Tp;(function(s){(function(l){l.AUTHORIZATION_CODE="authorization_code",l.REFRESH_TOKEN="refresh_token"})(s.grant_type||(s.grant_type={}))})(Tp||(Tp={}));var Sp;(function(s){(function(l){l.BEARER="Bearer"})(s.token_type||(s.token_type={}))})(Sp||(Sp={}));var _p;(function(s){(function(l){l.ADMIN="admin",l.STANDARD="standard"})(s.role||(s.role={}))})(_p||(_p={}));const ku=s=>s!=null,Vs=s=>typeof s=="string",au=s=>Vs(s)&&s!=="",Mu=s=>typeof s=="object"&&typeof s.type=="string"&&typeof s.stream=="function"&&typeof s.arrayBuffer=="function"&&typeof s.constructor=="function"&&typeof s.constructor.name=="string"&&/^(Blob|File)$/.test(s.constructor.name)&&/^(Blob|File)$/.test(s[Symbol.toStringTag]),ng=s=>s instanceof FormData,JT=s=>{try{return btoa(s)}catch{return Buffer.from(s).toString("base64")}},FT=s=>{const l=[],r=(d,f)=>{l.push(`${encodeURIComponent(d)}=${encodeURIComponent(String(f))}`)},o=(d,f)=>{ku(f)&&(Array.isArray(f)?f.forEach(g=>{o(d,g)}):typeof f=="object"?Object.entries(f).forEach(([g,y])=>{o(`${d}[${g}]`,y)}):r(d,f))};return Object.entries(s).forEach(([d,f])=>{o(d,f)}),l.length>0?`?${l.join("&")}`:""},PT=(s,l)=>{const r=encodeURI,o=l.url.replace("{api-version}",s.VERSION).replace(/{(.*?)}/g,(f,g)=>l.path?.hasOwnProperty(g)?r(String(l.path[g])):f),d=`${s.BASE}${o}`;return l.query?`${d}${FT(l.query)}`:d},WT=s=>{if(s.formData){const l=new FormData,r=(o,d)=>{Vs(d)||Mu(d)?l.append(o,d):l.append(o,JSON.stringify(d))};return Object.entries(s.formData).filter(([o,d])=>ku(d)).forEach(([o,d])=>{Array.isArray(d)?d.forEach(f=>r(o,f)):r(o,d)}),l}},fr=async(s,l)=>l,eS=async(s,l)=>{const[r,o,d,f]=await Promise.all([fr(l,s.TOKEN),fr(l,s.USERNAME),fr(l,s.PASSWORD),fr(l,s.HEADERS)]),g=Object.entries({Accept:"application/json",...f,...l.headers}).filter(([y,v])=>ku(v)).reduce((y,[v,p])=>({...y,[v]:String(p)}),{});if(au(r)&&(g.Authorization=`Bearer ${r}`),au(o)&&au(d)){const y=JT(`${o}:${d}`);g.Authorization=`Basic ${y}`}return l.body!==void 0&&(l.mediaType?g["Content-Type"]=l.mediaType:Mu(l.body)?g["Content-Type"]=l.body.type||"application/octet-stream":Vs(l.body)?g["Content-Type"]="text/plain":ng(l.body)||(g["Content-Type"]="application/json")),new Headers(g)},tS=s=>{if(s.body!==void 0)return s.mediaType?.includes("/json")?JSON.stringify(s.body):Vs(s.body)||Mu(s.body)||ng(s.body)?s.body:JSON.stringify(s.body)},nS=async(s,l,r,o,d,f,g)=>{const y=new AbortController,v={headers:f,body:o??d,method:l.method,signal:y.signal};return g(()=>y.abort()),await fetch(r,v)},aS=(s,l)=>{if(l){const r=s.headers.get(l);if(Vs(r))return r}},lS=async s=>{if(s.status!==204)try{const l=s.headers.get("Content-Type");if(l)return["application/json","application/problem+json"].some(d=>l.toLowerCase().startsWith(d))?await s.json():await s.text()}catch(l){console.error(l)}},sS=(s,l)=>{const o={400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable",...s.errors}[l.status];if(o)throw new sp(s,l,o);if(!l.ok){const d=l.status??"unknown",f=l.statusText??"unknown",g=(()=>{try{return JSON.stringify(l.body,null,2)}catch{return}})();throw new sp(s,l,`Generic Error: status: ${d}; status text: ${f}; body: ${g}`)}},K=(s,l)=>new $T(async(r,o,d)=>{try{const f=PT(s,l),g=WT(l),y=tS(l),v=await eS(s,l);if(!d.isCancelled){const p=await nS(s,l,f,y,g,v,d),T=await lS(p),S=aS(p,l.responseHeader),j={url:f,ok:p.ok,status:p.status,statusText:p.statusText,body:S??T};sS(l,j),r(j.body)}}catch(f){o(f)}});class ag{static actorControllerListActors(){return K(V,{method:"GET",url:"/api/v1/actors"})}static actorControllerSearchActors(l,r=10,o=.3){return K(V,{method:"GET",url:"/api/v1/actors/search",query:{query:l,limit:r,threshold:o}})}}class Ms{static agentsControllerCreateAgent(l){return K(V,{method:"POST",url:"/api/v1/agents",body:l,mediaType:"application/json"})}static agentsControllerListAgents(l,r=1,o=20){return K(V,{method:"GET",url:"/api/v1/agents",query:{isActive:l,page:r,limit:o}})}static agentsControllerGetAgentBySlug(l){return K(V,{method:"GET",url:"/api/v1/agents/{slug}",path:{slug:l}})}static agentsControllerPatchAgent(l,r){return K(V,{method:"PATCH",url:"/api/v1/agents/{actorId}",path:{actorId:l},body:r,mediaType:"application/json"})}static agentsControllerDeleteAgent(l){return K(V,{method:"DELETE",url:"/api/v1/agents/{actorId}",path:{actorId:l}})}}class lu{static agentTokensControllerIssueToken(l,r){return K(V,{method:"POST",url:"/api/v1/agents/{slug}/tokens",path:{slug:l},body:r,mediaType:"application/json"})}static agentTokensControllerListTokens(l){return K(V,{method:"GET",url:"/api/v1/agents/{slug}/tokens",path:{slug:l}})}static agentTokensControllerRevokeToken(l,r){return K(V,{method:"DELETE",url:"/api/v1/agents/{slug}/tokens/{tokenId}",path:{slug:l,tokenId:r}})}}class iS{static authJourneysControllerGetAuthJourneys(l){return K(V,{method:"GET",url:"/api/v1/auth-journeys/servers/{serverId}",path:{serverId:l},errors:{404:"Server not found"}})}}class lg{static clientRegistrationControllerRegisterClient(l,r,o){return K(V,{method:"POST",url:"/api/v1/auth/clients/register/mcp/{serverId}/{version}",path:{serverId:l,version:r},body:o,mediaType:"application/json",errors:{400:"Invalid client metadata (missing fields, invalid redirect URIs, unsupported grant types, or PKCE not configured)",409:"A client with this name is already registered"}})}static clientRegistrationControllerGetClient(l){return K(V,{method:"GET",url:"/api/v1/auth/clients/{clientId}",path:{clientId:l},errors:{404:"Client not found"}})}static clientRegistrationControllerListClients(){return K(V,{method:"GET",url:"/api/v1/auth/clients"})}static authorizationControllerAuthorize(l,r,o,d,f,g,y,v,p,T){return K(V,{method:"GET",url:"/api/v1/auth/authorize/mcp/{serverIdentifier}/{version}",path:{serverIdentifier:v,version:p},query:{response_type:l,scope:T,client_id:r,code_challenge:o,code_challenge_method:d,redirect_uri:f,state:g,resource:y},errors:{302:"Redirects to consent screen with authorization request ID",400:"Invalid authorization request parameters",404:"MCP server or client not found"}})}static authorizationControllerAuthorizeConsent(l,r,o){return K(V,{method:"POST",url:"/api/v1/auth/authorize/mcp/{serverIdentifier}/{version}",path:{serverIdentifier:l,version:r},body:o,mediaType:"application/json",errors:{302:"Redirects to client redirect_uri with authorization code or error",400:"Invalid consent decision or flow state",401:"Authorization flow has already been used",404:"Authorization flow not found"}})}static authorizationControllerGetConsentMetadata(l){return K(V,{method:"GET",url:"/api/v1/auth/consent/{flowId}",path:{flowId:l},errors:{401:"Authentication required to access consent metadata",404:"Authorization flow not found"}})}static authorizationControllerToken(l,r,o){return K(V,{method:"POST",url:"/api/v1/auth/token/mcp/{serverIdentifier}/{version}",path:{serverIdentifier:l,version:r},body:o,mediaType:"application/json",errors:{400:"Invalid token request parameters",401:"Invalid authorization code, code_verifier, or expired code"}})}static authorizationControllerIntrospect(l,r,o){return K(V,{method:"POST",url:"/api/v1/auth/introspect/mcp/{serverIdentifier}/{version}",path:{serverIdentifier:l,version:r},body:o,mediaType:"application/json",errors:{400:"Invalid introspection request parameters"}})}static authorizationControllerTokenExchange(l,r,o){return K(V,{method:"POST",url:"/api/v1/auth/token-exchange/mcp/{serverIdentifier}/{version}",path:{serverIdentifier:l,version:r},body:o,mediaType:"application/json",errors:{400:"Invalid token exchange request parameters",401:"Invalid or expired MCP JWT",403:"Insufficient scope - requested scope not entitled",404:"Connection not found"}})}static authorizationControllerCallback(l,r,o,d,f){return K(V,{method:"GET",url:"/api/v1/auth/callback",query:{code:l,state:r,error:o,scope:d,error_description:f},errors:{302:"Redirects to next step in the authorization flow",400:"Invalid callback parameters or state",404:"Connection flow not found for provided state"}})}static authorizationControllerGetScopes(){return K(V,{method:"GET",url:"/api/v1/auth/scopes"})}}class vu{static contextControllerCreateBlock(l){return K(V,{method:"POST",url:"/api/v1/context/blocks",body:l,mediaType:"application/json",errors:{400:"Invalid input data"}})}static contextControllerListBlocks(l){return K(V,{method:"GET",url:"/api/v1/context/blocks",query:{tag:l}})}static contextControllerGetBlockTree(){return K(V,{method:"GET",url:"/api/v1/context/blocks/tree"})}static contextControllerGetBlock(l){return K(V,{method:"GET",url:"/api/v1/context/blocks/{id}",path:{id:l}})}static contextControllerUpdateBlock(l,r){return K(V,{method:"PATCH",url:"/api/v1/context/blocks/{id}",path:{id:l},body:r,mediaType:"application/json",errors:{400:"No update fields provided"}})}static contextControllerDeleteBlock(l){return K(V,{method:"DELETE",url:"/api/v1/context/blocks/{id}",path:{id:l}})}static contextControllerAppendToBlock(l,r){return K(V,{method:"POST",url:"/api/v1/context/blocks/{id}/append",path:{id:l},body:r,mediaType:"application/json"})}static contextControllerReorderBlock(l,r){return K(V,{method:"PATCH",url:"/api/v1/context/blocks/{id}/reorder",path:{id:l},body:r,mediaType:"application/json"})}static contextControllerMoveBlock(l,r){return K(V,{method:"PATCH",url:"/api/v1/context/blocks/{id}/move",path:{id:l},body:r,mediaType:"application/json",errors:{400:"Circular reference detected or parent not found"}})}static contextControllerAddTagToBlock(l,r){return K(V,{method:"POST",url:"/api/v1/context/blocks/{id}/tags",path:{id:l},body:r,mediaType:"application/json",errors:{400:"Invalid input data"}})}static contextControllerRemoveTagFromBlock(l,r){return K(V,{method:"DELETE",url:"/api/v1/context/blocks/{id}/tags/{tagId}",path:{id:l,tagId:r}})}static contextControllerHandleMcpGet(){return K(V,{method:"GET",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpPost(){return K(V,{method:"POST",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpPut(){return K(V,{method:"PUT",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpDelete(){return K(V,{method:"DELETE",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpPatch(){return K(V,{method:"PATCH",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpOptions(){return K(V,{method:"OPTIONS",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpHead(){return K(V,{method:"HEAD",url:"/api/v1/context/blocks/mcp"})}}class br{static metaControllerCreateTag(l){return K(V,{method:"POST",url:"/api/v1/meta/tags",body:l,mediaType:"application/json",errors:{400:"Invalid input data"}})}static metaControllerGetAllTags(){return K(V,{method:"GET",url:"/api/v1/meta/tags"})}static metaControllerGetTagColors(){return K(V,{method:"GET",url:"/api/v1/meta/tags/colors"})}static metaControllerDeleteTag(l){return K(V,{method:"DELETE",url:"/api/v1/meta/tags/{tagId}",path:{tagId:l},errors:{404:"Tag not found"}})}}class Ep{static projectsControllerCreateProject(l){return K(V,{method:"POST",url:"/api/v1/meta/projects",body:l,mediaType:"application/json",errors:{400:"Invalid input data"}})}static projectsControllerGetAllProjects(){return K(V,{method:"GET",url:"/api/v1/meta/projects"})}static projectsControllerSearchProjects(l,r,o){return K(V,{method:"GET",url:"/api/v1/meta/projects/search",query:{q:l,limit:r,threshold:o}})}static projectsControllerGetProjectBySlug(l){return K(V,{method:"GET",url:"/api/v1/meta/projects/by-slug/{slug}",path:{slug:l},errors:{404:"Project not found"}})}static projectsControllerGetProject(l){return K(V,{method:"GET",url:"/api/v1/meta/projects/{projectId}",path:{projectId:l},errors:{404:"Project not found"}})}static projectsControllerUpdateProject(l,r){return K(V,{method:"PATCH",url:"/api/v1/meta/projects/{projectId}",path:{projectId:l},body:r,mediaType:"application/json",errors:{400:"Invalid input data",404:"Project not found"}})}static projectsControllerDeleteProject(l){return K(V,{method:"DELETE",url:"/api/v1/meta/projects/{projectId}",path:{projectId:l},errors:{404:"Project not found"}})}}class Vt{static tasksControllerCreateTask(l){return K(V,{method:"POST",url:"/api/v1/tasks/tasks",body:l,mediaType:"application/json",errors:{400:"Invalid input data"}})}static tasksControllerListTasks(l,r,o,d=1,f=20){return K(V,{method:"GET",url:"/api/v1/tasks/tasks",query:{assignee:l,sessionId:r,tag:o,page:d,limit:f}})}static tasksControllerUpdateTask(l,r){return K(V,{method:"PATCH",url:"/api/v1/tasks/tasks/{id}",path:{id:l},body:r,mediaType:"application/json",errors:{400:"Invalid input data",404:"Task not found"}})}static tasksControllerDeleteTask(l){return K(V,{method:"DELETE",url:"/api/v1/tasks/tasks/{id}",path:{id:l},errors:{404:"Task not found"}})}static tasksControllerGetTask(l){return K(V,{method:"GET",url:"/api/v1/tasks/tasks/{id}",path:{id:l},errors:{404:"Task not found"}})}static tasksControllerAssignTask(l,r){return K(V,{method:"PATCH",url:"/api/v1/tasks/tasks/{id}/assign",path:{id:l},body:r,mediaType:"application/json",errors:{400:"Invalid input data",404:"Task not found"}})}static tasksControllerAssignTaskToMe(l){return K(V,{method:"PATCH",url:"/api/v1/tasks/tasks/{id}/assign-to-me",path:{id:l},errors:{404:"Task not found"}})}static tasksControllerSearchTasks(l,r=10,o=.3){return K(V,{method:"GET",url:"/api/v1/tasks/tasks/search/query",query:{query:l,limit:r,threshold:o}})}static tasksControllerAddComment(l,r){return K(V,{method:"POST",url:"/api/v1/tasks/tasks/{id}/comments",path:{id:l},body:r,mediaType:"application/json",errors:{400:"Invalid input data",404:"Task not found"}})}static tasksControllerAddArtefact(l,r){return K(V,{method:"POST",url:"/api/v1/tasks/tasks/{id}/artefacts",path:{id:l},body:r,mediaType:"application/json",errors:{400:"Invalid input data",404:"Task not found"}})}static tasksControllerChangeStatus(l,r){return K(V,{method:"PATCH",url:"/api/v1/tasks/tasks/{id}/status",path:{id:l},body:r,mediaType:"application/json",errors:{400:"Invalid status transition or comment required",404:"Task not found"}})}static tasksControllerAddTagToTask(l,r){return K(V,{method:"POST",url:"/api/v1/tasks/tasks/{id}/tags",path:{id:l},body:r,mediaType:"application/json",errors:{400:"Invalid input data",404:"Task not found"}})}static tasksControllerRemoveTagFromTask(l,r){return K(V,{method:"DELETE",url:"/api/v1/tasks/tasks/{id}/tags/{tagId}",path:{id:l,tagId:r},errors:{404:"Task not found"}})}static tasksControllerCreateInputRequest(l,r){return K(V,{method:"POST",url:"/api/v1/tasks/tasks/{id}/input-requests",path:{id:l},body:r,mediaType:"application/json",errors:{400:"Invalid input data",404:"Task not found"}})}static tasksControllerAnswerInputRequest(l,r,o){return K(V,{method:"POST",url:"/api/v1/tasks/tasks/{id}/input-requests/{inputRequestId}/answer",path:{id:l,inputRequestId:r},body:o,mediaType:"application/json",errors:{400:"Invalid input data",404:"Input request not found"}})}static tasksControllerHandleMcpGet(){return K(V,{method:"GET",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpPost(){return K(V,{method:"POST",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpPut(){return K(V,{method:"PUT",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpDelete(){return K(V,{method:"DELETE",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpPatch(){return K(V,{method:"PATCH",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpOptions(){return K(V,{method:"OPTIONS",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpHead(){return K(V,{method:"HEAD",url:"/api/v1/tasks/tasks/mcp"})}}let su=class{static threadsControllerCreateThread(l){return K(V,{method:"POST",url:"/api/v1/threads",body:l,mediaType:"application/json",errors:{400:"Invalid input data"}})}static threadsControllerListThreads(l,r){return K(V,{method:"GET",url:"/api/v1/threads",query:{page:l,limit:r}})}static threadsControllerUpdateThread(l,r){return K(V,{method:"PATCH",url:"/api/v1/threads/{id}",path:{id:l},body:r,mediaType:"application/json",errors:{400:"Invalid input data",404:"Thread not found"}})}static threadsControllerGetThread(l){return K(V,{method:"GET",url:"/api/v1/threads/{id}",path:{id:l},errors:{404:"Thread not found"}})}static threadsControllerDeleteThread(l){return K(V,{method:"DELETE",url:"/api/v1/threads/{id}",path:{id:l},errors:{404:"Thread not found"}})}static threadsControllerAttachTask(l,r){return K(V,{method:"POST",url:"/api/v1/threads/{id}/tasks",path:{id:l},body:r,mediaType:"application/json",errors:{400:"Invalid input data",404:"Thread or task not found"}})}static threadsControllerReferenceContextBlock(l,r){return K(V,{method:"POST",url:"/api/v1/threads/{id}/context-blocks",path:{id:l},body:r,mediaType:"application/json",errors:{400:"Invalid input data",404:"Thread or context block not found"}})}static threadsControllerAddTagToThread(l,r){return K(V,{method:"POST",url:"/api/v1/threads/{id}/tags",path:{id:l},body:r,mediaType:"application/json",errors:{400:"Invalid input data",404:"Thread not found"}})}static threadsControllerRemoveTagFromThread(l,r){return K(V,{method:"DELETE",url:"/api/v1/threads/{id}/tags/{tagId}",path:{id:l,tagId:r},errors:{404:"Thread not found"}})}static threadsControllerAddParticipant(l,r){return K(V,{method:"POST",url:"/api/v1/threads/{id}/participants",path:{id:l},body:r,mediaType:"application/json",errors:{400:"Invalid input data",404:"Thread or actor not found"}})}static threadsControllerGetThreadState(l){return K(V,{method:"GET",url:"/api/v1/threads/{id}/state",path:{id:l},errors:{404:"Thread not found"}})}static threadsControllerUpdateThreadState(l,r){return K(V,{method:"PATCH",url:"/api/v1/threads/{id}/state",path:{id:l},body:r,mediaType:"application/json",errors:{400:"Invalid input data",404:"Thread not found"}})}static threadsControllerAppendThreadState(l,r){return K(V,{method:"POST",url:"/api/v1/threads/{id}/state/append",path:{id:l},body:r,mediaType:"application/json",errors:{400:"Invalid input data",404:"Thread not found"}})}};class Us{static mcpRegistryControllerCreateServer(l){return K(V,{method:"POST",url:"/api/v1/mcp/servers",body:l,mediaType:"application/json",errors:{409:"Server with providedId already exists"}})}static mcpRegistryControllerListServers(l,r){return K(V,{method:"GET",url:"/api/v1/mcp/servers",query:{page:l,limit:r}})}static mcpRegistryControllerGetServer(l){return K(V,{method:"GET",url:"/api/v1/mcp/servers/{serverId}",path:{serverId:l},errors:{404:"Server not found"}})}static mcpRegistryControllerUpdateServer(l,r){return K(V,{method:"PATCH",url:"/api/v1/mcp/servers/{serverId}",path:{serverId:l},body:r,mediaType:"application/json",errors:{404:"Server not found"}})}static mcpRegistryControllerDeleteServer(l){return K(V,{method:"DELETE",url:"/api/v1/mcp/servers/{serverId}",path:{serverId:l},errors:{404:"Server not found",409:"Server has dependencies"}})}static mcpRegistryControllerCreateScopes(l,r){return K(V,{method:"POST",url:"/api/v1/mcp/servers/{serverId}/scopes",path:{serverId:l},body:r,mediaType:"application/json",errors:{404:"Server not found",409:"Scope already exists"}})}static mcpRegistryControllerListScopes(l){return K(V,{method:"GET",url:"/api/v1/mcp/servers/{serverId}/scopes",path:{serverId:l},errors:{404:"Server not found"}})}static mcpRegistryControllerGetScope(l,r){return K(V,{method:"GET",url:"/api/v1/mcp/servers/{serverId}/scopes/{scopeId}",path:{serverId:l,scopeId:r},errors:{404:"Scope not found"}})}static mcpRegistryControllerDeleteScope(l,r){return K(V,{method:"DELETE",url:"/api/v1/mcp/servers/{serverId}/scopes/{scopeId}",path:{serverId:l,scopeId:r},errors:{404:"Scope not found",409:"Scope has mappings"}})}static mcpRegistryControllerCreateConnection(l,r){return K(V,{method:"POST",url:"/api/v1/mcp/servers/{serverId}/connections",path:{serverId:l},body:r,mediaType:"application/json",errors:{404:"Server not found",409:"Connection name conflict"}})}static mcpRegistryControllerListConnections(l){return K(V,{method:"GET",url:"/api/v1/mcp/servers/{serverId}/connections",path:{serverId:l},errors:{404:"Server not found"}})}static mcpRegistryControllerGetConnection(l){return K(V,{method:"GET",url:"/api/v1/mcp/connections/{connectionId}",path:{connectionId:l},errors:{404:"Connection not found"}})}static mcpRegistryControllerUpdateConnection(l,r){return K(V,{method:"PATCH",url:"/api/v1/mcp/connections/{connectionId}",path:{connectionId:l},body:r,mediaType:"application/json",errors:{404:"Connection not found",409:"Connection name conflict"}})}static mcpRegistryControllerDeleteConnection(l){return K(V,{method:"DELETE",url:"/api/v1/mcp/connections/{connectionId}",path:{connectionId:l},errors:{404:"Connection not found",409:"Connection has mappings"}})}static mcpRegistryControllerCreateMapping(l,r){return K(V,{method:"POST",url:"/api/v1/mcp/servers/{serverId}/mappings",path:{serverId:l},body:r,mediaType:"application/json",errors:{400:"Invalid mapping",404:"Scope or connection not found"}})}static mcpRegistryControllerListMappings(l,r){return K(V,{method:"GET",url:"/api/v1/mcp/servers/{serverId}/scopes/{scopeId}/mappings",path:{serverId:l,scopeId:r},errors:{404:"Scope not found"}})}static mcpRegistryControllerDeleteMapping(l){return K(V,{method:"DELETE",url:"/api/v1/mcp/mappings/{mappingId}",path:{mappingId:l},errors:{404:"Mapping not found"}})}}class Rl{static webAuthControllerLogin(l){return K(V,{method:"POST",url:"/api/v1/auth/login",body:l,mediaType:"application/json",errors:{401:"Invalid credentials"}})}static webAuthControllerRefresh(){return K(V,{method:"POST",url:"/api/v1/auth/refresh",errors:{401:"Invalid or expired refresh token"}})}static webAuthControllerLogout(){return K(V,{method:"POST",url:"/api/v1/auth/logout"})}static webAuthControllerMe(){return K(V,{method:"GET",url:"/api/v1/auth/me",errors:{401:"Not authenticated"}})}static webAuthControllerChangePassword(l){return K(V,{method:"POST",url:"/api/v1/auth/change-password",body:l,mediaType:"application/json",errors:{401:"Not authenticated or current password is incorrect"}})}}const rS=()=>"",sg=s=>s,Xn=rS();V.BASE=Xn;V.CREDENTIALS="include";V.BASE=Xn;const ig=m.createContext(void 0);function oS({children:s}){const[l,r]=m.useState(null),[o,d]=m.useState(!0);m.useEffect(()=>{Rl.webAuthControllerMe().then(p=>{r(p)}).catch(()=>{r(null)}).finally(()=>{d(!1)})},[]),m.useEffect(()=>{if(!l)return;const p=setInterval(async()=>{try{const T=await Rl.webAuthControllerRefresh();r(T.user)}catch(T){console.error("Token refresh failed:",T),r(null)}},480*1e3);return()=>clearInterval(p)},[l]);const v={user:l,isAuthenticated:!!l,isLoading:o,login:async(p,T)=>{const S=await Rl.webAuthControllerLogin({email:p,password:T});r(S.user)},logout:async()=>{try{await Rl.webAuthControllerLogout()}finally{r(null)}},refreshAuth:async()=>{const p=await Rl.webAuthControllerRefresh();r(p.user)}};return i.jsx(ig.Provider,{value:v,children:s})}function Bl(){const s=m.useContext(ig);if(s===void 0)throw new Error("useAuth must be used within an AuthProvider");return s}function cS({children:s}){return i.jsx("div",{className:"login-page",children:i.jsx("div",{className:"login-container",children:i.jsx("div",{className:"login-card",children:s})})})}const bp=["a1","a2","a3","a4","a5","a6"];function uS(s){let l=5381;for(let r=0;r<s.length;r++)l=l*33^s.charCodeAt(r);return l>>>0}function dS(s){const l=uS(s.trim().toLowerCase())%bp.length;return bp[l]}function fS(s){const l=s.trim();if(!l)return"?";const r=l.split(/\s+/).filter(Boolean),o=r[0]?.[0]??"?",d=r.length>1?r[r.length-1]?.[0]:"";return(o+d).toUpperCase()}function hS(s){return typeof s=="number"?null:`avatar--${s}`}function mS(s){if(typeof s=="number")return{width:s,height:s,fontSize:Math.max(10,Math.round(s*.42))}}function Ve({name:s,src:l,alt:r,size:o="md",className:d=""}){const f=fS(s),g=dS(s),y=hS(o),v=mS(o);return l?i.jsx("img",{className:`avatar ${y??""} ${d}`,style:v,src:l,alt:r??s,loading:"lazy"}):i.jsx("div",{className:`avatar avatar--fallback avatar--${g} ${y??""} ${d}`,style:v,"aria-label":r??s,role:"img",title:s,children:f})}function zl(s){return i.jsx("span",{className:`chip chip--${s.color??"gray"}`,children:s.children})}function ce({children:s,spacing:l="4",align:r="stretch",className:o=""}){return i.jsx("div",{className:`stack stack--spacing-${l} stack--align-${r} ${o}`,"data-component":"stack",children:s})}function zt({children:s,spacing:l="4",align:r="center",justify:o="start",className:d=""}){return i.jsx("div",{className:`row row--spacing-${l} row--align-${r} row--justify-${o} ${d}`,"data-component":"row",children:s})}function _({children:s,size:l="2",weight:r="normal",tone:o="default",style:d="sans",as:f="p",className:g="",wrap:y=!1}){return i.jsx(f,{className:`text text--size-${l} text--weight-${r} text--tone-${o} text--style-${d} ${y&&"text--wrap"} ${g}`,"data-component":"text",children:s})}function Ga(s){const{children:l}=s;return i.jsx("div",{className:"error--container",children:i.jsx(_,{size:s.size,weight:s.weight,tone:s.tone,as:s.as,wrap:s.wrap,className:"error--text",children:l})})}function ge({children:s,variant:l="primary",size:r="md",fullWidth:o=!1,className:d="",...f}){return i.jsx("button",{className:`btn btn--${l} btn--${r} ${o?"btn--full-width":""} ${d}`,"data-component":"button",...f,children:s})}function at({children:s,padding:l="4",className:r=""}){return i.jsx("div",{className:`card card--padding-${l} ${r}`,"data-component":"card",children:s})}function rg({leading:s,children:l,tags:r=[],topRight:o,footer:d,trailing:f,animation:g,onClick:y,className:v="",pulseKey:p,highlight:T}){const[S,j]=m.useState(!1);m.useEffect(()=>{if(p==null)return;j(!0);const k=setTimeout(()=>j(!1),600);return()=>clearTimeout(k)},[p]);const E=g?`board-card--${g}`:"",b=S?"board-card--eventPulse":"",w=T?"board-card--highlight":"";return i.jsx("div",{className:`board-card__wrapper ${E}`,onClick:y,children:i.jsxs("div",{className:`board-card ${w} ${b} ${v}`,"data-component":"board-card",children:[i.jsxs("div",{className:"board-card__header",children:[i.jsx("div",{className:"board-card__headerLeft",children:s?i.jsx("div",{className:"board-card__leading",children:s}):null}),i.jsxs("div",{className:"board-card__headerRight",children:[o?i.jsx("div",{className:"board-card__meta",children:o}):null,f?i.jsx("div",{className:"board-card__trailing",children:f}):null]})]}),i.jsx("div",{className:"board-card__main",children:l}),r.length?i.jsx("div",{className:"board-card__tags","aria-label":"tags",children:r.map(k=>i.jsx("span",{className:`chip chip--${k.color??"gray"}`,children:k.label},k.label))}):null,d?i.jsx("div",{className:"board-card__footer",children:d}):null]})})}function pe({leading:s,children:l,tags:r=[],topRight:o,trailing:d,animation:f,onClick:g,highlight:y,className:v=""}){const p=f?`data-row--${f}`:"",T=y?"data-row--highlight":"",S=g?"data-row--clickable":"";return i.jsx("div",{className:`data-row__wrapper ${p}`,onClick:g,children:i.jsxs("div",{className:`data-row ${T} ${S} ${v}`,"data-component":"data-row",children:[s?i.jsx("div",{className:"data-row__leading",children:s}):null,i.jsxs("div",{className:"data-row__content",children:[i.jsxs("div",{className:"data-row__top",children:[i.jsx("div",{className:`data-row__main ${v}`,children:l}),o?i.jsx("div",{className:"data-row__meta",children:o}):null]}),r.length?i.jsx("div",{className:"data-row__tags","aria-label":"tags",children:r.map(j=>i.jsx("span",{className:`chip chip--${j.color??"gray"}`,children:j.label},j.label))}):null]}),d?i.jsx("div",{className:"data-row__trailing",children:d}):null]})})}function de({children:s,title:l,className:r,action:o}){return i.jsxs("div",{className:`data-row__container ${r}`,children:[(l||o)&&i.jsxs("div",{className:"data-row__container-header",children:[l&&i.jsx(_,{size:"4",weight:"bold",children:l}),o&&i.jsx("div",{className:"data-row__container-action",children:o})]}),s]})}function pS({children:s,onClick:l,interactive:r=!1,className:o=""}){const d=r||!!l;return i.jsx("div",{className:`list-row ${d?"list-row--interactive":""} ${o}`,onClick:l,role:l?"button":void 0,tabIndex:l?0:void 0,"data-component":"list-row",children:s})}function gS(){const[s,l]=m.useState(""),[r,o]=m.useState(""),[d,f]=m.useState(""),[g,y]=m.useState(!1),{login:v,isLoading:p,isAuthenticated:T}=Bl(),S=Je(),E=kt().state?.from,b=E?.pathname||"/",w=E?.search||"",k=b==="/logout"?"/":`${b}${w}`;m.useEffect(()=>{!p&&T&&(console.log("you're in mate"),S(k))},[p,T,k]);const q=async Q=>{Q.preventDefault(),y(!0),f("");try{await v(s,r),S(k,{replace:!0})}catch{f("Invalid email or password")}finally{y(!1)}};return i.jsx("form",{onSubmit:q,children:i.jsxs(ce,{spacing:"6",children:[i.jsxs(ce,{spacing:"2",align:"center",children:[i.jsx(_,{size:"6",weight:"bold",className:"login__copy",children:"Taico"}),i.jsx(_,{tone:"muted",className:"login__copy",children:"Where people and agents collaborate in threads, using shared context to get work done."})]}),i.jsxs(ce,{spacing:"4",children:[i.jsxs(ce,{spacing:"2",children:[i.jsx("label",{htmlFor:"email",className:"login-label",children:i.jsx(_,{size:"2",weight:"medium",children:"Email"})}),i.jsx("input",{id:"email",type:"email",value:s,onChange:Q=>l(Q.target.value),className:"login-input",placeholder:"name@work.com",required:!0,disabled:g,autoComplete:"email"})]}),i.jsxs(ce,{spacing:"2",children:[i.jsx("label",{htmlFor:"password",className:"login-label",children:i.jsx(_,{size:"2",weight:"medium",children:"Password"})}),i.jsx("input",{id:"password",type:"password",value:r,onChange:Q=>o(Q.target.value),className:"login-input",placeholder:"••••••••",required:!0,disabled:g,autoComplete:"current-password"})]}),d&&i.jsx(Ga,{size:"2",weight:"medium",className:"",children:d}),i.jsx(ge,{type:"submit",variant:"primary",size:"lg",disabled:g,className:"login-button",children:g?"Signing in...":"Sign In"})]})]})})}function yS(){return i.jsx(cS,{children:i.jsx(gS,{})})}function vS({children:s}){const{isAuthenticated:l,isLoading:r}=Bl(),o=kt();return r?null:l?i.jsx(i.Fragment,{children:s}):i.jsx(Cr,{to:"/login",state:{from:o},replace:!0})}function xS(s){return m.useSyncExternalStore(l=>{const r=window.matchMedia(s);return r.addEventListener("change",l),()=>r.removeEventListener("change",l)},()=>window.matchMedia(s).matches,()=>!1)}function Qt(){return xS("(min-width: 768px)")}const og=[{path:"/home",label:"Home",icon:"🏠"},{path:"/tasks",label:"Tasks",icon:"🧩"},{path:"/context",label:"Context",icon:"🧱"},{path:"/agents",label:"Agents",icon:"🦄"},{path:"/threads",label:"Threads",icon:"🧵"},{path:"/tools",label:"Tools",icon:"🧰"},{path:"/settings",label:"Settings",icon:"⚙️"},{path:"/logout",label:"Logout",icon:"🔓"}];function dn(s){const l=kt();ya(),m.useEffect(()=>{const r=l.pathname;let o="taico";if(r.startsWith("/home"))o="🏠 taico";else if(r.match(/\/tasks\/task\/.+/)&&s?.task?.name){const d=s.task.name;o=`🧩 ${d.length>50?d.substring(0,50)+"...":d}`}else r.startsWith("/tasks")?o="🧩 tasks":r.startsWith("/context")?o="🧱 context":r.startsWith("/settings")?o="⚙️ settings":r.match(/\/agents\/agent\/.+/)&&s?.agent?.name?o=`🦄 ${s.agent.name}`:r.startsWith("/agents")?o="🦄 agents":r.match(/\/tools\/tool\/.+/)&&s?.tool?.name?o=`🧰 ${s.tool.name}`:r.startsWith("/tools")?o="🧰 tools":r.startsWith("/threads")&&(o="🧵 threads");document.title=o},[l.pathname,s])}function TS({children:s}){console.log("Beta shell");const l=kt();dn();const r=Qt(),[o,d]=m.useState(()=>localStorage.getItem("sidebar-collapsed")==="true");m.useEffect(()=>{localStorage.setItem("sidebar-collapsed",String(o))},[o]);const f=()=>{d(!o)};return i.jsxs("div",{className:`${r?"beta-shell__desktop":"beta-shell__mobile"}`,"data-shell":`${r?"desktop":"mobile"}`,children:[r&&i.jsxs("aside",{className:`beta-shell__desktop__sidebar ${o?"beta-shell__desktop__sidebar--collapsed":""}`,children:[i.jsx("nav",{className:"beta-shell__desktop__nav",children:i.jsx("div",{className:"beta-shell__desktop__navInner",children:i.jsx(ce,{spacing:"1",children:og.map(g=>{const y=l.pathname.startsWith(g.path);return i.jsxs(Ul,{to:g.path,title:o?g.label:void 0,className:`beta-shell__desktop__nav-item ${y?"beta-shell__desktop__nav-item--active":""}`,children:[i.jsx("span",{className:"beta-shell__desktop__nav-icon",children:g.icon}),!o&&i.jsx("span",{className:"beta-shell__desktop__nav-label",children:g.label})]},g.path)})})})}),i.jsx("button",{className:"beta-shell__desktop__sidebar--toggle",onClick:f,"aria-label":o?"Expand sidebar":"Collapse sidebar",children:o?"→":"←"})]}),i.jsx("div",{className:`${r?"beta-shell__desktop__main":""}`,children:s})]})}const SS=()=>{console.log("useHome mounting");const[s,l]=m.useState(null);return m.useEffect(()=>{console.log("useHome setting message"),l("Message coming from useHome")},[]),{message:s,setMessage:l}},cg=m.createContext(null);function _S({children:s}){const{message:l}=SS(),[r,o]=m.useState(""),d=m.useMemo(()=>({message:l,sectionTitle:r,setSectionTitle:o}),[l,r,o]);return i.jsx(cg.Provider,{value:d,children:s})}function Ll(){const s=m.useContext(cg);if(!s)throw new Error("useHomeCtx must be used within <HomeProvider>");return s}V.BASE=Xn;const re=yu.status,vn={[re.NOT_STARTED]:{path:"/tasks/not-started",label:"Queued",icon:"📋"},[re.IN_PROGRESS]:{path:"/tasks/in-progress",label:"Building",icon:"👨🏻‍💻"},[re.FOR_REVIEW]:{path:"/tasks/in-review",label:"Review",icon:"👀"},[re.DONE]:{path:"/tasks/done",label:"Shipped",icon:"🚀"}},ES=[vn[re.NOT_STARTED],vn[re.IN_PROGRESS],vn[re.FOR_REVIEW],vn[re.DONE]],xt=s=>{const l=new Date(s),o=Math.round((new Date().getTime()-l.getTime())/(1e3*60));if(o<60)return`${Math.max(o,1)}m ago`;const d=Math.round(o/60);return d<24?`${d}h ago`:l.toLocaleDateString("en-US",{month:"short",day:"numeric"})},bS=100,jp=[re.NOT_STARTED,re.IN_PROGRESS,re.FOR_REVIEW,re.DONE];function jS(){const s=Je(),{setSectionTitle:l}=Ll(),{user:r}=Bl(),[o,d]=m.useState([]),[f,g]=m.useState(!1),[y,v]=m.useState(null);dn(),m.useEffect(()=>{l("Home")},[l]),m.useEffect(()=>{let b=!0;return(async()=>{g(!0),v(null);try{const k=await Vt.tasksControllerListTasks(void 0,void 0,void 0,1,bS);if(!b)return;d(k.items??[])}catch(k){if(!b)return;v(k instanceof Error?k.message:"Failed to load tasks")}finally{b&&g(!1)}})(),()=>{b=!1}},[]);const p=m.useMemo(()=>jp.reduce((b,w)=>(b[w]=o.filter(k=>k.status===w).length,b),{[re.NOT_STARTED]:0,[re.IN_PROGRESS]:0,[re.FOR_REVIEW]:0,[re.DONE]:0}),[o]),T=m.useMemo(()=>o.filter(b=>b.inputRequests?.some(w=>w.resolvedAt?!1:r?w.assignedToActorId===r.actorId:!0)),[o,r]),S=m.useMemo(()=>o.filter(b=>b.status===re.FOR_REVIEW),[o]),j=m.useMemo(()=>o.filter(b=>b.status===re.IN_PROGRESS),[o]),E=m.useMemo(()=>[...o].sort((b,w)=>{const k=new Date(b.updatedAt).getTime();return new Date(w.updatedAt).getTime()-k}).slice(0,6),[o]);return i.jsxs("div",{className:"home-page",children:[i.jsxs("div",{className:"home-page__hero",children:[i.jsxs(ce,{spacing:"3",children:[i.jsx(_,{size:"6",weight:"bold",children:"Command Center"}),i.jsx(_,{size:"3",tone:"muted",children:"A quick pulse on tasks waiting for you, active builds, and review queues."}),i.jsxs(zt,{className:"home-page__hero-actions",spacing:"2",children:[i.jsx(ge,{onClick:()=>s("/tasks"),children:"Go to tasks"}),i.jsx(ge,{variant:"secondary",onClick:()=>s("/agents"),children:"Agents"}),i.jsx(ge,{variant:"secondary",onClick:()=>s("/context"),children:"Context"})]})]}),i.jsx(at,{className:"home-page__hero-card",children:i.jsxs(ce,{spacing:"3",children:[i.jsx(_,{size:"4",weight:"semibold",children:"Today’s focus"}),i.jsx(_,{tone:"muted",children:T.length>0?`${T.length} task${T.length===1?"":"s"} waiting on input.`:"No open input requests. You’re clear to build."}),i.jsxs(zt,{spacing:"2",children:[i.jsx(zl,{color:T.length>0?"orange":"green",children:T.length>0?"Needs input":"All clear"}),i.jsx(zl,{color:S.length>0?"purple":"gray",children:S.length>0?`${S.length} ready to review`:"No reviews"})]})]})})]}),i.jsx("div",{className:"home-page__status-grid",children:jp.map(b=>{const w=vn[b];return i.jsx("button",{className:"home-status-card",type:"button",onClick:()=>s(w.path),children:i.jsxs(at,{className:"home-status-card__inner",children:[i.jsxs(_,{size:"1",tone:"muted",children:[w.icon," ",w.label]}),i.jsx(_,{size:"5",weight:"bold",children:p[b]})]})},b)})}),y?i.jsx(at,{className:"home-page__notice",children:i.jsxs(_,{tone:"muted",children:["Error loading tasks: ",y]})}):null,f&&o.length===0?i.jsx(at,{className:"home-page__notice",children:i.jsx(_,{tone:"muted",children:"Loading task activity…"})}):null,i.jsxs("div",{className:"home-page__grid",children:[i.jsx(at,{className:"home-panel",children:i.jsxs(ce,{spacing:"3",children:[i.jsxs(zt,{justify:"space-between",align:"center",children:[i.jsx(_,{size:"3",weight:"semibold",children:"Needs your input"}),i.jsx(ge,{size:"sm",variant:"ghost",onClick:()=>s("/tasks"),children:"Open"})]}),i.jsx("div",{className:"home-list",children:T.length===0?i.jsx(_,{tone:"muted",children:"No tasks waiting on your input."}):T.slice(0,5).map(b=>i.jsx(hr,{task:b,chipLabel:"Input",chipColor:"orange",onClick:()=>s(`/tasks/task/${b.id}`)},b.id))})]})}),i.jsx(at,{className:"home-panel",children:i.jsxs(ce,{spacing:"3",children:[i.jsxs(zt,{justify:"space-between",align:"center",children:[i.jsx(_,{size:"3",weight:"semibold",children:"Ready for review"}),i.jsx(ge,{size:"sm",variant:"ghost",onClick:()=>s("/tasks/in-review"),children:"Review"})]}),i.jsx("div",{className:"home-list",children:S.length===0?i.jsx(_,{tone:"muted",children:"No tasks ready to review."}):S.slice(0,5).map(b=>i.jsx(hr,{task:b,chipLabel:"Review",chipColor:"purple",onClick:()=>s(`/tasks/task/${b.id}`)},b.id))})]})}),i.jsx(at,{className:"home-panel",children:i.jsxs(ce,{spacing:"3",children:[i.jsxs(zt,{justify:"space-between",align:"center",children:[i.jsx(_,{size:"3",weight:"semibold",children:"In progress"}),i.jsx(ge,{size:"sm",variant:"ghost",onClick:()=>s("/tasks/in-progress"),children:"View"})]}),i.jsx("div",{className:"home-list",children:j.length===0?i.jsx(_,{tone:"muted",children:"No active builds right now."}):j.slice(0,5).map(b=>i.jsx(hr,{task:b,chipLabel:"Build",chipColor:"green",onClick:()=>s(`/tasks/task/${b.id}`)},b.id))})]})}),i.jsx(at,{className:"home-panel",children:i.jsxs(ce,{spacing:"3",children:[i.jsxs(zt,{justify:"space-between",align:"center",children:[i.jsx(_,{size:"3",weight:"semibold",children:"Recent activity"}),i.jsx(ge,{size:"sm",variant:"ghost",onClick:()=>s("/tasks"),children:"All tasks"})]}),i.jsx("div",{className:"home-list",children:E.length===0?i.jsx(_,{tone:"muted",children:"No recent task activity yet."}):E.map(b=>i.jsx(hr,{task:b,chipLabel:vn[b.status].label,chipColor:CS(b.status),onClick:()=>s(`/tasks/task/${b.id}`)},b.id))})]})})]})]})}function hr({task:s,chipLabel:l,chipColor:r,onClick:o}){return i.jsxs(pS,{interactive:!0,onClick:o,className:"home-list-row",children:[i.jsxs("div",{className:"home-list-row__main",children:[i.jsx(_,{weight:"medium",size:"3",children:s.name}),i.jsx(_,{size:"1",tone:"muted",children:s.description?String(s.description):"No description"})]}),i.jsxs("div",{className:"home-list-row__meta",children:[i.jsx(zl,{color:r,children:l}),i.jsx(_,{size:"1",tone:"muted",children:xt(s.updatedAt)})]})]})}function CS(s){return s===re.DONE?"purple":s===re.IN_PROGRESS?"green":s===re.NOT_STARTED?"blue":s===re.FOR_REVIEW?"orange":"gray"}function Ya({sectionTitle:s,children:l}){return i.jsxs("div",{className:"desktop-shell",children:[s&&i.jsx("div",{className:"desktop-shell__header",children:i.jsx("h1",{className:"desktop-shell__title",children:s})}),i.jsx("div",{className:"desktop-shell__content",children:l})]})}function AS({navItems:s,activePath:l,onActiveItemClick:r}){return console.log("Rendering BottomNavContent with navItems:",s),s.length===0?i.jsx(i.Fragment,{}):i.jsx(zt,{spacing:"1",justify:"space-between",children:s.map((o,d)=>{const f=l===o.path;return i.jsxs(Ul,{to:o.path,className:`ios-shell__bottom-nav__item ${f?"ios-shell__bottom-nav__item--active":""}`,onClick:()=>{f&&r()},children:[i.jsx("span",{className:"ios-shell__bottom-nav__icon",children:o.icon}),i.jsx(_,{size:"1",className:"ios-shell__bottom-nav-label",children:o.label})]},o.label)})})}function Va(s){const l=kt();console.log("Mounting iOS shell");const[r,o]=m.useState(!1),d=()=>{o(!1)},[f,g]=m.useState(!0),[y,v]=m.useState(!0),[p,T]=m.useState(!0),S=m.useRef(null),j=Z=>{S.current=Z,F(),U(),ie()},E=m.useRef(null),b=Z=>{E.current=Z,F()},w=m.useRef(null),k=m.useRef(null),q=Z=>{k.current=Z,U()},Q=m.useRef(null),$=m.useRef(null),ae=Z=>{$.current=Z,ie()},O=m.useRef(null),L=(Z,be,Ee)=>{const Fe=be.current,Xe=S.current;!Fe||!Xe||(Z.current?.disconnect(),Z.current=new IntersectionObserver(([H])=>{Ee(H.isIntersecting)},{root:Xe,threshold:[0,1]}),Z.current.observe(Fe))},U=()=>{L(Q,k,Z=>{console.log(`title visibility detector: ${Z}`),g(Z)})},F=()=>{L(w,E,Z=>{console.log(`content behind header detector: ${Z}`),v(!Z)})},ie=()=>{L(O,$,Z=>{console.log(`bottom detector: ${Z}`),T(!Z)})},te=()=>{S.current?.scrollTo({top:0,behavior:"smooth"})};return m.useEffect(()=>()=>{Q.current?.disconnect(),w.current?.disconnect(),O.current?.disconnect()},[]),i.jsxs("div",{className:"ios-shell",children:[i.jsxs("aside",{className:`ios-shell__drawer ${r?"ios-shell__drawer--open":""}`,children:[i.jsxs("div",{className:"ios-shell__drawer-header",children:[i.jsx(_,{size:"4",weight:"bold",children:"taico"}),i.jsx("button",{className:"ios-shell__drawer-close",onClick:d,"aria-label":"Close menu",children:"✕"})]}),i.jsx("nav",{className:"ios-shell__drawer-nav",children:og.map(Z=>{const be=l.pathname===Z.path||l.pathname.startsWith(Z.path+"/");return i.jsxs(Ul,{to:Z.path,className:`ios-shell__drawer-item ${be?"ios-shell__drawer-item--active":""}`,onClick:d,children:[i.jsx("span",{className:"ios-shell__drawer-icon",children:Z.icon}),i.jsx("span",{className:"ios-shell__drawer-label",children:Z.label})]},Z.path)})})]}),i.jsx("header",{className:`ios-shell__header ${y?"elevated":""}`,children:i.jsxs(zt,{spacing:"5",align:"center",children:[i.jsx("button",{className:"ios-shell__hamburger",onClick:()=>o(!0),"aria-label":"Open menu",children:"☰"}),i.jsx(_,{size:"3",weight:"normal",as:"div",children:s.appTitle}),i.jsx("div",{className:`ios-shell__header__section-title ${f?"is-hidden":"is-visible"}`,children:s.sectionTitle})]})}),i.jsxs("main",{ref:j,className:"ios-shell__main",children:[i.jsx("div",{className:"ios-shell__main__top-padding"}),i.jsx("div",{ref:b,className:"ios-shell__main__section-title-top-sentinel"}),i.jsx("div",{className:`ios-shell__main__section-title ${f?"is-visible":"is-hidden"}`,children:s.sectionTitle}),i.jsx("div",{ref:q,className:"ios-shell__main__section-title-bottom-sentinel"}),i.jsx("div",{className:"ios-shell__main__top-sentinel"}),s.children,i.jsx("div",{ref:ae,className:"ios-shell__main__bottom-sentinel"}),i.jsx("div",{className:"ios-shell__main__bottom-padding"})]}),i.jsx("nav",{className:`ios-shell__bottom-nav ${p?"elevated":""}`,children:i.jsx(AS,{navItems:s.navItems,activePath:l.pathname,onActiveItemClick:te})})]})}const NS=[{path:"/home",label:"Home",icon:"🏠"},{path:"/tasks",label:"Tasks",icon:"🧩"},{path:"/context",label:"Context",icon:"🧱"},{path:"/agents",label:"Agents",icon:"🦄"},{path:"/settings",label:"Settings",icon:"⚙️"}];function wS(){const s=Qt(),{sectionTitle:l}=Ll();return i.jsx(i.Fragment,{children:s?i.jsx(Ya,{sectionTitle:l,children:i.jsx(Dt,{})}):i.jsx(Va,{appTitle:"Home",sectionTitle:l,navItems:NS,children:i.jsx(Dt,{})})})}function RS(){const{setSectionTitle:s}=Ll(),l=Qt(),r=Je();return dn(),m.useEffect(()=>{s("Settings")},[]),i.jsxs(ce,{spacing:"6",children:[l?i.jsx(_,{tone:"muted",children:"Customize your experience"}):"",i.jsx(at,{padding:"5",children:i.jsxs(ce,{spacing:"3",children:[i.jsxs(ce,{spacing:"1",children:[i.jsx(_,{size:"4",weight:"semibold",children:"Account"}),i.jsx(_,{tone:"muted",children:"Manage your account security"})]}),i.jsxs(zt,{justify:"space-between",align:"center",children:[i.jsx(_,{size:"2",tone:"muted",children:"Update your password"}),i.jsx(ge,{variant:"secondary",size:"sm",onClick:()=>r("/settings/account"),children:"Change Password"})]})]})}),i.jsx(at,{padding:"5",children:i.jsxs(ce,{spacing:"3",children:[i.jsxs(ce,{spacing:"1",children:[i.jsx(_,{size:"4",weight:"semibold",children:"Appearance"}),i.jsx(_,{tone:"muted",children:"Choose your preferred color theme"})]}),i.jsxs(zt,{justify:"space-between",align:"center",children:[i.jsx(_,{size:"2",tone:"muted",children:"Pick a theme for the app"}),i.jsx(ge,{variant:"secondary",size:"sm",onClick:()=>r("/settings/appearance"),children:"Choose Theme"})]})]})}),i.jsx(at,{padding:"5",children:i.jsxs(ce,{spacing:"3",children:[i.jsxs(ce,{spacing:"1",children:[i.jsx(_,{size:"4",weight:"semibold",children:"Projects"}),i.jsx(_,{tone:"muted",children:"Manage your projects"})]}),i.jsxs(zt,{justify:"space-between",align:"center",children:[i.jsx(_,{size:"2",tone:"muted",children:"View and edit project details"}),i.jsx(ge,{variant:"secondary",size:"sm",onClick:()=>r("/settings/projects"),children:"Manage Projects"})]})]})})]})}function OS(){const{setSectionTitle:s}=Ll(),{logout:l}=Bl(),r=Je(),[o,d]=m.useState(""),[f,g]=m.useState(""),[y,v]=m.useState(""),[p,T]=m.useState(""),[S,j]=m.useState(!1);m.useEffect(()=>{s("Account")},[]);const E=async b=>{b.preventDefault(),v(""),T(""),j(!0);try{await Rl.webAuthControllerChangePassword({currentPassword:o,newPassword:f}),T("Password changed successfully! You will be logged out."),d(""),g(""),setTimeout(async()=>{await l(),r("/login")},2e3)}catch(w){v(w?.body?.detail||"Failed to change password. Please check your current password.")}finally{j(!1)}};return i.jsx(ce,{spacing:"6",children:i.jsx(at,{padding:"5",children:i.jsxs(ce,{spacing:"4",children:[i.jsxs(ce,{spacing:"2",children:[i.jsx(_,{size:"4",weight:"semibold",children:"Change Password"}),i.jsx(_,{tone:"muted",children:"Update your account password"})]}),i.jsx("form",{onSubmit:E,children:i.jsxs(ce,{spacing:"4",children:[i.jsxs(ce,{spacing:"2",children:[i.jsx("label",{htmlFor:"current-password",className:"login-label",children:i.jsx(_,{size:"2",weight:"medium",children:"Current Password"})}),i.jsx("input",{id:"current-password",type:"password",value:o,onChange:b=>d(b.target.value),className:"login-input",placeholder:"••••••••",required:!0,disabled:S,autoComplete:"current-password"})]}),i.jsxs(ce,{spacing:"2",children:[i.jsx("label",{htmlFor:"new-password",className:"login-label",children:i.jsx(_,{size:"2",weight:"medium",children:"New Password"})}),i.jsx("input",{id:"new-password",type:"password",value:f,onChange:b=>g(b.target.value),className:"login-input",placeholder:"••••••••",required:!0,disabled:S,autoComplete:"new-password"})]}),y&&i.jsx(Ga,{size:"2",weight:"medium",children:y}),p&&i.jsx("div",{style:{color:"var(--accent)"},children:i.jsx(_,{size:"2",weight:"medium",children:p})}),i.jsx(ge,{type:"submit",variant:"primary",size:"md",disabled:S||!o||!f,children:S?"Changing Password...":"Change Password"})]})})]})})})}const zS=[{value:"light",label:"Light",description:"Clean light theme"},{value:"dark",label:"Dark",description:"Easy on the eyes"},{value:"github",label:"GitHub",description:"GitHub-inspired green accent"},{value:"forest",label:"Forest",description:"Nature-inspired dark green"},{value:"terminal",label:"Terminal",description:"Classic terminal green on black"},{value:"ai-vibes",label:"AI Vibes",description:"Deep purples with neon accents"},{value:"halo",label:"Halo",description:"Light background with deeper surfaces"},{value:"mono",label:"Mono",description:"Black and white minimalism"},{value:"terminal-amber",label:"Terminal Amber",description:"Terminal tones without the green"},{value:"oceanic",label:"Oceanic",description:"Cool blues and teals"},{value:"party",label:"Party",description:"Playful warm palette"},{value:"tribute",label:"Tribute",description:"Inspired by the old UI's dark sidebar"}];function DS(){const{theme:s,setTheme:l}=KT(),{setSectionTitle:r}=Ll();return m.useEffect(()=>{r("Appearance")},[]),i.jsx(ce,{spacing:"6",children:i.jsx(at,{padding:"5",children:i.jsxs(ce,{spacing:"4",children:[i.jsxs(ce,{spacing:"2",children:[i.jsx(_,{size:"4",weight:"semibold",children:"Appearance"}),i.jsx(_,{tone:"muted",children:"Choose your preferred color theme"})]}),i.jsx(ce,{spacing:"3",children:zS.map(o=>{const d=s===o.value;return i.jsx(at,{padding:"4",className:d?"settings-theme-card--active":"",children:i.jsxs(zt,{justify:"space-between",align:"center",children:[i.jsxs(ce,{spacing:"1",children:[i.jsx(_,{weight:"semibold",children:o.label}),i.jsx(_,{size:"1",tone:"muted",children:o.description})]}),i.jsx(ge,{variant:d?"primary":"secondary",size:"sm",onClick:()=>l(o.value),children:d?"Active":"Select"})]})},o.value)})})]})})})}V.BASE=Xn;function kS(){const{setSectionTitle:s}=Ll(),[l,r]=m.useState([]),[o,d]=m.useState(!0),[f,g]=m.useState(""),[y,v]=m.useState(null),[p,T]=m.useState(""),[S,j]=m.useState(""),[E,b]=m.useState(""),[w,k]=m.useState("");m.useEffect(()=>{s("Projects"),q()},[]);const q=async()=>{d(!0),g("");try{const O=await Ep.projectsControllerGetAllProjects();r(O)}catch(O){g(O?.body?.detail||"Failed to load projects")}finally{d(!1)}},Q=O=>{v(O.id),T(O.description||""),j(O.repoUrl||""),b(""),k("")},$=()=>{v(null),T(""),j(""),b(""),k("")},ae=async O=>{b(""),k("");try{await Ep.projectsControllerUpdateProject(O,{description:p,repoUrl:S}),k("Project updated successfully!"),v(null),await q(),setTimeout(()=>{k("")},3e3)}catch(L){b(L?.body?.detail||"Failed to update project")}};return o?i.jsx(ce,{spacing:"6",children:i.jsx(_,{tone:"muted",children:"Loading projects..."})}):f?i.jsxs(ce,{spacing:"6",children:[i.jsx(Ga,{children:f}),i.jsx(ge,{variant:"secondary",onClick:q,children:"Retry"})]}):i.jsxs(ce,{spacing:"6",children:[i.jsx(_,{tone:"muted",children:"Manage your projects"}),l.length===0?i.jsx(at,{padding:"5",children:i.jsx(_,{tone:"muted",children:"No projects found"})}):l.map(O=>i.jsx(at,{padding:"5",children:i.jsxs(ce,{spacing:"4",children:[i.jsxs(ce,{spacing:"2",children:[i.jsx(_,{size:"4",weight:"semibold",children:O.slug}),i.jsxs(_,{size:"2",tone:"muted",children:["Tag: ",O.tagName]})]}),y===O.id?i.jsx("form",{onSubmit:L=>{L.preventDefault(),ae(O.id)},children:i.jsxs(ce,{spacing:"4",children:[i.jsxs(ce,{spacing:"2",children:[i.jsx("label",{htmlFor:`description-${O.id}`,className:"login-label",children:i.jsx(_,{size:"2",weight:"medium",children:"Description"})}),i.jsx("textarea",{id:`description-${O.id}`,value:p,onChange:L=>T(L.target.value),className:"login-input",placeholder:"Project description",rows:3,style:{resize:"vertical",fontFamily:"inherit"}})]}),i.jsxs(ce,{spacing:"2",children:[i.jsx("label",{htmlFor:`repo-url-${O.id}`,className:"login-label",children:i.jsx(_,{size:"2",weight:"medium",children:"Repository URL"})}),i.jsx("input",{id:`repo-url-${O.id}`,type:"url",value:S,onChange:L=>j(L.target.value),className:"login-input",placeholder:"https://github.com/username/repo"})]}),E&&i.jsx(Ga,{size:"2",weight:"medium",children:E}),w&&i.jsx("div",{style:{color:"var(--accent)"},children:i.jsx(_,{size:"2",weight:"medium",children:w})}),i.jsxs(zt,{spacing:"3",children:[i.jsx(ge,{type:"submit",variant:"primary",size:"md",children:"Save Changes"}),i.jsx(ge,{type:"button",variant:"secondary",size:"md",onClick:$,children:"Cancel"})]})]})}):i.jsxs(i.Fragment,{children:[i.jsxs(ce,{spacing:"2",children:[i.jsx(_,{size:"2",weight:"medium",children:"Description"}),i.jsx(_,{size:"2",tone:"muted",children:O.description||"No description"})]}),i.jsxs(ce,{spacing:"2",children:[i.jsx(_,{size:"2",weight:"medium",children:"Repository URL"}),i.jsx(_,{size:"2",tone:"muted",children:O.repoUrl||"No repository URL"})]}),i.jsx(zt,{justify:"end",children:i.jsx(ge,{variant:"secondary",size:"sm",onClick:()=>Q(O),children:"Edit Project"})})]})]})},O.id))]})}function MS(){return i.jsx(_S,{children:i.jsx(Vn,{children:i.jsxs(Se,{element:i.jsx(wS,{}),children:[i.jsx(Se,{path:"/home",element:i.jsx(jS,{})}),i.jsx(Se,{path:"/settings",element:i.jsx(RS,{})}),i.jsx(Se,{path:"/settings/account",element:i.jsx(OS,{})}),i.jsx(Se,{path:"/settings/appearance",element:i.jsx(DS,{})}),i.jsx(Se,{path:"/settings/projects",element:i.jsx(kS,{})})]})})})}const US="/",Tn=Object.create(null);Tn.open="0";Tn.close="1";Tn.ping="2";Tn.pong="3";Tn.message="4";Tn.upgrade="5";Tn.noop="6";const Tr=Object.create(null);Object.keys(Tn).forEach(s=>{Tr[Tn[s]]=s});const xu={type:"error",data:"parser error"},ug=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",dg=typeof ArrayBuffer=="function",fg=s=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(s):s&&s.buffer instanceof ArrayBuffer,Uu=({type:s,data:l},r,o)=>ug&&l instanceof Blob?r?o(l):Cp(l,o):dg&&(l instanceof ArrayBuffer||fg(l))?r?o(l):Cp(new Blob([l]),o):o(Tn[s]+(l||"")),Cp=(s,l)=>{const r=new FileReader;return r.onload=function(){const o=r.result.split(",")[1];l("b"+(o||""))},r.readAsDataURL(s)};function Ap(s){return s instanceof Uint8Array?s:s instanceof ArrayBuffer?new Uint8Array(s):new Uint8Array(s.buffer,s.byteOffset,s.byteLength)}let iu;function BS(s,l){if(ug&&s.data instanceof Blob)return s.data.arrayBuffer().then(Ap).then(l);if(dg&&(s.data instanceof ArrayBuffer||fg(s.data)))return l(Ap(s.data));Uu(s,!1,r=>{iu||(iu=new TextEncoder),l(iu.encode(r))})}const Np="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ls=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let s=0;s<Np.length;s++)Ls[Np.charCodeAt(s)]=s;const LS=s=>{let l=s.length*.75,r=s.length,o,d=0,f,g,y,v;s[s.length-1]==="="&&(l--,s[s.length-2]==="="&&l--);const p=new ArrayBuffer(l),T=new Uint8Array(p);for(o=0;o<r;o+=4)f=Ls[s.charCodeAt(o)],g=Ls[s.charCodeAt(o+1)],y=Ls[s.charCodeAt(o+2)],v=Ls[s.charCodeAt(o+3)],T[d++]=f<<2|g>>4,T[d++]=(g&15)<<4|y>>2,T[d++]=(y&3)<<6|v&63;return p},HS=typeof ArrayBuffer=="function",Bu=(s,l)=>{if(typeof s!="string")return{type:"message",data:hg(s,l)};const r=s.charAt(0);return r==="b"?{type:"message",data:qS(s.substring(1),l)}:Tr[r]?s.length>1?{type:Tr[r],data:s.substring(1)}:{type:Tr[r]}:xu},qS=(s,l)=>{if(HS){const r=LS(s);return hg(r,l)}else return{base64:!0,data:s}},hg=(s,l)=>l==="blob"?s instanceof Blob?s:new Blob([s]):s instanceof ArrayBuffer?s:s.buffer,mg="",GS=(s,l)=>{const r=s.length,o=new Array(r);let d=0;s.forEach((f,g)=>{Uu(f,!1,y=>{o[g]=y,++d===r&&l(o.join(mg))})})},YS=(s,l)=>{const r=s.split(mg),o=[];for(let d=0;d<r.length;d++){const f=Bu(r[d],l);if(o.push(f),f.type==="error")break}return o};function VS(){return new TransformStream({transform(s,l){BS(s,r=>{const o=r.length;let d;if(o<126)d=new Uint8Array(1),new DataView(d.buffer).setUint8(0,o);else if(o<65536){d=new Uint8Array(3);const f=new DataView(d.buffer);f.setUint8(0,126),f.setUint16(1,o)}else{d=new Uint8Array(9);const f=new DataView(d.buffer);f.setUint8(0,127),f.setBigUint64(1,BigInt(o))}s.data&&typeof s.data!="string"&&(d[0]|=128),l.enqueue(d),l.enqueue(r)})}})}let ru;function mr(s){return s.reduce((l,r)=>l+r.length,0)}function pr(s,l){if(s[0].length===l)return s.shift();const r=new Uint8Array(l);let o=0;for(let d=0;d<l;d++)r[d]=s[0][o++],o===s[0].length&&(s.shift(),o=0);return s.length&&o<s[0].length&&(s[0]=s[0].slice(o)),r}function XS(s,l){ru||(ru=new TextDecoder);const r=[];let o=0,d=-1,f=!1;return new TransformStream({transform(g,y){for(r.push(g);;){if(o===0){if(mr(r)<1)break;const v=pr(r,1);f=(v[0]&128)===128,d=v[0]&127,d<126?o=3:d===126?o=1:o=2}else if(o===1){if(mr(r)<2)break;const v=pr(r,2);d=new DataView(v.buffer,v.byteOffset,v.length).getUint16(0),o=3}else if(o===2){if(mr(r)<8)break;const v=pr(r,8),p=new DataView(v.buffer,v.byteOffset,v.length),T=p.getUint32(0);if(T>Math.pow(2,21)-1){y.enqueue(xu);break}d=T*Math.pow(2,32)+p.getUint32(4),o=3}else{if(mr(r)<d)break;const v=pr(r,d);y.enqueue(Bu(f?v:ru.decode(v),l)),o=0}if(d===0||d>s){y.enqueue(xu);break}}}})}const pg=4;function ct(s){if(s)return IS(s)}function IS(s){for(var l in ct.prototype)s[l]=ct.prototype[l];return s}ct.prototype.on=ct.prototype.addEventListener=function(s,l){return this._callbacks=this._callbacks||{},(this._callbacks["$"+s]=this._callbacks["$"+s]||[]).push(l),this};ct.prototype.once=function(s,l){function r(){this.off(s,r),l.apply(this,arguments)}return r.fn=l,this.on(s,r),this};ct.prototype.off=ct.prototype.removeListener=ct.prototype.removeAllListeners=ct.prototype.removeEventListener=function(s,l){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+s];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+s],this;for(var o,d=0;d<r.length;d++)if(o=r[d],o===l||o.fn===l){r.splice(d,1);break}return r.length===0&&delete this._callbacks["$"+s],this};ct.prototype.emit=function(s){this._callbacks=this._callbacks||{};for(var l=new Array(arguments.length-1),r=this._callbacks["$"+s],o=1;o<arguments.length;o++)l[o-1]=arguments[o];if(r){r=r.slice(0);for(var o=0,d=r.length;o<d;++o)r[o].apply(this,l)}return this};ct.prototype.emitReserved=ct.prototype.emit;ct.prototype.listeners=function(s){return this._callbacks=this._callbacks||{},this._callbacks["$"+s]||[]};ct.prototype.hasListeners=function(s){return!!this.listeners(s).length};const Nr=typeof Promise=="function"&&typeof Promise.resolve=="function"?l=>Promise.resolve().then(l):(l,r)=>r(l,0),an=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),QS="arraybuffer";function gg(s,...l){return l.reduce((r,o)=>(s.hasOwnProperty(o)&&(r[o]=s[o]),r),{})}const KS=an.setTimeout,ZS=an.clearTimeout;function wr(s,l){l.useNativeTimers?(s.setTimeoutFn=KS.bind(an),s.clearTimeoutFn=ZS.bind(an)):(s.setTimeoutFn=an.setTimeout.bind(an),s.clearTimeoutFn=an.clearTimeout.bind(an))}const $S=1.33;function JS(s){return typeof s=="string"?FS(s):Math.ceil((s.byteLength||s.size)*$S)}function FS(s){let l=0,r=0;for(let o=0,d=s.length;o<d;o++)l=s.charCodeAt(o),l<128?r+=1:l<2048?r+=2:l<55296||l>=57344?r+=3:(o++,r+=4);return r}function yg(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function PS(s){let l="";for(let r in s)s.hasOwnProperty(r)&&(l.length&&(l+="&"),l+=encodeURIComponent(r)+"="+encodeURIComponent(s[r]));return l}function WS(s){let l={},r=s.split("&");for(let o=0,d=r.length;o<d;o++){let f=r[o].split("=");l[decodeURIComponent(f[0])]=decodeURIComponent(f[1])}return l}class e0 extends Error{constructor(l,r,o){super(l),this.description=r,this.context=o,this.type="TransportError"}}class Lu extends ct{constructor(l){super(),this.writable=!1,wr(this,l),this.opts=l,this.query=l.query,this.socket=l.socket,this.supportsBinary=!l.forceBase64}onError(l,r,o){return super.emitReserved("error",new e0(l,r,o)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(l){this.readyState==="open"&&this.write(l)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(l){const r=Bu(l,this.socket.binaryType);this.onPacket(r)}onPacket(l){super.emitReserved("packet",l)}onClose(l){this.readyState="closed",super.emitReserved("close",l)}pause(l){}createUri(l,r={}){return l+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_hostname(){const l=this.opts.hostname;return l.indexOf(":")===-1?l:"["+l+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(l){const r=PS(l);return r.length?"?"+r:""}}class t0 extends Lu{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(l){this.readyState="pausing";const r=()=>{this.readyState="paused",l()};if(this._polling||!this.writable){let o=0;this._polling&&(o++,this.once("pollComplete",function(){--o||r()})),this.writable||(o++,this.once("drain",function(){--o||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(l){const r=o=>{if(this.readyState==="opening"&&o.type==="open"&&this.onOpen(),o.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(o)};YS(l,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const l=()=>{this.write([{type:"close"}])};this.readyState==="open"?l():this.once("open",l)}write(l){this.writable=!1,GS(l,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const l=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=yg()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(l,r)}}let vg=!1;try{vg=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const n0=vg;function a0(){}class l0 extends t0{constructor(l){if(super(l),typeof location<"u"){const r=location.protocol==="https:";let o=location.port;o||(o=r?"443":"80"),this.xd=typeof location<"u"&&l.hostname!==location.hostname||o!==l.port}}doWrite(l,r){const o=this.request({method:"POST",data:l});o.on("success",r),o.on("error",(d,f)=>{this.onError("xhr post error",d,f)})}doPoll(){const l=this.request();l.on("data",this.onData.bind(this)),l.on("error",(r,o)=>{this.onError("xhr poll error",r,o)}),this.pollXhr=l}}class xn extends ct{constructor(l,r,o){super(),this.createRequest=l,wr(this,o),this._opts=o,this._method=o.method||"GET",this._uri=r,this._data=o.data!==void 0?o.data:null,this._create()}_create(){var l;const r=gg(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;const o=this._xhr=this.createRequest(r);try{o.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){o.setDisableHeaderCheck&&o.setDisableHeaderCheck(!0);for(let d in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(d)&&o.setRequestHeader(d,this._opts.extraHeaders[d])}}catch{}if(this._method==="POST")try{o.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{o.setRequestHeader("Accept","*/*")}catch{}(l=this._opts.cookieJar)===null||l===void 0||l.addCookies(o),"withCredentials"in o&&(o.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(o.timeout=this._opts.requestTimeout),o.onreadystatechange=()=>{var d;o.readyState===3&&((d=this._opts.cookieJar)===null||d===void 0||d.parseCookies(o.getResponseHeader("set-cookie"))),o.readyState===4&&(o.status===200||o.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof o.status=="number"?o.status:0)},0))},o.send(this._data)}catch(d){this.setTimeoutFn(()=>{this._onError(d)},0);return}typeof document<"u"&&(this._index=xn.requestsCount++,xn.requests[this._index]=this)}_onError(l){this.emitReserved("error",l,this._xhr),this._cleanup(!0)}_cleanup(l){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=a0,l)try{this._xhr.abort()}catch{}typeof document<"u"&&delete xn.requests[this._index],this._xhr=null}}_onLoad(){const l=this._xhr.responseText;l!==null&&(this.emitReserved("data",l),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}xn.requestsCount=0;xn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",wp);else if(typeof addEventListener=="function"){const s="onpagehide"in an?"pagehide":"unload";addEventListener(s,wp,!1)}}function wp(){for(let s in xn.requests)xn.requests.hasOwnProperty(s)&&xn.requests[s].abort()}const s0=(function(){const s=xg({xdomain:!1});return s&&s.responseType!==null})();class i0 extends l0{constructor(l){super(l);const r=l&&l.forceBase64;this.supportsBinary=s0&&!r}request(l={}){return Object.assign(l,{xd:this.xd},this.opts),new xn(xg,this.uri(),l)}}function xg(s){const l=s.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!l||n0))return new XMLHttpRequest}catch{}if(!l)try{return new an[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Tg=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class r0 extends Lu{get name(){return"websocket"}doOpen(){const l=this.uri(),r=this.opts.protocols,o=Tg?{}:gg(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(o.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(l,r,o)}catch(d){return this.emitReserved("error",d)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=l=>this.onClose({description:"websocket connection closed",context:l}),this.ws.onmessage=l=>this.onData(l.data),this.ws.onerror=l=>this.onError("websocket error",l)}write(l){this.writable=!1;for(let r=0;r<l.length;r++){const o=l[r],d=r===l.length-1;Uu(o,this.supportsBinary,f=>{try{this.doWrite(o,f)}catch{}d&&Nr(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const l=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=yg()),this.supportsBinary||(r.b64=1),this.createUri(l,r)}}const ou=an.WebSocket||an.MozWebSocket;class o0 extends r0{createSocket(l,r,o){return Tg?new ou(l,r,o):r?new ou(l,r):new ou(l)}doWrite(l,r){this.ws.send(r)}}class c0 extends Lu{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(l){return this.emitReserved("error",l)}this._transport.closed.then(()=>{this.onClose()}).catch(l=>{this.onError("webtransport error",l)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(l=>{const r=XS(Number.MAX_SAFE_INTEGER,this.socket.binaryType),o=l.readable.pipeThrough(r).getReader(),d=VS();d.readable.pipeTo(l.writable),this._writer=d.writable.getWriter();const f=()=>{o.read().then(({done:y,value:v})=>{y||(this.onPacket(v),f())}).catch(y=>{})};f();const g={type:"open"};this.query.sid&&(g.data=`{"sid":"${this.query.sid}"}`),this._writer.write(g).then(()=>this.onOpen())})})}write(l){this.writable=!1;for(let r=0;r<l.length;r++){const o=l[r],d=r===l.length-1;this._writer.write(o).then(()=>{d&&Nr(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var l;(l=this._transport)===null||l===void 0||l.close()}}const u0={websocket:o0,webtransport:c0,polling:i0},d0=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,f0=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Tu(s){if(s.length>8e3)throw"URI too long";const l=s,r=s.indexOf("["),o=s.indexOf("]");r!=-1&&o!=-1&&(s=s.substring(0,r)+s.substring(r,o).replace(/:/g,";")+s.substring(o,s.length));let d=d0.exec(s||""),f={},g=14;for(;g--;)f[f0[g]]=d[g]||"";return r!=-1&&o!=-1&&(f.source=l,f.host=f.host.substring(1,f.host.length-1).replace(/;/g,":"),f.authority=f.authority.replace("[","").replace("]","").replace(/;/g,":"),f.ipv6uri=!0),f.pathNames=h0(f,f.path),f.queryKey=m0(f,f.query),f}function h0(s,l){const r=/\/{2,9}/g,o=l.replace(r,"/").split("/");return(l.slice(0,1)=="/"||l.length===0)&&o.splice(0,1),l.slice(-1)=="/"&&o.splice(o.length-1,1),o}function m0(s,l){const r={};return l.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(o,d,f){d&&(r[d]=f)}),r}const Su=typeof addEventListener=="function"&&typeof removeEventListener=="function",Sr=[];Su&&addEventListener("offline",()=>{Sr.forEach(s=>s())},!1);class ga extends ct{constructor(l,r){if(super(),this.binaryType=QS,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,l&&typeof l=="object"&&(r=l,l=null),l){const o=Tu(l);r.hostname=o.host,r.secure=o.protocol==="https"||o.protocol==="wss",r.port=o.port,o.query&&(r.query=o.query)}else r.host&&(r.hostname=Tu(r.host).host);wr(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(o=>{const d=o.prototype.name;this.transports.push(d),this._transportsByName[d]=o}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=WS(this.opts.query)),Su&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Sr.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(l){const r=Object.assign({},this.opts.query);r.EIO=pg,r.transport=l,this.id&&(r.sid=this.id);const o=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[l]);return new this._transportsByName[l](o)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const l=this.opts.rememberUpgrade&&ga.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const r=this.createTransport(l);r.open(),this.setTransport(r)}setTransport(l){this.transport&&this.transport.removeAllListeners(),this.transport=l,l.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",ga.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(l){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",l),this.emitReserved("heartbeat"),l.type){case"open":this.onHandshake(JSON.parse(l.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const r=new Error("server error");r.code=l.data,this._onError(r);break;case"message":this.emitReserved("data",l.data),this.emitReserved("message",l.data);break}}onHandshake(l){this.emitReserved("handshake",l),this.id=l.sid,this.transport.query.sid=l.sid,this._pingInterval=l.pingInterval,this._pingTimeout=l.pingTimeout,this._maxPayload=l.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const l=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+l,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},l),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const l=this._getWritablePackets();this.transport.send(l),this._prevBufferLen=l.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let o=0;o<this.writeBuffer.length;o++){const d=this.writeBuffer[o].data;if(d&&(r+=JS(d)),o>0&&r>this._maxPayload)return this.writeBuffer.slice(0,o);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const l=Date.now()>this._pingTimeoutTime;return l&&(this._pingTimeoutTime=0,Nr(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),l}write(l,r,o){return this._sendPacket("message",l,r,o),this}send(l,r,o){return this._sendPacket("message",l,r,o),this}_sendPacket(l,r,o,d){if(typeof r=="function"&&(d=r,r=void 0),typeof o=="function"&&(d=o,o=null),this.readyState==="closing"||this.readyState==="closed")return;o=o||{},o.compress=o.compress!==!1;const f={type:l,data:r,options:o};this.emitReserved("packetCreate",f),this.writeBuffer.push(f),d&&this.once("flush",d),this.flush()}close(){const l=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),l()},o=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?o():l()}):this.upgrading?o():l()),this}_onError(l){if(ga.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",l),this._onClose("transport error",l)}_onClose(l,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Su&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const o=Sr.indexOf(this._offlineEventListener);o!==-1&&Sr.splice(o,1)}this.readyState="closed",this.id=null,this.emitReserved("close",l,r),this.writeBuffer=[],this._prevBufferLen=0}}}ga.protocol=pg;class p0 extends ga{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let l=0;l<this._upgrades.length;l++)this._probe(this._upgrades[l])}_probe(l){let r=this.createTransport(l),o=!1;ga.priorWebsocketSuccess=!1;const d=()=>{o||(r.send([{type:"ping",data:"probe"}]),r.once("packet",S=>{if(!o)if(S.type==="pong"&&S.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;ga.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{o||this.readyState!=="closed"&&(T(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const j=new Error("probe error");j.transport=r.name,this.emitReserved("upgradeError",j)}}))};function f(){o||(o=!0,T(),r.close(),r=null)}const g=S=>{const j=new Error("probe error: "+S);j.transport=r.name,f(),this.emitReserved("upgradeError",j)};function y(){g("transport closed")}function v(){g("socket closed")}function p(S){r&&S.name!==r.name&&f()}const T=()=>{r.removeListener("open",d),r.removeListener("error",g),r.removeListener("close",y),this.off("close",v),this.off("upgrading",p)};r.once("open",d),r.once("error",g),r.once("close",y),this.once("close",v),this.once("upgrading",p),this._upgrades.indexOf("webtransport")!==-1&&l!=="webtransport"?this.setTimeoutFn(()=>{o||r.open()},200):r.open()}onHandshake(l){this._upgrades=this._filterUpgrades(l.upgrades),super.onHandshake(l)}_filterUpgrades(l){const r=[];for(let o=0;o<l.length;o++)~this.transports.indexOf(l[o])&&r.push(l[o]);return r}}let g0=class extends p0{constructor(l,r={}){const o=typeof l=="object"?l:r;(!o.transports||o.transports&&typeof o.transports[0]=="string")&&(o.transports=(o.transports||["polling","websocket","webtransport"]).map(d=>u0[d]).filter(d=>!!d)),super(l,o)}};function y0(s,l="",r){let o=s;r=r||typeof location<"u"&&location,s==null&&(s=r.protocol+"//"+r.host),typeof s=="string"&&(s.charAt(0)==="/"&&(s.charAt(1)==="/"?s=r.protocol+s:s=r.host+s),/^(https?|wss?):\/\//.test(s)||(typeof r<"u"?s=r.protocol+"//"+s:s="https://"+s),o=Tu(s)),o.port||(/^(http|ws)$/.test(o.protocol)?o.port="80":/^(http|ws)s$/.test(o.protocol)&&(o.port="443")),o.path=o.path||"/";const f=o.host.indexOf(":")!==-1?"["+o.host+"]":o.host;return o.id=o.protocol+"://"+f+":"+o.port+l,o.href=o.protocol+"://"+f+(r&&r.port===o.port?"":":"+o.port),o}const v0=typeof ArrayBuffer=="function",x0=s=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(s):s.buffer instanceof ArrayBuffer,Sg=Object.prototype.toString,T0=typeof Blob=="function"||typeof Blob<"u"&&Sg.call(Blob)==="[object BlobConstructor]",S0=typeof File=="function"||typeof File<"u"&&Sg.call(File)==="[object FileConstructor]";function Hu(s){return v0&&(s instanceof ArrayBuffer||x0(s))||T0&&s instanceof Blob||S0&&s instanceof File}function _r(s,l){if(!s||typeof s!="object")return!1;if(Array.isArray(s)){for(let r=0,o=s.length;r<o;r++)if(_r(s[r]))return!0;return!1}if(Hu(s))return!0;if(s.toJSON&&typeof s.toJSON=="function"&&arguments.length===1)return _r(s.toJSON(),!0);for(const r in s)if(Object.prototype.hasOwnProperty.call(s,r)&&_r(s[r]))return!0;return!1}function _0(s){const l=[],r=s.data,o=s;return o.data=_u(r,l),o.attachments=l.length,{packet:o,buffers:l}}function _u(s,l){if(!s)return s;if(Hu(s)){const r={_placeholder:!0,num:l.length};return l.push(s),r}else if(Array.isArray(s)){const r=new Array(s.length);for(let o=0;o<s.length;o++)r[o]=_u(s[o],l);return r}else if(typeof s=="object"&&!(s instanceof Date)){const r={};for(const o in s)Object.prototype.hasOwnProperty.call(s,o)&&(r[o]=_u(s[o],l));return r}return s}function E0(s,l){return s.data=Eu(s.data,l),delete s.attachments,s}function Eu(s,l){if(!s)return s;if(s&&s._placeholder===!0){if(typeof s.num=="number"&&s.num>=0&&s.num<l.length)return l[s.num];throw new Error("illegal attachments")}else if(Array.isArray(s))for(let r=0;r<s.length;r++)s[r]=Eu(s[r],l);else if(typeof s=="object")for(const r in s)Object.prototype.hasOwnProperty.call(s,r)&&(s[r]=Eu(s[r],l));return s}const b0=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],j0=5;var De;(function(s){s[s.CONNECT=0]="CONNECT",s[s.DISCONNECT=1]="DISCONNECT",s[s.EVENT=2]="EVENT",s[s.ACK=3]="ACK",s[s.CONNECT_ERROR=4]="CONNECT_ERROR",s[s.BINARY_EVENT=5]="BINARY_EVENT",s[s.BINARY_ACK=6]="BINARY_ACK"})(De||(De={}));class C0{constructor(l){this.replacer=l}encode(l){return(l.type===De.EVENT||l.type===De.ACK)&&_r(l)?this.encodeAsBinary({type:l.type===De.EVENT?De.BINARY_EVENT:De.BINARY_ACK,nsp:l.nsp,data:l.data,id:l.id}):[this.encodeAsString(l)]}encodeAsString(l){let r=""+l.type;return(l.type===De.BINARY_EVENT||l.type===De.BINARY_ACK)&&(r+=l.attachments+"-"),l.nsp&&l.nsp!=="/"&&(r+=l.nsp+","),l.id!=null&&(r+=l.id),l.data!=null&&(r+=JSON.stringify(l.data,this.replacer)),r}encodeAsBinary(l){const r=_0(l),o=this.encodeAsString(r.packet),d=r.buffers;return d.unshift(o),d}}function Rp(s){return Object.prototype.toString.call(s)==="[object Object]"}class qu extends ct{constructor(l){super(),this.reviver=l}add(l){let r;if(typeof l=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(l);const o=r.type===De.BINARY_EVENT;o||r.type===De.BINARY_ACK?(r.type=o?De.EVENT:De.ACK,this.reconstructor=new A0(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(Hu(l)||l.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(l),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+l)}decodeString(l){let r=0;const o={type:Number(l.charAt(0))};if(De[o.type]===void 0)throw new Error("unknown packet type "+o.type);if(o.type===De.BINARY_EVENT||o.type===De.BINARY_ACK){const f=r+1;for(;l.charAt(++r)!=="-"&&r!=l.length;);const g=l.substring(f,r);if(g!=Number(g)||l.charAt(r)!=="-")throw new Error("Illegal attachments");o.attachments=Number(g)}if(l.charAt(r+1)==="/"){const f=r+1;for(;++r&&!(l.charAt(r)===","||r===l.length););o.nsp=l.substring(f,r)}else o.nsp="/";const d=l.charAt(r+1);if(d!==""&&Number(d)==d){const f=r+1;for(;++r;){const g=l.charAt(r);if(g==null||Number(g)!=g){--r;break}if(r===l.length)break}o.id=Number(l.substring(f,r+1))}if(l.charAt(++r)){const f=this.tryParse(l.substr(r));if(qu.isPayloadValid(o.type,f))o.data=f;else throw new Error("invalid payload")}return o}tryParse(l){try{return JSON.parse(l,this.reviver)}catch{return!1}}static isPayloadValid(l,r){switch(l){case De.CONNECT:return Rp(r);case De.DISCONNECT:return r===void 0;case De.CONNECT_ERROR:return typeof r=="string"||Rp(r);case De.EVENT:case De.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&b0.indexOf(r[0])===-1);case De.ACK:case De.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class A0{constructor(l){this.packet=l,this.buffers=[],this.reconPack=l}takeBinaryData(l){if(this.buffers.push(l),this.buffers.length===this.reconPack.attachments){const r=E0(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const N0=Object.freeze(Object.defineProperty({__proto__:null,Decoder:qu,Encoder:C0,get PacketType(){return De},protocol:j0},Symbol.toStringTag,{value:"Module"}));function un(s,l,r){return s.on(l,r),function(){s.off(l,r)}}const w0=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class _g extends ct{constructor(l,r,o){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=l,this.nsp=r,o&&o.auth&&(this.auth=o.auth),this._opts=Object.assign({},o),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const l=this.io;this.subs=[un(l,"open",this.onopen.bind(this)),un(l,"packet",this.onpacket.bind(this)),un(l,"error",this.onerror.bind(this)),un(l,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...l){return l.unshift("message"),this.emit.apply(this,l),this}emit(l,...r){var o,d,f;if(w0.hasOwnProperty(l))throw new Error('"'+l.toString()+'" is a reserved event name');if(r.unshift(l),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;const g={type:De.EVENT,data:r};if(g.options={},g.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const T=this.ids++,S=r.pop();this._registerAckCallback(T,S),g.id=T}const y=(d=(o=this.io.engine)===null||o===void 0?void 0:o.transport)===null||d===void 0?void 0:d.writable,v=this.connected&&!(!((f=this.io.engine)===null||f===void 0)&&f._hasPingExpired());return this.flags.volatile&&!y||(v?(this.notifyOutgoingListeners(g),this.packet(g)):this.sendBuffer.push(g)),this.flags={},this}_registerAckCallback(l,r){var o;const d=(o=this.flags.timeout)!==null&&o!==void 0?o:this._opts.ackTimeout;if(d===void 0){this.acks[l]=r;return}const f=this.io.setTimeoutFn(()=>{delete this.acks[l];for(let y=0;y<this.sendBuffer.length;y++)this.sendBuffer[y].id===l&&this.sendBuffer.splice(y,1);r.call(this,new Error("operation has timed out"))},d),g=(...y)=>{this.io.clearTimeoutFn(f),r.apply(this,y)};g.withError=!0,this.acks[l]=g}emitWithAck(l,...r){return new Promise((o,d)=>{const f=(g,y)=>g?d(g):o(y);f.withError=!0,r.push(f),this.emit(l,...r)})}_addToQueue(l){let r;typeof l[l.length-1]=="function"&&(r=l.pop());const o={id:this._queueSeq++,tryCount:0,pending:!1,args:l,flags:Object.assign({fromQueue:!0},this.flags)};l.push((d,...f)=>(this._queue[0],d!==null?o.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(d)):(this._queue.shift(),r&&r(null,...f)),o.pending=!1,this._drainQueue())),this._queue.push(o),this._drainQueue()}_drainQueue(l=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!l||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(l){l.nsp=this.nsp,this.io._packet(l)}onopen(){typeof this.auth=="function"?this.auth(l=>{this._sendConnectPacket(l)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(l){this.packet({type:De.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},l):l})}onerror(l){this.connected||this.emitReserved("connect_error",l)}onclose(l,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",l,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(l=>{if(!this.sendBuffer.some(o=>String(o.id)===l)){const o=this.acks[l];delete this.acks[l],o.withError&&o.call(this,new Error("socket has been disconnected"))}})}onpacket(l){if(l.nsp===this.nsp)switch(l.type){case De.CONNECT:l.data&&l.data.sid?this.onconnect(l.data.sid,l.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case De.EVENT:case De.BINARY_EVENT:this.onevent(l);break;case De.ACK:case De.BINARY_ACK:this.onack(l);break;case De.DISCONNECT:this.ondisconnect();break;case De.CONNECT_ERROR:this.destroy();const o=new Error(l.data.message);o.data=l.data.data,this.emitReserved("connect_error",o);break}}onevent(l){const r=l.data||[];l.id!=null&&r.push(this.ack(l.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(l){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const o of r)o.apply(this,l)}super.emit.apply(this,l),this._pid&&l.length&&typeof l[l.length-1]=="string"&&(this._lastOffset=l[l.length-1])}ack(l){const r=this;let o=!1;return function(...d){o||(o=!0,r.packet({type:De.ACK,id:l,data:d}))}}onack(l){const r=this.acks[l.id];typeof r=="function"&&(delete this.acks[l.id],r.withError&&l.data.unshift(null),r.apply(this,l.data))}onconnect(l,r){this.id=l,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(l=>this.emitEvent(l)),this.receiveBuffer=[],this.sendBuffer.forEach(l=>{this.notifyOutgoingListeners(l),this.packet(l)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(l=>l()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:De.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(l){return this.flags.compress=l,this}get volatile(){return this.flags.volatile=!0,this}timeout(l){return this.flags.timeout=l,this}onAny(l){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(l),this}prependAny(l){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(l),this}offAny(l){if(!this._anyListeners)return this;if(l){const r=this._anyListeners;for(let o=0;o<r.length;o++)if(l===r[o])return r.splice(o,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(l){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(l),this}prependAnyOutgoing(l){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(l),this}offAnyOutgoing(l){if(!this._anyOutgoingListeners)return this;if(l){const r=this._anyOutgoingListeners;for(let o=0;o<r.length;o++)if(l===r[o])return r.splice(o,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(l){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const r=this._anyOutgoingListeners.slice();for(const o of r)o.apply(this,l.data)}}}function Hl(s){s=s||{},this.ms=s.min||100,this.max=s.max||1e4,this.factor=s.factor||2,this.jitter=s.jitter>0&&s.jitter<=1?s.jitter:0,this.attempts=0}Hl.prototype.duration=function(){var s=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var l=Math.random(),r=Math.floor(l*this.jitter*s);s=(Math.floor(l*10)&1)==0?s-r:s+r}return Math.min(s,this.max)|0};Hl.prototype.reset=function(){this.attempts=0};Hl.prototype.setMin=function(s){this.ms=s};Hl.prototype.setMax=function(s){this.max=s};Hl.prototype.setJitter=function(s){this.jitter=s};class bu extends ct{constructor(l,r){var o;super(),this.nsps={},this.subs=[],l&&typeof l=="object"&&(r=l,l=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,wr(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((o=r.randomizationFactor)!==null&&o!==void 0?o:.5),this.backoff=new Hl({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=l;const d=r.parser||N0;this.encoder=new d.Encoder,this.decoder=new d.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(l){return arguments.length?(this._reconnection=!!l,l||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(l){return l===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=l,this)}reconnectionDelay(l){var r;return l===void 0?this._reconnectionDelay:(this._reconnectionDelay=l,(r=this.backoff)===null||r===void 0||r.setMin(l),this)}randomizationFactor(l){var r;return l===void 0?this._randomizationFactor:(this._randomizationFactor=l,(r=this.backoff)===null||r===void 0||r.setJitter(l),this)}reconnectionDelayMax(l){var r;return l===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=l,(r=this.backoff)===null||r===void 0||r.setMax(l),this)}timeout(l){return arguments.length?(this._timeout=l,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(l){if(~this._readyState.indexOf("open"))return this;this.engine=new g0(this.uri,this.opts);const r=this.engine,o=this;this._readyState="opening",this.skipReconnect=!1;const d=un(r,"open",function(){o.onopen(),l&&l()}),f=y=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",y),l?l(y):this.maybeReconnectOnOpen()},g=un(r,"error",f);if(this._timeout!==!1){const y=this._timeout,v=this.setTimeoutFn(()=>{d(),f(new Error("timeout")),r.close()},y);this.opts.autoUnref&&v.unref(),this.subs.push(()=>{this.clearTimeoutFn(v)})}return this.subs.push(d),this.subs.push(g),this}connect(l){return this.open(l)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const l=this.engine;this.subs.push(un(l,"ping",this.onping.bind(this)),un(l,"data",this.ondata.bind(this)),un(l,"error",this.onerror.bind(this)),un(l,"close",this.onclose.bind(this)),un(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(l){try{this.decoder.add(l)}catch(r){this.onclose("parse error",r)}}ondecoded(l){Nr(()=>{this.emitReserved("packet",l)},this.setTimeoutFn)}onerror(l){this.emitReserved("error",l)}socket(l,r){let o=this.nsps[l];return o?this._autoConnect&&!o.active&&o.connect():(o=new _g(this,l,r),this.nsps[l]=o),o}_destroy(l){const r=Object.keys(this.nsps);for(const o of r)if(this.nsps[o].active)return;this._close()}_packet(l){const r=this.encoder.encode(l);for(let o=0;o<r.length;o++)this.engine.write(r[o],l.options)}cleanup(){this.subs.forEach(l=>l()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(l,r){var o;this.cleanup(),(o=this.engine)===null||o===void 0||o.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",l,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const l=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();this._reconnecting=!0;const o=this.setTimeoutFn(()=>{l.skipReconnect||(this.emitReserved("reconnect_attempt",l.backoff.attempts),!l.skipReconnect&&l.open(d=>{d?(l._reconnecting=!1,l.reconnect(),this.emitReserved("reconnect_error",d)):l.onreconnect()}))},r);this.opts.autoUnref&&o.unref(),this.subs.push(()=>{this.clearTimeoutFn(o)})}}onreconnect(){const l=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",l)}}const Bs={};function Ol(s,l){typeof s=="object"&&(l=s,s=void 0),l=l||{};const r=y0(s,l.path||"/socket.io"),o=r.source,d=r.id,f=r.path,g=Bs[d]&&f in Bs[d].nsps,y=l.forceNew||l["force new connection"]||l.multiplex===!1||g;let v;return y?v=new bu(o,l):(Bs[d]||(Bs[d]=new bu(o,l)),v=Bs[d]),r.query&&!l.query&&(l.query=r.queryKey),v.socket(r.path,l)}Object.assign(Ol,{Manager:bu,Socket:_g,io:Ol,connect:Ol});const pa={TASK_CREATED:"task.created",TASK_UPDATED:"task.updated",TASK_DELETED:"task.deleted",TASK_ASSIGNED:"task.assigned",TASK_STATUS_CHANGED:"task.status_changed",TASK_COMMENTED:"task.commented",INPUT_REQUEST_ANSWERED:"input.request.answered",TASK_ACTIVITY:"task.activity"},R0=sg("/tasks"),O0=100,z0=()=>{const[s,l]=m.useState(!1),[r,o]=m.useState(null),[d,f]=m.useState([]),[g,y]=m.useState(null),[v,p]=m.useState(!1),[T,S]=m.useState({}),j=L=>{if(!L.message){console.warn("Received task activity event without message, skipping",L);return}S(U=>({...U,[L.taskId]:L}))};m.useEffect(()=>(ae(),O()),[]);const E=L=>[...L].sort((U,F)=>{const ie=new Date(U.updatedAt).getTime();return new Date(F.updatedAt).getTime()-ie}),b=async L=>await Vt.tasksControllerCreateTask(L),w=async({taskId:L})=>await Vt.tasksControllerDeleteTask(L),k=async({taskId:L,comment:U})=>await Vt.tasksControllerAddComment(L,{content:U}),q=async({taskId:L,assigneeActorId:U})=>{const F={assigneeActorId:U};return await Vt.tasksControllerAssignTask(L,F)},Q=async({taskId:L})=>await Vt.tasksControllerAssignTaskToMe(L),$=async({taskId:L,inputRequestId:U,answer:F})=>await Vt.tasksControllerAnswerInputRequest(L,U,{answer:F}),ae=async()=>{l(!0),o(null);try{const L=await Vt.tasksControllerListTasks(void 0,void 0,void 0,1,O0);f(E(L.items))}catch(L){o(L instanceof Error?L.message:"Failed to load tasks")}finally{l(!1)}},O=()=>{const L=Ol(R0,{transports:["websocket","polling"],withCredentials:!0});return L.on("connect",()=>{console.log("Connected to websocket"),L.emit("tasks.subscribe",{},U=>{U.ok?(console.log(U),console.log("Subscribed to room:",U.room),p(!0)):(console.error("Failed to subscribe to room"),p(!1))}),ae()}),L.on("disconnect",()=>{console.log("WebSocket disconnected"),p(!1)}),L.on(pa.TASK_CREATED,U=>{console.log("task.created",U),f(F=>F.some(ie=>ie.id===U.payload.id)?F:E([U.payload,...F]))}),L.on(pa.TASK_UPDATED,U=>{console.log("task.updated",U),f(F=>E(F.map(ie=>ie.id===U.payload.id?U.payload:ie)))}),L.on(pa.TASK_DELETED,U=>{console.log("task.deleted",U),f(F=>F.filter(ie=>ie.id!==U.payload.taskId))}),L.on(pa.TASK_ASSIGNED,U=>{console.log("task.assigned",U),f(F=>E(F.map(ie=>ie.id===U.payload.id?U.payload:ie)))}),L.on(pa.TASK_COMMENTED,async U=>{console.log("task.commented",U);try{const F=await Vt.tasksControllerGetTask(U.payload.taskId);f(ie=>ie.findIndex(Z=>Z.id===F.id)===-1?E([F,...ie]):E(ie.map(Z=>Z.id===F.id?F:Z)))}catch(F){console.error("Failed to refresh task after comment",F)}}),L.on(pa.INPUT_REQUEST_ANSWERED,async U=>{console.log("input.request.answered",U);try{const F=await Vt.tasksControllerGetTask(U.payload.taskId);f(ie=>ie.findIndex(Z=>Z.id===F.id)===-1?E([F,...ie]):E(ie.map(Z=>Z.id===F.id?F:Z)))}catch(F){console.error("Failed to refresh task after input request answer",F)}}),L.on(pa.TASK_STATUS_CHANGED,U=>{console.log("task.status_changed",U),f(F=>E(F.map(ie=>ie.id===U.payload.id?U.payload:ie)))}),L.on(pa.TASK_ACTIVITY,U=>{console.log("task.activity",U),j(U)}),y(L),()=>{L.close()}};return{isLoading:s,error:r,activityByTaskId:T,tasks:d,createTask:b,deleteTask:w,addComment:k,assignTask:q,assignTaskToMe:Q,answerInputRequest:$,isConnected:v}},D0=()=>({[re.NOT_STARTED]:{enteringIds:new Set,exitingTasks:[]},[re.IN_PROGRESS]:{enteringIds:new Set,exitingTasks:[]},[re.FOR_REVIEW]:{enteringIds:new Set,exitingTasks:[]},[re.DONE]:{enteringIds:new Set,exitingTasks:[]}}),Eg=m.createContext(null),k0=500,M0=4e3;function U0({children:s}){const{tasks:l,isLoading:r,error:o,isConnected:d,createTask:f,deleteTask:g,addComment:y,assignTask:v,assignTaskToMe:p,answerInputRequest:T,activityByTaskId:S}=z0(),[j,E]=m.useState(""),[b,w]=m.useState(0),k=m.useRef(new Map),q=m.useRef([]),Q=m.useRef(new Map),$=m.useRef(0),[ae,O]=m.useState(0),{animationByStatus:L,globalEnteringIds:U,globalExitingTasks:F}=m.useMemo(()=>{const te=Date.now(),Z=new Map(l.map(ne=>[ne.id,ne])),be=k.current,Ee=new Set(be.keys()),Fe=new Set(Z.keys());if(q.current=q.current.filter(ne=>ne.expiresAt>te),Ee.size>0){const ne={[re.NOT_STARTED]:new Set,[re.IN_PROGRESS]:new Set,[re.FOR_REVIEW]:new Set,[re.DONE]:new Set},ye={[re.NOT_STARTED]:[],[re.IN_PROGRESS]:[],[re.FOR_REVIEW]:[],[re.DONE]:[]},je=new Set,N=[];for(const[J,ee]of Z){const he=be.get(J);he?he.status!==ee.status&&(ye[he.status].push(he),ne[ee.status].add(J)):(ne[ee.status].add(J),je.add(J))}for(const[J,ee]of be)Fe.has(J)||(ye[ee.status].push(ee),N.push(ee));(Object.values(ne).some(J=>J.size>0)||Object.values(ye).some(J=>J.length>0))&&q.current.push({enteringByStatus:ne,exitingByStatus:ye,globalEntering:je,globalExiting:N,expiresAt:te+k0})}k.current=Z;const Xe=D0();let H=new Set,P=[];for(const ne of q.current){for(const ye of Object.values(re))ne.enteringByStatus[ye].forEach(je=>Xe[ye].enteringIds.add(je)),Xe[ye].exitingTasks.push(...ne.exitingByStatus[ye]);ne.globalEntering.forEach(ye=>H.add(ye)),P.push(...ne.globalExiting)}return{animationByStatus:Xe,globalEnteringIds:H,globalExitingTasks:P}},[l,ae]);m.useEffect(()=>{if(q.current.length===0)return;const Z=Math.min(...q.current.map(Ee=>Ee.expiresAt))-Date.now();if(Z<=0){O(Ee=>Ee+1);return}const be=setTimeout(()=>{O(Ee=>Ee+1)},Z);return()=>clearTimeout(be)},[L,U,F]),m.useEffect(()=>{const te=Q.current,Z=new Map(l.map(Ee=>[Ee.id,Ee]));if(te.size===0){Q.current=Z;return}let be=!1;for(const[Ee,Fe]of Z){const Xe=te.get(Ee);if(Xe&&Xe.status!==re.DONE&&Fe.status===re.DONE){be=!0;break}}if(be){const Ee=Date.now();Ee-$.current>=M0&&($.current=Ee,w(Fe=>Fe+1))}Q.current=Z},[l]);const ie=m.useMemo(()=>({tasks:l,createTask:f,deleteTask:g,addComment:y,assignTask:v,assignTaskToMe:p,answerInputRequest:T,isLoading:r,error:o,isConnected:d,sectionTitle:j,setSectionTitle:E,animationByStatus:L,globalEnteringIds:U,globalExitingTasks:F,activityByTaskId:S,shippedCelebrationTrigger:b}),[l,f,g,y,v,p,T,r,o,d,j,E,L,U,F,S,b]);return i.jsx(Eg.Provider,{value:ie,children:s})}function Xs(){const s=m.useContext(Eg);if(!s)throw new Error("useTasksCtx must be used within <TasksProvider>");return s}const bg=m.createContext(void 0);function Rr(){const s=m.useContext(bg);if(!s)throw new Error("useToast must be used within ToastProvider");return s}function B0(s){if(s&&typeof s=="object"){const l=s;if(l.body?.detail)return l.body.detail;if(l.detail)return l.detail;if(l.message)return l.message}return typeof s=="string"?s:"An unexpected error occurred"}function L0({children:s}){const[l,r]=m.useState([]),o=m.useCallback((g,y="info",v=5e3)=>{const p=crypto.randomUUID(),T={id:p,message:g,type:y,duration:v};r(S=>[...S,T]),v>0&&setTimeout(()=>{f(p)},v)},[]),d=m.useCallback(g=>{const y=B0(g);o(y,"error",6e3)},[o]),f=m.useCallback(g=>{r(y=>y.filter(v=>v.id!==g))},[]);return i.jsx(bg.Provider,{value:{toasts:l,showToast:o,showError:d,dismissToast:f},children:s})}function sn({title:s,onCancel:l,onSave:r,children:o,headerLeft:d,headerRight:f,closeMs:g=220}){const[y,v]=m.useState(!1),[p,T]=m.useState(!1);m.useEffect(()=>{requestAnimationFrame(()=>v(!0))},[]);function S(){v(!1),setTimeout(()=>l?.(),g)}async function j(){if(!(!r||p))try{T(!0),await r()&&S()}catch{}finally{T(!1)}}function E(b){b.nativeEvent.isComposing||b.key==="Enter"&&(!b.metaKey&&!b.ctrlKey||(b.preventDefault(),j()))}return i.jsxs("div",{className:`pop-shell__overlay ${y?"pop-shell__overlay--open":""}`,children:[i.jsx("div",{className:"pop-shell__space",onClick:S}),i.jsxs("div",{className:`pop-shell__main-panel ${y?"pop-shell__main-panel--open":""}`,onKeyDown:E,children:[i.jsxs("div",{className:"pop-shell__main-title",children:[d??i.jsx("div",{onClick:S,children:i.jsx(_,{size:"4",weight:"normal",className:"pop-shell__main-title-button",children:"cancel"})}),i.jsx(_,{size:"4",weight:"medium",children:s}),f??i.jsx("div",{onClick:j,style:{opacity:p?.6:1,pointerEvents:p?"none":"auto"},children:i.jsx(_,{size:"4",weight:"normal",className:"pop-shell__main-title-button",children:p?"saving":"save"})})]}),i.jsx("div",{className:"pop-shell__main-content",children:o})]})]})}function Gu({key:s,defaultValue:l,debounceMs:r=500}){const[o,d]=m.useState(()=>{try{const y=localStorage.getItem(s);if(y)return JSON.parse(y)}catch(y){console.error("Error loading draft from localStorage:",y)}return l}),f=m.useRef(void 0);return m.useEffect(()=>(f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{try{localStorage.setItem(s,JSON.stringify(o))}catch(y){console.error("Error saving draft to localStorage:",y)}},r),()=>{f.current&&clearTimeout(f.current)}),[o,s,r]),[o,d,()=>{try{localStorage.removeItem(s),d(l)}catch(y){console.error("Error clearing draft from localStorage:",y)}}]}const H0={title:"",description:""},Op=s=>{s&&(s.style.height="auto",s.style.height=`${s.scrollHeight}px`)};function zp({onCancel:s,onSave:l}){const[r,o,d]=Gu({key:"new-task-draft",defaultValue:H0}),{title:f,description:g}=r,y=m.useRef(null),v=m.useRef(null),p=(j,E)=>{o({...r,[j]:E})};m.useEffect(()=>{y.current?.focus()},[]),m.useEffect(()=>{Op(v.current)},[g]);function T(j){p("description",j.target.value),Op(j.target)}async function S(){const j=await l({title:f,description:g});return j&&d(),j}return i.jsx(sn,{title:"Create a Task",onCancel:s,onSave:S,children:i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"new-task-pop__input-title",children:i.jsx("input",{className:"new-task-pop__input-title",ref:y,placeholder:"Title",value:f,onChange:j=>p("title",j.target.value),onKeyDown:j=>{j.key==="Enter"&&(j.preventDefault(),v.current?.focus())}})}),i.jsx("div",{className:"new-task-pop__input-description",children:i.jsx("textarea",{className:"new-task-pop__input-description",ref:v,placeholder:"Enter a description (optional)",value:g,onChange:T})})]})})}function cu({task:s,animation:l,onClick:r,pulseKey:o}){const[d,f]=m.useState(!1),g=s.assigneeActor??s.createdByActor;m.useEffect(()=>{if(o==null)return;f(!0);const p=setTimeout(()=>f(!1),1e3);return()=>clearTimeout(p)},[o]);const y=s.tags.map(p=>({label:p.name}));s.comments.length&&y.push({label:`💬 ${s.comments.length}`}),s.artefacts.length&&y.push({label:`🔗 ${s.artefacts.length}`});const v=s.inputRequests.filter(p=>!p.resolvedAt).length;return v&&y.push({label:`✋ ${v}`}),i.jsxs(pe,{leading:i.jsx(Ve,{name:g.displayName,size:"lg",src:g.avatarUrl||void 0}),topRight:xt(s.updatedAt),tags:y,animation:l,highlight:s.inputRequests.filter(p=>!p.resolvedAt)?.length>0,onClick:r,children:[i.jsxs(_,{className:"pre",children:["#",s.id.slice(0,6)]}),i.jsx("div",{style:{minWidth:0,overflow:"hidden"},children:i.jsx(_,{weight:"bold",size:"3",tone:"default",children:i.jsxs("span",{className:"task-row__title",children:[i.jsx("span",{className:"task-row__titleText",children:s.name}),d?i.jsx("span",{className:"task-row__pulseDot","aria-hidden":!0}):null]})})}),i.jsx("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s.description}),i.jsxs("div",{style:{fontSize:12},className:"text--tone-muted",children:[s.assignee?`Assigned: @${s.assignee}`:"unassigned"," · ",`Created by @${s.createdByActor.slug}`]})]})}function jg(s){const l=new Map,r=new Date;r.setHours(0,0,0,0);for(const o of s){const d=new Date(o.updatedAt);d.setHours(0,0,0,0);const f=d.toISOString().split("T")[0],g=d.getTime()===r.getTime();l.has(f)||l.set(f,{date:d,dateKey:f,tasks:[],isToday:g}),l.get(f).tasks.push(o)}return Array.from(l.values()).sort((o,d)=>d.date.getTime()-o.date.getTime())}function Cg(s){const l=new Date;l.setHours(0,0,0,0);const r=new Date(l);r.setDate(r.getDate()-1);const o=new Date(s);if(o.setHours(0,0,0,0),o.getTime()===l.getTime())return"Today";if(o.getTime()===r.getTime())return"Yesterday";const d=l.getFullYear(),f=o.getFullYear(),y=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][o.getMonth()],v=o.getDate();return f===d?`${y} ${v}`:`${y} ${v}, ${f}`}function q0({date:s,taskCount:l,isExpanded:r,onClick:o}){const d=Cg(s),f=r?"▼":"▶";return i.jsx(pe,{onClick:o,className:"day-summary-row",children:i.jsxs("div",{className:"day-summary-row__content",children:[i.jsx("span",{className:"day-summary-row__chevron",children:f}),i.jsx(_,{weight:"bold",size:"3",children:d}),i.jsxs(_,{size:"2",tone:"muted",className:"day-summary-row__count",children:["· ",l," ",l===1?"task":"tasks"," shipped"]})]})})}function G0({tasks:s,enteringIds:l,exitingTasks:r,groupByDay:o=!1}){const d=Je(),{activityByTaskId:f}=Xs(),[g,y]=m.useState(new Set),v=new Set(r.map(j=>j.id)),p=[...s,...r].sort((j,E)=>new Date(E.updatedAt).getTime()-new Date(j.updatedAt).getTime());if(!o)return i.jsx(de,{children:p.map(j=>{const E=v.has(j.id),b=l.has(j.id);let w;E?w="exiting":b&&(w="entering");const k=f[j.id];return i.jsx(cu,{task:j,animation:w,pulseKey:k?.ts,onClick:()=>d(`/tasks/task/${j.id}`)},E?`exiting-${j.id}`:j.id)})});const T=jg(p),S=j=>{y(E=>{const b=new Set(E);return b.has(j)?b.delete(j):b.add(j),b})};return i.jsx(de,{children:T.map(j=>{if(j.isToday)return j.tasks.map(b=>{const w=v.has(b.id),k=l.has(b.id);let q;w?q="exiting":k&&(q="entering");const Q=f[b.id];return i.jsx(cu,{task:b,animation:q,pulseKey:Q?.ts,onClick:()=>d(`/tasks/task/${b.id}`)},w?`exiting-${b.id}`:b.id)});const E=g.has(j.dateKey);return i.jsxs("div",{children:[i.jsx(q0,{date:j.date,taskCount:j.tasks.length,isExpanded:E,onClick:()=>S(j.dateKey)}),E&&j.tasks.map(b=>{const w=v.has(b.id),k=l.has(b.id);let q;w?q="exiting":k&&(q="entering");const Q=f[b.id];return i.jsx(cu,{task:b,animation:q,pulseKey:Q?.ts,onClick:()=>d(`/tasks/task/${b.id}`)},w?`exiting-${b.id}`:b.id)})]},j.dateKey)})})}function uu({task:s,animation:l,onClick:r,pulseKey:o}){const d=s.assigneeActor??s.createdByActor,f=s.tags.map(y=>({label:y.name}));s.comments.length&&f.push({label:`💬 ${s.comments.length}`});const g=s.inputRequests.filter(y=>!y.resolvedAt).length;return g&&f.push({label:`✋ ${g}`}),s.artefacts.length&&f.push({label:`🔗 ${s.artefacts.length}`}),i.jsxs(rg,{leading:i.jsx(Ve,{name:d.displayName,size:"md",src:d.avatarUrl||void 0}),topRight:xt(s.updatedAt),tags:f,animation:l,onClick:r,pulseKey:o,highlight:s.inputRequests.filter(y=>!y.resolvedAt)?.length>0,footer:i.jsxs(i.Fragment,{children:[i.jsxs("span",{className:"row-detail truncate",children:["#",s.id.slice(0,6)]}),i.jsx("span",{className:"row-detail truncate",children:s.assigneeActor?`Assigned: @${s.assigneeActor.slug}`:"unassigned"})]}),children:[i.jsx("div",{className:"row-title truncate",children:s.name}),i.jsx("div",{className:"row-subtitle truncate",children:s.description})]})}function Y0({date:s,taskCount:l,isExpanded:r,onClick:o}){const d=Cg(s),f=r?"▼":"▶";return i.jsxs("div",{className:"day-summary-card__content",onClick:o,children:[i.jsx("span",{className:"day-summary-card__chevron",children:f}),i.jsxs("span",{className:"day-summary-card__text",children:[i.jsx("strong",{children:d})," · ",l," ",l===1?"task":"tasks"]})]})}function V0({tasks:s,enteringIds:l,exitingTasks:r,groupByDay:o=!1}){const d=Je(),{activityByTaskId:f}=Xs(),[g,y]=m.useState(new Set),v=new Set(r.map(E=>E.id)),p=[...s,...r].sort((E,b)=>new Date(b.updatedAt).getTime()-new Date(E.updatedAt).getTime());if(!o)return i.jsx(i.Fragment,{children:p.map(E=>{const b=v.has(E.id),w=l.has(E.id),k=f[E.id];let q;return b?q="exiting":w&&(q="entering"),i.jsx(uu,{task:E,animation:q,onClick:()=>d(`/tasks/task/${E.id}`),pulseKey:k?.ts},b?`exiting-${E.id}`:E.id)})});const T=[],S=jg(p),j=E=>{y(b=>{const w=new Set(b);return w.has(E)?w.delete(E):w.add(E),w})};return S.forEach(E=>{if(E.isToday){E.tasks.forEach(w=>{const k=v.has(w.id),q=l.has(w.id),Q=f[w.id];let $;k?$="exiting":q&&($="entering");const ae=i.jsx(uu,{task:w,animation:$,onClick:()=>d(`/tasks/task/${w.id}`),pulseKey:Q?.ts},k?`exiting-${w.id}`:w.id);T.push(ae)});return}const b=g.has(E.dateKey);T.push(i.jsx(Y0,{date:E.date,taskCount:E.tasks.length,isExpanded:b,onClick:()=>j(E.dateKey)},`date-group-${E.date}`)),b&&E.tasks.forEach(w=>{const k=v.has(w.id),q=l.has(w.id),Q=f[w.id];let $;k?$="exiting":q&&($="entering");const ae=i.jsx(uu,{task:w,animation:$,onClick:()=>d(`/tasks/task/${w.id}`),pulseKey:Q?.ts},k?`exiting-${w.id}`:w.id);T.push(ae)})}),i.jsx(i.Fragment,{children:T})}function gr({status:s}){const l=Qt(),r=l?void 0:s,{tasks:o,createTask:d,setSectionTitle:f,animationByStatus:g,globalEnteringIds:y,globalExitingTasks:v,activityByTaskId:p}=Xs(),{showError:T}=Rr(),S=Je();dn(),m.useEffect(()=>{if(!r){f("All Tasks");return}f(vn[r].label)},[r,f]);const j=m.useMemo(()=>r?o.filter(ae=>ae.status===r):o,[o,r]),E=m.useMemo(()=>r?{enteringIds:g[r].enteringIds,exitingTasks:g[r].exitingTasks}:{enteringIds:y,exitingTasks:v},[r,g,y,v]),[b,w]=m.useState(null),[k,q]=m.useState(!1),Q=()=>{console.log("cancel"),q(!1)},$=async({title:ae,description:O})=>{console.log(`save title: ${ae} - description: ${O}`),w({name:ae,description:O});try{const L=await d({name:ae,description:O});return L?(w(L),S(`/tasks/task/${L.id}`),!0):!1}catch(L){return console.error("Error saving task"),console.error(L),T(L),!1}};return i.jsx("div",{className:`${l?"full-height":""}`,children:l?i.jsxs("div",{className:"tasks-page",children:[i.jsx(X0,{tasks:o,animationByStatus:g}),i.jsxs("button",{className:"tasks-fab tasks-fab--desktop",type:"button",onClick:()=>q(!0),children:[i.jsx("span",{className:"tasks-fab__plus",children:"+"}),i.jsx("span",{className:"tasks-fab__label",children:"New task"})]}),k?i.jsx(zp,{onCancel:Q,onSave:$}):null]}):i.jsxs(i.Fragment,{children:[i.jsx(G0,{tasks:j,enteringIds:E.enteringIds,exitingTasks:E.exitingTasks,groupByDay:r===re.DONE}),i.jsx("button",{className:"tasks-fab",type:"button",onClick:()=>q(!0),"aria-label":"Create new task",children:"+"}),k?i.jsx(zp,{onCancel:Q,onSave:$}):null]})})}function yr({tasks:s,status:l,animationState:r}){const o=m.useMemo(()=>s.filter(f=>f.status===l),[s,l]),d=vn[l].label;return i.jsxs("div",{className:"tasks-board-column",children:[i.jsxs("div",{className:"tasks-board-column__header",children:[i.jsx(_,{size:"3",weight:"bold",children:d}),i.jsx(_,{size:"1",tone:"muted",children:o.length})]}),i.jsx("div",{className:"tasks-board-column__body",children:i.jsx(V0,{tasks:o,enteringIds:r.enteringIds,exitingTasks:r.exitingTasks,groupByDay:l===re.DONE})})]})}function X0({tasks:s,animationByStatus:l}){return i.jsxs("div",{className:"tasks-board-view",children:[i.jsx(yr,{status:re.NOT_STARTED,tasks:s,animationState:l[re.NOT_STARTED]}),i.jsx(yr,{status:re.IN_PROGRESS,tasks:s,animationState:l[re.IN_PROGRESS]}),i.jsx(yr,{status:re.FOR_REVIEW,tasks:s,animationState:l[re.FOR_REVIEW]}),i.jsx(yr,{status:re.DONE,tasks:s,animationState:l[re.DONE]})]})}const I0=2200;function Q0({trigger:s,durationMs:l=I0}){const[r,o]=m.useState(!1);return m.useEffect(()=>{if(s<=0)return;o(!0);const d=window.setTimeout(()=>o(!1),l);return()=>window.clearTimeout(d)},[s,l]),r?i.jsxs("div",{className:"shipped-celebration",style:{"--celebration-duration":`${l}ms`},"aria-hidden":"true",children:[i.jsx("div",{className:"shipped-celebration__veil"}),i.jsx("div",{className:"shipped-celebration__rocket",role:"presentation",children:"🚀"}),i.jsx("div",{className:"shipped-celebration__spark shipped-celebration__spark--one"}),i.jsx("div",{className:"shipped-celebration__spark shipped-celebration__spark--two"}),i.jsx("div",{className:"shipped-celebration__spark shipped-celebration__spark--three"})]}):null}function K0(){const s=Qt(),{sectionTitle:l,shippedCelebrationTrigger:r}=Xs();return console.log("Tasks layout mounting"),i.jsxs("div",{style:{minHeight:0},children:[i.jsx(Q0,{trigger:r}),s?i.jsx(Ya,{sectionTitle:l,children:i.jsx(Dt,{})}):i.jsx(Va,{appTitle:"Tasks",sectionTitle:l,navItems:ES,children:i.jsx(Dt,{})})]})}function Or({onDelete:s,deleteLabel:l="Delete",confirmLabel:r="Confirm Delete",cancelLabel:o="Cancel",className:d,size:f="lg"}){const[g,y]=m.useState(!1),v=async()=>{await s(),y(!1)};return i.jsx(de,{className:d,children:g?i.jsxs(i.Fragment,{children:[i.jsx(ge,{size:f,variant:"secondary",onClick:()=>y(!1),children:o}),i.jsx(ge,{size:f,variant:"danger",onClick:v,children:r})]}):i.jsx(ge,{size:f,variant:"danger",onClick:()=>y(!0),children:l})})}function Z0(){const{toasts:s,dismissToast:l}=Rr();return s.length===0?null:i.jsx("div",{className:"toast-container",children:s.map(r=>i.jsxs("div",{className:`toast toast--${r.type}`,role:"alert","aria-live":"assertive",children:[i.jsx("div",{className:"toast__content",children:i.jsx(_,{size:"2",className:"toast__message",children:r.message})}),i.jsx("button",{className:"toast__close",onClick:()=>l(r.id),"aria-label":"Dismiss notification",children:"×"})]},r.id))})}const $0={content:""},Dp=s=>{s&&(s.style.height="auto",s.style.height=`${s.scrollHeight}px`)};function J0({onCancel:s,onSave:l,taskId:r}){const[o,d,f]=Gu({key:`new-comment-draft-${r}`,defaultValue:$0}),{content:g}=o,y=m.useRef(null);m.useEffect(()=>{y.current?.focus()},[]),m.useEffect(()=>{Dp(y.current)},[g]);function v(T){d({...o,content:T.target.value}),Dp(T.target)}async function p(){const T=await l({content:g});return T&&f(),T}return i.jsx(sn,{title:"Add Comment",onCancel:s,onSave:p,children:i.jsx(i.Fragment,{children:i.jsx("div",{className:"new-comment-pop__input-content",children:i.jsx("textarea",{className:"new-comment-pop__input-content",ref:y,placeholder:"Leave a comment...",value:g,onChange:v})})})})}const F0={answer:""},du=s=>{s&&(s.style.height="auto",s.style.height=`${s.scrollHeight}px`)};function P0({onCancel:s,onSave:l,taskId:r,inputRequestId:o,question:d}){const[f,g,y]=Gu({key:`answer-input-request-draft-${o}`,defaultValue:F0}),{answer:v}=f,p=m.useRef(null),T=m.useRef(null);m.useEffect(()=>{T.current?.focus()},[]),m.useEffect(()=>{du(p.current)},[d]),m.useEffect(()=>{du(T.current)},[v]);function S(E){g({...f,answer:E.target.value}),du(E.target)}async function j(){const E=await l({answer:v});return E&&y(),E}return i.jsx(sn,{title:"Answer Input Request",onCancel:s,onSave:j,children:i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"new-comment-pop__input-content",children:i.jsx("textarea",{className:"new-comment-pop__input-content",ref:p,value:d,readOnly:!0,style:{opacity:.7,cursor:"default"}})}),i.jsx("div",{className:"new-comment-pop__input-content",children:i.jsx("textarea",{className:"new-comment-pop__input-content",ref:T,placeholder:"Your answer...",value:v,onChange:S})})]})})}function W0({onCancel:s,onSave:l,existingTags:r}){const[o,d]=m.useState([]),[f,g]=m.useState(!0),[y,v]=m.useState(""),[p,T]=m.useState(null),[S,j]=m.useState(0),E=m.useRef(null),b=m.useRef(null);m.useEffect(()=>{(async()=>{try{const U=await br.metaControllerGetAllTags();d(U)}catch(U){console.error("Failed to load tags:",U)}finally{g(!1)}})()},[]),m.useEffect(()=>{E.current?.focus()},[]);const w=m.useMemo(()=>{const L=new Set(r.map(te=>te.id)),U=o.filter(te=>!L.has(te.id));if(!y.trim())return U;const F=y.toLowerCase().trim();return U.map(te=>{let Z=0;return te.name.toLowerCase().startsWith(F)?Z+=100:te.name.toLowerCase().includes(F)&&(Z+=50),{tag:te,score:Z}}).filter(te=>te.score>0).sort((te,Z)=>Z.score-te.score).map(te=>te.tag)},[o,r,y]),k=m.useMemo(()=>{if(!y.trim())return!1;const L=y.toLowerCase().trim();return!o.some(U=>U.name.toLowerCase()===L)},[y,o]);m.useEffect(()=>{j(0)},[w.length,y,k]),m.useEffect(()=>{if(b.current){const L=w.length+(k?1:0);if(S<L){const U=b.current.children[S];U&&U.scrollIntoView({block:"nearest"})}}},[S,w.length,k]);const q=m.useCallback(L=>{const U=w.length+(k?1:0);if(U!==0)switch(L.key){case"ArrowDown":L.preventDefault(),j(F=>F<U-1?F+1:F);break;case"ArrowUp":L.preventDefault(),j(F=>F>0?F-1:0);break;case"Enter":L.preventDefault(),S<w.length?T(w[S]):k&&S===w.length&&T({id:"",name:y.trim(),color:void 0,createdAt:"",updatedAt:""});break;case"Escape":L.preventDefault(),p&&T(null);break}},[w,S,k,p,y]),Q=L=>{T(L)},$=()=>{T({id:"",name:y.trim(),color:void 0,createdAt:"",updatedAt:""})},ae=()=>{T(null),v(""),E.current?.focus()};async function O(){return p?l(p):!1}return i.jsx(sn,{title:"Add Tag",onCancel:s,onSave:O,children:i.jsx("div",{className:"tag-search-pop",children:p?i.jsxs("div",{className:"tag-search-pop__selected",onClick:ae,children:[i.jsx("div",{className:"tag-search-pop__tag-badge",style:{backgroundColor:p.color||"#999"},children:p.name}),i.jsx(_,{tone:"muted",size:"2",className:"tag-search-pop__clear",children:"tap to change"})]}):i.jsxs(i.Fragment,{children:[i.jsx("input",{ref:E,type:"text",className:"tag-search-pop__input",placeholder:"Search or create tag...",value:y,onChange:L=>v(L.target.value),onKeyDown:q}),i.jsx("div",{className:"tag-search-pop__list",ref:b,children:f?i.jsx("div",{className:"tag-search-pop__empty",children:i.jsx(_,{tone:"muted",children:"Loading tags..."})}):w.length===0&&!k?i.jsx("div",{className:"tag-search-pop__empty",children:i.jsx(_,{tone:"muted",children:"No tags found"})}):i.jsxs(i.Fragment,{children:[w.map((L,U)=>i.jsx("div",{className:`tag-search-pop__item ${U===S?"tag-search-pop__item--highlighted":""}`,onClick:()=>Q(L),onMouseEnter:()=>j(U),children:i.jsx("div",{className:"tag-search-pop__tag-badge",style:{backgroundColor:L.color||"#999"},children:L.name})},L.id)),k&&i.jsxs("div",{className:`tag-search-pop__item tag-search-pop__item--create ${S===w.length?"tag-search-pop__item--highlighted":""}`,onClick:$,onMouseEnter:()=>j(w.length),children:[i.jsx(_,{size:"2",tone:"muted",children:"Create new tag:"}),i.jsx("div",{className:"tag-search-pop__tag-badge",style:{backgroundColor:"#999"},children:y.trim()})]})]})})]})})})}V.BASE=Xn;const Ag=m.createContext(null);function e_({children:s}){const[l,r]=m.useState([]),[o,d]=m.useState(!1),[f,g]=m.useState(null),y=m.useCallback(async()=>{d(!0),g(null);try{const T=await ag.actorControllerListActors();r(T||[])}catch(T){g(T instanceof Error?T.message:"Failed to load actors")}finally{d(!1)}},[]);m.useEffect(()=>{y()},[y]);const v=m.useCallback(async()=>{await y()},[y]),p=m.useMemo(()=>({actors:l,isLoading:o,error:f,refreshActors:v}),[l,o,f,v]);return i.jsx(Ag.Provider,{value:p,children:s})}function Yu(){const s=m.useContext(Ag);if(!s)throw new Error("useActorsCtx must be used within <ActorsProvider>");return s}function t_({onCancel:s,onSave:l}){const{actors:r,isLoading:o,error:d,refreshActors:f}=Yu(),[g,y]=m.useState(""),[v,p]=m.useState(null),[T,S]=m.useState(0),[j,E]=m.useState(null),[b,w]=m.useState(!1),[k,q]=m.useState(null),Q=m.useRef(null),$=m.useRef(null),ae=m.useRef(0);m.useEffect(()=>{Q.current?.focus()},[]),m.useEffect(()=>{f().catch(()=>{})},[f]),m.useEffect(()=>{const te=g.trim();if(!te){E(null),q(null),w(!1);return}const Z=ae.current+1;ae.current=Z,w(!0),q(null);const be=window.setTimeout(async()=>{try{const Ee=await ag.actorControllerSearchActors(te,20);if(ae.current!==Z)return;E(Ee??[])}catch(Ee){if(ae.current!==Z)return;q(Ee instanceof Error?Ee.message:"Failed to search actors"),E([])}finally{ae.current===Z&&w(!1)}},200);return()=>{window.clearTimeout(be)}},[g]);const O=m.useMemo(()=>g.trim()?j??[]:r,[r,g,j]);m.useEffect(()=>{S(0)},[O.length,g]),m.useEffect(()=>{if($.current){const te=$.current.children[T];te&&te.scrollIntoView({block:"nearest"})}},[T]);const L=m.useCallback(te=>{if(O.length!==0)switch(te.key){case"ArrowDown":te.preventDefault(),S(Z=>Z<O.length-1?Z+1:Z);break;case"ArrowUp":te.preventDefault(),S(Z=>Z>0?Z-1:0);break;case"Enter":te.preventDefault(),O[T]&&p(O[T]);break;case"Escape":te.preventDefault(),v&&p(null);break}},[O,T,v]),U=te=>{p(te)},F=()=>{p(null),y(""),Q.current?.focus()};async function ie(){return v?l(v):!1}return i.jsx(sn,{title:"Assign Task",onCancel:s,onSave:ie,children:i.jsx("div",{className:"actor-search-pop",children:v?i.jsxs("div",{className:"actor-search-pop__selected",onClick:F,children:[i.jsx(Ve,{name:v.displayName,size:"md",src:v.avatarUrl||void 0}),i.jsxs("div",{className:"actor-search-pop__selected-info",children:[i.jsx(_,{weight:"medium",size:"3",children:v.displayName}),i.jsxs(_,{tone:"muted",size:"2",children:["@",v.slug]})]}),i.jsx(_,{tone:"muted",size:"2",className:"actor-search-pop__clear",children:"tap to change"})]}):i.jsxs(i.Fragment,{children:[i.jsx("input",{ref:Q,type:"text",className:"actor-search-pop__input",placeholder:"Search by name or @slug...",value:g,onChange:te=>y(te.target.value),onKeyDown:L}),i.jsx("div",{className:"actor-search-pop__list",ref:$,children:O.length===0?i.jsx("div",{className:"actor-search-pop__empty",children:i.jsx(_,{tone:"muted",children:g.trim()?b?"Searching actors...":k||"No actors found":o?"Loading actors...":d||"No actors found"})}):O.map((te,Z)=>i.jsxs("div",{className:`actor-search-pop__item ${Z===T?"actor-search-pop__item--highlighted":""}`,onClick:()=>U(te),onMouseEnter:()=>S(Z),children:[i.jsx(Ve,{name:te.displayName,size:"sm",src:te.avatarUrl||void 0}),i.jsxs("div",{className:"actor-search-pop__item-info",children:[i.jsx(_,{weight:"medium",size:"2",children:te.displayName}),i.jsxs(_,{tone:"muted",size:"1",children:["@",te.slug," · ",te.type]})]})]},te.id))})]})})})}function n_(){const{d:s}=ya(),l=Je(),{tasks:r,setSectionTitle:o,addComment:d,deleteTask:f,assignTask:g,assignTaskToMe:y,answerInputRequest:v,activityByTaskId:p}=Xs(),{actors:T}=Yu(),{user:S}=Bl(),{showError:j}=Rr(),[E,b]=m.useState(null),[w,k]=m.useState("idle"),q=m.useRef(null),Q=m.useRef(null),$=3500,ae=220,O=r.find(oe=>oe.id===s);dn({task:{name:O?.name}}),m.useEffect(()=>{if(!O){o("Task");return}o(O.name)},[O,o]),m.useEffect(()=>()=>{q.current&&window.clearTimeout(q.current),Q.current&&window.clearTimeout(Q.current)},[]);const[L,U]=m.useState(null),[F,ie]=m.useState(!1),[te,Z]=m.useState(!1),[be,Ee]=m.useState(!1),[Fe,Xe]=m.useState(!1),[H,P]=m.useState(null),ne=async({content:oe})=>{if(!O)return!1;try{return await d({taskId:O.id,comment:oe}),!0}catch(Ae){return j(Ae),!1}},ye=()=>{Z(!1)},je=async oe=>{if(!O)return!1;try{return await g({taskId:O.id,assigneeActorId:oe.id}),!0}catch(Ae){return j(Ae),!1}},N=()=>{Ee(!1)},X=async({answer:oe})=>{if(!O||!H)return!1;try{return await v({taskId:O.id,inputRequestId:H.id,answer:oe}),!0}catch(Ae){return j(Ae),!1}},J=()=>{P(null)},ee=async oe=>{if(!O)return!1;try{return await Vt.tasksControllerAddTagToTask(O.id,{name:oe.name}),!0}catch(Ae){return j(Ae),!1}},he=()=>{Xe(!1)},xe=async oe=>{if(O)try{await Vt.tasksControllerRemoveTagFromTask(O.id,oe)}catch(Ae){j(Ae)}},Ce=O?p[O.id]:null;if(m.useEffect(()=>{!O||!Ce||!Ce.message||(q.current&&window.clearTimeout(q.current),Q.current&&window.clearTimeout(Q.current),b(Ce),k("enter"),q.current=window.setTimeout(()=>{k("exit"),Q.current=window.setTimeout(()=>{b(null),k("idle")},ae)},$))},[Ce,O,ae,$]),!O)return i.jsx("div",{className:"task-detail-page",children:i.jsxs(ce,{spacing:"4",align:"center",children:[i.jsx(_,{size:"3",tone:"muted",children:"Task not found"}),i.jsx(ge,{variant:"secondary",onClick:()=>l("/tasks"),children:"Back to tasks"})]})});const et=async oe=>{ie(!0);try{await Vt.tasksControllerChangeStatus(O.id,{status:oe}),U(null)}catch(Ae){j(Ae)}finally{ie(!1)}};return i.jsxs("div",{className:"task-detail-page",children:[L&&i.jsxs(Ga,{children:[i.jsx("button",{onClick:()=>U(null),className:"task-detail-page__error-close",children:"×"}),L]}),i.jsxs(de,{className:"task-detail-page__section",children:[i.jsxs(pe,{leading:i.jsx(Ve,{size:"sm",name:O.createdByActor.displayName,src:O.createdByActor.avatarUrl||void 0}),tags:[a_({status:O.status}),...O.tags.map(oe=>({label:oe.name}))],topRight:i.jsx(_,{size:"1",tone:"muted",children:xt(O.updatedAt)}),children:[i.jsx(_,{as:"span",weight:"medium",size:"3",children:O.createdByActor.displayName}),i.jsx(_,{as:"span",weight:"normal",tone:"muted",size:"3",children:` @${O.createdByActor.slug} created `}),i.jsxs(_,{as:"span",tone:"muted",style:"mono",children:["#",O.id.slice(0,6)]}),O.assigneeActor?null:i.jsx(_,{tone:"muted",children:"unassigned"})]}),O.assigneeActor?i.jsxs(pe,{leading:i.jsx(Ve,{size:"sm",name:O.assigneeActor.displayName,src:O.assigneeActor.avatarUrl||void 0}),onClick:()=>Ee(!0),children:[i.jsx(_,{as:"span",weight:"medium",size:"3",children:O.assigneeActor.displayName}),i.jsx(_,{as:"span",weight:"normal",tone:"muted",size:"3",children:` @${O.assigneeActor.slug} assigned`}),i.jsx(_,{size:"1",tone:"muted",children:"tap to reassign"})]}):null]}),i.jsx(de,{className:"task-detail-page__section",children:i.jsxs("div",{className:"task-detail-page__tags",children:[i.jsx(_,{size:"2",weight:"medium",children:"Tags"}),i.jsxs("div",{className:"task-detail-page__tags-list",children:[O.tags.length===0?i.jsx(_,{size:"2",tone:"muted",children:"No tags"}):O.tags.map(oe=>i.jsxs("button",{className:"task-detail-page__tag",style:{backgroundColor:oe.color||"#999"},onClick:()=>xe(oe.id),title:"Click to remove",children:[oe.name,i.jsx("span",{className:"task-detail-page__tag-remove",children:"×"})]},oe.id)),i.jsx(ge,{size:"sm",variant:"secondary",onClick:()=>Xe(!0),children:"+ Add Tag"})]})]})}),O.artefacts&&O.artefacts.length>0&&i.jsx(de,{className:"task-detail-page__section",children:O.artefacts.map(oe=>i.jsxs(pe,{children:[i.jsx(_,{as:"span",weight:"medium",size:"3",children:`${oe.name}: `}),i.jsx(_,{as:"span",children:i.jsx("a",{href:oe.link,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent)",textDecoration:"underline"},children:oe.link})})]},oe.id))}),i.jsx(de,{className:"task-detail-page__section",children:i.jsxs(pe,{leading:i.jsx(Ve,{size:"sm",name:O.createdByActor.displayName,src:O.createdByActor.avatarUrl||void 0}),tags:[],topRight:i.jsx(_,{size:"1",tone:"muted",children:xt(O.createdAt)}),children:[i.jsx(_,{as:"span",weight:"medium",size:"3",children:O.createdByActor.displayName}),i.jsx(_,{as:"span",weight:"normal",tone:"muted",size:"3",children:` @${O.createdByActor.slug}`}),i.jsx(_,{children:O.description?O.description:"no description"})]})}),i.jsx(de,{className:"task-detail-page__section",children:[...O.comments.map(Ae=>({type:"comment",data:Ae,timestamp:new Date(Ae.createdAt).getTime()})),...O.inputRequests.map(Ae=>({type:"inputRequest",data:Ae,timestamp:new Date(Ae.createdAt).getTime()}))].sort((Ae,Sn)=>Ae.timestamp-Sn.timestamp).map((Ae,Sn)=>{if(Ae.type==="comment"){const Ie=Ae.data,bt=Ie.commenterActor?.displayName||"unknown",St=Ie.commenterActor?.slug||"unknown";return i.jsxs(pe,{leading:i.jsx(Ve,{size:"sm",name:bt,src:Ie.commenterActor?.avatarUrl||void 0}),topRight:i.jsx(_,{size:"1",tone:"muted",children:xt(Ie.createdAt)}),children:[i.jsx(_,{as:"span",weight:"medium",size:"3",children:bt}),i.jsx(_,{as:"span",weight:"normal",tone:"muted",size:"3",children:` @${St}`}),i.jsx(_,{children:Ie.content})]},`comment-${Ie.id}`)}else if(Ae.type==="inputRequest"){const Ie=Ae.data,bt=T.find(_a=>_a.id===Ie.askedByActorId),St=T.find(_a=>_a.id===Ie.assignedToActorId),_n=bt?.displayName||"Unknown",fn=bt?.slug||"unknown",va=St?.displayName||"Unknown",xa=St?.slug||"unknown",hn=!!Ie.resolvedAt,Ta=S&&Ie.assignedToActorId===S.actorId,Sa=typeof Ie.answer=="string"?Ie.answer:JSON.stringify(Ie.answer),ql=hn?[{label:"resolved question",color:"gray"},{label:"answer",color:"green"}]:[{label:"question",color:"orange"}];return i.jsx(pe,{leading:hn?i.jsxs("div",{className:"task-detail-page__input-request-avatars",children:[i.jsx(Ve,{size:"sm",name:_n,src:bt?.avatarUrl||void 0}),i.jsx(Ve,{size:"sm",name:va,src:St?.avatarUrl||void 0})]}):i.jsx(Ve,{size:"sm",name:_n,src:bt?.avatarUrl||void 0}),tags:ql,topRight:i.jsx(_,{size:"1",tone:"muted",children:xt(Ie.createdAt)}),children:i.jsxs(ce,{spacing:"2",children:[i.jsxs("div",{className:"task-detail-page__input-request",children:[i.jsxs("div",{className:"task-detail-page__input-request-question",children:[i.jsxs("div",{className:"task-detail-page__input-request-header",children:[i.jsx(_,{as:"span",weight:"medium",size:"3",children:_n}),i.jsx(_,{as:"span",weight:"normal",tone:"muted",size:"3",children:` @${fn}`})]}),i.jsxs(_,{children:[i.jsx(_,{as:"span",tone:"muted",children:"Asked:"})," ",Ie.question]})]}),hn?i.jsxs("div",{className:"task-detail-page__input-request-answer",children:[i.jsxs("div",{className:"task-detail-page__input-request-header",children:[i.jsx(_,{as:"span",weight:"medium",size:"3",children:va}),i.jsx(_,{as:"span",weight:"normal",tone:"muted",size:"3",children:` @${xa}`})]}),i.jsxs(_,{children:[i.jsx(_,{as:"span",tone:"muted",children:"Answered:"})," ",Sa]})]}):null]}),!hn&&Ta&&i.jsx(ge,{size:"sm",variant:"primary",onClick:()=>P(Ie),children:"Respond"})]})},`input-request-${Ie.id}`)}})}),i.jsx(de,{className:"task-detail-page__section",children:i.jsx("div",{className:"task-detail-page__activity",children:i.jsxs("div",{className:`task-detail-page__activity-slot ${E?"task-detail-page__activity-slot--active":""}`,children:[i.jsx("div",{className:"task-detail-page__activity-placeholder",children:i.jsx(_,{size:"2",tone:"muted",children:"Live activity will show here"})}),E?i.jsx("div",{className:`task-detail-page__activity-card ${w==="enter"?"is-entering":""} ${w==="exit"?"is-exiting":""}`,children:i.jsx(_,{size:"2",className:"task-detail-page__activity-message",children:E.message?.replace(/\s+/g," ").trim()||"Activity in progress..."})}):null]})})}),i.jsx(de,{className:"task-detail-page__status-buttons",children:Object.entries(vn).map(([oe,Ae])=>i.jsx(ge,{size:"sm",variant:oe===O.status?"primary":"secondary",onClick:()=>et(oe),disabled:F,children:i.jsxs(ce,{spacing:"0",children:[i.jsx("div",{children:Ae.icon}),i.jsx("div",{children:Ae.label})]})},oe))}),i.jsx(ge,{className:"task-detail-fab",onClick:()=>Z(!0),variant:"primary",size:"lg",children:"Add Comment"}),!O.assigneeActor&&i.jsxs(de,{className:"task-detail-page__comment-buttons",children:[i.jsx(ge,{size:"lg",onClick:()=>Ee(!0),children:"Assign"}),i.jsx(ge,{size:"lg",variant:"primary",onClick:async()=>{await y({taskId:O.id})},children:"Assign to Me"})]}),i.jsx(Or,{className:"task-detail-page__comment-buttons",onDelete:async()=>{try{await f({taskId:O.id}),l("/tasks")}catch(oe){j(oe)}}}),i.jsx(de,{className:"task-detail-page__actions",children:i.jsx(ge,{size:"lg",variant:"secondary",onClick:()=>l("/tasks"),children:"Back to Tasks"})}),te?i.jsx(J0,{onCancel:ye,onSave:ne,taskId:O.id}):null,be?i.jsx(t_,{onCancel:N,onSave:je}):null,Fe?i.jsx(W0,{onCancel:he,onSave:ee,existingTags:O.tags}):null,H?i.jsx(P0,{onCancel:J,onSave:X,taskId:O.id,inputRequestId:H.id,question:H.question}):null]})}function a_({status:s}){let l="gray",r="unknown";return s===re.DONE?(r="done",l="purple"):s===re.IN_PROGRESS?(r="in progress",l="green"):s===re.NOT_STARTED?(r="not started",l="blue"):s===re.FOR_REVIEW&&(r="in review",l="orange"),{label:r,color:l}}function l_(){return i.jsx(U0,{children:i.jsx(Vn,{children:i.jsxs(Se,{element:i.jsx(K0,{}),children:[i.jsx(Se,{index:!0,element:i.jsx(Cr,{to:"/tasks/not-started",replace:!0})}),i.jsx(Se,{path:"/not-started",element:i.jsx(gr,{status:re.NOT_STARTED})}),i.jsx(Se,{path:"/in-progress",element:i.jsx(gr,{status:re.IN_PROGRESS})}),i.jsx(Se,{path:"/in-review",element:i.jsx(gr,{status:re.FOR_REVIEW})}),i.jsx(Se,{path:"/done",element:i.jsx(gr,{status:re.DONE})}),i.jsx(Se,{path:"/task/:d",element:i.jsx(n_,{})})]})})})}function s_(){const{logout:s}=Bl(),l=Je();return m.useEffect(()=>{(async()=>{try{await s()}finally{l("/login",{replace:!0})}})()},[s,l]),null}V.BASE=Xn;const Ng=sg("/context"),Hs={CONTEXT_BLOCK_CREATED:"context.block.created",CONTEXT_BLOCK_UPDATED:"context.block.updated",CONTEXT_BLOCK_DELETED:"context.block.deleted"};function i_(){const[s,l]=m.useState([]),[r,o]=m.useState(!0),[d,f]=m.useState(null),[g,y]=m.useState(null),[v,p]=m.useState(!1),T=E=>[...E].sort((b,w)=>{const k=new Date(b.updatedAt).getTime();return new Date(w.updatedAt).getTime()-k}),S=async()=>{try{o(!0),f(null);const E=await vu.contextControllerListBlocks();l(T(E.items))}catch(E){f(E instanceof Error?E.message:"Failed to fetch context blocks"),console.error("Error fetching context blocks:",E)}finally{o(!1)}},j=()=>{const E=Ol(Ng,{transports:["websocket","polling"],withCredentials:!0});return E.on("connect",()=>{console.log("Connected to context WebSocket"),E.emit("context.subscribe",{},b=>{b.ok?(console.log("Subscribed to context room:",b.room),p(!0)):(console.error("Failed to subscribe to context room"),p(!1))}),S()}),E.on("disconnect",()=>{console.log("Context WebSocket disconnected"),p(!1)}),E.on(Hs.CONTEXT_BLOCK_CREATED,b=>{console.log("context.block.created",b),l(w=>w.some(k=>k.id===b.payload.id)?w:T([b.payload,...w]))}),E.on(Hs.CONTEXT_BLOCK_UPDATED,b=>{console.log("context.block.updated",b),l(w=>T(w.map(k=>k.id===b.payload.id?b.payload:k)))}),E.on(Hs.CONTEXT_BLOCK_DELETED,b=>{console.log("context.block.deleted",b),l(w=>w.filter(k=>k.id!==b.payload.blockId))}),y(E),()=>{E.close()}};return m.useEffect(()=>(S(),j()),[]),{blocks:s,isLoading:r,error:d,isConnected:v,reload:S}}function r_(s){const[l,r]=m.useState(null),[o,d]=m.useState(!0),[f,g]=m.useState(null),[y,v]=m.useState(!1),[p,T]=m.useState(null);return m.useEffect(()=>{let S=!0;return s&&(async()=>{try{d(!0),g(null);const E=await vu.contextControllerGetBlock(s);S&&r(E)}catch(E){S&&(g(E instanceof Error?E.message:"Failed to fetch context block"),console.error("Error fetching context block:",E))}finally{S&&d(!1)}})(),()=>{S=!1}},[s]),m.useEffect(()=>{if(!s)return;const S=Ol(Ng,{transports:["websocket","polling"],withCredentials:!0});return S.on("connect",()=>{console.log("Connected to context WebSocket (detail page)"),S.emit("context.subscribe",{},j=>{j.ok?console.log("Subscribed to context room (detail page):",j.room):console.error("Failed to subscribe to context room (detail page)")})}),S.on("disconnect",()=>{console.log("Context WebSocket disconnected (detail page)")}),S.on(Hs.CONTEXT_BLOCK_UPDATED,j=>{j.payload.id===s&&(console.log("context.block.updated (detail page)",j),vu.contextControllerGetBlock(s).then(E=>r(E)).catch(E=>console.error("Error refreshing block after update:",E)))}),S.on(Hs.CONTEXT_BLOCK_DELETED,j=>{j.payload.blockId===s&&(console.log("context.block.deleted (detail page)",j),v(!0),r(null))}),T(S),()=>{S.close()}},[s]),{block:l,isLoading:o,error:f,isDeleted:y}}const wg=m.createContext(null);function o_({children:s}){const{blocks:l,isLoading:r,error:o,isConnected:d,reload:f}=i_(),[g,y]=m.useState(""),v=m.useMemo(()=>({blocks:l,isLoading:r,error:o,isConnected:d,reload:f,sectionTitle:g,setSectionTitle:y}),[l,r,o,d,f,g,y]);return i.jsx(wg.Provider,{value:v,children:s})}function Vu(){const s=m.useContext(wg);if(!s)throw new Error("useContextCtx must be used within <ContextProvider>");return s}function c_(){const s=Qt(),{sectionTitle:l}=Vu();return console.log("Context layout mounting"),i.jsx("div",{style:{minHeight:0},children:s?i.jsx(Ya,{sectionTitle:l,children:i.jsx(Dt,{})}):i.jsx(Va,{appTitle:"Context",sectionTitle:l,navItems:[],children:i.jsx(Dt,{})})})}function u_({blockSummary:s,onClick:l}){const r=s.tags.map(o=>({label:o.name}));return i.jsxs(pe,{leading:i.jsx(Ve,{name:s.createdBy||"unknown",size:"lg"}),topRight:xt(s.createdAt),tags:r,onClick:l,children:[i.jsxs(_,{className:"pre",children:["#",s.id.slice(0,6)]}),i.jsx("div",{style:{minWidth:0,overflow:"hidden"},children:i.jsx(_,{weight:"bold",size:"3",tone:"default",children:s.title})}),i.jsxs("div",{style:{fontSize:12},className:"text--tone-muted",children:["Created by ",s.createdBy||"unknown"]})]})}function d_(){const{setSectionTitle:s,blocks:l,isLoading:r,error:o}=Vu(),d=Je();return console.log("blocks"),console.log(l),dn(),m.useEffect(()=>{s("Context Blocks")},[s]),r?i.jsx("div",{className:"context-home__loading",children:"Loading context blocks..."}):o?i.jsxs("div",{className:"context-home__error",children:["Error: ",o]}):l.length===0?i.jsx("div",{className:"context-home__empty",children:"No context blocks found"}):i.jsx(de,{children:l.map(f=>i.jsx(u_,{blockSummary:f,onClick:()=>d(`/context/block/${f.id}`)},f.id))})}function f_(){const{id:s}=ya(),l=Je(),{setSectionTitle:r}=Vu(),{block:o,isLoading:d,error:f,isDeleted:g}=r_(s||"");return m.useEffect(()=>{o&&r(o.title)},[o,r]),m.useEffect(()=>{g&&l("/context/home")},[g,l]),d?i.jsx("div",{className:"context-block-detail__loading",children:i.jsx(_,{children:"Loading..."})}):f?i.jsx("div",{className:"context-block-detail__error",children:i.jsxs(_,{className:"text--error",children:["Error: ",f]})}):o?i.jsxs("div",{className:"context-block-detail",children:[i.jsx(ge,{variant:"ghost",size:"sm",onClick:()=>l("/context/home"),children:"← Back to list"}),i.jsxs(ce,{spacing:"3",className:"context-block-detail__header",children:[o.tags.length>0&&i.jsx("div",{className:"context-block-detail__tags",children:o.tags.map(y=>i.jsx(zl,{children:y.name},y.id))}),i.jsxs("div",{className:"context-block-detail__meta",children:[i.jsxs(_,{size:"2",tone:"muted",children:["by ",o.createdBy||"unknown"]}),i.jsx(_,{size:"2",tone:"muted",children:"•"}),i.jsx(_,{size:"2",tone:"muted",children:new Date(o.createdAt).toDateString()})]})]}),i.jsx("div",{className:"context-block-detail__content",children:i.jsx("pre",{children:o.content})})]}):i.jsx("div",{className:"context-block-detail__error",children:i.jsx(_,{className:"text--error",children:"Context block not found"})})}function h_(){return i.jsx(o_,{children:i.jsx(Vn,{children:i.jsxs(Se,{element:i.jsx(c_,{}),children:[i.jsx(Se,{index:!0,element:i.jsx(Cr,{to:"home",replace:!0})}),i.jsx(Se,{path:"home",element:i.jsx(d_,{})}),i.jsx(Se,{path:"block/:id",element:i.jsx(f_,{})})]})})})}V.BASE=Xn;const m_=()=>{const[s,l]=m.useState(!1),[r,o]=m.useState(null),[d,f]=m.useState([]);m.useEffect(()=>{y()},[]);const g=j=>[...j].sort((E,b)=>{const w=new Date(E.updatedAt).getTime();return new Date(b.updatedAt).getTime()-w}),y=async()=>{l(!0),o(null);try{const j=await Ms.agentsControllerListAgents();f(g(j.items||[]))}catch(j){o(j instanceof Error?j.message:"Failed to load agents")}finally{l(!1)}};return{isLoading:s,error:r,agents:d,loadAgents:y,loadAgentDetails:async j=>{l(!0),o(null);try{return await Ms.agentsControllerGetAgentBySlug(j)}catch(E){return o(E instanceof Error?E.message:"Failed to load agent details"),null}finally{l(!1)}},createAgent:async j=>{l(!0),o(null);try{const E=await Ms.agentsControllerCreateAgent({name:j.name,slug:j.slug,systemPrompt:"",allowedTools:[],type:void 0,description:void 0,statusTriggers:void 0,isActive:void 0,concurrencyLimit:void 0});return f(b=>g([...b,E])),E}catch(E){return o(E instanceof Error?E.message:"Failed to create agent"),null}finally{l(!1)}},updateAgent:async(j,E)=>{l(!0),o(null);try{const b=await Ms.agentsControllerPatchAgent(j,E);return f(w=>{const k=w.map(q=>q.actorId===j?b:q);return g(k)}),b}catch(b){return o(b instanceof Error?b.message:"Failed to update agent"),null}finally{l(!1)}},deleteAgent:async j=>{l(!0),o(null);try{return await Ms.agentsControllerDeleteAgent(j),f(E=>E.filter(b=>b.actorId!==j)),!0}catch(E){return o(E instanceof Error?E.message:"Failed to delete agent"),!1}finally{l(!1)}}}},Rg=m.createContext(null);function p_({children:s}){const{agents:l,isLoading:r,error:o,loadAgentDetails:d,createAgent:f,updateAgent:g,deleteAgent:y}=m_(),[v,p]=m.useState(""),T=m.useMemo(()=>({agents:l,isLoading:r,error:o,sectionTitle:v,setSectionTitle:p,loadAgentDetails:d,createAgent:f,updateAgent:g,deleteAgent:y}),[l,r,o,v,p,d,f,g,y]);return i.jsx(Rg.Provider,{value:T,children:s})}function Xu(){const s=m.useContext(Rg);if(!s)throw new Error("useAgentsCtx must be used within <AgentsProvider>");return s}function g_({onCancel:s,onSave:l}){const[r,o]=m.useState(""),[d,f]=m.useState(""),g=m.useRef(null),y=m.useRef(null);m.useEffect(()=>{g.current?.focus()},[]);async function v(){return l({name:r,slug:d})}return i.jsx(sn,{title:"Create an Agent",onCancel:s,onSave:v,children:i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"new-agent-pop__input-name",children:i.jsx("input",{className:"new-agent-pop__input-name",ref:g,placeholder:"Display name",value:r,onChange:p=>o(p.target.value),onKeyDown:p=>{p.key==="Enter"&&(p.preventDefault(),y.current?.focus())}})}),i.jsx("div",{className:"new-agent-pop__input-slug",children:i.jsx("input",{className:"new-agent-pop__input-slug",ref:y,placeholder:"Slug (e.g., my-agent)",value:d,onChange:p=>f(p.target.value)})})]})})}function y_(){const{agents:s,setSectionTitle:l,isLoading:r,error:o,createAgent:d}=Xu(),f=Je(),g=Qt(),[y,v]=m.useState(!1);if(dn(),m.useEffect(()=>{l("All Agents 🦄")},[l]),r&&s.length===0)return i.jsx(de,{children:i.jsx(pe,{leading:i.jsx(Ve,{name:"...",size:"lg"}),children:i.jsx(_,{tone:"muted",children:"Loading agents..."})})});if(o)return i.jsx(de,{children:i.jsx(pe,{leading:i.jsx(Ve,{name:"!",size:"lg"}),children:i.jsxs(_,{tone:"muted",children:["Error: ",o]})})});if(s.length===0)return i.jsx(de,{children:i.jsx(pe,{leading:i.jsx(Ve,{name:"?",size:"lg"}),children:i.jsx(_,{tone:"muted",children:"No agents found"})})});const p=()=>{v(!1)},T=async({name:S,slug:j})=>{try{const E=await d({name:S,slug:j});return E?(f(`/agents/agent/${E.slug}`),!0):!1}catch(E){return console.error("Error creating agent"),console.error(E),!1}};return i.jsxs(i.Fragment,{children:[i.jsx(de,{children:s.map(S=>i.jsx(v_,{agent:S,onClick:()=>f(`/agents/agent/${S.slug}`)},S.actorId))}),i.jsx("button",{className:`agents-fab ${g?"agents-fab--desktop":""}`,type:"button",onClick:()=>v(!0),"aria-label":"Create new agent",children:g?i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"agents-fab__plus",children:"+"}),i.jsx("span",{className:"agents-fab__label",children:"New agent"})]}):"+"}),y?i.jsx(g_,{onCancel:p,onSave:T}):null]})}function v_({agent:s,onClick:l}){const r=[x_(s.type),T_(s.isActive)];return i.jsxs(pe,{leading:i.jsx(Ve,{name:s.name,size:"lg"}),topRight:xt(s.updatedAt),tags:r,onClick:l,children:[i.jsxs(_,{className:"pre",style:"mono",tone:"muted",children:["@",s.slug]}),i.jsx(_,{weight:"bold",size:"3",tone:"default",children:s.name}),i.jsx("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:i.jsx(_,{tone:"muted",size:"2",children:s.description?String(s.description):"No description"})}),i.jsxs("div",{style:{fontSize:12},className:"text--tone-muted",children:[s.statusTriggers.length>0&&i.jsxs("span",{children:["Triggers: ",s.statusTriggers.join(", ")]}),s.statusTriggers.length>0&&s.allowedTools.length>0&&" · ",s.allowedTools.length>0&&i.jsxs("span",{children:["Tools: ",s.allowedTools.length]})]})]})}function x_(s){const l={[ot.type.CLAUDE]:"purple",[ot.type.CODEX]:"green",[ot.type.OPENCODE]:"blue",[ot.type.ADK]:"red",[ot.type.GITHUBCOPILOT]:"yellow",[ot.type.OTHER]:"gray"};return{label:s,color:l[s]||"gray"}}function T_(s){return{label:s?"active":"inactive",color:s?"green":"gray"}}function S_(){const s=Qt(),{sectionTitle:l}=Xu(),r=[];return i.jsx("div",{style:{minHeight:0},children:s?i.jsx(Ya,{sectionTitle:l,children:i.jsx(Dt,{})}):i.jsx(Va,{appTitle:"Agents",sectionTitle:l,navItems:r,children:i.jsx(Dt,{})})})}const kp=s=>{s&&(s.style.height="auto",s.style.height=`${s.scrollHeight}px`)};function __({initialValue:s,onCancel:l,onSave:r}){const[o,d]=m.useState(s),f=m.useRef(null);m.useEffect(()=>{f.current?.focus()},[]),m.useEffect(()=>{kp(f.current)},[o]);function g(v){d(v.target.value),kp(v.target)}async function y(){return r({systemPrompt:o})}return i.jsx(sn,{title:"Edit System Prompt",onCancel:l,onSave:y,children:i.jsx(i.Fragment,{children:i.jsx("div",{className:"edit-system-prompt-pop__input-content",children:i.jsx("textarea",{className:"edit-system-prompt-pop__input-content",ref:f,placeholder:"Enter system prompt...",value:o,onChange:g})})})})}function E_({initialValue:s,onCancel:l,onSave:r}){const[o,d]=m.useState(new Set(s)),f=v=>{d(p=>{const T=new Set(p);return T.has(v)?T.delete(v):T.add(v),T})};async function g(){return r({statusTriggers:Array.from(o)})}const y=[re.NOT_STARTED,re.IN_PROGRESS,re.FOR_REVIEW,re.DONE];return i.jsx(sn,{title:"Edit Status Triggers",onCancel:l,onSave:g,children:i.jsxs("div",{className:"edit-status-triggers-pop__content",children:[i.jsx(_,{size:"2",tone:"muted",className:"edit-status-triggers-pop__description",children:"Select which task statuses will trigger this agent to activate"}),i.jsx("div",{className:"edit-status-triggers-pop__checklist",children:y.map(v=>{const p=vn[v];return i.jsxs("label",{className:"edit-status-triggers-pop__checklist-item",children:[i.jsx("input",{type:"checkbox",checked:o.has(v),onChange:()=>f(v),className:"edit-status-triggers-pop__checkbox"}),i.jsxs("div",{className:"edit-status-triggers-pop__status-info",children:[i.jsx("span",{className:"edit-status-triggers-pop__status-icon",children:p.icon}),i.jsx(_,{size:"3",weight:"medium",children:p.label}),i.jsx(_,{size:"2",tone:"muted",children:v})]})]},v)})})]})})}function b_({initialValue:s,onCancel:l,onSave:r}){const[o,d]=m.useState([]),[f,g]=m.useState(!0),[y,v]=m.useState(new Set(s)),[p,T]=m.useState(""),[S,j]=m.useState(0),E=m.useRef(null),b=m.useRef(null);m.useEffect(()=>{(async()=>{try{const L=await br.metaControllerGetAllTags();d(L)}catch(L){console.error("Failed to load tags:",L)}finally{g(!1)}})()},[]),m.useEffect(()=>{E.current?.focus()},[]);const w=m.useMemo(()=>{if(!p.trim())return o;const O=p.toLowerCase().trim();return o.map(U=>{let F=0;return U.name.toLowerCase().startsWith(O)?F+=100:U.name.toLowerCase().includes(O)&&(F+=50),{tag:U,score:F}}).filter(U=>U.score>0).sort((U,F)=>F.score-U.score).map(U=>U.tag)},[o,p]),k=m.useMemo(()=>{if(!p.trim())return!1;const O=p.toLowerCase().trim();return!o.some(L=>L.name.toLowerCase()===O)},[p,o]);m.useEffect(()=>{j(0)},[w.length,p,k]),m.useEffect(()=>{if(b.current){const O=w.length+(k?1:0);if(S<O){const L=b.current.children[S];L&&L.scrollIntoView({block:"nearest"})}}},[S,w.length,k]);const q=O=>{v(L=>{const U=new Set(L);return U.has(O)?U.delete(O):U.add(O),U})},Q=async()=>{try{const O=await br.metaControllerCreateTag({name:p.trim()});d(L=>[...L,O]),v(L=>new Set([...L,O.id])),T(""),E.current?.focus()}catch(O){console.error("Failed to create tag:",O)}},$=m.useCallback(O=>{const L=w.length+(k?1:0);if(L!==0)switch(O.key){case"ArrowDown":O.preventDefault(),j(U=>U<L-1?U+1:U);break;case"ArrowUp":O.preventDefault(),j(U=>U>0?U-1:0);break;case"Enter":O.preventDefault(),S<w.length?q(w[S].id):k&&S===w.length&&Q();break;case"Escape":O.preventDefault(),p&&T("");break}},[w,S,k,p]);async function ae(){return r({tagTriggers:Array.from(y)})}return i.jsx(sn,{title:"Edit Tag Triggers",onCancel:l,onSave:ae,children:i.jsxs("div",{className:"edit-tag-triggers-pop__content",children:[i.jsxs(_,{size:"2",tone:"muted",className:"edit-tag-triggers-pop__description",children:["Select which tags will trigger this agent to activate when added to a task (",y.size," selected)"]}),i.jsx("input",{ref:E,type:"text",className:"edit-tag-triggers-pop__input",placeholder:"Search or create tag...",value:p,onChange:O=>T(O.target.value),onKeyDown:$}),i.jsx("div",{className:"edit-tag-triggers-pop__list",ref:b,children:f?i.jsx("div",{className:"edit-tag-triggers-pop__empty",children:i.jsx(_,{tone:"muted",children:"Loading tags..."})}):w.length===0&&!k?i.jsx("div",{className:"edit-tag-triggers-pop__empty",children:i.jsx(_,{tone:"muted",children:"No tags found"})}):i.jsxs(i.Fragment,{children:[w.map((O,L)=>i.jsxs("label",{className:`edit-tag-triggers-pop__item ${L===S?"edit-tag-triggers-pop__item--highlighted":""}`,onMouseEnter:()=>j(L),children:[i.jsx("input",{type:"checkbox",checked:y.has(O.id),onChange:()=>q(O.id),className:"edit-tag-triggers-pop__checkbox"}),i.jsx("div",{className:"edit-tag-triggers-pop__tag-badge",style:{backgroundColor:O.color||"#999"},children:O.name})]},O.id)),k&&i.jsxs("div",{className:`edit-tag-triggers-pop__item edit-tag-triggers-pop__item--create ${S===w.length?"edit-tag-triggers-pop__item--highlighted":""}`,onClick:Q,onMouseEnter:()=>j(w.length),children:[i.jsx(_,{size:"2",tone:"muted",children:"Create new tag:"}),i.jsx("div",{className:"edit-tag-triggers-pop__tag-badge",style:{backgroundColor:"#999"},children:p.trim()})]})]})})]})})}const Mp=s=>{s&&(s.style.height="auto",s.style.height=`${s.scrollHeight}px`)};function j_({initialValue:s,onCancel:l,onSave:r}){const[o,d]=m.useState(s),f=m.useRef(null);m.useEffect(()=>{f.current?.focus()},[]),m.useEffect(()=>{Mp(f.current)},[o]);function g(v){d(v.target.value),Mp(v.target)}async function y(){return r({introduction:o})}return i.jsx(sn,{title:"Edit Introduction",onCancel:l,onSave:y,children:i.jsx(i.Fragment,{children:i.jsx("div",{className:"edit-introduction-pop__input-content",children:i.jsx("textarea",{className:"edit-introduction-pop__input-content",ref:f,placeholder:"Enter introduction...",value:o,onChange:g})})})})}const C_=[{value:ot.type.CLAUDE,label:"Claude",description:"Anthropic's Claude AI"},{value:ot.type.CODEX,label:"Codex",description:"OpenAI's Codex"},{value:ot.type.OPENCODE,label:"OpenCode",description:"OpenCode agent"},{value:ot.type.ADK,label:"ADK",description:"Agent Development Kit"},{value:ot.type.GITHUBCOPILOT,label:"GitHub Copilot",description:"GitHub Copilot agent"},{value:ot.type.OTHER,label:"Other",description:"Other agent type"}];function A_({initialValue:s,onCancel:l,onSave:r}){const[o,d]=m.useState(s);async function f(){return r({type:o})}return i.jsx(sn,{title:"Edit Agent Type",onCancel:l,onSave:f,children:i.jsxs("div",{className:"edit-agent-type-pop__content",children:[i.jsx(_,{size:"2",tone:"muted",className:"edit-agent-type-pop__description",children:"Select the type of agent (provider). An agent can only be of one type."}),i.jsx("div",{className:"edit-agent-type-pop__radio-list",children:C_.map(g=>i.jsxs("label",{className:"edit-agent-type-pop__radio-item",children:[i.jsx("input",{type:"radio",name:"agent-type",value:g.value,checked:o===g.value,onChange:()=>d(g.value),className:"edit-agent-type-pop__radio"}),i.jsxs("div",{className:"edit-agent-type-pop__type-info",children:[i.jsx(_,{size:"3",weight:"medium",children:g.label}),i.jsx(_,{size:"2",tone:"muted",children:g.description})]})]},g.value))})]})})}function N_({initialProviderId:s,initialModelId:l,onCancel:r,onSave:o}){const[d,f]=m.useState(s),[g,y]=m.useState(l),v=m.useRef(null),p=m.useRef(null);m.useEffect(()=>{v.current?.focus()},[]);async function T(){return o({providerId:d.trim(),modelId:g.trim()})}return i.jsx(sn,{title:"Edit Model",onCancel:r,onSave:T,children:i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"edit-agent-model-pop__field",children:i.jsx("input",{className:"edit-agent-model-pop__input",ref:v,placeholder:"Provider ID (optional)",value:d,onChange:S=>f(S.target.value),onKeyDown:S=>{S.key==="Enter"&&(S.preventDefault(),p.current?.focus())}})}),i.jsx("div",{className:"edit-agent-model-pop__field",children:i.jsx("input",{className:"edit-agent-model-pop__input",ref:p,placeholder:"Model ID (optional)",value:g,onChange:S=>y(S.target.value)})})]})})}const fu=["meta:read"];function w_(){const{slug:s}=ya(),l=Je(),{agents:r,setSectionTitle:o,loadAgentDetails:d,updateAgent:f,deleteAgent:g}=Xu(),{showError:y}=Rr(),v=r.find(W=>W.slug===s),[p,T]=m.useState(v||null),[S,j]=m.useState(!v),[E,b]=m.useState([]),[w,k]=m.useState(!1),[q,Q]=m.useState(null),[$,ae]=m.useState(!1),[O,L]=m.useState(!1),[U,F]=m.useState(""),[ie,te]=m.useState(new Set(fu)),[Z,be]=m.useState(30),[Ee,Fe]=m.useState([]),[Xe,H]=m.useState(!1),[P,ne]=m.useState([]),[ye,je]=m.useState(!1),[N,X]=m.useState(!1),[J,ee]=m.useState(!1),[he,xe]=m.useState(!1),[Ce,et]=m.useState(!1),[oe,Ae]=m.useState(!1),[Sn,Ie]=m.useState(!1),{actors:bt}=Yu(),[St,_n]=m.useState(null);m.useEffect(()=>{if(!p||!bt)return;const W=bt.find(fe=>fe.id===p.actorId);W&&_n(W)},[p,bt]);const fn=m.useCallback(async()=>{if(s){k(!0);try{const W=await lu.agentTokensControllerListTokens(s);b(W)}catch(W){console.error("Failed to load tokens:",W)}finally{k(!1)}}},[s]),va=m.useCallback(async()=>{H(!0);try{const W=await lg.authorizationControllerGetScopes();Fe(W.scopes)}catch(W){console.error("Failed to load scopes:",W)}finally{H(!1)}},[]),xa=m.useCallback(async()=>{je(!0);try{const W=await br.metaControllerGetAllTags();ne(W)}catch(W){console.error("Failed to load tags:",W)}finally{je(!1)}},[]);m.useEffect(()=>{!v&&s?(j(!0),console.log("AGENT DETAIL PAGE"),d(s).then(W=>{T(W),j(!1)}).catch(W=>{T(null)})):v&&T(v)},[s,v,d]),m.useEffect(()=>{p&&(fn(),xa())},[p,fn,xa]),m.useEffect(()=>{O&&Ee.length===0&&va(),O||te(new Set(fu))},[O,Ee.length,va]),dn({agent:{name:p?.name}}),m.useEffect(()=>{if(!p){o("Agent");return}o(p.name)},[p,o]);const hn=async()=>{if(!(!s||!U.trim()||ie.size===0)){ae(!0);try{const W=Array.from(ie),fe=await lu.agentTokensControllerIssueToken(s,{name:U.trim(),scopes:W,expirationDays:Z});Q(fe.token),L(!1),F(""),te(new Set(fu)),await fn()}catch(W){console.error("Failed to create token:",W),alert("Failed to create token")}finally{ae(!1)}}},Ta=W=>{te(fe=>{const ut=new Set(fe);return ut.has(W)?ut.delete(W):ut.add(W),ut})},Sa=async({systemPrompt:W})=>{if(!p)return!1;try{const fe=await f(p.actorId,{systemPrompt:W});return fe?(T(fe),X(!1),!0):!1}catch(fe){return console.error("Failed to update system prompt:",fe),y(fe),!1}},ql=async({statusTriggers:W})=>{if(!p)return!1;try{const fe=await f(p.actorId,{statusTriggers:W});return fe?(T(fe),ee(!1),!0):!1}catch(fe){return console.error("Failed to update status triggers:",fe),y(fe),!1}},_a=async({tagTriggers:W})=>{if(!p)return!1;try{const fe=await f(p.actorId,{tagTriggers:W});return fe?(T(fe),xe(!1),!0):!1}catch(fe){return console.error("Failed to update tag triggers:",fe),y(fe),!1}},_t=async({introduction:W})=>{if(!p)return!1;try{const fe=await f(p.actorId,{introduction:W});return fe?(T(fe),Ae(!1),!0):!1}catch(fe){return console.error("Failed to update introduction:",fe),y(fe),!1}},zr=async({type:W})=>{if(!p)return!1;try{const fe=await f(p.actorId,{type:W});return fe?(T(fe),et(!1),!0):!1}catch(fe){return console.error("Failed to update agent type:",fe),y(fe),!1}},Qs=async({providerId:W,modelId:fe})=>{if(!p)return!1;try{const ut=await f(p.actorId,{providerId:W,modelId:fe});return ut?(T(ut),Ie(!1),!0):!1}catch(ut){return console.error("Failed to update model config:",ut),y(ut),!1}},Ks=async W=>{if(s&&confirm("Are you sure you want to revoke this token? This action cannot be undone."))try{await lu.agentTokensControllerRevokeToken(s,W),await fn()}catch(fe){console.error("Failed to revoke token:",fe),alert("Failed to revoke token")}},Xa=W=>{navigator.clipboard.writeText(W)};if(S)return i.jsx("div",{className:"agent-detail-page",children:i.jsx(ce,{spacing:"4",align:"center",children:i.jsx(_,{size:"3",tone:"muted",children:"Loading agent..."})})});if(!p)return i.jsx("div",{className:"agent-detail-page",children:i.jsxs(ce,{spacing:"4",align:"center",children:[i.jsx(_,{size:"3",tone:"muted",children:"Agent not found"}),i.jsx(ge,{variant:"secondary",onClick:()=>l("/agents"),children:"Back to agents"})]})});const Zs=p.introduction,Ia=typeof Zs=="string"?Zs:"",Dr=p.providerId&&p.providerId.trim().length>0?p.providerId:"Default provider",kr=p.modelId&&p.modelId.trim().length>0?p.modelId:"Default model";return i.jsxs("div",{className:"agent-detail-page",children:[i.jsx(de,{className:"agent-detail-page__section",children:i.jsxs(pe,{leading:i.jsx(Ve,{size:"sm",name:p.name,src:St?.avatarUrl||void 0}),tags:[R_(p.type),O_(p.isActive)],topRight:i.jsx(_,{size:"1",tone:"muted",children:xt(p.updatedAt)}),children:[i.jsx(_,{as:"span",weight:"normal",tone:"muted",size:"3",children:` @${p.slug} `}),i.jsxs(_,{as:"span",tone:"muted",style:"mono",children:["#",p.actorId.slice(0,6)]}),i.jsx(_,{children:p.description?String(p.description):"No description"})]})}),i.jsx(de,{title:"System Prompt",className:"agent-detail-page__section",children:i.jsxs(pe,{onClick:()=>X(!0),children:[i.jsx(_,{size:"2",className:"agent-detail-page__system-prompt",children:p.systemPrompt||"No system prompt configured"}),i.jsx(_,{size:"1",tone:"muted",children:"tap to edit"})]})}),i.jsx(de,{title:"Introduction",className:"agent-detail-page__section",children:i.jsxs(pe,{onClick:()=>Ae(!0),children:[i.jsx(_,{size:"2",className:"agent-detail-page__system-prompt",children:Ia.trim().length>0?Ia:"No introduction configured"}),i.jsx(_,{size:"1",tone:"muted",children:"tap to edit"})]})}),i.jsx(de,{title:"Agent Type",className:"agent-detail-page__section",children:i.jsxs(pe,{onClick:()=>et(!0),children:[i.jsx(_,{size:"2",tone:"muted",children:p.type}),i.jsx(_,{size:"1",tone:"muted",children:"tap to edit"})]})}),i.jsx(de,{title:"Model",className:"agent-detail-page__section",children:i.jsxs(pe,{onClick:()=>Ie(!0),children:[i.jsxs(ce,{spacing:"1",children:[i.jsxs(_,{size:"2",tone:"muted",children:["Provider: ",Dr]}),i.jsxs(_,{size:"2",tone:"muted",children:["Model: ",kr]})]}),i.jsx(_,{size:"1",tone:"muted",children:"tap to edit"})]})}),i.jsx(de,{title:"Status Triggers",className:"agent-detail-page__section",children:i.jsxs(pe,{onClick:()=>ee(!0),children:[p.statusTriggers.length>0?p.statusTriggers.map(W=>i.jsx(_,{tone:"muted",children:W},W)):i.jsx(_,{tone:"muted",children:"No status triggers configured"}),i.jsx(_,{size:"1",tone:"muted",children:"tap to edit"})]})}),i.jsx(de,{title:"Tag Triggers",className:"agent-detail-page__section",children:i.jsxs(pe,{onClick:()=>xe(!0),children:[p.tagTriggers&&p.tagTriggers.length>0?i.jsx("div",{className:"agent-detail-page__tag-triggers",children:ye?i.jsx(_,{tone:"muted",children:"Loading tags..."}):P.filter(W=>p.tagTriggers.includes(W.id)).map(W=>i.jsx(zl,{color:z_(W.color),children:W.name},W.id))}):i.jsx(_,{tone:"muted",children:"No tag triggers configured"}),i.jsx(_,{size:"1",tone:"muted",children:"tap to edit"})]})}),p.allowedTools.length>0&&i.jsx(de,{className:"agent-detail-page__section",children:i.jsxs(pe,{children:[i.jsxs(_,{as:"span",weight:"medium",size:"3",children:["Allowed Tools (",p.allowedTools.length,")"]}),i.jsx(_,{tone:"muted",size:"2",children:p.allowedTools.join(", ")})]})}),q&&i.jsx(de,{title:"New Token Created",className:"agent-detail-page__section agent-detail-page__new-token",children:i.jsx(pe,{children:i.jsxs(ce,{spacing:"2",children:[i.jsx(_,{weight:"medium",size:"2",className:"agent-detail-page__warning-text",children:"Copy this token now. It will not be shown again."}),i.jsx("div",{className:"agent-detail-page__token-display",children:i.jsx("code",{className:"agent-detail-page__token-code",children:q})}),i.jsxs("div",{className:"agent-detail-page__button-row",children:[i.jsx(ge,{size:"sm",onClick:()=>Xa(q),children:"Copy Token"}),i.jsx(ge,{size:"sm",variant:"secondary",onClick:()=>Q(null),children:"Dismiss"})]})]})})}),i.jsxs(de,{title:"Access Tokens",className:"agent-detail-page__section",action:!O&&i.jsx(ge,{size:"sm",onClick:()=>L(!0),children:"New Token"}),children:[O&&i.jsx(pe,{children:i.jsxs(ce,{spacing:"3",children:[i.jsx(_,{weight:"medium",size:"2",children:"Create New Token"}),i.jsxs("div",{className:"agent-detail-page__form-field",children:[i.jsx("label",{children:i.jsx(_,{size:"1",tone:"muted",children:"Token Name"})}),i.jsx("input",{type:"text",value:U,onChange:W=>F(W.target.value),placeholder:"e.g., CI/CD Pipeline",className:"agent-detail-page__input"})]}),i.jsxs("div",{className:"agent-detail-page__form-field",children:[i.jsx("label",{children:i.jsx(_,{size:"1",tone:"muted",children:"Scopes"})}),Xe?i.jsx(_,{size:"2",tone:"muted",children:"Loading available scopes..."}):i.jsx("div",{className:"agent-detail-page__scopes-list",children:Ee.map(W=>i.jsxs("label",{className:"agent-detail-page__scope-item",children:[i.jsx("input",{type:"checkbox",checked:ie.has(W.id),onChange:()=>Ta(W.id)}),i.jsxs("div",{className:"agent-detail-page__scope-info",children:[i.jsx(_,{size:"2",weight:"medium",children:W.id}),i.jsx(_,{size:"1",tone:"muted",children:W.description})]})]},W.id))})]}),i.jsxs("div",{className:"agent-detail-page__form-field",children:[i.jsx("label",{children:i.jsx(_,{size:"1",tone:"muted",children:"Expires in (days)"})}),i.jsx("input",{type:"number",value:Z,onChange:W=>be(parseInt(W.target.value)||30),min:1,max:365,className:"agent-detail-page__input"})]}),i.jsxs("div",{className:"agent-detail-page__button-row",children:[i.jsx(ge,{size:"sm",onClick:hn,disabled:$||!U.trim()||ie.size===0,children:$?"Creating...":"Create Token"}),i.jsx(ge,{size:"sm",variant:"secondary",onClick:()=>L(!1),children:"Cancel"})]})]})}),w?i.jsx(pe,{children:i.jsx(_,{tone:"muted",size:"2",children:"Loading tokens..."})}):E.length===0?i.jsx(pe,{children:i.jsx(_,{tone:"muted",size:"2",children:"No tokens issued for this agent yet."})}):E.map(W=>i.jsxs(pe,{tags:[W.isValid?{label:"active",color:"green"}:{label:W.revokedAt?"revoked":"expired",color:"gray"}],topRight:W.isValid?i.jsx(ge,{size:"sm",variant:"secondary",onClick:()=>Ks(W.id),children:"Revoke"}):null,children:[i.jsx(_,{weight:"medium",size:"2",children:W.name}),i.jsxs(ce,{spacing:"1",children:[i.jsxs(_,{size:"1",tone:"muted",children:["Scopes: ",W.scopes.join(", ")]}),i.jsxs(_,{size:"1",tone:"muted",children:["Created: ",new Date(W.createdAt).toLocaleDateString()," by ",W.issuedByDisplayName]}),i.jsxs(_,{size:"1",tone:"muted",children:["Expires: ",new Date(W.expiresAt).toLocaleDateString()]}),W.revokedAt&&i.jsxs(_,{size:"1",tone:"muted",className:"agent-detail-page__revoked-text",children:["Revoked: ",new Date(String(W.revokedAt)).toLocaleDateString()]})]})]},W.id))]}),i.jsx(Or,{className:"agent-detail-page__actions",onDelete:async()=>{g(p.actorId),l("/agents")}}),i.jsx(de,{className:"agent-detail-page__actions",children:i.jsx(ge,{size:"lg",variant:"secondary",onClick:()=>l("/agents"),children:"Back to Agents"})}),N&&p&&i.jsx(__,{initialValue:p.systemPrompt,onCancel:()=>X(!1),onSave:Sa}),J&&p&&i.jsx(E_,{initialValue:p.statusTriggers,onCancel:()=>ee(!1),onSave:ql}),he&&p&&i.jsx(b_,{initialValue:p.tagTriggers||[],onCancel:()=>xe(!1),onSave:_a}),Ce&&p&&i.jsx(A_,{initialValue:p.type,onCancel:()=>et(!1),onSave:zr}),oe&&p&&i.jsx(j_,{initialValue:Ia,onCancel:()=>Ae(!1),onSave:_t}),Sn&&p&&i.jsx(N_,{initialProviderId:p.providerId??"",initialModelId:p.modelId??"",onCancel:()=>Ie(!1),onSave:Qs})]})}function R_(s){const l={[ot.type.CLAUDE]:"orange",[ot.type.CODEX]:"green",[ot.type.OPENCODE]:"blue",[ot.type.ADK]:"red",[ot.type.GITHUBCOPILOT]:"yellow",[ot.type.OTHER]:"gray"};return{label:s,color:l[s]||"gray"}}function O_(s){return{label:s?"active":"inactive",color:s?"green":"gray"}}function z_(s){if(!s)return"gray";const l={"#6B7280":"gray","#3B82F6":"blue","#10B981":"green","#52B788":"green","#F59E0B":"yellow","#F97316":"orange","#EF4444":"red","#8B5CF6":"purple","#A855F7":"purple","#98D8C8":"green"};if(l[s])return l[s];const r=parseInt(s.slice(1,3),16),o=parseInt(s.slice(3,5),16),d=parseInt(s.slice(5,7),16);return r>o&&r>d?o>100?"orange":"red":o>r&&o>d?"green":d>r&&d>o?r>100?"purple":"blue":r>150&&o>150&&d<100?"yellow":"gray"}function D_(){return i.jsx(p_,{children:i.jsx(Vn,{children:i.jsxs(Se,{element:i.jsx(S_,{}),children:[i.jsx(Se,{index:!0,element:i.jsx(y_,{})}),i.jsx(Se,{path:"/agent/:slug",element:i.jsx(w_,{})})]})})})}class hu{static async listThreads(){return{items:(await su.threadsControllerListThreads()).items}}static async getThread(l){return await su.threadsControllerGetThread(l)}static async deleteThread(l){await su.threadsControllerDeleteThread(l)}}const k_=()=>{const[s,l]=m.useState(!1),[r,o]=m.useState(null),[d,f]=m.useState([]);m.useEffect(()=>{g()},[]);const g=async()=>{l(!0),o(null);try{const p=await hu.listThreads();f(p.items||[])}catch(p){o(p instanceof Error?p.message:"Failed to load threads")}finally{l(!1)}},y=m.useCallback(async p=>await hu.getThread(p),[]),v=m.useCallback(async p=>{await hu.deleteThread(p),f(T=>T.filter(S=>S.id!==p))},[]);return{isLoading:s,error:r,threads:d,loadThreads:g,getThread:y,deleteThread:v}},Og=m.createContext(null);function M_({children:s}){const{threads:l,isLoading:r,error:o,getThread:d,deleteThread:f}=k_(),[g,y]=m.useState(""),v=m.useMemo(()=>({threads:l,isLoading:r,error:o,sectionTitle:g,setSectionTitle:y,getThread:d,deleteThread:f}),[l,r,o,g,y,d,f]);return i.jsx(Og.Provider,{value:v,children:s})}function Iu(){const s=m.useContext(Og);if(!s)throw new Error("useThreadsCtx must be used within <ThreadsProvider>");return s}function U_({thread:s,onClick:l}){return i.jsxs(pe,{onClick:l,children:[i.jsx("div",{style:{minWidth:0,overflow:"hidden"},children:i.jsx(_,{weight:"bold",size:"3",tone:"default",children:s.title})}),i.jsxs("div",{style:{fontSize:12},className:"text--tone-muted",children:["#",s.id.slice(0,6)]})]})}function B_(){const{threads:s,setSectionTitle:l}=Iu(),r=Je();dn(),m.useEffect(()=>{l("Threads 🧵")},[l]);const o=d=>{r(`/threads/${d}`)};return i.jsx(de,{children:s.map(d=>i.jsx(U_,{thread:d,onClick:()=>o(d.id)},d.id))})}function L_(){const s=Qt(),{sectionTitle:l}=Iu(),r=[];return i.jsx("div",{style:{minHeight:0},children:s?i.jsx(Ya,{sectionTitle:l,children:i.jsx(Dt,{})}):i.jsx(Va,{appTitle:"Threads",sectionTitle:l,navItems:r,children:i.jsx(Dt,{})})})}function zg({contextBlock:s}){return i.jsxs(at,{className:"thread-context-card",children:[i.jsx(_,{size:"2",weight:"semibold",children:s.title}),i.jsxs(_,{size:"1",tone:"muted",children:["#",s.id.slice(0,6)]})]})}function ju({task:s}){const l=Je(),r=s.tags.map(f=>({label:f.name}));s.commentCount>0&&r.push({label:`💬 ${s.commentCount}`});const o=s.inputRequests.filter(f=>!f.resolvedAt).length;o>0&&r.push({label:`✋ ${o}`});const d=()=>{l(`/tasks/task/${s.id}`)};return i.jsxs(rg,{leading:i.jsx(Ve,{name:s.createdByActor.displayName,size:"md",src:s.createdByActor.avatarUrl||void 0}),topRight:xt(s.updatedAt),tags:r,onClick:d,highlight:o>0,footer:i.jsxs(i.Fragment,{children:[i.jsxs("span",{className:"row-detail truncate",children:["#",s.id.slice(0,6)]}),i.jsx("span",{className:"row-detail truncate",children:s.assigneeActor?`Assigned: @${s.assigneeActor.slug}`:"unassigned"})]}),children:[i.jsx("div",{className:"row-title truncate",children:s.name}),i.jsx("div",{className:"row-subtitle truncate",children:s.description})]})}const H_=s=>s.toLowerCase().split("_").map(l=>l.charAt(0).toUpperCase()+l.slice(1)).join(" "),Dg=s=>s.tasks.length?s.parentTaskId?s.tasks.find(l=>l.id===s.parentTaskId)??s.tasks[0]:s.tasks[0]:null,kg=(s,l)=>l?s.tasks.filter(r=>r.id!==l.id):s.tasks;function q_(){const{id:s}=ya(),l=Je(),{setSectionTitle:r,getThread:o,deleteThread:d}=Iu(),f=Qt(),[g,y]=m.useState(null),[v,p]=m.useState(!0),[T,S]=m.useState(null);if(m.useEffect(()=>{if(!s)return;(async()=>{p(!0),S(null);try{const b=await o(s);y(b)}catch(b){S(b instanceof Error?b.message:"Failed to load thread")}finally{p(!1)}})()},[s,o]),m.useEffect(()=>{if(!g){r("Thread");return}r(g.title)},[g,r]),v)return i.jsx("div",{className:"thread-detail-page",children:i.jsx(ce,{spacing:"4",align:"center",children:i.jsx(_,{size:"3",tone:"muted",children:"Loading..."})})});if(T||!g)return i.jsx("div",{className:"thread-detail-page",children:i.jsxs(ce,{spacing:"4",align:"center",children:[i.jsx(_,{size:"3",tone:"muted",children:T||"Thread not found"}),i.jsx(ge,{variant:"secondary",onClick:()=>l("/threads"),children:"Back to threads"})]})});const j=async()=>{await d(g.id),l("/threads")};return f?i.jsx(G_,{thread:g,onDelete:j}):i.jsx(Y_,{thread:g,onDelete:j})}function G_({thread:s,onDelete:l}){const r=Dg(s),o=kg(s,r);return i.jsxs("div",{className:"thread-detail-page thread-detail-page--desktop",children:[i.jsx("div",{className:"thread-detail-page__main",children:i.jsxs("div",{className:"thread-detail-page__content",children:[i.jsx(_,{size:"5",weight:"bold",children:s.title}),i.jsx("div",{style:{marginTop:"var(--space-2)"},children:i.jsxs(_,{size:"2",tone:"muted",children:["#",s.id.slice(0,6)]})}),r&&i.jsxs("div",{className:"thread-detail-page__parent-task",children:[i.jsx(_,{size:"3",weight:"semibold",children:"Parent task"}),i.jsx(Mg,{task:r})]}),i.jsx(Or,{className:"thread-detail-page__actions",onDelete:l})]})}),i.jsxs("div",{className:"thread-detail-page__sidebar",children:[r&&i.jsxs("div",{className:"thread-detail-page__sidebar-section",children:[i.jsx(_,{size:"2",weight:"semibold",className:"thread-detail-page__sidebar-header",children:"Parent task"}),i.jsx("div",{className:"thread-detail-page__sidebar-content",children:i.jsx(ju,{task:r},r.id)})]}),o.length>0&&i.jsxs("div",{className:"thread-detail-page__sidebar-section",children:[i.jsxs(_,{size:"2",weight:"semibold",className:"thread-detail-page__sidebar-header",children:["Tasks (",o.length,")"]}),i.jsx("div",{className:"thread-detail-page__sidebar-content",children:o.map(d=>i.jsx(ju,{task:d},d.id))})]}),s.referencedContextBlocks.length>0&&i.jsxs("div",{className:"thread-detail-page__sidebar-section",children:[i.jsxs(_,{size:"2",weight:"semibold",className:"thread-detail-page__sidebar-header",children:["Context (",s.referencedContextBlocks.length,")"]}),i.jsx("div",{className:"thread-detail-page__sidebar-content",children:s.referencedContextBlocks.map(d=>i.jsx(zg,{contextBlock:d},d.id))})]}),s.referencedContextBlocks.length===0&&o.length===0&&!r&&i.jsx("div",{className:"thread-detail-page__sidebar-empty",children:i.jsx(_,{size:"2",tone:"muted",children:"No context or tasks attached"})})]})]})}function Y_({thread:s,onDelete:l}){const r=Dg(s),o=kg(s,r);return i.jsx("div",{className:"thread-detail-page thread-detail-page--mobile",children:i.jsxs("div",{className:"thread-detail-page__mobile-content",children:[r&&i.jsxs("div",{className:"thread-detail-page__mobile-section",children:[i.jsx(_,{size:"2",weight:"semibold",children:"Parent task"}),i.jsx(Mg,{task:r})]}),o.length>0&&i.jsxs("div",{className:"thread-detail-page__mobile-section",children:[i.jsxs(_,{size:"2",weight:"semibold",children:["Tasks (",o.length,")"]}),i.jsx("div",{className:"thread-detail-page__mobile-list",children:o.map(d=>i.jsx(ju,{task:d},d.id))})]}),s.referencedContextBlocks.length>0&&i.jsxs("div",{className:"thread-detail-page__mobile-section",children:[i.jsxs(_,{size:"2",weight:"semibold",children:["Context (",s.referencedContextBlocks.length,")"]}),i.jsx("div",{className:"thread-detail-page__mobile-list",children:s.referencedContextBlocks.map(d=>i.jsx(zg,{contextBlock:d},d.id))})]}),s.participants.length>0&&i.jsxs("div",{className:"thread-detail-page__mobile-section",children:[i.jsxs(_,{size:"2",weight:"semibold",children:["Participants (",s.participants.length,")"]}),i.jsx("div",{className:"thread-detail-page__mobile-list",children:s.participants.map(d=>i.jsxs(_,{size:"2",children:[d.displayName," (@",d.slug,")"]},d.id))})]}),i.jsx(Or,{className:"thread-detail-page__actions",onDelete:l})]})})}function Mg({task:s}){const l=s.inputRequests.filter(r=>!r.resolvedAt).length;return i.jsxs("div",{className:"thread-detail-page__parent-card",children:[i.jsxs("div",{className:"thread-detail-page__parent-header",children:[i.jsxs("div",{children:[i.jsx(_,{size:"4",weight:"semibold",children:s.name}),i.jsxs(_,{size:"2",tone:"muted",children:["#",s.id.slice(0,6)]})]}),i.jsx(_,{size:"2",tone:"muted",children:xt(s.updatedAt)})]}),i.jsx(_,{size:"2",className:"thread-detail-page__task-description",children:s.description||"No description provided."}),i.jsxs("div",{className:"thread-detail-page__task-meta",children:[i.jsxs("div",{className:"thread-detail-page__task-meta-item",children:[i.jsx(_,{size:"1",tone:"muted",children:"Status"}),i.jsx(_,{size:"2",children:H_(s.status)})]}),i.jsxs("div",{className:"thread-detail-page__task-meta-item",children:[i.jsx(_,{size:"1",tone:"muted",children:"Assignee"}),i.jsx(_,{size:"2",children:s.assigneeActor?`@${s.assigneeActor.slug}`:"Unassigned"})]}),i.jsxs("div",{className:"thread-detail-page__task-meta-item",children:[i.jsx(_,{size:"1",tone:"muted",children:"Created by"}),i.jsx(_,{size:"2",children:s.createdByActor.displayName})]}),i.jsxs("div",{className:"thread-detail-page__task-meta-item",children:[i.jsx(_,{size:"1",tone:"muted",children:"Comments"}),i.jsx(_,{size:"2",children:s.commentCount})]}),i.jsxs("div",{className:"thread-detail-page__task-meta-item",children:[i.jsx(_,{size:"1",tone:"muted",children:"Open questions"}),i.jsx(_,{size:"2",children:l})]})]})]})}function V_(){return i.jsx(M_,{children:i.jsx(Vn,{children:i.jsxs(Se,{element:i.jsx(L_,{}),children:[i.jsx(Se,{index:!0,element:i.jsx(B_,{})}),i.jsx(Se,{path:"/:id",element:i.jsx(q_,{})})]})})})}V.BASE=Xn;const X_=()=>{const[s,l]=m.useState(!1),[r,o]=m.useState(null),[d,f]=m.useState([]);m.useEffect(()=>{y()},[]);const g=E=>[...E].sort((b,w)=>{const k=new Date(b.updatedAt).getTime();return new Date(w.updatedAt).getTime()-k}),y=async()=>{l(!0),o(null);try{const E=await Us.mcpRegistryControllerListServers();f(g(E.items||[]))}catch(E){o(E instanceof Error?E.message:"Failed to load tools")}finally{l(!1)}},v=m.useCallback(async E=>{l(!0),o(null);try{return await Us.mcpRegistryControllerGetServer(E)}catch(b){return o(b instanceof Error?b.message:"Failed to load tool details"),null}finally{l(!1)}},[]),p=m.useCallback(async E=>{try{return await Us.mcpRegistryControllerListScopes(E)}catch(b){return console.error("Failed to load scopes:",b),[]}},[]),T=m.useCallback(async E=>{console.log(`loading clients for server ${E}`);try{const b=await Us.mcpRegistryControllerListConnections(E);return console.log(`clients: ${b}`),b}catch(b){return console.error("Failed to load clients:",b),[]}},[]),S=m.useCallback(async E=>{console.log(`loading authorizations for server ${E}`);try{const b=await iS.authJourneysControllerGetAuthJourneys(E);return console.log("authorizations:",b),b}catch(b){return console.error("Failed to load authorizations:",b),[]}},[]),j=m.useCallback(async E=>{l(!0),o(null);try{return await Us.mcpRegistryControllerGetConnection(E)}catch(b){return o(b instanceof Error?b.message:"Failed to load client details"),null}finally{l(!1)}},[]);return{isLoading:s,error:r,tools:d,loadTools:y,loadToolDetails:v,loadToolScopes:p,loadToolClients:T,loadToolAuthorizations:S,loadClientDetails:j}},Ug=m.createContext(null);function I_({children:s}){const{tools:l,isLoading:r,error:o,loadToolDetails:d,loadToolScopes:f,loadToolClients:g,loadToolAuthorizations:y,loadClientDetails:v}=X_(),[p,T]=m.useState(""),S=m.useMemo(()=>({tools:l,isLoading:r,error:o,sectionTitle:p,setSectionTitle:T,loadToolDetails:d,loadToolScopes:f,loadToolClients:g,loadToolAuthorizations:y,loadClientDetails:v}),[l,r,o,p,T,d,f,g,y,v]);return i.jsx(Ug.Provider,{value:S,children:s})}function Is(){const s=m.useContext(Ug);if(!s)throw new Error("useToolsCtx must be used within <ToolsProvider>");return s}function Q_(){const{tools:s,setSectionTitle:l,isLoading:r,error:o}=Is(),d=Je();return dn(),m.useEffect(()=>{l("All Tools")},[l]),r&&s.length===0?i.jsx(de,{children:i.jsx(pe,{leading:i.jsx(Ve,{name:"...",size:"lg"}),children:i.jsx(_,{tone:"muted",children:"Loading tools..."})})}):o?i.jsx(de,{children:i.jsx(pe,{leading:i.jsx(Ve,{name:"!",size:"lg"}),children:i.jsxs(_,{tone:"muted",children:["Error: ",o]})})}):s.length===0?i.jsx(de,{children:i.jsx(pe,{leading:i.jsx(Ve,{name:"?",size:"lg"}),children:i.jsx(_,{tone:"muted",children:"No tools found"})})}):i.jsx(de,{children:s.map(f=>i.jsx(K_,{tool:f,onClick:()=>d(`/tools/tool/${f.id}`)},f.id))})}function K_({tool:s,onClick:l}){const r=[{label:"MCP Server",color:"blue"}];return s.url&&r.push({label:"remote",color:"green"}),i.jsxs(pe,{leading:i.jsx(Ve,{name:s.name,size:"lg"}),topRight:xt(s.updatedAt),tags:r,onClick:l,children:[i.jsx(_,{className:"pre",style:"mono",tone:"muted",children:s.providedId}),i.jsx(_,{weight:"bold",size:"3",tone:"default",children:s.name}),i.jsx("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:i.jsx(_,{tone:"muted",size:"2",children:s.description||"No description"})})]})}function Z_(){const s=Qt(),{sectionTitle:l}=Is(),r=[];return i.jsx("div",{style:{minHeight:0},children:s?i.jsx(Ya,{sectionTitle:l,children:i.jsx(Dt,{})}):i.jsx(Va,{appTitle:"Tools",sectionTitle:l,navItems:r,children:i.jsx(Dt,{})})})}function $_(s){switch(s){case"AUTHORIZATION_CODE_EXCHANGED":return{color:"green",label:"Active"};case"USER_CONSENT_REJECTED":return{color:"red",label:"Rejected"};case"AUTHORIZATION_CODE_ISSUED":return{color:"blue",label:"Code Issued"};case"mcp_auth_flow_started":return{color:"yellow",label:"Flow Started"};case"mcp_auth_flow_completed":return{color:"blue",label:"MCP Auth Complete"};case"CONNECTIONS_FLOW_STARTED":return{color:"yellow",label:"Connecting"};case"CONNECTIONS_FLOW_COMPLETED":return{color:"blue",label:"Connected"};case"not_started":return{color:"gray",label:"Not Started"};default:return{color:"gray",label:s.replace(/_/g," ").toLowerCase()}}}function J_(){const{toolId:s}=ya(),l=Je(),{tools:r,setSectionTitle:o,loadToolDetails:d,loadToolScopes:f,loadToolClients:g,loadToolAuthorizations:y}=Is(),v=r.find(Z=>Z.id===s),[p,T]=m.useState(v||null),[S,j]=m.useState([]),[E,b]=m.useState([]),[w,k]=m.useState([]),[q,Q]=m.useState(!v),[$,ae]=m.useState(!1),[O,L]=m.useState(null),[U,F]=m.useState(!1),ie=Z=>{navigator.clipboard.writeText(Z),F(!0),setTimeout(()=>F(!1),1500)};if(m.useEffect(()=>{!v&&s?(Q(!0),d(s).then(Z=>{T(Z),Q(!1)})):v&&T(v)},[s,v,d]),m.useEffect(()=>{p&&s&&(f(s).then(j),g(s).then(b),y(s).then(k))},[p,s,f,g,y]),dn({tool:{name:p?.name}}),m.useEffect(()=>{if(!p){o("Tool");return}o(p.name)},[p,o]),q)return i.jsx("div",{className:"tool-detail-page",children:i.jsx(ce,{spacing:"4",align:"center",children:i.jsx(_,{size:"3",tone:"muted",children:"Loading tool..."})})});if(!p)return i.jsx("div",{className:"tool-detail-page",children:i.jsxs(ce,{spacing:"4",align:"center",children:[i.jsx(_,{size:"3",tone:"muted",children:"Tool not found"}),i.jsx(ge,{variant:"secondary",onClick:()=>l("/tools"),children:"Back to tools"})]})});const te=[{label:"MCP Server",color:"blue"}];return p.url&&te.push({label:"remote",color:"green"}),i.jsxs("div",{className:"tool-detail-page",children:[i.jsx(de,{className:"tool-detail-page__section",children:i.jsxs(pe,{leading:i.jsx(Ve,{name:p.name}),tags:te,topRight:i.jsx(_,{size:"1",tone:"muted",children:xt(p.updatedAt)}),children:[i.jsx(_,{as:"span",weight:"normal",tone:"muted",size:"3",children:`${p.providedId} `}),i.jsxs(_,{as:"span",tone:"muted",style:"mono",children:["#",p.id.slice(0,6)]}),i.jsx(_,{children:p.description}),O?i.jsxs(pe,{onClick:()=>ae(!$),children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[i.jsx(_,{as:"span",weight:"medium",size:"3",children:"Auth Server Metadata"}),i.jsx(_,{size:"2",tone:"muted",children:$?"(tap to collapse)":"(tap to expand)"})]}),$&&i.jsx("div",{className:"tool-detail-page__metadata",children:i.jsx("pre",{children:JSON.stringify(O,null,2)})})]}):i.jsx(_,{tone:"muted",size:"2",children:"Authorization Server metadata not found"})]})}),p.url?i.jsx(de,{title:"Server URL",className:"tool-detail-page__section",children:i.jsx(pe,{onClick:()=>ie(p.url||""),children:i.jsxs(_,{size:"2",style:"mono",className:"tool-detail-page__url",children:[p.url,i.jsx(_,{size:"1",tone:"muted",children:"tap to copy"})]})})}):null,p.url&&i.jsxs(de,{title:"Configure",className:"tool-detail-page__section",children:[i.jsxs(pe,{onClick:()=>ie(`npx @modelcontextprotocol/inspector --transport http --server-url ${p.url}`),children:[i.jsx(_,{weight:"medium",size:"3",children:"Inspector Command"}),i.jsx(_,{size:"2",tone:"muted",children:"Run this command to start the MCP inspector:"}),i.jsxs(_,{style:"mono",children:[`npx @modelcontextprotocol/inspector --transport http --server-url ${p.url}`,i.jsx(_,{size:"1",tone:"muted",children:"tap to copy"})]})]}),i.jsxs(pe,{onClick:()=>ie(`npx @modelcontextprotocol/inspector --transport http --server-url ${p.url}`),children:[i.jsx(_,{weight:"medium",size:"3",children:"Claude Code"}),i.jsxs(_,{style:"mono",children:[`claude mcp add ${p.providedId} --transport http ${p.url}`,i.jsx(_,{size:"1",tone:"muted",children:"tap to copy"})]})]})]}),S.length?i.jsx(de,{title:"Scopes",children:S.map(Z=>i.jsxs(pe,{children:[i.jsx(_,{size:"2",style:"mono",weight:"medium",children:Z.id}),i.jsx(_,{size:"2",tone:"muted",children:Z.description})]},Z.id))}):i.jsx(_,{tone:"muted",size:"2",children:"This server doesn't have any permissions configured"}),i.jsx(de,{title:"Authorizations",className:"tool-detail-page__section",children:w.length===0?i.jsx(pe,{children:i.jsx(_,{tone:"muted",size:"2",children:"No active authorizations"})}):[...w].sort((Z,be)=>new Date(be.updatedAt).getTime()-new Date(Z.updatedAt).getTime()).map(Z=>{const be=$_(Z.status),Ee=xt(Z.updatedAt);return i.jsxs(pe,{children:[i.jsx(_,{weight:"medium",size:"3",children:Z.mcpAuthorizationFlow.clientName||"Unknown Client"}),Z.actor&&i.jsxs(_,{size:"2",tone:"muted",children:["@",Z.actor.slug," updated ",Ee]}),i.jsx("div",{style:{marginTop:"4px"},children:i.jsx(zl,{color:be.color,children:be.label})})]},Z.id)})}),i.jsx(de,{className:"tool-detail-page__actions",children:i.jsx(ge,{size:"lg",variant:"secondary",onClick:()=>l("/tools"),children:"Back to Tools"})}),i.jsx("div",{className:`tool-detail-page__toast ${U?"tool-detail-page__toast--visible":""}`,children:"Copied!"})]})}function F_(){const{toolId:s}=ya(),l=Je(),{tools:r,setSectionTitle:o,loadToolDetails:d,loadToolClients:f}=Is(),g=r.find(E=>E.id===s),[y,v]=m.useState(g||null),[p,T]=m.useState([]),[S,j]=m.useState(!0);return m.useEffect(()=>{!g&&s?d(s).then(v):g&&v(g)},[s,g,d]),m.useEffect(()=>{s&&(j(!0),f(s).then(E=>{const b=[...E].sort((w,k)=>new Date(k.updatedAt).getTime()-new Date(w.updatedAt).getTime());T(b),j(!1)}))},[s,f]),m.useEffect(()=>{o(y?`${y.name} Clients`:"Clients")},[y,o]),S?i.jsx(de,{children:i.jsx(pe,{leading:i.jsx(Ve,{name:"...",size:"lg"}),children:i.jsx(_,{tone:"muted",children:"Loading clients..."})})}):p.length===0?i.jsxs("div",{className:"clients-page",children:[i.jsx(de,{children:i.jsx(pe,{leading:i.jsx(Ve,{name:"?",size:"lg"}),children:i.jsx(_,{tone:"muted",children:"No clients found for this tool"})})}),i.jsx(de,{className:"clients-page__actions",children:i.jsx(ge,{size:"lg",variant:"secondary",onClick:()=>l(`/tools/tool/${s}`),children:"Back to Tool"})})]}):i.jsxs("div",{className:"clients-page",children:[i.jsx(de,{children:p.map(E=>i.jsx(P_,{client:E,onClick:()=>l(`/tools/tool/${s}/clients/${E.id}`)},E.id))}),i.jsx(de,{className:"clients-page__actions",children:i.jsx(ge,{size:"lg",variant:"secondary",onClick:()=>l(`/tools/tool/${s}`),children:"Back to Tool"})})]})}function P_({client:s,onClick:l}){const r=W_(s);return i.jsxs(pe,{leading:i.jsx(Ve,{name:s.friendlyName,size:"lg"}),topRight:xt(s.updatedAt),tags:r,onClick:l,children:[i.jsx(_,{className:"pre",style:"mono",tone:"muted",children:s.clientId}),i.jsx(_,{weight:"bold",size:"3",tone:"default",children:s.friendlyName}),i.jsx("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:i.jsx(_,{tone:"muted",size:"2",children:s.authorizeUrl})})]})}function W_(s){const l=[];return s.authorizeUrl&&s.tokenUrl?l.push({label:"OAuth Ready",color:"green"}):l.push({label:"Incomplete",color:"orange"}),s.clientSecret&&l.push({label:"Secret Set",color:"blue"}),l}function eE(){const{toolId:s,clientId:l}=ya(),r=Je(),{tools:o,setSectionTitle:d,loadToolDetails:f,loadClientDetails:g}=Is(),y=o.find(w=>w.id===s),[v,p]=m.useState(y||null),[T,S]=m.useState(null),[j,E]=m.useState(!0);if(m.useEffect(()=>{!y&&s?f(s).then(p):y&&p(y)},[s,y,f]),m.useEffect(()=>{l&&(E(!0),g(l).then(w=>{S(w),E(!1)}))},[l,g]),m.useEffect(()=>{if(!T){d("Client");return}d(T.friendlyName)},[T,d]),j)return i.jsx("div",{className:"client-detail-page",children:i.jsx(ce,{spacing:"4",align:"center",children:i.jsx(_,{size:"3",tone:"muted",children:"Loading client..."})})});if(!T)return i.jsx("div",{className:"client-detail-page",children:i.jsxs(ce,{spacing:"4",align:"center",children:[i.jsx(_,{size:"3",tone:"muted",children:"Client not found"}),i.jsx(ge,{variant:"secondary",onClick:()=>r(`/tools/tool/${s}/clients`),children:"Back to clients"})]})});const b=tE(T);return i.jsxs("div",{className:"client-detail-page",children:[i.jsx(de,{className:"client-detail-page__section",children:i.jsxs(pe,{leading:i.jsx(Ve,{size:"sm",name:T.friendlyName}),tags:b,topRight:i.jsx(_,{size:"1",tone:"muted",children:xt(T.updatedAt)}),children:[i.jsx(_,{as:"span",weight:"medium",size:"3",children:T.friendlyName}),i.jsx(_,{as:"span",tone:"muted",style:"mono",children:` #${T.id.slice(0,6)}`})]})}),i.jsx(de,{className:"client-detail-page__section",children:i.jsxs(pe,{children:[i.jsx(_,{as:"span",weight:"medium",size:"3",children:"Client ID"}),i.jsx(_,{size:"2",style:"mono",className:"client-detail-page__value",children:T.clientId})]})}),i.jsx(de,{className:"client-detail-page__section",children:i.jsxs(pe,{children:[i.jsx(_,{as:"span",weight:"medium",size:"3",children:"Connection ID"}),i.jsx(_,{size:"2",style:"mono",className:"client-detail-page__value",children:T.id})]})}),i.jsx(de,{className:"client-detail-page__section",children:i.jsxs(pe,{children:[i.jsx(_,{as:"span",weight:"medium",size:"3",children:"Server ID"}),i.jsx(_,{size:"2",style:"mono",className:"client-detail-page__value",children:T.serverId})]})}),i.jsx(de,{className:"client-detail-page__section",children:i.jsxs(pe,{children:[i.jsx(_,{as:"span",weight:"medium",size:"3",children:"Authorization URL"}),i.jsx(_,{size:"2",style:"mono",className:"client-detail-page__value",children:T.authorizeUrl})]})}),i.jsx(de,{className:"client-detail-page__section",children:i.jsxs(pe,{children:[i.jsx(_,{as:"span",weight:"medium",size:"3",children:"Token URL"}),i.jsx(_,{size:"2",style:"mono",className:"client-detail-page__value",children:T.tokenUrl})]})}),i.jsx(de,{className:"client-detail-page__section",children:i.jsxs(pe,{children:[i.jsx(_,{as:"span",weight:"medium",size:"3",children:"Client Secret"}),i.jsx(_,{size:"2",tone:"muted",children:T.clientSecret?"Configured (hidden)":"Not configured"})]})}),i.jsx(de,{className:"client-detail-page__section",children:i.jsxs(pe,{children:[i.jsx(_,{as:"span",weight:"medium",size:"3",children:"Registration Date"}),i.jsx(_,{size:"2",tone:"muted",children:new Date(T.createdAt).toLocaleString()})]})}),i.jsx(de,{className:"client-detail-page__section",children:i.jsxs(pe,{children:[i.jsx(_,{as:"span",weight:"medium",size:"3",children:"Last Updated"}),i.jsx(_,{size:"2",tone:"muted",children:new Date(T.updatedAt).toLocaleString()})]})}),i.jsxs(de,{className:"client-detail-page__actions",children:[i.jsx(ge,{size:"lg",variant:"secondary",onClick:()=>r(`/tools/tool/${s}/clients`),children:"Back to Clients"}),i.jsx(ge,{size:"lg",variant:"secondary",onClick:()=>r(`/tools/tool/${s}`),children:"Back to Tool"})]})]})}function tE(s){const l=[];return s.authorizeUrl&&s.tokenUrl?l.push({label:"OAuth Ready",color:"green"}):l.push({label:"Incomplete",color:"orange"}),s.clientSecret&&l.push({label:"Secret Set",color:"blue"}),l}function nE(){return i.jsx(I_,{children:i.jsx(Vn,{children:i.jsxs(Se,{element:i.jsx(Z_,{}),children:[i.jsx(Se,{index:!0,element:i.jsx(Q_,{})}),i.jsx(Se,{path:"/tool/:toolId",element:i.jsx(J_,{})}),i.jsx(Se,{path:"/tool/:toolId/clients",element:i.jsx(F_,{})}),i.jsx(Se,{path:"/tool/:toolId/clients/:clientId",element:i.jsx(eE,{})})]})})})}V.BASE=Xn;const aE=()=>{console.log("useConsent mounting");const[s,l]=m.useState(null),[r,o]=m.useState(null),[d,f]=m.useState(!0),[g,y]=m.useState(null),[v,p]=m.useState(!1);return m.useEffect(()=>{console.log("useConsent setting message"),l("Message coming from useConsent")},[]),{message:s,setMessage:l,loadConsentMetadata:async j=>{if(j){f(!0),y(null);try{const E=await lg.authorizationControllerGetConsentMetadata(j);o(E)}catch(E){y(E instanceof Error?E.message:"Failed to load authorization details")}finally{f(!1)}}},consentMetadata:r,submitConsent:async(j,E,b)=>{p(!0),y(null);try{const w={flow_id:j,approved:b},k=V.BASE??"",q=document.createElement("form");q.method="POST",q.action=`${k}/api/v1/auth/authorize/mcp/${E}/0.0.0`,Object.entries(w).forEach(([Q,$])=>{const ae=document.createElement("input");ae.type="hidden",ae.name=Q,ae.value=String($),q.appendChild(ae)}),document.body.appendChild(q),q.submit()}catch(w){y(w instanceof Error?w.message:"Failed to submit consent decision"),p(!1)}},error:g,isApproving:v,isLoading:d}},Bg=m.createContext(null);function lE({children:s}){const{message:l,error:r,isLoading:o,isApproving:d,loadConsentMetadata:f,consentMetadata:g,submitConsent:y}=aE(),[v,p]=m.useState(""),T=m.useMemo(()=>({message:l,sectionTitle:v,setSectionTitle:p,loadConsentMetadata:f,consentMetadata:g,submitConsent:y,error:r,isLoading:o,isApproving:d}),[l,v,p,f,g,y,r,o,d]);return i.jsx(Bg.Provider,{value:T,children:s})}function Lg(){const s=m.useContext(Bg);if(!s)throw new Error("useConsentCtx must be used within <ConsentProvider>");return s}function sE(){const s=Qt();console.log("Consent page mounting");const{setSectionTitle:l,loadConsentMetadata:r,submitConsent:o,consentMetadata:d,isLoading:f,isApproving:g,error:y}=Lg(),[v]=qT(),p=v.get("flow");if(!p)return i.jsx("div",{children:"whoops! missing flow id 👀"});m.useEffect(()=>{r(p)},[p]),m.useEffect(()=>{console.log("Consent page useEffect hook triggered"),console.log("setting section title"),l("🔐 Authorization request")},[]),m.useMemo(()=>!f&&!y&&d,[f,y,d]);const T=()=>{d&&o(p,w.providedId,!0)},S=()=>{d&&o(p,w.providedId,!1)};if(f)return i.jsxs("div",{children:[i.jsx("div",{className:"spinner"}),i.jsx("p",{children:"Loading authorization details..."})]});if(y||!d)return i.jsxs("div",{children:[i.jsx("h2",{children:"Authorization Error"}),i.jsx(Ga,{children:y||"Invalid authorization request"})]});const{client:j,scopes:E,redirectUri:b,server:w,resource:k,createdAt:q}=d;return i.jsxs("div",{className:"consent-page",children:[i.jsxs("div",{className:"consent-container",children:[s?i.jsxs("div",{className:"consent-header",children:[i.jsx("div",{className:"oauth-icon",children:"🔐"}),i.jsx("h1",{children:"Authorization Request"}),i.jsx("p",{className:"subtitle",children:"Review the following authorization request carefully"})]}):null,i.jsxs("div",{className:"consent-details",children:[i.jsxs(at,{className:"detail-section",children:[i.jsx("h2",{children:"WHO is requesting access"}),i.jsxs("div",{className:"client-info",children:[i.jsxs("div",{className:"info-row",children:[i.jsx("span",{className:"label",children:"Client Name:"}),i.jsx("span",{className:"value",children:j.clientName})]}),i.jsxs("div",{className:"info-row",children:[i.jsx("span",{className:"label",children:"Client ID:"}),i.jsx("span",{className:"value",children:i.jsx("code",{children:j.clientId})})]}),i.jsxs("div",{className:"info-row",children:[i.jsx("span",{className:"label",children:"Registered:"}),i.jsx("span",{className:"value",children:i.jsx("code",{children:new Date(q).toLocaleString()})})]})]})]}),i.jsxs(at,{className:"detail-section",children:[i.jsx("h2",{children:"WHAT access is requested"}),E&&E.length>0?i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"scopes-list",children:E.map(Q=>i.jsx(iE,{children:Q},Q))}),i.jsx("p",{style:{marginTop:"12px",fontSize:"13px",color:"#7f8c8d",marginBottom:0},children:"These permissions determine what the client can do on your behalf."})]}):i.jsx("p",{style:{fontSize:"13px",color:"#7f8c8d",marginBottom:0},children:"No specific permissions requested."})]}),i.jsxs(at,{className:"detail-section",children:[i.jsx("h2",{children:"WHERE access is granted"}),i.jsxs("div",{className:"server-info",children:[i.jsx("div",{className:"server-name",children:w.name}),i.jsxs("div",{className:"server-id",children:["Server ID: ",w.providedId]})]}),i.jsxs("div",{className:"resource-info",style:{marginTop:"16px"},children:[i.jsx("div",{style:{fontSize:"13px",color:"#7f8c8d",marginBottom:"8px"},children:"Resource:"}),i.jsx("code",{children:k})]})]}),i.jsxs(at,{className:"detail-section",children:[i.jsx("h2",{children:"Redirect Information"}),i.jsx("div",{className:"client-info",children:i.jsxs("div",{className:"info-row",children:[i.jsx("span",{className:"label",children:"Redirect URI:"}),i.jsx("span",{className:"value",children:i.jsx("code",{children:b})})]})}),i.jsx("p",{style:{marginTop:"12px",fontSize:"13px",color:"#7f8c8d",marginBottom:0},children:"After authorization, you will be redirected to this URL."})]})]})]}),y&&i.jsx(Ga,{children:y}),i.jsxs("div",{className:"consent-actions",children:[i.jsx(ge,{variant:"danger",onClick:S,disabled:g,children:"Deny"}),i.jsx(ge,{variant:"primary",onClick:T,disabled:g,children:g?"Approving...":"Approve"})]}),i.jsxs("div",{className:"consent-footer",children:[i.jsxs("p",{children:["By approving, you authorize ",i.jsx("strong",{children:d.client.clientName})," to access the specified resources with the requested permissions."]}),i.jsx(Ul,{to:"/",children:"Home"})]})]})}function iE({children:s}){return i.jsx("span",{className:"scope-badge",children:s})}function rE(){const s=Qt(),{sectionTitle:l}=Lg();return i.jsx(i.Fragment,{children:s?i.jsx(Ya,{sectionTitle:l,children:i.jsx(Dt,{})}):i.jsx(Va,{appTitle:"Consent",sectionTitle:l,navItems:[],children:i.jsx(Dt,{})})})}function oE(){return i.jsx(lE,{children:i.jsx(Vn,{children:i.jsx(Se,{element:i.jsx(rE,{}),children:i.jsx(Se,{path:"/",element:i.jsx(sE,{})})})})})}function cE(){return i.jsxs(Vn,{children:[i.jsx(Se,{path:"/logout",element:i.jsx(s_,{})}),i.jsx(Se,{index:!0,element:i.jsx(Cr,{to:"home",replace:!0})}),i.jsx(Se,{path:"/consent",element:i.jsx(oE,{})}),i.jsx(Se,{path:"/*",element:i.jsx(MS,{})}),i.jsx(Se,{path:"/tasks/*",element:i.jsx(l_,{})}),i.jsx(Se,{path:"/context/*",element:i.jsx(h_,{})}),i.jsx(Se,{path:"/agents/*",element:i.jsx(D_,{})}),i.jsx(Se,{path:"/threads/*",element:i.jsx(V_,{})}),i.jsx(Se,{path:"/tools/*",element:i.jsx(nE,{})})]})}function uE(){return i.jsx(MT,{basename:US,children:i.jsx(QT,{children:i.jsx(L0,{children:i.jsx(oS,{children:i.jsxs(e_,{children:[i.jsxs(Vn,{children:[i.jsx(Se,{path:"/login",element:i.jsx(yS,{})}),i.jsx(Se,{path:"*",element:i.jsx(vS,{children:i.jsx(TS,{children:i.jsx(cE,{})})})})]}),i.jsx(Z0,{})]})})})})})}fx.createRoot(document.getElementById("root")).render(i.jsx(lx.StrictMode,{children:i.jsx(uE,{})}));