@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
@@ -1,11 +0,0 @@
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"]'))c(d);new MutationObserver(d=>{for(const f of d)if(f.type==="childList")for(const p of f.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&c(p)}).observe(document,{childList:!0,subtree:!0});function i(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 c(d){if(d.ep)return;d.ep=!0;const f=i(d);fetch(d.href,f)}})();function bp(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var kc={exports:{}},Cs={};var wm;function Iv(){if(wm)return Cs;wm=1;var s=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function i(c,d,f){var p=null;if(f!==void 0&&(p=""+f),d.key!==void 0&&(p=""+d.key),"key"in d){f={};for(var x in d)x!=="key"&&(f[x]=d[x])}else f=d;return d=f.ref,{$$typeof:s,type:c,key:p,ref:d!==void 0?d:null,props:f}}return Cs.Fragment=l,Cs.jsx=i,Cs.jsxs=i,Cs}var Om;function $v(){return Om||(Om=1,kc.exports=Iv()),kc.exports}var r=$v(),Mc={exports:{}},ge={};var zm;function Jv(){if(zm)return ge;zm=1;var s=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),p=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),T=Symbol.for("react.activity"),j=Symbol.iterator;function _(C){return C===null||typeof C!="object"?null:(C=j&&C[j]||C["@@iterator"],typeof C=="function"?C:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,O={};function B(C,G,F){this.props=C,this.context=G,this.refs=O,this.updater=F||N}B.prototype.isReactComponent={},B.prototype.setState=function(C,G){if(typeof C!="object"&&typeof C!="function"&&C!=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,C,G,"setState")},B.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function X(){}X.prototype=B.prototype;function I(C,G,F){this.props=C,this.context=G,this.refs=O,this.updater=F||N}var Q=I.prototype=new X;Q.constructor=I,w(Q,B.prototype),Q.isPureReactComponent=!0;var W=Array.isArray;function K(){}var H={H:null,A:null,T:null,S:null},$=Object.prototype.hasOwnProperty;function ae(C,G,F){var ee=F.ref;return{$$typeof:s,type:C,key:G,ref:ee!==void 0?ee:null,props:F}}function P(C,G){return ae(C.type,G,C.props)}function se(C){return typeof C=="object"&&C!==null&&C.$$typeof===s}function De(C){var G={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(F){return G[F]})}var it=/\/+/g;function ke(C,G){return typeof C=="object"&&C!==null&&C.key!=null?De(""+C.key):G.toString(36)}function Oe(C){switch(C.status){case"fulfilled":return C.value;case"rejected":throw C.reason;default:switch(typeof C.status=="string"?C.then(K,K):(C.status="pending",C.then(function(G){C.status==="pending"&&(C.status="fulfilled",C.value=G)},function(G){C.status==="pending"&&(C.status="rejected",C.reason=G)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function U(C,G,F,ee,fe){var ye=typeof C;(ye==="undefined"||ye==="boolean")&&(C=null);var be=!1;if(C===null)be=!0;else switch(ye){case"bigint":case"string":case"number":be=!0;break;case"object":switch(C.$$typeof){case s:case l:be=!0;break;case S:return be=C._init,U(be(C._payload),G,F,ee,fe)}}if(be)return fe=fe(C),be=ee===""?"."+ke(C,0):ee,W(fe)?(F="",be!=null&&(F=be.replace(it,"$&/")+"/"),U(fe,G,F,"",function(xt){return xt})):fe!=null&&(se(fe)&&(fe=P(fe,F+(fe.key==null||C&&C.key===fe.key?"":(""+fe.key).replace(it,"$&/")+"/")+be)),G.push(fe)),1;be=0;var pe=ee===""?".":ee+":";if(W(C))for(var me=0;me<C.length;me++)ee=C[me],ye=pe+ke(ee,me),be+=U(ee,G,F,ye,fe);else if(me=_(C),typeof me=="function")for(C=me.call(C),me=0;!(ee=C.next()).done;)ee=ee.value,ye=pe+ke(ee,me++),be+=U(ee,G,F,ye,fe);else if(ye==="object"){if(typeof C.then=="function")return U(Oe(C),G,F,ee,fe);throw G=String(C),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return be}function J(C,G,F){if(C==null)return C;var ee=[],fe=0;return U(C,ee,"","",function(ye){return G.call(F,ye,fe++)}),ee}function re(C){if(C._status===-1){var G=C._result;G=G(),G.then(function(F){(C._status===0||C._status===-1)&&(C._status=1,C._result=F)},function(F){(C._status===0||C._status===-1)&&(C._status=2,C._result=F)}),C._status===-1&&(C._status=0,C._result=G)}if(C._status===1)return C._result.default;throw C._result}var he=typeof reportError=="function"?reportError:function(C){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof C=="object"&&C!==null&&typeof C.message=="string"?String(C.message):String(C),error:C});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)},Ee={map:J,forEach:function(C,G,F){J(C,function(){G.apply(this,arguments)},F)},count:function(C){var G=0;return J(C,function(){G++}),G},toArray:function(C){return J(C,function(G){return G})||[]},only:function(C){if(!se(C))throw Error("React.Children.only expected to receive a single React element child.");return C}};return ge.Activity=T,ge.Children=Ee,ge.Component=B,ge.Fragment=i,ge.Profiler=d,ge.PureComponent=I,ge.StrictMode=c,ge.Suspense=g,ge.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=H,ge.__COMPILER_RUNTIME={__proto__:null,c:function(C){return H.H.useMemoCache(C)}},ge.cache=function(C){return function(){return C.apply(null,arguments)}},ge.cacheSignal=function(){return null},ge.cloneElement=function(C,G,F){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var ee=w({},C.props),fe=C.key;if(G!=null)for(ye in G.key!==void 0&&(fe=""+G.key),G)!$.call(G,ye)||ye==="key"||ye==="__self"||ye==="__source"||ye==="ref"&&G.ref===void 0||(ee[ye]=G[ye]);var ye=arguments.length-2;if(ye===1)ee.children=F;else if(1<ye){for(var be=Array(ye),pe=0;pe<ye;pe++)be[pe]=arguments[pe+2];ee.children=be}return ae(C.type,fe,ee)},ge.createContext=function(C){return C={$$typeof:p,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null},C.Provider=C,C.Consumer={$$typeof:f,_context:C},C},ge.createElement=function(C,G,F){var ee,fe={},ye=null;if(G!=null)for(ee in G.key!==void 0&&(ye=""+G.key),G)$.call(G,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(fe[ee]=G[ee]);var be=arguments.length-2;if(be===1)fe.children=F;else if(1<be){for(var pe=Array(be),me=0;me<be;me++)pe[me]=arguments[me+2];fe.children=pe}if(C&&C.defaultProps)for(ee in be=C.defaultProps,be)fe[ee]===void 0&&(fe[ee]=be[ee]);return ae(C,ye,fe)},ge.createRef=function(){return{current:null}},ge.forwardRef=function(C){return{$$typeof:x,render:C}},ge.isValidElement=se,ge.lazy=function(C){return{$$typeof:S,_payload:{_status:-1,_result:C},_init:re}},ge.memo=function(C,G){return{$$typeof:y,type:C,compare:G===void 0?null:G}},ge.startTransition=function(C){var G=H.T,F={};H.T=F;try{var ee=C(),fe=H.S;fe!==null&&fe(F,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(K,he)}catch(ye){he(ye)}finally{G!==null&&F.types!==null&&(G.types=F.types),H.T=G}},ge.unstable_useCacheRefresh=function(){return H.H.useCacheRefresh()},ge.use=function(C){return H.H.use(C)},ge.useActionState=function(C,G,F){return H.H.useActionState(C,G,F)},ge.useCallback=function(C,G){return H.H.useCallback(C,G)},ge.useContext=function(C){return H.H.useContext(C)},ge.useDebugValue=function(){},ge.useDeferredValue=function(C,G){return H.H.useDeferredValue(C,G)},ge.useEffect=function(C,G){return H.H.useEffect(C,G)},ge.useEffectEvent=function(C){return H.H.useEffectEvent(C)},ge.useId=function(){return H.H.useId()},ge.useImperativeHandle=function(C,G,F){return H.H.useImperativeHandle(C,G,F)},ge.useInsertionEffect=function(C,G){return H.H.useInsertionEffect(C,G)},ge.useLayoutEffect=function(C,G){return H.H.useLayoutEffect(C,G)},ge.useMemo=function(C,G){return H.H.useMemo(C,G)},ge.useOptimistic=function(C,G){return H.H.useOptimistic(C,G)},ge.useReducer=function(C,G,F){return H.H.useReducer(C,G,F)},ge.useRef=function(C){return H.H.useRef(C)},ge.useState=function(C){return H.H.useState(C)},ge.useSyncExternalStore=function(C,G,F){return H.H.useSyncExternalStore(C,G,F)},ge.useTransition=function(){return H.H.useTransition()},ge.version="19.2.3",ge}var Dm;function uu(){return Dm||(Dm=1,Mc.exports=Jv()),Mc.exports}var m=uu();const Fv=bp(m);var Uc={exports:{}},As={},Bc={exports:{}},Lc={};var km;function Wv(){return km||(km=1,(function(s){function l(U,J){var re=U.length;U.push(J);e:for(;0<re;){var he=re-1>>>1,Ee=U[he];if(0<d(Ee,J))U[he]=J,U[re]=Ee,re=he;else break e}}function i(U){return U.length===0?null:U[0]}function c(U){if(U.length===0)return null;var J=U[0],re=U.pop();if(re!==J){U[0]=re;e:for(var he=0,Ee=U.length,C=Ee>>>1;he<C;){var G=2*(he+1)-1,F=U[G],ee=G+1,fe=U[ee];if(0>d(F,re))ee<Ee&&0>d(fe,F)?(U[he]=fe,U[ee]=re,he=ee):(U[he]=F,U[G]=re,he=G);else if(ee<Ee&&0>d(fe,re))U[he]=fe,U[ee]=re,he=ee;else break e}}return J}function d(U,J){var re=U.sortIndex-J.sortIndex;return re!==0?re:U.id-J.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 p=Date,x=p.now();s.unstable_now=function(){return p.now()-x}}var g=[],y=[],S=1,T=null,j=3,_=!1,N=!1,w=!1,O=!1,B=typeof setTimeout=="function"?setTimeout:null,X=typeof clearTimeout=="function"?clearTimeout:null,I=typeof setImmediate<"u"?setImmediate:null;function Q(U){for(var J=i(y);J!==null;){if(J.callback===null)c(y);else if(J.startTime<=U)c(y),J.sortIndex=J.expirationTime,l(g,J);else break;J=i(y)}}function W(U){if(w=!1,Q(U),!N)if(i(g)!==null)N=!0,K||(K=!0,De());else{var J=i(y);J!==null&&Oe(W,J.startTime-U)}}var K=!1,H=-1,$=5,ae=-1;function P(){return O?!0:!(s.unstable_now()-ae<$)}function se(){if(O=!1,K){var U=s.unstable_now();ae=U;var J=!0;try{e:{N=!1,w&&(w=!1,X(H),H=-1),_=!0;var re=j;try{t:{for(Q(U),T=i(g);T!==null&&!(T.expirationTime>U&&P());){var he=T.callback;if(typeof he=="function"){T.callback=null,j=T.priorityLevel;var Ee=he(T.expirationTime<=U);if(U=s.unstable_now(),typeof Ee=="function"){T.callback=Ee,Q(U),J=!0;break t}T===i(g)&&c(g),Q(U)}else c(g);T=i(g)}if(T!==null)J=!0;else{var C=i(y);C!==null&&Oe(W,C.startTime-U),J=!1}}break e}finally{T=null,j=re,_=!1}J=void 0}}finally{J?De():K=!1}}}var De;if(typeof I=="function")De=function(){I(se)};else if(typeof MessageChannel<"u"){var it=new MessageChannel,ke=it.port2;it.port1.onmessage=se,De=function(){ke.postMessage(null)}}else De=function(){B(se,0)};function Oe(U,J){H=B(function(){U(s.unstable_now())},J)}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(U){U.callback=null},s.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<U?Math.floor(1e3/U):5},s.unstable_getCurrentPriorityLevel=function(){return j},s.unstable_next=function(U){switch(j){case 1:case 2:case 3:var J=3;break;default:J=j}var re=j;j=J;try{return U()}finally{j=re}},s.unstable_requestPaint=function(){O=!0},s.unstable_runWithPriority=function(U,J){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var re=j;j=U;try{return J()}finally{j=re}},s.unstable_scheduleCallback=function(U,J,re){var he=s.unstable_now();switch(typeof re=="object"&&re!==null?(re=re.delay,re=typeof re=="number"&&0<re?he+re:he):re=he,U){case 1:var Ee=-1;break;case 2:Ee=250;break;case 5:Ee=1073741823;break;case 4:Ee=1e4;break;default:Ee=5e3}return Ee=re+Ee,U={id:S++,callback:J,priorityLevel:U,startTime:re,expirationTime:Ee,sortIndex:-1},re>he?(U.sortIndex=re,l(y,U),i(g)===null&&U===i(y)&&(w?(X(H),H=-1):w=!0,Oe(W,re-he))):(U.sortIndex=Ee,l(g,U),N||_||(N=!0,K||(K=!0,De()))),U},s.unstable_shouldYield=P,s.unstable_wrapCallback=function(U){var J=j;return function(){var re=j;j=J;try{return U.apply(this,arguments)}finally{j=re}}}})(Lc)),Lc}var Mm;function Pv(){return Mm||(Mm=1,Bc.exports=Wv()),Bc.exports}var Hc={exports:{}},gt={};var Um;function ex(){if(Um)return gt;Um=1;var s=uu();function l(g){var y="https://react.dev/errors/"+g;if(1<arguments.length){y+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)y+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+g+"; visit "+y+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var c={d:{f:i,r:function(){throw Error(l(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},d=Symbol.for("react.portal");function f(g,y,S){var T=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:T==null?null:""+T,children:g,containerInfo:y,implementation:S}}var p=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function x(g,y){if(g==="font")return"";if(typeof y=="string")return y==="use-credentials"?y:""}return gt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,gt.createPortal=function(g,y){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!y||y.nodeType!==1&&y.nodeType!==9&&y.nodeType!==11)throw Error(l(299));return f(g,y,null,S)},gt.flushSync=function(g){var y=p.T,S=c.p;try{if(p.T=null,c.p=2,g)return g()}finally{p.T=y,c.p=S,c.d.f()}},gt.preconnect=function(g,y){typeof g=="string"&&(y?(y=y.crossOrigin,y=typeof y=="string"?y==="use-credentials"?y:"":void 0):y=null,c.d.C(g,y))},gt.prefetchDNS=function(g){typeof g=="string"&&c.d.D(g)},gt.preinit=function(g,y){if(typeof g=="string"&&y&&typeof y.as=="string"){var S=y.as,T=x(S,y.crossOrigin),j=typeof y.integrity=="string"?y.integrity:void 0,_=typeof y.fetchPriority=="string"?y.fetchPriority:void 0;S==="style"?c.d.S(g,typeof y.precedence=="string"?y.precedence:void 0,{crossOrigin:T,integrity:j,fetchPriority:_}):S==="script"&&c.d.X(g,{crossOrigin:T,integrity:j,fetchPriority:_,nonce:typeof y.nonce=="string"?y.nonce:void 0})}},gt.preinitModule=function(g,y){if(typeof g=="string")if(typeof y=="object"&&y!==null){if(y.as==null||y.as==="script"){var S=x(y.as,y.crossOrigin);c.d.M(g,{crossOrigin:S,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0})}}else y==null&&c.d.M(g)},gt.preload=function(g,y){if(typeof g=="string"&&typeof y=="object"&&y!==null&&typeof y.as=="string"){var S=y.as,T=x(S,y.crossOrigin);c.d.L(g,S,{crossOrigin:T,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,type:typeof y.type=="string"?y.type:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0,referrerPolicy:typeof y.referrerPolicy=="string"?y.referrerPolicy:void 0,imageSrcSet:typeof y.imageSrcSet=="string"?y.imageSrcSet:void 0,imageSizes:typeof y.imageSizes=="string"?y.imageSizes:void 0,media:typeof y.media=="string"?y.media:void 0})}},gt.preloadModule=function(g,y){if(typeof g=="string")if(y){var S=x(y.as,y.crossOrigin);c.d.m(g,{as:typeof y.as=="string"&&y.as!=="script"?y.as:void 0,crossOrigin:S,integrity:typeof y.integrity=="string"?y.integrity:void 0})}else c.d.m(g)},gt.requestFormReset=function(g){c.d.r(g)},gt.unstable_batchedUpdates=function(g,y){return g(y)},gt.useFormState=function(g,y,S){return p.H.useFormState(g,y,S)},gt.useFormStatus=function(){return p.H.useHostTransitionStatus()},gt.version="19.2.3",gt}var Bm;function tx(){if(Bm)return Hc.exports;Bm=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(),Hc.exports=ex(),Hc.exports}var Lm;function nx(){if(Lm)return As;Lm=1;var s=Pv(),l=uu(),i=tx();function c(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 p(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 x(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 g(e){if(f(e)!==e)throw Error(c(188))}function y(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(c(188));return t!==e?null:e}for(var n=e,a=t;;){var o=n.return;if(o===null)break;var u=o.alternate;if(u===null){if(a=o.return,a!==null){n=a;continue}break}if(o.child===u.child){for(u=o.child;u;){if(u===n)return g(o),e;if(u===a)return g(o),t;u=u.sibling}throw Error(c(188))}if(n.return!==a.return)n=o,a=u;else{for(var h=!1,v=o.child;v;){if(v===n){h=!0,n=o,a=u;break}if(v===a){h=!0,a=o,n=u;break}v=v.sibling}if(!h){for(v=u.child;v;){if(v===n){h=!0,n=u,a=o;break}if(v===a){h=!0,a=u,n=o;break}v=v.sibling}if(!h)throw Error(c(189))}}if(n.alternate!==a)throw Error(c(190))}if(n.tag!==3)throw Error(c(188));return n.stateNode.current===n?e:t}function S(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=S(e),t!==null)return t;e=e.sibling}return null}var T=Object.assign,j=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),X=Symbol.for("react.consumer"),I=Symbol.for("react.context"),Q=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),ae=Symbol.for("react.activity"),P=Symbol.for("react.memo_cache_sentinel"),se=Symbol.iterator;function De(e){return e===null||typeof e!="object"?null:(e=se&&e[se]||e["@@iterator"],typeof e=="function"?e:null)}var it=Symbol.for("react.client.reference");function ke(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===it?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case w:return"Fragment";case B:return"Profiler";case O:return"StrictMode";case W:return"Suspense";case K:return"SuspenseList";case ae:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case N:return"Portal";case I:return e.displayName||"Context";case X:return(e._context.displayName||"Context")+".Consumer";case Q:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case H:return t=e.displayName||null,t!==null?t:ke(e.type)||"Memo";case $:t=e._payload,e=e._init;try{return ke(e(t))}catch{}}return null}var Oe=Array.isArray,U=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re={pending:!1,data:null,method:null,action:null},he=[],Ee=-1;function C(e){return{current:e}}function G(e){0>Ee||(e.current=he[Ee],he[Ee]=null,Ee--)}function F(e,t){Ee++,he[Ee]=e.current,e.current=t}var ee=C(null),fe=C(null),ye=C(null),be=C(null);function pe(e,t){switch(F(ye,t),F(fe,e),F(ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Ph(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Ph(t),e=em(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}G(ee),F(ee,e)}function me(){G(ee),G(fe),G(ye)}function xt(e){e.memoizedState!==null&&F(be,e);var t=ee.current,n=em(t,e.type);t!==n&&(F(fe,e),F(ee,n))}function Qe(e){fe.current===e&&(G(ee),G(fe)),be.current===e&&(G(be),_s._currentValue=re)}var Nt,un;function Rt(e){if(Nt===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Nt=t&&t[1]||"",un=-1<n.stack.indexOf(`
2
- at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+Nt+e+un}var ya=!1;function Gn(e,t){if(!e||ya)return"";ya=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var Y=function(){throw Error()};if(Object.defineProperty(Y.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Y,[])}catch(M){var k=M}Reflect.construct(e,[],Y)}else{try{Y.call()}catch(M){k=M}e.call(Y.prototype)}}else{try{throw Error()}catch(M){k=M}(Y=e())&&typeof Y.catch=="function"&&Y.catch(function(){})}}catch(M){if(M&&k&&typeof M.stack=="string")return[M.stack,k.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=a.DetermineComponentFrameRoot(),h=u[0],v=u[1];if(h&&v){var b=h.split(`
4
- `),D=v.split(`
5
- `);for(o=a=0;a<b.length&&!b[a].includes("DetermineComponentFrameRoot");)a++;for(;o<D.length&&!D[o].includes("DetermineComponentFrameRoot");)o++;if(a===b.length||o===D.length)for(a=b.length-1,o=D.length-1;1<=a&&0<=o&&b[a]!==D[o];)o--;for(;1<=a&&0<=o;a--,o--)if(b[a]!==D[o]){if(a!==1||o!==1)do if(a--,o--,0>o||b[a]!==D[o]){var L=`
6
- `+b[a].replace(" at new "," at ");return e.displayName&&L.includes("<anonymous>")&&(L=L.replace("<anonymous>",e.displayName)),L}while(1<=a&&0<=o);break}}}finally{ya=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Rt(n):""}function qa(e,t){switch(e.tag){case 26:case 27:case 5:return Rt(e.type);case 16:return Rt("Lazy");case 13:return e.child!==t&&t!==null?Rt("Suspense Fallback"):Rt("Suspense");case 19:return Rt("SuspenseList");case 0:case 15:return Gn(e.type,!1);case 11:return Gn(e.type.render,!1);case 1:return Gn(e.type,!0);case 31:return Rt("Activity");default:return""}}function ln(e){try{var t="",n=null;do t+=qa(e,n),n=e,e=e.return;while(e);return t}catch(a){return`
7
- Error generating stack: `+a.message+`
8
- `+a.stack}}var te=Object.prototype.hasOwnProperty,ze=s.unstable_scheduleCallback,dn=s.unstable_cancelCallback,Dl=s.unstable_shouldYield,Ag=s.unstable_requestPaint,wt=s.unstable_now,Ng=s.unstable_getCurrentPriorityLevel,wu=s.unstable_ImmediatePriority,Ou=s.unstable_UserBlockingPriority,Gs=s.unstable_NormalPriority,Rg=s.unstable_LowPriority,zu=s.unstable_IdlePriority,wg=s.log,Og=s.unstable_setDisableYieldValue,kl=null,Ot=null;function Yn(e){if(typeof wg=="function"&&Og(e),Ot&&typeof Ot.setStrictMode=="function")try{Ot.setStrictMode(kl,e)}catch{}}var zt=Math.clz32?Math.clz32:kg,zg=Math.log,Dg=Math.LN2;function kg(e){return e>>>=0,e===0?32:31-(zg(e)/Dg|0)|0}var Ys=256,Vs=262144,Xs=4194304;function va(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 Qs(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var o=0,u=e.suspendedLanes,h=e.pingedLanes;e=e.warmLanes;var v=a&134217727;return v!==0?(a=v&~u,a!==0?o=va(a):(h&=v,h!==0?o=va(h):n||(n=v&~e,n!==0&&(o=va(n))))):(v=a&~u,v!==0?o=va(v):h!==0?o=va(h):n||(n=a&~e,n!==0&&(o=va(n)))),o===0?0:t!==0&&t!==o&&(t&u)===0&&(u=o&-o,n=t&-t,u>=n||u===32&&(n&4194048)!==0)?t:o}function Ml(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Mg(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 Du(){var e=Xs;return Xs<<=1,(Xs&62914560)===0&&(Xs=4194304),e}function Tr(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ul(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ug(e,t,n,a,o,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 v=e.entanglements,b=e.expirationTimes,D=e.hiddenUpdates;for(n=h&~n;0<n;){var L=31-zt(n),Y=1<<L;v[L]=0,b[L]=-1;var k=D[L];if(k!==null)for(D[L]=null,L=0;L<k.length;L++){var M=k[L];M!==null&&(M.lane&=-536870913)}n&=~Y}a!==0&&ku(e,a,0),u!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=u&~(h&~t))}function ku(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-zt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&261930}function Mu(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-zt(n),o=1<<a;o&t|e[a]&t&&(e[a]|=t),n&=~o}}function Uu(e,t){var n=t&-t;return n=(n&42)!==0?1:_r(n),(n&(e.suspendedLanes|t))!==0?0:n}function _r(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 Er(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Bu(){var e=J.p;return e!==0?e:(e=window.event,e===void 0?32:Em(e.type))}function Lu(e,t){var n=J.p;try{return J.p=e,t()}finally{J.p=n}}var Vn=Math.random().toString(36).slice(2),ut="__reactFiber$"+Vn,St="__reactProps$"+Vn,Ga="__reactContainer$"+Vn,br="__reactEvents$"+Vn,Bg="__reactListeners$"+Vn,Lg="__reactHandles$"+Vn,Hu="__reactResources$"+Vn,Bl="__reactMarker$"+Vn;function jr(e){delete e[ut],delete e[St],delete e[br],delete e[Bg],delete e[Lg]}function Ya(e){var t=e[ut];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ga]||n[ut]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=rm(e);e!==null;){if(n=e[ut])return n;e=rm(e)}return t}e=n,n=e.parentNode}return null}function Va(e){if(e=e[ut]||e[Ga]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ll(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function Xa(e){var t=e[Hu];return t||(t=e[Hu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ot(e){e[Bl]=!0}var qu=new Set,Gu={};function xa(e,t){Qa(e,t),Qa(e+"Capture",t)}function Qa(e,t){for(Gu[e]=t,e=0;e<t.length;e++)qu.add(t[e])}var Hg=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]*$"),Yu={},Vu={};function qg(e){return te.call(Vu,e)?!0:te.call(Yu,e)?!1:Hg.test(e)?Vu[e]=!0:(Yu[e]=!0,!1)}function Ks(e,t,n){if(qg(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 Zs(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 xn(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 Qt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Xu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Gg(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 o=a.get,u=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.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 Cr(e){if(!e._valueTracker){var t=Xu(e)?"checked":"value";e._valueTracker=Gg(e,t,""+e[t])}}function Qu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=Xu(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function Is(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 Yg=/[\n"\\]/g;function Kt(e){return e.replace(Yg,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ar(e,t,n,a,o,u,h,v){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=""+Qt(t)):e.value!==""+Qt(t)&&(e.value=""+Qt(t)):h!=="submit"&&h!=="reset"||e.removeAttribute("value"),t!=null?Nr(e,h,Qt(t)):n!=null?Nr(e,h,Qt(n)):a!=null&&e.removeAttribute("value"),o==null&&u!=null&&(e.defaultChecked=!!u),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.name=""+Qt(v):e.removeAttribute("name")}function Ku(e,t,n,a,o,u,h,v){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)){Cr(e);return}n=n!=null?""+Qt(n):"",t=t!=null?""+Qt(t):n,v||t===e.value||(e.value=t),e.defaultValue=t}a=a??o,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=v?e.checked:!!a,e.defaultChecked=!!a,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.name=h),Cr(e)}function Nr(e,t,n){t==="number"&&Is(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Ka(e,t,n,a){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&a&&(e[n].defaultSelected=!0)}else{for(n=""+Qt(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,a&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Zu(e,t,n){if(t!=null&&(t=""+Qt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Qt(n):""}function Iu(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(c(92));if(Oe(a)){if(1<a.length)throw Error(c(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=Qt(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a),Cr(e)}function Za(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Vg=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 $u(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||Vg.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Ju(e,t,n){if(t!=null&&typeof t!="object")throw Error(c(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 o in t)a=t[o],t.hasOwnProperty(o)&&n[o]!==a&&$u(e,o,a)}else for(var u in t)t.hasOwnProperty(u)&&$u(e,u,t[u])}function Rr(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 Xg=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"]]),Qg=/^[\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 $s(e){return Qg.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Sn(){}var wr=null;function Or(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ia=null,$a=null;function Fu(e){var t=Va(e);if(t&&(e=t.stateNode)){var n=e[St]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ar(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="'+Kt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var o=a[St]||null;if(!o)throw Error(c(90));Ar(a,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<n.length;t++)a=n[t],a.form===e.form&&Qu(a)}break e;case"textarea":Zu(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Ka(e,!!n.multiple,t,!1)}}}var zr=!1;function Wu(e,t,n){if(zr)return e(t,n);zr=!0;try{var a=e(t);return a}finally{if(zr=!1,(Ia!==null||$a!==null)&&(Ui(),Ia&&(t=Ia,e=$a,$a=Ia=null,Fu(t),e)))for(t=0;t<e.length;t++)Fu(e[t])}}function Hl(e,t){var n=e.stateNode;if(n===null)return null;var a=n[St]||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(c(231,t,typeof n));return n}var Tn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Dr=!1;if(Tn)try{var ql={};Object.defineProperty(ql,"passive",{get:function(){Dr=!0}}),window.addEventListener("test",ql,ql),window.removeEventListener("test",ql,ql)}catch{Dr=!1}var Xn=null,kr=null,Js=null;function Pu(){if(Js)return Js;var e,t=kr,n=t.length,a,o="value"in Xn?Xn.value:Xn.textContent,u=o.length;for(e=0;e<n&&t[e]===o[e];e++);var h=n-e;for(a=1;a<=h&&t[n-a]===o[u-a];a++);return Js=o.slice(e,1<a?1-a:void 0)}function Fs(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 Ws(){return!0}function ed(){return!1}function Tt(e){function t(n,a,o,u,h){this._reactName=n,this._targetInst=o,this.type=a,this.nativeEvent=u,this.target=h,this.currentTarget=null;for(var v in e)e.hasOwnProperty(v)&&(n=e[v],this[v]=n?n(u):u[v]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?Ws:ed,this.isPropagationStopped=ed,this}return T(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=Ws)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ws)},persist:function(){},isPersistent:Ws}),t}var Sa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ps=Tt(Sa),Gl=T({},Sa,{view:0,detail:0}),Kg=Tt(Gl),Mr,Ur,Yl,ei=T({},Gl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Lr,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!==Yl&&(Yl&&e.type==="mousemove"?(Mr=e.screenX-Yl.screenX,Ur=e.screenY-Yl.screenY):Ur=Mr=0,Yl=e),Mr)},movementY:function(e){return"movementY"in e?e.movementY:Ur}}),td=Tt(ei),Zg=T({},ei,{dataTransfer:0}),Ig=Tt(Zg),$g=T({},Gl,{relatedTarget:0}),Br=Tt($g),Jg=T({},Sa,{animationName:0,elapsedTime:0,pseudoElement:0}),Fg=Tt(Jg),Wg=T({},Sa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Pg=Tt(Wg),ey=T({},Sa,{data:0}),nd=Tt(ey),ty={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ny={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"},ay={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ly(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ay[e])?!!t[e]:!1}function Lr(){return ly}var sy=T({},Gl,{key:function(e){if(e.key){var t=ty[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Fs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ny[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Lr,charCode:function(e){return e.type==="keypress"?Fs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Fs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),iy=Tt(sy),ry=T({},ei,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ad=Tt(ry),oy=T({},Gl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Lr}),cy=Tt(oy),uy=T({},Sa,{propertyName:0,elapsedTime:0,pseudoElement:0}),dy=Tt(uy),fy=T({},ei,{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}),hy=Tt(fy),my=T({},Sa,{newState:0,oldState:0}),py=Tt(my),gy=[9,13,27,32],Hr=Tn&&"CompositionEvent"in window,Vl=null;Tn&&"documentMode"in document&&(Vl=document.documentMode);var yy=Tn&&"TextEvent"in window&&!Vl,ld=Tn&&(!Hr||Vl&&8<Vl&&11>=Vl),sd=" ",id=!1;function rd(e,t){switch(e){case"keyup":return gy.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function od(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ja=!1;function vy(e,t){switch(e){case"compositionend":return od(t);case"keypress":return t.which!==32?null:(id=!0,sd);case"textInput":return e=t.data,e===sd&&id?null:e;default:return null}}function xy(e,t){if(Ja)return e==="compositionend"||!Hr&&rd(e,t)?(e=Pu(),Js=kr=Xn=null,Ja=!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 ld&&t.locale!=="ko"?null:t.data;default:return null}}var Sy={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 cd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Sy[e.type]:t==="textarea"}function ud(e,t,n,a){Ia?$a?$a.push(a):$a=[a]:Ia=a,t=Vi(t,"onChange"),0<t.length&&(n=new Ps("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var Xl=null,Ql=null;function Ty(e){Zh(e,0)}function ti(e){var t=Ll(e);if(Qu(t))return e}function dd(e,t){if(e==="change")return t}var fd=!1;if(Tn){var qr;if(Tn){var Gr="oninput"in document;if(!Gr){var hd=document.createElement("div");hd.setAttribute("oninput","return;"),Gr=typeof hd.oninput=="function"}qr=Gr}else qr=!1;fd=qr&&(!document.documentMode||9<document.documentMode)}function md(){Xl&&(Xl.detachEvent("onpropertychange",pd),Ql=Xl=null)}function pd(e){if(e.propertyName==="value"&&ti(Ql)){var t=[];ud(t,Ql,e,Or(e)),Wu(Ty,t)}}function _y(e,t,n){e==="focusin"?(md(),Xl=t,Ql=n,Xl.attachEvent("onpropertychange",pd)):e==="focusout"&&md()}function Ey(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ti(Ql)}function by(e,t){if(e==="click")return ti(t)}function jy(e,t){if(e==="input"||e==="change")return ti(t)}function Cy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Dt=typeof Object.is=="function"?Object.is:Cy;function Kl(e,t){if(Dt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var o=n[a];if(!te.call(t,o)||!Dt(e[o],t[o]))return!1}return!0}function gd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function yd(e,t){var n=gd(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=gd(n)}}function vd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?vd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function xd(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Is(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=Is(e.document)}return t}function Yr(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 Ay=Tn&&"documentMode"in document&&11>=document.documentMode,Fa=null,Vr=null,Zl=null,Xr=!1;function Sd(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Xr||Fa==null||Fa!==Is(a)||(a=Fa,"selectionStart"in a&&Yr(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}),Zl&&Kl(Zl,a)||(Zl=a,a=Vi(Vr,"onSelect"),0<a.length&&(t=new Ps("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=Fa)))}function Ta(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Wa={animationend:Ta("Animation","AnimationEnd"),animationiteration:Ta("Animation","AnimationIteration"),animationstart:Ta("Animation","AnimationStart"),transitionrun:Ta("Transition","TransitionRun"),transitionstart:Ta("Transition","TransitionStart"),transitioncancel:Ta("Transition","TransitionCancel"),transitionend:Ta("Transition","TransitionEnd")},Qr={},Td={};Tn&&(Td=document.createElement("div").style,"AnimationEvent"in window||(delete Wa.animationend.animation,delete Wa.animationiteration.animation,delete Wa.animationstart.animation),"TransitionEvent"in window||delete Wa.transitionend.transition);function _a(e){if(Qr[e])return Qr[e];if(!Wa[e])return e;var t=Wa[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Td)return Qr[e]=t[n];return e}var _d=_a("animationend"),Ed=_a("animationiteration"),bd=_a("animationstart"),Ny=_a("transitionrun"),Ry=_a("transitionstart"),wy=_a("transitioncancel"),jd=_a("transitionend"),Cd=new Map,Kr="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(" ");Kr.push("scrollEnd");function sn(e,t){Cd.set(e,t),xa(t,[e])}var ni=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)},Zt=[],Pa=0,Zr=0;function ai(){for(var e=Pa,t=Zr=Pa=0;t<e;){var n=Zt[t];Zt[t++]=null;var a=Zt[t];Zt[t++]=null;var o=Zt[t];Zt[t++]=null;var u=Zt[t];if(Zt[t++]=null,a!==null&&o!==null){var h=a.pending;h===null?o.next=o:(o.next=h.next,h.next=o),a.pending=o}u!==0&&Ad(n,o,u)}}function li(e,t,n,a){Zt[Pa++]=e,Zt[Pa++]=t,Zt[Pa++]=n,Zt[Pa++]=a,Zr|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Ir(e,t,n,a){return li(e,t,n,a),si(e)}function Ea(e,t){return li(e,null,null,t),si(e)}function Ad(e,t,n){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n);for(var o=!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||(o=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,o&&t!==null&&(o=31-zt(n),e=u.hiddenUpdates,a=e[o],a===null?e[o]=[t]:a.push(t),t.lane=n|536870912),u):null}function si(e){if(50<ps)throw ps=0,lc=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var el={};function Oy(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 kt(e,t,n,a){return new Oy(e,t,n,a)}function $r(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _n(e,t){var n=e.alternate;return n===null?(n=kt(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 Nd(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 ii(e,t,n,a,o,u){var h=0;if(a=e,typeof e=="function")$r(e)&&(h=1);else if(typeof e=="string")h=Uv(e,n,ee.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ae:return e=kt(31,n,t,o),e.elementType=ae,e.lanes=u,e;case w:return ba(n.children,o,u,t);case O:h=8,o|=24;break;case B:return e=kt(12,n,t,o|2),e.elementType=B,e.lanes=u,e;case W:return e=kt(13,n,t,o),e.elementType=W,e.lanes=u,e;case K:return e=kt(19,n,t,o),e.elementType=K,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case I:h=10;break e;case X:h=9;break e;case Q:h=11;break e;case H:h=14;break e;case $:h=16,a=null;break e}h=29,n=Error(c(130,e===null?"null":typeof e,"")),a=null}return t=kt(h,n,t,o),t.elementType=e,t.type=a,t.lanes=u,t}function ba(e,t,n,a){return e=kt(7,e,a,t),e.lanes=n,e}function Jr(e,t,n){return e=kt(6,e,null,t),e.lanes=n,e}function Rd(e){var t=kt(18,null,null,0);return t.stateNode=e,t}function Fr(e,t,n){return t=kt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var wd=new WeakMap;function It(e,t){if(typeof e=="object"&&e!==null){var n=wd.get(e);return n!==void 0?n:(t={value:e,source:t,stack:ln(t)},wd.set(e,t),t)}return{value:e,source:t,stack:ln(t)}}var tl=[],nl=0,ri=null,Il=0,$t=[],Jt=0,Qn=null,fn=1,hn="";function En(e,t){tl[nl++]=Il,tl[nl++]=ri,ri=e,Il=t}function Od(e,t,n){$t[Jt++]=fn,$t[Jt++]=hn,$t[Jt++]=Qn,Qn=e;var a=fn;e=hn;var o=32-zt(a)-1;a&=~(1<<o),n+=1;var u=32-zt(t)+o;if(30<u){var h=o-o%5;u=(a&(1<<h)-1).toString(32),a>>=h,o-=h,fn=1<<32-zt(t)+o|n<<o|a,hn=u+e}else fn=1<<u|n<<o|a,hn=e}function Wr(e){e.return!==null&&(En(e,1),Od(e,1,0))}function Pr(e){for(;e===ri;)ri=tl[--nl],tl[nl]=null,Il=tl[--nl],tl[nl]=null;for(;e===Qn;)Qn=$t[--Jt],$t[Jt]=null,hn=$t[--Jt],$t[Jt]=null,fn=$t[--Jt],$t[Jt]=null}function zd(e,t){$t[Jt++]=fn,$t[Jt++]=hn,$t[Jt++]=Qn,fn=t.id,hn=t.overflow,Qn=e}var dt=null,Ke=null,Re=!1,Kn=null,Ft=!1,eo=Error(c(519));function Zn(e){var t=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw $l(It(t,e)),eo}function Dd(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[ut]=e,t[St]=a,n){case"dialog":Ce("cancel",t),Ce("close",t);break;case"iframe":case"object":case"embed":Ce("load",t);break;case"video":case"audio":for(n=0;n<ys.length;n++)Ce(ys[n],t);break;case"source":Ce("error",t);break;case"img":case"image":case"link":Ce("error",t),Ce("load",t);break;case"details":Ce("toggle",t);break;case"input":Ce("invalid",t),Ku(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Ce("invalid",t);break;case"textarea":Ce("invalid",t),Iu(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||Fh(t.textContent,n)?(a.popover!=null&&(Ce("beforetoggle",t),Ce("toggle",t)),a.onScroll!=null&&Ce("scroll",t),a.onScrollEnd!=null&&Ce("scrollend",t),a.onClick!=null&&(t.onclick=Sn),t=!0):t=!1,t||Zn(e,!0)}function kd(e){for(dt=e.return;dt;)switch(dt.tag){case 5:case 31:case 13:Ft=!1;return;case 27:case 3:Ft=!0;return;default:dt=dt.return}}function al(e){if(e!==dt)return!1;if(!Re)return kd(e),Re=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||xc(e.type,e.memoizedProps)),n=!n),n&&Ke&&Zn(e),kd(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Ke=im(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Ke=im(e)}else t===27?(t=Ke,ra(e.type)?(e=bc,bc=null,Ke=e):Ke=t):Ke=dt?Pt(e.stateNode.nextSibling):null;return!0}function ja(){Ke=dt=null,Re=!1}function to(){var e=Kn;return e!==null&&(jt===null?jt=e:jt.push.apply(jt,e),Kn=null),e}function $l(e){Kn===null?Kn=[e]:Kn.push(e)}var no=C(null),Ca=null,bn=null;function In(e,t,n){F(no,t._currentValue),t._currentValue=n}function jn(e){e._currentValue=no.current,G(no)}function ao(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 lo(e,t,n,a){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var u=o.dependencies;if(u!==null){var h=o.child;u=u.firstContext;e:for(;u!==null;){var v=u;u=o;for(var b=0;b<t.length;b++)if(v.context===t[b]){u.lanes|=n,v=u.alternate,v!==null&&(v.lanes|=n),ao(u.return,n,e),a||(h=null);break e}u=v.next}}else if(o.tag===18){if(h=o.return,h===null)throw Error(c(341));h.lanes|=n,u=h.alternate,u!==null&&(u.lanes|=n),ao(h,n,e),h=null}else h=o.child;if(h!==null)h.return=o;else for(h=o;h!==null;){if(h===e){h=null;break}if(o=h.sibling,o!==null){o.return=h.return,h=o;break}h=h.return}o=h}}function ll(e,t,n,a){e=null;for(var o=t,u=!1;o!==null;){if(!u){if((o.flags&524288)!==0)u=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var h=o.alternate;if(h===null)throw Error(c(387));if(h=h.memoizedProps,h!==null){var v=o.type;Dt(o.pendingProps.value,h.value)||(e!==null?e.push(v):e=[v])}}else if(o===be.current){if(h=o.alternate,h===null)throw Error(c(387));h.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(_s):e=[_s])}o=o.return}e!==null&&lo(t,e,n,a),t.flags|=262144}function oi(e){for(e=e.firstContext;e!==null;){if(!Dt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Aa(e){Ca=e,bn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ft(e){return Md(Ca,e)}function ci(e,t){return Ca===null&&Aa(e),Md(e,t)}function Md(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},bn===null){if(e===null)throw Error(c(308));bn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else bn=bn.next=t;return n}var zy=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()})}},Dy=s.unstable_scheduleCallback,ky=s.unstable_NormalPriority,tt={$$typeof:I,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function so(){return{controller:new zy,data:new Map,refCount:0}}function Jl(e){e.refCount--,e.refCount===0&&Dy(ky,function(){e.controller.abort()})}var Fl=null,io=0,sl=0,il=null;function My(e,t){if(Fl===null){var n=Fl=[];io=0,sl=uc(),il={status:"pending",value:void 0,then:function(a){n.push(a)}}}return io++,t.then(Ud,Ud),t}function Ud(){if(--io===0&&Fl!==null){il!==null&&(il.status="fulfilled");var e=Fl;Fl=null,sl=0,il=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Uy(e,t){var n=[],a={status:"pending",value:null,reason:null,then:function(o){n.push(o)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var o=0;o<n.length;o++)(0,n[o])(t)},function(o){for(a.status="rejected",a.reason=o,o=0;o<n.length;o++)(0,n[o])(void 0)}),a}var Bd=U.S;U.S=function(e,t){Th=wt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&My(e,t),Bd!==null&&Bd(e,t)};var Na=C(null);function ro(){var e=Na.current;return e!==null?e:Ve.pooledCache}function ui(e,t){t===null?F(Na,Na.current):F(Na,t.pool)}function Ld(){var e=ro();return e===null?null:{parent:tt._currentValue,pool:e}}var rl=Error(c(460)),oo=Error(c(474)),di=Error(c(542)),fi={then:function(){}};function Hd(e){return e=e.status,e==="fulfilled"||e==="rejected"}function qd(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Sn,Sn),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Yd(e),e;default:if(typeof t.status=="string")t.then(Sn,Sn);else{if(e=Ve,e!==null&&100<e.shellSuspendCounter)throw Error(c(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=a}},function(a){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Yd(e),e}throw wa=t,rl}}function Ra(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(wa=n,rl):n}}var wa=null;function Gd(){if(wa===null)throw Error(c(459));var e=wa;return wa=null,e}function Yd(e){if(e===rl||e===di)throw Error(c(483))}var ol=null,Wl=0;function hi(e){var t=Wl;return Wl+=1,ol===null&&(ol=[]),qd(ol,e,t)}function Pl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function mi(e,t){throw t.$$typeof===j?Error(c(525)):(e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Vd(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 o(R,A){return R=_n(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 v(R,A,z,q){return A===null||A.tag!==6?(A=Jr(z,R.mode,q),A.return=R,A):(A=o(A,z),A.return=R,A)}function b(R,A,z,q){var ie=z.type;return ie===w?L(R,A,z.props.children,q,z.key):A!==null&&(A.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===$&&Ra(ie)===A.type)?(A=o(A,z.props),Pl(A,z),A.return=R,A):(A=ii(z.type,z.key,z.props,null,R.mode,q),Pl(A,z),A.return=R,A)}function D(R,A,z,q){return A===null||A.tag!==4||A.stateNode.containerInfo!==z.containerInfo||A.stateNode.implementation!==z.implementation?(A=Fr(z,R.mode,q),A.return=R,A):(A=o(A,z.children||[]),A.return=R,A)}function L(R,A,z,q,ie){return A===null||A.tag!==7?(A=ba(z,R.mode,q,ie),A.return=R,A):(A=o(A,z),A.return=R,A)}function Y(R,A,z){if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return A=Jr(""+A,R.mode,z),A.return=R,A;if(typeof A=="object"&&A!==null){switch(A.$$typeof){case _:return z=ii(A.type,A.key,A.props,null,R.mode,z),Pl(z,A),z.return=R,z;case N:return A=Fr(A,R.mode,z),A.return=R,A;case $:return A=Ra(A),Y(R,A,z)}if(Oe(A)||De(A))return A=ba(A,R.mode,z,null),A.return=R,A;if(typeof A.then=="function")return Y(R,hi(A),z);if(A.$$typeof===I)return Y(R,ci(R,A),z);mi(R,A)}return null}function k(R,A,z,q){var ie=A!==null?A.key:null;if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return ie!==null?null:v(R,A,""+z,q);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case _:return z.key===ie?b(R,A,z,q):null;case N:return z.key===ie?D(R,A,z,q):null;case $:return z=Ra(z),k(R,A,z,q)}if(Oe(z)||De(z))return ie!==null?null:L(R,A,z,q,null);if(typeof z.then=="function")return k(R,A,hi(z),q);if(z.$$typeof===I)return k(R,A,ci(R,z),q);mi(R,z)}return null}function M(R,A,z,q,ie){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return R=R.get(z)||null,v(A,R,""+q,ie);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case _:return R=R.get(q.key===null?z:q.key)||null,b(A,R,q,ie);case N:return R=R.get(q.key===null?z:q.key)||null,D(A,R,q,ie);case $:return q=Ra(q),M(R,A,z,q,ie)}if(Oe(q)||De(q))return R=R.get(z)||null,L(A,R,q,ie,null);if(typeof q.then=="function")return M(R,A,z,hi(q),ie);if(q.$$typeof===I)return M(R,A,z,ci(A,q),ie);mi(A,q)}return null}function ne(R,A,z,q){for(var ie=null,Me=null,le=A,Te=A=0,Ne=null;le!==null&&Te<z.length;Te++){le.index>Te?(Ne=le,le=null):Ne=le.sibling;var Ue=k(R,le,z[Te],q);if(Ue===null){le===null&&(le=Ne);break}e&&le&&Ue.alternate===null&&t(R,le),A=u(Ue,A,Te),Me===null?ie=Ue:Me.sibling=Ue,Me=Ue,le=Ne}if(Te===z.length)return n(R,le),Re&&En(R,Te),ie;if(le===null){for(;Te<z.length;Te++)le=Y(R,z[Te],q),le!==null&&(A=u(le,A,Te),Me===null?ie=le:Me.sibling=le,Me=le);return Re&&En(R,Te),ie}for(le=a(le);Te<z.length;Te++)Ne=M(le,R,Te,z[Te],q),Ne!==null&&(e&&Ne.alternate!==null&&le.delete(Ne.key===null?Te:Ne.key),A=u(Ne,A,Te),Me===null?ie=Ne:Me.sibling=Ne,Me=Ne);return e&&le.forEach(function(fa){return t(R,fa)}),Re&&En(R,Te),ie}function oe(R,A,z,q){if(z==null)throw Error(c(151));for(var ie=null,Me=null,le=A,Te=A=0,Ne=null,Ue=z.next();le!==null&&!Ue.done;Te++,Ue=z.next()){le.index>Te?(Ne=le,le=null):Ne=le.sibling;var fa=k(R,le,Ue.value,q);if(fa===null){le===null&&(le=Ne);break}e&&le&&fa.alternate===null&&t(R,le),A=u(fa,A,Te),Me===null?ie=fa:Me.sibling=fa,Me=fa,le=Ne}if(Ue.done)return n(R,le),Re&&En(R,Te),ie;if(le===null){for(;!Ue.done;Te++,Ue=z.next())Ue=Y(R,Ue.value,q),Ue!==null&&(A=u(Ue,A,Te),Me===null?ie=Ue:Me.sibling=Ue,Me=Ue);return Re&&En(R,Te),ie}for(le=a(le);!Ue.done;Te++,Ue=z.next())Ue=M(le,R,Te,Ue.value,q),Ue!==null&&(e&&Ue.alternate!==null&&le.delete(Ue.key===null?Te:Ue.key),A=u(Ue,A,Te),Me===null?ie=Ue:Me.sibling=Ue,Me=Ue);return e&&le.forEach(function(Zv){return t(R,Zv)}),Re&&En(R,Te),ie}function Ye(R,A,z,q){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:{for(var ie=z.key;A!==null;){if(A.key===ie){if(ie=z.type,ie===w){if(A.tag===7){n(R,A.sibling),q=o(A,z.props.children),q.return=R,R=q;break e}}else if(A.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===$&&Ra(ie)===A.type){n(R,A.sibling),q=o(A,z.props),Pl(q,z),q.return=R,R=q;break e}n(R,A);break}else t(R,A);A=A.sibling}z.type===w?(q=ba(z.props.children,R.mode,q,z.key),q.return=R,R=q):(q=ii(z.type,z.key,z.props,null,R.mode,q),Pl(q,z),q.return=R,R=q)}return h(R);case N:e:{for(ie=z.key;A!==null;){if(A.key===ie)if(A.tag===4&&A.stateNode.containerInfo===z.containerInfo&&A.stateNode.implementation===z.implementation){n(R,A.sibling),q=o(A,z.children||[]),q.return=R,R=q;break e}else{n(R,A);break}else t(R,A);A=A.sibling}q=Fr(z,R.mode,q),q.return=R,R=q}return h(R);case $:return z=Ra(z),Ye(R,A,z,q)}if(Oe(z))return ne(R,A,z,q);if(De(z)){if(ie=De(z),typeof ie!="function")throw Error(c(150));return z=ie.call(z),oe(R,A,z,q)}if(typeof z.then=="function")return Ye(R,A,hi(z),q);if(z.$$typeof===I)return Ye(R,A,ci(R,z),q);mi(R,z)}return typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint"?(z=""+z,A!==null&&A.tag===6?(n(R,A.sibling),q=o(A,z),q.return=R,R=q):(n(R,A),q=Jr(z,R.mode,q),q.return=R,R=q),h(R)):n(R,A)}return function(R,A,z,q){try{Wl=0;var ie=Ye(R,A,z,q);return ol=null,ie}catch(le){if(le===rl||le===di)throw le;var Me=kt(29,le,null,R.mode);return Me.lanes=q,Me.return=R,Me}}}var Oa=Vd(!0),Xd=Vd(!1),$n=!1;function co(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function uo(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 Jn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Fn(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Be&2)!==0){var o=a.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),a.pending=t,t=si(e),Ad(e,null,n),t}return li(e,a,t,n),si(e)}function es(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,Mu(e,n)}}function fo(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var o=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?o=u=h:u=u.next=h,n=n.next}while(n!==null);u===null?o=u=t:u=u.next=t}else o=u=t;n={baseState:a.baseState,firstBaseUpdate:o,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 ho=!1;function ts(){if(ho){var e=il;if(e!==null)throw e}}function ns(e,t,n,a){ho=!1;var o=e.updateQueue;$n=!1;var u=o.firstBaseUpdate,h=o.lastBaseUpdate,v=o.shared.pending;if(v!==null){o.shared.pending=null;var b=v,D=b.next;b.next=null,h===null?u=D:h.next=D,h=b;var L=e.alternate;L!==null&&(L=L.updateQueue,v=L.lastBaseUpdate,v!==h&&(v===null?L.firstBaseUpdate=D:v.next=D,L.lastBaseUpdate=b))}if(u!==null){var Y=o.baseState;h=0,L=D=b=null,v=u;do{var k=v.lane&-536870913,M=k!==v.lane;if(M?(Ae&k)===k:(a&k)===k){k!==0&&k===sl&&(ho=!0),L!==null&&(L=L.next={lane:0,tag:v.tag,payload:v.payload,callback:null,next:null});e:{var ne=e,oe=v;k=t;var Ye=n;switch(oe.tag){case 1:if(ne=oe.payload,typeof ne=="function"){Y=ne.call(Ye,Y,k);break e}Y=ne;break e;case 3:ne.flags=ne.flags&-65537|128;case 0:if(ne=oe.payload,k=typeof ne=="function"?ne.call(Ye,Y,k):ne,k==null)break e;Y=T({},Y,k);break e;case 2:$n=!0}}k=v.callback,k!==null&&(e.flags|=64,M&&(e.flags|=8192),M=o.callbacks,M===null?o.callbacks=[k]:M.push(k))}else M={lane:k,tag:v.tag,payload:v.payload,callback:v.callback,next:null},L===null?(D=L=M,b=Y):L=L.next=M,h|=k;if(v=v.next,v===null){if(v=o.shared.pending,v===null)break;M=v,v=M.next,M.next=null,o.lastBaseUpdate=M,o.shared.pending=null}}while(!0);L===null&&(b=Y),o.baseState=b,o.firstBaseUpdate=D,o.lastBaseUpdate=L,u===null&&(o.shared.lanes=0),na|=h,e.lanes=h,e.memoizedState=Y}}function Qd(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function Kd(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Qd(n[e],t)}var cl=C(null),pi=C(0);function Zd(e,t){e=kn,F(pi,e),F(cl,t),kn=e|t.baseLanes}function mo(){F(pi,kn),F(cl,cl.current)}function po(){kn=pi.current,G(cl),G(pi)}var Mt=C(null),Wt=null;function Wn(e){var t=e.alternate;F(Pe,Pe.current&1),F(Mt,e),Wt===null&&(t===null||cl.current!==null||t.memoizedState!==null)&&(Wt=e)}function go(e){F(Pe,Pe.current),F(Mt,e),Wt===null&&(Wt=e)}function Id(e){e.tag===22?(F(Pe,Pe.current),F(Mt,e),Wt===null&&(Wt=e)):Pn()}function Pn(){F(Pe,Pe.current),F(Mt,Mt.current)}function Ut(e){G(Mt),Wt===e&&(Wt=null),G(Pe)}var Pe=C(0);function gi(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||_c(n)||Ec(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 Cn=0,xe=null,qe=null,nt=null,yi=!1,ul=!1,za=!1,vi=0,as=0,dl=null,By=0;function Je(){throw Error(c(321))}function yo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Dt(e[n],t[n]))return!1;return!0}function vo(e,t,n,a,o,u){return Cn=u,xe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,U.H=e===null||e.memoizedState===null?zf:Do,za=!1,u=n(a,o),za=!1,ul&&(u=Jd(t,n,a,o)),$d(e),u}function $d(e){U.H=is;var t=qe!==null&&qe.next!==null;if(Cn=0,nt=qe=xe=null,yi=!1,as=0,dl=null,t)throw Error(c(300));e===null||at||(e=e.dependencies,e!==null&&oi(e)&&(at=!0))}function Jd(e,t,n,a){xe=e;var o=0;do{if(ul&&(dl=null),as=0,ul=!1,25<=o)throw Error(c(301));if(o+=1,nt=qe=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}U.H=Df,u=t(n,a)}while(ul);return u}function Ly(){var e=U.H,t=e.useState()[0];return t=typeof t.then=="function"?ls(t):t,e=e.useState()[0],(qe!==null?qe.memoizedState:null)!==e&&(xe.flags|=1024),t}function xo(){var e=vi!==0;return vi=0,e}function So(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function To(e){if(yi){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}yi=!1}Cn=0,nt=qe=xe=null,ul=!1,as=vi=0,dl=null}function vt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return nt===null?xe.memoizedState=nt=e:nt=nt.next=e,nt}function et(){if(qe===null){var e=xe.alternate;e=e!==null?e.memoizedState:null}else e=qe.next;var t=nt===null?xe.memoizedState:nt.next;if(t!==null)nt=t,qe=e;else{if(e===null)throw xe.alternate===null?Error(c(467)):Error(c(310));qe=e,e={memoizedState:qe.memoizedState,baseState:qe.baseState,baseQueue:qe.baseQueue,queue:qe.queue,next:null},nt===null?xe.memoizedState=nt=e:nt=nt.next=e}return nt}function xi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ls(e){var t=as;return as+=1,dl===null&&(dl=[]),e=qd(dl,e,t),t=xe,(nt===null?t.memoizedState:nt.next)===null&&(t=t.alternate,U.H=t===null||t.memoizedState===null?zf:Do),e}function Si(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ls(e);if(e.$$typeof===I)return ft(e)}throw Error(c(438,String(e)))}function _o(e){var t=null,n=xe.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=xe.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=xi(),xe.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]=P;return t.index++,n}function An(e,t){return typeof t=="function"?t(e):t}function Ti(e){var t=et();return Eo(t,qe,e)}function Eo(e,t,n){var a=e.queue;if(a===null)throw Error(c(311));a.lastRenderedReducer=n;var o=e.baseQueue,u=a.pending;if(u!==null){if(o!==null){var h=o.next;o.next=u.next,u.next=h}t.baseQueue=o=u,a.pending=null}if(u=e.baseState,o===null)e.memoizedState=u;else{t=o.next;var v=h=null,b=null,D=t,L=!1;do{var Y=D.lane&-536870913;if(Y!==D.lane?(Ae&Y)===Y:(Cn&Y)===Y){var k=D.revertLane;if(k===0)b!==null&&(b=b.next={lane:0,revertLane:0,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),Y===sl&&(L=!0);else if((Cn&k)===k){D=D.next,k===sl&&(L=!0);continue}else Y={lane:0,revertLane:D.revertLane,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},b===null?(v=b=Y,h=u):b=b.next=Y,xe.lanes|=k,na|=k;Y=D.action,za&&n(u,Y),u=D.hasEagerState?D.eagerState:n(u,Y)}else k={lane:Y,revertLane:D.revertLane,gesture:D.gesture,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},b===null?(v=b=k,h=u):b=b.next=k,xe.lanes|=Y,na|=Y;D=D.next}while(D!==null&&D!==t);if(b===null?h=u:b.next=v,!Dt(u,e.memoizedState)&&(at=!0,L&&(n=il,n!==null)))throw n;e.memoizedState=u,e.baseState=h,e.baseQueue=b,a.lastRenderedState=u}return o===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function bo(e){var t=et(),n=t.queue;if(n===null)throw Error(c(311));n.lastRenderedReducer=e;var a=n.dispatch,o=n.pending,u=t.memoizedState;if(o!==null){n.pending=null;var h=o=o.next;do u=e(u,h.action),h=h.next;while(h!==o);Dt(u,t.memoizedState)||(at=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),n.lastRenderedState=u}return[u,a]}function Fd(e,t,n){var a=xe,o=et(),u=Re;if(u){if(n===void 0)throw Error(c(407));n=n()}else n=t();var h=!Dt((qe||o).memoizedState,n);if(h&&(o.memoizedState=n,at=!0),o=o.queue,Ao(ef.bind(null,a,o,e),[e]),o.getSnapshot!==t||h||nt!==null&&nt.memoizedState.tag&1){if(a.flags|=2048,fl(9,{destroy:void 0},Pd.bind(null,a,o,n,t),null),Ve===null)throw Error(c(349));u||(Cn&127)!==0||Wd(a,t,n)}return n}function Wd(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=xe.updateQueue,t===null?(t=xi(),xe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Pd(e,t,n,a){t.value=n,t.getSnapshot=a,tf(t)&&nf(e)}function ef(e,t,n){return n(function(){tf(t)&&nf(e)})}function tf(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Dt(e,n)}catch{return!0}}function nf(e){var t=Ea(e,2);t!==null&&Ct(t,e,2)}function jo(e){var t=vt();if(typeof e=="function"){var n=e;if(e=n(),za){Yn(!0);try{n()}finally{Yn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:An,lastRenderedState:e},t}function af(e,t,n,a){return e.baseState=n,Eo(e,qe,typeof a=="function"?a:An)}function Hy(e,t,n,a,o){if(bi(e))throw Error(c(485));if(e=t.action,e!==null){var u={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(h){u.listeners.push(h)}};U.T!==null?n(!0):u.isTransition=!1,a(u),n=t.pending,n===null?(u.next=t.pending=u,lf(t,u)):(u.next=n.next,t.pending=n.next=u)}}function lf(e,t){var n=t.action,a=t.payload,o=e.state;if(t.isTransition){var u=U.T,h={};U.T=h;try{var v=n(o,a),b=U.S;b!==null&&b(h,v),sf(e,t,v)}catch(D){Co(e,t,D)}finally{u!==null&&h.types!==null&&(u.types=h.types),U.T=u}}else try{u=n(o,a),sf(e,t,u)}catch(D){Co(e,t,D)}}function sf(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){rf(e,t,a)},function(a){return Co(e,t,a)}):rf(e,t,n)}function rf(e,t,n){t.status="fulfilled",t.value=n,of(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,lf(e,n)))}function Co(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,of(t),t=t.next;while(t!==a)}e.action=null}function of(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function cf(e,t){return t}function uf(e,t){if(Re){var n=Ve.formState;if(n!==null){e:{var a=xe;if(Re){if(Ke){t:{for(var o=Ke,u=Ft;o.nodeType!==8;){if(!u){o=null;break t}if(o=Pt(o.nextSibling),o===null){o=null;break t}}u=o.data,o=u==="F!"||u==="F"?o:null}if(o){Ke=Pt(o.nextSibling),a=o.data==="F!";break e}}Zn(a)}a=!1}a&&(t=n[0])}}return n=vt(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:cf,lastRenderedState:t},n.queue=a,n=Rf.bind(null,xe,a),a.dispatch=n,a=jo(!1),u=zo.bind(null,xe,!1,a.queue),a=vt(),o={state:t,dispatch:null,action:e,pending:null},a.queue=o,n=Hy.bind(null,xe,o,u,n),o.dispatch=n,a.memoizedState=e,[t,n,!1]}function df(e){var t=et();return ff(t,qe,e)}function ff(e,t,n){if(t=Eo(e,t,cf)[0],e=Ti(An)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=ls(t)}catch(h){throw h===rl?di:h}else a=t;t=et();var o=t.queue,u=o.dispatch;return n!==t.memoizedState&&(xe.flags|=2048,fl(9,{destroy:void 0},qy.bind(null,o,n),null)),[a,u,e]}function qy(e,t){e.action=t}function hf(e){var t=et(),n=qe;if(n!==null)return ff(t,n,e);et(),t=t.memoizedState,n=et();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function fl(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=xe.updateQueue,t===null&&(t=xi(),xe.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 mf(){return et().memoizedState}function _i(e,t,n,a){var o=vt();xe.flags|=e,o.memoizedState=fl(1|t,{destroy:void 0},n,a===void 0?null:a)}function Ei(e,t,n,a){var o=et();a=a===void 0?null:a;var u=o.memoizedState.inst;qe!==null&&a!==null&&yo(a,qe.memoizedState.deps)?o.memoizedState=fl(t,u,n,a):(xe.flags|=e,o.memoizedState=fl(1|t,u,n,a))}function pf(e,t){_i(8390656,8,e,t)}function Ao(e,t){Ei(2048,8,e,t)}function Gy(e){xe.flags|=4;var t=xe.updateQueue;if(t===null)t=xi(),xe.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function gf(e){var t=et().memoizedState;return Gy({ref:t,nextImpl:e}),function(){if((Be&2)!==0)throw Error(c(440));return t.impl.apply(void 0,arguments)}}function yf(e,t){return Ei(4,2,e,t)}function vf(e,t){return Ei(4,4,e,t)}function xf(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 Sf(e,t,n){n=n!=null?n.concat([e]):null,Ei(4,4,xf.bind(null,t,e),n)}function No(){}function Tf(e,t){var n=et();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&yo(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function _f(e,t){var n=et();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&yo(t,a[1]))return a[0];if(a=e(),za){Yn(!0);try{e()}finally{Yn(!1)}}return n.memoizedState=[a,t],a}function Ro(e,t,n){return n===void 0||(Cn&1073741824)!==0&&(Ae&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Eh(),xe.lanes|=e,na|=e,n)}function Ef(e,t,n,a){return Dt(n,t)?n:cl.current!==null?(e=Ro(e,n,a),Dt(e,t)||(at=!0),e):(Cn&42)===0||(Cn&1073741824)!==0&&(Ae&261930)===0?(at=!0,e.memoizedState=n):(e=Eh(),xe.lanes|=e,na|=e,t)}function bf(e,t,n,a,o){var u=J.p;J.p=u!==0&&8>u?u:8;var h=U.T,v={};U.T=v,zo(e,!1,t,n);try{var b=o(),D=U.S;if(D!==null&&D(v,b),b!==null&&typeof b=="object"&&typeof b.then=="function"){var L=Uy(b,a);ss(e,t,L,Ht(e))}else ss(e,t,a,Ht(e))}catch(Y){ss(e,t,{then:function(){},status:"rejected",reason:Y},Ht())}finally{J.p=u,h!==null&&v.types!==null&&(h.types=v.types),U.T=h}}function Yy(){}function wo(e,t,n,a){if(e.tag!==5)throw Error(c(476));var o=jf(e).queue;bf(e,o,t,re,n===null?Yy:function(){return Cf(e),n(a)})}function jf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:re,baseState:re,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:An,lastRenderedState:re},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:An,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Cf(e){var t=jf(e);t.next===null&&(t=e.alternate.memoizedState),ss(e,t.next.queue,{},Ht())}function Oo(){return ft(_s)}function Af(){return et().memoizedState}function Nf(){return et().memoizedState}function Vy(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Ht();e=Jn(n);var a=Fn(t,e,n);a!==null&&(Ct(a,t,n),es(a,t,n)),t={cache:so()},e.payload=t;return}t=t.return}}function Xy(e,t,n){var a=Ht();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},bi(e)?wf(t,n):(n=Ir(e,t,n,a),n!==null&&(Ct(n,e,a),Of(n,t,a)))}function Rf(e,t,n){var a=Ht();ss(e,t,n,a)}function ss(e,t,n,a){var o={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(bi(e))wf(t,o);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var h=t.lastRenderedState,v=u(h,n);if(o.hasEagerState=!0,o.eagerState=v,Dt(v,h))return li(e,t,o,0),Ve===null&&ai(),!1}catch{}if(n=Ir(e,t,o,a),n!==null)return Ct(n,e,a),Of(n,t,a),!0}return!1}function zo(e,t,n,a){if(a={lane:2,revertLane:uc(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},bi(e)){if(t)throw Error(c(479))}else t=Ir(e,n,a,2),t!==null&&Ct(t,e,2)}function bi(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function wf(e,t){ul=yi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Of(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,Mu(e,n)}}var is={readContext:ft,use:Si,useCallback:Je,useContext:Je,useEffect:Je,useImperativeHandle:Je,useLayoutEffect:Je,useInsertionEffect:Je,useMemo:Je,useReducer:Je,useRef:Je,useState:Je,useDebugValue:Je,useDeferredValue:Je,useTransition:Je,useSyncExternalStore:Je,useId:Je,useHostTransitionStatus:Je,useFormState:Je,useActionState:Je,useOptimistic:Je,useMemoCache:Je,useCacheRefresh:Je};is.useEffectEvent=Je;var zf={readContext:ft,use:Si,useCallback:function(e,t){return vt().memoizedState=[e,t===void 0?null:t],e},useContext:ft,useEffect:pf,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,_i(4194308,4,xf.bind(null,t,e),n)},useLayoutEffect:function(e,t){return _i(4194308,4,e,t)},useInsertionEffect:function(e,t){_i(4,2,e,t)},useMemo:function(e,t){var n=vt();t=t===void 0?null:t;var a=e();if(za){Yn(!0);try{e()}finally{Yn(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=vt();if(n!==void 0){var o=n(t);if(za){Yn(!0);try{n(t)}finally{Yn(!1)}}}else o=t;return a.memoizedState=a.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},a.queue=e,e=e.dispatch=Xy.bind(null,xe,e),[a.memoizedState,e]},useRef:function(e){var t=vt();return e={current:e},t.memoizedState=e},useState:function(e){e=jo(e);var t=e.queue,n=Rf.bind(null,xe,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:No,useDeferredValue:function(e,t){var n=vt();return Ro(n,e,t)},useTransition:function(){var e=jo(!1);return e=bf.bind(null,xe,e.queue,!0,!1),vt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=xe,o=vt();if(Re){if(n===void 0)throw Error(c(407));n=n()}else{if(n=t(),Ve===null)throw Error(c(349));(Ae&127)!==0||Wd(a,t,n)}o.memoizedState=n;var u={value:n,getSnapshot:t};return o.queue=u,pf(ef.bind(null,a,u,e),[e]),a.flags|=2048,fl(9,{destroy:void 0},Pd.bind(null,a,u,n,t),null),n},useId:function(){var e=vt(),t=Ve.identifierPrefix;if(Re){var n=hn,a=fn;n=(a&~(1<<32-zt(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=vi++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=By++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Oo,useFormState:uf,useActionState:uf,useOptimistic:function(e){var t=vt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=zo.bind(null,xe,!0,n),n.dispatch=t,[e,t]},useMemoCache:_o,useCacheRefresh:function(){return vt().memoizedState=Vy.bind(null,xe)},useEffectEvent:function(e){var t=vt(),n={impl:e};return t.memoizedState=n,function(){if((Be&2)!==0)throw Error(c(440));return n.impl.apply(void 0,arguments)}}},Do={readContext:ft,use:Si,useCallback:Tf,useContext:ft,useEffect:Ao,useImperativeHandle:Sf,useInsertionEffect:yf,useLayoutEffect:vf,useMemo:_f,useReducer:Ti,useRef:mf,useState:function(){return Ti(An)},useDebugValue:No,useDeferredValue:function(e,t){var n=et();return Ef(n,qe.memoizedState,e,t)},useTransition:function(){var e=Ti(An)[0],t=et().memoizedState;return[typeof e=="boolean"?e:ls(e),t]},useSyncExternalStore:Fd,useId:Af,useHostTransitionStatus:Oo,useFormState:df,useActionState:df,useOptimistic:function(e,t){var n=et();return af(n,qe,e,t)},useMemoCache:_o,useCacheRefresh:Nf};Do.useEffectEvent=gf;var Df={readContext:ft,use:Si,useCallback:Tf,useContext:ft,useEffect:Ao,useImperativeHandle:Sf,useInsertionEffect:yf,useLayoutEffect:vf,useMemo:_f,useReducer:bo,useRef:mf,useState:function(){return bo(An)},useDebugValue:No,useDeferredValue:function(e,t){var n=et();return qe===null?Ro(n,e,t):Ef(n,qe.memoizedState,e,t)},useTransition:function(){var e=bo(An)[0],t=et().memoizedState;return[typeof e=="boolean"?e:ls(e),t]},useSyncExternalStore:Fd,useId:Af,useHostTransitionStatus:Oo,useFormState:hf,useActionState:hf,useOptimistic:function(e,t){var n=et();return qe!==null?af(n,qe,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:_o,useCacheRefresh:Nf};Df.useEffectEvent=gf;function ko(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:T({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Mo={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=Ht(),o=Jn(a);o.payload=t,n!=null&&(o.callback=n),t=Fn(e,o,a),t!==null&&(Ct(t,e,a),es(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=Ht(),o=Jn(a);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=Fn(e,o,a),t!==null&&(Ct(t,e,a),es(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ht(),a=Jn(n);a.tag=2,t!=null&&(a.callback=t),t=Fn(e,a,n),t!==null&&(Ct(t,e,n),es(t,e,n))}};function kf(e,t,n,a,o,u,h){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,u,h):t.prototype&&t.prototype.isPureReactComponent?!Kl(n,a)||!Kl(o,u):!0}function Mf(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&&Mo.enqueueReplaceState(t,t.state,null)}function Da(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=T({},n));for(var o in e)n[o]===void 0&&(n[o]=e[o])}return n}function Uf(e){ni(e)}function Bf(e){console.error(e)}function Lf(e){ni(e)}function ji(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Hf(e,t,n){try{var a=e.onCaughtError;a(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function Uo(e,t,n){return n=Jn(n),n.tag=3,n.payload={element:null},n.callback=function(){ji(e,t)},n}function qf(e){return e=Jn(e),e.tag=3,e}function Gf(e,t,n,a){var o=n.type.getDerivedStateFromError;if(typeof o=="function"){var u=a.value;e.payload=function(){return o(u)},e.callback=function(){Hf(t,n,a)}}var h=n.stateNode;h!==null&&typeof h.componentDidCatch=="function"&&(e.callback=function(){Hf(t,n,a),typeof o!="function"&&(aa===null?aa=new Set([this]):aa.add(this));var v=a.stack;this.componentDidCatch(a.value,{componentStack:v!==null?v:""})})}function Qy(e,t,n,a,o){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&ll(t,n,o,!0),n=Mt.current,n!==null){switch(n.tag){case 31:case 13:return Wt===null?Bi():n.alternate===null&&Fe===0&&(Fe=3),n.flags&=-257,n.flags|=65536,n.lanes=o,a===fi?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),rc(e,a,o)),!1;case 22:return n.flags|=65536,a===fi?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)),rc(e,a,o)),!1}throw Error(c(435,n.tag))}return rc(e,a,o),Bi(),!1}if(Re)return t=Mt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,a!==eo&&(e=Error(c(422),{cause:a}),$l(It(e,n)))):(a!==eo&&(t=Error(c(423),{cause:a}),$l(It(t,n))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,a=It(a,n),o=Uo(e.stateNode,a,o),fo(e,o),Fe!==4&&(Fe=2)),!1;var u=Error(c(520),{cause:a});if(u=It(u,n),ms===null?ms=[u]:ms.push(u),Fe!==4&&(Fe=2),t===null)return!0;a=It(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=o&-o,n.lanes|=e,e=Uo(n.stateNode,a,e),fo(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"&&(aa===null||!aa.has(u))))return n.flags|=65536,o&=-o,n.lanes|=o,o=qf(o),Gf(o,e,n,a),fo(n,o),!1}n=n.return}while(n!==null);return!1}var Bo=Error(c(461)),at=!1;function ht(e,t,n,a){t.child=e===null?Xd(t,null,n,a):Oa(t,e.child,n,a)}function Yf(e,t,n,a,o){n=n.render;var u=t.ref;if("ref"in a){var h={};for(var v in a)v!=="ref"&&(h[v]=a[v])}else h=a;return Aa(t),a=vo(e,t,n,h,u,o),v=xo(),e!==null&&!at?(So(e,t,o),Nn(e,t,o)):(Re&&v&&Wr(t),t.flags|=1,ht(e,t,a,o),t.child)}function Vf(e,t,n,a,o){if(e===null){var u=n.type;return typeof u=="function"&&!$r(u)&&u.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=u,Xf(e,t,u,a,o)):(e=ii(n.type,null,a,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!Qo(e,o)){var h=u.memoizedProps;if(n=n.compare,n=n!==null?n:Kl,n(h,a)&&e.ref===t.ref)return Nn(e,t,o)}return t.flags|=1,e=_n(u,a),e.ref=t.ref,e.return=t,t.child=e}function Xf(e,t,n,a,o){if(e!==null){var u=e.memoizedProps;if(Kl(u,a)&&e.ref===t.ref)if(at=!1,t.pendingProps=a=u,Qo(e,o))(e.flags&131072)!==0&&(at=!0);else return t.lanes=e.lanes,Nn(e,t,o)}return Lo(e,t,n,a,o)}function Qf(e,t,n,a){var o=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,o=0;a!==null;)o=o|a.lanes|a.childLanes,a=a.sibling;a=o&~u}else a=0,t.child=null;return Kf(e,t,u,n,a)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ui(t,u!==null?u.cachePool:null),u!==null?Zd(t,u):mo(),Id(t);else return a=t.lanes=536870912,Kf(e,t,u!==null?u.baseLanes|n:n,n,a)}else u!==null?(ui(t,u.cachePool),Zd(t,u),Pn(),t.memoizedState=null):(e!==null&&ui(t,null),mo(),Pn());return ht(e,t,o,n),t.child}function rs(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Kf(e,t,n,a,o){var u=ro();return u=u===null?null:{parent:tt._currentValue,pool:u},t.memoizedState={baseLanes:n,cachePool:u},e!==null&&ui(t,null),mo(),Id(t),e!==null&&ll(e,t,a,!0),t.childLanes=o,null}function Ci(e,t){return t=Ni({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Zf(e,t,n){return Oa(t,e.child,null,n),e=Ci(t,t.pendingProps),e.flags|=2,Ut(t),t.memoizedState=null,e}function Ky(e,t,n){var a=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Re){if(a.mode==="hidden")return e=Ci(t,a),t.lanes=536870912,rs(null,e);if(go(t),(e=Ke)?(e=sm(e,Ft),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Qn!==null?{id:fn,overflow:hn}:null,retryLane:536870912,hydrationErrors:null},n=Rd(e),n.return=t,t.child=n,dt=t,Ke=null)):e=null,e===null)throw Zn(t);return t.lanes=536870912,null}return Ci(t,a)}var u=e.memoizedState;if(u!==null){var h=u.dehydrated;if(go(t),o)if(t.flags&256)t.flags&=-257,t=Zf(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(c(558));else if(at||ll(e,t,n,!1),o=(n&e.childLanes)!==0,at||o){if(a=Ve,a!==null&&(h=Uu(a,n),h!==0&&h!==u.retryLane))throw u.retryLane=h,Ea(e,h),Ct(a,e,h),Bo;Bi(),t=Zf(e,t,n)}else e=u.treeContext,Ke=Pt(h.nextSibling),dt=t,Re=!0,Kn=null,Ft=!1,e!==null&&zd(t,e),t=Ci(t,a),t.flags|=4096;return t}return e=_n(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ai(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(c(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Lo(e,t,n,a,o){return Aa(t),n=vo(e,t,n,a,void 0,o),a=xo(),e!==null&&!at?(So(e,t,o),Nn(e,t,o)):(Re&&a&&Wr(t),t.flags|=1,ht(e,t,n,o),t.child)}function If(e,t,n,a,o,u){return Aa(t),t.updateQueue=null,n=Jd(t,a,n,o),$d(e),a=xo(),e!==null&&!at?(So(e,t,u),Nn(e,t,u)):(Re&&a&&Wr(t),t.flags|=1,ht(e,t,n,u),t.child)}function $f(e,t,n,a,o){if(Aa(t),t.stateNode===null){var u=el,h=n.contextType;typeof h=="object"&&h!==null&&(u=ft(h)),u=new n(a,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Mo,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=a,u.state=t.memoizedState,u.refs={},co(t),h=n.contextType,u.context=typeof h=="object"&&h!==null?ft(h):el,u.state=t.memoizedState,h=n.getDerivedStateFromProps,typeof h=="function"&&(ko(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&&Mo.enqueueReplaceState(u,u.state,null),ns(t,a,u,o),ts(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){u=t.stateNode;var v=t.memoizedProps,b=Da(n,v);u.props=b;var D=u.context,L=n.contextType;h=el,typeof L=="object"&&L!==null&&(h=ft(L));var Y=n.getDerivedStateFromProps;L=typeof Y=="function"||typeof u.getSnapshotBeforeUpdate=="function",v=t.pendingProps!==v,L||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(v||D!==h)&&Mf(t,u,a,h),$n=!1;var k=t.memoizedState;u.state=k,ns(t,a,u,o),ts(),D=t.memoizedState,v||k!==D||$n?(typeof Y=="function"&&(ko(t,n,Y,a),D=t.memoizedState),(b=$n||kf(t,n,b,a,k,D,h))?(L||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=b):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{u=t.stateNode,uo(e,t),h=t.memoizedProps,L=Da(n,h),u.props=L,Y=t.pendingProps,k=u.context,D=n.contextType,b=el,typeof D=="object"&&D!==null&&(b=ft(D)),v=n.getDerivedStateFromProps,(D=typeof v=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(h!==Y||k!==b)&&Mf(t,u,a,b),$n=!1,k=t.memoizedState,u.state=k,ns(t,a,u,o),ts();var M=t.memoizedState;h!==Y||k!==M||$n||e!==null&&e.dependencies!==null&&oi(e.dependencies)?(typeof v=="function"&&(ko(t,n,v,a),M=t.memoizedState),(L=$n||kf(t,n,L,a,k,M,b)||e!==null&&e.dependencies!==null&&oi(e.dependencies))?(D||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(a,M,b),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(a,M,b)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||h===e.memoizedProps&&k===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&k===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=M),u.props=a,u.state=M,u.context=b,a=L):(typeof u.componentDidUpdate!="function"||h===e.memoizedProps&&k===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&k===e.memoizedState||(t.flags|=1024),a=!1)}return u=a,Ai(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=Oa(t,e.child,null,o),t.child=Oa(t,null,n,o)):ht(e,t,n,o),t.memoizedState=u.state,e=t.child):e=Nn(e,t,o),e}function Jf(e,t,n,a){return ja(),t.flags|=256,ht(e,t,n,a),t.child}var Ho={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function qo(e){return{baseLanes:e,cachePool:Ld()}}function Go(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Lt),e}function Ff(e,t,n){var a=t.pendingProps,o=!1,u=(t.flags&128)!==0,h;if((h=u)||(h=e!==null&&e.memoizedState===null?!1:(Pe.current&2)!==0),h&&(o=!0,t.flags&=-129),h=(t.flags&32)!==0,t.flags&=-33,e===null){if(Re){if(o?Wn(t):Pn(),(e=Ke)?(e=sm(e,Ft),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Qn!==null?{id:fn,overflow:hn}:null,retryLane:536870912,hydrationErrors:null},n=Rd(e),n.return=t,t.child=n,dt=t,Ke=null)):e=null,e===null)throw Zn(t);return Ec(e)?t.lanes=32:t.lanes=536870912,null}var v=a.children;return a=a.fallback,o?(Pn(),o=t.mode,v=Ni({mode:"hidden",children:v},o),a=ba(a,o,n,null),v.return=t,a.return=t,v.sibling=a,t.child=v,a=t.child,a.memoizedState=qo(n),a.childLanes=Go(e,h,n),t.memoizedState=Ho,rs(null,a)):(Wn(t),Yo(t,v))}var b=e.memoizedState;if(b!==null&&(v=b.dehydrated,v!==null)){if(u)t.flags&256?(Wn(t),t.flags&=-257,t=Vo(e,t,n)):t.memoizedState!==null?(Pn(),t.child=e.child,t.flags|=128,t=null):(Pn(),v=a.fallback,o=t.mode,a=Ni({mode:"visible",children:a.children},o),v=ba(v,o,n,null),v.flags|=2,a.return=t,v.return=t,a.sibling=v,t.child=a,Oa(t,e.child,null,n),a=t.child,a.memoizedState=qo(n),a.childLanes=Go(e,h,n),t.memoizedState=Ho,t=rs(null,a));else if(Wn(t),Ec(v)){if(h=v.nextSibling&&v.nextSibling.dataset,h)var D=h.dgst;h=D,a=Error(c(419)),a.stack="",a.digest=h,$l({value:a,source:null,stack:null}),t=Vo(e,t,n)}else if(at||ll(e,t,n,!1),h=(n&e.childLanes)!==0,at||h){if(h=Ve,h!==null&&(a=Uu(h,n),a!==0&&a!==b.retryLane))throw b.retryLane=a,Ea(e,a),Ct(h,e,a),Bo;_c(v)||Bi(),t=Vo(e,t,n)}else _c(v)?(t.flags|=192,t.child=e.child,t=null):(e=b.treeContext,Ke=Pt(v.nextSibling),dt=t,Re=!0,Kn=null,Ft=!1,e!==null&&zd(t,e),t=Yo(t,a.children),t.flags|=4096);return t}return o?(Pn(),v=a.fallback,o=t.mode,b=e.child,D=b.sibling,a=_n(b,{mode:"hidden",children:a.children}),a.subtreeFlags=b.subtreeFlags&65011712,D!==null?v=_n(D,v):(v=ba(v,o,n,null),v.flags|=2),v.return=t,a.return=t,a.sibling=v,t.child=a,rs(null,a),a=t.child,v=e.child.memoizedState,v===null?v=qo(n):(o=v.cachePool,o!==null?(b=tt._currentValue,o=o.parent!==b?{parent:b,pool:b}:o):o=Ld(),v={baseLanes:v.baseLanes|n,cachePool:o}),a.memoizedState=v,a.childLanes=Go(e,h,n),t.memoizedState=Ho,rs(e.child,a)):(Wn(t),n=e.child,e=n.sibling,n=_n(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 Yo(e,t){return t=Ni({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ni(e,t){return e=kt(22,e,null,t),e.lanes=0,e}function Vo(e,t,n){return Oa(t,e.child,null,n),e=Yo(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Wf(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),ao(e.return,t,n)}function Xo(e,t,n,a,o,u){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:o,treeForkCount:u}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=a,h.tail=n,h.tailMode=o,h.treeForkCount=u)}function Pf(e,t,n){var a=t.pendingProps,o=a.revealOrder,u=a.tail;a=a.children;var h=Pe.current,v=(h&2)!==0;if(v?(h=h&1|2,t.flags|=128):h&=1,F(Pe,h),ht(e,t,a,n),a=Re?Il:0,!v&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Wf(e,n,t);else if(e.tag===19)Wf(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(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&gi(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Xo(t,!1,o,n,u,a);break;case"backwards":case"unstable_legacy-backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&gi(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Xo(t,!0,n,null,u,a);break;case"together":Xo(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function Nn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),na|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(ll(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(c(153));if(t.child!==null){for(e=t.child,n=_n(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=_n(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Qo(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&oi(e)))}function Zy(e,t,n){switch(t.tag){case 3:pe(t,t.stateNode.containerInfo),In(t,tt,e.memoizedState.cache),ja();break;case 27:case 5:xt(t);break;case 4:pe(t,t.stateNode.containerInfo);break;case 10:In(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,go(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(Wn(t),t.flags|=128,null):(n&t.child.childLanes)!==0?Ff(e,t,n):(Wn(t),e=Nn(e,t,n),e!==null?e.sibling:null);Wn(t);break;case 19:var o=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(ll(e,t,n,!1),a=(n&t.childLanes)!==0),o){if(a)return Pf(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),F(Pe,Pe.current),a)break;return null;case 22:return t.lanes=0,Qf(e,t,n,t.pendingProps);case 24:In(t,tt,e.memoizedState.cache)}return Nn(e,t,n)}function eh(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)at=!0;else{if(!Qo(e,n)&&(t.flags&128)===0)return at=!1,Zy(e,t,n);at=(e.flags&131072)!==0}else at=!1,Re&&(t.flags&1048576)!==0&&Od(t,Il,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=Ra(t.elementType),t.type=e,typeof e=="function")$r(e)?(a=Da(e,a),t.tag=1,t=$f(null,t,e,a,n)):(t.tag=0,t=Lo(null,t,e,a,n));else{if(e!=null){var o=e.$$typeof;if(o===Q){t.tag=11,t=Yf(null,t,e,a,n);break e}else if(o===H){t.tag=14,t=Vf(null,t,e,a,n);break e}}throw t=ke(e)||e,Error(c(306,t,""))}}return t;case 0:return Lo(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,o=Da(a,t.pendingProps),$f(e,t,a,o,n);case 3:e:{if(pe(t,t.stateNode.containerInfo),e===null)throw Error(c(387));a=t.pendingProps;var u=t.memoizedState;o=u.element,uo(e,t),ns(t,a,null,n);var h=t.memoizedState;if(a=h.cache,In(t,tt,a),a!==u.cache&&lo(t,[tt],n,!0),ts(),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=Jf(e,t,a,n);break e}else if(a!==o){o=It(Error(c(424)),t),$l(o),t=Jf(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,Ke=Pt(e.firstChild),dt=t,Re=!0,Kn=null,Ft=!0,n=Xd(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ja(),a===o){t=Nn(e,t,n);break e}ht(e,t,a,n)}t=t.child}return t;case 26:return Ai(e,t),e===null?(n=dm(t.type,null,t.pendingProps,null))?t.memoizedState=n:Re||(n=t.type,e=t.pendingProps,a=Xi(ye.current).createElement(n),a[ut]=t,a[St]=e,mt(a,n,e),ot(a),t.stateNode=a):t.memoizedState=dm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return xt(t),e===null&&Re&&(a=t.stateNode=om(t.type,t.pendingProps,ye.current),dt=t,Ft=!0,o=Ke,ra(t.type)?(bc=o,Ke=Pt(a.firstChild)):Ke=o),ht(e,t,t.pendingProps.children,n),Ai(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Re&&((o=a=Ke)&&(a=Ev(a,t.type,t.pendingProps,Ft),a!==null?(t.stateNode=a,dt=t,Ke=Pt(a.firstChild),Ft=!1,o=!0):o=!1),o||Zn(t)),xt(t),o=t.type,u=t.pendingProps,h=e!==null?e.memoizedProps:null,a=u.children,xc(o,u)?a=null:h!==null&&xc(o,h)&&(t.flags|=32),t.memoizedState!==null&&(o=vo(e,t,Ly,null,null,n),_s._currentValue=o),Ai(e,t),ht(e,t,a,n),t.child;case 6:return e===null&&Re&&((e=n=Ke)&&(n=bv(n,t.pendingProps,Ft),n!==null?(t.stateNode=n,dt=t,Ke=null,e=!0):e=!1),e||Zn(t)),null;case 13:return Ff(e,t,n);case 4:return pe(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Oa(t,null,a,n):ht(e,t,a,n),t.child;case 11:return Yf(e,t,t.type,t.pendingProps,n);case 7:return ht(e,t,t.pendingProps,n),t.child;case 8:return ht(e,t,t.pendingProps.children,n),t.child;case 12:return ht(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,In(t,t.type,a.value),ht(e,t,a.children,n),t.child;case 9:return o=t.type._context,a=t.pendingProps.children,Aa(t),o=ft(o),a=a(o),t.flags|=1,ht(e,t,a,n),t.child;case 14:return Vf(e,t,t.type,t.pendingProps,n);case 15:return Xf(e,t,t.type,t.pendingProps,n);case 19:return Pf(e,t,n);case 31:return Ky(e,t,n);case 22:return Qf(e,t,n,t.pendingProps);case 24:return Aa(t),a=ft(tt),e===null?(o=ro(),o===null&&(o=Ve,u=so(),o.pooledCache=u,u.refCount++,u!==null&&(o.pooledCacheLanes|=n),o=u),t.memoizedState={parent:a,cache:o},co(t),In(t,tt,o)):((e.lanes&n)!==0&&(uo(e,t),ns(t,null,null,n),ts()),o=e.memoizedState,u=t.memoizedState,o.parent!==a?(o={parent:a,cache:a},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),In(t,tt,a)):(a=u.cache,In(t,tt,a),a!==o.cache&&lo(t,[tt],n,!0))),ht(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(c(156,t.tag))}function Rn(e){e.flags|=4}function Ko(e,t,n,a,o){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(Ah())e.flags|=8192;else throw wa=fi,oo}else e.flags&=-16777217}function th(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!gm(t))if(Ah())e.flags|=8192;else throw wa=fi,oo}function Ri(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Du():536870912,e.lanes|=t,gl|=t)}function os(e,t){if(!Re)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 Ze(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,a=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,a|=o.subtreeFlags&65011712,a|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,a|=o.subtreeFlags,a|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=a,e.childLanes=n,t}function Iy(e,t,n){var a=t.pendingProps;switch(Pr(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ze(t),null;case 1:return Ze(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),jn(tt),me(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(al(t)?Rn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,to())),Ze(t),null;case 26:var o=t.type,u=t.memoizedState;return e===null?(Rn(t),u!==null?(Ze(t),th(t,u)):(Ze(t),Ko(t,o,null,a,n))):u?u!==e.memoizedState?(Rn(t),Ze(t),th(t,u)):(Ze(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&Rn(t),Ze(t),Ko(t,o,e,a,n)),null;case 27:if(Qe(t),n=ye.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Rn(t);else{if(!a){if(t.stateNode===null)throw Error(c(166));return Ze(t),null}e=ee.current,al(t)?Dd(t):(e=om(o,a,n),t.stateNode=e,Rn(t))}return Ze(t),null;case 5:if(Qe(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Rn(t);else{if(!a){if(t.stateNode===null)throw Error(c(166));return Ze(t),null}if(u=ee.current,al(t))Dd(t);else{var h=Xi(ye.current);switch(u){case 1:u=h.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:u=h.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":u=h.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":u=h.createElementNS("http://www.w3.org/1998/Math/MathML",o);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(o,{is:a.is}):h.createElement(o)}}u[ut]=t,u[St]=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(mt(u,o,a),o){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Rn(t)}}return Ze(t),Ko(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Rn(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(c(166));if(e=ye.current,al(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,o=dt,o!==null)switch(o.tag){case 27:case 5:a=o.memoizedProps}e[ut]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||Fh(e.nodeValue,n)),e||Zn(t,!0)}else e=Xi(e).createTextNode(a),e[ut]=t,t.stateNode=e}return Ze(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=al(t),n!==null){if(e===null){if(!a)throw Error(c(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(557));e[ut]=t}else ja(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ze(t),e=!1}else n=to(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Ut(t),t):(Ut(t),null);if((t.flags&128)!==0)throw Error(c(558))}return Ze(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=al(t),a!==null&&a.dehydrated!==null){if(e===null){if(!o)throw Error(c(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(c(317));o[ut]=t}else ja(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ze(t),o=!1}else o=to(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(Ut(t),t):(Ut(t),null)}return Ut(t),(t.flags&128)!==0?(t.lanes=n,t):(n=a!==null,e=e!==null&&e.memoizedState!==null,n&&(a=t.child,o=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(o=a.alternate.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==o&&(a.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ri(t,t.updateQueue),Ze(t),null);case 4:return me(),e===null&&mc(t.stateNode.containerInfo),Ze(t),null;case 10:return jn(t.type),Ze(t),null;case 19:if(G(Pe),a=t.memoizedState,a===null)return Ze(t),null;if(o=(t.flags&128)!==0,u=a.rendering,u===null)if(o)os(a,!1);else{if(Fe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=gi(e),u!==null){for(t.flags|=128,os(a,!1),e=u.updateQueue,t.updateQueue=e,Ri(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Nd(n,e),n=n.sibling;return F(Pe,Pe.current&1|2),Re&&En(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&wt()>ki&&(t.flags|=128,o=!0,os(a,!1),t.lanes=4194304)}else{if(!o)if(e=gi(u),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,Ri(t,e),os(a,!0),a.tail===null&&a.tailMode==="hidden"&&!u.alternate&&!Re)return Ze(t),null}else 2*wt()-a.renderingStartTime>ki&&n!==536870912&&(t.flags|=128,o=!0,os(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=wt(),e.sibling=null,n=Pe.current,F(Pe,o?n&1|2:n&1),Re&&En(t,a.treeForkCount),e):(Ze(t),null);case 22:case 23:return Ut(t),po(),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&&(Ze(t),t.subtreeFlags&6&&(t.flags|=8192)):Ze(t),n=t.updateQueue,n!==null&&Ri(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&&G(Na),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),jn(tt),Ze(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function $y(e,t){switch(Pr(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return jn(tt),me(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Qe(t),null;case 31:if(t.memoizedState!==null){if(Ut(t),t.alternate===null)throw Error(c(340));ja()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Ut(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));ja()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return G(Pe),null;case 4:return me(),null;case 10:return jn(t.type),null;case 22:case 23:return Ut(t),po(),e!==null&&G(Na),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return jn(tt),null;case 25:return null;default:return null}}function nh(e,t){switch(Pr(t),t.tag){case 3:jn(tt),me();break;case 26:case 27:case 5:Qe(t);break;case 4:me();break;case 31:t.memoizedState!==null&&Ut(t);break;case 13:Ut(t);break;case 19:G(Pe);break;case 10:jn(t.type);break;case 22:case 23:Ut(t),po(),e!==null&&G(Na);break;case 24:jn(tt)}}function cs(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var o=a.next;n=o;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!==o)}}catch(v){He(t,t.return,v)}}function ea(e,t,n){try{var a=t.updateQueue,o=a!==null?a.lastEffect:null;if(o!==null){var u=o.next;a=u;do{if((a.tag&e)===e){var h=a.inst,v=h.destroy;if(v!==void 0){h.destroy=void 0,o=t;var b=n,D=v;try{D()}catch(L){He(o,b,L)}}}a=a.next}while(a!==u)}}catch(L){He(t,t.return,L)}}function ah(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Kd(t,n)}catch(a){He(e,e.return,a)}}}function lh(e,t,n){n.props=Da(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){He(e,t,a)}}function us(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(o){He(e,t,o)}}function mn(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(o){He(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(o){He(e,t,o)}else n.current=null}function sh(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(o){He(e,e.return,o)}}function Zo(e,t,n){try{var a=e.stateNode;yv(a,e.type,n,t),a[St]=t}catch(o){He(e,e.return,o)}}function ih(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ra(e.type)||e.tag===4}function Io(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ih(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&&ra(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 $o(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=Sn));else if(a!==4&&(a===27&&ra(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for($o(e,t,n),e=e.sibling;e!==null;)$o(e,t,n),e=e.sibling}function wi(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&&ra(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(wi(e,t,n),e=e.sibling;e!==null;)wi(e,t,n),e=e.sibling}function rh(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);mt(t,a,n),t[ut]=e,t[St]=n}catch(u){He(e,e.return,u)}}var wn=!1,lt=!1,Jo=!1,oh=typeof WeakSet=="function"?WeakSet:Set,ct=null;function Jy(e,t){if(e=e.containerInfo,yc=Fi,e=xd(e),Yr(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 o=a.anchorOffset,u=a.focusNode;a=a.focusOffset;try{n.nodeType,u.nodeType}catch{n=null;break e}var h=0,v=-1,b=-1,D=0,L=0,Y=e,k=null;t:for(;;){for(var M;Y!==n||o!==0&&Y.nodeType!==3||(v=h+o),Y!==u||a!==0&&Y.nodeType!==3||(b=h+a),Y.nodeType===3&&(h+=Y.nodeValue.length),(M=Y.firstChild)!==null;)k=Y,Y=M;for(;;){if(Y===e)break t;if(k===n&&++D===o&&(v=h),k===u&&++L===a&&(b=h),(M=Y.nextSibling)!==null)break;Y=k,k=Y.parentNode}Y=M}n=v===-1||b===-1?null:{start:v,end:b}}else n=null}n=n||{start:0,end:0}}else n=null;for(vc={focusedElem:e,selectionRange:n},Fi=!1,ct=t;ct!==null;)if(t=ct,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ct=e;else for(;ct!==null;){switch(t=ct,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++)o=e[n],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,n=t,o=u.memoizedProps,u=u.memoizedState,a=n.stateNode;try{var ne=Da(n.type,o);e=a.getSnapshotBeforeUpdate(ne,u),a.__reactInternalSnapshotBeforeUpdate=e}catch(oe){He(n,n.return,oe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Tc(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Tc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(c(163))}if(e=t.sibling,e!==null){e.return=t.return,ct=e;break}ct=t.return}}function ch(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:zn(e,n),a&4&&cs(5,n);break;case 1:if(zn(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(h){He(n,n.return,h)}else{var o=Da(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(h){He(n,n.return,h)}}a&64&&ah(n),a&512&&us(n,n.return);break;case 3:if(zn(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{Kd(e,t)}catch(h){He(n,n.return,h)}}break;case 27:t===null&&a&4&&rh(n);case 26:case 5:zn(e,n),t===null&&a&4&&sh(n),a&512&&us(n,n.return);break;case 12:zn(e,n);break;case 31:zn(e,n),a&4&&fh(e,n);break;case 13:zn(e,n),a&4&&hh(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=sv.bind(null,n),jv(e,n))));break;case 22:if(a=n.memoizedState!==null||wn,!a){t=t!==null&&t.memoizedState!==null||lt,o=wn;var u=lt;wn=a,(lt=t)&&!u?Dn(e,n,(n.subtreeFlags&8772)!==0):zn(e,n),wn=o,lt=u}break;case 30:break;default:zn(e,n)}}function uh(e){var t=e.alternate;t!==null&&(e.alternate=null,uh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&jr(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 Ie=null,_t=!1;function On(e,t,n){for(n=n.child;n!==null;)dh(e,t,n),n=n.sibling}function dh(e,t,n){if(Ot&&typeof Ot.onCommitFiberUnmount=="function")try{Ot.onCommitFiberUnmount(kl,n)}catch{}switch(n.tag){case 26:lt||mn(n,t),On(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:lt||mn(n,t);var a=Ie,o=_t;ra(n.type)&&(Ie=n.stateNode,_t=!1),On(e,t,n),xs(n.stateNode),Ie=a,_t=o;break;case 5:lt||mn(n,t);case 6:if(a=Ie,o=_t,Ie=null,On(e,t,n),Ie=a,_t=o,Ie!==null)if(_t)try{(Ie.nodeType===9?Ie.body:Ie.nodeName==="HTML"?Ie.ownerDocument.body:Ie).removeChild(n.stateNode)}catch(u){He(n,t,u)}else try{Ie.removeChild(n.stateNode)}catch(u){He(n,t,u)}break;case 18:Ie!==null&&(_t?(e=Ie,am(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),bl(e)):am(Ie,n.stateNode));break;case 4:a=Ie,o=_t,Ie=n.stateNode.containerInfo,_t=!0,On(e,t,n),Ie=a,_t=o;break;case 0:case 11:case 14:case 15:ea(2,n,t),lt||ea(4,n,t),On(e,t,n);break;case 1:lt||(mn(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&lh(n,t,a)),On(e,t,n);break;case 21:On(e,t,n);break;case 22:lt=(a=lt)||n.memoizedState!==null,On(e,t,n),lt=a;break;default:On(e,t,n)}}function fh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{bl(e)}catch(n){He(t,t.return,n)}}}function hh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{bl(e)}catch(n){He(t,t.return,n)}}function Fy(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new oh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new oh),t;default:throw Error(c(435,e.tag))}}function Oi(e,t){var n=Fy(e);t.forEach(function(a){if(!n.has(a)){n.add(a);var o=iv.bind(null,e,a);a.then(o,o)}})}function Et(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var o=n[a],u=e,h=t,v=h;e:for(;v!==null;){switch(v.tag){case 27:if(ra(v.type)){Ie=v.stateNode,_t=!1;break e}break;case 5:Ie=v.stateNode,_t=!1;break e;case 3:case 4:Ie=v.stateNode.containerInfo,_t=!0;break e}v=v.return}if(Ie===null)throw Error(c(160));dh(u,h,o),Ie=null,_t=!1,u=o.alternate,u!==null&&(u.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)mh(t,e),t=t.sibling}var rn=null;function mh(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Et(t,e),bt(e),a&4&&(ea(3,e,e.return),cs(3,e),ea(5,e,e.return));break;case 1:Et(t,e),bt(e),a&512&&(lt||n===null||mn(n,n.return)),a&64&&wn&&(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 o=rn;if(Et(t,e),bt(e),a&512&&(lt||n===null||mn(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,o=o.ownerDocument||o;t:switch(a){case"title":u=o.getElementsByTagName("title")[0],(!u||u[Bl]||u[ut]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=o.createElement(a),o.head.insertBefore(u,o.querySelector("head > title"))),mt(u,a,n),u[ut]=e,ot(u),a=u;break e;case"link":var h=mm("link","href",o).get(a+(n.href||""));if(h){for(var v=0;v<h.length;v++)if(u=h[v],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(v,1);break t}}u=o.createElement(a),mt(u,a,n),o.head.appendChild(u);break;case"meta":if(h=mm("meta","content",o).get(a+(n.content||""))){for(v=0;v<h.length;v++)if(u=h[v],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(v,1);break t}}u=o.createElement(a),mt(u,a,n),o.head.appendChild(u);break;default:throw Error(c(468,a))}u[ut]=e,ot(u),a=u}e.stateNode=a}else pm(o,e.type,e.stateNode);else e.stateNode=hm(o,a,e.memoizedProps);else u!==a?(u===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):u.count--,a===null?pm(o,e.type,e.stateNode):hm(o,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Zo(e,e.memoizedProps,n.memoizedProps)}break;case 27:Et(t,e),bt(e),a&512&&(lt||n===null||mn(n,n.return)),n!==null&&a&4&&Zo(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Et(t,e),bt(e),a&512&&(lt||n===null||mn(n,n.return)),e.flags&32){o=e.stateNode;try{Za(o,"")}catch(ne){He(e,e.return,ne)}}a&4&&e.stateNode!=null&&(o=e.memoizedProps,Zo(e,o,n!==null?n.memoizedProps:o)),a&1024&&(Jo=!0);break;case 6:if(Et(t,e),bt(e),a&4){if(e.stateNode===null)throw Error(c(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(ne){He(e,e.return,ne)}}break;case 3:if(Zi=null,o=rn,rn=Qi(t.containerInfo),Et(t,e),rn=o,bt(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{bl(t.containerInfo)}catch(ne){He(e,e.return,ne)}Jo&&(Jo=!1,ph(e));break;case 4:a=rn,rn=Qi(e.stateNode.containerInfo),Et(t,e),bt(e),rn=a;break;case 12:Et(t,e),bt(e);break;case 31:Et(t,e),bt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Oi(e,a)));break;case 13:Et(t,e),bt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Di=wt()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Oi(e,a)));break;case 22:o=e.memoizedState!==null;var b=n!==null&&n.memoizedState!==null,D=wn,L=lt;if(wn=D||o,lt=L||b,Et(t,e),lt=L,wn=D,bt(e),a&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(n===null||b||wn||lt||ka(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){b=n=t;try{if(u=b.stateNode,o)h=u.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none";else{v=b.stateNode;var Y=b.memoizedProps.style,k=Y!=null&&Y.hasOwnProperty("display")?Y.display:null;v.style.display=k==null||typeof k=="boolean"?"":(""+k).trim()}}catch(ne){He(b,b.return,ne)}}}else if(t.tag===6){if(n===null){b=t;try{b.stateNode.nodeValue=o?"":b.memoizedProps}catch(ne){He(b,b.return,ne)}}}else if(t.tag===18){if(n===null){b=t;try{var M=b.stateNode;o?lm(M,!0):lm(b.stateNode,!1)}catch(ne){He(b,b.return,ne)}}}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,Oi(e,n))));break;case 19:Et(t,e),bt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Oi(e,a)));break;case 30:break;case 21:break;default:Et(t,e),bt(e)}}function bt(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(ih(a)){n=a;break}a=a.return}if(n==null)throw Error(c(160));switch(n.tag){case 27:var o=n.stateNode,u=Io(e);wi(e,u,o);break;case 5:var h=n.stateNode;n.flags&32&&(Za(h,""),n.flags&=-33);var v=Io(e);wi(e,v,h);break;case 3:case 4:var b=n.stateNode.containerInfo,D=Io(e);$o(e,D,b);break;default:throw Error(c(161))}}catch(L){He(e,e.return,L)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ph(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ph(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function zn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ch(e,t.alternate,t),t=t.sibling}function ka(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:ea(4,t,t.return),ka(t);break;case 1:mn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&lh(t,t.return,n),ka(t);break;case 27:xs(t.stateNode);case 26:case 5:mn(t,t.return),ka(t);break;case 22:t.memoizedState===null&&ka(t);break;case 30:ka(t);break;default:ka(t)}e=e.sibling}}function Dn(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,o=e,u=t,h=u.flags;switch(u.tag){case 0:case 11:case 15:Dn(o,u,n),cs(4,u);break;case 1:if(Dn(o,u,n),a=u,o=a.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(D){He(a,a.return,D)}if(a=u,o=a.updateQueue,o!==null){var v=a.stateNode;try{var b=o.shared.hiddenCallbacks;if(b!==null)for(o.shared.hiddenCallbacks=null,o=0;o<b.length;o++)Qd(b[o],v)}catch(D){He(a,a.return,D)}}n&&h&64&&ah(u),us(u,u.return);break;case 27:rh(u);case 26:case 5:Dn(o,u,n),n&&a===null&&h&4&&sh(u),us(u,u.return);break;case 12:Dn(o,u,n);break;case 31:Dn(o,u,n),n&&h&4&&fh(o,u);break;case 13:Dn(o,u,n),n&&h&4&&hh(o,u);break;case 22:u.memoizedState===null&&Dn(o,u,n),us(u,u.return);break;case 30:break;default:Dn(o,u,n)}t=t.sibling}}function Fo(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&&Jl(n))}function Wo(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Jl(e))}function on(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)gh(e,t,n,a),t=t.sibling}function gh(e,t,n,a){var o=t.flags;switch(t.tag){case 0:case 11:case 15:on(e,t,n,a),o&2048&&cs(9,t);break;case 1:on(e,t,n,a);break;case 3:on(e,t,n,a),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Jl(e)));break;case 12:if(o&2048){on(e,t,n,a),e=t.stateNode;try{var u=t.memoizedProps,h=u.id,v=u.onPostCommit;typeof v=="function"&&v(h,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(b){He(t,t.return,b)}}else on(e,t,n,a);break;case 31:on(e,t,n,a);break;case 13:on(e,t,n,a);break;case 23:break;case 22:u=t.stateNode,h=t.alternate,t.memoizedState!==null?u._visibility&2?on(e,t,n,a):ds(e,t):u._visibility&2?on(e,t,n,a):(u._visibility|=2,hl(e,t,n,a,(t.subtreeFlags&10256)!==0||!1)),o&2048&&Fo(h,t);break;case 24:on(e,t,n,a),o&2048&&Wo(t.alternate,t);break;default:on(e,t,n,a)}}function hl(e,t,n,a,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,h=t,v=n,b=a,D=h.flags;switch(h.tag){case 0:case 11:case 15:hl(u,h,v,b,o),cs(8,h);break;case 23:break;case 22:var L=h.stateNode;h.memoizedState!==null?L._visibility&2?hl(u,h,v,b,o):ds(u,h):(L._visibility|=2,hl(u,h,v,b,o)),o&&D&2048&&Fo(h.alternate,h);break;case 24:hl(u,h,v,b,o),o&&D&2048&&Wo(h.alternate,h);break;default:hl(u,h,v,b,o)}t=t.sibling}}function ds(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,a=t,o=a.flags;switch(a.tag){case 22:ds(n,a),o&2048&&Fo(a.alternate,a);break;case 24:ds(n,a),o&2048&&Wo(a.alternate,a);break;default:ds(n,a)}t=t.sibling}}var fs=8192;function ml(e,t,n){if(e.subtreeFlags&fs)for(e=e.child;e!==null;)yh(e,t,n),e=e.sibling}function yh(e,t,n){switch(e.tag){case 26:ml(e,t,n),e.flags&fs&&e.memoizedState!==null&&Bv(n,rn,e.memoizedState,e.memoizedProps);break;case 5:ml(e,t,n);break;case 3:case 4:var a=rn;rn=Qi(e.stateNode.containerInfo),ml(e,t,n),rn=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=fs,fs=16777216,ml(e,t,n),fs=a):ml(e,t,n));break;default:ml(e,t,n)}}function vh(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 hs(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];ct=a,Sh(a,e)}vh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)xh(e),e=e.sibling}function xh(e){switch(e.tag){case 0:case 11:case 15:hs(e),e.flags&2048&&ea(9,e,e.return);break;case 3:hs(e);break;case 12:hs(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,zi(e)):hs(e);break;default:hs(e)}}function zi(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];ct=a,Sh(a,e)}vh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ea(8,t,t.return),zi(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,zi(t));break;default:zi(t)}e=e.sibling}}function Sh(e,t){for(;ct!==null;){var n=ct;switch(n.tag){case 0:case 11:case 15:ea(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:Jl(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,ct=a;else e:for(n=e;ct!==null;){a=ct;var o=a.sibling,u=a.return;if(uh(a),a===n){ct=null;break e}if(o!==null){o.return=u,ct=o;break e}ct=u}}}var Wy={getCacheForType:function(e){var t=ft(tt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ft(tt).controller.signal}},Py=typeof WeakMap=="function"?WeakMap:Map,Be=0,Ve=null,je=null,Ae=0,Le=0,Bt=null,ta=!1,pl=!1,Po=!1,kn=0,Fe=0,na=0,Ma=0,ec=0,Lt=0,gl=0,ms=null,jt=null,tc=!1,Di=0,Th=0,ki=1/0,Mi=null,aa=null,rt=0,la=null,yl=null,Mn=0,nc=0,ac=null,_h=null,ps=0,lc=null;function Ht(){return(Be&2)!==0&&Ae!==0?Ae&-Ae:U.T!==null?uc():Bu()}function Eh(){if(Lt===0)if((Ae&536870912)===0||Re){var e=Vs;Vs<<=1,(Vs&3932160)===0&&(Vs=262144),Lt=e}else Lt=536870912;return e=Mt.current,e!==null&&(e.flags|=32),Lt}function Ct(e,t,n){(e===Ve&&(Le===2||Le===9)||e.cancelPendingCommit!==null)&&(vl(e,0),sa(e,Ae,Lt,!1)),Ul(e,n),((Be&2)===0||e!==Ve)&&(e===Ve&&((Be&2)===0&&(Ma|=n),Fe===4&&sa(e,Ae,Lt,!1)),pn(e))}function bh(e,t,n){if((Be&6)!==0)throw Error(c(327));var a=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Ml(e,t),o=a?nv(e,t):ic(e,t,!0),u=a;do{if(o===0){pl&&!a&&sa(e,t,0,!1);break}else{if(n=e.current.alternate,u&&!ev(n)){o=ic(e,t,!1),u=!1;continue}if(o===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 v=e;o=ms;var b=v.current.memoizedState.isDehydrated;if(b&&(vl(v,h).flags|=256),h=ic(v,h,!1),h!==2){if(Po&&!b){v.errorRecoveryDisabledLanes|=u,Ma|=u,o=4;break e}u=jt,jt=o,u!==null&&(jt===null?jt=u:jt.push.apply(jt,u))}o=h}if(u=!1,o!==2)continue}}if(o===1){vl(e,0),sa(e,t,0,!0);break}e:{switch(a=e,u=o,u){case 0:case 1:throw Error(c(345));case 4:if((t&4194048)!==t)break;case 6:sa(a,t,Lt,!ta);break e;case 2:jt=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(o=Di+300-wt(),10<o)){if(sa(a,t,Lt,!ta),Qs(a,0,!0)!==0)break e;Mn=t,a.timeoutHandle=tm(jh.bind(null,a,n,jt,Mi,tc,t,Lt,Ma,gl,ta,u,"Throttled",-0,0),o);break e}jh(a,n,jt,Mi,tc,t,Lt,Ma,gl,ta,u,null,-0,0)}}break}while(!0);pn(e)}function jh(e,t,n,a,o,u,h,v,b,D,L,Y,k,M){if(e.timeoutHandle=-1,Y=t.subtreeFlags,Y&8192||(Y&16785408)===16785408){Y={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Sn},yh(t,u,Y);var ne=(u&62914560)===u?Di-wt():(u&4194048)===u?Th-wt():0;if(ne=Lv(Y,ne),ne!==null){Mn=u,e.cancelPendingCommit=ne(Dh.bind(null,e,t,u,n,a,o,h,v,b,L,Y,null,k,M)),sa(e,u,h,!D);return}}Dh(e,t,u,n,a,o,h,v,b)}function ev(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 o=n[a],u=o.getSnapshot;o=o.value;try{if(!Dt(u(),o))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function sa(e,t,n,a){t&=~ec,t&=~Ma,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var o=t;0<o;){var u=31-zt(o),h=1<<u;a[u]=-1,o&=~h}n!==0&&ku(e,n,t)}function Ui(){return(Be&6)===0?(gs(0),!1):!0}function sc(){if(je!==null){if(Le===0)var e=je.return;else e=je,bn=Ca=null,To(e),ol=null,Wl=0,e=je;for(;e!==null;)nh(e.alternate,e),e=e.return;je=null}}function vl(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Sv(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Mn=0,sc(),Ve=e,je=n=_n(e.current,null),Ae=t,Le=0,Bt=null,ta=!1,pl=Ml(e,t),Po=!1,gl=Lt=ec=Ma=na=Fe=0,jt=ms=null,tc=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var o=31-zt(a),u=1<<o;t|=e[o],a&=~u}return kn=t,ai(),n}function Ch(e,t){xe=null,U.H=is,t===rl||t===di?(t=Gd(),Le=3):t===oo?(t=Gd(),Le=4):Le=t===Bo?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Bt=t,je===null&&(Fe=1,ji(e,It(t,e.current)))}function Ah(){var e=Mt.current;return e===null?!0:(Ae&4194048)===Ae?Wt===null:(Ae&62914560)===Ae||(Ae&536870912)!==0?e===Wt:!1}function Nh(){var e=U.H;return U.H=is,e===null?is:e}function Rh(){var e=U.A;return U.A=Wy,e}function Bi(){Fe=4,ta||(Ae&4194048)!==Ae&&Mt.current!==null||(pl=!0),(na&134217727)===0&&(Ma&134217727)===0||Ve===null||sa(Ve,Ae,Lt,!1)}function ic(e,t,n){var a=Be;Be|=2;var o=Nh(),u=Rh();(Ve!==e||Ae!==t)&&(Mi=null,vl(e,t)),t=!1;var h=Fe;e:do try{if(Le!==0&&je!==null){var v=je,b=Bt;switch(Le){case 8:sc(),h=6;break e;case 3:case 2:case 9:case 6:Mt.current===null&&(t=!0);var D=Le;if(Le=0,Bt=null,xl(e,v,b,D),n&&pl){h=0;break e}break;default:D=Le,Le=0,Bt=null,xl(e,v,b,D)}}tv(),h=Fe;break}catch(L){Ch(e,L)}while(!0);return t&&e.shellSuspendCounter++,bn=Ca=null,Be=a,U.H=o,U.A=u,je===null&&(Ve=null,Ae=0,ai()),h}function tv(){for(;je!==null;)wh(je)}function nv(e,t){var n=Be;Be|=2;var a=Nh(),o=Rh();Ve!==e||Ae!==t?(Mi=null,ki=wt()+500,vl(e,t)):pl=Ml(e,t);e:do try{if(Le!==0&&je!==null){t=je;var u=Bt;t:switch(Le){case 1:Le=0,Bt=null,xl(e,t,u,1);break;case 2:case 9:if(Hd(u)){Le=0,Bt=null,Oh(t);break}t=function(){Le!==2&&Le!==9||Ve!==e||(Le=7),pn(e)},u.then(t,t);break e;case 3:Le=7;break e;case 4:Le=5;break e;case 7:Hd(u)?(Le=0,Bt=null,Oh(t)):(Le=0,Bt=null,xl(e,t,u,7));break;case 5:var h=null;switch(je.tag){case 26:h=je.memoizedState;case 5:case 27:var v=je;if(h?gm(h):v.stateNode.complete){Le=0,Bt=null;var b=v.sibling;if(b!==null)je=b;else{var D=v.return;D!==null?(je=D,Li(D)):je=null}break t}}Le=0,Bt=null,xl(e,t,u,5);break;case 6:Le=0,Bt=null,xl(e,t,u,6);break;case 8:sc(),Fe=6;break e;default:throw Error(c(462))}}av();break}catch(L){Ch(e,L)}while(!0);return bn=Ca=null,U.H=a,U.A=o,Be=n,je!==null?0:(Ve=null,Ae=0,ai(),Fe)}function av(){for(;je!==null&&!Dl();)wh(je)}function wh(e){var t=eh(e.alternate,e,kn);e.memoizedProps=e.pendingProps,t===null?Li(e):je=t}function Oh(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=If(n,t,t.pendingProps,t.type,void 0,Ae);break;case 11:t=If(n,t,t.pendingProps,t.type.render,t.ref,Ae);break;case 5:To(t);default:nh(n,t),t=je=Nd(t,kn),t=eh(n,t,kn)}e.memoizedProps=e.pendingProps,t===null?Li(e):je=t}function xl(e,t,n,a){bn=Ca=null,To(t),ol=null,Wl=0;var o=t.return;try{if(Qy(e,o,t,n,Ae)){Fe=1,ji(e,It(n,e.current)),je=null;return}}catch(u){if(o!==null)throw je=o,u;Fe=1,ji(e,It(n,e.current)),je=null;return}t.flags&32768?(Re||a===1?e=!0:pl||(Ae&536870912)!==0?e=!1:(ta=e=!0,(a===2||a===9||a===3||a===6)&&(a=Mt.current,a!==null&&a.tag===13&&(a.flags|=16384))),zh(t,e)):Li(t)}function Li(e){var t=e;do{if((t.flags&32768)!==0){zh(t,ta);return}e=t.return;var n=Iy(t.alternate,t,kn);if(n!==null){je=n;return}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);Fe===0&&(Fe=5)}function zh(e,t){do{var n=$y(e.alternate,e);if(n!==null){n.flags&=32767,je=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){je=e;return}je=e=n}while(e!==null);Fe=6,je=null}function Dh(e,t,n,a,o,u,h,v,b){e.cancelPendingCommit=null;do Hi();while(rt!==0);if((Be&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));if(u=t.lanes|t.childLanes,u|=Zr,Ug(e,n,u,h,v,b),e===Ve&&(je=Ve=null,Ae=0),yl=t,la=e,Mn=n,nc=u,ac=o,_h=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,rv(Gs,function(){return Lh(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=U.T,U.T=null,o=J.p,J.p=2,h=Be,Be|=4;try{Jy(e,t,n)}finally{Be=h,J.p=o,U.T=a}}rt=1,kh(),Mh(),Uh()}}function kh(){if(rt===1){rt=0;var e=la,t=yl,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=U.T,U.T=null;var a=J.p;J.p=2;var o=Be;Be|=4;try{mh(t,e);var u=vc,h=xd(e.containerInfo),v=u.focusedElem,b=u.selectionRange;if(h!==v&&v&&v.ownerDocument&&vd(v.ownerDocument.documentElement,v)){if(b!==null&&Yr(v)){var D=b.start,L=b.end;if(L===void 0&&(L=D),"selectionStart"in v)v.selectionStart=D,v.selectionEnd=Math.min(L,v.value.length);else{var Y=v.ownerDocument||document,k=Y&&Y.defaultView||window;if(k.getSelection){var M=k.getSelection(),ne=v.textContent.length,oe=Math.min(b.start,ne),Ye=b.end===void 0?oe:Math.min(b.end,ne);!M.extend&&oe>Ye&&(h=Ye,Ye=oe,oe=h);var R=yd(v,oe),A=yd(v,Ye);if(R&&A&&(M.rangeCount!==1||M.anchorNode!==R.node||M.anchorOffset!==R.offset||M.focusNode!==A.node||M.focusOffset!==A.offset)){var z=Y.createRange();z.setStart(R.node,R.offset),M.removeAllRanges(),oe>Ye?(M.addRange(z),M.extend(A.node,A.offset)):(z.setEnd(A.node,A.offset),M.addRange(z))}}}}for(Y=[],M=v;M=M.parentNode;)M.nodeType===1&&Y.push({element:M,left:M.scrollLeft,top:M.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v<Y.length;v++){var q=Y[v];q.element.scrollLeft=q.left,q.element.scrollTop=q.top}}Fi=!!yc,vc=yc=null}finally{Be=o,J.p=a,U.T=n}}e.current=t,rt=2}}function Mh(){if(rt===2){rt=0;var e=la,t=yl,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=U.T,U.T=null;var a=J.p;J.p=2;var o=Be;Be|=4;try{ch(e,t.alternate,t)}finally{Be=o,J.p=a,U.T=n}}rt=3}}function Uh(){if(rt===4||rt===3){rt=0,Ag();var e=la,t=yl,n=Mn,a=_h;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?rt=5:(rt=0,yl=la=null,Bh(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(aa=null),Er(n),t=t.stateNode,Ot&&typeof Ot.onCommitFiberRoot=="function")try{Ot.onCommitFiberRoot(kl,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=U.T,o=J.p,J.p=2,U.T=null;try{for(var u=e.onRecoverableError,h=0;h<a.length;h++){var v=a[h];u(v.value,{componentStack:v.stack})}}finally{U.T=t,J.p=o}}(Mn&3)!==0&&Hi(),pn(e),o=e.pendingLanes,(n&261930)!==0&&(o&42)!==0?e===lc?ps++:(ps=0,lc=e):ps=0,gs(0)}}function Bh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Jl(t)))}function Hi(){return kh(),Mh(),Uh(),Lh()}function Lh(){if(rt!==5)return!1;var e=la,t=nc;nc=0;var n=Er(Mn),a=U.T,o=J.p;try{J.p=32>n?32:n,U.T=null,n=ac,ac=null;var u=la,h=Mn;if(rt=0,yl=la=null,Mn=0,(Be&6)!==0)throw Error(c(331));var v=Be;if(Be|=4,xh(u.current),gh(u,u.current,h,n),Be=v,gs(0,!1),Ot&&typeof Ot.onPostCommitFiberRoot=="function")try{Ot.onPostCommitFiberRoot(kl,u)}catch{}return!0}finally{J.p=o,U.T=a,Bh(e,t)}}function Hh(e,t,n){t=It(n,t),t=Uo(e.stateNode,t,2),e=Fn(e,t,2),e!==null&&(Ul(e,2),pn(e))}function He(e,t,n){if(e.tag===3)Hh(e,e,n);else for(;t!==null;){if(t.tag===3){Hh(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(aa===null||!aa.has(a))){e=It(n,e),n=qf(2),a=Fn(t,n,2),a!==null&&(Gf(n,a,t,e),Ul(a,2),pn(a));break}}t=t.return}}function rc(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new Py;var o=new Set;a.set(t,o)}else o=a.get(t),o===void 0&&(o=new Set,a.set(t,o));o.has(n)||(Po=!0,o.add(n),e=lv.bind(null,e,t,n),t.then(e,e))}function lv(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ve===e&&(Ae&n)===n&&(Fe===4||Fe===3&&(Ae&62914560)===Ae&&300>wt()-Di?(Be&2)===0&&vl(e,0):ec|=n,gl===Ae&&(gl=0)),pn(e)}function qh(e,t){t===0&&(t=Du()),e=Ea(e,t),e!==null&&(Ul(e,t),pn(e))}function sv(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qh(e,n)}function iv(e,t){var n=0;switch(e.tag){case 31:case 13:var a=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(c(314))}a!==null&&a.delete(t),qh(e,n)}function rv(e,t){return ze(e,t)}var qi=null,Sl=null,oc=!1,Gi=!1,cc=!1,ia=0;function pn(e){e!==Sl&&e.next===null&&(Sl===null?qi=Sl=e:Sl=Sl.next=e),Gi=!0,oc||(oc=!0,cv())}function gs(e,t){if(!cc&&Gi){cc=!0;do for(var n=!1,a=qi;a!==null;){if(e!==0){var o=a.pendingLanes;if(o===0)var u=0;else{var h=a.suspendedLanes,v=a.pingedLanes;u=(1<<31-zt(42|e)+1)-1,u&=o&~(h&~v),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(n=!0,Xh(a,u))}else u=Ae,u=Qs(a,a===Ve?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(u&3)===0||Ml(a,u)||(n=!0,Xh(a,u));a=a.next}while(n);cc=!1}}function ov(){Gh()}function Gh(){Gi=oc=!1;var e=0;ia!==0&&xv()&&(e=ia);for(var t=wt(),n=null,a=qi;a!==null;){var o=a.next,u=Yh(a,t);u===0?(a.next=null,n===null?qi=o:n.next=o,o===null&&(Sl=n)):(n=a,(e!==0||(u&3)!==0)&&(Gi=!0)),a=o}rt!==0&&rt!==5||gs(e),ia!==0&&(ia=0)}function Yh(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,o=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var h=31-zt(u),v=1<<h,b=o[h];b===-1?((v&n)===0||(v&a)!==0)&&(o[h]=Mg(v,t)):b<=t&&(e.expiredLanes|=v),u&=~v}if(t=Ve,n=Ae,n=Qs(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(Le===2||Le===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&dn(a),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Ml(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&dn(a),Er(n)){case 2:case 8:n=Ou;break;case 32:n=Gs;break;case 268435456:n=zu;break;default:n=Gs}return a=Vh.bind(null,e),n=ze(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&dn(a),e.callbackPriority=2,e.callbackNode=null,2}function Vh(e,t){if(rt!==0&&rt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Hi()&&e.callbackNode!==n)return null;var a=Ae;return a=Qs(e,e===Ve?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(bh(e,a,t),Yh(e,wt()),e.callbackNode!=null&&e.callbackNode===n?Vh.bind(null,e):null)}function Xh(e,t){if(Hi())return null;bh(e,t,!0)}function cv(){Tv(function(){(Be&6)!==0?ze(wu,ov):Gh()})}function uc(){if(ia===0){var e=sl;e===0&&(e=Ys,Ys<<=1,(Ys&261888)===0&&(Ys=256)),ia=e}return ia}function Qh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:$s(""+e)}function Kh(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 uv(e,t,n,a,o){if(t==="submit"&&n&&n.stateNode===o){var u=Qh((o[St]||null).action),h=a.submitter;h&&(t=(t=h[St]||null)?Qh(t.formAction):h.getAttribute("formAction"),t!==null&&(u=t,h=null));var v=new Ps("action","action",null,a,o);e.push({event:v,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(ia!==0){var b=h?Kh(o,h):new FormData(o);wo(n,{pending:!0,data:b,method:o.method,action:u},null,b)}}else typeof u=="function"&&(v.preventDefault(),b=h?Kh(o,h):new FormData(o),wo(n,{pending:!0,data:b,method:o.method,action:u},u,b))},currentTarget:o}]})}}for(var dc=0;dc<Kr.length;dc++){var fc=Kr[dc],dv=fc.toLowerCase(),fv=fc[0].toUpperCase()+fc.slice(1);sn(dv,"on"+fv)}sn(_d,"onAnimationEnd"),sn(Ed,"onAnimationIteration"),sn(bd,"onAnimationStart"),sn("dblclick","onDoubleClick"),sn("focusin","onFocus"),sn("focusout","onBlur"),sn(Ny,"onTransitionRun"),sn(Ry,"onTransitionStart"),sn(wy,"onTransitionCancel"),sn(jd,"onTransitionEnd"),Qa("onMouseEnter",["mouseout","mouseover"]),Qa("onMouseLeave",["mouseout","mouseover"]),Qa("onPointerEnter",["pointerout","pointerover"]),Qa("onPointerLeave",["pointerout","pointerover"]),xa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),xa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),xa("onBeforeInput",["compositionend","keypress","textInput","paste"]),xa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),xa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),xa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ys="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(" "),hv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ys));function Zh(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],o=a.event;a=a.listeners;e:{var u=void 0;if(t)for(var h=a.length-1;0<=h;h--){var v=a[h],b=v.instance,D=v.currentTarget;if(v=v.listener,b!==u&&o.isPropagationStopped())break e;u=v,o.currentTarget=D;try{u(o)}catch(L){ni(L)}o.currentTarget=null,u=b}else for(h=0;h<a.length;h++){if(v=a[h],b=v.instance,D=v.currentTarget,v=v.listener,b!==u&&o.isPropagationStopped())break e;u=v,o.currentTarget=D;try{u(o)}catch(L){ni(L)}o.currentTarget=null,u=b}}}}function Ce(e,t){var n=t[br];n===void 0&&(n=t[br]=new Set);var a=e+"__bubble";n.has(a)||(Ih(t,e,2,!1),n.add(a))}function hc(e,t,n){var a=0;t&&(a|=4),Ih(n,e,a,t)}var Yi="_reactListening"+Math.random().toString(36).slice(2);function mc(e){if(!e[Yi]){e[Yi]=!0,qu.forEach(function(n){n!=="selectionchange"&&(hv.has(n)||hc(n,!1,e),hc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Yi]||(t[Yi]=!0,hc("selectionchange",!1,t))}}function Ih(e,t,n,a){switch(Em(t)){case 2:var o=Gv;break;case 8:o=Yv;break;default:o=Rc}n=o.bind(null,t,n,e),o=void 0,!Dr||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),a?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function pc(e,t,n,a,o){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 v=a.stateNode.containerInfo;if(v===o)break;if(h===4)for(h=a.return;h!==null;){var b=h.tag;if((b===3||b===4)&&h.stateNode.containerInfo===o)return;h=h.return}for(;v!==null;){if(h=Ya(v),h===null)return;if(b=h.tag,b===5||b===6||b===26||b===27){a=u=h;continue e}v=v.parentNode}}a=a.return}Wu(function(){var D=u,L=Or(n),Y=[];e:{var k=Cd.get(e);if(k!==void 0){var M=Ps,ne=e;switch(e){case"keypress":if(Fs(n)===0)break e;case"keydown":case"keyup":M=iy;break;case"focusin":ne="focus",M=Br;break;case"focusout":ne="blur",M=Br;break;case"beforeblur":case"afterblur":M=Br;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":M=td;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":M=Ig;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":M=cy;break;case _d:case Ed:case bd:M=Fg;break;case jd:M=dy;break;case"scroll":case"scrollend":M=Kg;break;case"wheel":M=hy;break;case"copy":case"cut":case"paste":M=Pg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":M=ad;break;case"toggle":case"beforetoggle":M=py}var oe=(t&4)!==0,Ye=!oe&&(e==="scroll"||e==="scrollend"),R=oe?k!==null?k+"Capture":null:k;oe=[];for(var A=D,z;A!==null;){var q=A;if(z=q.stateNode,q=q.tag,q!==5&&q!==26&&q!==27||z===null||R===null||(q=Hl(A,R),q!=null&&oe.push(vs(A,q,z))),Ye)break;A=A.return}0<oe.length&&(k=new M(k,ne,null,n,L),Y.push({event:k,listeners:oe}))}}if((t&7)===0){e:{if(k=e==="mouseover"||e==="pointerover",M=e==="mouseout"||e==="pointerout",k&&n!==wr&&(ne=n.relatedTarget||n.fromElement)&&(Ya(ne)||ne[Ga]))break e;if((M||k)&&(k=L.window===L?L:(k=L.ownerDocument)?k.defaultView||k.parentWindow:window,M?(ne=n.relatedTarget||n.toElement,M=D,ne=ne?Ya(ne):null,ne!==null&&(Ye=f(ne),oe=ne.tag,ne!==Ye||oe!==5&&oe!==27&&oe!==6)&&(ne=null)):(M=null,ne=D),M!==ne)){if(oe=td,q="onMouseLeave",R="onMouseEnter",A="mouse",(e==="pointerout"||e==="pointerover")&&(oe=ad,q="onPointerLeave",R="onPointerEnter",A="pointer"),Ye=M==null?k:Ll(M),z=ne==null?k:Ll(ne),k=new oe(q,A+"leave",M,n,L),k.target=Ye,k.relatedTarget=z,q=null,Ya(L)===D&&(oe=new oe(R,A+"enter",ne,n,L),oe.target=z,oe.relatedTarget=Ye,q=oe),Ye=q,M&&ne)t:{for(oe=mv,R=M,A=ne,z=0,q=R;q;q=oe(q))z++;q=0;for(var ie=A;ie;ie=oe(ie))q++;for(;0<z-q;)R=oe(R),z--;for(;0<q-z;)A=oe(A),q--;for(;z--;){if(R===A||A!==null&&R===A.alternate){oe=R;break t}R=oe(R),A=oe(A)}oe=null}else oe=null;M!==null&&$h(Y,k,M,oe,!1),ne!==null&&Ye!==null&&$h(Y,Ye,ne,oe,!0)}}e:{if(k=D?Ll(D):window,M=k.nodeName&&k.nodeName.toLowerCase(),M==="select"||M==="input"&&k.type==="file")var Me=dd;else if(cd(k))if(fd)Me=jy;else{Me=Ey;var le=_y}else M=k.nodeName,!M||M.toLowerCase()!=="input"||k.type!=="checkbox"&&k.type!=="radio"?D&&Rr(D.elementType)&&(Me=dd):Me=by;if(Me&&(Me=Me(e,D))){ud(Y,Me,n,L);break e}le&&le(e,k,D),e==="focusout"&&D&&k.type==="number"&&D.memoizedProps.value!=null&&Nr(k,"number",k.value)}switch(le=D?Ll(D):window,e){case"focusin":(cd(le)||le.contentEditable==="true")&&(Fa=le,Vr=D,Zl=null);break;case"focusout":Zl=Vr=Fa=null;break;case"mousedown":Xr=!0;break;case"contextmenu":case"mouseup":case"dragend":Xr=!1,Sd(Y,n,L);break;case"selectionchange":if(Ay)break;case"keydown":case"keyup":Sd(Y,n,L)}var Te;if(Hr)e:{switch(e){case"compositionstart":var Ne="onCompositionStart";break e;case"compositionend":Ne="onCompositionEnd";break e;case"compositionupdate":Ne="onCompositionUpdate";break e}Ne=void 0}else Ja?rd(e,n)&&(Ne="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Ne="onCompositionStart");Ne&&(ld&&n.locale!=="ko"&&(Ja||Ne!=="onCompositionStart"?Ne==="onCompositionEnd"&&Ja&&(Te=Pu()):(Xn=L,kr="value"in Xn?Xn.value:Xn.textContent,Ja=!0)),le=Vi(D,Ne),0<le.length&&(Ne=new nd(Ne,e,null,n,L),Y.push({event:Ne,listeners:le}),Te?Ne.data=Te:(Te=od(n),Te!==null&&(Ne.data=Te)))),(Te=yy?vy(e,n):xy(e,n))&&(Ne=Vi(D,"onBeforeInput"),0<Ne.length&&(le=new nd("onBeforeInput","beforeinput",null,n,L),Y.push({event:le,listeners:Ne}),le.data=Te)),uv(Y,e,D,n,L)}Zh(Y,t)})}function vs(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Vi(e,t){for(var n=t+"Capture",a=[];e!==null;){var o=e,u=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||u===null||(o=Hl(e,n),o!=null&&a.unshift(vs(e,o,u)),o=Hl(e,t),o!=null&&a.push(vs(e,o,u))),e.tag===3)return a;e=e.return}return[]}function mv(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function $h(e,t,n,a,o){for(var u=t._reactName,h=[];n!==null&&n!==a;){var v=n,b=v.alternate,D=v.stateNode;if(v=v.tag,b!==null&&b===a)break;v!==5&&v!==26&&v!==27||D===null||(b=D,o?(D=Hl(n,u),D!=null&&h.unshift(vs(n,D,b))):o||(D=Hl(n,u),D!=null&&h.push(vs(n,D,b)))),n=n.return}h.length!==0&&e.push({event:t,listeners:h})}var pv=/\r\n?/g,gv=/\u0000|\uFFFD/g;function Jh(e){return(typeof e=="string"?e:""+e).replace(pv,`
9
- `).replace(gv,"")}function Fh(e,t){return t=Jh(t),Jh(e)===t}function Ge(e,t,n,a,o,u){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Za(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Za(e,""+a);break;case"className":Zs(e,"class",a);break;case"tabIndex":Zs(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Zs(e,n,a);break;case"style":Ju(e,a,u);break;case"data":if(t!=="object"){Zs(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=$s(""+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"&&Ge(e,t,"name",o.name,o,null),Ge(e,t,"formEncType",o.formEncType,o,null),Ge(e,t,"formMethod",o.formMethod,o,null),Ge(e,t,"formTarget",o.formTarget,o,null)):(Ge(e,t,"encType",o.encType,o,null),Ge(e,t,"method",o.method,o,null),Ge(e,t,"target",o.target,o,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=$s(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=Sn);break;case"onScroll":a!=null&&Ce("scroll",e);break;case"onScrollEnd":a!=null&&Ce("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(c(61));if(n=a.__html,n!=null){if(o.children!=null)throw Error(c(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=$s(""+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":Ce("beforetoggle",e),Ce("toggle",e),Ks(e,"popover",a);break;case"xlinkActuate":xn(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":xn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":xn(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":xn(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":xn(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":xn(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":xn(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":xn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":xn(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Ks(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=Xg.get(n)||n,Ks(e,n,a))}}function gc(e,t,n,a,o,u){switch(n){case"style":Ju(e,a,u);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(c(61));if(n=a.__html,n!=null){if(o.children!=null)throw Error(c(60));e.innerHTML=n}}break;case"children":typeof a=="string"?Za(e,a):(typeof a=="number"||typeof a=="bigint")&&Za(e,""+a);break;case"onScroll":a!=null&&Ce("scroll",e);break;case"onScrollEnd":a!=null&&Ce("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Sn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Gu.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(o=n.endsWith("Capture"),t=n.slice(2,o?n.length-7:void 0),u=e[St]||null,u=u!=null?u[n]:null,typeof u=="function"&&e.removeEventListener(t,u,o),typeof a=="function")){typeof u!="function"&&u!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,a,o);break e}n in e?e[n]=a:a===!0?e.setAttribute(n,""):Ks(e,n,a)}}}function mt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ce("error",e),Ce("load",e);var a=!1,o=!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":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:Ge(e,t,u,h,n,null)}}o&&Ge(e,t,"srcSet",n.srcSet,n,null),a&&Ge(e,t,"src",n.src,n,null);return;case"input":Ce("invalid",e);var v=u=h=o=null,b=null,D=null;for(a in n)if(n.hasOwnProperty(a)){var L=n[a];if(L!=null)switch(a){case"name":o=L;break;case"type":h=L;break;case"checked":b=L;break;case"defaultChecked":D=L;break;case"value":u=L;break;case"defaultValue":v=L;break;case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(c(137,t));break;default:Ge(e,t,a,L,n,null)}}Ku(e,u,v,b,D,h,o,!1);return;case"select":Ce("invalid",e),a=h=u=null;for(o in n)if(n.hasOwnProperty(o)&&(v=n[o],v!=null))switch(o){case"value":u=v;break;case"defaultValue":h=v;break;case"multiple":a=v;default:Ge(e,t,o,v,n,null)}t=u,n=h,e.multiple=!!a,t!=null?Ka(e,!!a,t,!1):n!=null&&Ka(e,!!a,n,!0);return;case"textarea":Ce("invalid",e),u=o=a=null;for(h in n)if(n.hasOwnProperty(h)&&(v=n[h],v!=null))switch(h){case"value":a=v;break;case"defaultValue":o=v;break;case"children":u=v;break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(c(91));break;default:Ge(e,t,h,v,n,null)}Iu(e,a,o,u);return;case"option":for(b in n)n.hasOwnProperty(b)&&(a=n[b],a!=null)&&(b==="selected"?e.selected=a&&typeof a!="function"&&typeof a!="symbol":Ge(e,t,b,a,n,null));return;case"dialog":Ce("beforetoggle",e),Ce("toggle",e),Ce("cancel",e),Ce("close",e);break;case"iframe":case"object":Ce("load",e);break;case"video":case"audio":for(a=0;a<ys.length;a++)Ce(ys[a],e);break;case"image":Ce("error",e),Ce("load",e);break;case"details":Ce("toggle",e);break;case"embed":case"source":case"link":Ce("error",e),Ce("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(c(137,t));default:Ge(e,t,D,a,n,null)}return;default:if(Rr(t)){for(L in n)n.hasOwnProperty(L)&&(a=n[L],a!==void 0&&gc(e,t,L,a,n,void 0));return}}for(v in n)n.hasOwnProperty(v)&&(a=n[v],a!=null&&Ge(e,t,v,a,n,null))}function yv(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 o=null,u=null,h=null,v=null,b=null,D=null,L=null;for(M in n){var Y=n[M];if(n.hasOwnProperty(M)&&Y!=null)switch(M){case"checked":break;case"value":break;case"defaultValue":b=Y;default:a.hasOwnProperty(M)||Ge(e,t,M,null,a,Y)}}for(var k in a){var M=a[k];if(Y=n[k],a.hasOwnProperty(k)&&(M!=null||Y!=null))switch(k){case"type":u=M;break;case"name":o=M;break;case"checked":D=M;break;case"defaultChecked":L=M;break;case"value":h=M;break;case"defaultValue":v=M;break;case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(c(137,t));break;default:M!==Y&&Ge(e,t,k,M,a,Y)}}Ar(e,h,v,b,D,L,u,o);return;case"select":M=h=v=k=null;for(u in n)if(b=n[u],n.hasOwnProperty(u)&&b!=null)switch(u){case"value":break;case"multiple":M=b;default:a.hasOwnProperty(u)||Ge(e,t,u,null,a,b)}for(o in a)if(u=a[o],b=n[o],a.hasOwnProperty(o)&&(u!=null||b!=null))switch(o){case"value":k=u;break;case"defaultValue":v=u;break;case"multiple":h=u;default:u!==b&&Ge(e,t,o,u,a,b)}t=v,n=h,a=M,k!=null?Ka(e,!!n,k,!1):!!a!=!!n&&(t!=null?Ka(e,!!n,t,!0):Ka(e,!!n,n?[]:"",!1));return;case"textarea":M=k=null;for(v in n)if(o=n[v],n.hasOwnProperty(v)&&o!=null&&!a.hasOwnProperty(v))switch(v){case"value":break;case"children":break;default:Ge(e,t,v,null,a,o)}for(h in a)if(o=a[h],u=n[h],a.hasOwnProperty(h)&&(o!=null||u!=null))switch(h){case"value":k=o;break;case"defaultValue":M=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(c(91));break;default:o!==u&&Ge(e,t,h,o,a,u)}Zu(e,k,M);return;case"option":for(var ne in n)k=n[ne],n.hasOwnProperty(ne)&&k!=null&&!a.hasOwnProperty(ne)&&(ne==="selected"?e.selected=!1:Ge(e,t,ne,null,a,k));for(b in a)k=a[b],M=n[b],a.hasOwnProperty(b)&&k!==M&&(k!=null||M!=null)&&(b==="selected"?e.selected=k&&typeof k!="function"&&typeof k!="symbol":Ge(e,t,b,k,a,M));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var oe in n)k=n[oe],n.hasOwnProperty(oe)&&k!=null&&!a.hasOwnProperty(oe)&&Ge(e,t,oe,null,a,k);for(D in a)if(k=a[D],M=n[D],a.hasOwnProperty(D)&&k!==M&&(k!=null||M!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(c(137,t));break;default:Ge(e,t,D,k,a,M)}return;default:if(Rr(t)){for(var Ye in n)k=n[Ye],n.hasOwnProperty(Ye)&&k!==void 0&&!a.hasOwnProperty(Ye)&&gc(e,t,Ye,void 0,a,k);for(L in a)k=a[L],M=n[L],!a.hasOwnProperty(L)||k===M||k===void 0&&M===void 0||gc(e,t,L,k,a,M);return}}for(var R in n)k=n[R],n.hasOwnProperty(R)&&k!=null&&!a.hasOwnProperty(R)&&Ge(e,t,R,null,a,k);for(Y in a)k=a[Y],M=n[Y],!a.hasOwnProperty(Y)||k===M||k==null&&M==null||Ge(e,t,Y,k,a,M)}function Wh(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function vv(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),a=0;a<n.length;a++){var o=n[a],u=o.transferSize,h=o.initiatorType,v=o.duration;if(u&&v&&Wh(h)){for(h=0,v=o.responseEnd,a+=1;a<n.length;a++){var b=n[a],D=b.startTime;if(D>v)break;var L=b.transferSize,Y=b.initiatorType;L&&Wh(Y)&&(b=b.responseEnd,h+=L*(b<v?1:(v-D)/(b-D)))}if(--a,t+=8*(u+h)/(o.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 yc=null,vc=null;function Xi(e){return e.nodeType===9?e:e.ownerDocument}function Ph(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 em(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 xc(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 Sc=null;function xv(){var e=window.event;return e&&e.type==="popstate"?e===Sc?!1:(Sc=e,!0):(Sc=null,!1)}var tm=typeof setTimeout=="function"?setTimeout:void 0,Sv=typeof clearTimeout=="function"?clearTimeout:void 0,nm=typeof Promise=="function"?Promise:void 0,Tv=typeof queueMicrotask=="function"?queueMicrotask:typeof nm<"u"?function(e){return nm.resolve(null).then(e).catch(_v)}:tm;function _v(e){setTimeout(function(){throw e})}function ra(e){return e==="head"}function am(e,t){var n=t,a=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"||n==="/&"){if(a===0){e.removeChild(o),bl(t);return}a--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")a++;else if(n==="html")xs(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,xs(n);for(var u=n.firstChild;u;){var h=u.nextSibling,v=u.nodeName;u[Bl]||v==="SCRIPT"||v==="STYLE"||v==="LINK"&&u.rel.toLowerCase()==="stylesheet"||n.removeChild(u),u=h}}else n==="body"&&xs(e.ownerDocument.body);n=o}while(n);bl(t)}function lm(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 Tc(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":Tc(n),jr(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Ev(e,t,n,a){for(;e.nodeType===1;){var o=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Bl])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!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=Pt(e.nextSibling),e===null)break}return null}function bv(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Pt(e.nextSibling),e===null))return null;return e}function sm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Pt(e.nextSibling),e===null))return null;return e}function _c(e){return e.data==="$?"||e.data==="$~"}function Ec(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function jv(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 Pt(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 bc=null;function im(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Pt(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function rm(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 om(e,t,n){switch(t=Xi(n),e){case"html":if(e=t.documentElement,!e)throw Error(c(452));return e;case"head":if(e=t.head,!e)throw Error(c(453));return e;case"body":if(e=t.body,!e)throw Error(c(454));return e;default:throw Error(c(451))}}function xs(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);jr(e)}var en=new Map,cm=new Set;function Qi(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Un=J.d;J.d={f:Cv,r:Av,D:Nv,C:Rv,L:wv,m:Ov,X:Dv,S:zv,M:kv};function Cv(){var e=Un.f(),t=Ui();return e||t}function Av(e){var t=Va(e);t!==null&&t.tag===5&&t.type==="form"?Cf(t):Un.r(e)}var Tl=typeof document>"u"?null:document;function um(e,t,n){var a=Tl;if(a&&typeof t=="string"&&t){var o=Kt(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof n=="string"&&(o+='[crossorigin="'+n+'"]'),cm.has(o)||(cm.add(o),e={rel:e,crossOrigin:n,href:t},a.querySelector(o)===null&&(t=a.createElement("link"),mt(t,"link",e),ot(t),a.head.appendChild(t)))}}function Nv(e){Un.D(e),um("dns-prefetch",e,null)}function Rv(e,t){Un.C(e,t),um("preconnect",e,t)}function wv(e,t,n){Un.L(e,t,n);var a=Tl;if(a&&e&&t){var o='link[rel="preload"][as="'+Kt(t)+'"]';t==="image"&&n&&n.imageSrcSet?(o+='[imagesrcset="'+Kt(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(o+='[imagesizes="'+Kt(n.imageSizes)+'"]')):o+='[href="'+Kt(e)+'"]';var u=o;switch(t){case"style":u=_l(e);break;case"script":u=El(e)}en.has(u)||(e=T({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),en.set(u,e),a.querySelector(o)!==null||t==="style"&&a.querySelector(Ss(u))||t==="script"&&a.querySelector(Ts(u))||(t=a.createElement("link"),mt(t,"link",e),ot(t),a.head.appendChild(t)))}}function Ov(e,t){Un.m(e,t);var n=Tl;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+Kt(a)+'"][href="'+Kt(e)+'"]',u=o;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=El(e)}if(!en.has(u)&&(e=T({rel:"modulepreload",href:e},t),en.set(u,e),n.querySelector(o)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Ts(u)))return}a=n.createElement("link"),mt(a,"link",e),ot(a),n.head.appendChild(a)}}}function zv(e,t,n){Un.S(e,t,n);var a=Tl;if(a&&e){var o=Xa(a).hoistableStyles,u=_l(e);t=t||"default";var h=o.get(u);if(!h){var v={loading:0,preload:null};if(h=a.querySelector(Ss(u)))v.loading=5;else{e=T({rel:"stylesheet",href:e,"data-precedence":t},n),(n=en.get(u))&&jc(e,n);var b=h=a.createElement("link");ot(b),mt(b,"link",e),b._p=new Promise(function(D,L){b.onload=D,b.onerror=L}),b.addEventListener("load",function(){v.loading|=1}),b.addEventListener("error",function(){v.loading|=2}),v.loading|=4,Ki(h,t,a)}h={type:"stylesheet",instance:h,count:1,state:v},o.set(u,h)}}}function Dv(e,t){Un.X(e,t);var n=Tl;if(n&&e){var a=Xa(n).hoistableScripts,o=El(e),u=a.get(o);u||(u=n.querySelector(Ts(o)),u||(e=T({src:e,async:!0},t),(t=en.get(o))&&Cc(e,t),u=n.createElement("script"),ot(u),mt(u,"link",e),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(o,u))}}function kv(e,t){Un.M(e,t);var n=Tl;if(n&&e){var a=Xa(n).hoistableScripts,o=El(e),u=a.get(o);u||(u=n.querySelector(Ts(o)),u||(e=T({src:e,async:!0,type:"module"},t),(t=en.get(o))&&Cc(e,t),u=n.createElement("script"),ot(u),mt(u,"link",e),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(o,u))}}function dm(e,t,n,a){var o=(o=ye.current)?Qi(o):null;if(!o)throw Error(c(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=_l(n.href),n=Xa(o).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=_l(n.href);var u=Xa(o).hoistableStyles,h=u.get(e);if(h||(o=o.ownerDocument||o,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,h),(u=o.querySelector(Ss(e)))&&!u._p&&(h.instance=u,h.state.loading=5),en.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},en.set(e,n),u||Mv(o,e,n,h.state))),t&&a===null)throw Error(c(528,""));return h}if(t&&a!==null)throw Error(c(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=El(n),n=Xa(o).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(c(444,e))}}function _l(e){return'href="'+Kt(e)+'"'}function Ss(e){return'link[rel="stylesheet"]['+e+"]"}function fm(e){return T({},e,{"data-precedence":e.precedence,precedence:null})}function Mv(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}),mt(t,"link",n),ot(t),e.head.appendChild(t))}function El(e){return'[src="'+Kt(e)+'"]'}function Ts(e){return"script[async]"+e}function hm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Kt(n.href)+'"]');if(a)return t.instance=a,ot(a),a;var o=T({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),ot(a),mt(a,"style",o),Ki(a,n.precedence,e),t.instance=a;case"stylesheet":o=_l(n.href);var u=e.querySelector(Ss(o));if(u)return t.state.loading|=4,t.instance=u,ot(u),u;a=fm(n),(o=en.get(o))&&jc(a,o),u=(e.ownerDocument||e).createElement("link"),ot(u);var h=u;return h._p=new Promise(function(v,b){h.onload=v,h.onerror=b}),mt(u,"link",a),t.state.loading|=4,Ki(u,n.precedence,e),t.instance=u;case"script":return u=El(n.src),(o=e.querySelector(Ts(u)))?(t.instance=o,ot(o),o):(a=n,(o=en.get(u))&&(a=T({},n),Cc(a,o)),e=e.ownerDocument||e,o=e.createElement("script"),ot(o),mt(o,"link",a),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(c(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Ki(a,n.precedence,e));return t.instance}function Ki(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=a.length?a[a.length-1]:null,u=o,h=0;h<a.length;h++){var v=a[h];if(v.dataset.precedence===t)u=v;else if(u!==o)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function jc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Cc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Zi=null;function mm(e,t,n){if(Zi===null){var a=new Map,o=Zi=new Map;o.set(n,a)}else o=Zi,a=o.get(n),a||(a=new Map,o.set(n,a));if(a.has(e))return a;for(a.set(e,null),n=n.getElementsByTagName(e),o=0;o<n.length;o++){var u=n[o];if(!(u[Bl]||u[ut]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var h=u.getAttribute(t)||"";h=e+h;var v=a.get(h);v?v.push(u):a.set(h,[u])}}return a}function pm(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function Uv(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 gm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Bv(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 o=_l(a.href),u=t.querySelector(Ss(o));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ii.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=u,ot(u);return}u=t.ownerDocument||t,a=fm(a),(o=en.get(o))&&jc(a,o),u=u.createElement("link"),ot(u);var h=u;h._p=new Promise(function(v,b){h.onload=v,h.onerror=b}),mt(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=Ii.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Ac=0;function Lv(e,t){return e.stylesheets&&e.count===0&&Ji(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var a=setTimeout(function(){if(e.stylesheets&&Ji(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&Ac===0&&(Ac=62500*vv());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ji(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>Ac?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(o)}}:null}function Ii(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ji(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var $i=null;function Ji(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,$i=new Map,t.forEach(Hv,e),$i=null,Ii.call(e))}function Hv(e,t){if(!(t.state.loading&4)){var n=$i.get(e);if(n)var a=n.get(null);else{n=new Map,$i.set(e,n);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<o.length;u++){var h=o[u];(h.nodeName==="LINK"||h.getAttribute("media")!=="not all")&&(n.set(h.dataset.precedence,h),a=h)}a&&n.set(null,a)}o=t.instance,h=o.getAttribute("data-precedence"),u=n.get(h)||a,u===a&&n.set(null,o),n.set(h,o),this.count++,a=Ii.bind(this),o.addEventListener("load",a),o.addEventListener("error",a),u?u.parentNode.insertBefore(o,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var _s={$$typeof:I,Provider:null,Consumer:null,_currentValue:re,_currentValue2:re,_threadCount:0};function qv(e,t,n,a,o,u,h,v,b){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=Tr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Tr(0),this.hiddenUpdates=Tr(null),this.identifierPrefix=a,this.onUncaughtError=o,this.onCaughtError=u,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=b,this.incompleteTransitions=new Map}function ym(e,t,n,a,o,u,h,v,b,D,L,Y){return e=new qv(e,t,n,h,b,D,L,Y,v),t=1,u===!0&&(t|=24),u=kt(3,null,null,t),e.current=u,u.stateNode=e,t=so(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:a,isDehydrated:n,cache:t},co(u),e}function vm(e){return e?(e=el,e):el}function xm(e,t,n,a,o,u){o=vm(o),a.context===null?a.context=o:a.pendingContext=o,a=Jn(t),a.payload={element:n},u=u===void 0?null:u,u!==null&&(a.callback=u),n=Fn(e,a,t),n!==null&&(Ct(n,e,t),es(n,e,t))}function Sm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Nc(e,t){Sm(e,t),(e=e.alternate)&&Sm(e,t)}function Tm(e){if(e.tag===13||e.tag===31){var t=Ea(e,67108864);t!==null&&Ct(t,e,67108864),Nc(e,67108864)}}function _m(e){if(e.tag===13||e.tag===31){var t=Ht();t=_r(t);var n=Ea(e,t);n!==null&&Ct(n,e,t),Nc(e,t)}}var Fi=!0;function Gv(e,t,n,a){var o=U.T;U.T=null;var u=J.p;try{J.p=2,Rc(e,t,n,a)}finally{J.p=u,U.T=o}}function Yv(e,t,n,a){var o=U.T;U.T=null;var u=J.p;try{J.p=8,Rc(e,t,n,a)}finally{J.p=u,U.T=o}}function Rc(e,t,n,a){if(Fi){var o=wc(a);if(o===null)pc(e,t,a,Wi,n),bm(e,a);else if(Xv(o,e,t,n,a))a.stopPropagation();else if(bm(e,a),t&4&&-1<Vv.indexOf(e)){for(;o!==null;){var u=Va(o);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var h=va(u.pendingLanes);if(h!==0){var v=u;for(v.pendingLanes|=2,v.entangledLanes|=2;h;){var b=1<<31-zt(h);v.entanglements[1]|=b,h&=~b}pn(u),(Be&6)===0&&(ki=wt()+500,gs(0))}}break;case 31:case 13:v=Ea(u,2),v!==null&&Ct(v,u,2),Ui(),Nc(u,2)}if(u=wc(a),u===null&&pc(e,t,a,Wi,n),u===o)break;o=u}o!==null&&a.stopPropagation()}else pc(e,t,a,null,n)}}function wc(e){return e=Or(e),Oc(e)}var Wi=null;function Oc(e){if(Wi=null,e=Ya(e),e!==null){var t=f(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=p(t),e!==null)return e;e=null}else if(n===31){if(e=x(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 Wi=e,null}function Em(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(Ng()){case wu:return 2;case Ou:return 8;case Gs:case Rg:return 32;case zu:return 268435456;default:return 32}default:return 32}}var zc=!1,oa=null,ca=null,ua=null,Es=new Map,bs=new Map,da=[],Vv="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":oa=null;break;case"dragenter":case"dragleave":ca=null;break;case"mouseover":case"mouseout":ua=null;break;case"pointerover":case"pointerout":Es.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":bs.delete(t.pointerId)}}function js(e,t,n,a,o,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:u,targetContainers:[o]},t!==null&&(t=Va(t),t!==null&&Tm(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Xv(e,t,n,a,o){switch(t){case"focusin":return oa=js(oa,e,t,n,a,o),!0;case"dragenter":return ca=js(ca,e,t,n,a,o),!0;case"mouseover":return ua=js(ua,e,t,n,a,o),!0;case"pointerover":var u=o.pointerId;return Es.set(u,js(Es.get(u)||null,e,t,n,a,o)),!0;case"gotpointercapture":return u=o.pointerId,bs.set(u,js(bs.get(u)||null,e,t,n,a,o)),!0}return!1}function jm(e){var t=Ya(e.target);if(t!==null){var n=f(t);if(n!==null){if(t=n.tag,t===13){if(t=p(n),t!==null){e.blockedOn=t,Lu(e.priority,function(){_m(n)});return}}else if(t===31){if(t=x(n),t!==null){e.blockedOn=t,Lu(e.priority,function(){_m(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 Pi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=wc(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);wr=a,n.target.dispatchEvent(a),wr=null}else return t=Va(n),t!==null&&Tm(t),e.blockedOn=n,!1;t.shift()}return!0}function Cm(e,t,n){Pi(e)&&n.delete(t)}function Qv(){zc=!1,oa!==null&&Pi(oa)&&(oa=null),ca!==null&&Pi(ca)&&(ca=null),ua!==null&&Pi(ua)&&(ua=null),Es.forEach(Cm),bs.forEach(Cm)}function er(e,t){e.blockedOn===t&&(e.blockedOn=null,zc||(zc=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,Qv)))}var tr=null;function Am(e){tr!==e&&(tr=e,s.unstable_scheduleCallback(s.unstable_NormalPriority,function(){tr===e&&(tr=null);for(var t=0;t<e.length;t+=3){var n=e[t],a=e[t+1],o=e[t+2];if(typeof a!="function"){if(Oc(a||n)===null)continue;break}var u=Va(n);u!==null&&(e.splice(t,3),t-=3,wo(u,{pending:!0,data:o,method:n.method,action:a},a,o))}}))}function bl(e){function t(b){return er(b,e)}oa!==null&&er(oa,e),ca!==null&&er(ca,e),ua!==null&&er(ua,e),Es.forEach(t),bs.forEach(t);for(var n=0;n<da.length;n++){var a=da[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<da.length&&(n=da[0],n.blockedOn===null);)jm(n),n.blockedOn===null&&da.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(a=0;a<n.length;a+=3){var o=n[a],u=n[a+1],h=o[St]||null;if(typeof u=="function")h||Am(n);else if(h){var v=null;if(u&&u.hasAttribute("formAction")){if(o=u,h=u[St]||null)v=h.formAction;else if(Oc(o)!==null)continue}else v=h.action;typeof v=="function"?n[a+1]=v:(n.splice(a,3),a-=3),Am(n)}}}function Nm(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(h){return o=h})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=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,o=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),o!==null&&(o(),o=null)}}}function Dc(e){this._internalRoot=e}nr.prototype.render=Dc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var n=t.current,a=Ht();xm(n,a,e,t,null,null)},nr.prototype.unmount=Dc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;xm(e.current,2,null,e,null,null),Ui(),t[Ga]=null}};function nr(e){this._internalRoot=e}nr.prototype.unstable_scheduleHydration=function(e){if(e){var t=Bu();e={blockedOn:null,target:e,priority:t};for(var n=0;n<da.length&&t!==0&&t<da[n].priority;n++);da.splice(n,0,e),n===0&&jm(e)}};var Rm=l.version;if(Rm!=="19.2.3")throw Error(c(527,Rm,"19.2.3"));J.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(c(188)):(e=Object.keys(e).join(","),Error(c(268,e)));return e=y(t),e=e!==null?S(e):null,e=e===null?null:e.stateNode,e};var Kv={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ar=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ar.isDisabled&&ar.supportsFiber)try{kl=ar.inject(Kv),Ot=ar}catch{}}return As.createRoot=function(e,t){if(!d(e))throw Error(c(299));var n=!1,a="",o=Uf,u=Bf,h=Lf;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(h=t.onRecoverableError)),t=ym(e,1,!1,null,null,n,a,null,o,u,h,Nm),e[Ga]=t.current,mc(e),new Dc(t)},As.hydrateRoot=function(e,t,n){if(!d(e))throw Error(c(299));var a=!1,o="",u=Uf,h=Bf,v=Lf,b=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(u=n.onUncaughtError),n.onCaughtError!==void 0&&(h=n.onCaughtError),n.onRecoverableError!==void 0&&(v=n.onRecoverableError),n.formState!==void 0&&(b=n.formState)),t=ym(e,1,!0,t,n??null,a,o,b,u,h,v,Nm),t.context=vm(null),n=t.current,a=Ht(),a=_r(a),o=Jn(a),o.callback=null,Fn(n,o,a),n=a,t.current.lanes=n,Ul(t,n),pn(t),e[Ga]=t.current,mc(e),new nr(t)},As.version="19.2.3",As}var Hm;function ax(){if(Hm)return Uc.exports;Hm=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(),Uc.exports=nx(),Uc.exports}var lx=ax();const sx=bp(lx);var qm="popstate";function ix(s={}){function l(c,d){let{pathname:f,search:p,hash:x}=c.location;return Wc("",{pathname:f,search:p,hash:x},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function i(c,d){return typeof d=="string"?d:ks(d)}return ox(l,i,null,s)}function $e(s,l){if(s===!1||s===null||typeof s>"u")throw new Error(l)}function Gt(s,l){if(!s){typeof console<"u"&&console.warn(l);try{throw new Error(l)}catch{}}}function rx(){return Math.random().toString(36).substring(2,10)}function Gm(s,l){return{usr:s.state,key:s.key,idx:l}}function Wc(s,l,i=null,c){return{pathname:typeof s=="string"?s:s.pathname,search:"",hash:"",...typeof l=="string"?Al(l):l,state:i,key:l&&l.key||c||rx()}}function ks({pathname:s="/",search:l="",hash:i=""}){return l&&l!=="?"&&(s+=l.charAt(0)==="?"?l:"?"+l),i&&i!=="#"&&(s+=i.charAt(0)==="#"?i:"#"+i),s}function Al(s){let l={};if(s){let i=s.indexOf("#");i>=0&&(l.hash=s.substring(i),s=s.substring(0,i));let c=s.indexOf("?");c>=0&&(l.search=s.substring(c),s=s.substring(0,c)),s&&(l.pathname=s)}return l}function ox(s,l,i,c={}){let{window:d=document.defaultView,v5Compat:f=!1}=c,p=d.history,x="POP",g=null,y=S();y==null&&(y=0,p.replaceState({...p.state,idx:y},""));function S(){return(p.state||{idx:null}).idx}function T(){x="POP";let O=S(),B=O==null?null:O-y;y=O,g&&g({action:x,location:w.location,delta:B})}function j(O,B){x="PUSH";let X=Wc(w.location,O,B);y=S()+1;let I=Gm(X,y),Q=w.createHref(X);try{p.pushState(I,"",Q)}catch(W){if(W instanceof DOMException&&W.name==="DataCloneError")throw W;d.location.assign(Q)}f&&g&&g({action:x,location:w.location,delta:1})}function _(O,B){x="REPLACE";let X=Wc(w.location,O,B);y=S();let I=Gm(X,y),Q=w.createHref(X);p.replaceState(I,"",Q),f&&g&&g({action:x,location:w.location,delta:0})}function N(O){return cx(O)}let w={get action(){return x},get location(){return s(d,p)},listen(O){if(g)throw new Error("A history only accepts one active listener");return d.addEventListener(qm,T),g=O,()=>{d.removeEventListener(qm,T),g=null}},createHref(O){return l(d,O)},createURL:N,encodeLocation(O){let B=N(O);return{pathname:B.pathname,search:B.search,hash:B.hash}},push:j,replace:_,go(O){return p.go(O)}};return w}function cx(s,l=!1){let i="http://localhost";typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),$e(i,"No window.location.(origin|href) available to create URL");let c=typeof s=="string"?s:ks(s);return c=c.replace(/ $/,"%20"),!l&&c.startsWith("//")&&(c=i+c),new URL(c,i)}function jp(s,l,i="/"){return ux(s,l,i,!1)}function ux(s,l,i,c){let d=typeof l=="string"?Al(l):l,f=Ln(d.pathname||"/",i);if(f==null)return null;let p=Cp(s);dx(p);let x=null;for(let g=0;x==null&&g<p.length;++g){let y=_x(f);x=Sx(p[g],y,c)}return x}function Cp(s,l=[],i=[],c="",d=!1){let f=(p,x,g=d,y)=>{let S={relativePath:y===void 0?p.path||"":y,caseSensitive:p.caseSensitive===!0,childrenIndex:x,route:p};if(S.relativePath.startsWith("/")){if(!S.relativePath.startsWith(c)&&g)return;$e(S.relativePath.startsWith(c),`Absolute route path "${S.relativePath}" nested under path "${c}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),S.relativePath=S.relativePath.slice(c.length)}let T=Bn([c,S.relativePath]),j=i.concat(S);p.children&&p.children.length>0&&($e(p.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${T}".`),Cp(p.children,l,j,T,g)),!(p.path==null&&!p.index)&&l.push({path:T,score:vx(T,p.index),routesMeta:j})};return s.forEach((p,x)=>{if(p.path===""||!p.path?.includes("?"))f(p,x);else for(let g of Ap(p.path))f(p,x,!0,g)}),l}function Ap(s){let l=s.split("/");if(l.length===0)return[];let[i,...c]=l,d=i.endsWith("?"),f=i.replace(/\?$/,"");if(c.length===0)return d?[f,""]:[f];let p=Ap(c.join("/")),x=[];return x.push(...p.map(g=>g===""?f:[f,g].join("/"))),d&&x.push(...p),x.map(g=>s.startsWith("/")&&g===""?"/":g)}function dx(s){s.sort((l,i)=>l.score!==i.score?i.score-l.score:xx(l.routesMeta.map(c=>c.childrenIndex),i.routesMeta.map(c=>c.childrenIndex)))}var fx=/^:[\w-]+$/,hx=3,mx=2,px=1,gx=10,yx=-2,Ym=s=>s==="*";function vx(s,l){let i=s.split("/"),c=i.length;return i.some(Ym)&&(c+=yx),l&&(c+=mx),i.filter(d=>!Ym(d)).reduce((d,f)=>d+(fx.test(f)?hx:f===""?px:gx),c)}function xx(s,l){return s.length===l.length&&s.slice(0,-1).every((c,d)=>c===l[d])?s[s.length-1]-l[l.length-1]:0}function Sx(s,l,i=!1){let{routesMeta:c}=s,d={},f="/",p=[];for(let x=0;x<c.length;++x){let g=c[x],y=x===c.length-1,S=f==="/"?l:l.slice(f.length)||"/",T=pr({path:g.relativePath,caseSensitive:g.caseSensitive,end:y},S),j=g.route;if(!T&&y&&i&&!c[c.length-1].route.index&&(T=pr({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},S)),!T)return null;Object.assign(d,T.params),p.push({params:d,pathname:Bn([f,T.pathname]),pathnameBase:Cx(Bn([f,T.pathnameBase])),route:j}),T.pathnameBase!=="/"&&(f=Bn([f,T.pathnameBase]))}return p}function pr(s,l){typeof s=="string"&&(s={path:s,caseSensitive:!1,end:!0});let[i,c]=Tx(s.path,s.caseSensitive,s.end),d=l.match(i);if(!d)return null;let f=d[0],p=f.replace(/(.)\/+$/,"$1"),x=d.slice(1);return{params:c.reduce((y,{paramName:S,isOptional:T},j)=>{if(S==="*"){let N=x[j]||"";p=f.slice(0,f.length-N.length).replace(/(.)\/+$/,"$1")}const _=x[j];return T&&!_?y[S]=void 0:y[S]=(_||"").replace(/%2F/g,"/"),y},{}),pathname:f,pathnameBase:p,pattern:s}}function Tx(s,l=!1,i=!0){Gt(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 c=[],d="^"+s.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(p,x,g)=>(c.push({paramName:x,isOptional:g!=null}),g?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return s.endsWith("*")?(c.push({paramName:"*"}),d+=s==="*"||s==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?d+="\\/*$":s!==""&&s!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,l?void 0:"i"),c]}function _x(s){try{return s.split("/").map(l=>decodeURIComponent(l).replace(/\//g,"%2F")).join("/")}catch(l){return Gt(!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 Ln(s,l){if(l==="/")return s;if(!s.toLowerCase().startsWith(l.toLowerCase()))return null;let i=l.endsWith("/")?l.length-1:l.length,c=s.charAt(i);return c&&c!=="/"?null:s.slice(i)||"/"}var Np=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ex=s=>Np.test(s);function bx(s,l="/"){let{pathname:i,search:c="",hash:d=""}=typeof s=="string"?Al(s):s,f;if(i)if(Ex(i))f=i;else{if(i.includes("//")){let p=i;i=i.replace(/\/\/+/g,"/"),Gt(!1,`Pathnames cannot have embedded double slashes - normalizing ${p} -> ${i}`)}i.startsWith("/")?f=Vm(i.substring(1),"/"):f=Vm(i,l)}else f=l;return{pathname:f,search:Ax(c),hash:Nx(d)}}function Vm(s,l){let i=l.replace(/\/+$/,"").split("/");return s.split("/").forEach(d=>{d===".."?i.length>1&&i.pop():d!=="."&&i.push(d)}),i.length>1?i.join("/"):"/"}function qc(s,l,i,c){return`Cannot include a '${s}' character in a manually specified \`to.${l}\` field [${JSON.stringify(c)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function jx(s){return s.filter((l,i)=>i===0||l.route.path&&l.route.path.length>0)}function du(s){let l=jx(s);return l.map((i,c)=>c===l.length-1?i.pathname:i.pathnameBase)}function fu(s,l,i,c=!1){let d;typeof s=="string"?d=Al(s):(d={...s},$e(!d.pathname||!d.pathname.includes("?"),qc("?","pathname","search",d)),$e(!d.pathname||!d.pathname.includes("#"),qc("#","pathname","hash",d)),$e(!d.search||!d.search.includes("#"),qc("#","search","hash",d)));let f=s===""||d.pathname==="",p=f?"/":d.pathname,x;if(p==null)x=i;else{let T=l.length-1;if(!c&&p.startsWith("..")){let j=p.split("/");for(;j[0]==="..";)j.shift(),T-=1;d.pathname=j.join("/")}x=T>=0?l[T]:"/"}let g=bx(d,x),y=p&&p!=="/"&&p.endsWith("/"),S=(f||p===".")&&i.endsWith("/");return!g.pathname.endsWith("/")&&(y||S)&&(g.pathname+="/"),g}var Bn=s=>s.join("/").replace(/\/\/+/g,"/"),Cx=s=>s.replace(/\/+$/,"").replace(/^\/*/,"/"),Ax=s=>!s||s==="?"?"":s.startsWith("?")?s:"?"+s,Nx=s=>!s||s==="#"?"":s.startsWith("#")?s:"#"+s,Rx=class{constructor(s,l,i,c=!1){this.status=s,this.statusText=l||"",this.internal=c,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}};function wx(s){return s!=null&&typeof s.status=="number"&&typeof s.statusText=="string"&&typeof s.internal=="boolean"&&"data"in s}function Ox(s){return s.map(l=>l.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Rp=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function wp(s,l){let i=s;if(typeof i!="string"||!Np.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let c=i,d=!1;if(Rp)try{let f=new URL(window.location.href),p=i.startsWith("//")?new URL(f.protocol+i):new URL(i),x=Ln(p.pathname,l);p.origin===f.origin&&x!=null?i=x+p.search+p.hash:d=!0}catch{Gt(!1,`<Link to="${i}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:c,isExternal:d,to:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Op=["POST","PUT","PATCH","DELETE"];new Set(Op);var zx=["GET",...Op];new Set(zx);var Nl=m.createContext(null);Nl.displayName="DataRouter";var gr=m.createContext(null);gr.displayName="DataRouterState";var Dx=m.createContext(!1),zp=m.createContext({isTransitioning:!1});zp.displayName="ViewTransition";var kx=m.createContext(new Map);kx.displayName="Fetchers";var Mx=m.createContext(null);Mx.displayName="Await";var Yt=m.createContext(null);Yt.displayName="Navigation";var Ms=m.createContext(null);Ms.displayName="Location";var an=m.createContext({outlet:null,matches:[],isDataRoute:!1});an.displayName="Route";var hu=m.createContext(null);hu.displayName="RouteError";var Dp="REACT_ROUTER_ERROR",Ux="REDIRECT",Bx="ROUTE_ERROR_RESPONSE";function Lx(s){if(s.startsWith(`${Dp}:${Ux}:{`))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 Hx(s){if(s.startsWith(`${Dp}:${Bx}:{`))try{let l=JSON.parse(s.slice(40));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string")return new Rx(l.status,l.statusText,l.data)}catch{}}function qx(s,{relative:l}={}){$e(Rl(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:c}=m.useContext(Yt),{hash:d,pathname:f,search:p}=Us(s,{relative:l}),x=f;return i!=="/"&&(x=f==="/"?i:Bn([i,f])),c.createHref({pathname:x,search:p,hash:d})}function Rl(){return m.useContext(Ms)!=null}function Vt(){return $e(Rl(),"useLocation() may be used only in the context of a <Router> component."),m.useContext(Ms).location}var kp="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Mp(s){m.useContext(Yt).static||m.useLayoutEffect(s)}function We(){let{isDataRoute:s}=m.useContext(an);return s?tS():Gx()}function Gx(){$e(Rl(),"useNavigate() may be used only in the context of a <Router> component.");let s=m.useContext(Nl),{basename:l,navigator:i}=m.useContext(Yt),{matches:c}=m.useContext(an),{pathname:d}=Vt(),f=JSON.stringify(du(c)),p=m.useRef(!1);return Mp(()=>{p.current=!0}),m.useCallback((g,y={})=>{if(Gt(p.current,kp),!p.current)return;if(typeof g=="number"){i.go(g);return}let S=fu(g,JSON.parse(f),d,y.relative==="path");s==null&&l!=="/"&&(S.pathname=S.pathname==="/"?l:Bn([l,S.pathname])),(y.replace?i.replace:i.push)(S,y.state,y)},[l,i,f,d,s])}var Yx=m.createContext(null);function Vx(s){let l=m.useContext(an).outlet;return m.useMemo(()=>l&&m.createElement(Yx.Provider,{value:s},l),[l,s])}function Ba(){let{matches:s}=m.useContext(an),l=s[s.length-1];return l?l.params:{}}function Us(s,{relative:l}={}){let{matches:i}=m.useContext(an),{pathname:c}=Vt(),d=JSON.stringify(du(i));return m.useMemo(()=>fu(s,JSON.parse(d),c,l==="path"),[s,d,c,l])}function Xx(s,l){return Up(s,l)}function Up(s,l,i,c,d){$e(Rl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:f}=m.useContext(Yt),{matches:p}=m.useContext(an),x=p[p.length-1],g=x?x.params:{},y=x?x.pathname:"/",S=x?x.pathnameBase:"/",T=x&&x.route;{let X=T&&T.path||"";Lp(y,!T||X.endsWith("*")||X.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${y}" (under <Route path="${X}">) 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="${X}"> to <Route path="${X==="/"?"*":`${X}/*`}">.`)}let j=Vt(),_;if(l){let X=typeof l=="string"?Al(l):l;$e(S==="/"||X.pathname?.startsWith(S),`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 "${S}" but pathname "${X.pathname}" was given in the \`location\` prop.`),_=X}else _=j;let N=_.pathname||"/",w=N;if(S!=="/"){let X=S.replace(/^\//,"").split("/");w="/"+N.replace(/^\//,"").split("/").slice(X.length).join("/")}let O=jp(s,{pathname:w});Gt(T||O!=null,`No routes matched location "${_.pathname}${_.search}${_.hash}" `),Gt(O==null||O[O.length-1].route.element!==void 0||O[O.length-1].route.Component!==void 0||O[O.length-1].route.lazy!==void 0,`Matched leaf route at location "${_.pathname}${_.search}${_.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 B=$x(O&&O.map(X=>Object.assign({},X,{params:Object.assign({},g,X.params),pathname:Bn([S,f.encodeLocation?f.encodeLocation(X.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:X.pathname]),pathnameBase:X.pathnameBase==="/"?S:Bn([S,f.encodeLocation?f.encodeLocation(X.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:X.pathnameBase])})),p,i,c,d);return l&&B?m.createElement(Ms.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",..._},navigationType:"POP"}},B):B}function Qx(){let s=eS(),l=wx(s)?`${s.status} ${s.statusText}`:s instanceof Error?s.message:JSON.stringify(s),i=s instanceof Error?s.stack:null,c="rgba(200,200,200, 0.5)",d={padding:"0.5rem",backgroundColor:c},f={padding:"2px 4px",backgroundColor:c},p=null;return console.error("Error handled by React Router default ErrorBoundary:",s),p=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),i?m.createElement("pre",{style:d},i):null,p)}var Kx=m.createElement(Qx,null),Bp=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 i=Hx(s.digest);i&&(s=i)}let l=s!==void 0?m.createElement(an.Provider,{value:this.props.routeContext},m.createElement(hu.Provider,{value:s,children:this.props.component})):this.props.children;return this.context?m.createElement(Zx,{error:s},l):l}};Bp.contextType=Dx;var Gc=new WeakMap;function Zx({children:s,error:l}){let{basename:i}=m.useContext(Yt);if(typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){let c=Lx(l.digest);if(c){let d=Gc.get(l);if(d)throw d;let f=wp(c.location,i);if(Rp&&!Gc.get(l))if(f.isExternal||c.reloadDocument)window.location.href=f.absoluteURL||f.to;else{const p=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:c.replace}));throw Gc.set(l,p),p}return m.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return s}function Ix({routeContext:s,match:l,children:i}){let c=m.useContext(Nl);return c&&c.static&&c.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=l.route.id),m.createElement(an.Provider,{value:s},i)}function $x(s,l=[],i=null,c=null,d=null){if(s==null){if(!i)return null;if(i.errors)s=i.matches;else if(l.length===0&&!i.initialized&&i.matches.length>0)s=i.matches;else return null}let f=s,p=i?.errors;if(p!=null){let S=f.findIndex(T=>T.route.id&&p?.[T.route.id]!==void 0);$e(S>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(p).join(",")}`),f=f.slice(0,Math.min(f.length,S+1))}let x=!1,g=-1;if(i)for(let S=0;S<f.length;S++){let T=f[S];if((T.route.HydrateFallback||T.route.hydrateFallbackElement)&&(g=S),T.route.id){let{loaderData:j,errors:_}=i,N=T.route.loader&&!j.hasOwnProperty(T.route.id)&&(!_||_[T.route.id]===void 0);if(T.route.lazy||N){x=!0,g>=0?f=f.slice(0,g+1):f=[f[0]];break}}}let y=i&&c?(S,T)=>{c(S,{location:i.location,params:i.matches?.[0]?.params??{},unstable_pattern:Ox(i.matches),errorInfo:T})}:void 0;return f.reduceRight((S,T,j)=>{let _,N=!1,w=null,O=null;i&&(_=p&&T.route.id?p[T.route.id]:void 0,w=T.route.errorElement||Kx,x&&(g<0&&j===0?(Lp("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),N=!0,O=null):g===j&&(N=!0,O=T.route.hydrateFallbackElement||null)));let B=l.concat(f.slice(0,j+1)),X=()=>{let I;return _?I=w:N?I=O:T.route.Component?I=m.createElement(T.route.Component,null):T.route.element?I=T.route.element:I=S,m.createElement(Ix,{match:T,routeContext:{outlet:S,matches:B,isDataRoute:i!=null},children:I})};return i&&(T.route.ErrorBoundary||T.route.errorElement||j===0)?m.createElement(Bp,{location:i.location,revalidation:i.revalidation,component:w,error:_,children:X(),routeContext:{outlet:null,matches:B,isDataRoute:!0},onError:y}):X()},null)}function mu(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Jx(s){let l=m.useContext(Nl);return $e(l,mu(s)),l}function Fx(s){let l=m.useContext(gr);return $e(l,mu(s)),l}function Wx(s){let l=m.useContext(an);return $e(l,mu(s)),l}function pu(s){let l=Wx(s),i=l.matches[l.matches.length-1];return $e(i.route.id,`${s} can only be used on routes that contain a unique "id"`),i.route.id}function Px(){return pu("useRouteId")}function eS(){let s=m.useContext(hu),l=Fx("useRouteError"),i=pu("useRouteError");return s!==void 0?s:l.errors?.[i]}function tS(){let{router:s}=Jx("useNavigate"),l=pu("useNavigate"),i=m.useRef(!1);return Mp(()=>{i.current=!0}),m.useCallback(async(d,f={})=>{Gt(i.current,kp),i.current&&(typeof d=="number"?await s.navigate(d):await s.navigate(d,{fromRouteId:l,...f}))},[s,l])}var Xm={};function Lp(s,l,i){!l&&!Xm[s]&&(Xm[s]=!0,Gt(!1,i))}m.memo(nS);function nS({routes:s,future:l,state:i,onError:c}){return Up(s,void 0,i,c,l)}function yr({to:s,replace:l,state:i,relative:c}){$e(Rl(),"<Navigate> may be used only in the context of a <Router> component.");let{static:d}=m.useContext(Yt);Gt(!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(an),{pathname:p}=Vt(),x=We(),g=fu(s,du(f),p,c==="path"),y=JSON.stringify(g);return m.useEffect(()=>{x(JSON.parse(y),{replace:l,state:i,relative:c})},[x,y,c,l,i]),null}function At(s){return Vx(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 aS({basename:s="/",children:l=null,location:i,navigationType:c="POP",navigator:d,static:f=!1,unstable_useTransitions:p}){$e(!Rl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let x=s.replace(/^\/*/,"/"),g=m.useMemo(()=>({basename:x,navigator:d,static:f,unstable_useTransitions:p,future:{}}),[x,d,f,p]);typeof i=="string"&&(i=Al(i));let{pathname:y="/",search:S="",hash:T="",state:j=null,key:_="default"}=i,N=m.useMemo(()=>{let w=Ln(y,x);return w==null?null:{location:{pathname:w,search:S,hash:T,state:j,key:_},navigationType:c}},[x,y,S,T,j,_,c]);return Gt(N!=null,`<Router basename="${x}"> is not able to match the URL "${y}${S}${T}" because it does not start with the basename, so the <Router> won't render anything.`),N==null?null:m.createElement(Yt.Provider,{value:g},m.createElement(Ms.Provider,{children:l,value:N}))}function Hn({children:s,location:l}){return Xx(Pc(s),l)}function Pc(s,l=[]){let i=[];return m.Children.forEach(s,(c,d)=>{if(!m.isValidElement(c))return;let f=[...l,d];if(c.type===m.Fragment){i.push.apply(i,Pc(c.props.children,f));return}$e(c.type===Se,`[${typeof c.type=="string"?c.type:c.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),$e(!c.props.index||!c.props.children,"An index route cannot have child routes.");let p={id:c.props.id||f.join("-"),caseSensitive:c.props.caseSensitive,element:c.props.element,Component:c.props.Component,index:c.props.index,path:c.props.path,middleware:c.props.middleware,loader:c.props.loader,action:c.props.action,hydrateFallbackElement:c.props.hydrateFallbackElement,HydrateFallback:c.props.HydrateFallback,errorElement:c.props.errorElement,ErrorBoundary:c.props.ErrorBoundary,hasErrorBoundary:c.props.hasErrorBoundary===!0||c.props.ErrorBoundary!=null||c.props.errorElement!=null,shouldRevalidate:c.props.shouldRevalidate,handle:c.props.handle,lazy:c.props.lazy};c.props.children&&(p.children=Pc(c.props.children,f)),i.push(p)}),i}var ur="get",dr="application/x-www-form-urlencoded";function vr(s){return typeof HTMLElement<"u"&&s instanceof HTMLElement}function lS(s){return vr(s)&&s.tagName.toLowerCase()==="button"}function sS(s){return vr(s)&&s.tagName.toLowerCase()==="form"}function iS(s){return vr(s)&&s.tagName.toLowerCase()==="input"}function rS(s){return!!(s.metaKey||s.altKey||s.ctrlKey||s.shiftKey)}function oS(s,l){return s.button===0&&(!l||l==="_self")&&!rS(s)}function eu(s=""){return new URLSearchParams(typeof s=="string"||Array.isArray(s)||s instanceof URLSearchParams?s:Object.keys(s).reduce((l,i)=>{let c=s[i];return l.concat(Array.isArray(c)?c.map(d=>[i,d]):[[i,c]])},[]))}function cS(s,l){let i=eu(s);return l&&l.forEach((c,d)=>{i.has(d)||l.getAll(d).forEach(f=>{i.append(d,f)})}),i}var lr=null;function uS(){if(lr===null)try{new FormData(document.createElement("form"),0),lr=!1}catch{lr=!0}return lr}var dS=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Yc(s){return s!=null&&!dS.has(s)?(Gt(!1,`"${s}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${dr}"`),null):s}function fS(s,l){let i,c,d,f,p;if(sS(s)){let x=s.getAttribute("action");c=x?Ln(x,l):null,i=s.getAttribute("method")||ur,d=Yc(s.getAttribute("enctype"))||dr,f=new FormData(s)}else if(lS(s)||iS(s)&&(s.type==="submit"||s.type==="image")){let x=s.form;if(x==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=s.getAttribute("formaction")||x.getAttribute("action");if(c=g?Ln(g,l):null,i=s.getAttribute("formmethod")||x.getAttribute("method")||ur,d=Yc(s.getAttribute("formenctype"))||Yc(x.getAttribute("enctype"))||dr,f=new FormData(x,s),!uS()){let{name:y,type:S,value:T}=s;if(S==="image"){let j=y?`${y}.`:"";f.append(`${j}x`,"0"),f.append(`${j}y`,"0")}else y&&f.append(y,T)}}else{if(vr(s))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=ur,c=null,d=dr,p=s}return f&&d==="text/plain"&&(p=f,f=void 0),{action:c,method:i.toLowerCase(),encType:d,formData:f,body:p}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function gu(s,l){if(s===!1||s===null||typeof s>"u")throw new Error(l)}function hS(s,l,i){let c=typeof s=="string"?new URL(s,typeof window>"u"?"server://singlefetch/":window.location.origin):s;return c.pathname==="/"?c.pathname=`_root.${i}`:l&&Ln(c.pathname,l)==="/"?c.pathname=`${l.replace(/\/$/,"")}/_root.${i}`:c.pathname=`${c.pathname.replace(/\/$/,"")}.${i}`,c}async function mS(s,l){if(s.id in l)return l[s.id];try{let i=await import(s.module);return l[s.id]=i,i}catch(i){return console.error(`Error loading route module \`${s.module}\`, reloading page...`),console.error(i),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function pS(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 gS(s,l,i){let c=await Promise.all(s.map(async d=>{let f=l.routes[d.route.id];if(f){let p=await mS(f,i);return p.links?p.links():[]}return[]}));return SS(c.flat(1).filter(pS).filter(d=>d.rel==="stylesheet"||d.rel==="preload").map(d=>d.rel==="stylesheet"?{...d,rel:"prefetch",as:"style"}:{...d,rel:"prefetch"}))}function Qm(s,l,i,c,d,f){let p=(g,y)=>i[y]?g.route.id!==i[y].route.id:!0,x=(g,y)=>i[y].pathname!==g.pathname||i[y].route.path?.endsWith("*")&&i[y].params["*"]!==g.params["*"];return f==="assets"?l.filter((g,y)=>p(g,y)||x(g,y)):f==="data"?l.filter((g,y)=>{let S=c.routes[g.route.id];if(!S||!S.hasLoader)return!1;if(p(g,y)||x(g,y))return!0;if(g.route.shouldRevalidate){let T=g.route.shouldRevalidate({currentUrl:new URL(d.pathname+d.search+d.hash,window.origin),currentParams:i[0]?.params||{},nextUrl:new URL(s,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof T=="boolean")return T}return!0}):[]}function yS(s,l,{includeHydrateFallback:i}={}){return vS(s.map(c=>{let d=l.routes[c.route.id];if(!d)return[];let f=[d.module];return d.clientActionModule&&(f=f.concat(d.clientActionModule)),d.clientLoaderModule&&(f=f.concat(d.clientLoaderModule)),i&&d.hydrateFallbackModule&&(f=f.concat(d.hydrateFallbackModule)),d.imports&&(f=f.concat(d.imports)),f}).flat(1))}function vS(s){return[...new Set(s)]}function xS(s){let l={},i=Object.keys(s).sort();for(let c of i)l[c]=s[c];return l}function SS(s,l){let i=new Set;return new Set(l),s.reduce((c,d)=>{let f=JSON.stringify(xS(d));return i.has(f)||(i.add(f),c.push({key:f,link:d})),c},[])}function Hp(){let s=m.useContext(Nl);return gu(s,"You must render this element inside a <DataRouterContext.Provider> element"),s}function TS(){let s=m.useContext(gr);return gu(s,"You must render this element inside a <DataRouterStateContext.Provider> element"),s}var yu=m.createContext(void 0);yu.displayName="FrameworkContext";function qp(){let s=m.useContext(yu);return gu(s,"You must render this element inside a <HydratedRouter> element"),s}function _S(s,l){let i=m.useContext(yu),[c,d]=m.useState(!1),[f,p]=m.useState(!1),{onFocus:x,onBlur:g,onMouseEnter:y,onMouseLeave:S,onTouchStart:T}=l,j=m.useRef(null);m.useEffect(()=>{if(s==="render"&&p(!0),s==="viewport"){let w=B=>{B.forEach(X=>{p(X.isIntersecting)})},O=new IntersectionObserver(w,{threshold:.5});return j.current&&O.observe(j.current),()=>{O.disconnect()}}},[s]),m.useEffect(()=>{if(c){let w=setTimeout(()=>{p(!0)},100);return()=>{clearTimeout(w)}}},[c]);let _=()=>{d(!0)},N=()=>{d(!1),p(!1)};return i?s!=="intent"?[f,j,{}]:[f,j,{onFocus:Ns(x,_),onBlur:Ns(g,N),onMouseEnter:Ns(y,_),onMouseLeave:Ns(S,N),onTouchStart:Ns(T,_)}]:[!1,j,{}]}function Ns(s,l){return i=>{s&&s(i),i.defaultPrevented||l(i)}}function ES({page:s,...l}){let{router:i}=Hp(),c=m.useMemo(()=>jp(i.routes,s,i.basename),[i.routes,s,i.basename]);return c?m.createElement(jS,{page:s,matches:c,...l}):null}function bS(s){let{manifest:l,routeModules:i}=qp(),[c,d]=m.useState([]);return m.useEffect(()=>{let f=!1;return gS(s,l,i).then(p=>{f||d(p)}),()=>{f=!0}},[s,l,i]),c}function jS({page:s,matches:l,...i}){let c=Vt(),{manifest:d,routeModules:f}=qp(),{basename:p}=Hp(),{loaderData:x,matches:g}=TS(),y=m.useMemo(()=>Qm(s,l,g,d,c,"data"),[s,l,g,d,c]),S=m.useMemo(()=>Qm(s,l,g,d,c,"assets"),[s,l,g,d,c]),T=m.useMemo(()=>{if(s===c.pathname+c.search+c.hash)return[];let N=new Set,w=!1;if(l.forEach(B=>{let X=d.routes[B.route.id];!X||!X.hasLoader||(!y.some(I=>I.route.id===B.route.id)&&B.route.id in x&&f[B.route.id]?.shouldRevalidate||X.hasClientLoader?w=!0:N.add(B.route.id))}),N.size===0)return[];let O=hS(s,p,"data");return w&&N.size>0&&O.searchParams.set("_routes",l.filter(B=>N.has(B.route.id)).map(B=>B.route.id).join(",")),[O.pathname+O.search]},[p,x,c,d,y,l,s,f]),j=m.useMemo(()=>yS(S,d),[S,d]),_=bS(S);return m.createElement(m.Fragment,null,T.map(N=>m.createElement("link",{key:N,rel:"prefetch",as:"fetch",href:N,...i})),j.map(N=>m.createElement("link",{key:N,rel:"modulepreload",href:N,...i})),_.map(({key:N,link:w})=>m.createElement("link",{key:N,nonce:i.nonce,...w})))}function CS(...s){return l=>{s.forEach(i=>{typeof i=="function"?i(l):i!=null&&(i.current=l)})}}var AS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{AS&&(window.__reactRouterVersion="7.11.0")}catch{}function NS({basename:s,children:l,unstable_useTransitions:i,window:c}){let d=m.useRef();d.current==null&&(d.current=ix({window:c,v5Compat:!0}));let f=d.current,[p,x]=m.useState({action:f.action,location:f.location}),g=m.useCallback(y=>{i===!1?x(y):m.startTransition(()=>x(y))},[i]);return m.useLayoutEffect(()=>f.listen(g),[f,g]),m.createElement(aS,{basename:s,children:l,location:p.location,navigationType:p.action,navigator:f,unstable_useTransitions:i})}var Gp=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,wl=m.forwardRef(function({onClick:l,discover:i="render",prefetch:c="none",relative:d,reloadDocument:f,replace:p,state:x,target:g,to:y,preventScrollReset:S,viewTransition:T,unstable_defaultShouldRevalidate:j,..._},N){let{basename:w,unstable_useTransitions:O}=m.useContext(Yt),B=typeof y=="string"&&Gp.test(y),X=wp(y,w);y=X.to;let I=qx(y,{relative:d}),[Q,W,K]=_S(c,_),H=zS(y,{replace:p,state:x,target:g,preventScrollReset:S,relative:d,viewTransition:T,unstable_defaultShouldRevalidate:j,unstable_useTransitions:O});function $(P){l&&l(P),P.defaultPrevented||H(P)}let ae=m.createElement("a",{..._,...K,href:X.absoluteURL||I,onClick:X.isExternal||f?l:$,ref:CS(N,W),target:g,"data-discover":!B&&i==="render"?"true":void 0});return Q&&!B?m.createElement(m.Fragment,null,ae,m.createElement(ES,{page:I})):ae});wl.displayName="Link";var RS=m.forwardRef(function({"aria-current":l="page",caseSensitive:i=!1,className:c="",end:d=!1,style:f,to:p,viewTransition:x,children:g,...y},S){let T=Us(p,{relative:y.relative}),j=Vt(),_=m.useContext(gr),{navigator:N,basename:w}=m.useContext(Yt),O=_!=null&&LS(T)&&x===!0,B=N.encodeLocation?N.encodeLocation(T).pathname:T.pathname,X=j.pathname,I=_&&_.navigation&&_.navigation.location?_.navigation.location.pathname:null;i||(X=X.toLowerCase(),I=I?I.toLowerCase():null,B=B.toLowerCase()),I&&w&&(I=Ln(I,w)||I);const Q=B!=="/"&&B.endsWith("/")?B.length-1:B.length;let W=X===B||!d&&X.startsWith(B)&&X.charAt(Q)==="/",K=I!=null&&(I===B||!d&&I.startsWith(B)&&I.charAt(B.length)==="/"),H={isActive:W,isPending:K,isTransitioning:O},$=W?l:void 0,ae;typeof c=="function"?ae=c(H):ae=[c,W?"active":null,K?"pending":null,O?"transitioning":null].filter(Boolean).join(" ");let P=typeof f=="function"?f(H):f;return m.createElement(wl,{...y,"aria-current":$,className:ae,ref:S,style:P,to:p,viewTransition:x},typeof g=="function"?g(H):g)});RS.displayName="NavLink";var wS=m.forwardRef(({discover:s="render",fetcherKey:l,navigate:i,reloadDocument:c,replace:d,state:f,method:p=ur,action:x,onSubmit:g,relative:y,preventScrollReset:S,viewTransition:T,unstable_defaultShouldRevalidate:j,..._},N)=>{let{unstable_useTransitions:w}=m.useContext(Yt),O=US(),B=BS(x,{relative:y}),X=p.toLowerCase()==="get"?"get":"post",I=typeof x=="string"&&Gp.test(x),Q=W=>{if(g&&g(W),W.defaultPrevented)return;W.preventDefault();let K=W.nativeEvent.submitter,H=K?.getAttribute("formmethod")||p,$=()=>O(K||W.currentTarget,{fetcherKey:l,method:H,navigate:i,replace:d,state:f,relative:y,preventScrollReset:S,viewTransition:T,unstable_defaultShouldRevalidate:j});w&&i!==!1?m.startTransition(()=>$()):$()};return m.createElement("form",{ref:N,method:X,action:B,onSubmit:c?g:Q,..._,"data-discover":!I&&s==="render"?"true":void 0})});wS.displayName="Form";function OS(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Yp(s){let l=m.useContext(Nl);return $e(l,OS(s)),l}function zS(s,{target:l,replace:i,state:c,preventScrollReset:d,relative:f,viewTransition:p,unstable_defaultShouldRevalidate:x,unstable_useTransitions:g}={}){let y=We(),S=Vt(),T=Us(s,{relative:f});return m.useCallback(j=>{if(oS(j,l)){j.preventDefault();let _=i!==void 0?i:ks(S)===ks(T),N=()=>y(s,{replace:_,state:c,preventScrollReset:d,relative:f,viewTransition:p,unstable_defaultShouldRevalidate:x});g?m.startTransition(()=>N()):N()}},[S,y,T,i,c,l,s,d,f,p,x,g])}function DS(s){Gt(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(eu(s)),i=m.useRef(!1),c=Vt(),d=m.useMemo(()=>cS(c.search,i.current?null:l.current),[c.search]),f=We(),p=m.useCallback((x,g)=>{const y=eu(typeof x=="function"?x(new URLSearchParams(d)):x);i.current=!0,f("?"+y,g)},[f,d]);return[d,p]}var kS=0,MS=()=>`__${String(++kS)}__`;function US(){let{router:s}=Yp("useSubmit"),{basename:l}=m.useContext(Yt),i=Px(),c=s.fetch,d=s.navigate;return m.useCallback(async(f,p={})=>{let{action:x,method:g,encType:y,formData:S,body:T}=fS(f,l);if(p.navigate===!1){let j=p.fetcherKey||MS();await c(j,i,p.action||x,{unstable_defaultShouldRevalidate:p.unstable_defaultShouldRevalidate,preventScrollReset:p.preventScrollReset,formData:S,body:T,formMethod:p.method||g,formEncType:p.encType||y,flushSync:p.flushSync})}else await d(p.action||x,{unstable_defaultShouldRevalidate:p.unstable_defaultShouldRevalidate,preventScrollReset:p.preventScrollReset,formData:S,body:T,formMethod:p.method||g,formEncType:p.encType||y,replace:p.replace,state:p.state,fromRouteId:i,flushSync:p.flushSync,viewTransition:p.viewTransition})},[c,d,l,i])}function BS(s,{relative:l}={}){let{basename:i}=m.useContext(Yt),c=m.useContext(an);$e(c,"useFormAction must be used inside a RouteContext");let[d]=c.matches.slice(-1),f={...Us(s||".",{relative:l})},p=Vt();if(s==null){f.search=p.search;let x=new URLSearchParams(f.search),g=x.getAll("index");if(g.some(S=>S==="")){x.delete("index"),g.filter(T=>T).forEach(T=>x.append("index",T));let S=x.toString();f.search=S?`?${S}`:""}}return(!s||s===".")&&d.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(f.pathname=f.pathname==="/"?i:Bn([i,f.pathname])),ks(f)}function LS(s,{relative:l}={}){let i=m.useContext(zp);$e(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:c}=Yp("useViewTransitionState"),d=Us(s,{relative:l});if(!i.isTransitioning)return!1;let f=Ln(i.currentLocation.pathname,c)||i.currentLocation.pathname,p=Ln(i.nextLocation.pathname,c)||i.nextLocation.pathname;return pr(d.pathname,p)!=null||pr(d.pathname,f)!=null}const Vp=m.createContext(void 0);function HS({children:s}){const[l,i]=m.useState(()=>localStorage.getItem("theme")||"light");m.useEffect(()=>{document.documentElement.setAttribute("data-theme",l),localStorage.setItem("theme",l)},[l]);const c=d=>{i(d)};return r.jsx(Vp.Provider,{value:{theme:l,setTheme:c},children:s})}function qS(){const s=m.useContext(Vp);if(!s)throw new Error("useTheme must be used within ThemeProvider");return s}class Km extends Error{constructor(l,i,c){super(c),this.name="ApiError",this.url=i.url,this.status=i.status,this.statusText=i.statusText,this.body=i.body,this.request=l}}class GS extends Error{constructor(l){super(l),this.name="CancelError"}get isCancelled(){return!0}}class YS{#t;#n;#e;#a;#s;#i;#l;constructor(l){this.#t=!1,this.#n=!1,this.#e=!1,this.#a=[],this.#s=new Promise((i,c)=>{this.#i=i,this.#l=c;const d=x=>{this.#t||this.#n||this.#e||(this.#t=!0,this.#i&&this.#i(x))},f=x=>{this.#t||this.#n||this.#e||(this.#n=!0,this.#l&&this.#l(x))},p=x=>{this.#t||this.#n||this.#e||this.#a.push(x)};return Object.defineProperty(p,"isResolved",{get:()=>this.#t}),Object.defineProperty(p,"isRejected",{get:()=>this.#n}),Object.defineProperty(p,"isCancelled",{get:()=>this.#e}),l(d,f,p)})}get[Symbol.toStringTag](){return"Cancellable Promise"}then(l,i){return this.#s.then(l,i)}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 GS("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 Zm;(s=>{(l=>{l.HUMAN="human",l.AGENT="agent"})(s.type||(s.type={}))})(Zm||(Zm={}));var pt;(s=>{(l=>{l.CLAUDE="claude",l.CODEX="codex",l.OPENCODE="opencode",l.ADK="adk",l.OTHER="other"})(s.type||(s.type={}))})(pt||(pt={}));var Im;(s=>{(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={}))})(Im||(Im={}));var $m;(s=>{(l=>{l.NOT_STARTED="NOT_STARTED",l.IN_PROGRESS="IN_PROGRESS",l.FOR_REVIEW="FOR_REVIEW",l.DONE="DONE"})(s.status||(s.status={}))})($m||($m={}));var Jm;(s=>{(l=>{l.NONE="none",l.CLIENT_SECRET_BASIC="client_secret_basic"})(s.token_endpoint_auth_method||(s.token_endpoint_auth_method={}))})(Jm||(Jm={}));var Fm;(s=>{(l=>{l.PENDING="pending",l.AUTHORIZED="authorized",l.FAILED="failed"})(s.status||(s.status={}))})(Fm||(Fm={}));var Wm;(s=>{(l=>{l.CLAUDE="claude",l.CODEX="codex",l.OPENCODE="opencode",l.ADK="adk",l.OTHER="other"})(s.type||(s.type={}))})(Wm||(Wm={}));var Pm;(s=>{(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={}))})(Pm||(Pm={}));var ep;(s=>{(l=>{l.ACCESS_TOKEN="access_token",l.REFRESH_TOKEN="refresh_token"})(s.token_type_hint||(s.token_type_hint={}))})(ep||(ep={}));var tp;(s=>{(l=>{l.BEARER="Bearer"})(s.token_type||(s.token_type={}))})(tp||(tp={}));var np;(s=>{(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={}))})(np||(np={}));var ap;(s=>{(l=>{l.CLAUDE="claude",l.CODEX="codex",l.OPENCODE="opencode",l.ADK="adk",l.OTHER="other"})(s.type||(s.type={}))})(ap||(ap={}));var lp;(s=>{(l=>{l.NONE="none",l.CLIENT_SECRET_BASIC="client_secret_basic"})(s.token_endpoint_auth_method||(s.token_endpoint_auth_method={}))})(lp||(lp={}));var tu;(s=>{(l=>{l.NOT_STARTED="NOT_STARTED",l.IN_PROGRESS="IN_PROGRESS",l.FOR_REVIEW="FOR_REVIEW",l.DONE="DONE"})(s.status||(s.status={}))})(tu||(tu={}));var sp;(s=>{(l=>{l.NOT_STARTED="NOT_STARTED",l.IN_PROGRESS="IN_PROGRESS",l.FOR_REVIEW="FOR_REVIEW",l.DONE="DONE"})(s.status||(s.status={}))})(sp||(sp={}));var ip;(s=>{(l=>{l.URN_IETF_PARAMS_OAUTH_GRANT_TYPE_TOKEN_EXCHANGE="urn:ietf:params:oauth:grant-type:token-exchange"})(s.grant_type||(s.grant_type={})),(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={}))})(ip||(ip={}));var rp;(s=>{(l=>{l.AUTHORIZATION_CODE="authorization_code",l.REFRESH_TOKEN="refresh_token"})(s.grant_type||(s.grant_type={}))})(rp||(rp={}));var op;(s=>{(l=>{l.BEARER="Bearer"})(s.token_type||(s.token_type={}))})(op||(op={}));var cp;(s=>{(l=>{l.ADMIN="admin",l.STANDARD="standard"})(s.role||(s.role={}))})(cp||(cp={}));const vu=s=>s!=null,Bs=s=>typeof s=="string",Vc=s=>Bs(s)&&s!=="",xu=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]),Xp=s=>s instanceof FormData,VS=s=>{try{return btoa(s)}catch{return Buffer.from(s).toString("base64")}},XS=s=>{const l=[],i=(d,f)=>{l.push(`${encodeURIComponent(d)}=${encodeURIComponent(String(f))}`)},c=(d,f)=>{vu(f)&&(Array.isArray(f)?f.forEach(p=>{c(d,p)}):typeof f=="object"?Object.entries(f).forEach(([p,x])=>{c(`${d}[${p}]`,x)}):i(d,f))};return Object.entries(s).forEach(([d,f])=>{c(d,f)}),l.length>0?`?${l.join("&")}`:""},QS=(s,l)=>{const i=encodeURI,c=l.url.replace("{api-version}",s.VERSION).replace(/{(.*?)}/g,(f,p)=>l.path?.hasOwnProperty(p)?i(String(l.path[p])):f),d=`${s.BASE}${c}`;return l.query?`${d}${XS(l.query)}`:d},KS=s=>{if(s.formData){const l=new FormData,i=(c,d)=>{Bs(d)||xu(d)?l.append(c,d):l.append(c,JSON.stringify(d))};return Object.entries(s.formData).filter(([c,d])=>vu(d)).forEach(([c,d])=>{Array.isArray(d)?d.forEach(f=>i(c,f)):i(c,d)}),l}},sr=async(s,l)=>l,ZS=async(s,l)=>{const[i,c,d,f]=await Promise.all([sr(l,s.TOKEN),sr(l,s.USERNAME),sr(l,s.PASSWORD),sr(l,s.HEADERS)]),p=Object.entries({Accept:"application/json",...f,...l.headers}).filter(([x,g])=>vu(g)).reduce((x,[g,y])=>({...x,[g]:String(y)}),{});if(Vc(i)&&(p.Authorization=`Bearer ${i}`),Vc(c)&&Vc(d)){const x=VS(`${c}:${d}`);p.Authorization=`Basic ${x}`}return l.body!==void 0&&(l.mediaType?p["Content-Type"]=l.mediaType:xu(l.body)?p["Content-Type"]=l.body.type||"application/octet-stream":Bs(l.body)?p["Content-Type"]="text/plain":Xp(l.body)||(p["Content-Type"]="application/json")),new Headers(p)},IS=s=>{if(s.body!==void 0)return s.mediaType?.includes("/json")?JSON.stringify(s.body):Bs(s.body)||xu(s.body)||Xp(s.body)?s.body:JSON.stringify(s.body)},$S=async(s,l,i,c,d,f,p)=>{const x=new AbortController,g={headers:f,body:c??d,method:l.method,signal:x.signal};return p(()=>x.abort()),await fetch(i,g)},JS=(s,l)=>{if(l){const i=s.headers.get(l);if(Bs(i))return i}},FS=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)}},WS=(s,l)=>{const c={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(c)throw new Km(s,l,c);if(!l.ok){const d=l.status??"unknown",f=l.statusText??"unknown",p=(()=>{try{return JSON.stringify(l.body,null,2)}catch{return}})();throw new Km(s,l,`Generic Error: status: ${d}; status text: ${f}; body: ${p}`)}},Z=(s,l)=>new YS(async(i,c,d)=>{try{const f=QS(s,l),p=KS(l),x=IS(l),g=await ZS(s,l);if(!d.isCancelled){const y=await $S(s,l,f,x,p,g,d),S=await FS(y),T=JS(y,l.responseHeader),j={url:f,ok:y.ok,status:y.status,statusText:y.statusText,body:T??S};WS(l,j),i(j.body)}}catch(f){c(f)}});class PS{static actorControllerListActors(){return Z(V,{method:"GET",url:"/api/v1/actors"})}}class Rs{static agentsControllerCreateAgent(l){return Z(V,{method:"POST",url:"/api/v1/agents",body:l,mediaType:"application/json"})}static agentsControllerListAgents(l,i=1,c=20){return Z(V,{method:"GET",url:"/api/v1/agents",query:{isActive:l,page:i,limit:c}})}static agentsControllerGetAgentBySlug(l){return Z(V,{method:"GET",url:"/api/v1/agents/{slug}",path:{slug:l}})}static agentsControllerPatchAgent(l,i){return Z(V,{method:"PATCH",url:"/api/v1/agents/{actorId}",path:{actorId:l},body:i,mediaType:"application/json"})}static agentsControllerDeleteAgent(l){return Z(V,{method:"DELETE",url:"/api/v1/agents/{actorId}",path:{actorId:l}})}}class Xc{static agentTokensControllerIssueToken(l,i){return Z(V,{method:"POST",url:"/api/v1/agents/{slug}/tokens",path:{slug:l},body:i,mediaType:"application/json"})}static agentTokensControllerListTokens(l){return Z(V,{method:"GET",url:"/api/v1/agents/{slug}/tokens",path:{slug:l}})}static agentTokensControllerRevokeToken(l,i){return Z(V,{method:"DELETE",url:"/api/v1/agents/{slug}/tokens/{tokenId}",path:{slug:l,tokenId:i}})}}class e0{static authJourneysControllerGetAuthJourneys(l){return Z(V,{method:"GET",url:"/api/v1/auth-journeys/servers/{serverId}",path:{serverId:l},errors:{404:"Server not found"}})}}class Qp{static clientRegistrationControllerRegisterClient(l,i,c){return Z(V,{method:"POST",url:"/api/v1/auth/clients/register/mcp/{serverId}/{version}",path:{serverId:l,version:i},body:c,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 Z(V,{method:"GET",url:"/api/v1/auth/clients/{clientId}",path:{clientId:l},errors:{404:"Client not found"}})}static clientRegistrationControllerListClients(){return Z(V,{method:"GET",url:"/api/v1/auth/clients"})}static authorizationControllerAuthorize(l,i,c,d,f,p,x,g,y,S){return Z(V,{method:"GET",url:"/api/v1/auth/authorize/mcp/{serverIdentifier}/{version}",path:{serverIdentifier:g,version:y},query:{response_type:l,scope:S,client_id:i,code_challenge:c,code_challenge_method:d,redirect_uri:f,state:p,resource:x},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,i,c){return Z(V,{method:"POST",url:"/api/v1/auth/authorize/mcp/{serverIdentifier}/{version}",path:{serverIdentifier:l,version:i},body:c,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 Z(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,i,c){return Z(V,{method:"POST",url:"/api/v1/auth/token/mcp/{serverIdentifier}/{version}",path:{serverIdentifier:l,version:i},body:c,mediaType:"application/json",errors:{400:"Invalid token request parameters",401:"Invalid authorization code, code_verifier, or expired code"}})}static authorizationControllerIntrospect(l,i,c){return Z(V,{method:"POST",url:"/api/v1/auth/introspect/mcp/{serverIdentifier}/{version}",path:{serverIdentifier:l,version:i},body:c,mediaType:"application/json",errors:{400:"Invalid introspection request parameters"}})}static authorizationControllerTokenExchange(l,i,c){return Z(V,{method:"POST",url:"/api/v1/auth/token-exchange/mcp/{serverIdentifier}/{version}",path:{serverIdentifier:l,version:i},body:c,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,i,c,d,f){return Z(V,{method:"GET",url:"/api/v1/auth/callback",query:{code:l,state:i,error:c,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 Z(V,{method:"GET",url:"/api/v1/auth/scopes"})}}class nu{static contextControllerCreateBlock(l){return Z(V,{method:"POST",url:"/api/v1/context/blocks",body:l,mediaType:"application/json",errors:{400:"Invalid input data"}})}static contextControllerListBlocks(l){return Z(V,{method:"GET",url:"/api/v1/context/blocks",query:{tag:l}})}static contextControllerGetBlockTree(){return Z(V,{method:"GET",url:"/api/v1/context/blocks/tree"})}static contextControllerGetBlock(l){return Z(V,{method:"GET",url:"/api/v1/context/blocks/{id}",path:{id:l}})}static contextControllerUpdateBlock(l,i){return Z(V,{method:"PATCH",url:"/api/v1/context/blocks/{id}",path:{id:l},body:i,mediaType:"application/json",errors:{400:"No update fields provided"}})}static contextControllerDeleteBlock(l){return Z(V,{method:"DELETE",url:"/api/v1/context/blocks/{id}",path:{id:l}})}static contextControllerAppendToBlock(l,i){return Z(V,{method:"POST",url:"/api/v1/context/blocks/{id}/append",path:{id:l},body:i,mediaType:"application/json"})}static contextControllerReorderBlock(l,i){return Z(V,{method:"PATCH",url:"/api/v1/context/blocks/{id}/reorder",path:{id:l},body:i,mediaType:"application/json"})}static contextControllerMoveBlock(l,i){return Z(V,{method:"PATCH",url:"/api/v1/context/blocks/{id}/move",path:{id:l},body:i,mediaType:"application/json",errors:{400:"Circular reference detected or parent not found"}})}static contextControllerAddTagToBlock(l,i){return Z(V,{method:"POST",url:"/api/v1/context/blocks/{id}/tags",path:{id:l},body:i,mediaType:"application/json",errors:{400:"Invalid input data"}})}static contextControllerRemoveTagFromBlock(l,i){return Z(V,{method:"DELETE",url:"/api/v1/context/blocks/{id}/tags/{tagId}",path:{id:l,tagId:i}})}static contextControllerHandleMcpGet(){return Z(V,{method:"GET",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpPost(){return Z(V,{method:"POST",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpPut(){return Z(V,{method:"PUT",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpDelete(){return Z(V,{method:"DELETE",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpPatch(){return Z(V,{method:"PATCH",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpOptions(){return Z(V,{method:"OPTIONS",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpHead(){return Z(V,{method:"HEAD",url:"/api/v1/context/blocks/mcp"})}}class t0{static metaControllerCreateTag(l){return Z(V,{method:"POST",url:"/api/v1/meta/tags",body:l,mediaType:"application/json",errors:{400:"Invalid input data"}})}static metaControllerGetAllTags(){return Z(V,{method:"GET",url:"/api/v1/meta/tags"})}static metaControllerGetTagColors(){return Z(V,{method:"GET",url:"/api/v1/meta/tags/colors"})}static metaControllerDeleteTag(l){return Z(V,{method:"DELETE",url:"/api/v1/meta/tags/{tagId}",path:{tagId:l},errors:{404:"Tag not found"}})}}class up{static projectsControllerCreateProject(l){return Z(V,{method:"POST",url:"/api/v1/meta/projects",body:l,mediaType:"application/json",errors:{400:"Invalid input data"}})}static projectsControllerGetAllProjects(){return Z(V,{method:"GET",url:"/api/v1/meta/projects"})}static projectsControllerSearchProjects(l,i,c){return Z(V,{method:"GET",url:"/api/v1/meta/projects/search",query:{q:l,limit:i,threshold:c}})}static projectsControllerGetProjectBySlug(l){return Z(V,{method:"GET",url:"/api/v1/meta/projects/by-slug/{slug}",path:{slug:l},errors:{404:"Project not found"}})}static projectsControllerGetProject(l){return Z(V,{method:"GET",url:"/api/v1/meta/projects/{projectId}",path:{projectId:l},errors:{404:"Project not found"}})}static projectsControllerUpdateProject(l,i){return Z(V,{method:"PATCH",url:"/api/v1/meta/projects/{projectId}",path:{projectId:l},body:i,mediaType:"application/json",errors:{400:"Invalid input data",404:"Project not found"}})}static projectsControllerDeleteProject(l){return Z(V,{method:"DELETE",url:"/api/v1/meta/projects/{projectId}",path:{projectId:l},errors:{404:"Project not found"}})}}class tn{static tasksControllerCreateTask(l){return Z(V,{method:"POST",url:"/api/v1/tasks/tasks",body:l,mediaType:"application/json",errors:{400:"Invalid input data"}})}static tasksControllerListTasks(l,i,c,d=1,f=20){return Z(V,{method:"GET",url:"/api/v1/tasks/tasks",query:{assignee:l,sessionId:i,tag:c,page:d,limit:f}})}static tasksControllerUpdateTask(l,i){return Z(V,{method:"PATCH",url:"/api/v1/tasks/tasks/{id}",path:{id:l},body:i,mediaType:"application/json",errors:{400:"Invalid input data",404:"Task not found"}})}static tasksControllerDeleteTask(l){return Z(V,{method:"DELETE",url:"/api/v1/tasks/tasks/{id}",path:{id:l},errors:{404:"Task not found"}})}static tasksControllerGetTask(l){return Z(V,{method:"GET",url:"/api/v1/tasks/tasks/{id}",path:{id:l},errors:{404:"Task not found"}})}static tasksControllerAssignTask(l,i){return Z(V,{method:"PATCH",url:"/api/v1/tasks/tasks/{id}/assign",path:{id:l},body:i,mediaType:"application/json",errors:{400:"Invalid input data",404:"Task not found"}})}static tasksControllerAssignTaskToMe(l){return Z(V,{method:"PATCH",url:"/api/v1/tasks/tasks/{id}/assign-to-me",path:{id:l},errors:{404:"Task not found"}})}static tasksControllerSearchTasks(l,i=10,c=.3){return Z(V,{method:"GET",url:"/api/v1/tasks/tasks/search/query",query:{query:l,limit:i,threshold:c}})}static tasksControllerAddComment(l,i){return Z(V,{method:"POST",url:"/api/v1/tasks/tasks/{id}/comments",path:{id:l},body:i,mediaType:"application/json",errors:{400:"Invalid input data",404:"Task not found"}})}static tasksControllerChangeStatus(l,i){return Z(V,{method:"PATCH",url:"/api/v1/tasks/tasks/{id}/status",path:{id:l},body:i,mediaType:"application/json",errors:{400:"Invalid status transition or comment required",404:"Task not found"}})}static tasksControllerAddTagToTask(l,i){return Z(V,{method:"POST",url:"/api/v1/tasks/tasks/{id}/tags",path:{id:l},body:i,mediaType:"application/json",errors:{400:"Invalid input data",404:"Task not found"}})}static tasksControllerRemoveTagFromTask(l,i){return Z(V,{method:"DELETE",url:"/api/v1/tasks/tasks/{id}/tags/{tagId}",path:{id:l,tagId:i},errors:{404:"Task not found"}})}static tasksControllerCreateInputRequest(l,i){return Z(V,{method:"POST",url:"/api/v1/tasks/tasks/{id}/input-requests",path:{id:l},body:i,mediaType:"application/json",errors:{400:"Invalid input data",404:"Task not found"}})}static tasksControllerAnswerInputRequest(l,i,c){return Z(V,{method:"POST",url:"/api/v1/tasks/tasks/{id}/input-requests/{inputRequestId}/answer",path:{id:l,inputRequestId:i},body:c,mediaType:"application/json",errors:{400:"Invalid input data",404:"Input request not found"}})}static tasksControllerHandleMcpGet(){return Z(V,{method:"GET",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpPost(){return Z(V,{method:"POST",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpPut(){return Z(V,{method:"PUT",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpDelete(){return Z(V,{method:"DELETE",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpPatch(){return Z(V,{method:"PATCH",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpOptions(){return Z(V,{method:"OPTIONS",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpHead(){return Z(V,{method:"HEAD",url:"/api/v1/tasks/tasks/mcp"})}}let dp=class{static threadsControllerCreateThread(l){return Z(V,{method:"POST",url:"/api/v1/threads",body:l,mediaType:"application/json",errors:{400:"Invalid input data"}})}static threadsControllerListThreads(l,i){return Z(V,{method:"GET",url:"/api/v1/threads",query:{page:l,limit:i}})}static threadsControllerUpdateThread(l,i){return Z(V,{method:"PATCH",url:"/api/v1/threads/{id}",path:{id:l},body:i,mediaType:"application/json",errors:{400:"Invalid input data",404:"Thread not found"}})}static threadsControllerGetThread(l){return Z(V,{method:"GET",url:"/api/v1/threads/{id}",path:{id:l},errors:{404:"Thread not found"}})}static threadsControllerAttachTask(l,i){return Z(V,{method:"POST",url:"/api/v1/threads/{id}/tasks",path:{id:l},body:i,mediaType:"application/json",errors:{400:"Invalid input data",404:"Thread or task not found"}})}static threadsControllerReferenceContextBlock(l,i){return Z(V,{method:"POST",url:"/api/v1/threads/{id}/context-blocks",path:{id:l},body:i,mediaType:"application/json",errors:{400:"Invalid input data",404:"Thread or context block not found"}})}static threadsControllerAddTagToThread(l,i){return Z(V,{method:"POST",url:"/api/v1/threads/{id}/tags",path:{id:l},body:i,mediaType:"application/json",errors:{400:"Invalid input data",404:"Thread not found"}})}static threadsControllerRemoveTagFromThread(l,i){return Z(V,{method:"DELETE",url:"/api/v1/threads/{id}/tags/{tagId}",path:{id:l,tagId:i},errors:{404:"Thread not found"}})}static threadsControllerAddParticipant(l,i){return Z(V,{method:"POST",url:"/api/v1/threads/{id}/participants",path:{id:l},body:i,mediaType:"application/json",errors:{400:"Invalid input data",404:"Thread or actor not found"}})}};class ws{static mcpRegistryControllerCreateServer(l){return Z(V,{method:"POST",url:"/api/v1/mcp/servers",body:l,mediaType:"application/json",errors:{409:"Server with providedId already exists"}})}static mcpRegistryControllerListServers(l,i){return Z(V,{method:"GET",url:"/api/v1/mcp/servers",query:{page:l,limit:i}})}static mcpRegistryControllerGetServer(l){return Z(V,{method:"GET",url:"/api/v1/mcp/servers/{serverId}",path:{serverId:l},errors:{404:"Server not found"}})}static mcpRegistryControllerUpdateServer(l,i){return Z(V,{method:"PATCH",url:"/api/v1/mcp/servers/{serverId}",path:{serverId:l},body:i,mediaType:"application/json",errors:{404:"Server not found"}})}static mcpRegistryControllerDeleteServer(l){return Z(V,{method:"DELETE",url:"/api/v1/mcp/servers/{serverId}",path:{serverId:l},errors:{404:"Server not found",409:"Server has dependencies"}})}static mcpRegistryControllerCreateScopes(l,i){return Z(V,{method:"POST",url:"/api/v1/mcp/servers/{serverId}/scopes",path:{serverId:l},body:i,mediaType:"application/json",errors:{404:"Server not found",409:"Scope already exists"}})}static mcpRegistryControllerListScopes(l){return Z(V,{method:"GET",url:"/api/v1/mcp/servers/{serverId}/scopes",path:{serverId:l},errors:{404:"Server not found"}})}static mcpRegistryControllerGetScope(l,i){return Z(V,{method:"GET",url:"/api/v1/mcp/servers/{serverId}/scopes/{scopeId}",path:{serverId:l,scopeId:i},errors:{404:"Scope not found"}})}static mcpRegistryControllerDeleteScope(l,i){return Z(V,{method:"DELETE",url:"/api/v1/mcp/servers/{serverId}/scopes/{scopeId}",path:{serverId:l,scopeId:i},errors:{404:"Scope not found",409:"Scope has mappings"}})}static mcpRegistryControllerCreateConnection(l,i){return Z(V,{method:"POST",url:"/api/v1/mcp/servers/{serverId}/connections",path:{serverId:l},body:i,mediaType:"application/json",errors:{404:"Server not found",409:"Connection name conflict"}})}static mcpRegistryControllerListConnections(l){return Z(V,{method:"GET",url:"/api/v1/mcp/servers/{serverId}/connections",path:{serverId:l},errors:{404:"Server not found"}})}static mcpRegistryControllerGetConnection(l){return Z(V,{method:"GET",url:"/api/v1/mcp/connections/{connectionId}",path:{connectionId:l},errors:{404:"Connection not found"}})}static mcpRegistryControllerUpdateConnection(l,i){return Z(V,{method:"PATCH",url:"/api/v1/mcp/connections/{connectionId}",path:{connectionId:l},body:i,mediaType:"application/json",errors:{404:"Connection not found",409:"Connection name conflict"}})}static mcpRegistryControllerDeleteConnection(l){return Z(V,{method:"DELETE",url:"/api/v1/mcp/connections/{connectionId}",path:{connectionId:l},errors:{404:"Connection not found",409:"Connection has mappings"}})}static mcpRegistryControllerCreateMapping(l,i){return Z(V,{method:"POST",url:"/api/v1/mcp/servers/{serverId}/mappings",path:{serverId:l},body:i,mediaType:"application/json",errors:{400:"Invalid mapping",404:"Scope or connection not found"}})}static mcpRegistryControllerListMappings(l,i){return Z(V,{method:"GET",url:"/api/v1/mcp/servers/{serverId}/scopes/{scopeId}/mappings",path:{serverId:l,scopeId:i},errors:{404:"Scope not found"}})}static mcpRegistryControllerDeleteMapping(l){return Z(V,{method:"DELETE",url:"/api/v1/mcp/mappings/{mappingId}",path:{mappingId:l},errors:{404:"Mapping not found"}})}}class jl{static webAuthControllerLogin(l){return Z(V,{method:"POST",url:"/api/v1/auth/login",body:l,mediaType:"application/json",errors:{401:"Invalid credentials"}})}static webAuthControllerRefresh(){return Z(V,{method:"POST",url:"/api/v1/auth/refresh",errors:{401:"Invalid or expired refresh token"}})}static webAuthControllerLogout(){return Z(V,{method:"POST",url:"/api/v1/auth/logout"})}static webAuthControllerMe(){return Z(V,{method:"GET",url:"/api/v1/auth/me",errors:{401:"Not authenticated"}})}static webAuthControllerChangePassword(l){return Z(V,{method:"POST",url:"/api/v1/auth/change-password",body:l,mediaType:"application/json",errors:{401:"Not authenticated or current password is incorrect"}})}}const n0=()=>"",Kp=s=>s,qn=n0();V.BASE=qn;V.CREDENTIALS="include";V.BASE=qn;const Zp=m.createContext(void 0);function a0({children:s}){const[l,i]=m.useState(null),[c,d]=m.useState(!0);m.useEffect(()=>{jl.webAuthControllerMe().then(y=>{i(y)}).catch(()=>{i(null)}).finally(()=>{d(!1)})},[]),m.useEffect(()=>{if(!l)return;const y=setInterval(async()=>{try{const S=await jl.webAuthControllerRefresh();i(S.user)}catch(S){console.error("Token refresh failed:",S),i(null)}},480*1e3);return()=>clearInterval(y)},[l]);const g={user:l,isAuthenticated:!!l,isLoading:c,login:async(y,S)=>{const T=await jl.webAuthControllerLogin({email:y,password:S});i(T.user)},logout:async()=>{try{await jl.webAuthControllerLogout()}finally{i(null)}},refreshAuth:async()=>{const y=await jl.webAuthControllerRefresh();i(y.user)}};return r.jsx(Zp.Provider,{value:g,children:s})}function Ls(){const s=m.useContext(Zp);if(s===void 0)throw new Error("useAuth must be used within an AuthProvider");return s}function l0({children:s}){return r.jsx("div",{className:"login-page",children:r.jsx("div",{className:"login-container",children:r.jsx("div",{className:"login-card",children:s})})})}const fp=["a1","a2","a3","a4","a5","a6"];function s0(s){let l=5381;for(let i=0;i<s.length;i++)l=l*33^s.charCodeAt(i);return l>>>0}function i0(s){const l=s0(s.trim().toLowerCase())%fp.length;return fp[l]}function r0(s){const l=s.trim();if(!l)return"?";const i=l.split(/\s+/).filter(Boolean),c=i[0]?.[0]??"?",d=i.length>1?i[i.length-1]?.[0]:"";return(c+d).toUpperCase()}function o0(s){return typeof s=="number"?null:`avatar--${s}`}function c0(s){if(typeof s=="number")return{width:s,height:s,fontSize:Math.max(10,Math.round(s*.42))}}function Xe({name:s,src:l,alt:i,size:c="md",className:d=""}){const f=r0(s),p=i0(s),x=o0(c),g=c0(c);return l?r.jsx("img",{className:`avatar ${x??""} ${d}`,style:g,src:l,alt:i??s,loading:"lazy"}):r.jsx("div",{className:`avatar avatar--fallback avatar--${p} ${x??""} ${d}`,style:g,"aria-label":i??s,role:"img",title:s,children:f})}function Ip(s){return r.jsx("span",{className:`chip chip--${s.color??"gray"}`,children:s.children})}function ue({children:s,spacing:l="4",align:i="stretch",className:c=""}){return r.jsx("div",{className:`stack stack--spacing-${l} stack--align-${i} ${c}`,"data-component":"stack",children:s})}function pa({children:s,spacing:l="4",align:i="center",justify:c="start",className:d=""}){return r.jsx("div",{className:`row row--spacing-${l} row--align-${i} row--justify-${c} ${d}`,"data-component":"row",children:s})}function E({children:s,size:l="2",weight:i="normal",tone:c="default",style:d="sans",as:f="p",className:p="",wrap:x=!1}){return r.jsx(f,{className:`text text--size-${l} text--weight-${i} text--tone-${c} text--style-${d} ${x&&"text--wrap"} ${p}`,"data-component":"text",children:s})}function Ua(s){const{children:l}=s;return r.jsx("div",{className:"error--container",children:r.jsx(E,{size:s.size,weight:s.weight,tone:s.tone,as:s.as,wrap:s.wrap,className:"error--text",children:l})})}function _e({children:s,variant:l="primary",size:i="md",fullWidth:c=!1,className:d="",...f}){return r.jsx("button",{className:`btn btn--${l} btn--${i} ${c?"btn--full-width":""} ${d}`,"data-component":"button",...f,children:s})}function qt({children:s,padding:l="4",className:i=""}){return r.jsx("div",{className:`card card--padding-${l} ${i}`,"data-component":"card",children:s})}function $p({leading:s,children:l,tags:i=[],topRight:c,footer:d,trailing:f,animation:p,onClick:x,className:g="",pulseKey:y,highlight:S}){const[T,j]=m.useState(!1);m.useEffect(()=>{if(y==null)return;j(!0);const O=setTimeout(()=>j(!1),600);return()=>clearTimeout(O)},[y]);const _=p?`board-card--${p}`:"",N=T?"board-card--eventPulse":"",w=S?"board-card--highlight":"";return r.jsx("div",{className:`board-card__wrapper ${_}`,onClick:x,children:r.jsxs("div",{className:`board-card ${w} ${N} ${g}`,"data-component":"board-card",children:[r.jsxs("div",{className:"board-card__header",children:[r.jsx("div",{className:"board-card__headerLeft",children:s?r.jsx("div",{className:"board-card__leading",children:s}):null}),r.jsxs("div",{className:"board-card__headerRight",children:[c?r.jsx("div",{className:"board-card__meta",children:c}):null,f?r.jsx("div",{className:"board-card__trailing",children:f}):null]})]}),r.jsx("div",{className:"board-card__main",children:l}),i.length?r.jsx("div",{className:"board-card__tags","aria-label":"tags",children:i.map(O=>r.jsx("span",{className:`chip chip--${O.color??"gray"}`,children:O.label},O.label))}):null,d?r.jsx("div",{className:"board-card__footer",children:d}):null]})})}function de({leading:s,children:l,tags:i=[],topRight:c,trailing:d,animation:f,onClick:p,highlight:x,className:g=""}){const y=f?`data-row--${f}`:"",S=x?"data-row--highlight":"",T=p?"data-row--clickable":"";return r.jsx("div",{className:`data-row__wrapper ${y}`,onClick:p,children:r.jsxs("div",{className:`data-row ${S} ${T} ${g}`,"data-component":"data-row",children:[s?r.jsx("div",{className:"data-row__leading",children:s}):null,r.jsxs("div",{className:"data-row__content",children:[r.jsxs("div",{className:"data-row__top",children:[r.jsx("div",{className:`data-row__main ${g}`,children:l}),c?r.jsx("div",{className:"data-row__meta",children:c}):null]}),i.length?r.jsx("div",{className:"data-row__tags","aria-label":"tags",children:i.map(j=>r.jsx("span",{className:`chip chip--${j.color??"gray"}`,children:j.label},j.label))}):null]}),d?r.jsx("div",{className:"data-row__trailing",children:d}):null]})})}function ce({children:s,title:l,className:i,action:c}){return r.jsxs("div",{className:`data-row__container ${i}`,children:[(l||c)&&r.jsxs("div",{className:"data-row__container-header",children:[l&&r.jsx(E,{size:"4",weight:"bold",children:l}),c&&r.jsx("div",{className:"data-row__container-action",children:c})]}),s]})}function u0(){const[s,l]=m.useState(""),[i,c]=m.useState(""),[d,f]=m.useState(""),[p,x]=m.useState(!1),{login:g,isLoading:y,isAuthenticated:S}=Ls(),T=We(),_=Vt().state?.from,N=_?.pathname||"/",w=_?.search||"",O=N==="/logout"?"/":`${N}${w}`;m.useEffect(()=>{!y&&S&&(console.log("you're in mate"),T(O))},[y,S,O]);const B=async X=>{X.preventDefault(),x(!0),f("");try{await g(s,i),T(O,{replace:!0})}catch{f("Invalid email or password")}finally{x(!1)}};return r.jsx("form",{onSubmit:B,children:r.jsxs(ue,{spacing:"6",children:[r.jsxs(ue,{spacing:"2",align:"center",children:[r.jsx(E,{size:"6",weight:"bold",className:"login__copy",children:"Taico"}),r.jsx(E,{tone:"muted",className:"login__copy",children:"Where people and agents collaborate in threads, using shared context to get work done."})]}),r.jsxs(ue,{spacing:"4",children:[r.jsxs(ue,{spacing:"2",children:[r.jsx("label",{htmlFor:"email",className:"login-label",children:r.jsx(E,{size:"2",weight:"medium",children:"Email"})}),r.jsx("input",{id:"email",type:"email",value:s,onChange:X=>l(X.target.value),className:"login-input",placeholder:"name@work.com",required:!0,disabled:p,autoComplete:"email"})]}),r.jsxs(ue,{spacing:"2",children:[r.jsx("label",{htmlFor:"password",className:"login-label",children:r.jsx(E,{size:"2",weight:"medium",children:"Password"})}),r.jsx("input",{id:"password",type:"password",value:i,onChange:X=>c(X.target.value),className:"login-input",placeholder:"••••••••",required:!0,disabled:p,autoComplete:"current-password"})]}),d&&r.jsx(Ua,{size:"2",weight:"medium",className:"",children:d}),r.jsx(_e,{type:"submit",variant:"primary",size:"lg",disabled:p,className:"login-button",children:p?"Signing in...":"Sign In"})]})]})})}function d0(){return r.jsx(l0,{children:r.jsx(u0,{})})}function f0({children:s}){const{isAuthenticated:l,isLoading:i}=Ls(),c=Vt();return i?null:l?r.jsx(r.Fragment,{children:s}):r.jsx(yr,{to:"/login",state:{from:c},replace:!0})}function h0(s){return m.useSyncExternalStore(l=>{const i=window.matchMedia(s);return i.addEventListener("change",l),()=>i.removeEventListener("change",l)},()=>window.matchMedia(s).matches,()=>!1)}function Xt(){return h0("(min-width: 768px)")}const Jp=[{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 m0({children:s}){console.log("Beta shell");const l=Vt(),i=Xt(),[c,d]=m.useState(()=>localStorage.getItem("sidebar-collapsed")==="true");m.useEffect(()=>{localStorage.setItem("sidebar-collapsed",String(c))},[c]);const f=()=>{d(!c)};return r.jsxs("div",{className:`${i?"beta-shell__desktop":"beta-shell__mobile"}`,"data-shell":`${i?"desktop":"mobile"}`,children:[i&&r.jsxs("aside",{className:`beta-shell__desktop__sidebar ${c?"beta-shell__desktop__sidebar--collapsed":""}`,children:[r.jsx("nav",{className:"beta-shell__desktop__nav",children:r.jsx("div",{className:"beta-shell__desktop__navInner",children:r.jsx(ue,{spacing:"1",children:Jp.map(p=>{const x=l.pathname.startsWith(p.path);return r.jsxs(wl,{to:p.path,title:c?p.label:void 0,className:`beta-shell__desktop__nav-item ${x?"beta-shell__desktop__nav-item--active":""}`,children:[r.jsx("span",{className:"beta-shell__desktop__nav-icon",children:p.icon}),!c&&r.jsx("span",{className:"beta-shell__desktop__nav-label",children:p.label})]},p.path)})})})}),r.jsx("button",{className:"beta-shell__desktop__sidebar--toggle",onClick:f,"aria-label":c?"Expand sidebar":"Collapse sidebar",children:c?"→":"←"})]}),r.jsx("div",{className:`${i?"beta-shell__desktop__main":""}`,children:s})]})}const p0=()=>{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}},Fp=m.createContext(null);function g0({children:s}){const{message:l}=p0(),[i,c]=m.useState(""),d=m.useMemo(()=>({message:l,sectionTitle:i,setSectionTitle:c}),[l,i,c]);return r.jsx(Fp.Provider,{value:d,children:s})}function Ol(){const s=m.useContext(Fp);if(!s)throw new Error("useHomeCtx must be used within <HomeProvider>");return s}function y0(){console.log("Home page mounting");const{message:s,setSectionTitle:l,sectionTitle:i}=Ol();return m.useEffect(()=>{console.log("Home page useEffect hook triggered"),console.log("setting section title"),l("taico")},[]),r.jsx("div",{children:r.jsx("p",{children:"Tasks. Context. Agents."})})}function La({sectionTitle:s,children:l}){return r.jsxs("div",{className:"desktop-shell",children:[s&&r.jsx("div",{className:"desktop-shell__header",children:r.jsx("h1",{className:"desktop-shell__title",children:s})}),r.jsx("div",{className:"desktop-shell__content",children:l})]})}function v0({navItems:s}){return console.log("Rendering BottomNavContent with navItems:",s),s.length===0?r.jsx(r.Fragment,{}):r.jsx(pa,{spacing:"1",justify:"space-between",children:s.map((l,i)=>{const c=location.pathname===l.path;return r.jsxs(wl,{to:l.path,className:`ios-shell__bottom-nav__item ${c?"ios-shell__bottom-nav__item--active":""}`,onClick:console.log,children:[r.jsx("span",{className:"ios-shell__bottom-nav__icon",children:l.icon}),r.jsx(E,{size:"1",className:"ios-shell__bottom-nav-label",children:l.label})]},l.label)})})}function Ha(s){const l=Vt();console.log("Mounting iOS shell");const[i,c]=m.useState(!1),d=()=>{c(!1)},[f,p]=m.useState(!0),[x,g]=m.useState(!0),[y,S]=m.useState(!0),T=m.useRef(null),j=P=>{T.current=P,$(),H(),ae()},_=m.useRef(null),N=P=>{_.current=P,$()},w=m.useRef(null),O=m.useRef(null),B=P=>{O.current=P,H()},X=m.useRef(null),I=m.useRef(null),Q=P=>{I.current=P,ae()},W=m.useRef(null),K=(P,se,De)=>{const it=se.current,ke=T.current;!it||!ke||(P.current?.disconnect(),P.current=new IntersectionObserver(([Oe])=>{De(Oe.isIntersecting)},{root:ke,threshold:[0,1]}),P.current.observe(it))},H=()=>{K(X,O,P=>{console.log(`title visibility detector: ${P}`),p(P)})},$=()=>{K(w,_,P=>{console.log(`content behind header detector: ${P}`),g(!P)})},ae=()=>{K(W,I,P=>{console.log(`bottom detector: ${P}`),S(!P)})};return m.useEffect(()=>()=>{X.current?.disconnect(),w.current?.disconnect(),W.current?.disconnect()},[]),r.jsxs("div",{className:"ios-shell",children:[r.jsxs("aside",{className:`ios-shell__drawer ${i?"ios-shell__drawer--open":""}`,children:[r.jsxs("div",{className:"ios-shell__drawer-header",children:[r.jsx(E,{size:"4",weight:"bold",children:"taico"}),r.jsx("button",{className:"ios-shell__drawer-close",onClick:d,"aria-label":"Close menu",children:"✕"})]}),r.jsx("nav",{className:"ios-shell__drawer-nav",children:Jp.map(P=>{const se=l.pathname===P.path||l.pathname.startsWith(P.path+"/");return r.jsxs(wl,{to:P.path,className:`ios-shell__drawer-item ${se?"ios-shell__drawer-item--active":""}`,onClick:d,children:[r.jsx("span",{className:"ios-shell__drawer-icon",children:P.icon}),r.jsx("span",{className:"ios-shell__drawer-label",children:P.label})]},P.path)})})]}),r.jsx("header",{className:`ios-shell__header ${x?"elevated":""}`,children:r.jsxs(pa,{spacing:"5",align:"center",children:[r.jsx("button",{className:"ios-shell__hamburger",onClick:()=>c(!0),"aria-label":"Open menu",children:"☰"}),r.jsx(E,{size:"3",weight:"normal",as:"div",children:s.appTitle}),r.jsx("div",{className:`ios-shell__header__section-title ${f?"is-hidden":"is-visible"}`,children:s.sectionTitle})]})}),r.jsxs("main",{ref:j,className:"ios-shell__main",children:[r.jsx("div",{className:"ios-shell__main__top-padding"}),r.jsx("div",{ref:N,className:"ios-shell__main__section-title-top-sentinel"}),r.jsx("div",{className:`ios-shell__main__section-title ${f?"is-visible":"is-hidden"}`,children:s.sectionTitle}),r.jsx("div",{ref:B,className:"ios-shell__main__section-title-bottom-sentinel"}),r.jsx("div",{className:"ios-shell__main__top-sentinel"}),s.children,r.jsx("div",{ref:Q,className:"ios-shell__main__bottom-sentinel"}),r.jsx("div",{className:"ios-shell__main__bottom-padding"})]}),r.jsx("nav",{className:`ios-shell__bottom-nav ${y?"elevated":""}`,children:r.jsx(v0,{navItems:s.navItems})})]})}const x0=[{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 S0(){const s=Xt(),{sectionTitle:l}=Ol();return r.jsx(r.Fragment,{children:s?r.jsx(La,{sectionTitle:l,children:r.jsx(At,{})}):r.jsx(Ha,{appTitle:"Home",sectionTitle:l,navItems:x0,children:r.jsx(At,{})})})}function T0(){const{setSectionTitle:s}=Ol(),l=Xt(),i=We();return m.useEffect(()=>{s("Settings")},[]),r.jsxs(ue,{spacing:"6",children:[l?r.jsx(E,{tone:"muted",children:"Customize your experience"}):"",r.jsx(qt,{padding:"5",children:r.jsxs(ue,{spacing:"3",children:[r.jsxs(ue,{spacing:"1",children:[r.jsx(E,{size:"4",weight:"semibold",children:"Account"}),r.jsx(E,{tone:"muted",children:"Manage your account security"})]}),r.jsxs(pa,{justify:"space-between",align:"center",children:[r.jsx(E,{size:"2",tone:"muted",children:"Update your password"}),r.jsx(_e,{variant:"secondary",size:"sm",onClick:()=>i("/settings/account"),children:"Change Password"})]})]})}),r.jsx(qt,{padding:"5",children:r.jsxs(ue,{spacing:"3",children:[r.jsxs(ue,{spacing:"1",children:[r.jsx(E,{size:"4",weight:"semibold",children:"Appearance"}),r.jsx(E,{tone:"muted",children:"Choose your preferred color theme"})]}),r.jsxs(pa,{justify:"space-between",align:"center",children:[r.jsx(E,{size:"2",tone:"muted",children:"Pick a theme for the app"}),r.jsx(_e,{variant:"secondary",size:"sm",onClick:()=>i("/settings/appearance"),children:"Choose Theme"})]})]})}),r.jsx(qt,{padding:"5",children:r.jsxs(ue,{spacing:"3",children:[r.jsxs(ue,{spacing:"1",children:[r.jsx(E,{size:"4",weight:"semibold",children:"Projects"}),r.jsx(E,{tone:"muted",children:"Manage your projects"})]}),r.jsxs(pa,{justify:"space-between",align:"center",children:[r.jsx(E,{size:"2",tone:"muted",children:"View and edit project details"}),r.jsx(_e,{variant:"secondary",size:"sm",onClick:()=>i("/settings/projects"),children:"Manage Projects"})]})]})})]})}function _0(){const{setSectionTitle:s}=Ol(),{logout:l}=Ls(),i=We(),[c,d]=m.useState(""),[f,p]=m.useState(""),[x,g]=m.useState(""),[y,S]=m.useState(""),[T,j]=m.useState(!1);m.useEffect(()=>{s("Account")},[]);const _=async N=>{N.preventDefault(),g(""),S(""),j(!0);try{await jl.webAuthControllerChangePassword({currentPassword:c,newPassword:f}),S("Password changed successfully! You will be logged out."),d(""),p(""),setTimeout(async()=>{await l(),i("/login")},2e3)}catch(w){g(w?.body?.detail||"Failed to change password. Please check your current password.")}finally{j(!1)}};return r.jsx(ue,{spacing:"6",children:r.jsx(qt,{padding:"5",children:r.jsxs(ue,{spacing:"4",children:[r.jsxs(ue,{spacing:"2",children:[r.jsx(E,{size:"4",weight:"semibold",children:"Change Password"}),r.jsx(E,{tone:"muted",children:"Update your account password"})]}),r.jsx("form",{onSubmit:_,children:r.jsxs(ue,{spacing:"4",children:[r.jsxs(ue,{spacing:"2",children:[r.jsx("label",{htmlFor:"current-password",className:"login-label",children:r.jsx(E,{size:"2",weight:"medium",children:"Current Password"})}),r.jsx("input",{id:"current-password",type:"password",value:c,onChange:N=>d(N.target.value),className:"login-input",placeholder:"••••••••",required:!0,disabled:T,autoComplete:"current-password"})]}),r.jsxs(ue,{spacing:"2",children:[r.jsx("label",{htmlFor:"new-password",className:"login-label",children:r.jsx(E,{size:"2",weight:"medium",children:"New Password"})}),r.jsx("input",{id:"new-password",type:"password",value:f,onChange:N=>p(N.target.value),className:"login-input",placeholder:"••••••••",required:!0,disabled:T,autoComplete:"new-password"})]}),x&&r.jsx(Ua,{size:"2",weight:"medium",children:x}),y&&r.jsx("div",{style:{color:"var(--accent)"},children:r.jsx(E,{size:"2",weight:"medium",children:y})}),r.jsx(_e,{type:"submit",variant:"primary",size:"md",disabled:T||!c||!f,children:T?"Changing Password...":"Change Password"})]})})]})})})}const E0=[{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 b0(){const{theme:s,setTheme:l}=qS(),{setSectionTitle:i}=Ol();return m.useEffect(()=>{i("Appearance")},[]),r.jsx(ue,{spacing:"6",children:r.jsx(qt,{padding:"5",children:r.jsxs(ue,{spacing:"4",children:[r.jsxs(ue,{spacing:"2",children:[r.jsx(E,{size:"4",weight:"semibold",children:"Appearance"}),r.jsx(E,{tone:"muted",children:"Choose your preferred color theme"})]}),r.jsx(ue,{spacing:"3",children:E0.map(c=>{const d=s===c.value;return r.jsx(qt,{padding:"4",className:d?"settings-theme-card--active":"",children:r.jsxs(pa,{justify:"space-between",align:"center",children:[r.jsxs(ue,{spacing:"1",children:[r.jsx(E,{weight:"semibold",children:c.label}),r.jsx(E,{size:"1",tone:"muted",children:c.description})]}),r.jsx(_e,{variant:d?"primary":"secondary",size:"sm",onClick:()=>l(c.value),children:d?"Active":"Select"})]})},c.value)})})]})})})}V.BASE=qn;function j0(){const{setSectionTitle:s}=Ol(),[l,i]=m.useState([]),[c,d]=m.useState(!0),[f,p]=m.useState(""),[x,g]=m.useState(null),[y,S]=m.useState(""),[T,j]=m.useState(""),[_,N]=m.useState(""),[w,O]=m.useState("");m.useEffect(()=>{s("Projects"),B()},[]);const B=async()=>{d(!0),p("");try{const W=await up.projectsControllerGetAllProjects();i(W)}catch(W){p(W?.body?.detail||"Failed to load projects")}finally{d(!1)}},X=W=>{g(W.id),S(W.description||""),j(W.repoUrl||""),N(""),O("")},I=()=>{g(null),S(""),j(""),N(""),O("")},Q=async W=>{N(""),O("");try{await up.projectsControllerUpdateProject(W,{description:y,repoUrl:T}),O("Project updated successfully!"),g(null),await B(),setTimeout(()=>{O("")},3e3)}catch(K){N(K?.body?.detail||"Failed to update project")}};return c?r.jsx(ue,{spacing:"6",children:r.jsx(E,{tone:"muted",children:"Loading projects..."})}):f?r.jsxs(ue,{spacing:"6",children:[r.jsx(Ua,{children:f}),r.jsx(_e,{variant:"secondary",onClick:B,children:"Retry"})]}):r.jsxs(ue,{spacing:"6",children:[r.jsx(E,{tone:"muted",children:"Manage your projects"}),l.length===0?r.jsx(qt,{padding:"5",children:r.jsx(E,{tone:"muted",children:"No projects found"})}):l.map(W=>r.jsx(qt,{padding:"5",children:r.jsxs(ue,{spacing:"4",children:[r.jsxs(ue,{spacing:"2",children:[r.jsx(E,{size:"4",weight:"semibold",children:W.slug}),r.jsxs(E,{size:"2",tone:"muted",children:["Tag: ",W.tagName]})]}),x===W.id?r.jsx("form",{onSubmit:K=>{K.preventDefault(),Q(W.id)},children:r.jsxs(ue,{spacing:"4",children:[r.jsxs(ue,{spacing:"2",children:[r.jsx("label",{htmlFor:`description-${W.id}`,className:"login-label",children:r.jsx(E,{size:"2",weight:"medium",children:"Description"})}),r.jsx("textarea",{id:`description-${W.id}`,value:y,onChange:K=>S(K.target.value),className:"login-input",placeholder:"Project description",rows:3,style:{resize:"vertical",fontFamily:"inherit"}})]}),r.jsxs(ue,{spacing:"2",children:[r.jsx("label",{htmlFor:`repo-url-${W.id}`,className:"login-label",children:r.jsx(E,{size:"2",weight:"medium",children:"Repository URL"})}),r.jsx("input",{id:`repo-url-${W.id}`,type:"url",value:T,onChange:K=>j(K.target.value),className:"login-input",placeholder:"https://github.com/username/repo"})]}),_&&r.jsx(Ua,{size:"2",weight:"medium",children:_}),w&&r.jsx("div",{style:{color:"var(--accent)"},children:r.jsx(E,{size:"2",weight:"medium",children:w})}),r.jsxs(pa,{spacing:"3",children:[r.jsx(_e,{type:"submit",variant:"primary",size:"md",children:"Save Changes"}),r.jsx(_e,{type:"button",variant:"secondary",size:"md",onClick:I,children:"Cancel"})]})]})}):r.jsxs(r.Fragment,{children:[r.jsxs(ue,{spacing:"2",children:[r.jsx(E,{size:"2",weight:"medium",children:"Description"}),r.jsx(E,{size:"2",tone:"muted",children:W.description||"No description"})]}),r.jsxs(ue,{spacing:"2",children:[r.jsx(E,{size:"2",weight:"medium",children:"Repository URL"}),r.jsx(E,{size:"2",tone:"muted",children:W.repoUrl||"No repository URL"})]}),r.jsx(pa,{justify:"end",children:r.jsx(_e,{variant:"secondary",size:"sm",onClick:()=>X(W),children:"Edit Project"})})]})]})},W.id))]})}function C0(){return r.jsx(g0,{children:r.jsx(Hn,{children:r.jsxs(Se,{element:r.jsx(S0,{}),children:[r.jsx(Se,{path:"/home",element:r.jsx(y0,{})}),r.jsx(Se,{path:"/settings",element:r.jsx(T0,{})}),r.jsx(Se,{path:"/settings/account",element:r.jsx(_0,{})}),r.jsx(Se,{path:"/settings/appearance",element:r.jsx(b0,{})}),r.jsx(Se,{path:"/settings/projects",element:r.jsx(j0,{})})]})})})}const A0="/",yn=Object.create(null);yn.open="0";yn.close="1";yn.ping="2";yn.pong="3";yn.message="4";yn.upgrade="5";yn.noop="6";const fr=Object.create(null);Object.keys(yn).forEach(s=>{fr[yn[s]]=s});const au={type:"error",data:"parser error"},Wp=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Pp=typeof ArrayBuffer=="function",eg=s=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(s):s&&s.buffer instanceof ArrayBuffer,Su=({type:s,data:l},i,c)=>Wp&&l instanceof Blob?i?c(l):hp(l,c):Pp&&(l instanceof ArrayBuffer||eg(l))?i?c(l):hp(new Blob([l]),c):c(yn[s]+(l||"")),hp=(s,l)=>{const i=new FileReader;return i.onload=function(){const c=i.result.split(",")[1];l("b"+(c||""))},i.readAsDataURL(s)};function mp(s){return s instanceof Uint8Array?s:s instanceof ArrayBuffer?new Uint8Array(s):new Uint8Array(s.buffer,s.byteOffset,s.byteLength)}let Qc;function N0(s,l){if(Wp&&s.data instanceof Blob)return s.data.arrayBuffer().then(mp).then(l);if(Pp&&(s.data instanceof ArrayBuffer||eg(s.data)))return l(mp(s.data));Su(s,!1,i=>{Qc||(Qc=new TextEncoder),l(Qc.encode(i))})}const pp="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",zs=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let s=0;s<pp.length;s++)zs[pp.charCodeAt(s)]=s;const R0=s=>{let l=s.length*.75,i=s.length,c,d=0,f,p,x,g;s[s.length-1]==="="&&(l--,s[s.length-2]==="="&&l--);const y=new ArrayBuffer(l),S=new Uint8Array(y);for(c=0;c<i;c+=4)f=zs[s.charCodeAt(c)],p=zs[s.charCodeAt(c+1)],x=zs[s.charCodeAt(c+2)],g=zs[s.charCodeAt(c+3)],S[d++]=f<<2|p>>4,S[d++]=(p&15)<<4|x>>2,S[d++]=(x&3)<<6|g&63;return y},w0=typeof ArrayBuffer=="function",Tu=(s,l)=>{if(typeof s!="string")return{type:"message",data:tg(s,l)};const i=s.charAt(0);return i==="b"?{type:"message",data:O0(s.substring(1),l)}:fr[i]?s.length>1?{type:fr[i],data:s.substring(1)}:{type:fr[i]}:au},O0=(s,l)=>{if(w0){const i=R0(s);return tg(i,l)}else return{base64:!0,data:s}},tg=(s,l)=>l==="blob"?s instanceof Blob?s:new Blob([s]):s instanceof ArrayBuffer?s:s.buffer,ng="",z0=(s,l)=>{const i=s.length,c=new Array(i);let d=0;s.forEach((f,p)=>{Su(f,!1,x=>{c[p]=x,++d===i&&l(c.join(ng))})})},D0=(s,l)=>{const i=s.split(ng),c=[];for(let d=0;d<i.length;d++){const f=Tu(i[d],l);if(c.push(f),f.type==="error")break}return c};function k0(){return new TransformStream({transform(s,l){N0(s,i=>{const c=i.length;let d;if(c<126)d=new Uint8Array(1),new DataView(d.buffer).setUint8(0,c);else if(c<65536){d=new Uint8Array(3);const f=new DataView(d.buffer);f.setUint8(0,126),f.setUint16(1,c)}else{d=new Uint8Array(9);const f=new DataView(d.buffer);f.setUint8(0,127),f.setBigUint64(1,BigInt(c))}s.data&&typeof s.data!="string"&&(d[0]|=128),l.enqueue(d),l.enqueue(i)})}})}let Kc;function ir(s){return s.reduce((l,i)=>l+i.length,0)}function rr(s,l){if(s[0].length===l)return s.shift();const i=new Uint8Array(l);let c=0;for(let d=0;d<l;d++)i[d]=s[0][c++],c===s[0].length&&(s.shift(),c=0);return s.length&&c<s[0].length&&(s[0]=s[0].slice(c)),i}function M0(s,l){Kc||(Kc=new TextDecoder);const i=[];let c=0,d=-1,f=!1;return new TransformStream({transform(p,x){for(i.push(p);;){if(c===0){if(ir(i)<1)break;const g=rr(i,1);f=(g[0]&128)===128,d=g[0]&127,d<126?c=3:d===126?c=1:c=2}else if(c===1){if(ir(i)<2)break;const g=rr(i,2);d=new DataView(g.buffer,g.byteOffset,g.length).getUint16(0),c=3}else if(c===2){if(ir(i)<8)break;const g=rr(i,8),y=new DataView(g.buffer,g.byteOffset,g.length),S=y.getUint32(0);if(S>Math.pow(2,21)-1){x.enqueue(au);break}d=S*Math.pow(2,32)+y.getUint32(4),c=3}else{if(ir(i)<d)break;const g=rr(i,d);x.enqueue(Tu(f?g:Kc.decode(g),l)),c=0}if(d===0||d>s){x.enqueue(au);break}}}})}const ag=4;function st(s){if(s)return U0(s)}function U0(s){for(var l in st.prototype)s[l]=st.prototype[l];return s}st.prototype.on=st.prototype.addEventListener=function(s,l){return this._callbacks=this._callbacks||{},(this._callbacks["$"+s]=this._callbacks["$"+s]||[]).push(l),this};st.prototype.once=function(s,l){function i(){this.off(s,i),l.apply(this,arguments)}return i.fn=l,this.on(s,i),this};st.prototype.off=st.prototype.removeListener=st.prototype.removeAllListeners=st.prototype.removeEventListener=function(s,l){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var i=this._callbacks["$"+s];if(!i)return this;if(arguments.length==1)return delete this._callbacks["$"+s],this;for(var c,d=0;d<i.length;d++)if(c=i[d],c===l||c.fn===l){i.splice(d,1);break}return i.length===0&&delete this._callbacks["$"+s],this};st.prototype.emit=function(s){this._callbacks=this._callbacks||{};for(var l=new Array(arguments.length-1),i=this._callbacks["$"+s],c=1;c<arguments.length;c++)l[c-1]=arguments[c];if(i){i=i.slice(0);for(var c=0,d=i.length;c<d;++c)i[c].apply(this,l)}return this};st.prototype.emitReserved=st.prototype.emit;st.prototype.listeners=function(s){return this._callbacks=this._callbacks||{},this._callbacks["$"+s]||[]};st.prototype.hasListeners=function(s){return!!this.listeners(s).length};const xr=typeof Promise=="function"&&typeof Promise.resolve=="function"?l=>Promise.resolve().then(l):(l,i)=>i(l,0),nn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),B0="arraybuffer";function lg(s,...l){return l.reduce((i,c)=>(s.hasOwnProperty(c)&&(i[c]=s[c]),i),{})}const L0=nn.setTimeout,H0=nn.clearTimeout;function Sr(s,l){l.useNativeTimers?(s.setTimeoutFn=L0.bind(nn),s.clearTimeoutFn=H0.bind(nn)):(s.setTimeoutFn=nn.setTimeout.bind(nn),s.clearTimeoutFn=nn.clearTimeout.bind(nn))}const q0=1.33;function G0(s){return typeof s=="string"?Y0(s):Math.ceil((s.byteLength||s.size)*q0)}function Y0(s){let l=0,i=0;for(let c=0,d=s.length;c<d;c++)l=s.charCodeAt(c),l<128?i+=1:l<2048?i+=2:l<55296||l>=57344?i+=3:(c++,i+=4);return i}function sg(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function V0(s){let l="";for(let i in s)s.hasOwnProperty(i)&&(l.length&&(l+="&"),l+=encodeURIComponent(i)+"="+encodeURIComponent(s[i]));return l}function X0(s){let l={},i=s.split("&");for(let c=0,d=i.length;c<d;c++){let f=i[c].split("=");l[decodeURIComponent(f[0])]=decodeURIComponent(f[1])}return l}class Q0 extends Error{constructor(l,i,c){super(l),this.description=i,this.context=c,this.type="TransportError"}}class _u extends st{constructor(l){super(),this.writable=!1,Sr(this,l),this.opts=l,this.query=l.query,this.socket=l.socket,this.supportsBinary=!l.forceBase64}onError(l,i,c){return super.emitReserved("error",new Q0(l,i,c)),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 i=Tu(l,this.socket.binaryType);this.onPacket(i)}onPacket(l){super.emitReserved("packet",l)}onClose(l){this.readyState="closed",super.emitReserved("close",l)}pause(l){}createUri(l,i={}){return l+"://"+this._hostname()+this._port()+this.opts.path+this._query(i)}_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 i=V0(l);return i.length?"?"+i:""}}class K0 extends _u{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(l){this.readyState="pausing";const i=()=>{this.readyState="paused",l()};if(this._polling||!this.writable){let c=0;this._polling&&(c++,this.once("pollComplete",function(){--c||i()})),this.writable||(c++,this.once("drain",function(){--c||i()}))}else i()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(l){const i=c=>{if(this.readyState==="opening"&&c.type==="open"&&this.onOpen(),c.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(c)};D0(l,this.socket.binaryType).forEach(i),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,z0(l,i=>{this.doWrite(i,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const l=this.opts.secure?"https":"http",i=this.query||{};return this.opts.timestampRequests!==!1&&(i[this.opts.timestampParam]=sg()),!this.supportsBinary&&!i.sid&&(i.b64=1),this.createUri(l,i)}}let ig=!1;try{ig=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Z0=ig;function I0(){}class $0 extends K0{constructor(l){if(super(l),typeof location<"u"){const i=location.protocol==="https:";let c=location.port;c||(c=i?"443":"80"),this.xd=typeof location<"u"&&l.hostname!==location.hostname||c!==l.port}}doWrite(l,i){const c=this.request({method:"POST",data:l});c.on("success",i),c.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",(i,c)=>{this.onError("xhr poll error",i,c)}),this.pollXhr=l}}class gn extends st{constructor(l,i,c){super(),this.createRequest=l,Sr(this,c),this._opts=c,this._method=c.method||"GET",this._uri=i,this._data=c.data!==void 0?c.data:null,this._create()}_create(){var l;const i=lg(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");i.xdomain=!!this._opts.xd;const c=this._xhr=this.createRequest(i);try{c.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){c.setDisableHeaderCheck&&c.setDisableHeaderCheck(!0);for(let d in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(d)&&c.setRequestHeader(d,this._opts.extraHeaders[d])}}catch{}if(this._method==="POST")try{c.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{c.setRequestHeader("Accept","*/*")}catch{}(l=this._opts.cookieJar)===null||l===void 0||l.addCookies(c),"withCredentials"in c&&(c.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(c.timeout=this._opts.requestTimeout),c.onreadystatechange=()=>{var d;c.readyState===3&&((d=this._opts.cookieJar)===null||d===void 0||d.parseCookies(c.getResponseHeader("set-cookie"))),c.readyState===4&&(c.status===200||c.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof c.status=="number"?c.status:0)},0))},c.send(this._data)}catch(d){this.setTimeoutFn(()=>{this._onError(d)},0);return}typeof document<"u"&&(this._index=gn.requestsCount++,gn.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=I0,l)try{this._xhr.abort()}catch{}typeof document<"u"&&delete gn.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()}}gn.requestsCount=0;gn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",gp);else if(typeof addEventListener=="function"){const s="onpagehide"in nn?"pagehide":"unload";addEventListener(s,gp,!1)}}function gp(){for(let s in gn.requests)gn.requests.hasOwnProperty(s)&&gn.requests[s].abort()}const J0=(function(){const s=rg({xdomain:!1});return s&&s.responseType!==null})();class F0 extends $0{constructor(l){super(l);const i=l&&l.forceBase64;this.supportsBinary=J0&&!i}request(l={}){return Object.assign(l,{xd:this.xd},this.opts),new gn(rg,this.uri(),l)}}function rg(s){const l=s.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!l||Z0))return new XMLHttpRequest}catch{}if(!l)try{return new nn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const og=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class W0 extends _u{get name(){return"websocket"}doOpen(){const l=this.uri(),i=this.opts.protocols,c=og?{}:lg(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(c.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(l,i,c)}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 i=0;i<l.length;i++){const c=l[i],d=i===l.length-1;Su(c,this.supportsBinary,f=>{try{this.doWrite(c,f)}catch{}d&&xr(()=>{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",i=this.query||{};return this.opts.timestampRequests&&(i[this.opts.timestampParam]=sg()),this.supportsBinary||(i.b64=1),this.createUri(l,i)}}const Zc=nn.WebSocket||nn.MozWebSocket;class P0 extends W0{createSocket(l,i,c){return og?new Zc(l,i,c):i?new Zc(l,i):new Zc(l)}doWrite(l,i){this.ws.send(i)}}class eT extends _u{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 i=M0(Number.MAX_SAFE_INTEGER,this.socket.binaryType),c=l.readable.pipeThrough(i).getReader(),d=k0();d.readable.pipeTo(l.writable),this._writer=d.writable.getWriter();const f=()=>{c.read().then(({done:x,value:g})=>{x||(this.onPacket(g),f())}).catch(x=>{})};f();const p={type:"open"};this.query.sid&&(p.data=`{"sid":"${this.query.sid}"}`),this._writer.write(p).then(()=>this.onOpen())})})}write(l){this.writable=!1;for(let i=0;i<l.length;i++){const c=l[i],d=i===l.length-1;this._writer.write(c).then(()=>{d&&xr(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var l;(l=this._transport)===null||l===void 0||l.close()}}const tT={websocket:P0,webtransport:eT,polling:F0},nT=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,aT=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function lu(s){if(s.length>8e3)throw"URI too long";const l=s,i=s.indexOf("["),c=s.indexOf("]");i!=-1&&c!=-1&&(s=s.substring(0,i)+s.substring(i,c).replace(/:/g,";")+s.substring(c,s.length));let d=nT.exec(s||""),f={},p=14;for(;p--;)f[aT[p]]=d[p]||"";return i!=-1&&c!=-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=lT(f,f.path),f.queryKey=sT(f,f.query),f}function lT(s,l){const i=/\/{2,9}/g,c=l.replace(i,"/").split("/");return(l.slice(0,1)=="/"||l.length===0)&&c.splice(0,1),l.slice(-1)=="/"&&c.splice(c.length-1,1),c}function sT(s,l){const i={};return l.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(c,d,f){d&&(i[d]=f)}),i}const su=typeof addEventListener=="function"&&typeof removeEventListener=="function",hr=[];su&&addEventListener("offline",()=>{hr.forEach(s=>s())},!1);class ga extends st{constructor(l,i){if(super(),this.binaryType=B0,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,l&&typeof l=="object"&&(i=l,l=null),l){const c=lu(l);i.hostname=c.host,i.secure=c.protocol==="https"||c.protocol==="wss",i.port=c.port,c.query&&(i.query=c.query)}else i.host&&(i.hostname=lu(i.host).host);Sr(this,i),this.secure=i.secure!=null?i.secure:typeof location<"u"&&location.protocol==="https:",i.hostname&&!i.port&&(i.port=this.secure?"443":"80"),this.hostname=i.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=i.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},i.transports.forEach(c=>{const d=c.prototype.name;this.transports.push(d),this._transportsByName[d]=c}),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},i),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=X0(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"})},hr.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(l){const i=Object.assign({},this.opts.query);i.EIO=ag,i.transport=l,this.id&&(i.sid=this.id);const c=Object.assign({},this.opts,{query:i,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[l]);return new this._transportsByName[l](c)}_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 i=this.createTransport(l);i.open(),this.setTransport(i)}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",i=>this._onClose("transport close",i))}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 i=new Error("server error");i.code=l.data,this._onError(i);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 i=1;for(let c=0;c<this.writeBuffer.length;c++){const d=this.writeBuffer[c].data;if(d&&(i+=G0(d)),c>0&&i>this._maxPayload)return this.writeBuffer.slice(0,c);i+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const l=Date.now()>this._pingTimeoutTime;return l&&(this._pingTimeoutTime=0,xr(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),l}write(l,i,c){return this._sendPacket("message",l,i,c),this}send(l,i,c){return this._sendPacket("message",l,i,c),this}_sendPacket(l,i,c,d){if(typeof i=="function"&&(d=i,i=void 0),typeof c=="function"&&(d=c,c=null),this.readyState==="closing"||this.readyState==="closed")return;c=c||{},c.compress=c.compress!==!1;const f={type:l,data:i,options:c};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()},i=()=>{this.off("upgrade",i),this.off("upgradeError",i),l()},c=()=>{this.once("upgrade",i),this.once("upgradeError",i)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?c():l()}):this.upgrading?c():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,i){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 c=hr.indexOf(this._offlineEventListener);c!==-1&&hr.splice(c,1)}this.readyState="closed",this.id=null,this.emitReserved("close",l,i),this.writeBuffer=[],this._prevBufferLen=0}}}ga.protocol=ag;class iT 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 i=this.createTransport(l),c=!1;ga.priorWebsocketSuccess=!1;const d=()=>{c||(i.send([{type:"ping",data:"probe"}]),i.once("packet",T=>{if(!c)if(T.type==="pong"&&T.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",i),!i)return;ga.priorWebsocketSuccess=i.name==="websocket",this.transport.pause(()=>{c||this.readyState!=="closed"&&(S(),this.setTransport(i),i.send([{type:"upgrade"}]),this.emitReserved("upgrade",i),i=null,this.upgrading=!1,this.flush())})}else{const j=new Error("probe error");j.transport=i.name,this.emitReserved("upgradeError",j)}}))};function f(){c||(c=!0,S(),i.close(),i=null)}const p=T=>{const j=new Error("probe error: "+T);j.transport=i.name,f(),this.emitReserved("upgradeError",j)};function x(){p("transport closed")}function g(){p("socket closed")}function y(T){i&&T.name!==i.name&&f()}const S=()=>{i.removeListener("open",d),i.removeListener("error",p),i.removeListener("close",x),this.off("close",g),this.off("upgrading",y)};i.once("open",d),i.once("error",p),i.once("close",x),this.once("close",g),this.once("upgrading",y),this._upgrades.indexOf("webtransport")!==-1&&l!=="webtransport"?this.setTimeoutFn(()=>{c||i.open()},200):i.open()}onHandshake(l){this._upgrades=this._filterUpgrades(l.upgrades),super.onHandshake(l)}_filterUpgrades(l){const i=[];for(let c=0;c<l.length;c++)~this.transports.indexOf(l[c])&&i.push(l[c]);return i}}let rT=class extends iT{constructor(l,i={}){const c=typeof l=="object"?l:i;(!c.transports||c.transports&&typeof c.transports[0]=="string")&&(c.transports=(c.transports||["polling","websocket","webtransport"]).map(d=>tT[d]).filter(d=>!!d)),super(l,c)}};function oT(s,l="",i){let c=s;i=i||typeof location<"u"&&location,s==null&&(s=i.protocol+"//"+i.host),typeof s=="string"&&(s.charAt(0)==="/"&&(s.charAt(1)==="/"?s=i.protocol+s:s=i.host+s),/^(https?|wss?):\/\//.test(s)||(typeof i<"u"?s=i.protocol+"//"+s:s="https://"+s),c=lu(s)),c.port||(/^(http|ws)$/.test(c.protocol)?c.port="80":/^(http|ws)s$/.test(c.protocol)&&(c.port="443")),c.path=c.path||"/";const f=c.host.indexOf(":")!==-1?"["+c.host+"]":c.host;return c.id=c.protocol+"://"+f+":"+c.port+l,c.href=c.protocol+"://"+f+(i&&i.port===c.port?"":":"+c.port),c}const cT=typeof ArrayBuffer=="function",uT=s=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(s):s.buffer instanceof ArrayBuffer,cg=Object.prototype.toString,dT=typeof Blob=="function"||typeof Blob<"u"&&cg.call(Blob)==="[object BlobConstructor]",fT=typeof File=="function"||typeof File<"u"&&cg.call(File)==="[object FileConstructor]";function Eu(s){return cT&&(s instanceof ArrayBuffer||uT(s))||dT&&s instanceof Blob||fT&&s instanceof File}function mr(s,l){if(!s||typeof s!="object")return!1;if(Array.isArray(s)){for(let i=0,c=s.length;i<c;i++)if(mr(s[i]))return!0;return!1}if(Eu(s))return!0;if(s.toJSON&&typeof s.toJSON=="function"&&arguments.length===1)return mr(s.toJSON(),!0);for(const i in s)if(Object.prototype.hasOwnProperty.call(s,i)&&mr(s[i]))return!0;return!1}function hT(s){const l=[],i=s.data,c=s;return c.data=iu(i,l),c.attachments=l.length,{packet:c,buffers:l}}function iu(s,l){if(!s)return s;if(Eu(s)){const i={_placeholder:!0,num:l.length};return l.push(s),i}else if(Array.isArray(s)){const i=new Array(s.length);for(let c=0;c<s.length;c++)i[c]=iu(s[c],l);return i}else if(typeof s=="object"&&!(s instanceof Date)){const i={};for(const c in s)Object.prototype.hasOwnProperty.call(s,c)&&(i[c]=iu(s[c],l));return i}return s}function mT(s,l){return s.data=ru(s.data,l),delete s.attachments,s}function ru(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 i=0;i<s.length;i++)s[i]=ru(s[i],l);else if(typeof s=="object")for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&(s[i]=ru(s[i],l));return s}const pT=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],gT=5;var we;(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"})(we||(we={}));class yT{constructor(l){this.replacer=l}encode(l){return(l.type===we.EVENT||l.type===we.ACK)&&mr(l)?this.encodeAsBinary({type:l.type===we.EVENT?we.BINARY_EVENT:we.BINARY_ACK,nsp:l.nsp,data:l.data,id:l.id}):[this.encodeAsString(l)]}encodeAsString(l){let i=""+l.type;return(l.type===we.BINARY_EVENT||l.type===we.BINARY_ACK)&&(i+=l.attachments+"-"),l.nsp&&l.nsp!=="/"&&(i+=l.nsp+","),l.id!=null&&(i+=l.id),l.data!=null&&(i+=JSON.stringify(l.data,this.replacer)),i}encodeAsBinary(l){const i=hT(l),c=this.encodeAsString(i.packet),d=i.buffers;return d.unshift(c),d}}function yp(s){return Object.prototype.toString.call(s)==="[object Object]"}class bu extends st{constructor(l){super(),this.reviver=l}add(l){let i;if(typeof l=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");i=this.decodeString(l);const c=i.type===we.BINARY_EVENT;c||i.type===we.BINARY_ACK?(i.type=c?we.EVENT:we.ACK,this.reconstructor=new vT(i),i.attachments===0&&super.emitReserved("decoded",i)):super.emitReserved("decoded",i)}else if(Eu(l)||l.base64)if(this.reconstructor)i=this.reconstructor.takeBinaryData(l),i&&(this.reconstructor=null,super.emitReserved("decoded",i));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+l)}decodeString(l){let i=0;const c={type:Number(l.charAt(0))};if(we[c.type]===void 0)throw new Error("unknown packet type "+c.type);if(c.type===we.BINARY_EVENT||c.type===we.BINARY_ACK){const f=i+1;for(;l.charAt(++i)!=="-"&&i!=l.length;);const p=l.substring(f,i);if(p!=Number(p)||l.charAt(i)!=="-")throw new Error("Illegal attachments");c.attachments=Number(p)}if(l.charAt(i+1)==="/"){const f=i+1;for(;++i&&!(l.charAt(i)===","||i===l.length););c.nsp=l.substring(f,i)}else c.nsp="/";const d=l.charAt(i+1);if(d!==""&&Number(d)==d){const f=i+1;for(;++i;){const p=l.charAt(i);if(p==null||Number(p)!=p){--i;break}if(i===l.length)break}c.id=Number(l.substring(f,i+1))}if(l.charAt(++i)){const f=this.tryParse(l.substr(i));if(bu.isPayloadValid(c.type,f))c.data=f;else throw new Error("invalid payload")}return c}tryParse(l){try{return JSON.parse(l,this.reviver)}catch{return!1}}static isPayloadValid(l,i){switch(l){case we.CONNECT:return yp(i);case we.DISCONNECT:return i===void 0;case we.CONNECT_ERROR:return typeof i=="string"||yp(i);case we.EVENT:case we.BINARY_EVENT:return Array.isArray(i)&&(typeof i[0]=="number"||typeof i[0]=="string"&&pT.indexOf(i[0])===-1);case we.ACK:case we.BINARY_ACK:return Array.isArray(i)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class vT{constructor(l){this.packet=l,this.buffers=[],this.reconPack=l}takeBinaryData(l){if(this.buffers.push(l),this.buffers.length===this.reconPack.attachments){const i=mT(this.reconPack,this.buffers);return this.finishedReconstruction(),i}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const xT=Object.freeze(Object.defineProperty({__proto__:null,Decoder:bu,Encoder:yT,get PacketType(){return we},protocol:gT},Symbol.toStringTag,{value:"Module"}));function cn(s,l,i){return s.on(l,i),function(){s.off(l,i)}}const ST=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class ug extends st{constructor(l,i,c){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=i,c&&c.auth&&(this.auth=c.auth),this._opts=Object.assign({},c),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const l=this.io;this.subs=[cn(l,"open",this.onopen.bind(this)),cn(l,"packet",this.onpacket.bind(this)),cn(l,"error",this.onerror.bind(this)),cn(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,...i){var c,d,f;if(ST.hasOwnProperty(l))throw new Error('"'+l.toString()+'" is a reserved event name');if(i.unshift(l),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(i),this;const p={type:we.EVENT,data:i};if(p.options={},p.options.compress=this.flags.compress!==!1,typeof i[i.length-1]=="function"){const S=this.ids++,T=i.pop();this._registerAckCallback(S,T),p.id=S}const x=(d=(c=this.io.engine)===null||c===void 0?void 0:c.transport)===null||d===void 0?void 0:d.writable,g=this.connected&&!(!((f=this.io.engine)===null||f===void 0)&&f._hasPingExpired());return this.flags.volatile&&!x||(g?(this.notifyOutgoingListeners(p),this.packet(p)):this.sendBuffer.push(p)),this.flags={},this}_registerAckCallback(l,i){var c;const d=(c=this.flags.timeout)!==null&&c!==void 0?c:this._opts.ackTimeout;if(d===void 0){this.acks[l]=i;return}const f=this.io.setTimeoutFn(()=>{delete this.acks[l];for(let x=0;x<this.sendBuffer.length;x++)this.sendBuffer[x].id===l&&this.sendBuffer.splice(x,1);i.call(this,new Error("operation has timed out"))},d),p=(...x)=>{this.io.clearTimeoutFn(f),i.apply(this,x)};p.withError=!0,this.acks[l]=p}emitWithAck(l,...i){return new Promise((c,d)=>{const f=(p,x)=>p?d(p):c(x);f.withError=!0,i.push(f),this.emit(l,...i)})}_addToQueue(l){let i;typeof l[l.length-1]=="function"&&(i=l.pop());const c={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?c.tryCount>this._opts.retries&&(this._queue.shift(),i&&i(d)):(this._queue.shift(),i&&i(null,...f)),c.pending=!1,this._drainQueue())),this._queue.push(c),this._drainQueue()}_drainQueue(l=!1){if(!this.connected||this._queue.length===0)return;const i=this._queue[0];i.pending&&!l||(i.pending=!0,i.tryCount++,this.flags=i.flags,this.emit.apply(this,i.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:we.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,i){this.connected=!1,delete this.id,this.emitReserved("disconnect",l,i),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(l=>{if(!this.sendBuffer.some(c=>String(c.id)===l)){const c=this.acks[l];delete this.acks[l],c.withError&&c.call(this,new Error("socket has been disconnected"))}})}onpacket(l){if(l.nsp===this.nsp)switch(l.type){case we.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 we.EVENT:case we.BINARY_EVENT:this.onevent(l);break;case we.ACK:case we.BINARY_ACK:this.onack(l);break;case we.DISCONNECT:this.ondisconnect();break;case we.CONNECT_ERROR:this.destroy();const c=new Error(l.data.message);c.data=l.data.data,this.emitReserved("connect_error",c);break}}onevent(l){const i=l.data||[];l.id!=null&&i.push(this.ack(l.id)),this.connected?this.emitEvent(i):this.receiveBuffer.push(Object.freeze(i))}emitEvent(l){if(this._anyListeners&&this._anyListeners.length){const i=this._anyListeners.slice();for(const c of i)c.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 i=this;let c=!1;return function(...d){c||(c=!0,i.packet({type:we.ACK,id:l,data:d}))}}onack(l){const i=this.acks[l.id];typeof i=="function"&&(delete this.acks[l.id],i.withError&&l.data.unshift(null),i.apply(this,l.data))}onconnect(l,i){this.id=l,this.recovered=i&&this._pid===i,this._pid=i,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:we.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 i=this._anyListeners;for(let c=0;c<i.length;c++)if(l===i[c])return i.splice(c,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 i=this._anyOutgoingListeners;for(let c=0;c<i.length;c++)if(l===i[c])return i.splice(c,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(l){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const i=this._anyOutgoingListeners.slice();for(const c of i)c.apply(this,l.data)}}}function zl(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}zl.prototype.duration=function(){var s=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var l=Math.random(),i=Math.floor(l*this.jitter*s);s=(Math.floor(l*10)&1)==0?s-i:s+i}return Math.min(s,this.max)|0};zl.prototype.reset=function(){this.attempts=0};zl.prototype.setMin=function(s){this.ms=s};zl.prototype.setMax=function(s){this.max=s};zl.prototype.setJitter=function(s){this.jitter=s};class ou extends st{constructor(l,i){var c;super(),this.nsps={},this.subs=[],l&&typeof l=="object"&&(i=l,l=void 0),i=i||{},i.path=i.path||"/socket.io",this.opts=i,Sr(this,i),this.reconnection(i.reconnection!==!1),this.reconnectionAttempts(i.reconnectionAttempts||1/0),this.reconnectionDelay(i.reconnectionDelay||1e3),this.reconnectionDelayMax(i.reconnectionDelayMax||5e3),this.randomizationFactor((c=i.randomizationFactor)!==null&&c!==void 0?c:.5),this.backoff=new zl({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(i.timeout==null?2e4:i.timeout),this._readyState="closed",this.uri=l;const d=i.parser||xT;this.encoder=new d.Encoder,this.decoder=new d.Decoder,this._autoConnect=i.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 i;return l===void 0?this._reconnectionDelay:(this._reconnectionDelay=l,(i=this.backoff)===null||i===void 0||i.setMin(l),this)}randomizationFactor(l){var i;return l===void 0?this._randomizationFactor:(this._randomizationFactor=l,(i=this.backoff)===null||i===void 0||i.setJitter(l),this)}reconnectionDelayMax(l){var i;return l===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=l,(i=this.backoff)===null||i===void 0||i.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 rT(this.uri,this.opts);const i=this.engine,c=this;this._readyState="opening",this.skipReconnect=!1;const d=cn(i,"open",function(){c.onopen(),l&&l()}),f=x=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",x),l?l(x):this.maybeReconnectOnOpen()},p=cn(i,"error",f);if(this._timeout!==!1){const x=this._timeout,g=this.setTimeoutFn(()=>{d(),f(new Error("timeout")),i.close()},x);this.opts.autoUnref&&g.unref(),this.subs.push(()=>{this.clearTimeoutFn(g)})}return this.subs.push(d),this.subs.push(p),this}connect(l){return this.open(l)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const l=this.engine;this.subs.push(cn(l,"ping",this.onping.bind(this)),cn(l,"data",this.ondata.bind(this)),cn(l,"error",this.onerror.bind(this)),cn(l,"close",this.onclose.bind(this)),cn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(l){try{this.decoder.add(l)}catch(i){this.onclose("parse error",i)}}ondecoded(l){xr(()=>{this.emitReserved("packet",l)},this.setTimeoutFn)}onerror(l){this.emitReserved("error",l)}socket(l,i){let c=this.nsps[l];return c?this._autoConnect&&!c.active&&c.connect():(c=new ug(this,l,i),this.nsps[l]=c),c}_destroy(l){const i=Object.keys(this.nsps);for(const c of i)if(this.nsps[c].active)return;this._close()}_packet(l){const i=this.encoder.encode(l);for(let c=0;c<i.length;c++)this.engine.write(i[c],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,i){var c;this.cleanup(),(c=this.engine)===null||c===void 0||c.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",l,i),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 i=this.backoff.duration();this._reconnecting=!0;const c=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()}))},i);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}}onreconnect(){const l=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",l)}}const Os={};function Cl(s,l){typeof s=="object"&&(l=s,s=void 0),l=l||{};const i=oT(s,l.path||"/socket.io"),c=i.source,d=i.id,f=i.path,p=Os[d]&&f in Os[d].nsps,x=l.forceNew||l["force new connection"]||l.multiplex===!1||p;let g;return x?g=new ou(c,l):(Os[d]||(Os[d]=new ou(c,l)),g=Os[d]),i.query&&!l.query&&(l.query=i.queryKey),g.socket(i.path,l)}Object.assign(Cl,{Manager:ou,Socket:ug,io:Cl,connect:Cl});V.BASE=qn;const ha={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"},TT=Kp("/tasks"),_T=100,ET=()=>{const[s,l]=m.useState(!1),[i,c]=m.useState(null),[d,f]=m.useState([]),[p,x]=m.useState(null),[g,y]=m.useState(!1),[S,T]=m.useState({}),j=K=>{T(H=>({...H,[K.taskId]:{message:K.message,ts:K.ts?new Date(K.ts).getTime():Date.now()}}))};m.useEffect(()=>(Q(),W()),[]);const _=K=>[...K].sort((H,$)=>{const ae=new Date(H.updatedAt).getTime();return new Date($.updatedAt).getTime()-ae}),N=async K=>await tn.tasksControllerCreateTask(K),w=async({taskId:K})=>await tn.tasksControllerDeleteTask(K),O=async({taskId:K,comment:H})=>await tn.tasksControllerAddComment(K,{content:H}),B=async({taskId:K,assigneeActorId:H})=>{const $={assigneeActorId:H};return await tn.tasksControllerAssignTask(K,$)},X=async({taskId:K})=>await tn.tasksControllerAssignTaskToMe(K),I=async({taskId:K,inputRequestId:H,answer:$})=>await tn.tasksControllerAnswerInputRequest(K,H,{answer:$}),Q=async()=>{l(!0),c(null);try{const K=await tn.tasksControllerListTasks(void 0,void 0,void 0,1,_T);f(_(K.items))}catch(K){c(K instanceof Error?K.message:"Failed to load tasks")}finally{l(!1)}},W=()=>{const K=Cl(TT,{transports:["websocket","polling"],withCredentials:!0});return K.on("connect",()=>{console.log("Connected to websocket"),K.emit("tasks.subscribe",{},H=>{H.ok?(console.log(H),console.log("Subscribed to room:",H.room),y(!0)):(console.error("Failed to subscribe to room"),y(!1))}),Q()}),K.on("disconnect",()=>{console.log("WebSocket disconnected"),y(!1)}),K.on(ha.TASK_CREATED,H=>{console.log("task.created",H),f($=>$.some(ae=>ae.id===H.payload.id)?$:_([H.payload,...$]))}),K.on(ha.TASK_UPDATED,H=>{console.log("task.updated",H),f($=>_($.map(ae=>ae.id===H.payload.id?H.payload:ae)))}),K.on(ha.TASK_DELETED,H=>{console.log("task.deleted",H),f($=>$.filter(ae=>ae.id!==H.payload.taskId))}),K.on(ha.TASK_ASSIGNED,H=>{console.log("task.assigned",H),f($=>_($.map(ae=>ae.id===H.payload.id?H.payload:ae)))}),K.on(ha.TASK_COMMENTED,async H=>{console.log("task.commented",H);try{const $=await tn.tasksControllerGetTask(H.payload.taskId);f(ae=>ae.findIndex(se=>se.id===$.id)===-1?_([$,...ae]):_(ae.map(se=>se.id===$.id?$:se)))}catch($){console.error("Failed to refresh task after comment",$)}}),K.on(ha.INPUT_REQUEST_ANSWERED,async H=>{console.log("input.request.answered",H);try{const $=await tn.tasksControllerGetTask(H.payload.taskId);f(ae=>ae.findIndex(se=>se.id===$.id)===-1?_([$,...ae]):_(ae.map(se=>se.id===$.id?$:se)))}catch($){console.error("Failed to refresh task after input request answer",$)}}),K.on(ha.TASK_STATUS_CHANGED,H=>{console.log("task.status_changed",H),f($=>_($.map(ae=>ae.id===H.payload.id?H.payload:ae)))}),K.on(ha.TASK_ACTIVITY,H=>{console.log("task.activity",H),j(H)}),x(K),()=>{K.close()}};return{isLoading:s,error:i,activityByTaskId:S,tasks:d,createTask:N,deleteTask:w,addComment:O,assignTask:B,assignTaskToMe:X,answerInputRequest:I,isConnected:g}},ve=tu.status,ma={[ve.NOT_STARTED]:{path:"/tasks/not-started",label:"Queued",icon:"📋"},[ve.IN_PROGRESS]:{path:"/tasks/in-progress",label:"Building",icon:"👨🏻‍💻"},[ve.FOR_REVIEW]:{path:"/tasks/in-review",label:"Review",icon:"👀"},[ve.DONE]:{path:"/tasks/done",label:"Shipped",icon:"🚀"}},bT=[ma[ve.NOT_STARTED],ma[ve.IN_PROGRESS],ma[ve.FOR_REVIEW],ma[ve.DONE]],jT=()=>({[ve.NOT_STARTED]:{enteringIds:new Set,exitingTasks:[]},[ve.IN_PROGRESS]:{enteringIds:new Set,exitingTasks:[]},[ve.FOR_REVIEW]:{enteringIds:new Set,exitingTasks:[]},[ve.DONE]:{enteringIds:new Set,exitingTasks:[]}}),dg=m.createContext(null),CT=500;function AT({children:s}){const{tasks:l,isLoading:i,error:c,isConnected:d,createTask:f,deleteTask:p,addComment:x,assignTask:g,assignTaskToMe:y,answerInputRequest:S,activityByTaskId:T}=ET(),[j,_]=m.useState(""),N=m.useRef(new Map),w=m.useRef([]),[O,B]=m.useState(0),{animationByStatus:X,globalEnteringIds:I,globalExitingTasks:Q}=m.useMemo(()=>{const K=Date.now(),H=new Map(l.map(ke=>[ke.id,ke])),$=N.current,ae=new Set($.keys()),P=new Set(H.keys());if(w.current=w.current.filter(ke=>ke.expiresAt>K),ae.size>0){const ke={[ve.NOT_STARTED]:new Set,[ve.IN_PROGRESS]:new Set,[ve.FOR_REVIEW]:new Set,[ve.DONE]:new Set},Oe={[ve.NOT_STARTED]:[],[ve.IN_PROGRESS]:[],[ve.FOR_REVIEW]:[],[ve.DONE]:[]},U=new Set,J=[];for(const[he,Ee]of H){const C=$.get(he);C?C.status!==Ee.status&&(Oe[C.status].push(C),ke[Ee.status].add(he)):(ke[Ee.status].add(he),U.add(he))}for(const[he,Ee]of $)P.has(he)||(Oe[Ee.status].push(Ee),J.push(Ee));(Object.values(ke).some(he=>he.size>0)||Object.values(Oe).some(he=>he.length>0))&&w.current.push({enteringByStatus:ke,exitingByStatus:Oe,globalEntering:U,globalExiting:J,expiresAt:K+CT})}N.current=H;const se=jT();let De=new Set,it=[];for(const ke of w.current){for(const Oe of Object.values(ve))ke.enteringByStatus[Oe].forEach(U=>se[Oe].enteringIds.add(U)),se[Oe].exitingTasks.push(...ke.exitingByStatus[Oe]);ke.globalEntering.forEach(Oe=>De.add(Oe)),it.push(...ke.globalExiting)}return{animationByStatus:se,globalEnteringIds:De,globalExitingTasks:it}},[l,O]);m.useEffect(()=>{if(w.current.length===0)return;const H=Math.min(...w.current.map(ae=>ae.expiresAt))-Date.now();if(H<=0){B(ae=>ae+1);return}const $=setTimeout(()=>{B(ae=>ae+1)},H);return()=>clearTimeout($)},[X,I,Q]);const W=m.useMemo(()=>({tasks:l,createTask:f,deleteTask:p,addComment:x,assignTask:g,assignTaskToMe:y,answerInputRequest:S,isLoading:i,error:c,isConnected:d,sectionTitle:j,setSectionTitle:_,animationByStatus:X,globalEnteringIds:I,globalExitingTasks:Q,activityByTaskId:T}),[l,f,p,x,g,y,S,i,c,d,j,_,X,I,Q,T]);return r.jsx(dg.Provider,{value:W,children:s})}function Hs(){const s=m.useContext(dg);if(!s)throw new Error("useTasksCtx must be used within <TasksProvider>");return s}function vn({title:s,onCancel:l,onSave:i,children:c,headerLeft:d,headerRight:f,closeMs:p=220}){const[x,g]=m.useState(!1),[y,S]=m.useState(!1);m.useEffect(()=>{requestAnimationFrame(()=>g(!0))},[]);function T(){g(!1),setTimeout(()=>l?.(),p)}async function j(){if(!(!i||y))try{S(!0),await i()&&T()}catch{}finally{S(!1)}}return r.jsxs("div",{className:`pop-shell__overlay ${x?"pop-shell__overlay--open":""}`,children:[r.jsx("div",{className:"pop-shell__space",onClick:T}),r.jsxs("div",{className:`pop-shell__main-panel ${x?"pop-shell__main-panel--open":""}`,children:[r.jsxs("div",{className:"pop-shell__main-title",children:[d??r.jsx("div",{onClick:T,children:r.jsx(E,{size:"4",weight:"normal",className:"pop-shell__main-title-button",children:"cancel"})}),r.jsx(E,{size:"4",weight:"medium",children:s}),f??r.jsx("div",{onClick:j,style:{opacity:y?.6:1,pointerEvents:y?"none":"auto"},children:r.jsx(E,{size:"4",weight:"normal",className:"pop-shell__main-title-button",children:y?"saving":"save"})})]}),r.jsx("div",{className:"pop-shell__main-content",children:c})]})]})}function ju({key:s,defaultValue:l,debounceMs:i=500}){const[c,d]=m.useState(()=>{try{const x=localStorage.getItem(s);if(x)return JSON.parse(x)}catch(x){console.error("Error loading draft from localStorage:",x)}return l}),f=m.useRef(void 0);return m.useEffect(()=>(f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{try{localStorage.setItem(s,JSON.stringify(c))}catch(x){console.error("Error saving draft to localStorage:",x)}},i),()=>{f.current&&clearTimeout(f.current)}),[c,s,i]),[c,d,()=>{try{localStorage.removeItem(s),d(l)}catch(x){console.error("Error clearing draft from localStorage:",x)}}]}const NT={title:"",description:""},vp=s=>{s&&(s.style.height="auto",s.style.height=`${s.scrollHeight}px`)};function xp({onCancel:s,onSave:l}){const[i,c,d]=ju({key:"new-task-draft",defaultValue:NT}),{title:f,description:p}=i,x=m.useRef(null),g=m.useRef(null),y=(j,_)=>{c({...i,[j]:_})};m.useEffect(()=>{x.current?.focus()},[]),m.useEffect(()=>{vp(g.current)},[p]);function S(j){y("description",j.target.value),vp(j.target)}async function T(){const j=await l({title:f,description:p});return j&&d(),j}return r.jsx(vn,{title:"Create a Task",onCancel:s,onSave:T,children:r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"new-task-pop__input-title",children:r.jsx("input",{className:"new-task-pop__input-title",ref:x,placeholder:"Title",value:f,onChange:j=>y("title",j.target.value),onKeyDown:j=>{j.key==="Enter"&&(j.preventDefault(),g.current?.focus())}})}),r.jsx("div",{className:"new-task-pop__input-description",children:r.jsx("textarea",{className:"new-task-pop__input-description",ref:g,placeholder:"Enter a description (optional)",value:p,onChange:S})})]})})}const yt=s=>{const l=new Date(s),c=Math.round((new Date().getTime()-l.getTime())/(1e3*60));if(c<60)return`${Math.max(c,1)}m ago`;const d=Math.round(c/60);return d<24?`${d}h ago`:l.toLocaleDateString("en-US",{month:"short",day:"numeric"})};function Ic({task:s,animation:l,onClick:i,pulseKey:c}){const[d,f]=m.useState(!1);m.useEffect(()=>{if(c==null)return;f(!0);const g=setTimeout(()=>f(!1),1e3);return()=>clearTimeout(g)},[c]);const p=s.tags.map(g=>({label:g.name}));s.comments.length&&p.push({label:`💬 ${s.comments.length}`});const x=s.inputRequests.filter(g=>!g.resolvedAt).length;return x&&p.push({label:`✋ ${x}`}),r.jsxs(de,{leading:r.jsx(Xe,{name:s.createdByActor.displayName,size:"lg",src:s.createdByActor.avatarUrl||void 0}),topRight:yt(s.updatedAt),tags:p,animation:l,highlight:s.inputRequests.filter(g=>!g.resolvedAt)?.length>0,onClick:i,children:[r.jsxs(E,{className:"pre",children:["#",s.id.slice(0,6)]}),r.jsx("div",{style:{minWidth:0,overflow:"hidden"},children:r.jsx(E,{weight:"bold",size:"3",tone:"default",children:r.jsxs("span",{className:"task-row__title",children:[r.jsx("span",{className:"task-row__titleText",children:s.name}),d?r.jsx("span",{className:"task-row__pulseDot","aria-hidden":!0}):null]})})}),r.jsx("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s.description}),r.jsxs("div",{style:{fontSize:12},className:"text--tone-muted",children:[s.assignee?`Assigned: @${s.assignee}`:"unassigned"," · ",`Created by @${s.createdByActor.slug}`]})]})}function fg(s){const l=new Map,i=new Date;i.setHours(0,0,0,0);for(const c of s){const d=new Date(c.updatedAt);d.setHours(0,0,0,0);const f=d.toISOString().split("T")[0],p=d.getTime()===i.getTime();l.has(f)||l.set(f,{date:d,dateKey:f,tasks:[],isToday:p}),l.get(f).tasks.push(c)}return Array.from(l.values()).sort((c,d)=>d.date.getTime()-c.date.getTime())}function hg(s){const l=new Date;l.setHours(0,0,0,0);const i=new Date(l);i.setDate(i.getDate()-1);const c=new Date(s);if(c.setHours(0,0,0,0),c.getTime()===l.getTime())return"Today";if(c.getTime()===i.getTime())return"Yesterday";const d=l.getFullYear(),f=c.getFullYear(),x=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][c.getMonth()],g=c.getDate();return f===d?`${x} ${g}`:`${x} ${g}, ${f}`}function RT({date:s,taskCount:l,isExpanded:i,onClick:c}){const d=hg(s),f=i?"▼":"▶";return r.jsx(de,{onClick:c,className:"day-summary-row",children:r.jsxs("div",{className:"day-summary-row__content",children:[r.jsx("span",{className:"day-summary-row__chevron",children:f}),r.jsx(E,{weight:"bold",size:"3",children:d}),r.jsxs(E,{size:"2",tone:"muted",className:"day-summary-row__count",children:["· ",l," ",l===1?"task":"tasks"," shipped"]})]})})}function wT({tasks:s,enteringIds:l,exitingTasks:i,groupByDay:c=!1}){const d=We(),{activityByTaskId:f}=Hs(),[p,x]=m.useState(new Set),g=new Set(i.map(j=>j.id)),y=[...s,...i].sort((j,_)=>new Date(_.updatedAt).getTime()-new Date(j.updatedAt).getTime());if(!c)return r.jsx(ce,{children:y.map(j=>{const _=g.has(j.id),N=l.has(j.id);let w;_?w="exiting":N&&(w="entering");const O=f[j.id];return r.jsx(Ic,{task:j,animation:w,pulseKey:O?.ts,onClick:()=>d(`/tasks/task/${j.id}`)},_?`exiting-${j.id}`:j.id)})});const S=fg(y),T=j=>{x(_=>{const N=new Set(_);return N.has(j)?N.delete(j):N.add(j),N})};return r.jsx(ce,{children:S.map(j=>{if(j.isToday)return j.tasks.map(N=>{const w=g.has(N.id),O=l.has(N.id);let B;w?B="exiting":O&&(B="entering");const X=f[N.id];return r.jsx(Ic,{task:N,animation:B,pulseKey:X?.ts,onClick:()=>d(`/tasks/task/${N.id}`)},w?`exiting-${N.id}`:N.id)});const _=p.has(j.dateKey);return r.jsxs("div",{children:[r.jsx(RT,{date:j.date,taskCount:j.tasks.length,isExpanded:_,onClick:()=>T(j.dateKey)}),_&&j.tasks.map(N=>{const w=g.has(N.id),O=l.has(N.id);let B;w?B="exiting":O&&(B="entering");const X=f[N.id];return r.jsx(Ic,{task:N,animation:B,pulseKey:X?.ts,onClick:()=>d(`/tasks/task/${N.id}`)},w?`exiting-${N.id}`:N.id)})]},j.dateKey)})})}function $c({task:s,animation:l,onClick:i,pulseKey:c}){const d=s.tags.map(p=>({label:p.name}));s.comments.length&&d.push({label:`💬 ${s.comments.length}`});const f=s.inputRequests.filter(p=>!p.resolvedAt).length;return f&&d.push({label:`✋ ${f}`}),r.jsxs($p,{leading:r.jsx(Xe,{name:s.createdByActor.displayName,size:"md",src:s.createdByActor.avatarUrl||void 0}),topRight:yt(s.updatedAt),tags:d,animation:l,onClick:i,pulseKey:c,highlight:s.inputRequests.filter(p=>!p.resolvedAt)?.length>0,footer:r.jsxs(r.Fragment,{children:[r.jsxs("span",{className:"row-detail truncate",children:["#",s.id.slice(0,6)]}),r.jsx("span",{className:"row-detail truncate",children:s.assigneeActor?`Assigned: @${s.assigneeActor.slug}`:"unassigned"})]}),children:[r.jsx("div",{className:"row-title truncate",children:s.name}),r.jsx("div",{className:"row-subtitle truncate",children:s.description})]})}function OT({date:s,taskCount:l,isExpanded:i,onClick:c}){const d=hg(s),f=i?"▼":"▶";return r.jsxs("div",{className:"day-summary-card__content",onClick:c,children:[r.jsx("span",{className:"day-summary-card__chevron",children:f}),r.jsxs("span",{className:"day-summary-card__text",children:[r.jsx("strong",{children:d})," · ",l," ",l===1?"task":"tasks"]})]})}function zT({tasks:s,enteringIds:l,exitingTasks:i,groupByDay:c=!1}){const d=We(),{activityByTaskId:f}=Hs(),[p,x]=m.useState(new Set),g=new Set(i.map(_=>_.id)),y=[...s,...i].sort((_,N)=>new Date(N.updatedAt).getTime()-new Date(_.updatedAt).getTime());if(!c)return r.jsx(r.Fragment,{children:y.map(_=>{const N=g.has(_.id),w=l.has(_.id),O=f[_.id];let B;return N?B="exiting":w&&(B="entering"),r.jsx($c,{task:_,animation:B,onClick:()=>d(`/tasks/task/${_.id}`),pulseKey:O?.ts},N?`exiting-${_.id}`:_.id)})});const S=[],T=fg(y),j=_=>{x(N=>{const w=new Set(N);return w.has(_)?w.delete(_):w.add(_),w})};return T.forEach(_=>{if(_.isToday){_.tasks.forEach(w=>{const O=g.has(w.id),B=l.has(w.id),X=f[w.id];let I;O?I="exiting":B&&(I="entering");const Q=r.jsx($c,{task:w,animation:I,onClick:()=>d(`/tasks/task/${w.id}`),pulseKey:X?.ts},O?`exiting-${w.id}`:w.id);S.push(Q)});return}const N=p.has(_.dateKey);S.push(r.jsx(OT,{date:_.date,taskCount:_.tasks.length,isExpanded:N,onClick:()=>j(_.dateKey)},`date-group-${_.date}`)),N&&_.tasks.forEach(w=>{const O=g.has(w.id),B=l.has(w.id),X=f[w.id];let I;O?I="exiting":B&&(I="entering");const Q=r.jsx($c,{task:w,animation:I,onClick:()=>d(`/tasks/task/${w.id}`),pulseKey:X?.ts},O?`exiting-${w.id}`:w.id);S.push(Q)})}),r.jsx(r.Fragment,{children:S})}function or({status:s}){const l=Xt(),i=l?void 0:s,{tasks:c,createTask:d,setSectionTitle:f,animationByStatus:p,globalEnteringIds:x,globalExitingTasks:g,activityByTaskId:y}=Hs(),S=We();m.useEffect(()=>{if(!i){f("All Tasks");return}f(ma[i].label)},[i,f]);const T=m.useMemo(()=>i?c.filter(I=>I.status===i):c,[c,i]),j=m.useMemo(()=>i?{enteringIds:p[i].enteringIds,exitingTasks:p[i].exitingTasks}:{enteringIds:x,exitingTasks:g},[i,p,x,g]),[_,N]=m.useState(null),[w,O]=m.useState(!1),B=()=>{console.log("cancel"),O(!1)},X=async({title:I,description:Q})=>{console.log(`save title: ${I} - description: ${Q}`),N({name:I,description:Q});try{const W=await d({name:I,description:Q});return W?(N(W),S(`/tasks/task/${W.id}`),!0):!1}catch(W){return console.error("Error saving task"),console.error(W),!1}};return r.jsx("div",{className:`${l?"full-height":""}`,children:l?r.jsxs("div",{className:"tasks-page",children:[r.jsx(DT,{tasks:c,animationByStatus:p}),r.jsxs("button",{className:"tasks-fab tasks-fab--desktop",type:"button",onClick:()=>O(!0),children:[r.jsx("span",{className:"tasks-fab__plus",children:"+"}),r.jsx("span",{className:"tasks-fab__label",children:"New task"})]}),w?r.jsx(xp,{onCancel:B,onSave:X}):null]}):r.jsxs(r.Fragment,{children:[r.jsx(wT,{tasks:T,enteringIds:j.enteringIds,exitingTasks:j.exitingTasks,groupByDay:i===ve.DONE}),r.jsx("button",{className:"tasks-fab",type:"button",onClick:()=>O(!0),"aria-label":"Create new task",children:"+"}),w?r.jsx(xp,{onCancel:B,onSave:X}):null]})})}function cr({tasks:s,status:l,animationState:i}){const c=m.useMemo(()=>s.filter(f=>f.status===l),[s,l]),d=ma[l].label;return r.jsxs("div",{className:"tasks-board-column",children:[r.jsxs("div",{className:"tasks-board-column__header",children:[r.jsx(E,{size:"3",weight:"bold",children:d}),r.jsx(E,{size:"1",tone:"muted",children:c.length})]}),r.jsx("div",{className:"tasks-board-column__body",children:r.jsx(zT,{tasks:c,enteringIds:i.enteringIds,exitingTasks:i.exitingTasks,groupByDay:l===ve.DONE})})]})}function DT({tasks:s,animationByStatus:l}){return r.jsxs("div",{className:"tasks-board-view",children:[r.jsx(cr,{status:ve.NOT_STARTED,tasks:s,animationState:l[ve.NOT_STARTED]}),r.jsx(cr,{status:ve.IN_PROGRESS,tasks:s,animationState:l[ve.IN_PROGRESS]}),r.jsx(cr,{status:ve.FOR_REVIEW,tasks:s,animationState:l[ve.FOR_REVIEW]}),r.jsx(cr,{status:ve.DONE,tasks:s,animationState:l[ve.DONE]})]})}function kT(){const s=Xt(),{sectionTitle:l}=Hs();return console.log("Tasks layout mounting"),r.jsx("div",{style:{minHeight:0},children:s?r.jsx(La,{sectionTitle:l,children:r.jsx(At,{})}):r.jsx(Ha,{appTitle:"Tasks",sectionTitle:l,navItems:bT,children:r.jsx(At,{})})})}function mg({onDelete:s,deleteLabel:l="Delete",confirmLabel:i="Confirm Delete",cancelLabel:c="Cancel",className:d,size:f="lg"}){const[p,x]=m.useState(!1),g=async()=>{await s(),x(!1)};return r.jsx(ce,{className:d,children:p?r.jsxs(r.Fragment,{children:[r.jsx(_e,{size:f,variant:"secondary",onClick:()=>x(!1),children:c}),r.jsx(_e,{size:f,variant:"danger",onClick:g,children:i})]}):r.jsx(_e,{size:f,variant:"danger",onClick:()=>x(!0),children:l})})}const MT={content:""},Sp=s=>{s&&(s.style.height="auto",s.style.height=`${s.scrollHeight}px`)};function UT({onCancel:s,onSave:l,taskId:i}){const[c,d,f]=ju({key:`new-comment-draft-${i}`,defaultValue:MT}),{content:p}=c,x=m.useRef(null);m.useEffect(()=>{x.current?.focus()},[]),m.useEffect(()=>{Sp(x.current)},[p]);function g(S){d({...c,content:S.target.value}),Sp(S.target)}async function y(){const S=await l({content:p});return S&&f(),S}return r.jsx(vn,{title:"Add Comment",onCancel:s,onSave:y,children:r.jsx(r.Fragment,{children:r.jsx("div",{className:"new-comment-pop__input-content",children:r.jsx("textarea",{className:"new-comment-pop__input-content",ref:x,placeholder:"Leave a comment...",value:p,onChange:g})})})})}const BT={answer:""},Jc=s=>{s&&(s.style.height="auto",s.style.height=`${s.scrollHeight}px`)};function LT({onCancel:s,onSave:l,taskId:i,inputRequestId:c,question:d}){const[f,p,x]=ju({key:`answer-input-request-draft-${c}`,defaultValue:BT}),{answer:g}=f,y=m.useRef(null),S=m.useRef(null);m.useEffect(()=>{S.current?.focus()},[]),m.useEffect(()=>{Jc(y.current)},[d]),m.useEffect(()=>{Jc(S.current)},[g]);function T(_){p({...f,answer:_.target.value}),Jc(_.target)}async function j(){const _=await l({answer:g});return _&&x(),_}return r.jsx(vn,{title:"Answer Input Request",onCancel:s,onSave:j,children:r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"new-comment-pop__input-content",children:r.jsx("textarea",{className:"new-comment-pop__input-content",ref:y,value:d,readOnly:!0,style:{opacity:.7,cursor:"default"}})}),r.jsx("div",{className:"new-comment-pop__input-content",children:r.jsx("textarea",{className:"new-comment-pop__input-content",ref:S,placeholder:"Your answer...",value:g,onChange:T})})]})})}function HT({onCancel:s,onSave:l,existingTags:i}){const[c,d]=m.useState([]),[f,p]=m.useState(!0),[x,g]=m.useState(""),[y,S]=m.useState(null),[T,j]=m.useState(0),_=m.useRef(null),N=m.useRef(null);m.useEffect(()=>{(async()=>{try{const H=await t0.metaControllerGetAllTags();d(H)}catch(H){console.error("Failed to load tags:",H)}finally{p(!1)}})()},[]),m.useEffect(()=>{_.current?.focus()},[]);const w=m.useMemo(()=>{const K=new Set(i.map(P=>P.id)),H=c.filter(P=>!K.has(P.id));if(!x.trim())return H;const $=x.toLowerCase().trim();return H.map(P=>{let se=0;return P.name.toLowerCase().startsWith($)?se+=100:P.name.toLowerCase().includes($)&&(se+=50),{tag:P,score:se}}).filter(P=>P.score>0).sort((P,se)=>se.score-P.score).map(P=>P.tag)},[c,i,x]),O=m.useMemo(()=>{if(!x.trim())return!1;const K=x.toLowerCase().trim();return!c.some(H=>H.name.toLowerCase()===K)},[x,c]);m.useEffect(()=>{j(0)},[w.length,x,O]),m.useEffect(()=>{if(N.current){const K=w.length+(O?1:0);if(T<K){const H=N.current.children[T];H&&H.scrollIntoView({block:"nearest"})}}},[T,w.length,O]);const B=m.useCallback(K=>{const H=w.length+(O?1:0);if(H!==0)switch(K.key){case"ArrowDown":K.preventDefault(),j($=>$<H-1?$+1:$);break;case"ArrowUp":K.preventDefault(),j($=>$>0?$-1:0);break;case"Enter":K.preventDefault(),T<w.length?S(w[T]):O&&T===w.length&&S({id:"",name:x.trim(),color:void 0,createdAt:"",updatedAt:""});break;case"Escape":K.preventDefault(),y&&S(null);break}},[w,T,O,y,x]),X=K=>{S(K)},I=()=>{S({id:"",name:x.trim(),color:void 0,createdAt:"",updatedAt:""})},Q=()=>{S(null),g(""),_.current?.focus()};async function W(){return y?l(y):!1}return r.jsx(vn,{title:"Add Tag",onCancel:s,onSave:W,children:r.jsx("div",{className:"tag-search-pop",children:y?r.jsxs("div",{className:"tag-search-pop__selected",onClick:Q,children:[r.jsx("div",{className:"tag-search-pop__tag-badge",style:{backgroundColor:y.color||"#999"},children:y.name}),r.jsx(E,{tone:"muted",size:"2",className:"tag-search-pop__clear",children:"tap to change"})]}):r.jsxs(r.Fragment,{children:[r.jsx("input",{ref:_,type:"text",className:"tag-search-pop__input",placeholder:"Search or create tag...",value:x,onChange:K=>g(K.target.value),onKeyDown:B}),r.jsx("div",{className:"tag-search-pop__list",ref:N,children:f?r.jsx("div",{className:"tag-search-pop__empty",children:r.jsx(E,{tone:"muted",children:"Loading tags..."})}):w.length===0&&!O?r.jsx("div",{className:"tag-search-pop__empty",children:r.jsx(E,{tone:"muted",children:"No tags found"})}):r.jsxs(r.Fragment,{children:[w.map((K,H)=>r.jsx("div",{className:`tag-search-pop__item ${H===T?"tag-search-pop__item--highlighted":""}`,onClick:()=>X(K),onMouseEnter:()=>j(H),children:r.jsx("div",{className:"tag-search-pop__tag-badge",style:{backgroundColor:K.color||"#999"},children:K.name})},K.id)),O&&r.jsxs("div",{className:`tag-search-pop__item tag-search-pop__item--create ${T===w.length?"tag-search-pop__item--highlighted":""}`,onClick:I,onMouseEnter:()=>j(w.length),children:[r.jsx(E,{size:"2",tone:"muted",children:"Create new tag:"}),r.jsx("div",{className:"tag-search-pop__tag-badge",style:{backgroundColor:"#999"},children:x.trim()})]})]})})]})})})}V.BASE=qn;const pg=m.createContext(null);function qT({children:s}){const[l,i]=m.useState([]),[c,d]=m.useState(!1),[f,p]=m.useState(null);m.useEffect(()=>{x()},[]);const x=async()=>{d(!0),p(null);try{const S=await PS.actorControllerListActors();i(S||[])}catch(S){p(S instanceof Error?S.message:"Failed to load actors")}finally{d(!1)}},g=async()=>{await x()},y=m.useMemo(()=>({actors:l,isLoading:c,error:f,refreshActors:g}),[l,c,f]);return r.jsx(pg.Provider,{value:y,children:s})}function Cu(){const s=m.useContext(pg);if(!s)throw new Error("useActorsCtx must be used within <ActorsProvider>");return s}function GT({onCancel:s,onSave:l}){const{actors:i}=Cu(),[c,d]=m.useState(""),[f,p]=m.useState(null),[x,g]=m.useState(0),y=m.useRef(null),S=m.useRef(null);m.useEffect(()=>{y.current?.focus()},[]);const T=m.useMemo(()=>{if(!c.trim())return i;const O=c.toLowerCase().trim();return i.map(X=>{let I=0;X.slug.toLowerCase().startsWith(O)?I+=100:X.slug.toLowerCase().includes(O)&&(I+=50);const Q=X.displayName.toLowerCase().split(" ");for(const W of Q)W.startsWith(O)?I+=80:W.includes(O)&&(I+=30);return{actor:X,score:I}}).filter(X=>X.score>0).sort((X,I)=>I.score-X.score).map(X=>X.actor)},[i,c]);m.useEffect(()=>{g(0)},[T.length,c]),m.useEffect(()=>{if(S.current){const O=S.current.children[x];O&&O.scrollIntoView({block:"nearest"})}},[x]);const j=m.useCallback(O=>{if(T.length!==0)switch(O.key){case"ArrowDown":O.preventDefault(),g(B=>B<T.length-1?B+1:B);break;case"ArrowUp":O.preventDefault(),g(B=>B>0?B-1:0);break;case"Enter":O.preventDefault(),T[x]&&p(T[x]);break;case"Escape":O.preventDefault(),f&&p(null);break}},[T,x,f]),_=O=>{p(O)},N=()=>{p(null),d(""),y.current?.focus()};async function w(){return f?l(f):!1}return r.jsx(vn,{title:"Assign Task",onCancel:s,onSave:w,children:r.jsx("div",{className:"actor-search-pop",children:f?r.jsxs("div",{className:"actor-search-pop__selected",onClick:N,children:[r.jsx(Xe,{name:f.displayName,size:"md",src:f.avatarUrl||void 0}),r.jsxs("div",{className:"actor-search-pop__selected-info",children:[r.jsx(E,{weight:"medium",size:"3",children:f.displayName}),r.jsxs(E,{tone:"muted",size:"2",children:["@",f.slug]})]}),r.jsx(E,{tone:"muted",size:"2",className:"actor-search-pop__clear",children:"tap to change"})]}):r.jsxs(r.Fragment,{children:[r.jsx("input",{ref:y,type:"text",className:"actor-search-pop__input",placeholder:"Search by name or @slug...",value:c,onChange:O=>d(O.target.value),onKeyDown:j}),r.jsx("div",{className:"actor-search-pop__list",ref:S,children:T.length===0?r.jsx("div",{className:"actor-search-pop__empty",children:r.jsx(E,{tone:"muted",children:"No actors found"})}):T.map((O,B)=>r.jsxs("div",{className:`actor-search-pop__item ${B===x?"actor-search-pop__item--highlighted":""}`,onClick:()=>_(O),onMouseEnter:()=>g(B),children:[r.jsx(Xe,{name:O.displayName,size:"sm",src:O.avatarUrl||void 0}),r.jsxs("div",{className:"actor-search-pop__item-info",children:[r.jsx(E,{weight:"medium",size:"2",children:O.displayName}),r.jsxs(E,{tone:"muted",size:"1",children:["@",O.slug," · ",O.type]})]})]},O.id))})]})})})}function YT(){const{d:s}=Ba(),l=We(),{tasks:i,setSectionTitle:c,addComment:d,deleteTask:f,assignTask:p,assignTaskToMe:x,answerInputRequest:g,activityByTaskId:y}=Hs(),{actors:S}=Cu(),{user:T}=Ls(),[j,_]=m.useState(null),[N,w]=m.useState("idle"),O=m.useRef(null),B=m.useRef(null),X=3500,I=220,Q=i.find(pe=>pe.id===s);m.useEffect(()=>{if(!Q){c("Task");return}c(Q.name)},[Q,c]),m.useEffect(()=>()=>{O.current&&window.clearTimeout(O.current),B.current&&window.clearTimeout(B.current)},[]);const[W,K]=m.useState(null),[H,$]=m.useState(!1),[ae,P]=m.useState(!1),[se,De]=m.useState(!1),[it,ke]=m.useState(!1),[Oe,U]=m.useState(null),J=async({content:pe})=>{if(!Q)return!1;try{return await d({taskId:Q.id,comment:pe}),!0}catch{return!1}},re=()=>{P(!1)},he=async pe=>{if(!Q)return!1;try{return await p({taskId:Q.id,assigneeActorId:pe.id}),!0}catch{return!1}},Ee=()=>{De(!1)},C=async({answer:pe})=>{if(!Q||!Oe)return!1;try{return await g({taskId:Q.id,inputRequestId:Oe.id,answer:pe}),!0}catch{return!1}},G=()=>{U(null)},F=async pe=>{if(!Q)return!1;try{return await tn.tasksControllerAddTagToTask(Q.id,{name:pe.name}),!0}catch{return!1}},ee=()=>{ke(!1)},fe=async pe=>{if(Q)try{await tn.tasksControllerRemoveTagFromTask(Q.id,pe)}catch(me){const xt=me?.body?.detail||me?.message||"Failed to remove tag";K(xt)}},ye=Q?y[Q.id]:null;if(m.useEffect(()=>{!Q||!ye||(O.current&&window.clearTimeout(O.current),B.current&&window.clearTimeout(B.current),_(ye),w("enter"),O.current=window.setTimeout(()=>{w("exit"),B.current=window.setTimeout(()=>{_(null),w("idle")},I)},X))},[ye,Q,I,X]),!Q)return r.jsx("div",{className:"task-detail-page",children:r.jsxs(ue,{spacing:"4",align:"center",children:[r.jsx(E,{size:"3",tone:"muted",children:"Task not found"}),r.jsx(_e,{variant:"secondary",onClick:()=>l("/tasks"),children:"Back to tasks"})]})});const be=async pe=>{$(!0);try{await tn.tasksControllerChangeStatus(Q.id,{status:pe}),K(null)}catch(me){const xt=me?.body?.detail||me?.message||"Failed to change status";K(xt)}finally{$(!1)}};return r.jsxs("div",{className:"task-detail-page",children:[W&&r.jsxs(Ua,{children:[r.jsx("button",{onClick:()=>K(null),className:"task-detail-page__error-close",children:"×"}),W]}),r.jsxs(ce,{className:"task-detail-page__section",children:[r.jsxs(de,{leading:r.jsx(Xe,{size:"sm",name:Q.createdByActor.displayName,src:Q.createdByActor.avatarUrl||void 0}),tags:[VT({status:Q.status}),...Q.tags.map(pe=>({label:pe.name}))],topRight:r.jsx(E,{size:"1",tone:"muted",children:yt(Q.updatedAt)}),children:[r.jsx(E,{as:"span",weight:"medium",size:"3",children:Q.createdByActor.displayName}),r.jsx(E,{as:"span",weight:"normal",tone:"muted",size:"3",children:` @${Q.createdByActor.slug} created `}),r.jsxs(E,{as:"span",tone:"muted",style:"mono",children:["#",Q.id.slice(0,6)]}),Q.assigneeActor?null:r.jsx(E,{tone:"muted",children:"unassigned"})]}),Q.assigneeActor?r.jsxs(de,{leading:r.jsx(Xe,{size:"sm",name:Q.assigneeActor.displayName,src:Q.assigneeActor.avatarUrl||void 0}),onClick:()=>De(!0),children:[r.jsx(E,{as:"span",weight:"medium",size:"3",children:Q.assigneeActor.displayName}),r.jsx(E,{as:"span",weight:"normal",tone:"muted",size:"3",children:` @${Q.assigneeActor.slug} assigned`}),r.jsx(E,{size:"1",tone:"muted",children:"tap to reassign"})]}):null]}),r.jsx(ce,{className:"task-detail-page__section",children:r.jsxs("div",{className:"task-detail-page__tags",children:[r.jsx(E,{size:"2",weight:"medium",children:"Tags"}),r.jsxs("div",{className:"task-detail-page__tags-list",children:[Q.tags.length===0?r.jsx(E,{size:"2",tone:"muted",children:"No tags"}):Q.tags.map(pe=>r.jsxs("button",{className:"task-detail-page__tag",style:{backgroundColor:pe.color||"#999"},onClick:()=>fe(pe.id),title:"Click to remove",children:[pe.name,r.jsx("span",{className:"task-detail-page__tag-remove",children:"×"})]},pe.id)),r.jsx(_e,{size:"sm",variant:"secondary",onClick:()=>ke(!0),children:"+ Add Tag"})]})]})}),r.jsx(ce,{className:"task-detail-page__section",children:r.jsxs(de,{leading:r.jsx(Xe,{size:"sm",name:Q.createdByActor.displayName,src:Q.createdByActor.avatarUrl||void 0}),tags:[],topRight:r.jsx(E,{size:"1",tone:"muted",children:yt(Q.createdAt)}),children:[r.jsx(E,{as:"span",weight:"medium",size:"3",children:Q.createdByActor.displayName}),r.jsx(E,{as:"span",weight:"normal",tone:"muted",size:"3",children:` @${Q.createdByActor.slug}`}),r.jsx(E,{children:Q.description?Q.description:"no description"})]})}),r.jsx(ce,{className:"task-detail-page__section",children:[...Q.comments.map(me=>({type:"comment",data:me,timestamp:new Date(me.createdAt).getTime()})),...Q.inputRequests.map(me=>({type:"inputRequest",data:me,timestamp:new Date(me.createdAt).getTime()}))].sort((me,xt)=>me.timestamp-xt.timestamp).map((me,xt)=>{if(me.type==="comment"){const Qe=me.data,Nt=Qe.commenterActor?.displayName||"unknown",un=Qe.commenterActor?.slug||"unknown";return r.jsxs(de,{leading:r.jsx(Xe,{size:"sm",name:Nt,src:Qe.commenterActor?.avatarUrl||void 0}),topRight:r.jsx(E,{size:"1",tone:"muted",children:yt(Qe.createdAt)}),children:[r.jsx(E,{as:"span",weight:"medium",size:"3",children:Nt}),r.jsx(E,{as:"span",weight:"normal",tone:"muted",size:"3",children:` @${un}`}),r.jsx(E,{children:Qe.content})]},`comment-${Qe.id}`)}else if(me.type==="inputRequest"){const Qe=me.data,Nt=S.find(Dl=>Dl.id===Qe.askedByActorId),un=S.find(Dl=>Dl.id===Qe.assignedToActorId),Rt=Nt?.displayName||"Unknown",ya=Nt?.slug||"unknown",Gn=un?.displayName||"Unknown",qa=un?.slug||"unknown",ln=!!Qe.resolvedAt,te=T&&Qe.assignedToActorId===T.actorId,ze=typeof Qe.answer=="string"?Qe.answer:JSON.stringify(Qe.answer),dn=ln?[{label:"resolved question",color:"gray"},{label:"answer",color:"green"}]:[{label:"question",color:"orange"}];return r.jsx(de,{leading:ln?r.jsxs("div",{className:"task-detail-page__input-request-avatars",children:[r.jsx(Xe,{size:"sm",name:Rt,src:Nt?.avatarUrl||void 0}),r.jsx(Xe,{size:"sm",name:Gn,src:un?.avatarUrl||void 0})]}):r.jsx(Xe,{size:"sm",name:Rt,src:Nt?.avatarUrl||void 0}),tags:dn,topRight:r.jsx(E,{size:"1",tone:"muted",children:yt(Qe.createdAt)}),children:r.jsxs(ue,{spacing:"2",children:[r.jsxs("div",{className:"task-detail-page__input-request",children:[r.jsxs("div",{className:"task-detail-page__input-request-question",children:[r.jsxs("div",{className:"task-detail-page__input-request-header",children:[r.jsx(E,{as:"span",weight:"medium",size:"3",children:Rt}),r.jsx(E,{as:"span",weight:"normal",tone:"muted",size:"3",children:` @${ya}`})]}),r.jsxs(E,{children:[r.jsx(E,{as:"span",tone:"muted",children:"Asked:"})," ",Qe.question]})]}),ln?r.jsxs("div",{className:"task-detail-page__input-request-answer",children:[r.jsxs("div",{className:"task-detail-page__input-request-header",children:[r.jsx(E,{as:"span",weight:"medium",size:"3",children:Gn}),r.jsx(E,{as:"span",weight:"normal",tone:"muted",size:"3",children:` @${qa}`})]}),r.jsxs(E,{children:[r.jsx(E,{as:"span",tone:"muted",children:"Answered:"})," ",ze]})]}):null]}),!ln&&te&&r.jsx(_e,{size:"sm",variant:"primary",onClick:()=>U(Qe),children:"Respond"})]})},`input-request-${Qe.id}`)}})}),r.jsx(ce,{className:"task-detail-page__section",children:r.jsx("div",{className:"task-detail-page__activity",children:r.jsxs("div",{className:`task-detail-page__activity-slot ${j?"task-detail-page__activity-slot--active":""}`,children:[r.jsx("div",{className:"task-detail-page__activity-placeholder",children:r.jsx(E,{size:"2",tone:"muted",children:"Live activity will show here"})}),j?r.jsx("div",{className:`task-detail-page__activity-card ${N==="enter"?"is-entering":""} ${N==="exit"?"is-exiting":""}`,children:r.jsx(E,{size:"2",className:"task-detail-page__activity-message",children:j.message.replace(/\s+/g," ").trim()})}):null]})})}),r.jsx(ce,{className:"task-detail-page__status-buttons",children:Object.entries(ma).map(([pe,me])=>r.jsx(_e,{size:"sm",variant:pe===Q.status?"primary":"secondary",onClick:()=>be(pe),disabled:H,children:r.jsxs(ue,{spacing:"0",children:[r.jsx("div",{children:me.icon}),r.jsx("div",{children:me.label})]})},pe))}),r.jsx(_e,{className:"task-detail-fab",onClick:()=>P(!0),variant:"primary",size:"lg",children:"Add Comment"}),!Q.assigneeActor&&r.jsxs(ce,{className:"task-detail-page__comment-buttons",children:[r.jsx(_e,{size:"lg",onClick:()=>De(!0),children:"Assign"}),r.jsx(_e,{size:"lg",variant:"primary",onClick:async()=>{await x({taskId:Q.id})},children:"Assign to Me"})]}),r.jsx(mg,{className:"task-detail-page__comment-buttons",onDelete:async()=>{await f({taskId:Q.id}),l("/tasks")}}),r.jsx(ce,{className:"task-detail-page__actions",children:r.jsx(_e,{size:"lg",variant:"secondary",onClick:()=>l("/tasks"),children:"Back to Tasks"})}),ae?r.jsx(UT,{onCancel:re,onSave:J,taskId:Q.id}):null,se?r.jsx(GT,{onCancel:Ee,onSave:he}):null,it?r.jsx(HT,{onCancel:ee,onSave:F,existingTags:Q.tags}):null,Oe?r.jsx(LT,{onCancel:G,onSave:C,taskId:Q.id,inputRequestId:Oe.id,question:Oe.question}):null]})}function VT({status:s}){let l="gray",i="unknown";return s===ve.DONE?(i="done",l="purple"):s===ve.IN_PROGRESS?(i="in progress",l="green"):s===ve.NOT_STARTED?(i="not started",l="blue"):s===ve.FOR_REVIEW&&(i="in review",l="orange"),{label:i,color:l}}function XT(){return r.jsx(AT,{children:r.jsx(Hn,{children:r.jsxs(Se,{element:r.jsx(kT,{}),children:[r.jsx(Se,{index:!0,element:r.jsx(yr,{to:"/tasks/not-started",replace:!0})}),r.jsx(Se,{path:"/not-started",element:r.jsx(or,{status:ve.NOT_STARTED})}),r.jsx(Se,{path:"/in-progress",element:r.jsx(or,{status:ve.IN_PROGRESS})}),r.jsx(Se,{path:"/in-review",element:r.jsx(or,{status:ve.FOR_REVIEW})}),r.jsx(Se,{path:"/done",element:r.jsx(or,{status:ve.DONE})}),r.jsx(Se,{path:"/task/:d",element:r.jsx(YT,{})})]})})})}function QT(){const{logout:s}=Ls(),l=We();return m.useEffect(()=>{(async()=>{try{await s()}finally{l("/login",{replace:!0})}})()},[s,l]),null}V.BASE=qn;const gg=Kp("/context"),Ds={CONTEXT_BLOCK_CREATED:"context.block.created",CONTEXT_BLOCK_UPDATED:"context.block.updated",CONTEXT_BLOCK_DELETED:"context.block.deleted"};function KT(){const[s,l]=m.useState([]),[i,c]=m.useState(!0),[d,f]=m.useState(null),[p,x]=m.useState(null),[g,y]=m.useState(!1),S=_=>[..._].sort((N,w)=>{const O=new Date(N.updatedAt).getTime();return new Date(w.updatedAt).getTime()-O}),T=async()=>{try{c(!0),f(null);const _=await nu.contextControllerListBlocks();l(S(_.items))}catch(_){f(_ instanceof Error?_.message:"Failed to fetch context blocks"),console.error("Error fetching context blocks:",_)}finally{c(!1)}},j=()=>{const _=Cl(gg,{transports:["websocket","polling"],withCredentials:!0});return _.on("connect",()=>{console.log("Connected to context WebSocket"),_.emit("context.subscribe",{},N=>{N.ok?(console.log("Subscribed to context room:",N.room),y(!0)):(console.error("Failed to subscribe to context room"),y(!1))}),T()}),_.on("disconnect",()=>{console.log("Context WebSocket disconnected"),y(!1)}),_.on(Ds.CONTEXT_BLOCK_CREATED,N=>{console.log("context.block.created",N),l(w=>w.some(O=>O.id===N.payload.id)?w:S([N.payload,...w]))}),_.on(Ds.CONTEXT_BLOCK_UPDATED,N=>{console.log("context.block.updated",N),l(w=>S(w.map(O=>O.id===N.payload.id?N.payload:O)))}),_.on(Ds.CONTEXT_BLOCK_DELETED,N=>{console.log("context.block.deleted",N),l(w=>w.filter(O=>O.id!==N.payload.blockId))}),x(_),()=>{_.close()}};return m.useEffect(()=>(T(),j()),[]),{blocks:s,isLoading:i,error:d,isConnected:g,reload:T}}function ZT(s){const[l,i]=m.useState(null),[c,d]=m.useState(!0),[f,p]=m.useState(null),[x,g]=m.useState(!1),[y,S]=m.useState(null);return m.useEffect(()=>{let T=!0;return s&&(async()=>{try{d(!0),p(null);const _=await nu.contextControllerGetBlock(s);T&&i(_)}catch(_){T&&(p(_ instanceof Error?_.message:"Failed to fetch context block"),console.error("Error fetching context block:",_))}finally{T&&d(!1)}})(),()=>{T=!1}},[s]),m.useEffect(()=>{if(!s)return;const T=Cl(gg,{transports:["websocket","polling"],withCredentials:!0});return T.on("connect",()=>{console.log("Connected to context WebSocket (detail page)"),T.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)")})}),T.on("disconnect",()=>{console.log("Context WebSocket disconnected (detail page)")}),T.on(Ds.CONTEXT_BLOCK_UPDATED,j=>{j.payload.id===s&&(console.log("context.block.updated (detail page)",j),nu.contextControllerGetBlock(s).then(_=>i(_)).catch(_=>console.error("Error refreshing block after update:",_)))}),T.on(Ds.CONTEXT_BLOCK_DELETED,j=>{j.payload.blockId===s&&(console.log("context.block.deleted (detail page)",j),g(!0),i(null))}),S(T),()=>{T.close()}},[s]),{block:l,isLoading:c,error:f,isDeleted:x}}const yg=m.createContext(null);function IT({children:s}){const{blocks:l,isLoading:i,error:c,isConnected:d,reload:f}=KT(),[p,x]=m.useState(""),g=m.useMemo(()=>({blocks:l,isLoading:i,error:c,isConnected:d,reload:f,sectionTitle:p,setSectionTitle:x}),[l,i,c,d,f,p,x]);return r.jsx(yg.Provider,{value:g,children:s})}function Au(){const s=m.useContext(yg);if(!s)throw new Error("useContextCtx must be used within <ContextProvider>");return s}function $T(){const s=Xt(),{sectionTitle:l}=Au();return console.log("Context layout mounting"),r.jsx("div",{style:{minHeight:0},children:s?r.jsx(La,{sectionTitle:l,children:r.jsx(At,{})}):r.jsx(Ha,{appTitle:"Context",sectionTitle:l,navItems:[],children:r.jsx(At,{})})})}function JT({blockSummary:s,onClick:l}){const i=s.tags.map(c=>({label:c.name}));return r.jsxs(de,{leading:r.jsx(Xe,{name:s.createdBy||"unknown",size:"lg"}),topRight:yt(s.createdAt),tags:i,onClick:l,children:[r.jsxs(E,{className:"pre",children:["#",s.id.slice(0,6)]}),r.jsx("div",{style:{minWidth:0,overflow:"hidden"},children:r.jsx(E,{weight:"bold",size:"3",tone:"default",children:s.title})}),r.jsxs("div",{style:{fontSize:12},className:"text--tone-muted",children:["Created by ",s.createdBy||"unknown"]})]})}function FT(){const{setSectionTitle:s,blocks:l,isLoading:i,error:c}=Au(),d=We();return console.log("blocks"),console.log(l),m.useEffect(()=>{s("Context Blocks")},[s]),i?r.jsx("div",{className:"context-home__loading",children:"Loading context blocks..."}):c?r.jsxs("div",{className:"context-home__error",children:["Error: ",c]}):l.length===0?r.jsx("div",{className:"context-home__empty",children:"No context blocks found"}):r.jsx(ce,{children:l.map(f=>r.jsx(JT,{blockSummary:f,onClick:()=>d(`/context/block/${f.id}`)},f.id))})}function WT(){const{id:s}=Ba(),l=We(),{setSectionTitle:i}=Au(),{block:c,isLoading:d,error:f,isDeleted:p}=ZT(s||"");return m.useEffect(()=>{c&&i(c.title)},[c,i]),m.useEffect(()=>{p&&l("/context/home")},[p,l]),d?r.jsx("div",{className:"context-block-detail__loading",children:r.jsx(E,{children:"Loading..."})}):f?r.jsx("div",{className:"context-block-detail__error",children:r.jsxs(E,{className:"text--error",children:["Error: ",f]})}):c?r.jsxs("div",{className:"context-block-detail",children:[r.jsx(_e,{variant:"ghost",size:"sm",onClick:()=>l("/context/home"),children:"← Back to list"}),r.jsxs(ue,{spacing:"3",className:"context-block-detail__header",children:[c.tags.length>0&&r.jsx("div",{className:"context-block-detail__tags",children:c.tags.map(x=>r.jsx(Ip,{children:x.name},x.id))}),r.jsxs("div",{className:"context-block-detail__meta",children:[r.jsxs(E,{size:"2",tone:"muted",children:["by ",c.createdBy||"unknown"]}),r.jsx(E,{size:"2",tone:"muted",children:"•"}),r.jsx(E,{size:"2",tone:"muted",children:new Date(c.createdAt).toDateString()})]})]}),r.jsx("div",{className:"context-block-detail__content",children:r.jsx("pre",{children:c.content})})]}):r.jsx("div",{className:"context-block-detail__error",children:r.jsx(E,{className:"text--error",children:"Context block not found"})})}function PT(){return r.jsx(IT,{children:r.jsx(Hn,{children:r.jsxs(Se,{element:r.jsx($T,{}),children:[r.jsx(Se,{index:!0,element:r.jsx(yr,{to:"home",replace:!0})}),r.jsx(Se,{path:"home",element:r.jsx(FT,{})}),r.jsx(Se,{path:"block/:id",element:r.jsx(WT,{})})]})})})}V.BASE=qn;const e_=()=>{const[s,l]=m.useState(!1),[i,c]=m.useState(null),[d,f]=m.useState([]);m.useEffect(()=>{x()},[]);const p=j=>[...j].sort((_,N)=>{const w=new Date(_.updatedAt).getTime();return new Date(N.updatedAt).getTime()-w}),x=async()=>{l(!0),c(null);try{const j=await Rs.agentsControllerListAgents();f(p(j.items||[]))}catch(j){c(j instanceof Error?j.message:"Failed to load agents")}finally{l(!1)}};return{isLoading:s,error:i,agents:d,loadAgents:x,loadAgentDetails:async j=>{l(!0),c(null);try{return await Rs.agentsControllerGetAgentBySlug(j)}catch(_){return c(_ instanceof Error?_.message:"Failed to load agent details"),null}finally{l(!1)}},createAgent:async j=>{l(!0),c(null);try{const _=await Rs.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(N=>p([...N,_])),_}catch(_){return c(_ instanceof Error?_.message:"Failed to create agent"),null}finally{l(!1)}},updateAgent:async(j,_)=>{l(!0),c(null);try{const N=await Rs.agentsControllerPatchAgent(j,_);return f(w=>{const O=w.map(B=>B.actorId===j?N:B);return p(O)}),N}catch(N){return c(N instanceof Error?N.message:"Failed to update agent"),null}finally{l(!1)}},deleteAgent:async j=>{l(!0),c(null);try{return await Rs.agentsControllerDeleteAgent(j),f(_=>_.filter(N=>N.actorId!==j)),!0}catch(_){return c(_ instanceof Error?_.message:"Failed to delete agent"),!1}finally{l(!1)}}}},vg=m.createContext(null);function t_({children:s}){const{agents:l,isLoading:i,error:c,loadAgentDetails:d,createAgent:f,updateAgent:p,deleteAgent:x}=e_(),[g,y]=m.useState(""),S=m.useMemo(()=>({agents:l,isLoading:i,error:c,sectionTitle:g,setSectionTitle:y,loadAgentDetails:d,createAgent:f,updateAgent:p,deleteAgent:x}),[l,i,c,g,y,d,f,p,x]);return r.jsx(vg.Provider,{value:S,children:s})}function Nu(){const s=m.useContext(vg);if(!s)throw new Error("useAgentsCtx must be used within <AgentsProvider>");return s}function n_({onCancel:s,onSave:l}){const[i,c]=m.useState(""),[d,f]=m.useState(""),p=m.useRef(null),x=m.useRef(null);m.useEffect(()=>{p.current?.focus()},[]);async function g(){return l({name:i,slug:d})}return r.jsx(vn,{title:"Create an Agent",onCancel:s,onSave:g,children:r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"new-agent-pop__input-name",children:r.jsx("input",{className:"new-agent-pop__input-name",ref:p,placeholder:"Display name",value:i,onChange:y=>c(y.target.value),onKeyDown:y=>{y.key==="Enter"&&(y.preventDefault(),x.current?.focus())}})}),r.jsx("div",{className:"new-agent-pop__input-slug",children:r.jsx("input",{className:"new-agent-pop__input-slug",ref:x,placeholder:"Slug (e.g., my-agent)",value:d,onChange:y=>f(y.target.value)})})]})})}function a_(){const{agents:s,setSectionTitle:l,isLoading:i,error:c,createAgent:d}=Nu(),f=We(),p=Xt(),[x,g]=m.useState(!1);if(m.useEffect(()=>{l("All Agents 🦄")},[l]),i&&s.length===0)return r.jsx(ce,{children:r.jsx(de,{leading:r.jsx(Xe,{name:"...",size:"lg"}),children:r.jsx(E,{tone:"muted",children:"Loading agents..."})})});if(c)return r.jsx(ce,{children:r.jsx(de,{leading:r.jsx(Xe,{name:"!",size:"lg"}),children:r.jsxs(E,{tone:"muted",children:["Error: ",c]})})});if(s.length===0)return r.jsx(ce,{children:r.jsx(de,{leading:r.jsx(Xe,{name:"?",size:"lg"}),children:r.jsx(E,{tone:"muted",children:"No agents found"})})});const y=()=>{g(!1)},S=async({name:T,slug:j})=>{try{const _=await d({name:T,slug:j});return _?(f(`/agents/agent/${_.slug}`),!0):!1}catch(_){return console.error("Error creating agent"),console.error(_),!1}};return r.jsxs(r.Fragment,{children:[r.jsx(ce,{children:s.map(T=>r.jsx(l_,{agent:T,onClick:()=>f(`/agents/agent/${T.slug}`)},T.actorId))}),r.jsx("button",{className:`agents-fab ${p?"agents-fab--desktop":""}`,type:"button",onClick:()=>g(!0),"aria-label":"Create new agent",children:p?r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"agents-fab__plus",children:"+"}),r.jsx("span",{className:"agents-fab__label",children:"New agent"})]}):"+"}),x?r.jsx(n_,{onCancel:y,onSave:S}):null]})}function l_({agent:s,onClick:l}){const i=[s_(s.type),i_(s.isActive)];return r.jsxs(de,{leading:r.jsx(Xe,{name:s.name,size:"lg"}),topRight:yt(s.updatedAt),tags:i,onClick:l,children:[r.jsxs(E,{className:"pre",style:"mono",tone:"muted",children:["@",s.slug]}),r.jsx(E,{weight:"bold",size:"3",tone:"default",children:s.name}),r.jsx("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r.jsx(E,{tone:"muted",size:"2",children:s.description?String(s.description):"No description"})}),r.jsxs("div",{style:{fontSize:12},className:"text--tone-muted",children:[s.statusTriggers.length>0&&r.jsxs("span",{children:["Triggers: ",s.statusTriggers.join(", ")]}),s.statusTriggers.length>0&&s.allowedTools.length>0&&" · ",s.allowedTools.length>0&&r.jsxs("span",{children:["Tools: ",s.allowedTools.length]})]})]})}function s_(s){const l={[pt.type.CLAUDE]:"purple",[pt.type.CODEX]:"green",[pt.type.OPENCODE]:"blue",[pt.type.ADK]:"red",[pt.type.OTHER]:"gray"};return{label:s,color:l[s]||"gray"}}function i_(s){return{label:s?"active":"inactive",color:s?"green":"gray"}}function r_(){const s=Xt(),{sectionTitle:l}=Nu(),i=[];return r.jsx("div",{style:{minHeight:0},children:s?r.jsx(La,{sectionTitle:l,children:r.jsx(At,{})}):r.jsx(Ha,{appTitle:"Agents",sectionTitle:l,navItems:i,children:r.jsx(At,{})})})}const Tp=s=>{s&&(s.style.height="auto",s.style.height=`${s.scrollHeight}px`)};function o_({initialValue:s,onCancel:l,onSave:i}){const[c,d]=m.useState(s),f=m.useRef(null);m.useEffect(()=>{f.current?.focus()},[]),m.useEffect(()=>{Tp(f.current)},[c]);function p(g){d(g.target.value),Tp(g.target)}async function x(){return i({systemPrompt:c})}return r.jsx(vn,{title:"Edit System Prompt",onCancel:l,onSave:x,children:r.jsx(r.Fragment,{children:r.jsx("div",{className:"edit-system-prompt-pop__input-content",children:r.jsx("textarea",{className:"edit-system-prompt-pop__input-content",ref:f,placeholder:"Enter system prompt...",value:c,onChange:p})})})})}function c_({initialValue:s,onCancel:l,onSave:i}){const[c,d]=m.useState(new Set(s)),f=g=>{d(y=>{const S=new Set(y);return S.has(g)?S.delete(g):S.add(g),S})};async function p(){return i({statusTriggers:Array.from(c)})}const x=[ve.NOT_STARTED,ve.IN_PROGRESS,ve.FOR_REVIEW,ve.DONE];return r.jsx(vn,{title:"Edit Status Triggers",onCancel:l,onSave:p,children:r.jsxs("div",{className:"edit-status-triggers-pop__content",children:[r.jsx(E,{size:"2",tone:"muted",className:"edit-status-triggers-pop__description",children:"Select which task statuses will trigger this agent to activate"}),r.jsx("div",{className:"edit-status-triggers-pop__checklist",children:x.map(g=>{const y=ma[g];return r.jsxs("label",{className:"edit-status-triggers-pop__checklist-item",children:[r.jsx("input",{type:"checkbox",checked:c.has(g),onChange:()=>f(g),className:"edit-status-triggers-pop__checkbox"}),r.jsxs("div",{className:"edit-status-triggers-pop__status-info",children:[r.jsx("span",{className:"edit-status-triggers-pop__status-icon",children:y.icon}),r.jsx(E,{size:"3",weight:"medium",children:y.label}),r.jsx(E,{size:"2",tone:"muted",children:g})]})]},g)})})]})})}const _p=s=>{s&&(s.style.height="auto",s.style.height=`${s.scrollHeight}px`)};function u_({initialValue:s,onCancel:l,onSave:i}){const[c,d]=m.useState(s),f=m.useRef(null);m.useEffect(()=>{f.current?.focus()},[]),m.useEffect(()=>{_p(f.current)},[c]);function p(g){d(g.target.value),_p(g.target)}async function x(){return i({introduction:c})}return r.jsx(vn,{title:"Edit Introduction",onCancel:l,onSave:x,children:r.jsx(r.Fragment,{children:r.jsx("div",{className:"edit-introduction-pop__input-content",children:r.jsx("textarea",{className:"edit-introduction-pop__input-content",ref:f,placeholder:"Enter introduction...",value:c,onChange:p})})})})}const d_=[{value:pt.type.CLAUDE,label:"Claude",description:"Anthropic's Claude AI"},{value:pt.type.CODEX,label:"Codex",description:"OpenAI's Codex"},{value:pt.type.OPENCODE,label:"OpenCode",description:"OpenCode agent"},{value:pt.type.ADK,label:"ADK",description:"Agent Development Kit"},{value:pt.type.OTHER,label:"Other",description:"Other agent type"}];function f_({initialValue:s,onCancel:l,onSave:i}){const[c,d]=m.useState(s);async function f(){return i({type:c})}return r.jsx(vn,{title:"Edit Agent Type",onCancel:l,onSave:f,children:r.jsxs("div",{className:"edit-agent-type-pop__content",children:[r.jsx(E,{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."}),r.jsx("div",{className:"edit-agent-type-pop__radio-list",children:d_.map(p=>r.jsxs("label",{className:"edit-agent-type-pop__radio-item",children:[r.jsx("input",{type:"radio",name:"agent-type",value:p.value,checked:c===p.value,onChange:()=>d(p.value),className:"edit-agent-type-pop__radio"}),r.jsxs("div",{className:"edit-agent-type-pop__type-info",children:[r.jsx(E,{size:"3",weight:"medium",children:p.label}),r.jsx(E,{size:"2",tone:"muted",children:p.description})]})]},p.value))})]})})}const Fc=["meta:read"];function h_(){const{slug:s}=Ba(),l=We(),{agents:i,setSectionTitle:c,loadAgentDetails:d,updateAgent:f,deleteAgent:p}=Nu(),x=i.find(te=>te.slug===s),[g,y]=m.useState(x||null),[S,T]=m.useState(!x),[j,_]=m.useState([]),[N,w]=m.useState(!1),[O,B]=m.useState(null),[X,I]=m.useState(!1),[Q,W]=m.useState(!1),[K,H]=m.useState(""),[$,ae]=m.useState(new Set(Fc)),[P,se]=m.useState(30),[De,it]=m.useState([]),[ke,Oe]=m.useState(!1),[U,J]=m.useState(!1),[re,he]=m.useState(!1),[Ee,C]=m.useState(!1),[G,F]=m.useState(!1),{actors:ee}=Cu(),[fe,ye]=m.useState(null);m.useEffect(()=>{if(!g||!ee)return;const te=ee.find(ze=>ze.id===g.actorId);te&&ye(te)},[g,ee]);const be=m.useCallback(async()=>{if(s){w(!0);try{const te=await Xc.agentTokensControllerListTokens(s);_(te)}catch(te){console.error("Failed to load tokens:",te)}finally{w(!1)}}},[s]),pe=m.useCallback(async()=>{Oe(!0);try{const te=await Qp.authorizationControllerGetScopes();it(te.scopes)}catch(te){console.error("Failed to load scopes:",te)}finally{Oe(!1)}},[]);m.useEffect(()=>{!x&&s?(T(!0),console.log("AGENT DETAIL PAGE"),d(s).then(te=>{y(te),T(!1)}).catch(te=>{y(null)})):x&&y(x)},[s,x,d]),m.useEffect(()=>{g&&be()},[g,be]),m.useEffect(()=>{Q&&De.length===0&&pe(),Q||ae(new Set(Fc))},[Q,De.length,pe]),m.useEffect(()=>{if(!g){c("Agent");return}c(g.name)},[g,c]);const me=async()=>{if(!(!s||!K.trim()||$.size===0)){I(!0);try{const te=Array.from($),ze=await Xc.agentTokensControllerIssueToken(s,{name:K.trim(),scopes:te,expirationDays:P});B(ze.token),W(!1),H(""),ae(new Set(Fc)),await be()}catch(te){console.error("Failed to create token:",te),alert("Failed to create token")}finally{I(!1)}}},xt=te=>{ae(ze=>{const dn=new Set(ze);return dn.has(te)?dn.delete(te):dn.add(te),dn})},Qe=async({systemPrompt:te})=>{if(!g)return!1;try{const ze=await f(g.actorId,{systemPrompt:te});return ze?(y(ze),J(!1),!0):!1}catch(ze){return console.error("Failed to update system prompt:",ze),!1}},Nt=async({statusTriggers:te})=>{if(!g)return!1;try{const ze=await f(g.actorId,{statusTriggers:te});return ze?(y(ze),he(!1),!0):!1}catch(ze){return console.error("Failed to update status triggers:",ze),!1}},un=async({introduction:te})=>{if(!g)return!1;try{const ze=await f(g.actorId,{introduction:te});return ze?(y(ze),F(!1),!0):!1}catch(ze){return console.error("Failed to update introduction:",ze),!1}},Rt=async({type:te})=>{if(!g)return!1;try{const ze=await f(g.actorId,{type:te});return ze?(y(ze),C(!1),!0):!1}catch(ze){return console.error("Failed to update agent type:",ze),!1}},ya=async te=>{if(s&&confirm("Are you sure you want to revoke this token? This action cannot be undone."))try{await Xc.agentTokensControllerRevokeToken(s,te),await be()}catch(ze){console.error("Failed to revoke token:",ze),alert("Failed to revoke token")}},Gn=te=>{navigator.clipboard.writeText(te)};if(S)return r.jsx("div",{className:"agent-detail-page",children:r.jsx(ue,{spacing:"4",align:"center",children:r.jsx(E,{size:"3",tone:"muted",children:"Loading agent..."})})});if(!g)return r.jsx("div",{className:"agent-detail-page",children:r.jsxs(ue,{spacing:"4",align:"center",children:[r.jsx(E,{size:"3",tone:"muted",children:"Agent not found"}),r.jsx(_e,{variant:"secondary",onClick:()=>l("/agents"),children:"Back to agents"})]})});const qa=g.introduction,ln=typeof qa=="string"?qa:"";return r.jsxs("div",{className:"agent-detail-page",children:[r.jsx(ce,{className:"agent-detail-page__section",children:r.jsxs(de,{leading:r.jsx(Xe,{size:"sm",name:g.name,src:fe?.avatarUrl||void 0}),tags:[m_(g.type),p_(g.isActive)],topRight:r.jsx(E,{size:"1",tone:"muted",children:yt(g.updatedAt)}),children:[r.jsx(E,{as:"span",weight:"normal",tone:"muted",size:"3",children:` @${g.slug} `}),r.jsxs(E,{as:"span",tone:"muted",style:"mono",children:["#",g.actorId.slice(0,6)]}),r.jsx(E,{children:g.description?String(g.description):"No description"})]})}),r.jsx(ce,{title:"System Prompt",className:"agent-detail-page__section",children:r.jsxs(de,{onClick:()=>J(!0),children:[r.jsx(E,{size:"2",className:"agent-detail-page__system-prompt",children:g.systemPrompt||"No system prompt configured"}),r.jsx(E,{size:"1",tone:"muted",children:"tap to edit"})]})}),r.jsx(ce,{title:"Introduction",className:"agent-detail-page__section",children:r.jsxs(de,{onClick:()=>F(!0),children:[r.jsx(E,{size:"2",className:"agent-detail-page__system-prompt",children:ln.trim().length>0?ln:"No introduction configured"}),r.jsx(E,{size:"1",tone:"muted",children:"tap to edit"})]})}),r.jsx(ce,{title:"Agent Type",className:"agent-detail-page__section",children:r.jsxs(de,{onClick:()=>C(!0),children:[r.jsx(E,{size:"2",tone:"muted",children:g.type}),r.jsx(E,{size:"1",tone:"muted",children:"tap to edit"})]})}),r.jsx(ce,{title:"Status Triggers",className:"agent-detail-page__section",children:r.jsxs(de,{onClick:()=>he(!0),children:[g.statusTriggers.length>0?g.statusTriggers.map(te=>r.jsx(E,{tone:"muted",children:te},te)):r.jsx(E,{tone:"muted",children:"No status triggers configured"}),r.jsx(E,{size:"1",tone:"muted",children:"tap to edit"})]})}),g.allowedTools.length>0&&r.jsx(ce,{className:"agent-detail-page__section",children:r.jsxs(de,{children:[r.jsxs(E,{as:"span",weight:"medium",size:"3",children:["Allowed Tools (",g.allowedTools.length,")"]}),r.jsx(E,{tone:"muted",size:"2",children:g.allowedTools.join(", ")})]})}),O&&r.jsx(ce,{title:"New Token Created",className:"agent-detail-page__section agent-detail-page__new-token",children:r.jsx(de,{children:r.jsxs(ue,{spacing:"2",children:[r.jsx(E,{weight:"medium",size:"2",className:"agent-detail-page__warning-text",children:"Copy this token now. It will not be shown again."}),r.jsx("div",{className:"agent-detail-page__token-display",children:r.jsx("code",{className:"agent-detail-page__token-code",children:O})}),r.jsxs("div",{className:"agent-detail-page__button-row",children:[r.jsx(_e,{size:"sm",onClick:()=>Gn(O),children:"Copy Token"}),r.jsx(_e,{size:"sm",variant:"secondary",onClick:()=>B(null),children:"Dismiss"})]})]})})}),r.jsxs(ce,{title:"Access Tokens",className:"agent-detail-page__section",action:!Q&&r.jsx(_e,{size:"sm",onClick:()=>W(!0),children:"New Token"}),children:[Q&&r.jsx(de,{children:r.jsxs(ue,{spacing:"3",children:[r.jsx(E,{weight:"medium",size:"2",children:"Create New Token"}),r.jsxs("div",{className:"agent-detail-page__form-field",children:[r.jsx("label",{children:r.jsx(E,{size:"1",tone:"muted",children:"Token Name"})}),r.jsx("input",{type:"text",value:K,onChange:te=>H(te.target.value),placeholder:"e.g., CI/CD Pipeline",className:"agent-detail-page__input"})]}),r.jsxs("div",{className:"agent-detail-page__form-field",children:[r.jsx("label",{children:r.jsx(E,{size:"1",tone:"muted",children:"Scopes"})}),ke?r.jsx(E,{size:"2",tone:"muted",children:"Loading available scopes..."}):r.jsx("div",{className:"agent-detail-page__scopes-list",children:De.map(te=>r.jsxs("label",{className:"agent-detail-page__scope-item",children:[r.jsx("input",{type:"checkbox",checked:$.has(te.id),onChange:()=>xt(te.id)}),r.jsxs("div",{className:"agent-detail-page__scope-info",children:[r.jsx(E,{size:"2",weight:"medium",children:te.id}),r.jsx(E,{size:"1",tone:"muted",children:te.description})]})]},te.id))})]}),r.jsxs("div",{className:"agent-detail-page__form-field",children:[r.jsx("label",{children:r.jsx(E,{size:"1",tone:"muted",children:"Expires in (days)"})}),r.jsx("input",{type:"number",value:P,onChange:te=>se(parseInt(te.target.value)||30),min:1,max:365,className:"agent-detail-page__input"})]}),r.jsxs("div",{className:"agent-detail-page__button-row",children:[r.jsx(_e,{size:"sm",onClick:me,disabled:X||!K.trim()||$.size===0,children:X?"Creating...":"Create Token"}),r.jsx(_e,{size:"sm",variant:"secondary",onClick:()=>W(!1),children:"Cancel"})]})]})}),N?r.jsx(de,{children:r.jsx(E,{tone:"muted",size:"2",children:"Loading tokens..."})}):j.length===0?r.jsx(de,{children:r.jsx(E,{tone:"muted",size:"2",children:"No tokens issued for this agent yet."})}):j.map(te=>r.jsxs(de,{tags:[te.isValid?{label:"active",color:"green"}:{label:te.revokedAt?"revoked":"expired",color:"gray"}],topRight:te.isValid?r.jsx(_e,{size:"sm",variant:"secondary",onClick:()=>ya(te.id),children:"Revoke"}):null,children:[r.jsx(E,{weight:"medium",size:"2",children:te.name}),r.jsxs(ue,{spacing:"1",children:[r.jsxs(E,{size:"1",tone:"muted",children:["Scopes: ",te.scopes.join(", ")]}),r.jsxs(E,{size:"1",tone:"muted",children:["Created: ",new Date(te.createdAt).toLocaleDateString()," by ",te.issuedByDisplayName]}),r.jsxs(E,{size:"1",tone:"muted",children:["Expires: ",new Date(te.expiresAt).toLocaleDateString()]}),te.revokedAt&&r.jsxs(E,{size:"1",tone:"muted",className:"agent-detail-page__revoked-text",children:["Revoked: ",new Date(String(te.revokedAt)).toLocaleDateString()]})]})]},te.id))]}),r.jsx(mg,{className:"agent-detail-page__actions",onDelete:async()=>{p(g.actorId),l("/agents")}}),r.jsx(ce,{className:"agent-detail-page__actions",children:r.jsx(_e,{size:"lg",variant:"secondary",onClick:()=>l("/agents"),children:"Back to Agents"})}),U&&g&&r.jsx(o_,{initialValue:g.systemPrompt,onCancel:()=>J(!1),onSave:Qe}),re&&g&&r.jsx(c_,{initialValue:g.statusTriggers,onCancel:()=>he(!1),onSave:Nt}),Ee&&g&&r.jsx(f_,{initialValue:g.type,onCancel:()=>C(!1),onSave:Rt}),G&&g&&r.jsx(u_,{initialValue:ln,onCancel:()=>F(!1),onSave:un})]})}function m_(s){const l={[pt.type.CLAUDE]:"orange",[pt.type.CODEX]:"green",[pt.type.OPENCODE]:"blue",[pt.type.ADK]:"red",[pt.type.OTHER]:"gray"};return{label:s,color:l[s]||"gray"}}function p_(s){return{label:s?"active":"inactive",color:s?"green":"gray"}}function g_(){return r.jsx(t_,{children:r.jsx(Hn,{children:r.jsxs(Se,{element:r.jsx(r_,{}),children:[r.jsx(Se,{index:!0,element:r.jsx(a_,{})}),r.jsx(Se,{path:"/agent/:slug",element:r.jsx(h_,{})})]})})})}class Ep{static async listThreads(){return{items:(await dp.threadsControllerListThreads()).items}}static async getThread(l){return await dp.threadsControllerGetThread(l)}}const y_=()=>{const[s,l]=m.useState(!1),[i,c]=m.useState(null),[d,f]=m.useState([]);m.useEffect(()=>{p()},[]);const p=async()=>{l(!0),c(null);try{const g=await Ep.listThreads();f(g.items||[])}catch(g){c(g instanceof Error?g.message:"Failed to load threads")}finally{l(!1)}},x=m.useCallback(async g=>await Ep.getThread(g),[]);return{isLoading:s,error:i,threads:d,loadThreads:p,getThread:x}},xg=m.createContext(null);function v_({children:s}){const{threads:l,isLoading:i,error:c,getThread:d}=y_(),[f,p]=m.useState(""),x=m.useMemo(()=>({threads:l,isLoading:i,error:c,sectionTitle:f,setSectionTitle:p,getThread:d}),[l,i,c,f,p,d]);return r.jsx(xg.Provider,{value:x,children:s})}function Ru(){const s=m.useContext(xg);if(!s)throw new Error("useThreadsCtx must be used within <ThreadsProvider>");return s}function x_({thread:s,onClick:l}){return r.jsxs(de,{onClick:l,children:[r.jsx("div",{style:{minWidth:0,overflow:"hidden"},children:r.jsx(E,{weight:"bold",size:"3",tone:"default",children:s.title})}),r.jsxs("div",{style:{fontSize:12},className:"text--tone-muted",children:["#",s.id.slice(0,6)]})]})}function S_(){const{threads:s,setSectionTitle:l}=Ru(),i=We();m.useEffect(()=>{l("Threads 🧵")},[l]);const c=d=>{i(`/threads/${d}`)};return r.jsx(ce,{children:s.map(d=>r.jsx(x_,{thread:d,onClick:()=>c(d.id)},d.id))})}function T_(){const s=Xt(),{sectionTitle:l}=Ru(),i=[];return r.jsx("div",{style:{minHeight:0},children:s?r.jsx(La,{sectionTitle:l,children:r.jsx(At,{})}):r.jsx(Ha,{appTitle:"Threads",sectionTitle:l,navItems:i,children:r.jsx(At,{})})})}function Sg({contextBlock:s}){return r.jsxs(qt,{className:"thread-context-card",children:[r.jsx(E,{size:"2",weight:"semibold",children:s.title}),r.jsxs(E,{size:"1",tone:"muted",children:["#",s.id.slice(0,6)]})]})}function cu({task:s}){const l=We(),i=s.tags.map(f=>({label:f.name}));s.commentCount>0&&i.push({label:`💬 ${s.commentCount}`});const c=s.inputRequests.filter(f=>!f.resolvedAt).length;c>0&&i.push({label:`✋ ${c}`});const d=()=>{l(`/tasks/task/${s.id}`)};return r.jsxs($p,{leading:r.jsx(Xe,{name:s.createdByActor.displayName,size:"md",src:s.createdByActor.avatarUrl||void 0}),topRight:yt(s.updatedAt),tags:i,onClick:d,highlight:c>0,footer:r.jsxs(r.Fragment,{children:[r.jsxs("span",{className:"row-detail truncate",children:["#",s.id.slice(0,6)]}),r.jsx("span",{className:"row-detail truncate",children:s.assigneeActor?`Assigned: @${s.assigneeActor.slug}`:"unassigned"})]}),children:[r.jsx("div",{className:"row-title truncate",children:s.name}),r.jsx("div",{className:"row-subtitle truncate",children:s.description})]})}const __=s=>s.toLowerCase().split("_").map(l=>l.charAt(0).toUpperCase()+l.slice(1)).join(" "),Tg=s=>s.tasks.length?s.parentTaskId?s.tasks.find(l=>l.id===s.parentTaskId)??s.tasks[0]:s.tasks[0]:null,_g=(s,l)=>l?s.tasks.filter(i=>i.id!==l.id):s.tasks;function E_(){const{id:s}=Ba(),l=We(),{setSectionTitle:i,getThread:c}=Ru(),d=Xt(),[f,p]=m.useState(null),[x,g]=m.useState(!0),[y,S]=m.useState(null);return m.useEffect(()=>{if(!s)return;(async()=>{g(!0),S(null);try{const j=await c(s);p(j)}catch(j){S(j instanceof Error?j.message:"Failed to load thread")}finally{g(!1)}})()},[s,c]),m.useEffect(()=>{if(!f){i("Thread");return}i(f.title)},[f,i]),x?r.jsx("div",{className:"thread-detail-page",children:r.jsx(ue,{spacing:"4",align:"center",children:r.jsx(E,{size:"3",tone:"muted",children:"Loading..."})})}):y||!f?r.jsx("div",{className:"thread-detail-page",children:r.jsxs(ue,{spacing:"4",align:"center",children:[r.jsx(E,{size:"3",tone:"muted",children:y||"Thread not found"}),r.jsx(_e,{variant:"secondary",onClick:()=>l("/threads"),children:"Back to threads"})]})}):d?r.jsx(b_,{thread:f}):r.jsx(j_,{thread:f})}function b_({thread:s}){const l=Tg(s),i=_g(s,l);return r.jsxs("div",{className:"thread-detail-page thread-detail-page--desktop",children:[r.jsx("div",{className:"thread-detail-page__main",children:r.jsxs("div",{className:"thread-detail-page__content",children:[r.jsx(E,{size:"5",weight:"bold",children:s.title}),r.jsx("div",{style:{marginTop:"var(--space-2)"},children:r.jsxs(E,{size:"2",tone:"muted",children:["#",s.id.slice(0,6)]})}),l&&r.jsxs("div",{className:"thread-detail-page__parent-task",children:[r.jsx(E,{size:"3",weight:"semibold",children:"Parent task"}),r.jsx(Eg,{task:l})]})]})}),r.jsxs("div",{className:"thread-detail-page__sidebar",children:[l&&r.jsxs("div",{className:"thread-detail-page__sidebar-section",children:[r.jsx(E,{size:"2",weight:"semibold",className:"thread-detail-page__sidebar-header",children:"Parent task"}),r.jsx("div",{className:"thread-detail-page__sidebar-content",children:r.jsx(cu,{task:l},l.id)})]}),i.length>0&&r.jsxs("div",{className:"thread-detail-page__sidebar-section",children:[r.jsxs(E,{size:"2",weight:"semibold",className:"thread-detail-page__sidebar-header",children:["Tasks (",i.length,")"]}),r.jsx("div",{className:"thread-detail-page__sidebar-content",children:i.map(c=>r.jsx(cu,{task:c},c.id))})]}),s.referencedContextBlocks.length>0&&r.jsxs("div",{className:"thread-detail-page__sidebar-section",children:[r.jsxs(E,{size:"2",weight:"semibold",className:"thread-detail-page__sidebar-header",children:["Context (",s.referencedContextBlocks.length,")"]}),r.jsx("div",{className:"thread-detail-page__sidebar-content",children:s.referencedContextBlocks.map(c=>r.jsx(Sg,{contextBlock:c},c.id))})]}),s.referencedContextBlocks.length===0&&i.length===0&&!l&&r.jsx("div",{className:"thread-detail-page__sidebar-empty",children:r.jsx(E,{size:"2",tone:"muted",children:"No context or tasks attached"})})]})]})}function j_({thread:s}){const l=Tg(s),i=_g(s,l);return r.jsx("div",{className:"thread-detail-page thread-detail-page--mobile",children:r.jsxs("div",{className:"thread-detail-page__mobile-content",children:[l&&r.jsxs("div",{className:"thread-detail-page__mobile-section",children:[r.jsx(E,{size:"2",weight:"semibold",children:"Parent task"}),r.jsx(Eg,{task:l})]}),i.length>0&&r.jsxs("div",{className:"thread-detail-page__mobile-section",children:[r.jsxs(E,{size:"2",weight:"semibold",children:["Tasks (",i.length,")"]}),r.jsx("div",{className:"thread-detail-page__mobile-list",children:i.map(c=>r.jsx(cu,{task:c},c.id))})]}),s.referencedContextBlocks.length>0&&r.jsxs("div",{className:"thread-detail-page__mobile-section",children:[r.jsxs(E,{size:"2",weight:"semibold",children:["Context (",s.referencedContextBlocks.length,")"]}),r.jsx("div",{className:"thread-detail-page__mobile-list",children:s.referencedContextBlocks.map(c=>r.jsx(Sg,{contextBlock:c},c.id))})]}),s.participants.length>0&&r.jsxs("div",{className:"thread-detail-page__mobile-section",children:[r.jsxs(E,{size:"2",weight:"semibold",children:["Participants (",s.participants.length,")"]}),r.jsx("div",{className:"thread-detail-page__mobile-list",children:s.participants.map(c=>r.jsxs(E,{size:"2",children:[c.displayName," (@",c.slug,")"]},c.id))})]})]})})}function Eg({task:s}){const l=s.inputRequests.filter(i=>!i.resolvedAt).length;return r.jsxs("div",{className:"thread-detail-page__parent-card",children:[r.jsxs("div",{className:"thread-detail-page__parent-header",children:[r.jsxs("div",{children:[r.jsx(E,{size:"4",weight:"semibold",children:s.name}),r.jsxs(E,{size:"2",tone:"muted",children:["#",s.id.slice(0,6)]})]}),r.jsx(E,{size:"2",tone:"muted",children:yt(s.updatedAt)})]}),r.jsx(E,{size:"2",className:"thread-detail-page__task-description",children:s.description||"No description provided."}),r.jsxs("div",{className:"thread-detail-page__task-meta",children:[r.jsxs("div",{className:"thread-detail-page__task-meta-item",children:[r.jsx(E,{size:"1",tone:"muted",children:"Status"}),r.jsx(E,{size:"2",children:__(s.status)})]}),r.jsxs("div",{className:"thread-detail-page__task-meta-item",children:[r.jsx(E,{size:"1",tone:"muted",children:"Assignee"}),r.jsx(E,{size:"2",children:s.assigneeActor?`@${s.assigneeActor.slug}`:"Unassigned"})]}),r.jsxs("div",{className:"thread-detail-page__task-meta-item",children:[r.jsx(E,{size:"1",tone:"muted",children:"Created by"}),r.jsx(E,{size:"2",children:s.createdByActor.displayName})]}),r.jsxs("div",{className:"thread-detail-page__task-meta-item",children:[r.jsx(E,{size:"1",tone:"muted",children:"Comments"}),r.jsx(E,{size:"2",children:s.commentCount})]}),r.jsxs("div",{className:"thread-detail-page__task-meta-item",children:[r.jsx(E,{size:"1",tone:"muted",children:"Open questions"}),r.jsx(E,{size:"2",children:l})]})]})]})}function C_(){return r.jsx(v_,{children:r.jsx(Hn,{children:r.jsxs(Se,{element:r.jsx(T_,{}),children:[r.jsx(Se,{index:!0,element:r.jsx(S_,{})}),r.jsx(Se,{path:"/:id",element:r.jsx(E_,{})})]})})})}V.BASE=qn;const A_=()=>{const[s,l]=m.useState(!1),[i,c]=m.useState(null),[d,f]=m.useState([]);m.useEffect(()=>{x()},[]);const p=_=>[..._].sort((N,w)=>{const O=new Date(N.updatedAt).getTime();return new Date(w.updatedAt).getTime()-O}),x=async()=>{l(!0),c(null);try{const _=await ws.mcpRegistryControllerListServers();f(p(_.items||[]))}catch(_){c(_ instanceof Error?_.message:"Failed to load tools")}finally{l(!1)}},g=m.useCallback(async _=>{l(!0),c(null);try{return await ws.mcpRegistryControllerGetServer(_)}catch(N){return c(N instanceof Error?N.message:"Failed to load tool details"),null}finally{l(!1)}},[]),y=m.useCallback(async _=>{try{return await ws.mcpRegistryControllerListScopes(_)}catch(N){return console.error("Failed to load scopes:",N),[]}},[]),S=m.useCallback(async _=>{console.log(`loading clients for server ${_}`);try{const N=await ws.mcpRegistryControllerListConnections(_);return console.log(`clients: ${N}`),N}catch(N){return console.error("Failed to load clients:",N),[]}},[]),T=m.useCallback(async _=>{console.log(`loading authorizations for server ${_}`);try{const N=await e0.authJourneysControllerGetAuthJourneys(_);return console.log("authorizations:",N),N}catch(N){return console.error("Failed to load authorizations:",N),[]}},[]),j=m.useCallback(async _=>{l(!0),c(null);try{return await ws.mcpRegistryControllerGetConnection(_)}catch(N){return c(N instanceof Error?N.message:"Failed to load client details"),null}finally{l(!1)}},[]);return{isLoading:s,error:i,tools:d,loadTools:x,loadToolDetails:g,loadToolScopes:y,loadToolClients:S,loadToolAuthorizations:T,loadClientDetails:j}},bg=m.createContext(null);function N_({children:s}){const{tools:l,isLoading:i,error:c,loadToolDetails:d,loadToolScopes:f,loadToolClients:p,loadToolAuthorizations:x,loadClientDetails:g}=A_(),[y,S]=m.useState(""),T=m.useMemo(()=>({tools:l,isLoading:i,error:c,sectionTitle:y,setSectionTitle:S,loadToolDetails:d,loadToolScopes:f,loadToolClients:p,loadToolAuthorizations:x,loadClientDetails:g}),[l,i,c,y,S,d,f,p,x,g]);return r.jsx(bg.Provider,{value:T,children:s})}function qs(){const s=m.useContext(bg);if(!s)throw new Error("useToolsCtx must be used within <ToolsProvider>");return s}function R_(){const{tools:s,setSectionTitle:l,isLoading:i,error:c}=qs(),d=We();return m.useEffect(()=>{l("All Tools")},[l]),i&&s.length===0?r.jsx(ce,{children:r.jsx(de,{leading:r.jsx(Xe,{name:"...",size:"lg"}),children:r.jsx(E,{tone:"muted",children:"Loading tools..."})})}):c?r.jsx(ce,{children:r.jsx(de,{leading:r.jsx(Xe,{name:"!",size:"lg"}),children:r.jsxs(E,{tone:"muted",children:["Error: ",c]})})}):s.length===0?r.jsx(ce,{children:r.jsx(de,{leading:r.jsx(Xe,{name:"?",size:"lg"}),children:r.jsx(E,{tone:"muted",children:"No tools found"})})}):r.jsx(ce,{children:s.map(f=>r.jsx(w_,{tool:f,onClick:()=>d(`/tools/tool/${f.id}`)},f.id))})}function w_({tool:s,onClick:l}){const i=[{label:"MCP Server",color:"blue"}];return s.url&&i.push({label:"remote",color:"green"}),r.jsxs(de,{leading:r.jsx(Xe,{name:s.name,size:"lg"}),topRight:yt(s.updatedAt),tags:i,onClick:l,children:[r.jsx(E,{className:"pre",style:"mono",tone:"muted",children:s.providedId}),r.jsx(E,{weight:"bold",size:"3",tone:"default",children:s.name}),r.jsx("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r.jsx(E,{tone:"muted",size:"2",children:s.description||"No description"})})]})}function O_(){const s=Xt(),{sectionTitle:l}=qs(),i=[];return r.jsx("div",{style:{minHeight:0},children:s?r.jsx(La,{sectionTitle:l,children:r.jsx(At,{})}):r.jsx(Ha,{appTitle:"Tools",sectionTitle:l,navItems:i,children:r.jsx(At,{})})})}function z_(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 D_(){const{toolId:s}=Ba(),l=We(),{tools:i,setSectionTitle:c,loadToolDetails:d,loadToolScopes:f,loadToolClients:p,loadToolAuthorizations:x}=qs(),g=i.find(se=>se.id===s),[y,S]=m.useState(g||null),[T,j]=m.useState([]),[_,N]=m.useState([]),[w,O]=m.useState([]),[B,X]=m.useState(!g),[I,Q]=m.useState(!1),[W,K]=m.useState(null),[H,$]=m.useState(!1),ae=se=>{navigator.clipboard.writeText(se),$(!0),setTimeout(()=>$(!1),1500)};if(m.useEffect(()=>{!g&&s?(X(!0),d(s).then(se=>{S(se),X(!1)})):g&&S(g)},[s,g,d]),m.useEffect(()=>{y&&s&&(f(s).then(j),p(s).then(N),x(s).then(O))},[y,s,f,p,x]),m.useEffect(()=>{if(!y){c("Tool");return}c(y.name)},[y,c]),B)return r.jsx("div",{className:"tool-detail-page",children:r.jsx(ue,{spacing:"4",align:"center",children:r.jsx(E,{size:"3",tone:"muted",children:"Loading tool..."})})});if(!y)return r.jsx("div",{className:"tool-detail-page",children:r.jsxs(ue,{spacing:"4",align:"center",children:[r.jsx(E,{size:"3",tone:"muted",children:"Tool not found"}),r.jsx(_e,{variant:"secondary",onClick:()=>l("/tools"),children:"Back to tools"})]})});const P=[{label:"MCP Server",color:"blue"}];return y.url&&P.push({label:"remote",color:"green"}),r.jsxs("div",{className:"tool-detail-page",children:[r.jsx(ce,{className:"tool-detail-page__section",children:r.jsxs(de,{leading:r.jsx(Xe,{name:y.name}),tags:P,topRight:r.jsx(E,{size:"1",tone:"muted",children:yt(y.updatedAt)}),children:[r.jsx(E,{as:"span",weight:"normal",tone:"muted",size:"3",children:`${y.providedId} `}),r.jsxs(E,{as:"span",tone:"muted",style:"mono",children:["#",y.id.slice(0,6)]}),r.jsx(E,{children:y.description}),W?r.jsxs(de,{onClick:()=>Q(!I),children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[r.jsx(E,{as:"span",weight:"medium",size:"3",children:"Auth Server Metadata"}),r.jsx(E,{size:"2",tone:"muted",children:I?"(tap to collapse)":"(tap to expand)"})]}),I&&r.jsx("div",{className:"tool-detail-page__metadata",children:r.jsx("pre",{children:JSON.stringify(W,null,2)})})]}):r.jsx(E,{tone:"muted",size:"2",children:"Authorization Server metadata not found"})]})}),y.url?r.jsx(ce,{title:"Server URL",className:"tool-detail-page__section",children:r.jsx(de,{onClick:()=>ae(y.url||""),children:r.jsxs(E,{size:"2",style:"mono",className:"tool-detail-page__url",children:[y.url,r.jsx(E,{size:"1",tone:"muted",children:"tap to copy"})]})})}):null,y.url&&r.jsxs(ce,{title:"Configure",className:"tool-detail-page__section",children:[r.jsxs(de,{onClick:()=>ae(`npx @modelcontextprotocol/inspector --transport http --server-url ${y.url}`),children:[r.jsx(E,{weight:"medium",size:"3",children:"Inspector Command"}),r.jsx(E,{size:"2",tone:"muted",children:"Run this command to start the MCP inspector:"}),r.jsxs(E,{style:"mono",children:[`npx @modelcontextprotocol/inspector --transport http --server-url ${y.url}`,r.jsx(E,{size:"1",tone:"muted",children:"tap to copy"})]})]}),r.jsxs(de,{onClick:()=>ae(`npx @modelcontextprotocol/inspector --transport http --server-url ${y.url}`),children:[r.jsx(E,{weight:"medium",size:"3",children:"Claude Code"}),r.jsxs(E,{style:"mono",children:[`claude mcp add ${y.providedId} --transport http ${y.url}`,r.jsx(E,{size:"1",tone:"muted",children:"tap to copy"})]})]})]}),T.length?r.jsx(ce,{title:"Scopes",children:T.map(se=>r.jsxs(de,{children:[r.jsx(E,{size:"2",style:"mono",weight:"medium",children:se.id}),r.jsx(E,{size:"2",tone:"muted",children:se.description})]},se.id))}):r.jsx(E,{tone:"muted",size:"2",children:"This server doesn't have any permissions configured"}),r.jsx(ce,{title:"Authorizations",className:"tool-detail-page__section",children:w.length===0?r.jsx(de,{children:r.jsx(E,{tone:"muted",size:"2",children:"No active authorizations"})}):[...w].sort((se,De)=>new Date(De.updatedAt).getTime()-new Date(se.updatedAt).getTime()).map(se=>{const De=z_(se.status),it=yt(se.updatedAt);return r.jsxs(de,{children:[r.jsx(E,{weight:"medium",size:"3",children:se.mcpAuthorizationFlow.clientName||"Unknown Client"}),se.actor&&r.jsxs(E,{size:"2",tone:"muted",children:["@",se.actor.slug," updated ",it]}),r.jsx("div",{style:{marginTop:"4px"},children:r.jsx(Ip,{color:De.color,children:De.label})})]},se.id)})}),r.jsx(ce,{className:"tool-detail-page__actions",children:r.jsx(_e,{size:"lg",variant:"secondary",onClick:()=>l("/tools"),children:"Back to Tools"})}),r.jsx("div",{className:`tool-detail-page__toast ${H?"tool-detail-page__toast--visible":""}`,children:"Copied!"})]})}function k_(){const{toolId:s}=Ba(),l=We(),{tools:i,setSectionTitle:c,loadToolDetails:d,loadToolClients:f}=qs(),p=i.find(_=>_.id===s),[x,g]=m.useState(p||null),[y,S]=m.useState([]),[T,j]=m.useState(!0);return m.useEffect(()=>{!p&&s?d(s).then(g):p&&g(p)},[s,p,d]),m.useEffect(()=>{s&&(j(!0),f(s).then(_=>{const N=[..._].sort((w,O)=>new Date(O.updatedAt).getTime()-new Date(w.updatedAt).getTime());S(N),j(!1)}))},[s,f]),m.useEffect(()=>{c(x?`${x.name} Clients`:"Clients")},[x,c]),T?r.jsx(ce,{children:r.jsx(de,{leading:r.jsx(Xe,{name:"...",size:"lg"}),children:r.jsx(E,{tone:"muted",children:"Loading clients..."})})}):y.length===0?r.jsxs("div",{className:"clients-page",children:[r.jsx(ce,{children:r.jsx(de,{leading:r.jsx(Xe,{name:"?",size:"lg"}),children:r.jsx(E,{tone:"muted",children:"No clients found for this tool"})})}),r.jsx(ce,{className:"clients-page__actions",children:r.jsx(_e,{size:"lg",variant:"secondary",onClick:()=>l(`/tools/tool/${s}`),children:"Back to Tool"})})]}):r.jsxs("div",{className:"clients-page",children:[r.jsx(ce,{children:y.map(_=>r.jsx(M_,{client:_,onClick:()=>l(`/tools/tool/${s}/clients/${_.id}`)},_.id))}),r.jsx(ce,{className:"clients-page__actions",children:r.jsx(_e,{size:"lg",variant:"secondary",onClick:()=>l(`/tools/tool/${s}`),children:"Back to Tool"})})]})}function M_({client:s,onClick:l}){const i=U_(s);return r.jsxs(de,{leading:r.jsx(Xe,{name:s.friendlyName,size:"lg"}),topRight:yt(s.updatedAt),tags:i,onClick:l,children:[r.jsx(E,{className:"pre",style:"mono",tone:"muted",children:s.clientId}),r.jsx(E,{weight:"bold",size:"3",tone:"default",children:s.friendlyName}),r.jsx("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r.jsx(E,{tone:"muted",size:"2",children:s.authorizeUrl})})]})}function U_(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 B_(){const{toolId:s,clientId:l}=Ba(),i=We(),{tools:c,setSectionTitle:d,loadToolDetails:f,loadClientDetails:p}=qs(),x=c.find(w=>w.id===s),[g,y]=m.useState(x||null),[S,T]=m.useState(null),[j,_]=m.useState(!0);if(m.useEffect(()=>{!x&&s?f(s).then(y):x&&y(x)},[s,x,f]),m.useEffect(()=>{l&&(_(!0),p(l).then(w=>{T(w),_(!1)}))},[l,p]),m.useEffect(()=>{if(!S){d("Client");return}d(S.friendlyName)},[S,d]),j)return r.jsx("div",{className:"client-detail-page",children:r.jsx(ue,{spacing:"4",align:"center",children:r.jsx(E,{size:"3",tone:"muted",children:"Loading client..."})})});if(!S)return r.jsx("div",{className:"client-detail-page",children:r.jsxs(ue,{spacing:"4",align:"center",children:[r.jsx(E,{size:"3",tone:"muted",children:"Client not found"}),r.jsx(_e,{variant:"secondary",onClick:()=>i(`/tools/tool/${s}/clients`),children:"Back to clients"})]})});const N=L_(S);return r.jsxs("div",{className:"client-detail-page",children:[r.jsx(ce,{className:"client-detail-page__section",children:r.jsxs(de,{leading:r.jsx(Xe,{size:"sm",name:S.friendlyName}),tags:N,topRight:r.jsx(E,{size:"1",tone:"muted",children:yt(S.updatedAt)}),children:[r.jsx(E,{as:"span",weight:"medium",size:"3",children:S.friendlyName}),r.jsx(E,{as:"span",tone:"muted",style:"mono",children:` #${S.id.slice(0,6)}`})]})}),r.jsx(ce,{className:"client-detail-page__section",children:r.jsxs(de,{children:[r.jsx(E,{as:"span",weight:"medium",size:"3",children:"Client ID"}),r.jsx(E,{size:"2",style:"mono",className:"client-detail-page__value",children:S.clientId})]})}),r.jsx(ce,{className:"client-detail-page__section",children:r.jsxs(de,{children:[r.jsx(E,{as:"span",weight:"medium",size:"3",children:"Connection ID"}),r.jsx(E,{size:"2",style:"mono",className:"client-detail-page__value",children:S.id})]})}),r.jsx(ce,{className:"client-detail-page__section",children:r.jsxs(de,{children:[r.jsx(E,{as:"span",weight:"medium",size:"3",children:"Server ID"}),r.jsx(E,{size:"2",style:"mono",className:"client-detail-page__value",children:S.serverId})]})}),r.jsx(ce,{className:"client-detail-page__section",children:r.jsxs(de,{children:[r.jsx(E,{as:"span",weight:"medium",size:"3",children:"Authorization URL"}),r.jsx(E,{size:"2",style:"mono",className:"client-detail-page__value",children:S.authorizeUrl})]})}),r.jsx(ce,{className:"client-detail-page__section",children:r.jsxs(de,{children:[r.jsx(E,{as:"span",weight:"medium",size:"3",children:"Token URL"}),r.jsx(E,{size:"2",style:"mono",className:"client-detail-page__value",children:S.tokenUrl})]})}),r.jsx(ce,{className:"client-detail-page__section",children:r.jsxs(de,{children:[r.jsx(E,{as:"span",weight:"medium",size:"3",children:"Client Secret"}),r.jsx(E,{size:"2",tone:"muted",children:S.clientSecret?"Configured (hidden)":"Not configured"})]})}),r.jsx(ce,{className:"client-detail-page__section",children:r.jsxs(de,{children:[r.jsx(E,{as:"span",weight:"medium",size:"3",children:"Registration Date"}),r.jsx(E,{size:"2",tone:"muted",children:new Date(S.createdAt).toLocaleString()})]})}),r.jsx(ce,{className:"client-detail-page__section",children:r.jsxs(de,{children:[r.jsx(E,{as:"span",weight:"medium",size:"3",children:"Last Updated"}),r.jsx(E,{size:"2",tone:"muted",children:new Date(S.updatedAt).toLocaleString()})]})}),r.jsxs(ce,{className:"client-detail-page__actions",children:[r.jsx(_e,{size:"lg",variant:"secondary",onClick:()=>i(`/tools/tool/${s}/clients`),children:"Back to Clients"}),r.jsx(_e,{size:"lg",variant:"secondary",onClick:()=>i(`/tools/tool/${s}`),children:"Back to Tool"})]})]})}function L_(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 H_(){return r.jsx(N_,{children:r.jsx(Hn,{children:r.jsxs(Se,{element:r.jsx(O_,{}),children:[r.jsx(Se,{index:!0,element:r.jsx(R_,{})}),r.jsx(Se,{path:"/tool/:toolId",element:r.jsx(D_,{})}),r.jsx(Se,{path:"/tool/:toolId/clients",element:r.jsx(k_,{})}),r.jsx(Se,{path:"/tool/:toolId/clients/:clientId",element:r.jsx(B_,{})})]})})})}V.BASE=qn;const q_=()=>{console.log("useConsent mounting");const[s,l]=m.useState(null),[i,c]=m.useState(null),[d,f]=m.useState(!0),[p,x]=m.useState(null),[g,y]=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),x(null);try{const _=await Qp.authorizationControllerGetConsentMetadata(j);c(_)}catch(_){x(_ instanceof Error?_.message:"Failed to load authorization details")}finally{f(!1)}}},consentMetadata:i,submitConsent:async(j,_,N)=>{y(!0),x(null);try{const w={flow_id:j,approved:N},O=V.BASE??"",B=document.createElement("form");B.method="POST",B.action=`${O}/api/v1/auth/authorize/mcp/${_}/0.0.0`,Object.entries(w).forEach(([X,I])=>{const Q=document.createElement("input");Q.type="hidden",Q.name=X,Q.value=String(I),B.appendChild(Q)}),document.body.appendChild(B),B.submit()}catch(w){x(w instanceof Error?w.message:"Failed to submit consent decision"),y(!1)}},error:p,isApproving:g,isLoading:d}},jg=m.createContext(null);function G_({children:s}){const{message:l,error:i,isLoading:c,isApproving:d,loadConsentMetadata:f,consentMetadata:p,submitConsent:x}=q_(),[g,y]=m.useState(""),S=m.useMemo(()=>({message:l,sectionTitle:g,setSectionTitle:y,loadConsentMetadata:f,consentMetadata:p,submitConsent:x,error:i,isLoading:c,isApproving:d}),[l,g,y,f,p,x,i,c,d]);return r.jsx(jg.Provider,{value:S,children:s})}function Cg(){const s=m.useContext(jg);if(!s)throw new Error("useConsentCtx must be used within <ConsentProvider>");return s}function Y_(){const s=Xt();console.log("Consent page mounting");const{setSectionTitle:l,loadConsentMetadata:i,submitConsent:c,consentMetadata:d,isLoading:f,isApproving:p,error:x}=Cg(),[g]=DS(),y=g.get("flow");if(!y)return r.jsx("div",{children:"whoops! missing flow id 👀"});m.useEffect(()=>{i(y)},[y]),m.useEffect(()=>{console.log("Consent page useEffect hook triggered"),console.log("setting section title"),l("🔐 Authorization request")},[]),m.useMemo(()=>!f&&!x&&d,[f,x,d]);const S=()=>{d&&c(y,w.providedId,!0)},T=()=>{d&&c(y,w.providedId,!1)};if(f)return r.jsxs("div",{children:[r.jsx("div",{className:"spinner"}),r.jsx("p",{children:"Loading authorization details..."})]});if(x||!d)return r.jsxs("div",{children:[r.jsx("h2",{children:"Authorization Error"}),r.jsx(Ua,{children:x||"Invalid authorization request"})]});const{client:j,scopes:_,redirectUri:N,server:w,resource:O,createdAt:B}=d;return r.jsxs("div",{className:"consent-page",children:[r.jsxs("div",{className:"consent-container",children:[s?r.jsxs("div",{className:"consent-header",children:[r.jsx("div",{className:"oauth-icon",children:"🔐"}),r.jsx("h1",{children:"Authorization Request"}),r.jsx("p",{className:"subtitle",children:"Review the following authorization request carefully"})]}):null,r.jsxs("div",{className:"consent-details",children:[r.jsxs(qt,{className:"detail-section",children:[r.jsx("h2",{children:"WHO is requesting access"}),r.jsxs("div",{className:"client-info",children:[r.jsxs("div",{className:"info-row",children:[r.jsx("span",{className:"label",children:"Client Name:"}),r.jsx("span",{className:"value",children:j.clientName})]}),r.jsxs("div",{className:"info-row",children:[r.jsx("span",{className:"label",children:"Client ID:"}),r.jsx("span",{className:"value",children:r.jsx("code",{children:j.clientId})})]}),r.jsxs("div",{className:"info-row",children:[r.jsx("span",{className:"label",children:"Registered:"}),r.jsx("span",{className:"value",children:r.jsx("code",{children:new Date(B).toLocaleString()})})]})]})]}),r.jsxs(qt,{className:"detail-section",children:[r.jsx("h2",{children:"WHAT access is requested"}),_&&_.length>0?r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"scopes-list",children:_.map(X=>r.jsx(V_,{children:X},X))}),r.jsx("p",{style:{marginTop:"12px",fontSize:"13px",color:"#7f8c8d",marginBottom:0},children:"These permissions determine what the client can do on your behalf."})]}):r.jsx("p",{style:{fontSize:"13px",color:"#7f8c8d",marginBottom:0},children:"No specific permissions requested."})]}),r.jsxs(qt,{className:"detail-section",children:[r.jsx("h2",{children:"WHERE access is granted"}),r.jsxs("div",{className:"server-info",children:[r.jsx("div",{className:"server-name",children:w.name}),r.jsxs("div",{className:"server-id",children:["Server ID: ",w.providedId]})]}),r.jsxs("div",{className:"resource-info",style:{marginTop:"16px"},children:[r.jsx("div",{style:{fontSize:"13px",color:"#7f8c8d",marginBottom:"8px"},children:"Resource:"}),r.jsx("code",{children:O})]})]}),r.jsxs(qt,{className:"detail-section",children:[r.jsx("h2",{children:"Redirect Information"}),r.jsx("div",{className:"client-info",children:r.jsxs("div",{className:"info-row",children:[r.jsx("span",{className:"label",children:"Redirect URI:"}),r.jsx("span",{className:"value",children:r.jsx("code",{children:N})})]})}),r.jsx("p",{style:{marginTop:"12px",fontSize:"13px",color:"#7f8c8d",marginBottom:0},children:"After authorization, you will be redirected to this URL."})]})]})]}),x&&r.jsx(Ua,{children:x}),r.jsxs("div",{className:"consent-actions",children:[r.jsx(_e,{variant:"danger",onClick:T,disabled:p,children:"Deny"}),r.jsx(_e,{variant:"primary",onClick:S,disabled:p,children:p?"Approving...":"Approve"})]}),r.jsxs("div",{className:"consent-footer",children:[r.jsxs("p",{children:["By approving, you authorize ",r.jsx("strong",{children:d.client.clientName})," to access the specified resources with the requested permissions."]}),r.jsx(wl,{to:"/",children:"Home"})]})]})}function V_({children:s}){return r.jsx("span",{className:"scope-badge",children:s})}function X_(){const s=Xt(),{sectionTitle:l}=Cg();return r.jsx(r.Fragment,{children:s?r.jsx(La,{sectionTitle:l,children:r.jsx(At,{})}):r.jsx(Ha,{appTitle:"Consent",sectionTitle:l,navItems:[],children:r.jsx(At,{})})})}function Q_(){return r.jsx(G_,{children:r.jsx(Hn,{children:r.jsx(Se,{element:r.jsx(X_,{}),children:r.jsx(Se,{path:"/",element:r.jsx(Y_,{})})})})})}function K_(){return r.jsxs(Hn,{children:[r.jsx(Se,{path:"/logout",element:r.jsx(QT,{})}),r.jsx(Se,{index:!0,element:r.jsx(yr,{to:"home",replace:!0})}),r.jsx(Se,{path:"/consent",element:r.jsx(Q_,{})}),r.jsx(Se,{path:"/*",element:r.jsx(C0,{})}),r.jsx(Se,{path:"/tasks/*",element:r.jsx(XT,{})}),r.jsx(Se,{path:"/context/*",element:r.jsx(PT,{})}),r.jsx(Se,{path:"/agents/*",element:r.jsx(g_,{})}),r.jsx(Se,{path:"/threads/*",element:r.jsx(C_,{})}),r.jsx(Se,{path:"/tools/*",element:r.jsx(H_,{})})]})}function Z_(){return r.jsx(NS,{basename:A0,children:r.jsx(HS,{children:r.jsx(a0,{children:r.jsx(qT,{children:r.jsxs(Hn,{children:[r.jsx(Se,{path:"/login",element:r.jsx(d0,{})}),r.jsx(Se,{path:"*",element:r.jsx(f0,{children:r.jsx(m0,{children:r.jsx(K_,{})})})})]})})})})})}sx.createRoot(document.getElementById("root")).render(r.jsx(Fv.StrictMode,{children:r.jsx(Z_,{})}));