@grackle-ai/web 0.24.0 → 0.24.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import{r as Mb,a as _,j as d,v as Rb,b as Ob,t as Fo,i as zb,f as Bb,M as fd,c as hd}from"./markdown-gcy1Jmzi.js";import{r as Ub,d as Hp,H as Ip,P as Gp,i as Vb,B as Lb,a as qb,C as Hb,M as Ib}from"./dagview-EHk2VaeR.js";(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))o(u);new MutationObserver(u=>{for(const h of u)if(h.type==="childList")for(const f of h.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&o(f)}).observe(document,{childList:!0,subtree:!0});function l(u){const h={};return u.integrity&&(h.integrity=u.integrity),u.referrerPolicy&&(h.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?h.credentials="include":u.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function o(u){if(u.ep)return;u.ep=!0;const h=l(u);fetch(u.href,h)}})();var ku={exports:{}},pl={},wu={exports:{}},Mu={};/**
1
+ import{r as Mb,a as S,j as d,v as Rb,b as Ob,t as Fo,i as zb,f as Bb,M as fd,c as hd}from"./markdown-gcy1Jmzi.js";import{r as Ub,d as Hp,H as Ip,P as Gp,i as Vb,B as Lb,a as qb,C as Hb,M as Ib}from"./dagview-EHk2VaeR.js";(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))o(u);new MutationObserver(u=>{for(const h of u)if(h.type==="childList")for(const f of h.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&o(f)}).observe(document,{childList:!0,subtree:!0});function l(u){const h={};return u.integrity&&(h.integrity=u.integrity),u.referrerPolicy&&(h.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?h.credentials="include":u.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function o(u){if(u.ep)return;u.ep=!0;const h=l(u);fetch(u.href,h)}})();var ku={exports:{}},pl={},wu={exports:{}},Mu={};/**
2
2
  * @license React
3
3
  * scheduler.production.js
4
4
  *
@@ -6,7 +6,7 @@ import{r as Mb,a as _,j as d,v as Rb,b as Ob,t as Fo,i as zb,f as Bb,M as fd,c a
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Yp;function Gb(){return Yp||(Yp=1,(function(a){function i(B,Q){var lt=B.length;B.push(Q);t:for(;0<lt;){var Ct=lt-1>>>1,vt=B[Ct];if(0<u(vt,Q))B[Ct]=Q,B[lt]=vt,lt=Ct;else break t}}function l(B){return B.length===0?null:B[0]}function o(B){if(B.length===0)return null;var Q=B[0],lt=B.pop();if(lt!==Q){B[0]=lt;t:for(var Ct=0,vt=B.length,Pt=vt>>>1;Ct<Pt;){var bt=2*(Ct+1)-1,St=B[bt],G=bt+1,ae=B[G];if(0>u(St,lt))G<vt&&0>u(ae,St)?(B[Ct]=ae,B[G]=lt,Ct=G):(B[Ct]=St,B[bt]=lt,Ct=bt);else if(G<vt&&0>u(ae,lt))B[Ct]=ae,B[G]=lt,Ct=G;else break t}}return Q}function u(B,Q){var lt=B.sortIndex-Q.sortIndex;return lt!==0?lt:B.id-Q.id}if(a.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;a.unstable_now=function(){return h.now()}}else{var f=Date,p=f.now();a.unstable_now=function(){return f.now()-p}}var v=[],g=[],b=1,S=null,x=3,E=!1,M=!1,R=!1,K=!1,O=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,Y=typeof setImmediate<"u"?setImmediate:null;function et(B){for(var Q=l(g);Q!==null;){if(Q.callback===null)o(g);else if(Q.startTime<=B)o(g),Q.sortIndex=Q.expirationTime,i(v,Q);else break;Q=l(g)}}function X(B){if(R=!1,et(B),!M)if(l(v)!==null)M=!0,L||(L=!0,Dt());else{var Q=l(g);Q!==null&&_t(X,Q.startTime-B)}}var L=!1,tt=-1,U=5,nt=-1;function at(){return K?!0:!(a.unstable_now()-nt<U)}function mt(){if(K=!1,L){var B=a.unstable_now();nt=B;var Q=!0;try{t:{M=!1,R&&(R=!1,P(tt),tt=-1),E=!0;var lt=x;try{e:{for(et(B),S=l(v);S!==null&&!(S.expirationTime>B&&at());){var Ct=S.callback;if(typeof Ct=="function"){S.callback=null,x=S.priorityLevel;var vt=Ct(S.expirationTime<=B);if(B=a.unstable_now(),typeof vt=="function"){S.callback=vt,et(B),Q=!0;break e}S===l(v)&&o(v),et(B)}else o(v);S=l(v)}if(S!==null)Q=!0;else{var Pt=l(g);Pt!==null&&_t(X,Pt.startTime-B),Q=!1}}break t}finally{S=null,x=lt,E=!1}Q=void 0}}finally{Q?Dt():L=!1}}}var Dt;if(typeof Y=="function")Dt=function(){Y(mt)};else if(typeof MessageChannel<"u"){var $=new MessageChannel,st=$.port2;$.port1.onmessage=mt,Dt=function(){st.postMessage(null)}}else Dt=function(){O(mt,0)};function _t(B,Q){tt=O(function(){B(a.unstable_now())},Q)}a.unstable_IdlePriority=5,a.unstable_ImmediatePriority=1,a.unstable_LowPriority=4,a.unstable_NormalPriority=3,a.unstable_Profiling=null,a.unstable_UserBlockingPriority=2,a.unstable_cancelCallback=function(B){B.callback=null},a.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):U=0<B?Math.floor(1e3/B):5},a.unstable_getCurrentPriorityLevel=function(){return x},a.unstable_next=function(B){switch(x){case 1:case 2:case 3:var Q=3;break;default:Q=x}var lt=x;x=Q;try{return B()}finally{x=lt}},a.unstable_requestPaint=function(){K=!0},a.unstable_runWithPriority=function(B,Q){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var lt=x;x=B;try{return Q()}finally{x=lt}},a.unstable_scheduleCallback=function(B,Q,lt){var Ct=a.unstable_now();switch(typeof lt=="object"&&lt!==null?(lt=lt.delay,lt=typeof lt=="number"&&0<lt?Ct+lt:Ct):lt=Ct,B){case 1:var vt=-1;break;case 2:vt=250;break;case 5:vt=1073741823;break;case 4:vt=1e4;break;default:vt=5e3}return vt=lt+vt,B={id:b++,callback:Q,priorityLevel:B,startTime:lt,expirationTime:vt,sortIndex:-1},lt>Ct?(B.sortIndex=lt,i(g,B),l(v)===null&&B===l(g)&&(R?(P(tt),tt=-1):R=!0,_t(X,lt-Ct))):(B.sortIndex=vt,i(v,B),M||E||(M=!0,L||(L=!0,Dt()))),B},a.unstable_shouldYield=at,a.unstable_wrapCallback=function(B){var Q=x;return function(){var lt=x;x=Q;try{return B.apply(this,arguments)}finally{x=lt}}}})(Mu)),Mu}var Zp;function Yb(){return Zp||(Zp=1,wu.exports=Gb()),wu.exports}/**
9
+ */var Yp;function Gb(){return Yp||(Yp=1,(function(a){function i(B,Q){var lt=B.length;B.push(Q);t:for(;0<lt;){var Ct=lt-1>>>1,vt=B[Ct];if(0<u(vt,Q))B[Ct]=Q,B[lt]=vt,lt=Ct;else break t}}function l(B){return B.length===0?null:B[0]}function o(B){if(B.length===0)return null;var Q=B[0],lt=B.pop();if(lt!==Q){B[0]=lt;t:for(var Ct=0,vt=B.length,Ft=vt>>>1;Ct<Ft;){var bt=2*(Ct+1)-1,_t=B[bt],G=bt+1,ae=B[G];if(0>u(_t,lt))G<vt&&0>u(ae,_t)?(B[Ct]=ae,B[G]=lt,Ct=G):(B[Ct]=_t,B[bt]=lt,Ct=bt);else if(G<vt&&0>u(ae,lt))B[Ct]=ae,B[G]=lt,Ct=G;else break t}}return Q}function u(B,Q){var lt=B.sortIndex-Q.sortIndex;return lt!==0?lt:B.id-Q.id}if(a.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;a.unstable_now=function(){return h.now()}}else{var f=Date,p=f.now();a.unstable_now=function(){return f.now()-p}}var v=[],g=[],b=1,_=null,x=3,E=!1,M=!1,R=!1,K=!1,O=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,Y=typeof setImmediate<"u"?setImmediate:null;function et(B){for(var Q=l(g);Q!==null;){if(Q.callback===null)o(g);else if(Q.startTime<=B)o(g),Q.sortIndex=Q.expirationTime,i(v,Q);else break;Q=l(g)}}function X(B){if(R=!1,et(B),!M)if(l(v)!==null)M=!0,L||(L=!0,Dt());else{var Q=l(g);Q!==null&&St(X,Q.startTime-B)}}var L=!1,tt=-1,U=5,nt=-1;function at(){return K?!0:!(a.unstable_now()-nt<U)}function mt(){if(K=!1,L){var B=a.unstable_now();nt=B;var Q=!0;try{t:{M=!1,R&&(R=!1,P(tt),tt=-1),E=!0;var lt=x;try{e:{for(et(B),_=l(v);_!==null&&!(_.expirationTime>B&&at());){var Ct=_.callback;if(typeof Ct=="function"){_.callback=null,x=_.priorityLevel;var vt=Ct(_.expirationTime<=B);if(B=a.unstable_now(),typeof vt=="function"){_.callback=vt,et(B),Q=!0;break e}_===l(v)&&o(v),et(B)}else o(v);_=l(v)}if(_!==null)Q=!0;else{var Ft=l(g);Ft!==null&&St(X,Ft.startTime-B),Q=!1}}break t}finally{_=null,x=lt,E=!1}Q=void 0}}finally{Q?Dt():L=!1}}}var Dt;if(typeof Y=="function")Dt=function(){Y(mt)};else if(typeof MessageChannel<"u"){var $=new MessageChannel,st=$.port2;$.port1.onmessage=mt,Dt=function(){st.postMessage(null)}}else Dt=function(){O(mt,0)};function St(B,Q){tt=O(function(){B(a.unstable_now())},Q)}a.unstable_IdlePriority=5,a.unstable_ImmediatePriority=1,a.unstable_LowPriority=4,a.unstable_NormalPriority=3,a.unstable_Profiling=null,a.unstable_UserBlockingPriority=2,a.unstable_cancelCallback=function(B){B.callback=null},a.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):U=0<B?Math.floor(1e3/B):5},a.unstable_getCurrentPriorityLevel=function(){return x},a.unstable_next=function(B){switch(x){case 1:case 2:case 3:var Q=3;break;default:Q=x}var lt=x;x=Q;try{return B()}finally{x=lt}},a.unstable_requestPaint=function(){K=!0},a.unstable_runWithPriority=function(B,Q){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var lt=x;x=B;try{return Q()}finally{x=lt}},a.unstable_scheduleCallback=function(B,Q,lt){var Ct=a.unstable_now();switch(typeof lt=="object"&&lt!==null?(lt=lt.delay,lt=typeof lt=="number"&&0<lt?Ct+lt:Ct):lt=Ct,B){case 1:var vt=-1;break;case 2:vt=250;break;case 5:vt=1073741823;break;case 4:vt=1e4;break;default:vt=5e3}return vt=lt+vt,B={id:b++,callback:Q,priorityLevel:B,startTime:lt,expirationTime:vt,sortIndex:-1},lt>Ct?(B.sortIndex=lt,i(g,B),l(v)===null&&B===l(g)&&(R?(P(tt),tt=-1):R=!0,St(X,lt-Ct))):(B.sortIndex=vt,i(v,B),M||E||(M=!0,L||(L=!0,Dt()))),B},a.unstable_shouldYield=at,a.unstable_wrapCallback=function(B){var Q=x;return function(){var lt=x;x=Q;try{return B.apply(this,arguments)}finally{x=lt}}}})(Mu)),Mu}var Zp;function Yb(){return Zp||(Zp=1,wu.exports=Gb()),wu.exports}/**
10
10
  * @license React
11
11
  * react-dom-client.production.js
12
12
  *
@@ -14,15 +14,15 @@ import{r as Mb,a as _,j as d,v as Rb,b as Ob,t as Fo,i as zb,f as Bb,M as fd,c a
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Kp;function Zb(){if(Kp)return pl;Kp=1;var a=Yb(),i=Mb(),l=Ub();function o(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function h(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,(e.flags&4098)!==0&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function f(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function p(t){if(t.tag===31){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function v(t){if(h(t)!==t)throw Error(o(188))}function g(t){var e=t.alternate;if(!e){if(e=h(t),e===null)throw Error(o(188));return e!==t?null:t}for(var n=t,s=e;;){var r=n.return;if(r===null)break;var c=r.alternate;if(c===null){if(s=r.return,s!==null){n=s;continue}break}if(r.child===c.child){for(c=r.child;c;){if(c===n)return v(r),t;if(c===s)return v(r),e;c=c.sibling}throw Error(o(188))}if(n.return!==s.return)n=r,s=c;else{for(var m=!1,y=r.child;y;){if(y===n){m=!0,n=r,s=c;break}if(y===s){m=!0,s=r,n=c;break}y=y.sibling}if(!m){for(y=c.child;y;){if(y===n){m=!0,n=c,s=r;break}if(y===s){m=!0,s=c,n=r;break}y=y.sibling}if(!m)throw Error(o(189))}}if(n.alternate!==s)throw Error(o(190))}if(n.tag!==3)throw Error(o(188));return n.stateNode.current===n?t:e}function b(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=b(t),e!==null)return e;t=t.sibling}return null}var S=Object.assign,x=Symbol.for("react.element"),E=Symbol.for("react.transitional.element"),M=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),K=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),P=Symbol.for("react.consumer"),Y=Symbol.for("react.context"),et=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),tt=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),nt=Symbol.for("react.activity"),at=Symbol.for("react.memo_cache_sentinel"),mt=Symbol.iterator;function Dt(t){return t===null||typeof t!="object"?null:(t=mt&&t[mt]||t["@@iterator"],typeof t=="function"?t:null)}var $=Symbol.for("react.client.reference");function st(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===$?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case R:return"Fragment";case O:return"Profiler";case K:return"StrictMode";case X:return"Suspense";case L:return"SuspenseList";case nt:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case M:return"Portal";case Y:return t.displayName||"Context";case P:return(t._context.displayName||"Context")+".Consumer";case et:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case tt:return e=t.displayName||null,e!==null?e:st(t.type)||"Memo";case U:e=t._payload,t=t._init;try{return st(t(e))}catch{}}return null}var _t=Array.isArray,B=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,lt={pending:!1,data:null,method:null,action:null},Ct=[],vt=-1;function Pt(t){return{current:t}}function bt(t){0>vt||(t.current=Ct[vt],Ct[vt]=null,vt--)}function St(t,e){vt++,Ct[vt]=t.current,t.current=e}var G=Pt(null),ae=Pt(null),ye=Pt(null),en=Pt(null);function He(t,e){switch(St(ye,e),St(ae,t),St(G,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?up(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=up(e),t=dp(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}bt(G),St(G,t)}function Wt(){bt(G),bt(ae),bt(ye)}function nn(t){t.memoizedState!==null&&St(en,t);var e=G.current,n=dp(e,t.type);e!==n&&(St(ae,t),St(G,n))}function Ue(t){ae.current===t&&(bt(G),bt(ae)),en.current===t&&(bt(en),dl._currentValue=lt)}var It,Kt;function me(t){if(It===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);It=e&&e[1]||"",Kt=-1<n.stack.indexOf(`
17
+ */var Kp;function Zb(){if(Kp)return pl;Kp=1;var a=Yb(),i=Mb(),l=Ub();function o(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function h(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,(e.flags&4098)!==0&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function f(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function p(t){if(t.tag===31){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function v(t){if(h(t)!==t)throw Error(o(188))}function g(t){var e=t.alternate;if(!e){if(e=h(t),e===null)throw Error(o(188));return e!==t?null:t}for(var n=t,s=e;;){var r=n.return;if(r===null)break;var c=r.alternate;if(c===null){if(s=r.return,s!==null){n=s;continue}break}if(r.child===c.child){for(c=r.child;c;){if(c===n)return v(r),t;if(c===s)return v(r),e;c=c.sibling}throw Error(o(188))}if(n.return!==s.return)n=r,s=c;else{for(var m=!1,y=r.child;y;){if(y===n){m=!0,n=r,s=c;break}if(y===s){m=!0,s=r,n=c;break}y=y.sibling}if(!m){for(y=c.child;y;){if(y===n){m=!0,n=c,s=r;break}if(y===s){m=!0,s=c,n=r;break}y=y.sibling}if(!m)throw Error(o(189))}}if(n.alternate!==s)throw Error(o(190))}if(n.tag!==3)throw Error(o(188));return n.stateNode.current===n?t:e}function b(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=b(t),e!==null)return e;t=t.sibling}return null}var _=Object.assign,x=Symbol.for("react.element"),E=Symbol.for("react.transitional.element"),M=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),K=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),P=Symbol.for("react.consumer"),Y=Symbol.for("react.context"),et=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),tt=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),nt=Symbol.for("react.activity"),at=Symbol.for("react.memo_cache_sentinel"),mt=Symbol.iterator;function Dt(t){return t===null||typeof t!="object"?null:(t=mt&&t[mt]||t["@@iterator"],typeof t=="function"?t:null)}var $=Symbol.for("react.client.reference");function st(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===$?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case R:return"Fragment";case O:return"Profiler";case K:return"StrictMode";case X:return"Suspense";case L:return"SuspenseList";case nt:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case M:return"Portal";case Y:return t.displayName||"Context";case P:return(t._context.displayName||"Context")+".Consumer";case et:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case tt:return e=t.displayName||null,e!==null?e:st(t.type)||"Memo";case U:e=t._payload,t=t._init;try{return st(t(e))}catch{}}return null}var St=Array.isArray,B=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,lt={pending:!1,data:null,method:null,action:null},Ct=[],vt=-1;function Ft(t){return{current:t}}function bt(t){0>vt||(t.current=Ct[vt],Ct[vt]=null,vt--)}function _t(t,e){vt++,Ct[vt]=t.current,t.current=e}var G=Ft(null),ae=Ft(null),ye=Ft(null),en=Ft(null);function He(t,e){switch(_t(ye,e),_t(ae,t),_t(G,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?up(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=up(e),t=dp(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}bt(G),_t(G,t)}function Wt(){bt(G),bt(ae),bt(ye)}function nn(t){t.memoizedState!==null&&_t(en,t);var e=G.current,n=dp(e,t.type);e!==n&&(_t(ae,t),_t(G,n))}function Ue(t){ae.current===t&&(bt(G),bt(ae)),en.current===t&&(bt(en),dl._currentValue=lt)}var It,Kt;function me(t){if(It===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);It=e&&e[1]||"",Kt=-1<n.stack.indexOf(`
18
18
  at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
19
19
  `+It+t+Kt}var F=!1;function Rt(t,e){if(!t||F)return"";F=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(e){var Z=function(){throw Error()};if(Object.defineProperty(Z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Z,[])}catch(z){var k=z}Reflect.construct(t,[],Z)}else{try{Z.call()}catch(z){k=z}t.call(Z.prototype)}}else{try{throw Error()}catch(z){k=z}(Z=t())&&typeof Z.catch=="function"&&Z.catch(function(){})}}catch(z){if(z&&k&&typeof z.stack=="string")return[z.stack,k.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=s.DetermineComponentFrameRoot(),m=c[0],y=c[1];if(m&&y){var T=m.split(`
20
20
  `),D=y.split(`
21
21
  `);for(r=s=0;s<T.length&&!T[s].includes("DetermineComponentFrameRoot");)s++;for(;r<D.length&&!D[r].includes("DetermineComponentFrameRoot");)r++;if(s===T.length||r===D.length)for(s=T.length-1,r=D.length-1;1<=s&&0<=r&&T[s]!==D[r];)r--;for(;1<=s&&0<=r;s--,r--)if(T[s]!==D[r]){if(s!==1||r!==1)do if(s--,r--,0>r||T[s]!==D[r]){var q=`
22
22
  `+T[s].replace(" at new "," at ");return t.displayName&&q.includes("<anonymous>")&&(q=q.replace("<anonymous>",t.displayName)),q}while(1<=s&&0<=r);break}}}finally{F=!1,Error.prepareStackTrace=n}return(n=t?t.displayName||t.name:"")?me(n):""}function xt(t,e){switch(t.tag){case 26:case 27:case 5:return me(t.type);case 16:return me("Lazy");case 13:return t.child!==e&&e!==null?me("Suspense Fallback"):me("Suspense");case 19:return me("SuspenseList");case 0:case 15:return Rt(t.type,!1);case 11:return Rt(t.type.render,!1);case 1:return Rt(t.type,!0);case 31:return me("Activity");default:return""}}function w(t){try{var e="",n=null;do e+=xt(t,n),n=t,t=t.return;while(t);return e}catch(s){return`
23
23
  Error generating stack: `+s.message+`
24
- `+s.stack}}var V=Object.prototype.hasOwnProperty,W=a.unstable_scheduleCallback,ot=a.unstable_cancelCallback,jt=a.unstable_shouldYield,At=a.unstable_requestPaint,ht=a.unstable_now,de=a.unstable_getCurrentPriorityLevel,kt=a.unstable_ImmediatePriority,pe=a.unstable_UserBlockingPriority,se=a.unstable_NormalPriority,Me=a.unstable_LowPriority,H=a.unstable_IdlePriority,Vt=a.log,Fn=a.unstable_setDisableYieldValue,Ie=null,Re=null;function an(t){if(typeof Vt=="function"&&Fn(t),Re&&typeof Re.setStrictMode=="function")try{Re.setStrictMode(Ie,t)}catch{}}var J=Math.clz32?Math.clz32:Xt,Tt=Math.log,le=Math.LN2;function Xt(t){return t>>>=0,t===0?32:31-(Tt(t)/le|0)|0}var ft=256,Oe=262144,Je=4194304;function sn(t){var e=t&42;if(e!==0)return e;switch(t&-t){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 t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function it(t,e,n){var s=t.pendingLanes;if(s===0)return 0;var r=0,c=t.suspendedLanes,m=t.pingedLanes;t=t.warmLanes;var y=s&134217727;return y!==0?(s=y&~c,s!==0?r=sn(s):(m&=y,m!==0?r=sn(m):n||(n=y&~t,n!==0&&(r=sn(n))))):(y=s&~c,y!==0?r=sn(y):m!==0?r=sn(m):n||(n=s&~t,n!==0&&(r=sn(n)))),r===0?0:e!==0&&e!==r&&(e&c)===0&&(c=r&-r,n=e&-e,c>=n||c===32&&(n&4194048)!==0)?e:r}function fe(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function fn(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+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 e+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 ya(){var t=Je;return Je<<=1,(Je&62914560)===0&&(Je=4194304),t}function Ts(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function ba(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Bl(t,e,n,s,r,c){var m=t.pendingLanes;t.pendingLanes=n,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=n,t.entangledLanes&=n,t.errorRecoveryDisabledLanes&=n,t.shellSuspendCounter=0;var y=t.entanglements,T=t.expirationTimes,D=t.hiddenUpdates;for(n=m&~n;0<n;){var q=31-J(n),Z=1<<q;y[q]=0,T[q]=-1;var k=D[q];if(k!==null)for(D[q]=null,q=0;q<k.length;q++){var z=k[q];z!==null&&(z.lane&=-536870913)}n&=~Z}s!==0&&_i(t,s,0),c!==0&&r===0&&t.tag!==0&&(t.suspendedLanes|=c&~(m&~e))}function _i(t,e,n){t.pendingLanes|=e,t.suspendedLanes&=~e;var s=31-J(e);t.entangledLanes|=e,t.entanglements[s]=t.entanglements[s]|1073741824|n&261930}function Ti(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var s=31-J(n),r=1<<s;r&e|t[s]&e&&(t[s]|=e),n&=~r}}function xi(t,e){var n=e&-e;return n=(n&42)!==0?1:xs(n),(n&(t.suspendedLanes|e))!==0?0:n}function xs(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function js(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function ji(){var t=Q.p;return t!==0?t:(t=window.event,t===void 0?32:Op(t.type))}function Ai(t,e){var n=Q.p;try{return Q.p=t,e()}finally{Q.p=n}}var zn=Math.random().toString(36).slice(2),Ee="__reactFiber$"+zn,Ge="__reactProps$"+zn,ct="__reactContainer$"+zn,Ut="__reactEvents$"+zn,Gt="__reactListeners$"+zn,oe="__reactHandles$"+zn,Fa="__reactResources$"+zn,qn="__reactMarker$"+zn;function Ni(t){delete t[Ee],delete t[Ge],delete t[Ut],delete t[Gt],delete t[oe]}function As(t){var e=t[Ee];if(e)return e;for(var n=t.parentNode;n;){if(e=n[ct]||n[Ee]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=yp(t);t!==null;){if(n=t[Ee])return n;t=yp(t)}return e}t=n,n=t.parentNode}return null}function Ns(t){if(t=t[Ee]||t[ct]){var e=t.tag;if(e===5||e===6||e===13||e===31||e===26||e===27||e===3)return t}return null}function Ei(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t.stateNode;throw Error(o(33))}function Es(t){var e=t[Fa];return e||(e=t[Fa]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function Ve(t){t[qn]=!0}var Jd=new Set,$d={};function Ja(t,e){Cs(t,e),Cs(t+"Capture",e)}function Cs(t,e){for($d[t]=e,t=0;t<e.length;t++)Jd.add(e[t])}var xy=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]*$"),Wd={},tf={};function jy(t){return V.call(tf,t)?!0:V.call(Wd,t)?!1:xy.test(t)?tf[t]=!0:(Wd[t]=!0,!1)}function Ul(t,e,n){if(jy(e))if(n===null)t.removeAttribute(e);else{switch(typeof n){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var s=e.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,""+n)}}function Vl(t,e,n){if(n===null)t.removeAttribute(e);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,""+n)}}function Jn(t,e,n,s){if(s===null)t.removeAttribute(n);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttributeNS(e,n,""+s)}}function Tn(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function ef(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Ay(t,e,n){var s=Object.getOwnPropertyDescriptor(t.constructor.prototype,e);if(!t.hasOwnProperty(e)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var r=s.get,c=s.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return r.call(this)},set:function(m){n=""+m,c.call(this,m)}}),Object.defineProperty(t,e,{enumerable:s.enumerable}),{getValue:function(){return n},setValue:function(m){n=""+m},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function xr(t){if(!t._valueTracker){var e=ef(t)?"checked":"value";t._valueTracker=Ay(t,e,""+t[e])}}function nf(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),s="";return t&&(s=ef(t)?t.checked?"true":"false":t.value),t=s,t!==n?(e.setValue(t),!0):!1}function Ll(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var Ny=/[\n"\\]/g;function xn(t){return t.replace(Ny,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function jr(t,e,n,s,r,c,m,y){t.name="",m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?t.type=m:t.removeAttribute("type"),e!=null?m==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+Tn(e)):t.value!==""+Tn(e)&&(t.value=""+Tn(e)):m!=="submit"&&m!=="reset"||t.removeAttribute("value"),e!=null?Ar(t,m,Tn(e)):n!=null?Ar(t,m,Tn(n)):s!=null&&t.removeAttribute("value"),r==null&&c!=null&&(t.defaultChecked=!!c),r!=null&&(t.checked=r&&typeof r!="function"&&typeof r!="symbol"),y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?t.name=""+Tn(y):t.removeAttribute("name")}function af(t,e,n,s,r,c,m,y){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(t.type=c),e!=null||n!=null){if(!(c!=="submit"&&c!=="reset"||e!=null)){xr(t);return}n=n!=null?""+Tn(n):"",e=e!=null?""+Tn(e):n,y||e===t.value||(t.value=e),t.defaultValue=e}s=s??r,s=typeof s!="function"&&typeof s!="symbol"&&!!s,t.checked=y?t.checked:!!s,t.defaultChecked=!!s,m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(t.name=m),xr(t)}function Ar(t,e,n){e==="number"&&Ll(t.ownerDocument)===t||t.defaultValue===""+n||(t.defaultValue=""+n)}function Ds(t,e,n,s){if(t=t.options,e){e={};for(var r=0;r<n.length;r++)e["$"+n[r]]=!0;for(n=0;n<t.length;n++)r=e.hasOwnProperty("$"+t[n].value),t[n].selected!==r&&(t[n].selected=r),r&&s&&(t[n].defaultSelected=!0)}else{for(n=""+Tn(n),e=null,r=0;r<t.length;r++){if(t[r].value===n){t[r].selected=!0,s&&(t[r].defaultSelected=!0);return}e!==null||t[r].disabled||(e=t[r])}e!==null&&(e.selected=!0)}}function sf(t,e,n){if(e!=null&&(e=""+Tn(e),e!==t.value&&(t.value=e),n==null)){t.defaultValue!==e&&(t.defaultValue=e);return}t.defaultValue=n!=null?""+Tn(n):""}function lf(t,e,n,s){if(e==null){if(s!=null){if(n!=null)throw Error(o(92));if(_t(s)){if(1<s.length)throw Error(o(93));s=s[0]}n=s}n==null&&(n=""),e=n}n=Tn(e),t.defaultValue=n,s=t.textContent,s===n&&s!==""&&s!==null&&(t.value=s),xr(t)}function ks(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Ey=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 of(t,e,n){var s=e.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?s?t.setProperty(e,""):e==="float"?t.cssFloat="":t[e]="":s?t.setProperty(e,n):typeof n!="number"||n===0||Ey.has(e)?e==="float"?t.cssFloat=n:t[e]=(""+n).trim():t[e]=n+"px"}function rf(t,e,n){if(e!=null&&typeof e!="object")throw Error(o(62));if(t=t.style,n!=null){for(var s in n)!n.hasOwnProperty(s)||e!=null&&e.hasOwnProperty(s)||(s.indexOf("--")===0?t.setProperty(s,""):s==="float"?t.cssFloat="":t[s]="");for(var r in e)s=e[r],e.hasOwnProperty(r)&&n[r]!==s&&of(t,r,s)}else for(var c in e)e.hasOwnProperty(c)&&of(t,c,e[c])}function Nr(t){if(t.indexOf("-")===-1)return!1;switch(t){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 Cy=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"]]),Dy=/^[\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 ql(t){return Dy.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function $n(){}var Er=null;function Cr(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var ws=null,Ms=null;function cf(t){var e=Ns(t);if(e&&(t=e.stateNode)){var n=t[Ge]||null;t:switch(t=e.stateNode,e.type){case"input":if(jr(t,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+xn(""+e)+'"][type="radio"]'),e=0;e<n.length;e++){var s=n[e];if(s!==t&&s.form===t.form){var r=s[Ge]||null;if(!r)throw Error(o(90));jr(s,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(e=0;e<n.length;e++)s=n[e],s.form===t.form&&nf(s)}break t;case"textarea":sf(t,n.value,n.defaultValue);break t;case"select":e=n.value,e!=null&&Ds(t,!!n.multiple,e,!1)}}}var Dr=!1;function uf(t,e,n){if(Dr)return t(e,n);Dr=!0;try{var s=t(e);return s}finally{if(Dr=!1,(ws!==null||Ms!==null)&&(Co(),ws&&(e=ws,t=Ms,Ms=ws=null,cf(e),t)))for(e=0;e<t.length;e++)cf(t[e])}}function Ci(t,e){var n=t.stateNode;if(n===null)return null;var s=n[Ge]||null;if(s===null)return null;n=s[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(t=t.type,s=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!s;break t;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(o(231,e,typeof n));return n}var Wn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),kr=!1;if(Wn)try{var Di={};Object.defineProperty(Di,"passive",{get:function(){kr=!0}}),window.addEventListener("test",Di,Di),window.removeEventListener("test",Di,Di)}catch{kr=!1}var Sa=null,wr=null,Hl=null;function df(){if(Hl)return Hl;var t,e=wr,n=e.length,s,r="value"in Sa?Sa.value:Sa.textContent,c=r.length;for(t=0;t<n&&e[t]===r[t];t++);var m=n-t;for(s=1;s<=m&&e[n-s]===r[c-s];s++);return Hl=r.slice(t,1<s?1-s:void 0)}function Il(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Gl(){return!0}function ff(){return!1}function ln(t){function e(n,s,r,c,m){this._reactName=n,this._targetInst=r,this.type=s,this.nativeEvent=c,this.target=m,this.currentTarget=null;for(var y in t)t.hasOwnProperty(y)&&(n=t[y],this[y]=n?n(c):c[y]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?Gl:ff,this.isPropagationStopped=ff,this}return S(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Gl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Gl)},persist:function(){},isPersistent:Gl}),e}var $a={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Yl=ln($a),ki=S({},$a,{view:0,detail:0}),ky=ln(ki),Mr,Rr,wi,Zl=S({},ki,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zr,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==wi&&(wi&&t.type==="mousemove"?(Mr=t.screenX-wi.screenX,Rr=t.screenY-wi.screenY):Rr=Mr=0,wi=t),Mr)},movementY:function(t){return"movementY"in t?t.movementY:Rr}}),hf=ln(Zl),wy=S({},Zl,{dataTransfer:0}),My=ln(wy),Ry=S({},ki,{relatedTarget:0}),Or=ln(Ry),Oy=S({},$a,{animationName:0,elapsedTime:0,pseudoElement:0}),zy=ln(Oy),By=S({},$a,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Uy=ln(By),Vy=S({},$a,{data:0}),mf=ln(Vy),Ly={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},qy={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"},Hy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Iy(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=Hy[t])?!!e[t]:!1}function zr(){return Iy}var Gy=S({},ki,{key:function(t){if(t.key){var e=Ly[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Il(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?qy[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zr,charCode:function(t){return t.type==="keypress"?Il(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Il(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Yy=ln(Gy),Zy=S({},Zl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),pf=ln(Zy),Ky=S({},ki,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zr}),Xy=ln(Ky),Qy=S({},$a,{propertyName:0,elapsedTime:0,pseudoElement:0}),Py=ln(Qy),Fy=S({},Zl,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),Jy=ln(Fy),$y=S({},$a,{newState:0,oldState:0}),Wy=ln($y),t1=[9,13,27,32],Br=Wn&&"CompositionEvent"in window,Mi=null;Wn&&"documentMode"in document&&(Mi=document.documentMode);var e1=Wn&&"TextEvent"in window&&!Mi,vf=Wn&&(!Br||Mi&&8<Mi&&11>=Mi),gf=" ",yf=!1;function bf(t,e){switch(t){case"keyup":return t1.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Sf(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Rs=!1;function n1(t,e){switch(t){case"compositionend":return Sf(e);case"keypress":return e.which!==32?null:(yf=!0,gf);case"textInput":return t=e.data,t===gf&&yf?null:t;default:return null}}function a1(t,e){if(Rs)return t==="compositionend"||!Br&&bf(t,e)?(t=df(),Hl=wr=Sa=null,Rs=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return vf&&e.locale!=="ko"?null:e.data;default:return null}}var s1={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 _f(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!s1[t.type]:e==="textarea"}function Tf(t,e,n,s){ws?Ms?Ms.push(s):Ms=[s]:ws=s,e=zo(e,"onChange"),0<e.length&&(n=new Yl("onChange","change",null,n,s),t.push({event:n,listeners:e}))}var Ri=null,Oi=null;function i1(t){sp(t,0)}function Kl(t){var e=Ei(t);if(nf(e))return t}function xf(t,e){if(t==="change")return e}var jf=!1;if(Wn){var Ur;if(Wn){var Vr="oninput"in document;if(!Vr){var Af=document.createElement("div");Af.setAttribute("oninput","return;"),Vr=typeof Af.oninput=="function"}Ur=Vr}else Ur=!1;jf=Ur&&(!document.documentMode||9<document.documentMode)}function Nf(){Ri&&(Ri.detachEvent("onpropertychange",Ef),Oi=Ri=null)}function Ef(t){if(t.propertyName==="value"&&Kl(Oi)){var e=[];Tf(e,Oi,t,Cr(t)),uf(i1,e)}}function l1(t,e,n){t==="focusin"?(Nf(),Ri=e,Oi=n,Ri.attachEvent("onpropertychange",Ef)):t==="focusout"&&Nf()}function o1(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Kl(Oi)}function r1(t,e){if(t==="click")return Kl(e)}function c1(t,e){if(t==="input"||t==="change")return Kl(e)}function u1(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var hn=typeof Object.is=="function"?Object.is:u1;function zi(t,e){if(hn(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),s=Object.keys(e);if(n.length!==s.length)return!1;for(s=0;s<n.length;s++){var r=n[s];if(!V.call(e,r)||!hn(t[r],e[r]))return!1}return!0}function Cf(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Df(t,e){var n=Cf(t);t=0;for(var s;n;){if(n.nodeType===3){if(s=t+n.textContent.length,t<=e&&s>=e)return{node:n,offset:e-t};t=s}t:{for(;n;){if(n.nextSibling){n=n.nextSibling;break t}n=n.parentNode}n=void 0}n=Cf(n)}}function kf(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?kf(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function wf(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=Ll(t.document);e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=Ll(t.document)}return e}function Lr(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var d1=Wn&&"documentMode"in document&&11>=document.documentMode,Os=null,qr=null,Bi=null,Hr=!1;function Mf(t,e,n){var s=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Hr||Os==null||Os!==Ll(s)||(s=Os,"selectionStart"in s&&Lr(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Bi&&zi(Bi,s)||(Bi=s,s=zo(qr,"onSelect"),0<s.length&&(e=new Yl("onSelect","select",null,e,n),t.push({event:e,listeners:s}),e.target=Os)))}function Wa(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var zs={animationend:Wa("Animation","AnimationEnd"),animationiteration:Wa("Animation","AnimationIteration"),animationstart:Wa("Animation","AnimationStart"),transitionrun:Wa("Transition","TransitionRun"),transitionstart:Wa("Transition","TransitionStart"),transitioncancel:Wa("Transition","TransitionCancel"),transitionend:Wa("Transition","TransitionEnd")},Ir={},Rf={};Wn&&(Rf=document.createElement("div").style,"AnimationEvent"in window||(delete zs.animationend.animation,delete zs.animationiteration.animation,delete zs.animationstart.animation),"TransitionEvent"in window||delete zs.transitionend.transition);function ts(t){if(Ir[t])return Ir[t];if(!zs[t])return t;var e=zs[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in Rf)return Ir[t]=e[n];return t}var Of=ts("animationend"),zf=ts("animationiteration"),Bf=ts("animationstart"),f1=ts("transitionrun"),h1=ts("transitionstart"),m1=ts("transitioncancel"),Uf=ts("transitionend"),Vf=new Map,Gr="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(" ");Gr.push("scrollEnd");function Bn(t,e){Vf.set(t,e),Ja(e,[t])}var Xl=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},jn=[],Bs=0,Yr=0;function Ql(){for(var t=Bs,e=Yr=Bs=0;e<t;){var n=jn[e];jn[e++]=null;var s=jn[e];jn[e++]=null;var r=jn[e];jn[e++]=null;var c=jn[e];if(jn[e++]=null,s!==null&&r!==null){var m=s.pending;m===null?r.next=r:(r.next=m.next,m.next=r),s.pending=r}c!==0&&Lf(n,r,c)}}function Pl(t,e,n,s){jn[Bs++]=t,jn[Bs++]=e,jn[Bs++]=n,jn[Bs++]=s,Yr|=s,t.lanes|=s,t=t.alternate,t!==null&&(t.lanes|=s)}function Zr(t,e,n,s){return Pl(t,e,n,s),Fl(t)}function es(t,e){return Pl(t,null,null,e),Fl(t)}function Lf(t,e,n){t.lanes|=n;var s=t.alternate;s!==null&&(s.lanes|=n);for(var r=!1,c=t.return;c!==null;)c.childLanes|=n,s=c.alternate,s!==null&&(s.childLanes|=n),c.tag===22&&(t=c.stateNode,t===null||t._visibility&1||(r=!0)),t=c,c=c.return;return t.tag===3?(c=t.stateNode,r&&e!==null&&(r=31-J(n),t=c.hiddenUpdates,s=t[r],s===null?t[r]=[e]:s.push(e),e.lane=n|536870912),c):null}function Fl(t){if(50<sl)throw sl=0,tu=null,Error(o(185));for(var e=t.return;e!==null;)t=e,e=t.return;return t.tag===3?t.stateNode:null}var Us={};function p1(t,e,n,s){this.tag=t,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=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function mn(t,e,n,s){return new p1(t,e,n,s)}function Kr(t){return t=t.prototype,!(!t||!t.isReactComponent)}function ta(t,e){var n=t.alternate;return n===null?(n=mn(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&65011712,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n.refCleanup=t.refCleanup,n}function qf(t,e){t.flags&=65011714;var n=t.alternate;return n===null?(t.childLanes=0,t.lanes=e,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=n.childLanes,t.lanes=n.lanes,t.child=n.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=n.memoizedProps,t.memoizedState=n.memoizedState,t.updateQueue=n.updateQueue,t.type=n.type,e=n.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),t}function Jl(t,e,n,s,r,c){var m=0;if(s=t,typeof t=="function")Kr(t)&&(m=1);else if(typeof t=="string")m=Sb(t,n,G.current)?26:t==="html"||t==="head"||t==="body"?27:5;else t:switch(t){case nt:return t=mn(31,n,e,r),t.elementType=nt,t.lanes=c,t;case R:return ns(n.children,r,c,e);case K:m=8,r|=24;break;case O:return t=mn(12,n,e,r|2),t.elementType=O,t.lanes=c,t;case X:return t=mn(13,n,e,r),t.elementType=X,t.lanes=c,t;case L:return t=mn(19,n,e,r),t.elementType=L,t.lanes=c,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Y:m=10;break t;case P:m=9;break t;case et:m=11;break t;case tt:m=14;break t;case U:m=16,s=null;break t}m=29,n=Error(o(130,t===null?"null":typeof t,"")),s=null}return e=mn(m,n,e,r),e.elementType=t,e.type=s,e.lanes=c,e}function ns(t,e,n,s){return t=mn(7,t,s,e),t.lanes=n,t}function Xr(t,e,n){return t=mn(6,t,null,e),t.lanes=n,t}function Hf(t){var e=mn(18,null,null,0);return e.stateNode=t,e}function Qr(t,e,n){return e=mn(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}var If=new WeakMap;function An(t,e){if(typeof t=="object"&&t!==null){var n=If.get(t);return n!==void 0?n:(e={value:t,source:e,stack:w(e)},If.set(t,e),e)}return{value:t,source:e,stack:w(e)}}var Vs=[],Ls=0,$l=null,Ui=0,Nn=[],En=0,_a=null,Hn=1,In="";function ea(t,e){Vs[Ls++]=Ui,Vs[Ls++]=$l,$l=t,Ui=e}function Gf(t,e,n){Nn[En++]=Hn,Nn[En++]=In,Nn[En++]=_a,_a=t;var s=Hn;t=In;var r=32-J(s)-1;s&=~(1<<r),n+=1;var c=32-J(e)+r;if(30<c){var m=r-r%5;c=(s&(1<<m)-1).toString(32),s>>=m,r-=m,Hn=1<<32-J(e)+r|n<<r|s,In=c+t}else Hn=1<<c|n<<r|s,In=t}function Pr(t){t.return!==null&&(ea(t,1),Gf(t,1,0))}function Fr(t){for(;t===$l;)$l=Vs[--Ls],Vs[Ls]=null,Ui=Vs[--Ls],Vs[Ls]=null;for(;t===_a;)_a=Nn[--En],Nn[En]=null,In=Nn[--En],Nn[En]=null,Hn=Nn[--En],Nn[En]=null}function Yf(t,e){Nn[En++]=Hn,Nn[En++]=In,Nn[En++]=_a,Hn=e.id,In=e.overflow,_a=t}var Ye=null,re=null,Bt=!1,Ta=null,Cn=!1,Jr=Error(o(519));function xa(t){var e=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Vi(An(e,t)),Jr}function Zf(t){var e=t.stateNode,n=t.type,s=t.memoizedProps;switch(e[Ee]=t,e[Ge]=s,n){case"dialog":Mt("cancel",e),Mt("close",e);break;case"iframe":case"object":case"embed":Mt("load",e);break;case"video":case"audio":for(n=0;n<ll.length;n++)Mt(ll[n],e);break;case"source":Mt("error",e);break;case"img":case"image":case"link":Mt("error",e),Mt("load",e);break;case"details":Mt("toggle",e);break;case"input":Mt("invalid",e),af(e,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Mt("invalid",e);break;case"textarea":Mt("invalid",e),lf(e,s.value,s.defaultValue,s.children)}n=s.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||e.textContent===""+n||s.suppressHydrationWarning===!0||rp(e.textContent,n)?(s.popover!=null&&(Mt("beforetoggle",e),Mt("toggle",e)),s.onScroll!=null&&Mt("scroll",e),s.onScrollEnd!=null&&Mt("scrollend",e),s.onClick!=null&&(e.onclick=$n),e=!0):e=!1,e||xa(t,!0)}function Kf(t){for(Ye=t.return;Ye;)switch(Ye.tag){case 5:case 31:case 13:Cn=!1;return;case 27:case 3:Cn=!0;return;default:Ye=Ye.return}}function qs(t){if(t!==Ye)return!1;if(!Bt)return Kf(t),Bt=!0,!1;var e=t.tag,n;if((n=e!==3&&e!==27)&&((n=e===5)&&(n=t.type,n=!(n!=="form"&&n!=="button")||pu(t.type,t.memoizedProps)),n=!n),n&&re&&xa(t),Kf(t),e===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(317));re=gp(t)}else if(e===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(317));re=gp(t)}else e===27?(e=re,Ua(t.type)?(t=Su,Su=null,re=t):re=e):re=Ye?kn(t.stateNode.nextSibling):null;return!0}function as(){re=Ye=null,Bt=!1}function $r(){var t=Ta;return t!==null&&(un===null?un=t:un.push.apply(un,t),Ta=null),t}function Vi(t){Ta===null?Ta=[t]:Ta.push(t)}var Wr=Pt(null),ss=null,na=null;function ja(t,e,n){St(Wr,e._currentValue),e._currentValue=n}function aa(t){t._currentValue=Wr.current,bt(Wr)}function tc(t,e,n){for(;t!==null;){var s=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,s!==null&&(s.childLanes|=e)):s!==null&&(s.childLanes&e)!==e&&(s.childLanes|=e),t===n)break;t=t.return}}function ec(t,e,n,s){var r=t.child;for(r!==null&&(r.return=t);r!==null;){var c=r.dependencies;if(c!==null){var m=r.child;c=c.firstContext;t:for(;c!==null;){var y=c;c=r;for(var T=0;T<e.length;T++)if(y.context===e[T]){c.lanes|=n,y=c.alternate,y!==null&&(y.lanes|=n),tc(c.return,n,t),s||(m=null);break t}c=y.next}}else if(r.tag===18){if(m=r.return,m===null)throw Error(o(341));m.lanes|=n,c=m.alternate,c!==null&&(c.lanes|=n),tc(m,n,t),m=null}else m=r.child;if(m!==null)m.return=r;else for(m=r;m!==null;){if(m===t){m=null;break}if(r=m.sibling,r!==null){r.return=m.return,m=r;break}m=m.return}r=m}}function Hs(t,e,n,s){t=null;for(var r=e,c=!1;r!==null;){if(!c){if((r.flags&524288)!==0)c=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var m=r.alternate;if(m===null)throw Error(o(387));if(m=m.memoizedProps,m!==null){var y=r.type;hn(r.pendingProps.value,m.value)||(t!==null?t.push(y):t=[y])}}else if(r===en.current){if(m=r.alternate,m===null)throw Error(o(387));m.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(t!==null?t.push(dl):t=[dl])}r=r.return}t!==null&&ec(e,t,n,s),e.flags|=262144}function Wl(t){for(t=t.firstContext;t!==null;){if(!hn(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function is(t){ss=t,na=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Ze(t){return Xf(ss,t)}function to(t,e){return ss===null&&is(t),Xf(t,e)}function Xf(t,e){var n=e._currentValue;if(e={context:e,memoizedValue:n,next:null},na===null){if(t===null)throw Error(o(308));na=e,t.dependencies={lanes:0,firstContext:e},t.flags|=524288}else na=na.next=e;return n}var v1=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(n,s){t.push(s)}};this.abort=function(){e.aborted=!0,t.forEach(function(n){return n()})}},g1=a.unstable_scheduleCallback,y1=a.unstable_NormalPriority,Ce={$$typeof:Y,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function nc(){return{controller:new v1,data:new Map,refCount:0}}function Li(t){t.refCount--,t.refCount===0&&g1(y1,function(){t.controller.abort()})}var qi=null,ac=0,Is=0,Gs=null;function b1(t,e){if(qi===null){var n=qi=[];ac=0,Is=lu(),Gs={status:"pending",value:void 0,then:function(s){n.push(s)}}}return ac++,e.then(Qf,Qf),e}function Qf(){if(--ac===0&&qi!==null){Gs!==null&&(Gs.status="fulfilled");var t=qi;qi=null,Is=0,Gs=null;for(var e=0;e<t.length;e++)(0,t[e])()}}function S1(t,e){var n=[],s={status:"pending",value:null,reason:null,then:function(r){n.push(r)}};return t.then(function(){s.status="fulfilled",s.value=e;for(var r=0;r<n.length;r++)(0,n[r])(e)},function(r){for(s.status="rejected",s.reason=r,r=0;r<n.length;r++)(0,n[r])(void 0)}),s}var Pf=B.S;B.S=function(t,e){Mm=ht(),typeof e=="object"&&e!==null&&typeof e.then=="function"&&b1(t,e),Pf!==null&&Pf(t,e)};var ls=Pt(null);function sc(){var t=ls.current;return t!==null?t:ie.pooledCache}function eo(t,e){e===null?St(ls,ls.current):St(ls,e.pool)}function Ff(){var t=sc();return t===null?null:{parent:Ce._currentValue,pool:t}}var Ys=Error(o(460)),ic=Error(o(474)),no=Error(o(542)),ao={then:function(){}};function Jf(t){return t=t.status,t==="fulfilled"||t==="rejected"}function $f(t,e,n){switch(n=t[n],n===void 0?t.push(e):n!==e&&(e.then($n,$n),e=n),e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,th(t),t;default:if(typeof e.status=="string")e.then($n,$n);else{if(t=ie,t!==null&&100<t.shellSuspendCounter)throw Error(o(482));t=e,t.status="pending",t.then(function(s){if(e.status==="pending"){var r=e;r.status="fulfilled",r.value=s}},function(s){if(e.status==="pending"){var r=e;r.status="rejected",r.reason=s}})}switch(e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,th(t),t}throw rs=e,Ys}}function os(t){try{var e=t._init;return e(t._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(rs=n,Ys):n}}var rs=null;function Wf(){if(rs===null)throw Error(o(459));var t=rs;return rs=null,t}function th(t){if(t===Ys||t===no)throw Error(o(483))}var Zs=null,Hi=0;function so(t){var e=Hi;return Hi+=1,Zs===null&&(Zs=[]),$f(Zs,t,e)}function Ii(t,e){e=e.props.ref,t.ref=e!==void 0?e:null}function io(t,e){throw e.$$typeof===x?Error(o(525)):(t=Object.prototype.toString.call(e),Error(o(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)))}function eh(t){function e(N,j){if(t){var C=N.deletions;C===null?(N.deletions=[j],N.flags|=16):C.push(j)}}function n(N,j){if(!t)return null;for(;j!==null;)e(N,j),j=j.sibling;return null}function s(N){for(var j=new Map;N!==null;)N.key!==null?j.set(N.key,N):j.set(N.index,N),N=N.sibling;return j}function r(N,j){return N=ta(N,j),N.index=0,N.sibling=null,N}function c(N,j,C){return N.index=C,t?(C=N.alternate,C!==null?(C=C.index,C<j?(N.flags|=67108866,j):C):(N.flags|=67108866,j)):(N.flags|=1048576,j)}function m(N){return t&&N.alternate===null&&(N.flags|=67108866),N}function y(N,j,C,I){return j===null||j.tag!==6?(j=Xr(C,N.mode,I),j.return=N,j):(j=r(j,C),j.return=N,j)}function T(N,j,C,I){var pt=C.type;return pt===R?q(N,j,C.props.children,I,C.key):j!==null&&(j.elementType===pt||typeof pt=="object"&&pt!==null&&pt.$$typeof===U&&os(pt)===j.type)?(j=r(j,C.props),Ii(j,C),j.return=N,j):(j=Jl(C.type,C.key,C.props,null,N.mode,I),Ii(j,C),j.return=N,j)}function D(N,j,C,I){return j===null||j.tag!==4||j.stateNode.containerInfo!==C.containerInfo||j.stateNode.implementation!==C.implementation?(j=Qr(C,N.mode,I),j.return=N,j):(j=r(j,C.children||[]),j.return=N,j)}function q(N,j,C,I,pt){return j===null||j.tag!==7?(j=ns(C,N.mode,I,pt),j.return=N,j):(j=r(j,C),j.return=N,j)}function Z(N,j,C){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return j=Xr(""+j,N.mode,C),j.return=N,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case E:return C=Jl(j.type,j.key,j.props,null,N.mode,C),Ii(C,j),C.return=N,C;case M:return j=Qr(j,N.mode,C),j.return=N,j;case U:return j=os(j),Z(N,j,C)}if(_t(j)||Dt(j))return j=ns(j,N.mode,C,null),j.return=N,j;if(typeof j.then=="function")return Z(N,so(j),C);if(j.$$typeof===Y)return Z(N,to(N,j),C);io(N,j)}return null}function k(N,j,C,I){var pt=j!==null?j.key:null;if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return pt!==null?null:y(N,j,""+C,I);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case E:return C.key===pt?T(N,j,C,I):null;case M:return C.key===pt?D(N,j,C,I):null;case U:return C=os(C),k(N,j,C,I)}if(_t(C)||Dt(C))return pt!==null?null:q(N,j,C,I,null);if(typeof C.then=="function")return k(N,j,so(C),I);if(C.$$typeof===Y)return k(N,j,to(N,C),I);io(N,C)}return null}function z(N,j,C,I,pt){if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return N=N.get(C)||null,y(j,N,""+I,pt);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case E:return N=N.get(I.key===null?C:I.key)||null,T(j,N,I,pt);case M:return N=N.get(I.key===null?C:I.key)||null,D(j,N,I,pt);case U:return I=os(I),z(N,j,C,I,pt)}if(_t(I)||Dt(I))return N=N.get(C)||null,q(j,N,I,pt,null);if(typeof I.then=="function")return z(N,j,C,so(I),pt);if(I.$$typeof===Y)return z(N,j,C,to(j,I),pt);io(j,I)}return null}function rt(N,j,C,I){for(var pt=null,Lt=null,dt=j,Et=j=0,zt=null;dt!==null&&Et<C.length;Et++){dt.index>Et?(zt=dt,dt=null):zt=dt.sibling;var qt=k(N,dt,C[Et],I);if(qt===null){dt===null&&(dt=zt);break}t&&dt&&qt.alternate===null&&e(N,dt),j=c(qt,j,Et),Lt===null?pt=qt:Lt.sibling=qt,Lt=qt,dt=zt}if(Et===C.length)return n(N,dt),Bt&&ea(N,Et),pt;if(dt===null){for(;Et<C.length;Et++)dt=Z(N,C[Et],I),dt!==null&&(j=c(dt,j,Et),Lt===null?pt=dt:Lt.sibling=dt,Lt=dt);return Bt&&ea(N,Et),pt}for(dt=s(dt);Et<C.length;Et++)zt=z(dt,N,Et,C[Et],I),zt!==null&&(t&&zt.alternate!==null&&dt.delete(zt.key===null?Et:zt.key),j=c(zt,j,Et),Lt===null?pt=zt:Lt.sibling=zt,Lt=zt);return t&&dt.forEach(function(Ia){return e(N,Ia)}),Bt&&ea(N,Et),pt}function gt(N,j,C,I){if(C==null)throw Error(o(151));for(var pt=null,Lt=null,dt=j,Et=j=0,zt=null,qt=C.next();dt!==null&&!qt.done;Et++,qt=C.next()){dt.index>Et?(zt=dt,dt=null):zt=dt.sibling;var Ia=k(N,dt,qt.value,I);if(Ia===null){dt===null&&(dt=zt);break}t&&dt&&Ia.alternate===null&&e(N,dt),j=c(Ia,j,Et),Lt===null?pt=Ia:Lt.sibling=Ia,Lt=Ia,dt=zt}if(qt.done)return n(N,dt),Bt&&ea(N,Et),pt;if(dt===null){for(;!qt.done;Et++,qt=C.next())qt=Z(N,qt.value,I),qt!==null&&(j=c(qt,j,Et),Lt===null?pt=qt:Lt.sibling=qt,Lt=qt);return Bt&&ea(N,Et),pt}for(dt=s(dt);!qt.done;Et++,qt=C.next())qt=z(dt,N,Et,qt.value,I),qt!==null&&(t&&qt.alternate!==null&&dt.delete(qt.key===null?Et:qt.key),j=c(qt,j,Et),Lt===null?pt=qt:Lt.sibling=qt,Lt=qt);return t&&dt.forEach(function(wb){return e(N,wb)}),Bt&&ea(N,Et),pt}function ne(N,j,C,I){if(typeof C=="object"&&C!==null&&C.type===R&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case E:t:{for(var pt=C.key;j!==null;){if(j.key===pt){if(pt=C.type,pt===R){if(j.tag===7){n(N,j.sibling),I=r(j,C.props.children),I.return=N,N=I;break t}}else if(j.elementType===pt||typeof pt=="object"&&pt!==null&&pt.$$typeof===U&&os(pt)===j.type){n(N,j.sibling),I=r(j,C.props),Ii(I,C),I.return=N,N=I;break t}n(N,j);break}else e(N,j);j=j.sibling}C.type===R?(I=ns(C.props.children,N.mode,I,C.key),I.return=N,N=I):(I=Jl(C.type,C.key,C.props,null,N.mode,I),Ii(I,C),I.return=N,N=I)}return m(N);case M:t:{for(pt=C.key;j!==null;){if(j.key===pt)if(j.tag===4&&j.stateNode.containerInfo===C.containerInfo&&j.stateNode.implementation===C.implementation){n(N,j.sibling),I=r(j,C.children||[]),I.return=N,N=I;break t}else{n(N,j);break}else e(N,j);j=j.sibling}I=Qr(C,N.mode,I),I.return=N,N=I}return m(N);case U:return C=os(C),ne(N,j,C,I)}if(_t(C))return rt(N,j,C,I);if(Dt(C)){if(pt=Dt(C),typeof pt!="function")throw Error(o(150));return C=pt.call(C),gt(N,j,C,I)}if(typeof C.then=="function")return ne(N,j,so(C),I);if(C.$$typeof===Y)return ne(N,j,to(N,C),I);io(N,C)}return typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint"?(C=""+C,j!==null&&j.tag===6?(n(N,j.sibling),I=r(j,C),I.return=N,N=I):(n(N,j),I=Xr(C,N.mode,I),I.return=N,N=I),m(N)):n(N,j)}return function(N,j,C,I){try{Hi=0;var pt=ne(N,j,C,I);return Zs=null,pt}catch(dt){if(dt===Ys||dt===no)throw dt;var Lt=mn(29,dt,null,N.mode);return Lt.lanes=I,Lt.return=N,Lt}finally{}}}var cs=eh(!0),nh=eh(!1),Aa=!1;function lc(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function oc(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Na(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Ea(t,e,n){var s=t.updateQueue;if(s===null)return null;if(s=s.shared,(Yt&2)!==0){var r=s.pending;return r===null?e.next=e:(e.next=r.next,r.next=e),s.pending=e,e=Fl(t),Lf(t,null,n),e}return Pl(t,s,e,n),Fl(t)}function Gi(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194048)!==0)){var s=e.lanes;s&=t.pendingLanes,n|=s,e.lanes=n,Ti(t,n)}}function rc(t,e){var n=t.updateQueue,s=t.alternate;if(s!==null&&(s=s.updateQueue,n===s)){var r=null,c=null;if(n=n.firstBaseUpdate,n!==null){do{var m={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};c===null?r=c=m:c=c.next=m,n=n.next}while(n!==null);c===null?r=c=e:c=c.next=e}else r=c=e;n={baseState:s.baseState,firstBaseUpdate:r,lastBaseUpdate:c,shared:s.shared,callbacks:s.callbacks},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}var cc=!1;function Yi(){if(cc){var t=Gs;if(t!==null)throw t}}function Zi(t,e,n,s){cc=!1;var r=t.updateQueue;Aa=!1;var c=r.firstBaseUpdate,m=r.lastBaseUpdate,y=r.shared.pending;if(y!==null){r.shared.pending=null;var T=y,D=T.next;T.next=null,m===null?c=D:m.next=D,m=T;var q=t.alternate;q!==null&&(q=q.updateQueue,y=q.lastBaseUpdate,y!==m&&(y===null?q.firstBaseUpdate=D:y.next=D,q.lastBaseUpdate=T))}if(c!==null){var Z=r.baseState;m=0,q=D=T=null,y=c;do{var k=y.lane&-536870913,z=k!==y.lane;if(z?(Ot&k)===k:(s&k)===k){k!==0&&k===Is&&(cc=!0),q!==null&&(q=q.next={lane:0,tag:y.tag,payload:y.payload,callback:null,next:null});t:{var rt=t,gt=y;k=e;var ne=n;switch(gt.tag){case 1:if(rt=gt.payload,typeof rt=="function"){Z=rt.call(ne,Z,k);break t}Z=rt;break t;case 3:rt.flags=rt.flags&-65537|128;case 0:if(rt=gt.payload,k=typeof rt=="function"?rt.call(ne,Z,k):rt,k==null)break t;Z=S({},Z,k);break t;case 2:Aa=!0}}k=y.callback,k!==null&&(t.flags|=64,z&&(t.flags|=8192),z=r.callbacks,z===null?r.callbacks=[k]:z.push(k))}else z={lane:k,tag:y.tag,payload:y.payload,callback:y.callback,next:null},q===null?(D=q=z,T=Z):q=q.next=z,m|=k;if(y=y.next,y===null){if(y=r.shared.pending,y===null)break;z=y,y=z.next,z.next=null,r.lastBaseUpdate=z,r.shared.pending=null}}while(!0);q===null&&(T=Z),r.baseState=T,r.firstBaseUpdate=D,r.lastBaseUpdate=q,c===null&&(r.shared.lanes=0),Ma|=m,t.lanes=m,t.memoizedState=Z}}function ah(t,e){if(typeof t!="function")throw Error(o(191,t));t.call(e)}function sh(t,e){var n=t.callbacks;if(n!==null)for(t.callbacks=null,t=0;t<n.length;t++)ah(n[t],e)}var Ks=Pt(null),lo=Pt(0);function ih(t,e){t=fa,St(lo,t),St(Ks,e),fa=t|e.baseLanes}function uc(){St(lo,fa),St(Ks,Ks.current)}function dc(){fa=lo.current,bt(Ks),bt(lo)}var pn=Pt(null),Dn=null;function Ca(t){var e=t.alternate;St(xe,xe.current&1),St(pn,t),Dn===null&&(e===null||Ks.current!==null||e.memoizedState!==null)&&(Dn=t)}function fc(t){St(xe,xe.current),St(pn,t),Dn===null&&(Dn=t)}function lh(t){t.tag===22?(St(xe,xe.current),St(pn,t),Dn===null&&(Dn=t)):Da()}function Da(){St(xe,xe.current),St(pn,pn.current)}function vn(t){bt(pn),Dn===t&&(Dn=null),bt(xe)}var xe=Pt(0);function oo(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||yu(n)||bu(n)))return e}else if(e.tag===19&&(e.memoizedProps.revealOrder==="forwards"||e.memoizedProps.revealOrder==="backwards"||e.memoizedProps.revealOrder==="unstable_legacy-backwards"||e.memoizedProps.revealOrder==="together")){if((e.flags&128)!==0)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var sa=0,Nt=null,te=null,De=null,ro=!1,Xs=!1,us=!1,co=0,Ki=0,Qs=null,_1=0;function be(){throw Error(o(321))}function hc(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!hn(t[n],e[n]))return!1;return!0}function mc(t,e,n,s,r,c){return sa=c,Nt=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,B.H=t===null||t.memoizedState===null?Gh:Dc,us=!1,c=n(s,r),us=!1,Xs&&(c=rh(e,n,s,r)),oh(t),c}function oh(t){B.H=Pi;var e=te!==null&&te.next!==null;if(sa=0,De=te=Nt=null,ro=!1,Ki=0,Qs=null,e)throw Error(o(300));t===null||ke||(t=t.dependencies,t!==null&&Wl(t)&&(ke=!0))}function rh(t,e,n,s){Nt=t;var r=0;do{if(Xs&&(Qs=null),Ki=0,Xs=!1,25<=r)throw Error(o(301));if(r+=1,De=te=null,t.updateQueue!=null){var c=t.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}B.H=Yh,c=e(n,s)}while(Xs);return c}function T1(){var t=B.H,e=t.useState()[0];return e=typeof e.then=="function"?Xi(e):e,t=t.useState()[0],(te!==null?te.memoizedState:null)!==t&&(Nt.flags|=1024),e}function pc(){var t=co!==0;return co=0,t}function vc(t,e,n){e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~n}function gc(t){if(ro){for(t=t.memoizedState;t!==null;){var e=t.queue;e!==null&&(e.pending=null),t=t.next}ro=!1}sa=0,De=te=Nt=null,Xs=!1,Ki=co=0,Qs=null}function $e(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return De===null?Nt.memoizedState=De=t:De=De.next=t,De}function je(){if(te===null){var t=Nt.alternate;t=t!==null?t.memoizedState:null}else t=te.next;var e=De===null?Nt.memoizedState:De.next;if(e!==null)De=e,te=t;else{if(t===null)throw Nt.alternate===null?Error(o(467)):Error(o(310));te=t,t={memoizedState:te.memoizedState,baseState:te.baseState,baseQueue:te.baseQueue,queue:te.queue,next:null},De===null?Nt.memoizedState=De=t:De=De.next=t}return De}function uo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Xi(t){var e=Ki;return Ki+=1,Qs===null&&(Qs=[]),t=$f(Qs,t,e),e=Nt,(De===null?e.memoizedState:De.next)===null&&(e=e.alternate,B.H=e===null||e.memoizedState===null?Gh:Dc),t}function fo(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Xi(t);if(t.$$typeof===Y)return Ze(t)}throw Error(o(438,String(t)))}function yc(t){var e=null,n=Nt.updateQueue;if(n!==null&&(e=n.memoCache),e==null){var s=Nt.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(e={data:s.data.map(function(r){return r.slice()}),index:0})))}if(e==null&&(e={data:[],index:0}),n===null&&(n=uo(),Nt.updateQueue=n),n.memoCache=e,n=e.data[e.index],n===void 0)for(n=e.data[e.index]=Array(t),s=0;s<t;s++)n[s]=at;return e.index++,n}function ia(t,e){return typeof e=="function"?e(t):e}function ho(t){var e=je();return bc(e,te,t)}function bc(t,e,n){var s=t.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=n;var r=t.baseQueue,c=s.pending;if(c!==null){if(r!==null){var m=r.next;r.next=c.next,c.next=m}e.baseQueue=r=c,s.pending=null}if(c=t.baseState,r===null)t.memoizedState=c;else{e=r.next;var y=m=null,T=null,D=e,q=!1;do{var Z=D.lane&-536870913;if(Z!==D.lane?(Ot&Z)===Z:(sa&Z)===Z){var k=D.revertLane;if(k===0)T!==null&&(T=T.next={lane:0,revertLane:0,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),Z===Is&&(q=!0);else if((sa&k)===k){D=D.next,k===Is&&(q=!0);continue}else Z={lane:0,revertLane:D.revertLane,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},T===null?(y=T=Z,m=c):T=T.next=Z,Nt.lanes|=k,Ma|=k;Z=D.action,us&&n(c,Z),c=D.hasEagerState?D.eagerState:n(c,Z)}else k={lane:Z,revertLane:D.revertLane,gesture:D.gesture,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},T===null?(y=T=k,m=c):T=T.next=k,Nt.lanes|=Z,Ma|=Z;D=D.next}while(D!==null&&D!==e);if(T===null?m=c:T.next=y,!hn(c,t.memoizedState)&&(ke=!0,q&&(n=Gs,n!==null)))throw n;t.memoizedState=c,t.baseState=m,t.baseQueue=T,s.lastRenderedState=c}return r===null&&(s.lanes=0),[t.memoizedState,s.dispatch]}function Sc(t){var e=je(),n=e.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=t;var s=n.dispatch,r=n.pending,c=e.memoizedState;if(r!==null){n.pending=null;var m=r=r.next;do c=t(c,m.action),m=m.next;while(m!==r);hn(c,e.memoizedState)||(ke=!0),e.memoizedState=c,e.baseQueue===null&&(e.baseState=c),n.lastRenderedState=c}return[c,s]}function ch(t,e,n){var s=Nt,r=je(),c=Bt;if(c){if(n===void 0)throw Error(o(407));n=n()}else n=e();var m=!hn((te||r).memoizedState,n);if(m&&(r.memoizedState=n,ke=!0),r=r.queue,xc(fh.bind(null,s,r,t),[t]),r.getSnapshot!==e||m||De!==null&&De.memoizedState.tag&1){if(s.flags|=2048,Ps(9,{destroy:void 0},dh.bind(null,s,r,n,e),null),ie===null)throw Error(o(349));c||(sa&127)!==0||uh(s,e,n)}return n}function uh(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=Nt.updateQueue,e===null?(e=uo(),Nt.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function dh(t,e,n,s){e.value=n,e.getSnapshot=s,hh(e)&&mh(t)}function fh(t,e,n){return n(function(){hh(e)&&mh(t)})}function hh(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!hn(t,n)}catch{return!0}}function mh(t){var e=es(t,2);e!==null&&dn(e,t,2)}function _c(t){var e=$e();if(typeof t=="function"){var n=t;if(t=n(),us){an(!0);try{n()}finally{an(!1)}}}return e.memoizedState=e.baseState=t,e.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ia,lastRenderedState:t},e}function ph(t,e,n,s){return t.baseState=n,bc(t,te,typeof s=="function"?s:ia)}function x1(t,e,n,s,r){if(vo(t))throw Error(o(485));if(t=e.action,t!==null){var c={payload:r,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(m){c.listeners.push(m)}};B.T!==null?n(!0):c.isTransition=!1,s(c),n=e.pending,n===null?(c.next=e.pending=c,vh(e,c)):(c.next=n.next,e.pending=n.next=c)}}function vh(t,e){var n=e.action,s=e.payload,r=t.state;if(e.isTransition){var c=B.T,m={};B.T=m;try{var y=n(r,s),T=B.S;T!==null&&T(m,y),gh(t,e,y)}catch(D){Tc(t,e,D)}finally{c!==null&&m.types!==null&&(c.types=m.types),B.T=c}}else try{c=n(r,s),gh(t,e,c)}catch(D){Tc(t,e,D)}}function gh(t,e,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(s){yh(t,e,s)},function(s){return Tc(t,e,s)}):yh(t,e,n)}function yh(t,e,n){e.status="fulfilled",e.value=n,bh(e),t.state=n,e=t.pending,e!==null&&(n=e.next,n===e?t.pending=null:(n=n.next,e.next=n,vh(t,n)))}function Tc(t,e,n){var s=t.pending;if(t.pending=null,s!==null){s=s.next;do e.status="rejected",e.reason=n,bh(e),e=e.next;while(e!==s)}t.action=null}function bh(t){t=t.listeners;for(var e=0;e<t.length;e++)(0,t[e])()}function Sh(t,e){return e}function _h(t,e){if(Bt){var n=ie.formState;if(n!==null){t:{var s=Nt;if(Bt){if(re){e:{for(var r=re,c=Cn;r.nodeType!==8;){if(!c){r=null;break e}if(r=kn(r.nextSibling),r===null){r=null;break e}}c=r.data,r=c==="F!"||c==="F"?r:null}if(r){re=kn(r.nextSibling),s=r.data==="F!";break t}}xa(s)}s=!1}s&&(e=n[0])}}return n=$e(),n.memoizedState=n.baseState=e,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sh,lastRenderedState:e},n.queue=s,n=qh.bind(null,Nt,s),s.dispatch=n,s=_c(!1),c=Cc.bind(null,Nt,!1,s.queue),s=$e(),r={state:e,dispatch:null,action:t,pending:null},s.queue=r,n=x1.bind(null,Nt,r,c,n),r.dispatch=n,s.memoizedState=t,[e,n,!1]}function Th(t){var e=je();return xh(e,te,t)}function xh(t,e,n){if(e=bc(t,e,Sh)[0],t=ho(ia)[0],typeof e=="object"&&e!==null&&typeof e.then=="function")try{var s=Xi(e)}catch(m){throw m===Ys?no:m}else s=e;e=je();var r=e.queue,c=r.dispatch;return n!==e.memoizedState&&(Nt.flags|=2048,Ps(9,{destroy:void 0},j1.bind(null,r,n),null)),[s,c,t]}function j1(t,e){t.action=e}function jh(t){var e=je(),n=te;if(n!==null)return xh(e,n,t);je(),e=e.memoizedState,n=je();var s=n.queue.dispatch;return n.memoizedState=t,[e,s,!1]}function Ps(t,e,n,s){return t={tag:t,create:n,deps:s,inst:e,next:null},e=Nt.updateQueue,e===null&&(e=uo(),Nt.updateQueue=e),n=e.lastEffect,n===null?e.lastEffect=t.next=t:(s=n.next,n.next=t,t.next=s,e.lastEffect=t),t}function Ah(){return je().memoizedState}function mo(t,e,n,s){var r=$e();Nt.flags|=t,r.memoizedState=Ps(1|e,{destroy:void 0},n,s===void 0?null:s)}function po(t,e,n,s){var r=je();s=s===void 0?null:s;var c=r.memoizedState.inst;te!==null&&s!==null&&hc(s,te.memoizedState.deps)?r.memoizedState=Ps(e,c,n,s):(Nt.flags|=t,r.memoizedState=Ps(1|e,c,n,s))}function Nh(t,e){mo(8390656,8,t,e)}function xc(t,e){po(2048,8,t,e)}function A1(t){Nt.flags|=4;var e=Nt.updateQueue;if(e===null)e=uo(),Nt.updateQueue=e,e.events=[t];else{var n=e.events;n===null?e.events=[t]:n.push(t)}}function Eh(t){var e=je().memoizedState;return A1({ref:e,nextImpl:t}),function(){if((Yt&2)!==0)throw Error(o(440));return e.impl.apply(void 0,arguments)}}function Ch(t,e){return po(4,2,t,e)}function Dh(t,e){return po(4,4,t,e)}function kh(t,e){if(typeof e=="function"){t=t();var n=e(t);return function(){typeof n=="function"?n():e(null)}}if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function wh(t,e,n){n=n!=null?n.concat([t]):null,po(4,4,kh.bind(null,e,t),n)}function jc(){}function Mh(t,e){var n=je();e=e===void 0?null:e;var s=n.memoizedState;return e!==null&&hc(e,s[1])?s[0]:(n.memoizedState=[t,e],t)}function Rh(t,e){var n=je();e=e===void 0?null:e;var s=n.memoizedState;if(e!==null&&hc(e,s[1]))return s[0];if(s=t(),us){an(!0);try{t()}finally{an(!1)}}return n.memoizedState=[s,e],s}function Ac(t,e,n){return n===void 0||(sa&1073741824)!==0&&(Ot&261930)===0?t.memoizedState=e:(t.memoizedState=n,t=Om(),Nt.lanes|=t,Ma|=t,n)}function Oh(t,e,n,s){return hn(n,e)?n:Ks.current!==null?(t=Ac(t,n,s),hn(t,e)||(ke=!0),t):(sa&42)===0||(sa&1073741824)!==0&&(Ot&261930)===0?(ke=!0,t.memoizedState=n):(t=Om(),Nt.lanes|=t,Ma|=t,e)}function zh(t,e,n,s,r){var c=Q.p;Q.p=c!==0&&8>c?c:8;var m=B.T,y={};B.T=y,Cc(t,!1,e,n);try{var T=r(),D=B.S;if(D!==null&&D(y,T),T!==null&&typeof T=="object"&&typeof T.then=="function"){var q=S1(T,s);Qi(t,e,q,bn(t))}else Qi(t,e,s,bn(t))}catch(Z){Qi(t,e,{then:function(){},status:"rejected",reason:Z},bn())}finally{Q.p=c,m!==null&&y.types!==null&&(m.types=y.types),B.T=m}}function N1(){}function Nc(t,e,n,s){if(t.tag!==5)throw Error(o(476));var r=Bh(t).queue;zh(t,r,e,lt,n===null?N1:function(){return Uh(t),n(s)})}function Bh(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:lt,baseState:lt,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ia,lastRenderedState:lt},next:null};var n={};return e.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ia,lastRenderedState:n},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function Uh(t){var e=Bh(t);e.next===null&&(e=t.alternate.memoizedState),Qi(t,e.next.queue,{},bn())}function Ec(){return Ze(dl)}function Vh(){return je().memoizedState}function Lh(){return je().memoizedState}function E1(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var n=bn();t=Na(n);var s=Ea(e,t,n);s!==null&&(dn(s,e,n),Gi(s,e,n)),e={cache:nc()},t.payload=e;return}e=e.return}}function C1(t,e,n){var s=bn();n={lane:s,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},vo(t)?Hh(e,n):(n=Zr(t,e,n,s),n!==null&&(dn(n,t,s),Ih(n,e,s)))}function qh(t,e,n){var s=bn();Qi(t,e,n,s)}function Qi(t,e,n,s){var r={lane:s,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(vo(t))Hh(e,r);else{var c=t.alternate;if(t.lanes===0&&(c===null||c.lanes===0)&&(c=e.lastRenderedReducer,c!==null))try{var m=e.lastRenderedState,y=c(m,n);if(r.hasEagerState=!0,r.eagerState=y,hn(y,m))return Pl(t,e,r,0),ie===null&&Ql(),!1}catch{}finally{}if(n=Zr(t,e,r,s),n!==null)return dn(n,t,s),Ih(n,e,s),!0}return!1}function Cc(t,e,n,s){if(s={lane:2,revertLane:lu(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},vo(t)){if(e)throw Error(o(479))}else e=Zr(t,n,s,2),e!==null&&dn(e,t,2)}function vo(t){var e=t.alternate;return t===Nt||e!==null&&e===Nt}function Hh(t,e){Xs=ro=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function Ih(t,e,n){if((n&4194048)!==0){var s=e.lanes;s&=t.pendingLanes,n|=s,e.lanes=n,Ti(t,n)}}var Pi={readContext:Ze,use:fo,useCallback:be,useContext:be,useEffect:be,useImperativeHandle:be,useLayoutEffect:be,useInsertionEffect:be,useMemo:be,useReducer:be,useRef:be,useState:be,useDebugValue:be,useDeferredValue:be,useTransition:be,useSyncExternalStore:be,useId:be,useHostTransitionStatus:be,useFormState:be,useActionState:be,useOptimistic:be,useMemoCache:be,useCacheRefresh:be};Pi.useEffectEvent=be;var Gh={readContext:Ze,use:fo,useCallback:function(t,e){return $e().memoizedState=[t,e===void 0?null:e],t},useContext:Ze,useEffect:Nh,useImperativeHandle:function(t,e,n){n=n!=null?n.concat([t]):null,mo(4194308,4,kh.bind(null,e,t),n)},useLayoutEffect:function(t,e){return mo(4194308,4,t,e)},useInsertionEffect:function(t,e){mo(4,2,t,e)},useMemo:function(t,e){var n=$e();e=e===void 0?null:e;var s=t();if(us){an(!0);try{t()}finally{an(!1)}}return n.memoizedState=[s,e],s},useReducer:function(t,e,n){var s=$e();if(n!==void 0){var r=n(e);if(us){an(!0);try{n(e)}finally{an(!1)}}}else r=e;return s.memoizedState=s.baseState=r,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:r},s.queue=t,t=t.dispatch=C1.bind(null,Nt,t),[s.memoizedState,t]},useRef:function(t){var e=$e();return t={current:t},e.memoizedState=t},useState:function(t){t=_c(t);var e=t.queue,n=qh.bind(null,Nt,e);return e.dispatch=n,[t.memoizedState,n]},useDebugValue:jc,useDeferredValue:function(t,e){var n=$e();return Ac(n,t,e)},useTransition:function(){var t=_c(!1);return t=zh.bind(null,Nt,t.queue,!0,!1),$e().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,n){var s=Nt,r=$e();if(Bt){if(n===void 0)throw Error(o(407));n=n()}else{if(n=e(),ie===null)throw Error(o(349));(Ot&127)!==0||uh(s,e,n)}r.memoizedState=n;var c={value:n,getSnapshot:e};return r.queue=c,Nh(fh.bind(null,s,c,t),[t]),s.flags|=2048,Ps(9,{destroy:void 0},dh.bind(null,s,c,n,e),null),n},useId:function(){var t=$e(),e=ie.identifierPrefix;if(Bt){var n=In,s=Hn;n=(s&~(1<<32-J(s)-1)).toString(32)+n,e="_"+e+"R_"+n,n=co++,0<n&&(e+="H"+n.toString(32)),e+="_"}else n=_1++,e="_"+e+"r_"+n.toString(32)+"_";return t.memoizedState=e},useHostTransitionStatus:Ec,useFormState:_h,useActionState:_h,useOptimistic:function(t){var e=$e();e.memoizedState=e.baseState=t;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return e.queue=n,e=Cc.bind(null,Nt,!0,n),n.dispatch=e,[t,e]},useMemoCache:yc,useCacheRefresh:function(){return $e().memoizedState=E1.bind(null,Nt)},useEffectEvent:function(t){var e=$e(),n={impl:t};return e.memoizedState=n,function(){if((Yt&2)!==0)throw Error(o(440));return n.impl.apply(void 0,arguments)}}},Dc={readContext:Ze,use:fo,useCallback:Mh,useContext:Ze,useEffect:xc,useImperativeHandle:wh,useInsertionEffect:Ch,useLayoutEffect:Dh,useMemo:Rh,useReducer:ho,useRef:Ah,useState:function(){return ho(ia)},useDebugValue:jc,useDeferredValue:function(t,e){var n=je();return Oh(n,te.memoizedState,t,e)},useTransition:function(){var t=ho(ia)[0],e=je().memoizedState;return[typeof t=="boolean"?t:Xi(t),e]},useSyncExternalStore:ch,useId:Vh,useHostTransitionStatus:Ec,useFormState:Th,useActionState:Th,useOptimistic:function(t,e){var n=je();return ph(n,te,t,e)},useMemoCache:yc,useCacheRefresh:Lh};Dc.useEffectEvent=Eh;var Yh={readContext:Ze,use:fo,useCallback:Mh,useContext:Ze,useEffect:xc,useImperativeHandle:wh,useInsertionEffect:Ch,useLayoutEffect:Dh,useMemo:Rh,useReducer:Sc,useRef:Ah,useState:function(){return Sc(ia)},useDebugValue:jc,useDeferredValue:function(t,e){var n=je();return te===null?Ac(n,t,e):Oh(n,te.memoizedState,t,e)},useTransition:function(){var t=Sc(ia)[0],e=je().memoizedState;return[typeof t=="boolean"?t:Xi(t),e]},useSyncExternalStore:ch,useId:Vh,useHostTransitionStatus:Ec,useFormState:jh,useActionState:jh,useOptimistic:function(t,e){var n=je();return te!==null?ph(n,te,t,e):(n.baseState=t,[t,n.queue.dispatch])},useMemoCache:yc,useCacheRefresh:Lh};Yh.useEffectEvent=Eh;function kc(t,e,n,s){e=t.memoizedState,n=n(s,e),n=n==null?e:S({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var wc={enqueueSetState:function(t,e,n){t=t._reactInternals;var s=bn(),r=Na(s);r.payload=e,n!=null&&(r.callback=n),e=Ea(t,r,s),e!==null&&(dn(e,t,s),Gi(e,t,s))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var s=bn(),r=Na(s);r.tag=1,r.payload=e,n!=null&&(r.callback=n),e=Ea(t,r,s),e!==null&&(dn(e,t,s),Gi(e,t,s))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=bn(),s=Na(n);s.tag=2,e!=null&&(s.callback=e),e=Ea(t,s,n),e!==null&&(dn(e,t,n),Gi(e,t,n))}};function Zh(t,e,n,s,r,c,m){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(s,c,m):e.prototype&&e.prototype.isPureReactComponent?!zi(n,s)||!zi(r,c):!0}function Kh(t,e,n,s){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,s),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,s),e.state!==t&&wc.enqueueReplaceState(e,e.state,null)}function ds(t,e){var n=e;if("ref"in e){n={};for(var s in e)s!=="ref"&&(n[s]=e[s])}if(t=t.defaultProps){n===e&&(n=S({},n));for(var r in t)n[r]===void 0&&(n[r]=t[r])}return n}function Xh(t){Xl(t)}function Qh(t){console.error(t)}function Ph(t){Xl(t)}function go(t,e){try{var n=t.onUncaughtError;n(e.value,{componentStack:e.stack})}catch(s){setTimeout(function(){throw s})}}function Fh(t,e,n){try{var s=t.onCaughtError;s(n.value,{componentStack:n.stack,errorBoundary:e.tag===1?e.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function Mc(t,e,n){return n=Na(n),n.tag=3,n.payload={element:null},n.callback=function(){go(t,e)},n}function Jh(t){return t=Na(t),t.tag=3,t}function $h(t,e,n,s){var r=n.type.getDerivedStateFromError;if(typeof r=="function"){var c=s.value;t.payload=function(){return r(c)},t.callback=function(){Fh(e,n,s)}}var m=n.stateNode;m!==null&&typeof m.componentDidCatch=="function"&&(t.callback=function(){Fh(e,n,s),typeof r!="function"&&(Ra===null?Ra=new Set([this]):Ra.add(this));var y=s.stack;this.componentDidCatch(s.value,{componentStack:y!==null?y:""})})}function D1(t,e,n,s,r){if(n.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(e=n.alternate,e!==null&&Hs(e,n,r,!0),n=pn.current,n!==null){switch(n.tag){case 31:case 13:return Dn===null?Do():n.alternate===null&&Se===0&&(Se=3),n.flags&=-257,n.flags|=65536,n.lanes=r,s===ao?n.flags|=16384:(e=n.updateQueue,e===null?n.updateQueue=new Set([s]):e.add(s),au(t,s,r)),!1;case 22:return n.flags|=65536,s===ao?n.flags|=16384:(e=n.updateQueue,e===null?(e={transitions:null,markerInstances:null,retryQueue:new Set([s])},n.updateQueue=e):(n=e.retryQueue,n===null?e.retryQueue=new Set([s]):n.add(s)),au(t,s,r)),!1}throw Error(o(435,n.tag))}return au(t,s,r),Do(),!1}if(Bt)return e=pn.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=r,s!==Jr&&(t=Error(o(422),{cause:s}),Vi(An(t,n)))):(s!==Jr&&(e=Error(o(423),{cause:s}),Vi(An(e,n))),t=t.current.alternate,t.flags|=65536,r&=-r,t.lanes|=r,s=An(s,n),r=Mc(t.stateNode,s,r),rc(t,r),Se!==4&&(Se=2)),!1;var c=Error(o(520),{cause:s});if(c=An(c,n),al===null?al=[c]:al.push(c),Se!==4&&(Se=2),e===null)return!0;s=An(s,n),n=e;do{switch(n.tag){case 3:return n.flags|=65536,t=r&-r,n.lanes|=t,t=Mc(n.stateNode,s,t),rc(n,t),!1;case 1:if(e=n.type,c=n.stateNode,(n.flags&128)===0&&(typeof e.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(Ra===null||!Ra.has(c))))return n.flags|=65536,r&=-r,n.lanes|=r,r=Jh(r),$h(r,t,n,s),rc(n,r),!1}n=n.return}while(n!==null);return!1}var Rc=Error(o(461)),ke=!1;function Ke(t,e,n,s){e.child=t===null?nh(e,null,n,s):cs(e,t.child,n,s)}function Wh(t,e,n,s,r){n=n.render;var c=e.ref;if("ref"in s){var m={};for(var y in s)y!=="ref"&&(m[y]=s[y])}else m=s;return is(e),s=mc(t,e,n,m,c,r),y=pc(),t!==null&&!ke?(vc(t,e,r),la(t,e,r)):(Bt&&y&&Pr(e),e.flags|=1,Ke(t,e,s,r),e.child)}function tm(t,e,n,s,r){if(t===null){var c=n.type;return typeof c=="function"&&!Kr(c)&&c.defaultProps===void 0&&n.compare===null?(e.tag=15,e.type=c,em(t,e,c,s,r)):(t=Jl(n.type,null,s,e,e.mode,r),t.ref=e.ref,t.return=e,e.child=t)}if(c=t.child,!Hc(t,r)){var m=c.memoizedProps;if(n=n.compare,n=n!==null?n:zi,n(m,s)&&t.ref===e.ref)return la(t,e,r)}return e.flags|=1,t=ta(c,s),t.ref=e.ref,t.return=e,e.child=t}function em(t,e,n,s,r){if(t!==null){var c=t.memoizedProps;if(zi(c,s)&&t.ref===e.ref)if(ke=!1,e.pendingProps=s=c,Hc(t,r))(t.flags&131072)!==0&&(ke=!0);else return e.lanes=t.lanes,la(t,e,r)}return Oc(t,e,n,s,r)}function nm(t,e,n,s){var r=s.children,c=t!==null?t.memoizedState:null;if(t===null&&e.stateNode===null&&(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((e.flags&128)!==0){if(c=c!==null?c.baseLanes|n:n,t!==null){for(s=e.child=t.child,r=0;s!==null;)r=r|s.lanes|s.childLanes,s=s.sibling;s=r&~c}else s=0,e.child=null;return am(t,e,c,n,s)}if((n&536870912)!==0)e.memoizedState={baseLanes:0,cachePool:null},t!==null&&eo(e,c!==null?c.cachePool:null),c!==null?ih(e,c):uc(),lh(e);else return s=e.lanes=536870912,am(t,e,c!==null?c.baseLanes|n:n,n,s)}else c!==null?(eo(e,c.cachePool),ih(e,c),Da(),e.memoizedState=null):(t!==null&&eo(e,null),uc(),Da());return Ke(t,e,r,n),e.child}function Fi(t,e){return t!==null&&t.tag===22||e.stateNode!==null||(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),e.sibling}function am(t,e,n,s,r){var c=sc();return c=c===null?null:{parent:Ce._currentValue,pool:c},e.memoizedState={baseLanes:n,cachePool:c},t!==null&&eo(e,null),uc(),lh(e),t!==null&&Hs(t,e,s,!0),e.childLanes=r,null}function yo(t,e){return e=So({mode:e.mode,children:e.children},t.mode),e.ref=t.ref,t.child=e,e.return=t,e}function sm(t,e,n){return cs(e,t.child,null,n),t=yo(e,e.pendingProps),t.flags|=2,vn(e),e.memoizedState=null,t}function k1(t,e,n){var s=e.pendingProps,r=(e.flags&128)!==0;if(e.flags&=-129,t===null){if(Bt){if(s.mode==="hidden")return t=yo(e,s),e.lanes=536870912,Fi(null,t);if(fc(e),(t=re)?(t=vp(t,Cn),t=t!==null&&t.data==="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:_a!==null?{id:Hn,overflow:In}:null,retryLane:536870912,hydrationErrors:null},n=Hf(t),n.return=e,e.child=n,Ye=e,re=null)):t=null,t===null)throw xa(e);return e.lanes=536870912,null}return yo(e,s)}var c=t.memoizedState;if(c!==null){var m=c.dehydrated;if(fc(e),r)if(e.flags&256)e.flags&=-257,e=sm(t,e,n);else if(e.memoizedState!==null)e.child=t.child,e.flags|=128,e=null;else throw Error(o(558));else if(ke||Hs(t,e,n,!1),r=(n&t.childLanes)!==0,ke||r){if(s=ie,s!==null&&(m=xi(s,n),m!==0&&m!==c.retryLane))throw c.retryLane=m,es(t,m),dn(s,t,m),Rc;Do(),e=sm(t,e,n)}else t=c.treeContext,re=kn(m.nextSibling),Ye=e,Bt=!0,Ta=null,Cn=!1,t!==null&&Yf(e,t),e=yo(e,s),e.flags|=4096;return e}return t=ta(t.child,{mode:s.mode,children:s.children}),t.ref=e.ref,e.child=t,t.return=e,t}function bo(t,e){var n=e.ref;if(n===null)t!==null&&t.ref!==null&&(e.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(o(284));(t===null||t.ref!==n)&&(e.flags|=4194816)}}function Oc(t,e,n,s,r){return is(e),n=mc(t,e,n,s,void 0,r),s=pc(),t!==null&&!ke?(vc(t,e,r),la(t,e,r)):(Bt&&s&&Pr(e),e.flags|=1,Ke(t,e,n,r),e.child)}function im(t,e,n,s,r,c){return is(e),e.updateQueue=null,n=rh(e,s,n,r),oh(t),s=pc(),t!==null&&!ke?(vc(t,e,c),la(t,e,c)):(Bt&&s&&Pr(e),e.flags|=1,Ke(t,e,n,c),e.child)}function lm(t,e,n,s,r){if(is(e),e.stateNode===null){var c=Us,m=n.contextType;typeof m=="object"&&m!==null&&(c=Ze(m)),c=new n(s,c),e.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=wc,e.stateNode=c,c._reactInternals=e,c=e.stateNode,c.props=s,c.state=e.memoizedState,c.refs={},lc(e),m=n.contextType,c.context=typeof m=="object"&&m!==null?Ze(m):Us,c.state=e.memoizedState,m=n.getDerivedStateFromProps,typeof m=="function"&&(kc(e,n,m,s),c.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(m=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),m!==c.state&&wc.enqueueReplaceState(c,c.state,null),Zi(e,s,c,r),Yi(),c.state=e.memoizedState),typeof c.componentDidMount=="function"&&(e.flags|=4194308),s=!0}else if(t===null){c=e.stateNode;var y=e.memoizedProps,T=ds(n,y);c.props=T;var D=c.context,q=n.contextType;m=Us,typeof q=="object"&&q!==null&&(m=Ze(q));var Z=n.getDerivedStateFromProps;q=typeof Z=="function"||typeof c.getSnapshotBeforeUpdate=="function",y=e.pendingProps!==y,q||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(y||D!==m)&&Kh(e,c,s,m),Aa=!1;var k=e.memoizedState;c.state=k,Zi(e,s,c,r),Yi(),D=e.memoizedState,y||k!==D||Aa?(typeof Z=="function"&&(kc(e,n,Z,s),D=e.memoizedState),(T=Aa||Zh(e,n,T,s,k,D,m))?(q||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(e.flags|=4194308)):(typeof c.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=s,e.memoizedState=D),c.props=s,c.state=D,c.context=m,s=T):(typeof c.componentDidMount=="function"&&(e.flags|=4194308),s=!1)}else{c=e.stateNode,oc(t,e),m=e.memoizedProps,q=ds(n,m),c.props=q,Z=e.pendingProps,k=c.context,D=n.contextType,T=Us,typeof D=="object"&&D!==null&&(T=Ze(D)),y=n.getDerivedStateFromProps,(D=typeof y=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(m!==Z||k!==T)&&Kh(e,c,s,T),Aa=!1,k=e.memoizedState,c.state=k,Zi(e,s,c,r),Yi();var z=e.memoizedState;m!==Z||k!==z||Aa||t!==null&&t.dependencies!==null&&Wl(t.dependencies)?(typeof y=="function"&&(kc(e,n,y,s),z=e.memoizedState),(q=Aa||Zh(e,n,q,s,k,z,T)||t!==null&&t.dependencies!==null&&Wl(t.dependencies))?(D||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(s,z,T),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(s,z,T)),typeof c.componentDidUpdate=="function"&&(e.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof c.componentDidUpdate!="function"||m===t.memoizedProps&&k===t.memoizedState||(e.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||m===t.memoizedProps&&k===t.memoizedState||(e.flags|=1024),e.memoizedProps=s,e.memoizedState=z),c.props=s,c.state=z,c.context=T,s=q):(typeof c.componentDidUpdate!="function"||m===t.memoizedProps&&k===t.memoizedState||(e.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||m===t.memoizedProps&&k===t.memoizedState||(e.flags|=1024),s=!1)}return c=s,bo(t,e),s=(e.flags&128)!==0,c||s?(c=e.stateNode,n=s&&typeof n.getDerivedStateFromError!="function"?null:c.render(),e.flags|=1,t!==null&&s?(e.child=cs(e,t.child,null,r),e.child=cs(e,null,n,r)):Ke(t,e,n,r),e.memoizedState=c.state,t=e.child):t=la(t,e,r),t}function om(t,e,n,s){return as(),e.flags|=256,Ke(t,e,n,s),e.child}var zc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Bc(t){return{baseLanes:t,cachePool:Ff()}}function Uc(t,e,n){return t=t!==null?t.childLanes&~n:0,e&&(t|=yn),t}function rm(t,e,n){var s=e.pendingProps,r=!1,c=(e.flags&128)!==0,m;if((m=c)||(m=t!==null&&t.memoizedState===null?!1:(xe.current&2)!==0),m&&(r=!0,e.flags&=-129),m=(e.flags&32)!==0,e.flags&=-33,t===null){if(Bt){if(r?Ca(e):Da(),(t=re)?(t=vp(t,Cn),t=t!==null&&t.data!=="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:_a!==null?{id:Hn,overflow:In}:null,retryLane:536870912,hydrationErrors:null},n=Hf(t),n.return=e,e.child=n,Ye=e,re=null)):t=null,t===null)throw xa(e);return bu(t)?e.lanes=32:e.lanes=536870912,null}var y=s.children;return s=s.fallback,r?(Da(),r=e.mode,y=So({mode:"hidden",children:y},r),s=ns(s,r,n,null),y.return=e,s.return=e,y.sibling=s,e.child=y,s=e.child,s.memoizedState=Bc(n),s.childLanes=Uc(t,m,n),e.memoizedState=zc,Fi(null,s)):(Ca(e),Vc(e,y))}var T=t.memoizedState;if(T!==null&&(y=T.dehydrated,y!==null)){if(c)e.flags&256?(Ca(e),e.flags&=-257,e=Lc(t,e,n)):e.memoizedState!==null?(Da(),e.child=t.child,e.flags|=128,e=null):(Da(),y=s.fallback,r=e.mode,s=So({mode:"visible",children:s.children},r),y=ns(y,r,n,null),y.flags|=2,s.return=e,y.return=e,s.sibling=y,e.child=s,cs(e,t.child,null,n),s=e.child,s.memoizedState=Bc(n),s.childLanes=Uc(t,m,n),e.memoizedState=zc,e=Fi(null,s));else if(Ca(e),bu(y)){if(m=y.nextSibling&&y.nextSibling.dataset,m)var D=m.dgst;m=D,s=Error(o(419)),s.stack="",s.digest=m,Vi({value:s,source:null,stack:null}),e=Lc(t,e,n)}else if(ke||Hs(t,e,n,!1),m=(n&t.childLanes)!==0,ke||m){if(m=ie,m!==null&&(s=xi(m,n),s!==0&&s!==T.retryLane))throw T.retryLane=s,es(t,s),dn(m,t,s),Rc;yu(y)||Do(),e=Lc(t,e,n)}else yu(y)?(e.flags|=192,e.child=t.child,e=null):(t=T.treeContext,re=kn(y.nextSibling),Ye=e,Bt=!0,Ta=null,Cn=!1,t!==null&&Yf(e,t),e=Vc(e,s.children),e.flags|=4096);return e}return r?(Da(),y=s.fallback,r=e.mode,T=t.child,D=T.sibling,s=ta(T,{mode:"hidden",children:s.children}),s.subtreeFlags=T.subtreeFlags&65011712,D!==null?y=ta(D,y):(y=ns(y,r,n,null),y.flags|=2),y.return=e,s.return=e,s.sibling=y,e.child=s,Fi(null,s),s=e.child,y=t.child.memoizedState,y===null?y=Bc(n):(r=y.cachePool,r!==null?(T=Ce._currentValue,r=r.parent!==T?{parent:T,pool:T}:r):r=Ff(),y={baseLanes:y.baseLanes|n,cachePool:r}),s.memoizedState=y,s.childLanes=Uc(t,m,n),e.memoizedState=zc,Fi(t.child,s)):(Ca(e),n=t.child,t=n.sibling,n=ta(n,{mode:"visible",children:s.children}),n.return=e,n.sibling=null,t!==null&&(m=e.deletions,m===null?(e.deletions=[t],e.flags|=16):m.push(t)),e.child=n,e.memoizedState=null,n)}function Vc(t,e){return e=So({mode:"visible",children:e},t.mode),e.return=t,t.child=e}function So(t,e){return t=mn(22,t,null,e),t.lanes=0,t}function Lc(t,e,n){return cs(e,t.child,null,n),t=Vc(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function cm(t,e,n){t.lanes|=e;var s=t.alternate;s!==null&&(s.lanes|=e),tc(t.return,e,n)}function qc(t,e,n,s,r,c){var m=t.memoizedState;m===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:s,tail:n,tailMode:r,treeForkCount:c}:(m.isBackwards=e,m.rendering=null,m.renderingStartTime=0,m.last=s,m.tail=n,m.tailMode=r,m.treeForkCount=c)}function um(t,e,n){var s=e.pendingProps,r=s.revealOrder,c=s.tail;s=s.children;var m=xe.current,y=(m&2)!==0;if(y?(m=m&1|2,e.flags|=128):m&=1,St(xe,m),Ke(t,e,s,n),s=Bt?Ui:0,!y&&t!==null&&(t.flags&128)!==0)t:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&cm(t,n,e);else if(t.tag===19)cm(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;t.sibling===null;){if(t.return===null||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(r){case"forwards":for(n=e.child,r=null;n!==null;)t=n.alternate,t!==null&&oo(t)===null&&(r=n),n=n.sibling;n=r,n===null?(r=e.child,e.child=null):(r=n.sibling,n.sibling=null),qc(e,!1,r,n,c,s);break;case"backwards":case"unstable_legacy-backwards":for(n=null,r=e.child,e.child=null;r!==null;){if(t=r.alternate,t!==null&&oo(t)===null){e.child=r;break}t=r.sibling,r.sibling=n,n=r,r=t}qc(e,!0,n,null,c,s);break;case"together":qc(e,!1,null,null,void 0,s);break;default:e.memoizedState=null}return e.child}function la(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),Ma|=e.lanes,(n&e.childLanes)===0)if(t!==null){if(Hs(t,e,n,!1),(n&e.childLanes)===0)return null}else return null;if(t!==null&&e.child!==t.child)throw Error(o(153));if(e.child!==null){for(t=e.child,n=ta(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=ta(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function Hc(t,e){return(t.lanes&e)!==0?!0:(t=t.dependencies,!!(t!==null&&Wl(t)))}function w1(t,e,n){switch(e.tag){case 3:He(e,e.stateNode.containerInfo),ja(e,Ce,t.memoizedState.cache),as();break;case 27:case 5:nn(e);break;case 4:He(e,e.stateNode.containerInfo);break;case 10:ja(e,e.type,e.memoizedProps.value);break;case 31:if(e.memoizedState!==null)return e.flags|=128,fc(e),null;break;case 13:var s=e.memoizedState;if(s!==null)return s.dehydrated!==null?(Ca(e),e.flags|=128,null):(n&e.child.childLanes)!==0?rm(t,e,n):(Ca(e),t=la(t,e,n),t!==null?t.sibling:null);Ca(e);break;case 19:var r=(t.flags&128)!==0;if(s=(n&e.childLanes)!==0,s||(Hs(t,e,n,!1),s=(n&e.childLanes)!==0),r){if(s)return um(t,e,n);e.flags|=128}if(r=e.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),St(xe,xe.current),s)break;return null;case 22:return e.lanes=0,nm(t,e,n,e.pendingProps);case 24:ja(e,Ce,t.memoizedState.cache)}return la(t,e,n)}function dm(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps)ke=!0;else{if(!Hc(t,n)&&(e.flags&128)===0)return ke=!1,w1(t,e,n);ke=(t.flags&131072)!==0}else ke=!1,Bt&&(e.flags&1048576)!==0&&Gf(e,Ui,e.index);switch(e.lanes=0,e.tag){case 16:t:{var s=e.pendingProps;if(t=os(e.elementType),e.type=t,typeof t=="function")Kr(t)?(s=ds(t,s),e.tag=1,e=lm(null,e,t,s,n)):(e.tag=0,e=Oc(null,e,t,s,n));else{if(t!=null){var r=t.$$typeof;if(r===et){e.tag=11,e=Wh(null,e,t,s,n);break t}else if(r===tt){e.tag=14,e=tm(null,e,t,s,n);break t}}throw e=st(t)||t,Error(o(306,e,""))}}return e;case 0:return Oc(t,e,e.type,e.pendingProps,n);case 1:return s=e.type,r=ds(s,e.pendingProps),lm(t,e,s,r,n);case 3:t:{if(He(e,e.stateNode.containerInfo),t===null)throw Error(o(387));s=e.pendingProps;var c=e.memoizedState;r=c.element,oc(t,e),Zi(e,s,null,n);var m=e.memoizedState;if(s=m.cache,ja(e,Ce,s),s!==c.cache&&ec(e,[Ce],n,!0),Yi(),s=m.element,c.isDehydrated)if(c={element:s,isDehydrated:!1,cache:m.cache},e.updateQueue.baseState=c,e.memoizedState=c,e.flags&256){e=om(t,e,s,n);break t}else if(s!==r){r=An(Error(o(424)),e),Vi(r),e=om(t,e,s,n);break t}else{switch(t=e.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(re=kn(t.firstChild),Ye=e,Bt=!0,Ta=null,Cn=!0,n=nh(e,null,s,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(as(),s===r){e=la(t,e,n);break t}Ke(t,e,s,n)}e=e.child}return e;case 26:return bo(t,e),t===null?(n=Tp(e.type,null,e.pendingProps,null))?e.memoizedState=n:Bt||(n=e.type,t=e.pendingProps,s=Bo(ye.current).createElement(n),s[Ee]=e,s[Ge]=t,Xe(s,n,t),Ve(s),e.stateNode=s):e.memoizedState=Tp(e.type,t.memoizedProps,e.pendingProps,t.memoizedState),null;case 27:return nn(e),t===null&&Bt&&(s=e.stateNode=bp(e.type,e.pendingProps,ye.current),Ye=e,Cn=!0,r=re,Ua(e.type)?(Su=r,re=kn(s.firstChild)):re=r),Ke(t,e,e.pendingProps.children,n),bo(t,e),t===null&&(e.flags|=4194304),e.child;case 5:return t===null&&Bt&&((r=s=re)&&(s=ob(s,e.type,e.pendingProps,Cn),s!==null?(e.stateNode=s,Ye=e,re=kn(s.firstChild),Cn=!1,r=!0):r=!1),r||xa(e)),nn(e),r=e.type,c=e.pendingProps,m=t!==null?t.memoizedProps:null,s=c.children,pu(r,c)?s=null:m!==null&&pu(r,m)&&(e.flags|=32),e.memoizedState!==null&&(r=mc(t,e,T1,null,null,n),dl._currentValue=r),bo(t,e),Ke(t,e,s,n),e.child;case 6:return t===null&&Bt&&((t=n=re)&&(n=rb(n,e.pendingProps,Cn),n!==null?(e.stateNode=n,Ye=e,re=null,t=!0):t=!1),t||xa(e)),null;case 13:return rm(t,e,n);case 4:return He(e,e.stateNode.containerInfo),s=e.pendingProps,t===null?e.child=cs(e,null,s,n):Ke(t,e,s,n),e.child;case 11:return Wh(t,e,e.type,e.pendingProps,n);case 7:return Ke(t,e,e.pendingProps,n),e.child;case 8:return Ke(t,e,e.pendingProps.children,n),e.child;case 12:return Ke(t,e,e.pendingProps.children,n),e.child;case 10:return s=e.pendingProps,ja(e,e.type,s.value),Ke(t,e,s.children,n),e.child;case 9:return r=e.type._context,s=e.pendingProps.children,is(e),r=Ze(r),s=s(r),e.flags|=1,Ke(t,e,s,n),e.child;case 14:return tm(t,e,e.type,e.pendingProps,n);case 15:return em(t,e,e.type,e.pendingProps,n);case 19:return um(t,e,n);case 31:return k1(t,e,n);case 22:return nm(t,e,n,e.pendingProps);case 24:return is(e),s=Ze(Ce),t===null?(r=sc(),r===null&&(r=ie,c=nc(),r.pooledCache=c,c.refCount++,c!==null&&(r.pooledCacheLanes|=n),r=c),e.memoizedState={parent:s,cache:r},lc(e),ja(e,Ce,r)):((t.lanes&n)!==0&&(oc(t,e),Zi(e,null,null,n),Yi()),r=t.memoizedState,c=e.memoizedState,r.parent!==s?(r={parent:s,cache:s},e.memoizedState=r,e.lanes===0&&(e.memoizedState=e.updateQueue.baseState=r),ja(e,Ce,s)):(s=c.cache,ja(e,Ce,s),s!==r.cache&&ec(e,[Ce],n,!0))),Ke(t,e,e.pendingProps.children,n),e.child;case 29:throw e.pendingProps}throw Error(o(156,e.tag))}function oa(t){t.flags|=4}function Ic(t,e,n,s,r){if((e=(t.mode&32)!==0)&&(e=!1),e){if(t.flags|=16777216,(r&335544128)===r)if(t.stateNode.complete)t.flags|=8192;else if(Vm())t.flags|=8192;else throw rs=ao,ic}else t.flags&=-16777217}function fm(t,e){if(e.type!=="stylesheet"||(e.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Ep(e))if(Vm())t.flags|=8192;else throw rs=ao,ic}function _o(t,e){e!==null&&(t.flags|=4),t.flags&16384&&(e=t.tag!==22?ya():536870912,t.lanes|=e,Ws|=e)}function Ji(t,e){if(!Bt)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var s=null;n!==null;)n.alternate!==null&&(s=n),n=n.sibling;s===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:s.sibling=null}}function ce(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,s=0;if(e)for(var r=t.child;r!==null;)n|=r.lanes|r.childLanes,s|=r.subtreeFlags&65011712,s|=r.flags&65011712,r.return=t,r=r.sibling;else for(r=t.child;r!==null;)n|=r.lanes|r.childLanes,s|=r.subtreeFlags,s|=r.flags,r.return=t,r=r.sibling;return t.subtreeFlags|=s,t.childLanes=n,e}function M1(t,e,n){var s=e.pendingProps;switch(Fr(e),e.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ce(e),null;case 1:return ce(e),null;case 3:return n=e.stateNode,s=null,t!==null&&(s=t.memoizedState.cache),e.memoizedState.cache!==s&&(e.flags|=2048),aa(Ce),Wt(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(qs(e)?oa(e):t===null||t.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,$r())),ce(e),null;case 26:var r=e.type,c=e.memoizedState;return t===null?(oa(e),c!==null?(ce(e),fm(e,c)):(ce(e),Ic(e,r,null,s,n))):c?c!==t.memoizedState?(oa(e),ce(e),fm(e,c)):(ce(e),e.flags&=-16777217):(t=t.memoizedProps,t!==s&&oa(e),ce(e),Ic(e,r,t,s,n)),null;case 27:if(Ue(e),n=ye.current,r=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==s&&oa(e);else{if(!s){if(e.stateNode===null)throw Error(o(166));return ce(e),null}t=G.current,qs(e)?Zf(e):(t=bp(r,s,n),e.stateNode=t,oa(e))}return ce(e),null;case 5:if(Ue(e),r=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==s&&oa(e);else{if(!s){if(e.stateNode===null)throw Error(o(166));return ce(e),null}if(c=G.current,qs(e))Zf(e);else{var m=Bo(ye.current);switch(c){case 1:c=m.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:c=m.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":c=m.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":c=m.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":c=m.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof s.is=="string"?m.createElement("select",{is:s.is}):m.createElement("select"),s.multiple?c.multiple=!0:s.size&&(c.size=s.size);break;default:c=typeof s.is=="string"?m.createElement(r,{is:s.is}):m.createElement(r)}}c[Ee]=e,c[Ge]=s;t:for(m=e.child;m!==null;){if(m.tag===5||m.tag===6)c.appendChild(m.stateNode);else if(m.tag!==4&&m.tag!==27&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===e)break t;for(;m.sibling===null;){if(m.return===null||m.return===e)break t;m=m.return}m.sibling.return=m.return,m=m.sibling}e.stateNode=c;t:switch(Xe(c,r,s),r){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break t;case"img":s=!0;break t;default:s=!1}s&&oa(e)}}return ce(e),Ic(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,n),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==s&&oa(e);else{if(typeof s!="string"&&e.stateNode===null)throw Error(o(166));if(t=ye.current,qs(e)){if(t=e.stateNode,n=e.memoizedProps,s=null,r=Ye,r!==null)switch(r.tag){case 27:case 5:s=r.memoizedProps}t[Ee]=e,t=!!(t.nodeValue===n||s!==null&&s.suppressHydrationWarning===!0||rp(t.nodeValue,n)),t||xa(e,!0)}else t=Bo(t).createTextNode(s),t[Ee]=e,e.stateNode=t}return ce(e),null;case 31:if(n=e.memoizedState,t===null||t.memoizedState!==null){if(s=qs(e),n!==null){if(t===null){if(!s)throw Error(o(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(557));t[Ee]=e}else as(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;ce(e),t=!1}else n=$r(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=n),t=!0;if(!t)return e.flags&256?(vn(e),e):(vn(e),null);if((e.flags&128)!==0)throw Error(o(558))}return ce(e),null;case 13:if(s=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(r=qs(e),s!==null&&s.dehydrated!==null){if(t===null){if(!r)throw Error(o(318));if(r=e.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(o(317));r[Ee]=e}else as(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;ce(e),r=!1}else r=$r(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=r),r=!0;if(!r)return e.flags&256?(vn(e),e):(vn(e),null)}return vn(e),(e.flags&128)!==0?(e.lanes=n,e):(n=s!==null,t=t!==null&&t.memoizedState!==null,n&&(s=e.child,r=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(r=s.alternate.memoizedState.cachePool.pool),c=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(c=s.memoizedState.cachePool.pool),c!==r&&(s.flags|=2048)),n!==t&&n&&(e.child.flags|=8192),_o(e,e.updateQueue),ce(e),null);case 4:return Wt(),t===null&&uu(e.stateNode.containerInfo),ce(e),null;case 10:return aa(e.type),ce(e),null;case 19:if(bt(xe),s=e.memoizedState,s===null)return ce(e),null;if(r=(e.flags&128)!==0,c=s.rendering,c===null)if(r)Ji(s,!1);else{if(Se!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(c=oo(t),c!==null){for(e.flags|=128,Ji(s,!1),t=c.updateQueue,e.updateQueue=t,_o(e,t),e.subtreeFlags=0,t=n,n=e.child;n!==null;)qf(n,t),n=n.sibling;return St(xe,xe.current&1|2),Bt&&ea(e,s.treeForkCount),e.child}t=t.sibling}s.tail!==null&&ht()>No&&(e.flags|=128,r=!0,Ji(s,!1),e.lanes=4194304)}else{if(!r)if(t=oo(c),t!==null){if(e.flags|=128,r=!0,t=t.updateQueue,e.updateQueue=t,_o(e,t),Ji(s,!0),s.tail===null&&s.tailMode==="hidden"&&!c.alternate&&!Bt)return ce(e),null}else 2*ht()-s.renderingStartTime>No&&n!==536870912&&(e.flags|=128,r=!0,Ji(s,!1),e.lanes=4194304);s.isBackwards?(c.sibling=e.child,e.child=c):(t=s.last,t!==null?t.sibling=c:e.child=c,s.last=c)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=ht(),t.sibling=null,n=xe.current,St(xe,r?n&1|2:n&1),Bt&&ea(e,s.treeForkCount),t):(ce(e),null);case 22:case 23:return vn(e),dc(),s=e.memoizedState!==null,t!==null?t.memoizedState!==null!==s&&(e.flags|=8192):s&&(e.flags|=8192),s?(n&536870912)!==0&&(e.flags&128)===0&&(ce(e),e.subtreeFlags&6&&(e.flags|=8192)):ce(e),n=e.updateQueue,n!==null&&_o(e,n.retryQueue),n=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),s=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),s!==n&&(e.flags|=2048),t!==null&&bt(ls),null;case 24:return n=null,t!==null&&(n=t.memoizedState.cache),e.memoizedState.cache!==n&&(e.flags|=2048),aa(Ce),ce(e),null;case 25:return null;case 30:return null}throw Error(o(156,e.tag))}function R1(t,e){switch(Fr(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return aa(Ce),Wt(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return Ue(e),null;case 31:if(e.memoizedState!==null){if(vn(e),e.alternate===null)throw Error(o(340));as()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(vn(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(o(340));as()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return bt(xe),null;case 4:return Wt(),null;case 10:return aa(e.type),null;case 22:case 23:return vn(e),dc(),t!==null&&bt(ls),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return aa(Ce),null;case 25:return null;default:return null}}function hm(t,e){switch(Fr(e),e.tag){case 3:aa(Ce),Wt();break;case 26:case 27:case 5:Ue(e);break;case 4:Wt();break;case 31:e.memoizedState!==null&&vn(e);break;case 13:vn(e);break;case 19:bt(xe);break;case 10:aa(e.type);break;case 22:case 23:vn(e),dc(),t!==null&&bt(ls);break;case 24:aa(Ce)}}function $i(t,e){try{var n=e.updateQueue,s=n!==null?n.lastEffect:null;if(s!==null){var r=s.next;n=r;do{if((n.tag&t)===t){s=void 0;var c=n.create,m=n.inst;s=c(),m.destroy=s}n=n.next}while(n!==r)}}catch(y){Jt(e,e.return,y)}}function ka(t,e,n){try{var s=e.updateQueue,r=s!==null?s.lastEffect:null;if(r!==null){var c=r.next;s=c;do{if((s.tag&t)===t){var m=s.inst,y=m.destroy;if(y!==void 0){m.destroy=void 0,r=e;var T=n,D=y;try{D()}catch(q){Jt(r,T,q)}}}s=s.next}while(s!==c)}}catch(q){Jt(e,e.return,q)}}function mm(t){var e=t.updateQueue;if(e!==null){var n=t.stateNode;try{sh(e,n)}catch(s){Jt(t,t.return,s)}}}function pm(t,e,n){n.props=ds(t.type,t.memoizedProps),n.state=t.memoizedState;try{n.componentWillUnmount()}catch(s){Jt(t,e,s)}}function Wi(t,e){try{var n=t.ref;if(n!==null){switch(t.tag){case 26:case 27:case 5:var s=t.stateNode;break;case 30:s=t.stateNode;break;default:s=t.stateNode}typeof n=="function"?t.refCleanup=n(s):n.current=s}}catch(r){Jt(t,e,r)}}function Gn(t,e){var n=t.ref,s=t.refCleanup;if(n!==null)if(typeof s=="function")try{s()}catch(r){Jt(t,e,r)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(r){Jt(t,e,r)}else n.current=null}function vm(t){var e=t.type,n=t.memoizedProps,s=t.stateNode;try{t:switch(e){case"button":case"input":case"select":case"textarea":n.autoFocus&&s.focus();break t;case"img":n.src?s.src=n.src:n.srcSet&&(s.srcset=n.srcSet)}}catch(r){Jt(t,t.return,r)}}function Gc(t,e,n){try{var s=t.stateNode;eb(s,t.type,n,e),s[Ge]=e}catch(r){Jt(t,t.return,r)}}function gm(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Ua(t.type)||t.tag===4}function Yc(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||gm(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Ua(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Zc(t,e,n){var s=t.tag;if(s===5||s===6)t=t.stateNode,e?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(t,e):(e=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,e.appendChild(t),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=$n));else if(s!==4&&(s===27&&Ua(t.type)&&(n=t.stateNode,e=null),t=t.child,t!==null))for(Zc(t,e,n),t=t.sibling;t!==null;)Zc(t,e,n),t=t.sibling}function To(t,e,n){var s=t.tag;if(s===5||s===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(s!==4&&(s===27&&Ua(t.type)&&(n=t.stateNode),t=t.child,t!==null))for(To(t,e,n),t=t.sibling;t!==null;)To(t,e,n),t=t.sibling}function ym(t){var e=t.stateNode,n=t.memoizedProps;try{for(var s=t.type,r=e.attributes;r.length;)e.removeAttributeNode(r[0]);Xe(e,s,n),e[Ee]=t,e[Ge]=n}catch(c){Jt(t,t.return,c)}}var ra=!1,we=!1,Kc=!1,bm=typeof WeakSet=="function"?WeakSet:Set,Le=null;function O1(t,e){if(t=t.containerInfo,hu=Go,t=wf(t),Lr(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else t:{n=(n=t.ownerDocument)&&n.defaultView||window;var s=n.getSelection&&n.getSelection();if(s&&s.rangeCount!==0){n=s.anchorNode;var r=s.anchorOffset,c=s.focusNode;s=s.focusOffset;try{n.nodeType,c.nodeType}catch{n=null;break t}var m=0,y=-1,T=-1,D=0,q=0,Z=t,k=null;e:for(;;){for(var z;Z!==n||r!==0&&Z.nodeType!==3||(y=m+r),Z!==c||s!==0&&Z.nodeType!==3||(T=m+s),Z.nodeType===3&&(m+=Z.nodeValue.length),(z=Z.firstChild)!==null;)k=Z,Z=z;for(;;){if(Z===t)break e;if(k===n&&++D===r&&(y=m),k===c&&++q===s&&(T=m),(z=Z.nextSibling)!==null)break;Z=k,k=Z.parentNode}Z=z}n=y===-1||T===-1?null:{start:y,end:T}}else n=null}n=n||{start:0,end:0}}else n=null;for(mu={focusedElem:t,selectionRange:n},Go=!1,Le=e;Le!==null;)if(e=Le,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Le=t;else for(;Le!==null;){switch(e=Le,c=e.alternate,t=e.flags,e.tag){case 0:if((t&4)!==0&&(t=e.updateQueue,t=t!==null?t.events:null,t!==null))for(n=0;n<t.length;n++)r=t[n],r.ref.impl=r.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&c!==null){t=void 0,n=e,r=c.memoizedProps,c=c.memoizedState,s=n.stateNode;try{var rt=ds(n.type,r);t=s.getSnapshotBeforeUpdate(rt,c),s.__reactInternalSnapshotBeforeUpdate=t}catch(gt){Jt(n,n.return,gt)}}break;case 3:if((t&1024)!==0){if(t=e.stateNode.containerInfo,n=t.nodeType,n===9)gu(t);else if(n===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":gu(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(o(163))}if(t=e.sibling,t!==null){t.return=e.return,Le=t;break}Le=e.return}}function Sm(t,e,n){var s=n.flags;switch(n.tag){case 0:case 11:case 15:ua(t,n),s&4&&$i(5,n);break;case 1:if(ua(t,n),s&4)if(t=n.stateNode,e===null)try{t.componentDidMount()}catch(m){Jt(n,n.return,m)}else{var r=ds(n.type,e.memoizedProps);e=e.memoizedState;try{t.componentDidUpdate(r,e,t.__reactInternalSnapshotBeforeUpdate)}catch(m){Jt(n,n.return,m)}}s&64&&mm(n),s&512&&Wi(n,n.return);break;case 3:if(ua(t,n),s&64&&(t=n.updateQueue,t!==null)){if(e=null,n.child!==null)switch(n.child.tag){case 27:case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}try{sh(t,e)}catch(m){Jt(n,n.return,m)}}break;case 27:e===null&&s&4&&ym(n);case 26:case 5:ua(t,n),e===null&&s&4&&vm(n),s&512&&Wi(n,n.return);break;case 12:ua(t,n);break;case 31:ua(t,n),s&4&&xm(t,n);break;case 13:ua(t,n),s&4&&jm(t,n),s&64&&(t=n.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(n=G1.bind(null,n),cb(t,n))));break;case 22:if(s=n.memoizedState!==null||ra,!s){e=e!==null&&e.memoizedState!==null||we,r=ra;var c=we;ra=s,(we=e)&&!c?da(t,n,(n.subtreeFlags&8772)!==0):ua(t,n),ra=r,we=c}break;case 30:break;default:ua(t,n)}}function _m(t){var e=t.alternate;e!==null&&(t.alternate=null,_m(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&Ni(e)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var he=null,on=!1;function ca(t,e,n){for(n=n.child;n!==null;)Tm(t,e,n),n=n.sibling}function Tm(t,e,n){if(Re&&typeof Re.onCommitFiberUnmount=="function")try{Re.onCommitFiberUnmount(Ie,n)}catch{}switch(n.tag){case 26:we||Gn(n,e),ca(t,e,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:we||Gn(n,e);var s=he,r=on;Ua(n.type)&&(he=n.stateNode,on=!1),ca(t,e,n),rl(n.stateNode),he=s,on=r;break;case 5:we||Gn(n,e);case 6:if(s=he,r=on,he=null,ca(t,e,n),he=s,on=r,he!==null)if(on)try{(he.nodeType===9?he.body:he.nodeName==="HTML"?he.ownerDocument.body:he).removeChild(n.stateNode)}catch(c){Jt(n,e,c)}else try{he.removeChild(n.stateNode)}catch(c){Jt(n,e,c)}break;case 18:he!==null&&(on?(t=he,mp(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,n.stateNode),oi(t)):mp(he,n.stateNode));break;case 4:s=he,r=on,he=n.stateNode.containerInfo,on=!0,ca(t,e,n),he=s,on=r;break;case 0:case 11:case 14:case 15:ka(2,n,e),we||ka(4,n,e),ca(t,e,n);break;case 1:we||(Gn(n,e),s=n.stateNode,typeof s.componentWillUnmount=="function"&&pm(n,e,s)),ca(t,e,n);break;case 21:ca(t,e,n);break;case 22:we=(s=we)||n.memoizedState!==null,ca(t,e,n),we=s;break;default:ca(t,e,n)}}function xm(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{oi(t)}catch(n){Jt(e,e.return,n)}}}function jm(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{oi(t)}catch(n){Jt(e,e.return,n)}}function z1(t){switch(t.tag){case 31:case 13:case 19:var e=t.stateNode;return e===null&&(e=t.stateNode=new bm),e;case 22:return t=t.stateNode,e=t._retryCache,e===null&&(e=t._retryCache=new bm),e;default:throw Error(o(435,t.tag))}}function xo(t,e){var n=z1(t);e.forEach(function(s){if(!n.has(s)){n.add(s);var r=Y1.bind(null,t,s);s.then(r,r)}})}function rn(t,e){var n=e.deletions;if(n!==null)for(var s=0;s<n.length;s++){var r=n[s],c=t,m=e,y=m;t:for(;y!==null;){switch(y.tag){case 27:if(Ua(y.type)){he=y.stateNode,on=!1;break t}break;case 5:he=y.stateNode,on=!1;break t;case 3:case 4:he=y.stateNode.containerInfo,on=!0;break t}y=y.return}if(he===null)throw Error(o(160));Tm(c,m,r),he=null,on=!1,c=r.alternate,c!==null&&(c.return=null),r.return=null}if(e.subtreeFlags&13886)for(e=e.child;e!==null;)Am(e,t),e=e.sibling}var Un=null;function Am(t,e){var n=t.alternate,s=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:rn(e,t),cn(t),s&4&&(ka(3,t,t.return),$i(3,t),ka(5,t,t.return));break;case 1:rn(e,t),cn(t),s&512&&(we||n===null||Gn(n,n.return)),s&64&&ra&&(t=t.updateQueue,t!==null&&(s=t.callbacks,s!==null&&(n=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=n===null?s:n.concat(s))));break;case 26:var r=Un;if(rn(e,t),cn(t),s&512&&(we||n===null||Gn(n,n.return)),s&4){var c=n!==null?n.memoizedState:null;if(s=t.memoizedState,n===null)if(s===null)if(t.stateNode===null){t:{s=t.type,n=t.memoizedProps,r=r.ownerDocument||r;e:switch(s){case"title":c=r.getElementsByTagName("title")[0],(!c||c[qn]||c[Ee]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=r.createElement(s),r.head.insertBefore(c,r.querySelector("head > title"))),Xe(c,s,n),c[Ee]=t,Ve(c),s=c;break t;case"link":var m=Ap("link","href",r).get(s+(n.href||""));if(m){for(var y=0;y<m.length;y++)if(c=m[y],c.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&c.getAttribute("rel")===(n.rel==null?null:n.rel)&&c.getAttribute("title")===(n.title==null?null:n.title)&&c.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){m.splice(y,1);break e}}c=r.createElement(s),Xe(c,s,n),r.head.appendChild(c);break;case"meta":if(m=Ap("meta","content",r).get(s+(n.content||""))){for(y=0;y<m.length;y++)if(c=m[y],c.getAttribute("content")===(n.content==null?null:""+n.content)&&c.getAttribute("name")===(n.name==null?null:n.name)&&c.getAttribute("property")===(n.property==null?null:n.property)&&c.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&c.getAttribute("charset")===(n.charSet==null?null:n.charSet)){m.splice(y,1);break e}}c=r.createElement(s),Xe(c,s,n),r.head.appendChild(c);break;default:throw Error(o(468,s))}c[Ee]=t,Ve(c),s=c}t.stateNode=s}else Np(r,t.type,t.stateNode);else t.stateNode=jp(r,s,t.memoizedProps);else c!==s?(c===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):c.count--,s===null?Np(r,t.type,t.stateNode):jp(r,s,t.memoizedProps)):s===null&&t.stateNode!==null&&Gc(t,t.memoizedProps,n.memoizedProps)}break;case 27:rn(e,t),cn(t),s&512&&(we||n===null||Gn(n,n.return)),n!==null&&s&4&&Gc(t,t.memoizedProps,n.memoizedProps);break;case 5:if(rn(e,t),cn(t),s&512&&(we||n===null||Gn(n,n.return)),t.flags&32){r=t.stateNode;try{ks(r,"")}catch(rt){Jt(t,t.return,rt)}}s&4&&t.stateNode!=null&&(r=t.memoizedProps,Gc(t,r,n!==null?n.memoizedProps:r)),s&1024&&(Kc=!0);break;case 6:if(rn(e,t),cn(t),s&4){if(t.stateNode===null)throw Error(o(162));s=t.memoizedProps,n=t.stateNode;try{n.nodeValue=s}catch(rt){Jt(t,t.return,rt)}}break;case 3:if(Lo=null,r=Un,Un=Uo(e.containerInfo),rn(e,t),Un=r,cn(t),s&4&&n!==null&&n.memoizedState.isDehydrated)try{oi(e.containerInfo)}catch(rt){Jt(t,t.return,rt)}Kc&&(Kc=!1,Nm(t));break;case 4:s=Un,Un=Uo(t.stateNode.containerInfo),rn(e,t),cn(t),Un=s;break;case 12:rn(e,t),cn(t);break;case 31:rn(e,t),cn(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,xo(t,s)));break;case 13:rn(e,t),cn(t),t.child.flags&8192&&t.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Ao=ht()),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,xo(t,s)));break;case 22:r=t.memoizedState!==null;var T=n!==null&&n.memoizedState!==null,D=ra,q=we;if(ra=D||r,we=q||T,rn(e,t),we=q,ra=D,cn(t),s&8192)t:for(e=t.stateNode,e._visibility=r?e._visibility&-2:e._visibility|1,r&&(n===null||T||ra||we||fs(t)),n=null,e=t;;){if(e.tag===5||e.tag===26){if(n===null){T=n=e;try{if(c=T.stateNode,r)m=c.style,typeof m.setProperty=="function"?m.setProperty("display","none","important"):m.display="none";else{y=T.stateNode;var Z=T.memoizedProps.style,k=Z!=null&&Z.hasOwnProperty("display")?Z.display:null;y.style.display=k==null||typeof k=="boolean"?"":(""+k).trim()}}catch(rt){Jt(T,T.return,rt)}}}else if(e.tag===6){if(n===null){T=e;try{T.stateNode.nodeValue=r?"":T.memoizedProps}catch(rt){Jt(T,T.return,rt)}}}else if(e.tag===18){if(n===null){T=e;try{var z=T.stateNode;r?pp(z,!0):pp(T.stateNode,!1)}catch(rt){Jt(T,T.return,rt)}}}else if((e.tag!==22&&e.tag!==23||e.memoizedState===null||e===t)&&e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break t;for(;e.sibling===null;){if(e.return===null||e.return===t)break t;n===e&&(n=null),e=e.return}n===e&&(n=null),e.sibling.return=e.return,e=e.sibling}s&4&&(s=t.updateQueue,s!==null&&(n=s.retryQueue,n!==null&&(s.retryQueue=null,xo(t,n))));break;case 19:rn(e,t),cn(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,xo(t,s)));break;case 30:break;case 21:break;default:rn(e,t),cn(t)}}function cn(t){var e=t.flags;if(e&2){try{for(var n,s=t.return;s!==null;){if(gm(s)){n=s;break}s=s.return}if(n==null)throw Error(o(160));switch(n.tag){case 27:var r=n.stateNode,c=Yc(t);To(t,c,r);break;case 5:var m=n.stateNode;n.flags&32&&(ks(m,""),n.flags&=-33);var y=Yc(t);To(t,y,m);break;case 3:case 4:var T=n.stateNode.containerInfo,D=Yc(t);Zc(t,D,T);break;default:throw Error(o(161))}}catch(q){Jt(t,t.return,q)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function Nm(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var e=t;Nm(e),e.tag===5&&e.flags&1024&&e.stateNode.reset(),t=t.sibling}}function ua(t,e){if(e.subtreeFlags&8772)for(e=e.child;e!==null;)Sm(t,e.alternate,e),e=e.sibling}function fs(t){for(t=t.child;t!==null;){var e=t;switch(e.tag){case 0:case 11:case 14:case 15:ka(4,e,e.return),fs(e);break;case 1:Gn(e,e.return);var n=e.stateNode;typeof n.componentWillUnmount=="function"&&pm(e,e.return,n),fs(e);break;case 27:rl(e.stateNode);case 26:case 5:Gn(e,e.return),fs(e);break;case 22:e.memoizedState===null&&fs(e);break;case 30:fs(e);break;default:fs(e)}t=t.sibling}}function da(t,e,n){for(n=n&&(e.subtreeFlags&8772)!==0,e=e.child;e!==null;){var s=e.alternate,r=t,c=e,m=c.flags;switch(c.tag){case 0:case 11:case 15:da(r,c,n),$i(4,c);break;case 1:if(da(r,c,n),s=c,r=s.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(D){Jt(s,s.return,D)}if(s=c,r=s.updateQueue,r!==null){var y=s.stateNode;try{var T=r.shared.hiddenCallbacks;if(T!==null)for(r.shared.hiddenCallbacks=null,r=0;r<T.length;r++)ah(T[r],y)}catch(D){Jt(s,s.return,D)}}n&&m&64&&mm(c),Wi(c,c.return);break;case 27:ym(c);case 26:case 5:da(r,c,n),n&&s===null&&m&4&&vm(c),Wi(c,c.return);break;case 12:da(r,c,n);break;case 31:da(r,c,n),n&&m&4&&xm(r,c);break;case 13:da(r,c,n),n&&m&4&&jm(r,c);break;case 22:c.memoizedState===null&&da(r,c,n),Wi(c,c.return);break;case 30:break;default:da(r,c,n)}e=e.sibling}}function Xc(t,e){var n=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),t=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(t=e.memoizedState.cachePool.pool),t!==n&&(t!=null&&t.refCount++,n!=null&&Li(n))}function Qc(t,e){t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&Li(t))}function Vn(t,e,n,s){if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Em(t,e,n,s),e=e.sibling}function Em(t,e,n,s){var r=e.flags;switch(e.tag){case 0:case 11:case 15:Vn(t,e,n,s),r&2048&&$i(9,e);break;case 1:Vn(t,e,n,s);break;case 3:Vn(t,e,n,s),r&2048&&(t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&Li(t)));break;case 12:if(r&2048){Vn(t,e,n,s),t=e.stateNode;try{var c=e.memoizedProps,m=c.id,y=c.onPostCommit;typeof y=="function"&&y(m,e.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(T){Jt(e,e.return,T)}}else Vn(t,e,n,s);break;case 31:Vn(t,e,n,s);break;case 13:Vn(t,e,n,s);break;case 23:break;case 22:c=e.stateNode,m=e.alternate,e.memoizedState!==null?c._visibility&2?Vn(t,e,n,s):tl(t,e):c._visibility&2?Vn(t,e,n,s):(c._visibility|=2,Fs(t,e,n,s,(e.subtreeFlags&10256)!==0||!1)),r&2048&&Xc(m,e);break;case 24:Vn(t,e,n,s),r&2048&&Qc(e.alternate,e);break;default:Vn(t,e,n,s)}}function Fs(t,e,n,s,r){for(r=r&&((e.subtreeFlags&10256)!==0||!1),e=e.child;e!==null;){var c=t,m=e,y=n,T=s,D=m.flags;switch(m.tag){case 0:case 11:case 15:Fs(c,m,y,T,r),$i(8,m);break;case 23:break;case 22:var q=m.stateNode;m.memoizedState!==null?q._visibility&2?Fs(c,m,y,T,r):tl(c,m):(q._visibility|=2,Fs(c,m,y,T,r)),r&&D&2048&&Xc(m.alternate,m);break;case 24:Fs(c,m,y,T,r),r&&D&2048&&Qc(m.alternate,m);break;default:Fs(c,m,y,T,r)}e=e.sibling}}function tl(t,e){if(e.subtreeFlags&10256)for(e=e.child;e!==null;){var n=t,s=e,r=s.flags;switch(s.tag){case 22:tl(n,s),r&2048&&Xc(s.alternate,s);break;case 24:tl(n,s),r&2048&&Qc(s.alternate,s);break;default:tl(n,s)}e=e.sibling}}var el=8192;function Js(t,e,n){if(t.subtreeFlags&el)for(t=t.child;t!==null;)Cm(t,e,n),t=t.sibling}function Cm(t,e,n){switch(t.tag){case 26:Js(t,e,n),t.flags&el&&t.memoizedState!==null&&_b(n,Un,t.memoizedState,t.memoizedProps);break;case 5:Js(t,e,n);break;case 3:case 4:var s=Un;Un=Uo(t.stateNode.containerInfo),Js(t,e,n),Un=s;break;case 22:t.memoizedState===null&&(s=t.alternate,s!==null&&s.memoizedState!==null?(s=el,el=16777216,Js(t,e,n),el=s):Js(t,e,n));break;default:Js(t,e,n)}}function Dm(t){var e=t.alternate;if(e!==null&&(t=e.child,t!==null)){e.child=null;do e=t.sibling,t.sibling=null,t=e;while(t!==null)}}function nl(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var n=0;n<e.length;n++){var s=e[n];Le=s,wm(s,t)}Dm(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)km(t),t=t.sibling}function km(t){switch(t.tag){case 0:case 11:case 15:nl(t),t.flags&2048&&ka(9,t,t.return);break;case 3:nl(t);break;case 12:nl(t);break;case 22:var e=t.stateNode;t.memoizedState!==null&&e._visibility&2&&(t.return===null||t.return.tag!==13)?(e._visibility&=-3,jo(t)):nl(t);break;default:nl(t)}}function jo(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var n=0;n<e.length;n++){var s=e[n];Le=s,wm(s,t)}Dm(t)}for(t=t.child;t!==null;){switch(e=t,e.tag){case 0:case 11:case 15:ka(8,e,e.return),jo(e);break;case 22:n=e.stateNode,n._visibility&2&&(n._visibility&=-3,jo(e));break;default:jo(e)}t=t.sibling}}function wm(t,e){for(;Le!==null;){var n=Le;switch(n.tag){case 0:case 11:case 15:ka(8,n,e);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var s=n.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:Li(n.memoizedState.cache)}if(s=n.child,s!==null)s.return=n,Le=s;else t:for(n=t;Le!==null;){s=Le;var r=s.sibling,c=s.return;if(_m(s),s===n){Le=null;break t}if(r!==null){r.return=c,Le=r;break t}Le=c}}}var B1={getCacheForType:function(t){var e=Ze(Ce),n=e.data.get(t);return n===void 0&&(n=t(),e.data.set(t,n)),n},cacheSignal:function(){return Ze(Ce).controller.signal}},U1=typeof WeakMap=="function"?WeakMap:Map,Yt=0,ie=null,wt=null,Ot=0,Ft=0,gn=null,wa=!1,$s=!1,Pc=!1,fa=0,Se=0,Ma=0,hs=0,Fc=0,yn=0,Ws=0,al=null,un=null,Jc=!1,Ao=0,Mm=0,No=1/0,Eo=null,Ra=null,ze=0,Oa=null,ti=null,ha=0,$c=0,Wc=null,Rm=null,sl=0,tu=null;function bn(){return(Yt&2)!==0&&Ot!==0?Ot&-Ot:B.T!==null?lu():ji()}function Om(){if(yn===0)if((Ot&536870912)===0||Bt){var t=Oe;Oe<<=1,(Oe&3932160)===0&&(Oe=262144),yn=t}else yn=536870912;return t=pn.current,t!==null&&(t.flags|=32),yn}function dn(t,e,n){(t===ie&&(Ft===2||Ft===9)||t.cancelPendingCommit!==null)&&(ei(t,0),za(t,Ot,yn,!1)),ba(t,n),((Yt&2)===0||t!==ie)&&(t===ie&&((Yt&2)===0&&(hs|=n),Se===4&&za(t,Ot,yn,!1)),Yn(t))}function zm(t,e,n){if((Yt&6)!==0)throw Error(o(327));var s=!n&&(e&127)===0&&(e&t.expiredLanes)===0||fe(t,e),r=s?q1(t,e):nu(t,e,!0),c=s;do{if(r===0){$s&&!s&&za(t,e,0,!1);break}else{if(n=t.current.alternate,c&&!V1(n)){r=nu(t,e,!1),c=!1;continue}if(r===2){if(c=e,t.errorRecoveryDisabledLanes&c)var m=0;else m=t.pendingLanes&-536870913,m=m!==0?m:m&536870912?536870912:0;if(m!==0){e=m;t:{var y=t;r=al;var T=y.current.memoizedState.isDehydrated;if(T&&(ei(y,m).flags|=256),m=nu(y,m,!1),m!==2){if(Pc&&!T){y.errorRecoveryDisabledLanes|=c,hs|=c,r=4;break t}c=un,un=r,c!==null&&(un===null?un=c:un.push.apply(un,c))}r=m}if(c=!1,r!==2)continue}}if(r===1){ei(t,0),za(t,e,0,!0);break}t:{switch(s=t,c=r,c){case 0:case 1:throw Error(o(345));case 4:if((e&4194048)!==e)break;case 6:za(s,e,yn,!wa);break t;case 2:un=null;break;case 3:case 5:break;default:throw Error(o(329))}if((e&62914560)===e&&(r=Ao+300-ht(),10<r)){if(za(s,e,yn,!wa),it(s,0,!0)!==0)break t;ha=e,s.timeoutHandle=fp(Bm.bind(null,s,n,un,Eo,Jc,e,yn,hs,Ws,wa,c,"Throttled",-0,0),r);break t}Bm(s,n,un,Eo,Jc,e,yn,hs,Ws,wa,c,null,-0,0)}}break}while(!0);Yn(t)}function Bm(t,e,n,s,r,c,m,y,T,D,q,Z,k,z){if(t.timeoutHandle=-1,Z=e.subtreeFlags,Z&8192||(Z&16785408)===16785408){Z={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:$n},Cm(e,c,Z);var rt=(c&62914560)===c?Ao-ht():(c&4194048)===c?Mm-ht():0;if(rt=Tb(Z,rt),rt!==null){ha=c,t.cancelPendingCommit=rt(Ym.bind(null,t,e,c,n,s,r,m,y,T,q,Z,null,k,z)),za(t,c,m,!D);return}}Ym(t,e,c,n,s,r,m,y,T)}function V1(t){for(var e=t;;){var n=e.tag;if((n===0||n===11||n===15)&&e.flags&16384&&(n=e.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var s=0;s<n.length;s++){var r=n[s],c=r.getSnapshot;r=r.value;try{if(!hn(c(),r))return!1}catch{return!1}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function za(t,e,n,s){e&=~Fc,e&=~hs,t.suspendedLanes|=e,t.pingedLanes&=~e,s&&(t.warmLanes|=e),s=t.expirationTimes;for(var r=e;0<r;){var c=31-J(r),m=1<<c;s[c]=-1,r&=~m}n!==0&&_i(t,n,e)}function Co(){return(Yt&6)===0?(il(0),!1):!0}function eu(){if(wt!==null){if(Ft===0)var t=wt.return;else t=wt,na=ss=null,gc(t),Zs=null,Hi=0,t=wt;for(;t!==null;)hm(t.alternate,t),t=t.return;wt=null}}function ei(t,e){var n=t.timeoutHandle;n!==-1&&(t.timeoutHandle=-1,sb(n)),n=t.cancelPendingCommit,n!==null&&(t.cancelPendingCommit=null,n()),ha=0,eu(),ie=t,wt=n=ta(t.current,null),Ot=e,Ft=0,gn=null,wa=!1,$s=fe(t,e),Pc=!1,Ws=yn=Fc=hs=Ma=Se=0,un=al=null,Jc=!1,(e&8)!==0&&(e|=e&32);var s=t.entangledLanes;if(s!==0)for(t=t.entanglements,s&=e;0<s;){var r=31-J(s),c=1<<r;e|=t[r],s&=~c}return fa=e,Ql(),n}function Um(t,e){Nt=null,B.H=Pi,e===Ys||e===no?(e=Wf(),Ft=3):e===ic?(e=Wf(),Ft=4):Ft=e===Rc?8:e!==null&&typeof e=="object"&&typeof e.then=="function"?6:1,gn=e,wt===null&&(Se=1,go(t,An(e,t.current)))}function Vm(){var t=pn.current;return t===null?!0:(Ot&4194048)===Ot?Dn===null:(Ot&62914560)===Ot||(Ot&536870912)!==0?t===Dn:!1}function Lm(){var t=B.H;return B.H=Pi,t===null?Pi:t}function qm(){var t=B.A;return B.A=B1,t}function Do(){Se=4,wa||(Ot&4194048)!==Ot&&pn.current!==null||($s=!0),(Ma&134217727)===0&&(hs&134217727)===0||ie===null||za(ie,Ot,yn,!1)}function nu(t,e,n){var s=Yt;Yt|=2;var r=Lm(),c=qm();(ie!==t||Ot!==e)&&(Eo=null,ei(t,e)),e=!1;var m=Se;t:do try{if(Ft!==0&&wt!==null){var y=wt,T=gn;switch(Ft){case 8:eu(),m=6;break t;case 3:case 2:case 9:case 6:pn.current===null&&(e=!0);var D=Ft;if(Ft=0,gn=null,ni(t,y,T,D),n&&$s){m=0;break t}break;default:D=Ft,Ft=0,gn=null,ni(t,y,T,D)}}L1(),m=Se;break}catch(q){Um(t,q)}while(!0);return e&&t.shellSuspendCounter++,na=ss=null,Yt=s,B.H=r,B.A=c,wt===null&&(ie=null,Ot=0,Ql()),m}function L1(){for(;wt!==null;)Hm(wt)}function q1(t,e){var n=Yt;Yt|=2;var s=Lm(),r=qm();ie!==t||Ot!==e?(Eo=null,No=ht()+500,ei(t,e)):$s=fe(t,e);t:do try{if(Ft!==0&&wt!==null){e=wt;var c=gn;e:switch(Ft){case 1:Ft=0,gn=null,ni(t,e,c,1);break;case 2:case 9:if(Jf(c)){Ft=0,gn=null,Im(e);break}e=function(){Ft!==2&&Ft!==9||ie!==t||(Ft=7),Yn(t)},c.then(e,e);break t;case 3:Ft=7;break t;case 4:Ft=5;break t;case 7:Jf(c)?(Ft=0,gn=null,Im(e)):(Ft=0,gn=null,ni(t,e,c,7));break;case 5:var m=null;switch(wt.tag){case 26:m=wt.memoizedState;case 5:case 27:var y=wt;if(m?Ep(m):y.stateNode.complete){Ft=0,gn=null;var T=y.sibling;if(T!==null)wt=T;else{var D=y.return;D!==null?(wt=D,ko(D)):wt=null}break e}}Ft=0,gn=null,ni(t,e,c,5);break;case 6:Ft=0,gn=null,ni(t,e,c,6);break;case 8:eu(),Se=6;break t;default:throw Error(o(462))}}H1();break}catch(q){Um(t,q)}while(!0);return na=ss=null,B.H=s,B.A=r,Yt=n,wt!==null?0:(ie=null,Ot=0,Ql(),Se)}function H1(){for(;wt!==null&&!jt();)Hm(wt)}function Hm(t){var e=dm(t.alternate,t,fa);t.memoizedProps=t.pendingProps,e===null?ko(t):wt=e}function Im(t){var e=t,n=e.alternate;switch(e.tag){case 15:case 0:e=im(n,e,e.pendingProps,e.type,void 0,Ot);break;case 11:e=im(n,e,e.pendingProps,e.type.render,e.ref,Ot);break;case 5:gc(e);default:hm(n,e),e=wt=qf(e,fa),e=dm(n,e,fa)}t.memoizedProps=t.pendingProps,e===null?ko(t):wt=e}function ni(t,e,n,s){na=ss=null,gc(e),Zs=null,Hi=0;var r=e.return;try{if(D1(t,r,e,n,Ot)){Se=1,go(t,An(n,t.current)),wt=null;return}}catch(c){if(r!==null)throw wt=r,c;Se=1,go(t,An(n,t.current)),wt=null;return}e.flags&32768?(Bt||s===1?t=!0:$s||(Ot&536870912)!==0?t=!1:(wa=t=!0,(s===2||s===9||s===3||s===6)&&(s=pn.current,s!==null&&s.tag===13&&(s.flags|=16384))),Gm(e,t)):ko(e)}function ko(t){var e=t;do{if((e.flags&32768)!==0){Gm(e,wa);return}t=e.return;var n=M1(e.alternate,e,fa);if(n!==null){wt=n;return}if(e=e.sibling,e!==null){wt=e;return}wt=e=t}while(e!==null);Se===0&&(Se=5)}function Gm(t,e){do{var n=R1(t.alternate,t);if(n!==null){n.flags&=32767,wt=n;return}if(n=t.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!e&&(t=t.sibling,t!==null)){wt=t;return}wt=t=n}while(t!==null);Se=6,wt=null}function Ym(t,e,n,s,r,c,m,y,T){t.cancelPendingCommit=null;do wo();while(ze!==0);if((Yt&6)!==0)throw Error(o(327));if(e!==null){if(e===t.current)throw Error(o(177));if(c=e.lanes|e.childLanes,c|=Yr,Bl(t,n,c,m,y,T),t===ie&&(wt=ie=null,Ot=0),ti=e,Oa=t,ha=n,$c=c,Wc=r,Rm=s,(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,Z1(se,function(){return Pm(),null})):(t.callbackNode=null,t.callbackPriority=0),s=(e.flags&13878)!==0,(e.subtreeFlags&13878)!==0||s){s=B.T,B.T=null,r=Q.p,Q.p=2,m=Yt,Yt|=4;try{O1(t,e,n)}finally{Yt=m,Q.p=r,B.T=s}}ze=1,Zm(),Km(),Xm()}}function Zm(){if(ze===1){ze=0;var t=Oa,e=ti,n=(e.flags&13878)!==0;if((e.subtreeFlags&13878)!==0||n){n=B.T,B.T=null;var s=Q.p;Q.p=2;var r=Yt;Yt|=4;try{Am(e,t);var c=mu,m=wf(t.containerInfo),y=c.focusedElem,T=c.selectionRange;if(m!==y&&y&&y.ownerDocument&&kf(y.ownerDocument.documentElement,y)){if(T!==null&&Lr(y)){var D=T.start,q=T.end;if(q===void 0&&(q=D),"selectionStart"in y)y.selectionStart=D,y.selectionEnd=Math.min(q,y.value.length);else{var Z=y.ownerDocument||document,k=Z&&Z.defaultView||window;if(k.getSelection){var z=k.getSelection(),rt=y.textContent.length,gt=Math.min(T.start,rt),ne=T.end===void 0?gt:Math.min(T.end,rt);!z.extend&&gt>ne&&(m=ne,ne=gt,gt=m);var N=Df(y,gt),j=Df(y,ne);if(N&&j&&(z.rangeCount!==1||z.anchorNode!==N.node||z.anchorOffset!==N.offset||z.focusNode!==j.node||z.focusOffset!==j.offset)){var C=Z.createRange();C.setStart(N.node,N.offset),z.removeAllRanges(),gt>ne?(z.addRange(C),z.extend(j.node,j.offset)):(C.setEnd(j.node,j.offset),z.addRange(C))}}}}for(Z=[],z=y;z=z.parentNode;)z.nodeType===1&&Z.push({element:z,left:z.scrollLeft,top:z.scrollTop});for(typeof y.focus=="function"&&y.focus(),y=0;y<Z.length;y++){var I=Z[y];I.element.scrollLeft=I.left,I.element.scrollTop=I.top}}Go=!!hu,mu=hu=null}finally{Yt=r,Q.p=s,B.T=n}}t.current=e,ze=2}}function Km(){if(ze===2){ze=0;var t=Oa,e=ti,n=(e.flags&8772)!==0;if((e.subtreeFlags&8772)!==0||n){n=B.T,B.T=null;var s=Q.p;Q.p=2;var r=Yt;Yt|=4;try{Sm(t,e.alternate,e)}finally{Yt=r,Q.p=s,B.T=n}}ze=3}}function Xm(){if(ze===4||ze===3){ze=0,At();var t=Oa,e=ti,n=ha,s=Rm;(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?ze=5:(ze=0,ti=Oa=null,Qm(t,t.pendingLanes));var r=t.pendingLanes;if(r===0&&(Ra=null),js(n),e=e.stateNode,Re&&typeof Re.onCommitFiberRoot=="function")try{Re.onCommitFiberRoot(Ie,e,void 0,(e.current.flags&128)===128)}catch{}if(s!==null){e=B.T,r=Q.p,Q.p=2,B.T=null;try{for(var c=t.onRecoverableError,m=0;m<s.length;m++){var y=s[m];c(y.value,{componentStack:y.stack})}}finally{B.T=e,Q.p=r}}(ha&3)!==0&&wo(),Yn(t),r=t.pendingLanes,(n&261930)!==0&&(r&42)!==0?t===tu?sl++:(sl=0,tu=t):sl=0,il(0)}}function Qm(t,e){(t.pooledCacheLanes&=e)===0&&(e=t.pooledCache,e!=null&&(t.pooledCache=null,Li(e)))}function wo(){return Zm(),Km(),Xm(),Pm()}function Pm(){if(ze!==5)return!1;var t=Oa,e=$c;$c=0;var n=js(ha),s=B.T,r=Q.p;try{Q.p=32>n?32:n,B.T=null,n=Wc,Wc=null;var c=Oa,m=ha;if(ze=0,ti=Oa=null,ha=0,(Yt&6)!==0)throw Error(o(331));var y=Yt;if(Yt|=4,km(c.current),Em(c,c.current,m,n),Yt=y,il(0,!1),Re&&typeof Re.onPostCommitFiberRoot=="function")try{Re.onPostCommitFiberRoot(Ie,c)}catch{}return!0}finally{Q.p=r,B.T=s,Qm(t,e)}}function Fm(t,e,n){e=An(n,e),e=Mc(t.stateNode,e,2),t=Ea(t,e,2),t!==null&&(ba(t,2),Yn(t))}function Jt(t,e,n){if(t.tag===3)Fm(t,t,n);else for(;e!==null;){if(e.tag===3){Fm(e,t,n);break}else if(e.tag===1){var s=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Ra===null||!Ra.has(s))){t=An(n,t),n=Jh(2),s=Ea(e,n,2),s!==null&&($h(n,s,e,t),ba(s,2),Yn(s));break}}e=e.return}}function au(t,e,n){var s=t.pingCache;if(s===null){s=t.pingCache=new U1;var r=new Set;s.set(e,r)}else r=s.get(e),r===void 0&&(r=new Set,s.set(e,r));r.has(n)||(Pc=!0,r.add(n),t=I1.bind(null,t,e,n),e.then(t,t))}function I1(t,e,n){var s=t.pingCache;s!==null&&s.delete(e),t.pingedLanes|=t.suspendedLanes&n,t.warmLanes&=~n,ie===t&&(Ot&n)===n&&(Se===4||Se===3&&(Ot&62914560)===Ot&&300>ht()-Ao?(Yt&2)===0&&ei(t,0):Fc|=n,Ws===Ot&&(Ws=0)),Yn(t)}function Jm(t,e){e===0&&(e=ya()),t=es(t,e),t!==null&&(ba(t,e),Yn(t))}function G1(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),Jm(t,n)}function Y1(t,e){var n=0;switch(t.tag){case 31:case 13:var s=t.stateNode,r=t.memoizedState;r!==null&&(n=r.retryLane);break;case 19:s=t.stateNode;break;case 22:s=t.stateNode._retryCache;break;default:throw Error(o(314))}s!==null&&s.delete(e),Jm(t,n)}function Z1(t,e){return W(t,e)}var Mo=null,ai=null,su=!1,Ro=!1,iu=!1,Ba=0;function Yn(t){t!==ai&&t.next===null&&(ai===null?Mo=ai=t:ai=ai.next=t),Ro=!0,su||(su=!0,X1())}function il(t,e){if(!iu&&Ro){iu=!0;do for(var n=!1,s=Mo;s!==null;){if(t!==0){var r=s.pendingLanes;if(r===0)var c=0;else{var m=s.suspendedLanes,y=s.pingedLanes;c=(1<<31-J(42|t)+1)-1,c&=r&~(m&~y),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(n=!0,ep(s,c))}else c=Ot,c=it(s,s===ie?c:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(c&3)===0||fe(s,c)||(n=!0,ep(s,c));s=s.next}while(n);iu=!1}}function K1(){$m()}function $m(){Ro=su=!1;var t=0;Ba!==0&&ab()&&(t=Ba);for(var e=ht(),n=null,s=Mo;s!==null;){var r=s.next,c=Wm(s,e);c===0?(s.next=null,n===null?Mo=r:n.next=r,r===null&&(ai=n)):(n=s,(t!==0||(c&3)!==0)&&(Ro=!0)),s=r}ze!==0&&ze!==5||il(t),Ba!==0&&(Ba=0)}function Wm(t,e){for(var n=t.suspendedLanes,s=t.pingedLanes,r=t.expirationTimes,c=t.pendingLanes&-62914561;0<c;){var m=31-J(c),y=1<<m,T=r[m];T===-1?((y&n)===0||(y&s)!==0)&&(r[m]=fn(y,e)):T<=e&&(t.expiredLanes|=y),c&=~y}if(e=ie,n=Ot,n=it(t,t===e?n:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s=t.callbackNode,n===0||t===e&&(Ft===2||Ft===9)||t.cancelPendingCommit!==null)return s!==null&&s!==null&&ot(s),t.callbackNode=null,t.callbackPriority=0;if((n&3)===0||fe(t,n)){if(e=n&-n,e===t.callbackPriority)return e;switch(s!==null&&ot(s),js(n)){case 2:case 8:n=pe;break;case 32:n=se;break;case 268435456:n=H;break;default:n=se}return s=tp.bind(null,t),n=W(n,s),t.callbackPriority=e,t.callbackNode=n,e}return s!==null&&s!==null&&ot(s),t.callbackPriority=2,t.callbackNode=null,2}function tp(t,e){if(ze!==0&&ze!==5)return t.callbackNode=null,t.callbackPriority=0,null;var n=t.callbackNode;if(wo()&&t.callbackNode!==n)return null;var s=Ot;return s=it(t,t===ie?s:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s===0?null:(zm(t,s,e),Wm(t,ht()),t.callbackNode!=null&&t.callbackNode===n?tp.bind(null,t):null)}function ep(t,e){if(wo())return null;zm(t,e,!0)}function X1(){ib(function(){(Yt&6)!==0?W(kt,K1):$m()})}function lu(){if(Ba===0){var t=Is;t===0&&(t=ft,ft<<=1,(ft&261888)===0&&(ft=256)),Ba=t}return Ba}function np(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:ql(""+t)}function ap(t,e){var n=e.ownerDocument.createElement("input");return n.name=e.name,n.value=e.value,t.id&&n.setAttribute("form",t.id),e.parentNode.insertBefore(n,e),t=new FormData(t),n.parentNode.removeChild(n),t}function Q1(t,e,n,s,r){if(e==="submit"&&n&&n.stateNode===r){var c=np((r[Ge]||null).action),m=s.submitter;m&&(e=(e=m[Ge]||null)?np(e.formAction):m.getAttribute("formAction"),e!==null&&(c=e,m=null));var y=new Yl("action","action",null,s,r);t.push({event:y,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Ba!==0){var T=m?ap(r,m):new FormData(r);Nc(n,{pending:!0,data:T,method:r.method,action:c},null,T)}}else typeof c=="function"&&(y.preventDefault(),T=m?ap(r,m):new FormData(r),Nc(n,{pending:!0,data:T,method:r.method,action:c},c,T))},currentTarget:r}]})}}for(var ou=0;ou<Gr.length;ou++){var ru=Gr[ou],P1=ru.toLowerCase(),F1=ru[0].toUpperCase()+ru.slice(1);Bn(P1,"on"+F1)}Bn(Of,"onAnimationEnd"),Bn(zf,"onAnimationIteration"),Bn(Bf,"onAnimationStart"),Bn("dblclick","onDoubleClick"),Bn("focusin","onFocus"),Bn("focusout","onBlur"),Bn(f1,"onTransitionRun"),Bn(h1,"onTransitionStart"),Bn(m1,"onTransitionCancel"),Bn(Uf,"onTransitionEnd"),Cs("onMouseEnter",["mouseout","mouseover"]),Cs("onMouseLeave",["mouseout","mouseover"]),Cs("onPointerEnter",["pointerout","pointerover"]),Cs("onPointerLeave",["pointerout","pointerover"]),Ja("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ja("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ja("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ja("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ja("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ja("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ll="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(" "),J1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ll));function sp(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var s=t[n],r=s.event;s=s.listeners;t:{var c=void 0;if(e)for(var m=s.length-1;0<=m;m--){var y=s[m],T=y.instance,D=y.currentTarget;if(y=y.listener,T!==c&&r.isPropagationStopped())break t;c=y,r.currentTarget=D;try{c(r)}catch(q){Xl(q)}r.currentTarget=null,c=T}else for(m=0;m<s.length;m++){if(y=s[m],T=y.instance,D=y.currentTarget,y=y.listener,T!==c&&r.isPropagationStopped())break t;c=y,r.currentTarget=D;try{c(r)}catch(q){Xl(q)}r.currentTarget=null,c=T}}}}function Mt(t,e){var n=e[Ut];n===void 0&&(n=e[Ut]=new Set);var s=t+"__bubble";n.has(s)||(ip(e,t,2,!1),n.add(s))}function cu(t,e,n){var s=0;e&&(s|=4),ip(n,t,s,e)}var Oo="_reactListening"+Math.random().toString(36).slice(2);function uu(t){if(!t[Oo]){t[Oo]=!0,Jd.forEach(function(n){n!=="selectionchange"&&(J1.has(n)||cu(n,!1,t),cu(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Oo]||(e[Oo]=!0,cu("selectionchange",!1,e))}}function ip(t,e,n,s){switch(Op(e)){case 2:var r=Ab;break;case 8:r=Nb;break;default:r=Au}n=r.bind(null,e,n,t),r=void 0,!kr||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(r=!0),s?r!==void 0?t.addEventListener(e,n,{capture:!0,passive:r}):t.addEventListener(e,n,!0):r!==void 0?t.addEventListener(e,n,{passive:r}):t.addEventListener(e,n,!1)}function du(t,e,n,s,r){var c=s;if((e&1)===0&&(e&2)===0&&s!==null)t:for(;;){if(s===null)return;var m=s.tag;if(m===3||m===4){var y=s.stateNode.containerInfo;if(y===r)break;if(m===4)for(m=s.return;m!==null;){var T=m.tag;if((T===3||T===4)&&m.stateNode.containerInfo===r)return;m=m.return}for(;y!==null;){if(m=As(y),m===null)return;if(T=m.tag,T===5||T===6||T===26||T===27){s=c=m;continue t}y=y.parentNode}}s=s.return}uf(function(){var D=c,q=Cr(n),Z=[];t:{var k=Vf.get(t);if(k!==void 0){var z=Yl,rt=t;switch(t){case"keypress":if(Il(n)===0)break t;case"keydown":case"keyup":z=Yy;break;case"focusin":rt="focus",z=Or;break;case"focusout":rt="blur",z=Or;break;case"beforeblur":case"afterblur":z=Or;break;case"click":if(n.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":z=hf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":z=My;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":z=Xy;break;case Of:case zf:case Bf:z=zy;break;case Uf:z=Py;break;case"scroll":case"scrollend":z=ky;break;case"wheel":z=Jy;break;case"copy":case"cut":case"paste":z=Uy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":z=pf;break;case"toggle":case"beforetoggle":z=Wy}var gt=(e&4)!==0,ne=!gt&&(t==="scroll"||t==="scrollend"),N=gt?k!==null?k+"Capture":null:k;gt=[];for(var j=D,C;j!==null;){var I=j;if(C=I.stateNode,I=I.tag,I!==5&&I!==26&&I!==27||C===null||N===null||(I=Ci(j,N),I!=null&&gt.push(ol(j,I,C))),ne)break;j=j.return}0<gt.length&&(k=new z(k,rt,null,n,q),Z.push({event:k,listeners:gt}))}}if((e&7)===0){t:{if(k=t==="mouseover"||t==="pointerover",z=t==="mouseout"||t==="pointerout",k&&n!==Er&&(rt=n.relatedTarget||n.fromElement)&&(As(rt)||rt[ct]))break t;if((z||k)&&(k=q.window===q?q:(k=q.ownerDocument)?k.defaultView||k.parentWindow:window,z?(rt=n.relatedTarget||n.toElement,z=D,rt=rt?As(rt):null,rt!==null&&(ne=h(rt),gt=rt.tag,rt!==ne||gt!==5&&gt!==27&&gt!==6)&&(rt=null)):(z=null,rt=D),z!==rt)){if(gt=hf,I="onMouseLeave",N="onMouseEnter",j="mouse",(t==="pointerout"||t==="pointerover")&&(gt=pf,I="onPointerLeave",N="onPointerEnter",j="pointer"),ne=z==null?k:Ei(z),C=rt==null?k:Ei(rt),k=new gt(I,j+"leave",z,n,q),k.target=ne,k.relatedTarget=C,I=null,As(q)===D&&(gt=new gt(N,j+"enter",rt,n,q),gt.target=C,gt.relatedTarget=ne,I=gt),ne=I,z&&rt)e:{for(gt=$1,N=z,j=rt,C=0,I=N;I;I=gt(I))C++;I=0;for(var pt=j;pt;pt=gt(pt))I++;for(;0<C-I;)N=gt(N),C--;for(;0<I-C;)j=gt(j),I--;for(;C--;){if(N===j||j!==null&&N===j.alternate){gt=N;break e}N=gt(N),j=gt(j)}gt=null}else gt=null;z!==null&&lp(Z,k,z,gt,!1),rt!==null&&ne!==null&&lp(Z,ne,rt,gt,!0)}}t:{if(k=D?Ei(D):window,z=k.nodeName&&k.nodeName.toLowerCase(),z==="select"||z==="input"&&k.type==="file")var Lt=xf;else if(_f(k))if(jf)Lt=c1;else{Lt=o1;var dt=l1}else z=k.nodeName,!z||z.toLowerCase()!=="input"||k.type!=="checkbox"&&k.type!=="radio"?D&&Nr(D.elementType)&&(Lt=xf):Lt=r1;if(Lt&&(Lt=Lt(t,D))){Tf(Z,Lt,n,q);break t}dt&&dt(t,k,D),t==="focusout"&&D&&k.type==="number"&&D.memoizedProps.value!=null&&Ar(k,"number",k.value)}switch(dt=D?Ei(D):window,t){case"focusin":(_f(dt)||dt.contentEditable==="true")&&(Os=dt,qr=D,Bi=null);break;case"focusout":Bi=qr=Os=null;break;case"mousedown":Hr=!0;break;case"contextmenu":case"mouseup":case"dragend":Hr=!1,Mf(Z,n,q);break;case"selectionchange":if(d1)break;case"keydown":case"keyup":Mf(Z,n,q)}var Et;if(Br)t:{switch(t){case"compositionstart":var zt="onCompositionStart";break t;case"compositionend":zt="onCompositionEnd";break t;case"compositionupdate":zt="onCompositionUpdate";break t}zt=void 0}else Rs?bf(t,n)&&(zt="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(zt="onCompositionStart");zt&&(vf&&n.locale!=="ko"&&(Rs||zt!=="onCompositionStart"?zt==="onCompositionEnd"&&Rs&&(Et=df()):(Sa=q,wr="value"in Sa?Sa.value:Sa.textContent,Rs=!0)),dt=zo(D,zt),0<dt.length&&(zt=new mf(zt,t,null,n,q),Z.push({event:zt,listeners:dt}),Et?zt.data=Et:(Et=Sf(n),Et!==null&&(zt.data=Et)))),(Et=e1?n1(t,n):a1(t,n))&&(zt=zo(D,"onBeforeInput"),0<zt.length&&(dt=new mf("onBeforeInput","beforeinput",null,n,q),Z.push({event:dt,listeners:zt}),dt.data=Et)),Q1(Z,t,D,n,q)}sp(Z,e)})}function ol(t,e,n){return{instance:t,listener:e,currentTarget:n}}function zo(t,e){for(var n=e+"Capture",s=[];t!==null;){var r=t,c=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||c===null||(r=Ci(t,n),r!=null&&s.unshift(ol(t,r,c)),r=Ci(t,e),r!=null&&s.push(ol(t,r,c))),t.tag===3)return s;t=t.return}return[]}function $1(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function lp(t,e,n,s,r){for(var c=e._reactName,m=[];n!==null&&n!==s;){var y=n,T=y.alternate,D=y.stateNode;if(y=y.tag,T!==null&&T===s)break;y!==5&&y!==26&&y!==27||D===null||(T=D,r?(D=Ci(n,c),D!=null&&m.unshift(ol(n,D,T))):r||(D=Ci(n,c),D!=null&&m.push(ol(n,D,T)))),n=n.return}m.length!==0&&t.push({event:e,listeners:m})}var W1=/\r\n?/g,tb=/\u0000|\uFFFD/g;function op(t){return(typeof t=="string"?t:""+t).replace(W1,`
25
- `).replace(tb,"")}function rp(t,e){return e=op(e),op(t)===e}function ee(t,e,n,s,r,c){switch(n){case"children":typeof s=="string"?e==="body"||e==="textarea"&&s===""||ks(t,s):(typeof s=="number"||typeof s=="bigint")&&e!=="body"&&ks(t,""+s);break;case"className":Vl(t,"class",s);break;case"tabIndex":Vl(t,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Vl(t,n,s);break;case"style":rf(t,s,c);break;case"data":if(e!=="object"){Vl(t,"data",s);break}case"src":case"href":if(s===""&&(e!=="a"||n!=="href")){t.removeAttribute(n);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(n);break}s=ql(""+s),t.setAttribute(n,s);break;case"action":case"formAction":if(typeof s=="function"){t.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 c=="function"&&(n==="formAction"?(e!=="input"&&ee(t,e,"name",r.name,r,null),ee(t,e,"formEncType",r.formEncType,r,null),ee(t,e,"formMethod",r.formMethod,r,null),ee(t,e,"formTarget",r.formTarget,r,null)):(ee(t,e,"encType",r.encType,r,null),ee(t,e,"method",r.method,r,null),ee(t,e,"target",r.target,r,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(n);break}s=ql(""+s),t.setAttribute(n,s);break;case"onClick":s!=null&&(t.onclick=$n);break;case"onScroll":s!=null&&Mt("scroll",t);break;case"onScrollEnd":s!=null&&Mt("scrollend",t);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(o(61));if(n=s.__html,n!=null){if(r.children!=null)throw Error(o(60));t.innerHTML=n}}break;case"multiple":t.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":t.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){t.removeAttribute("xlink:href");break}n=ql(""+s),t.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":s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(n,""+s):t.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":s&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(n,""):t.removeAttribute(n);break;case"capture":case"download":s===!0?t.setAttribute(n,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(n,s):t.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?t.setAttribute(n,s):t.removeAttribute(n);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?t.removeAttribute(n):t.setAttribute(n,s);break;case"popover":Mt("beforetoggle",t),Mt("toggle",t),Ul(t,"popover",s);break;case"xlinkActuate":Jn(t,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Jn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Jn(t,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Jn(t,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Jn(t,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Jn(t,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Jn(t,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Jn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Jn(t,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Ul(t,"is",s);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Cy.get(n)||n,Ul(t,n,s))}}function fu(t,e,n,s,r,c){switch(n){case"style":rf(t,s,c);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(o(61));if(n=s.__html,n!=null){if(r.children!=null)throw Error(o(60));t.innerHTML=n}}break;case"children":typeof s=="string"?ks(t,s):(typeof s=="number"||typeof s=="bigint")&&ks(t,""+s);break;case"onScroll":s!=null&&Mt("scroll",t);break;case"onScrollEnd":s!=null&&Mt("scrollend",t);break;case"onClick":s!=null&&(t.onclick=$n);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!$d.hasOwnProperty(n))t:{if(n[0]==="o"&&n[1]==="n"&&(r=n.endsWith("Capture"),e=n.slice(2,r?n.length-7:void 0),c=t[Ge]||null,c=c!=null?c[n]:null,typeof c=="function"&&t.removeEventListener(e,c,r),typeof s=="function")){typeof c!="function"&&c!==null&&(n in t?t[n]=null:t.hasAttribute(n)&&t.removeAttribute(n)),t.addEventListener(e,s,r);break t}n in t?t[n]=s:s===!0?t.setAttribute(n,""):Ul(t,n,s)}}}function Xe(t,e,n){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Mt("error",t),Mt("load",t);var s=!1,r=!1,c;for(c in n)if(n.hasOwnProperty(c)){var m=n[c];if(m!=null)switch(c){case"src":s=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,e));default:ee(t,e,c,m,n,null)}}r&&ee(t,e,"srcSet",n.srcSet,n,null),s&&ee(t,e,"src",n.src,n,null);return;case"input":Mt("invalid",t);var y=c=m=r=null,T=null,D=null;for(s in n)if(n.hasOwnProperty(s)){var q=n[s];if(q!=null)switch(s){case"name":r=q;break;case"type":m=q;break;case"checked":T=q;break;case"defaultChecked":D=q;break;case"value":c=q;break;case"defaultValue":y=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(o(137,e));break;default:ee(t,e,s,q,n,null)}}af(t,c,y,T,D,m,r,!1);return;case"select":Mt("invalid",t),s=m=c=null;for(r in n)if(n.hasOwnProperty(r)&&(y=n[r],y!=null))switch(r){case"value":c=y;break;case"defaultValue":m=y;break;case"multiple":s=y;default:ee(t,e,r,y,n,null)}e=c,n=m,t.multiple=!!s,e!=null?Ds(t,!!s,e,!1):n!=null&&Ds(t,!!s,n,!0);return;case"textarea":Mt("invalid",t),c=r=s=null;for(m in n)if(n.hasOwnProperty(m)&&(y=n[m],y!=null))switch(m){case"value":s=y;break;case"defaultValue":r=y;break;case"children":c=y;break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(o(91));break;default:ee(t,e,m,y,n,null)}lf(t,s,r,c);return;case"option":for(T in n)if(n.hasOwnProperty(T)&&(s=n[T],s!=null))switch(T){case"selected":t.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:ee(t,e,T,s,n,null)}return;case"dialog":Mt("beforetoggle",t),Mt("toggle",t),Mt("cancel",t),Mt("close",t);break;case"iframe":case"object":Mt("load",t);break;case"video":case"audio":for(s=0;s<ll.length;s++)Mt(ll[s],t);break;case"image":Mt("error",t),Mt("load",t);break;case"details":Mt("toggle",t);break;case"embed":case"source":case"link":Mt("error",t),Mt("load",t);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)&&(s=n[D],s!=null))switch(D){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,e));default:ee(t,e,D,s,n,null)}return;default:if(Nr(e)){for(q in n)n.hasOwnProperty(q)&&(s=n[q],s!==void 0&&fu(t,e,q,s,n,void 0));return}}for(y in n)n.hasOwnProperty(y)&&(s=n[y],s!=null&&ee(t,e,y,s,n,null))}function eb(t,e,n,s){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,c=null,m=null,y=null,T=null,D=null,q=null;for(z in n){var Z=n[z];if(n.hasOwnProperty(z)&&Z!=null)switch(z){case"checked":break;case"value":break;case"defaultValue":T=Z;default:s.hasOwnProperty(z)||ee(t,e,z,null,s,Z)}}for(var k in s){var z=s[k];if(Z=n[k],s.hasOwnProperty(k)&&(z!=null||Z!=null))switch(k){case"type":c=z;break;case"name":r=z;break;case"checked":D=z;break;case"defaultChecked":q=z;break;case"value":m=z;break;case"defaultValue":y=z;break;case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(o(137,e));break;default:z!==Z&&ee(t,e,k,z,s,Z)}}jr(t,m,y,T,D,q,c,r);return;case"select":z=m=y=k=null;for(c in n)if(T=n[c],n.hasOwnProperty(c)&&T!=null)switch(c){case"value":break;case"multiple":z=T;default:s.hasOwnProperty(c)||ee(t,e,c,null,s,T)}for(r in s)if(c=s[r],T=n[r],s.hasOwnProperty(r)&&(c!=null||T!=null))switch(r){case"value":k=c;break;case"defaultValue":y=c;break;case"multiple":m=c;default:c!==T&&ee(t,e,r,c,s,T)}e=y,n=m,s=z,k!=null?Ds(t,!!n,k,!1):!!s!=!!n&&(e!=null?Ds(t,!!n,e,!0):Ds(t,!!n,n?[]:"",!1));return;case"textarea":z=k=null;for(y in n)if(r=n[y],n.hasOwnProperty(y)&&r!=null&&!s.hasOwnProperty(y))switch(y){case"value":break;case"children":break;default:ee(t,e,y,null,s,r)}for(m in s)if(r=s[m],c=n[m],s.hasOwnProperty(m)&&(r!=null||c!=null))switch(m){case"value":k=r;break;case"defaultValue":z=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(o(91));break;default:r!==c&&ee(t,e,m,r,s,c)}sf(t,k,z);return;case"option":for(var rt in n)if(k=n[rt],n.hasOwnProperty(rt)&&k!=null&&!s.hasOwnProperty(rt))switch(rt){case"selected":t.selected=!1;break;default:ee(t,e,rt,null,s,k)}for(T in s)if(k=s[T],z=n[T],s.hasOwnProperty(T)&&k!==z&&(k!=null||z!=null))switch(T){case"selected":t.selected=k&&typeof k!="function"&&typeof k!="symbol";break;default:ee(t,e,T,k,s,z)}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 gt in n)k=n[gt],n.hasOwnProperty(gt)&&k!=null&&!s.hasOwnProperty(gt)&&ee(t,e,gt,null,s,k);for(D in s)if(k=s[D],z=n[D],s.hasOwnProperty(D)&&k!==z&&(k!=null||z!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(o(137,e));break;default:ee(t,e,D,k,s,z)}return;default:if(Nr(e)){for(var ne in n)k=n[ne],n.hasOwnProperty(ne)&&k!==void 0&&!s.hasOwnProperty(ne)&&fu(t,e,ne,void 0,s,k);for(q in s)k=s[q],z=n[q],!s.hasOwnProperty(q)||k===z||k===void 0&&z===void 0||fu(t,e,q,k,s,z);return}}for(var N in n)k=n[N],n.hasOwnProperty(N)&&k!=null&&!s.hasOwnProperty(N)&&ee(t,e,N,null,s,k);for(Z in s)k=s[Z],z=n[Z],!s.hasOwnProperty(Z)||k===z||k==null&&z==null||ee(t,e,Z,k,s,z)}function cp(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function nb(){if(typeof performance.getEntriesByType=="function"){for(var t=0,e=0,n=performance.getEntriesByType("resource"),s=0;s<n.length;s++){var r=n[s],c=r.transferSize,m=r.initiatorType,y=r.duration;if(c&&y&&cp(m)){for(m=0,y=r.responseEnd,s+=1;s<n.length;s++){var T=n[s],D=T.startTime;if(D>y)break;var q=T.transferSize,Z=T.initiatorType;q&&cp(Z)&&(T=T.responseEnd,m+=q*(T<y?1:(y-D)/(T-D)))}if(--s,e+=8*(c+m)/(r.duration/1e3),t++,10<t)break}}if(0<t)return e/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var hu=null,mu=null;function Bo(t){return t.nodeType===9?t:t.ownerDocument}function up(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function dp(t,e){if(t===0)switch(e){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&e==="foreignObject"?0:t}function pu(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.children=="bigint"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var vu=null;function ab(){var t=window.event;return t&&t.type==="popstate"?t===vu?!1:(vu=t,!0):(vu=null,!1)}var fp=typeof setTimeout=="function"?setTimeout:void 0,sb=typeof clearTimeout=="function"?clearTimeout:void 0,hp=typeof Promise=="function"?Promise:void 0,ib=typeof queueMicrotask=="function"?queueMicrotask:typeof hp<"u"?function(t){return hp.resolve(null).then(t).catch(lb)}:fp;function lb(t){setTimeout(function(){throw t})}function Ua(t){return t==="head"}function mp(t,e){var n=e,s=0;do{var r=n.nextSibling;if(t.removeChild(n),r&&r.nodeType===8)if(n=r.data,n==="/$"||n==="/&"){if(s===0){t.removeChild(r),oi(e);return}s--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")s++;else if(n==="html")rl(t.ownerDocument.documentElement);else if(n==="head"){n=t.ownerDocument.head,rl(n);for(var c=n.firstChild;c;){var m=c.nextSibling,y=c.nodeName;c[qn]||y==="SCRIPT"||y==="STYLE"||y==="LINK"&&c.rel.toLowerCase()==="stylesheet"||n.removeChild(c),c=m}}else n==="body"&&rl(t.ownerDocument.body);n=r}while(n);oi(e)}function pp(t,e){var n=t;t=0;do{var s=n.nextSibling;if(n.nodeType===1?e?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(e?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(t===0)break;t--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||t++;n=s}while(n)}function gu(t){var e=t.firstChild;for(e&&e.nodeType===10&&(e=e.nextSibling);e;){var n=e;switch(e=e.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":gu(n),Ni(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}t.removeChild(n)}}function ob(t,e,n,s){for(;t.nodeType===1;){var r=n;if(t.nodeName.toLowerCase()!==e.toLowerCase()){if(!s&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(s){if(!t[qn])switch(e){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(c=t.getAttribute("rel"),c==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(c!==r.rel||t.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||t.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||t.getAttribute("title")!==(r.title==null?null:r.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(c=t.getAttribute("src"),(c!==(r.src==null?null:r.src)||t.getAttribute("type")!==(r.type==null?null:r.type)||t.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&c&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(e==="input"&&t.type==="hidden"){var c=r.name==null?null:""+r.name;if(r.type==="hidden"&&t.getAttribute("name")===c)return t}else return t;if(t=kn(t.nextSibling),t===null)break}return null}function rb(t,e,n){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!n||(t=kn(t.nextSibling),t===null))return null;return t}function vp(t,e){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!e||(t=kn(t.nextSibling),t===null))return null;return t}function yu(t){return t.data==="$?"||t.data==="$~"}function bu(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function cb(t,e){var n=t.ownerDocument;if(t.data==="$~")t._reactRetry=e;else if(t.data!=="$?"||n.readyState!=="loading")e();else{var s=function(){e(),n.removeEventListener("DOMContentLoaded",s)};n.addEventListener("DOMContentLoaded",s),t._reactRetry=s}}function kn(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?"||e==="$~"||e==="&"||e==="F!"||e==="F")break;if(e==="/$"||e==="/&")return null}}return t}var Su=null;function gp(t){t=t.nextSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"||n==="/&"){if(e===0)return kn(t.nextSibling);e--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||e++}t=t.nextSibling}return null}function yp(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(e===0)return t;e--}else n!=="/$"&&n!=="/&"||e++}t=t.previousSibling}return null}function bp(t,e,n){switch(e=Bo(n),t){case"html":if(t=e.documentElement,!t)throw Error(o(452));return t;case"head":if(t=e.head,!t)throw Error(o(453));return t;case"body":if(t=e.body,!t)throw Error(o(454));return t;default:throw Error(o(451))}}function rl(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);Ni(t)}var wn=new Map,Sp=new Set;function Uo(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var ma=Q.d;Q.d={f:ub,r:db,D:fb,C:hb,L:mb,m:pb,X:gb,S:vb,M:yb};function ub(){var t=ma.f(),e=Co();return t||e}function db(t){var e=Ns(t);e!==null&&e.tag===5&&e.type==="form"?Uh(e):ma.r(t)}var si=typeof document>"u"?null:document;function _p(t,e,n){var s=si;if(s&&typeof e=="string"&&e){var r=xn(e);r='link[rel="'+t+'"][href="'+r+'"]',typeof n=="string"&&(r+='[crossorigin="'+n+'"]'),Sp.has(r)||(Sp.add(r),t={rel:t,crossOrigin:n,href:e},s.querySelector(r)===null&&(e=s.createElement("link"),Xe(e,"link",t),Ve(e),s.head.appendChild(e)))}}function fb(t){ma.D(t),_p("dns-prefetch",t,null)}function hb(t,e){ma.C(t,e),_p("preconnect",t,e)}function mb(t,e,n){ma.L(t,e,n);var s=si;if(s&&t&&e){var r='link[rel="preload"][as="'+xn(e)+'"]';e==="image"&&n&&n.imageSrcSet?(r+='[imagesrcset="'+xn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(r+='[imagesizes="'+xn(n.imageSizes)+'"]')):r+='[href="'+xn(t)+'"]';var c=r;switch(e){case"style":c=ii(t);break;case"script":c=li(t)}wn.has(c)||(t=S({rel:"preload",href:e==="image"&&n&&n.imageSrcSet?void 0:t,as:e},n),wn.set(c,t),s.querySelector(r)!==null||e==="style"&&s.querySelector(cl(c))||e==="script"&&s.querySelector(ul(c))||(e=s.createElement("link"),Xe(e,"link",t),Ve(e),s.head.appendChild(e)))}}function pb(t,e){ma.m(t,e);var n=si;if(n&&t){var s=e&&typeof e.as=="string"?e.as:"script",r='link[rel="modulepreload"][as="'+xn(s)+'"][href="'+xn(t)+'"]',c=r;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=li(t)}if(!wn.has(c)&&(t=S({rel:"modulepreload",href:t},e),wn.set(c,t),n.querySelector(r)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(ul(c)))return}s=n.createElement("link"),Xe(s,"link",t),Ve(s),n.head.appendChild(s)}}}function vb(t,e,n){ma.S(t,e,n);var s=si;if(s&&t){var r=Es(s).hoistableStyles,c=ii(t);e=e||"default";var m=r.get(c);if(!m){var y={loading:0,preload:null};if(m=s.querySelector(cl(c)))y.loading=5;else{t=S({rel:"stylesheet",href:t,"data-precedence":e},n),(n=wn.get(c))&&_u(t,n);var T=m=s.createElement("link");Ve(T),Xe(T,"link",t),T._p=new Promise(function(D,q){T.onload=D,T.onerror=q}),T.addEventListener("load",function(){y.loading|=1}),T.addEventListener("error",function(){y.loading|=2}),y.loading|=4,Vo(m,e,s)}m={type:"stylesheet",instance:m,count:1,state:y},r.set(c,m)}}}function gb(t,e){ma.X(t,e);var n=si;if(n&&t){var s=Es(n).hoistableScripts,r=li(t),c=s.get(r);c||(c=n.querySelector(ul(r)),c||(t=S({src:t,async:!0},e),(e=wn.get(r))&&Tu(t,e),c=n.createElement("script"),Ve(c),Xe(c,"link",t),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},s.set(r,c))}}function yb(t,e){ma.M(t,e);var n=si;if(n&&t){var s=Es(n).hoistableScripts,r=li(t),c=s.get(r);c||(c=n.querySelector(ul(r)),c||(t=S({src:t,async:!0,type:"module"},e),(e=wn.get(r))&&Tu(t,e),c=n.createElement("script"),Ve(c),Xe(c,"link",t),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},s.set(r,c))}}function Tp(t,e,n,s){var r=(r=ye.current)?Uo(r):null;if(!r)throw Error(o(446));switch(t){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(e=ii(n.href),n=Es(r).hoistableStyles,s=n.get(e),s||(s={type:"style",instance:null,count:0,state:null},n.set(e,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){t=ii(n.href);var c=Es(r).hoistableStyles,m=c.get(t);if(m||(r=r.ownerDocument||r,m={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(t,m),(c=r.querySelector(cl(t)))&&!c._p&&(m.instance=c,m.state.loading=5),wn.has(t)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},wn.set(t,n),c||bb(r,t,n,m.state))),e&&s===null)throw Error(o(528,""));return m}if(e&&s!==null)throw Error(o(529,""));return null;case"script":return e=n.async,n=n.src,typeof n=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=li(n),n=Es(r).hoistableScripts,s=n.get(e),s||(s={type:"script",instance:null,count:0,state:null},n.set(e,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,t))}}function ii(t){return'href="'+xn(t)+'"'}function cl(t){return'link[rel="stylesheet"]['+t+"]"}function xp(t){return S({},t,{"data-precedence":t.precedence,precedence:null})}function bb(t,e,n,s){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?s.loading=1:(e=t.createElement("link"),s.preload=e,e.addEventListener("load",function(){return s.loading|=1}),e.addEventListener("error",function(){return s.loading|=2}),Xe(e,"link",n),Ve(e),t.head.appendChild(e))}function li(t){return'[src="'+xn(t)+'"]'}function ul(t){return"script[async]"+t}function jp(t,e,n){if(e.count++,e.instance===null)switch(e.type){case"style":var s=t.querySelector('style[data-href~="'+xn(n.href)+'"]');if(s)return e.instance=s,Ve(s),s;var r=S({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return s=(t.ownerDocument||t).createElement("style"),Ve(s),Xe(s,"style",r),Vo(s,n.precedence,t),e.instance=s;case"stylesheet":r=ii(n.href);var c=t.querySelector(cl(r));if(c)return e.state.loading|=4,e.instance=c,Ve(c),c;s=xp(n),(r=wn.get(r))&&_u(s,r),c=(t.ownerDocument||t).createElement("link"),Ve(c);var m=c;return m._p=new Promise(function(y,T){m.onload=y,m.onerror=T}),Xe(c,"link",s),e.state.loading|=4,Vo(c,n.precedence,t),e.instance=c;case"script":return c=li(n.src),(r=t.querySelector(ul(c)))?(e.instance=r,Ve(r),r):(s=n,(r=wn.get(c))&&(s=S({},n),Tu(s,r)),t=t.ownerDocument||t,r=t.createElement("script"),Ve(r),Xe(r,"link",s),t.head.appendChild(r),e.instance=r);case"void":return null;default:throw Error(o(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(s=e.instance,e.state.loading|=4,Vo(s,n.precedence,t));return e.instance}function Vo(t,e,n){for(var s=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=s.length?s[s.length-1]:null,c=r,m=0;m<s.length;m++){var y=s[m];if(y.dataset.precedence===e)c=y;else if(c!==r)break}c?c.parentNode.insertBefore(t,c.nextSibling):(e=n.nodeType===9?n.head:n,e.insertBefore(t,e.firstChild))}function _u(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function Tu(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var Lo=null;function Ap(t,e,n){if(Lo===null){var s=new Map,r=Lo=new Map;r.set(n,s)}else r=Lo,s=r.get(n),s||(s=new Map,r.set(n,s));if(s.has(t))return s;for(s.set(t,null),n=n.getElementsByTagName(t),r=0;r<n.length;r++){var c=n[r];if(!(c[qn]||c[Ee]||t==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var m=c.getAttribute(e)||"";m=t+m;var y=s.get(m);y?y.push(c):s.set(m,[c])}}return s}function Np(t,e,n){t=t.ownerDocument||t,t.head.insertBefore(n,e==="title"?t.querySelector("head > title"):null)}function Sb(t,e,n){if(n===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence=="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function Ep(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function _b(t,e,n,s){if(n.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var r=ii(s.href),c=e.querySelector(cl(r));if(c){e=c._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=qo.bind(t),e.then(t,t)),n.state.loading|=4,n.instance=c,Ve(c);return}c=e.ownerDocument||e,s=xp(s),(r=wn.get(r))&&_u(s,r),c=c.createElement("link"),Ve(c);var m=c;m._p=new Promise(function(y,T){m.onload=y,m.onerror=T}),Xe(c,"link",s),n.instance=c}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(n,e),(e=n.state.preload)&&(n.state.loading&3)===0&&(t.count++,n=qo.bind(t),e.addEventListener("load",n),e.addEventListener("error",n))}}var xu=0;function Tb(t,e){return t.stylesheets&&t.count===0&&Io(t,t.stylesheets),0<t.count||0<t.imgCount?function(n){var s=setTimeout(function(){if(t.stylesheets&&Io(t,t.stylesheets),t.unsuspend){var c=t.unsuspend;t.unsuspend=null,c()}},6e4+e);0<t.imgBytes&&xu===0&&(xu=62500*nb());var r=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Io(t,t.stylesheets),t.unsuspend)){var c=t.unsuspend;t.unsuspend=null,c()}},(t.imgBytes>xu?50:800)+e);return t.unsuspend=n,function(){t.unsuspend=null,clearTimeout(s),clearTimeout(r)}}:null}function qo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Io(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Ho=null;function Io(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Ho=new Map,e.forEach(xb,t),Ho=null,qo.call(t))}function xb(t,e){if(!(e.state.loading&4)){var n=Ho.get(t);if(n)var s=n.get(null);else{n=new Map,Ho.set(t,n);for(var r=t.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<r.length;c++){var m=r[c];(m.nodeName==="LINK"||m.getAttribute("media")!=="not all")&&(n.set(m.dataset.precedence,m),s=m)}s&&n.set(null,s)}r=e.instance,m=r.getAttribute("data-precedence"),c=n.get(m)||s,c===s&&n.set(null,r),n.set(m,r),this.count++,s=qo.bind(this),r.addEventListener("load",s),r.addEventListener("error",s),c?c.parentNode.insertBefore(r,c.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(r,t.firstChild)),e.state.loading|=4}}var dl={$$typeof:Y,Provider:null,Consumer:null,_currentValue:lt,_currentValue2:lt,_threadCount:0};function jb(t,e,n,s,r,c,m,y,T){this.tag=1,this.containerInfo=t,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=Ts(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ts(0),this.hiddenUpdates=Ts(null),this.identifierPrefix=s,this.onUncaughtError=r,this.onCaughtError=c,this.onRecoverableError=m,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=T,this.incompleteTransitions=new Map}function Cp(t,e,n,s,r,c,m,y,T,D,q,Z){return t=new jb(t,e,n,m,T,D,q,Z,y),e=1,c===!0&&(e|=24),c=mn(3,null,null,e),t.current=c,c.stateNode=t,e=nc(),e.refCount++,t.pooledCache=e,e.refCount++,c.memoizedState={element:s,isDehydrated:n,cache:e},lc(c),t}function Dp(t){return t?(t=Us,t):Us}function kp(t,e,n,s,r,c){r=Dp(r),s.context===null?s.context=r:s.pendingContext=r,s=Na(e),s.payload={element:n},c=c===void 0?null:c,c!==null&&(s.callback=c),n=Ea(t,s,e),n!==null&&(dn(n,t,e),Gi(n,t,e))}function wp(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function ju(t,e){wp(t,e),(t=t.alternate)&&wp(t,e)}function Mp(t){if(t.tag===13||t.tag===31){var e=es(t,67108864);e!==null&&dn(e,t,67108864),ju(t,67108864)}}function Rp(t){if(t.tag===13||t.tag===31){var e=bn();e=xs(e);var n=es(t,e);n!==null&&dn(n,t,e),ju(t,e)}}var Go=!0;function Ab(t,e,n,s){var r=B.T;B.T=null;var c=Q.p;try{Q.p=2,Au(t,e,n,s)}finally{Q.p=c,B.T=r}}function Nb(t,e,n,s){var r=B.T;B.T=null;var c=Q.p;try{Q.p=8,Au(t,e,n,s)}finally{Q.p=c,B.T=r}}function Au(t,e,n,s){if(Go){var r=Nu(s);if(r===null)du(t,e,s,Yo,n),zp(t,s);else if(Cb(r,t,e,n,s))s.stopPropagation();else if(zp(t,s),e&4&&-1<Eb.indexOf(t)){for(;r!==null;){var c=Ns(r);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var m=sn(c.pendingLanes);if(m!==0){var y=c;for(y.pendingLanes|=2,y.entangledLanes|=2;m;){var T=1<<31-J(m);y.entanglements[1]|=T,m&=~T}Yn(c),(Yt&6)===0&&(No=ht()+500,il(0))}}break;case 31:case 13:y=es(c,2),y!==null&&dn(y,c,2),Co(),ju(c,2)}if(c=Nu(s),c===null&&du(t,e,s,Yo,n),c===r)break;r=c}r!==null&&s.stopPropagation()}else du(t,e,s,null,n)}}function Nu(t){return t=Cr(t),Eu(t)}var Yo=null;function Eu(t){if(Yo=null,t=As(t),t!==null){var e=h(t);if(e===null)t=null;else{var n=e.tag;if(n===13){if(t=f(e),t!==null)return t;t=null}else if(n===31){if(t=p(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null)}}return Yo=t,null}function Op(t){switch(t){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(de()){case kt:return 2;case pe:return 8;case se:case Me:return 32;case H:return 268435456;default:return 32}default:return 32}}var Cu=!1,Va=null,La=null,qa=null,fl=new Map,hl=new Map,Ha=[],Eb="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 zp(t,e){switch(t){case"focusin":case"focusout":Va=null;break;case"dragenter":case"dragleave":La=null;break;case"mouseover":case"mouseout":qa=null;break;case"pointerover":case"pointerout":fl.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":hl.delete(e.pointerId)}}function ml(t,e,n,s,r,c){return t===null||t.nativeEvent!==c?(t={blockedOn:e,domEventName:n,eventSystemFlags:s,nativeEvent:c,targetContainers:[r]},e!==null&&(e=Ns(e),e!==null&&Mp(e)),t):(t.eventSystemFlags|=s,e=t.targetContainers,r!==null&&e.indexOf(r)===-1&&e.push(r),t)}function Cb(t,e,n,s,r){switch(e){case"focusin":return Va=ml(Va,t,e,n,s,r),!0;case"dragenter":return La=ml(La,t,e,n,s,r),!0;case"mouseover":return qa=ml(qa,t,e,n,s,r),!0;case"pointerover":var c=r.pointerId;return fl.set(c,ml(fl.get(c)||null,t,e,n,s,r)),!0;case"gotpointercapture":return c=r.pointerId,hl.set(c,ml(hl.get(c)||null,t,e,n,s,r)),!0}return!1}function Bp(t){var e=As(t.target);if(e!==null){var n=h(e);if(n!==null){if(e=n.tag,e===13){if(e=f(n),e!==null){t.blockedOn=e,Ai(t.priority,function(){Rp(n)});return}}else if(e===31){if(e=p(n),e!==null){t.blockedOn=e,Ai(t.priority,function(){Rp(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Zo(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=Nu(t.nativeEvent);if(n===null){n=t.nativeEvent;var s=new n.constructor(n.type,n);Er=s,n.target.dispatchEvent(s),Er=null}else return e=Ns(n),e!==null&&Mp(e),t.blockedOn=n,!1;e.shift()}return!0}function Up(t,e,n){Zo(t)&&n.delete(e)}function Db(){Cu=!1,Va!==null&&Zo(Va)&&(Va=null),La!==null&&Zo(La)&&(La=null),qa!==null&&Zo(qa)&&(qa=null),fl.forEach(Up),hl.forEach(Up)}function Ko(t,e){t.blockedOn===e&&(t.blockedOn=null,Cu||(Cu=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,Db)))}var Xo=null;function Vp(t){Xo!==t&&(Xo=t,a.unstable_scheduleCallback(a.unstable_NormalPriority,function(){Xo===t&&(Xo=null);for(var e=0;e<t.length;e+=3){var n=t[e],s=t[e+1],r=t[e+2];if(typeof s!="function"){if(Eu(s||n)===null)continue;break}var c=Ns(n);c!==null&&(t.splice(e,3),e-=3,Nc(c,{pending:!0,data:r,method:n.method,action:s},s,r))}}))}function oi(t){function e(T){return Ko(T,t)}Va!==null&&Ko(Va,t),La!==null&&Ko(La,t),qa!==null&&Ko(qa,t),fl.forEach(e),hl.forEach(e);for(var n=0;n<Ha.length;n++){var s=Ha[n];s.blockedOn===t&&(s.blockedOn=null)}for(;0<Ha.length&&(n=Ha[0],n.blockedOn===null);)Bp(n),n.blockedOn===null&&Ha.shift();if(n=(t.ownerDocument||t).$$reactFormReplay,n!=null)for(s=0;s<n.length;s+=3){var r=n[s],c=n[s+1],m=r[Ge]||null;if(typeof c=="function")m||Vp(n);else if(m){var y=null;if(c&&c.hasAttribute("formAction")){if(r=c,m=c[Ge]||null)y=m.formAction;else if(Eu(r)!==null)continue}else y=m.action;typeof y=="function"?n[s+1]=y:(n.splice(s,3),s-=3),Vp(n)}}}function Lp(){function t(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(m){return r=m})},focusReset:"manual",scroll:"manual"})}function e(){r!==null&&(r(),r=null),s||setTimeout(n,20)}function n(){if(!s&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,r=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",e),navigation.addEventListener("navigateerror",e),setTimeout(n,100),function(){s=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",e),navigation.removeEventListener("navigateerror",e),r!==null&&(r(),r=null)}}}function Du(t){this._internalRoot=t}Qo.prototype.render=Du.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(o(409));var n=e.current,s=bn();kp(n,s,t,e,null,null)},Qo.prototype.unmount=Du.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;kp(t.current,2,null,t,null,null),Co(),e[ct]=null}};function Qo(t){this._internalRoot=t}Qo.prototype.unstable_scheduleHydration=function(t){if(t){var e=ji();t={blockedOn:null,target:t,priority:e};for(var n=0;n<Ha.length&&e!==0&&e<Ha[n].priority;n++);Ha.splice(n,0,t),n===0&&Bp(t)}};var qp=i.version;if(qp!=="19.2.4")throw Error(o(527,qp,"19.2.4"));Q.findDOMNode=function(t){var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(o(188)):(t=Object.keys(t).join(","),Error(o(268,t)));return t=g(e),t=t!==null?b(t):null,t=t===null?null:t.stateNode,t};var kb={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Po=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Po.isDisabled&&Po.supportsFiber)try{Ie=Po.inject(kb),Re=Po}catch{}}return pl.createRoot=function(t,e){if(!u(t))throw Error(o(299));var n=!1,s="",r=Xh,c=Qh,m=Ph;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(s=e.identifierPrefix),e.onUncaughtError!==void 0&&(r=e.onUncaughtError),e.onCaughtError!==void 0&&(c=e.onCaughtError),e.onRecoverableError!==void 0&&(m=e.onRecoverableError)),e=Cp(t,1,!1,null,null,n,s,null,r,c,m,Lp),t[ct]=e.current,uu(t),new Du(e)},pl.hydrateRoot=function(t,e,n){if(!u(t))throw Error(o(299));var s=!1,r="",c=Xh,m=Qh,y=Ph,T=null;return n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(r=n.identifierPrefix),n.onUncaughtError!==void 0&&(c=n.onUncaughtError),n.onCaughtError!==void 0&&(m=n.onCaughtError),n.onRecoverableError!==void 0&&(y=n.onRecoverableError),n.formState!==void 0&&(T=n.formState)),e=Cp(t,1,!0,e,n??null,s,r,T,c,m,y,Lp),e.context=Dp(null),n=e.current,s=bn(),s=xs(s),r=Na(s),r.callback=null,Ea(n,r,s),n=s,e.current.lanes=n,ba(e,n),Yn(e),t[ct]=e.current,uu(t),new Qo(e)},pl.version="19.2.4",pl}var Xp;function Kb(){if(Xp)return ku.exports;Xp=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(i){console.error(i)}}return a(),ku.exports=Zb(),ku.exports}var Xb=Kb();function tn(a){return typeof a=="object"&&a!==null&&!Array.isArray(a)}function Tl(a,i){return console.warn(`[ws] Malformed "${a}" message: ${i}`),!1}function Qb(a){return tn(a)&&typeof a.id=="string"&&typeof a.displayName=="string"&&typeof a.adapterType=="string"&&typeof a.defaultRuntime=="string"&&typeof a.status=="string"&&typeof a.bootstrapped=="boolean"}function Qp(a){return tn(a)&&typeof a.id=="string"&&typeof a.environmentId=="string"&&typeof a.runtime=="string"&&typeof a.status=="string"&&typeof a.prompt=="string"&&typeof a.startedAt=="string"&&(a.endedAt===void 0||typeof a.endedAt=="string")&&(a.error===void 0||typeof a.error=="string")}function Pp(a){return tn(a)&&typeof a.sessionId=="string"&&typeof a.eventType=="string"&&typeof a.timestamp=="string"&&typeof a.content=="string"&&(a.raw===void 0||typeof a.raw=="string")}function Pb(a){return tn(a)&&typeof a.id=="string"&&typeof a.name=="string"&&typeof a.description=="string"&&typeof a.repoUrl=="string"&&typeof a.defaultEnvironmentId=="string"&&typeof a.status=="string"&&typeof a.createdAt=="string"&&typeof a.updatedAt=="string"}function Fb(a){return tn(a)&&typeof a.id=="string"&&typeof a.projectId=="string"&&typeof a.title=="string"&&typeof a.status=="string"&&typeof a.branch=="string"&&typeof a.sortOrder=="number"&&typeof a.depth=="number"&&Array.isArray(a.dependsOn)&&Array.isArray(a.childTaskIds)}function Jb(a){return tn(a)&&typeof a.id=="string"&&typeof a.projectId=="string"&&typeof a.taskId=="string"&&typeof a.sessionId=="string"&&typeof a.category=="string"&&typeof a.title=="string"&&typeof a.content=="string"&&Array.isArray(a.tags)&&typeof a.createdAt=="string"}function $b(a){return tn(a)&&typeof a.name=="string"&&typeof a.tokenType=="string"&&typeof a.envVar=="string"&&typeof a.filePath=="string"&&typeof a.expiresAt=="string"}function Wb(a){return tn(a)&&typeof a.environmentId=="string"&&typeof a.stage=="string"&&typeof a.message=="string"&&typeof a.progress=="number"}function tS(a){return tn(a)&&typeof a.name=="string"&&typeof a.repository=="string"&&typeof a.state=="string"&&typeof a.gitStatus=="string"}function eS(a){return tn(a)&&typeof a.id=="string"&&typeof a.name=="string"&&typeof a.description=="string"&&typeof a.systemPrompt=="string"&&typeof a.toolConfig=="string"&&typeof a.runtime=="string"&&typeof a.model=="string"&&typeof a.maxTurns=="number"&&typeof a.mcpServers=="string"&&typeof a.createdAt=="string"&&typeof a.updatedAt=="string"}function Zn(a,i,l,o){return Array.isArray(a)?a.filter((u,h)=>i(u)?!0:(Tl(l,`item at index ${h} in "${o}" has unexpected shape`),!1)):(Tl(l,`expected "${o}" to be an array, got ${typeof a}`),[])}function nS(a){let i;try{i=JSON.parse(a)}catch{console.warn("[ws] Failed to parse WebSocket message as JSON");return}if(!tn(i)||typeof i.type!="string"){console.warn("[ws] Received WebSocket message without a string 'type' field:",i);return}return{type:i.type,payload:tn(i.payload)?i.payload:void 0}}const aS=3e3,ri=5e3;function sS(a){const i=typeof window<"u"&&window.__GRACKLE_API_KEY__||"",l=typeof window<"u"?`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}?token=${encodeURIComponent(i)}`:"ws://localhost:3000",o=_.useRef(void 0),[u,h]=_.useState(!1),[f,p]=_.useState([]),[v,g]=_.useState([]),[b,S]=_.useState([]),[x,E]=_.useState(0),[M,R]=_.useState(void 0),[K,O]=_.useState([]),[P,Y]=_.useState([]),[et,X]=_.useState([]),[L,tt]=_.useState([]),[U,nt]=_.useState({}),[at,mt]=_.useState([]),[Dt,$]=_.useState(""),[st,_t]=_.useState(!1),[B,Q]=_.useState([]),[lt,Ct]=_.useState({}),[vt,Pt]=_.useState(!1),[bt,St]=_.useState(void 0),G=_.useCallback(J=>{var Tt;((Tt=o.current)==null?void 0:Tt.readyState)===WebSocket.OPEN&&o.current.send(JSON.stringify(J))},[]);_.useEffect(()=>{let J,Tt;function le(){J=new WebSocket(l),o.current=J,J.onopen=()=>{h(!0),G({type:"list_environments"}),G({type:"list_sessions"}),G({type:"list_projects"}),G({type:"list_tokens"}),G({type:"list_personas"}),G({type:"subscribe_all"})},J.onmessage=Xt=>{var Oe,Je,sn,it,fe,fn,ya,Ts,ba,Bl,_i,Ti,xi,xs,js,ji,Ai,zn,Ee,Ge;if(typeof Xt.data!="string"){console.warn("[ws] Received non-string WebSocket message; ignoring");return}const ft=nS(Xt.data);if(ft)switch(ft.type){case"environments":p(Zn((Oe=ft.payload)==null?void 0:Oe.environments,Qb,"environments","environments"));break;case"sessions":g(Zn((Je=ft.payload)==null?void 0:Je.sessions,Qp,"sessions","sessions"));break;case"session_event":{if(!Pp(ft.payload)){Tl("session_event","payload is not a valid SessionEvent");break}const ct=ft.payload;let Ut=0;S(Gt=>{const oe=[...Gt,ct];return oe.length>ri?(Ut=oe.length-ri,oe.slice(-ri)):oe}),Ut>0&&E(Gt=>Gt+Ut),ct.eventType==="status"&&g(Gt=>Gt.map(oe=>oe.id===ct.sessionId?{...oe,status:ct.content}:oe));break}case"session_events":{const ct=Zn((sn=ft.payload)==null?void 0:sn.events,Pp,"session_events","events"),Ut=(it=ft.payload)==null?void 0:it.sessionId;if(typeof Ut!="string"){Tl("session_events","missing or non-string sessionId");break}if(ct.length>0){let Gt=0;S(oe=>{const qn=[...oe.filter(Ni=>Ni.sessionId!==Ut),...ct];return qn.length>ri?(Gt=qn.length-ri,qn.slice(-ri)):qn}),Gt>0&&E(oe=>oe+Gt)}break}case"spawned":{const ct=(fe=ft.payload)==null?void 0:fe.sessionId;typeof ct=="string"&&ct&&R(ct),G({type:"list_sessions"});break}case"projects":O(Zn((fn=ft.payload)==null?void 0:fn.projects,Pb,"projects","projects"));break;case"project_created":Pt(!1),G({type:"list_projects"});break;case"project_archived":G({type:"list_projects"});break;case"project_updated":G({type:"list_projects"});break;case"tasks":{const ct=Zn((ya=ft.payload)==null?void 0:ya.tasks,Fb,"tasks","tasks"),Ut=(typeof((Ts=ft.payload)==null?void 0:Ts.projectId)=="string"?ft.payload.projectId:"")||(ct.length>0?ct[0].projectId:"");if(!Ut){Y(ct);break}Y(Gt=>[...Gt.filter(oe=>oe.projectId!==Ut),...ct]);break}case"task_created":{const ct=(ba=ft.payload)==null?void 0:ba.task;if(tn(ct)){const Ut=typeof ct.project_id=="string"?ct.project_id:typeof ct.projectId=="string"?ct.projectId:"";Ut&&G({type:"list_tasks",payload:{projectId:Ut}})}break}case"task_started":{const ct=ft.payload;if(!tn(ct))break;St(Gt=>ct.taskId&&Gt===ct.taskId?void 0:Gt),ct.sessionId&&G({type:"list_sessions"});const Ut=typeof ct.projectId=="string"?ct.projectId:void 0;Ut?G({type:"list_tasks",payload:{projectId:Ut}}):ct.taskId&&Y(Gt=>{const oe=Gt.find(Fa=>Fa.id===ct.taskId);return oe&&G({type:"list_tasks",payload:{projectId:oe.projectId}}),Gt});break}case"task_approved":case"task_rejected":case"task_deleted":case"task_updated":{const ct=ft.payload;if(!tn(ct))break;const Ut=typeof ct.projectId=="string"?ct.projectId:void 0;Ut?G({type:"list_tasks",payload:{projectId:Ut}}):ct.taskId&&Y(Gt=>{const oe=Gt.find(Fa=>Fa.id===ct.taskId);return oe&&G({type:"list_tasks",payload:{projectId:oe.projectId}}),Gt});break}case"findings":X(Zn((Bl=ft.payload)==null?void 0:Bl.findings,Jb,"findings","findings"));break;case"finding_posted":typeof((_i=ft.payload)==null?void 0:_i.projectId)=="string"&&G({type:"list_findings",payload:{projectId:ft.payload.projectId}});break;case"tokens":tt(Zn((Ti=ft.payload)==null?void 0:Ti.tokens,$b,"tokens","tokens"));break;case"token_changed":G({type:"list_tokens"});break;case"provision_progress":{if(!Wb(ft.payload)){Tl("provision_progress","payload is not a valid ProvisionStatus with environmentId");break}const ct=ft.payload;nt(Ut=>({...Ut,[ct.environmentId]:{stage:ct.stage,message:ct.message,progress:ct.progress}})),ct.stage==="ready"&&setTimeout(()=>{nt(Gt=>{const oe={...Gt};return delete oe[ct.environmentId],oe})},5e3);break}case"environment_added":break;case"environment_removed":if(typeof((xi=ft.payload)==null?void 0:xi.environmentId)=="string"){const ct=ft.payload.environmentId;p(Ut=>Ut.filter(Gt=>Gt.id!==ct)),nt(Ut=>{const Gt={...Ut};return delete Gt[ct],Gt})}G({type:"list_sessions"});break;case"codespaces_list":{const ct=Zn((xs=ft.payload)==null?void 0:xs.codespaces,tS,"codespaces_list","codespaces"),Ut=typeof((js=ft.payload)==null?void 0:js.error)=="string"?ft.payload.error:"";mt(ct),$(Ut);break}case"codespace_created":{_t(!1),G({type:"list_codespaces"});break}case"codespace_create_error":{_t(!1);const ct=typeof((ji=ft.payload)==null?void 0:ji.message)=="string"?ft.payload.message:"Failed to create codespace";$(ct);break}case"personas":{const ct=Zn((Ai=ft.payload)==null?void 0:Ai.personas,eS,"personas","personas");Q(ct);break}case"persona_created":case"persona_updated":case"persona_deleted":G({type:"list_personas"});break;case"task_sessions":{const ct=(zn=ft.payload)==null?void 0:zn.taskId;if(typeof ct!="string"||!ct)break;const Ut=Zn((Ee=ft.payload)==null?void 0:Ee.sessions,Qp,"task_sessions","sessions");Ct(Gt=>({...Gt,[ct]:Ut}));break}case"error":console.error("[ws]",(Ge=ft.payload)==null?void 0:Ge.message);break}},J.onclose=()=>{h(!1),o.current=void 0,Pt(!1),St(void 0),clearTimeout(Tt),Tt=setTimeout(le,aS)},J.onerror=()=>{J.close()}}return le(),()=>{clearTimeout(Tt),J==null||J.close()}},[l,G]);const ae=_.useCallback((J,Tt,le,Xt,ft)=>{G({type:"spawn",payload:{environmentId:J,prompt:Tt,model:le||"",runtime:Xt||"",personaId:ft||""}})},[G]),ye=_.useCallback((J,Tt)=>{G({type:"send_input",payload:{sessionId:J,text:Tt}})},[G]),en=_.useCallback(J=>{G({type:"kill",payload:{sessionId:J}})},[G]),He=_.useCallback(()=>{G({type:"list_environments"}),G({type:"list_sessions"}),G({type:"list_projects"}),G({type:"list_tokens"})},[G]),Wt=_.useCallback(J=>{G({type:"get_session_events",payload:{sessionId:J}})},[G]),nn=_.useCallback(()=>{S([]),E(0)},[]),Ue=_.useCallback((J,Tt,le,Xt)=>{Pt(!0),G({type:"create_project",payload:{name:J,description:Tt||"",repoUrl:le||"",defaultEnvironmentId:Xt||""}})},[G]),It=_.useCallback(J=>{G({type:"archive_project",payload:{projectId:J}})},[G]),Kt=_.useCallback((J,Tt)=>{G({type:"update_project",payload:{projectId:J,...Tt}})},[G]),me=_.useCallback(J=>{G({type:"list_tasks",payload:{projectId:J}})},[G]),F=_.useCallback((J,Tt,le,Xt,ft,Oe,Je)=>{G({type:"create_task",payload:{projectId:J,title:Tt,description:le||"",environmentId:Xt||"",dependsOn:ft||[],parentTaskId:Oe||"",personaId:Je||""}})},[G]),Rt=_.useCallback((J,Tt,le,Xt)=>{St(J),G({type:"start_task",payload:{taskId:J,runtime:Tt||"",model:le||"",personaId:Xt||""}})},[G]),xt=_.useCallback(J=>{G({type:"approve_task",payload:{taskId:J}})},[G]),w=_.useCallback((J,Tt)=>{G({type:"reject_task",payload:{taskId:J,reviewNotes:Tt}})},[G]),V=_.useCallback((J,Tt,le,Xt,ft,Oe)=>{G({type:"update_task",payload:{taskId:J,title:Tt,description:le,dependsOn:Xt,environmentId:ft,personaId:Oe}})},[G]),W=_.useCallback(J=>{G({type:"delete_task",payload:{taskId:J}})},[G]),ot=_.useCallback(J=>{G({type:"list_findings",payload:{projectId:J}})},[G]),jt=_.useCallback((J,Tt,le,Xt,ft)=>{G({type:"post_finding",payload:{projectId:J,title:Tt,content:le,category:Xt||"general",tags:ft||[]}})},[G]),At=_.useCallback(()=>{G({type:"list_tokens"})},[G]),ht=_.useCallback((J,Tt,le,Xt,ft)=>{G({type:"set_token",payload:{name:J,value:Tt,tokenType:le,envVar:Xt,filePath:ft}})},[G]),de=_.useCallback(J=>{G({type:"delete_token",payload:{name:J}})},[G]),kt=_.useCallback((J,Tt,le,Xt)=>{const ft={displayName:J,adapterType:Tt,adapterConfig:le||{}};Xt&&(ft.defaultRuntime=Xt),G({type:"add_environment",payload:ft})},[G]),pe=_.useCallback(J=>{G({type:"provision_environment",payload:{environmentId:J}})},[G]),se=_.useCallback(J=>{G({type:"stop_environment",payload:{environmentId:J}})},[G]),Me=_.useCallback(J=>{G({type:"remove_environment",payload:{environmentId:J}})},[G]),H=_.useCallback(()=>{G({type:"list_codespaces"})},[G]),Vt=_.useCallback(J=>{if(!u){$("Not connected to server. Please try again once the connection is restored.");return}_t(!0),$(""),G({type:"create_codespace",payload:{repo:J}})},[G,u]),Fn=_.useCallback((J,Tt,le,Xt,ft,Oe)=>{G({type:"create_persona",payload:{name:J,description:Tt,systemPrompt:le,runtime:Xt||"",model:ft||"",maxTurns:Oe||0}})},[G]),Ie=_.useCallback((J,Tt,le,Xt,ft,Oe,Je)=>{G({type:"update_persona",payload:{personaId:J,name:Tt||"",description:le||"",systemPrompt:Xt||"",runtime:ft||"",model:Oe||"",maxTurns:Je||0}})},[G]),Re=_.useCallback(J=>{G({type:"delete_persona",payload:{personaId:J}})},[G]),an=_.useCallback(J=>{G({type:"get_task_sessions",payload:{taskId:J}})},[G]);return{connected:u,environments:f,sessions:v,events:b,eventsDropped:x,lastSpawnedId:M,projects:K,tasks:P,findings:et,tokens:L,spawn:ae,sendInput:ye,kill:en,refresh:He,loadSessionEvents:Wt,clearEvents:nn,createProject:Ue,archiveProject:It,updateProject:Kt,loadTasks:me,createTask:F,startTask:Rt,approveTask:xt,rejectTask:w,updateTask:V,deleteTask:W,loadFindings:ot,postFinding:jt,addEnvironment:kt,loadTokens:At,setToken:ht,deleteToken:de,provisionStatus:U,provisionEnvironment:pe,stopEnvironment:se,removeEnvironment:Me,codespaces:at,codespaceError:Dt,codespaceCreating:st,listCodespaces:H,createCodespace:Vt,projectCreating:vt,taskStartingId:bt,personas:B,createPersona:Fn,updatePersona:Ie,deletePersona:Re,taskSessions:lt,loadTaskSessions:an}}const md=_.createContext(void 0);function iS({children:a}){const i=sS();return d.jsx(md.Provider,{value:i,children:a})}function On(){const a=_.useContext(md);if(!a)throw new Error("useGrackle must be used within GrackleProvider");return a}const lS=[{id:"env-local-01",displayName:"Local Dev",adapterType:"local",defaultRuntime:"claude-code",status:"connected",bootstrapped:!0},{id:"env-docker-01",displayName:"Docker Sandbox",adapterType:"docker",defaultRuntime:"claude-code",status:"connected",bootstrapped:!0},{id:"env-cs-01",displayName:"GitHub Codespace",adapterType:"codespace",defaultRuntime:"claude-code",status:"connected",bootstrapped:!0},{id:"env-remote-01",displayName:"Staging (SSH)",adapterType:"ssh",defaultRuntime:"claude-code",status:"disconnected",bootstrapped:!1}],oS=[{id:"sess-001-prev",environmentId:"env-local-01",runtime:"claude-code",status:"failed",prompt:"Implement auth middleware",startedAt:"2026-02-26T14:00:00Z",endedAt:"2026-02-26T15:12:00Z",error:"Context window exceeded before completing implementation"},{id:"sess-001",environmentId:"env-local-01",runtime:"node",status:"running",prompt:"Refactor the authentication middleware to use JWT tokens",startedAt:"2026-02-27T08:15:00Z"},{id:"sess-002",environmentId:"env-docker-01",runtime:"python",status:"completed",prompt:"Write unit tests for the user registration endpoint",startedAt:"2026-02-27T07:30:00Z"},{id:"sess-003",environmentId:"env-local-01",runtime:"node",status:"failed",prompt:"Migrate database schema to add audit_log table",startedAt:"2026-02-26T22:45:00Z"},{id:"sess-004",environmentId:"env-docker-01",runtime:"python",status:"running",prompt:"Implement rate limiting for the public API",startedAt:"2026-02-27T09:00:00Z"}],rS=[{sessionId:"sess-001-prev",eventType:"status",timestamp:"2026-02-26T14:00:01Z",content:"running"},{sessionId:"sess-001-prev",eventType:"output",timestamp:"2026-02-26T14:00:05Z",content:"Reading src/middleware/auth.ts to understand the current authentication flow..."},{sessionId:"sess-001-prev",eventType:"error",timestamp:"2026-02-26T15:12:00Z",content:"Context window exceeded before completing implementation"},{sessionId:"sess-001",eventType:"status",timestamp:"2026-02-27T08:15:01Z",content:"running"},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:02Z",content:"Analyzing current authentication middleware in src/middleware/auth.ts..."},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:04Z",content:`Found 3 files using session-based auth:
24
+ `+s.stack}}var V=Object.prototype.hasOwnProperty,W=a.unstable_scheduleCallback,ot=a.unstable_cancelCallback,jt=a.unstable_shouldYield,At=a.unstable_requestPaint,ht=a.unstable_now,de=a.unstable_getCurrentPriorityLevel,kt=a.unstable_ImmediatePriority,pe=a.unstable_UserBlockingPriority,se=a.unstable_NormalPriority,Me=a.unstable_LowPriority,H=a.unstable_IdlePriority,Vt=a.log,Fn=a.unstable_setDisableYieldValue,Ie=null,Re=null;function an(t){if(typeof Vt=="function"&&Fn(t),Re&&typeof Re.setStrictMode=="function")try{Re.setStrictMode(Ie,t)}catch{}}var J=Math.clz32?Math.clz32:Xt,Tt=Math.log,le=Math.LN2;function Xt(t){return t>>>=0,t===0?32:31-(Tt(t)/le|0)|0}var ft=256,Oe=262144,Je=4194304;function sn(t){var e=t&42;if(e!==0)return e;switch(t&-t){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 t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function it(t,e,n){var s=t.pendingLanes;if(s===0)return 0;var r=0,c=t.suspendedLanes,m=t.pingedLanes;t=t.warmLanes;var y=s&134217727;return y!==0?(s=y&~c,s!==0?r=sn(s):(m&=y,m!==0?r=sn(m):n||(n=y&~t,n!==0&&(r=sn(n))))):(y=s&~c,y!==0?r=sn(y):m!==0?r=sn(m):n||(n=s&~t,n!==0&&(r=sn(n)))),r===0?0:e!==0&&e!==r&&(e&c)===0&&(c=r&-r,n=e&-e,c>=n||c===32&&(n&4194048)!==0)?e:r}function fe(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function fn(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+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 e+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 ya(){var t=Je;return Je<<=1,(Je&62914560)===0&&(Je=4194304),t}function Ts(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function ba(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Bl(t,e,n,s,r,c){var m=t.pendingLanes;t.pendingLanes=n,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=n,t.entangledLanes&=n,t.errorRecoveryDisabledLanes&=n,t.shellSuspendCounter=0;var y=t.entanglements,T=t.expirationTimes,D=t.hiddenUpdates;for(n=m&~n;0<n;){var q=31-J(n),Z=1<<q;y[q]=0,T[q]=-1;var k=D[q];if(k!==null)for(D[q]=null,q=0;q<k.length;q++){var z=k[q];z!==null&&(z.lane&=-536870913)}n&=~Z}s!==0&&Si(t,s,0),c!==0&&r===0&&t.tag!==0&&(t.suspendedLanes|=c&~(m&~e))}function Si(t,e,n){t.pendingLanes|=e,t.suspendedLanes&=~e;var s=31-J(e);t.entangledLanes|=e,t.entanglements[s]=t.entanglements[s]|1073741824|n&261930}function Ti(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var s=31-J(n),r=1<<s;r&e|t[s]&e&&(t[s]|=e),n&=~r}}function xi(t,e){var n=e&-e;return n=(n&42)!==0?1:xs(n),(n&(t.suspendedLanes|e))!==0?0:n}function xs(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function js(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function ji(){var t=Q.p;return t!==0?t:(t=window.event,t===void 0?32:Op(t.type))}function Ai(t,e){var n=Q.p;try{return Q.p=t,e()}finally{Q.p=n}}var zn=Math.random().toString(36).slice(2),Ee="__reactFiber$"+zn,Ge="__reactProps$"+zn,ct="__reactContainer$"+zn,Ut="__reactEvents$"+zn,Gt="__reactListeners$"+zn,oe="__reactHandles$"+zn,Fa="__reactResources$"+zn,qn="__reactMarker$"+zn;function Ni(t){delete t[Ee],delete t[Ge],delete t[Ut],delete t[Gt],delete t[oe]}function As(t){var e=t[Ee];if(e)return e;for(var n=t.parentNode;n;){if(e=n[ct]||n[Ee]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=yp(t);t!==null;){if(n=t[Ee])return n;t=yp(t)}return e}t=n,n=t.parentNode}return null}function Ns(t){if(t=t[Ee]||t[ct]){var e=t.tag;if(e===5||e===6||e===13||e===31||e===26||e===27||e===3)return t}return null}function Ei(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t.stateNode;throw Error(o(33))}function Es(t){var e=t[Fa];return e||(e=t[Fa]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function Ve(t){t[qn]=!0}var Jd=new Set,$d={};function Ja(t,e){Cs(t,e),Cs(t+"Capture",e)}function Cs(t,e){for($d[t]=e,t=0;t<e.length;t++)Jd.add(e[t])}var xy=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]*$"),Wd={},tf={};function jy(t){return V.call(tf,t)?!0:V.call(Wd,t)?!1:xy.test(t)?tf[t]=!0:(Wd[t]=!0,!1)}function Ul(t,e,n){if(jy(e))if(n===null)t.removeAttribute(e);else{switch(typeof n){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var s=e.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,""+n)}}function Vl(t,e,n){if(n===null)t.removeAttribute(e);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,""+n)}}function Jn(t,e,n,s){if(s===null)t.removeAttribute(n);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttributeNS(e,n,""+s)}}function Tn(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function ef(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Ay(t,e,n){var s=Object.getOwnPropertyDescriptor(t.constructor.prototype,e);if(!t.hasOwnProperty(e)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var r=s.get,c=s.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return r.call(this)},set:function(m){n=""+m,c.call(this,m)}}),Object.defineProperty(t,e,{enumerable:s.enumerable}),{getValue:function(){return n},setValue:function(m){n=""+m},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function xr(t){if(!t._valueTracker){var e=ef(t)?"checked":"value";t._valueTracker=Ay(t,e,""+t[e])}}function nf(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),s="";return t&&(s=ef(t)?t.checked?"true":"false":t.value),t=s,t!==n?(e.setValue(t),!0):!1}function Ll(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var Ny=/[\n"\\]/g;function xn(t){return t.replace(Ny,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function jr(t,e,n,s,r,c,m,y){t.name="",m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?t.type=m:t.removeAttribute("type"),e!=null?m==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+Tn(e)):t.value!==""+Tn(e)&&(t.value=""+Tn(e)):m!=="submit"&&m!=="reset"||t.removeAttribute("value"),e!=null?Ar(t,m,Tn(e)):n!=null?Ar(t,m,Tn(n)):s!=null&&t.removeAttribute("value"),r==null&&c!=null&&(t.defaultChecked=!!c),r!=null&&(t.checked=r&&typeof r!="function"&&typeof r!="symbol"),y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?t.name=""+Tn(y):t.removeAttribute("name")}function af(t,e,n,s,r,c,m,y){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(t.type=c),e!=null||n!=null){if(!(c!=="submit"&&c!=="reset"||e!=null)){xr(t);return}n=n!=null?""+Tn(n):"",e=e!=null?""+Tn(e):n,y||e===t.value||(t.value=e),t.defaultValue=e}s=s??r,s=typeof s!="function"&&typeof s!="symbol"&&!!s,t.checked=y?t.checked:!!s,t.defaultChecked=!!s,m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(t.name=m),xr(t)}function Ar(t,e,n){e==="number"&&Ll(t.ownerDocument)===t||t.defaultValue===""+n||(t.defaultValue=""+n)}function Ds(t,e,n,s){if(t=t.options,e){e={};for(var r=0;r<n.length;r++)e["$"+n[r]]=!0;for(n=0;n<t.length;n++)r=e.hasOwnProperty("$"+t[n].value),t[n].selected!==r&&(t[n].selected=r),r&&s&&(t[n].defaultSelected=!0)}else{for(n=""+Tn(n),e=null,r=0;r<t.length;r++){if(t[r].value===n){t[r].selected=!0,s&&(t[r].defaultSelected=!0);return}e!==null||t[r].disabled||(e=t[r])}e!==null&&(e.selected=!0)}}function sf(t,e,n){if(e!=null&&(e=""+Tn(e),e!==t.value&&(t.value=e),n==null)){t.defaultValue!==e&&(t.defaultValue=e);return}t.defaultValue=n!=null?""+Tn(n):""}function lf(t,e,n,s){if(e==null){if(s!=null){if(n!=null)throw Error(o(92));if(St(s)){if(1<s.length)throw Error(o(93));s=s[0]}n=s}n==null&&(n=""),e=n}n=Tn(e),t.defaultValue=n,s=t.textContent,s===n&&s!==""&&s!==null&&(t.value=s),xr(t)}function ks(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Ey=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 of(t,e,n){var s=e.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?s?t.setProperty(e,""):e==="float"?t.cssFloat="":t[e]="":s?t.setProperty(e,n):typeof n!="number"||n===0||Ey.has(e)?e==="float"?t.cssFloat=n:t[e]=(""+n).trim():t[e]=n+"px"}function rf(t,e,n){if(e!=null&&typeof e!="object")throw Error(o(62));if(t=t.style,n!=null){for(var s in n)!n.hasOwnProperty(s)||e!=null&&e.hasOwnProperty(s)||(s.indexOf("--")===0?t.setProperty(s,""):s==="float"?t.cssFloat="":t[s]="");for(var r in e)s=e[r],e.hasOwnProperty(r)&&n[r]!==s&&of(t,r,s)}else for(var c in e)e.hasOwnProperty(c)&&of(t,c,e[c])}function Nr(t){if(t.indexOf("-")===-1)return!1;switch(t){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 Cy=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"]]),Dy=/^[\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 ql(t){return Dy.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function $n(){}var Er=null;function Cr(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var ws=null,Ms=null;function cf(t){var e=Ns(t);if(e&&(t=e.stateNode)){var n=t[Ge]||null;t:switch(t=e.stateNode,e.type){case"input":if(jr(t,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+xn(""+e)+'"][type="radio"]'),e=0;e<n.length;e++){var s=n[e];if(s!==t&&s.form===t.form){var r=s[Ge]||null;if(!r)throw Error(o(90));jr(s,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(e=0;e<n.length;e++)s=n[e],s.form===t.form&&nf(s)}break t;case"textarea":sf(t,n.value,n.defaultValue);break t;case"select":e=n.value,e!=null&&Ds(t,!!n.multiple,e,!1)}}}var Dr=!1;function uf(t,e,n){if(Dr)return t(e,n);Dr=!0;try{var s=t(e);return s}finally{if(Dr=!1,(ws!==null||Ms!==null)&&(Co(),ws&&(e=ws,t=Ms,Ms=ws=null,cf(e),t)))for(e=0;e<t.length;e++)cf(t[e])}}function Ci(t,e){var n=t.stateNode;if(n===null)return null;var s=n[Ge]||null;if(s===null)return null;n=s[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(t=t.type,s=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!s;break t;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(o(231,e,typeof n));return n}var Wn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),kr=!1;if(Wn)try{var Di={};Object.defineProperty(Di,"passive",{get:function(){kr=!0}}),window.addEventListener("test",Di,Di),window.removeEventListener("test",Di,Di)}catch{kr=!1}var _a=null,wr=null,Hl=null;function df(){if(Hl)return Hl;var t,e=wr,n=e.length,s,r="value"in _a?_a.value:_a.textContent,c=r.length;for(t=0;t<n&&e[t]===r[t];t++);var m=n-t;for(s=1;s<=m&&e[n-s]===r[c-s];s++);return Hl=r.slice(t,1<s?1-s:void 0)}function Il(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Gl(){return!0}function ff(){return!1}function ln(t){function e(n,s,r,c,m){this._reactName=n,this._targetInst=r,this.type=s,this.nativeEvent=c,this.target=m,this.currentTarget=null;for(var y in t)t.hasOwnProperty(y)&&(n=t[y],this[y]=n?n(c):c[y]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?Gl:ff,this.isPropagationStopped=ff,this}return _(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Gl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Gl)},persist:function(){},isPersistent:Gl}),e}var $a={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Yl=ln($a),ki=_({},$a,{view:0,detail:0}),ky=ln(ki),Mr,Rr,wi,Zl=_({},ki,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zr,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==wi&&(wi&&t.type==="mousemove"?(Mr=t.screenX-wi.screenX,Rr=t.screenY-wi.screenY):Rr=Mr=0,wi=t),Mr)},movementY:function(t){return"movementY"in t?t.movementY:Rr}}),hf=ln(Zl),wy=_({},Zl,{dataTransfer:0}),My=ln(wy),Ry=_({},ki,{relatedTarget:0}),Or=ln(Ry),Oy=_({},$a,{animationName:0,elapsedTime:0,pseudoElement:0}),zy=ln(Oy),By=_({},$a,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Uy=ln(By),Vy=_({},$a,{data:0}),mf=ln(Vy),Ly={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},qy={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"},Hy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Iy(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=Hy[t])?!!e[t]:!1}function zr(){return Iy}var Gy=_({},ki,{key:function(t){if(t.key){var e=Ly[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Il(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?qy[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zr,charCode:function(t){return t.type==="keypress"?Il(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Il(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Yy=ln(Gy),Zy=_({},Zl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),pf=ln(Zy),Ky=_({},ki,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zr}),Xy=ln(Ky),Qy=_({},$a,{propertyName:0,elapsedTime:0,pseudoElement:0}),Py=ln(Qy),Fy=_({},Zl,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),Jy=ln(Fy),$y=_({},$a,{newState:0,oldState:0}),Wy=ln($y),t1=[9,13,27,32],Br=Wn&&"CompositionEvent"in window,Mi=null;Wn&&"documentMode"in document&&(Mi=document.documentMode);var e1=Wn&&"TextEvent"in window&&!Mi,vf=Wn&&(!Br||Mi&&8<Mi&&11>=Mi),gf=" ",yf=!1;function bf(t,e){switch(t){case"keyup":return t1.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _f(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Rs=!1;function n1(t,e){switch(t){case"compositionend":return _f(e);case"keypress":return e.which!==32?null:(yf=!0,gf);case"textInput":return t=e.data,t===gf&&yf?null:t;default:return null}}function a1(t,e){if(Rs)return t==="compositionend"||!Br&&bf(t,e)?(t=df(),Hl=wr=_a=null,Rs=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return vf&&e.locale!=="ko"?null:e.data;default:return null}}var s1={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 Sf(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!s1[t.type]:e==="textarea"}function Tf(t,e,n,s){ws?Ms?Ms.push(s):Ms=[s]:ws=s,e=zo(e,"onChange"),0<e.length&&(n=new Yl("onChange","change",null,n,s),t.push({event:n,listeners:e}))}var Ri=null,Oi=null;function i1(t){sp(t,0)}function Kl(t){var e=Ei(t);if(nf(e))return t}function xf(t,e){if(t==="change")return e}var jf=!1;if(Wn){var Ur;if(Wn){var Vr="oninput"in document;if(!Vr){var Af=document.createElement("div");Af.setAttribute("oninput","return;"),Vr=typeof Af.oninput=="function"}Ur=Vr}else Ur=!1;jf=Ur&&(!document.documentMode||9<document.documentMode)}function Nf(){Ri&&(Ri.detachEvent("onpropertychange",Ef),Oi=Ri=null)}function Ef(t){if(t.propertyName==="value"&&Kl(Oi)){var e=[];Tf(e,Oi,t,Cr(t)),uf(i1,e)}}function l1(t,e,n){t==="focusin"?(Nf(),Ri=e,Oi=n,Ri.attachEvent("onpropertychange",Ef)):t==="focusout"&&Nf()}function o1(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Kl(Oi)}function r1(t,e){if(t==="click")return Kl(e)}function c1(t,e){if(t==="input"||t==="change")return Kl(e)}function u1(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var hn=typeof Object.is=="function"?Object.is:u1;function zi(t,e){if(hn(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),s=Object.keys(e);if(n.length!==s.length)return!1;for(s=0;s<n.length;s++){var r=n[s];if(!V.call(e,r)||!hn(t[r],e[r]))return!1}return!0}function Cf(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Df(t,e){var n=Cf(t);t=0;for(var s;n;){if(n.nodeType===3){if(s=t+n.textContent.length,t<=e&&s>=e)return{node:n,offset:e-t};t=s}t:{for(;n;){if(n.nextSibling){n=n.nextSibling;break t}n=n.parentNode}n=void 0}n=Cf(n)}}function kf(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?kf(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function wf(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=Ll(t.document);e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=Ll(t.document)}return e}function Lr(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var d1=Wn&&"documentMode"in document&&11>=document.documentMode,Os=null,qr=null,Bi=null,Hr=!1;function Mf(t,e,n){var s=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Hr||Os==null||Os!==Ll(s)||(s=Os,"selectionStart"in s&&Lr(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Bi&&zi(Bi,s)||(Bi=s,s=zo(qr,"onSelect"),0<s.length&&(e=new Yl("onSelect","select",null,e,n),t.push({event:e,listeners:s}),e.target=Os)))}function Wa(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var zs={animationend:Wa("Animation","AnimationEnd"),animationiteration:Wa("Animation","AnimationIteration"),animationstart:Wa("Animation","AnimationStart"),transitionrun:Wa("Transition","TransitionRun"),transitionstart:Wa("Transition","TransitionStart"),transitioncancel:Wa("Transition","TransitionCancel"),transitionend:Wa("Transition","TransitionEnd")},Ir={},Rf={};Wn&&(Rf=document.createElement("div").style,"AnimationEvent"in window||(delete zs.animationend.animation,delete zs.animationiteration.animation,delete zs.animationstart.animation),"TransitionEvent"in window||delete zs.transitionend.transition);function ts(t){if(Ir[t])return Ir[t];if(!zs[t])return t;var e=zs[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in Rf)return Ir[t]=e[n];return t}var Of=ts("animationend"),zf=ts("animationiteration"),Bf=ts("animationstart"),f1=ts("transitionrun"),h1=ts("transitionstart"),m1=ts("transitioncancel"),Uf=ts("transitionend"),Vf=new Map,Gr="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(" ");Gr.push("scrollEnd");function Bn(t,e){Vf.set(t,e),Ja(e,[t])}var Xl=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},jn=[],Bs=0,Yr=0;function Ql(){for(var t=Bs,e=Yr=Bs=0;e<t;){var n=jn[e];jn[e++]=null;var s=jn[e];jn[e++]=null;var r=jn[e];jn[e++]=null;var c=jn[e];if(jn[e++]=null,s!==null&&r!==null){var m=s.pending;m===null?r.next=r:(r.next=m.next,m.next=r),s.pending=r}c!==0&&Lf(n,r,c)}}function Pl(t,e,n,s){jn[Bs++]=t,jn[Bs++]=e,jn[Bs++]=n,jn[Bs++]=s,Yr|=s,t.lanes|=s,t=t.alternate,t!==null&&(t.lanes|=s)}function Zr(t,e,n,s){return Pl(t,e,n,s),Fl(t)}function es(t,e){return Pl(t,null,null,e),Fl(t)}function Lf(t,e,n){t.lanes|=n;var s=t.alternate;s!==null&&(s.lanes|=n);for(var r=!1,c=t.return;c!==null;)c.childLanes|=n,s=c.alternate,s!==null&&(s.childLanes|=n),c.tag===22&&(t=c.stateNode,t===null||t._visibility&1||(r=!0)),t=c,c=c.return;return t.tag===3?(c=t.stateNode,r&&e!==null&&(r=31-J(n),t=c.hiddenUpdates,s=t[r],s===null?t[r]=[e]:s.push(e),e.lane=n|536870912),c):null}function Fl(t){if(50<sl)throw sl=0,tu=null,Error(o(185));for(var e=t.return;e!==null;)t=e,e=t.return;return t.tag===3?t.stateNode:null}var Us={};function p1(t,e,n,s){this.tag=t,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=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function mn(t,e,n,s){return new p1(t,e,n,s)}function Kr(t){return t=t.prototype,!(!t||!t.isReactComponent)}function ta(t,e){var n=t.alternate;return n===null?(n=mn(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&65011712,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n.refCleanup=t.refCleanup,n}function qf(t,e){t.flags&=65011714;var n=t.alternate;return n===null?(t.childLanes=0,t.lanes=e,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=n.childLanes,t.lanes=n.lanes,t.child=n.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=n.memoizedProps,t.memoizedState=n.memoizedState,t.updateQueue=n.updateQueue,t.type=n.type,e=n.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),t}function Jl(t,e,n,s,r,c){var m=0;if(s=t,typeof t=="function")Kr(t)&&(m=1);else if(typeof t=="string")m=_b(t,n,G.current)?26:t==="html"||t==="head"||t==="body"?27:5;else t:switch(t){case nt:return t=mn(31,n,e,r),t.elementType=nt,t.lanes=c,t;case R:return ns(n.children,r,c,e);case K:m=8,r|=24;break;case O:return t=mn(12,n,e,r|2),t.elementType=O,t.lanes=c,t;case X:return t=mn(13,n,e,r),t.elementType=X,t.lanes=c,t;case L:return t=mn(19,n,e,r),t.elementType=L,t.lanes=c,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Y:m=10;break t;case P:m=9;break t;case et:m=11;break t;case tt:m=14;break t;case U:m=16,s=null;break t}m=29,n=Error(o(130,t===null?"null":typeof t,"")),s=null}return e=mn(m,n,e,r),e.elementType=t,e.type=s,e.lanes=c,e}function ns(t,e,n,s){return t=mn(7,t,s,e),t.lanes=n,t}function Xr(t,e,n){return t=mn(6,t,null,e),t.lanes=n,t}function Hf(t){var e=mn(18,null,null,0);return e.stateNode=t,e}function Qr(t,e,n){return e=mn(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}var If=new WeakMap;function An(t,e){if(typeof t=="object"&&t!==null){var n=If.get(t);return n!==void 0?n:(e={value:t,source:e,stack:w(e)},If.set(t,e),e)}return{value:t,source:e,stack:w(e)}}var Vs=[],Ls=0,$l=null,Ui=0,Nn=[],En=0,Sa=null,Hn=1,In="";function ea(t,e){Vs[Ls++]=Ui,Vs[Ls++]=$l,$l=t,Ui=e}function Gf(t,e,n){Nn[En++]=Hn,Nn[En++]=In,Nn[En++]=Sa,Sa=t;var s=Hn;t=In;var r=32-J(s)-1;s&=~(1<<r),n+=1;var c=32-J(e)+r;if(30<c){var m=r-r%5;c=(s&(1<<m)-1).toString(32),s>>=m,r-=m,Hn=1<<32-J(e)+r|n<<r|s,In=c+t}else Hn=1<<c|n<<r|s,In=t}function Pr(t){t.return!==null&&(ea(t,1),Gf(t,1,0))}function Fr(t){for(;t===$l;)$l=Vs[--Ls],Vs[Ls]=null,Ui=Vs[--Ls],Vs[Ls]=null;for(;t===Sa;)Sa=Nn[--En],Nn[En]=null,In=Nn[--En],Nn[En]=null,Hn=Nn[--En],Nn[En]=null}function Yf(t,e){Nn[En++]=Hn,Nn[En++]=In,Nn[En++]=Sa,Hn=e.id,In=e.overflow,Sa=t}var Ye=null,re=null,Bt=!1,Ta=null,Cn=!1,Jr=Error(o(519));function xa(t){var e=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Vi(An(e,t)),Jr}function Zf(t){var e=t.stateNode,n=t.type,s=t.memoizedProps;switch(e[Ee]=t,e[Ge]=s,n){case"dialog":Mt("cancel",e),Mt("close",e);break;case"iframe":case"object":case"embed":Mt("load",e);break;case"video":case"audio":for(n=0;n<ll.length;n++)Mt(ll[n],e);break;case"source":Mt("error",e);break;case"img":case"image":case"link":Mt("error",e),Mt("load",e);break;case"details":Mt("toggle",e);break;case"input":Mt("invalid",e),af(e,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Mt("invalid",e);break;case"textarea":Mt("invalid",e),lf(e,s.value,s.defaultValue,s.children)}n=s.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||e.textContent===""+n||s.suppressHydrationWarning===!0||rp(e.textContent,n)?(s.popover!=null&&(Mt("beforetoggle",e),Mt("toggle",e)),s.onScroll!=null&&Mt("scroll",e),s.onScrollEnd!=null&&Mt("scrollend",e),s.onClick!=null&&(e.onclick=$n),e=!0):e=!1,e||xa(t,!0)}function Kf(t){for(Ye=t.return;Ye;)switch(Ye.tag){case 5:case 31:case 13:Cn=!1;return;case 27:case 3:Cn=!0;return;default:Ye=Ye.return}}function qs(t){if(t!==Ye)return!1;if(!Bt)return Kf(t),Bt=!0,!1;var e=t.tag,n;if((n=e!==3&&e!==27)&&((n=e===5)&&(n=t.type,n=!(n!=="form"&&n!=="button")||pu(t.type,t.memoizedProps)),n=!n),n&&re&&xa(t),Kf(t),e===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(317));re=gp(t)}else if(e===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(317));re=gp(t)}else e===27?(e=re,Ua(t.type)?(t=_u,_u=null,re=t):re=e):re=Ye?kn(t.stateNode.nextSibling):null;return!0}function as(){re=Ye=null,Bt=!1}function $r(){var t=Ta;return t!==null&&(un===null?un=t:un.push.apply(un,t),Ta=null),t}function Vi(t){Ta===null?Ta=[t]:Ta.push(t)}var Wr=Ft(null),ss=null,na=null;function ja(t,e,n){_t(Wr,e._currentValue),e._currentValue=n}function aa(t){t._currentValue=Wr.current,bt(Wr)}function tc(t,e,n){for(;t!==null;){var s=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,s!==null&&(s.childLanes|=e)):s!==null&&(s.childLanes&e)!==e&&(s.childLanes|=e),t===n)break;t=t.return}}function ec(t,e,n,s){var r=t.child;for(r!==null&&(r.return=t);r!==null;){var c=r.dependencies;if(c!==null){var m=r.child;c=c.firstContext;t:for(;c!==null;){var y=c;c=r;for(var T=0;T<e.length;T++)if(y.context===e[T]){c.lanes|=n,y=c.alternate,y!==null&&(y.lanes|=n),tc(c.return,n,t),s||(m=null);break t}c=y.next}}else if(r.tag===18){if(m=r.return,m===null)throw Error(o(341));m.lanes|=n,c=m.alternate,c!==null&&(c.lanes|=n),tc(m,n,t),m=null}else m=r.child;if(m!==null)m.return=r;else for(m=r;m!==null;){if(m===t){m=null;break}if(r=m.sibling,r!==null){r.return=m.return,m=r;break}m=m.return}r=m}}function Hs(t,e,n,s){t=null;for(var r=e,c=!1;r!==null;){if(!c){if((r.flags&524288)!==0)c=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var m=r.alternate;if(m===null)throw Error(o(387));if(m=m.memoizedProps,m!==null){var y=r.type;hn(r.pendingProps.value,m.value)||(t!==null?t.push(y):t=[y])}}else if(r===en.current){if(m=r.alternate,m===null)throw Error(o(387));m.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(t!==null?t.push(dl):t=[dl])}r=r.return}t!==null&&ec(e,t,n,s),e.flags|=262144}function Wl(t){for(t=t.firstContext;t!==null;){if(!hn(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function is(t){ss=t,na=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Ze(t){return Xf(ss,t)}function to(t,e){return ss===null&&is(t),Xf(t,e)}function Xf(t,e){var n=e._currentValue;if(e={context:e,memoizedValue:n,next:null},na===null){if(t===null)throw Error(o(308));na=e,t.dependencies={lanes:0,firstContext:e},t.flags|=524288}else na=na.next=e;return n}var v1=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(n,s){t.push(s)}};this.abort=function(){e.aborted=!0,t.forEach(function(n){return n()})}},g1=a.unstable_scheduleCallback,y1=a.unstable_NormalPriority,Ce={$$typeof:Y,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function nc(){return{controller:new v1,data:new Map,refCount:0}}function Li(t){t.refCount--,t.refCount===0&&g1(y1,function(){t.controller.abort()})}var qi=null,ac=0,Is=0,Gs=null;function b1(t,e){if(qi===null){var n=qi=[];ac=0,Is=lu(),Gs={status:"pending",value:void 0,then:function(s){n.push(s)}}}return ac++,e.then(Qf,Qf),e}function Qf(){if(--ac===0&&qi!==null){Gs!==null&&(Gs.status="fulfilled");var t=qi;qi=null,Is=0,Gs=null;for(var e=0;e<t.length;e++)(0,t[e])()}}function _1(t,e){var n=[],s={status:"pending",value:null,reason:null,then:function(r){n.push(r)}};return t.then(function(){s.status="fulfilled",s.value=e;for(var r=0;r<n.length;r++)(0,n[r])(e)},function(r){for(s.status="rejected",s.reason=r,r=0;r<n.length;r++)(0,n[r])(void 0)}),s}var Pf=B.S;B.S=function(t,e){Mm=ht(),typeof e=="object"&&e!==null&&typeof e.then=="function"&&b1(t,e),Pf!==null&&Pf(t,e)};var ls=Ft(null);function sc(){var t=ls.current;return t!==null?t:ie.pooledCache}function eo(t,e){e===null?_t(ls,ls.current):_t(ls,e.pool)}function Ff(){var t=sc();return t===null?null:{parent:Ce._currentValue,pool:t}}var Ys=Error(o(460)),ic=Error(o(474)),no=Error(o(542)),ao={then:function(){}};function Jf(t){return t=t.status,t==="fulfilled"||t==="rejected"}function $f(t,e,n){switch(n=t[n],n===void 0?t.push(e):n!==e&&(e.then($n,$n),e=n),e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,th(t),t;default:if(typeof e.status=="string")e.then($n,$n);else{if(t=ie,t!==null&&100<t.shellSuspendCounter)throw Error(o(482));t=e,t.status="pending",t.then(function(s){if(e.status==="pending"){var r=e;r.status="fulfilled",r.value=s}},function(s){if(e.status==="pending"){var r=e;r.status="rejected",r.reason=s}})}switch(e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,th(t),t}throw rs=e,Ys}}function os(t){try{var e=t._init;return e(t._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(rs=n,Ys):n}}var rs=null;function Wf(){if(rs===null)throw Error(o(459));var t=rs;return rs=null,t}function th(t){if(t===Ys||t===no)throw Error(o(483))}var Zs=null,Hi=0;function so(t){var e=Hi;return Hi+=1,Zs===null&&(Zs=[]),$f(Zs,t,e)}function Ii(t,e){e=e.props.ref,t.ref=e!==void 0?e:null}function io(t,e){throw e.$$typeof===x?Error(o(525)):(t=Object.prototype.toString.call(e),Error(o(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)))}function eh(t){function e(N,j){if(t){var C=N.deletions;C===null?(N.deletions=[j],N.flags|=16):C.push(j)}}function n(N,j){if(!t)return null;for(;j!==null;)e(N,j),j=j.sibling;return null}function s(N){for(var j=new Map;N!==null;)N.key!==null?j.set(N.key,N):j.set(N.index,N),N=N.sibling;return j}function r(N,j){return N=ta(N,j),N.index=0,N.sibling=null,N}function c(N,j,C){return N.index=C,t?(C=N.alternate,C!==null?(C=C.index,C<j?(N.flags|=67108866,j):C):(N.flags|=67108866,j)):(N.flags|=1048576,j)}function m(N){return t&&N.alternate===null&&(N.flags|=67108866),N}function y(N,j,C,I){return j===null||j.tag!==6?(j=Xr(C,N.mode,I),j.return=N,j):(j=r(j,C),j.return=N,j)}function T(N,j,C,I){var pt=C.type;return pt===R?q(N,j,C.props.children,I,C.key):j!==null&&(j.elementType===pt||typeof pt=="object"&&pt!==null&&pt.$$typeof===U&&os(pt)===j.type)?(j=r(j,C.props),Ii(j,C),j.return=N,j):(j=Jl(C.type,C.key,C.props,null,N.mode,I),Ii(j,C),j.return=N,j)}function D(N,j,C,I){return j===null||j.tag!==4||j.stateNode.containerInfo!==C.containerInfo||j.stateNode.implementation!==C.implementation?(j=Qr(C,N.mode,I),j.return=N,j):(j=r(j,C.children||[]),j.return=N,j)}function q(N,j,C,I,pt){return j===null||j.tag!==7?(j=ns(C,N.mode,I,pt),j.return=N,j):(j=r(j,C),j.return=N,j)}function Z(N,j,C){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return j=Xr(""+j,N.mode,C),j.return=N,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case E:return C=Jl(j.type,j.key,j.props,null,N.mode,C),Ii(C,j),C.return=N,C;case M:return j=Qr(j,N.mode,C),j.return=N,j;case U:return j=os(j),Z(N,j,C)}if(St(j)||Dt(j))return j=ns(j,N.mode,C,null),j.return=N,j;if(typeof j.then=="function")return Z(N,so(j),C);if(j.$$typeof===Y)return Z(N,to(N,j),C);io(N,j)}return null}function k(N,j,C,I){var pt=j!==null?j.key:null;if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return pt!==null?null:y(N,j,""+C,I);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case E:return C.key===pt?T(N,j,C,I):null;case M:return C.key===pt?D(N,j,C,I):null;case U:return C=os(C),k(N,j,C,I)}if(St(C)||Dt(C))return pt!==null?null:q(N,j,C,I,null);if(typeof C.then=="function")return k(N,j,so(C),I);if(C.$$typeof===Y)return k(N,j,to(N,C),I);io(N,C)}return null}function z(N,j,C,I,pt){if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return N=N.get(C)||null,y(j,N,""+I,pt);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case E:return N=N.get(I.key===null?C:I.key)||null,T(j,N,I,pt);case M:return N=N.get(I.key===null?C:I.key)||null,D(j,N,I,pt);case U:return I=os(I),z(N,j,C,I,pt)}if(St(I)||Dt(I))return N=N.get(C)||null,q(j,N,I,pt,null);if(typeof I.then=="function")return z(N,j,C,so(I),pt);if(I.$$typeof===Y)return z(N,j,C,to(j,I),pt);io(j,I)}return null}function rt(N,j,C,I){for(var pt=null,Lt=null,dt=j,Et=j=0,zt=null;dt!==null&&Et<C.length;Et++){dt.index>Et?(zt=dt,dt=null):zt=dt.sibling;var qt=k(N,dt,C[Et],I);if(qt===null){dt===null&&(dt=zt);break}t&&dt&&qt.alternate===null&&e(N,dt),j=c(qt,j,Et),Lt===null?pt=qt:Lt.sibling=qt,Lt=qt,dt=zt}if(Et===C.length)return n(N,dt),Bt&&ea(N,Et),pt;if(dt===null){for(;Et<C.length;Et++)dt=Z(N,C[Et],I),dt!==null&&(j=c(dt,j,Et),Lt===null?pt=dt:Lt.sibling=dt,Lt=dt);return Bt&&ea(N,Et),pt}for(dt=s(dt);Et<C.length;Et++)zt=z(dt,N,Et,C[Et],I),zt!==null&&(t&&zt.alternate!==null&&dt.delete(zt.key===null?Et:zt.key),j=c(zt,j,Et),Lt===null?pt=zt:Lt.sibling=zt,Lt=zt);return t&&dt.forEach(function(Ia){return e(N,Ia)}),Bt&&ea(N,Et),pt}function gt(N,j,C,I){if(C==null)throw Error(o(151));for(var pt=null,Lt=null,dt=j,Et=j=0,zt=null,qt=C.next();dt!==null&&!qt.done;Et++,qt=C.next()){dt.index>Et?(zt=dt,dt=null):zt=dt.sibling;var Ia=k(N,dt,qt.value,I);if(Ia===null){dt===null&&(dt=zt);break}t&&dt&&Ia.alternate===null&&e(N,dt),j=c(Ia,j,Et),Lt===null?pt=Ia:Lt.sibling=Ia,Lt=Ia,dt=zt}if(qt.done)return n(N,dt),Bt&&ea(N,Et),pt;if(dt===null){for(;!qt.done;Et++,qt=C.next())qt=Z(N,qt.value,I),qt!==null&&(j=c(qt,j,Et),Lt===null?pt=qt:Lt.sibling=qt,Lt=qt);return Bt&&ea(N,Et),pt}for(dt=s(dt);!qt.done;Et++,qt=C.next())qt=z(dt,N,Et,qt.value,I),qt!==null&&(t&&qt.alternate!==null&&dt.delete(qt.key===null?Et:qt.key),j=c(qt,j,Et),Lt===null?pt=qt:Lt.sibling=qt,Lt=qt);return t&&dt.forEach(function(wb){return e(N,wb)}),Bt&&ea(N,Et),pt}function ne(N,j,C,I){if(typeof C=="object"&&C!==null&&C.type===R&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case E:t:{for(var pt=C.key;j!==null;){if(j.key===pt){if(pt=C.type,pt===R){if(j.tag===7){n(N,j.sibling),I=r(j,C.props.children),I.return=N,N=I;break t}}else if(j.elementType===pt||typeof pt=="object"&&pt!==null&&pt.$$typeof===U&&os(pt)===j.type){n(N,j.sibling),I=r(j,C.props),Ii(I,C),I.return=N,N=I;break t}n(N,j);break}else e(N,j);j=j.sibling}C.type===R?(I=ns(C.props.children,N.mode,I,C.key),I.return=N,N=I):(I=Jl(C.type,C.key,C.props,null,N.mode,I),Ii(I,C),I.return=N,N=I)}return m(N);case M:t:{for(pt=C.key;j!==null;){if(j.key===pt)if(j.tag===4&&j.stateNode.containerInfo===C.containerInfo&&j.stateNode.implementation===C.implementation){n(N,j.sibling),I=r(j,C.children||[]),I.return=N,N=I;break t}else{n(N,j);break}else e(N,j);j=j.sibling}I=Qr(C,N.mode,I),I.return=N,N=I}return m(N);case U:return C=os(C),ne(N,j,C,I)}if(St(C))return rt(N,j,C,I);if(Dt(C)){if(pt=Dt(C),typeof pt!="function")throw Error(o(150));return C=pt.call(C),gt(N,j,C,I)}if(typeof C.then=="function")return ne(N,j,so(C),I);if(C.$$typeof===Y)return ne(N,j,to(N,C),I);io(N,C)}return typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint"?(C=""+C,j!==null&&j.tag===6?(n(N,j.sibling),I=r(j,C),I.return=N,N=I):(n(N,j),I=Xr(C,N.mode,I),I.return=N,N=I),m(N)):n(N,j)}return function(N,j,C,I){try{Hi=0;var pt=ne(N,j,C,I);return Zs=null,pt}catch(dt){if(dt===Ys||dt===no)throw dt;var Lt=mn(29,dt,null,N.mode);return Lt.lanes=I,Lt.return=N,Lt}finally{}}}var cs=eh(!0),nh=eh(!1),Aa=!1;function lc(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function oc(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Na(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Ea(t,e,n){var s=t.updateQueue;if(s===null)return null;if(s=s.shared,(Yt&2)!==0){var r=s.pending;return r===null?e.next=e:(e.next=r.next,r.next=e),s.pending=e,e=Fl(t),Lf(t,null,n),e}return Pl(t,s,e,n),Fl(t)}function Gi(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194048)!==0)){var s=e.lanes;s&=t.pendingLanes,n|=s,e.lanes=n,Ti(t,n)}}function rc(t,e){var n=t.updateQueue,s=t.alternate;if(s!==null&&(s=s.updateQueue,n===s)){var r=null,c=null;if(n=n.firstBaseUpdate,n!==null){do{var m={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};c===null?r=c=m:c=c.next=m,n=n.next}while(n!==null);c===null?r=c=e:c=c.next=e}else r=c=e;n={baseState:s.baseState,firstBaseUpdate:r,lastBaseUpdate:c,shared:s.shared,callbacks:s.callbacks},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}var cc=!1;function Yi(){if(cc){var t=Gs;if(t!==null)throw t}}function Zi(t,e,n,s){cc=!1;var r=t.updateQueue;Aa=!1;var c=r.firstBaseUpdate,m=r.lastBaseUpdate,y=r.shared.pending;if(y!==null){r.shared.pending=null;var T=y,D=T.next;T.next=null,m===null?c=D:m.next=D,m=T;var q=t.alternate;q!==null&&(q=q.updateQueue,y=q.lastBaseUpdate,y!==m&&(y===null?q.firstBaseUpdate=D:y.next=D,q.lastBaseUpdate=T))}if(c!==null){var Z=r.baseState;m=0,q=D=T=null,y=c;do{var k=y.lane&-536870913,z=k!==y.lane;if(z?(Ot&k)===k:(s&k)===k){k!==0&&k===Is&&(cc=!0),q!==null&&(q=q.next={lane:0,tag:y.tag,payload:y.payload,callback:null,next:null});t:{var rt=t,gt=y;k=e;var ne=n;switch(gt.tag){case 1:if(rt=gt.payload,typeof rt=="function"){Z=rt.call(ne,Z,k);break t}Z=rt;break t;case 3:rt.flags=rt.flags&-65537|128;case 0:if(rt=gt.payload,k=typeof rt=="function"?rt.call(ne,Z,k):rt,k==null)break t;Z=_({},Z,k);break t;case 2:Aa=!0}}k=y.callback,k!==null&&(t.flags|=64,z&&(t.flags|=8192),z=r.callbacks,z===null?r.callbacks=[k]:z.push(k))}else z={lane:k,tag:y.tag,payload:y.payload,callback:y.callback,next:null},q===null?(D=q=z,T=Z):q=q.next=z,m|=k;if(y=y.next,y===null){if(y=r.shared.pending,y===null)break;z=y,y=z.next,z.next=null,r.lastBaseUpdate=z,r.shared.pending=null}}while(!0);q===null&&(T=Z),r.baseState=T,r.firstBaseUpdate=D,r.lastBaseUpdate=q,c===null&&(r.shared.lanes=0),Ma|=m,t.lanes=m,t.memoizedState=Z}}function ah(t,e){if(typeof t!="function")throw Error(o(191,t));t.call(e)}function sh(t,e){var n=t.callbacks;if(n!==null)for(t.callbacks=null,t=0;t<n.length;t++)ah(n[t],e)}var Ks=Ft(null),lo=Ft(0);function ih(t,e){t=fa,_t(lo,t),_t(Ks,e),fa=t|e.baseLanes}function uc(){_t(lo,fa),_t(Ks,Ks.current)}function dc(){fa=lo.current,bt(Ks),bt(lo)}var pn=Ft(null),Dn=null;function Ca(t){var e=t.alternate;_t(xe,xe.current&1),_t(pn,t),Dn===null&&(e===null||Ks.current!==null||e.memoizedState!==null)&&(Dn=t)}function fc(t){_t(xe,xe.current),_t(pn,t),Dn===null&&(Dn=t)}function lh(t){t.tag===22?(_t(xe,xe.current),_t(pn,t),Dn===null&&(Dn=t)):Da()}function Da(){_t(xe,xe.current),_t(pn,pn.current)}function vn(t){bt(pn),Dn===t&&(Dn=null),bt(xe)}var xe=Ft(0);function oo(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||yu(n)||bu(n)))return e}else if(e.tag===19&&(e.memoizedProps.revealOrder==="forwards"||e.memoizedProps.revealOrder==="backwards"||e.memoizedProps.revealOrder==="unstable_legacy-backwards"||e.memoizedProps.revealOrder==="together")){if((e.flags&128)!==0)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var sa=0,Nt=null,te=null,De=null,ro=!1,Xs=!1,us=!1,co=0,Ki=0,Qs=null,S1=0;function be(){throw Error(o(321))}function hc(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!hn(t[n],e[n]))return!1;return!0}function mc(t,e,n,s,r,c){return sa=c,Nt=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,B.H=t===null||t.memoizedState===null?Gh:Dc,us=!1,c=n(s,r),us=!1,Xs&&(c=rh(e,n,s,r)),oh(t),c}function oh(t){B.H=Pi;var e=te!==null&&te.next!==null;if(sa=0,De=te=Nt=null,ro=!1,Ki=0,Qs=null,e)throw Error(o(300));t===null||ke||(t=t.dependencies,t!==null&&Wl(t)&&(ke=!0))}function rh(t,e,n,s){Nt=t;var r=0;do{if(Xs&&(Qs=null),Ki=0,Xs=!1,25<=r)throw Error(o(301));if(r+=1,De=te=null,t.updateQueue!=null){var c=t.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}B.H=Yh,c=e(n,s)}while(Xs);return c}function T1(){var t=B.H,e=t.useState()[0];return e=typeof e.then=="function"?Xi(e):e,t=t.useState()[0],(te!==null?te.memoizedState:null)!==t&&(Nt.flags|=1024),e}function pc(){var t=co!==0;return co=0,t}function vc(t,e,n){e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~n}function gc(t){if(ro){for(t=t.memoizedState;t!==null;){var e=t.queue;e!==null&&(e.pending=null),t=t.next}ro=!1}sa=0,De=te=Nt=null,Xs=!1,Ki=co=0,Qs=null}function $e(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return De===null?Nt.memoizedState=De=t:De=De.next=t,De}function je(){if(te===null){var t=Nt.alternate;t=t!==null?t.memoizedState:null}else t=te.next;var e=De===null?Nt.memoizedState:De.next;if(e!==null)De=e,te=t;else{if(t===null)throw Nt.alternate===null?Error(o(467)):Error(o(310));te=t,t={memoizedState:te.memoizedState,baseState:te.baseState,baseQueue:te.baseQueue,queue:te.queue,next:null},De===null?Nt.memoizedState=De=t:De=De.next=t}return De}function uo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Xi(t){var e=Ki;return Ki+=1,Qs===null&&(Qs=[]),t=$f(Qs,t,e),e=Nt,(De===null?e.memoizedState:De.next)===null&&(e=e.alternate,B.H=e===null||e.memoizedState===null?Gh:Dc),t}function fo(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Xi(t);if(t.$$typeof===Y)return Ze(t)}throw Error(o(438,String(t)))}function yc(t){var e=null,n=Nt.updateQueue;if(n!==null&&(e=n.memoCache),e==null){var s=Nt.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(e={data:s.data.map(function(r){return r.slice()}),index:0})))}if(e==null&&(e={data:[],index:0}),n===null&&(n=uo(),Nt.updateQueue=n),n.memoCache=e,n=e.data[e.index],n===void 0)for(n=e.data[e.index]=Array(t),s=0;s<t;s++)n[s]=at;return e.index++,n}function ia(t,e){return typeof e=="function"?e(t):e}function ho(t){var e=je();return bc(e,te,t)}function bc(t,e,n){var s=t.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=n;var r=t.baseQueue,c=s.pending;if(c!==null){if(r!==null){var m=r.next;r.next=c.next,c.next=m}e.baseQueue=r=c,s.pending=null}if(c=t.baseState,r===null)t.memoizedState=c;else{e=r.next;var y=m=null,T=null,D=e,q=!1;do{var Z=D.lane&-536870913;if(Z!==D.lane?(Ot&Z)===Z:(sa&Z)===Z){var k=D.revertLane;if(k===0)T!==null&&(T=T.next={lane:0,revertLane:0,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),Z===Is&&(q=!0);else if((sa&k)===k){D=D.next,k===Is&&(q=!0);continue}else Z={lane:0,revertLane:D.revertLane,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},T===null?(y=T=Z,m=c):T=T.next=Z,Nt.lanes|=k,Ma|=k;Z=D.action,us&&n(c,Z),c=D.hasEagerState?D.eagerState:n(c,Z)}else k={lane:Z,revertLane:D.revertLane,gesture:D.gesture,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},T===null?(y=T=k,m=c):T=T.next=k,Nt.lanes|=Z,Ma|=Z;D=D.next}while(D!==null&&D!==e);if(T===null?m=c:T.next=y,!hn(c,t.memoizedState)&&(ke=!0,q&&(n=Gs,n!==null)))throw n;t.memoizedState=c,t.baseState=m,t.baseQueue=T,s.lastRenderedState=c}return r===null&&(s.lanes=0),[t.memoizedState,s.dispatch]}function _c(t){var e=je(),n=e.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=t;var s=n.dispatch,r=n.pending,c=e.memoizedState;if(r!==null){n.pending=null;var m=r=r.next;do c=t(c,m.action),m=m.next;while(m!==r);hn(c,e.memoizedState)||(ke=!0),e.memoizedState=c,e.baseQueue===null&&(e.baseState=c),n.lastRenderedState=c}return[c,s]}function ch(t,e,n){var s=Nt,r=je(),c=Bt;if(c){if(n===void 0)throw Error(o(407));n=n()}else n=e();var m=!hn((te||r).memoizedState,n);if(m&&(r.memoizedState=n,ke=!0),r=r.queue,xc(fh.bind(null,s,r,t),[t]),r.getSnapshot!==e||m||De!==null&&De.memoizedState.tag&1){if(s.flags|=2048,Ps(9,{destroy:void 0},dh.bind(null,s,r,n,e),null),ie===null)throw Error(o(349));c||(sa&127)!==0||uh(s,e,n)}return n}function uh(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=Nt.updateQueue,e===null?(e=uo(),Nt.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function dh(t,e,n,s){e.value=n,e.getSnapshot=s,hh(e)&&mh(t)}function fh(t,e,n){return n(function(){hh(e)&&mh(t)})}function hh(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!hn(t,n)}catch{return!0}}function mh(t){var e=es(t,2);e!==null&&dn(e,t,2)}function Sc(t){var e=$e();if(typeof t=="function"){var n=t;if(t=n(),us){an(!0);try{n()}finally{an(!1)}}}return e.memoizedState=e.baseState=t,e.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ia,lastRenderedState:t},e}function ph(t,e,n,s){return t.baseState=n,bc(t,te,typeof s=="function"?s:ia)}function x1(t,e,n,s,r){if(vo(t))throw Error(o(485));if(t=e.action,t!==null){var c={payload:r,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(m){c.listeners.push(m)}};B.T!==null?n(!0):c.isTransition=!1,s(c),n=e.pending,n===null?(c.next=e.pending=c,vh(e,c)):(c.next=n.next,e.pending=n.next=c)}}function vh(t,e){var n=e.action,s=e.payload,r=t.state;if(e.isTransition){var c=B.T,m={};B.T=m;try{var y=n(r,s),T=B.S;T!==null&&T(m,y),gh(t,e,y)}catch(D){Tc(t,e,D)}finally{c!==null&&m.types!==null&&(c.types=m.types),B.T=c}}else try{c=n(r,s),gh(t,e,c)}catch(D){Tc(t,e,D)}}function gh(t,e,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(s){yh(t,e,s)},function(s){return Tc(t,e,s)}):yh(t,e,n)}function yh(t,e,n){e.status="fulfilled",e.value=n,bh(e),t.state=n,e=t.pending,e!==null&&(n=e.next,n===e?t.pending=null:(n=n.next,e.next=n,vh(t,n)))}function Tc(t,e,n){var s=t.pending;if(t.pending=null,s!==null){s=s.next;do e.status="rejected",e.reason=n,bh(e),e=e.next;while(e!==s)}t.action=null}function bh(t){t=t.listeners;for(var e=0;e<t.length;e++)(0,t[e])()}function _h(t,e){return e}function Sh(t,e){if(Bt){var n=ie.formState;if(n!==null){t:{var s=Nt;if(Bt){if(re){e:{for(var r=re,c=Cn;r.nodeType!==8;){if(!c){r=null;break e}if(r=kn(r.nextSibling),r===null){r=null;break e}}c=r.data,r=c==="F!"||c==="F"?r:null}if(r){re=kn(r.nextSibling),s=r.data==="F!";break t}}xa(s)}s=!1}s&&(e=n[0])}}return n=$e(),n.memoizedState=n.baseState=e,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_h,lastRenderedState:e},n.queue=s,n=qh.bind(null,Nt,s),s.dispatch=n,s=Sc(!1),c=Cc.bind(null,Nt,!1,s.queue),s=$e(),r={state:e,dispatch:null,action:t,pending:null},s.queue=r,n=x1.bind(null,Nt,r,c,n),r.dispatch=n,s.memoizedState=t,[e,n,!1]}function Th(t){var e=je();return xh(e,te,t)}function xh(t,e,n){if(e=bc(t,e,_h)[0],t=ho(ia)[0],typeof e=="object"&&e!==null&&typeof e.then=="function")try{var s=Xi(e)}catch(m){throw m===Ys?no:m}else s=e;e=je();var r=e.queue,c=r.dispatch;return n!==e.memoizedState&&(Nt.flags|=2048,Ps(9,{destroy:void 0},j1.bind(null,r,n),null)),[s,c,t]}function j1(t,e){t.action=e}function jh(t){var e=je(),n=te;if(n!==null)return xh(e,n,t);je(),e=e.memoizedState,n=je();var s=n.queue.dispatch;return n.memoizedState=t,[e,s,!1]}function Ps(t,e,n,s){return t={tag:t,create:n,deps:s,inst:e,next:null},e=Nt.updateQueue,e===null&&(e=uo(),Nt.updateQueue=e),n=e.lastEffect,n===null?e.lastEffect=t.next=t:(s=n.next,n.next=t,t.next=s,e.lastEffect=t),t}function Ah(){return je().memoizedState}function mo(t,e,n,s){var r=$e();Nt.flags|=t,r.memoizedState=Ps(1|e,{destroy:void 0},n,s===void 0?null:s)}function po(t,e,n,s){var r=je();s=s===void 0?null:s;var c=r.memoizedState.inst;te!==null&&s!==null&&hc(s,te.memoizedState.deps)?r.memoizedState=Ps(e,c,n,s):(Nt.flags|=t,r.memoizedState=Ps(1|e,c,n,s))}function Nh(t,e){mo(8390656,8,t,e)}function xc(t,e){po(2048,8,t,e)}function A1(t){Nt.flags|=4;var e=Nt.updateQueue;if(e===null)e=uo(),Nt.updateQueue=e,e.events=[t];else{var n=e.events;n===null?e.events=[t]:n.push(t)}}function Eh(t){var e=je().memoizedState;return A1({ref:e,nextImpl:t}),function(){if((Yt&2)!==0)throw Error(o(440));return e.impl.apply(void 0,arguments)}}function Ch(t,e){return po(4,2,t,e)}function Dh(t,e){return po(4,4,t,e)}function kh(t,e){if(typeof e=="function"){t=t();var n=e(t);return function(){typeof n=="function"?n():e(null)}}if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function wh(t,e,n){n=n!=null?n.concat([t]):null,po(4,4,kh.bind(null,e,t),n)}function jc(){}function Mh(t,e){var n=je();e=e===void 0?null:e;var s=n.memoizedState;return e!==null&&hc(e,s[1])?s[0]:(n.memoizedState=[t,e],t)}function Rh(t,e){var n=je();e=e===void 0?null:e;var s=n.memoizedState;if(e!==null&&hc(e,s[1]))return s[0];if(s=t(),us){an(!0);try{t()}finally{an(!1)}}return n.memoizedState=[s,e],s}function Ac(t,e,n){return n===void 0||(sa&1073741824)!==0&&(Ot&261930)===0?t.memoizedState=e:(t.memoizedState=n,t=Om(),Nt.lanes|=t,Ma|=t,n)}function Oh(t,e,n,s){return hn(n,e)?n:Ks.current!==null?(t=Ac(t,n,s),hn(t,e)||(ke=!0),t):(sa&42)===0||(sa&1073741824)!==0&&(Ot&261930)===0?(ke=!0,t.memoizedState=n):(t=Om(),Nt.lanes|=t,Ma|=t,e)}function zh(t,e,n,s,r){var c=Q.p;Q.p=c!==0&&8>c?c:8;var m=B.T,y={};B.T=y,Cc(t,!1,e,n);try{var T=r(),D=B.S;if(D!==null&&D(y,T),T!==null&&typeof T=="object"&&typeof T.then=="function"){var q=_1(T,s);Qi(t,e,q,bn(t))}else Qi(t,e,s,bn(t))}catch(Z){Qi(t,e,{then:function(){},status:"rejected",reason:Z},bn())}finally{Q.p=c,m!==null&&y.types!==null&&(m.types=y.types),B.T=m}}function N1(){}function Nc(t,e,n,s){if(t.tag!==5)throw Error(o(476));var r=Bh(t).queue;zh(t,r,e,lt,n===null?N1:function(){return Uh(t),n(s)})}function Bh(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:lt,baseState:lt,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ia,lastRenderedState:lt},next:null};var n={};return e.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ia,lastRenderedState:n},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function Uh(t){var e=Bh(t);e.next===null&&(e=t.alternate.memoizedState),Qi(t,e.next.queue,{},bn())}function Ec(){return Ze(dl)}function Vh(){return je().memoizedState}function Lh(){return je().memoizedState}function E1(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var n=bn();t=Na(n);var s=Ea(e,t,n);s!==null&&(dn(s,e,n),Gi(s,e,n)),e={cache:nc()},t.payload=e;return}e=e.return}}function C1(t,e,n){var s=bn();n={lane:s,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},vo(t)?Hh(e,n):(n=Zr(t,e,n,s),n!==null&&(dn(n,t,s),Ih(n,e,s)))}function qh(t,e,n){var s=bn();Qi(t,e,n,s)}function Qi(t,e,n,s){var r={lane:s,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(vo(t))Hh(e,r);else{var c=t.alternate;if(t.lanes===0&&(c===null||c.lanes===0)&&(c=e.lastRenderedReducer,c!==null))try{var m=e.lastRenderedState,y=c(m,n);if(r.hasEagerState=!0,r.eagerState=y,hn(y,m))return Pl(t,e,r,0),ie===null&&Ql(),!1}catch{}finally{}if(n=Zr(t,e,r,s),n!==null)return dn(n,t,s),Ih(n,e,s),!0}return!1}function Cc(t,e,n,s){if(s={lane:2,revertLane:lu(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},vo(t)){if(e)throw Error(o(479))}else e=Zr(t,n,s,2),e!==null&&dn(e,t,2)}function vo(t){var e=t.alternate;return t===Nt||e!==null&&e===Nt}function Hh(t,e){Xs=ro=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function Ih(t,e,n){if((n&4194048)!==0){var s=e.lanes;s&=t.pendingLanes,n|=s,e.lanes=n,Ti(t,n)}}var Pi={readContext:Ze,use:fo,useCallback:be,useContext:be,useEffect:be,useImperativeHandle:be,useLayoutEffect:be,useInsertionEffect:be,useMemo:be,useReducer:be,useRef:be,useState:be,useDebugValue:be,useDeferredValue:be,useTransition:be,useSyncExternalStore:be,useId:be,useHostTransitionStatus:be,useFormState:be,useActionState:be,useOptimistic:be,useMemoCache:be,useCacheRefresh:be};Pi.useEffectEvent=be;var Gh={readContext:Ze,use:fo,useCallback:function(t,e){return $e().memoizedState=[t,e===void 0?null:e],t},useContext:Ze,useEffect:Nh,useImperativeHandle:function(t,e,n){n=n!=null?n.concat([t]):null,mo(4194308,4,kh.bind(null,e,t),n)},useLayoutEffect:function(t,e){return mo(4194308,4,t,e)},useInsertionEffect:function(t,e){mo(4,2,t,e)},useMemo:function(t,e){var n=$e();e=e===void 0?null:e;var s=t();if(us){an(!0);try{t()}finally{an(!1)}}return n.memoizedState=[s,e],s},useReducer:function(t,e,n){var s=$e();if(n!==void 0){var r=n(e);if(us){an(!0);try{n(e)}finally{an(!1)}}}else r=e;return s.memoizedState=s.baseState=r,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:r},s.queue=t,t=t.dispatch=C1.bind(null,Nt,t),[s.memoizedState,t]},useRef:function(t){var e=$e();return t={current:t},e.memoizedState=t},useState:function(t){t=Sc(t);var e=t.queue,n=qh.bind(null,Nt,e);return e.dispatch=n,[t.memoizedState,n]},useDebugValue:jc,useDeferredValue:function(t,e){var n=$e();return Ac(n,t,e)},useTransition:function(){var t=Sc(!1);return t=zh.bind(null,Nt,t.queue,!0,!1),$e().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,n){var s=Nt,r=$e();if(Bt){if(n===void 0)throw Error(o(407));n=n()}else{if(n=e(),ie===null)throw Error(o(349));(Ot&127)!==0||uh(s,e,n)}r.memoizedState=n;var c={value:n,getSnapshot:e};return r.queue=c,Nh(fh.bind(null,s,c,t),[t]),s.flags|=2048,Ps(9,{destroy:void 0},dh.bind(null,s,c,n,e),null),n},useId:function(){var t=$e(),e=ie.identifierPrefix;if(Bt){var n=In,s=Hn;n=(s&~(1<<32-J(s)-1)).toString(32)+n,e="_"+e+"R_"+n,n=co++,0<n&&(e+="H"+n.toString(32)),e+="_"}else n=S1++,e="_"+e+"r_"+n.toString(32)+"_";return t.memoizedState=e},useHostTransitionStatus:Ec,useFormState:Sh,useActionState:Sh,useOptimistic:function(t){var e=$e();e.memoizedState=e.baseState=t;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return e.queue=n,e=Cc.bind(null,Nt,!0,n),n.dispatch=e,[t,e]},useMemoCache:yc,useCacheRefresh:function(){return $e().memoizedState=E1.bind(null,Nt)},useEffectEvent:function(t){var e=$e(),n={impl:t};return e.memoizedState=n,function(){if((Yt&2)!==0)throw Error(o(440));return n.impl.apply(void 0,arguments)}}},Dc={readContext:Ze,use:fo,useCallback:Mh,useContext:Ze,useEffect:xc,useImperativeHandle:wh,useInsertionEffect:Ch,useLayoutEffect:Dh,useMemo:Rh,useReducer:ho,useRef:Ah,useState:function(){return ho(ia)},useDebugValue:jc,useDeferredValue:function(t,e){var n=je();return Oh(n,te.memoizedState,t,e)},useTransition:function(){var t=ho(ia)[0],e=je().memoizedState;return[typeof t=="boolean"?t:Xi(t),e]},useSyncExternalStore:ch,useId:Vh,useHostTransitionStatus:Ec,useFormState:Th,useActionState:Th,useOptimistic:function(t,e){var n=je();return ph(n,te,t,e)},useMemoCache:yc,useCacheRefresh:Lh};Dc.useEffectEvent=Eh;var Yh={readContext:Ze,use:fo,useCallback:Mh,useContext:Ze,useEffect:xc,useImperativeHandle:wh,useInsertionEffect:Ch,useLayoutEffect:Dh,useMemo:Rh,useReducer:_c,useRef:Ah,useState:function(){return _c(ia)},useDebugValue:jc,useDeferredValue:function(t,e){var n=je();return te===null?Ac(n,t,e):Oh(n,te.memoizedState,t,e)},useTransition:function(){var t=_c(ia)[0],e=je().memoizedState;return[typeof t=="boolean"?t:Xi(t),e]},useSyncExternalStore:ch,useId:Vh,useHostTransitionStatus:Ec,useFormState:jh,useActionState:jh,useOptimistic:function(t,e){var n=je();return te!==null?ph(n,te,t,e):(n.baseState=t,[t,n.queue.dispatch])},useMemoCache:yc,useCacheRefresh:Lh};Yh.useEffectEvent=Eh;function kc(t,e,n,s){e=t.memoizedState,n=n(s,e),n=n==null?e:_({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var wc={enqueueSetState:function(t,e,n){t=t._reactInternals;var s=bn(),r=Na(s);r.payload=e,n!=null&&(r.callback=n),e=Ea(t,r,s),e!==null&&(dn(e,t,s),Gi(e,t,s))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var s=bn(),r=Na(s);r.tag=1,r.payload=e,n!=null&&(r.callback=n),e=Ea(t,r,s),e!==null&&(dn(e,t,s),Gi(e,t,s))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=bn(),s=Na(n);s.tag=2,e!=null&&(s.callback=e),e=Ea(t,s,n),e!==null&&(dn(e,t,n),Gi(e,t,n))}};function Zh(t,e,n,s,r,c,m){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(s,c,m):e.prototype&&e.prototype.isPureReactComponent?!zi(n,s)||!zi(r,c):!0}function Kh(t,e,n,s){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,s),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,s),e.state!==t&&wc.enqueueReplaceState(e,e.state,null)}function ds(t,e){var n=e;if("ref"in e){n={};for(var s in e)s!=="ref"&&(n[s]=e[s])}if(t=t.defaultProps){n===e&&(n=_({},n));for(var r in t)n[r]===void 0&&(n[r]=t[r])}return n}function Xh(t){Xl(t)}function Qh(t){console.error(t)}function Ph(t){Xl(t)}function go(t,e){try{var n=t.onUncaughtError;n(e.value,{componentStack:e.stack})}catch(s){setTimeout(function(){throw s})}}function Fh(t,e,n){try{var s=t.onCaughtError;s(n.value,{componentStack:n.stack,errorBoundary:e.tag===1?e.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function Mc(t,e,n){return n=Na(n),n.tag=3,n.payload={element:null},n.callback=function(){go(t,e)},n}function Jh(t){return t=Na(t),t.tag=3,t}function $h(t,e,n,s){var r=n.type.getDerivedStateFromError;if(typeof r=="function"){var c=s.value;t.payload=function(){return r(c)},t.callback=function(){Fh(e,n,s)}}var m=n.stateNode;m!==null&&typeof m.componentDidCatch=="function"&&(t.callback=function(){Fh(e,n,s),typeof r!="function"&&(Ra===null?Ra=new Set([this]):Ra.add(this));var y=s.stack;this.componentDidCatch(s.value,{componentStack:y!==null?y:""})})}function D1(t,e,n,s,r){if(n.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(e=n.alternate,e!==null&&Hs(e,n,r,!0),n=pn.current,n!==null){switch(n.tag){case 31:case 13:return Dn===null?Do():n.alternate===null&&_e===0&&(_e=3),n.flags&=-257,n.flags|=65536,n.lanes=r,s===ao?n.flags|=16384:(e=n.updateQueue,e===null?n.updateQueue=new Set([s]):e.add(s),au(t,s,r)),!1;case 22:return n.flags|=65536,s===ao?n.flags|=16384:(e=n.updateQueue,e===null?(e={transitions:null,markerInstances:null,retryQueue:new Set([s])},n.updateQueue=e):(n=e.retryQueue,n===null?e.retryQueue=new Set([s]):n.add(s)),au(t,s,r)),!1}throw Error(o(435,n.tag))}return au(t,s,r),Do(),!1}if(Bt)return e=pn.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=r,s!==Jr&&(t=Error(o(422),{cause:s}),Vi(An(t,n)))):(s!==Jr&&(e=Error(o(423),{cause:s}),Vi(An(e,n))),t=t.current.alternate,t.flags|=65536,r&=-r,t.lanes|=r,s=An(s,n),r=Mc(t.stateNode,s,r),rc(t,r),_e!==4&&(_e=2)),!1;var c=Error(o(520),{cause:s});if(c=An(c,n),al===null?al=[c]:al.push(c),_e!==4&&(_e=2),e===null)return!0;s=An(s,n),n=e;do{switch(n.tag){case 3:return n.flags|=65536,t=r&-r,n.lanes|=t,t=Mc(n.stateNode,s,t),rc(n,t),!1;case 1:if(e=n.type,c=n.stateNode,(n.flags&128)===0&&(typeof e.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(Ra===null||!Ra.has(c))))return n.flags|=65536,r&=-r,n.lanes|=r,r=Jh(r),$h(r,t,n,s),rc(n,r),!1}n=n.return}while(n!==null);return!1}var Rc=Error(o(461)),ke=!1;function Ke(t,e,n,s){e.child=t===null?nh(e,null,n,s):cs(e,t.child,n,s)}function Wh(t,e,n,s,r){n=n.render;var c=e.ref;if("ref"in s){var m={};for(var y in s)y!=="ref"&&(m[y]=s[y])}else m=s;return is(e),s=mc(t,e,n,m,c,r),y=pc(),t!==null&&!ke?(vc(t,e,r),la(t,e,r)):(Bt&&y&&Pr(e),e.flags|=1,Ke(t,e,s,r),e.child)}function tm(t,e,n,s,r){if(t===null){var c=n.type;return typeof c=="function"&&!Kr(c)&&c.defaultProps===void 0&&n.compare===null?(e.tag=15,e.type=c,em(t,e,c,s,r)):(t=Jl(n.type,null,s,e,e.mode,r),t.ref=e.ref,t.return=e,e.child=t)}if(c=t.child,!Hc(t,r)){var m=c.memoizedProps;if(n=n.compare,n=n!==null?n:zi,n(m,s)&&t.ref===e.ref)return la(t,e,r)}return e.flags|=1,t=ta(c,s),t.ref=e.ref,t.return=e,e.child=t}function em(t,e,n,s,r){if(t!==null){var c=t.memoizedProps;if(zi(c,s)&&t.ref===e.ref)if(ke=!1,e.pendingProps=s=c,Hc(t,r))(t.flags&131072)!==0&&(ke=!0);else return e.lanes=t.lanes,la(t,e,r)}return Oc(t,e,n,s,r)}function nm(t,e,n,s){var r=s.children,c=t!==null?t.memoizedState:null;if(t===null&&e.stateNode===null&&(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((e.flags&128)!==0){if(c=c!==null?c.baseLanes|n:n,t!==null){for(s=e.child=t.child,r=0;s!==null;)r=r|s.lanes|s.childLanes,s=s.sibling;s=r&~c}else s=0,e.child=null;return am(t,e,c,n,s)}if((n&536870912)!==0)e.memoizedState={baseLanes:0,cachePool:null},t!==null&&eo(e,c!==null?c.cachePool:null),c!==null?ih(e,c):uc(),lh(e);else return s=e.lanes=536870912,am(t,e,c!==null?c.baseLanes|n:n,n,s)}else c!==null?(eo(e,c.cachePool),ih(e,c),Da(),e.memoizedState=null):(t!==null&&eo(e,null),uc(),Da());return Ke(t,e,r,n),e.child}function Fi(t,e){return t!==null&&t.tag===22||e.stateNode!==null||(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),e.sibling}function am(t,e,n,s,r){var c=sc();return c=c===null?null:{parent:Ce._currentValue,pool:c},e.memoizedState={baseLanes:n,cachePool:c},t!==null&&eo(e,null),uc(),lh(e),t!==null&&Hs(t,e,s,!0),e.childLanes=r,null}function yo(t,e){return e=_o({mode:e.mode,children:e.children},t.mode),e.ref=t.ref,t.child=e,e.return=t,e}function sm(t,e,n){return cs(e,t.child,null,n),t=yo(e,e.pendingProps),t.flags|=2,vn(e),e.memoizedState=null,t}function k1(t,e,n){var s=e.pendingProps,r=(e.flags&128)!==0;if(e.flags&=-129,t===null){if(Bt){if(s.mode==="hidden")return t=yo(e,s),e.lanes=536870912,Fi(null,t);if(fc(e),(t=re)?(t=vp(t,Cn),t=t!==null&&t.data==="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:Sa!==null?{id:Hn,overflow:In}:null,retryLane:536870912,hydrationErrors:null},n=Hf(t),n.return=e,e.child=n,Ye=e,re=null)):t=null,t===null)throw xa(e);return e.lanes=536870912,null}return yo(e,s)}var c=t.memoizedState;if(c!==null){var m=c.dehydrated;if(fc(e),r)if(e.flags&256)e.flags&=-257,e=sm(t,e,n);else if(e.memoizedState!==null)e.child=t.child,e.flags|=128,e=null;else throw Error(o(558));else if(ke||Hs(t,e,n,!1),r=(n&t.childLanes)!==0,ke||r){if(s=ie,s!==null&&(m=xi(s,n),m!==0&&m!==c.retryLane))throw c.retryLane=m,es(t,m),dn(s,t,m),Rc;Do(),e=sm(t,e,n)}else t=c.treeContext,re=kn(m.nextSibling),Ye=e,Bt=!0,Ta=null,Cn=!1,t!==null&&Yf(e,t),e=yo(e,s),e.flags|=4096;return e}return t=ta(t.child,{mode:s.mode,children:s.children}),t.ref=e.ref,e.child=t,t.return=e,t}function bo(t,e){var n=e.ref;if(n===null)t!==null&&t.ref!==null&&(e.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(o(284));(t===null||t.ref!==n)&&(e.flags|=4194816)}}function Oc(t,e,n,s,r){return is(e),n=mc(t,e,n,s,void 0,r),s=pc(),t!==null&&!ke?(vc(t,e,r),la(t,e,r)):(Bt&&s&&Pr(e),e.flags|=1,Ke(t,e,n,r),e.child)}function im(t,e,n,s,r,c){return is(e),e.updateQueue=null,n=rh(e,s,n,r),oh(t),s=pc(),t!==null&&!ke?(vc(t,e,c),la(t,e,c)):(Bt&&s&&Pr(e),e.flags|=1,Ke(t,e,n,c),e.child)}function lm(t,e,n,s,r){if(is(e),e.stateNode===null){var c=Us,m=n.contextType;typeof m=="object"&&m!==null&&(c=Ze(m)),c=new n(s,c),e.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=wc,e.stateNode=c,c._reactInternals=e,c=e.stateNode,c.props=s,c.state=e.memoizedState,c.refs={},lc(e),m=n.contextType,c.context=typeof m=="object"&&m!==null?Ze(m):Us,c.state=e.memoizedState,m=n.getDerivedStateFromProps,typeof m=="function"&&(kc(e,n,m,s),c.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(m=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),m!==c.state&&wc.enqueueReplaceState(c,c.state,null),Zi(e,s,c,r),Yi(),c.state=e.memoizedState),typeof c.componentDidMount=="function"&&(e.flags|=4194308),s=!0}else if(t===null){c=e.stateNode;var y=e.memoizedProps,T=ds(n,y);c.props=T;var D=c.context,q=n.contextType;m=Us,typeof q=="object"&&q!==null&&(m=Ze(q));var Z=n.getDerivedStateFromProps;q=typeof Z=="function"||typeof c.getSnapshotBeforeUpdate=="function",y=e.pendingProps!==y,q||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(y||D!==m)&&Kh(e,c,s,m),Aa=!1;var k=e.memoizedState;c.state=k,Zi(e,s,c,r),Yi(),D=e.memoizedState,y||k!==D||Aa?(typeof Z=="function"&&(kc(e,n,Z,s),D=e.memoizedState),(T=Aa||Zh(e,n,T,s,k,D,m))?(q||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(e.flags|=4194308)):(typeof c.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=s,e.memoizedState=D),c.props=s,c.state=D,c.context=m,s=T):(typeof c.componentDidMount=="function"&&(e.flags|=4194308),s=!1)}else{c=e.stateNode,oc(t,e),m=e.memoizedProps,q=ds(n,m),c.props=q,Z=e.pendingProps,k=c.context,D=n.contextType,T=Us,typeof D=="object"&&D!==null&&(T=Ze(D)),y=n.getDerivedStateFromProps,(D=typeof y=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(m!==Z||k!==T)&&Kh(e,c,s,T),Aa=!1,k=e.memoizedState,c.state=k,Zi(e,s,c,r),Yi();var z=e.memoizedState;m!==Z||k!==z||Aa||t!==null&&t.dependencies!==null&&Wl(t.dependencies)?(typeof y=="function"&&(kc(e,n,y,s),z=e.memoizedState),(q=Aa||Zh(e,n,q,s,k,z,T)||t!==null&&t.dependencies!==null&&Wl(t.dependencies))?(D||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(s,z,T),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(s,z,T)),typeof c.componentDidUpdate=="function"&&(e.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof c.componentDidUpdate!="function"||m===t.memoizedProps&&k===t.memoizedState||(e.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||m===t.memoizedProps&&k===t.memoizedState||(e.flags|=1024),e.memoizedProps=s,e.memoizedState=z),c.props=s,c.state=z,c.context=T,s=q):(typeof c.componentDidUpdate!="function"||m===t.memoizedProps&&k===t.memoizedState||(e.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||m===t.memoizedProps&&k===t.memoizedState||(e.flags|=1024),s=!1)}return c=s,bo(t,e),s=(e.flags&128)!==0,c||s?(c=e.stateNode,n=s&&typeof n.getDerivedStateFromError!="function"?null:c.render(),e.flags|=1,t!==null&&s?(e.child=cs(e,t.child,null,r),e.child=cs(e,null,n,r)):Ke(t,e,n,r),e.memoizedState=c.state,t=e.child):t=la(t,e,r),t}function om(t,e,n,s){return as(),e.flags|=256,Ke(t,e,n,s),e.child}var zc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Bc(t){return{baseLanes:t,cachePool:Ff()}}function Uc(t,e,n){return t=t!==null?t.childLanes&~n:0,e&&(t|=yn),t}function rm(t,e,n){var s=e.pendingProps,r=!1,c=(e.flags&128)!==0,m;if((m=c)||(m=t!==null&&t.memoizedState===null?!1:(xe.current&2)!==0),m&&(r=!0,e.flags&=-129),m=(e.flags&32)!==0,e.flags&=-33,t===null){if(Bt){if(r?Ca(e):Da(),(t=re)?(t=vp(t,Cn),t=t!==null&&t.data!=="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:Sa!==null?{id:Hn,overflow:In}:null,retryLane:536870912,hydrationErrors:null},n=Hf(t),n.return=e,e.child=n,Ye=e,re=null)):t=null,t===null)throw xa(e);return bu(t)?e.lanes=32:e.lanes=536870912,null}var y=s.children;return s=s.fallback,r?(Da(),r=e.mode,y=_o({mode:"hidden",children:y},r),s=ns(s,r,n,null),y.return=e,s.return=e,y.sibling=s,e.child=y,s=e.child,s.memoizedState=Bc(n),s.childLanes=Uc(t,m,n),e.memoizedState=zc,Fi(null,s)):(Ca(e),Vc(e,y))}var T=t.memoizedState;if(T!==null&&(y=T.dehydrated,y!==null)){if(c)e.flags&256?(Ca(e),e.flags&=-257,e=Lc(t,e,n)):e.memoizedState!==null?(Da(),e.child=t.child,e.flags|=128,e=null):(Da(),y=s.fallback,r=e.mode,s=_o({mode:"visible",children:s.children},r),y=ns(y,r,n,null),y.flags|=2,s.return=e,y.return=e,s.sibling=y,e.child=s,cs(e,t.child,null,n),s=e.child,s.memoizedState=Bc(n),s.childLanes=Uc(t,m,n),e.memoizedState=zc,e=Fi(null,s));else if(Ca(e),bu(y)){if(m=y.nextSibling&&y.nextSibling.dataset,m)var D=m.dgst;m=D,s=Error(o(419)),s.stack="",s.digest=m,Vi({value:s,source:null,stack:null}),e=Lc(t,e,n)}else if(ke||Hs(t,e,n,!1),m=(n&t.childLanes)!==0,ke||m){if(m=ie,m!==null&&(s=xi(m,n),s!==0&&s!==T.retryLane))throw T.retryLane=s,es(t,s),dn(m,t,s),Rc;yu(y)||Do(),e=Lc(t,e,n)}else yu(y)?(e.flags|=192,e.child=t.child,e=null):(t=T.treeContext,re=kn(y.nextSibling),Ye=e,Bt=!0,Ta=null,Cn=!1,t!==null&&Yf(e,t),e=Vc(e,s.children),e.flags|=4096);return e}return r?(Da(),y=s.fallback,r=e.mode,T=t.child,D=T.sibling,s=ta(T,{mode:"hidden",children:s.children}),s.subtreeFlags=T.subtreeFlags&65011712,D!==null?y=ta(D,y):(y=ns(y,r,n,null),y.flags|=2),y.return=e,s.return=e,s.sibling=y,e.child=s,Fi(null,s),s=e.child,y=t.child.memoizedState,y===null?y=Bc(n):(r=y.cachePool,r!==null?(T=Ce._currentValue,r=r.parent!==T?{parent:T,pool:T}:r):r=Ff(),y={baseLanes:y.baseLanes|n,cachePool:r}),s.memoizedState=y,s.childLanes=Uc(t,m,n),e.memoizedState=zc,Fi(t.child,s)):(Ca(e),n=t.child,t=n.sibling,n=ta(n,{mode:"visible",children:s.children}),n.return=e,n.sibling=null,t!==null&&(m=e.deletions,m===null?(e.deletions=[t],e.flags|=16):m.push(t)),e.child=n,e.memoizedState=null,n)}function Vc(t,e){return e=_o({mode:"visible",children:e},t.mode),e.return=t,t.child=e}function _o(t,e){return t=mn(22,t,null,e),t.lanes=0,t}function Lc(t,e,n){return cs(e,t.child,null,n),t=Vc(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function cm(t,e,n){t.lanes|=e;var s=t.alternate;s!==null&&(s.lanes|=e),tc(t.return,e,n)}function qc(t,e,n,s,r,c){var m=t.memoizedState;m===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:s,tail:n,tailMode:r,treeForkCount:c}:(m.isBackwards=e,m.rendering=null,m.renderingStartTime=0,m.last=s,m.tail=n,m.tailMode=r,m.treeForkCount=c)}function um(t,e,n){var s=e.pendingProps,r=s.revealOrder,c=s.tail;s=s.children;var m=xe.current,y=(m&2)!==0;if(y?(m=m&1|2,e.flags|=128):m&=1,_t(xe,m),Ke(t,e,s,n),s=Bt?Ui:0,!y&&t!==null&&(t.flags&128)!==0)t:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&cm(t,n,e);else if(t.tag===19)cm(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;t.sibling===null;){if(t.return===null||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(r){case"forwards":for(n=e.child,r=null;n!==null;)t=n.alternate,t!==null&&oo(t)===null&&(r=n),n=n.sibling;n=r,n===null?(r=e.child,e.child=null):(r=n.sibling,n.sibling=null),qc(e,!1,r,n,c,s);break;case"backwards":case"unstable_legacy-backwards":for(n=null,r=e.child,e.child=null;r!==null;){if(t=r.alternate,t!==null&&oo(t)===null){e.child=r;break}t=r.sibling,r.sibling=n,n=r,r=t}qc(e,!0,n,null,c,s);break;case"together":qc(e,!1,null,null,void 0,s);break;default:e.memoizedState=null}return e.child}function la(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),Ma|=e.lanes,(n&e.childLanes)===0)if(t!==null){if(Hs(t,e,n,!1),(n&e.childLanes)===0)return null}else return null;if(t!==null&&e.child!==t.child)throw Error(o(153));if(e.child!==null){for(t=e.child,n=ta(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=ta(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function Hc(t,e){return(t.lanes&e)!==0?!0:(t=t.dependencies,!!(t!==null&&Wl(t)))}function w1(t,e,n){switch(e.tag){case 3:He(e,e.stateNode.containerInfo),ja(e,Ce,t.memoizedState.cache),as();break;case 27:case 5:nn(e);break;case 4:He(e,e.stateNode.containerInfo);break;case 10:ja(e,e.type,e.memoizedProps.value);break;case 31:if(e.memoizedState!==null)return e.flags|=128,fc(e),null;break;case 13:var s=e.memoizedState;if(s!==null)return s.dehydrated!==null?(Ca(e),e.flags|=128,null):(n&e.child.childLanes)!==0?rm(t,e,n):(Ca(e),t=la(t,e,n),t!==null?t.sibling:null);Ca(e);break;case 19:var r=(t.flags&128)!==0;if(s=(n&e.childLanes)!==0,s||(Hs(t,e,n,!1),s=(n&e.childLanes)!==0),r){if(s)return um(t,e,n);e.flags|=128}if(r=e.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),_t(xe,xe.current),s)break;return null;case 22:return e.lanes=0,nm(t,e,n,e.pendingProps);case 24:ja(e,Ce,t.memoizedState.cache)}return la(t,e,n)}function dm(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps)ke=!0;else{if(!Hc(t,n)&&(e.flags&128)===0)return ke=!1,w1(t,e,n);ke=(t.flags&131072)!==0}else ke=!1,Bt&&(e.flags&1048576)!==0&&Gf(e,Ui,e.index);switch(e.lanes=0,e.tag){case 16:t:{var s=e.pendingProps;if(t=os(e.elementType),e.type=t,typeof t=="function")Kr(t)?(s=ds(t,s),e.tag=1,e=lm(null,e,t,s,n)):(e.tag=0,e=Oc(null,e,t,s,n));else{if(t!=null){var r=t.$$typeof;if(r===et){e.tag=11,e=Wh(null,e,t,s,n);break t}else if(r===tt){e.tag=14,e=tm(null,e,t,s,n);break t}}throw e=st(t)||t,Error(o(306,e,""))}}return e;case 0:return Oc(t,e,e.type,e.pendingProps,n);case 1:return s=e.type,r=ds(s,e.pendingProps),lm(t,e,s,r,n);case 3:t:{if(He(e,e.stateNode.containerInfo),t===null)throw Error(o(387));s=e.pendingProps;var c=e.memoizedState;r=c.element,oc(t,e),Zi(e,s,null,n);var m=e.memoizedState;if(s=m.cache,ja(e,Ce,s),s!==c.cache&&ec(e,[Ce],n,!0),Yi(),s=m.element,c.isDehydrated)if(c={element:s,isDehydrated:!1,cache:m.cache},e.updateQueue.baseState=c,e.memoizedState=c,e.flags&256){e=om(t,e,s,n);break t}else if(s!==r){r=An(Error(o(424)),e),Vi(r),e=om(t,e,s,n);break t}else{switch(t=e.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(re=kn(t.firstChild),Ye=e,Bt=!0,Ta=null,Cn=!0,n=nh(e,null,s,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(as(),s===r){e=la(t,e,n);break t}Ke(t,e,s,n)}e=e.child}return e;case 26:return bo(t,e),t===null?(n=Tp(e.type,null,e.pendingProps,null))?e.memoizedState=n:Bt||(n=e.type,t=e.pendingProps,s=Bo(ye.current).createElement(n),s[Ee]=e,s[Ge]=t,Xe(s,n,t),Ve(s),e.stateNode=s):e.memoizedState=Tp(e.type,t.memoizedProps,e.pendingProps,t.memoizedState),null;case 27:return nn(e),t===null&&Bt&&(s=e.stateNode=bp(e.type,e.pendingProps,ye.current),Ye=e,Cn=!0,r=re,Ua(e.type)?(_u=r,re=kn(s.firstChild)):re=r),Ke(t,e,e.pendingProps.children,n),bo(t,e),t===null&&(e.flags|=4194304),e.child;case 5:return t===null&&Bt&&((r=s=re)&&(s=ob(s,e.type,e.pendingProps,Cn),s!==null?(e.stateNode=s,Ye=e,re=kn(s.firstChild),Cn=!1,r=!0):r=!1),r||xa(e)),nn(e),r=e.type,c=e.pendingProps,m=t!==null?t.memoizedProps:null,s=c.children,pu(r,c)?s=null:m!==null&&pu(r,m)&&(e.flags|=32),e.memoizedState!==null&&(r=mc(t,e,T1,null,null,n),dl._currentValue=r),bo(t,e),Ke(t,e,s,n),e.child;case 6:return t===null&&Bt&&((t=n=re)&&(n=rb(n,e.pendingProps,Cn),n!==null?(e.stateNode=n,Ye=e,re=null,t=!0):t=!1),t||xa(e)),null;case 13:return rm(t,e,n);case 4:return He(e,e.stateNode.containerInfo),s=e.pendingProps,t===null?e.child=cs(e,null,s,n):Ke(t,e,s,n),e.child;case 11:return Wh(t,e,e.type,e.pendingProps,n);case 7:return Ke(t,e,e.pendingProps,n),e.child;case 8:return Ke(t,e,e.pendingProps.children,n),e.child;case 12:return Ke(t,e,e.pendingProps.children,n),e.child;case 10:return s=e.pendingProps,ja(e,e.type,s.value),Ke(t,e,s.children,n),e.child;case 9:return r=e.type._context,s=e.pendingProps.children,is(e),r=Ze(r),s=s(r),e.flags|=1,Ke(t,e,s,n),e.child;case 14:return tm(t,e,e.type,e.pendingProps,n);case 15:return em(t,e,e.type,e.pendingProps,n);case 19:return um(t,e,n);case 31:return k1(t,e,n);case 22:return nm(t,e,n,e.pendingProps);case 24:return is(e),s=Ze(Ce),t===null?(r=sc(),r===null&&(r=ie,c=nc(),r.pooledCache=c,c.refCount++,c!==null&&(r.pooledCacheLanes|=n),r=c),e.memoizedState={parent:s,cache:r},lc(e),ja(e,Ce,r)):((t.lanes&n)!==0&&(oc(t,e),Zi(e,null,null,n),Yi()),r=t.memoizedState,c=e.memoizedState,r.parent!==s?(r={parent:s,cache:s},e.memoizedState=r,e.lanes===0&&(e.memoizedState=e.updateQueue.baseState=r),ja(e,Ce,s)):(s=c.cache,ja(e,Ce,s),s!==r.cache&&ec(e,[Ce],n,!0))),Ke(t,e,e.pendingProps.children,n),e.child;case 29:throw e.pendingProps}throw Error(o(156,e.tag))}function oa(t){t.flags|=4}function Ic(t,e,n,s,r){if((e=(t.mode&32)!==0)&&(e=!1),e){if(t.flags|=16777216,(r&335544128)===r)if(t.stateNode.complete)t.flags|=8192;else if(Vm())t.flags|=8192;else throw rs=ao,ic}else t.flags&=-16777217}function fm(t,e){if(e.type!=="stylesheet"||(e.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Ep(e))if(Vm())t.flags|=8192;else throw rs=ao,ic}function So(t,e){e!==null&&(t.flags|=4),t.flags&16384&&(e=t.tag!==22?ya():536870912,t.lanes|=e,Ws|=e)}function Ji(t,e){if(!Bt)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var s=null;n!==null;)n.alternate!==null&&(s=n),n=n.sibling;s===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:s.sibling=null}}function ce(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,s=0;if(e)for(var r=t.child;r!==null;)n|=r.lanes|r.childLanes,s|=r.subtreeFlags&65011712,s|=r.flags&65011712,r.return=t,r=r.sibling;else for(r=t.child;r!==null;)n|=r.lanes|r.childLanes,s|=r.subtreeFlags,s|=r.flags,r.return=t,r=r.sibling;return t.subtreeFlags|=s,t.childLanes=n,e}function M1(t,e,n){var s=e.pendingProps;switch(Fr(e),e.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ce(e),null;case 1:return ce(e),null;case 3:return n=e.stateNode,s=null,t!==null&&(s=t.memoizedState.cache),e.memoizedState.cache!==s&&(e.flags|=2048),aa(Ce),Wt(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(qs(e)?oa(e):t===null||t.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,$r())),ce(e),null;case 26:var r=e.type,c=e.memoizedState;return t===null?(oa(e),c!==null?(ce(e),fm(e,c)):(ce(e),Ic(e,r,null,s,n))):c?c!==t.memoizedState?(oa(e),ce(e),fm(e,c)):(ce(e),e.flags&=-16777217):(t=t.memoizedProps,t!==s&&oa(e),ce(e),Ic(e,r,t,s,n)),null;case 27:if(Ue(e),n=ye.current,r=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==s&&oa(e);else{if(!s){if(e.stateNode===null)throw Error(o(166));return ce(e),null}t=G.current,qs(e)?Zf(e):(t=bp(r,s,n),e.stateNode=t,oa(e))}return ce(e),null;case 5:if(Ue(e),r=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==s&&oa(e);else{if(!s){if(e.stateNode===null)throw Error(o(166));return ce(e),null}if(c=G.current,qs(e))Zf(e);else{var m=Bo(ye.current);switch(c){case 1:c=m.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:c=m.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":c=m.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":c=m.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":c=m.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof s.is=="string"?m.createElement("select",{is:s.is}):m.createElement("select"),s.multiple?c.multiple=!0:s.size&&(c.size=s.size);break;default:c=typeof s.is=="string"?m.createElement(r,{is:s.is}):m.createElement(r)}}c[Ee]=e,c[Ge]=s;t:for(m=e.child;m!==null;){if(m.tag===5||m.tag===6)c.appendChild(m.stateNode);else if(m.tag!==4&&m.tag!==27&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===e)break t;for(;m.sibling===null;){if(m.return===null||m.return===e)break t;m=m.return}m.sibling.return=m.return,m=m.sibling}e.stateNode=c;t:switch(Xe(c,r,s),r){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break t;case"img":s=!0;break t;default:s=!1}s&&oa(e)}}return ce(e),Ic(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,n),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==s&&oa(e);else{if(typeof s!="string"&&e.stateNode===null)throw Error(o(166));if(t=ye.current,qs(e)){if(t=e.stateNode,n=e.memoizedProps,s=null,r=Ye,r!==null)switch(r.tag){case 27:case 5:s=r.memoizedProps}t[Ee]=e,t=!!(t.nodeValue===n||s!==null&&s.suppressHydrationWarning===!0||rp(t.nodeValue,n)),t||xa(e,!0)}else t=Bo(t).createTextNode(s),t[Ee]=e,e.stateNode=t}return ce(e),null;case 31:if(n=e.memoizedState,t===null||t.memoizedState!==null){if(s=qs(e),n!==null){if(t===null){if(!s)throw Error(o(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(557));t[Ee]=e}else as(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;ce(e),t=!1}else n=$r(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=n),t=!0;if(!t)return e.flags&256?(vn(e),e):(vn(e),null);if((e.flags&128)!==0)throw Error(o(558))}return ce(e),null;case 13:if(s=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(r=qs(e),s!==null&&s.dehydrated!==null){if(t===null){if(!r)throw Error(o(318));if(r=e.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(o(317));r[Ee]=e}else as(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;ce(e),r=!1}else r=$r(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=r),r=!0;if(!r)return e.flags&256?(vn(e),e):(vn(e),null)}return vn(e),(e.flags&128)!==0?(e.lanes=n,e):(n=s!==null,t=t!==null&&t.memoizedState!==null,n&&(s=e.child,r=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(r=s.alternate.memoizedState.cachePool.pool),c=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(c=s.memoizedState.cachePool.pool),c!==r&&(s.flags|=2048)),n!==t&&n&&(e.child.flags|=8192),So(e,e.updateQueue),ce(e),null);case 4:return Wt(),t===null&&uu(e.stateNode.containerInfo),ce(e),null;case 10:return aa(e.type),ce(e),null;case 19:if(bt(xe),s=e.memoizedState,s===null)return ce(e),null;if(r=(e.flags&128)!==0,c=s.rendering,c===null)if(r)Ji(s,!1);else{if(_e!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(c=oo(t),c!==null){for(e.flags|=128,Ji(s,!1),t=c.updateQueue,e.updateQueue=t,So(e,t),e.subtreeFlags=0,t=n,n=e.child;n!==null;)qf(n,t),n=n.sibling;return _t(xe,xe.current&1|2),Bt&&ea(e,s.treeForkCount),e.child}t=t.sibling}s.tail!==null&&ht()>No&&(e.flags|=128,r=!0,Ji(s,!1),e.lanes=4194304)}else{if(!r)if(t=oo(c),t!==null){if(e.flags|=128,r=!0,t=t.updateQueue,e.updateQueue=t,So(e,t),Ji(s,!0),s.tail===null&&s.tailMode==="hidden"&&!c.alternate&&!Bt)return ce(e),null}else 2*ht()-s.renderingStartTime>No&&n!==536870912&&(e.flags|=128,r=!0,Ji(s,!1),e.lanes=4194304);s.isBackwards?(c.sibling=e.child,e.child=c):(t=s.last,t!==null?t.sibling=c:e.child=c,s.last=c)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=ht(),t.sibling=null,n=xe.current,_t(xe,r?n&1|2:n&1),Bt&&ea(e,s.treeForkCount),t):(ce(e),null);case 22:case 23:return vn(e),dc(),s=e.memoizedState!==null,t!==null?t.memoizedState!==null!==s&&(e.flags|=8192):s&&(e.flags|=8192),s?(n&536870912)!==0&&(e.flags&128)===0&&(ce(e),e.subtreeFlags&6&&(e.flags|=8192)):ce(e),n=e.updateQueue,n!==null&&So(e,n.retryQueue),n=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),s=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),s!==n&&(e.flags|=2048),t!==null&&bt(ls),null;case 24:return n=null,t!==null&&(n=t.memoizedState.cache),e.memoizedState.cache!==n&&(e.flags|=2048),aa(Ce),ce(e),null;case 25:return null;case 30:return null}throw Error(o(156,e.tag))}function R1(t,e){switch(Fr(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return aa(Ce),Wt(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return Ue(e),null;case 31:if(e.memoizedState!==null){if(vn(e),e.alternate===null)throw Error(o(340));as()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(vn(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(o(340));as()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return bt(xe),null;case 4:return Wt(),null;case 10:return aa(e.type),null;case 22:case 23:return vn(e),dc(),t!==null&&bt(ls),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return aa(Ce),null;case 25:return null;default:return null}}function hm(t,e){switch(Fr(e),e.tag){case 3:aa(Ce),Wt();break;case 26:case 27:case 5:Ue(e);break;case 4:Wt();break;case 31:e.memoizedState!==null&&vn(e);break;case 13:vn(e);break;case 19:bt(xe);break;case 10:aa(e.type);break;case 22:case 23:vn(e),dc(),t!==null&&bt(ls);break;case 24:aa(Ce)}}function $i(t,e){try{var n=e.updateQueue,s=n!==null?n.lastEffect:null;if(s!==null){var r=s.next;n=r;do{if((n.tag&t)===t){s=void 0;var c=n.create,m=n.inst;s=c(),m.destroy=s}n=n.next}while(n!==r)}}catch(y){$t(e,e.return,y)}}function ka(t,e,n){try{var s=e.updateQueue,r=s!==null?s.lastEffect:null;if(r!==null){var c=r.next;s=c;do{if((s.tag&t)===t){var m=s.inst,y=m.destroy;if(y!==void 0){m.destroy=void 0,r=e;var T=n,D=y;try{D()}catch(q){$t(r,T,q)}}}s=s.next}while(s!==c)}}catch(q){$t(e,e.return,q)}}function mm(t){var e=t.updateQueue;if(e!==null){var n=t.stateNode;try{sh(e,n)}catch(s){$t(t,t.return,s)}}}function pm(t,e,n){n.props=ds(t.type,t.memoizedProps),n.state=t.memoizedState;try{n.componentWillUnmount()}catch(s){$t(t,e,s)}}function Wi(t,e){try{var n=t.ref;if(n!==null){switch(t.tag){case 26:case 27:case 5:var s=t.stateNode;break;case 30:s=t.stateNode;break;default:s=t.stateNode}typeof n=="function"?t.refCleanup=n(s):n.current=s}}catch(r){$t(t,e,r)}}function Gn(t,e){var n=t.ref,s=t.refCleanup;if(n!==null)if(typeof s=="function")try{s()}catch(r){$t(t,e,r)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(r){$t(t,e,r)}else n.current=null}function vm(t){var e=t.type,n=t.memoizedProps,s=t.stateNode;try{t:switch(e){case"button":case"input":case"select":case"textarea":n.autoFocus&&s.focus();break t;case"img":n.src?s.src=n.src:n.srcSet&&(s.srcset=n.srcSet)}}catch(r){$t(t,t.return,r)}}function Gc(t,e,n){try{var s=t.stateNode;eb(s,t.type,n,e),s[Ge]=e}catch(r){$t(t,t.return,r)}}function gm(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Ua(t.type)||t.tag===4}function Yc(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||gm(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Ua(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Zc(t,e,n){var s=t.tag;if(s===5||s===6)t=t.stateNode,e?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(t,e):(e=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,e.appendChild(t),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=$n));else if(s!==4&&(s===27&&Ua(t.type)&&(n=t.stateNode,e=null),t=t.child,t!==null))for(Zc(t,e,n),t=t.sibling;t!==null;)Zc(t,e,n),t=t.sibling}function To(t,e,n){var s=t.tag;if(s===5||s===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(s!==4&&(s===27&&Ua(t.type)&&(n=t.stateNode),t=t.child,t!==null))for(To(t,e,n),t=t.sibling;t!==null;)To(t,e,n),t=t.sibling}function ym(t){var e=t.stateNode,n=t.memoizedProps;try{for(var s=t.type,r=e.attributes;r.length;)e.removeAttributeNode(r[0]);Xe(e,s,n),e[Ee]=t,e[Ge]=n}catch(c){$t(t,t.return,c)}}var ra=!1,we=!1,Kc=!1,bm=typeof WeakSet=="function"?WeakSet:Set,Le=null;function O1(t,e){if(t=t.containerInfo,hu=Go,t=wf(t),Lr(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else t:{n=(n=t.ownerDocument)&&n.defaultView||window;var s=n.getSelection&&n.getSelection();if(s&&s.rangeCount!==0){n=s.anchorNode;var r=s.anchorOffset,c=s.focusNode;s=s.focusOffset;try{n.nodeType,c.nodeType}catch{n=null;break t}var m=0,y=-1,T=-1,D=0,q=0,Z=t,k=null;e:for(;;){for(var z;Z!==n||r!==0&&Z.nodeType!==3||(y=m+r),Z!==c||s!==0&&Z.nodeType!==3||(T=m+s),Z.nodeType===3&&(m+=Z.nodeValue.length),(z=Z.firstChild)!==null;)k=Z,Z=z;for(;;){if(Z===t)break e;if(k===n&&++D===r&&(y=m),k===c&&++q===s&&(T=m),(z=Z.nextSibling)!==null)break;Z=k,k=Z.parentNode}Z=z}n=y===-1||T===-1?null:{start:y,end:T}}else n=null}n=n||{start:0,end:0}}else n=null;for(mu={focusedElem:t,selectionRange:n},Go=!1,Le=e;Le!==null;)if(e=Le,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Le=t;else for(;Le!==null;){switch(e=Le,c=e.alternate,t=e.flags,e.tag){case 0:if((t&4)!==0&&(t=e.updateQueue,t=t!==null?t.events:null,t!==null))for(n=0;n<t.length;n++)r=t[n],r.ref.impl=r.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&c!==null){t=void 0,n=e,r=c.memoizedProps,c=c.memoizedState,s=n.stateNode;try{var rt=ds(n.type,r);t=s.getSnapshotBeforeUpdate(rt,c),s.__reactInternalSnapshotBeforeUpdate=t}catch(gt){$t(n,n.return,gt)}}break;case 3:if((t&1024)!==0){if(t=e.stateNode.containerInfo,n=t.nodeType,n===9)gu(t);else if(n===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":gu(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(o(163))}if(t=e.sibling,t!==null){t.return=e.return,Le=t;break}Le=e.return}}function _m(t,e,n){var s=n.flags;switch(n.tag){case 0:case 11:case 15:ua(t,n),s&4&&$i(5,n);break;case 1:if(ua(t,n),s&4)if(t=n.stateNode,e===null)try{t.componentDidMount()}catch(m){$t(n,n.return,m)}else{var r=ds(n.type,e.memoizedProps);e=e.memoizedState;try{t.componentDidUpdate(r,e,t.__reactInternalSnapshotBeforeUpdate)}catch(m){$t(n,n.return,m)}}s&64&&mm(n),s&512&&Wi(n,n.return);break;case 3:if(ua(t,n),s&64&&(t=n.updateQueue,t!==null)){if(e=null,n.child!==null)switch(n.child.tag){case 27:case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}try{sh(t,e)}catch(m){$t(n,n.return,m)}}break;case 27:e===null&&s&4&&ym(n);case 26:case 5:ua(t,n),e===null&&s&4&&vm(n),s&512&&Wi(n,n.return);break;case 12:ua(t,n);break;case 31:ua(t,n),s&4&&xm(t,n);break;case 13:ua(t,n),s&4&&jm(t,n),s&64&&(t=n.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(n=G1.bind(null,n),cb(t,n))));break;case 22:if(s=n.memoizedState!==null||ra,!s){e=e!==null&&e.memoizedState!==null||we,r=ra;var c=we;ra=s,(we=e)&&!c?da(t,n,(n.subtreeFlags&8772)!==0):ua(t,n),ra=r,we=c}break;case 30:break;default:ua(t,n)}}function Sm(t){var e=t.alternate;e!==null&&(t.alternate=null,Sm(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&Ni(e)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var he=null,on=!1;function ca(t,e,n){for(n=n.child;n!==null;)Tm(t,e,n),n=n.sibling}function Tm(t,e,n){if(Re&&typeof Re.onCommitFiberUnmount=="function")try{Re.onCommitFiberUnmount(Ie,n)}catch{}switch(n.tag){case 26:we||Gn(n,e),ca(t,e,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:we||Gn(n,e);var s=he,r=on;Ua(n.type)&&(he=n.stateNode,on=!1),ca(t,e,n),rl(n.stateNode),he=s,on=r;break;case 5:we||Gn(n,e);case 6:if(s=he,r=on,he=null,ca(t,e,n),he=s,on=r,he!==null)if(on)try{(he.nodeType===9?he.body:he.nodeName==="HTML"?he.ownerDocument.body:he).removeChild(n.stateNode)}catch(c){$t(n,e,c)}else try{he.removeChild(n.stateNode)}catch(c){$t(n,e,c)}break;case 18:he!==null&&(on?(t=he,mp(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,n.stateNode),oi(t)):mp(he,n.stateNode));break;case 4:s=he,r=on,he=n.stateNode.containerInfo,on=!0,ca(t,e,n),he=s,on=r;break;case 0:case 11:case 14:case 15:ka(2,n,e),we||ka(4,n,e),ca(t,e,n);break;case 1:we||(Gn(n,e),s=n.stateNode,typeof s.componentWillUnmount=="function"&&pm(n,e,s)),ca(t,e,n);break;case 21:ca(t,e,n);break;case 22:we=(s=we)||n.memoizedState!==null,ca(t,e,n),we=s;break;default:ca(t,e,n)}}function xm(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{oi(t)}catch(n){$t(e,e.return,n)}}}function jm(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{oi(t)}catch(n){$t(e,e.return,n)}}function z1(t){switch(t.tag){case 31:case 13:case 19:var e=t.stateNode;return e===null&&(e=t.stateNode=new bm),e;case 22:return t=t.stateNode,e=t._retryCache,e===null&&(e=t._retryCache=new bm),e;default:throw Error(o(435,t.tag))}}function xo(t,e){var n=z1(t);e.forEach(function(s){if(!n.has(s)){n.add(s);var r=Y1.bind(null,t,s);s.then(r,r)}})}function rn(t,e){var n=e.deletions;if(n!==null)for(var s=0;s<n.length;s++){var r=n[s],c=t,m=e,y=m;t:for(;y!==null;){switch(y.tag){case 27:if(Ua(y.type)){he=y.stateNode,on=!1;break t}break;case 5:he=y.stateNode,on=!1;break t;case 3:case 4:he=y.stateNode.containerInfo,on=!0;break t}y=y.return}if(he===null)throw Error(o(160));Tm(c,m,r),he=null,on=!1,c=r.alternate,c!==null&&(c.return=null),r.return=null}if(e.subtreeFlags&13886)for(e=e.child;e!==null;)Am(e,t),e=e.sibling}var Un=null;function Am(t,e){var n=t.alternate,s=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:rn(e,t),cn(t),s&4&&(ka(3,t,t.return),$i(3,t),ka(5,t,t.return));break;case 1:rn(e,t),cn(t),s&512&&(we||n===null||Gn(n,n.return)),s&64&&ra&&(t=t.updateQueue,t!==null&&(s=t.callbacks,s!==null&&(n=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=n===null?s:n.concat(s))));break;case 26:var r=Un;if(rn(e,t),cn(t),s&512&&(we||n===null||Gn(n,n.return)),s&4){var c=n!==null?n.memoizedState:null;if(s=t.memoizedState,n===null)if(s===null)if(t.stateNode===null){t:{s=t.type,n=t.memoizedProps,r=r.ownerDocument||r;e:switch(s){case"title":c=r.getElementsByTagName("title")[0],(!c||c[qn]||c[Ee]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=r.createElement(s),r.head.insertBefore(c,r.querySelector("head > title"))),Xe(c,s,n),c[Ee]=t,Ve(c),s=c;break t;case"link":var m=Ap("link","href",r).get(s+(n.href||""));if(m){for(var y=0;y<m.length;y++)if(c=m[y],c.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&c.getAttribute("rel")===(n.rel==null?null:n.rel)&&c.getAttribute("title")===(n.title==null?null:n.title)&&c.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){m.splice(y,1);break e}}c=r.createElement(s),Xe(c,s,n),r.head.appendChild(c);break;case"meta":if(m=Ap("meta","content",r).get(s+(n.content||""))){for(y=0;y<m.length;y++)if(c=m[y],c.getAttribute("content")===(n.content==null?null:""+n.content)&&c.getAttribute("name")===(n.name==null?null:n.name)&&c.getAttribute("property")===(n.property==null?null:n.property)&&c.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&c.getAttribute("charset")===(n.charSet==null?null:n.charSet)){m.splice(y,1);break e}}c=r.createElement(s),Xe(c,s,n),r.head.appendChild(c);break;default:throw Error(o(468,s))}c[Ee]=t,Ve(c),s=c}t.stateNode=s}else Np(r,t.type,t.stateNode);else t.stateNode=jp(r,s,t.memoizedProps);else c!==s?(c===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):c.count--,s===null?Np(r,t.type,t.stateNode):jp(r,s,t.memoizedProps)):s===null&&t.stateNode!==null&&Gc(t,t.memoizedProps,n.memoizedProps)}break;case 27:rn(e,t),cn(t),s&512&&(we||n===null||Gn(n,n.return)),n!==null&&s&4&&Gc(t,t.memoizedProps,n.memoizedProps);break;case 5:if(rn(e,t),cn(t),s&512&&(we||n===null||Gn(n,n.return)),t.flags&32){r=t.stateNode;try{ks(r,"")}catch(rt){$t(t,t.return,rt)}}s&4&&t.stateNode!=null&&(r=t.memoizedProps,Gc(t,r,n!==null?n.memoizedProps:r)),s&1024&&(Kc=!0);break;case 6:if(rn(e,t),cn(t),s&4){if(t.stateNode===null)throw Error(o(162));s=t.memoizedProps,n=t.stateNode;try{n.nodeValue=s}catch(rt){$t(t,t.return,rt)}}break;case 3:if(Lo=null,r=Un,Un=Uo(e.containerInfo),rn(e,t),Un=r,cn(t),s&4&&n!==null&&n.memoizedState.isDehydrated)try{oi(e.containerInfo)}catch(rt){$t(t,t.return,rt)}Kc&&(Kc=!1,Nm(t));break;case 4:s=Un,Un=Uo(t.stateNode.containerInfo),rn(e,t),cn(t),Un=s;break;case 12:rn(e,t),cn(t);break;case 31:rn(e,t),cn(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,xo(t,s)));break;case 13:rn(e,t),cn(t),t.child.flags&8192&&t.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Ao=ht()),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,xo(t,s)));break;case 22:r=t.memoizedState!==null;var T=n!==null&&n.memoizedState!==null,D=ra,q=we;if(ra=D||r,we=q||T,rn(e,t),we=q,ra=D,cn(t),s&8192)t:for(e=t.stateNode,e._visibility=r?e._visibility&-2:e._visibility|1,r&&(n===null||T||ra||we||fs(t)),n=null,e=t;;){if(e.tag===5||e.tag===26){if(n===null){T=n=e;try{if(c=T.stateNode,r)m=c.style,typeof m.setProperty=="function"?m.setProperty("display","none","important"):m.display="none";else{y=T.stateNode;var Z=T.memoizedProps.style,k=Z!=null&&Z.hasOwnProperty("display")?Z.display:null;y.style.display=k==null||typeof k=="boolean"?"":(""+k).trim()}}catch(rt){$t(T,T.return,rt)}}}else if(e.tag===6){if(n===null){T=e;try{T.stateNode.nodeValue=r?"":T.memoizedProps}catch(rt){$t(T,T.return,rt)}}}else if(e.tag===18){if(n===null){T=e;try{var z=T.stateNode;r?pp(z,!0):pp(T.stateNode,!1)}catch(rt){$t(T,T.return,rt)}}}else if((e.tag!==22&&e.tag!==23||e.memoizedState===null||e===t)&&e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break t;for(;e.sibling===null;){if(e.return===null||e.return===t)break t;n===e&&(n=null),e=e.return}n===e&&(n=null),e.sibling.return=e.return,e=e.sibling}s&4&&(s=t.updateQueue,s!==null&&(n=s.retryQueue,n!==null&&(s.retryQueue=null,xo(t,n))));break;case 19:rn(e,t),cn(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,xo(t,s)));break;case 30:break;case 21:break;default:rn(e,t),cn(t)}}function cn(t){var e=t.flags;if(e&2){try{for(var n,s=t.return;s!==null;){if(gm(s)){n=s;break}s=s.return}if(n==null)throw Error(o(160));switch(n.tag){case 27:var r=n.stateNode,c=Yc(t);To(t,c,r);break;case 5:var m=n.stateNode;n.flags&32&&(ks(m,""),n.flags&=-33);var y=Yc(t);To(t,y,m);break;case 3:case 4:var T=n.stateNode.containerInfo,D=Yc(t);Zc(t,D,T);break;default:throw Error(o(161))}}catch(q){$t(t,t.return,q)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function Nm(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var e=t;Nm(e),e.tag===5&&e.flags&1024&&e.stateNode.reset(),t=t.sibling}}function ua(t,e){if(e.subtreeFlags&8772)for(e=e.child;e!==null;)_m(t,e.alternate,e),e=e.sibling}function fs(t){for(t=t.child;t!==null;){var e=t;switch(e.tag){case 0:case 11:case 14:case 15:ka(4,e,e.return),fs(e);break;case 1:Gn(e,e.return);var n=e.stateNode;typeof n.componentWillUnmount=="function"&&pm(e,e.return,n),fs(e);break;case 27:rl(e.stateNode);case 26:case 5:Gn(e,e.return),fs(e);break;case 22:e.memoizedState===null&&fs(e);break;case 30:fs(e);break;default:fs(e)}t=t.sibling}}function da(t,e,n){for(n=n&&(e.subtreeFlags&8772)!==0,e=e.child;e!==null;){var s=e.alternate,r=t,c=e,m=c.flags;switch(c.tag){case 0:case 11:case 15:da(r,c,n),$i(4,c);break;case 1:if(da(r,c,n),s=c,r=s.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(D){$t(s,s.return,D)}if(s=c,r=s.updateQueue,r!==null){var y=s.stateNode;try{var T=r.shared.hiddenCallbacks;if(T!==null)for(r.shared.hiddenCallbacks=null,r=0;r<T.length;r++)ah(T[r],y)}catch(D){$t(s,s.return,D)}}n&&m&64&&mm(c),Wi(c,c.return);break;case 27:ym(c);case 26:case 5:da(r,c,n),n&&s===null&&m&4&&vm(c),Wi(c,c.return);break;case 12:da(r,c,n);break;case 31:da(r,c,n),n&&m&4&&xm(r,c);break;case 13:da(r,c,n),n&&m&4&&jm(r,c);break;case 22:c.memoizedState===null&&da(r,c,n),Wi(c,c.return);break;case 30:break;default:da(r,c,n)}e=e.sibling}}function Xc(t,e){var n=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),t=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(t=e.memoizedState.cachePool.pool),t!==n&&(t!=null&&t.refCount++,n!=null&&Li(n))}function Qc(t,e){t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&Li(t))}function Vn(t,e,n,s){if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Em(t,e,n,s),e=e.sibling}function Em(t,e,n,s){var r=e.flags;switch(e.tag){case 0:case 11:case 15:Vn(t,e,n,s),r&2048&&$i(9,e);break;case 1:Vn(t,e,n,s);break;case 3:Vn(t,e,n,s),r&2048&&(t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&Li(t)));break;case 12:if(r&2048){Vn(t,e,n,s),t=e.stateNode;try{var c=e.memoizedProps,m=c.id,y=c.onPostCommit;typeof y=="function"&&y(m,e.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(T){$t(e,e.return,T)}}else Vn(t,e,n,s);break;case 31:Vn(t,e,n,s);break;case 13:Vn(t,e,n,s);break;case 23:break;case 22:c=e.stateNode,m=e.alternate,e.memoizedState!==null?c._visibility&2?Vn(t,e,n,s):tl(t,e):c._visibility&2?Vn(t,e,n,s):(c._visibility|=2,Fs(t,e,n,s,(e.subtreeFlags&10256)!==0||!1)),r&2048&&Xc(m,e);break;case 24:Vn(t,e,n,s),r&2048&&Qc(e.alternate,e);break;default:Vn(t,e,n,s)}}function Fs(t,e,n,s,r){for(r=r&&((e.subtreeFlags&10256)!==0||!1),e=e.child;e!==null;){var c=t,m=e,y=n,T=s,D=m.flags;switch(m.tag){case 0:case 11:case 15:Fs(c,m,y,T,r),$i(8,m);break;case 23:break;case 22:var q=m.stateNode;m.memoizedState!==null?q._visibility&2?Fs(c,m,y,T,r):tl(c,m):(q._visibility|=2,Fs(c,m,y,T,r)),r&&D&2048&&Xc(m.alternate,m);break;case 24:Fs(c,m,y,T,r),r&&D&2048&&Qc(m.alternate,m);break;default:Fs(c,m,y,T,r)}e=e.sibling}}function tl(t,e){if(e.subtreeFlags&10256)for(e=e.child;e!==null;){var n=t,s=e,r=s.flags;switch(s.tag){case 22:tl(n,s),r&2048&&Xc(s.alternate,s);break;case 24:tl(n,s),r&2048&&Qc(s.alternate,s);break;default:tl(n,s)}e=e.sibling}}var el=8192;function Js(t,e,n){if(t.subtreeFlags&el)for(t=t.child;t!==null;)Cm(t,e,n),t=t.sibling}function Cm(t,e,n){switch(t.tag){case 26:Js(t,e,n),t.flags&el&&t.memoizedState!==null&&Sb(n,Un,t.memoizedState,t.memoizedProps);break;case 5:Js(t,e,n);break;case 3:case 4:var s=Un;Un=Uo(t.stateNode.containerInfo),Js(t,e,n),Un=s;break;case 22:t.memoizedState===null&&(s=t.alternate,s!==null&&s.memoizedState!==null?(s=el,el=16777216,Js(t,e,n),el=s):Js(t,e,n));break;default:Js(t,e,n)}}function Dm(t){var e=t.alternate;if(e!==null&&(t=e.child,t!==null)){e.child=null;do e=t.sibling,t.sibling=null,t=e;while(t!==null)}}function nl(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var n=0;n<e.length;n++){var s=e[n];Le=s,wm(s,t)}Dm(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)km(t),t=t.sibling}function km(t){switch(t.tag){case 0:case 11:case 15:nl(t),t.flags&2048&&ka(9,t,t.return);break;case 3:nl(t);break;case 12:nl(t);break;case 22:var e=t.stateNode;t.memoizedState!==null&&e._visibility&2&&(t.return===null||t.return.tag!==13)?(e._visibility&=-3,jo(t)):nl(t);break;default:nl(t)}}function jo(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var n=0;n<e.length;n++){var s=e[n];Le=s,wm(s,t)}Dm(t)}for(t=t.child;t!==null;){switch(e=t,e.tag){case 0:case 11:case 15:ka(8,e,e.return),jo(e);break;case 22:n=e.stateNode,n._visibility&2&&(n._visibility&=-3,jo(e));break;default:jo(e)}t=t.sibling}}function wm(t,e){for(;Le!==null;){var n=Le;switch(n.tag){case 0:case 11:case 15:ka(8,n,e);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var s=n.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:Li(n.memoizedState.cache)}if(s=n.child,s!==null)s.return=n,Le=s;else t:for(n=t;Le!==null;){s=Le;var r=s.sibling,c=s.return;if(Sm(s),s===n){Le=null;break t}if(r!==null){r.return=c,Le=r;break t}Le=c}}}var B1={getCacheForType:function(t){var e=Ze(Ce),n=e.data.get(t);return n===void 0&&(n=t(),e.data.set(t,n)),n},cacheSignal:function(){return Ze(Ce).controller.signal}},U1=typeof WeakMap=="function"?WeakMap:Map,Yt=0,ie=null,wt=null,Ot=0,Jt=0,gn=null,wa=!1,$s=!1,Pc=!1,fa=0,_e=0,Ma=0,hs=0,Fc=0,yn=0,Ws=0,al=null,un=null,Jc=!1,Ao=0,Mm=0,No=1/0,Eo=null,Ra=null,ze=0,Oa=null,ti=null,ha=0,$c=0,Wc=null,Rm=null,sl=0,tu=null;function bn(){return(Yt&2)!==0&&Ot!==0?Ot&-Ot:B.T!==null?lu():ji()}function Om(){if(yn===0)if((Ot&536870912)===0||Bt){var t=Oe;Oe<<=1,(Oe&3932160)===0&&(Oe=262144),yn=t}else yn=536870912;return t=pn.current,t!==null&&(t.flags|=32),yn}function dn(t,e,n){(t===ie&&(Jt===2||Jt===9)||t.cancelPendingCommit!==null)&&(ei(t,0),za(t,Ot,yn,!1)),ba(t,n),((Yt&2)===0||t!==ie)&&(t===ie&&((Yt&2)===0&&(hs|=n),_e===4&&za(t,Ot,yn,!1)),Yn(t))}function zm(t,e,n){if((Yt&6)!==0)throw Error(o(327));var s=!n&&(e&127)===0&&(e&t.expiredLanes)===0||fe(t,e),r=s?q1(t,e):nu(t,e,!0),c=s;do{if(r===0){$s&&!s&&za(t,e,0,!1);break}else{if(n=t.current.alternate,c&&!V1(n)){r=nu(t,e,!1),c=!1;continue}if(r===2){if(c=e,t.errorRecoveryDisabledLanes&c)var m=0;else m=t.pendingLanes&-536870913,m=m!==0?m:m&536870912?536870912:0;if(m!==0){e=m;t:{var y=t;r=al;var T=y.current.memoizedState.isDehydrated;if(T&&(ei(y,m).flags|=256),m=nu(y,m,!1),m!==2){if(Pc&&!T){y.errorRecoveryDisabledLanes|=c,hs|=c,r=4;break t}c=un,un=r,c!==null&&(un===null?un=c:un.push.apply(un,c))}r=m}if(c=!1,r!==2)continue}}if(r===1){ei(t,0),za(t,e,0,!0);break}t:{switch(s=t,c=r,c){case 0:case 1:throw Error(o(345));case 4:if((e&4194048)!==e)break;case 6:za(s,e,yn,!wa);break t;case 2:un=null;break;case 3:case 5:break;default:throw Error(o(329))}if((e&62914560)===e&&(r=Ao+300-ht(),10<r)){if(za(s,e,yn,!wa),it(s,0,!0)!==0)break t;ha=e,s.timeoutHandle=fp(Bm.bind(null,s,n,un,Eo,Jc,e,yn,hs,Ws,wa,c,"Throttled",-0,0),r);break t}Bm(s,n,un,Eo,Jc,e,yn,hs,Ws,wa,c,null,-0,0)}}break}while(!0);Yn(t)}function Bm(t,e,n,s,r,c,m,y,T,D,q,Z,k,z){if(t.timeoutHandle=-1,Z=e.subtreeFlags,Z&8192||(Z&16785408)===16785408){Z={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:$n},Cm(e,c,Z);var rt=(c&62914560)===c?Ao-ht():(c&4194048)===c?Mm-ht():0;if(rt=Tb(Z,rt),rt!==null){ha=c,t.cancelPendingCommit=rt(Ym.bind(null,t,e,c,n,s,r,m,y,T,q,Z,null,k,z)),za(t,c,m,!D);return}}Ym(t,e,c,n,s,r,m,y,T)}function V1(t){for(var e=t;;){var n=e.tag;if((n===0||n===11||n===15)&&e.flags&16384&&(n=e.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var s=0;s<n.length;s++){var r=n[s],c=r.getSnapshot;r=r.value;try{if(!hn(c(),r))return!1}catch{return!1}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function za(t,e,n,s){e&=~Fc,e&=~hs,t.suspendedLanes|=e,t.pingedLanes&=~e,s&&(t.warmLanes|=e),s=t.expirationTimes;for(var r=e;0<r;){var c=31-J(r),m=1<<c;s[c]=-1,r&=~m}n!==0&&Si(t,n,e)}function Co(){return(Yt&6)===0?(il(0),!1):!0}function eu(){if(wt!==null){if(Jt===0)var t=wt.return;else t=wt,na=ss=null,gc(t),Zs=null,Hi=0,t=wt;for(;t!==null;)hm(t.alternate,t),t=t.return;wt=null}}function ei(t,e){var n=t.timeoutHandle;n!==-1&&(t.timeoutHandle=-1,sb(n)),n=t.cancelPendingCommit,n!==null&&(t.cancelPendingCommit=null,n()),ha=0,eu(),ie=t,wt=n=ta(t.current,null),Ot=e,Jt=0,gn=null,wa=!1,$s=fe(t,e),Pc=!1,Ws=yn=Fc=hs=Ma=_e=0,un=al=null,Jc=!1,(e&8)!==0&&(e|=e&32);var s=t.entangledLanes;if(s!==0)for(t=t.entanglements,s&=e;0<s;){var r=31-J(s),c=1<<r;e|=t[r],s&=~c}return fa=e,Ql(),n}function Um(t,e){Nt=null,B.H=Pi,e===Ys||e===no?(e=Wf(),Jt=3):e===ic?(e=Wf(),Jt=4):Jt=e===Rc?8:e!==null&&typeof e=="object"&&typeof e.then=="function"?6:1,gn=e,wt===null&&(_e=1,go(t,An(e,t.current)))}function Vm(){var t=pn.current;return t===null?!0:(Ot&4194048)===Ot?Dn===null:(Ot&62914560)===Ot||(Ot&536870912)!==0?t===Dn:!1}function Lm(){var t=B.H;return B.H=Pi,t===null?Pi:t}function qm(){var t=B.A;return B.A=B1,t}function Do(){_e=4,wa||(Ot&4194048)!==Ot&&pn.current!==null||($s=!0),(Ma&134217727)===0&&(hs&134217727)===0||ie===null||za(ie,Ot,yn,!1)}function nu(t,e,n){var s=Yt;Yt|=2;var r=Lm(),c=qm();(ie!==t||Ot!==e)&&(Eo=null,ei(t,e)),e=!1;var m=_e;t:do try{if(Jt!==0&&wt!==null){var y=wt,T=gn;switch(Jt){case 8:eu(),m=6;break t;case 3:case 2:case 9:case 6:pn.current===null&&(e=!0);var D=Jt;if(Jt=0,gn=null,ni(t,y,T,D),n&&$s){m=0;break t}break;default:D=Jt,Jt=0,gn=null,ni(t,y,T,D)}}L1(),m=_e;break}catch(q){Um(t,q)}while(!0);return e&&t.shellSuspendCounter++,na=ss=null,Yt=s,B.H=r,B.A=c,wt===null&&(ie=null,Ot=0,Ql()),m}function L1(){for(;wt!==null;)Hm(wt)}function q1(t,e){var n=Yt;Yt|=2;var s=Lm(),r=qm();ie!==t||Ot!==e?(Eo=null,No=ht()+500,ei(t,e)):$s=fe(t,e);t:do try{if(Jt!==0&&wt!==null){e=wt;var c=gn;e:switch(Jt){case 1:Jt=0,gn=null,ni(t,e,c,1);break;case 2:case 9:if(Jf(c)){Jt=0,gn=null,Im(e);break}e=function(){Jt!==2&&Jt!==9||ie!==t||(Jt=7),Yn(t)},c.then(e,e);break t;case 3:Jt=7;break t;case 4:Jt=5;break t;case 7:Jf(c)?(Jt=0,gn=null,Im(e)):(Jt=0,gn=null,ni(t,e,c,7));break;case 5:var m=null;switch(wt.tag){case 26:m=wt.memoizedState;case 5:case 27:var y=wt;if(m?Ep(m):y.stateNode.complete){Jt=0,gn=null;var T=y.sibling;if(T!==null)wt=T;else{var D=y.return;D!==null?(wt=D,ko(D)):wt=null}break e}}Jt=0,gn=null,ni(t,e,c,5);break;case 6:Jt=0,gn=null,ni(t,e,c,6);break;case 8:eu(),_e=6;break t;default:throw Error(o(462))}}H1();break}catch(q){Um(t,q)}while(!0);return na=ss=null,B.H=s,B.A=r,Yt=n,wt!==null?0:(ie=null,Ot=0,Ql(),_e)}function H1(){for(;wt!==null&&!jt();)Hm(wt)}function Hm(t){var e=dm(t.alternate,t,fa);t.memoizedProps=t.pendingProps,e===null?ko(t):wt=e}function Im(t){var e=t,n=e.alternate;switch(e.tag){case 15:case 0:e=im(n,e,e.pendingProps,e.type,void 0,Ot);break;case 11:e=im(n,e,e.pendingProps,e.type.render,e.ref,Ot);break;case 5:gc(e);default:hm(n,e),e=wt=qf(e,fa),e=dm(n,e,fa)}t.memoizedProps=t.pendingProps,e===null?ko(t):wt=e}function ni(t,e,n,s){na=ss=null,gc(e),Zs=null,Hi=0;var r=e.return;try{if(D1(t,r,e,n,Ot)){_e=1,go(t,An(n,t.current)),wt=null;return}}catch(c){if(r!==null)throw wt=r,c;_e=1,go(t,An(n,t.current)),wt=null;return}e.flags&32768?(Bt||s===1?t=!0:$s||(Ot&536870912)!==0?t=!1:(wa=t=!0,(s===2||s===9||s===3||s===6)&&(s=pn.current,s!==null&&s.tag===13&&(s.flags|=16384))),Gm(e,t)):ko(e)}function ko(t){var e=t;do{if((e.flags&32768)!==0){Gm(e,wa);return}t=e.return;var n=M1(e.alternate,e,fa);if(n!==null){wt=n;return}if(e=e.sibling,e!==null){wt=e;return}wt=e=t}while(e!==null);_e===0&&(_e=5)}function Gm(t,e){do{var n=R1(t.alternate,t);if(n!==null){n.flags&=32767,wt=n;return}if(n=t.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!e&&(t=t.sibling,t!==null)){wt=t;return}wt=t=n}while(t!==null);_e=6,wt=null}function Ym(t,e,n,s,r,c,m,y,T){t.cancelPendingCommit=null;do wo();while(ze!==0);if((Yt&6)!==0)throw Error(o(327));if(e!==null){if(e===t.current)throw Error(o(177));if(c=e.lanes|e.childLanes,c|=Yr,Bl(t,n,c,m,y,T),t===ie&&(wt=ie=null,Ot=0),ti=e,Oa=t,ha=n,$c=c,Wc=r,Rm=s,(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,Z1(se,function(){return Pm(),null})):(t.callbackNode=null,t.callbackPriority=0),s=(e.flags&13878)!==0,(e.subtreeFlags&13878)!==0||s){s=B.T,B.T=null,r=Q.p,Q.p=2,m=Yt,Yt|=4;try{O1(t,e,n)}finally{Yt=m,Q.p=r,B.T=s}}ze=1,Zm(),Km(),Xm()}}function Zm(){if(ze===1){ze=0;var t=Oa,e=ti,n=(e.flags&13878)!==0;if((e.subtreeFlags&13878)!==0||n){n=B.T,B.T=null;var s=Q.p;Q.p=2;var r=Yt;Yt|=4;try{Am(e,t);var c=mu,m=wf(t.containerInfo),y=c.focusedElem,T=c.selectionRange;if(m!==y&&y&&y.ownerDocument&&kf(y.ownerDocument.documentElement,y)){if(T!==null&&Lr(y)){var D=T.start,q=T.end;if(q===void 0&&(q=D),"selectionStart"in y)y.selectionStart=D,y.selectionEnd=Math.min(q,y.value.length);else{var Z=y.ownerDocument||document,k=Z&&Z.defaultView||window;if(k.getSelection){var z=k.getSelection(),rt=y.textContent.length,gt=Math.min(T.start,rt),ne=T.end===void 0?gt:Math.min(T.end,rt);!z.extend&&gt>ne&&(m=ne,ne=gt,gt=m);var N=Df(y,gt),j=Df(y,ne);if(N&&j&&(z.rangeCount!==1||z.anchorNode!==N.node||z.anchorOffset!==N.offset||z.focusNode!==j.node||z.focusOffset!==j.offset)){var C=Z.createRange();C.setStart(N.node,N.offset),z.removeAllRanges(),gt>ne?(z.addRange(C),z.extend(j.node,j.offset)):(C.setEnd(j.node,j.offset),z.addRange(C))}}}}for(Z=[],z=y;z=z.parentNode;)z.nodeType===1&&Z.push({element:z,left:z.scrollLeft,top:z.scrollTop});for(typeof y.focus=="function"&&y.focus(),y=0;y<Z.length;y++){var I=Z[y];I.element.scrollLeft=I.left,I.element.scrollTop=I.top}}Go=!!hu,mu=hu=null}finally{Yt=r,Q.p=s,B.T=n}}t.current=e,ze=2}}function Km(){if(ze===2){ze=0;var t=Oa,e=ti,n=(e.flags&8772)!==0;if((e.subtreeFlags&8772)!==0||n){n=B.T,B.T=null;var s=Q.p;Q.p=2;var r=Yt;Yt|=4;try{_m(t,e.alternate,e)}finally{Yt=r,Q.p=s,B.T=n}}ze=3}}function Xm(){if(ze===4||ze===3){ze=0,At();var t=Oa,e=ti,n=ha,s=Rm;(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?ze=5:(ze=0,ti=Oa=null,Qm(t,t.pendingLanes));var r=t.pendingLanes;if(r===0&&(Ra=null),js(n),e=e.stateNode,Re&&typeof Re.onCommitFiberRoot=="function")try{Re.onCommitFiberRoot(Ie,e,void 0,(e.current.flags&128)===128)}catch{}if(s!==null){e=B.T,r=Q.p,Q.p=2,B.T=null;try{for(var c=t.onRecoverableError,m=0;m<s.length;m++){var y=s[m];c(y.value,{componentStack:y.stack})}}finally{B.T=e,Q.p=r}}(ha&3)!==0&&wo(),Yn(t),r=t.pendingLanes,(n&261930)!==0&&(r&42)!==0?t===tu?sl++:(sl=0,tu=t):sl=0,il(0)}}function Qm(t,e){(t.pooledCacheLanes&=e)===0&&(e=t.pooledCache,e!=null&&(t.pooledCache=null,Li(e)))}function wo(){return Zm(),Km(),Xm(),Pm()}function Pm(){if(ze!==5)return!1;var t=Oa,e=$c;$c=0;var n=js(ha),s=B.T,r=Q.p;try{Q.p=32>n?32:n,B.T=null,n=Wc,Wc=null;var c=Oa,m=ha;if(ze=0,ti=Oa=null,ha=0,(Yt&6)!==0)throw Error(o(331));var y=Yt;if(Yt|=4,km(c.current),Em(c,c.current,m,n),Yt=y,il(0,!1),Re&&typeof Re.onPostCommitFiberRoot=="function")try{Re.onPostCommitFiberRoot(Ie,c)}catch{}return!0}finally{Q.p=r,B.T=s,Qm(t,e)}}function Fm(t,e,n){e=An(n,e),e=Mc(t.stateNode,e,2),t=Ea(t,e,2),t!==null&&(ba(t,2),Yn(t))}function $t(t,e,n){if(t.tag===3)Fm(t,t,n);else for(;e!==null;){if(e.tag===3){Fm(e,t,n);break}else if(e.tag===1){var s=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Ra===null||!Ra.has(s))){t=An(n,t),n=Jh(2),s=Ea(e,n,2),s!==null&&($h(n,s,e,t),ba(s,2),Yn(s));break}}e=e.return}}function au(t,e,n){var s=t.pingCache;if(s===null){s=t.pingCache=new U1;var r=new Set;s.set(e,r)}else r=s.get(e),r===void 0&&(r=new Set,s.set(e,r));r.has(n)||(Pc=!0,r.add(n),t=I1.bind(null,t,e,n),e.then(t,t))}function I1(t,e,n){var s=t.pingCache;s!==null&&s.delete(e),t.pingedLanes|=t.suspendedLanes&n,t.warmLanes&=~n,ie===t&&(Ot&n)===n&&(_e===4||_e===3&&(Ot&62914560)===Ot&&300>ht()-Ao?(Yt&2)===0&&ei(t,0):Fc|=n,Ws===Ot&&(Ws=0)),Yn(t)}function Jm(t,e){e===0&&(e=ya()),t=es(t,e),t!==null&&(ba(t,e),Yn(t))}function G1(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),Jm(t,n)}function Y1(t,e){var n=0;switch(t.tag){case 31:case 13:var s=t.stateNode,r=t.memoizedState;r!==null&&(n=r.retryLane);break;case 19:s=t.stateNode;break;case 22:s=t.stateNode._retryCache;break;default:throw Error(o(314))}s!==null&&s.delete(e),Jm(t,n)}function Z1(t,e){return W(t,e)}var Mo=null,ai=null,su=!1,Ro=!1,iu=!1,Ba=0;function Yn(t){t!==ai&&t.next===null&&(ai===null?Mo=ai=t:ai=ai.next=t),Ro=!0,su||(su=!0,X1())}function il(t,e){if(!iu&&Ro){iu=!0;do for(var n=!1,s=Mo;s!==null;){if(t!==0){var r=s.pendingLanes;if(r===0)var c=0;else{var m=s.suspendedLanes,y=s.pingedLanes;c=(1<<31-J(42|t)+1)-1,c&=r&~(m&~y),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(n=!0,ep(s,c))}else c=Ot,c=it(s,s===ie?c:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(c&3)===0||fe(s,c)||(n=!0,ep(s,c));s=s.next}while(n);iu=!1}}function K1(){$m()}function $m(){Ro=su=!1;var t=0;Ba!==0&&ab()&&(t=Ba);for(var e=ht(),n=null,s=Mo;s!==null;){var r=s.next,c=Wm(s,e);c===0?(s.next=null,n===null?Mo=r:n.next=r,r===null&&(ai=n)):(n=s,(t!==0||(c&3)!==0)&&(Ro=!0)),s=r}ze!==0&&ze!==5||il(t),Ba!==0&&(Ba=0)}function Wm(t,e){for(var n=t.suspendedLanes,s=t.pingedLanes,r=t.expirationTimes,c=t.pendingLanes&-62914561;0<c;){var m=31-J(c),y=1<<m,T=r[m];T===-1?((y&n)===0||(y&s)!==0)&&(r[m]=fn(y,e)):T<=e&&(t.expiredLanes|=y),c&=~y}if(e=ie,n=Ot,n=it(t,t===e?n:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s=t.callbackNode,n===0||t===e&&(Jt===2||Jt===9)||t.cancelPendingCommit!==null)return s!==null&&s!==null&&ot(s),t.callbackNode=null,t.callbackPriority=0;if((n&3)===0||fe(t,n)){if(e=n&-n,e===t.callbackPriority)return e;switch(s!==null&&ot(s),js(n)){case 2:case 8:n=pe;break;case 32:n=se;break;case 268435456:n=H;break;default:n=se}return s=tp.bind(null,t),n=W(n,s),t.callbackPriority=e,t.callbackNode=n,e}return s!==null&&s!==null&&ot(s),t.callbackPriority=2,t.callbackNode=null,2}function tp(t,e){if(ze!==0&&ze!==5)return t.callbackNode=null,t.callbackPriority=0,null;var n=t.callbackNode;if(wo()&&t.callbackNode!==n)return null;var s=Ot;return s=it(t,t===ie?s:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s===0?null:(zm(t,s,e),Wm(t,ht()),t.callbackNode!=null&&t.callbackNode===n?tp.bind(null,t):null)}function ep(t,e){if(wo())return null;zm(t,e,!0)}function X1(){ib(function(){(Yt&6)!==0?W(kt,K1):$m()})}function lu(){if(Ba===0){var t=Is;t===0&&(t=ft,ft<<=1,(ft&261888)===0&&(ft=256)),Ba=t}return Ba}function np(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:ql(""+t)}function ap(t,e){var n=e.ownerDocument.createElement("input");return n.name=e.name,n.value=e.value,t.id&&n.setAttribute("form",t.id),e.parentNode.insertBefore(n,e),t=new FormData(t),n.parentNode.removeChild(n),t}function Q1(t,e,n,s,r){if(e==="submit"&&n&&n.stateNode===r){var c=np((r[Ge]||null).action),m=s.submitter;m&&(e=(e=m[Ge]||null)?np(e.formAction):m.getAttribute("formAction"),e!==null&&(c=e,m=null));var y=new Yl("action","action",null,s,r);t.push({event:y,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Ba!==0){var T=m?ap(r,m):new FormData(r);Nc(n,{pending:!0,data:T,method:r.method,action:c},null,T)}}else typeof c=="function"&&(y.preventDefault(),T=m?ap(r,m):new FormData(r),Nc(n,{pending:!0,data:T,method:r.method,action:c},c,T))},currentTarget:r}]})}}for(var ou=0;ou<Gr.length;ou++){var ru=Gr[ou],P1=ru.toLowerCase(),F1=ru[0].toUpperCase()+ru.slice(1);Bn(P1,"on"+F1)}Bn(Of,"onAnimationEnd"),Bn(zf,"onAnimationIteration"),Bn(Bf,"onAnimationStart"),Bn("dblclick","onDoubleClick"),Bn("focusin","onFocus"),Bn("focusout","onBlur"),Bn(f1,"onTransitionRun"),Bn(h1,"onTransitionStart"),Bn(m1,"onTransitionCancel"),Bn(Uf,"onTransitionEnd"),Cs("onMouseEnter",["mouseout","mouseover"]),Cs("onMouseLeave",["mouseout","mouseover"]),Cs("onPointerEnter",["pointerout","pointerover"]),Cs("onPointerLeave",["pointerout","pointerover"]),Ja("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ja("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ja("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ja("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ja("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ja("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ll="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(" "),J1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ll));function sp(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var s=t[n],r=s.event;s=s.listeners;t:{var c=void 0;if(e)for(var m=s.length-1;0<=m;m--){var y=s[m],T=y.instance,D=y.currentTarget;if(y=y.listener,T!==c&&r.isPropagationStopped())break t;c=y,r.currentTarget=D;try{c(r)}catch(q){Xl(q)}r.currentTarget=null,c=T}else for(m=0;m<s.length;m++){if(y=s[m],T=y.instance,D=y.currentTarget,y=y.listener,T!==c&&r.isPropagationStopped())break t;c=y,r.currentTarget=D;try{c(r)}catch(q){Xl(q)}r.currentTarget=null,c=T}}}}function Mt(t,e){var n=e[Ut];n===void 0&&(n=e[Ut]=new Set);var s=t+"__bubble";n.has(s)||(ip(e,t,2,!1),n.add(s))}function cu(t,e,n){var s=0;e&&(s|=4),ip(n,t,s,e)}var Oo="_reactListening"+Math.random().toString(36).slice(2);function uu(t){if(!t[Oo]){t[Oo]=!0,Jd.forEach(function(n){n!=="selectionchange"&&(J1.has(n)||cu(n,!1,t),cu(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Oo]||(e[Oo]=!0,cu("selectionchange",!1,e))}}function ip(t,e,n,s){switch(Op(e)){case 2:var r=Ab;break;case 8:r=Nb;break;default:r=Au}n=r.bind(null,e,n,t),r=void 0,!kr||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(r=!0),s?r!==void 0?t.addEventListener(e,n,{capture:!0,passive:r}):t.addEventListener(e,n,!0):r!==void 0?t.addEventListener(e,n,{passive:r}):t.addEventListener(e,n,!1)}function du(t,e,n,s,r){var c=s;if((e&1)===0&&(e&2)===0&&s!==null)t:for(;;){if(s===null)return;var m=s.tag;if(m===3||m===4){var y=s.stateNode.containerInfo;if(y===r)break;if(m===4)for(m=s.return;m!==null;){var T=m.tag;if((T===3||T===4)&&m.stateNode.containerInfo===r)return;m=m.return}for(;y!==null;){if(m=As(y),m===null)return;if(T=m.tag,T===5||T===6||T===26||T===27){s=c=m;continue t}y=y.parentNode}}s=s.return}uf(function(){var D=c,q=Cr(n),Z=[];t:{var k=Vf.get(t);if(k!==void 0){var z=Yl,rt=t;switch(t){case"keypress":if(Il(n)===0)break t;case"keydown":case"keyup":z=Yy;break;case"focusin":rt="focus",z=Or;break;case"focusout":rt="blur",z=Or;break;case"beforeblur":case"afterblur":z=Or;break;case"click":if(n.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":z=hf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":z=My;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":z=Xy;break;case Of:case zf:case Bf:z=zy;break;case Uf:z=Py;break;case"scroll":case"scrollend":z=ky;break;case"wheel":z=Jy;break;case"copy":case"cut":case"paste":z=Uy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":z=pf;break;case"toggle":case"beforetoggle":z=Wy}var gt=(e&4)!==0,ne=!gt&&(t==="scroll"||t==="scrollend"),N=gt?k!==null?k+"Capture":null:k;gt=[];for(var j=D,C;j!==null;){var I=j;if(C=I.stateNode,I=I.tag,I!==5&&I!==26&&I!==27||C===null||N===null||(I=Ci(j,N),I!=null&&gt.push(ol(j,I,C))),ne)break;j=j.return}0<gt.length&&(k=new z(k,rt,null,n,q),Z.push({event:k,listeners:gt}))}}if((e&7)===0){t:{if(k=t==="mouseover"||t==="pointerover",z=t==="mouseout"||t==="pointerout",k&&n!==Er&&(rt=n.relatedTarget||n.fromElement)&&(As(rt)||rt[ct]))break t;if((z||k)&&(k=q.window===q?q:(k=q.ownerDocument)?k.defaultView||k.parentWindow:window,z?(rt=n.relatedTarget||n.toElement,z=D,rt=rt?As(rt):null,rt!==null&&(ne=h(rt),gt=rt.tag,rt!==ne||gt!==5&&gt!==27&&gt!==6)&&(rt=null)):(z=null,rt=D),z!==rt)){if(gt=hf,I="onMouseLeave",N="onMouseEnter",j="mouse",(t==="pointerout"||t==="pointerover")&&(gt=pf,I="onPointerLeave",N="onPointerEnter",j="pointer"),ne=z==null?k:Ei(z),C=rt==null?k:Ei(rt),k=new gt(I,j+"leave",z,n,q),k.target=ne,k.relatedTarget=C,I=null,As(q)===D&&(gt=new gt(N,j+"enter",rt,n,q),gt.target=C,gt.relatedTarget=ne,I=gt),ne=I,z&&rt)e:{for(gt=$1,N=z,j=rt,C=0,I=N;I;I=gt(I))C++;I=0;for(var pt=j;pt;pt=gt(pt))I++;for(;0<C-I;)N=gt(N),C--;for(;0<I-C;)j=gt(j),I--;for(;C--;){if(N===j||j!==null&&N===j.alternate){gt=N;break e}N=gt(N),j=gt(j)}gt=null}else gt=null;z!==null&&lp(Z,k,z,gt,!1),rt!==null&&ne!==null&&lp(Z,ne,rt,gt,!0)}}t:{if(k=D?Ei(D):window,z=k.nodeName&&k.nodeName.toLowerCase(),z==="select"||z==="input"&&k.type==="file")var Lt=xf;else if(Sf(k))if(jf)Lt=c1;else{Lt=o1;var dt=l1}else z=k.nodeName,!z||z.toLowerCase()!=="input"||k.type!=="checkbox"&&k.type!=="radio"?D&&Nr(D.elementType)&&(Lt=xf):Lt=r1;if(Lt&&(Lt=Lt(t,D))){Tf(Z,Lt,n,q);break t}dt&&dt(t,k,D),t==="focusout"&&D&&k.type==="number"&&D.memoizedProps.value!=null&&Ar(k,"number",k.value)}switch(dt=D?Ei(D):window,t){case"focusin":(Sf(dt)||dt.contentEditable==="true")&&(Os=dt,qr=D,Bi=null);break;case"focusout":Bi=qr=Os=null;break;case"mousedown":Hr=!0;break;case"contextmenu":case"mouseup":case"dragend":Hr=!1,Mf(Z,n,q);break;case"selectionchange":if(d1)break;case"keydown":case"keyup":Mf(Z,n,q)}var Et;if(Br)t:{switch(t){case"compositionstart":var zt="onCompositionStart";break t;case"compositionend":zt="onCompositionEnd";break t;case"compositionupdate":zt="onCompositionUpdate";break t}zt=void 0}else Rs?bf(t,n)&&(zt="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(zt="onCompositionStart");zt&&(vf&&n.locale!=="ko"&&(Rs||zt!=="onCompositionStart"?zt==="onCompositionEnd"&&Rs&&(Et=df()):(_a=q,wr="value"in _a?_a.value:_a.textContent,Rs=!0)),dt=zo(D,zt),0<dt.length&&(zt=new mf(zt,t,null,n,q),Z.push({event:zt,listeners:dt}),Et?zt.data=Et:(Et=_f(n),Et!==null&&(zt.data=Et)))),(Et=e1?n1(t,n):a1(t,n))&&(zt=zo(D,"onBeforeInput"),0<zt.length&&(dt=new mf("onBeforeInput","beforeinput",null,n,q),Z.push({event:dt,listeners:zt}),dt.data=Et)),Q1(Z,t,D,n,q)}sp(Z,e)})}function ol(t,e,n){return{instance:t,listener:e,currentTarget:n}}function zo(t,e){for(var n=e+"Capture",s=[];t!==null;){var r=t,c=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||c===null||(r=Ci(t,n),r!=null&&s.unshift(ol(t,r,c)),r=Ci(t,e),r!=null&&s.push(ol(t,r,c))),t.tag===3)return s;t=t.return}return[]}function $1(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function lp(t,e,n,s,r){for(var c=e._reactName,m=[];n!==null&&n!==s;){var y=n,T=y.alternate,D=y.stateNode;if(y=y.tag,T!==null&&T===s)break;y!==5&&y!==26&&y!==27||D===null||(T=D,r?(D=Ci(n,c),D!=null&&m.unshift(ol(n,D,T))):r||(D=Ci(n,c),D!=null&&m.push(ol(n,D,T)))),n=n.return}m.length!==0&&t.push({event:e,listeners:m})}var W1=/\r\n?/g,tb=/\u0000|\uFFFD/g;function op(t){return(typeof t=="string"?t:""+t).replace(W1,`
25
+ `).replace(tb,"")}function rp(t,e){return e=op(e),op(t)===e}function ee(t,e,n,s,r,c){switch(n){case"children":typeof s=="string"?e==="body"||e==="textarea"&&s===""||ks(t,s):(typeof s=="number"||typeof s=="bigint")&&e!=="body"&&ks(t,""+s);break;case"className":Vl(t,"class",s);break;case"tabIndex":Vl(t,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Vl(t,n,s);break;case"style":rf(t,s,c);break;case"data":if(e!=="object"){Vl(t,"data",s);break}case"src":case"href":if(s===""&&(e!=="a"||n!=="href")){t.removeAttribute(n);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(n);break}s=ql(""+s),t.setAttribute(n,s);break;case"action":case"formAction":if(typeof s=="function"){t.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 c=="function"&&(n==="formAction"?(e!=="input"&&ee(t,e,"name",r.name,r,null),ee(t,e,"formEncType",r.formEncType,r,null),ee(t,e,"formMethod",r.formMethod,r,null),ee(t,e,"formTarget",r.formTarget,r,null)):(ee(t,e,"encType",r.encType,r,null),ee(t,e,"method",r.method,r,null),ee(t,e,"target",r.target,r,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(n);break}s=ql(""+s),t.setAttribute(n,s);break;case"onClick":s!=null&&(t.onclick=$n);break;case"onScroll":s!=null&&Mt("scroll",t);break;case"onScrollEnd":s!=null&&Mt("scrollend",t);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(o(61));if(n=s.__html,n!=null){if(r.children!=null)throw Error(o(60));t.innerHTML=n}}break;case"multiple":t.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":t.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){t.removeAttribute("xlink:href");break}n=ql(""+s),t.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":s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(n,""+s):t.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":s&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(n,""):t.removeAttribute(n);break;case"capture":case"download":s===!0?t.setAttribute(n,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(n,s):t.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?t.setAttribute(n,s):t.removeAttribute(n);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?t.removeAttribute(n):t.setAttribute(n,s);break;case"popover":Mt("beforetoggle",t),Mt("toggle",t),Ul(t,"popover",s);break;case"xlinkActuate":Jn(t,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Jn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Jn(t,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Jn(t,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Jn(t,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Jn(t,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Jn(t,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Jn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Jn(t,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Ul(t,"is",s);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Cy.get(n)||n,Ul(t,n,s))}}function fu(t,e,n,s,r,c){switch(n){case"style":rf(t,s,c);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(o(61));if(n=s.__html,n!=null){if(r.children!=null)throw Error(o(60));t.innerHTML=n}}break;case"children":typeof s=="string"?ks(t,s):(typeof s=="number"||typeof s=="bigint")&&ks(t,""+s);break;case"onScroll":s!=null&&Mt("scroll",t);break;case"onScrollEnd":s!=null&&Mt("scrollend",t);break;case"onClick":s!=null&&(t.onclick=$n);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!$d.hasOwnProperty(n))t:{if(n[0]==="o"&&n[1]==="n"&&(r=n.endsWith("Capture"),e=n.slice(2,r?n.length-7:void 0),c=t[Ge]||null,c=c!=null?c[n]:null,typeof c=="function"&&t.removeEventListener(e,c,r),typeof s=="function")){typeof c!="function"&&c!==null&&(n in t?t[n]=null:t.hasAttribute(n)&&t.removeAttribute(n)),t.addEventListener(e,s,r);break t}n in t?t[n]=s:s===!0?t.setAttribute(n,""):Ul(t,n,s)}}}function Xe(t,e,n){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Mt("error",t),Mt("load",t);var s=!1,r=!1,c;for(c in n)if(n.hasOwnProperty(c)){var m=n[c];if(m!=null)switch(c){case"src":s=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,e));default:ee(t,e,c,m,n,null)}}r&&ee(t,e,"srcSet",n.srcSet,n,null),s&&ee(t,e,"src",n.src,n,null);return;case"input":Mt("invalid",t);var y=c=m=r=null,T=null,D=null;for(s in n)if(n.hasOwnProperty(s)){var q=n[s];if(q!=null)switch(s){case"name":r=q;break;case"type":m=q;break;case"checked":T=q;break;case"defaultChecked":D=q;break;case"value":c=q;break;case"defaultValue":y=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(o(137,e));break;default:ee(t,e,s,q,n,null)}}af(t,c,y,T,D,m,r,!1);return;case"select":Mt("invalid",t),s=m=c=null;for(r in n)if(n.hasOwnProperty(r)&&(y=n[r],y!=null))switch(r){case"value":c=y;break;case"defaultValue":m=y;break;case"multiple":s=y;default:ee(t,e,r,y,n,null)}e=c,n=m,t.multiple=!!s,e!=null?Ds(t,!!s,e,!1):n!=null&&Ds(t,!!s,n,!0);return;case"textarea":Mt("invalid",t),c=r=s=null;for(m in n)if(n.hasOwnProperty(m)&&(y=n[m],y!=null))switch(m){case"value":s=y;break;case"defaultValue":r=y;break;case"children":c=y;break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(o(91));break;default:ee(t,e,m,y,n,null)}lf(t,s,r,c);return;case"option":for(T in n)if(n.hasOwnProperty(T)&&(s=n[T],s!=null))switch(T){case"selected":t.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:ee(t,e,T,s,n,null)}return;case"dialog":Mt("beforetoggle",t),Mt("toggle",t),Mt("cancel",t),Mt("close",t);break;case"iframe":case"object":Mt("load",t);break;case"video":case"audio":for(s=0;s<ll.length;s++)Mt(ll[s],t);break;case"image":Mt("error",t),Mt("load",t);break;case"details":Mt("toggle",t);break;case"embed":case"source":case"link":Mt("error",t),Mt("load",t);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)&&(s=n[D],s!=null))switch(D){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,e));default:ee(t,e,D,s,n,null)}return;default:if(Nr(e)){for(q in n)n.hasOwnProperty(q)&&(s=n[q],s!==void 0&&fu(t,e,q,s,n,void 0));return}}for(y in n)n.hasOwnProperty(y)&&(s=n[y],s!=null&&ee(t,e,y,s,n,null))}function eb(t,e,n,s){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,c=null,m=null,y=null,T=null,D=null,q=null;for(z in n){var Z=n[z];if(n.hasOwnProperty(z)&&Z!=null)switch(z){case"checked":break;case"value":break;case"defaultValue":T=Z;default:s.hasOwnProperty(z)||ee(t,e,z,null,s,Z)}}for(var k in s){var z=s[k];if(Z=n[k],s.hasOwnProperty(k)&&(z!=null||Z!=null))switch(k){case"type":c=z;break;case"name":r=z;break;case"checked":D=z;break;case"defaultChecked":q=z;break;case"value":m=z;break;case"defaultValue":y=z;break;case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(o(137,e));break;default:z!==Z&&ee(t,e,k,z,s,Z)}}jr(t,m,y,T,D,q,c,r);return;case"select":z=m=y=k=null;for(c in n)if(T=n[c],n.hasOwnProperty(c)&&T!=null)switch(c){case"value":break;case"multiple":z=T;default:s.hasOwnProperty(c)||ee(t,e,c,null,s,T)}for(r in s)if(c=s[r],T=n[r],s.hasOwnProperty(r)&&(c!=null||T!=null))switch(r){case"value":k=c;break;case"defaultValue":y=c;break;case"multiple":m=c;default:c!==T&&ee(t,e,r,c,s,T)}e=y,n=m,s=z,k!=null?Ds(t,!!n,k,!1):!!s!=!!n&&(e!=null?Ds(t,!!n,e,!0):Ds(t,!!n,n?[]:"",!1));return;case"textarea":z=k=null;for(y in n)if(r=n[y],n.hasOwnProperty(y)&&r!=null&&!s.hasOwnProperty(y))switch(y){case"value":break;case"children":break;default:ee(t,e,y,null,s,r)}for(m in s)if(r=s[m],c=n[m],s.hasOwnProperty(m)&&(r!=null||c!=null))switch(m){case"value":k=r;break;case"defaultValue":z=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(o(91));break;default:r!==c&&ee(t,e,m,r,s,c)}sf(t,k,z);return;case"option":for(var rt in n)if(k=n[rt],n.hasOwnProperty(rt)&&k!=null&&!s.hasOwnProperty(rt))switch(rt){case"selected":t.selected=!1;break;default:ee(t,e,rt,null,s,k)}for(T in s)if(k=s[T],z=n[T],s.hasOwnProperty(T)&&k!==z&&(k!=null||z!=null))switch(T){case"selected":t.selected=k&&typeof k!="function"&&typeof k!="symbol";break;default:ee(t,e,T,k,s,z)}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 gt in n)k=n[gt],n.hasOwnProperty(gt)&&k!=null&&!s.hasOwnProperty(gt)&&ee(t,e,gt,null,s,k);for(D in s)if(k=s[D],z=n[D],s.hasOwnProperty(D)&&k!==z&&(k!=null||z!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(o(137,e));break;default:ee(t,e,D,k,s,z)}return;default:if(Nr(e)){for(var ne in n)k=n[ne],n.hasOwnProperty(ne)&&k!==void 0&&!s.hasOwnProperty(ne)&&fu(t,e,ne,void 0,s,k);for(q in s)k=s[q],z=n[q],!s.hasOwnProperty(q)||k===z||k===void 0&&z===void 0||fu(t,e,q,k,s,z);return}}for(var N in n)k=n[N],n.hasOwnProperty(N)&&k!=null&&!s.hasOwnProperty(N)&&ee(t,e,N,null,s,k);for(Z in s)k=s[Z],z=n[Z],!s.hasOwnProperty(Z)||k===z||k==null&&z==null||ee(t,e,Z,k,s,z)}function cp(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function nb(){if(typeof performance.getEntriesByType=="function"){for(var t=0,e=0,n=performance.getEntriesByType("resource"),s=0;s<n.length;s++){var r=n[s],c=r.transferSize,m=r.initiatorType,y=r.duration;if(c&&y&&cp(m)){for(m=0,y=r.responseEnd,s+=1;s<n.length;s++){var T=n[s],D=T.startTime;if(D>y)break;var q=T.transferSize,Z=T.initiatorType;q&&cp(Z)&&(T=T.responseEnd,m+=q*(T<y?1:(y-D)/(T-D)))}if(--s,e+=8*(c+m)/(r.duration/1e3),t++,10<t)break}}if(0<t)return e/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var hu=null,mu=null;function Bo(t){return t.nodeType===9?t:t.ownerDocument}function up(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function dp(t,e){if(t===0)switch(e){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&e==="foreignObject"?0:t}function pu(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.children=="bigint"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var vu=null;function ab(){var t=window.event;return t&&t.type==="popstate"?t===vu?!1:(vu=t,!0):(vu=null,!1)}var fp=typeof setTimeout=="function"?setTimeout:void 0,sb=typeof clearTimeout=="function"?clearTimeout:void 0,hp=typeof Promise=="function"?Promise:void 0,ib=typeof queueMicrotask=="function"?queueMicrotask:typeof hp<"u"?function(t){return hp.resolve(null).then(t).catch(lb)}:fp;function lb(t){setTimeout(function(){throw t})}function Ua(t){return t==="head"}function mp(t,e){var n=e,s=0;do{var r=n.nextSibling;if(t.removeChild(n),r&&r.nodeType===8)if(n=r.data,n==="/$"||n==="/&"){if(s===0){t.removeChild(r),oi(e);return}s--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")s++;else if(n==="html")rl(t.ownerDocument.documentElement);else if(n==="head"){n=t.ownerDocument.head,rl(n);for(var c=n.firstChild;c;){var m=c.nextSibling,y=c.nodeName;c[qn]||y==="SCRIPT"||y==="STYLE"||y==="LINK"&&c.rel.toLowerCase()==="stylesheet"||n.removeChild(c),c=m}}else n==="body"&&rl(t.ownerDocument.body);n=r}while(n);oi(e)}function pp(t,e){var n=t;t=0;do{var s=n.nextSibling;if(n.nodeType===1?e?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(e?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(t===0)break;t--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||t++;n=s}while(n)}function gu(t){var e=t.firstChild;for(e&&e.nodeType===10&&(e=e.nextSibling);e;){var n=e;switch(e=e.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":gu(n),Ni(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}t.removeChild(n)}}function ob(t,e,n,s){for(;t.nodeType===1;){var r=n;if(t.nodeName.toLowerCase()!==e.toLowerCase()){if(!s&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(s){if(!t[qn])switch(e){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(c=t.getAttribute("rel"),c==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(c!==r.rel||t.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||t.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||t.getAttribute("title")!==(r.title==null?null:r.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(c=t.getAttribute("src"),(c!==(r.src==null?null:r.src)||t.getAttribute("type")!==(r.type==null?null:r.type)||t.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&c&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(e==="input"&&t.type==="hidden"){var c=r.name==null?null:""+r.name;if(r.type==="hidden"&&t.getAttribute("name")===c)return t}else return t;if(t=kn(t.nextSibling),t===null)break}return null}function rb(t,e,n){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!n||(t=kn(t.nextSibling),t===null))return null;return t}function vp(t,e){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!e||(t=kn(t.nextSibling),t===null))return null;return t}function yu(t){return t.data==="$?"||t.data==="$~"}function bu(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function cb(t,e){var n=t.ownerDocument;if(t.data==="$~")t._reactRetry=e;else if(t.data!=="$?"||n.readyState!=="loading")e();else{var s=function(){e(),n.removeEventListener("DOMContentLoaded",s)};n.addEventListener("DOMContentLoaded",s),t._reactRetry=s}}function kn(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?"||e==="$~"||e==="&"||e==="F!"||e==="F")break;if(e==="/$"||e==="/&")return null}}return t}var _u=null;function gp(t){t=t.nextSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"||n==="/&"){if(e===0)return kn(t.nextSibling);e--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||e++}t=t.nextSibling}return null}function yp(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(e===0)return t;e--}else n!=="/$"&&n!=="/&"||e++}t=t.previousSibling}return null}function bp(t,e,n){switch(e=Bo(n),t){case"html":if(t=e.documentElement,!t)throw Error(o(452));return t;case"head":if(t=e.head,!t)throw Error(o(453));return t;case"body":if(t=e.body,!t)throw Error(o(454));return t;default:throw Error(o(451))}}function rl(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);Ni(t)}var wn=new Map,_p=new Set;function Uo(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var ma=Q.d;Q.d={f:ub,r:db,D:fb,C:hb,L:mb,m:pb,X:gb,S:vb,M:yb};function ub(){var t=ma.f(),e=Co();return t||e}function db(t){var e=Ns(t);e!==null&&e.tag===5&&e.type==="form"?Uh(e):ma.r(t)}var si=typeof document>"u"?null:document;function Sp(t,e,n){var s=si;if(s&&typeof e=="string"&&e){var r=xn(e);r='link[rel="'+t+'"][href="'+r+'"]',typeof n=="string"&&(r+='[crossorigin="'+n+'"]'),_p.has(r)||(_p.add(r),t={rel:t,crossOrigin:n,href:e},s.querySelector(r)===null&&(e=s.createElement("link"),Xe(e,"link",t),Ve(e),s.head.appendChild(e)))}}function fb(t){ma.D(t),Sp("dns-prefetch",t,null)}function hb(t,e){ma.C(t,e),Sp("preconnect",t,e)}function mb(t,e,n){ma.L(t,e,n);var s=si;if(s&&t&&e){var r='link[rel="preload"][as="'+xn(e)+'"]';e==="image"&&n&&n.imageSrcSet?(r+='[imagesrcset="'+xn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(r+='[imagesizes="'+xn(n.imageSizes)+'"]')):r+='[href="'+xn(t)+'"]';var c=r;switch(e){case"style":c=ii(t);break;case"script":c=li(t)}wn.has(c)||(t=_({rel:"preload",href:e==="image"&&n&&n.imageSrcSet?void 0:t,as:e},n),wn.set(c,t),s.querySelector(r)!==null||e==="style"&&s.querySelector(cl(c))||e==="script"&&s.querySelector(ul(c))||(e=s.createElement("link"),Xe(e,"link",t),Ve(e),s.head.appendChild(e)))}}function pb(t,e){ma.m(t,e);var n=si;if(n&&t){var s=e&&typeof e.as=="string"?e.as:"script",r='link[rel="modulepreload"][as="'+xn(s)+'"][href="'+xn(t)+'"]',c=r;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=li(t)}if(!wn.has(c)&&(t=_({rel:"modulepreload",href:t},e),wn.set(c,t),n.querySelector(r)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(ul(c)))return}s=n.createElement("link"),Xe(s,"link",t),Ve(s),n.head.appendChild(s)}}}function vb(t,e,n){ma.S(t,e,n);var s=si;if(s&&t){var r=Es(s).hoistableStyles,c=ii(t);e=e||"default";var m=r.get(c);if(!m){var y={loading:0,preload:null};if(m=s.querySelector(cl(c)))y.loading=5;else{t=_({rel:"stylesheet",href:t,"data-precedence":e},n),(n=wn.get(c))&&Su(t,n);var T=m=s.createElement("link");Ve(T),Xe(T,"link",t),T._p=new Promise(function(D,q){T.onload=D,T.onerror=q}),T.addEventListener("load",function(){y.loading|=1}),T.addEventListener("error",function(){y.loading|=2}),y.loading|=4,Vo(m,e,s)}m={type:"stylesheet",instance:m,count:1,state:y},r.set(c,m)}}}function gb(t,e){ma.X(t,e);var n=si;if(n&&t){var s=Es(n).hoistableScripts,r=li(t),c=s.get(r);c||(c=n.querySelector(ul(r)),c||(t=_({src:t,async:!0},e),(e=wn.get(r))&&Tu(t,e),c=n.createElement("script"),Ve(c),Xe(c,"link",t),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},s.set(r,c))}}function yb(t,e){ma.M(t,e);var n=si;if(n&&t){var s=Es(n).hoistableScripts,r=li(t),c=s.get(r);c||(c=n.querySelector(ul(r)),c||(t=_({src:t,async:!0,type:"module"},e),(e=wn.get(r))&&Tu(t,e),c=n.createElement("script"),Ve(c),Xe(c,"link",t),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},s.set(r,c))}}function Tp(t,e,n,s){var r=(r=ye.current)?Uo(r):null;if(!r)throw Error(o(446));switch(t){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(e=ii(n.href),n=Es(r).hoistableStyles,s=n.get(e),s||(s={type:"style",instance:null,count:0,state:null},n.set(e,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){t=ii(n.href);var c=Es(r).hoistableStyles,m=c.get(t);if(m||(r=r.ownerDocument||r,m={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(t,m),(c=r.querySelector(cl(t)))&&!c._p&&(m.instance=c,m.state.loading=5),wn.has(t)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},wn.set(t,n),c||bb(r,t,n,m.state))),e&&s===null)throw Error(o(528,""));return m}if(e&&s!==null)throw Error(o(529,""));return null;case"script":return e=n.async,n=n.src,typeof n=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=li(n),n=Es(r).hoistableScripts,s=n.get(e),s||(s={type:"script",instance:null,count:0,state:null},n.set(e,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,t))}}function ii(t){return'href="'+xn(t)+'"'}function cl(t){return'link[rel="stylesheet"]['+t+"]"}function xp(t){return _({},t,{"data-precedence":t.precedence,precedence:null})}function bb(t,e,n,s){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?s.loading=1:(e=t.createElement("link"),s.preload=e,e.addEventListener("load",function(){return s.loading|=1}),e.addEventListener("error",function(){return s.loading|=2}),Xe(e,"link",n),Ve(e),t.head.appendChild(e))}function li(t){return'[src="'+xn(t)+'"]'}function ul(t){return"script[async]"+t}function jp(t,e,n){if(e.count++,e.instance===null)switch(e.type){case"style":var s=t.querySelector('style[data-href~="'+xn(n.href)+'"]');if(s)return e.instance=s,Ve(s),s;var r=_({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return s=(t.ownerDocument||t).createElement("style"),Ve(s),Xe(s,"style",r),Vo(s,n.precedence,t),e.instance=s;case"stylesheet":r=ii(n.href);var c=t.querySelector(cl(r));if(c)return e.state.loading|=4,e.instance=c,Ve(c),c;s=xp(n),(r=wn.get(r))&&Su(s,r),c=(t.ownerDocument||t).createElement("link"),Ve(c);var m=c;return m._p=new Promise(function(y,T){m.onload=y,m.onerror=T}),Xe(c,"link",s),e.state.loading|=4,Vo(c,n.precedence,t),e.instance=c;case"script":return c=li(n.src),(r=t.querySelector(ul(c)))?(e.instance=r,Ve(r),r):(s=n,(r=wn.get(c))&&(s=_({},n),Tu(s,r)),t=t.ownerDocument||t,r=t.createElement("script"),Ve(r),Xe(r,"link",s),t.head.appendChild(r),e.instance=r);case"void":return null;default:throw Error(o(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(s=e.instance,e.state.loading|=4,Vo(s,n.precedence,t));return e.instance}function Vo(t,e,n){for(var s=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=s.length?s[s.length-1]:null,c=r,m=0;m<s.length;m++){var y=s[m];if(y.dataset.precedence===e)c=y;else if(c!==r)break}c?c.parentNode.insertBefore(t,c.nextSibling):(e=n.nodeType===9?n.head:n,e.insertBefore(t,e.firstChild))}function Su(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function Tu(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var Lo=null;function Ap(t,e,n){if(Lo===null){var s=new Map,r=Lo=new Map;r.set(n,s)}else r=Lo,s=r.get(n),s||(s=new Map,r.set(n,s));if(s.has(t))return s;for(s.set(t,null),n=n.getElementsByTagName(t),r=0;r<n.length;r++){var c=n[r];if(!(c[qn]||c[Ee]||t==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var m=c.getAttribute(e)||"";m=t+m;var y=s.get(m);y?y.push(c):s.set(m,[c])}}return s}function Np(t,e,n){t=t.ownerDocument||t,t.head.insertBefore(n,e==="title"?t.querySelector("head > title"):null)}function _b(t,e,n){if(n===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence=="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function Ep(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function Sb(t,e,n,s){if(n.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var r=ii(s.href),c=e.querySelector(cl(r));if(c){e=c._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=qo.bind(t),e.then(t,t)),n.state.loading|=4,n.instance=c,Ve(c);return}c=e.ownerDocument||e,s=xp(s),(r=wn.get(r))&&Su(s,r),c=c.createElement("link"),Ve(c);var m=c;m._p=new Promise(function(y,T){m.onload=y,m.onerror=T}),Xe(c,"link",s),n.instance=c}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(n,e),(e=n.state.preload)&&(n.state.loading&3)===0&&(t.count++,n=qo.bind(t),e.addEventListener("load",n),e.addEventListener("error",n))}}var xu=0;function Tb(t,e){return t.stylesheets&&t.count===0&&Io(t,t.stylesheets),0<t.count||0<t.imgCount?function(n){var s=setTimeout(function(){if(t.stylesheets&&Io(t,t.stylesheets),t.unsuspend){var c=t.unsuspend;t.unsuspend=null,c()}},6e4+e);0<t.imgBytes&&xu===0&&(xu=62500*nb());var r=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Io(t,t.stylesheets),t.unsuspend)){var c=t.unsuspend;t.unsuspend=null,c()}},(t.imgBytes>xu?50:800)+e);return t.unsuspend=n,function(){t.unsuspend=null,clearTimeout(s),clearTimeout(r)}}:null}function qo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Io(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Ho=null;function Io(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Ho=new Map,e.forEach(xb,t),Ho=null,qo.call(t))}function xb(t,e){if(!(e.state.loading&4)){var n=Ho.get(t);if(n)var s=n.get(null);else{n=new Map,Ho.set(t,n);for(var r=t.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<r.length;c++){var m=r[c];(m.nodeName==="LINK"||m.getAttribute("media")!=="not all")&&(n.set(m.dataset.precedence,m),s=m)}s&&n.set(null,s)}r=e.instance,m=r.getAttribute("data-precedence"),c=n.get(m)||s,c===s&&n.set(null,r),n.set(m,r),this.count++,s=qo.bind(this),r.addEventListener("load",s),r.addEventListener("error",s),c?c.parentNode.insertBefore(r,c.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(r,t.firstChild)),e.state.loading|=4}}var dl={$$typeof:Y,Provider:null,Consumer:null,_currentValue:lt,_currentValue2:lt,_threadCount:0};function jb(t,e,n,s,r,c,m,y,T){this.tag=1,this.containerInfo=t,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=Ts(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ts(0),this.hiddenUpdates=Ts(null),this.identifierPrefix=s,this.onUncaughtError=r,this.onCaughtError=c,this.onRecoverableError=m,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=T,this.incompleteTransitions=new Map}function Cp(t,e,n,s,r,c,m,y,T,D,q,Z){return t=new jb(t,e,n,m,T,D,q,Z,y),e=1,c===!0&&(e|=24),c=mn(3,null,null,e),t.current=c,c.stateNode=t,e=nc(),e.refCount++,t.pooledCache=e,e.refCount++,c.memoizedState={element:s,isDehydrated:n,cache:e},lc(c),t}function Dp(t){return t?(t=Us,t):Us}function kp(t,e,n,s,r,c){r=Dp(r),s.context===null?s.context=r:s.pendingContext=r,s=Na(e),s.payload={element:n},c=c===void 0?null:c,c!==null&&(s.callback=c),n=Ea(t,s,e),n!==null&&(dn(n,t,e),Gi(n,t,e))}function wp(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function ju(t,e){wp(t,e),(t=t.alternate)&&wp(t,e)}function Mp(t){if(t.tag===13||t.tag===31){var e=es(t,67108864);e!==null&&dn(e,t,67108864),ju(t,67108864)}}function Rp(t){if(t.tag===13||t.tag===31){var e=bn();e=xs(e);var n=es(t,e);n!==null&&dn(n,t,e),ju(t,e)}}var Go=!0;function Ab(t,e,n,s){var r=B.T;B.T=null;var c=Q.p;try{Q.p=2,Au(t,e,n,s)}finally{Q.p=c,B.T=r}}function Nb(t,e,n,s){var r=B.T;B.T=null;var c=Q.p;try{Q.p=8,Au(t,e,n,s)}finally{Q.p=c,B.T=r}}function Au(t,e,n,s){if(Go){var r=Nu(s);if(r===null)du(t,e,s,Yo,n),zp(t,s);else if(Cb(r,t,e,n,s))s.stopPropagation();else if(zp(t,s),e&4&&-1<Eb.indexOf(t)){for(;r!==null;){var c=Ns(r);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var m=sn(c.pendingLanes);if(m!==0){var y=c;for(y.pendingLanes|=2,y.entangledLanes|=2;m;){var T=1<<31-J(m);y.entanglements[1]|=T,m&=~T}Yn(c),(Yt&6)===0&&(No=ht()+500,il(0))}}break;case 31:case 13:y=es(c,2),y!==null&&dn(y,c,2),Co(),ju(c,2)}if(c=Nu(s),c===null&&du(t,e,s,Yo,n),c===r)break;r=c}r!==null&&s.stopPropagation()}else du(t,e,s,null,n)}}function Nu(t){return t=Cr(t),Eu(t)}var Yo=null;function Eu(t){if(Yo=null,t=As(t),t!==null){var e=h(t);if(e===null)t=null;else{var n=e.tag;if(n===13){if(t=f(e),t!==null)return t;t=null}else if(n===31){if(t=p(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null)}}return Yo=t,null}function Op(t){switch(t){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(de()){case kt:return 2;case pe:return 8;case se:case Me:return 32;case H:return 268435456;default:return 32}default:return 32}}var Cu=!1,Va=null,La=null,qa=null,fl=new Map,hl=new Map,Ha=[],Eb="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 zp(t,e){switch(t){case"focusin":case"focusout":Va=null;break;case"dragenter":case"dragleave":La=null;break;case"mouseover":case"mouseout":qa=null;break;case"pointerover":case"pointerout":fl.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":hl.delete(e.pointerId)}}function ml(t,e,n,s,r,c){return t===null||t.nativeEvent!==c?(t={blockedOn:e,domEventName:n,eventSystemFlags:s,nativeEvent:c,targetContainers:[r]},e!==null&&(e=Ns(e),e!==null&&Mp(e)),t):(t.eventSystemFlags|=s,e=t.targetContainers,r!==null&&e.indexOf(r)===-1&&e.push(r),t)}function Cb(t,e,n,s,r){switch(e){case"focusin":return Va=ml(Va,t,e,n,s,r),!0;case"dragenter":return La=ml(La,t,e,n,s,r),!0;case"mouseover":return qa=ml(qa,t,e,n,s,r),!0;case"pointerover":var c=r.pointerId;return fl.set(c,ml(fl.get(c)||null,t,e,n,s,r)),!0;case"gotpointercapture":return c=r.pointerId,hl.set(c,ml(hl.get(c)||null,t,e,n,s,r)),!0}return!1}function Bp(t){var e=As(t.target);if(e!==null){var n=h(e);if(n!==null){if(e=n.tag,e===13){if(e=f(n),e!==null){t.blockedOn=e,Ai(t.priority,function(){Rp(n)});return}}else if(e===31){if(e=p(n),e!==null){t.blockedOn=e,Ai(t.priority,function(){Rp(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Zo(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=Nu(t.nativeEvent);if(n===null){n=t.nativeEvent;var s=new n.constructor(n.type,n);Er=s,n.target.dispatchEvent(s),Er=null}else return e=Ns(n),e!==null&&Mp(e),t.blockedOn=n,!1;e.shift()}return!0}function Up(t,e,n){Zo(t)&&n.delete(e)}function Db(){Cu=!1,Va!==null&&Zo(Va)&&(Va=null),La!==null&&Zo(La)&&(La=null),qa!==null&&Zo(qa)&&(qa=null),fl.forEach(Up),hl.forEach(Up)}function Ko(t,e){t.blockedOn===e&&(t.blockedOn=null,Cu||(Cu=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,Db)))}var Xo=null;function Vp(t){Xo!==t&&(Xo=t,a.unstable_scheduleCallback(a.unstable_NormalPriority,function(){Xo===t&&(Xo=null);for(var e=0;e<t.length;e+=3){var n=t[e],s=t[e+1],r=t[e+2];if(typeof s!="function"){if(Eu(s||n)===null)continue;break}var c=Ns(n);c!==null&&(t.splice(e,3),e-=3,Nc(c,{pending:!0,data:r,method:n.method,action:s},s,r))}}))}function oi(t){function e(T){return Ko(T,t)}Va!==null&&Ko(Va,t),La!==null&&Ko(La,t),qa!==null&&Ko(qa,t),fl.forEach(e),hl.forEach(e);for(var n=0;n<Ha.length;n++){var s=Ha[n];s.blockedOn===t&&(s.blockedOn=null)}for(;0<Ha.length&&(n=Ha[0],n.blockedOn===null);)Bp(n),n.blockedOn===null&&Ha.shift();if(n=(t.ownerDocument||t).$$reactFormReplay,n!=null)for(s=0;s<n.length;s+=3){var r=n[s],c=n[s+1],m=r[Ge]||null;if(typeof c=="function")m||Vp(n);else if(m){var y=null;if(c&&c.hasAttribute("formAction")){if(r=c,m=c[Ge]||null)y=m.formAction;else if(Eu(r)!==null)continue}else y=m.action;typeof y=="function"?n[s+1]=y:(n.splice(s,3),s-=3),Vp(n)}}}function Lp(){function t(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(m){return r=m})},focusReset:"manual",scroll:"manual"})}function e(){r!==null&&(r(),r=null),s||setTimeout(n,20)}function n(){if(!s&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,r=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",e),navigation.addEventListener("navigateerror",e),setTimeout(n,100),function(){s=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",e),navigation.removeEventListener("navigateerror",e),r!==null&&(r(),r=null)}}}function Du(t){this._internalRoot=t}Qo.prototype.render=Du.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(o(409));var n=e.current,s=bn();kp(n,s,t,e,null,null)},Qo.prototype.unmount=Du.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;kp(t.current,2,null,t,null,null),Co(),e[ct]=null}};function Qo(t){this._internalRoot=t}Qo.prototype.unstable_scheduleHydration=function(t){if(t){var e=ji();t={blockedOn:null,target:t,priority:e};for(var n=0;n<Ha.length&&e!==0&&e<Ha[n].priority;n++);Ha.splice(n,0,t),n===0&&Bp(t)}};var qp=i.version;if(qp!=="19.2.4")throw Error(o(527,qp,"19.2.4"));Q.findDOMNode=function(t){var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(o(188)):(t=Object.keys(t).join(","),Error(o(268,t)));return t=g(e),t=t!==null?b(t):null,t=t===null?null:t.stateNode,t};var kb={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Po=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Po.isDisabled&&Po.supportsFiber)try{Ie=Po.inject(kb),Re=Po}catch{}}return pl.createRoot=function(t,e){if(!u(t))throw Error(o(299));var n=!1,s="",r=Xh,c=Qh,m=Ph;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(s=e.identifierPrefix),e.onUncaughtError!==void 0&&(r=e.onUncaughtError),e.onCaughtError!==void 0&&(c=e.onCaughtError),e.onRecoverableError!==void 0&&(m=e.onRecoverableError)),e=Cp(t,1,!1,null,null,n,s,null,r,c,m,Lp),t[ct]=e.current,uu(t),new Du(e)},pl.hydrateRoot=function(t,e,n){if(!u(t))throw Error(o(299));var s=!1,r="",c=Xh,m=Qh,y=Ph,T=null;return n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(r=n.identifierPrefix),n.onUncaughtError!==void 0&&(c=n.onUncaughtError),n.onCaughtError!==void 0&&(m=n.onCaughtError),n.onRecoverableError!==void 0&&(y=n.onRecoverableError),n.formState!==void 0&&(T=n.formState)),e=Cp(t,1,!0,e,n??null,s,r,T,c,m,y,Lp),e.context=Dp(null),n=e.current,s=bn(),s=xs(s),r=Na(s),r.callback=null,Ea(n,r,s),n=s,e.current.lanes=n,ba(e,n),Yn(e),t[ct]=e.current,uu(t),new Qo(e)},pl.version="19.2.4",pl}var Xp;function Kb(){if(Xp)return ku.exports;Xp=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(i){console.error(i)}}return a(),ku.exports=Zb(),ku.exports}var Xb=Kb();function tn(a){return typeof a=="object"&&a!==null&&!Array.isArray(a)}function Tl(a,i){return console.warn(`[ws] Malformed "${a}" message: ${i}`),!1}function Qb(a){return tn(a)&&typeof a.id=="string"&&typeof a.displayName=="string"&&typeof a.adapterType=="string"&&typeof a.defaultRuntime=="string"&&typeof a.status=="string"&&typeof a.bootstrapped=="boolean"}function Qp(a){return tn(a)&&typeof a.id=="string"&&typeof a.environmentId=="string"&&typeof a.runtime=="string"&&typeof a.status=="string"&&typeof a.prompt=="string"&&typeof a.startedAt=="string"&&(a.endedAt===void 0||typeof a.endedAt=="string")&&(a.error===void 0||typeof a.error=="string")}function Pp(a){return tn(a)&&typeof a.sessionId=="string"&&typeof a.eventType=="string"&&typeof a.timestamp=="string"&&typeof a.content=="string"&&(a.raw===void 0||typeof a.raw=="string")}function Pb(a){return tn(a)&&typeof a.id=="string"&&typeof a.name=="string"&&typeof a.description=="string"&&typeof a.repoUrl=="string"&&typeof a.defaultEnvironmentId=="string"&&typeof a.status=="string"&&typeof a.createdAt=="string"&&typeof a.updatedAt=="string"}function Fb(a){return tn(a)&&typeof a.id=="string"&&typeof a.projectId=="string"&&typeof a.title=="string"&&typeof a.status=="string"&&typeof a.branch=="string"&&typeof a.sortOrder=="number"&&typeof a.depth=="number"&&Array.isArray(a.dependsOn)&&Array.isArray(a.childTaskIds)}function Jb(a){return tn(a)&&typeof a.id=="string"&&typeof a.projectId=="string"&&typeof a.taskId=="string"&&typeof a.sessionId=="string"&&typeof a.category=="string"&&typeof a.title=="string"&&typeof a.content=="string"&&Array.isArray(a.tags)&&typeof a.createdAt=="string"}function $b(a){return tn(a)&&typeof a.name=="string"&&typeof a.tokenType=="string"&&typeof a.envVar=="string"&&typeof a.filePath=="string"&&typeof a.expiresAt=="string"}function Wb(a){return tn(a)&&typeof a.environmentId=="string"&&typeof a.stage=="string"&&typeof a.message=="string"&&typeof a.progress=="number"}function t_(a){return tn(a)&&typeof a.name=="string"&&typeof a.repository=="string"&&typeof a.state=="string"&&typeof a.gitStatus=="string"}function e_(a){return tn(a)&&typeof a.id=="string"&&typeof a.name=="string"&&typeof a.description=="string"&&typeof a.systemPrompt=="string"&&typeof a.toolConfig=="string"&&typeof a.runtime=="string"&&typeof a.model=="string"&&typeof a.maxTurns=="number"&&typeof a.mcpServers=="string"&&typeof a.createdAt=="string"&&typeof a.updatedAt=="string"}function Zn(a,i,l,o){return Array.isArray(a)?a.filter((u,h)=>i(u)?!0:(Tl(l,`item at index ${h} in "${o}" has unexpected shape`),!1)):(Tl(l,`expected "${o}" to be an array, got ${typeof a}`),[])}function n_(a){let i;try{i=JSON.parse(a)}catch{console.warn("[ws] Failed to parse WebSocket message as JSON");return}if(!tn(i)||typeof i.type!="string"){console.warn("[ws] Received WebSocket message without a string 'type' field:",i);return}return{type:i.type,payload:tn(i.payload)?i.payload:void 0}}const a_=3e3,ri=5e3;function s_(a){const i=typeof window<"u"&&window.__GRACKLE_API_KEY__||"",l=typeof window<"u"?`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}?token=${encodeURIComponent(i)}`:"ws://localhost:3000",o=S.useRef(void 0),[u,h]=S.useState(!1),[f,p]=S.useState([]),[v,g]=S.useState([]),[b,_]=S.useState([]),[x,E]=S.useState(0),[M,R]=S.useState(void 0),[K,O]=S.useState([]),[P,Y]=S.useState([]),[et,X]=S.useState([]),[L,tt]=S.useState([]),[U,nt]=S.useState({}),[at,mt]=S.useState([]),[Dt,$]=S.useState(""),[st,St]=S.useState(!1),[B,Q]=S.useState([]),[lt,Ct]=S.useState({}),[vt,Ft]=S.useState(!1),[bt,_t]=S.useState(void 0),G=S.useCallback(J=>{var Tt;((Tt=o.current)==null?void 0:Tt.readyState)===WebSocket.OPEN&&o.current.send(JSON.stringify(J))},[]);S.useEffect(()=>{let J,Tt;function le(){J=new WebSocket(l),o.current=J,J.onopen=()=>{h(!0),G({type:"list_environments"}),G({type:"list_sessions"}),G({type:"list_projects"}),G({type:"list_tokens"}),G({type:"list_personas"}),G({type:"subscribe_all"})},J.onmessage=Xt=>{var Oe,Je,sn,it,fe,fn,ya,Ts,ba,Bl,Si,Ti,xi,xs,js,ji,Ai,zn,Ee,Ge;if(typeof Xt.data!="string"){console.warn("[ws] Received non-string WebSocket message; ignoring");return}const ft=n_(Xt.data);if(ft)switch(ft.type){case"environments":p(Zn((Oe=ft.payload)==null?void 0:Oe.environments,Qb,"environments","environments"));break;case"sessions":g(Zn((Je=ft.payload)==null?void 0:Je.sessions,Qp,"sessions","sessions"));break;case"session_event":{if(!Pp(ft.payload)){Tl("session_event","payload is not a valid SessionEvent");break}const ct=ft.payload;let Ut=0;_(Gt=>{const oe=[...Gt,ct];return oe.length>ri?(Ut=oe.length-ri,oe.slice(-ri)):oe}),Ut>0&&E(Gt=>Gt+Ut),ct.eventType==="status"&&g(Gt=>Gt.map(oe=>oe.id===ct.sessionId?{...oe,status:ct.content}:oe));break}case"session_events":{const ct=Zn((sn=ft.payload)==null?void 0:sn.events,Pp,"session_events","events"),Ut=(it=ft.payload)==null?void 0:it.sessionId;if(typeof Ut!="string"){Tl("session_events","missing or non-string sessionId");break}if(ct.length>0){let Gt=0;_(oe=>{const qn=[...oe.filter(Ni=>Ni.sessionId!==Ut),...ct];return qn.length>ri?(Gt=qn.length-ri,qn.slice(-ri)):qn}),Gt>0&&E(oe=>oe+Gt)}break}case"spawned":{const ct=(fe=ft.payload)==null?void 0:fe.sessionId;typeof ct=="string"&&ct&&R(ct),G({type:"list_sessions"});break}case"projects":O(Zn((fn=ft.payload)==null?void 0:fn.projects,Pb,"projects","projects"));break;case"project_created":Ft(!1),G({type:"list_projects"});break;case"project_archived":G({type:"list_projects"});break;case"project_updated":G({type:"list_projects"});break;case"tasks":{const ct=Zn((ya=ft.payload)==null?void 0:ya.tasks,Fb,"tasks","tasks"),Ut=(typeof((Ts=ft.payload)==null?void 0:Ts.projectId)=="string"?ft.payload.projectId:"")||(ct.length>0?ct[0].projectId:"");if(!Ut){Y(ct);break}Y(Gt=>[...Gt.filter(oe=>oe.projectId!==Ut),...ct]);break}case"task_created":{const ct=(ba=ft.payload)==null?void 0:ba.task;if(tn(ct)){const Ut=typeof ct.project_id=="string"?ct.project_id:typeof ct.projectId=="string"?ct.projectId:"";Ut&&G({type:"list_tasks",payload:{projectId:Ut}})}break}case"task_started":{const ct=ft.payload;if(!tn(ct))break;_t(Gt=>ct.taskId&&Gt===ct.taskId?void 0:Gt),ct.sessionId&&G({type:"list_sessions"});const Ut=typeof ct.projectId=="string"?ct.projectId:void 0;Ut?G({type:"list_tasks",payload:{projectId:Ut}}):ct.taskId&&Y(Gt=>{const oe=Gt.find(Fa=>Fa.id===ct.taskId);return oe&&G({type:"list_tasks",payload:{projectId:oe.projectId}}),Gt});break}case"task_approved":case"task_rejected":case"task_deleted":case"task_updated":{const ct=ft.payload;if(!tn(ct))break;const Ut=typeof ct.projectId=="string"?ct.projectId:void 0;Ut?G({type:"list_tasks",payload:{projectId:Ut}}):ct.taskId&&Y(Gt=>{const oe=Gt.find(Fa=>Fa.id===ct.taskId);return oe&&G({type:"list_tasks",payload:{projectId:oe.projectId}}),Gt});break}case"findings":X(Zn((Bl=ft.payload)==null?void 0:Bl.findings,Jb,"findings","findings"));break;case"finding_posted":typeof((Si=ft.payload)==null?void 0:Si.projectId)=="string"&&G({type:"list_findings",payload:{projectId:ft.payload.projectId}});break;case"tokens":tt(Zn((Ti=ft.payload)==null?void 0:Ti.tokens,$b,"tokens","tokens"));break;case"token_changed":G({type:"list_tokens"});break;case"provision_progress":{if(!Wb(ft.payload)){Tl("provision_progress","payload is not a valid ProvisionStatus with environmentId");break}const ct=ft.payload;nt(Ut=>({...Ut,[ct.environmentId]:{stage:ct.stage,message:ct.message,progress:ct.progress}})),ct.stage==="ready"&&setTimeout(()=>{nt(Gt=>{const oe={...Gt};return delete oe[ct.environmentId],oe})},5e3);break}case"environment_added":break;case"environment_removed":if(typeof((xi=ft.payload)==null?void 0:xi.environmentId)=="string"){const ct=ft.payload.environmentId;p(Ut=>Ut.filter(Gt=>Gt.id!==ct)),nt(Ut=>{const Gt={...Ut};return delete Gt[ct],Gt})}G({type:"list_sessions"});break;case"codespaces_list":{const ct=Zn((xs=ft.payload)==null?void 0:xs.codespaces,t_,"codespaces_list","codespaces"),Ut=typeof((js=ft.payload)==null?void 0:js.error)=="string"?ft.payload.error:"";mt(ct),$(Ut);break}case"codespace_created":{St(!1),G({type:"list_codespaces"});break}case"codespace_create_error":{St(!1);const ct=typeof((ji=ft.payload)==null?void 0:ji.message)=="string"?ft.payload.message:"Failed to create codespace";$(ct);break}case"personas":{const ct=Zn((Ai=ft.payload)==null?void 0:Ai.personas,e_,"personas","personas");Q(ct);break}case"persona_created":case"persona_updated":case"persona_deleted":G({type:"list_personas"});break;case"task_sessions":{const ct=(zn=ft.payload)==null?void 0:zn.taskId;if(typeof ct!="string"||!ct)break;const Ut=Zn((Ee=ft.payload)==null?void 0:Ee.sessions,Qp,"task_sessions","sessions");Ct(Gt=>({...Gt,[ct]:Ut}));break}case"error":console.error("[ws]",(Ge=ft.payload)==null?void 0:Ge.message);break}},J.onclose=()=>{h(!1),o.current=void 0,Ft(!1),_t(void 0),clearTimeout(Tt),Tt=setTimeout(le,a_)},J.onerror=()=>{J.close()}}return le(),()=>{clearTimeout(Tt),J==null||J.close()}},[l,G]);const ae=S.useCallback((J,Tt,le,Xt,ft)=>{G({type:"spawn",payload:{environmentId:J,prompt:Tt,model:le||"",runtime:Xt||"",personaId:ft||""}})},[G]),ye=S.useCallback((J,Tt)=>{G({type:"send_input",payload:{sessionId:J,text:Tt}})},[G]),en=S.useCallback(J=>{G({type:"kill",payload:{sessionId:J}})},[G]),He=S.useCallback(()=>{G({type:"list_environments"}),G({type:"list_sessions"}),G({type:"list_projects"}),G({type:"list_tokens"})},[G]),Wt=S.useCallback(J=>{G({type:"get_session_events",payload:{sessionId:J}})},[G]),nn=S.useCallback(()=>{_([]),E(0)},[]),Ue=S.useCallback((J,Tt,le,Xt)=>{Ft(!0),G({type:"create_project",payload:{name:J,description:Tt||"",repoUrl:le||"",defaultEnvironmentId:Xt||""}})},[G]),It=S.useCallback(J=>{G({type:"archive_project",payload:{projectId:J}})},[G]),Kt=S.useCallback((J,Tt)=>{G({type:"update_project",payload:{projectId:J,...Tt}})},[G]),me=S.useCallback(J=>{G({type:"list_tasks",payload:{projectId:J}})},[G]),F=S.useCallback((J,Tt,le,Xt,ft,Oe,Je)=>{G({type:"create_task",payload:{projectId:J,title:Tt,description:le||"",environmentId:Xt||"",dependsOn:ft||[],parentTaskId:Oe||"",personaId:Je||""}})},[G]),Rt=S.useCallback((J,Tt,le,Xt)=>{_t(J),G({type:"start_task",payload:{taskId:J,runtime:Tt||"",model:le||"",personaId:Xt||""}})},[G]),xt=S.useCallback(J=>{G({type:"approve_task",payload:{taskId:J}})},[G]),w=S.useCallback((J,Tt)=>{G({type:"reject_task",payload:{taskId:J,reviewNotes:Tt}})},[G]),V=S.useCallback((J,Tt,le,Xt,ft,Oe)=>{G({type:"update_task",payload:{taskId:J,title:Tt,description:le,dependsOn:Xt,environmentId:ft,personaId:Oe}})},[G]),W=S.useCallback(J=>{G({type:"delete_task",payload:{taskId:J}})},[G]),ot=S.useCallback(J=>{G({type:"list_findings",payload:{projectId:J}})},[G]),jt=S.useCallback((J,Tt,le,Xt,ft)=>{G({type:"post_finding",payload:{projectId:J,title:Tt,content:le,category:Xt||"general",tags:ft||[]}})},[G]),At=S.useCallback(()=>{G({type:"list_tokens"})},[G]),ht=S.useCallback((J,Tt,le,Xt,ft)=>{G({type:"set_token",payload:{name:J,value:Tt,tokenType:le,envVar:Xt,filePath:ft}})},[G]),de=S.useCallback(J=>{G({type:"delete_token",payload:{name:J}})},[G]),kt=S.useCallback((J,Tt,le,Xt)=>{const ft={displayName:J,adapterType:Tt,adapterConfig:le||{}};Xt&&(ft.defaultRuntime=Xt),G({type:"add_environment",payload:ft})},[G]),pe=S.useCallback(J=>{G({type:"provision_environment",payload:{environmentId:J}})},[G]),se=S.useCallback(J=>{G({type:"stop_environment",payload:{environmentId:J}})},[G]),Me=S.useCallback(J=>{G({type:"remove_environment",payload:{environmentId:J}})},[G]),H=S.useCallback(()=>{G({type:"list_codespaces"})},[G]),Vt=S.useCallback(J=>{if(!u){$("Not connected to server. Please try again once the connection is restored.");return}St(!0),$(""),G({type:"create_codespace",payload:{repo:J}})},[G,u]),Fn=S.useCallback((J,Tt,le,Xt,ft,Oe)=>{G({type:"create_persona",payload:{name:J,description:Tt,systemPrompt:le,runtime:Xt||"",model:ft||"",maxTurns:Oe||0}})},[G]),Ie=S.useCallback((J,Tt,le,Xt,ft,Oe,Je)=>{G({type:"update_persona",payload:{personaId:J,name:Tt||"",description:le||"",systemPrompt:Xt||"",runtime:ft||"",model:Oe||"",maxTurns:Je||0}})},[G]),Re=S.useCallback(J=>{G({type:"delete_persona",payload:{personaId:J}})},[G]),an=S.useCallback(J=>{G({type:"get_task_sessions",payload:{taskId:J}})},[G]);return{connected:u,environments:f,sessions:v,events:b,eventsDropped:x,lastSpawnedId:M,projects:K,tasks:P,findings:et,tokens:L,spawn:ae,sendInput:ye,kill:en,refresh:He,loadSessionEvents:Wt,clearEvents:nn,createProject:Ue,archiveProject:It,updateProject:Kt,loadTasks:me,createTask:F,startTask:Rt,approveTask:xt,rejectTask:w,updateTask:V,deleteTask:W,loadFindings:ot,postFinding:jt,addEnvironment:kt,loadTokens:At,setToken:ht,deleteToken:de,provisionStatus:U,provisionEnvironment:pe,stopEnvironment:se,removeEnvironment:Me,codespaces:at,codespaceError:Dt,codespaceCreating:st,listCodespaces:H,createCodespace:Vt,projectCreating:vt,taskStartingId:bt,personas:B,createPersona:Fn,updatePersona:Ie,deletePersona:Re,taskSessions:lt,loadTaskSessions:an}}const md=S.createContext(void 0);function i_({children:a}){const i=s_();return d.jsx(md.Provider,{value:i,children:a})}function On(){const a=S.useContext(md);if(!a)throw new Error("useGrackle must be used within GrackleProvider");return a}const l_=[{id:"env-local-01",displayName:"Local Dev",adapterType:"local",defaultRuntime:"claude-code",status:"connected",bootstrapped:!0},{id:"env-docker-01",displayName:"Docker Sandbox",adapterType:"docker",defaultRuntime:"claude-code",status:"connected",bootstrapped:!0},{id:"env-cs-01",displayName:"GitHub Codespace",adapterType:"codespace",defaultRuntime:"claude-code",status:"connected",bootstrapped:!0},{id:"env-remote-01",displayName:"Staging (SSH)",adapterType:"ssh",defaultRuntime:"claude-code",status:"disconnected",bootstrapped:!1}],o_=[{id:"sess-001-prev",environmentId:"env-local-01",runtime:"claude-code",status:"failed",prompt:"Implement auth middleware",startedAt:"2026-02-26T14:00:00Z",endedAt:"2026-02-26T15:12:00Z",error:"Context window exceeded before completing implementation"},{id:"sess-001",environmentId:"env-local-01",runtime:"node",status:"running",prompt:"Refactor the authentication middleware to use JWT tokens",startedAt:"2026-02-27T08:15:00Z"},{id:"sess-002",environmentId:"env-docker-01",runtime:"python",status:"completed",prompt:"Write unit tests for the user registration endpoint",startedAt:"2026-02-27T07:30:00Z"},{id:"sess-003",environmentId:"env-local-01",runtime:"node",status:"failed",prompt:"Migrate database schema to add audit_log table",startedAt:"2026-02-26T22:45:00Z"},{id:"sess-004",environmentId:"env-docker-01",runtime:"python",status:"running",prompt:"Implement rate limiting for the public API",startedAt:"2026-02-27T09:00:00Z"}],r_=[{sessionId:"sess-001-prev",eventType:"status",timestamp:"2026-02-26T14:00:01Z",content:"running"},{sessionId:"sess-001-prev",eventType:"output",timestamp:"2026-02-26T14:00:05Z",content:"Reading src/middleware/auth.ts to understand the current authentication flow..."},{sessionId:"sess-001-prev",eventType:"error",timestamp:"2026-02-26T15:12:00Z",content:"Context window exceeded before completing implementation"},{sessionId:"sess-001",eventType:"status",timestamp:"2026-02-27T08:15:01Z",content:"running"},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:02Z",content:"Analyzing current authentication middleware in src/middleware/auth.ts..."},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:04Z",content:`Found 3 files using session-based auth:
26
26
  - src/middleware/auth.ts
27
27
  - src/routes/login.ts
28
28
  - src/routes/protected.ts`},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:07Z",content:"Installing jsonwebtoken and @types/jsonwebtoken..."},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:12Z",content:`Rewriting auth middleware:
@@ -46,7 +46,7 @@ export function verifyToken(req: Request, res: Response, next: NextFunction): vo
46
46
  res.status(403).json({ error: "Invalid token" });
47
47
  }
48
48
  }
49
- \`\`\``},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:18Z",content:"Updated login route to issue JWT tokens with 24h expiry."},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:22Z",content:"Running test suite... 14 tests passed, 2 updated, 0 failed."},{sessionId:"sess-002",eventType:"status",timestamp:"2026-02-27T07:30:01Z",content:"running"},{sessionId:"sess-002",eventType:"output",timestamp:"2026-02-27T07:30:05Z",content:"Generating pytest tests for POST /api/register endpoint..."},{sessionId:"sess-002",eventType:"output",timestamp:"2026-02-27T07:32:00Z",content:"Created 8 test cases covering: valid registration, duplicate email, weak password, missing fields, SQL injection, XSS payload, rate limit, and CORS headers."},{sessionId:"sess-002",eventType:"status",timestamp:"2026-02-27T07:33:00Z",content:"completed"}],cS=[{id:"proj-alpha",name:"Project Alpha",description:"Core platform API and authentication services",repoUrl:"https://github.com/acme/alpha",defaultEnvironmentId:"env-local-01",status:"active",createdAt:"2026-01-15T10:00:00Z",updatedAt:"2026-01-15T10:00:00Z"},{id:"proj-beta",name:"Data Pipeline",description:"ETL pipelines for analytics and reporting",repoUrl:"https://github.com/acme/data-pipeline",defaultEnvironmentId:"env-docker-01",status:"active",createdAt:"2026-02-01T14:30:00Z",updatedAt:"2026-02-01T14:30:00Z"},{id:"proj-gamma",name:"Mobile App",description:"React Native cross-platform mobile application",repoUrl:"",defaultEnvironmentId:"env-local-01",status:"archived",createdAt:"2025-11-20T09:00:00Z",updatedAt:"2025-11-20T09:00:00Z"}],uS=[{id:"task-001",projectId:"proj-alpha",title:"Implement JWT authentication",description:"Replace session-based auth with JWT tokens across all protected routes",status:"in_progress",branch:"feat/jwt-auth",environmentId:"env-local-01",sessionId:"sess-001",dependsOn:[],reviewNotes:"",sortOrder:1,createdAt:"2026-02-25T10:00:00Z",parentTaskId:"",depth:0,childTaskIds:["task-001a","task-001b","task-001c"],canDecompose:!0,personaId:"persona-arch"},{id:"task-001a",projectId:"proj-alpha",title:"Design token schema",description:"Define JWT payload structure, expiry, and refresh token strategy",status:"done",branch:"feat/jwt-auth/design-token-schema",environmentId:"env-local-01",sessionId:"",dependsOn:[],reviewNotes:"",sortOrder:1,createdAt:"2026-02-25T10:10:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-001b",projectId:"proj-alpha",title:"Implement auth middleware",description:"Build Express middleware that verifies JWT Bearer tokens",status:"in_progress",branch:"feat/jwt-auth/implement-auth-middleware",environmentId:"env-local-01",sessionId:"sess-001",dependsOn:[],reviewNotes:"",sortOrder:2,createdAt:"2026-02-25T10:15:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1,personaId:"persona-fe"},{id:"task-001c",projectId:"proj-alpha",title:"Write auth integration tests",description:"End-to-end tests for login flow, token refresh, and protected route access",status:"pending",branch:"",environmentId:"env-local-01",sessionId:"",dependsOn:["task-001b"],reviewNotes:"",sortOrder:3,createdAt:"2026-02-25T10:20:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1,personaId:"persona-tester"},{id:"task-002",projectId:"proj-alpha",title:"Add rate limiting",description:"Implement token-bucket rate limiting for public API endpoints",status:"pending",branch:"",environmentId:"env-local-01",sessionId:"",dependsOn:["task-001"],reviewNotes:"",sortOrder:2,createdAt:"2026-02-25T10:05:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-003",projectId:"proj-alpha",title:"Set up OpenAPI documentation",description:"Generate Swagger docs from route decorators and serve at /api/docs",status:"review",branch:"feat/openapi-docs",environmentId:"env-local-01",sessionId:"sess-002",dependsOn:[],reviewNotes:"",sortOrder:3,createdAt:"2026-02-24T16:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,personaId:"persona-fe"},{id:"task-004",projectId:"proj-alpha",title:"Database connection pooling",description:"Switch from single connection to a connection pool with health checks",status:"done",branch:"feat/db-pool",environmentId:"env-local-01",sessionId:"",dependsOn:[],reviewNotes:"LGTM — pool size and idle timeout values are sensible.",sortOrder:4,createdAt:"2026-02-23T11:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-005",projectId:"proj-alpha",title:"Fix N+1 query in user list",description:"Use a JOIN instead of per-row lookups in GET /api/users",status:"assigned",branch:"fix/user-list-n1",environmentId:"env-local-01",sessionId:"",dependsOn:[],reviewNotes:"The fix breaks pagination — cursor should reference the joined table, not the subquery.",sortOrder:5,createdAt:"2026-02-22T09:30:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-006",projectId:"proj-beta",title:"Add Parquet export support",description:"Allow pipeline outputs to be written as Parquet files for Spark consumption",status:"in_progress",branch:"feat/parquet-export",environmentId:"env-docker-01",sessionId:"",dependsOn:[],reviewNotes:"",sortOrder:1,createdAt:"2026-02-26T08:00:00Z",parentTaskId:"",depth:0,childTaskIds:["task-006a","task-006b","task-006c","task-006d"],canDecompose:!0,personaId:""},{id:"task-006a",projectId:"proj-beta",title:"Define Parquet schema mapping",description:"Map internal column types to Arrow/Parquet type system",status:"done",branch:"feat/parquet-export/define-parquet-schema-mapping",environmentId:"env-docker-01",sessionId:"",dependsOn:[],reviewNotes:"",sortOrder:1,createdAt:"2026-02-26T08:05:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-006b",projectId:"proj-beta",title:"Implement row-group writer",description:"Write buffered row groups with configurable batch size",status:"done",branch:"feat/parquet-export/implement-row-group-writer",environmentId:"env-docker-01",sessionId:"",dependsOn:["task-006a"],reviewNotes:"",sortOrder:2,createdAt:"2026-02-26T08:10:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-006c",projectId:"proj-beta",title:"Add compression options",description:"Support Snappy, ZSTD, and GZIP compression for Parquet output",status:"in_progress",branch:"feat/parquet-export/add-compression-options",environmentId:"env-docker-01",sessionId:"sess-004",dependsOn:["task-006b"],reviewNotes:"",sortOrder:3,createdAt:"2026-02-26T08:15:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-006d",projectId:"proj-beta",title:"Write Parquet integration tests",description:"Round-trip tests: write Parquet, read back with pyarrow, verify data integrity",status:"pending",branch:"",environmentId:"env-docker-01",sessionId:"",dependsOn:["task-006c"],reviewNotes:"",sortOrder:4,createdAt:"2026-02-26T08:20:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-007",projectId:"proj-beta",title:"Implement incremental loads",description:"Track watermarks so pipelines only process new/changed rows",status:"in_progress",branch:"feat/incremental",environmentId:"env-docker-01",sessionId:"sess-004",dependsOn:[],reviewNotes:"",sortOrder:2,createdAt:"2026-02-26T08:30:00Z",parentTaskId:"",depth:0,childTaskIds:["task-007a","task-007b"],canDecompose:!0,personaId:""},{id:"task-007a",projectId:"proj-beta",title:"Design watermark storage",description:"Define schema for per-pipeline high-watermark tracking",status:"done",branch:"feat/incremental/design-watermark-storage",environmentId:"env-docker-01",sessionId:"",dependsOn:[],reviewNotes:"",sortOrder:1,createdAt:"2026-02-26T08:35:00Z",parentTaskId:"task-007",depth:1,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-007b",projectId:"proj-beta",title:"Implement change detection query",description:"Generate WHERE clauses from watermarks to fetch only changed rows",status:"failed",branch:"feat/incremental/implement-change-detection-query",environmentId:"env-docker-01",sessionId:"",dependsOn:["task-007a"],reviewNotes:"Query fails on tables without a monotonic primary key",sortOrder:2,createdAt:"2026-02-26T08:40:00Z",parentTaskId:"task-007",depth:1,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-008",projectId:"proj-beta",title:"Add pipeline monitoring dashboard",description:"Real-time metrics for pipeline throughput, latency, and error rates",status:"review",branch:"feat/monitoring",environmentId:"env-docker-01",sessionId:"",dependsOn:[],reviewNotes:"",sortOrder:3,createdAt:"2026-02-26T09:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,personaId:""}],Fp=[{id:"find-001",projectId:"proj-alpha",taskId:"task-001",sessionId:"sess-001",category:"architecture",title:"Auth middleware is tightly coupled to Express",content:"The current auth middleware directly references Express Request/Response types. Consider extracting a framework-agnostic token verification layer so we can reuse it in the WebSocket auth path.",tags:["auth","decoupling","middleware"],createdAt:"2026-02-27T08:16:00Z"},{id:"find-002",projectId:"proj-alpha",taskId:"task-003",sessionId:"sess-002",category:"api",title:"Missing pagination on GET /api/users",content:"The users endpoint returns all rows without limit/offset. For datasets over 10k rows this will cause timeouts. Recommend cursor-based pagination with a default page size of 50.",tags:["api","pagination","performance"],createdAt:"2026-02-27T07:31:00Z"},{id:"find-003",projectId:"proj-alpha",taskId:"task-005",sessionId:"sess-003",category:"bug",title:"Race condition in session cleanup",content:"When two requests hit /api/logout concurrently, the second call throws a 500 because the session row has already been deleted. Needs an idempotent DELETE or a conditional check.",tags:["bug","concurrency","sessions"],createdAt:"2026-02-26T22:50:00Z"},{id:"find-004",projectId:"proj-alpha",taskId:"task-004",sessionId:"",category:"decision",title:"Chose pg-pool over knex connection pool",content:"pg-pool gives us direct control over idle timeout, max connections, and health check queries. Knex wraps pg-pool anyway and adds overhead we don't need since we write raw SQL.",tags:["database","decision","postgres"],createdAt:"2026-02-23T11:30:00Z"},{id:"find-005",projectId:"proj-alpha",taskId:"",sessionId:"",category:"dependency",title:"jsonwebtoken has 3 high-severity CVEs",content:"The jsonwebtoken package (v8.x) has known vulnerabilities. Consider migrating to jose which is maintained, supports ESM, and covers the same JWS/JWE surface area with zero dependencies.",tags:["security","dependency","jwt"],createdAt:"2026-02-27T08:20:00Z"},{id:"find-006",projectId:"proj-alpha",taskId:"task-001",sessionId:"sess-001",category:"pattern",title:"Consistent error response shape",content:"All error responses should follow the shape `{ error: string, code: string, details?: unknown }`. Currently some routes return `{ message: string }` and others return `{ error: string }`.",tags:["api","consistency","error-handling"],createdAt:"2026-02-27T08:17:00Z"},{id:"find-007",projectId:"proj-beta",taskId:"task-007",sessionId:"sess-004",category:"architecture",title:"Watermark storage should be pluggable",content:"The incremental load watermarks are currently stored in a local SQLite file. For production multi-worker scenarios, this needs to be backed by a shared store (Redis or Postgres).",tags:["architecture","pipeline","scalability"],createdAt:"2026-02-27T09:05:00Z"}],dS=[{name:"anthropic",tokenType:"env_var",envVar:"ANTHROPIC_API_KEY",filePath:"",expiresAt:""},{name:"github",tokenType:"env_var",envVar:"GITHUB_TOKEN",filePath:"",expiresAt:"2026-12-31T23:59:59Z"},{name:"gcp-service-account",tokenType:"file",envVar:"",filePath:"/home/user/.config/gcloud/credentials.json",expiresAt:""}],fS=[{id:"persona-arch",name:"Software Architect",description:"Designs system architecture, defines interfaces, and decomposes large features into implementable tasks.",systemPrompt:"You are a senior software architect. Focus on clean interfaces, separation of concerns, and scalable patterns. When decomposing work, create concrete subtasks with clear acceptance criteria.",toolConfig:JSON.stringify({allowedTools:["Read","Grep","Glob","Write","Edit"]}),runtime:"claude-code",model:"claude-sonnet-4-5-20250929",maxTurns:50,mcpServers:"[]",createdAt:"2026-02-20T10:00:00Z",updatedAt:"2026-02-20T10:00:00Z"},{id:"persona-fe",name:"Frontend Engineer",description:"React specialist — builds UI components, writes CSS, implements routing, and creates Playwright tests.",systemPrompt:"You are a frontend engineer specializing in React, TypeScript, and modern CSS. Follow component composition patterns, use semantic HTML, and write accessible markup.",toolConfig:JSON.stringify({allowedTools:["Read","Grep","Glob","Write","Edit","Bash"]}),runtime:"claude-code",model:"claude-sonnet-4-5-20250929",maxTurns:100,mcpServers:"[]",createdAt:"2026-02-20T10:05:00Z",updatedAt:"2026-02-20T10:05:00Z"},{id:"persona-reviewer",name:"Code Reviewer",description:"Reviews diffs for correctness, security, and style. Posts findings for issues discovered.",systemPrompt:"You are a meticulous code reviewer. Check for security vulnerabilities, performance issues, and style consistency. Post findings for anything noteworthy.",toolConfig:JSON.stringify({allowedTools:["Read","Grep","Glob"]}),runtime:"claude-code",model:"claude-sonnet-4-5-20250929",maxTurns:30,mcpServers:"[]",createdAt:"2026-02-20T10:10:00Z",updatedAt:"2026-02-20T10:10:00Z"},{id:"persona-tester",name:"QA Engineer",description:"Writes comprehensive test suites — unit tests, integration tests, and E2E Playwright specs.",systemPrompt:"You are a QA engineer focused on test coverage. Write tests that cover happy paths, edge cases, error scenarios, and accessibility. Use Playwright for E2E tests.",toolConfig:JSON.stringify({allowedTools:["Read","Grep","Glob","Write","Edit","Bash"]}),runtime:"claude-code",model:"claude-sonnet-4-5-20250929",maxTurns:80,mcpServers:"[]",createdAt:"2026-02-20T10:15:00Z",updatedAt:"2026-02-20T10:15:00Z"}],hS={"task-001b":[{id:"sess-001-prev",environmentId:"env-local-01",runtime:"claude-code",status:"failed",prompt:"Implement auth middleware",startedAt:"2026-02-26T14:00:00Z"},{id:"sess-001",environmentId:"env-local-01",runtime:"claude-code",status:"running",prompt:"Implement auth middleware",startedAt:"2026-02-27T08:15:00Z"}],"task-006c":[{id:"sess-004",environmentId:"env-docker-01",runtime:"claude-code",status:"running",prompt:"Add compression options",startedAt:"2026-02-27T09:00:00Z"}]};function Be(a){return new Date(Date.now()+a).toISOString()}const Jp=[{label:"API Refactor",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:Be(0),content:"running"}},{delayMs:800,event:{eventType:"output",timestamp:Be(800),content:"Analyzing current API structure in src/routes/..."}},{delayMs:1600,event:{eventType:"output",timestamp:Be(1600),content:`Found 5 endpoints that need refactoring:
49
+ \`\`\``},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:18Z",content:"Updated login route to issue JWT tokens with 24h expiry."},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:22Z",content:"Running test suite... 14 tests passed, 2 updated, 0 failed."},{sessionId:"sess-002",eventType:"status",timestamp:"2026-02-27T07:30:01Z",content:"running"},{sessionId:"sess-002",eventType:"output",timestamp:"2026-02-27T07:30:05Z",content:"Generating pytest tests for POST /api/register endpoint..."},{sessionId:"sess-002",eventType:"output",timestamp:"2026-02-27T07:32:00Z",content:"Created 8 test cases covering: valid registration, duplicate email, weak password, missing fields, SQL injection, XSS payload, rate limit, and CORS headers."},{sessionId:"sess-002",eventType:"status",timestamp:"2026-02-27T07:33:00Z",content:"completed"}],c_=[{id:"proj-alpha",name:"Project Alpha",description:"Core platform API and authentication services",repoUrl:"https://github.com/acme/alpha",defaultEnvironmentId:"env-local-01",status:"active",createdAt:"2026-01-15T10:00:00Z",updatedAt:"2026-01-15T10:00:00Z"},{id:"proj-beta",name:"Data Pipeline",description:"ETL pipelines for analytics and reporting",repoUrl:"https://github.com/acme/data-pipeline",defaultEnvironmentId:"env-docker-01",status:"active",createdAt:"2026-02-01T14:30:00Z",updatedAt:"2026-02-01T14:30:00Z"},{id:"proj-gamma",name:"Mobile App",description:"React Native cross-platform mobile application",repoUrl:"",defaultEnvironmentId:"env-local-01",status:"archived",createdAt:"2025-11-20T09:00:00Z",updatedAt:"2025-11-20T09:00:00Z"}],u_=[{id:"task-001",projectId:"proj-alpha",title:"Implement JWT authentication",description:"Replace session-based auth with JWT tokens across all protected routes",status:"in_progress",branch:"feat/jwt-auth",environmentId:"env-local-01",sessionId:"sess-001",dependsOn:[],reviewNotes:"",sortOrder:1,createdAt:"2026-02-25T10:00:00Z",parentTaskId:"",depth:0,childTaskIds:["task-001a","task-001b","task-001c"],canDecompose:!0,personaId:"persona-arch"},{id:"task-001a",projectId:"proj-alpha",title:"Design token schema",description:"Define JWT payload structure, expiry, and refresh token strategy",status:"done",branch:"feat/jwt-auth/design-token-schema",environmentId:"env-local-01",sessionId:"",dependsOn:[],reviewNotes:"",sortOrder:1,createdAt:"2026-02-25T10:10:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-001b",projectId:"proj-alpha",title:"Implement auth middleware",description:"Build Express middleware that verifies JWT Bearer tokens",status:"in_progress",branch:"feat/jwt-auth/implement-auth-middleware",environmentId:"env-local-01",sessionId:"sess-001",dependsOn:[],reviewNotes:"",sortOrder:2,createdAt:"2026-02-25T10:15:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1,personaId:"persona-fe"},{id:"task-001c",projectId:"proj-alpha",title:"Write auth integration tests",description:"End-to-end tests for login flow, token refresh, and protected route access",status:"pending",branch:"",environmentId:"env-local-01",sessionId:"",dependsOn:["task-001b"],reviewNotes:"",sortOrder:3,createdAt:"2026-02-25T10:20:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1,personaId:"persona-tester"},{id:"task-002",projectId:"proj-alpha",title:"Add rate limiting",description:"Implement token-bucket rate limiting for public API endpoints",status:"pending",branch:"",environmentId:"env-local-01",sessionId:"",dependsOn:["task-001"],reviewNotes:"",sortOrder:2,createdAt:"2026-02-25T10:05:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-003",projectId:"proj-alpha",title:"Set up OpenAPI documentation",description:"Generate Swagger docs from route decorators and serve at /api/docs",status:"review",branch:"feat/openapi-docs",environmentId:"env-local-01",sessionId:"sess-002",dependsOn:[],reviewNotes:"",sortOrder:3,createdAt:"2026-02-24T16:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,personaId:"persona-fe"},{id:"task-004",projectId:"proj-alpha",title:"Database connection pooling",description:"Switch from single connection to a connection pool with health checks",status:"done",branch:"feat/db-pool",environmentId:"env-local-01",sessionId:"",dependsOn:[],reviewNotes:"LGTM — pool size and idle timeout values are sensible.",sortOrder:4,createdAt:"2026-02-23T11:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-005",projectId:"proj-alpha",title:"Fix N+1 query in user list",description:"Use a JOIN instead of per-row lookups in GET /api/users",status:"assigned",branch:"fix/user-list-n1",environmentId:"env-local-01",sessionId:"",dependsOn:[],reviewNotes:"The fix breaks pagination — cursor should reference the joined table, not the subquery.",sortOrder:5,createdAt:"2026-02-22T09:30:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-006",projectId:"proj-beta",title:"Add Parquet export support",description:"Allow pipeline outputs to be written as Parquet files for Spark consumption",status:"in_progress",branch:"feat/parquet-export",environmentId:"env-docker-01",sessionId:"",dependsOn:[],reviewNotes:"",sortOrder:1,createdAt:"2026-02-26T08:00:00Z",parentTaskId:"",depth:0,childTaskIds:["task-006a","task-006b","task-006c","task-006d"],canDecompose:!0,personaId:""},{id:"task-006a",projectId:"proj-beta",title:"Define Parquet schema mapping",description:"Map internal column types to Arrow/Parquet type system",status:"done",branch:"feat/parquet-export/define-parquet-schema-mapping",environmentId:"env-docker-01",sessionId:"",dependsOn:[],reviewNotes:"",sortOrder:1,createdAt:"2026-02-26T08:05:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-006b",projectId:"proj-beta",title:"Implement row-group writer",description:"Write buffered row groups with configurable batch size",status:"done",branch:"feat/parquet-export/implement-row-group-writer",environmentId:"env-docker-01",sessionId:"",dependsOn:["task-006a"],reviewNotes:"",sortOrder:2,createdAt:"2026-02-26T08:10:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-006c",projectId:"proj-beta",title:"Add compression options",description:"Support Snappy, ZSTD, and GZIP compression for Parquet output",status:"in_progress",branch:"feat/parquet-export/add-compression-options",environmentId:"env-docker-01",sessionId:"sess-004",dependsOn:["task-006b"],reviewNotes:"",sortOrder:3,createdAt:"2026-02-26T08:15:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-006d",projectId:"proj-beta",title:"Write Parquet integration tests",description:"Round-trip tests: write Parquet, read back with pyarrow, verify data integrity",status:"pending",branch:"",environmentId:"env-docker-01",sessionId:"",dependsOn:["task-006c"],reviewNotes:"",sortOrder:4,createdAt:"2026-02-26T08:20:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-007",projectId:"proj-beta",title:"Implement incremental loads",description:"Track watermarks so pipelines only process new/changed rows",status:"in_progress",branch:"feat/incremental",environmentId:"env-docker-01",sessionId:"sess-004",dependsOn:[],reviewNotes:"",sortOrder:2,createdAt:"2026-02-26T08:30:00Z",parentTaskId:"",depth:0,childTaskIds:["task-007a","task-007b"],canDecompose:!0,personaId:""},{id:"task-007a",projectId:"proj-beta",title:"Design watermark storage",description:"Define schema for per-pipeline high-watermark tracking",status:"done",branch:"feat/incremental/design-watermark-storage",environmentId:"env-docker-01",sessionId:"",dependsOn:[],reviewNotes:"",sortOrder:1,createdAt:"2026-02-26T08:35:00Z",parentTaskId:"task-007",depth:1,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-007b",projectId:"proj-beta",title:"Implement change detection query",description:"Generate WHERE clauses from watermarks to fetch only changed rows",status:"failed",branch:"feat/incremental/implement-change-detection-query",environmentId:"env-docker-01",sessionId:"",dependsOn:["task-007a"],reviewNotes:"Query fails on tables without a monotonic primary key",sortOrder:2,createdAt:"2026-02-26T08:40:00Z",parentTaskId:"task-007",depth:1,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-008",projectId:"proj-beta",title:"Add pipeline monitoring dashboard",description:"Real-time metrics for pipeline throughput, latency, and error rates",status:"review",branch:"feat/monitoring",environmentId:"env-docker-01",sessionId:"",dependsOn:[],reviewNotes:"",sortOrder:3,createdAt:"2026-02-26T09:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,personaId:""}],Fp=[{id:"find-001",projectId:"proj-alpha",taskId:"task-001",sessionId:"sess-001",category:"architecture",title:"Auth middleware is tightly coupled to Express",content:"The current auth middleware directly references Express Request/Response types. Consider extracting a framework-agnostic token verification layer so we can reuse it in the WebSocket auth path.",tags:["auth","decoupling","middleware"],createdAt:"2026-02-27T08:16:00Z"},{id:"find-002",projectId:"proj-alpha",taskId:"task-003",sessionId:"sess-002",category:"api",title:"Missing pagination on GET /api/users",content:"The users endpoint returns all rows without limit/offset. For datasets over 10k rows this will cause timeouts. Recommend cursor-based pagination with a default page size of 50.",tags:["api","pagination","performance"],createdAt:"2026-02-27T07:31:00Z"},{id:"find-003",projectId:"proj-alpha",taskId:"task-005",sessionId:"sess-003",category:"bug",title:"Race condition in session cleanup",content:"When two requests hit /api/logout concurrently, the second call throws a 500 because the session row has already been deleted. Needs an idempotent DELETE or a conditional check.",tags:["bug","concurrency","sessions"],createdAt:"2026-02-26T22:50:00Z"},{id:"find-004",projectId:"proj-alpha",taskId:"task-004",sessionId:"",category:"decision",title:"Chose pg-pool over knex connection pool",content:"pg-pool gives us direct control over idle timeout, max connections, and health check queries. Knex wraps pg-pool anyway and adds overhead we don't need since we write raw SQL.",tags:["database","decision","postgres"],createdAt:"2026-02-23T11:30:00Z"},{id:"find-005",projectId:"proj-alpha",taskId:"",sessionId:"",category:"dependency",title:"jsonwebtoken has 3 high-severity CVEs",content:"The jsonwebtoken package (v8.x) has known vulnerabilities. Consider migrating to jose which is maintained, supports ESM, and covers the same JWS/JWE surface area with zero dependencies.",tags:["security","dependency","jwt"],createdAt:"2026-02-27T08:20:00Z"},{id:"find-006",projectId:"proj-alpha",taskId:"task-001",sessionId:"sess-001",category:"pattern",title:"Consistent error response shape",content:"All error responses should follow the shape `{ error: string, code: string, details?: unknown }`. Currently some routes return `{ message: string }` and others return `{ error: string }`.",tags:["api","consistency","error-handling"],createdAt:"2026-02-27T08:17:00Z"},{id:"find-007",projectId:"proj-beta",taskId:"task-007",sessionId:"sess-004",category:"architecture",title:"Watermark storage should be pluggable",content:"The incremental load watermarks are currently stored in a local SQLite file. For production multi-worker scenarios, this needs to be backed by a shared store (Redis or Postgres).",tags:["architecture","pipeline","scalability"],createdAt:"2026-02-27T09:05:00Z"}],d_=[{name:"anthropic",tokenType:"env_var",envVar:"ANTHROPIC_API_KEY",filePath:"",expiresAt:""},{name:"github",tokenType:"env_var",envVar:"GITHUB_TOKEN",filePath:"",expiresAt:"2026-12-31T23:59:59Z"},{name:"gcp-service-account",tokenType:"file",envVar:"",filePath:"/home/user/.config/gcloud/credentials.json",expiresAt:""}],f_=[{id:"persona-arch",name:"Software Architect",description:"Designs system architecture, defines interfaces, and decomposes large features into implementable tasks.",systemPrompt:"You are a senior software architect. Focus on clean interfaces, separation of concerns, and scalable patterns. When decomposing work, create concrete subtasks with clear acceptance criteria.",toolConfig:JSON.stringify({allowedTools:["Read","Grep","Glob","Write","Edit"]}),runtime:"claude-code",model:"claude-sonnet-4-5-20250929",maxTurns:50,mcpServers:"[]",createdAt:"2026-02-20T10:00:00Z",updatedAt:"2026-02-20T10:00:00Z"},{id:"persona-fe",name:"Frontend Engineer",description:"React specialist — builds UI components, writes CSS, implements routing, and creates Playwright tests.",systemPrompt:"You are a frontend engineer specializing in React, TypeScript, and modern CSS. Follow component composition patterns, use semantic HTML, and write accessible markup.",toolConfig:JSON.stringify({allowedTools:["Read","Grep","Glob","Write","Edit","Bash"]}),runtime:"claude-code",model:"claude-sonnet-4-5-20250929",maxTurns:100,mcpServers:"[]",createdAt:"2026-02-20T10:05:00Z",updatedAt:"2026-02-20T10:05:00Z"},{id:"persona-reviewer",name:"Code Reviewer",description:"Reviews diffs for correctness, security, and style. Posts findings for issues discovered.",systemPrompt:"You are a meticulous code reviewer. Check for security vulnerabilities, performance issues, and style consistency. Post findings for anything noteworthy.",toolConfig:JSON.stringify({allowedTools:["Read","Grep","Glob"]}),runtime:"claude-code",model:"claude-sonnet-4-5-20250929",maxTurns:30,mcpServers:"[]",createdAt:"2026-02-20T10:10:00Z",updatedAt:"2026-02-20T10:10:00Z"},{id:"persona-tester",name:"QA Engineer",description:"Writes comprehensive test suites — unit tests, integration tests, and E2E Playwright specs.",systemPrompt:"You are a QA engineer focused on test coverage. Write tests that cover happy paths, edge cases, error scenarios, and accessibility. Use Playwright for E2E tests.",toolConfig:JSON.stringify({allowedTools:["Read","Grep","Glob","Write","Edit","Bash"]}),runtime:"claude-code",model:"claude-sonnet-4-5-20250929",maxTurns:80,mcpServers:"[]",createdAt:"2026-02-20T10:15:00Z",updatedAt:"2026-02-20T10:15:00Z"}],h_={"task-001b":[{id:"sess-001-prev",environmentId:"env-local-01",runtime:"claude-code",status:"failed",prompt:"Implement auth middleware",startedAt:"2026-02-26T14:00:00Z"},{id:"sess-001",environmentId:"env-local-01",runtime:"claude-code",status:"running",prompt:"Implement auth middleware",startedAt:"2026-02-27T08:15:00Z"}],"task-006c":[{id:"sess-004",environmentId:"env-docker-01",runtime:"claude-code",status:"running",prompt:"Add compression options",startedAt:"2026-02-27T09:00:00Z"}]};function Be(a){return new Date(Date.now()+a).toISOString()}const Jp=[{label:"API Refactor",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:Be(0),content:"running"}},{delayMs:800,event:{eventType:"output",timestamp:Be(800),content:"Analyzing current API structure in src/routes/..."}},{delayMs:1600,event:{eventType:"output",timestamp:Be(1600),content:`Found 5 endpoints that need refactoring:
50
50
  - GET /api/users
51
51
  - POST /api/users
52
52
  - GET /api/users/:id
@@ -64,7 +64,7 @@ Migration 003_audit_log.sql applied successfully.`}},{delayMs:2500,event:{eventT
64
64
  - should apply discount codes
65
65
  - should handle currency conversion
66
66
  - should reject expired cards`}},{delayMs:2800,event:{eventType:"output",timestamp:Be(2800),content:`Error: Cannot resolve import 'src/services/stripe-client.ts' — module not found.
67
- The billing service depends on a Stripe client that doesn't exist in this environment.`}},{delayMs:3500,event:{eventType:"status",timestamp:Be(3500),content:"failed"}}]}],$p=400;function mS({children:a}){const[i,l]=_.useState(oS),[o,u]=_.useState(rS),[h,f]=_.useState(void 0),[p,v]=_.useState(cS),[g,b]=_.useState(uS),[S,x]=_.useState(Fp),[E,M]=_.useState(dS),[R,K]=_.useState(fS),[O]=_.useState(hS),P=_.useRef(0),Y=_.useRef(0),et=_.useRef(new Set),X=_.useRef(new Map),L=_.useRef(g);L.current=g;const tt=_.useRef(new Map),U=_.useRef(new Map),nt=_.useCallback(w=>(P.current+=1,`mock-${w}-${String(P.current).padStart(3,"0")}`),[]),at=_.useCallback(()=>{const w=Jp[Y.current%Jp.length];return Y.current+=1,w},[]),mt=_.useCallback((w,V,W)=>{const ot=setTimeout(()=>{var jt;et.current.delete(ot),W&&((jt=X.current.get(W))==null||jt.delete(ot)),w()},V);et.current.add(ot),W&&(X.current.has(W)||X.current.set(W,new Set),X.current.get(W).add(ot))},[]),Dt=_.useCallback(w=>{const V=X.current.get(w);V&&(V.forEach(W=>{clearTimeout(W),et.current.delete(W)}),X.current.delete(w))},[]),$=_.useCallback((w,V)=>{l(W=>W.map(ot=>ot.id===w?{...ot,status:V}:ot))},[]),st=_.useCallback(w=>{u(V=>[...V,w])},[]),_t=_.useCallback((w,V,W)=>{V.forEach((ot,jt)=>{mt(()=>{const At={sessionId:w,...ot.event,timestamp:new Date().toISOString()};st(At),ot.event.eventType==="status"&&$(w,ot.event.content),jt===V.length-1&&W&&W()},ot.delayMs,w)})},[mt,st,$]),B=_.useCallback((w,V,W,ot)=>{console.log("[MockGrackle] spawn",{environmentId:w,prompt:V,runtime:ot});const jt=nt("sess"),At={id:jt,environmentId:w,runtime:ot||"claude-code",status:"running",prompt:V,startedAt:new Date().toISOString()};l(de=>[...de,At]),f(jt);const ht=at();if(console.log(`[MockGrackle] Playing scenario: ${ht.label}`),ht.pauseForInput){const de=ht.pauseAfterStep??ht.steps.length-1,kt=ht.steps.slice(0,de+1),pe=kt.length>0?kt[kt.length-1].delayMs:0;_t(jt,kt),mt(()=>{$(jt,"waiting_input"),st({sessionId:jt,eventType:"status",timestamp:new Date().toISOString(),content:"waiting_input"})},pe+$p,jt),ht.resumeSteps&&tt.current.set(jt,ht.resumeSteps)}else _t(jt,ht.steps)},[nt,at,_t,mt,$,st]),Q=_.useCallback(w=>{console.log("[MockGrackle] kill",w),Dt(w),tt.current.delete(w),$(w,"killed"),st({sessionId:w,eventType:"status",timestamp:new Date().toISOString(),content:"killed"}),b(V=>V.map(W=>W.sessionId===w&&W.status==="in_progress"?{...W,status:"failed"}:W))},[Dt,$,st]),lt=_.useCallback(()=>{console.log("[MockGrackle] refresh")},[]),Ct=_.useCallback(w=>{console.log("[MockGrackle] loadSessionEvents",w)},[]),vt=_.useCallback(()=>{console.log("[MockGrackle] clearEvents"),u([])},[]),Pt=_.useCallback((w,V,W,ot)=>{console.log("[MockGrackle] createProject",{name:w,description:V});const jt={id:nt("proj"),name:w,description:V||"",repoUrl:W||"",defaultEnvironmentId:ot||"",status:"active",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};v(At=>[...At,jt])},[nt]),bt=_.useCallback(w=>{console.log("[MockGrackle] archiveProject",w),v(V=>V.map(W=>W.id===w?{...W,status:"archived"}:W))},[]),St=_.useCallback(w=>{console.log("[MockGrackle] loadTasks",w)},[]),G=_.useCallback((w,V,W,ot,jt,At)=>{console.log("[MockGrackle] createTask",{projectId:w,title:V,parentTaskId:At}),b(ht=>{const kt=ht.filter(H=>H.projectId===w).reduce((H,Vt)=>Math.max(H,Vt.sortOrder),0),pe=At?ht.find(H=>H.id===At):void 0;if(At&&!pe)return console.warn("[MockGrackle] Parent task not found:",At),ht;if(pe&&!pe.canDecompose)return console.warn("[MockGrackle] Parent task does not have decomposition rights:",At),ht;const se=pe?pe.depth+1:0,Me={id:nt("task"),projectId:w,title:V,description:W||"",status:"pending",branch:"",environmentId:ot||"",sessionId:"",dependsOn:jt||[],reviewNotes:"",sortOrder:kt+1,createdAt:new Date().toISOString(),parentTaskId:At||"",depth:se,childTaskIds:[],canDecompose:!At,personaId:""};return[...ht,Me]})},[nt]),ae=_.useCallback((w,V,W)=>{var pe;console.log("[MockGrackle] startTask",{taskId:w,runtime:V});const ot=L.current.find(se=>se.id===w),jt=(ot==null?void 0:ot.environmentId)??"",At=(ot==null?void 0:ot.title)??"",ht=nt("sess"),de={id:ht,environmentId:jt||"env-local-01",runtime:V||"claude-code",status:"running",prompt:At||w,startedAt:new Date().toISOString()};l(se=>[...se,de]),b(se=>se.map(Me=>Me.id===w?{...Me,status:"in_progress",sessionId:ht,branch:`mock/${w.slice(0,8)}`}:Me));const kt=at();if(console.log(`[MockGrackle] Playing task scenario: ${kt.label}`),kt.pauseForInput){const se=kt.pauseAfterStep??kt.steps.length-1,Me=kt.steps.slice(0,se+1),H=Me.length>0?Me[Me.length-1].delayMs:0;if(_t(ht,Me),mt(()=>{$(ht,"waiting_input"),st({sessionId:ht,eventType:"status",timestamp:new Date().toISOString(),content:"waiting_input"})},H+$p,ht),kt.resumeSteps){const Vt=[...kt.resumeSteps];tt.current.set(ht,Vt);const Fn=Vt.reduce((Ie,Re)=>Math.max(Ie,Re.delayMs),0);U.current.set(ht,{taskId:w,delayAfterResume:Fn+200})}}else{const se=kt.steps.length>0?kt.steps[kt.steps.length-1].delayMs:0;_t(ht,kt.steps);const Me=(pe=kt.steps[kt.steps.length-1])==null?void 0:pe.event.content;mt(()=>{Me==="completed"?b(H=>H.map(Vt=>Vt.id===w&&Vt.status==="in_progress"?{...Vt,status:"review"}:Vt)):Me==="failed"&&b(H=>H.map(Vt=>Vt.id===w&&Vt.status==="in_progress"?{...Vt,status:"failed"}:Vt))},se+100,ht)}},[nt,at,_t,mt,$,st]),ye=_.useCallback((w,V)=>{console.log("[MockGrackle] sendInput",{sessionId:w,text:V}),st({sessionId:w,eventType:"output",timestamp:new Date().toISOString(),content:`User input: ${V}`}),$(w,"running"),st({sessionId:w,eventType:"status",timestamp:new Date().toISOString(),content:"running"});const W=tt.current.get(w);if(W)tt.current.delete(w),_t(w,W);else{const jt=[{delayMs:500,event:{eventType:"output",timestamp:new Date().toISOString(),content:"I received your input, continuing..."}},{delayMs:1500,event:{eventType:"status",timestamp:new Date().toISOString(),content:"completed"}}];_t(w,jt)}const ot=U.current.get(w);ot&&(U.current.delete(w),mt(()=>{b(jt=>jt.map(At=>At.id===ot.taskId&&At.status==="in_progress"?{...At,status:"review"}:At))},ot.delayAfterResume,w))},[st,$,_t,mt]),en=_.useCallback(w=>{console.log("[MockGrackle] approveTask",w),b(V=>V.map(W=>W.id===w?{...W,status:"done"}:W))},[]),He=_.useCallback((w,V)=>{console.log("[MockGrackle] rejectTask",{taskId:w,reviewNotes:V}),b(W=>W.map(ot=>ot.id===w?{...ot,status:"assigned",reviewNotes:V,sessionId:""}:ot))},[]),Wt=_.useCallback((w,V,W,ot,jt,At)=>{console.log("[MockGrackle] updateTask",{taskId:w,title:V}),b(ht=>ht.map(de=>de.id===w?{...de,title:V.trim()||de.title,description:W,dependsOn:ot,...jt!==void 0?{environmentId:jt}:{},...At!==void 0?{personaId:At}:{}}:de))},[]),nn=_.useCallback(w=>{console.log("[MockGrackle] deleteTask",w),b(V=>V.filter(W=>W.id!==w))},[]),Ue=_.useCallback(w=>{console.log("[MockGrackle] loadFindings",w),x(Fp.filter(V=>V.projectId===w))},[]),It=_.useCallback((w,V,W,ot,jt)=>{console.log("[MockGrackle] postFinding",{projectId:w,title:V});const At={id:nt("find"),projectId:w,taskId:"",sessionId:"",category:ot||"general",title:V,content:W,tags:jt||[],createdAt:new Date().toISOString()};x(ht=>[...ht,At])},[nt]),Kt=_.useCallback((w,V,W,ot)=>{console.log("[MockGrackle] addEnvironment",{displayName:w,adapterType:V,adapterConfig:W,defaultRuntime:ot})},[]),me=_.useCallback(()=>{console.log("[MockGrackle] loadTokens")},[]),F=_.useCallback((w,V,W,ot,jt)=>{console.log("[MockGrackle] setToken",{name:w,tokenType:W}),M(At=>[...At.filter(de=>de.name!==w),{name:w,tokenType:W,envVar:ot,filePath:jt,expiresAt:""}])},[]),Rt=_.useCallback(w=>{console.log("[MockGrackle] deleteToken",w),M(V=>V.filter(W=>W.name!==w))},[]);_.useEffect(()=>()=>{et.current.forEach(clearTimeout),et.current.clear()},[]);const xt=_.useMemo(()=>({connected:!0,environments:lS,sessions:i,events:o,eventsDropped:0,lastSpawnedId:h,projects:p,tasks:g,findings:S,tokens:E,spawn:B,sendInput:ye,kill:Q,refresh:lt,loadSessionEvents:Ct,clearEvents:vt,createProject:Pt,archiveProject:bt,updateProject:(w,V)=>{console.log("[MockGrackle] updateProject",{projectId:w,...V}),v(W=>W.map(ot=>ot.id!==w?ot:{...ot,...V.name!==void 0?{name:V.name}:{},...V.description!==void 0?{description:V.description}:{},...V.repoUrl!==void 0?{repoUrl:V.repoUrl}:{},...V.defaultEnvironmentId!==void 0?{defaultEnvironmentId:V.defaultEnvironmentId}:{},updatedAt:new Date().toISOString()}))},loadTasks:St,createTask:G,startTask:ae,approveTask:en,rejectTask:He,updateTask:Wt,deleteTask:nn,loadFindings:Ue,postFinding:It,addEnvironment:Kt,loadTokens:me,setToken:F,deleteToken:Rt,provisionStatus:{},provisionEnvironment:()=>{},stopEnvironment:()=>{},removeEnvironment:()=>{},codespaces:[],codespaceError:"",codespaceCreating:!1,listCodespaces:()=>{},createCodespace:()=>{},projectCreating:!1,taskStartingId:void 0,personas:R,createPersona:(w,V,W,ot,jt,At)=>{console.log("[MockGrackle] createPersona",{name:w});const ht={id:`mock-persona-${Date.now()}`,name:w,description:V,systemPrompt:W,toolConfig:"{}",runtime:ot??"claude-code",model:jt||"",maxTurns:At||0,mcpServers:"[]",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};K(de=>[...de,ht])},updatePersona:(w,V,W,ot,jt,At,ht)=>{console.log("[MockGrackle] updatePersona",{personaId:w,name:V}),K(de=>de.map(kt=>kt.id!==w?kt:{...kt,...V!==void 0?{name:V}:{},...W!==void 0?{description:W}:{},...ot!==void 0?{systemPrompt:ot}:{},...jt!==void 0?{runtime:jt}:{},...At!==void 0?{model:At}:{},...ht!==void 0?{maxTurns:ht}:{},updatedAt:new Date().toISOString()}))},deletePersona:w=>{console.log("[MockGrackle] deletePersona",w),K(V=>V.filter(W=>W.id!==w))},taskSessions:O,loadTaskSessions:w=>{console.log("[MockGrackle] loadTaskSessions",w)}}),[i,o,h,p,g,S,E,R,O,B,ye,Q,lt,Ct,vt,Pt,bt,St,G,ae,en,He,Wt,nn,Ue,It,Kt,me,F,Rt]);return d.jsx(md.Provider,{value:xt,children:a})}const Rg=_.createContext(void 0),pS=4e3;function vS({children:a}){const[i,l]=_.useState([]),o=_.useRef(0),u=_.useCallback(f=>{l(p=>p.filter(v=>v.id!==f))},[]),h=_.useCallback((f,p="info",v=pS)=>{const g=`toast-${++o.current}`;l(b=>[...b,{id:g,message:f,variant:p,duration:v}])},[]);return d.jsx(Rg.Provider,{value:{toasts:i,showToast:h,dismissToast:u},children:a})}function vr(){const a=_.useContext(Rg);if(!a)throw new Error("useToast must be used within ToastProvider");return a}const pd=[{id:"glass",label:"Glassmorphism",description:"Dark frosted-glass aesthetic with backdrop blur effects."},{id:"light",label:"Light",description:"Clean light theme with subtle depth cues."},{id:"dark",label:"Dark",description:"Clean dark theme with subtle depth cues."},{id:"system",label:"System",description:"Follow your OS light/dark preference (clean theme).",isSystemAuto:!0,systemLightId:"light",systemDarkId:"dark"}],Og=new Set(pd.map(a=>a.id)),Wp="glass";function zg(a){return pd.find(i=>i.id===a)}const Bg="grackle-theme",Ug="(prefers-color-scheme: dark)";let yl=[],nr;function tv(){nr=void 0;for(const a of yl)a()}function Vg(){return typeof window>"u"?!1:window.matchMedia(Ug).matches}function vd(){if(typeof localStorage>"u")return Wp;try{const a=localStorage.getItem(Bg);if(a!==null&&Og.has(a))return a}catch{}return Wp}function Lg(a){const i=zg(a);return i!=null&&i.isSystemAuto?Vg()?i.systemDarkId??"dark":i.systemLightId??"light":a}function ar(a,i=!1){i&&document.documentElement.classList.add("no-transitions"),document.documentElement.dataset.theme=Lg(a),i&&(document.documentElement.offsetHeight,requestAnimationFrame(()=>{document.documentElement.classList.remove("no-transitions")}))}typeof document<"u"&&ar(vd());function gS(){return nr===void 0&&(nr={themeId:vd(),systemDark:Vg()}),nr}function yS(a){return yl=[...yl,a],()=>{yl=yl.filter(i=>i!==a)}}function bS(){const a=_.useSyncExternalStore(yS,gS),{themeId:i}=a,l=Lg(i),o=_.useCallback(u=>{if(Og.has(u)){try{localStorage.setItem(Bg,u)}catch{}ar(u,!0),tv()}},[]);return _.useEffect(()=>{ar(i)},[i]),_.useEffect(()=>{if(typeof window>"u")return;const u=window.matchMedia(Ug),h=()=>{const f=vd(),p=zg(f);p!=null&&p.isSystemAuto&&ar(f),tv()};return u.addEventListener("change",h),()=>{u.removeEventListener("change",h)}},[]),{themeId:i,setTheme:o,resolvedThemeId:l}}const qg=_.createContext(void 0);function SS({children:a}){const i=bS();return d.jsx(qg.Provider,{value:i,children:a})}function _S(){const a=_.useContext(qg);if(!a)throw new Error("useThemeContext must be used within ThemeProvider");return a}const TS="_container_h53m1_1",xS="_brand_h53m1_27",jS="_info_h53m1_34",AS="_connectionDot_h53m1_42",NS="_connected_h53m1_45",ES="_disconnected_h53m1_49",CS="_settingsButton_h53m1_53",Ga={container:TS,brand:xS,info:jS,connectionDot:AS,connected:NS,disconnected:ES,settingsButton:CS};function DS({setViewMode:a}){const{connected:i,environments:l,sessions:o}=On(),u=l.length,h=l.filter(p=>p.status==="connected").length,f=o.filter(p=>["running","waiting_input"].includes(p.status)).length;return d.jsxs("div",{className:Ga.container,children:[d.jsx("div",{className:Ga.brand,children:"Grackle"}),d.jsxs("div",{className:Ga.info,children:[d.jsxs("span",{children:[d.jsx("span",{className:`${Ga.connectionDot} ${i?Ga.connected:Ga.disconnected}`,children:"●"})," ",i?"Connected":"Disconnected"]}),d.jsxs("span",{children:[h,"/",u," env",u!==1?"s":""]}),d.jsxs("span",{children:[f," active"]}),a&&d.jsxs(d.Fragment,{children:[d.jsx("button",{className:Ga.settingsButton,onClick:()=>a({kind:"persona_management"}),title:"Personas",children:"👤"}),d.jsx("button",{className:Ga.settingsButton,onClick:()=>a({kind:"settings"}),title:"Settings",children:"⚙"})]})]})]})}const gd=_.createContext({});function yd(a){const i=_.useRef(null);return i.current===null&&(i.current=a()),i.current}const gr=_.createContext(null),bd=_.createContext({transformPagePoint:a=>a,isStatic:!1,reducedMotion:"never"});class kS extends _.Component{getSnapshotBeforeUpdate(i){const l=this.props.childRef.current;if(l&&i.isPresent&&!this.props.isPresent){const o=this.props.sizeRef.current;o.height=l.offsetHeight||0,o.width=l.offsetWidth||0,o.top=l.offsetTop,o.left=l.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function wS({children:a,isPresent:i}){const l=_.useId(),o=_.useRef(null),u=_.useRef({width:0,height:0,top:0,left:0}),{nonce:h}=_.useContext(bd);return _.useInsertionEffect(()=>{const{width:f,height:p,top:v,left:g}=u.current;if(i||!o.current||!f||!p)return;o.current.dataset.motionPopId=l;const b=document.createElement("style");return h&&(b.nonce=h),document.head.appendChild(b),b.sheet&&b.sheet.insertRule(`
67
+ The billing service depends on a Stripe client that doesn't exist in this environment.`}},{delayMs:3500,event:{eventType:"status",timestamp:Be(3500),content:"failed"}}]}],$p=400;function m_({children:a}){const[i,l]=S.useState(o_),[o,u]=S.useState(r_),[h,f]=S.useState(void 0),[p,v]=S.useState(c_),[g,b]=S.useState(u_),[_,x]=S.useState(Fp),[E,M]=S.useState(d_),[R,K]=S.useState(f_),[O]=S.useState(h_),P=S.useRef(0),Y=S.useRef(0),et=S.useRef(new Set),X=S.useRef(new Map),L=S.useRef(g);L.current=g;const tt=S.useRef(new Map),U=S.useRef(new Map),nt=S.useCallback(w=>(P.current+=1,`mock-${w}-${String(P.current).padStart(3,"0")}`),[]),at=S.useCallback(()=>{const w=Jp[Y.current%Jp.length];return Y.current+=1,w},[]),mt=S.useCallback((w,V,W)=>{const ot=setTimeout(()=>{var jt;et.current.delete(ot),W&&((jt=X.current.get(W))==null||jt.delete(ot)),w()},V);et.current.add(ot),W&&(X.current.has(W)||X.current.set(W,new Set),X.current.get(W).add(ot))},[]),Dt=S.useCallback(w=>{const V=X.current.get(w);V&&(V.forEach(W=>{clearTimeout(W),et.current.delete(W)}),X.current.delete(w))},[]),$=S.useCallback((w,V)=>{l(W=>W.map(ot=>ot.id===w?{...ot,status:V}:ot))},[]),st=S.useCallback(w=>{u(V=>[...V,w])},[]),St=S.useCallback((w,V,W)=>{V.forEach((ot,jt)=>{mt(()=>{const At={sessionId:w,...ot.event,timestamp:new Date().toISOString()};st(At),ot.event.eventType==="status"&&$(w,ot.event.content),jt===V.length-1&&W&&W()},ot.delayMs,w)})},[mt,st,$]),B=S.useCallback((w,V,W,ot)=>{console.log("[MockGrackle] spawn",{environmentId:w,prompt:V,runtime:ot});const jt=nt("sess"),At={id:jt,environmentId:w,runtime:ot||"claude-code",status:"running",prompt:V,startedAt:new Date().toISOString()};l(de=>[...de,At]),f(jt);const ht=at();if(console.log(`[MockGrackle] Playing scenario: ${ht.label}`),ht.pauseForInput){const de=ht.pauseAfterStep??ht.steps.length-1,kt=ht.steps.slice(0,de+1),pe=kt.length>0?kt[kt.length-1].delayMs:0;St(jt,kt),mt(()=>{$(jt,"waiting_input"),st({sessionId:jt,eventType:"status",timestamp:new Date().toISOString(),content:"waiting_input"})},pe+$p,jt),ht.resumeSteps&&tt.current.set(jt,ht.resumeSteps)}else St(jt,ht.steps)},[nt,at,St,mt,$,st]),Q=S.useCallback(w=>{console.log("[MockGrackle] kill",w),Dt(w),tt.current.delete(w),$(w,"killed"),st({sessionId:w,eventType:"status",timestamp:new Date().toISOString(),content:"killed"}),b(V=>V.map(W=>W.sessionId===w&&W.status==="in_progress"?{...W,status:"failed"}:W))},[Dt,$,st]),lt=S.useCallback(()=>{console.log("[MockGrackle] refresh")},[]),Ct=S.useCallback(w=>{console.log("[MockGrackle] loadSessionEvents",w)},[]),vt=S.useCallback(()=>{console.log("[MockGrackle] clearEvents"),u([])},[]),Ft=S.useCallback((w,V,W,ot)=>{console.log("[MockGrackle] createProject",{name:w,description:V});const jt={id:nt("proj"),name:w,description:V||"",repoUrl:W||"",defaultEnvironmentId:ot||"",status:"active",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};v(At=>[...At,jt])},[nt]),bt=S.useCallback(w=>{console.log("[MockGrackle] archiveProject",w),v(V=>V.map(W=>W.id===w?{...W,status:"archived"}:W))},[]),_t=S.useCallback(w=>{console.log("[MockGrackle] loadTasks",w)},[]),G=S.useCallback((w,V,W,ot,jt,At)=>{console.log("[MockGrackle] createTask",{projectId:w,title:V,parentTaskId:At}),b(ht=>{const kt=ht.filter(H=>H.projectId===w).reduce((H,Vt)=>Math.max(H,Vt.sortOrder),0),pe=At?ht.find(H=>H.id===At):void 0;if(At&&!pe)return console.warn("[MockGrackle] Parent task not found:",At),ht;if(pe&&!pe.canDecompose)return console.warn("[MockGrackle] Parent task does not have decomposition rights:",At),ht;const se=pe?pe.depth+1:0,Me={id:nt("task"),projectId:w,title:V,description:W||"",status:"pending",branch:"",environmentId:ot||"",sessionId:"",dependsOn:jt||[],reviewNotes:"",sortOrder:kt+1,createdAt:new Date().toISOString(),parentTaskId:At||"",depth:se,childTaskIds:[],canDecompose:!At,personaId:""};return[...ht,Me]})},[nt]),ae=S.useCallback((w,V,W)=>{var pe;console.log("[MockGrackle] startTask",{taskId:w,runtime:V});const ot=L.current.find(se=>se.id===w),jt=(ot==null?void 0:ot.environmentId)??"",At=(ot==null?void 0:ot.title)??"",ht=nt("sess"),de={id:ht,environmentId:jt||"env-local-01",runtime:V||"claude-code",status:"running",prompt:At||w,startedAt:new Date().toISOString()};l(se=>[...se,de]),b(se=>se.map(Me=>Me.id===w?{...Me,status:"in_progress",sessionId:ht,branch:`mock/${w.slice(0,8)}`}:Me));const kt=at();if(console.log(`[MockGrackle] Playing task scenario: ${kt.label}`),kt.pauseForInput){const se=kt.pauseAfterStep??kt.steps.length-1,Me=kt.steps.slice(0,se+1),H=Me.length>0?Me[Me.length-1].delayMs:0;if(St(ht,Me),mt(()=>{$(ht,"waiting_input"),st({sessionId:ht,eventType:"status",timestamp:new Date().toISOString(),content:"waiting_input"})},H+$p,ht),kt.resumeSteps){const Vt=[...kt.resumeSteps];tt.current.set(ht,Vt);const Fn=Vt.reduce((Ie,Re)=>Math.max(Ie,Re.delayMs),0);U.current.set(ht,{taskId:w,delayAfterResume:Fn+200})}}else{const se=kt.steps.length>0?kt.steps[kt.steps.length-1].delayMs:0;St(ht,kt.steps);const Me=(pe=kt.steps[kt.steps.length-1])==null?void 0:pe.event.content;mt(()=>{Me==="completed"?b(H=>H.map(Vt=>Vt.id===w&&Vt.status==="in_progress"?{...Vt,status:"review"}:Vt)):Me==="failed"&&b(H=>H.map(Vt=>Vt.id===w&&Vt.status==="in_progress"?{...Vt,status:"failed"}:Vt))},se+100,ht)}},[nt,at,St,mt,$,st]),ye=S.useCallback((w,V)=>{console.log("[MockGrackle] sendInput",{sessionId:w,text:V}),st({sessionId:w,eventType:"output",timestamp:new Date().toISOString(),content:`User input: ${V}`}),$(w,"running"),st({sessionId:w,eventType:"status",timestamp:new Date().toISOString(),content:"running"});const W=tt.current.get(w);if(W)tt.current.delete(w),St(w,W);else{const jt=[{delayMs:500,event:{eventType:"output",timestamp:new Date().toISOString(),content:"I received your input, continuing..."}},{delayMs:1500,event:{eventType:"status",timestamp:new Date().toISOString(),content:"completed"}}];St(w,jt)}const ot=U.current.get(w);ot&&(U.current.delete(w),mt(()=>{b(jt=>jt.map(At=>At.id===ot.taskId&&At.status==="in_progress"?{...At,status:"review"}:At))},ot.delayAfterResume,w))},[st,$,St,mt]),en=S.useCallback(w=>{console.log("[MockGrackle] approveTask",w),b(V=>V.map(W=>W.id===w?{...W,status:"done"}:W))},[]),He=S.useCallback((w,V)=>{console.log("[MockGrackle] rejectTask",{taskId:w,reviewNotes:V}),b(W=>W.map(ot=>ot.id===w?{...ot,status:"assigned",reviewNotes:V,sessionId:""}:ot))},[]),Wt=S.useCallback((w,V,W,ot,jt,At)=>{console.log("[MockGrackle] updateTask",{taskId:w,title:V}),b(ht=>ht.map(de=>de.id===w?{...de,title:V.trim()||de.title,description:W,dependsOn:ot,...jt!==void 0?{environmentId:jt}:{},...At!==void 0?{personaId:At}:{}}:de))},[]),nn=S.useCallback(w=>{console.log("[MockGrackle] deleteTask",w),b(V=>V.filter(W=>W.id!==w))},[]),Ue=S.useCallback(w=>{console.log("[MockGrackle] loadFindings",w),x(Fp.filter(V=>V.projectId===w))},[]),It=S.useCallback((w,V,W,ot,jt)=>{console.log("[MockGrackle] postFinding",{projectId:w,title:V});const At={id:nt("find"),projectId:w,taskId:"",sessionId:"",category:ot||"general",title:V,content:W,tags:jt||[],createdAt:new Date().toISOString()};x(ht=>[...ht,At])},[nt]),Kt=S.useCallback((w,V,W,ot)=>{console.log("[MockGrackle] addEnvironment",{displayName:w,adapterType:V,adapterConfig:W,defaultRuntime:ot})},[]),me=S.useCallback(()=>{console.log("[MockGrackle] loadTokens")},[]),F=S.useCallback((w,V,W,ot,jt)=>{console.log("[MockGrackle] setToken",{name:w,tokenType:W}),M(At=>[...At.filter(de=>de.name!==w),{name:w,tokenType:W,envVar:ot,filePath:jt,expiresAt:""}])},[]),Rt=S.useCallback(w=>{console.log("[MockGrackle] deleteToken",w),M(V=>V.filter(W=>W.name!==w))},[]);S.useEffect(()=>()=>{et.current.forEach(clearTimeout),et.current.clear()},[]);const xt=S.useMemo(()=>({connected:!0,environments:l_,sessions:i,events:o,eventsDropped:0,lastSpawnedId:h,projects:p,tasks:g,findings:_,tokens:E,spawn:B,sendInput:ye,kill:Q,refresh:lt,loadSessionEvents:Ct,clearEvents:vt,createProject:Ft,archiveProject:bt,updateProject:(w,V)=>{console.log("[MockGrackle] updateProject",{projectId:w,...V}),v(W=>W.map(ot=>ot.id!==w?ot:{...ot,...V.name!==void 0?{name:V.name}:{},...V.description!==void 0?{description:V.description}:{},...V.repoUrl!==void 0?{repoUrl:V.repoUrl}:{},...V.defaultEnvironmentId!==void 0?{defaultEnvironmentId:V.defaultEnvironmentId}:{},updatedAt:new Date().toISOString()}))},loadTasks:_t,createTask:G,startTask:ae,approveTask:en,rejectTask:He,updateTask:Wt,deleteTask:nn,loadFindings:Ue,postFinding:It,addEnvironment:Kt,loadTokens:me,setToken:F,deleteToken:Rt,provisionStatus:{},provisionEnvironment:()=>{},stopEnvironment:()=>{},removeEnvironment:()=>{},codespaces:[],codespaceError:"",codespaceCreating:!1,listCodespaces:()=>{},createCodespace:()=>{},projectCreating:!1,taskStartingId:void 0,personas:R,createPersona:(w,V,W,ot,jt,At)=>{console.log("[MockGrackle] createPersona",{name:w});const ht={id:`mock-persona-${Date.now()}`,name:w,description:V,systemPrompt:W,toolConfig:"{}",runtime:ot??"claude-code",model:jt||"",maxTurns:At||0,mcpServers:"[]",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};K(de=>[...de,ht])},updatePersona:(w,V,W,ot,jt,At,ht)=>{console.log("[MockGrackle] updatePersona",{personaId:w,name:V}),K(de=>de.map(kt=>kt.id!==w?kt:{...kt,...V!==void 0?{name:V}:{},...W!==void 0?{description:W}:{},...ot!==void 0?{systemPrompt:ot}:{},...jt!==void 0?{runtime:jt}:{},...At!==void 0?{model:At}:{},...ht!==void 0?{maxTurns:ht}:{},updatedAt:new Date().toISOString()}))},deletePersona:w=>{console.log("[MockGrackle] deletePersona",w),K(V=>V.filter(W=>W.id!==w))},taskSessions:O,loadTaskSessions:w=>{console.log("[MockGrackle] loadTaskSessions",w)}}),[i,o,h,p,g,_,E,R,O,B,ye,Q,lt,Ct,vt,Ft,bt,_t,G,ae,en,He,Wt,nn,Ue,It,Kt,me,F,Rt]);return d.jsx(md.Provider,{value:xt,children:a})}const Rg=S.createContext(void 0),p_=4e3;function v_({children:a}){const[i,l]=S.useState([]),o=S.useRef(0),u=S.useCallback(f=>{l(p=>p.filter(v=>v.id!==f))},[]),h=S.useCallback((f,p="info",v=p_)=>{const g=`toast-${++o.current}`;l(b=>[...b,{id:g,message:f,variant:p,duration:v}])},[]);return d.jsx(Rg.Provider,{value:{toasts:i,showToast:h,dismissToast:u},children:a})}function vr(){const a=S.useContext(Rg);if(!a)throw new Error("useToast must be used within ToastProvider");return a}const pd=[{id:"glass",label:"Glassmorphism",description:"Dark frosted-glass aesthetic with backdrop blur effects."},{id:"light",label:"Light",description:"Clean light theme with subtle depth cues."},{id:"dark",label:"Dark",description:"Clean dark theme with subtle depth cues."},{id:"system",label:"System",description:"Follow your OS light/dark preference (clean theme).",isSystemAuto:!0,systemLightId:"light",systemDarkId:"dark"}],Og=new Set(pd.map(a=>a.id)),Wp="glass";function zg(a){return pd.find(i=>i.id===a)}const Bg="grackle-theme",Ug="(prefers-color-scheme: dark)";let yl=[],nr;function tv(){nr=void 0;for(const a of yl)a()}function Vg(){return typeof window>"u"?!1:window.matchMedia(Ug).matches}function vd(){if(typeof localStorage>"u")return Wp;try{const a=localStorage.getItem(Bg);if(a!==null&&Og.has(a))return a}catch{}return Wp}function Lg(a){const i=zg(a);return i!=null&&i.isSystemAuto?Vg()?i.systemDarkId??"dark":i.systemLightId??"light":a}function ar(a,i=!1){i&&document.documentElement.classList.add("no-transitions"),document.documentElement.dataset.theme=Lg(a),i&&(document.documentElement.offsetHeight,requestAnimationFrame(()=>{document.documentElement.classList.remove("no-transitions")}))}typeof document<"u"&&ar(vd());function g_(){return nr===void 0&&(nr={themeId:vd(),systemDark:Vg()}),nr}function y_(a){return yl=[...yl,a],()=>{yl=yl.filter(i=>i!==a)}}function b_(){const a=S.useSyncExternalStore(y_,g_),{themeId:i}=a,l=Lg(i),o=S.useCallback(u=>{if(Og.has(u)){try{localStorage.setItem(Bg,u)}catch{}ar(u,!0),tv()}},[]);return S.useEffect(()=>{ar(i)},[i]),S.useEffect(()=>{if(typeof window>"u")return;const u=window.matchMedia(Ug),h=()=>{const f=vd(),p=zg(f);p!=null&&p.isSystemAuto&&ar(f),tv()};return u.addEventListener("change",h),()=>{u.removeEventListener("change",h)}},[]),{themeId:i,setTheme:o,resolvedThemeId:l}}const qg=S.createContext(void 0);function __({children:a}){const i=b_();return d.jsx(qg.Provider,{value:i,children:a})}function S_(){const a=S.useContext(qg);if(!a)throw new Error("useThemeContext must be used within ThemeProvider");return a}const T_="_container_h53m1_1",x_="_brand_h53m1_27",j_="_info_h53m1_34",A_="_connectionDot_h53m1_42",N_="_connected_h53m1_45",E_="_disconnected_h53m1_49",C_="_settingsButton_h53m1_53",Ga={container:T_,brand:x_,info:j_,connectionDot:A_,connected:N_,disconnected:E_,settingsButton:C_};function D_({setViewMode:a}){const{connected:i,environments:l,sessions:o}=On(),u=l.length,h=l.filter(p=>p.status==="connected").length,f=o.filter(p=>["running","waiting_input"].includes(p.status)).length;return d.jsxs("div",{className:Ga.container,children:[d.jsx("div",{className:Ga.brand,children:"Grackle"}),d.jsxs("div",{className:Ga.info,children:[d.jsxs("span",{children:[d.jsx("span",{className:`${Ga.connectionDot} ${i?Ga.connected:Ga.disconnected}`,children:"●"})," ",i?"Connected":"Disconnected"]}),d.jsxs("span",{children:[h,"/",u," env",u!==1?"s":""]}),d.jsxs("span",{children:[f," active"]}),a&&d.jsxs(d.Fragment,{children:[d.jsx("button",{className:Ga.settingsButton,onClick:()=>a({kind:"persona_management"}),title:"Personas",children:"👤"}),d.jsx("button",{className:Ga.settingsButton,onClick:()=>a({kind:"settings"}),title:"Settings",children:"⚙"})]})]})]})}const gd=S.createContext({});function yd(a){const i=S.useRef(null);return i.current===null&&(i.current=a()),i.current}const gr=S.createContext(null),bd=S.createContext({transformPagePoint:a=>a,isStatic:!1,reducedMotion:"never"});class k_ extends S.Component{getSnapshotBeforeUpdate(i){const l=this.props.childRef.current;if(l&&i.isPresent&&!this.props.isPresent){const o=this.props.sizeRef.current;o.height=l.offsetHeight||0,o.width=l.offsetWidth||0,o.top=l.offsetTop,o.left=l.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function w_({children:a,isPresent:i}){const l=S.useId(),o=S.useRef(null),u=S.useRef({width:0,height:0,top:0,left:0}),{nonce:h}=S.useContext(bd);return S.useInsertionEffect(()=>{const{width:f,height:p,top:v,left:g}=u.current;if(i||!o.current||!f||!p)return;o.current.dataset.motionPopId=l;const b=document.createElement("style");return h&&(b.nonce=h),document.head.appendChild(b),b.sheet&&b.sheet.insertRule(`
68
68
  [data-motion-pop-id="${l}"] {
69
69
  position: absolute !important;
70
70
  width: ${f}px !important;
@@ -72,9 +72,9 @@ The billing service depends on a Stripe client that doesn't exist in this enviro
72
72
  top: ${v}px !important;
73
73
  left: ${g}px !important;
74
74
  }
75
- `),()=>{document.head.removeChild(b)}},[i]),d.jsx(kS,{isPresent:i,childRef:o,sizeRef:u,children:_.cloneElement(a,{ref:o})})}const MS=({children:a,initial:i,isPresent:l,onExitComplete:o,custom:u,presenceAffectsLayout:h,mode:f})=>{const p=yd(RS),v=_.useId(),g=_.useCallback(S=>{p.set(S,!0);for(const x of p.values())if(!x)return;o&&o()},[p,o]),b=_.useMemo(()=>({id:v,initial:i,isPresent:l,custom:u,onExitComplete:g,register:S=>(p.set(S,!1),()=>p.delete(S))}),h?[Math.random(),g]:[l,g]);return _.useMemo(()=>{p.forEach((S,x)=>p.set(x,!1))},[l]),_.useEffect(()=>{!l&&!p.size&&o&&o()},[l]),f==="popLayout"&&(a=d.jsx(wS,{isPresent:l,children:a})),d.jsx(gr.Provider,{value:b,children:a})};function RS(){return new Map}function Hg(a=!0){const i=_.useContext(gr);if(i===null)return[!0,null];const{isPresent:l,onExitComplete:o,register:u}=i,h=_.useId();_.useEffect(()=>{a&&u(h)},[a]);const f=_.useCallback(()=>a&&o&&o(h),[h,o,a]);return!l&&o?[!1,f]:[!0]}const Jo=a=>a.key||"";function ev(a){const i=[];return _.Children.forEach(a,l=>{_.isValidElement(l)&&i.push(l)}),i}const Sd=typeof window<"u",Ig=Sd?_.useLayoutEffect:_.useEffect,yi=({children:a,custom:i,initial:l=!0,onExitComplete:o,presenceAffectsLayout:u=!0,mode:h="sync",propagate:f=!1})=>{const[p,v]=Hg(f),g=_.useMemo(()=>ev(a),[a]),b=f&&!p?[]:g.map(Jo),S=_.useRef(!0),x=_.useRef(g),E=yd(()=>new Map),[M,R]=_.useState(g),[K,O]=_.useState(g);Ig(()=>{S.current=!1,x.current=g;for(let et=0;et<K.length;et++){const X=Jo(K[et]);b.includes(X)?E.delete(X):E.get(X)!==!0&&E.set(X,!1)}},[K,b.length,b.join("-")]);const P=[];if(g!==M){let et=[...g];for(let X=0;X<K.length;X++){const L=K[X],tt=Jo(L);b.includes(tt)||(et.splice(X,0,L),P.push(L))}h==="wait"&&P.length&&(et=P),O(ev(et)),R(g);return}const{forceRender:Y}=_.useContext(gd);return d.jsx(d.Fragment,{children:K.map(et=>{const X=Jo(et),L=f&&!p?!1:g===K||b.includes(X),tt=()=>{if(E.has(X))E.set(X,!0);else return;let U=!0;E.forEach(nt=>{nt||(U=!1)}),U&&(Y==null||Y(),O(x.current),f&&(v==null||v()),o&&o())};return d.jsx(MS,{isPresent:L,initial:!S.current||l?void 0:!1,custom:L?void 0:i,presenceAffectsLayout:u,mode:h,onExitComplete:L?void 0:tt,children:et},X)})})},Sn=a=>a;let Gg=Sn;const OS={useManualTiming:!1};function zS(a){let i=new Set,l=new Set,o=!1,u=!1;const h=new WeakSet;let f={delta:0,timestamp:0,isProcessing:!1};function p(g){h.has(g)&&(v.schedule(g),a()),g(f)}const v={schedule:(g,b=!1,S=!1)=>{const E=S&&o?i:l;return b&&h.add(g),E.has(g)||E.add(g),g},cancel:g=>{l.delete(g),h.delete(g)},process:g=>{if(f=g,o){u=!0;return}o=!0,[i,l]=[l,i],i.forEach(p),i.clear(),o=!1,u&&(u=!1,v.process(g))}};return v}const $o=["read","resolveKeyframes","update","preRender","render","postRender"],BS=40;function Yg(a,i){let l=!1,o=!0;const u={delta:0,timestamp:0,isProcessing:!1},h=()=>l=!0,f=$o.reduce((O,P)=>(O[P]=zS(h),O),{}),{read:p,resolveKeyframes:v,update:g,preRender:b,render:S,postRender:x}=f,E=()=>{const O=performance.now();l=!1,u.delta=o?1e3/60:Math.max(Math.min(O-u.timestamp,BS),1),u.timestamp=O,u.isProcessing=!0,p.process(u),v.process(u),g.process(u),b.process(u),S.process(u),x.process(u),u.isProcessing=!1,l&&i&&(o=!1,a(E))},M=()=>{l=!0,o=!0,u.isProcessing||a(E)};return{schedule:$o.reduce((O,P)=>{const Y=f[P];return O[P]=(et,X=!1,L=!1)=>(l||M(),Y.schedule(et,X,L)),O},{}),cancel:O=>{for(let P=0;P<$o.length;P++)f[$o[P]].cancel(O)},state:u,steps:f}}const{schedule:ue,cancel:Xa,state:Qe,steps:Ru}=Yg(typeof requestAnimationFrame<"u"?requestAnimationFrame:Sn,!0),Zg=_.createContext({strict:!1}),nv={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},pi={};for(const a in nv)pi[a]={isEnabled:i=>nv[a].some(l=>!!i[l])};function US(a){for(const i in a)pi[i]={...pi[i],...a[i]}}const VS=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function or(a){return a.startsWith("while")||a.startsWith("drag")&&a!=="draggable"||a.startsWith("layout")||a.startsWith("onTap")||a.startsWith("onPan")||a.startsWith("onLayout")||VS.has(a)}let Kg=a=>!or(a);function LS(a){a&&(Kg=i=>i.startsWith("on")?!or(i):a(i))}try{LS(require("@emotion/is-prop-valid").default)}catch{}function qS(a,i,l){const o={};for(const u in a)u==="values"&&typeof a.values=="object"||(Kg(u)||l===!0&&or(u)||!i&&!or(u)||a.draggable&&u.startsWith("onDrag"))&&(o[u]=a[u]);return o}function HS(a){if(typeof Proxy>"u")return a;const i=new Map,l=(...o)=>a(...o);return new Proxy(l,{get:(o,u)=>u==="create"?a:(i.has(u)||i.set(u,a(u)),i.get(u))})}const yr=_.createContext({});function El(a){return typeof a=="string"||Array.isArray(a)}function br(a){return a!==null&&typeof a=="object"&&typeof a.start=="function"}const _d=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Td=["initial",..._d];function Sr(a){return br(a.animate)||Td.some(i=>El(a[i]))}function Xg(a){return!!(Sr(a)||a.variants)}function IS(a,i){if(Sr(a)){const{initial:l,animate:o}=a;return{initial:l===!1||El(l)?l:void 0,animate:El(o)?o:void 0}}return a.inherit!==!1?i:{}}function GS(a){const{initial:i,animate:l}=IS(a,_.useContext(yr));return _.useMemo(()=>({initial:i,animate:l}),[av(i),av(l)])}function av(a){return Array.isArray(a)?a.join(" "):a}const YS=Symbol.for("motionComponentSymbol");function ui(a){return a&&typeof a=="object"&&Object.prototype.hasOwnProperty.call(a,"current")}function ZS(a,i,l){return _.useCallback(o=>{o&&a.onMount&&a.onMount(o),i&&(o?i.mount(o):i.unmount()),l&&(typeof l=="function"?l(o):ui(l)&&(l.current=o))},[i])}const xd=a=>a.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),KS="framerAppearId",Qg="data-"+xd(KS),{schedule:jd}=Yg(queueMicrotask,!1),Pg=_.createContext({});function XS(a,i,l,o,u){var h,f;const{visualElement:p}=_.useContext(yr),v=_.useContext(Zg),g=_.useContext(gr),b=_.useContext(bd).reducedMotion,S=_.useRef(null);o=o||v.renderer,!S.current&&o&&(S.current=o(a,{visualState:i,parent:p,props:l,presenceContext:g,blockInitialAnimation:g?g.initial===!1:!1,reducedMotionConfig:b}));const x=S.current,E=_.useContext(Pg);x&&!x.projection&&u&&(x.type==="html"||x.type==="svg")&&QS(S.current,l,u,E);const M=_.useRef(!1);_.useInsertionEffect(()=>{x&&M.current&&x.update(l,g)});const R=l[Qg],K=_.useRef(!!R&&!(!((h=window.MotionHandoffIsComplete)===null||h===void 0)&&h.call(window,R))&&((f=window.MotionHasOptimisedAnimation)===null||f===void 0?void 0:f.call(window,R)));return Ig(()=>{x&&(M.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),jd.render(x.render),K.current&&x.animationState&&x.animationState.animateChanges())}),_.useEffect(()=>{x&&(!K.current&&x.animationState&&x.animationState.animateChanges(),K.current&&(queueMicrotask(()=>{var O;(O=window.MotionHandoffMarkAsComplete)===null||O===void 0||O.call(window,R)}),K.current=!1))}),x}function QS(a,i,l,o){const{layoutId:u,layout:h,drag:f,dragConstraints:p,layoutScroll:v,layoutRoot:g}=i;a.projection=new l(a.latestValues,i["data-framer-portal-id"]?void 0:Fg(a.parent)),a.projection.setOptions({layoutId:u,layout:h,alwaysMeasureLayout:!!f||p&&ui(p),visualElement:a,animationType:typeof h=="string"?h:"both",initialPromotionConfig:o,layoutScroll:v,layoutRoot:g})}function Fg(a){if(a)return a.options.allowProjection!==!1?a.projection:Fg(a.parent)}function PS({preloadedFeatures:a,createVisualElement:i,useRender:l,useVisualState:o,Component:u}){var h,f;a&&US(a);function p(g,b){let S;const x={..._.useContext(bd),...g,layoutId:FS(g)},{isStatic:E}=x,M=GS(g),R=o(g,E);if(!E&&Sd){JS();const K=$S(x);S=K.MeasureLayout,M.visualElement=XS(u,R,x,i,K.ProjectionNode)}return d.jsxs(yr.Provider,{value:M,children:[S&&M.visualElement?d.jsx(S,{visualElement:M.visualElement,...x}):null,l(u,g,ZS(R,M.visualElement,b),R,E,M.visualElement)]})}p.displayName=`motion.${typeof u=="string"?u:`create(${(f=(h=u.displayName)!==null&&h!==void 0?h:u.name)!==null&&f!==void 0?f:""})`}`;const v=_.forwardRef(p);return v[YS]=u,v}function FS({layoutId:a}){const i=_.useContext(gd).id;return i&&a!==void 0?i+"-"+a:a}function JS(a,i){_.useContext(Zg).strict}function $S(a){const{drag:i,layout:l}=pi;if(!i&&!l)return{};const o={...i,...l};return{MeasureLayout:i!=null&&i.isEnabled(a)||l!=null&&l.isEnabled(a)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}const WS=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ad(a){return typeof a!="string"||a.includes("-")?!1:!!(WS.indexOf(a)>-1||/[A-Z]/u.test(a))}function sv(a){const i=[{},{}];return a==null||a.values.forEach((l,o)=>{i[0][o]=l.get(),i[1][o]=l.getVelocity()}),i}function Nd(a,i,l,o){if(typeof i=="function"){const[u,h]=sv(o);i=i(l!==void 0?l:a.custom,u,h)}if(typeof i=="string"&&(i=a.variants&&a.variants[i]),typeof i=="function"){const[u,h]=sv(o);i=i(l!==void 0?l:a.custom,u,h)}return i}const Pu=a=>Array.isArray(a),t_=a=>!!(a&&typeof a=="object"&&a.mix&&a.toValue),e_=a=>Pu(a)?a[a.length-1]||0:a,Fe=a=>!!(a&&a.getVelocity);function sr(a){const i=Fe(a)?a.get():a;return t_(i)?i.toValue():i}function n_({scrapeMotionValuesFromProps:a,createRenderState:i,onUpdate:l},o,u,h){const f={latestValues:a_(o,u,h,a),renderState:i()};return l&&(f.onMount=p=>l({props:o,current:p,...f}),f.onUpdate=p=>l(p)),f}const Jg=a=>(i,l)=>{const o=_.useContext(yr),u=_.useContext(gr),h=()=>n_(a,i,o,u);return l?h():yd(h)};function a_(a,i,l,o){const u={},h=o(a,{});for(const x in h)u[x]=sr(h[x]);let{initial:f,animate:p}=a;const v=Sr(a),g=Xg(a);i&&g&&!v&&a.inherit!==!1&&(f===void 0&&(f=i.initial),p===void 0&&(p=i.animate));let b=l?l.initial===!1:!1;b=b||f===!1;const S=b?p:f;if(S&&typeof S!="boolean"&&!br(S)){const x=Array.isArray(S)?S:[S];for(let E=0;E<x.length;E++){const M=Nd(a,x[E]);if(M){const{transitionEnd:R,transition:K,...O}=M;for(const P in O){let Y=O[P];if(Array.isArray(Y)){const et=b?Y.length-1:0;Y=Y[et]}Y!==null&&(u[P]=Y)}for(const P in R)u[P]=R[P]}}}return u}const bi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],_s=new Set(bi),$g=a=>i=>typeof i=="string"&&i.startsWith(a),Wg=$g("--"),s_=$g("var(--"),Ed=a=>s_(a)?i_.test(a.split("/*")[0].trim()):!1,i_=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,t0=(a,i)=>i&&typeof a=="number"?i.transform(a):a,ga=(a,i,l)=>l>i?i:l<a?a:l,Si={test:a=>typeof a=="number",parse:parseFloat,transform:a=>a},Cl={...Si,transform:a=>ga(0,1,a)},Wo={...Si,default:1},Ml=a=>({test:i=>typeof i=="string"&&i.endsWith(a)&&i.split(" ").length===1,parse:parseFloat,transform:i=>`${i}${a}`}),Ya=Ml("deg"),Xn=Ml("%"),yt=Ml("px"),l_=Ml("vh"),o_=Ml("vw"),iv={...Xn,parse:a=>Xn.parse(a)/100,transform:a=>Xn.transform(a*100)},r_={borderWidth:yt,borderTopWidth:yt,borderRightWidth:yt,borderBottomWidth:yt,borderLeftWidth:yt,borderRadius:yt,radius:yt,borderTopLeftRadius:yt,borderTopRightRadius:yt,borderBottomRightRadius:yt,borderBottomLeftRadius:yt,width:yt,maxWidth:yt,height:yt,maxHeight:yt,top:yt,right:yt,bottom:yt,left:yt,padding:yt,paddingTop:yt,paddingRight:yt,paddingBottom:yt,paddingLeft:yt,margin:yt,marginTop:yt,marginRight:yt,marginBottom:yt,marginLeft:yt,backgroundPositionX:yt,backgroundPositionY:yt},c_={rotate:Ya,rotateX:Ya,rotateY:Ya,rotateZ:Ya,scale:Wo,scaleX:Wo,scaleY:Wo,scaleZ:Wo,skew:Ya,skewX:Ya,skewY:Ya,distance:yt,translateX:yt,translateY:yt,translateZ:yt,x:yt,y:yt,z:yt,perspective:yt,transformPerspective:yt,opacity:Cl,originX:iv,originY:iv,originZ:yt},lv={...Si,transform:Math.round},Cd={...r_,...c_,zIndex:lv,size:yt,fillOpacity:Cl,strokeOpacity:Cl,numOctaves:lv},u_={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},d_=bi.length;function f_(a,i,l){let o="",u=!0;for(let h=0;h<d_;h++){const f=bi[h],p=a[f];if(p===void 0)continue;let v=!0;if(typeof p=="number"?v=p===(f.startsWith("scale")?1:0):v=parseFloat(p)===0,!v||l){const g=t0(p,Cd[f]);if(!v){u=!1;const b=u_[f]||f;o+=`${b}(${g}) `}l&&(i[f]=g)}}return o=o.trim(),l?o=l(i,u?"":o):u&&(o="none"),o}function Dd(a,i,l){const{style:o,vars:u,transformOrigin:h}=a;let f=!1,p=!1;for(const v in i){const g=i[v];if(_s.has(v)){f=!0;continue}else if(Wg(v)){u[v]=g;continue}else{const b=t0(g,Cd[v]);v.startsWith("origin")?(p=!0,h[v]=b):o[v]=b}}if(i.transform||(f||l?o.transform=f_(i,a.transform,l):o.transform&&(o.transform="none")),p){const{originX:v="50%",originY:g="50%",originZ:b=0}=h;o.transformOrigin=`${v} ${g} ${b}`}}const h_={offset:"stroke-dashoffset",array:"stroke-dasharray"},m_={offset:"strokeDashoffset",array:"strokeDasharray"};function p_(a,i,l=1,o=0,u=!0){a.pathLength=1;const h=u?h_:m_;a[h.offset]=yt.transform(-o);const f=yt.transform(i),p=yt.transform(l);a[h.array]=`${f} ${p}`}function ov(a,i,l){return typeof a=="string"?a:yt.transform(i+l*a)}function v_(a,i,l){const o=ov(i,a.x,a.width),u=ov(l,a.y,a.height);return`${o} ${u}`}function kd(a,{attrX:i,attrY:l,attrScale:o,originX:u,originY:h,pathLength:f,pathSpacing:p=1,pathOffset:v=0,...g},b,S){if(Dd(a,g,S),b){a.style.viewBox&&(a.attrs.viewBox=a.style.viewBox);return}a.attrs=a.style,a.style={};const{attrs:x,style:E,dimensions:M}=a;x.transform&&(M&&(E.transform=x.transform),delete x.transform),M&&(u!==void 0||h!==void 0||E.transform)&&(E.transformOrigin=v_(M,u!==void 0?u:.5,h!==void 0?h:.5)),i!==void 0&&(x.x=i),l!==void 0&&(x.y=l),o!==void 0&&(x.scale=o),f!==void 0&&p_(x,f,p,v,!1)}const wd=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),e0=()=>({...wd(),attrs:{}}),Md=a=>typeof a=="string"&&a.toLowerCase()==="svg";function n0(a,{style:i,vars:l},o,u){Object.assign(a.style,i,u&&u.getProjectionStyles(o));for(const h in l)a.style.setProperty(h,l[h])}const a0=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function s0(a,i,l,o){n0(a,i,void 0,o);for(const u in i.attrs)a.setAttribute(a0.has(u)?u:xd(u),i.attrs[u])}const rr={};function g_(a){Object.assign(rr,a)}function i0(a,{layout:i,layoutId:l}){return _s.has(a)||a.startsWith("origin")||(i||l!==void 0)&&(!!rr[a]||a==="opacity")}function Rd(a,i,l){var o;const{style:u}=a,h={};for(const f in u)(Fe(u[f])||i.style&&Fe(i.style[f])||i0(f,a)||((o=l==null?void 0:l.getValue(f))===null||o===void 0?void 0:o.liveStyle)!==void 0)&&(h[f]=u[f]);return h}function l0(a,i,l){const o=Rd(a,i,l);for(const u in a)if(Fe(a[u])||Fe(i[u])){const h=bi.indexOf(u)!==-1?"attr"+u.charAt(0).toUpperCase()+u.substring(1):u;o[h]=a[u]}return o}function y_(a,i){try{i.dimensions=typeof a.getBBox=="function"?a.getBBox():a.getBoundingClientRect()}catch{i.dimensions={x:0,y:0,width:0,height:0}}}const rv=["x","y","width","height","cx","cy","r"],b_={useVisualState:Jg({scrapeMotionValuesFromProps:l0,createRenderState:e0,onUpdate:({props:a,prevProps:i,current:l,renderState:o,latestValues:u})=>{if(!l)return;let h=!!a.drag;if(!h){for(const p in u)if(_s.has(p)){h=!0;break}}if(!h)return;let f=!i;if(i)for(let p=0;p<rv.length;p++){const v=rv[p];a[v]!==i[v]&&(f=!0)}f&&ue.read(()=>{y_(l,o),ue.render(()=>{kd(o,u,Md(l.tagName),a.transformTemplate),s0(l,o)})})}})},S_={useVisualState:Jg({scrapeMotionValuesFromProps:Rd,createRenderState:wd})};function o0(a,i,l){for(const o in i)!Fe(i[o])&&!i0(o,l)&&(a[o]=i[o])}function __({transformTemplate:a},i){return _.useMemo(()=>{const l=wd();return Dd(l,i,a),Object.assign({},l.vars,l.style)},[i])}function T_(a,i){const l=a.style||{},o={};return o0(o,l,a),Object.assign(o,__(a,i)),o}function x_(a,i){const l={},o=T_(a,i);return a.drag&&a.dragListener!==!1&&(l.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=a.drag===!0?"none":`pan-${a.drag==="x"?"y":"x"}`),a.tabIndex===void 0&&(a.onTap||a.onTapStart||a.whileTap)&&(l.tabIndex=0),l.style=o,l}function j_(a,i,l,o){const u=_.useMemo(()=>{const h=e0();return kd(h,i,Md(o),a.transformTemplate),{...h.attrs,style:{...h.style}}},[i]);if(a.style){const h={};o0(h,a.style,a),u.style={...h,...u.style}}return u}function A_(a=!1){return(l,o,u,{latestValues:h},f)=>{const v=(Ad(l)?j_:x_)(o,h,f,l),g=qS(o,typeof l=="string",a),b=l!==_.Fragment?{...g,...v,ref:u}:{},{children:S}=o,x=_.useMemo(()=>Fe(S)?S.get():S,[S]);return _.createElement(l,{...b,children:x})}}function N_(a,i){return function(o,{forwardMotionProps:u}={forwardMotionProps:!1}){const f={...Ad(o)?b_:S_,preloadedFeatures:a,useRender:A_(u),createVisualElement:i,Component:o};return PS(f)}}function r0(a,i){if(!Array.isArray(i))return!1;const l=i.length;if(l!==a.length)return!1;for(let o=0;o<l;o++)if(i[o]!==a[o])return!1;return!0}function _r(a,i,l){const o=a.getProps();return Nd(o,i,l!==void 0?l:o.custom,a)}function Od(a,i){return a?a[i]||a.default||a:void 0}const c0=new Set(["width","height","top","left","right","bottom",...bi]);let ir;function E_(){ir=void 0}const Qn={now:()=>(ir===void 0&&Qn.set(Qe.isProcessing||OS.useManualTiming?Qe.timestamp:performance.now()),ir),set:a=>{ir=a,queueMicrotask(E_)}};function zd(a,i){a.indexOf(i)===-1&&a.push(i)}function Bd(a,i){const l=a.indexOf(i);l>-1&&a.splice(l,1)}class Ud{constructor(){this.subscriptions=[]}add(i){return zd(this.subscriptions,i),()=>Bd(this.subscriptions,i)}notify(i,l,o){const u=this.subscriptions.length;if(u)if(u===1)this.subscriptions[0](i,l,o);else for(let h=0;h<u;h++){const f=this.subscriptions[h];f&&f(i,l,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function u0(a,i){return i?a*(1e3/i):0}const cv=30,C_=a=>!isNaN(parseFloat(a));class D_{constructor(i,l={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(o,u=!0)=>{const h=Qn.now();this.updatedAt!==h&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),u&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(i),this.owner=l.owner}setCurrent(i){this.current=i,this.updatedAt=Qn.now(),this.canTrackVelocity===null&&i!==void 0&&(this.canTrackVelocity=C_(this.current))}setPrevFrameValue(i=this.current){this.prevFrameValue=i,this.prevUpdatedAt=this.updatedAt}onChange(i){return this.on("change",i)}on(i,l){this.events[i]||(this.events[i]=new Ud);const o=this.events[i].add(l);return i==="change"?()=>{o(),ue.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(const i in this.events)this.events[i].clear()}attach(i,l){this.passiveEffect=i,this.stopPassiveEffect=l}set(i,l=!0){!l||!this.passiveEffect?this.updateAndNotify(i,l):this.passiveEffect(i,this.updateAndNotify)}setWithVelocity(i,l,o){this.set(l),this.prev=void 0,this.prevFrameValue=i,this.prevUpdatedAt=this.updatedAt-o}jump(i,l=!0){this.updateAndNotify(i),this.prev=i,this.prevUpdatedAt=this.prevFrameValue=void 0,l&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const i=Qn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||i-this.updatedAt>cv)return 0;const l=Math.min(this.updatedAt-this.prevUpdatedAt,cv);return u0(parseFloat(this.current)-parseFloat(this.prevFrameValue),l)}start(i){return this.stop(),new Promise(l=>{this.hasAnimated=!0,this.animation=i(l),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Dl(a,i){return new D_(a,i)}function k_(a,i,l){a.hasValue(i)?a.getValue(i).set(l):a.addValue(i,Dl(l))}function w_(a,i){const l=_r(a,i);let{transitionEnd:o={},transition:u={},...h}=l||{};h={...h,...o};for(const f in h){const p=e_(h[f]);k_(a,f,p)}}function M_(a){return!!(Fe(a)&&a.add)}function Fu(a,i){const l=a.getValue("willChange");if(M_(l))return l.add(i)}function d0(a){return a.props[Qg]}function Vd(a){let i;return()=>(i===void 0&&(i=a()),i)}const R_=Vd(()=>window.ScrollTimeline!==void 0);class O_{constructor(i){this.stop=()=>this.runAll("stop"),this.animations=i.filter(Boolean)}get finished(){return Promise.all(this.animations.map(i=>"finished"in i?i.finished:i))}getAll(i){return this.animations[0][i]}setAll(i,l){for(let o=0;o<this.animations.length;o++)this.animations[o][i]=l}attachTimeline(i,l){const o=this.animations.map(u=>{if(R_()&&u.attachTimeline)return u.attachTimeline(i);if(typeof l=="function")return l(u)});return()=>{o.forEach((u,h)=>{u&&u(),this.animations[h].stop()})}}get time(){return this.getAll("time")}set time(i){this.setAll("time",i)}get speed(){return this.getAll("speed")}set speed(i){this.setAll("speed",i)}get startTime(){return this.getAll("startTime")}get duration(){let i=0;for(let l=0;l<this.animations.length;l++)i=Math.max(i,this.animations[l].duration);return i}runAll(i){this.animations.forEach(l=>l[i]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class z_ extends O_{then(i,l){return Promise.all(this.animations).then(i).catch(l)}}const pa=a=>a*1e3,va=a=>a/1e3;function Ld(a){return typeof a=="function"}function uv(a,i){a.timeline=i,a.onfinish=null}const qd=a=>Array.isArray(a)&&typeof a[0]=="number",B_={linearEasing:void 0};function U_(a,i){const l=Vd(a);return()=>{var o;return(o=B_[i])!==null&&o!==void 0?o:l()}}const cr=U_(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),vi=(a,i,l)=>{const o=i-a;return o===0?1:(l-a)/o},f0=(a,i,l=10)=>{let o="";const u=Math.max(Math.round(i/l),2);for(let h=0;h<u;h++)o+=a(vi(0,u-1,h))+", ";return`linear(${o.substring(0,o.length-2)})`};function h0(a){return!!(typeof a=="function"&&cr()||!a||typeof a=="string"&&(a in Ju||cr())||qd(a)||Array.isArray(a)&&a.every(h0))}const bl=([a,i,l,o])=>`cubic-bezier(${a}, ${i}, ${l}, ${o})`,Ju={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:bl([0,.65,.55,1]),circOut:bl([.55,0,1,.45]),backIn:bl([.31,.01,.66,-.59]),backOut:bl([.33,1.53,.69,.99])};function m0(a,i){if(a)return typeof a=="function"&&cr()?f0(a,i):qd(a)?bl(a):Array.isArray(a)?a.map(l=>m0(l,i)||Ju.easeOut):Ju[a]}const p0=(a,i,l)=>(((1-3*l+3*i)*a+(3*l-6*i))*a+3*i)*a,V_=1e-7,L_=12;function q_(a,i,l,o,u){let h,f,p=0;do f=i+(l-i)/2,h=p0(f,o,u)-a,h>0?l=f:i=f;while(Math.abs(h)>V_&&++p<L_);return f}function Rl(a,i,l,o){if(a===i&&l===o)return Sn;const u=h=>q_(h,0,1,a,l);return h=>h===0||h===1?h:p0(u(h),i,o)}const v0=a=>i=>i<=.5?a(2*i)/2:(2-a(2*(1-i)))/2,g0=a=>i=>1-a(1-i),y0=Rl(.33,1.53,.69,.99),Hd=g0(y0),b0=v0(Hd),S0=a=>(a*=2)<1?.5*Hd(a):.5*(2-Math.pow(2,-10*(a-1))),Id=a=>1-Math.sin(Math.acos(a)),_0=g0(Id),T0=v0(Id),x0=a=>/^0[^.\s]+$/u.test(a);function H_(a){return typeof a=="number"?a===0:a!==null?a==="none"||a==="0"||x0(a):!0}const xl=a=>Math.round(a*1e5)/1e5,Gd=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function I_(a){return a==null}const G_=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Yd=(a,i)=>l=>!!(typeof l=="string"&&G_.test(l)&&l.startsWith(a)||i&&!I_(l)&&Object.prototype.hasOwnProperty.call(l,i)),j0=(a,i,l)=>o=>{if(typeof o!="string")return o;const[u,h,f,p]=o.match(Gd);return{[a]:parseFloat(u),[i]:parseFloat(h),[l]:parseFloat(f),alpha:p!==void 0?parseFloat(p):1}},Y_=a=>ga(0,255,a),Ou={...Si,transform:a=>Math.round(Y_(a))},bs={test:Yd("rgb","red"),parse:j0("red","green","blue"),transform:({red:a,green:i,blue:l,alpha:o=1})=>"rgba("+Ou.transform(a)+", "+Ou.transform(i)+", "+Ou.transform(l)+", "+xl(Cl.transform(o))+")"};function Z_(a){let i="",l="",o="",u="";return a.length>5?(i=a.substring(1,3),l=a.substring(3,5),o=a.substring(5,7),u=a.substring(7,9)):(i=a.substring(1,2),l=a.substring(2,3),o=a.substring(3,4),u=a.substring(4,5),i+=i,l+=l,o+=o,u+=u),{red:parseInt(i,16),green:parseInt(l,16),blue:parseInt(o,16),alpha:u?parseInt(u,16)/255:1}}const $u={test:Yd("#"),parse:Z_,transform:bs.transform},di={test:Yd("hsl","hue"),parse:j0("hue","saturation","lightness"),transform:({hue:a,saturation:i,lightness:l,alpha:o=1})=>"hsla("+Math.round(a)+", "+Xn.transform(xl(i))+", "+Xn.transform(xl(l))+", "+xl(Cl.transform(o))+")"},Pe={test:a=>bs.test(a)||$u.test(a)||di.test(a),parse:a=>bs.test(a)?bs.parse(a):di.test(a)?di.parse(a):$u.parse(a),transform:a=>typeof a=="string"?a:a.hasOwnProperty("red")?bs.transform(a):di.transform(a)},K_=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function X_(a){var i,l;return isNaN(a)&&typeof a=="string"&&(((i=a.match(Gd))===null||i===void 0?void 0:i.length)||0)+(((l=a.match(K_))===null||l===void 0?void 0:l.length)||0)>0}const A0="number",N0="color",Q_="var",P_="var(",dv="${}",F_=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function kl(a){const i=a.toString(),l=[],o={color:[],number:[],var:[]},u=[];let h=0;const p=i.replace(F_,v=>(Pe.test(v)?(o.color.push(h),u.push(N0),l.push(Pe.parse(v))):v.startsWith(P_)?(o.var.push(h),u.push(Q_),l.push(v)):(o.number.push(h),u.push(A0),l.push(parseFloat(v))),++h,dv)).split(dv);return{values:l,split:p,indexes:o,types:u}}function E0(a){return kl(a).values}function C0(a){const{split:i,types:l}=kl(a),o=i.length;return u=>{let h="";for(let f=0;f<o;f++)if(h+=i[f],u[f]!==void 0){const p=l[f];p===A0?h+=xl(u[f]):p===N0?h+=Pe.transform(u[f]):h+=u[f]}return h}}const J_=a=>typeof a=="number"?0:a;function $_(a){const i=E0(a);return C0(a)(i.map(J_))}const Qa={test:X_,parse:E0,createTransformer:C0,getAnimatableNone:$_},W_=new Set(["brightness","contrast","saturate","opacity"]);function tT(a){const[i,l]=a.slice(0,-1).split("(");if(i==="drop-shadow")return a;const[o]=l.match(Gd)||[];if(!o)return a;const u=l.replace(o,"");let h=W_.has(i)?1:0;return o!==l&&(h*=100),i+"("+h+u+")"}const eT=/\b([a-z-]*)\(.*?\)/gu,Wu={...Qa,getAnimatableNone:a=>{const i=a.match(eT);return i?i.map(tT).join(" "):a}},nT={...Cd,color:Pe,backgroundColor:Pe,outlineColor:Pe,fill:Pe,stroke:Pe,borderColor:Pe,borderTopColor:Pe,borderRightColor:Pe,borderBottomColor:Pe,borderLeftColor:Pe,filter:Wu,WebkitFilter:Wu},Zd=a=>nT[a];function D0(a,i){let l=Zd(a);return l!==Wu&&(l=Qa),l.getAnimatableNone?l.getAnimatableNone(i):void 0}const aT=new Set(["auto","none","0"]);function sT(a,i,l){let o=0,u;for(;o<a.length&&!u;){const h=a[o];typeof h=="string"&&!aT.has(h)&&kl(h).values.length&&(u=a[o]),o++}if(u&&l)for(const h of i)a[h]=D0(l,u)}const fv=a=>a===Si||a===yt,hv=(a,i)=>parseFloat(a.split(", ")[i]),mv=(a,i)=>(l,{transform:o})=>{if(o==="none"||!o)return 0;const u=o.match(/^matrix3d\((.+)\)$/u);if(u)return hv(u[1],i);{const h=o.match(/^matrix\((.+)\)$/u);return h?hv(h[1],a):0}},iT=new Set(["x","y","z"]),lT=bi.filter(a=>!iT.has(a));function oT(a){const i=[];return lT.forEach(l=>{const o=a.getValue(l);o!==void 0&&(i.push([l,o.get()]),o.set(l.startsWith("scale")?1:0))}),i}const gi={width:({x:a},{paddingLeft:i="0",paddingRight:l="0"})=>a.max-a.min-parseFloat(i)-parseFloat(l),height:({y:a},{paddingTop:i="0",paddingBottom:l="0"})=>a.max-a.min-parseFloat(i)-parseFloat(l),top:(a,{top:i})=>parseFloat(i),left:(a,{left:i})=>parseFloat(i),bottom:({y:a},{top:i})=>parseFloat(i)+(a.max-a.min),right:({x:a},{left:i})=>parseFloat(i)+(a.max-a.min),x:mv(4,13),y:mv(5,14)};gi.translateX=gi.x;gi.translateY=gi.y;const Ss=new Set;let td=!1,ed=!1;function k0(){if(ed){const a=Array.from(Ss).filter(o=>o.needsMeasurement),i=new Set(a.map(o=>o.element)),l=new Map;i.forEach(o=>{const u=oT(o);u.length&&(l.set(o,u),o.render())}),a.forEach(o=>o.measureInitialState()),i.forEach(o=>{o.render();const u=l.get(o);u&&u.forEach(([h,f])=>{var p;(p=o.getValue(h))===null||p===void 0||p.set(f)})}),a.forEach(o=>o.measureEndState()),a.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}ed=!1,td=!1,Ss.forEach(a=>a.complete()),Ss.clear()}function w0(){Ss.forEach(a=>{a.readKeyframes(),a.needsMeasurement&&(ed=!0)})}function rT(){w0(),k0()}class Kd{constructor(i,l,o,u,h,f=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...i],this.onComplete=l,this.name=o,this.motionValue=u,this.element=h,this.isAsync=f}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Ss.add(this),td||(td=!0,ue.read(w0),ue.resolveKeyframes(k0))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:i,name:l,element:o,motionValue:u}=this;for(let h=0;h<i.length;h++)if(i[h]===null)if(h===0){const f=u==null?void 0:u.get(),p=i[i.length-1];if(f!==void 0)i[0]=f;else if(o&&l){const v=o.readValue(l,p);v!=null&&(i[0]=v)}i[0]===void 0&&(i[0]=p),u&&f===void 0&&u.set(i[0])}else i[h]=i[h-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Ss.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ss.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const M0=a=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(a),cT=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function uT(a){const i=cT.exec(a);if(!i)return[,];const[,l,o,u]=i;return[`--${l??o}`,u]}function R0(a,i,l=1){const[o,u]=uT(a);if(!o)return;const h=window.getComputedStyle(i).getPropertyValue(o);if(h){const f=h.trim();return M0(f)?parseFloat(f):f}return Ed(u)?R0(u,i,l+1):u}const O0=a=>i=>i.test(a),dT={test:a=>a==="auto",parse:a=>a},z0=[Si,yt,Xn,Ya,o_,l_,dT],pv=a=>z0.find(O0(a));class B0 extends Kd{constructor(i,l,o,u,h){super(i,l,o,u,h,!0)}readKeyframes(){const{unresolvedKeyframes:i,element:l,name:o}=this;if(!l||!l.current)return;super.readKeyframes();for(let v=0;v<i.length;v++){let g=i[v];if(typeof g=="string"&&(g=g.trim(),Ed(g))){const b=R0(g,l.current);b!==void 0&&(i[v]=b),v===i.length-1&&(this.finalKeyframe=g)}}if(this.resolveNoneKeyframes(),!c0.has(o)||i.length!==2)return;const[u,h]=i,f=pv(u),p=pv(h);if(f!==p)if(fv(f)&&fv(p))for(let v=0;v<i.length;v++){const g=i[v];typeof g=="string"&&(i[v]=parseFloat(g))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:i,name:l}=this,o=[];for(let u=0;u<i.length;u++)H_(i[u])&&o.push(u);o.length&&sT(i,o,l)}measureInitialState(){const{element:i,unresolvedKeyframes:l,name:o}=this;if(!i||!i.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=gi[o](i.measureViewportBox(),window.getComputedStyle(i.current)),l[0]=this.measuredOrigin;const u=l[l.length-1];u!==void 0&&i.getValue(o,u).jump(u,!1)}measureEndState(){var i;const{element:l,name:o,unresolvedKeyframes:u}=this;if(!l||!l.current)return;const h=l.getValue(o);h&&h.jump(this.measuredOrigin,!1);const f=u.length-1,p=u[f];u[f]=gi[o](l.measureViewportBox(),window.getComputedStyle(l.current)),p!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=p),!((i=this.removedTransforms)===null||i===void 0)&&i.length&&this.removedTransforms.forEach(([v,g])=>{l.getValue(v).set(g)}),this.resolveNoneKeyframes()}}const vv=(a,i)=>i==="zIndex"?!1:!!(typeof a=="number"||Array.isArray(a)||typeof a=="string"&&(Qa.test(a)||a==="0")&&!a.startsWith("url("));function fT(a){const i=a[0];if(a.length===1)return!0;for(let l=0;l<a.length;l++)if(a[l]!==i)return!0}function hT(a,i,l,o){const u=a[0];if(u===null)return!1;if(i==="display"||i==="visibility")return!0;const h=a[a.length-1],f=vv(u,i),p=vv(h,i);return!f||!p?!1:fT(a)||(l==="spring"||Ld(l))&&o}const mT=a=>a!==null;function Tr(a,{repeat:i,repeatType:l="loop"},o){const u=a.filter(mT),h=i&&l!=="loop"&&i%2===1?0:u.length-1;return!h||o===void 0?u[h]:o}const pT=40;class U0{constructor({autoplay:i=!0,delay:l=0,type:o="keyframes",repeat:u=0,repeatDelay:h=0,repeatType:f="loop",...p}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Qn.now(),this.options={autoplay:i,delay:l,type:o,repeat:u,repeatDelay:h,repeatType:f,...p},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>pT?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&rT(),this._resolved}onKeyframesResolved(i,l){this.resolvedAt=Qn.now(),this.hasAttemptedResolve=!0;const{name:o,type:u,velocity:h,delay:f,onComplete:p,onUpdate:v,isGenerator:g}=this.options;if(!g&&!hT(i,o,u,h))if(f)this.options.duration=0;else{v&&v(Tr(i,this.options,l)),p&&p(),this.resolveFinishedPromise();return}const b=this.initPlayback(i,l);b!==!1&&(this._resolved={keyframes:i,finalKeyframe:l,...b},this.onPostResolved())}onPostResolved(){}then(i,l){return this.currentFinishedPromise.then(i,l)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(i=>{this.resolveFinishedPromise=i})}}const nd=2e4;function V0(a){let i=0;const l=50;let o=a.next(i);for(;!o.done&&i<nd;)i+=l,o=a.next(i);return i>=nd?1/0:i}const ge=(a,i,l)=>a+(i-a)*l;function zu(a,i,l){return l<0&&(l+=1),l>1&&(l-=1),l<1/6?a+(i-a)*6*l:l<1/2?i:l<2/3?a+(i-a)*(2/3-l)*6:a}function vT({hue:a,saturation:i,lightness:l,alpha:o}){a/=360,i/=100,l/=100;let u=0,h=0,f=0;if(!i)u=h=f=l;else{const p=l<.5?l*(1+i):l+i-l*i,v=2*l-p;u=zu(v,p,a+1/3),h=zu(v,p,a),f=zu(v,p,a-1/3)}return{red:Math.round(u*255),green:Math.round(h*255),blue:Math.round(f*255),alpha:o}}function ur(a,i){return l=>l>0?i:a}const Bu=(a,i,l)=>{const o=a*a,u=l*(i*i-o)+o;return u<0?0:Math.sqrt(u)},gT=[$u,bs,di],yT=a=>gT.find(i=>i.test(a));function gv(a){const i=yT(a);if(!i)return!1;let l=i.parse(a);return i===di&&(l=vT(l)),l}const yv=(a,i)=>{const l=gv(a),o=gv(i);if(!l||!o)return ur(a,i);const u={...l};return h=>(u.red=Bu(l.red,o.red,h),u.green=Bu(l.green,o.green,h),u.blue=Bu(l.blue,o.blue,h),u.alpha=ge(l.alpha,o.alpha,h),bs.transform(u))},bT=(a,i)=>l=>i(a(l)),Ol=(...a)=>a.reduce(bT),ad=new Set(["none","hidden"]);function ST(a,i){return ad.has(a)?l=>l<=0?a:i:l=>l>=1?i:a}function _T(a,i){return l=>ge(a,i,l)}function Xd(a){return typeof a=="number"?_T:typeof a=="string"?Ed(a)?ur:Pe.test(a)?yv:jT:Array.isArray(a)?L0:typeof a=="object"?Pe.test(a)?yv:TT:ur}function L0(a,i){const l=[...a],o=l.length,u=a.map((h,f)=>Xd(h)(h,i[f]));return h=>{for(let f=0;f<o;f++)l[f]=u[f](h);return l}}function TT(a,i){const l={...a,...i},o={};for(const u in l)a[u]!==void 0&&i[u]!==void 0&&(o[u]=Xd(a[u])(a[u],i[u]));return u=>{for(const h in o)l[h]=o[h](u);return l}}function xT(a,i){var l;const o=[],u={color:0,var:0,number:0};for(let h=0;h<i.values.length;h++){const f=i.types[h],p=a.indexes[f][u[f]],v=(l=a.values[p])!==null&&l!==void 0?l:0;o[h]=v,u[f]++}return o}const jT=(a,i)=>{const l=Qa.createTransformer(i),o=kl(a),u=kl(i);return o.indexes.var.length===u.indexes.var.length&&o.indexes.color.length===u.indexes.color.length&&o.indexes.number.length>=u.indexes.number.length?ad.has(a)&&!u.values.length||ad.has(i)&&!o.values.length?ST(a,i):Ol(L0(xT(o,u),u.values),l):ur(a,i)};function q0(a,i,l){return typeof a=="number"&&typeof i=="number"&&typeof l=="number"?ge(a,i,l):Xd(a)(a,i)}const AT=5;function H0(a,i,l){const o=Math.max(i-AT,0);return u0(l-a(o),i-o)}const _e={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Uu=.001;function NT({duration:a=_e.duration,bounce:i=_e.bounce,velocity:l=_e.velocity,mass:o=_e.mass}){let u,h,f=1-i;f=ga(_e.minDamping,_e.maxDamping,f),a=ga(_e.minDuration,_e.maxDuration,va(a)),f<1?(u=g=>{const b=g*f,S=b*a,x=b-l,E=sd(g,f),M=Math.exp(-S);return Uu-x/E*M},h=g=>{const S=g*f*a,x=S*l+l,E=Math.pow(f,2)*Math.pow(g,2)*a,M=Math.exp(-S),R=sd(Math.pow(g,2),f);return(-u(g)+Uu>0?-1:1)*((x-E)*M)/R}):(u=g=>{const b=Math.exp(-g*a),S=(g-l)*a+1;return-Uu+b*S},h=g=>{const b=Math.exp(-g*a),S=(l-g)*(a*a);return b*S});const p=5/a,v=CT(u,h,p);if(a=pa(a),isNaN(v))return{stiffness:_e.stiffness,damping:_e.damping,duration:a};{const g=Math.pow(v,2)*o;return{stiffness:g,damping:f*2*Math.sqrt(o*g),duration:a}}}const ET=12;function CT(a,i,l){let o=l;for(let u=1;u<ET;u++)o=o-a(o)/i(o);return o}function sd(a,i){return a*Math.sqrt(1-i*i)}const DT=["duration","bounce"],kT=["stiffness","damping","mass"];function bv(a,i){return i.some(l=>a[l]!==void 0)}function wT(a){let i={velocity:_e.velocity,stiffness:_e.stiffness,damping:_e.damping,mass:_e.mass,isResolvedFromDuration:!1,...a};if(!bv(a,kT)&&bv(a,DT))if(a.visualDuration){const l=a.visualDuration,o=2*Math.PI/(l*1.2),u=o*o,h=2*ga(.05,1,1-(a.bounce||0))*Math.sqrt(u);i={...i,mass:_e.mass,stiffness:u,damping:h}}else{const l=NT(a);i={...i,...l,mass:_e.mass},i.isResolvedFromDuration=!0}return i}function I0(a=_e.visualDuration,i=_e.bounce){const l=typeof a!="object"?{visualDuration:a,keyframes:[0,1],bounce:i}:a;let{restSpeed:o,restDelta:u}=l;const h=l.keyframes[0],f=l.keyframes[l.keyframes.length-1],p={done:!1,value:h},{stiffness:v,damping:g,mass:b,duration:S,velocity:x,isResolvedFromDuration:E}=wT({...l,velocity:-va(l.velocity||0)}),M=x||0,R=g/(2*Math.sqrt(v*b)),K=f-h,O=va(Math.sqrt(v/b)),P=Math.abs(K)<5;o||(o=P?_e.restSpeed.granular:_e.restSpeed.default),u||(u=P?_e.restDelta.granular:_e.restDelta.default);let Y;if(R<1){const X=sd(O,R);Y=L=>{const tt=Math.exp(-R*O*L);return f-tt*((M+R*O*K)/X*Math.sin(X*L)+K*Math.cos(X*L))}}else if(R===1)Y=X=>f-Math.exp(-O*X)*(K+(M+O*K)*X);else{const X=O*Math.sqrt(R*R-1);Y=L=>{const tt=Math.exp(-R*O*L),U=Math.min(X*L,300);return f-tt*((M+R*O*K)*Math.sinh(U)+X*K*Math.cosh(U))/X}}const et={calculatedDuration:E&&S||null,next:X=>{const L=Y(X);if(E)p.done=X>=S;else{let tt=0;R<1&&(tt=X===0?pa(M):H0(Y,X,L));const U=Math.abs(tt)<=o,nt=Math.abs(f-L)<=u;p.done=U&&nt}return p.value=p.done?f:L,p},toString:()=>{const X=Math.min(V0(et),nd),L=f0(tt=>et.next(X*tt).value,X,30);return X+"ms "+L}};return et}function Sv({keyframes:a,velocity:i=0,power:l=.8,timeConstant:o=325,bounceDamping:u=10,bounceStiffness:h=500,modifyTarget:f,min:p,max:v,restDelta:g=.5,restSpeed:b}){const S=a[0],x={done:!1,value:S},E=U=>p!==void 0&&U<p||v!==void 0&&U>v,M=U=>p===void 0?v:v===void 0||Math.abs(p-U)<Math.abs(v-U)?p:v;let R=l*i;const K=S+R,O=f===void 0?K:f(K);O!==K&&(R=O-S);const P=U=>-R*Math.exp(-U/o),Y=U=>O+P(U),et=U=>{const nt=P(U),at=Y(U);x.done=Math.abs(nt)<=g,x.value=x.done?O:at};let X,L;const tt=U=>{E(x.value)&&(X=U,L=I0({keyframes:[x.value,M(x.value)],velocity:H0(Y,U,x.value),damping:u,stiffness:h,restDelta:g,restSpeed:b}))};return tt(0),{calculatedDuration:null,next:U=>{let nt=!1;return!L&&X===void 0&&(nt=!0,et(U),tt(U)),X!==void 0&&U>=X?L.next(U-X):(!nt&&et(U),x)}}}const MT=Rl(.42,0,1,1),RT=Rl(0,0,.58,1),G0=Rl(.42,0,.58,1),OT=a=>Array.isArray(a)&&typeof a[0]!="number",zT={linear:Sn,easeIn:MT,easeInOut:G0,easeOut:RT,circIn:Id,circInOut:T0,circOut:_0,backIn:Hd,backInOut:b0,backOut:y0,anticipate:S0},_v=a=>{if(qd(a)){Gg(a.length===4);const[i,l,o,u]=a;return Rl(i,l,o,u)}else if(typeof a=="string")return zT[a];return a};function BT(a,i,l){const o=[],u=l||q0,h=a.length-1;for(let f=0;f<h;f++){let p=u(a[f],a[f+1]);if(i){const v=Array.isArray(i)?i[f]||Sn:i;p=Ol(v,p)}o.push(p)}return o}function UT(a,i,{clamp:l=!0,ease:o,mixer:u}={}){const h=a.length;if(Gg(h===i.length),h===1)return()=>i[0];if(h===2&&i[0]===i[1])return()=>i[1];const f=a[0]===a[1];a[0]>a[h-1]&&(a=[...a].reverse(),i=[...i].reverse());const p=BT(i,o,u),v=p.length,g=b=>{if(f&&b<a[0])return i[0];let S=0;if(v>1)for(;S<a.length-2&&!(b<a[S+1]);S++);const x=vi(a[S],a[S+1],b);return p[S](x)};return l?b=>g(ga(a[0],a[h-1],b)):g}function VT(a,i){const l=a[a.length-1];for(let o=1;o<=i;o++){const u=vi(0,i,o);a.push(ge(l,1,u))}}function LT(a){const i=[0];return VT(i,a.length-1),i}function qT(a,i){return a.map(l=>l*i)}function HT(a,i){return a.map(()=>i||G0).splice(0,a.length-1)}function dr({duration:a=300,keyframes:i,times:l,ease:o="easeInOut"}){const u=OT(o)?o.map(_v):_v(o),h={done:!1,value:i[0]},f=qT(l&&l.length===i.length?l:LT(i),a),p=UT(f,i,{ease:Array.isArray(u)?u:HT(i,u)});return{calculatedDuration:a,next:v=>(h.value=p(v),h.done=v>=a,h)}}const IT=a=>{const i=({timestamp:l})=>a(l);return{start:()=>ue.update(i,!0),stop:()=>Xa(i),now:()=>Qe.isProcessing?Qe.timestamp:Qn.now()}},GT={decay:Sv,inertia:Sv,tween:dr,keyframes:dr,spring:I0},YT=a=>a/100;class Qd extends U0{constructor(i){super(i),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:v}=this.options;v&&v()};const{name:l,motionValue:o,element:u,keyframes:h}=this.options,f=(u==null?void 0:u.KeyframeResolver)||Kd,p=(v,g)=>this.onKeyframesResolved(v,g);this.resolver=new f(h,p,l,o,u),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(i){const{type:l="keyframes",repeat:o=0,repeatDelay:u=0,repeatType:h,velocity:f=0}=this.options,p=Ld(l)?l:GT[l]||dr;let v,g;p!==dr&&typeof i[0]!="number"&&(v=Ol(YT,q0(i[0],i[1])),i=[0,100]);const b=p({...this.options,keyframes:i});h==="mirror"&&(g=p({...this.options,keyframes:[...i].reverse(),velocity:-f})),b.calculatedDuration===null&&(b.calculatedDuration=V0(b));const{calculatedDuration:S}=b,x=S+u,E=x*(o+1)-u;return{generator:b,mirroredGenerator:g,mapPercentToKeyframes:v,calculatedDuration:S,resolvedDuration:x,totalDuration:E}}onPostResolved(){const{autoplay:i=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!i?this.pause():this.state=this.pendingPlayState}tick(i,l=!1){const{resolved:o}=this;if(!o){const{keyframes:U}=this.options;return{done:!0,value:U[U.length-1]}}const{finalKeyframe:u,generator:h,mirroredGenerator:f,mapPercentToKeyframes:p,keyframes:v,calculatedDuration:g,totalDuration:b,resolvedDuration:S}=o;if(this.startTime===null)return h.next(0);const{delay:x,repeat:E,repeatType:M,repeatDelay:R,onUpdate:K}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,i):this.speed<0&&(this.startTime=Math.min(i-b/this.speed,this.startTime)),l?this.currentTime=i:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(i-this.startTime)*this.speed;const O=this.currentTime-x*(this.speed>=0?1:-1),P=this.speed>=0?O<0:O>b;this.currentTime=Math.max(O,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=b);let Y=this.currentTime,et=h;if(E){const U=Math.min(this.currentTime,b)/S;let nt=Math.floor(U),at=U%1;!at&&U>=1&&(at=1),at===1&&nt--,nt=Math.min(nt,E+1),!!(nt%2)&&(M==="reverse"?(at=1-at,R&&(at-=R/S)):M==="mirror"&&(et=f)),Y=ga(0,1,at)*S}const X=P?{done:!1,value:v[0]}:et.next(Y);p&&(X.value=p(X.value));let{done:L}=X;!P&&g!==null&&(L=this.speed>=0?this.currentTime>=b:this.currentTime<=0);const tt=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&L);return tt&&u!==void 0&&(X.value=Tr(v,this.options,u)),K&&K(X.value),tt&&this.finish(),X}get duration(){const{resolved:i}=this;return i?va(i.calculatedDuration):0}get time(){return va(this.currentTime)}set time(i){i=pa(i),this.currentTime=i,this.holdTime!==null||this.speed===0?this.holdTime=i:this.driver&&(this.startTime=this.driver.now()-i/this.speed)}get speed(){return this.playbackSpeed}set speed(i){const l=this.playbackSpeed!==i;this.playbackSpeed=i,l&&(this.time=va(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:i=IT,onPlay:l,startTime:o}=this.options;this.driver||(this.driver=i(h=>this.tick(h))),l&&l();const u=this.driver.now();this.holdTime!==null?this.startTime=u-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=u):this.startTime=o??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var i;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(i=this.currentTime)!==null&&i!==void 0?i:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:i}=this.options;i&&i()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(i){return this.startTime=0,this.tick(i,!0)}}const ZT=new Set(["opacity","clipPath","filter","transform"]);function KT(a,i,l,{delay:o=0,duration:u=300,repeat:h=0,repeatType:f="loop",ease:p="easeInOut",times:v}={}){const g={[i]:l};v&&(g.offset=v);const b=m0(p,u);return Array.isArray(b)&&(g.easing=b),a.animate(g,{delay:o,duration:u,easing:Array.isArray(b)?"linear":b,fill:"both",iterations:h+1,direction:f==="reverse"?"alternate":"normal"})}const XT=Vd(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),fr=10,QT=2e4;function PT(a){return Ld(a.type)||a.type==="spring"||!h0(a.ease)}function FT(a,i){const l=new Qd({...i,keyframes:a,repeat:0,delay:0,isGenerator:!0});let o={done:!1,value:a[0]};const u=[];let h=0;for(;!o.done&&h<QT;)o=l.sample(h),u.push(o.value),h+=fr;return{times:void 0,keyframes:u,duration:h-fr,ease:"linear"}}const Y0={anticipate:S0,backInOut:b0,circInOut:T0};function JT(a){return a in Y0}class Tv extends U0{constructor(i){super(i);const{name:l,motionValue:o,element:u,keyframes:h}=this.options;this.resolver=new B0(h,(f,p)=>this.onKeyframesResolved(f,p),l,o,u),this.resolver.scheduleResolve()}initPlayback(i,l){let{duration:o=300,times:u,ease:h,type:f,motionValue:p,name:v,startTime:g}=this.options;if(!p.owner||!p.owner.current)return!1;if(typeof h=="string"&&cr()&&JT(h)&&(h=Y0[h]),PT(this.options)){const{onComplete:S,onUpdate:x,motionValue:E,element:M,...R}=this.options,K=FT(i,R);i=K.keyframes,i.length===1&&(i[1]=i[0]),o=K.duration,u=K.times,h=K.ease,f="keyframes"}const b=KT(p.owner.current,v,i,{...this.options,duration:o,times:u,ease:h});return b.startTime=g??this.calcStartTime(),this.pendingTimeline?(uv(b,this.pendingTimeline),this.pendingTimeline=void 0):b.onfinish=()=>{const{onComplete:S}=this.options;p.set(Tr(i,this.options,l)),S&&S(),this.cancel(),this.resolveFinishedPromise()},{animation:b,duration:o,times:u,type:f,ease:h,keyframes:i}}get duration(){const{resolved:i}=this;if(!i)return 0;const{duration:l}=i;return va(l)}get time(){const{resolved:i}=this;if(!i)return 0;const{animation:l}=i;return va(l.currentTime||0)}set time(i){const{resolved:l}=this;if(!l)return;const{animation:o}=l;o.currentTime=pa(i)}get speed(){const{resolved:i}=this;if(!i)return 1;const{animation:l}=i;return l.playbackRate}set speed(i){const{resolved:l}=this;if(!l)return;const{animation:o}=l;o.playbackRate=i}get state(){const{resolved:i}=this;if(!i)return"idle";const{animation:l}=i;return l.playState}get startTime(){const{resolved:i}=this;if(!i)return null;const{animation:l}=i;return l.startTime}attachTimeline(i){if(!this._resolved)this.pendingTimeline=i;else{const{resolved:l}=this;if(!l)return Sn;const{animation:o}=l;uv(o,i)}return Sn}play(){if(this.isStopped)return;const{resolved:i}=this;if(!i)return;const{animation:l}=i;l.playState==="finished"&&this.updateFinishedPromise(),l.play()}pause(){const{resolved:i}=this;if(!i)return;const{animation:l}=i;l.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:i}=this;if(!i)return;const{animation:l,keyframes:o,duration:u,type:h,ease:f,times:p}=i;if(l.playState==="idle"||l.playState==="finished")return;if(this.time){const{motionValue:g,onUpdate:b,onComplete:S,element:x,...E}=this.options,M=new Qd({...E,keyframes:o,duration:u,type:h,ease:f,times:p,isGenerator:!0}),R=pa(this.time);g.setWithVelocity(M.sample(R-fr).value,M.sample(R).value,fr)}const{onStop:v}=this.options;v&&v(),this.cancel()}complete(){const{resolved:i}=this;i&&i.animation.finish()}cancel(){const{resolved:i}=this;i&&i.animation.cancel()}static supports(i){const{motionValue:l,name:o,repeatDelay:u,repeatType:h,damping:f,type:p}=i;if(!l||!l.owner||!(l.owner.current instanceof HTMLElement))return!1;const{onUpdate:v,transformTemplate:g}=l.owner.getProps();return XT()&&o&&ZT.has(o)&&!v&&!g&&!u&&h!=="mirror"&&f!==0&&p!=="inertia"}}const $T={type:"spring",stiffness:500,damping:25,restSpeed:10},WT=a=>({type:"spring",stiffness:550,damping:a===0?2*Math.sqrt(550):30,restSpeed:10}),tx={type:"keyframes",duration:.8},ex={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},nx=(a,{keyframes:i})=>i.length>2?tx:_s.has(a)?a.startsWith("scale")?WT(i[1]):$T:ex;function ax({when:a,delay:i,delayChildren:l,staggerChildren:o,staggerDirection:u,repeat:h,repeatType:f,repeatDelay:p,from:v,elapsed:g,...b}){return!!Object.keys(b).length}const Pd=(a,i,l,o={},u,h)=>f=>{const p=Od(o,a)||{},v=p.delay||o.delay||0;let{elapsed:g=0}=o;g=g-pa(v);let b={keyframes:Array.isArray(l)?l:[null,l],ease:"easeOut",velocity:i.getVelocity(),...p,delay:-g,onUpdate:x=>{i.set(x),p.onUpdate&&p.onUpdate(x)},onComplete:()=>{f(),p.onComplete&&p.onComplete()},name:a,motionValue:i,element:h?void 0:u};ax(p)||(b={...b,...nx(a,b)}),b.duration&&(b.duration=pa(b.duration)),b.repeatDelay&&(b.repeatDelay=pa(b.repeatDelay)),b.from!==void 0&&(b.keyframes[0]=b.from);let S=!1;if((b.type===!1||b.duration===0&&!b.repeatDelay)&&(b.duration=0,b.delay===0&&(S=!0)),S&&!h&&i.get()!==void 0){const x=Tr(b.keyframes,p);if(x!==void 0)return ue.update(()=>{b.onUpdate(x),b.onComplete()}),new z_([])}return!h&&Tv.supports(b)?new Tv(b):new Qd(b)};function sx({protectedKeys:a,needsAnimating:i},l){const o=a.hasOwnProperty(l)&&i[l]!==!0;return i[l]=!1,o}function Z0(a,i,{delay:l=0,transitionOverride:o,type:u}={}){var h;let{transition:f=a.getDefaultTransition(),transitionEnd:p,...v}=i;o&&(f=o);const g=[],b=u&&a.animationState&&a.animationState.getState()[u];for(const S in v){const x=a.getValue(S,(h=a.latestValues[S])!==null&&h!==void 0?h:null),E=v[S];if(E===void 0||b&&sx(b,S))continue;const M={delay:l,...Od(f||{},S)};let R=!1;if(window.MotionHandoffAnimation){const O=d0(a);if(O){const P=window.MotionHandoffAnimation(O,S,ue);P!==null&&(M.startTime=P,R=!0)}}Fu(a,S),x.start(Pd(S,x,E,a.shouldReduceMotion&&c0.has(S)?{type:!1}:M,a,R));const K=x.animation;K&&g.push(K)}return p&&Promise.all(g).then(()=>{ue.update(()=>{p&&w_(a,p)})}),g}function id(a,i,l={}){var o;const u=_r(a,i,l.type==="exit"?(o=a.presenceContext)===null||o===void 0?void 0:o.custom:void 0);let{transition:h=a.getDefaultTransition()||{}}=u||{};l.transitionOverride&&(h=l.transitionOverride);const f=u?()=>Promise.all(Z0(a,u,l)):()=>Promise.resolve(),p=a.variantChildren&&a.variantChildren.size?(g=0)=>{const{delayChildren:b=0,staggerChildren:S,staggerDirection:x}=h;return ix(a,i,b+g,S,x,l)}:()=>Promise.resolve(),{when:v}=h;if(v){const[g,b]=v==="beforeChildren"?[f,p]:[p,f];return g().then(()=>b())}else return Promise.all([f(),p(l.delay)])}function ix(a,i,l=0,o=0,u=1,h){const f=[],p=(a.variantChildren.size-1)*o,v=u===1?(g=0)=>g*o:(g=0)=>p-g*o;return Array.from(a.variantChildren).sort(lx).forEach((g,b)=>{g.notify("AnimationStart",i),f.push(id(g,i,{...h,delay:l+v(b)}).then(()=>g.notify("AnimationComplete",i)))}),Promise.all(f)}function lx(a,i){return a.sortNodePosition(i)}function ox(a,i,l={}){a.notify("AnimationStart",i);let o;if(Array.isArray(i)){const u=i.map(h=>id(a,h,l));o=Promise.all(u)}else if(typeof i=="string")o=id(a,i,l);else{const u=typeof i=="function"?_r(a,i,l.custom):i;o=Promise.all(Z0(a,u,l))}return o.then(()=>{a.notify("AnimationComplete",i)})}const rx=Td.length;function K0(a){if(!a)return;if(!a.isControllingVariants){const l=a.parent?K0(a.parent)||{}:{};return a.props.initial!==void 0&&(l.initial=a.props.initial),l}const i={};for(let l=0;l<rx;l++){const o=Td[l],u=a.props[o];(El(u)||u===!1)&&(i[o]=u)}return i}const cx=[..._d].reverse(),ux=_d.length;function dx(a){return i=>Promise.all(i.map(({animation:l,options:o})=>ox(a,l,o)))}function fx(a){let i=dx(a),l=xv(),o=!0;const u=v=>(g,b)=>{var S;const x=_r(a,b,v==="exit"?(S=a.presenceContext)===null||S===void 0?void 0:S.custom:void 0);if(x){const{transition:E,transitionEnd:M,...R}=x;g={...g,...R,...M}}return g};function h(v){i=v(a)}function f(v){const{props:g}=a,b=K0(a.parent)||{},S=[],x=new Set;let E={},M=1/0;for(let K=0;K<ux;K++){const O=cx[K],P=l[O],Y=g[O]!==void 0?g[O]:b[O],et=El(Y),X=O===v?P.isActive:null;X===!1&&(M=K);let L=Y===b[O]&&Y!==g[O]&&et;if(L&&o&&a.manuallyAnimateOnMount&&(L=!1),P.protectedKeys={...E},!P.isActive&&X===null||!Y&&!P.prevProp||br(Y)||typeof Y=="boolean")continue;const tt=hx(P.prevProp,Y);let U=tt||O===v&&P.isActive&&!L&&et||K>M&&et,nt=!1;const at=Array.isArray(Y)?Y:[Y];let mt=at.reduce(u(O),{});X===!1&&(mt={});const{prevResolvedValues:Dt={}}=P,$={...Dt,...mt},st=Q=>{U=!0,x.has(Q)&&(nt=!0,x.delete(Q)),P.needsAnimating[Q]=!0;const lt=a.getValue(Q);lt&&(lt.liveStyle=!1)};for(const Q in $){const lt=mt[Q],Ct=Dt[Q];if(E.hasOwnProperty(Q))continue;let vt=!1;Pu(lt)&&Pu(Ct)?vt=!r0(lt,Ct):vt=lt!==Ct,vt?lt!=null?st(Q):x.add(Q):lt!==void 0&&x.has(Q)?st(Q):P.protectedKeys[Q]=!0}P.prevProp=Y,P.prevResolvedValues=mt,P.isActive&&(E={...E,...mt}),o&&a.blockInitialAnimation&&(U=!1),U&&(!(L&&tt)||nt)&&S.push(...at.map(Q=>({animation:Q,options:{type:O}})))}if(x.size){const K={};x.forEach(O=>{const P=a.getBaseTarget(O),Y=a.getValue(O);Y&&(Y.liveStyle=!0),K[O]=P??null}),S.push({animation:K})}let R=!!S.length;return o&&(g.initial===!1||g.initial===g.animate)&&!a.manuallyAnimateOnMount&&(R=!1),o=!1,R?i(S):Promise.resolve()}function p(v,g){var b;if(l[v].isActive===g)return Promise.resolve();(b=a.variantChildren)===null||b===void 0||b.forEach(x=>{var E;return(E=x.animationState)===null||E===void 0?void 0:E.setActive(v,g)}),l[v].isActive=g;const S=f(v);for(const x in l)l[x].protectedKeys={};return S}return{animateChanges:f,setActive:p,setAnimateFunction:h,getState:()=>l,reset:()=>{l=xv(),o=!0}}}function hx(a,i){return typeof i=="string"?i!==a:Array.isArray(i)?!r0(i,a):!1}function ms(a=!1){return{isActive:a,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function xv(){return{animate:ms(!0),whileInView:ms(),whileHover:ms(),whileTap:ms(),whileDrag:ms(),whileFocus:ms(),exit:ms()}}class Pa{constructor(i){this.isMounted=!1,this.node=i}update(){}}class mx extends Pa{constructor(i){super(i),i.animationState||(i.animationState=fx(i))}updateAnimationControlsSubscription(){const{animate:i}=this.node.getProps();br(i)&&(this.unmountControls=i.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:i}=this.node.getProps(),{animate:l}=this.node.prevProps||{};i!==l&&this.updateAnimationControlsSubscription()}unmount(){var i;this.node.animationState.reset(),(i=this.unmountControls)===null||i===void 0||i.call(this)}}let px=0;class vx extends Pa{constructor(){super(...arguments),this.id=px++}update(){if(!this.node.presenceContext)return;const{isPresent:i,onExitComplete:l}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||i===o)return;const u=this.node.animationState.setActive("exit",!i);l&&!i&&u.then(()=>l(this.id))}mount(){const{register:i}=this.node.presenceContext||{};i&&(this.unmount=i(this.id))}unmount(){}}const gx={animation:{Feature:mx},exit:{Feature:vx}},Ln={x:!1,y:!1};function X0(){return Ln.x||Ln.y}function yx(a){return a==="x"||a==="y"?Ln[a]?null:(Ln[a]=!0,()=>{Ln[a]=!1}):Ln.x||Ln.y?null:(Ln.x=Ln.y=!0,()=>{Ln.x=Ln.y=!1})}const Fd=a=>a.pointerType==="mouse"?typeof a.button!="number"||a.button<=0:a.isPrimary!==!1;function wl(a,i,l,o={passive:!0}){return a.addEventListener(i,l,o),()=>a.removeEventListener(i,l)}function zl(a){return{point:{x:a.pageX,y:a.pageY}}}const bx=a=>i=>Fd(i)&&a(i,zl(i));function jl(a,i,l,o){return wl(a,i,bx(l),o)}const jv=(a,i)=>Math.abs(a-i);function Sx(a,i){const l=jv(a.x,i.x),o=jv(a.y,i.y);return Math.sqrt(l**2+o**2)}class Q0{constructor(i,l,{transformPagePoint:o,contextWindow:u,dragSnapToOrigin:h=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const S=Lu(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,E=Sx(S.offset,{x:0,y:0})>=3;if(!x&&!E)return;const{point:M}=S,{timestamp:R}=Qe;this.history.push({...M,timestamp:R});const{onStart:K,onMove:O}=this.handlers;x||(K&&K(this.lastMoveEvent,S),this.startEvent=this.lastMoveEvent),O&&O(this.lastMoveEvent,S)},this.handlePointerMove=(S,x)=>{this.lastMoveEvent=S,this.lastMoveEventInfo=Vu(x,this.transformPagePoint),ue.update(this.updatePoint,!0)},this.handlePointerUp=(S,x)=>{this.end();const{onEnd:E,onSessionEnd:M,resumeAnimation:R}=this.handlers;if(this.dragSnapToOrigin&&R&&R(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const K=Lu(S.type==="pointercancel"?this.lastMoveEventInfo:Vu(x,this.transformPagePoint),this.history);this.startEvent&&E&&E(S,K),M&&M(S,K)},!Fd(i))return;this.dragSnapToOrigin=h,this.handlers=l,this.transformPagePoint=o,this.contextWindow=u||window;const f=zl(i),p=Vu(f,this.transformPagePoint),{point:v}=p,{timestamp:g}=Qe;this.history=[{...v,timestamp:g}];const{onSessionStart:b}=l;b&&b(i,Lu(p,this.history)),this.removeListeners=Ol(jl(this.contextWindow,"pointermove",this.handlePointerMove),jl(this.contextWindow,"pointerup",this.handlePointerUp),jl(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(i){this.handlers=i}end(){this.removeListeners&&this.removeListeners(),Xa(this.updatePoint)}}function Vu(a,i){return i?{point:i(a.point)}:a}function Av(a,i){return{x:a.x-i.x,y:a.y-i.y}}function Lu({point:a},i){return{point:a,delta:Av(a,P0(i)),offset:Av(a,_x(i)),velocity:Tx(i,.1)}}function _x(a){return a[0]}function P0(a){return a[a.length-1]}function Tx(a,i){if(a.length<2)return{x:0,y:0};let l=a.length-1,o=null;const u=P0(a);for(;l>=0&&(o=a[l],!(u.timestamp-o.timestamp>pa(i)));)l--;if(!o)return{x:0,y:0};const h=va(u.timestamp-o.timestamp);if(h===0)return{x:0,y:0};const f={x:(u.x-o.x)/h,y:(u.y-o.y)/h};return f.x===1/0&&(f.x=0),f.y===1/0&&(f.y=0),f}const F0=1e-4,xx=1-F0,jx=1+F0,J0=.01,Ax=0-J0,Nx=0+J0;function _n(a){return a.max-a.min}function Ex(a,i,l){return Math.abs(a-i)<=l}function Nv(a,i,l,o=.5){a.origin=o,a.originPoint=ge(i.min,i.max,a.origin),a.scale=_n(l)/_n(i),a.translate=ge(l.min,l.max,a.origin)-a.originPoint,(a.scale>=xx&&a.scale<=jx||isNaN(a.scale))&&(a.scale=1),(a.translate>=Ax&&a.translate<=Nx||isNaN(a.translate))&&(a.translate=0)}function Al(a,i,l,o){Nv(a.x,i.x,l.x,o?o.originX:void 0),Nv(a.y,i.y,l.y,o?o.originY:void 0)}function Ev(a,i,l){a.min=l.min+i.min,a.max=a.min+_n(i)}function Cx(a,i,l){Ev(a.x,i.x,l.x),Ev(a.y,i.y,l.y)}function Cv(a,i,l){a.min=i.min-l.min,a.max=a.min+_n(i)}function Nl(a,i,l){Cv(a.x,i.x,l.x),Cv(a.y,i.y,l.y)}function Dx(a,{min:i,max:l},o){return i!==void 0&&a<i?a=o?ge(i,a,o.min):Math.max(a,i):l!==void 0&&a>l&&(a=o?ge(l,a,o.max):Math.min(a,l)),a}function Dv(a,i,l){return{min:i!==void 0?a.min+i:void 0,max:l!==void 0?a.max+l-(a.max-a.min):void 0}}function kx(a,{top:i,left:l,bottom:o,right:u}){return{x:Dv(a.x,l,u),y:Dv(a.y,i,o)}}function kv(a,i){let l=i.min-a.min,o=i.max-a.max;return i.max-i.min<a.max-a.min&&([l,o]=[o,l]),{min:l,max:o}}function wx(a,i){return{x:kv(a.x,i.x),y:kv(a.y,i.y)}}function Mx(a,i){let l=.5;const o=_n(a),u=_n(i);return u>o?l=vi(i.min,i.max-o,a.min):o>u&&(l=vi(a.min,a.max-u,i.min)),ga(0,1,l)}function Rx(a,i){const l={};return i.min!==void 0&&(l.min=i.min-a.min),i.max!==void 0&&(l.max=i.max-a.min),l}const ld=.35;function Ox(a=ld){return a===!1?a=0:a===!0&&(a=ld),{x:wv(a,"left","right"),y:wv(a,"top","bottom")}}function wv(a,i,l){return{min:Mv(a,i),max:Mv(a,l)}}function Mv(a,i){return typeof a=="number"?a:a[i]||0}const Rv=()=>({translate:0,scale:1,origin:0,originPoint:0}),fi=()=>({x:Rv(),y:Rv()}),Ov=()=>({min:0,max:0}),Ne=()=>({x:Ov(),y:Ov()});function Rn(a){return[a("x"),a("y")]}function $0({top:a,left:i,right:l,bottom:o}){return{x:{min:i,max:l},y:{min:a,max:o}}}function zx({x:a,y:i}){return{top:i.min,right:a.max,bottom:i.max,left:a.min}}function Bx(a,i){if(!i)return a;const l=i({x:a.left,y:a.top}),o=i({x:a.right,y:a.bottom});return{top:l.y,left:l.x,bottom:o.y,right:o.x}}function qu(a){return a===void 0||a===1}function od({scale:a,scaleX:i,scaleY:l}){return!qu(a)||!qu(i)||!qu(l)}function gs(a){return od(a)||W0(a)||a.z||a.rotate||a.rotateX||a.rotateY||a.skewX||a.skewY}function W0(a){return zv(a.x)||zv(a.y)}function zv(a){return a&&a!=="0%"}function hr(a,i,l){const o=a-l,u=i*o;return l+u}function Bv(a,i,l,o,u){return u!==void 0&&(a=hr(a,u,o)),hr(a,l,o)+i}function rd(a,i=0,l=1,o,u){a.min=Bv(a.min,i,l,o,u),a.max=Bv(a.max,i,l,o,u)}function ty(a,{x:i,y:l}){rd(a.x,i.translate,i.scale,i.originPoint),rd(a.y,l.translate,l.scale,l.originPoint)}const Uv=.999999999999,Vv=1.0000000000001;function Ux(a,i,l,o=!1){const u=l.length;if(!u)return;i.x=i.y=1;let h,f;for(let p=0;p<u;p++){h=l[p],f=h.projectionDelta;const{visualElement:v}=h.options;v&&v.props.style&&v.props.style.display==="contents"||(o&&h.options.layoutScroll&&h.scroll&&h!==h.root&&mi(a,{x:-h.scroll.offset.x,y:-h.scroll.offset.y}),f&&(i.x*=f.x.scale,i.y*=f.y.scale,ty(a,f)),o&&gs(h.latestValues)&&mi(a,h.latestValues))}i.x<Vv&&i.x>Uv&&(i.x=1),i.y<Vv&&i.y>Uv&&(i.y=1)}function hi(a,i){a.min=a.min+i,a.max=a.max+i}function Lv(a,i,l,o,u=.5){const h=ge(a.min,a.max,u);rd(a,i,l,h,o)}function mi(a,i){Lv(a.x,i.x,i.scaleX,i.scale,i.originX),Lv(a.y,i.y,i.scaleY,i.scale,i.originY)}function ey(a,i){return $0(Bx(a.getBoundingClientRect(),i))}function Vx(a,i,l){const o=ey(a,l),{scroll:u}=i;return u&&(hi(o.x,u.offset.x),hi(o.y,u.offset.y)),o}const ny=({current:a})=>a?a.ownerDocument.defaultView:null,Lx=new WeakMap;class qx{constructor(i){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ne(),this.visualElement=i}start(i,{snapToCursor:l=!1}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const u=b=>{const{dragSnapToOrigin:S}=this.getProps();S?this.pauseAnimation():this.stopAnimation(),l&&this.snapToCursor(zl(b).point)},h=(b,S)=>{const{drag:x,dragPropagation:E,onDragStart:M}=this.getProps();if(x&&!E&&(this.openDragLock&&this.openDragLock(),this.openDragLock=yx(x),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Rn(K=>{let O=this.getAxisMotionValue(K).get()||0;if(Xn.test(O)){const{projection:P}=this.visualElement;if(P&&P.layout){const Y=P.layout.layoutBox[K];Y&&(O=_n(Y)*(parseFloat(O)/100))}}this.originPoint[K]=O}),M&&ue.postRender(()=>M(b,S)),Fu(this.visualElement,"transform");const{animationState:R}=this.visualElement;R&&R.setActive("whileDrag",!0)},f=(b,S)=>{const{dragPropagation:x,dragDirectionLock:E,onDirectionLock:M,onDrag:R}=this.getProps();if(!x&&!this.openDragLock)return;const{offset:K}=S;if(E&&this.currentDirection===null){this.currentDirection=Hx(K),this.currentDirection!==null&&M&&M(this.currentDirection);return}this.updateAxis("x",S.point,K),this.updateAxis("y",S.point,K),this.visualElement.render(),R&&R(b,S)},p=(b,S)=>this.stop(b,S),v=()=>Rn(b=>{var S;return this.getAnimationState(b)==="paused"&&((S=this.getAxisMotionValue(b).animation)===null||S===void 0?void 0:S.play())}),{dragSnapToOrigin:g}=this.getProps();this.panSession=new Q0(i,{onSessionStart:u,onStart:h,onMove:f,onSessionEnd:p,resumeAnimation:v},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:g,contextWindow:ny(this.visualElement)})}stop(i,l){const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:u}=l;this.startAnimation(u);const{onDragEnd:h}=this.getProps();h&&ue.postRender(()=>h(i,l))}cancel(){this.isDragging=!1;const{projection:i,animationState:l}=this.visualElement;i&&(i.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),l&&l.setActive("whileDrag",!1)}updateAxis(i,l,o){const{drag:u}=this.getProps();if(!o||!tr(i,u,this.currentDirection))return;const h=this.getAxisMotionValue(i);let f=this.originPoint[i]+o[i];this.constraints&&this.constraints[i]&&(f=Dx(f,this.constraints[i],this.elastic[i])),h.set(f)}resolveConstraints(){var i;const{dragConstraints:l,dragElastic:o}=this.getProps(),u=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)===null||i===void 0?void 0:i.layout,h=this.constraints;l&&ui(l)?this.constraints||(this.constraints=this.resolveRefConstraints()):l&&u?this.constraints=kx(u.layoutBox,l):this.constraints=!1,this.elastic=Ox(o),h!==this.constraints&&u&&this.constraints&&!this.hasMutatedConstraints&&Rn(f=>{this.constraints!==!1&&this.getAxisMotionValue(f)&&(this.constraints[f]=Rx(u.layoutBox[f],this.constraints[f]))})}resolveRefConstraints(){const{dragConstraints:i,onMeasureDragConstraints:l}=this.getProps();if(!i||!ui(i))return!1;const o=i.current,{projection:u}=this.visualElement;if(!u||!u.layout)return!1;const h=Vx(o,u.root,this.visualElement.getTransformPagePoint());let f=wx(u.layout.layoutBox,h);if(l){const p=l(zx(f));this.hasMutatedConstraints=!!p,p&&(f=$0(p))}return f}startAnimation(i){const{drag:l,dragMomentum:o,dragElastic:u,dragTransition:h,dragSnapToOrigin:f,onDragTransitionEnd:p}=this.getProps(),v=this.constraints||{},g=Rn(b=>{if(!tr(b,l,this.currentDirection))return;let S=v&&v[b]||{};f&&(S={min:0,max:0});const x=u?200:1e6,E=u?40:1e7,M={type:"inertia",velocity:o?i[b]:0,bounceStiffness:x,bounceDamping:E,timeConstant:750,restDelta:1,restSpeed:10,...h,...S};return this.startAxisValueAnimation(b,M)});return Promise.all(g).then(p)}startAxisValueAnimation(i,l){const o=this.getAxisMotionValue(i);return Fu(this.visualElement,i),o.start(Pd(i,o,0,l,this.visualElement,!1))}stopAnimation(){Rn(i=>this.getAxisMotionValue(i).stop())}pauseAnimation(){Rn(i=>{var l;return(l=this.getAxisMotionValue(i).animation)===null||l===void 0?void 0:l.pause()})}getAnimationState(i){var l;return(l=this.getAxisMotionValue(i).animation)===null||l===void 0?void 0:l.state}getAxisMotionValue(i){const l=`_drag${i.toUpperCase()}`,o=this.visualElement.getProps(),u=o[l];return u||this.visualElement.getValue(i,(o.initial?o.initial[i]:void 0)||0)}snapToCursor(i){Rn(l=>{const{drag:o}=this.getProps();if(!tr(l,o,this.currentDirection))return;const{projection:u}=this.visualElement,h=this.getAxisMotionValue(l);if(u&&u.layout){const{min:f,max:p}=u.layout.layoutBox[l];h.set(i[l]-ge(f,p,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:i,dragConstraints:l}=this.getProps(),{projection:o}=this.visualElement;if(!ui(l)||!o||!this.constraints)return;this.stopAnimation();const u={x:0,y:0};Rn(f=>{const p=this.getAxisMotionValue(f);if(p&&this.constraints!==!1){const v=p.get();u[f]=Mx({min:v,max:v},this.constraints[f])}});const{transformTemplate:h}=this.visualElement.getProps();this.visualElement.current.style.transform=h?h({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),Rn(f=>{if(!tr(f,i,null))return;const p=this.getAxisMotionValue(f),{min:v,max:g}=this.constraints[f];p.set(ge(v,g,u[f]))})}addListeners(){if(!this.visualElement.current)return;Lx.set(this.visualElement,this);const i=this.visualElement.current,l=jl(i,"pointerdown",v=>{const{drag:g,dragListener:b=!0}=this.getProps();g&&b&&this.start(v)}),o=()=>{const{dragConstraints:v}=this.getProps();ui(v)&&v.current&&(this.constraints=this.resolveRefConstraints())},{projection:u}=this.visualElement,h=u.addEventListener("measure",o);u&&!u.layout&&(u.root&&u.root.updateScroll(),u.updateLayout()),ue.read(o);const f=wl(window,"resize",()=>this.scalePositionWithinConstraints()),p=u.addEventListener("didUpdate",(({delta:v,hasLayoutChanged:g})=>{this.isDragging&&g&&(Rn(b=>{const S=this.getAxisMotionValue(b);S&&(this.originPoint[b]+=v[b].translate,S.set(S.get()+v[b].translate))}),this.visualElement.render())}));return()=>{f(),l(),h(),p&&p()}}getProps(){const i=this.visualElement.getProps(),{drag:l=!1,dragDirectionLock:o=!1,dragPropagation:u=!1,dragConstraints:h=!1,dragElastic:f=ld,dragMomentum:p=!0}=i;return{...i,drag:l,dragDirectionLock:o,dragPropagation:u,dragConstraints:h,dragElastic:f,dragMomentum:p}}}function tr(a,i,l){return(i===!0||i===a)&&(l===null||l===a)}function Hx(a,i=10){let l=null;return Math.abs(a.y)>i?l="y":Math.abs(a.x)>i&&(l="x"),l}class Ix extends Pa{constructor(i){super(i),this.removeGroupControls=Sn,this.removeListeners=Sn,this.controls=new qx(i)}mount(){const{dragControls:i}=this.node.getProps();i&&(this.removeGroupControls=i.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Sn}unmount(){this.removeGroupControls(),this.removeListeners()}}const qv=a=>(i,l)=>{a&&ue.postRender(()=>a(i,l))};class Gx extends Pa{constructor(){super(...arguments),this.removePointerDownListener=Sn}onPointerDown(i){this.session=new Q0(i,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ny(this.node)})}createPanHandlers(){const{onPanSessionStart:i,onPanStart:l,onPan:o,onPanEnd:u}=this.node.getProps();return{onSessionStart:qv(i),onStart:qv(l),onMove:o,onEnd:(h,f)=>{delete this.session,u&&ue.postRender(()=>u(h,f))}}}mount(){this.removePointerDownListener=jl(this.node.current,"pointerdown",i=>this.onPointerDown(i))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const lr={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Hv(a,i){return i.max===i.min?0:a/(i.max-i.min)*100}const vl={correct:(a,i)=>{if(!i.target)return a;if(typeof a=="string")if(yt.test(a))a=parseFloat(a);else return a;const l=Hv(a,i.target.x),o=Hv(a,i.target.y);return`${l}% ${o}%`}},Yx={correct:(a,{treeScale:i,projectionDelta:l})=>{const o=a,u=Qa.parse(a);if(u.length>5)return o;const h=Qa.createTransformer(a),f=typeof u[0]!="number"?1:0,p=l.x.scale*i.x,v=l.y.scale*i.y;u[0+f]/=p,u[1+f]/=v;const g=ge(p,v,.5);return typeof u[2+f]=="number"&&(u[2+f]/=g),typeof u[3+f]=="number"&&(u[3+f]/=g),h(u)}};class Zx extends _.Component{componentDidMount(){const{visualElement:i,layoutGroup:l,switchLayoutGroup:o,layoutId:u}=this.props,{projection:h}=i;g_(Kx),h&&(l.group&&l.group.add(h),o&&o.register&&u&&o.register(h),h.root.didUpdate(),h.addEventListener("animationComplete",()=>{this.safeToRemove()}),h.setOptions({...h.options,onExitComplete:()=>this.safeToRemove()})),lr.hasEverUpdated=!0}getSnapshotBeforeUpdate(i){const{layoutDependency:l,visualElement:o,drag:u,isPresent:h}=this.props,f=o.projection;return f&&(f.isPresent=h,u||i.layoutDependency!==l||l===void 0?f.willUpdate():this.safeToRemove(),i.isPresent!==h&&(h?f.promote():f.relegate()||ue.postRender(()=>{const p=f.getStack();(!p||!p.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:i}=this.props.visualElement;i&&(i.root.didUpdate(),jd.postRender(()=>{!i.currentAnimation&&i.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:i,layoutGroup:l,switchLayoutGroup:o}=this.props,{projection:u}=i;u&&(u.scheduleCheckAfterUnmount(),l&&l.group&&l.group.remove(u),o&&o.deregister&&o.deregister(u))}safeToRemove(){const{safeToRemove:i}=this.props;i&&i()}render(){return null}}function ay(a){const[i,l]=Hg(),o=_.useContext(gd);return d.jsx(Zx,{...a,layoutGroup:o,switchLayoutGroup:_.useContext(Pg),isPresent:i,safeToRemove:l})}const Kx={borderRadius:{...vl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:vl,borderTopRightRadius:vl,borderBottomLeftRadius:vl,borderBottomRightRadius:vl,boxShadow:Yx};function Xx(a,i,l){const o=Fe(a)?a:Dl(a);return o.start(Pd("",o,i,l)),o.animation}function Qx(a){return a instanceof SVGElement&&a.tagName!=="svg"}const Px=(a,i)=>a.depth-i.depth;class Fx{constructor(){this.children=[],this.isDirty=!1}add(i){zd(this.children,i),this.isDirty=!0}remove(i){Bd(this.children,i),this.isDirty=!0}forEach(i){this.isDirty&&this.children.sort(Px),this.isDirty=!1,this.children.forEach(i)}}function Jx(a,i){const l=Qn.now(),o=({timestamp:u})=>{const h=u-l;h>=i&&(Xa(o),a(h-i))};return ue.read(o,!0),()=>Xa(o)}const sy=["TopLeft","TopRight","BottomLeft","BottomRight"],$x=sy.length,Iv=a=>typeof a=="string"?parseFloat(a):a,Gv=a=>typeof a=="number"||yt.test(a);function Wx(a,i,l,o,u,h){u?(a.opacity=ge(0,l.opacity!==void 0?l.opacity:1,t2(o)),a.opacityExit=ge(i.opacity!==void 0?i.opacity:1,0,e2(o))):h&&(a.opacity=ge(i.opacity!==void 0?i.opacity:1,l.opacity!==void 0?l.opacity:1,o));for(let f=0;f<$x;f++){const p=`border${sy[f]}Radius`;let v=Yv(i,p),g=Yv(l,p);if(v===void 0&&g===void 0)continue;v||(v=0),g||(g=0),v===0||g===0||Gv(v)===Gv(g)?(a[p]=Math.max(ge(Iv(v),Iv(g),o),0),(Xn.test(g)||Xn.test(v))&&(a[p]+="%")):a[p]=g}(i.rotate||l.rotate)&&(a.rotate=ge(i.rotate||0,l.rotate||0,o))}function Yv(a,i){return a[i]!==void 0?a[i]:a.borderRadius}const t2=iy(0,.5,_0),e2=iy(.5,.95,Sn);function iy(a,i,l){return o=>o<a?0:o>i?1:l(vi(a,i,o))}function Zv(a,i){a.min=i.min,a.max=i.max}function Mn(a,i){Zv(a.x,i.x),Zv(a.y,i.y)}function Kv(a,i){a.translate=i.translate,a.scale=i.scale,a.originPoint=i.originPoint,a.origin=i.origin}function Xv(a,i,l,o,u){return a-=i,a=hr(a,1/l,o),u!==void 0&&(a=hr(a,1/u,o)),a}function n2(a,i=0,l=1,o=.5,u,h=a,f=a){if(Xn.test(i)&&(i=parseFloat(i),i=ge(f.min,f.max,i/100)-f.min),typeof i!="number")return;let p=ge(h.min,h.max,o);a===h&&(p-=i),a.min=Xv(a.min,i,l,p,u),a.max=Xv(a.max,i,l,p,u)}function Qv(a,i,[l,o,u],h,f){n2(a,i[l],i[o],i[u],i.scale,h,f)}const a2=["x","scaleX","originX"],s2=["y","scaleY","originY"];function Pv(a,i,l,o){Qv(a.x,i,a2,l?l.x:void 0,o?o.x:void 0),Qv(a.y,i,s2,l?l.y:void 0,o?o.y:void 0)}function Fv(a){return a.translate===0&&a.scale===1}function ly(a){return Fv(a.x)&&Fv(a.y)}function Jv(a,i){return a.min===i.min&&a.max===i.max}function i2(a,i){return Jv(a.x,i.x)&&Jv(a.y,i.y)}function $v(a,i){return Math.round(a.min)===Math.round(i.min)&&Math.round(a.max)===Math.round(i.max)}function oy(a,i){return $v(a.x,i.x)&&$v(a.y,i.y)}function Wv(a){return _n(a.x)/_n(a.y)}function tg(a,i){return a.translate===i.translate&&a.scale===i.scale&&a.originPoint===i.originPoint}class l2{constructor(){this.members=[]}add(i){zd(this.members,i),i.scheduleRender()}remove(i){if(Bd(this.members,i),i===this.prevLead&&(this.prevLead=void 0),i===this.lead){const l=this.members[this.members.length-1];l&&this.promote(l)}}relegate(i){const l=this.members.findIndex(u=>i===u);if(l===0)return!1;let o;for(let u=l;u>=0;u--){const h=this.members[u];if(h.isPresent!==!1){o=h;break}}return o?(this.promote(o),!0):!1}promote(i,l){const o=this.lead;if(i!==o&&(this.prevLead=o,this.lead=i,i.show(),o)){o.instance&&o.scheduleRender(),i.scheduleRender(),i.resumeFrom=o,l&&(i.resumeFrom.preserveOpacity=!0),o.snapshot&&(i.snapshot=o.snapshot,i.snapshot.latestValues=o.animationValues||o.latestValues),i.root&&i.root.isUpdating&&(i.isLayoutDirty=!0);const{crossfade:u}=i.options;u===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(i=>{const{options:l,resumingFrom:o}=i;l.onExitComplete&&l.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(i=>{i.instance&&i.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function o2(a,i,l){let o="";const u=a.x.translate/i.x,h=a.y.translate/i.y,f=(l==null?void 0:l.z)||0;if((u||h||f)&&(o=`translate3d(${u}px, ${h}px, ${f}px) `),(i.x!==1||i.y!==1)&&(o+=`scale(${1/i.x}, ${1/i.y}) `),l){const{transformPerspective:g,rotate:b,rotateX:S,rotateY:x,skewX:E,skewY:M}=l;g&&(o=`perspective(${g}px) ${o}`),b&&(o+=`rotate(${b}deg) `),S&&(o+=`rotateX(${S}deg) `),x&&(o+=`rotateY(${x}deg) `),E&&(o+=`skewX(${E}deg) `),M&&(o+=`skewY(${M}deg) `)}const p=a.x.scale*i.x,v=a.y.scale*i.y;return(p!==1||v!==1)&&(o+=`scale(${p}, ${v})`),o||"none"}const ys={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Sl=typeof window<"u"&&window.MotionDebug!==void 0,Hu=["","X","Y","Z"],r2={visibility:"hidden"},eg=1e3;let c2=0;function Iu(a,i,l,o){const{latestValues:u}=i;u[a]&&(l[a]=u[a],i.setStaticValue(a,0),o&&(o[a]=0))}function ry(a){if(a.hasCheckedOptimisedAppear=!0,a.root===a)return;const{visualElement:i}=a.options;if(!i)return;const l=d0(i);if(window.MotionHasOptimisedAnimation(l,"transform")){const{layout:u,layoutId:h}=a.options;window.MotionCancelOptimisedAnimation(l,"transform",ue,!(u||h))}const{parent:o}=a;o&&!o.hasCheckedOptimisedAppear&&ry(o)}function cy({attachResizeListener:a,defaultParent:i,measureScroll:l,checkIsScrollRoot:o,resetTransform:u}){return class{constructor(f={},p=i==null?void 0:i()){this.id=c2++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Sl&&(ys.totalNodes=ys.resolvedTargetDeltas=ys.recalculatedProjection=0),this.nodes.forEach(f2),this.nodes.forEach(g2),this.nodes.forEach(y2),this.nodes.forEach(h2),Sl&&window.MotionDebug.record(ys)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=f,this.root=p?p.root||p:this,this.path=p?[...p.path,p]:[],this.parent=p,this.depth=p?p.depth+1:0;for(let v=0;v<this.path.length;v++)this.path[v].shouldResetTransform=!0;this.root===this&&(this.nodes=new Fx)}addEventListener(f,p){return this.eventHandlers.has(f)||this.eventHandlers.set(f,new Ud),this.eventHandlers.get(f).add(p)}notifyListeners(f,...p){const v=this.eventHandlers.get(f);v&&v.notify(...p)}hasListeners(f){return this.eventHandlers.has(f)}mount(f,p=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Qx(f),this.instance=f;const{layoutId:v,layout:g,visualElement:b}=this.options;if(b&&!b.current&&b.mount(f),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),p&&(g||v)&&(this.isLayoutDirty=!0),a){let S;const x=()=>this.root.updateBlockedByResize=!1;a(f,()=>{this.root.updateBlockedByResize=!0,S&&S(),S=Jx(x,250),lr.hasAnimatedSinceResize&&(lr.hasAnimatedSinceResize=!1,this.nodes.forEach(ag))})}v&&this.root.registerSharedNode(v,this),this.options.animate!==!1&&b&&(v||g)&&this.addEventListener("didUpdate",({delta:S,hasLayoutChanged:x,hasRelativeTargetChanged:E,layout:M})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const R=this.options.transition||b.getDefaultTransition()||x2,{onLayoutAnimationStart:K,onLayoutAnimationComplete:O}=b.getProps(),P=!this.targetLayout||!oy(this.targetLayout,M)||E,Y=!x&&E;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||Y||x&&(P||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(S,Y);const et={...Od(R,"layout"),onPlay:K,onComplete:O};(b.shouldReduceMotion||this.options.layoutRoot)&&(et.delay=0,et.type=!1),this.startAnimation(et)}else x||ag(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=M})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const f=this.getStack();f&&f.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Xa(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(b2),this.animationId++)}getTransformTemplate(){const{visualElement:f}=this.options;return f&&f.getProps().transformTemplate}willUpdate(f=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ry(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let b=0;b<this.path.length;b++){const S=this.path[b];S.shouldResetTransform=!0,S.updateScroll("snapshot"),S.options.layoutRoot&&S.willUpdate(!1)}const{layoutId:p,layout:v}=this.options;if(p===void 0&&!v)return;const g=this.getTransformTemplate();this.prevTransformTemplateValue=g?g(this.latestValues,""):void 0,this.updateSnapshot(),f&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ng);return}this.isUpdating||this.nodes.forEach(p2),this.isUpdating=!1,this.nodes.forEach(v2),this.nodes.forEach(u2),this.nodes.forEach(d2),this.clearAllSnapshots();const p=Qn.now();Qe.delta=ga(0,1e3/60,p-Qe.timestamp),Qe.timestamp=p,Qe.isProcessing=!0,Ru.update.process(Qe),Ru.preRender.process(Qe),Ru.render.process(Qe),Qe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,jd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(m2),this.sharedNodes.forEach(S2)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ue.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ue.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let v=0;v<this.path.length;v++)this.path[v].updateScroll();const f=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Ne(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:p}=this.options;p&&p.notify("LayoutMeasure",this.layout.layoutBox,f?f.layoutBox:void 0)}updateScroll(f="measure"){let p=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===f&&(p=!1),p){const v=o(this.instance);this.scroll={animationId:this.root.animationId,phase:f,isRoot:v,offset:l(this.instance),wasRoot:this.scroll?this.scroll.isRoot:v}}}resetTransform(){if(!u)return;const f=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,p=this.projectionDelta&&!ly(this.projectionDelta),v=this.getTransformTemplate(),g=v?v(this.latestValues,""):void 0,b=g!==this.prevTransformTemplateValue;f&&(p||gs(this.latestValues)||b)&&(u(this.instance,g),this.shouldResetTransform=!1,this.scheduleRender())}measure(f=!0){const p=this.measurePageBox();let v=this.removeElementScroll(p);return f&&(v=this.removeTransform(v)),j2(v),{animationId:this.root.animationId,measuredBox:p,layoutBox:v,latestValues:{},source:this.id}}measurePageBox(){var f;const{visualElement:p}=this.options;if(!p)return Ne();const v=p.measureViewportBox();if(!(((f=this.scroll)===null||f===void 0?void 0:f.wasRoot)||this.path.some(A2))){const{scroll:b}=this.root;b&&(hi(v.x,b.offset.x),hi(v.y,b.offset.y))}return v}removeElementScroll(f){var p;const v=Ne();if(Mn(v,f),!((p=this.scroll)===null||p===void 0)&&p.wasRoot)return v;for(let g=0;g<this.path.length;g++){const b=this.path[g],{scroll:S,options:x}=b;b!==this.root&&S&&x.layoutScroll&&(S.wasRoot&&Mn(v,f),hi(v.x,S.offset.x),hi(v.y,S.offset.y))}return v}applyTransform(f,p=!1){const v=Ne();Mn(v,f);for(let g=0;g<this.path.length;g++){const b=this.path[g];!p&&b.options.layoutScroll&&b.scroll&&b!==b.root&&mi(v,{x:-b.scroll.offset.x,y:-b.scroll.offset.y}),gs(b.latestValues)&&mi(v,b.latestValues)}return gs(this.latestValues)&&mi(v,this.latestValues),v}removeTransform(f){const p=Ne();Mn(p,f);for(let v=0;v<this.path.length;v++){const g=this.path[v];if(!g.instance||!gs(g.latestValues))continue;od(g.latestValues)&&g.updateSnapshot();const b=Ne(),S=g.measurePageBox();Mn(b,S),Pv(p,g.latestValues,g.snapshot?g.snapshot.layoutBox:void 0,b)}return gs(this.latestValues)&&Pv(p,this.latestValues),p}setTargetDelta(f){this.targetDelta=f,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(f){this.options={...this.options,...f,crossfade:f.crossfade!==void 0?f.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Qe.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(f=!1){var p;const v=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=v.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=v.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=v.isSharedProjectionDirty);const g=!!this.resumingFrom||this!==v;if(!(f||g&&this.isSharedProjectionDirty||this.isProjectionDirty||!((p=this.parent)===null||p===void 0)&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:S,layoutId:x}=this.options;if(!(!this.layout||!(S||x))){if(this.resolvedRelativeTargetAt=Qe.timestamp,!this.targetDelta&&!this.relativeTarget){const E=this.getClosestProjectingParent();E&&E.layout&&this.animationProgress!==1?(this.relativeParent=E,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ne(),this.relativeTargetOrigin=Ne(),Nl(this.relativeTargetOrigin,this.layout.layoutBox,E.layout.layoutBox),Mn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Ne(),this.targetWithTransforms=Ne()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Cx(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Mn(this.target,this.layout.layoutBox),ty(this.target,this.targetDelta)):Mn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const E=this.getClosestProjectingParent();E&&!!E.resumingFrom==!!this.resumingFrom&&!E.options.layoutScroll&&E.target&&this.animationProgress!==1?(this.relativeParent=E,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ne(),this.relativeTargetOrigin=Ne(),Nl(this.relativeTargetOrigin,this.target,E.target),Mn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Sl&&ys.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||od(this.parent.latestValues)||W0(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var f;const p=this.getLead(),v=!!this.resumingFrom||this!==p;let g=!0;if((this.isProjectionDirty||!((f=this.parent)===null||f===void 0)&&f.isProjectionDirty)&&(g=!1),v&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(g=!1),this.resolvedRelativeTargetAt===Qe.timestamp&&(g=!1),g)return;const{layout:b,layoutId:S}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(b||S))return;Mn(this.layoutCorrected,this.layout.layoutBox);const x=this.treeScale.x,E=this.treeScale.y;Ux(this.layoutCorrected,this.treeScale,this.path,v),p.layout&&!p.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(p.target=p.layout.layoutBox,p.targetWithTransforms=Ne());const{target:M}=p;if(!M){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Kv(this.prevProjectionDelta.x,this.projectionDelta.x),Kv(this.prevProjectionDelta.y,this.projectionDelta.y)),Al(this.projectionDelta,this.layoutCorrected,M,this.latestValues),(this.treeScale.x!==x||this.treeScale.y!==E||!tg(this.projectionDelta.x,this.prevProjectionDelta.x)||!tg(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",M)),Sl&&ys.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(f=!0){var p;if((p=this.options.visualElement)===null||p===void 0||p.scheduleRender(),f){const v=this.getStack();v&&v.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=fi(),this.projectionDelta=fi(),this.projectionDeltaWithTransform=fi()}setAnimationOrigin(f,p=!1){const v=this.snapshot,g=v?v.latestValues:{},b={...this.latestValues},S=fi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!p;const x=Ne(),E=v?v.source:void 0,M=this.layout?this.layout.source:void 0,R=E!==M,K=this.getStack(),O=!K||K.members.length<=1,P=!!(R&&!O&&this.options.crossfade===!0&&!this.path.some(T2));this.animationProgress=0;let Y;this.mixTargetDelta=et=>{const X=et/1e3;sg(S.x,f.x,X),sg(S.y,f.y,X),this.setTargetDelta(S),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Nl(x,this.layout.layoutBox,this.relativeParent.layout.layoutBox),_2(this.relativeTarget,this.relativeTargetOrigin,x,X),Y&&i2(this.relativeTarget,Y)&&(this.isProjectionDirty=!1),Y||(Y=Ne()),Mn(Y,this.relativeTarget)),R&&(this.animationValues=b,Wx(b,g,this.latestValues,X,P,O)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=X},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(f){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Xa(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ue.update(()=>{lr.hasAnimatedSinceResize=!0,this.currentAnimation=Xx(0,eg,{...f,onUpdate:p=>{this.mixTargetDelta(p),f.onUpdate&&f.onUpdate(p)},onComplete:()=>{f.onComplete&&f.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const f=this.getStack();f&&f.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(eg),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const f=this.getLead();let{targetWithTransforms:p,target:v,layout:g,latestValues:b}=f;if(!(!p||!v||!g)){if(this!==f&&this.layout&&g&&uy(this.options.animationType,this.layout.layoutBox,g.layoutBox)){v=this.target||Ne();const S=_n(this.layout.layoutBox.x);v.x.min=f.target.x.min,v.x.max=v.x.min+S;const x=_n(this.layout.layoutBox.y);v.y.min=f.target.y.min,v.y.max=v.y.min+x}Mn(p,v),mi(p,b),Al(this.projectionDeltaWithTransform,this.layoutCorrected,p,b)}}registerSharedNode(f,p){this.sharedNodes.has(f)||this.sharedNodes.set(f,new l2),this.sharedNodes.get(f).add(p);const g=p.options.initialPromotionConfig;p.promote({transition:g?g.transition:void 0,preserveFollowOpacity:g&&g.shouldPreserveFollowOpacity?g.shouldPreserveFollowOpacity(p):void 0})}isLead(){const f=this.getStack();return f?f.lead===this:!0}getLead(){var f;const{layoutId:p}=this.options;return p?((f=this.getStack())===null||f===void 0?void 0:f.lead)||this:this}getPrevLead(){var f;const{layoutId:p}=this.options;return p?(f=this.getStack())===null||f===void 0?void 0:f.prevLead:void 0}getStack(){const{layoutId:f}=this.options;if(f)return this.root.sharedNodes.get(f)}promote({needsReset:f,transition:p,preserveFollowOpacity:v}={}){const g=this.getStack();g&&g.promote(this,v),f&&(this.projectionDelta=void 0,this.needsReset=!0),p&&this.setOptions({transition:p})}relegate(){const f=this.getStack();return f?f.relegate(this):!1}resetSkewAndRotation(){const{visualElement:f}=this.options;if(!f)return;let p=!1;const{latestValues:v}=f;if((v.z||v.rotate||v.rotateX||v.rotateY||v.rotateZ||v.skewX||v.skewY)&&(p=!0),!p)return;const g={};v.z&&Iu("z",f,g,this.animationValues);for(let b=0;b<Hu.length;b++)Iu(`rotate${Hu[b]}`,f,g,this.animationValues),Iu(`skew${Hu[b]}`,f,g,this.animationValues);f.render();for(const b in g)f.setStaticValue(b,g[b]),this.animationValues&&(this.animationValues[b]=g[b]);f.scheduleRender()}getProjectionStyles(f){var p,v;if(!this.instance||this.isSVG)return;if(!this.isVisible)return r2;const g={visibility:""},b=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,g.opacity="",g.pointerEvents=sr(f==null?void 0:f.pointerEvents)||"",g.transform=b?b(this.latestValues,""):"none",g;const S=this.getLead();if(!this.projectionDelta||!this.layout||!S.target){const R={};return this.options.layoutId&&(R.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,R.pointerEvents=sr(f==null?void 0:f.pointerEvents)||""),this.hasProjected&&!gs(this.latestValues)&&(R.transform=b?b({},""):"none",this.hasProjected=!1),R}const x=S.animationValues||S.latestValues;this.applyTransformsToTarget(),g.transform=o2(this.projectionDeltaWithTransform,this.treeScale,x),b&&(g.transform=b(x,g.transform));const{x:E,y:M}=this.projectionDelta;g.transformOrigin=`${E.origin*100}% ${M.origin*100}% 0`,S.animationValues?g.opacity=S===this?(v=(p=x.opacity)!==null&&p!==void 0?p:this.latestValues.opacity)!==null&&v!==void 0?v:1:this.preserveOpacity?this.latestValues.opacity:x.opacityExit:g.opacity=S===this?x.opacity!==void 0?x.opacity:"":x.opacityExit!==void 0?x.opacityExit:0;for(const R in rr){if(x[R]===void 0)continue;const{correct:K,applyTo:O}=rr[R],P=g.transform==="none"?x[R]:K(x[R],S);if(O){const Y=O.length;for(let et=0;et<Y;et++)g[O[et]]=P}else g[R]=P}return this.options.layoutId&&(g.pointerEvents=S===this?sr(f==null?void 0:f.pointerEvents)||"":"none"),g}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(f=>{var p;return(p=f.currentAnimation)===null||p===void 0?void 0:p.stop()}),this.root.nodes.forEach(ng),this.root.sharedNodes.clear()}}}function u2(a){a.updateLayout()}function d2(a){var i;const l=((i=a.resumeFrom)===null||i===void 0?void 0:i.snapshot)||a.snapshot;if(a.isLead()&&a.layout&&l&&a.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:u}=a.layout,{animationType:h}=a.options,f=l.source!==a.layout.source;h==="size"?Rn(S=>{const x=f?l.measuredBox[S]:l.layoutBox[S],E=_n(x);x.min=o[S].min,x.max=x.min+E}):uy(h,l.layoutBox,o)&&Rn(S=>{const x=f?l.measuredBox[S]:l.layoutBox[S],E=_n(o[S]);x.max=x.min+E,a.relativeTarget&&!a.currentAnimation&&(a.isProjectionDirty=!0,a.relativeTarget[S].max=a.relativeTarget[S].min+E)});const p=fi();Al(p,o,l.layoutBox);const v=fi();f?Al(v,a.applyTransform(u,!0),l.measuredBox):Al(v,o,l.layoutBox);const g=!ly(p);let b=!1;if(!a.resumeFrom){const S=a.getClosestProjectingParent();if(S&&!S.resumeFrom){const{snapshot:x,layout:E}=S;if(x&&E){const M=Ne();Nl(M,l.layoutBox,x.layoutBox);const R=Ne();Nl(R,o,E.layoutBox),oy(M,R)||(b=!0),S.options.layoutRoot&&(a.relativeTarget=R,a.relativeTargetOrigin=M,a.relativeParent=S)}}}a.notifyListeners("didUpdate",{layout:o,snapshot:l,delta:v,layoutDelta:p,hasLayoutChanged:g,hasRelativeTargetChanged:b})}else if(a.isLead()){const{onExitComplete:o}=a.options;o&&o()}a.options.transition=void 0}function f2(a){Sl&&ys.totalNodes++,a.parent&&(a.isProjecting()||(a.isProjectionDirty=a.parent.isProjectionDirty),a.isSharedProjectionDirty||(a.isSharedProjectionDirty=!!(a.isProjectionDirty||a.parent.isProjectionDirty||a.parent.isSharedProjectionDirty)),a.isTransformDirty||(a.isTransformDirty=a.parent.isTransformDirty))}function h2(a){a.isProjectionDirty=a.isSharedProjectionDirty=a.isTransformDirty=!1}function m2(a){a.clearSnapshot()}function ng(a){a.clearMeasurements()}function p2(a){a.isLayoutDirty=!1}function v2(a){const{visualElement:i}=a.options;i&&i.getProps().onBeforeLayoutMeasure&&i.notify("BeforeLayoutMeasure"),a.resetTransform()}function ag(a){a.finishAnimation(),a.targetDelta=a.relativeTarget=a.target=void 0,a.isProjectionDirty=!0}function g2(a){a.resolveTargetDelta()}function y2(a){a.calcProjection()}function b2(a){a.resetSkewAndRotation()}function S2(a){a.removeLeadSnapshot()}function sg(a,i,l){a.translate=ge(i.translate,0,l),a.scale=ge(i.scale,1,l),a.origin=i.origin,a.originPoint=i.originPoint}function ig(a,i,l,o){a.min=ge(i.min,l.min,o),a.max=ge(i.max,l.max,o)}function _2(a,i,l,o){ig(a.x,i.x,l.x,o),ig(a.y,i.y,l.y,o)}function T2(a){return a.animationValues&&a.animationValues.opacityExit!==void 0}const x2={duration:.45,ease:[.4,0,.1,1]},lg=a=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(a),og=lg("applewebkit/")&&!lg("chrome/")?Math.round:Sn;function rg(a){a.min=og(a.min),a.max=og(a.max)}function j2(a){rg(a.x),rg(a.y)}function uy(a,i,l){return a==="position"||a==="preserve-aspect"&&!Ex(Wv(i),Wv(l),.2)}function A2(a){var i;return a!==a.root&&((i=a.scroll)===null||i===void 0?void 0:i.wasRoot)}const N2=cy({attachResizeListener:(a,i)=>wl(a,"resize",i),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Gu={current:void 0},dy=cy({measureScroll:a=>({x:a.scrollLeft,y:a.scrollTop}),defaultParent:()=>{if(!Gu.current){const a=new N2({});a.mount(window),a.setOptions({layoutScroll:!0}),Gu.current=a}return Gu.current},resetTransform:(a,i)=>{a.style.transform=i!==void 0?i:"none"},checkIsScrollRoot:a=>window.getComputedStyle(a).position==="fixed"}),E2={pan:{Feature:Gx},drag:{Feature:Ix,ProjectionNode:dy,MeasureLayout:ay}};function C2(a,i,l){var o;if(a instanceof Element)return[a];if(typeof a=="string"){let u=document;const h=(o=void 0)!==null&&o!==void 0?o:u.querySelectorAll(a);return h?Array.from(h):[]}return Array.from(a)}function fy(a,i){const l=C2(a),o=new AbortController,u={passive:!0,...i,signal:o.signal};return[l,u,()=>o.abort()]}function cg(a){return i=>{i.pointerType==="touch"||X0()||a(i)}}function D2(a,i,l={}){const[o,u,h]=fy(a,l),f=cg(p=>{const{target:v}=p,g=i(p);if(typeof g!="function"||!v)return;const b=cg(S=>{g(S),v.removeEventListener("pointerleave",b)});v.addEventListener("pointerleave",b,u)});return o.forEach(p=>{p.addEventListener("pointerenter",f,u)}),h}function ug(a,i,l){const{props:o}=a;a.animationState&&o.whileHover&&a.animationState.setActive("whileHover",l==="Start");const u="onHover"+l,h=o[u];h&&ue.postRender(()=>h(i,zl(i)))}class k2 extends Pa{mount(){const{current:i}=this.node;i&&(this.unmount=D2(i,l=>(ug(this.node,l,"Start"),o=>ug(this.node,o,"End"))))}unmount(){}}class w2 extends Pa{constructor(){super(...arguments),this.isActive=!1}onFocus(){let i=!1;try{i=this.node.current.matches(":focus-visible")}catch{i=!0}!i||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ol(wl(this.node.current,"focus",()=>this.onFocus()),wl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const hy=(a,i)=>i?a===i?!0:hy(a,i.parentElement):!1,M2=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function R2(a){return M2.has(a.tagName)||a.tabIndex!==-1}const _l=new WeakSet;function dg(a){return i=>{i.key==="Enter"&&a(i)}}function Yu(a,i){a.dispatchEvent(new PointerEvent("pointer"+i,{isPrimary:!0,bubbles:!0}))}const O2=(a,i)=>{const l=a.currentTarget;if(!l)return;const o=dg(()=>{if(_l.has(l))return;Yu(l,"down");const u=dg(()=>{Yu(l,"up")}),h=()=>Yu(l,"cancel");l.addEventListener("keyup",u,i),l.addEventListener("blur",h,i)});l.addEventListener("keydown",o,i),l.addEventListener("blur",()=>l.removeEventListener("keydown",o),i)};function fg(a){return Fd(a)&&!X0()}function z2(a,i,l={}){const[o,u,h]=fy(a,l),f=p=>{const v=p.currentTarget;if(!fg(p)||_l.has(v))return;_l.add(v);const g=i(p),b=(E,M)=>{window.removeEventListener("pointerup",S),window.removeEventListener("pointercancel",x),!(!fg(E)||!_l.has(v))&&(_l.delete(v),typeof g=="function"&&g(E,{success:M}))},S=E=>{b(E,l.useGlobalTarget||hy(v,E.target))},x=E=>{b(E,!1)};window.addEventListener("pointerup",S,u),window.addEventListener("pointercancel",x,u)};return o.forEach(p=>{!R2(p)&&p.getAttribute("tabindex")===null&&(p.tabIndex=0),(l.useGlobalTarget?window:p).addEventListener("pointerdown",f,u),p.addEventListener("focus",g=>O2(g,u),u)}),h}function hg(a,i,l){const{props:o}=a;a.animationState&&o.whileTap&&a.animationState.setActive("whileTap",l==="Start");const u="onTap"+(l==="End"?"":l),h=o[u];h&&ue.postRender(()=>h(i,zl(i)))}class B2 extends Pa{mount(){const{current:i}=this.node;i&&(this.unmount=z2(i,l=>(hg(this.node,l,"Start"),(o,{success:u})=>hg(this.node,o,u?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const cd=new WeakMap,Zu=new WeakMap,U2=a=>{const i=cd.get(a.target);i&&i(a)},V2=a=>{a.forEach(U2)};function L2({root:a,...i}){const l=a||document;Zu.has(l)||Zu.set(l,{});const o=Zu.get(l),u=JSON.stringify(i);return o[u]||(o[u]=new IntersectionObserver(V2,{root:a,...i})),o[u]}function q2(a,i,l){const o=L2(i);return cd.set(a,l),o.observe(a),()=>{cd.delete(a),o.unobserve(a)}}const H2={some:0,all:1};class I2 extends Pa{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:i={}}=this.node.getProps(),{root:l,margin:o,amount:u="some",once:h}=i,f={root:l?l.current:void 0,rootMargin:o,threshold:typeof u=="number"?u:H2[u]},p=v=>{const{isIntersecting:g}=v;if(this.isInView===g||(this.isInView=g,h&&!g&&this.hasEnteredView))return;g&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",g);const{onViewportEnter:b,onViewportLeave:S}=this.node.getProps(),x=g?b:S;x&&x(v)};return q2(this.node.current,f,p)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:i,prevProps:l}=this.node;["amount","margin","root"].some(G2(i,l))&&this.startObserver()}unmount(){}}function G2({viewport:a={}},{viewport:i={}}={}){return l=>a[l]!==i[l]}const Y2={inView:{Feature:I2},tap:{Feature:B2},focus:{Feature:w2},hover:{Feature:k2}},Z2={layout:{ProjectionNode:dy,MeasureLayout:ay}},ud={current:null},my={current:!1};function K2(){if(my.current=!0,!!Sd)if(window.matchMedia){const a=window.matchMedia("(prefers-reduced-motion)"),i=()=>ud.current=a.matches;a.addListener(i),i()}else ud.current=!1}const X2=[...z0,Pe,Qa],Q2=a=>X2.find(O0(a)),mg=new WeakMap;function P2(a,i,l){for(const o in i){const u=i[o],h=l[o];if(Fe(u))a.addValue(o,u);else if(Fe(h))a.addValue(o,Dl(u,{owner:a}));else if(h!==u)if(a.hasValue(o)){const f=a.getValue(o);f.liveStyle===!0?f.jump(u):f.hasAnimated||f.set(u)}else{const f=a.getStaticValue(o);a.addValue(o,Dl(f!==void 0?f:u,{owner:a}))}}for(const o in l)i[o]===void 0&&a.removeValue(o);return i}const pg=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class F2{scrapeMotionValuesFromProps(i,l,o){return{}}constructor({parent:i,props:l,presenceContext:o,reducedMotionConfig:u,blockInitialAnimation:h,visualState:f},p={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Kd,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const E=Qn.now();this.renderScheduledAt<E&&(this.renderScheduledAt=E,ue.render(this.render,!1,!0))};const{latestValues:v,renderState:g,onUpdate:b}=f;this.onUpdate=b,this.latestValues=v,this.baseTarget={...v},this.initialValues=l.initial?{...v}:{},this.renderState=g,this.parent=i,this.props=l,this.presenceContext=o,this.depth=i?i.depth+1:0,this.reducedMotionConfig=u,this.options=p,this.blockInitialAnimation=!!h,this.isControllingVariants=Sr(l),this.isVariantNode=Xg(l),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(i&&i.current);const{willChange:S,...x}=this.scrapeMotionValuesFromProps(l,{},this);for(const E in x){const M=x[E];v[E]!==void 0&&Fe(M)&&M.set(v[E],!1)}}mount(i){this.current=i,mg.set(i,this),this.projection&&!this.projection.instance&&this.projection.mount(i),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((l,o)=>this.bindToMotionValue(o,l)),my.current||K2(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ud.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){mg.delete(this.current),this.projection&&this.projection.unmount(),Xa(this.notifyUpdate),Xa(this.render),this.valueSubscriptions.forEach(i=>i()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const i in this.events)this.events[i].clear();for(const i in this.features){const l=this.features[i];l&&(l.unmount(),l.isMounted=!1)}this.current=null}bindToMotionValue(i,l){this.valueSubscriptions.has(i)&&this.valueSubscriptions.get(i)();const o=_s.has(i),u=l.on("change",p=>{this.latestValues[i]=p,this.props.onUpdate&&ue.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0)}),h=l.on("renderRequest",this.scheduleRender);let f;window.MotionCheckAppearSync&&(f=window.MotionCheckAppearSync(this,i,l)),this.valueSubscriptions.set(i,()=>{u(),h(),f&&f(),l.owner&&l.stop()})}sortNodePosition(i){return!this.current||!this.sortInstanceNodePosition||this.type!==i.type?0:this.sortInstanceNodePosition(this.current,i.current)}updateFeatures(){let i="animation";for(i in pi){const l=pi[i];if(!l)continue;const{isEnabled:o,Feature:u}=l;if(!this.features[i]&&u&&o(this.props)&&(this.features[i]=new u(this)),this.features[i]){const h=this.features[i];h.isMounted?h.update():(h.mount(),h.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ne()}getStaticValue(i){return this.latestValues[i]}setStaticValue(i,l){this.latestValues[i]=l}update(i,l){(i.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=i,this.prevPresenceContext=this.presenceContext,this.presenceContext=l;for(let o=0;o<pg.length;o++){const u=pg[o];this.propEventSubscriptions[u]&&(this.propEventSubscriptions[u](),delete this.propEventSubscriptions[u]);const h="on"+u,f=i[h];f&&(this.propEventSubscriptions[u]=this.on(u,f))}this.prevMotionValues=P2(this,this.scrapeMotionValuesFromProps(i,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(i){return this.props.variants?this.props.variants[i]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(i){const l=this.getClosestVariantNode();if(l)return l.variantChildren&&l.variantChildren.add(i),()=>l.variantChildren.delete(i)}addValue(i,l){const o=this.values.get(i);l!==o&&(o&&this.removeValue(i),this.bindToMotionValue(i,l),this.values.set(i,l),this.latestValues[i]=l.get())}removeValue(i){this.values.delete(i);const l=this.valueSubscriptions.get(i);l&&(l(),this.valueSubscriptions.delete(i)),delete this.latestValues[i],this.removeValueFromRenderState(i,this.renderState)}hasValue(i){return this.values.has(i)}getValue(i,l){if(this.props.values&&this.props.values[i])return this.props.values[i];let o=this.values.get(i);return o===void 0&&l!==void 0&&(o=Dl(l===null?void 0:l,{owner:this}),this.addValue(i,o)),o}readValue(i,l){var o;let u=this.latestValues[i]!==void 0||!this.current?this.latestValues[i]:(o=this.getBaseTargetFromProps(this.props,i))!==null&&o!==void 0?o:this.readValueFromInstance(this.current,i,this.options);return u!=null&&(typeof u=="string"&&(M0(u)||x0(u))?u=parseFloat(u):!Q2(u)&&Qa.test(l)&&(u=D0(i,l)),this.setBaseTarget(i,Fe(u)?u.get():u)),Fe(u)?u.get():u}setBaseTarget(i,l){this.baseTarget[i]=l}getBaseTarget(i){var l;const{initial:o}=this.props;let u;if(typeof o=="string"||typeof o=="object"){const f=Nd(this.props,o,(l=this.presenceContext)===null||l===void 0?void 0:l.custom);f&&(u=f[i])}if(o&&u!==void 0)return u;const h=this.getBaseTargetFromProps(this.props,i);return h!==void 0&&!Fe(h)?h:this.initialValues[i]!==void 0&&u===void 0?void 0:this.baseTarget[i]}on(i,l){return this.events[i]||(this.events[i]=new Ud),this.events[i].add(l)}notify(i,...l){this.events[i]&&this.events[i].notify(...l)}}class py extends F2{constructor(){super(...arguments),this.KeyframeResolver=B0}sortInstanceNodePosition(i,l){return i.compareDocumentPosition(l)&2?1:-1}getBaseTargetFromProps(i,l){return i.style?i.style[l]:void 0}removeValueFromRenderState(i,{vars:l,style:o}){delete l[i],delete o[i]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:i}=this.props;Fe(i)&&(this.childSubscription=i.on("change",l=>{this.current&&(this.current.textContent=`${l}`)}))}}function J2(a){return window.getComputedStyle(a)}class $2 extends py{constructor(){super(...arguments),this.type="html",this.renderInstance=n0}readValueFromInstance(i,l){if(_s.has(l)){const o=Zd(l);return o&&o.default||0}else{const o=J2(i),u=(Wg(l)?o.getPropertyValue(l):o[l])||0;return typeof u=="string"?u.trim():u}}measureInstanceViewportBox(i,{transformPagePoint:l}){return ey(i,l)}build(i,l,o){Dd(i,l,o.transformTemplate)}scrapeMotionValuesFromProps(i,l,o){return Rd(i,l,o)}}class W2 extends py{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ne}getBaseTargetFromProps(i,l){return i[l]}readValueFromInstance(i,l){if(_s.has(l)){const o=Zd(l);return o&&o.default||0}return l=a0.has(l)?l:xd(l),i.getAttribute(l)}scrapeMotionValuesFromProps(i,l,o){return l0(i,l,o)}build(i,l,o){kd(i,l,this.isSVGTag,o.transformTemplate)}renderInstance(i,l,o,u){s0(i,l,o,u)}mount(i){this.isSVGTag=Md(i.tagName),super.mount(i)}}const tj=(a,i)=>Ad(a)?new W2(i):new $2(i,{allowProjection:a!==_.Fragment}),ej=N_({...gx,...Y2,...E2,...Z2},tj),Pn=HS(ej);var Te;(function(a){a[a.UNSPECIFIED=0]="UNSPECIFIED",a[a.TEXT=1]="TEXT",a[a.TOOL_USE=2]="TOOL_USE",a[a.TOOL_RESULT=3]="TOOL_RESULT",a[a.ERROR=4]="ERROR",a[a.STATUS=5]="STATUS",a[a.SYSTEM=6]="SYSTEM",a[a.FINDING=7]="FINDING",a[a.SUBTASK_CREATE=8]="SUBTASK_CREATE",a[a.USER_INPUT=9]="USER_INPUT"})(Te||(Te={}));var qe;(function(a){a[a.UNSPECIFIED=0]="UNSPECIFIED",a[a.PENDING=1]="PENDING",a[a.ASSIGNED=2]="ASSIGNED",a[a.IN_PROGRESS=3]="IN_PROGRESS",a[a.REVIEW=4]="REVIEW",a[a.DONE=5]="DONE",a[a.FAILED=6]="FAILED",a[a.WAITING_INPUT=7]="WAITING_INPUT"})(qe||(qe={}));var Za;(function(a){a[a.UNSPECIFIED=0]="UNSPECIFIED",a[a.ACTIVE=1]="ACTIVE",a[a.ARCHIVED=2]="ARCHIVED"})(Za||(Za={}));var Ka;(function(a){a[a.UNSPECIFIED=0]="UNSPECIFIED",a[a.OPEN=1]="OPEN",a[a.CLOSED=2]="CLOSED"})(Ka||(Ka={}));const nj=8;Object.assign(Object.create(null),{"":Te.UNSPECIFIED,text:Te.TEXT,tool_use:Te.TOOL_USE,tool_result:Te.TOOL_RESULT,error:Te.ERROR,status:Te.STATUS,system:Te.SYSTEM,finding:Te.FINDING,subtask_create:Te.SUBTASK_CREATE,user_input:Te.USER_INPUT});Te.UNSPECIFIED+"",Te.TEXT+"",Te.TOOL_USE+"",Te.TOOL_RESULT+"",Te.ERROR+"",Te.STATUS+"",Te.SYSTEM+"",Te.FINDING+"",Te.SUBTASK_CREATE+"",Te.USER_INPUT+"";Object.assign(Object.create(null),{"":qe.UNSPECIFIED,pending:qe.PENDING,assigned:qe.ASSIGNED,in_progress:qe.IN_PROGRESS,review:qe.REVIEW,done:qe.DONE,failed:qe.FAILED,waiting_input:qe.WAITING_INPUT});qe.UNSPECIFIED+"",qe.PENDING+"",qe.ASSIGNED+"",qe.IN_PROGRESS+"",qe.REVIEW+"",qe.DONE+"",qe.FAILED+"",qe.WAITING_INPUT+"";Object.assign(Object.create(null),{"":Za.UNSPECIFIED,active:Za.ACTIVE,archived:Za.ARCHIVED});Za.UNSPECIFIED+"",Za.ACTIVE+"",Za.ARCHIVED+"";Object.assign(Object.create(null),{"":Ka.UNSPECIFIED,open:Ka.OPEN,closed:Ka.CLOSED});Ka.UNSPECIFIED+"",Ka.OPEN+"",Ka.CLOSED+"";const aj="_breadcrumbs_1s6xc_1",sj="_list_1s6xc_11",ij="_item_1s6xc_21",lj="_separator_1s6xc_28",oj="_link_1s6xc_34",rj="_current_1s6xc_57",ci={breadcrumbs:aj,list:sj,item:ij,separator:lj,link:oj,current:rj},cj="›";function ps({segments:a,onNavigate:i}){return d.jsx("nav",{className:ci.breadcrumbs,"aria-label":"Breadcrumb","data-testid":"breadcrumbs",children:d.jsx("ol",{className:ci.list,children:a.map((l,o)=>{const u=o===a.length-1;return d.jsxs("li",{className:ci.item,children:[o>0&&d.jsx("span",{className:ci.separator,"aria-hidden":"true",children:cj}),l.viewMode&&!u?d.jsx("button",{className:ci.link,onClick:()=>i(l),title:l.label,children:l.label}):d.jsx("span",{className:ci.current,"aria-current":"page",title:l.label,children:l.label})]},o)})})})}function dd(){dd=function(u,h){return new l(u,void 0,h)};var a=RegExp.prototype,i=new WeakMap;function l(u,h,f){var p=new RegExp(u,h);return i.set(p,f||i.get(u)),mr(p,l.prototype)}function o(u,h){var f=i.get(h);return Object.keys(f).reduce(function(p,v){var g=f[v];if(typeof g=="number")p[v]=u[g];else{for(var b=0;u[g[b]]===void 0&&b+1<g.length;)b++;p[v]=u[g[b]]}return p},Object.create(null))}return(function(u,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(h&&h.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),Object.defineProperty(u,"prototype",{writable:!1}),h&&mr(u,h)})(l,RegExp),l.prototype.exec=function(u){var h=a.exec.call(this,u);if(h){h.groups=o(h,this);var f=h.indices;f&&(f.groups=o(f,this))}return h},l.prototype[Symbol.replace]=function(u,h){if(typeof h=="string"){var f=i.get(this);return a[Symbol.replace].call(this,u,h.replace(/\$<([^>]+)>/g,function(v,g){var b=f[g];return"$"+(Array.isArray(b)?b.join("$"):b)}))}if(typeof h=="function"){var p=this;return a[Symbol.replace].call(this,u,function(){var v=arguments;return typeof v[v.length-1]!="object"&&(v=[].slice.call(v)).push(o(v,p)),h.apply(this,v)})}return a[Symbol.replace].call(this,u,h)},dd.apply(this,arguments)}function mr(a,i){return mr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,o){return l.__proto__=o,l},mr(a,i)}function vg(a,i){(i==null||i>a.length)&&(i=a.length);for(var l=0,o=new Array(i);l<i;l++)o[l]=a[l];return o}function Ku(a,i){var l=typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(l)return(l=l.call(a)).next.bind(l);if(Array.isArray(a)||(l=(function(u,h){if(u){if(typeof u=="string")return vg(u,h);var f=Object.prototype.toString.call(u).slice(8,-1);return f==="Object"&&u.constructor&&(f=u.constructor.name),f==="Map"||f==="Set"?Array.from(u):f==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f)?vg(u,h):void 0}})(a))||i){l&&(a=l);var o=0;return function(){return o>=a.length?{done:!0}:{done:!1,value:a[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
76
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var uj=(function(a){return function(i){return i===void 0&&(i={}),(function(o,u){if(u&&!o.registered(u))throw new Error('The default language "'+u+'" is not registered with refractor.')})(a,i.defaultLanguage),function(o){Rb(o,"element",l)};function l(o,u,h){var f,p;if(h&&h.tagName==="pre"&&o.tagName==="code"){var v=(o==null||(f=o.data)==null?void 0:f.meta)||(o==null||(p=o.properties)==null?void 0:p.metastring)||"";o.properties.className?typeof o.properties.className=="boolean"?o.properties.className=[]:Array.isArray(o.properties.className)||(o.properties.className=[o.properties.className]):o.properties.className=[];var g,b,S=(function(X){for(var L,tt=Ku(X.properties.className);!(L=tt()).done;){var U=L.value;if(U.slice(0,9)==="language-")return U.slice(9).toLowerCase()}return null})(o);if(!S&&i.defaultLanguage&&o.properties.className.push("language-"+(S=i.defaultLanguage)),o.properties.className.push("code-highlight"),S)try{var x,E;E=(x=S)!=null&&x.includes("diff-")?S.split("-")[1]:S,g=a.highlight(Fo(o),E),h.properties.className=(h.properties.className||[]).concat("language-"+E)}catch(X){if(!i.ignoreMissing||!/Unknown language/.test(X.message))throw X;g=o}else g=o;g.children=(b=1,function X(L){return L.reduce(function(tt,U){if(U.type==="text"){var nt=U.value,at=(nt.match(/\n/g)||"").length;if(at===0)U.position={start:{line:b,column:1},end:{line:b,column:1}},tt.push(U);else for(var mt,Dt=nt.split(`
77
- `),$=Ku(Dt.entries());!(mt=$()).done;){var st=mt.value,_t=st[0],B=st[1];tt.push({type:"text",value:_t===Dt.length-1?B:B+`
78
- `,position:{start:{line:b+_t,column:1},end:{line:b+_t,column:1}}})}return b+=at,tt}if(Object.prototype.hasOwnProperty.call(U,"children")){var Q=b;return U.children=X(U.children),tt.push(U),U.position={start:{line:Q,column:1},end:{line:b,column:1}},tt}return tt.push(U),tt},[])})(g.children),g.position=g.children.length>0?{start:{line:g.children[0].position.start.line,column:0},end:{line:g.children[g.children.length-1].position.end.line,column:0}}:{start:{line:0,column:0},end:{line:0,column:0}};for(var M,R=(function(X){var L=/{([\d,-]+)}/,tt=X.split(",").map(function(at){return at.trim()}).join();if(L.test(tt)){var U=L.exec(tt)[1],nt=zb(U);return function(at){return nt.includes(at+1)}}return function(){return!1}})(v),K=(function(X){var L=dd(/showLineNumbers=(\d+)/i,{lines:1});if(L.test(X)){var tt=L.exec(X);return Number(tt.groups.lines)}return 1})(v),O=(function(X){for(var L=new Array(X),tt=0;tt<X;tt++)L[tt]={type:"element",tagName:"span",properties:{className:[]},children:[]};return L})(g.position.end.line),P=["showlinenumbers=false",'showlinenumbers="false"',"showlinenumbers={false}"],Y=function(){var X,L,tt=M.value,U=tt[0],nt=tt[1];nt.properties.className=["code-line"];var at=Bb(g,function(mt){return mt.position.start.line<=U+1&&mt.position.end.line>=U+1});nt.children=at.children,(v.toLowerCase().includes("showLineNumbers".toLowerCase())||i.showLineNumbers===!0||typeof i.showLineNumbers=="object"&&i.showLineNumbers.includes(S))&&!P.some(function(mt){return v.toLowerCase().includes(mt)})&&(nt.properties.line=[(U+K).toString()],nt.properties.className.push("line-number")),R(U)&&nt.properties.className.push("highlight-line"),(S==="diff"||(X=S)!=null&&X.includes("diff-"))&&Fo(nt).substring(0,1)==="-"?nt.properties.className.push("deleted"):(S==="diff"||(L=S)!=null&&L.includes("diff-"))&&Fo(nt).substring(0,1)==="+"&&nt.properties.className.push("inserted")},et=Ku(O.entries());!(M=et()).done;)Y();O.length>0&&Fo(O[O.length-1]).trim()===""&&O.pop(),o.children=O}}}})(Ob);const dj="_systemEvent_1iozp_1",fj="_systemTimestamp_1iozp_9",hj="_textEvent_1iozp_13",mj="_toolUseEvent_1iozp_100",pj="_toolUseHeader_1iozp_116",vj="_toolUsePrefix_1iozp_123",gj="_toolUseName_1iozp_128",yj="_toolUseArgs_1iozp_133",bj="_toolResultEvent_1iozp_144",Sj="_toolResultHeader_1iozp_150",_j="_toolResultIndicatorOk_1iozp_174",Tj="_toolResultIndicatorError_1iozp_181",xj="_toolResultLabel_1iozp_188",jj="_toolResultToggle_1iozp_192",Aj="_toolResultCommand_1iozp_198",Nj="_toolResultEllipsis_1iozp_208",Ej="_toolResultPre_1iozp_212",Cj="_errorEvent_1iozp_227",Dj="_statusEvent_1iozp_236",kj="_userInputEvent_1iozp_246",wj="_userInputContent_1iozp_253",Mj="_defaultEvent_1iozp_265",ve={systemEvent:dj,systemTimestamp:fj,textEvent:hj,toolUseEvent:mj,toolUseHeader:pj,toolUsePrefix:vj,toolUseName:gj,toolUseArgs:yj,toolResultEvent:bj,toolResultHeader:Sj,toolResultIndicatorOk:_j,toolResultIndicatorError:Tj,toolResultLabel:xj,toolResultToggle:jj,toolResultCommand:Aj,toolResultEllipsis:Nj,toolResultPre:Ej,errorEvent:Cj,statusEvent:Dj,userInputEvent:kj,userInputContent:wj,defaultEvent:Mj};function Rj({time:a,content:i}){return d.jsxs("div",{className:ve.systemEvent,children:[d.jsxs("span",{className:ve.systemTimestamp,children:["[",a,"]"]})," ",i]})}function Oj({content:a}){return d.jsx("div",{className:ve.textEvent,children:d.jsx(fd,{remarkPlugins:[hd],rehypePlugins:[uj],children:a})})}function zj({content:a}){let i="",l=a;try{const o=JSON.parse(a);i=o.tool||"",l=JSON.stringify(o.args,null,2)??""}catch{}return d.jsxs("div",{className:ve.toolUseEvent,children:[d.jsxs("div",{className:ve.toolUseHeader,children:[d.jsx("span",{className:ve.toolUsePrefix,children:">"}),i?d.jsx("span",{className:ve.toolUseName,children:i}):null]}),d.jsx("pre",{className:ve.toolUseArgs,children:l})]})}const gg=5;function Bj(a,i){if(i==null)return"";if(typeof i!="object")return String(i);const l=i;if(typeof l.command=="string")return l.command;if(typeof l.file_path=="string")return l.file_path;if(typeof l.pattern=="string"){const o=typeof l.path=="string"?` in ${l.path}`:"";return`${l.pattern}${o}`}if(typeof l.path=="string")return l.path;if(typeof l.query=="string")return l.query;try{const o=JSON.stringify(i);return o.length>150?`${o.slice(0,150)}…`:o}catch{return""}}function Uj({content:a,raw:i,toolUseCtx:l}){const[o,u]=_.useState(!1);let h=!1;if(i)try{h=JSON.parse(i).is_error===!0}catch{}const f=a.split(`
75
+ `),()=>{document.head.removeChild(b)}},[i]),d.jsx(k_,{isPresent:i,childRef:o,sizeRef:u,children:S.cloneElement(a,{ref:o})})}const M_=({children:a,initial:i,isPresent:l,onExitComplete:o,custom:u,presenceAffectsLayout:h,mode:f})=>{const p=yd(R_),v=S.useId(),g=S.useCallback(_=>{p.set(_,!0);for(const x of p.values())if(!x)return;o&&o()},[p,o]),b=S.useMemo(()=>({id:v,initial:i,isPresent:l,custom:u,onExitComplete:g,register:_=>(p.set(_,!1),()=>p.delete(_))}),h?[Math.random(),g]:[l,g]);return S.useMemo(()=>{p.forEach((_,x)=>p.set(x,!1))},[l]),S.useEffect(()=>{!l&&!p.size&&o&&o()},[l]),f==="popLayout"&&(a=d.jsx(w_,{isPresent:l,children:a})),d.jsx(gr.Provider,{value:b,children:a})};function R_(){return new Map}function Hg(a=!0){const i=S.useContext(gr);if(i===null)return[!0,null];const{isPresent:l,onExitComplete:o,register:u}=i,h=S.useId();S.useEffect(()=>{a&&u(h)},[a]);const f=S.useCallback(()=>a&&o&&o(h),[h,o,a]);return!l&&o?[!1,f]:[!0]}const Jo=a=>a.key||"";function ev(a){const i=[];return S.Children.forEach(a,l=>{S.isValidElement(l)&&i.push(l)}),i}const _d=typeof window<"u",Ig=_d?S.useLayoutEffect:S.useEffect,yi=({children:a,custom:i,initial:l=!0,onExitComplete:o,presenceAffectsLayout:u=!0,mode:h="sync",propagate:f=!1})=>{const[p,v]=Hg(f),g=S.useMemo(()=>ev(a),[a]),b=f&&!p?[]:g.map(Jo),_=S.useRef(!0),x=S.useRef(g),E=yd(()=>new Map),[M,R]=S.useState(g),[K,O]=S.useState(g);Ig(()=>{_.current=!1,x.current=g;for(let et=0;et<K.length;et++){const X=Jo(K[et]);b.includes(X)?E.delete(X):E.get(X)!==!0&&E.set(X,!1)}},[K,b.length,b.join("-")]);const P=[];if(g!==M){let et=[...g];for(let X=0;X<K.length;X++){const L=K[X],tt=Jo(L);b.includes(tt)||(et.splice(X,0,L),P.push(L))}h==="wait"&&P.length&&(et=P),O(ev(et)),R(g);return}const{forceRender:Y}=S.useContext(gd);return d.jsx(d.Fragment,{children:K.map(et=>{const X=Jo(et),L=f&&!p?!1:g===K||b.includes(X),tt=()=>{if(E.has(X))E.set(X,!0);else return;let U=!0;E.forEach(nt=>{nt||(U=!1)}),U&&(Y==null||Y(),O(x.current),f&&(v==null||v()),o&&o())};return d.jsx(M_,{isPresent:L,initial:!_.current||l?void 0:!1,custom:L?void 0:i,presenceAffectsLayout:u,mode:h,onExitComplete:L?void 0:tt,children:et},X)})})},_n=a=>a;let Gg=_n;const O_={useManualTiming:!1};function z_(a){let i=new Set,l=new Set,o=!1,u=!1;const h=new WeakSet;let f={delta:0,timestamp:0,isProcessing:!1};function p(g){h.has(g)&&(v.schedule(g),a()),g(f)}const v={schedule:(g,b=!1,_=!1)=>{const E=_&&o?i:l;return b&&h.add(g),E.has(g)||E.add(g),g},cancel:g=>{l.delete(g),h.delete(g)},process:g=>{if(f=g,o){u=!0;return}o=!0,[i,l]=[l,i],i.forEach(p),i.clear(),o=!1,u&&(u=!1,v.process(g))}};return v}const $o=["read","resolveKeyframes","update","preRender","render","postRender"],B_=40;function Yg(a,i){let l=!1,o=!0;const u={delta:0,timestamp:0,isProcessing:!1},h=()=>l=!0,f=$o.reduce((O,P)=>(O[P]=z_(h),O),{}),{read:p,resolveKeyframes:v,update:g,preRender:b,render:_,postRender:x}=f,E=()=>{const O=performance.now();l=!1,u.delta=o?1e3/60:Math.max(Math.min(O-u.timestamp,B_),1),u.timestamp=O,u.isProcessing=!0,p.process(u),v.process(u),g.process(u),b.process(u),_.process(u),x.process(u),u.isProcessing=!1,l&&i&&(o=!1,a(E))},M=()=>{l=!0,o=!0,u.isProcessing||a(E)};return{schedule:$o.reduce((O,P)=>{const Y=f[P];return O[P]=(et,X=!1,L=!1)=>(l||M(),Y.schedule(et,X,L)),O},{}),cancel:O=>{for(let P=0;P<$o.length;P++)f[$o[P]].cancel(O)},state:u,steps:f}}const{schedule:ue,cancel:Xa,state:Qe,steps:Ru}=Yg(typeof requestAnimationFrame<"u"?requestAnimationFrame:_n,!0),Zg=S.createContext({strict:!1}),nv={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},pi={};for(const a in nv)pi[a]={isEnabled:i=>nv[a].some(l=>!!i[l])};function U_(a){for(const i in a)pi[i]={...pi[i],...a[i]}}const V_=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function or(a){return a.startsWith("while")||a.startsWith("drag")&&a!=="draggable"||a.startsWith("layout")||a.startsWith("onTap")||a.startsWith("onPan")||a.startsWith("onLayout")||V_.has(a)}let Kg=a=>!or(a);function L_(a){a&&(Kg=i=>i.startsWith("on")?!or(i):a(i))}try{L_(require("@emotion/is-prop-valid").default)}catch{}function q_(a,i,l){const o={};for(const u in a)u==="values"&&typeof a.values=="object"||(Kg(u)||l===!0&&or(u)||!i&&!or(u)||a.draggable&&u.startsWith("onDrag"))&&(o[u]=a[u]);return o}function H_(a){if(typeof Proxy>"u")return a;const i=new Map,l=(...o)=>a(...o);return new Proxy(l,{get:(o,u)=>u==="create"?a:(i.has(u)||i.set(u,a(u)),i.get(u))})}const yr=S.createContext({});function El(a){return typeof a=="string"||Array.isArray(a)}function br(a){return a!==null&&typeof a=="object"&&typeof a.start=="function"}const Sd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Td=["initial",...Sd];function _r(a){return br(a.animate)||Td.some(i=>El(a[i]))}function Xg(a){return!!(_r(a)||a.variants)}function I_(a,i){if(_r(a)){const{initial:l,animate:o}=a;return{initial:l===!1||El(l)?l:void 0,animate:El(o)?o:void 0}}return a.inherit!==!1?i:{}}function G_(a){const{initial:i,animate:l}=I_(a,S.useContext(yr));return S.useMemo(()=>({initial:i,animate:l}),[av(i),av(l)])}function av(a){return Array.isArray(a)?a.join(" "):a}const Y_=Symbol.for("motionComponentSymbol");function ui(a){return a&&typeof a=="object"&&Object.prototype.hasOwnProperty.call(a,"current")}function Z_(a,i,l){return S.useCallback(o=>{o&&a.onMount&&a.onMount(o),i&&(o?i.mount(o):i.unmount()),l&&(typeof l=="function"?l(o):ui(l)&&(l.current=o))},[i])}const xd=a=>a.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),K_="framerAppearId",Qg="data-"+xd(K_),{schedule:jd}=Yg(queueMicrotask,!1),Pg=S.createContext({});function X_(a,i,l,o,u){var h,f;const{visualElement:p}=S.useContext(yr),v=S.useContext(Zg),g=S.useContext(gr),b=S.useContext(bd).reducedMotion,_=S.useRef(null);o=o||v.renderer,!_.current&&o&&(_.current=o(a,{visualState:i,parent:p,props:l,presenceContext:g,blockInitialAnimation:g?g.initial===!1:!1,reducedMotionConfig:b}));const x=_.current,E=S.useContext(Pg);x&&!x.projection&&u&&(x.type==="html"||x.type==="svg")&&Q_(_.current,l,u,E);const M=S.useRef(!1);S.useInsertionEffect(()=>{x&&M.current&&x.update(l,g)});const R=l[Qg],K=S.useRef(!!R&&!(!((h=window.MotionHandoffIsComplete)===null||h===void 0)&&h.call(window,R))&&((f=window.MotionHasOptimisedAnimation)===null||f===void 0?void 0:f.call(window,R)));return Ig(()=>{x&&(M.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),jd.render(x.render),K.current&&x.animationState&&x.animationState.animateChanges())}),S.useEffect(()=>{x&&(!K.current&&x.animationState&&x.animationState.animateChanges(),K.current&&(queueMicrotask(()=>{var O;(O=window.MotionHandoffMarkAsComplete)===null||O===void 0||O.call(window,R)}),K.current=!1))}),x}function Q_(a,i,l,o){const{layoutId:u,layout:h,drag:f,dragConstraints:p,layoutScroll:v,layoutRoot:g}=i;a.projection=new l(a.latestValues,i["data-framer-portal-id"]?void 0:Fg(a.parent)),a.projection.setOptions({layoutId:u,layout:h,alwaysMeasureLayout:!!f||p&&ui(p),visualElement:a,animationType:typeof h=="string"?h:"both",initialPromotionConfig:o,layoutScroll:v,layoutRoot:g})}function Fg(a){if(a)return a.options.allowProjection!==!1?a.projection:Fg(a.parent)}function P_({preloadedFeatures:a,createVisualElement:i,useRender:l,useVisualState:o,Component:u}){var h,f;a&&U_(a);function p(g,b){let _;const x={...S.useContext(bd),...g,layoutId:F_(g)},{isStatic:E}=x,M=G_(g),R=o(g,E);if(!E&&_d){J_();const K=$_(x);_=K.MeasureLayout,M.visualElement=X_(u,R,x,i,K.ProjectionNode)}return d.jsxs(yr.Provider,{value:M,children:[_&&M.visualElement?d.jsx(_,{visualElement:M.visualElement,...x}):null,l(u,g,Z_(R,M.visualElement,b),R,E,M.visualElement)]})}p.displayName=`motion.${typeof u=="string"?u:`create(${(f=(h=u.displayName)!==null&&h!==void 0?h:u.name)!==null&&f!==void 0?f:""})`}`;const v=S.forwardRef(p);return v[Y_]=u,v}function F_({layoutId:a}){const i=S.useContext(gd).id;return i&&a!==void 0?i+"-"+a:a}function J_(a,i){S.useContext(Zg).strict}function $_(a){const{drag:i,layout:l}=pi;if(!i&&!l)return{};const o={...i,...l};return{MeasureLayout:i!=null&&i.isEnabled(a)||l!=null&&l.isEnabled(a)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}const W_=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ad(a){return typeof a!="string"||a.includes("-")?!1:!!(W_.indexOf(a)>-1||/[A-Z]/u.test(a))}function sv(a){const i=[{},{}];return a==null||a.values.forEach((l,o)=>{i[0][o]=l.get(),i[1][o]=l.getVelocity()}),i}function Nd(a,i,l,o){if(typeof i=="function"){const[u,h]=sv(o);i=i(l!==void 0?l:a.custom,u,h)}if(typeof i=="string"&&(i=a.variants&&a.variants[i]),typeof i=="function"){const[u,h]=sv(o);i=i(l!==void 0?l:a.custom,u,h)}return i}const Pu=a=>Array.isArray(a),tS=a=>!!(a&&typeof a=="object"&&a.mix&&a.toValue),eS=a=>Pu(a)?a[a.length-1]||0:a,Fe=a=>!!(a&&a.getVelocity);function sr(a){const i=Fe(a)?a.get():a;return tS(i)?i.toValue():i}function nS({scrapeMotionValuesFromProps:a,createRenderState:i,onUpdate:l},o,u,h){const f={latestValues:aS(o,u,h,a),renderState:i()};return l&&(f.onMount=p=>l({props:o,current:p,...f}),f.onUpdate=p=>l(p)),f}const Jg=a=>(i,l)=>{const o=S.useContext(yr),u=S.useContext(gr),h=()=>nS(a,i,o,u);return l?h():yd(h)};function aS(a,i,l,o){const u={},h=o(a,{});for(const x in h)u[x]=sr(h[x]);let{initial:f,animate:p}=a;const v=_r(a),g=Xg(a);i&&g&&!v&&a.inherit!==!1&&(f===void 0&&(f=i.initial),p===void 0&&(p=i.animate));let b=l?l.initial===!1:!1;b=b||f===!1;const _=b?p:f;if(_&&typeof _!="boolean"&&!br(_)){const x=Array.isArray(_)?_:[_];for(let E=0;E<x.length;E++){const M=Nd(a,x[E]);if(M){const{transitionEnd:R,transition:K,...O}=M;for(const P in O){let Y=O[P];if(Array.isArray(Y)){const et=b?Y.length-1:0;Y=Y[et]}Y!==null&&(u[P]=Y)}for(const P in R)u[P]=R[P]}}}return u}const bi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ss=new Set(bi),$g=a=>i=>typeof i=="string"&&i.startsWith(a),Wg=$g("--"),sS=$g("var(--"),Ed=a=>sS(a)?iS.test(a.split("/*")[0].trim()):!1,iS=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,t0=(a,i)=>i&&typeof a=="number"?i.transform(a):a,ga=(a,i,l)=>l>i?i:l<a?a:l,_i={test:a=>typeof a=="number",parse:parseFloat,transform:a=>a},Cl={..._i,transform:a=>ga(0,1,a)},Wo={..._i,default:1},Ml=a=>({test:i=>typeof i=="string"&&i.endsWith(a)&&i.split(" ").length===1,parse:parseFloat,transform:i=>`${i}${a}`}),Ya=Ml("deg"),Xn=Ml("%"),yt=Ml("px"),lS=Ml("vh"),oS=Ml("vw"),iv={...Xn,parse:a=>Xn.parse(a)/100,transform:a=>Xn.transform(a*100)},rS={borderWidth:yt,borderTopWidth:yt,borderRightWidth:yt,borderBottomWidth:yt,borderLeftWidth:yt,borderRadius:yt,radius:yt,borderTopLeftRadius:yt,borderTopRightRadius:yt,borderBottomRightRadius:yt,borderBottomLeftRadius:yt,width:yt,maxWidth:yt,height:yt,maxHeight:yt,top:yt,right:yt,bottom:yt,left:yt,padding:yt,paddingTop:yt,paddingRight:yt,paddingBottom:yt,paddingLeft:yt,margin:yt,marginTop:yt,marginRight:yt,marginBottom:yt,marginLeft:yt,backgroundPositionX:yt,backgroundPositionY:yt},cS={rotate:Ya,rotateX:Ya,rotateY:Ya,rotateZ:Ya,scale:Wo,scaleX:Wo,scaleY:Wo,scaleZ:Wo,skew:Ya,skewX:Ya,skewY:Ya,distance:yt,translateX:yt,translateY:yt,translateZ:yt,x:yt,y:yt,z:yt,perspective:yt,transformPerspective:yt,opacity:Cl,originX:iv,originY:iv,originZ:yt},lv={..._i,transform:Math.round},Cd={...rS,...cS,zIndex:lv,size:yt,fillOpacity:Cl,strokeOpacity:Cl,numOctaves:lv},uS={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},dS=bi.length;function fS(a,i,l){let o="",u=!0;for(let h=0;h<dS;h++){const f=bi[h],p=a[f];if(p===void 0)continue;let v=!0;if(typeof p=="number"?v=p===(f.startsWith("scale")?1:0):v=parseFloat(p)===0,!v||l){const g=t0(p,Cd[f]);if(!v){u=!1;const b=uS[f]||f;o+=`${b}(${g}) `}l&&(i[f]=g)}}return o=o.trim(),l?o=l(i,u?"":o):u&&(o="none"),o}function Dd(a,i,l){const{style:o,vars:u,transformOrigin:h}=a;let f=!1,p=!1;for(const v in i){const g=i[v];if(Ss.has(v)){f=!0;continue}else if(Wg(v)){u[v]=g;continue}else{const b=t0(g,Cd[v]);v.startsWith("origin")?(p=!0,h[v]=b):o[v]=b}}if(i.transform||(f||l?o.transform=fS(i,a.transform,l):o.transform&&(o.transform="none")),p){const{originX:v="50%",originY:g="50%",originZ:b=0}=h;o.transformOrigin=`${v} ${g} ${b}`}}const hS={offset:"stroke-dashoffset",array:"stroke-dasharray"},mS={offset:"strokeDashoffset",array:"strokeDasharray"};function pS(a,i,l=1,o=0,u=!0){a.pathLength=1;const h=u?hS:mS;a[h.offset]=yt.transform(-o);const f=yt.transform(i),p=yt.transform(l);a[h.array]=`${f} ${p}`}function ov(a,i,l){return typeof a=="string"?a:yt.transform(i+l*a)}function vS(a,i,l){const o=ov(i,a.x,a.width),u=ov(l,a.y,a.height);return`${o} ${u}`}function kd(a,{attrX:i,attrY:l,attrScale:o,originX:u,originY:h,pathLength:f,pathSpacing:p=1,pathOffset:v=0,...g},b,_){if(Dd(a,g,_),b){a.style.viewBox&&(a.attrs.viewBox=a.style.viewBox);return}a.attrs=a.style,a.style={};const{attrs:x,style:E,dimensions:M}=a;x.transform&&(M&&(E.transform=x.transform),delete x.transform),M&&(u!==void 0||h!==void 0||E.transform)&&(E.transformOrigin=vS(M,u!==void 0?u:.5,h!==void 0?h:.5)),i!==void 0&&(x.x=i),l!==void 0&&(x.y=l),o!==void 0&&(x.scale=o),f!==void 0&&pS(x,f,p,v,!1)}const wd=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),e0=()=>({...wd(),attrs:{}}),Md=a=>typeof a=="string"&&a.toLowerCase()==="svg";function n0(a,{style:i,vars:l},o,u){Object.assign(a.style,i,u&&u.getProjectionStyles(o));for(const h in l)a.style.setProperty(h,l[h])}const a0=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function s0(a,i,l,o){n0(a,i,void 0,o);for(const u in i.attrs)a.setAttribute(a0.has(u)?u:xd(u),i.attrs[u])}const rr={};function gS(a){Object.assign(rr,a)}function i0(a,{layout:i,layoutId:l}){return Ss.has(a)||a.startsWith("origin")||(i||l!==void 0)&&(!!rr[a]||a==="opacity")}function Rd(a,i,l){var o;const{style:u}=a,h={};for(const f in u)(Fe(u[f])||i.style&&Fe(i.style[f])||i0(f,a)||((o=l==null?void 0:l.getValue(f))===null||o===void 0?void 0:o.liveStyle)!==void 0)&&(h[f]=u[f]);return h}function l0(a,i,l){const o=Rd(a,i,l);for(const u in a)if(Fe(a[u])||Fe(i[u])){const h=bi.indexOf(u)!==-1?"attr"+u.charAt(0).toUpperCase()+u.substring(1):u;o[h]=a[u]}return o}function yS(a,i){try{i.dimensions=typeof a.getBBox=="function"?a.getBBox():a.getBoundingClientRect()}catch{i.dimensions={x:0,y:0,width:0,height:0}}}const rv=["x","y","width","height","cx","cy","r"],bS={useVisualState:Jg({scrapeMotionValuesFromProps:l0,createRenderState:e0,onUpdate:({props:a,prevProps:i,current:l,renderState:o,latestValues:u})=>{if(!l)return;let h=!!a.drag;if(!h){for(const p in u)if(Ss.has(p)){h=!0;break}}if(!h)return;let f=!i;if(i)for(let p=0;p<rv.length;p++){const v=rv[p];a[v]!==i[v]&&(f=!0)}f&&ue.read(()=>{yS(l,o),ue.render(()=>{kd(o,u,Md(l.tagName),a.transformTemplate),s0(l,o)})})}})},_S={useVisualState:Jg({scrapeMotionValuesFromProps:Rd,createRenderState:wd})};function o0(a,i,l){for(const o in i)!Fe(i[o])&&!i0(o,l)&&(a[o]=i[o])}function SS({transformTemplate:a},i){return S.useMemo(()=>{const l=wd();return Dd(l,i,a),Object.assign({},l.vars,l.style)},[i])}function TS(a,i){const l=a.style||{},o={};return o0(o,l,a),Object.assign(o,SS(a,i)),o}function xS(a,i){const l={},o=TS(a,i);return a.drag&&a.dragListener!==!1&&(l.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=a.drag===!0?"none":`pan-${a.drag==="x"?"y":"x"}`),a.tabIndex===void 0&&(a.onTap||a.onTapStart||a.whileTap)&&(l.tabIndex=0),l.style=o,l}function jS(a,i,l,o){const u=S.useMemo(()=>{const h=e0();return kd(h,i,Md(o),a.transformTemplate),{...h.attrs,style:{...h.style}}},[i]);if(a.style){const h={};o0(h,a.style,a),u.style={...h,...u.style}}return u}function AS(a=!1){return(l,o,u,{latestValues:h},f)=>{const v=(Ad(l)?jS:xS)(o,h,f,l),g=q_(o,typeof l=="string",a),b=l!==S.Fragment?{...g,...v,ref:u}:{},{children:_}=o,x=S.useMemo(()=>Fe(_)?_.get():_,[_]);return S.createElement(l,{...b,children:x})}}function NS(a,i){return function(o,{forwardMotionProps:u}={forwardMotionProps:!1}){const f={...Ad(o)?bS:_S,preloadedFeatures:a,useRender:AS(u),createVisualElement:i,Component:o};return P_(f)}}function r0(a,i){if(!Array.isArray(i))return!1;const l=i.length;if(l!==a.length)return!1;for(let o=0;o<l;o++)if(i[o]!==a[o])return!1;return!0}function Sr(a,i,l){const o=a.getProps();return Nd(o,i,l!==void 0?l:o.custom,a)}function Od(a,i){return a?a[i]||a.default||a:void 0}const c0=new Set(["width","height","top","left","right","bottom",...bi]);let ir;function ES(){ir=void 0}const Qn={now:()=>(ir===void 0&&Qn.set(Qe.isProcessing||O_.useManualTiming?Qe.timestamp:performance.now()),ir),set:a=>{ir=a,queueMicrotask(ES)}};function zd(a,i){a.indexOf(i)===-1&&a.push(i)}function Bd(a,i){const l=a.indexOf(i);l>-1&&a.splice(l,1)}class Ud{constructor(){this.subscriptions=[]}add(i){return zd(this.subscriptions,i),()=>Bd(this.subscriptions,i)}notify(i,l,o){const u=this.subscriptions.length;if(u)if(u===1)this.subscriptions[0](i,l,o);else for(let h=0;h<u;h++){const f=this.subscriptions[h];f&&f(i,l,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function u0(a,i){return i?a*(1e3/i):0}const cv=30,CS=a=>!isNaN(parseFloat(a));class DS{constructor(i,l={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(o,u=!0)=>{const h=Qn.now();this.updatedAt!==h&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),u&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(i),this.owner=l.owner}setCurrent(i){this.current=i,this.updatedAt=Qn.now(),this.canTrackVelocity===null&&i!==void 0&&(this.canTrackVelocity=CS(this.current))}setPrevFrameValue(i=this.current){this.prevFrameValue=i,this.prevUpdatedAt=this.updatedAt}onChange(i){return this.on("change",i)}on(i,l){this.events[i]||(this.events[i]=new Ud);const o=this.events[i].add(l);return i==="change"?()=>{o(),ue.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(const i in this.events)this.events[i].clear()}attach(i,l){this.passiveEffect=i,this.stopPassiveEffect=l}set(i,l=!0){!l||!this.passiveEffect?this.updateAndNotify(i,l):this.passiveEffect(i,this.updateAndNotify)}setWithVelocity(i,l,o){this.set(l),this.prev=void 0,this.prevFrameValue=i,this.prevUpdatedAt=this.updatedAt-o}jump(i,l=!0){this.updateAndNotify(i),this.prev=i,this.prevUpdatedAt=this.prevFrameValue=void 0,l&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const i=Qn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||i-this.updatedAt>cv)return 0;const l=Math.min(this.updatedAt-this.prevUpdatedAt,cv);return u0(parseFloat(this.current)-parseFloat(this.prevFrameValue),l)}start(i){return this.stop(),new Promise(l=>{this.hasAnimated=!0,this.animation=i(l),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Dl(a,i){return new DS(a,i)}function kS(a,i,l){a.hasValue(i)?a.getValue(i).set(l):a.addValue(i,Dl(l))}function wS(a,i){const l=Sr(a,i);let{transitionEnd:o={},transition:u={},...h}=l||{};h={...h,...o};for(const f in h){const p=eS(h[f]);kS(a,f,p)}}function MS(a){return!!(Fe(a)&&a.add)}function Fu(a,i){const l=a.getValue("willChange");if(MS(l))return l.add(i)}function d0(a){return a.props[Qg]}function Vd(a){let i;return()=>(i===void 0&&(i=a()),i)}const RS=Vd(()=>window.ScrollTimeline!==void 0);class OS{constructor(i){this.stop=()=>this.runAll("stop"),this.animations=i.filter(Boolean)}get finished(){return Promise.all(this.animations.map(i=>"finished"in i?i.finished:i))}getAll(i){return this.animations[0][i]}setAll(i,l){for(let o=0;o<this.animations.length;o++)this.animations[o][i]=l}attachTimeline(i,l){const o=this.animations.map(u=>{if(RS()&&u.attachTimeline)return u.attachTimeline(i);if(typeof l=="function")return l(u)});return()=>{o.forEach((u,h)=>{u&&u(),this.animations[h].stop()})}}get time(){return this.getAll("time")}set time(i){this.setAll("time",i)}get speed(){return this.getAll("speed")}set speed(i){this.setAll("speed",i)}get startTime(){return this.getAll("startTime")}get duration(){let i=0;for(let l=0;l<this.animations.length;l++)i=Math.max(i,this.animations[l].duration);return i}runAll(i){this.animations.forEach(l=>l[i]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class zS extends OS{then(i,l){return Promise.all(this.animations).then(i).catch(l)}}const pa=a=>a*1e3,va=a=>a/1e3;function Ld(a){return typeof a=="function"}function uv(a,i){a.timeline=i,a.onfinish=null}const qd=a=>Array.isArray(a)&&typeof a[0]=="number",BS={linearEasing:void 0};function US(a,i){const l=Vd(a);return()=>{var o;return(o=BS[i])!==null&&o!==void 0?o:l()}}const cr=US(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),vi=(a,i,l)=>{const o=i-a;return o===0?1:(l-a)/o},f0=(a,i,l=10)=>{let o="";const u=Math.max(Math.round(i/l),2);for(let h=0;h<u;h++)o+=a(vi(0,u-1,h))+", ";return`linear(${o.substring(0,o.length-2)})`};function h0(a){return!!(typeof a=="function"&&cr()||!a||typeof a=="string"&&(a in Ju||cr())||qd(a)||Array.isArray(a)&&a.every(h0))}const bl=([a,i,l,o])=>`cubic-bezier(${a}, ${i}, ${l}, ${o})`,Ju={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:bl([0,.65,.55,1]),circOut:bl([.55,0,1,.45]),backIn:bl([.31,.01,.66,-.59]),backOut:bl([.33,1.53,.69,.99])};function m0(a,i){if(a)return typeof a=="function"&&cr()?f0(a,i):qd(a)?bl(a):Array.isArray(a)?a.map(l=>m0(l,i)||Ju.easeOut):Ju[a]}const p0=(a,i,l)=>(((1-3*l+3*i)*a+(3*l-6*i))*a+3*i)*a,VS=1e-7,LS=12;function qS(a,i,l,o,u){let h,f,p=0;do f=i+(l-i)/2,h=p0(f,o,u)-a,h>0?l=f:i=f;while(Math.abs(h)>VS&&++p<LS);return f}function Rl(a,i,l,o){if(a===i&&l===o)return _n;const u=h=>qS(h,0,1,a,l);return h=>h===0||h===1?h:p0(u(h),i,o)}const v0=a=>i=>i<=.5?a(2*i)/2:(2-a(2*(1-i)))/2,g0=a=>i=>1-a(1-i),y0=Rl(.33,1.53,.69,.99),Hd=g0(y0),b0=v0(Hd),_0=a=>(a*=2)<1?.5*Hd(a):.5*(2-Math.pow(2,-10*(a-1))),Id=a=>1-Math.sin(Math.acos(a)),S0=g0(Id),T0=v0(Id),x0=a=>/^0[^.\s]+$/u.test(a);function HS(a){return typeof a=="number"?a===0:a!==null?a==="none"||a==="0"||x0(a):!0}const xl=a=>Math.round(a*1e5)/1e5,Gd=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function IS(a){return a==null}const GS=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Yd=(a,i)=>l=>!!(typeof l=="string"&&GS.test(l)&&l.startsWith(a)||i&&!IS(l)&&Object.prototype.hasOwnProperty.call(l,i)),j0=(a,i,l)=>o=>{if(typeof o!="string")return o;const[u,h,f,p]=o.match(Gd);return{[a]:parseFloat(u),[i]:parseFloat(h),[l]:parseFloat(f),alpha:p!==void 0?parseFloat(p):1}},YS=a=>ga(0,255,a),Ou={..._i,transform:a=>Math.round(YS(a))},bs={test:Yd("rgb","red"),parse:j0("red","green","blue"),transform:({red:a,green:i,blue:l,alpha:o=1})=>"rgba("+Ou.transform(a)+", "+Ou.transform(i)+", "+Ou.transform(l)+", "+xl(Cl.transform(o))+")"};function ZS(a){let i="",l="",o="",u="";return a.length>5?(i=a.substring(1,3),l=a.substring(3,5),o=a.substring(5,7),u=a.substring(7,9)):(i=a.substring(1,2),l=a.substring(2,3),o=a.substring(3,4),u=a.substring(4,5),i+=i,l+=l,o+=o,u+=u),{red:parseInt(i,16),green:parseInt(l,16),blue:parseInt(o,16),alpha:u?parseInt(u,16)/255:1}}const $u={test:Yd("#"),parse:ZS,transform:bs.transform},di={test:Yd("hsl","hue"),parse:j0("hue","saturation","lightness"),transform:({hue:a,saturation:i,lightness:l,alpha:o=1})=>"hsla("+Math.round(a)+", "+Xn.transform(xl(i))+", "+Xn.transform(xl(l))+", "+xl(Cl.transform(o))+")"},Pe={test:a=>bs.test(a)||$u.test(a)||di.test(a),parse:a=>bs.test(a)?bs.parse(a):di.test(a)?di.parse(a):$u.parse(a),transform:a=>typeof a=="string"?a:a.hasOwnProperty("red")?bs.transform(a):di.transform(a)},KS=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function XS(a){var i,l;return isNaN(a)&&typeof a=="string"&&(((i=a.match(Gd))===null||i===void 0?void 0:i.length)||0)+(((l=a.match(KS))===null||l===void 0?void 0:l.length)||0)>0}const A0="number",N0="color",QS="var",PS="var(",dv="${}",FS=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function kl(a){const i=a.toString(),l=[],o={color:[],number:[],var:[]},u=[];let h=0;const p=i.replace(FS,v=>(Pe.test(v)?(o.color.push(h),u.push(N0),l.push(Pe.parse(v))):v.startsWith(PS)?(o.var.push(h),u.push(QS),l.push(v)):(o.number.push(h),u.push(A0),l.push(parseFloat(v))),++h,dv)).split(dv);return{values:l,split:p,indexes:o,types:u}}function E0(a){return kl(a).values}function C0(a){const{split:i,types:l}=kl(a),o=i.length;return u=>{let h="";for(let f=0;f<o;f++)if(h+=i[f],u[f]!==void 0){const p=l[f];p===A0?h+=xl(u[f]):p===N0?h+=Pe.transform(u[f]):h+=u[f]}return h}}const JS=a=>typeof a=="number"?0:a;function $S(a){const i=E0(a);return C0(a)(i.map(JS))}const Qa={test:XS,parse:E0,createTransformer:C0,getAnimatableNone:$S},WS=new Set(["brightness","contrast","saturate","opacity"]);function tT(a){const[i,l]=a.slice(0,-1).split("(");if(i==="drop-shadow")return a;const[o]=l.match(Gd)||[];if(!o)return a;const u=l.replace(o,"");let h=WS.has(i)?1:0;return o!==l&&(h*=100),i+"("+h+u+")"}const eT=/\b([a-z-]*)\(.*?\)/gu,Wu={...Qa,getAnimatableNone:a=>{const i=a.match(eT);return i?i.map(tT).join(" "):a}},nT={...Cd,color:Pe,backgroundColor:Pe,outlineColor:Pe,fill:Pe,stroke:Pe,borderColor:Pe,borderTopColor:Pe,borderRightColor:Pe,borderBottomColor:Pe,borderLeftColor:Pe,filter:Wu,WebkitFilter:Wu},Zd=a=>nT[a];function D0(a,i){let l=Zd(a);return l!==Wu&&(l=Qa),l.getAnimatableNone?l.getAnimatableNone(i):void 0}const aT=new Set(["auto","none","0"]);function sT(a,i,l){let o=0,u;for(;o<a.length&&!u;){const h=a[o];typeof h=="string"&&!aT.has(h)&&kl(h).values.length&&(u=a[o]),o++}if(u&&l)for(const h of i)a[h]=D0(l,u)}const fv=a=>a===_i||a===yt,hv=(a,i)=>parseFloat(a.split(", ")[i]),mv=(a,i)=>(l,{transform:o})=>{if(o==="none"||!o)return 0;const u=o.match(/^matrix3d\((.+)\)$/u);if(u)return hv(u[1],i);{const h=o.match(/^matrix\((.+)\)$/u);return h?hv(h[1],a):0}},iT=new Set(["x","y","z"]),lT=bi.filter(a=>!iT.has(a));function oT(a){const i=[];return lT.forEach(l=>{const o=a.getValue(l);o!==void 0&&(i.push([l,o.get()]),o.set(l.startsWith("scale")?1:0))}),i}const gi={width:({x:a},{paddingLeft:i="0",paddingRight:l="0"})=>a.max-a.min-parseFloat(i)-parseFloat(l),height:({y:a},{paddingTop:i="0",paddingBottom:l="0"})=>a.max-a.min-parseFloat(i)-parseFloat(l),top:(a,{top:i})=>parseFloat(i),left:(a,{left:i})=>parseFloat(i),bottom:({y:a},{top:i})=>parseFloat(i)+(a.max-a.min),right:({x:a},{left:i})=>parseFloat(i)+(a.max-a.min),x:mv(4,13),y:mv(5,14)};gi.translateX=gi.x;gi.translateY=gi.y;const _s=new Set;let td=!1,ed=!1;function k0(){if(ed){const a=Array.from(_s).filter(o=>o.needsMeasurement),i=new Set(a.map(o=>o.element)),l=new Map;i.forEach(o=>{const u=oT(o);u.length&&(l.set(o,u),o.render())}),a.forEach(o=>o.measureInitialState()),i.forEach(o=>{o.render();const u=l.get(o);u&&u.forEach(([h,f])=>{var p;(p=o.getValue(h))===null||p===void 0||p.set(f)})}),a.forEach(o=>o.measureEndState()),a.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}ed=!1,td=!1,_s.forEach(a=>a.complete()),_s.clear()}function w0(){_s.forEach(a=>{a.readKeyframes(),a.needsMeasurement&&(ed=!0)})}function rT(){w0(),k0()}class Kd{constructor(i,l,o,u,h,f=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...i],this.onComplete=l,this.name=o,this.motionValue=u,this.element=h,this.isAsync=f}scheduleResolve(){this.isScheduled=!0,this.isAsync?(_s.add(this),td||(td=!0,ue.read(w0),ue.resolveKeyframes(k0))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:i,name:l,element:o,motionValue:u}=this;for(let h=0;h<i.length;h++)if(i[h]===null)if(h===0){const f=u==null?void 0:u.get(),p=i[i.length-1];if(f!==void 0)i[0]=f;else if(o&&l){const v=o.readValue(l,p);v!=null&&(i[0]=v)}i[0]===void 0&&(i[0]=p),u&&f===void 0&&u.set(i[0])}else i[h]=i[h-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),_s.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,_s.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const M0=a=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(a),cT=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function uT(a){const i=cT.exec(a);if(!i)return[,];const[,l,o,u]=i;return[`--${l??o}`,u]}function R0(a,i,l=1){const[o,u]=uT(a);if(!o)return;const h=window.getComputedStyle(i).getPropertyValue(o);if(h){const f=h.trim();return M0(f)?parseFloat(f):f}return Ed(u)?R0(u,i,l+1):u}const O0=a=>i=>i.test(a),dT={test:a=>a==="auto",parse:a=>a},z0=[_i,yt,Xn,Ya,oS,lS,dT],pv=a=>z0.find(O0(a));class B0 extends Kd{constructor(i,l,o,u,h){super(i,l,o,u,h,!0)}readKeyframes(){const{unresolvedKeyframes:i,element:l,name:o}=this;if(!l||!l.current)return;super.readKeyframes();for(let v=0;v<i.length;v++){let g=i[v];if(typeof g=="string"&&(g=g.trim(),Ed(g))){const b=R0(g,l.current);b!==void 0&&(i[v]=b),v===i.length-1&&(this.finalKeyframe=g)}}if(this.resolveNoneKeyframes(),!c0.has(o)||i.length!==2)return;const[u,h]=i,f=pv(u),p=pv(h);if(f!==p)if(fv(f)&&fv(p))for(let v=0;v<i.length;v++){const g=i[v];typeof g=="string"&&(i[v]=parseFloat(g))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:i,name:l}=this,o=[];for(let u=0;u<i.length;u++)HS(i[u])&&o.push(u);o.length&&sT(i,o,l)}measureInitialState(){const{element:i,unresolvedKeyframes:l,name:o}=this;if(!i||!i.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=gi[o](i.measureViewportBox(),window.getComputedStyle(i.current)),l[0]=this.measuredOrigin;const u=l[l.length-1];u!==void 0&&i.getValue(o,u).jump(u,!1)}measureEndState(){var i;const{element:l,name:o,unresolvedKeyframes:u}=this;if(!l||!l.current)return;const h=l.getValue(o);h&&h.jump(this.measuredOrigin,!1);const f=u.length-1,p=u[f];u[f]=gi[o](l.measureViewportBox(),window.getComputedStyle(l.current)),p!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=p),!((i=this.removedTransforms)===null||i===void 0)&&i.length&&this.removedTransforms.forEach(([v,g])=>{l.getValue(v).set(g)}),this.resolveNoneKeyframes()}}const vv=(a,i)=>i==="zIndex"?!1:!!(typeof a=="number"||Array.isArray(a)||typeof a=="string"&&(Qa.test(a)||a==="0")&&!a.startsWith("url("));function fT(a){const i=a[0];if(a.length===1)return!0;for(let l=0;l<a.length;l++)if(a[l]!==i)return!0}function hT(a,i,l,o){const u=a[0];if(u===null)return!1;if(i==="display"||i==="visibility")return!0;const h=a[a.length-1],f=vv(u,i),p=vv(h,i);return!f||!p?!1:fT(a)||(l==="spring"||Ld(l))&&o}const mT=a=>a!==null;function Tr(a,{repeat:i,repeatType:l="loop"},o){const u=a.filter(mT),h=i&&l!=="loop"&&i%2===1?0:u.length-1;return!h||o===void 0?u[h]:o}const pT=40;class U0{constructor({autoplay:i=!0,delay:l=0,type:o="keyframes",repeat:u=0,repeatDelay:h=0,repeatType:f="loop",...p}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Qn.now(),this.options={autoplay:i,delay:l,type:o,repeat:u,repeatDelay:h,repeatType:f,...p},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>pT?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&rT(),this._resolved}onKeyframesResolved(i,l){this.resolvedAt=Qn.now(),this.hasAttemptedResolve=!0;const{name:o,type:u,velocity:h,delay:f,onComplete:p,onUpdate:v,isGenerator:g}=this.options;if(!g&&!hT(i,o,u,h))if(f)this.options.duration=0;else{v&&v(Tr(i,this.options,l)),p&&p(),this.resolveFinishedPromise();return}const b=this.initPlayback(i,l);b!==!1&&(this._resolved={keyframes:i,finalKeyframe:l,...b},this.onPostResolved())}onPostResolved(){}then(i,l){return this.currentFinishedPromise.then(i,l)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(i=>{this.resolveFinishedPromise=i})}}const nd=2e4;function V0(a){let i=0;const l=50;let o=a.next(i);for(;!o.done&&i<nd;)i+=l,o=a.next(i);return i>=nd?1/0:i}const ge=(a,i,l)=>a+(i-a)*l;function zu(a,i,l){return l<0&&(l+=1),l>1&&(l-=1),l<1/6?a+(i-a)*6*l:l<1/2?i:l<2/3?a+(i-a)*(2/3-l)*6:a}function vT({hue:a,saturation:i,lightness:l,alpha:o}){a/=360,i/=100,l/=100;let u=0,h=0,f=0;if(!i)u=h=f=l;else{const p=l<.5?l*(1+i):l+i-l*i,v=2*l-p;u=zu(v,p,a+1/3),h=zu(v,p,a),f=zu(v,p,a-1/3)}return{red:Math.round(u*255),green:Math.round(h*255),blue:Math.round(f*255),alpha:o}}function ur(a,i){return l=>l>0?i:a}const Bu=(a,i,l)=>{const o=a*a,u=l*(i*i-o)+o;return u<0?0:Math.sqrt(u)},gT=[$u,bs,di],yT=a=>gT.find(i=>i.test(a));function gv(a){const i=yT(a);if(!i)return!1;let l=i.parse(a);return i===di&&(l=vT(l)),l}const yv=(a,i)=>{const l=gv(a),o=gv(i);if(!l||!o)return ur(a,i);const u={...l};return h=>(u.red=Bu(l.red,o.red,h),u.green=Bu(l.green,o.green,h),u.blue=Bu(l.blue,o.blue,h),u.alpha=ge(l.alpha,o.alpha,h),bs.transform(u))},bT=(a,i)=>l=>i(a(l)),Ol=(...a)=>a.reduce(bT),ad=new Set(["none","hidden"]);function _T(a,i){return ad.has(a)?l=>l<=0?a:i:l=>l>=1?i:a}function ST(a,i){return l=>ge(a,i,l)}function Xd(a){return typeof a=="number"?ST:typeof a=="string"?Ed(a)?ur:Pe.test(a)?yv:jT:Array.isArray(a)?L0:typeof a=="object"?Pe.test(a)?yv:TT:ur}function L0(a,i){const l=[...a],o=l.length,u=a.map((h,f)=>Xd(h)(h,i[f]));return h=>{for(let f=0;f<o;f++)l[f]=u[f](h);return l}}function TT(a,i){const l={...a,...i},o={};for(const u in l)a[u]!==void 0&&i[u]!==void 0&&(o[u]=Xd(a[u])(a[u],i[u]));return u=>{for(const h in o)l[h]=o[h](u);return l}}function xT(a,i){var l;const o=[],u={color:0,var:0,number:0};for(let h=0;h<i.values.length;h++){const f=i.types[h],p=a.indexes[f][u[f]],v=(l=a.values[p])!==null&&l!==void 0?l:0;o[h]=v,u[f]++}return o}const jT=(a,i)=>{const l=Qa.createTransformer(i),o=kl(a),u=kl(i);return o.indexes.var.length===u.indexes.var.length&&o.indexes.color.length===u.indexes.color.length&&o.indexes.number.length>=u.indexes.number.length?ad.has(a)&&!u.values.length||ad.has(i)&&!o.values.length?_T(a,i):Ol(L0(xT(o,u),u.values),l):ur(a,i)};function q0(a,i,l){return typeof a=="number"&&typeof i=="number"&&typeof l=="number"?ge(a,i,l):Xd(a)(a,i)}const AT=5;function H0(a,i,l){const o=Math.max(i-AT,0);return u0(l-a(o),i-o)}const Se={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Uu=.001;function NT({duration:a=Se.duration,bounce:i=Se.bounce,velocity:l=Se.velocity,mass:o=Se.mass}){let u,h,f=1-i;f=ga(Se.minDamping,Se.maxDamping,f),a=ga(Se.minDuration,Se.maxDuration,va(a)),f<1?(u=g=>{const b=g*f,_=b*a,x=b-l,E=sd(g,f),M=Math.exp(-_);return Uu-x/E*M},h=g=>{const _=g*f*a,x=_*l+l,E=Math.pow(f,2)*Math.pow(g,2)*a,M=Math.exp(-_),R=sd(Math.pow(g,2),f);return(-u(g)+Uu>0?-1:1)*((x-E)*M)/R}):(u=g=>{const b=Math.exp(-g*a),_=(g-l)*a+1;return-Uu+b*_},h=g=>{const b=Math.exp(-g*a),_=(l-g)*(a*a);return b*_});const p=5/a,v=CT(u,h,p);if(a=pa(a),isNaN(v))return{stiffness:Se.stiffness,damping:Se.damping,duration:a};{const g=Math.pow(v,2)*o;return{stiffness:g,damping:f*2*Math.sqrt(o*g),duration:a}}}const ET=12;function CT(a,i,l){let o=l;for(let u=1;u<ET;u++)o=o-a(o)/i(o);return o}function sd(a,i){return a*Math.sqrt(1-i*i)}const DT=["duration","bounce"],kT=["stiffness","damping","mass"];function bv(a,i){return i.some(l=>a[l]!==void 0)}function wT(a){let i={velocity:Se.velocity,stiffness:Se.stiffness,damping:Se.damping,mass:Se.mass,isResolvedFromDuration:!1,...a};if(!bv(a,kT)&&bv(a,DT))if(a.visualDuration){const l=a.visualDuration,o=2*Math.PI/(l*1.2),u=o*o,h=2*ga(.05,1,1-(a.bounce||0))*Math.sqrt(u);i={...i,mass:Se.mass,stiffness:u,damping:h}}else{const l=NT(a);i={...i,...l,mass:Se.mass},i.isResolvedFromDuration=!0}return i}function I0(a=Se.visualDuration,i=Se.bounce){const l=typeof a!="object"?{visualDuration:a,keyframes:[0,1],bounce:i}:a;let{restSpeed:o,restDelta:u}=l;const h=l.keyframes[0],f=l.keyframes[l.keyframes.length-1],p={done:!1,value:h},{stiffness:v,damping:g,mass:b,duration:_,velocity:x,isResolvedFromDuration:E}=wT({...l,velocity:-va(l.velocity||0)}),M=x||0,R=g/(2*Math.sqrt(v*b)),K=f-h,O=va(Math.sqrt(v/b)),P=Math.abs(K)<5;o||(o=P?Se.restSpeed.granular:Se.restSpeed.default),u||(u=P?Se.restDelta.granular:Se.restDelta.default);let Y;if(R<1){const X=sd(O,R);Y=L=>{const tt=Math.exp(-R*O*L);return f-tt*((M+R*O*K)/X*Math.sin(X*L)+K*Math.cos(X*L))}}else if(R===1)Y=X=>f-Math.exp(-O*X)*(K+(M+O*K)*X);else{const X=O*Math.sqrt(R*R-1);Y=L=>{const tt=Math.exp(-R*O*L),U=Math.min(X*L,300);return f-tt*((M+R*O*K)*Math.sinh(U)+X*K*Math.cosh(U))/X}}const et={calculatedDuration:E&&_||null,next:X=>{const L=Y(X);if(E)p.done=X>=_;else{let tt=0;R<1&&(tt=X===0?pa(M):H0(Y,X,L));const U=Math.abs(tt)<=o,nt=Math.abs(f-L)<=u;p.done=U&&nt}return p.value=p.done?f:L,p},toString:()=>{const X=Math.min(V0(et),nd),L=f0(tt=>et.next(X*tt).value,X,30);return X+"ms "+L}};return et}function _v({keyframes:a,velocity:i=0,power:l=.8,timeConstant:o=325,bounceDamping:u=10,bounceStiffness:h=500,modifyTarget:f,min:p,max:v,restDelta:g=.5,restSpeed:b}){const _=a[0],x={done:!1,value:_},E=U=>p!==void 0&&U<p||v!==void 0&&U>v,M=U=>p===void 0?v:v===void 0||Math.abs(p-U)<Math.abs(v-U)?p:v;let R=l*i;const K=_+R,O=f===void 0?K:f(K);O!==K&&(R=O-_);const P=U=>-R*Math.exp(-U/o),Y=U=>O+P(U),et=U=>{const nt=P(U),at=Y(U);x.done=Math.abs(nt)<=g,x.value=x.done?O:at};let X,L;const tt=U=>{E(x.value)&&(X=U,L=I0({keyframes:[x.value,M(x.value)],velocity:H0(Y,U,x.value),damping:u,stiffness:h,restDelta:g,restSpeed:b}))};return tt(0),{calculatedDuration:null,next:U=>{let nt=!1;return!L&&X===void 0&&(nt=!0,et(U),tt(U)),X!==void 0&&U>=X?L.next(U-X):(!nt&&et(U),x)}}}const MT=Rl(.42,0,1,1),RT=Rl(0,0,.58,1),G0=Rl(.42,0,.58,1),OT=a=>Array.isArray(a)&&typeof a[0]!="number",zT={linear:_n,easeIn:MT,easeInOut:G0,easeOut:RT,circIn:Id,circInOut:T0,circOut:S0,backIn:Hd,backInOut:b0,backOut:y0,anticipate:_0},Sv=a=>{if(qd(a)){Gg(a.length===4);const[i,l,o,u]=a;return Rl(i,l,o,u)}else if(typeof a=="string")return zT[a];return a};function BT(a,i,l){const o=[],u=l||q0,h=a.length-1;for(let f=0;f<h;f++){let p=u(a[f],a[f+1]);if(i){const v=Array.isArray(i)?i[f]||_n:i;p=Ol(v,p)}o.push(p)}return o}function UT(a,i,{clamp:l=!0,ease:o,mixer:u}={}){const h=a.length;if(Gg(h===i.length),h===1)return()=>i[0];if(h===2&&i[0]===i[1])return()=>i[1];const f=a[0]===a[1];a[0]>a[h-1]&&(a=[...a].reverse(),i=[...i].reverse());const p=BT(i,o,u),v=p.length,g=b=>{if(f&&b<a[0])return i[0];let _=0;if(v>1)for(;_<a.length-2&&!(b<a[_+1]);_++);const x=vi(a[_],a[_+1],b);return p[_](x)};return l?b=>g(ga(a[0],a[h-1],b)):g}function VT(a,i){const l=a[a.length-1];for(let o=1;o<=i;o++){const u=vi(0,i,o);a.push(ge(l,1,u))}}function LT(a){const i=[0];return VT(i,a.length-1),i}function qT(a,i){return a.map(l=>l*i)}function HT(a,i){return a.map(()=>i||G0).splice(0,a.length-1)}function dr({duration:a=300,keyframes:i,times:l,ease:o="easeInOut"}){const u=OT(o)?o.map(Sv):Sv(o),h={done:!1,value:i[0]},f=qT(l&&l.length===i.length?l:LT(i),a),p=UT(f,i,{ease:Array.isArray(u)?u:HT(i,u)});return{calculatedDuration:a,next:v=>(h.value=p(v),h.done=v>=a,h)}}const IT=a=>{const i=({timestamp:l})=>a(l);return{start:()=>ue.update(i,!0),stop:()=>Xa(i),now:()=>Qe.isProcessing?Qe.timestamp:Qn.now()}},GT={decay:_v,inertia:_v,tween:dr,keyframes:dr,spring:I0},YT=a=>a/100;class Qd extends U0{constructor(i){super(i),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:v}=this.options;v&&v()};const{name:l,motionValue:o,element:u,keyframes:h}=this.options,f=(u==null?void 0:u.KeyframeResolver)||Kd,p=(v,g)=>this.onKeyframesResolved(v,g);this.resolver=new f(h,p,l,o,u),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(i){const{type:l="keyframes",repeat:o=0,repeatDelay:u=0,repeatType:h,velocity:f=0}=this.options,p=Ld(l)?l:GT[l]||dr;let v,g;p!==dr&&typeof i[0]!="number"&&(v=Ol(YT,q0(i[0],i[1])),i=[0,100]);const b=p({...this.options,keyframes:i});h==="mirror"&&(g=p({...this.options,keyframes:[...i].reverse(),velocity:-f})),b.calculatedDuration===null&&(b.calculatedDuration=V0(b));const{calculatedDuration:_}=b,x=_+u,E=x*(o+1)-u;return{generator:b,mirroredGenerator:g,mapPercentToKeyframes:v,calculatedDuration:_,resolvedDuration:x,totalDuration:E}}onPostResolved(){const{autoplay:i=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!i?this.pause():this.state=this.pendingPlayState}tick(i,l=!1){const{resolved:o}=this;if(!o){const{keyframes:U}=this.options;return{done:!0,value:U[U.length-1]}}const{finalKeyframe:u,generator:h,mirroredGenerator:f,mapPercentToKeyframes:p,keyframes:v,calculatedDuration:g,totalDuration:b,resolvedDuration:_}=o;if(this.startTime===null)return h.next(0);const{delay:x,repeat:E,repeatType:M,repeatDelay:R,onUpdate:K}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,i):this.speed<0&&(this.startTime=Math.min(i-b/this.speed,this.startTime)),l?this.currentTime=i:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(i-this.startTime)*this.speed;const O=this.currentTime-x*(this.speed>=0?1:-1),P=this.speed>=0?O<0:O>b;this.currentTime=Math.max(O,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=b);let Y=this.currentTime,et=h;if(E){const U=Math.min(this.currentTime,b)/_;let nt=Math.floor(U),at=U%1;!at&&U>=1&&(at=1),at===1&&nt--,nt=Math.min(nt,E+1),!!(nt%2)&&(M==="reverse"?(at=1-at,R&&(at-=R/_)):M==="mirror"&&(et=f)),Y=ga(0,1,at)*_}const X=P?{done:!1,value:v[0]}:et.next(Y);p&&(X.value=p(X.value));let{done:L}=X;!P&&g!==null&&(L=this.speed>=0?this.currentTime>=b:this.currentTime<=0);const tt=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&L);return tt&&u!==void 0&&(X.value=Tr(v,this.options,u)),K&&K(X.value),tt&&this.finish(),X}get duration(){const{resolved:i}=this;return i?va(i.calculatedDuration):0}get time(){return va(this.currentTime)}set time(i){i=pa(i),this.currentTime=i,this.holdTime!==null||this.speed===0?this.holdTime=i:this.driver&&(this.startTime=this.driver.now()-i/this.speed)}get speed(){return this.playbackSpeed}set speed(i){const l=this.playbackSpeed!==i;this.playbackSpeed=i,l&&(this.time=va(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:i=IT,onPlay:l,startTime:o}=this.options;this.driver||(this.driver=i(h=>this.tick(h))),l&&l();const u=this.driver.now();this.holdTime!==null?this.startTime=u-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=u):this.startTime=o??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var i;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(i=this.currentTime)!==null&&i!==void 0?i:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:i}=this.options;i&&i()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(i){return this.startTime=0,this.tick(i,!0)}}const ZT=new Set(["opacity","clipPath","filter","transform"]);function KT(a,i,l,{delay:o=0,duration:u=300,repeat:h=0,repeatType:f="loop",ease:p="easeInOut",times:v}={}){const g={[i]:l};v&&(g.offset=v);const b=m0(p,u);return Array.isArray(b)&&(g.easing=b),a.animate(g,{delay:o,duration:u,easing:Array.isArray(b)?"linear":b,fill:"both",iterations:h+1,direction:f==="reverse"?"alternate":"normal"})}const XT=Vd(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),fr=10,QT=2e4;function PT(a){return Ld(a.type)||a.type==="spring"||!h0(a.ease)}function FT(a,i){const l=new Qd({...i,keyframes:a,repeat:0,delay:0,isGenerator:!0});let o={done:!1,value:a[0]};const u=[];let h=0;for(;!o.done&&h<QT;)o=l.sample(h),u.push(o.value),h+=fr;return{times:void 0,keyframes:u,duration:h-fr,ease:"linear"}}const Y0={anticipate:_0,backInOut:b0,circInOut:T0};function JT(a){return a in Y0}class Tv extends U0{constructor(i){super(i);const{name:l,motionValue:o,element:u,keyframes:h}=this.options;this.resolver=new B0(h,(f,p)=>this.onKeyframesResolved(f,p),l,o,u),this.resolver.scheduleResolve()}initPlayback(i,l){let{duration:o=300,times:u,ease:h,type:f,motionValue:p,name:v,startTime:g}=this.options;if(!p.owner||!p.owner.current)return!1;if(typeof h=="string"&&cr()&&JT(h)&&(h=Y0[h]),PT(this.options)){const{onComplete:_,onUpdate:x,motionValue:E,element:M,...R}=this.options,K=FT(i,R);i=K.keyframes,i.length===1&&(i[1]=i[0]),o=K.duration,u=K.times,h=K.ease,f="keyframes"}const b=KT(p.owner.current,v,i,{...this.options,duration:o,times:u,ease:h});return b.startTime=g??this.calcStartTime(),this.pendingTimeline?(uv(b,this.pendingTimeline),this.pendingTimeline=void 0):b.onfinish=()=>{const{onComplete:_}=this.options;p.set(Tr(i,this.options,l)),_&&_(),this.cancel(),this.resolveFinishedPromise()},{animation:b,duration:o,times:u,type:f,ease:h,keyframes:i}}get duration(){const{resolved:i}=this;if(!i)return 0;const{duration:l}=i;return va(l)}get time(){const{resolved:i}=this;if(!i)return 0;const{animation:l}=i;return va(l.currentTime||0)}set time(i){const{resolved:l}=this;if(!l)return;const{animation:o}=l;o.currentTime=pa(i)}get speed(){const{resolved:i}=this;if(!i)return 1;const{animation:l}=i;return l.playbackRate}set speed(i){const{resolved:l}=this;if(!l)return;const{animation:o}=l;o.playbackRate=i}get state(){const{resolved:i}=this;if(!i)return"idle";const{animation:l}=i;return l.playState}get startTime(){const{resolved:i}=this;if(!i)return null;const{animation:l}=i;return l.startTime}attachTimeline(i){if(!this._resolved)this.pendingTimeline=i;else{const{resolved:l}=this;if(!l)return _n;const{animation:o}=l;uv(o,i)}return _n}play(){if(this.isStopped)return;const{resolved:i}=this;if(!i)return;const{animation:l}=i;l.playState==="finished"&&this.updateFinishedPromise(),l.play()}pause(){const{resolved:i}=this;if(!i)return;const{animation:l}=i;l.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:i}=this;if(!i)return;const{animation:l,keyframes:o,duration:u,type:h,ease:f,times:p}=i;if(l.playState==="idle"||l.playState==="finished")return;if(this.time){const{motionValue:g,onUpdate:b,onComplete:_,element:x,...E}=this.options,M=new Qd({...E,keyframes:o,duration:u,type:h,ease:f,times:p,isGenerator:!0}),R=pa(this.time);g.setWithVelocity(M.sample(R-fr).value,M.sample(R).value,fr)}const{onStop:v}=this.options;v&&v(),this.cancel()}complete(){const{resolved:i}=this;i&&i.animation.finish()}cancel(){const{resolved:i}=this;i&&i.animation.cancel()}static supports(i){const{motionValue:l,name:o,repeatDelay:u,repeatType:h,damping:f,type:p}=i;if(!l||!l.owner||!(l.owner.current instanceof HTMLElement))return!1;const{onUpdate:v,transformTemplate:g}=l.owner.getProps();return XT()&&o&&ZT.has(o)&&!v&&!g&&!u&&h!=="mirror"&&f!==0&&p!=="inertia"}}const $T={type:"spring",stiffness:500,damping:25,restSpeed:10},WT=a=>({type:"spring",stiffness:550,damping:a===0?2*Math.sqrt(550):30,restSpeed:10}),tx={type:"keyframes",duration:.8},ex={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},nx=(a,{keyframes:i})=>i.length>2?tx:Ss.has(a)?a.startsWith("scale")?WT(i[1]):$T:ex;function ax({when:a,delay:i,delayChildren:l,staggerChildren:o,staggerDirection:u,repeat:h,repeatType:f,repeatDelay:p,from:v,elapsed:g,...b}){return!!Object.keys(b).length}const Pd=(a,i,l,o={},u,h)=>f=>{const p=Od(o,a)||{},v=p.delay||o.delay||0;let{elapsed:g=0}=o;g=g-pa(v);let b={keyframes:Array.isArray(l)?l:[null,l],ease:"easeOut",velocity:i.getVelocity(),...p,delay:-g,onUpdate:x=>{i.set(x),p.onUpdate&&p.onUpdate(x)},onComplete:()=>{f(),p.onComplete&&p.onComplete()},name:a,motionValue:i,element:h?void 0:u};ax(p)||(b={...b,...nx(a,b)}),b.duration&&(b.duration=pa(b.duration)),b.repeatDelay&&(b.repeatDelay=pa(b.repeatDelay)),b.from!==void 0&&(b.keyframes[0]=b.from);let _=!1;if((b.type===!1||b.duration===0&&!b.repeatDelay)&&(b.duration=0,b.delay===0&&(_=!0)),_&&!h&&i.get()!==void 0){const x=Tr(b.keyframes,p);if(x!==void 0)return ue.update(()=>{b.onUpdate(x),b.onComplete()}),new zS([])}return!h&&Tv.supports(b)?new Tv(b):new Qd(b)};function sx({protectedKeys:a,needsAnimating:i},l){const o=a.hasOwnProperty(l)&&i[l]!==!0;return i[l]=!1,o}function Z0(a,i,{delay:l=0,transitionOverride:o,type:u}={}){var h;let{transition:f=a.getDefaultTransition(),transitionEnd:p,...v}=i;o&&(f=o);const g=[],b=u&&a.animationState&&a.animationState.getState()[u];for(const _ in v){const x=a.getValue(_,(h=a.latestValues[_])!==null&&h!==void 0?h:null),E=v[_];if(E===void 0||b&&sx(b,_))continue;const M={delay:l,...Od(f||{},_)};let R=!1;if(window.MotionHandoffAnimation){const O=d0(a);if(O){const P=window.MotionHandoffAnimation(O,_,ue);P!==null&&(M.startTime=P,R=!0)}}Fu(a,_),x.start(Pd(_,x,E,a.shouldReduceMotion&&c0.has(_)?{type:!1}:M,a,R));const K=x.animation;K&&g.push(K)}return p&&Promise.all(g).then(()=>{ue.update(()=>{p&&wS(a,p)})}),g}function id(a,i,l={}){var o;const u=Sr(a,i,l.type==="exit"?(o=a.presenceContext)===null||o===void 0?void 0:o.custom:void 0);let{transition:h=a.getDefaultTransition()||{}}=u||{};l.transitionOverride&&(h=l.transitionOverride);const f=u?()=>Promise.all(Z0(a,u,l)):()=>Promise.resolve(),p=a.variantChildren&&a.variantChildren.size?(g=0)=>{const{delayChildren:b=0,staggerChildren:_,staggerDirection:x}=h;return ix(a,i,b+g,_,x,l)}:()=>Promise.resolve(),{when:v}=h;if(v){const[g,b]=v==="beforeChildren"?[f,p]:[p,f];return g().then(()=>b())}else return Promise.all([f(),p(l.delay)])}function ix(a,i,l=0,o=0,u=1,h){const f=[],p=(a.variantChildren.size-1)*o,v=u===1?(g=0)=>g*o:(g=0)=>p-g*o;return Array.from(a.variantChildren).sort(lx).forEach((g,b)=>{g.notify("AnimationStart",i),f.push(id(g,i,{...h,delay:l+v(b)}).then(()=>g.notify("AnimationComplete",i)))}),Promise.all(f)}function lx(a,i){return a.sortNodePosition(i)}function ox(a,i,l={}){a.notify("AnimationStart",i);let o;if(Array.isArray(i)){const u=i.map(h=>id(a,h,l));o=Promise.all(u)}else if(typeof i=="string")o=id(a,i,l);else{const u=typeof i=="function"?Sr(a,i,l.custom):i;o=Promise.all(Z0(a,u,l))}return o.then(()=>{a.notify("AnimationComplete",i)})}const rx=Td.length;function K0(a){if(!a)return;if(!a.isControllingVariants){const l=a.parent?K0(a.parent)||{}:{};return a.props.initial!==void 0&&(l.initial=a.props.initial),l}const i={};for(let l=0;l<rx;l++){const o=Td[l],u=a.props[o];(El(u)||u===!1)&&(i[o]=u)}return i}const cx=[...Sd].reverse(),ux=Sd.length;function dx(a){return i=>Promise.all(i.map(({animation:l,options:o})=>ox(a,l,o)))}function fx(a){let i=dx(a),l=xv(),o=!0;const u=v=>(g,b)=>{var _;const x=Sr(a,b,v==="exit"?(_=a.presenceContext)===null||_===void 0?void 0:_.custom:void 0);if(x){const{transition:E,transitionEnd:M,...R}=x;g={...g,...R,...M}}return g};function h(v){i=v(a)}function f(v){const{props:g}=a,b=K0(a.parent)||{},_=[],x=new Set;let E={},M=1/0;for(let K=0;K<ux;K++){const O=cx[K],P=l[O],Y=g[O]!==void 0?g[O]:b[O],et=El(Y),X=O===v?P.isActive:null;X===!1&&(M=K);let L=Y===b[O]&&Y!==g[O]&&et;if(L&&o&&a.manuallyAnimateOnMount&&(L=!1),P.protectedKeys={...E},!P.isActive&&X===null||!Y&&!P.prevProp||br(Y)||typeof Y=="boolean")continue;const tt=hx(P.prevProp,Y);let U=tt||O===v&&P.isActive&&!L&&et||K>M&&et,nt=!1;const at=Array.isArray(Y)?Y:[Y];let mt=at.reduce(u(O),{});X===!1&&(mt={});const{prevResolvedValues:Dt={}}=P,$={...Dt,...mt},st=Q=>{U=!0,x.has(Q)&&(nt=!0,x.delete(Q)),P.needsAnimating[Q]=!0;const lt=a.getValue(Q);lt&&(lt.liveStyle=!1)};for(const Q in $){const lt=mt[Q],Ct=Dt[Q];if(E.hasOwnProperty(Q))continue;let vt=!1;Pu(lt)&&Pu(Ct)?vt=!r0(lt,Ct):vt=lt!==Ct,vt?lt!=null?st(Q):x.add(Q):lt!==void 0&&x.has(Q)?st(Q):P.protectedKeys[Q]=!0}P.prevProp=Y,P.prevResolvedValues=mt,P.isActive&&(E={...E,...mt}),o&&a.blockInitialAnimation&&(U=!1),U&&(!(L&&tt)||nt)&&_.push(...at.map(Q=>({animation:Q,options:{type:O}})))}if(x.size){const K={};x.forEach(O=>{const P=a.getBaseTarget(O),Y=a.getValue(O);Y&&(Y.liveStyle=!0),K[O]=P??null}),_.push({animation:K})}let R=!!_.length;return o&&(g.initial===!1||g.initial===g.animate)&&!a.manuallyAnimateOnMount&&(R=!1),o=!1,R?i(_):Promise.resolve()}function p(v,g){var b;if(l[v].isActive===g)return Promise.resolve();(b=a.variantChildren)===null||b===void 0||b.forEach(x=>{var E;return(E=x.animationState)===null||E===void 0?void 0:E.setActive(v,g)}),l[v].isActive=g;const _=f(v);for(const x in l)l[x].protectedKeys={};return _}return{animateChanges:f,setActive:p,setAnimateFunction:h,getState:()=>l,reset:()=>{l=xv(),o=!0}}}function hx(a,i){return typeof i=="string"?i!==a:Array.isArray(i)?!r0(i,a):!1}function ms(a=!1){return{isActive:a,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function xv(){return{animate:ms(!0),whileInView:ms(),whileHover:ms(),whileTap:ms(),whileDrag:ms(),whileFocus:ms(),exit:ms()}}class Pa{constructor(i){this.isMounted=!1,this.node=i}update(){}}class mx extends Pa{constructor(i){super(i),i.animationState||(i.animationState=fx(i))}updateAnimationControlsSubscription(){const{animate:i}=this.node.getProps();br(i)&&(this.unmountControls=i.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:i}=this.node.getProps(),{animate:l}=this.node.prevProps||{};i!==l&&this.updateAnimationControlsSubscription()}unmount(){var i;this.node.animationState.reset(),(i=this.unmountControls)===null||i===void 0||i.call(this)}}let px=0;class vx extends Pa{constructor(){super(...arguments),this.id=px++}update(){if(!this.node.presenceContext)return;const{isPresent:i,onExitComplete:l}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||i===o)return;const u=this.node.animationState.setActive("exit",!i);l&&!i&&u.then(()=>l(this.id))}mount(){const{register:i}=this.node.presenceContext||{};i&&(this.unmount=i(this.id))}unmount(){}}const gx={animation:{Feature:mx},exit:{Feature:vx}},Ln={x:!1,y:!1};function X0(){return Ln.x||Ln.y}function yx(a){return a==="x"||a==="y"?Ln[a]?null:(Ln[a]=!0,()=>{Ln[a]=!1}):Ln.x||Ln.y?null:(Ln.x=Ln.y=!0,()=>{Ln.x=Ln.y=!1})}const Fd=a=>a.pointerType==="mouse"?typeof a.button!="number"||a.button<=0:a.isPrimary!==!1;function wl(a,i,l,o={passive:!0}){return a.addEventListener(i,l,o),()=>a.removeEventListener(i,l)}function zl(a){return{point:{x:a.pageX,y:a.pageY}}}const bx=a=>i=>Fd(i)&&a(i,zl(i));function jl(a,i,l,o){return wl(a,i,bx(l),o)}const jv=(a,i)=>Math.abs(a-i);function _x(a,i){const l=jv(a.x,i.x),o=jv(a.y,i.y);return Math.sqrt(l**2+o**2)}class Q0{constructor(i,l,{transformPagePoint:o,contextWindow:u,dragSnapToOrigin:h=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const _=Lu(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,E=_x(_.offset,{x:0,y:0})>=3;if(!x&&!E)return;const{point:M}=_,{timestamp:R}=Qe;this.history.push({...M,timestamp:R});const{onStart:K,onMove:O}=this.handlers;x||(K&&K(this.lastMoveEvent,_),this.startEvent=this.lastMoveEvent),O&&O(this.lastMoveEvent,_)},this.handlePointerMove=(_,x)=>{this.lastMoveEvent=_,this.lastMoveEventInfo=Vu(x,this.transformPagePoint),ue.update(this.updatePoint,!0)},this.handlePointerUp=(_,x)=>{this.end();const{onEnd:E,onSessionEnd:M,resumeAnimation:R}=this.handlers;if(this.dragSnapToOrigin&&R&&R(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const K=Lu(_.type==="pointercancel"?this.lastMoveEventInfo:Vu(x,this.transformPagePoint),this.history);this.startEvent&&E&&E(_,K),M&&M(_,K)},!Fd(i))return;this.dragSnapToOrigin=h,this.handlers=l,this.transformPagePoint=o,this.contextWindow=u||window;const f=zl(i),p=Vu(f,this.transformPagePoint),{point:v}=p,{timestamp:g}=Qe;this.history=[{...v,timestamp:g}];const{onSessionStart:b}=l;b&&b(i,Lu(p,this.history)),this.removeListeners=Ol(jl(this.contextWindow,"pointermove",this.handlePointerMove),jl(this.contextWindow,"pointerup",this.handlePointerUp),jl(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(i){this.handlers=i}end(){this.removeListeners&&this.removeListeners(),Xa(this.updatePoint)}}function Vu(a,i){return i?{point:i(a.point)}:a}function Av(a,i){return{x:a.x-i.x,y:a.y-i.y}}function Lu({point:a},i){return{point:a,delta:Av(a,P0(i)),offset:Av(a,Sx(i)),velocity:Tx(i,.1)}}function Sx(a){return a[0]}function P0(a){return a[a.length-1]}function Tx(a,i){if(a.length<2)return{x:0,y:0};let l=a.length-1,o=null;const u=P0(a);for(;l>=0&&(o=a[l],!(u.timestamp-o.timestamp>pa(i)));)l--;if(!o)return{x:0,y:0};const h=va(u.timestamp-o.timestamp);if(h===0)return{x:0,y:0};const f={x:(u.x-o.x)/h,y:(u.y-o.y)/h};return f.x===1/0&&(f.x=0),f.y===1/0&&(f.y=0),f}const F0=1e-4,xx=1-F0,jx=1+F0,J0=.01,Ax=0-J0,Nx=0+J0;function Sn(a){return a.max-a.min}function Ex(a,i,l){return Math.abs(a-i)<=l}function Nv(a,i,l,o=.5){a.origin=o,a.originPoint=ge(i.min,i.max,a.origin),a.scale=Sn(l)/Sn(i),a.translate=ge(l.min,l.max,a.origin)-a.originPoint,(a.scale>=xx&&a.scale<=jx||isNaN(a.scale))&&(a.scale=1),(a.translate>=Ax&&a.translate<=Nx||isNaN(a.translate))&&(a.translate=0)}function Al(a,i,l,o){Nv(a.x,i.x,l.x,o?o.originX:void 0),Nv(a.y,i.y,l.y,o?o.originY:void 0)}function Ev(a,i,l){a.min=l.min+i.min,a.max=a.min+Sn(i)}function Cx(a,i,l){Ev(a.x,i.x,l.x),Ev(a.y,i.y,l.y)}function Cv(a,i,l){a.min=i.min-l.min,a.max=a.min+Sn(i)}function Nl(a,i,l){Cv(a.x,i.x,l.x),Cv(a.y,i.y,l.y)}function Dx(a,{min:i,max:l},o){return i!==void 0&&a<i?a=o?ge(i,a,o.min):Math.max(a,i):l!==void 0&&a>l&&(a=o?ge(l,a,o.max):Math.min(a,l)),a}function Dv(a,i,l){return{min:i!==void 0?a.min+i:void 0,max:l!==void 0?a.max+l-(a.max-a.min):void 0}}function kx(a,{top:i,left:l,bottom:o,right:u}){return{x:Dv(a.x,l,u),y:Dv(a.y,i,o)}}function kv(a,i){let l=i.min-a.min,o=i.max-a.max;return i.max-i.min<a.max-a.min&&([l,o]=[o,l]),{min:l,max:o}}function wx(a,i){return{x:kv(a.x,i.x),y:kv(a.y,i.y)}}function Mx(a,i){let l=.5;const o=Sn(a),u=Sn(i);return u>o?l=vi(i.min,i.max-o,a.min):o>u&&(l=vi(a.min,a.max-u,i.min)),ga(0,1,l)}function Rx(a,i){const l={};return i.min!==void 0&&(l.min=i.min-a.min),i.max!==void 0&&(l.max=i.max-a.min),l}const ld=.35;function Ox(a=ld){return a===!1?a=0:a===!0&&(a=ld),{x:wv(a,"left","right"),y:wv(a,"top","bottom")}}function wv(a,i,l){return{min:Mv(a,i),max:Mv(a,l)}}function Mv(a,i){return typeof a=="number"?a:a[i]||0}const Rv=()=>({translate:0,scale:1,origin:0,originPoint:0}),fi=()=>({x:Rv(),y:Rv()}),Ov=()=>({min:0,max:0}),Ne=()=>({x:Ov(),y:Ov()});function Rn(a){return[a("x"),a("y")]}function $0({top:a,left:i,right:l,bottom:o}){return{x:{min:i,max:l},y:{min:a,max:o}}}function zx({x:a,y:i}){return{top:i.min,right:a.max,bottom:i.max,left:a.min}}function Bx(a,i){if(!i)return a;const l=i({x:a.left,y:a.top}),o=i({x:a.right,y:a.bottom});return{top:l.y,left:l.x,bottom:o.y,right:o.x}}function qu(a){return a===void 0||a===1}function od({scale:a,scaleX:i,scaleY:l}){return!qu(a)||!qu(i)||!qu(l)}function gs(a){return od(a)||W0(a)||a.z||a.rotate||a.rotateX||a.rotateY||a.skewX||a.skewY}function W0(a){return zv(a.x)||zv(a.y)}function zv(a){return a&&a!=="0%"}function hr(a,i,l){const o=a-l,u=i*o;return l+u}function Bv(a,i,l,o,u){return u!==void 0&&(a=hr(a,u,o)),hr(a,l,o)+i}function rd(a,i=0,l=1,o,u){a.min=Bv(a.min,i,l,o,u),a.max=Bv(a.max,i,l,o,u)}function ty(a,{x:i,y:l}){rd(a.x,i.translate,i.scale,i.originPoint),rd(a.y,l.translate,l.scale,l.originPoint)}const Uv=.999999999999,Vv=1.0000000000001;function Ux(a,i,l,o=!1){const u=l.length;if(!u)return;i.x=i.y=1;let h,f;for(let p=0;p<u;p++){h=l[p],f=h.projectionDelta;const{visualElement:v}=h.options;v&&v.props.style&&v.props.style.display==="contents"||(o&&h.options.layoutScroll&&h.scroll&&h!==h.root&&mi(a,{x:-h.scroll.offset.x,y:-h.scroll.offset.y}),f&&(i.x*=f.x.scale,i.y*=f.y.scale,ty(a,f)),o&&gs(h.latestValues)&&mi(a,h.latestValues))}i.x<Vv&&i.x>Uv&&(i.x=1),i.y<Vv&&i.y>Uv&&(i.y=1)}function hi(a,i){a.min=a.min+i,a.max=a.max+i}function Lv(a,i,l,o,u=.5){const h=ge(a.min,a.max,u);rd(a,i,l,h,o)}function mi(a,i){Lv(a.x,i.x,i.scaleX,i.scale,i.originX),Lv(a.y,i.y,i.scaleY,i.scale,i.originY)}function ey(a,i){return $0(Bx(a.getBoundingClientRect(),i))}function Vx(a,i,l){const o=ey(a,l),{scroll:u}=i;return u&&(hi(o.x,u.offset.x),hi(o.y,u.offset.y)),o}const ny=({current:a})=>a?a.ownerDocument.defaultView:null,Lx=new WeakMap;class qx{constructor(i){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ne(),this.visualElement=i}start(i,{snapToCursor:l=!1}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const u=b=>{const{dragSnapToOrigin:_}=this.getProps();_?this.pauseAnimation():this.stopAnimation(),l&&this.snapToCursor(zl(b).point)},h=(b,_)=>{const{drag:x,dragPropagation:E,onDragStart:M}=this.getProps();if(x&&!E&&(this.openDragLock&&this.openDragLock(),this.openDragLock=yx(x),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Rn(K=>{let O=this.getAxisMotionValue(K).get()||0;if(Xn.test(O)){const{projection:P}=this.visualElement;if(P&&P.layout){const Y=P.layout.layoutBox[K];Y&&(O=Sn(Y)*(parseFloat(O)/100))}}this.originPoint[K]=O}),M&&ue.postRender(()=>M(b,_)),Fu(this.visualElement,"transform");const{animationState:R}=this.visualElement;R&&R.setActive("whileDrag",!0)},f=(b,_)=>{const{dragPropagation:x,dragDirectionLock:E,onDirectionLock:M,onDrag:R}=this.getProps();if(!x&&!this.openDragLock)return;const{offset:K}=_;if(E&&this.currentDirection===null){this.currentDirection=Hx(K),this.currentDirection!==null&&M&&M(this.currentDirection);return}this.updateAxis("x",_.point,K),this.updateAxis("y",_.point,K),this.visualElement.render(),R&&R(b,_)},p=(b,_)=>this.stop(b,_),v=()=>Rn(b=>{var _;return this.getAnimationState(b)==="paused"&&((_=this.getAxisMotionValue(b).animation)===null||_===void 0?void 0:_.play())}),{dragSnapToOrigin:g}=this.getProps();this.panSession=new Q0(i,{onSessionStart:u,onStart:h,onMove:f,onSessionEnd:p,resumeAnimation:v},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:g,contextWindow:ny(this.visualElement)})}stop(i,l){const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:u}=l;this.startAnimation(u);const{onDragEnd:h}=this.getProps();h&&ue.postRender(()=>h(i,l))}cancel(){this.isDragging=!1;const{projection:i,animationState:l}=this.visualElement;i&&(i.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),l&&l.setActive("whileDrag",!1)}updateAxis(i,l,o){const{drag:u}=this.getProps();if(!o||!tr(i,u,this.currentDirection))return;const h=this.getAxisMotionValue(i);let f=this.originPoint[i]+o[i];this.constraints&&this.constraints[i]&&(f=Dx(f,this.constraints[i],this.elastic[i])),h.set(f)}resolveConstraints(){var i;const{dragConstraints:l,dragElastic:o}=this.getProps(),u=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)===null||i===void 0?void 0:i.layout,h=this.constraints;l&&ui(l)?this.constraints||(this.constraints=this.resolveRefConstraints()):l&&u?this.constraints=kx(u.layoutBox,l):this.constraints=!1,this.elastic=Ox(o),h!==this.constraints&&u&&this.constraints&&!this.hasMutatedConstraints&&Rn(f=>{this.constraints!==!1&&this.getAxisMotionValue(f)&&(this.constraints[f]=Rx(u.layoutBox[f],this.constraints[f]))})}resolveRefConstraints(){const{dragConstraints:i,onMeasureDragConstraints:l}=this.getProps();if(!i||!ui(i))return!1;const o=i.current,{projection:u}=this.visualElement;if(!u||!u.layout)return!1;const h=Vx(o,u.root,this.visualElement.getTransformPagePoint());let f=wx(u.layout.layoutBox,h);if(l){const p=l(zx(f));this.hasMutatedConstraints=!!p,p&&(f=$0(p))}return f}startAnimation(i){const{drag:l,dragMomentum:o,dragElastic:u,dragTransition:h,dragSnapToOrigin:f,onDragTransitionEnd:p}=this.getProps(),v=this.constraints||{},g=Rn(b=>{if(!tr(b,l,this.currentDirection))return;let _=v&&v[b]||{};f&&(_={min:0,max:0});const x=u?200:1e6,E=u?40:1e7,M={type:"inertia",velocity:o?i[b]:0,bounceStiffness:x,bounceDamping:E,timeConstant:750,restDelta:1,restSpeed:10,...h,..._};return this.startAxisValueAnimation(b,M)});return Promise.all(g).then(p)}startAxisValueAnimation(i,l){const o=this.getAxisMotionValue(i);return Fu(this.visualElement,i),o.start(Pd(i,o,0,l,this.visualElement,!1))}stopAnimation(){Rn(i=>this.getAxisMotionValue(i).stop())}pauseAnimation(){Rn(i=>{var l;return(l=this.getAxisMotionValue(i).animation)===null||l===void 0?void 0:l.pause()})}getAnimationState(i){var l;return(l=this.getAxisMotionValue(i).animation)===null||l===void 0?void 0:l.state}getAxisMotionValue(i){const l=`_drag${i.toUpperCase()}`,o=this.visualElement.getProps(),u=o[l];return u||this.visualElement.getValue(i,(o.initial?o.initial[i]:void 0)||0)}snapToCursor(i){Rn(l=>{const{drag:o}=this.getProps();if(!tr(l,o,this.currentDirection))return;const{projection:u}=this.visualElement,h=this.getAxisMotionValue(l);if(u&&u.layout){const{min:f,max:p}=u.layout.layoutBox[l];h.set(i[l]-ge(f,p,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:i,dragConstraints:l}=this.getProps(),{projection:o}=this.visualElement;if(!ui(l)||!o||!this.constraints)return;this.stopAnimation();const u={x:0,y:0};Rn(f=>{const p=this.getAxisMotionValue(f);if(p&&this.constraints!==!1){const v=p.get();u[f]=Mx({min:v,max:v},this.constraints[f])}});const{transformTemplate:h}=this.visualElement.getProps();this.visualElement.current.style.transform=h?h({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),Rn(f=>{if(!tr(f,i,null))return;const p=this.getAxisMotionValue(f),{min:v,max:g}=this.constraints[f];p.set(ge(v,g,u[f]))})}addListeners(){if(!this.visualElement.current)return;Lx.set(this.visualElement,this);const i=this.visualElement.current,l=jl(i,"pointerdown",v=>{const{drag:g,dragListener:b=!0}=this.getProps();g&&b&&this.start(v)}),o=()=>{const{dragConstraints:v}=this.getProps();ui(v)&&v.current&&(this.constraints=this.resolveRefConstraints())},{projection:u}=this.visualElement,h=u.addEventListener("measure",o);u&&!u.layout&&(u.root&&u.root.updateScroll(),u.updateLayout()),ue.read(o);const f=wl(window,"resize",()=>this.scalePositionWithinConstraints()),p=u.addEventListener("didUpdate",(({delta:v,hasLayoutChanged:g})=>{this.isDragging&&g&&(Rn(b=>{const _=this.getAxisMotionValue(b);_&&(this.originPoint[b]+=v[b].translate,_.set(_.get()+v[b].translate))}),this.visualElement.render())}));return()=>{f(),l(),h(),p&&p()}}getProps(){const i=this.visualElement.getProps(),{drag:l=!1,dragDirectionLock:o=!1,dragPropagation:u=!1,dragConstraints:h=!1,dragElastic:f=ld,dragMomentum:p=!0}=i;return{...i,drag:l,dragDirectionLock:o,dragPropagation:u,dragConstraints:h,dragElastic:f,dragMomentum:p}}}function tr(a,i,l){return(i===!0||i===a)&&(l===null||l===a)}function Hx(a,i=10){let l=null;return Math.abs(a.y)>i?l="y":Math.abs(a.x)>i&&(l="x"),l}class Ix extends Pa{constructor(i){super(i),this.removeGroupControls=_n,this.removeListeners=_n,this.controls=new qx(i)}mount(){const{dragControls:i}=this.node.getProps();i&&(this.removeGroupControls=i.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||_n}unmount(){this.removeGroupControls(),this.removeListeners()}}const qv=a=>(i,l)=>{a&&ue.postRender(()=>a(i,l))};class Gx extends Pa{constructor(){super(...arguments),this.removePointerDownListener=_n}onPointerDown(i){this.session=new Q0(i,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ny(this.node)})}createPanHandlers(){const{onPanSessionStart:i,onPanStart:l,onPan:o,onPanEnd:u}=this.node.getProps();return{onSessionStart:qv(i),onStart:qv(l),onMove:o,onEnd:(h,f)=>{delete this.session,u&&ue.postRender(()=>u(h,f))}}}mount(){this.removePointerDownListener=jl(this.node.current,"pointerdown",i=>this.onPointerDown(i))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const lr={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Hv(a,i){return i.max===i.min?0:a/(i.max-i.min)*100}const vl={correct:(a,i)=>{if(!i.target)return a;if(typeof a=="string")if(yt.test(a))a=parseFloat(a);else return a;const l=Hv(a,i.target.x),o=Hv(a,i.target.y);return`${l}% ${o}%`}},Yx={correct:(a,{treeScale:i,projectionDelta:l})=>{const o=a,u=Qa.parse(a);if(u.length>5)return o;const h=Qa.createTransformer(a),f=typeof u[0]!="number"?1:0,p=l.x.scale*i.x,v=l.y.scale*i.y;u[0+f]/=p,u[1+f]/=v;const g=ge(p,v,.5);return typeof u[2+f]=="number"&&(u[2+f]/=g),typeof u[3+f]=="number"&&(u[3+f]/=g),h(u)}};class Zx extends S.Component{componentDidMount(){const{visualElement:i,layoutGroup:l,switchLayoutGroup:o,layoutId:u}=this.props,{projection:h}=i;gS(Kx),h&&(l.group&&l.group.add(h),o&&o.register&&u&&o.register(h),h.root.didUpdate(),h.addEventListener("animationComplete",()=>{this.safeToRemove()}),h.setOptions({...h.options,onExitComplete:()=>this.safeToRemove()})),lr.hasEverUpdated=!0}getSnapshotBeforeUpdate(i){const{layoutDependency:l,visualElement:o,drag:u,isPresent:h}=this.props,f=o.projection;return f&&(f.isPresent=h,u||i.layoutDependency!==l||l===void 0?f.willUpdate():this.safeToRemove(),i.isPresent!==h&&(h?f.promote():f.relegate()||ue.postRender(()=>{const p=f.getStack();(!p||!p.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:i}=this.props.visualElement;i&&(i.root.didUpdate(),jd.postRender(()=>{!i.currentAnimation&&i.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:i,layoutGroup:l,switchLayoutGroup:o}=this.props,{projection:u}=i;u&&(u.scheduleCheckAfterUnmount(),l&&l.group&&l.group.remove(u),o&&o.deregister&&o.deregister(u))}safeToRemove(){const{safeToRemove:i}=this.props;i&&i()}render(){return null}}function ay(a){const[i,l]=Hg(),o=S.useContext(gd);return d.jsx(Zx,{...a,layoutGroup:o,switchLayoutGroup:S.useContext(Pg),isPresent:i,safeToRemove:l})}const Kx={borderRadius:{...vl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:vl,borderTopRightRadius:vl,borderBottomLeftRadius:vl,borderBottomRightRadius:vl,boxShadow:Yx};function Xx(a,i,l){const o=Fe(a)?a:Dl(a);return o.start(Pd("",o,i,l)),o.animation}function Qx(a){return a instanceof SVGElement&&a.tagName!=="svg"}const Px=(a,i)=>a.depth-i.depth;class Fx{constructor(){this.children=[],this.isDirty=!1}add(i){zd(this.children,i),this.isDirty=!0}remove(i){Bd(this.children,i),this.isDirty=!0}forEach(i){this.isDirty&&this.children.sort(Px),this.isDirty=!1,this.children.forEach(i)}}function Jx(a,i){const l=Qn.now(),o=({timestamp:u})=>{const h=u-l;h>=i&&(Xa(o),a(h-i))};return ue.read(o,!0),()=>Xa(o)}const sy=["TopLeft","TopRight","BottomLeft","BottomRight"],$x=sy.length,Iv=a=>typeof a=="string"?parseFloat(a):a,Gv=a=>typeof a=="number"||yt.test(a);function Wx(a,i,l,o,u,h){u?(a.opacity=ge(0,l.opacity!==void 0?l.opacity:1,t2(o)),a.opacityExit=ge(i.opacity!==void 0?i.opacity:1,0,e2(o))):h&&(a.opacity=ge(i.opacity!==void 0?i.opacity:1,l.opacity!==void 0?l.opacity:1,o));for(let f=0;f<$x;f++){const p=`border${sy[f]}Radius`;let v=Yv(i,p),g=Yv(l,p);if(v===void 0&&g===void 0)continue;v||(v=0),g||(g=0),v===0||g===0||Gv(v)===Gv(g)?(a[p]=Math.max(ge(Iv(v),Iv(g),o),0),(Xn.test(g)||Xn.test(v))&&(a[p]+="%")):a[p]=g}(i.rotate||l.rotate)&&(a.rotate=ge(i.rotate||0,l.rotate||0,o))}function Yv(a,i){return a[i]!==void 0?a[i]:a.borderRadius}const t2=iy(0,.5,S0),e2=iy(.5,.95,_n);function iy(a,i,l){return o=>o<a?0:o>i?1:l(vi(a,i,o))}function Zv(a,i){a.min=i.min,a.max=i.max}function Mn(a,i){Zv(a.x,i.x),Zv(a.y,i.y)}function Kv(a,i){a.translate=i.translate,a.scale=i.scale,a.originPoint=i.originPoint,a.origin=i.origin}function Xv(a,i,l,o,u){return a-=i,a=hr(a,1/l,o),u!==void 0&&(a=hr(a,1/u,o)),a}function n2(a,i=0,l=1,o=.5,u,h=a,f=a){if(Xn.test(i)&&(i=parseFloat(i),i=ge(f.min,f.max,i/100)-f.min),typeof i!="number")return;let p=ge(h.min,h.max,o);a===h&&(p-=i),a.min=Xv(a.min,i,l,p,u),a.max=Xv(a.max,i,l,p,u)}function Qv(a,i,[l,o,u],h,f){n2(a,i[l],i[o],i[u],i.scale,h,f)}const a2=["x","scaleX","originX"],s2=["y","scaleY","originY"];function Pv(a,i,l,o){Qv(a.x,i,a2,l?l.x:void 0,o?o.x:void 0),Qv(a.y,i,s2,l?l.y:void 0,o?o.y:void 0)}function Fv(a){return a.translate===0&&a.scale===1}function ly(a){return Fv(a.x)&&Fv(a.y)}function Jv(a,i){return a.min===i.min&&a.max===i.max}function i2(a,i){return Jv(a.x,i.x)&&Jv(a.y,i.y)}function $v(a,i){return Math.round(a.min)===Math.round(i.min)&&Math.round(a.max)===Math.round(i.max)}function oy(a,i){return $v(a.x,i.x)&&$v(a.y,i.y)}function Wv(a){return Sn(a.x)/Sn(a.y)}function tg(a,i){return a.translate===i.translate&&a.scale===i.scale&&a.originPoint===i.originPoint}class l2{constructor(){this.members=[]}add(i){zd(this.members,i),i.scheduleRender()}remove(i){if(Bd(this.members,i),i===this.prevLead&&(this.prevLead=void 0),i===this.lead){const l=this.members[this.members.length-1];l&&this.promote(l)}}relegate(i){const l=this.members.findIndex(u=>i===u);if(l===0)return!1;let o;for(let u=l;u>=0;u--){const h=this.members[u];if(h.isPresent!==!1){o=h;break}}return o?(this.promote(o),!0):!1}promote(i,l){const o=this.lead;if(i!==o&&(this.prevLead=o,this.lead=i,i.show(),o)){o.instance&&o.scheduleRender(),i.scheduleRender(),i.resumeFrom=o,l&&(i.resumeFrom.preserveOpacity=!0),o.snapshot&&(i.snapshot=o.snapshot,i.snapshot.latestValues=o.animationValues||o.latestValues),i.root&&i.root.isUpdating&&(i.isLayoutDirty=!0);const{crossfade:u}=i.options;u===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(i=>{const{options:l,resumingFrom:o}=i;l.onExitComplete&&l.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(i=>{i.instance&&i.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function o2(a,i,l){let o="";const u=a.x.translate/i.x,h=a.y.translate/i.y,f=(l==null?void 0:l.z)||0;if((u||h||f)&&(o=`translate3d(${u}px, ${h}px, ${f}px) `),(i.x!==1||i.y!==1)&&(o+=`scale(${1/i.x}, ${1/i.y}) `),l){const{transformPerspective:g,rotate:b,rotateX:_,rotateY:x,skewX:E,skewY:M}=l;g&&(o=`perspective(${g}px) ${o}`),b&&(o+=`rotate(${b}deg) `),_&&(o+=`rotateX(${_}deg) `),x&&(o+=`rotateY(${x}deg) `),E&&(o+=`skewX(${E}deg) `),M&&(o+=`skewY(${M}deg) `)}const p=a.x.scale*i.x,v=a.y.scale*i.y;return(p!==1||v!==1)&&(o+=`scale(${p}, ${v})`),o||"none"}const ys={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},_l=typeof window<"u"&&window.MotionDebug!==void 0,Hu=["","X","Y","Z"],r2={visibility:"hidden"},eg=1e3;let c2=0;function Iu(a,i,l,o){const{latestValues:u}=i;u[a]&&(l[a]=u[a],i.setStaticValue(a,0),o&&(o[a]=0))}function ry(a){if(a.hasCheckedOptimisedAppear=!0,a.root===a)return;const{visualElement:i}=a.options;if(!i)return;const l=d0(i);if(window.MotionHasOptimisedAnimation(l,"transform")){const{layout:u,layoutId:h}=a.options;window.MotionCancelOptimisedAnimation(l,"transform",ue,!(u||h))}const{parent:o}=a;o&&!o.hasCheckedOptimisedAppear&&ry(o)}function cy({attachResizeListener:a,defaultParent:i,measureScroll:l,checkIsScrollRoot:o,resetTransform:u}){return class{constructor(f={},p=i==null?void 0:i()){this.id=c2++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,_l&&(ys.totalNodes=ys.resolvedTargetDeltas=ys.recalculatedProjection=0),this.nodes.forEach(f2),this.nodes.forEach(g2),this.nodes.forEach(y2),this.nodes.forEach(h2),_l&&window.MotionDebug.record(ys)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=f,this.root=p?p.root||p:this,this.path=p?[...p.path,p]:[],this.parent=p,this.depth=p?p.depth+1:0;for(let v=0;v<this.path.length;v++)this.path[v].shouldResetTransform=!0;this.root===this&&(this.nodes=new Fx)}addEventListener(f,p){return this.eventHandlers.has(f)||this.eventHandlers.set(f,new Ud),this.eventHandlers.get(f).add(p)}notifyListeners(f,...p){const v=this.eventHandlers.get(f);v&&v.notify(...p)}hasListeners(f){return this.eventHandlers.has(f)}mount(f,p=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Qx(f),this.instance=f;const{layoutId:v,layout:g,visualElement:b}=this.options;if(b&&!b.current&&b.mount(f),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),p&&(g||v)&&(this.isLayoutDirty=!0),a){let _;const x=()=>this.root.updateBlockedByResize=!1;a(f,()=>{this.root.updateBlockedByResize=!0,_&&_(),_=Jx(x,250),lr.hasAnimatedSinceResize&&(lr.hasAnimatedSinceResize=!1,this.nodes.forEach(ag))})}v&&this.root.registerSharedNode(v,this),this.options.animate!==!1&&b&&(v||g)&&this.addEventListener("didUpdate",({delta:_,hasLayoutChanged:x,hasRelativeTargetChanged:E,layout:M})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const R=this.options.transition||b.getDefaultTransition()||x2,{onLayoutAnimationStart:K,onLayoutAnimationComplete:O}=b.getProps(),P=!this.targetLayout||!oy(this.targetLayout,M)||E,Y=!x&&E;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||Y||x&&(P||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(_,Y);const et={...Od(R,"layout"),onPlay:K,onComplete:O};(b.shouldReduceMotion||this.options.layoutRoot)&&(et.delay=0,et.type=!1),this.startAnimation(et)}else x||ag(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=M})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const f=this.getStack();f&&f.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Xa(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(b2),this.animationId++)}getTransformTemplate(){const{visualElement:f}=this.options;return f&&f.getProps().transformTemplate}willUpdate(f=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ry(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let b=0;b<this.path.length;b++){const _=this.path[b];_.shouldResetTransform=!0,_.updateScroll("snapshot"),_.options.layoutRoot&&_.willUpdate(!1)}const{layoutId:p,layout:v}=this.options;if(p===void 0&&!v)return;const g=this.getTransformTemplate();this.prevTransformTemplateValue=g?g(this.latestValues,""):void 0,this.updateSnapshot(),f&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ng);return}this.isUpdating||this.nodes.forEach(p2),this.isUpdating=!1,this.nodes.forEach(v2),this.nodes.forEach(u2),this.nodes.forEach(d2),this.clearAllSnapshots();const p=Qn.now();Qe.delta=ga(0,1e3/60,p-Qe.timestamp),Qe.timestamp=p,Qe.isProcessing=!0,Ru.update.process(Qe),Ru.preRender.process(Qe),Ru.render.process(Qe),Qe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,jd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(m2),this.sharedNodes.forEach(_2)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ue.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ue.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let v=0;v<this.path.length;v++)this.path[v].updateScroll();const f=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Ne(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:p}=this.options;p&&p.notify("LayoutMeasure",this.layout.layoutBox,f?f.layoutBox:void 0)}updateScroll(f="measure"){let p=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===f&&(p=!1),p){const v=o(this.instance);this.scroll={animationId:this.root.animationId,phase:f,isRoot:v,offset:l(this.instance),wasRoot:this.scroll?this.scroll.isRoot:v}}}resetTransform(){if(!u)return;const f=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,p=this.projectionDelta&&!ly(this.projectionDelta),v=this.getTransformTemplate(),g=v?v(this.latestValues,""):void 0,b=g!==this.prevTransformTemplateValue;f&&(p||gs(this.latestValues)||b)&&(u(this.instance,g),this.shouldResetTransform=!1,this.scheduleRender())}measure(f=!0){const p=this.measurePageBox();let v=this.removeElementScroll(p);return f&&(v=this.removeTransform(v)),j2(v),{animationId:this.root.animationId,measuredBox:p,layoutBox:v,latestValues:{},source:this.id}}measurePageBox(){var f;const{visualElement:p}=this.options;if(!p)return Ne();const v=p.measureViewportBox();if(!(((f=this.scroll)===null||f===void 0?void 0:f.wasRoot)||this.path.some(A2))){const{scroll:b}=this.root;b&&(hi(v.x,b.offset.x),hi(v.y,b.offset.y))}return v}removeElementScroll(f){var p;const v=Ne();if(Mn(v,f),!((p=this.scroll)===null||p===void 0)&&p.wasRoot)return v;for(let g=0;g<this.path.length;g++){const b=this.path[g],{scroll:_,options:x}=b;b!==this.root&&_&&x.layoutScroll&&(_.wasRoot&&Mn(v,f),hi(v.x,_.offset.x),hi(v.y,_.offset.y))}return v}applyTransform(f,p=!1){const v=Ne();Mn(v,f);for(let g=0;g<this.path.length;g++){const b=this.path[g];!p&&b.options.layoutScroll&&b.scroll&&b!==b.root&&mi(v,{x:-b.scroll.offset.x,y:-b.scroll.offset.y}),gs(b.latestValues)&&mi(v,b.latestValues)}return gs(this.latestValues)&&mi(v,this.latestValues),v}removeTransform(f){const p=Ne();Mn(p,f);for(let v=0;v<this.path.length;v++){const g=this.path[v];if(!g.instance||!gs(g.latestValues))continue;od(g.latestValues)&&g.updateSnapshot();const b=Ne(),_=g.measurePageBox();Mn(b,_),Pv(p,g.latestValues,g.snapshot?g.snapshot.layoutBox:void 0,b)}return gs(this.latestValues)&&Pv(p,this.latestValues),p}setTargetDelta(f){this.targetDelta=f,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(f){this.options={...this.options,...f,crossfade:f.crossfade!==void 0?f.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Qe.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(f=!1){var p;const v=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=v.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=v.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=v.isSharedProjectionDirty);const g=!!this.resumingFrom||this!==v;if(!(f||g&&this.isSharedProjectionDirty||this.isProjectionDirty||!((p=this.parent)===null||p===void 0)&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:_,layoutId:x}=this.options;if(!(!this.layout||!(_||x))){if(this.resolvedRelativeTargetAt=Qe.timestamp,!this.targetDelta&&!this.relativeTarget){const E=this.getClosestProjectingParent();E&&E.layout&&this.animationProgress!==1?(this.relativeParent=E,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ne(),this.relativeTargetOrigin=Ne(),Nl(this.relativeTargetOrigin,this.layout.layoutBox,E.layout.layoutBox),Mn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Ne(),this.targetWithTransforms=Ne()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Cx(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Mn(this.target,this.layout.layoutBox),ty(this.target,this.targetDelta)):Mn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const E=this.getClosestProjectingParent();E&&!!E.resumingFrom==!!this.resumingFrom&&!E.options.layoutScroll&&E.target&&this.animationProgress!==1?(this.relativeParent=E,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ne(),this.relativeTargetOrigin=Ne(),Nl(this.relativeTargetOrigin,this.target,E.target),Mn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}_l&&ys.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||od(this.parent.latestValues)||W0(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var f;const p=this.getLead(),v=!!this.resumingFrom||this!==p;let g=!0;if((this.isProjectionDirty||!((f=this.parent)===null||f===void 0)&&f.isProjectionDirty)&&(g=!1),v&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(g=!1),this.resolvedRelativeTargetAt===Qe.timestamp&&(g=!1),g)return;const{layout:b,layoutId:_}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(b||_))return;Mn(this.layoutCorrected,this.layout.layoutBox);const x=this.treeScale.x,E=this.treeScale.y;Ux(this.layoutCorrected,this.treeScale,this.path,v),p.layout&&!p.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(p.target=p.layout.layoutBox,p.targetWithTransforms=Ne());const{target:M}=p;if(!M){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Kv(this.prevProjectionDelta.x,this.projectionDelta.x),Kv(this.prevProjectionDelta.y,this.projectionDelta.y)),Al(this.projectionDelta,this.layoutCorrected,M,this.latestValues),(this.treeScale.x!==x||this.treeScale.y!==E||!tg(this.projectionDelta.x,this.prevProjectionDelta.x)||!tg(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",M)),_l&&ys.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(f=!0){var p;if((p=this.options.visualElement)===null||p===void 0||p.scheduleRender(),f){const v=this.getStack();v&&v.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=fi(),this.projectionDelta=fi(),this.projectionDeltaWithTransform=fi()}setAnimationOrigin(f,p=!1){const v=this.snapshot,g=v?v.latestValues:{},b={...this.latestValues},_=fi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!p;const x=Ne(),E=v?v.source:void 0,M=this.layout?this.layout.source:void 0,R=E!==M,K=this.getStack(),O=!K||K.members.length<=1,P=!!(R&&!O&&this.options.crossfade===!0&&!this.path.some(T2));this.animationProgress=0;let Y;this.mixTargetDelta=et=>{const X=et/1e3;sg(_.x,f.x,X),sg(_.y,f.y,X),this.setTargetDelta(_),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Nl(x,this.layout.layoutBox,this.relativeParent.layout.layoutBox),S2(this.relativeTarget,this.relativeTargetOrigin,x,X),Y&&i2(this.relativeTarget,Y)&&(this.isProjectionDirty=!1),Y||(Y=Ne()),Mn(Y,this.relativeTarget)),R&&(this.animationValues=b,Wx(b,g,this.latestValues,X,P,O)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=X},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(f){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Xa(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ue.update(()=>{lr.hasAnimatedSinceResize=!0,this.currentAnimation=Xx(0,eg,{...f,onUpdate:p=>{this.mixTargetDelta(p),f.onUpdate&&f.onUpdate(p)},onComplete:()=>{f.onComplete&&f.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const f=this.getStack();f&&f.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(eg),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const f=this.getLead();let{targetWithTransforms:p,target:v,layout:g,latestValues:b}=f;if(!(!p||!v||!g)){if(this!==f&&this.layout&&g&&uy(this.options.animationType,this.layout.layoutBox,g.layoutBox)){v=this.target||Ne();const _=Sn(this.layout.layoutBox.x);v.x.min=f.target.x.min,v.x.max=v.x.min+_;const x=Sn(this.layout.layoutBox.y);v.y.min=f.target.y.min,v.y.max=v.y.min+x}Mn(p,v),mi(p,b),Al(this.projectionDeltaWithTransform,this.layoutCorrected,p,b)}}registerSharedNode(f,p){this.sharedNodes.has(f)||this.sharedNodes.set(f,new l2),this.sharedNodes.get(f).add(p);const g=p.options.initialPromotionConfig;p.promote({transition:g?g.transition:void 0,preserveFollowOpacity:g&&g.shouldPreserveFollowOpacity?g.shouldPreserveFollowOpacity(p):void 0})}isLead(){const f=this.getStack();return f?f.lead===this:!0}getLead(){var f;const{layoutId:p}=this.options;return p?((f=this.getStack())===null||f===void 0?void 0:f.lead)||this:this}getPrevLead(){var f;const{layoutId:p}=this.options;return p?(f=this.getStack())===null||f===void 0?void 0:f.prevLead:void 0}getStack(){const{layoutId:f}=this.options;if(f)return this.root.sharedNodes.get(f)}promote({needsReset:f,transition:p,preserveFollowOpacity:v}={}){const g=this.getStack();g&&g.promote(this,v),f&&(this.projectionDelta=void 0,this.needsReset=!0),p&&this.setOptions({transition:p})}relegate(){const f=this.getStack();return f?f.relegate(this):!1}resetSkewAndRotation(){const{visualElement:f}=this.options;if(!f)return;let p=!1;const{latestValues:v}=f;if((v.z||v.rotate||v.rotateX||v.rotateY||v.rotateZ||v.skewX||v.skewY)&&(p=!0),!p)return;const g={};v.z&&Iu("z",f,g,this.animationValues);for(let b=0;b<Hu.length;b++)Iu(`rotate${Hu[b]}`,f,g,this.animationValues),Iu(`skew${Hu[b]}`,f,g,this.animationValues);f.render();for(const b in g)f.setStaticValue(b,g[b]),this.animationValues&&(this.animationValues[b]=g[b]);f.scheduleRender()}getProjectionStyles(f){var p,v;if(!this.instance||this.isSVG)return;if(!this.isVisible)return r2;const g={visibility:""},b=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,g.opacity="",g.pointerEvents=sr(f==null?void 0:f.pointerEvents)||"",g.transform=b?b(this.latestValues,""):"none",g;const _=this.getLead();if(!this.projectionDelta||!this.layout||!_.target){const R={};return this.options.layoutId&&(R.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,R.pointerEvents=sr(f==null?void 0:f.pointerEvents)||""),this.hasProjected&&!gs(this.latestValues)&&(R.transform=b?b({},""):"none",this.hasProjected=!1),R}const x=_.animationValues||_.latestValues;this.applyTransformsToTarget(),g.transform=o2(this.projectionDeltaWithTransform,this.treeScale,x),b&&(g.transform=b(x,g.transform));const{x:E,y:M}=this.projectionDelta;g.transformOrigin=`${E.origin*100}% ${M.origin*100}% 0`,_.animationValues?g.opacity=_===this?(v=(p=x.opacity)!==null&&p!==void 0?p:this.latestValues.opacity)!==null&&v!==void 0?v:1:this.preserveOpacity?this.latestValues.opacity:x.opacityExit:g.opacity=_===this?x.opacity!==void 0?x.opacity:"":x.opacityExit!==void 0?x.opacityExit:0;for(const R in rr){if(x[R]===void 0)continue;const{correct:K,applyTo:O}=rr[R],P=g.transform==="none"?x[R]:K(x[R],_);if(O){const Y=O.length;for(let et=0;et<Y;et++)g[O[et]]=P}else g[R]=P}return this.options.layoutId&&(g.pointerEvents=_===this?sr(f==null?void 0:f.pointerEvents)||"":"none"),g}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(f=>{var p;return(p=f.currentAnimation)===null||p===void 0?void 0:p.stop()}),this.root.nodes.forEach(ng),this.root.sharedNodes.clear()}}}function u2(a){a.updateLayout()}function d2(a){var i;const l=((i=a.resumeFrom)===null||i===void 0?void 0:i.snapshot)||a.snapshot;if(a.isLead()&&a.layout&&l&&a.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:u}=a.layout,{animationType:h}=a.options,f=l.source!==a.layout.source;h==="size"?Rn(_=>{const x=f?l.measuredBox[_]:l.layoutBox[_],E=Sn(x);x.min=o[_].min,x.max=x.min+E}):uy(h,l.layoutBox,o)&&Rn(_=>{const x=f?l.measuredBox[_]:l.layoutBox[_],E=Sn(o[_]);x.max=x.min+E,a.relativeTarget&&!a.currentAnimation&&(a.isProjectionDirty=!0,a.relativeTarget[_].max=a.relativeTarget[_].min+E)});const p=fi();Al(p,o,l.layoutBox);const v=fi();f?Al(v,a.applyTransform(u,!0),l.measuredBox):Al(v,o,l.layoutBox);const g=!ly(p);let b=!1;if(!a.resumeFrom){const _=a.getClosestProjectingParent();if(_&&!_.resumeFrom){const{snapshot:x,layout:E}=_;if(x&&E){const M=Ne();Nl(M,l.layoutBox,x.layoutBox);const R=Ne();Nl(R,o,E.layoutBox),oy(M,R)||(b=!0),_.options.layoutRoot&&(a.relativeTarget=R,a.relativeTargetOrigin=M,a.relativeParent=_)}}}a.notifyListeners("didUpdate",{layout:o,snapshot:l,delta:v,layoutDelta:p,hasLayoutChanged:g,hasRelativeTargetChanged:b})}else if(a.isLead()){const{onExitComplete:o}=a.options;o&&o()}a.options.transition=void 0}function f2(a){_l&&ys.totalNodes++,a.parent&&(a.isProjecting()||(a.isProjectionDirty=a.parent.isProjectionDirty),a.isSharedProjectionDirty||(a.isSharedProjectionDirty=!!(a.isProjectionDirty||a.parent.isProjectionDirty||a.parent.isSharedProjectionDirty)),a.isTransformDirty||(a.isTransformDirty=a.parent.isTransformDirty))}function h2(a){a.isProjectionDirty=a.isSharedProjectionDirty=a.isTransformDirty=!1}function m2(a){a.clearSnapshot()}function ng(a){a.clearMeasurements()}function p2(a){a.isLayoutDirty=!1}function v2(a){const{visualElement:i}=a.options;i&&i.getProps().onBeforeLayoutMeasure&&i.notify("BeforeLayoutMeasure"),a.resetTransform()}function ag(a){a.finishAnimation(),a.targetDelta=a.relativeTarget=a.target=void 0,a.isProjectionDirty=!0}function g2(a){a.resolveTargetDelta()}function y2(a){a.calcProjection()}function b2(a){a.resetSkewAndRotation()}function _2(a){a.removeLeadSnapshot()}function sg(a,i,l){a.translate=ge(i.translate,0,l),a.scale=ge(i.scale,1,l),a.origin=i.origin,a.originPoint=i.originPoint}function ig(a,i,l,o){a.min=ge(i.min,l.min,o),a.max=ge(i.max,l.max,o)}function S2(a,i,l,o){ig(a.x,i.x,l.x,o),ig(a.y,i.y,l.y,o)}function T2(a){return a.animationValues&&a.animationValues.opacityExit!==void 0}const x2={duration:.45,ease:[.4,0,.1,1]},lg=a=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(a),og=lg("applewebkit/")&&!lg("chrome/")?Math.round:_n;function rg(a){a.min=og(a.min),a.max=og(a.max)}function j2(a){rg(a.x),rg(a.y)}function uy(a,i,l){return a==="position"||a==="preserve-aspect"&&!Ex(Wv(i),Wv(l),.2)}function A2(a){var i;return a!==a.root&&((i=a.scroll)===null||i===void 0?void 0:i.wasRoot)}const N2=cy({attachResizeListener:(a,i)=>wl(a,"resize",i),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Gu={current:void 0},dy=cy({measureScroll:a=>({x:a.scrollLeft,y:a.scrollTop}),defaultParent:()=>{if(!Gu.current){const a=new N2({});a.mount(window),a.setOptions({layoutScroll:!0}),Gu.current=a}return Gu.current},resetTransform:(a,i)=>{a.style.transform=i!==void 0?i:"none"},checkIsScrollRoot:a=>window.getComputedStyle(a).position==="fixed"}),E2={pan:{Feature:Gx},drag:{Feature:Ix,ProjectionNode:dy,MeasureLayout:ay}};function C2(a,i,l){var o;if(a instanceof Element)return[a];if(typeof a=="string"){let u=document;const h=(o=void 0)!==null&&o!==void 0?o:u.querySelectorAll(a);return h?Array.from(h):[]}return Array.from(a)}function fy(a,i){const l=C2(a),o=new AbortController,u={passive:!0,...i,signal:o.signal};return[l,u,()=>o.abort()]}function cg(a){return i=>{i.pointerType==="touch"||X0()||a(i)}}function D2(a,i,l={}){const[o,u,h]=fy(a,l),f=cg(p=>{const{target:v}=p,g=i(p);if(typeof g!="function"||!v)return;const b=cg(_=>{g(_),v.removeEventListener("pointerleave",b)});v.addEventListener("pointerleave",b,u)});return o.forEach(p=>{p.addEventListener("pointerenter",f,u)}),h}function ug(a,i,l){const{props:o}=a;a.animationState&&o.whileHover&&a.animationState.setActive("whileHover",l==="Start");const u="onHover"+l,h=o[u];h&&ue.postRender(()=>h(i,zl(i)))}class k2 extends Pa{mount(){const{current:i}=this.node;i&&(this.unmount=D2(i,l=>(ug(this.node,l,"Start"),o=>ug(this.node,o,"End"))))}unmount(){}}class w2 extends Pa{constructor(){super(...arguments),this.isActive=!1}onFocus(){let i=!1;try{i=this.node.current.matches(":focus-visible")}catch{i=!0}!i||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ol(wl(this.node.current,"focus",()=>this.onFocus()),wl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const hy=(a,i)=>i?a===i?!0:hy(a,i.parentElement):!1,M2=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function R2(a){return M2.has(a.tagName)||a.tabIndex!==-1}const Sl=new WeakSet;function dg(a){return i=>{i.key==="Enter"&&a(i)}}function Yu(a,i){a.dispatchEvent(new PointerEvent("pointer"+i,{isPrimary:!0,bubbles:!0}))}const O2=(a,i)=>{const l=a.currentTarget;if(!l)return;const o=dg(()=>{if(Sl.has(l))return;Yu(l,"down");const u=dg(()=>{Yu(l,"up")}),h=()=>Yu(l,"cancel");l.addEventListener("keyup",u,i),l.addEventListener("blur",h,i)});l.addEventListener("keydown",o,i),l.addEventListener("blur",()=>l.removeEventListener("keydown",o),i)};function fg(a){return Fd(a)&&!X0()}function z2(a,i,l={}){const[o,u,h]=fy(a,l),f=p=>{const v=p.currentTarget;if(!fg(p)||Sl.has(v))return;Sl.add(v);const g=i(p),b=(E,M)=>{window.removeEventListener("pointerup",_),window.removeEventListener("pointercancel",x),!(!fg(E)||!Sl.has(v))&&(Sl.delete(v),typeof g=="function"&&g(E,{success:M}))},_=E=>{b(E,l.useGlobalTarget||hy(v,E.target))},x=E=>{b(E,!1)};window.addEventListener("pointerup",_,u),window.addEventListener("pointercancel",x,u)};return o.forEach(p=>{!R2(p)&&p.getAttribute("tabindex")===null&&(p.tabIndex=0),(l.useGlobalTarget?window:p).addEventListener("pointerdown",f,u),p.addEventListener("focus",g=>O2(g,u),u)}),h}function hg(a,i,l){const{props:o}=a;a.animationState&&o.whileTap&&a.animationState.setActive("whileTap",l==="Start");const u="onTap"+(l==="End"?"":l),h=o[u];h&&ue.postRender(()=>h(i,zl(i)))}class B2 extends Pa{mount(){const{current:i}=this.node;i&&(this.unmount=z2(i,l=>(hg(this.node,l,"Start"),(o,{success:u})=>hg(this.node,o,u?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const cd=new WeakMap,Zu=new WeakMap,U2=a=>{const i=cd.get(a.target);i&&i(a)},V2=a=>{a.forEach(U2)};function L2({root:a,...i}){const l=a||document;Zu.has(l)||Zu.set(l,{});const o=Zu.get(l),u=JSON.stringify(i);return o[u]||(o[u]=new IntersectionObserver(V2,{root:a,...i})),o[u]}function q2(a,i,l){const o=L2(i);return cd.set(a,l),o.observe(a),()=>{cd.delete(a),o.unobserve(a)}}const H2={some:0,all:1};class I2 extends Pa{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:i={}}=this.node.getProps(),{root:l,margin:o,amount:u="some",once:h}=i,f={root:l?l.current:void 0,rootMargin:o,threshold:typeof u=="number"?u:H2[u]},p=v=>{const{isIntersecting:g}=v;if(this.isInView===g||(this.isInView=g,h&&!g&&this.hasEnteredView))return;g&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",g);const{onViewportEnter:b,onViewportLeave:_}=this.node.getProps(),x=g?b:_;x&&x(v)};return q2(this.node.current,f,p)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:i,prevProps:l}=this.node;["amount","margin","root"].some(G2(i,l))&&this.startObserver()}unmount(){}}function G2({viewport:a={}},{viewport:i={}}={}){return l=>a[l]!==i[l]}const Y2={inView:{Feature:I2},tap:{Feature:B2},focus:{Feature:w2},hover:{Feature:k2}},Z2={layout:{ProjectionNode:dy,MeasureLayout:ay}},ud={current:null},my={current:!1};function K2(){if(my.current=!0,!!_d)if(window.matchMedia){const a=window.matchMedia("(prefers-reduced-motion)"),i=()=>ud.current=a.matches;a.addListener(i),i()}else ud.current=!1}const X2=[...z0,Pe,Qa],Q2=a=>X2.find(O0(a)),mg=new WeakMap;function P2(a,i,l){for(const o in i){const u=i[o],h=l[o];if(Fe(u))a.addValue(o,u);else if(Fe(h))a.addValue(o,Dl(u,{owner:a}));else if(h!==u)if(a.hasValue(o)){const f=a.getValue(o);f.liveStyle===!0?f.jump(u):f.hasAnimated||f.set(u)}else{const f=a.getStaticValue(o);a.addValue(o,Dl(f!==void 0?f:u,{owner:a}))}}for(const o in l)i[o]===void 0&&a.removeValue(o);return i}const pg=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class F2{scrapeMotionValuesFromProps(i,l,o){return{}}constructor({parent:i,props:l,presenceContext:o,reducedMotionConfig:u,blockInitialAnimation:h,visualState:f},p={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Kd,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const E=Qn.now();this.renderScheduledAt<E&&(this.renderScheduledAt=E,ue.render(this.render,!1,!0))};const{latestValues:v,renderState:g,onUpdate:b}=f;this.onUpdate=b,this.latestValues=v,this.baseTarget={...v},this.initialValues=l.initial?{...v}:{},this.renderState=g,this.parent=i,this.props=l,this.presenceContext=o,this.depth=i?i.depth+1:0,this.reducedMotionConfig=u,this.options=p,this.blockInitialAnimation=!!h,this.isControllingVariants=_r(l),this.isVariantNode=Xg(l),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(i&&i.current);const{willChange:_,...x}=this.scrapeMotionValuesFromProps(l,{},this);for(const E in x){const M=x[E];v[E]!==void 0&&Fe(M)&&M.set(v[E],!1)}}mount(i){this.current=i,mg.set(i,this),this.projection&&!this.projection.instance&&this.projection.mount(i),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((l,o)=>this.bindToMotionValue(o,l)),my.current||K2(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ud.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){mg.delete(this.current),this.projection&&this.projection.unmount(),Xa(this.notifyUpdate),Xa(this.render),this.valueSubscriptions.forEach(i=>i()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const i in this.events)this.events[i].clear();for(const i in this.features){const l=this.features[i];l&&(l.unmount(),l.isMounted=!1)}this.current=null}bindToMotionValue(i,l){this.valueSubscriptions.has(i)&&this.valueSubscriptions.get(i)();const o=Ss.has(i),u=l.on("change",p=>{this.latestValues[i]=p,this.props.onUpdate&&ue.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0)}),h=l.on("renderRequest",this.scheduleRender);let f;window.MotionCheckAppearSync&&(f=window.MotionCheckAppearSync(this,i,l)),this.valueSubscriptions.set(i,()=>{u(),h(),f&&f(),l.owner&&l.stop()})}sortNodePosition(i){return!this.current||!this.sortInstanceNodePosition||this.type!==i.type?0:this.sortInstanceNodePosition(this.current,i.current)}updateFeatures(){let i="animation";for(i in pi){const l=pi[i];if(!l)continue;const{isEnabled:o,Feature:u}=l;if(!this.features[i]&&u&&o(this.props)&&(this.features[i]=new u(this)),this.features[i]){const h=this.features[i];h.isMounted?h.update():(h.mount(),h.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ne()}getStaticValue(i){return this.latestValues[i]}setStaticValue(i,l){this.latestValues[i]=l}update(i,l){(i.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=i,this.prevPresenceContext=this.presenceContext,this.presenceContext=l;for(let o=0;o<pg.length;o++){const u=pg[o];this.propEventSubscriptions[u]&&(this.propEventSubscriptions[u](),delete this.propEventSubscriptions[u]);const h="on"+u,f=i[h];f&&(this.propEventSubscriptions[u]=this.on(u,f))}this.prevMotionValues=P2(this,this.scrapeMotionValuesFromProps(i,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(i){return this.props.variants?this.props.variants[i]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(i){const l=this.getClosestVariantNode();if(l)return l.variantChildren&&l.variantChildren.add(i),()=>l.variantChildren.delete(i)}addValue(i,l){const o=this.values.get(i);l!==o&&(o&&this.removeValue(i),this.bindToMotionValue(i,l),this.values.set(i,l),this.latestValues[i]=l.get())}removeValue(i){this.values.delete(i);const l=this.valueSubscriptions.get(i);l&&(l(),this.valueSubscriptions.delete(i)),delete this.latestValues[i],this.removeValueFromRenderState(i,this.renderState)}hasValue(i){return this.values.has(i)}getValue(i,l){if(this.props.values&&this.props.values[i])return this.props.values[i];let o=this.values.get(i);return o===void 0&&l!==void 0&&(o=Dl(l===null?void 0:l,{owner:this}),this.addValue(i,o)),o}readValue(i,l){var o;let u=this.latestValues[i]!==void 0||!this.current?this.latestValues[i]:(o=this.getBaseTargetFromProps(this.props,i))!==null&&o!==void 0?o:this.readValueFromInstance(this.current,i,this.options);return u!=null&&(typeof u=="string"&&(M0(u)||x0(u))?u=parseFloat(u):!Q2(u)&&Qa.test(l)&&(u=D0(i,l)),this.setBaseTarget(i,Fe(u)?u.get():u)),Fe(u)?u.get():u}setBaseTarget(i,l){this.baseTarget[i]=l}getBaseTarget(i){var l;const{initial:o}=this.props;let u;if(typeof o=="string"||typeof o=="object"){const f=Nd(this.props,o,(l=this.presenceContext)===null||l===void 0?void 0:l.custom);f&&(u=f[i])}if(o&&u!==void 0)return u;const h=this.getBaseTargetFromProps(this.props,i);return h!==void 0&&!Fe(h)?h:this.initialValues[i]!==void 0&&u===void 0?void 0:this.baseTarget[i]}on(i,l){return this.events[i]||(this.events[i]=new Ud),this.events[i].add(l)}notify(i,...l){this.events[i]&&this.events[i].notify(...l)}}class py extends F2{constructor(){super(...arguments),this.KeyframeResolver=B0}sortInstanceNodePosition(i,l){return i.compareDocumentPosition(l)&2?1:-1}getBaseTargetFromProps(i,l){return i.style?i.style[l]:void 0}removeValueFromRenderState(i,{vars:l,style:o}){delete l[i],delete o[i]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:i}=this.props;Fe(i)&&(this.childSubscription=i.on("change",l=>{this.current&&(this.current.textContent=`${l}`)}))}}function J2(a){return window.getComputedStyle(a)}class $2 extends py{constructor(){super(...arguments),this.type="html",this.renderInstance=n0}readValueFromInstance(i,l){if(Ss.has(l)){const o=Zd(l);return o&&o.default||0}else{const o=J2(i),u=(Wg(l)?o.getPropertyValue(l):o[l])||0;return typeof u=="string"?u.trim():u}}measureInstanceViewportBox(i,{transformPagePoint:l}){return ey(i,l)}build(i,l,o){Dd(i,l,o.transformTemplate)}scrapeMotionValuesFromProps(i,l,o){return Rd(i,l,o)}}class W2 extends py{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ne}getBaseTargetFromProps(i,l){return i[l]}readValueFromInstance(i,l){if(Ss.has(l)){const o=Zd(l);return o&&o.default||0}return l=a0.has(l)?l:xd(l),i.getAttribute(l)}scrapeMotionValuesFromProps(i,l,o){return l0(i,l,o)}build(i,l,o){kd(i,l,this.isSVGTag,o.transformTemplate)}renderInstance(i,l,o,u){s0(i,l,o,u)}mount(i){this.isSVGTag=Md(i.tagName),super.mount(i)}}const tj=(a,i)=>Ad(a)?new W2(i):new $2(i,{allowProjection:a!==S.Fragment}),ej=NS({...gx,...Y2,...E2,...Z2},tj),Pn=H_(ej);var Te;(function(a){a[a.UNSPECIFIED=0]="UNSPECIFIED",a[a.TEXT=1]="TEXT",a[a.TOOL_USE=2]="TOOL_USE",a[a.TOOL_RESULT=3]="TOOL_RESULT",a[a.ERROR=4]="ERROR",a[a.STATUS=5]="STATUS",a[a.SYSTEM=6]="SYSTEM",a[a.FINDING=7]="FINDING",a[a.SUBTASK_CREATE=8]="SUBTASK_CREATE",a[a.USER_INPUT=9]="USER_INPUT"})(Te||(Te={}));var qe;(function(a){a[a.UNSPECIFIED=0]="UNSPECIFIED",a[a.PENDING=1]="PENDING",a[a.ASSIGNED=2]="ASSIGNED",a[a.IN_PROGRESS=3]="IN_PROGRESS",a[a.REVIEW=4]="REVIEW",a[a.DONE=5]="DONE",a[a.FAILED=6]="FAILED",a[a.WAITING_INPUT=7]="WAITING_INPUT"})(qe||(qe={}));var Za;(function(a){a[a.UNSPECIFIED=0]="UNSPECIFIED",a[a.ACTIVE=1]="ACTIVE",a[a.ARCHIVED=2]="ARCHIVED"})(Za||(Za={}));var Ka;(function(a){a[a.UNSPECIFIED=0]="UNSPECIFIED",a[a.OPEN=1]="OPEN",a[a.CLOSED=2]="CLOSED"})(Ka||(Ka={}));const nj=8;Object.assign(Object.create(null),{"":Te.UNSPECIFIED,text:Te.TEXT,tool_use:Te.TOOL_USE,tool_result:Te.TOOL_RESULT,error:Te.ERROR,status:Te.STATUS,system:Te.SYSTEM,finding:Te.FINDING,subtask_create:Te.SUBTASK_CREATE,user_input:Te.USER_INPUT});Te.UNSPECIFIED+"",Te.TEXT+"",Te.TOOL_USE+"",Te.TOOL_RESULT+"",Te.ERROR+"",Te.STATUS+"",Te.SYSTEM+"",Te.FINDING+"",Te.SUBTASK_CREATE+"",Te.USER_INPUT+"";Object.assign(Object.create(null),{"":qe.UNSPECIFIED,pending:qe.PENDING,assigned:qe.ASSIGNED,in_progress:qe.IN_PROGRESS,review:qe.REVIEW,done:qe.DONE,failed:qe.FAILED,waiting_input:qe.WAITING_INPUT});qe.UNSPECIFIED+"",qe.PENDING+"",qe.ASSIGNED+"",qe.IN_PROGRESS+"",qe.REVIEW+"",qe.DONE+"",qe.FAILED+"",qe.WAITING_INPUT+"";Object.assign(Object.create(null),{"":Za.UNSPECIFIED,active:Za.ACTIVE,archived:Za.ARCHIVED});Za.UNSPECIFIED+"",Za.ACTIVE+"",Za.ARCHIVED+"";Object.assign(Object.create(null),{"":Ka.UNSPECIFIED,open:Ka.OPEN,closed:Ka.CLOSED});Ka.UNSPECIFIED+"",Ka.OPEN+"",Ka.CLOSED+"";const aj="_breadcrumbs_1s6xc_1",sj="_list_1s6xc_11",ij="_item_1s6xc_21",lj="_separator_1s6xc_28",oj="_link_1s6xc_34",rj="_current_1s6xc_57",ci={breadcrumbs:aj,list:sj,item:ij,separator:lj,link:oj,current:rj},cj="›";function ps({segments:a,onNavigate:i}){return d.jsx("nav",{className:ci.breadcrumbs,"aria-label":"Breadcrumb","data-testid":"breadcrumbs",children:d.jsx("ol",{className:ci.list,children:a.map((l,o)=>{const u=o===a.length-1;return d.jsxs("li",{className:ci.item,children:[o>0&&d.jsx("span",{className:ci.separator,"aria-hidden":"true",children:cj}),l.viewMode&&!u?d.jsx("button",{className:ci.link,onClick:()=>i(l),title:l.label,children:l.label}):d.jsx("span",{className:ci.current,"aria-current":"page",title:l.label,children:l.label})]},o)})})})}function dd(){dd=function(u,h){return new l(u,void 0,h)};var a=RegExp.prototype,i=new WeakMap;function l(u,h,f){var p=new RegExp(u,h);return i.set(p,f||i.get(u)),mr(p,l.prototype)}function o(u,h){var f=i.get(h);return Object.keys(f).reduce(function(p,v){var g=f[v];if(typeof g=="number")p[v]=u[g];else{for(var b=0;u[g[b]]===void 0&&b+1<g.length;)b++;p[v]=u[g[b]]}return p},Object.create(null))}return(function(u,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(h&&h.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),Object.defineProperty(u,"prototype",{writable:!1}),h&&mr(u,h)})(l,RegExp),l.prototype.exec=function(u){var h=a.exec.call(this,u);if(h){h.groups=o(h,this);var f=h.indices;f&&(f.groups=o(f,this))}return h},l.prototype[Symbol.replace]=function(u,h){if(typeof h=="string"){var f=i.get(this);return a[Symbol.replace].call(this,u,h.replace(/\$<([^>]+)>/g,function(v,g){var b=f[g];return"$"+(Array.isArray(b)?b.join("$"):b)}))}if(typeof h=="function"){var p=this;return a[Symbol.replace].call(this,u,function(){var v=arguments;return typeof v[v.length-1]!="object"&&(v=[].slice.call(v)).push(o(v,p)),h.apply(this,v)})}return a[Symbol.replace].call(this,u,h)},dd.apply(this,arguments)}function mr(a,i){return mr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,o){return l.__proto__=o,l},mr(a,i)}function vg(a,i){(i==null||i>a.length)&&(i=a.length);for(var l=0,o=new Array(i);l<i;l++)o[l]=a[l];return o}function Ku(a,i){var l=typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(l)return(l=l.call(a)).next.bind(l);if(Array.isArray(a)||(l=(function(u,h){if(u){if(typeof u=="string")return vg(u,h);var f=Object.prototype.toString.call(u).slice(8,-1);return f==="Object"&&u.constructor&&(f=u.constructor.name),f==="Map"||f==="Set"?Array.from(u):f==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f)?vg(u,h):void 0}})(a))||i){l&&(a=l);var o=0;return function(){return o>=a.length?{done:!0}:{done:!1,value:a[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
76
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var uj=(function(a){return function(i){return i===void 0&&(i={}),(function(o,u){if(u&&!o.registered(u))throw new Error('The default language "'+u+'" is not registered with refractor.')})(a,i.defaultLanguage),function(o){Rb(o,"element",l)};function l(o,u,h){var f,p;if(h&&h.tagName==="pre"&&o.tagName==="code"){var v=(o==null||(f=o.data)==null?void 0:f.meta)||(o==null||(p=o.properties)==null?void 0:p.metastring)||"";o.properties.className?typeof o.properties.className=="boolean"?o.properties.className=[]:Array.isArray(o.properties.className)||(o.properties.className=[o.properties.className]):o.properties.className=[];var g,b,_=(function(X){for(var L,tt=Ku(X.properties.className);!(L=tt()).done;){var U=L.value;if(U.slice(0,9)==="language-")return U.slice(9).toLowerCase()}return null})(o);if(!_&&i.defaultLanguage&&o.properties.className.push("language-"+(_=i.defaultLanguage)),o.properties.className.push("code-highlight"),_)try{var x,E;E=(x=_)!=null&&x.includes("diff-")?_.split("-")[1]:_,g=a.highlight(Fo(o),E),h.properties.className=(h.properties.className||[]).concat("language-"+E)}catch(X){if(!i.ignoreMissing||!/Unknown language/.test(X.message))throw X;g=o}else g=o;g.children=(b=1,function X(L){return L.reduce(function(tt,U){if(U.type==="text"){var nt=U.value,at=(nt.match(/\n/g)||"").length;if(at===0)U.position={start:{line:b,column:1},end:{line:b,column:1}},tt.push(U);else for(var mt,Dt=nt.split(`
77
+ `),$=Ku(Dt.entries());!(mt=$()).done;){var st=mt.value,St=st[0],B=st[1];tt.push({type:"text",value:St===Dt.length-1?B:B+`
78
+ `,position:{start:{line:b+St,column:1},end:{line:b+St,column:1}}})}return b+=at,tt}if(Object.prototype.hasOwnProperty.call(U,"children")){var Q=b;return U.children=X(U.children),tt.push(U),U.position={start:{line:Q,column:1},end:{line:b,column:1}},tt}return tt.push(U),tt},[])})(g.children),g.position=g.children.length>0?{start:{line:g.children[0].position.start.line,column:0},end:{line:g.children[g.children.length-1].position.end.line,column:0}}:{start:{line:0,column:0},end:{line:0,column:0}};for(var M,R=(function(X){var L=/{([\d,-]+)}/,tt=X.split(",").map(function(at){return at.trim()}).join();if(L.test(tt)){var U=L.exec(tt)[1],nt=zb(U);return function(at){return nt.includes(at+1)}}return function(){return!1}})(v),K=(function(X){var L=dd(/showLineNumbers=(\d+)/i,{lines:1});if(L.test(X)){var tt=L.exec(X);return Number(tt.groups.lines)}return 1})(v),O=(function(X){for(var L=new Array(X),tt=0;tt<X;tt++)L[tt]={type:"element",tagName:"span",properties:{className:[]},children:[]};return L})(g.position.end.line),P=["showlinenumbers=false",'showlinenumbers="false"',"showlinenumbers={false}"],Y=function(){var X,L,tt=M.value,U=tt[0],nt=tt[1];nt.properties.className=["code-line"];var at=Bb(g,function(mt){return mt.position.start.line<=U+1&&mt.position.end.line>=U+1});nt.children=at.children,(v.toLowerCase().includes("showLineNumbers".toLowerCase())||i.showLineNumbers===!0||typeof i.showLineNumbers=="object"&&i.showLineNumbers.includes(_))&&!P.some(function(mt){return v.toLowerCase().includes(mt)})&&(nt.properties.line=[(U+K).toString()],nt.properties.className.push("line-number")),R(U)&&nt.properties.className.push("highlight-line"),(_==="diff"||(X=_)!=null&&X.includes("diff-"))&&Fo(nt).substring(0,1)==="-"?nt.properties.className.push("deleted"):(_==="diff"||(L=_)!=null&&L.includes("diff-"))&&Fo(nt).substring(0,1)==="+"&&nt.properties.className.push("inserted")},et=Ku(O.entries());!(M=et()).done;)Y();O.length>0&&Fo(O[O.length-1]).trim()===""&&O.pop(),o.children=O}}}})(Ob);const dj="_systemEvent_1iozp_1",fj="_systemTimestamp_1iozp_9",hj="_textEvent_1iozp_13",mj="_toolUseEvent_1iozp_100",pj="_toolUseHeader_1iozp_116",vj="_toolUsePrefix_1iozp_123",gj="_toolUseName_1iozp_128",yj="_toolUseArgs_1iozp_133",bj="_toolResultEvent_1iozp_144",_j="_toolResultHeader_1iozp_150",Sj="_toolResultIndicatorOk_1iozp_174",Tj="_toolResultIndicatorError_1iozp_181",xj="_toolResultLabel_1iozp_188",jj="_toolResultToggle_1iozp_192",Aj="_toolResultCommand_1iozp_198",Nj="_toolResultEllipsis_1iozp_208",Ej="_toolResultPre_1iozp_212",Cj="_errorEvent_1iozp_227",Dj="_statusEvent_1iozp_236",kj="_userInputEvent_1iozp_246",wj="_userInputContent_1iozp_253",Mj="_defaultEvent_1iozp_265",ve={systemEvent:dj,systemTimestamp:fj,textEvent:hj,toolUseEvent:mj,toolUseHeader:pj,toolUsePrefix:vj,toolUseName:gj,toolUseArgs:yj,toolResultEvent:bj,toolResultHeader:_j,toolResultIndicatorOk:Sj,toolResultIndicatorError:Tj,toolResultLabel:xj,toolResultToggle:jj,toolResultCommand:Aj,toolResultEllipsis:Nj,toolResultPre:Ej,errorEvent:Cj,statusEvent:Dj,userInputEvent:kj,userInputContent:wj,defaultEvent:Mj};function Rj({time:a,content:i}){return d.jsxs("div",{className:ve.systemEvent,children:[d.jsxs("span",{className:ve.systemTimestamp,children:["[",a,"]"]})," ",i]})}function Oj({content:a}){return d.jsx("div",{className:ve.textEvent,children:d.jsx(fd,{remarkPlugins:[hd],rehypePlugins:[uj],children:a})})}function zj({content:a}){let i="",l=a;try{const o=JSON.parse(a);i=o.tool||"",l=JSON.stringify(o.args,null,2)??""}catch{}return d.jsxs("div",{className:ve.toolUseEvent,children:[d.jsxs("div",{className:ve.toolUseHeader,children:[d.jsx("span",{className:ve.toolUsePrefix,children:">"}),i?d.jsx("span",{className:ve.toolUseName,children:i}):null]}),d.jsx("pre",{className:ve.toolUseArgs,children:l})]})}const gg=5;function Bj(a,i){if(i==null)return"";if(typeof i!="object")return String(i);const l=i;if(typeof l.command=="string")return l.command;if(typeof l.file_path=="string")return l.file_path;if(typeof l.pattern=="string"){const o=typeof l.path=="string"?` in ${l.path}`:"";return`${l.pattern}${o}`}if(typeof l.path=="string")return l.path;if(typeof l.query=="string")return l.query;try{const o=JSON.stringify(i);return o.length>150?`${o.slice(0,150)}…`:o}catch{return""}}function Uj({content:a,raw:i,toolUseCtx:l}){const[o,u]=S.useState(!1);let h=!1;if(i)try{h=JSON.parse(i).is_error===!0}catch{}const f=a.split(`
79
79
  `),p=f.length>gg,v=o?a:f.slice(0,gg).join(`
80
- `),b=((l==null?void 0:l.tool)??"")||(h?"Tool error":"Tool output"),S=l?Bj(l.tool,l.args):"",x=d.jsxs(d.Fragment,{children:[d.jsx("span",{className:h?ve.toolResultIndicatorError:ve.toolResultIndicatorOk,"aria-label":h?"error":"success",children:h?"✗":"✓"}),d.jsx("span",{className:ve.toolResultLabel,children:b}),p&&d.jsx("span",{className:ve.toolResultToggle,"aria-hidden":"true",children:o?"▾":"▸"})]});return d.jsxs("div",{className:ve.toolResultEvent,children:[p?d.jsx("button",{className:ve.toolResultHeader,onClick:()=>{u(E=>!E)},"aria-expanded":o,children:x}):d.jsx("div",{className:ve.toolResultHeader,children:x}),S&&d.jsx("div",{className:ve.toolResultCommand,children:S}),d.jsxs("pre",{className:ve.toolResultPre,children:[v,!o&&p&&d.jsx("span",{className:ve.toolResultEllipsis,children:"…"})]})]})}function Vj({content:a}){return d.jsxs("div",{className:ve.errorEvent,children:["Error: ",a]})}function Lj({content:a}){return d.jsxs("div",{className:ve.statusEvent,children:["--- ",a," ---"]})}function qj({content:a}){return d.jsx("div",{className:ve.userInputEvent,children:d.jsx("span",{className:ve.userInputContent,children:a})})}function Hj({content:a}){return d.jsx("div",{className:ve.defaultEvent,children:a})}function vy({event:a,toolUseCtx:i}){const l=new Date(a.timestamp).toLocaleTimeString();switch(a.eventType){case"system":return d.jsx(Rj,{time:l,content:a.content});case"text":case"output":return d.jsx(Oj,{content:a.content});case"tool_use":return d.jsx(zj,{content:a.content});case"tool_result":return d.jsx(Uj,{content:a.content,raw:a.raw,toolUseCtx:i});case"error":return d.jsx(Vj,{content:a.content});case"status":return d.jsx(Lj,{content:a.content});case"user_input":return d.jsx(qj,{content:a.content});default:return d.jsx(Hj,{content:a.content})}}const Ij="_overlay_9j2g5_1",Gj="_dialog_9j2g5_11",Yj="_title_9j2g5_30",Zj="_description_9j2g5_38",Kj="_actions_9j2g5_45",Xj="_cancelButton_9j2g5_52",Qj="_confirmButton_9j2g5_79",vs={overlay:Ij,dialog:Gj,title:Yj,description:Zj,actions:Kj,cancelButton:Xj,confirmButton:Qj};function pr({isOpen:a,title:i,description:l,confirmLabel:o="Delete",onConfirm:u,onCancel:h}){const f=_.useId(),p=_.useId();return d.jsx(yi,{children:a&&d.jsx(Pn.div,{className:vs.overlay,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},onClick:h,onKeyDown:v=>{v.key==="Escape"&&h()},role:"dialog","aria-modal":"true","aria-labelledby":f,"aria-describedby":l?p:void 0,children:d.jsxs(Pn.div,{className:vs.dialog,initial:{opacity:0,scale:.93,y:-10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.93,y:-10},transition:{duration:.15,ease:[.16,1,.3,1]},onClick:v=>v.stopPropagation(),children:[d.jsx("h3",{id:f,className:vs.title,children:i}),l&&d.jsx("p",{id:p,className:vs.description,children:l}),d.jsxs("div",{className:vs.actions,children:[d.jsx("button",{type:"button",className:vs.cancelButton,onClick:h,autoFocus:!0,children:"Cancel"}),d.jsx("button",{type:"button",className:vs.confirmButton,onClick:u,children:o})]})]})})})}const Pj="_spinner_13c8l_1",Fj="_spin_13c8l_1",Jj="_sm_13c8l_14",$j="_md_13c8l_20",Wj="_lg_13c8l_26",yg={spinner:Pj,spin:Fj,sm:Jj,md:$j,lg:Wj};function bg({size:a="md",className:i,label:l="Loading",liveRegion:o=!1}){return d.jsx("span",{className:`${yg.spinner} ${yg[a]} ${i??""}`,role:o?"status":void 0,"aria-label":l,"aria-hidden":o?void 0:!0})}const tA="_container_1vu3l_1",eA="_header_1vu3l_5",nA="_addButton_1vu3l_17",aA="_createForm_1vu3l_44",sA="_createInput_1vu3l_50",iA="_createButton_1vu3l_81",lA="_creatingHint_1vu3l_122",oA="_projectRow_1vu3l_131",rA="_selected_1vu3l_149",cA="_expandArrow_1vu3l_154",uA="_expanded_1vu3l_161",dA="_projectName_1vu3l_165",fA="_taskCount_1vu3l_169",hA="_newTaskButton_1vu3l_175",mA="_taskRow_1vu3l_202",pA="_taskStatusIcon_1vu3l_227",vA="_taskTitle_1vu3l_231",gA="_dependencyBadge_1vu3l_238",yA="_blockedBadge_1vu3l_250",bA="_leafSpacer_1vu3l_255",SA="_childCountBadge_1vu3l_260",_A="_addChildButton_1vu3l_273",TA="_emptyCta_1vu3l_317",xA="_ctaDescription_1vu3l_330",jA="_ctaButton_1vu3l_336",AA="_emptyTaskCta_1vu3l_371",NA="_createTaskLink_1vu3l_376",Zt={container:tA,header:eA,addButton:nA,createForm:aA,createInput:sA,createButton:iA,creatingHint:lA,projectRow:oA,selected:rA,expandArrow:cA,expanded:uA,projectName:dA,taskCount:fA,newTaskButton:hA,taskRow:mA,taskStatusIcon:pA,taskTitle:vA,dependencyBadge:gA,blockedBadge:yA,leafSpacer:bA,childCountBadge:SA,addChildButton:_A,emptyCta:TA,ctaDescription:xA,ctaButton:jA,emptyTaskCta:AA,createTaskLink:NA},Sg={pending:{color:"var(--text-tertiary)",icon:"○"},assigned:{color:"var(--accent-blue)",icon:"◎"},in_progress:{color:"var(--accent-green)",icon:"●"},review:{color:"var(--accent-yellow)",icon:"◉"},done:{color:"var(--accent-green)",icon:"✓"},failed:{color:"var(--accent-red)",icon:"✗"},waiting_input:{color:"var(--accent-yellow)",icon:"⧖"}};function EA(a){const i=new Map(a.map(o=>[o.id,{...o,children:[]}])),l=[];for(const o of i.values())o.parentTaskId&&i.has(o.parentTaskId)?i.get(o.parentTaskId).children.push(o):l.push(o);for(const o of i.values())o.children.sort((u,h)=>u.sortOrder-h.sortOrder);return l.sort((o,u)=>o.sortOrder-u.sortOrder)}const CA=34,DA=16;function gy({node:a,depth:i,expandedTasks:l,toggleTask:o,selectedTaskId:u,setViewMode:h,projectId:f,taskStatusById:p}){const{personas:v}=On(),g=Sg[a.status]||Sg.pending,b=a.dependsOn.length>0&&a.dependsOn.some(R=>p.get(R)!=="done"),S=l.has(a.id),x=a.children.length>0,E=u===a.id,M=CA+i*DA;return d.jsxs(d.Fragment,{children:[d.jsxs("div",{onClick:()=>h({kind:"task",taskId:a.id}),className:`${Zt.taskRow} ${E?Zt.selected:""}`,style:{paddingLeft:M},"data-task-id":a.id,children:[x&&d.jsx("span",{className:`${Zt.expandArrow} ${S?Zt.expanded:""}`,role:"button",tabIndex:0,"aria-label":S?"Collapse task":"Expand task",onClick:R=>{R.stopPropagation(),o(a.id)},onKeyDown:R=>{(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),R.stopPropagation(),o(a.id))},children:"▸"}),!x&&d.jsx("span",{className:Zt.leafSpacer}),d.jsx("span",{className:Zt.taskStatusIcon,style:{color:g.color},children:g.icon}),d.jsx("span",{className:Zt.taskTitle,title:a.title,children:a.title}),x&&d.jsxs("span",{className:Zt.childCountBadge,children:[a.children.filter(R=>R.status==="done").length,"/",a.children.length]}),a.dependsOn.length>0&&d.jsx("span",{className:`${Zt.dependencyBadge} ${b?Zt.blockedBadge:""}`,title:`Depends on: ${a.dependsOn.join(", ")}`,children:b?"blocked":"dep"}),a.personaId&&(()=>{const R=v.find(K=>K.id===a.personaId);return R?d.jsx("span",{className:Zt.dependencyBadge,title:`Persona: ${R.name}`,style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"8rem"},children:R.name}):null})(),i<nj&&d.jsx("button",{onClick:R=>{R.stopPropagation(),h({kind:"new_task",projectId:f,parentTaskId:a.id})},title:"Add child task","aria-label":"Add child task",className:Zt.addChildButton,children:"+"})]}),d.jsx(yi,{children:x&&S&&d.jsx(Pn.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.15},style:{overflow:"hidden"},children:a.children.map(R=>d.jsx(gy,{node:R,depth:i+1,expandedTasks:l,toggleTask:o,selectedTaskId:u,setViewMode:h,projectId:f,taskStatusById:p},R.id))})})]})}function kA({viewMode:a,setViewMode:i}){const{projects:l,tasks:o,loadTasks:u,createProject:h,projectCreating:f}=On(),[p,v]=_.useState(new Set),[g,b]=_.useState(new Set),[S,x]=_.useState(new Set),[E,M]=_.useState(!1),[R,K]=_.useState(""),O=a.kind==="project"?a.projectId:void 0,P=a.kind==="task"?a.taskId:void 0,Y=_.useRef(p);Y.current=p;const et=_.useMemo(()=>new Map(o.map(U=>[U.id,U.status])),[o]),X=U=>{v(nt=>{const at=new Set(nt);return at.has(U)?at.delete(U):(at.add(U),u(U)),at})},L=U=>{b(nt=>{const at=new Set(nt);return at.has(U)?(at.delete(U),x(mt=>new Set(mt).add(U))):(at.add(U),x(mt=>{const Dt=new Set(mt);return Dt.delete(U),Dt})),at})};_.useEffect(()=>{const U=new Set(o.filter(nt=>nt.parentTaskId).map(nt=>nt.parentTaskId));U.size>0&&b(nt=>{const at=new Set(nt);for(const mt of U)S.has(mt)||at.add(mt);return at})},[o,S]),_.useEffect(()=>{O&&!Y.current.has(O)&&(v(U=>new Set(U).add(O)),u(O))},[O,u]);const tt=()=>{!R.trim()||f||(h(R.trim()),K(""),M(!1))};return d.jsxs("div",{className:Zt.container,children:[d.jsxs("div",{className:Zt.header,children:[d.jsx("span",{children:"Projects"}),d.jsx("button",{className:Zt.addButton,onClick:()=>M(!E),"aria-label":"Create project",title:"Create project",children:"+"})]}),E&&d.jsxs("div",{className:Zt.createForm,children:[d.jsx("input",{type:"text",value:R,onChange:U=>K(U.target.value),onKeyDown:U=>U.key==="Enter"&&tt(),placeholder:"Project name...",autoFocus:!0,disabled:f,className:Zt.createInput}),d.jsx("button",{onClick:tt,className:Zt.createButton,disabled:f,children:f?d.jsx(bg,{size:"sm",label:"Creating project"}):"OK"})]}),f&&d.jsxs("div",{className:Zt.creatingHint,children:[d.jsx(bg,{size:"sm",label:"Creating project"}),"Creating project…"]}),l.length===0&&!E&&d.jsxs("div",{className:Zt.emptyCta,children:[d.jsx("button",{className:Zt.ctaButton,onClick:()=>M(!0),children:"Create Project"}),d.jsx("div",{className:Zt.ctaDescription,children:"Organize your work into projects"})]}),l.map(U=>{const nt=p.has(U.id),at=o.filter($=>$.projectId===U.id),mt=O===U.id,Dt=nt?EA(at):[];return d.jsxs("div",{children:[d.jsxs("div",{onClick:()=>{mt?X(U.id):(nt||X(U.id),i({kind:"project",projectId:U.id}))},className:`${Zt.projectRow} ${mt?Zt.selected:""}`,children:[d.jsx("span",{className:`${Zt.expandArrow} ${nt?Zt.expanded:""}`,children:"▸"}),d.jsx("span",{className:Zt.projectName,title:U.name,children:U.name}),d.jsx("span",{className:Zt.taskCount,children:at.length>0&&`${at.filter($=>$.status==="done").length}/${at.length}`}),d.jsx("button",{onClick:$=>{$.stopPropagation(),i({kind:"new_task",projectId:U.id})},title:"New task",className:Zt.newTaskButton,children:"+"})]}),d.jsx(yi,{children:nt&&d.jsxs(Pn.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2,ease:"easeInOut"},style:{overflow:"hidden"},children:[Dt.map($=>d.jsx(gy,{node:$,depth:0,expandedTasks:g,toggleTask:L,selectedTaskId:P,setViewMode:i,projectId:U.id,taskStatusById:et},$.id)),at.length===0&&d.jsx("div",{className:Zt.emptyTaskCta,children:d.jsx("button",{className:Zt.createTaskLink,onClick:()=>i({kind:"new_task",projectId:U.id}),children:"+ Create Task"})})]})})]},U.id)})]})}const wA="_container_17mc8_1",MA="_content_17mc8_30",_g={container:wA,content:MA},RA=320,yy=220,by=600,Sy="grackle-sidebar-width";function OA(){try{const a=localStorage.getItem(Sy);if(a!==null){const i=Number(a);if(Number.isFinite(i)&&i>=yy&&i<=by)return i}}catch{}return RA}function zA(a){try{localStorage.setItem(Sy,String(a))}catch{}}function BA({viewMode:a,setViewMode:i}){const[l]=_.useState(OA),o=_.useRef(null);return _.useEffect(()=>{const u=o.current;if(!u)return;const h=new ResizeObserver(f=>{for(const p of f){const v=p.borderBoxSize[0];if(v){const g=Math.round(v.inlineSize);g>=yy&&g<=by&&zA(g)}}});return h.observe(u),()=>{h.disconnect()}},[]),d.jsx("div",{className:_g.container,ref:o,"data-testid":"sidebar",style:{width:l},children:d.jsx("div",{className:_g.content,children:d.jsx(kA,{viewMode:a,setViewMode:i})})})}const UA="_bar_23ni8_1",VA="_barColumn_23ni8_26",LA="_barRow_23ni8_52",qA="_input_23ni8_58",HA="_inputSmall_23ni8_87",IA="_select_23ni8_150",GA="_btnPrimary_23ni8_180",YA="_btnDanger_23ni8_211",ZA="_btnGhost_23ni8_250",KA="_badge_23ni8_278",XA="_statusText_23ni8_288",QA="_statusCompleted_23ni8_293",PA="_statusFailed_23ni8_297",FA="_statusBlocked_23ni8_301",JA="_hintText_23ni8_306",$A="_creatingHint_23ni8_311",WA="_errorHint_23ni8_319",tN="_disconnectHint_23ni8_325",ut={bar:UA,barColumn:VA,barRow:LA,input:qA,inputSmall:HA,select:IA,btnPrimary:GA,btnDanger:YA,btnGhost:ZA,badge:KA,statusText:XA,statusCompleted:QA,statusFailed:PA,statusBlocked:FA,hintText:JA,creatingHint:$A,errorHint:WA,disconnectHint:tN};function Tg({value:a,onChange:i,testId:l}){return d.jsxs("select",{"data-testid":l,value:a,onChange:o=>i(o.target.value),className:ut.select,children:[d.jsx("option",{value:"claude-code",children:"claude-code"}),d.jsx("option",{value:"codex",children:"codex"}),d.jsx("option",{value:"copilot",children:"copilot"}),d.jsx("option",{value:"stub",children:"stub"})]})}function xg(a,i){if(!a)return!1;const l=i.find(o=>o.id===a);return l!==void 0&&(l.status==="disconnected"||l.status==="error")}function jg({environmentId:a,onReconnect:i}){return d.jsxs(d.Fragment,{children:[d.jsx("span",{className:ut.disconnectHint,"data-testid":"env-disconnect-hint",children:"Environment unavailable"}),d.jsx("button",{type:"button",onClick:()=>i(a),className:ut.btnGhost,"data-testid":"reconnect-btn",title:"Reconnect the environment to resume messaging",children:"Reconnect"})]})}function eN({viewMode:a,setViewMode:i}){const{spawn:l,sendInput:o,kill:u,sessions:h,tasks:f,environments:p,personas:v,addEnvironment:g,provisionEnvironment:b,codespaces:S,codespaceError:x,codespaceCreating:E,listCodespaces:M,createCodespace:R}=On(),{showToast:K}=vr(),[O,P]=_.useState(""),[Y,et]=_.useState(a.kind==="new_chat"?a.runtime:"claude-code"),[X,L]=_.useState(""),tt=Rt=>{if(L(Rt),Rt){const xt=v.find(w=>w.id===Rt);xt!=null&&xt.runtime&&et(xt.runtime)}},[U,nt]=_.useState(""),[at,mt]=_.useState("local"),[Dt,$]=_.useState("claude-code"),[st,_t]=_.useState(""),[B,Q]=_.useState(""),[lt,Ct]=_.useState(""),[vt,Pt]=_.useState(""),[bt,St]=_.useState(""),[G,ae]=_.useState(""),[ye,en]=_.useState(""),[He,Wt]=_.useState(""),[nn,Ue]=_.useState("pick");_.useEffect(()=>{a.kind==="new_chat"&&et(a.runtime)},[a]);const It=a.kind==="session"?h.find(Rt=>Rt.id===a.sessionId):void 0,Kt=a.kind==="task"?f.find(Rt=>Rt.id===a.taskId):void 0,me=Kt!=null&&Kt.sessionId?h.find(Rt=>Rt.id===Kt.sessionId):void 0,F=Kt?Kt.dependsOn.some(Rt=>{const xt=f.find(w=>w.id===Rt);return xt&&xt.status!=="done"}):!1;if(a.kind==="empty")return d.jsx("div",{className:ut.bar,children:d.jsx("span",{className:ut.hintText,children:"Select a session or click + to start"})});if(a.kind==="edit_task")return d.jsx(d.Fragment,{});if(a.kind==="new_environment"){const Rt=V=>{if(!V.trim())return!0;const W=Number(V);return Number.isInteger(W)&&W>=1&&W<=65535},xt=()=>!(!U.trim()||at==="ssh"&&!st.trim()||at==="codespace"&&!G.trim()||(at==="local"||at==="ssh")&&!Rt(B)),w=()=>{if(!xt())return;const V={};if(at==="local"){if(st.trim()&&(V.host=st.trim()),B.trim()){const W=Number(B);Number.isInteger(W)&&(V.port=W)}}else if(at==="ssh"){if(V.host=st.trim(),lt.trim()&&(V.user=lt.trim()),B.trim()){const W=Number(B);Number.isInteger(W)&&(V.sshPort=W)}ye.trim()&&(V.identityFile=ye.trim())}else at==="docker"?(vt.trim()&&(V.image=vt.trim()),bt.trim()&&(V.repo=bt.trim())):at==="codespace"&&(V.codespaceName=G.trim());g(U.trim(),at,V,Dt),K("Environment added successfully","success"),nt(""),mt("local"),$("claude-code"),_t(""),Q(""),Ct(""),Pt(""),St(""),ae(""),en(""),Wt(""),Ue("pick"),i({kind:"settings"})};return d.jsxs("div",{className:ut.barColumn,children:[d.jsxs("div",{className:ut.barRow,children:[d.jsx("span",{className:ut.badge,children:"new env"}),d.jsx("input",{type:"text",value:U,onChange:V=>nt(V.target.value),placeholder:"Environment name...",autoFocus:!0,className:ut.input}),d.jsxs("select",{value:at,onChange:V=>{mt(V.target.value),V.target.value==="codespace"&&(M(),Ue("pick"),ae(""))},className:ut.select,children:[d.jsx("option",{value:"local",children:"local"}),d.jsx("option",{value:"ssh",children:"ssh"}),d.jsx("option",{value:"docker",children:"docker"}),d.jsx("option",{value:"codespace",children:"codespace"})]}),d.jsx(Tg,{value:Dt,onChange:$,testId:"new-environment-runtime-select"}),d.jsx("button",{onClick:w,disabled:!xt(),className:ut.btnPrimary,children:"Add"})]}),d.jsxs("div",{className:ut.barRow,children:[at==="local"&&d.jsxs(d.Fragment,{children:[d.jsx("input",{type:"text",value:st,onChange:V=>_t(V.target.value),placeholder:"Host (optional)...",className:ut.inputSmall}),d.jsx("input",{type:"number",min:1,max:65535,value:B,onChange:V=>Q(V.target.value),placeholder:"Port (optional)...",className:ut.inputSmall})]}),at==="ssh"&&d.jsxs(d.Fragment,{children:[d.jsx("input",{type:"text",value:st,onChange:V=>_t(V.target.value),placeholder:"Host (required)...",className:ut.inputSmall}),d.jsx("input",{type:"text",value:lt,onChange:V=>Ct(V.target.value),placeholder:"User (optional)...",className:ut.inputSmall}),d.jsx("input",{type:"number",min:1,max:65535,value:B,onChange:V=>Q(V.target.value),placeholder:"SSH port (optional)...",className:ut.inputSmall}),d.jsx("input",{type:"text",value:ye,onChange:V=>en(V.target.value),placeholder:"Identity file (optional)...",className:ut.inputSmall})]}),at==="docker"&&d.jsxs(d.Fragment,{children:[d.jsx("input",{type:"text",value:vt,onChange:V=>Pt(V.target.value),placeholder:"Image (optional)...",className:ut.inputSmall}),d.jsx("input",{type:"text",value:bt,onChange:V=>St(V.target.value),placeholder:"Repo (optional)...",className:ut.inputSmall})]}),at==="codespace"&&nn==="pick"&&d.jsxs(d.Fragment,{children:[d.jsxs("select",{value:G,onChange:V=>{V.target.value==="__create__"?(Ue("create"),ae("")):(ae(V.target.value),V.target.value&&!U.trim()&&nt(V.target.value))},disabled:E,className:ut.select,children:[d.jsx("option",{value:"",children:"Select a codespace..."}),S.map(V=>d.jsxs("option",{value:V.name,children:[V.name," (",V.repository,") — ",V.state]},V.name)),d.jsx("option",{value:"__create__",children:"Create new from repo..."})]}),E&&d.jsx("span",{className:ut.creatingHint,children:"Creating codespace..."}),x&&d.jsx("span",{className:ut.errorHint,children:x})]}),at==="codespace"&&nn==="create"&&d.jsxs(d.Fragment,{children:[d.jsx("input",{type:"text",value:He,onChange:V=>Wt(V.target.value),placeholder:"owner/repo",className:ut.inputSmall}),d.jsx("button",{onClick:()=>{He.trim()&&(R(He.trim()),Ue("pick"),Wt(""))},disabled:!He.trim(),className:ut.btnPrimary,children:"Create"}),d.jsx("button",{onClick:()=>{Ue("pick"),Wt("")},className:ut.btnGhost,children:"Cancel"})]})]})]})}if(a.kind==="project")return d.jsx("div",{className:ut.bar,children:d.jsx("span",{className:ut.hintText,children:"Select a task or click + to create one"})});if(a.kind==="new_task")return d.jsx(d.Fragment,{});if(a.kind==="task"&&Kt){if(Kt.status==="pending"||Kt.status==="assigned"){const Rt=F?Kt.dependsOn.map(xt=>f.find(w=>w.id===xt)).filter(xt=>xt&&xt.status!=="done").map(xt=>xt.title):[];return d.jsx("div",{className:ut.bar,children:F?d.jsxs("span",{className:ut.statusBlocked,children:["Blocked by: ",Rt.join(", ")]}):d.jsx("span",{className:ut.hintText,children:"Use the buttons above to start or manage this task"})})}if(Kt.status==="in_progress"||Kt.status==="waiting_input"){if((me==null?void 0:me.status)==="waiting_input"){const xt=(me==null?void 0:me.environmentId)||Kt.environmentId,w=xg(xt,p),V=W=>{W.preventDefault(),!(!O.trim()||!Kt.sessionId||w)&&(o(Kt.sessionId,O),P(""))};return d.jsxs("form",{onSubmit:V,className:ut.bar,children:[w&&xt&&d.jsx(jg,{environmentId:xt,onReconnect:b}),d.jsx("input",{type:"text",value:O,onChange:W=>P(W.target.value),placeholder:"Type a message...",autoFocus:!w,disabled:w,className:ut.input}),d.jsx("span",{title:w?"Environment is unavailable — reconnect first":void 0,children:d.jsx("button",{type:"submit",disabled:!O.trim()||w,className:ut.btnPrimary,children:"Send"})})]})}return d.jsx("div",{className:ut.bar,children:d.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:ut.input})})}if(Kt.status==="review")return d.jsx("div",{className:ut.bar,children:d.jsx("span",{className:ut.hintText,children:"Review the changes above, then approve or reject in the header"})});if(Kt.status==="done")return d.jsxs("div",{className:ut.bar,children:[d.jsx("span",{className:`${ut.statusText} ${ut.statusCompleted}`,children:"Task completed"}),d.jsx("button",{onClick:()=>i({kind:"new_task",projectId:Kt.projectId}),className:ut.btnPrimary,children:"+ New Task"})]});if(Kt.status==="failed")return d.jsx("div",{className:ut.bar,children:d.jsx("span",{className:`${ut.statusText} ${ut.statusFailed}`,children:"Task failed"})})}if(a.kind==="new_chat"){const Rt=xt=>{xt.preventDefault(),O.trim()&&(l(a.environmentId,O,void 0,Y,X),K("Session started","success"),P(""),L(""))};return d.jsxs("form",{onSubmit:Rt,className:ut.bar,children:[d.jsx("span",{className:ut.badge,children:"new chat"}),d.jsx("input",{type:"text",value:O,onChange:xt=>P(xt.target.value),placeholder:"Enter prompt...",autoFocus:!0,className:ut.input}),d.jsx(Tg,{value:Y,onChange:et,testId:"new-chat-runtime-select"}),d.jsxs("select",{value:X,onChange:xt=>tt(xt.target.value),className:ut.select,children:[d.jsx("option",{value:"",children:"No persona"}),v.map(xt=>d.jsx("option",{value:xt.id,children:xt.name},xt.id))]}),d.jsx("button",{type:"submit",disabled:!O.trim(),className:ut.btnPrimary,children:"Go"})]})}if(a.kind==="session"){const Rt=(It==null?void 0:It.status)==="running",xt=(It==null?void 0:It.status)==="waiting_input",w=It!==void 0&&["completed","failed","killed"].includes(It.status);if(Rt)return d.jsxs("div",{className:ut.bar,children:[d.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:ut.input}),d.jsx("button",{onClick:()=>u(a.sessionId),className:ut.btnDanger,title:"Stop session",children:"Stop"})]});if(xt){const V=xg(It==null?void 0:It.environmentId,p),W=ot=>{ot.preventDefault(),!(!O.trim()||V)&&(o(a.sessionId,O),P(""))};return d.jsxs("form",{onSubmit:W,className:ut.bar,children:[V&&(It==null?void 0:It.environmentId)&&d.jsx(jg,{environmentId:It.environmentId,onReconnect:b}),d.jsx("input",{type:"text",value:O,onChange:ot=>P(ot.target.value),placeholder:"Type a message...",autoFocus:!V,disabled:V,className:ut.input}),d.jsx("span",{title:V?"Environment is unavailable — reconnect first":void 0,children:d.jsx("button",{type:"submit",disabled:!O.trim()||V,className:ut.btnPrimary,children:"Send"})}),d.jsx("button",{type:"button",onClick:()=>u(a.sessionId),className:ut.btnDanger,title:"Stop session",children:"Stop"})]})}if(w&&It)return d.jsxs("div",{className:ut.bar,children:[d.jsxs("span",{className:`${ut.statusText} ${ut.hintText}`,children:["Session ",It.status]}),d.jsx("button",{onClick:()=>i({kind:"new_chat",environmentId:It.environmentId,runtime:It.runtime}),className:ut.btnPrimary,children:"+ New Chat"})]})}return d.jsx("div",{className:ut.bar,children:d.jsx("span",{className:ut.hintText,children:"Loading..."})})}const nN="_container_654kj_1",aN="_emptyState_654kj_8",sN="_card_654kj_14",iN="_cardHeader_654kj_34",lN="_categoryBadge_654kj_41",oN="_findingTitle_654kj_49",rN="_findingDate_654kj_55",cN="_findingContent_654kj_61",uN="_tags_654kj_67",dN="_tag_654kj_67",Kn={container:nN,emptyState:aN,card:sN,cardHeader:iN,categoryBadge:lN,findingTitle:oN,findingDate:rN,findingContent:cN,tags:uN,tag:dN};function fN(a){const i=new Date(a),l=new Date,o=l.getTime()-i.getTime(),u=Math.floor(o/1e3),h=Math.floor(u/60),f=Math.floor(h/60),p=Math.floor(f/24);if(u<60)return"just now";if(h<60)return`${h}m ago`;if(f<24)return`${f}h ago`;if(p===1)return"yesterday";if(p<7)return`${p} days ago`;const v=i.getFullYear()===l.getFullYear(),g=i.toLocaleString("en-US",{month:"short"}),b=i.getDate();return v?`${g} ${b}`:`${g} ${b} ${i.getFullYear()}`}const hN={architecture:{text:"var(--accent-blue)",bg:"var(--accent-blue-dim)"},api:{text:"var(--accent-green)",bg:"var(--accent-green-dim)"},bug:{text:"var(--accent-red)",bg:"var(--accent-red-dim)"},decision:{text:"var(--accent-yellow)",bg:"var(--accent-yellow-dim)"},dependency:{text:"var(--accent-purple)",bg:"var(--accent-purple-dim)"},pattern:{text:"var(--accent-cyan)",bg:"var(--accent-cyan-dim)"},general:{text:"var(--text-secondary)",bg:"var(--bg-elevated)"}},mN={text:"var(--text-secondary)",bg:"var(--bg-elevated)"};function pN({projectId:a}){const{findings:i}=On(),l=i.filter(o=>o.projectId===a);return l.length===0?d.jsx("div",{className:Kn.emptyState,children:"No findings yet. Agents will post discoveries here."}):d.jsx("div",{className:Kn.container,children:l.map((o,u)=>{const h=hN[o.category]||mN;return d.jsxs(Pn.div,{className:Kn.card,initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:u*.05,duration:.2},children:[d.jsxs("div",{className:Kn.cardHeader,children:[d.jsx("span",{className:Kn.categoryBadge,style:{background:h.bg,color:h.text},children:o.category}),d.jsx("span",{className:Kn.findingTitle,children:o.title}),d.jsx("span",{className:Kn.findingDate,title:o.createdAt,children:fN(o.createdAt)})]}),d.jsx("div",{className:Kn.findingContent,children:o.content.length>300?o.content.slice(0,300)+"...":o.content}),o.tags.length>0&&d.jsx("div",{className:Kn.tags,children:o.tags.map(f=>d.jsx("span",{className:Kn.tag,style:{color:h.text,textShadow:`0 0 8px ${h.text}`},children:f},f))})]},o.id)})})}const vN="_container_bge4k_1",gN="_header_bge4k_5",yN="_headerLabel_bge4k_12",bN="_addButton_bge4k_20",SN="_envRow_bge4k_55",_N="_targeted_bge4k_69",TN="_expanded_bge4k_72",xN="_statusDot_bge4k_76",jN="_pulse_bge4k_79",AN="_envName_bge4k_83",NN="_envActions_bge4k_87",EN="_idleLabel_bge4k_94",CN="_newChatButton_bge4k_99",DN="_envActionsRow_bge4k_126",kN="_connectButton_bge4k_134",wN="_stopButton_bge4k_160",MN="_deleteButton_bge4k_186",RN="_provisionMessage_bge4k_213",ON="_errorMessage_bge4k_220",zN="_sessionRow_bge4k_227",BN="_selected_bge4k_243",UN="_sessionDot_bge4k_248",VN="_sessionSummaryRow_bge4k_252",LN="_sessionExpandArrow_bge4k_272",qN="_sessionSummaryText_bge4k_283",HN="_sessionCountBadge_bge4k_290",IN="_emptyCta_bge4k_313",GN="_ctaDescription_bge4k_326",YN="_ctaButton_bge4k_332",Qt={container:vN,header:gN,headerLabel:yN,addButton:bN,envRow:SN,targeted:_N,expanded:TN,statusDot:xN,pulse:jN,envName:AN,envActions:NN,idleLabel:EN,newChatButton:CN,envActionsRow:DN,connectButton:kN,stopButton:wN,deleteButton:MN,provisionMessage:RN,errorMessage:ON,sessionRow:zN,selected:BN,sessionDot:UN,sessionSummaryRow:VN,sessionExpandArrow:LN,sessionSummaryText:qN,sessionCountBadge:HN,emptyCta:IN,ctaDescription:GN,ctaButton:YN},ZN={connected:"var(--accent-green)",sleeping:"var(--accent-yellow)",error:"var(--accent-red)",disconnected:"var(--text-tertiary)",connecting:"var(--accent-blue)"},KN={running:"running",waiting_input:"awaiting input",failed:"failed",killed:"killed",completed:"completed"},Ag=["running","waiting_input","failed","killed","completed"],XN=.2;function QN(a){const i={};for(const h of a)i[h.status]=(i[h.status]||0)+1;const l=Ag.filter(h=>i[h]>0).map(h=>`${i[h]} ${KN[h]||h}`),o=new Set(Ag),u=Object.keys(i).filter(h=>!o.has(h)).sort().map(h=>`${i[h]} ${h}`);return[...l,...u].join(", ")}function PN({status:a}){const i=a==="running"?"var(--accent-green)":a==="waiting_input"?"var(--accent-yellow)":a==="completed"?"var(--text-secondary)":a==="failed"||a==="killed"?"var(--accent-red)":"var(--text-tertiary)";return d.jsx("span",{className:Qt.sessionDot,style:{color:i},children:"●"})}function FN({env:a,envSessions:i,selectedSessionId:l,isNewChatTarget:o,expanded:u,onToggleExpand:h,sessionsExpanded:f,onToggleSessionsExpand:p,provisionProgress:v,onProvision:g,onStop:b,onRemove:S,setViewMode:x}){const[E,M]=_.useState(!1),R=ZN[a.status]||"var(--text-tertiary)",K=a.status==="connected",O=a.status==="connecting",P=a.status==="disconnected"||a.status==="error";return d.jsxs("div",{children:[d.jsx(pr,{isOpen:E,title:"Delete Environment?",description:`"${a.displayName||a.id}" will be permanently removed. This destroys the workspace and removes all data.`,onConfirm:()=>{S(a.id),M(!1)},onCancel:()=>M(!1)}),d.jsxs("div",{className:`${Qt.envRow} ${o?Qt.targeted:""} ${u?Qt.expanded:""}`,"data-testid":"env-row",onClick:h,children:[d.jsx("span",{className:`${Qt.statusDot} ${K?Qt.pulse:""}`,style:{color:R},children:"●"}),d.jsx("span",{className:Qt.envName,title:a.displayName||a.id,children:a.displayName||a.id}),d.jsxs("span",{className:Qt.envActions,children:[i.length===0&&!o&&!u&&d.jsx("span",{className:Qt.idleLabel,children:"(idle)"}),K&&d.jsx("button",{onClick:Y=>{Y.stopPropagation(),x({kind:"new_chat",environmentId:a.id,runtime:a.defaultRuntime||"claude-code"})},title:"New chat",className:Qt.newChatButton,children:"+"})]})]}),u&&d.jsxs("div",{className:Qt.envActionsRow,children:[O&&v&&d.jsx("span",{className:Qt.provisionMessage,children:v.message}),a.status==="error"&&(v==null?void 0:v.stage)==="error"&&d.jsx("span",{className:Qt.errorMessage,children:v.message}),P&&d.jsx("button",{onClick:Y=>{Y.stopPropagation(),g(a.id)},className:Qt.connectButton,children:a.status==="error"?"Retry":"Connect"}),K&&d.jsx("button",{onClick:Y=>{Y.stopPropagation(),b(a.id)},className:Qt.stopButton,children:"Stop"}),!O&&d.jsx("button",{onClick:Y=>{Y.stopPropagation(),M(!0)},className:Qt.deleteButton,children:"Delete"})]}),i.length>0&&d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:Qt.sessionSummaryRow,"data-testid":"session-summary-row",role:"button",tabIndex:0,"aria-expanded":f,"aria-label":f?"Collapse sessions":"Expand sessions",onClick:p,onKeyDown:Y=>{(Y.key==="Enter"||Y.key===" ")&&(Y.preventDefault(),p())},children:[d.jsx("span",{className:`${Qt.sessionExpandArrow} ${f?Qt.expanded:""}`,children:"▸"}),d.jsx("span",{className:Qt.sessionSummaryText,children:QN(i)}),d.jsx("span",{className:Qt.sessionCountBadge,children:i.length})]}),d.jsx(yi,{children:f&&d.jsx(Pn.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:XN,ease:"easeInOut"},style:{overflow:"hidden"},children:i.map(Y=>d.jsxs("div",{onClick:et=>{et.stopPropagation(),x({kind:"session",sessionId:Y.id})},className:`${Qt.sessionRow} ${l===Y.id?Qt.selected:""}`,title:Y.prompt,"data-testid":"session-row",children:[d.jsx(PN,{status:Y.status})," ",Y.prompt.length>24?Y.prompt.slice(0,24)+"...":Y.prompt]},Y.id))})})]})]})}function JN({viewMode:a,setViewMode:i}){const{environments:l,sessions:o,provisionStatus:u,provisionEnvironment:h,stopEnvironment:f,removeEnvironment:p}=On(),[v,g]=_.useState(null),[b,S]=_.useState(new Set),x=a.kind==="session"?a.sessionId:void 0,E=a.kind==="new_chat"?a.environmentId:void 0;return d.jsxs("div",{className:Qt.container,children:[d.jsxs("div",{className:Qt.header,children:[d.jsx("span",{className:Qt.headerLabel,children:"Environments"}),d.jsx("button",{className:Qt.addButton,onClick:()=>i({kind:"new_environment"}),title:"Add environment",children:"+ Add Environment"})]}),l.length===0&&d.jsxs("div",{className:Qt.emptyCta,children:[d.jsx("button",{className:Qt.ctaButton,onClick:()=>i({kind:"new_environment"}),children:"Add Environment"}),d.jsx("div",{className:Qt.ctaDescription,children:"Connect an environment to run agents"})]}),l.map(M=>{const R=o.filter(K=>K.environmentId===M.id);return d.jsx(FN,{env:M,envSessions:R,selectedSessionId:x,isNewChatTarget:E===M.id,expanded:v===M.id,onToggleExpand:()=>g(v===M.id?null:M.id),sessionsExpanded:b.has(M.id),onToggleSessionsExpand:()=>{S(K=>{const O=new Set(K);return O.has(M.id)?O.delete(M.id):O.add(M.id),O})},provisionProgress:u[M.id],onProvision:h,onStop:f,onRemove:p,setViewMode:i},M.id)})]})}const $N="_container_ifz7r_1",WN="_heading_ifz7r_7",tE="_section_ifz7r_14",eE="_sectionTitle_ifz7r_26",nE="_sectionDescription_ifz7r_35",aE="_tokenList_ifz7r_48",sE="_tokenRow_ifz7r_55",iE="_tokenBadge_ifz7r_68",lE="_tokenName_ifz7r_83",oE="_tokenTarget_ifz7r_90",rE="_deleteButton_ifz7r_99",cE="_addForm_ifz7r_113",uE="_formRow_ifz7r_119",dE="_input_ifz7r_125",fE="_select_ifz7r_155",hE="_addButton_ifz7r_187",mE="_emptyStateInfo_ifz7r_221",pE="_themeOptions_ifz7r_229",vE="_themeOption_ifz7r_229",gE="_themeOptionSelected_ifz7r_254",yE="_themeOptionLabel_ifz7r_259",bE="_themeOptionDesc_ifz7r_265",SE="_themeActive_ifz7r_270",Ht={container:$N,heading:WN,section:tE,sectionTitle:eE,sectionDescription:nE,tokenList:aE,tokenRow:sE,tokenBadge:iE,tokenName:lE,tokenTarget:oE,deleteButton:rE,addForm:cE,formRow:uE,input:dE,select:fE,addButton:hE,emptyStateInfo:mE,themeOptions:pE,themeOption:vE,themeOptionSelected:gE,themeOptionLabel:yE,themeOptionDesc:bE,themeActive:SE},_E=[{value:"env_var",label:"Environment Variable"},{value:"file",label:"File"}];function TE({viewMode:a,setViewMode:i}){const{tokens:l,setToken:o,deleteToken:u}=On(),{showToast:h}=vr(),{themeId:f,resolvedThemeId:p,setTheme:v}=_S(),[g,b]=_.useState(""),[S,x]=_.useState(""),[E,M]=_.useState("env_var"),[R,K]=_.useState(""),[O,P]=_.useState(null),Y=L=>{if(L.preventDefault(),!g||!S)return;const tt=E==="env_var"?R||g.toUpperCase()+"_TOKEN":"";o(g,S,E,tt,E==="file"?R:""),h("Token saved successfully","success"),b(""),x(""),K("")},et=L=>{P(L)},X=()=>{O&&(u(O),h("Token deleted","info")),P(null)};return d.jsxs("div",{className:Ht.container,children:[d.jsx(pr,{isOpen:O!==null,title:"Delete Token?",description:O?`"${O}" will be permanently removed.`:void 0,onConfirm:X,onCancel:()=>P(null)}),d.jsx("h2",{className:Ht.heading,children:"Settings"}),d.jsxs("section",{className:Ht.section,children:[d.jsx("h3",{className:Ht.sectionTitle,children:"Appearance"}),d.jsx("p",{className:Ht.sectionDescription,children:"Choose how Grackle looks across the app."}),d.jsx("div",{className:Ht.themeOptions,children:pd.map(L=>{const tt=f===L.id;return d.jsxs("button",{type:"button",className:`${Ht.themeOption} ${tt?Ht.themeOptionSelected:""}`,"aria-pressed":tt,onClick:()=>v(L.id),children:[d.jsx("span",{className:Ht.themeOptionLabel,children:L.label}),d.jsx("span",{className:Ht.themeOptionDesc,children:L.description})]},L.id)})}),d.jsxs("p",{className:Ht.themeActive,children:["Active theme: ",d.jsx("strong",{children:p})]})]}),d.jsxs("section",{className:Ht.section,children:[d.jsx("h3",{className:Ht.sectionTitle,children:"Environments"}),d.jsx("p",{className:Ht.sectionDescription,children:"Environments are compute workspaces where agents run. Configure once, reuse across projects."}),d.jsx(JN,{viewMode:a,setViewMode:i})]}),d.jsxs("section",{className:Ht.section,children:[d.jsx("h3",{className:Ht.sectionTitle,children:"Tokens"}),d.jsx("p",{className:Ht.sectionDescription,children:"API tokens are auto-pushed to environments when set or updated. Values are write-only."}),l.length===0?d.jsx("div",{className:Ht.emptyStateInfo,children:"Add your first API token to enable service integrations."}):d.jsx("div",{className:Ht.tokenList,children:l.map(L=>d.jsxs("div",{className:Ht.tokenRow,children:[d.jsx("span",{className:Ht.tokenBadge,children:L.tokenType}),d.jsx("span",{className:Ht.tokenName,children:L.name}),d.jsx("span",{className:Ht.tokenTarget,children:L.tokenType==="env_var"?L.envVar:L.filePath}),d.jsx("button",{className:Ht.deleteButton,onClick:()=>et(L.name),title:`Delete ${L.name}`,children:"×"})]},L.name))}),d.jsxs("form",{className:Ht.addForm,onSubmit:Y,children:[d.jsxs("div",{className:Ht.formRow,children:[d.jsx("input",{className:Ht.input,type:"text",placeholder:"Token name",value:g,onChange:L=>b(L.target.value)}),d.jsx("input",{className:Ht.input,type:"password",placeholder:"Value",value:S,onChange:L=>x(L.target.value)})]}),d.jsxs("div",{className:Ht.formRow,children:[d.jsx("select",{className:Ht.select,value:E,onChange:L=>M(L.target.value),children:_E.map(L=>d.jsx("option",{value:L.value,children:L.label},L.value))}),d.jsx("input",{className:Ht.input,type:"text",placeholder:E==="env_var"?"Env var name (e.g. API_TOKEN)":"File path (e.g. /home/user/.token)",value:R,onChange:L=>K(L.target.value)}),d.jsx("button",{className:Ht.addButton,type:"submit",children:"Add Token"})]})]})]})]})}const xE="_container_18ch2_1",jE="_header_18ch2_8",AE="_headerTitle_18ch2_35",NE="_badge_18ch2_44",EE="_headerActions_18ch2_54",CE="_body_18ch2_61",DE="_section_18ch2_71",kE="_label_18ch2_77",wE="_titleInput_18ch2_84",ME="_descriptionTextarea_18ch2_117",RE="_parentContext_18ch2_153",OE="_parentLabel_18ch2_161",zE="_parentName_18ch2_168",BE="_personaSelect_18ch2_172",UE="_depList_18ch2_206",VE="_depItem_18ch2_212",LE="_depItemSelected_18ch2_234",qE="_noDeps_18ch2_238",HE="_btnPrimary_18ch2_244",IE="_btnGhost_18ch2_275",$t={container:xE,header:jE,headerTitle:AE,badge:NE,headerActions:EE,body:CE,section:DE,label:kE,titleInput:wE,descriptionTextarea:ME,parentContext:RE,parentLabel:OE,parentName:zE,personaSelect:BE,depList:UE,depItem:VE,depItemSelected:LE,noDeps:qE,btnPrimary:HE,btnGhost:IE};function Ng({viewMode:a,setViewMode:i}){const{tasks:l,createTask:o,updateTask:u,personas:h,environments:f}=On(),{showToast:p}=vr(),v=a.kind==="edit_task",g=v?l.find(st=>st.id===a.taskId):void 0,b=v?(g==null?void 0:g.projectId)??"":a.projectId,S=v?(g==null?void 0:g.parentTaskId)??"":a.kind==="new_task"?a.parentTaskId??"":"",x=S?l.find(st=>st.id===S):void 0,[E,M]=_.useState((g==null?void 0:g.title)??""),[R,K]=_.useState((g==null?void 0:g.description)??""),[O,P]=_.useState((g==null?void 0:g.dependsOn)??[]),[Y,et]=_.useState((g==null?void 0:g.personaId)??""),[X,L]=_.useState((g==null?void 0:g.environmentId)??""),tt=_.useRef(!1);_.useEffect(()=>{v&&g&&!tt.current&&(tt.current=!0,M(g.title),K(g.description??""),P(g.dependsOn??[]),et(g.personaId??""),L(g.environmentId??""))},[v,g]);const U=l.filter(st=>st.projectId===b&&(!v||st.id!==a.taskId)&&st.id!==S),nt=E.trim().length>0&&(!v||g!==void 0),at=st=>{P(_t=>_t.includes(st)?_t.filter(B=>B!==st):[..._t,st])},mt=()=>{nt&&(v&&g===void 0||(v?(u(a.taskId,E.trim(),R,O,X,Y),p("Task updated","success"),i({kind:"task",taskId:a.taskId})):(o(b,E.trim(),R,X||void 0,O.length>0?O:void 0,S||void 0,Y||void 0),p("Task created","success"),i({kind:"project",projectId:b}))))},Dt=()=>{i(v?{kind:"task",taskId:a.taskId}:{kind:"project",projectId:b})},$=v?"edit task":S?"child task":"new task";return d.jsxs("div",{className:$t.container,children:[d.jsxs("div",{className:$t.header,children:[d.jsxs("div",{className:$t.headerTitle,children:[d.jsx("span",{className:$t.badge,children:$}),x&&d.jsxs("span",{className:$t.parentContext,children:[d.jsx("span",{className:$t.parentLabel,children:"Child of"}),d.jsx("span",{className:$t.parentName,children:x.title})]})]}),d.jsxs("div",{className:$t.headerActions,children:[d.jsx("button",{onClick:mt,disabled:!nt,className:$t.btnPrimary,"data-testid":"task-edit-save",children:v?"Save Changes":"Create"}),d.jsx("button",{onClick:Dt,className:$t.btnGhost,children:"Cancel"})]})]}),d.jsxs("div",{className:$t.body,children:[d.jsxs("div",{className:$t.section,children:[d.jsx("label",{className:$t.label,htmlFor:"task-edit-title",children:"Title"}),d.jsx("input",{id:"task-edit-title",type:"text",value:E,onChange:st=>M(st.target.value),placeholder:"Task title...",autoFocus:!0,className:$t.titleInput,"data-testid":"task-edit-title",onKeyDown:st=>{st.key==="Enter"&&nt&&mt()}})]}),d.jsxs("div",{className:$t.section,children:[d.jsx("label",{className:$t.label,htmlFor:"task-edit-description",children:"Description"}),d.jsx("textarea",{id:"task-edit-description",value:R,onChange:st=>K(st.target.value),placeholder:"Describe the task... (markdown supported)",className:$t.descriptionTextarea,"data-testid":"task-edit-description",rows:8})]}),f.length>0&&d.jsxs("div",{className:$t.section,children:[d.jsx("label",{className:$t.label,htmlFor:"task-edit-environment",children:"Environment"}),d.jsxs("select",{id:"task-edit-environment",value:X,onChange:st=>L(st.target.value),className:$t.personaSelect,"data-testid":"task-edit-environment",children:[d.jsx("option",{value:"",children:"No environment"}),f.map(st=>d.jsx("option",{value:st.id,children:st.displayName||st.id},st.id))]})]}),h.length>0&&d.jsxs("div",{className:$t.section,children:[d.jsx("label",{className:$t.label,htmlFor:"task-edit-persona",children:"Persona"}),d.jsxs("select",{id:"task-edit-persona",value:Y,onChange:st=>et(st.target.value),className:$t.personaSelect,"data-testid":"task-edit-persona",children:[d.jsx("option",{value:"",children:"No persona"}),h.map(st=>d.jsx("option",{value:st.id,children:st.name},st.id))]})]}),d.jsxs("div",{className:$t.section,children:[d.jsx("div",{className:$t.label,children:"Dependencies"}),U.length===0?d.jsx("div",{className:$t.noDeps,children:"No other tasks in this project"}):d.jsx("div",{className:$t.depList,children:U.map(st=>{const _t=O.includes(st.id);return d.jsxs("label",{className:`${$t.depItem} ${_t?$t.depItemSelected:""}`,"data-testid":`dep-option-${st.id}`,children:[d.jsx("input",{type:"checkbox",checked:_t,onChange:()=>at(st.id)}),st.title,d.jsxs("span",{style:{opacity:.5,fontSize:"11px",marginLeft:"4px"},children:["(",st.status,")"]})]},st.id)})})]})]})]})}const GE="_container_1xczq_1",YE="_header_1xczq_7",ZE="_form_1xczq_19",KE="_formActions_1xczq_87",XE="_list_1xczq_93",QE="_card_1xczq_99",PE="_active_1xczq_109",FE="_cardHeader_1xczq_113",JE="_cardActions_1xczq_123",$E="_description_1xczq_128",WE="_meta_1xczq_134",tC="_promptDetails_1xczq_151",eC="_promptText_1xczq_163",nC="_empty_1xczq_180",aC="_btnPrimary_1xczq_186",sC="_btnSecondary_1xczq_220",iC="_btnSmall_1xczq_247",lC="_btnDanger_1xczq_273",Ae={container:GE,header:YE,form:ZE,formActions:KE,list:XE,card:QE,active:PE,cardHeader:FE,cardActions:JE,description:$E,meta:WE,promptDetails:tC,promptText:eC,empty:nC,btnPrimary:aC,btnSecondary:sC,btnSmall:iC,btnDanger:lC};function oC(){const{personas:a,createPersona:i,updatePersona:l,deletePersona:o}=On(),[u,h]=_.useState(null),[f,p]=_.useState(!1),[v,g]=_.useState(null),[b,S]=_.useState(""),[x,E]=_.useState(""),[M,R]=_.useState(""),[K,O]=_.useState(""),[P,Y]=_.useState(""),[et,X]=_.useState(0),L=()=>{S(""),E(""),R(""),O(""),Y(""),X(0)},tt=()=>{L(),h(null),p(!0)},U=$=>{S($.name),E($.description),R($.systemPrompt),O($.runtime),Y($.model),X($.maxTurns),h($),p(!1)},nt=$=>{$.preventDefault(),!(!b.trim()||!M.trim())&&(u?(l(u.id,b,x,M,K,P,et),h(null)):(i(b,x,M,K,P,et),p(!1)),L())},at=$=>{o($),g(null),(u==null?void 0:u.id)===$&&(h(null),L())},mt=()=>{h(null),p(!1),L()},Dt=()=>d.jsxs("form",{onSubmit:nt,className:Ae.form,children:[d.jsx("h3",{children:u?"Edit Persona":"Create Persona"}),d.jsxs("label",{children:["Name",d.jsx("input",{type:"text",value:b,onChange:$=>S($.target.value),placeholder:"e.g. Frontend Engineer",required:!0})]}),d.jsxs("label",{children:["Description",d.jsx("input",{type:"text",value:x,onChange:$=>E($.target.value),placeholder:"Brief description..."})]}),d.jsxs("label",{children:["Runtime",d.jsxs("select",{value:K,onChange:$=>O($.target.value),children:[d.jsx("option",{value:"",children:"Default"}),d.jsx("option",{value:"claude-code",children:"claude-code"}),d.jsx("option",{value:"codex",children:"codex"}),d.jsx("option",{value:"copilot",children:"copilot"})]})]}),d.jsxs("label",{children:["Model",d.jsx("input",{type:"text",value:P,onChange:$=>Y($.target.value),placeholder:"e.g. sonnet"})]}),d.jsxs("label",{children:["Max Turns",d.jsx("input",{type:"number",value:et,onChange:$=>X(parseInt($.target.value,10)||0),min:0})]}),d.jsxs("label",{children:["System Prompt",d.jsx("textarea",{value:M,onChange:$=>R($.target.value),placeholder:"You are a senior frontend engineer...",rows:10,required:!0})]}),d.jsxs("div",{className:Ae.formActions,children:[d.jsx("button",{type:"submit",className:Ae.btnPrimary,children:u?"Save":"Create"}),d.jsx("button",{type:"button",onClick:mt,className:Ae.btnSecondary,children:"Cancel"})]})]});return d.jsxs("div",{className:Ae.container,children:[d.jsxs("div",{className:Ae.header,children:[d.jsx("h2",{children:"Personas"}),d.jsx("button",{onClick:tt,className:Ae.btnPrimary,children:"+ New Persona"})]}),(f||u)&&Dt(),a.length===0&&!f?d.jsx("p",{className:Ae.empty,children:"No personas yet. Create one to get started."}):d.jsx("div",{className:Ae.list,children:a.map($=>d.jsxs("div",{className:`${Ae.card} ${(u==null?void 0:u.id)===$.id?Ae.active:""}`,children:[d.jsxs("div",{className:Ae.cardHeader,children:[d.jsx("strong",{children:$.name}),d.jsxs("div",{className:Ae.cardActions,children:[d.jsx("button",{onClick:()=>U($),className:Ae.btnSmall,children:"Edit"}),v===$.id?d.jsxs(d.Fragment,{children:[d.jsx("button",{onClick:()=>at($.id),className:Ae.btnDanger,children:"Confirm"}),d.jsx("button",{onClick:()=>g(null),className:Ae.btnSmall,children:"Cancel"})]}):d.jsx("button",{onClick:()=>g($.id),className:Ae.btnSmall,children:"Delete"})]})]}),$.description&&d.jsx("p",{className:Ae.description,children:$.description}),d.jsxs("div",{className:Ae.meta,children:[$.runtime&&d.jsxs("span",{children:["Runtime: ",$.runtime]}),$.model&&d.jsxs("span",{children:["Model: ",$.model]}),$.maxTurns>0&&d.jsxs("span",{children:["Max turns: ",$.maxTurns]})]}),d.jsxs("details",{className:Ae.promptDetails,children:[d.jsx("summary",{children:"System Prompt"}),d.jsx("pre",{className:Ae.promptText,children:$.systemPrompt})]})]},$.id))})]})}const Eg=220,Cg=70,rC=40,cC=60,uC="hierarchy",dC="dependency";function fC(a){return _.useMemo(()=>{if(a.length===0)return{nodes:[],edges:[]};const i=new Hp.graphlib.Graph({multigraph:!0});i.setDefaultEdgeLabel(()=>({})),i.setGraph({rankdir:"TB",nodesep:rC,ranksep:cC});const l=new Map(a.map(f=>[f.id,f])),o=new Map;for(const f of a)if(f.parentTaskId&&l.has(f.parentTaskId)){const p=o.get(f.parentTaskId)||[];p.push(f),o.set(f.parentTaskId,p)}for(const f of a)i.setNode(f.id,{width:Eg,height:Cg});const u=[];for(const f of a){if(f.parentTaskId&&l.has(f.parentTaskId)){const p=`hierarchy-${f.parentTaskId}-${f.id}`;i.setEdge(f.parentTaskId,f.id,{},p),u.push({id:p,source:f.parentTaskId,target:f.id,type:"smoothstep",data:{edgeType:uC},style:{stroke:"var(--accent-green)",strokeWidth:2},animated:!1})}for(const p of f.dependsOn)if(l.has(p)){const v=`dependency-${p}-${f.id}`;i.setEdge(p,f.id,{},v),u.push({id:v,source:p,target:f.id,type:"smoothstep",data:{edgeType:dC},style:{stroke:"var(--text-tertiary)",strokeWidth:1.5,strokeDasharray:"6 3"},animated:!1})}}return Hp.layout(i),{nodes:a.map(f=>{const p=i.node(f.id),v=o.get(f.id)||[];return{id:f.id,type:"task",position:{x:p.x-Eg/2,y:p.y-Cg/2},data:{task:f,childCount:v.length,doneChildCount:v.filter(g=>g.status==="done").length,hasDependencies:f.dependsOn.length>0}}}),edges:u}},[a])}const hC="_dagContainer_iuddu_1",mC="_taskNode_iuddu_26",pC="_taskNodeBorder_iuddu_48",vC="_taskNodeContent_iuddu_54",gC="_taskNodeHeader_iuddu_64",yC="_taskNodeIcon_iuddu_71",bC="_taskNodeTitle_iuddu_76",SC="_taskNodeBadges_iuddu_84",_C="_childBadge_iuddu_89",TC="_depBadge_iuddu_101",xC="_handle_iuddu_113",jC="_emptyCta_iuddu_120",AC="_ctaDescription_iuddu_131",NC="_ctaButton_iuddu_138",We={dagContainer:hC,taskNode:mC,taskNodeBorder:pC,taskNodeContent:vC,taskNodeHeader:gC,taskNodeIcon:yC,taskNodeTitle:bC,taskNodeBadges:SC,childBadge:_C,depBadge:TC,handle:xC,emptyCta:jC,ctaDescription:AC,ctaButton:NC},Dg={pending:{color:"var(--text-tertiary)",icon:"○"},assigned:{color:"var(--accent-blue)",icon:"◎"},in_progress:{color:"var(--accent-green)",icon:"●"},review:{color:"var(--accent-yellow)",icon:"◉"},done:{color:"var(--accent-green)",icon:"✓"},failed:{color:"var(--accent-red)",icon:"✗"},waiting_input:{color:"var(--accent-yellow)",icon:"⧖"}};function EC({data:a}){const{task:i,childCount:l,doneChildCount:o,hasDependencies:u}=a,h=Dg[i.status]||Dg.pending;return d.jsxs("div",{className:We.taskNode,"data-task-id":i.id,"data-task-title":i.title,children:[d.jsx(Ip,{type:"target",position:Gp.Top,className:We.handle}),d.jsx("div",{className:We.taskNodeBorder,style:{backgroundColor:h.color}}),d.jsxs("div",{className:We.taskNodeContent,children:[d.jsxs("div",{className:We.taskNodeHeader,children:[d.jsx("span",{className:We.taskNodeIcon,style:{color:h.color},children:h.icon}),d.jsx("span",{className:We.taskNodeTitle,children:i.title})]}),d.jsxs("div",{className:We.taskNodeBadges,children:[l>0&&d.jsxs("span",{className:We.childBadge,children:[o,"/",l]}),u&&d.jsx("span",{className:We.depBadge,children:"dep"})]})]}),d.jsx(Ip,{type:"source",position:Gp.Bottom,className:We.handle})]})}const kg={pending:"#6b7a8d",assigned:"#70a1ff",in_progress:"#4ecca3",review:"#f0c040",done:"#4ecca3",failed:"#e94560",waiting_input:"#f0c040"},CC={task:EC};function DC({projectId:a,setViewMode:i}){const{tasks:l}=On(),o=_.useMemo(()=>l.filter(v=>v.projectId===a),[l,a]),{nodes:u,edges:h}=fC(o),f=_.useCallback((v,g)=>{i({kind:"task",taskId:g.id})},[i]),p=_.useCallback(v=>{const g=v.data;return kg[g.task.status]||kg.pending},[]);return o.length===0?d.jsxs("div",{className:We.emptyCta,children:[d.jsx("button",{className:We.ctaButton,onClick:()=>i({kind:"new_task",projectId:a}),children:"Create Task"}),d.jsx("div",{className:We.ctaDescription,children:"Create tasks to see the dependency graph"})]}):d.jsx("div",{className:We.dagContainer,children:d.jsxs(Vb,{nodes:u,edges:h,nodeTypes:CC,onNodeClick:f,fitView:!0,fitViewOptions:{padding:.2},minZoom:.3,maxZoom:2,children:[d.jsx(Lb,{variant:qb.Dots,gap:24,size:1,color:"var(--text-disabled)"}),d.jsx(Hb,{showInteractive:!1}),d.jsx(Ib,{nodeColor:p,maskColor:"var(--bg-overlay)",style:{background:"var(--bg-inset)"}})]})})}const kC="_panelContainer_1fq0v_1",wC="_emptyState_1fq0v_8",MC="_projectSummary_1fq0v_17",RC="_projectSummaryTitle_1fq0v_28",OC="_projectSummarySubtitle_1fq0v_32",zC="_header_1fq0v_36",BC="_headerInfo_1fq0v_63",UC="_killButton_1fq0v_69",VC="_headerTitle_1fq0v_98",LC="_headerActions_1fq0v_108",qC="_taskStatusBadge_1fq0v_115",HC="_taskBranch_1fq0v_124",IC="_taskBlockedBadge_1fq0v_130",GC="_btnPrimary_1fq0v_138",YC="_btnDanger_1fq0v_169",ZC="_btnGhost_1fq0v_208",KC="_rejectInput_1fq0v_234",XC="_tabBar_1fq0v_264",QC="_tab_1fq0v_264",PC="_active_1fq0v_285",FC="_eventScroll_1fq0v_290",JC="_tabContent_1fq0v_296",$C="_noContext_1fq0v_301",WC="_overviewContent_1fq0v_307",tD="_overviewDashboard_1fq0v_316",eD="_overviewHero_1fq0v_322",nD="_statusBadge_1fq0v_329",aD="_statusPending_1fq0v_341",sD="_statusAssigned_1fq0v_346",iD="_statusInProgress_1fq0v_351",lD="_statusReview_1fq0v_356",oD="_statusDone_1fq0v_361",rD="_statusFailed_1fq0v_366",cD="_statusWaitingInput_1fq0v_371",uD="_overviewBranchPill_1fq0v_376",dD="_branchLink_1fq0v_391",fD="_overviewSection_1fq0v_402",hD="_overviewLabel_1fq0v_408",mD="_overviewValue_1fq0v_415",pD="_overviewMuted_1fq0v_420",vD="_overviewMarkdown_1fq0v_426",gD="_envRow_1fq0v_495",yD="_envDot_1fq0v_501",bD="_envDotGreen_1fq0v_508",SD="_envDotYellow_1fq0v_512",_D="_envDotRed_1fq0v_516",TD="_envDotGray_1fq0v_520",xD="_depList_1fq0v_524",jD="_depItem_1fq0v_530",AD="_depBlocked_1fq0v_537",ND="_depDone_1fq0v_541",ED="_timeline_1fq0v_545",CD="_timelineRow_1fq0v_551",DD="_timelineKey_1fq0v_558",kD="_timelineValue_1fq0v_564",wD="_timelineDelta_1fq0v_568",MD="_reviewNotes_1fq0v_579",RD="_waitingMessage_1fq0v_596",OD="_errorMessage_1fq0v_600",zD="_eventOverflowWarning_1fq0v_604",BD="_attemptSelector_1fq0v_618",UD="_attemptLabel_1fq0v_629",VD="_attemptButton_1fq0v_633",LD="_attemptActive_1fq0v_650",qD="_attemptStatus_1fq0v_656",HD="_emptyCta_1fq0v_662",ID="_ctaTitle_1fq0v_674",GD="_ctaDescription_1fq0v_680",YD="_ctaButton_1fq0v_687",ZD="_projectHeader_1fq0v_736",KD="_projectName_1fq0v_761",XD="_projectMeta_1fq0v_774",QD="_metaRow_1fq0v_782",PD="_metaLabel_1fq0v_789",FD="_metaValue_1fq0v_799",JD="_metaPlaceholder_1fq0v_809",$D="_editButton_1fq0v_814",WD="_editInput_1fq0v_830",tk="_editTextarea_1fq0v_862",ek="_editSelect_1fq0v_898",nk="_archiveButton_1fq0v_931",ak="_repoLink_1fq0v_961",sk="_metaValueClickable_1fq0v_971",ik="_editHint_1fq0v_990",lk="_editError_1fq0v_999",ok="_editInputInvalid_1fq0v_1006",rk="_unsavedDot_1fq0v_1011",ck="_metaToggle_1fq0v_1019",uk="_metaToggleArrow_1fq0v_1040",dk="_metaToggleArrowOpen_1fq0v_1045",fk="_progressBarContainer_1fq0v_1049",hk="_progressBar_1fq0v_1049",mk="_progressFill_1fq0v_1065",pk="_progressLabel_1fq0v_1072",vk="_metaTimestamps_1fq0v_1079",gk="_metaTimestamp_1fq0v_1079",yk="_editFieldWrapper_1fq0v_1095",A={panelContainer:kC,emptyState:wC,projectSummary:MC,projectSummaryTitle:RC,projectSummarySubtitle:OC,header:zC,headerInfo:BC,killButton:UC,headerTitle:VC,headerActions:LC,taskStatusBadge:qC,taskBranch:HC,taskBlockedBadge:IC,btnPrimary:GC,btnDanger:YC,btnGhost:ZC,rejectInput:KC,tabBar:XC,tab:QC,active:PC,eventScroll:FC,tabContent:JC,noContext:$C,overviewContent:WC,overviewDashboard:tD,overviewHero:eD,statusBadge:nD,statusPending:aD,statusAssigned:sD,statusInProgress:iD,statusReview:lD,statusDone:oD,statusFailed:rD,statusWaitingInput:cD,overviewBranchPill:uD,branchLink:dD,overviewSection:fD,overviewLabel:hD,overviewValue:mD,overviewMuted:pD,overviewMarkdown:vD,envRow:gD,envDot:yD,envDotGreen:bD,envDotYellow:SD,envDotRed:_D,envDotGray:TD,depList:xD,depItem:jD,depBlocked:AD,depDone:ND,timeline:ED,timelineRow:CD,timelineKey:DD,timelineValue:kD,timelineDelta:wD,reviewNotes:MD,waitingMessage:RD,errorMessage:OD,eventOverflowWarning:zD,attemptSelector:BD,attemptLabel:UD,attemptButton:VD,attemptActive:LD,attemptStatus:qD,emptyCta:HD,ctaTitle:ID,ctaDescription:GD,ctaButton:YD,projectHeader:ZD,projectName:KD,projectMeta:XD,metaRow:QD,metaLabel:PD,metaValue:FD,metaPlaceholder:JD,editButton:$D,editInput:WD,editTextarea:tk,editSelect:ek,archiveButton:nk,repoLink:ak,metaValueClickable:sk,editHint:ik,editError:lk,editInputInvalid:ok,unsavedDot:rk,metaToggle:ck,metaToggleArrow:uk,metaToggleArrowOpen:dk,progressBarContainer:fk,progressBar:hk,progressFill:mk,progressLabel:pk,metaTimestamps:vk,metaTimestamp:gk,editFieldWrapper:yk};function wg(a,i){const l=[];let o=a;const u=new Set;for(;o&&i.has(o)&&!u.has(o);){u.add(o);const h=i.get(o);l.unshift(h),o=h.parentTaskId||void 0}return l}function bk(a,i,l){const o={label:"Home",viewMode:{kind:"empty"}};switch(a.kind){case"empty":return[{label:"Home",viewMode:void 0}];case"settings":return[o,{label:"Settings",viewMode:void 0}];case"persona_management":return[o,{label:"Personas",viewMode:void 0}];case"new_environment":return[o,{label:"New Environment",viewMode:void 0}];case"project":{const u=i.find(h=>h.id===a.projectId);return[o,{label:(u==null?void 0:u.name)??"Project",viewMode:void 0}]}case"new_task":{const u=i.find(f=>f.id===a.projectId),h=[o,{label:(u==null?void 0:u.name)??"Project",viewMode:{kind:"project",projectId:a.projectId}}];if(a.parentTaskId){const f=wg(a.parentTaskId,l);for(const p of f)h.push({label:p.title,viewMode:{kind:"task",taskId:p.id}})}return h.push({label:"New Task",viewMode:void 0}),h}case"task":{const u=wg(a.taskId,l),h=l.get(a.taskId),f=h==null?void 0:h.projectId,p=f?i.find(b=>b.id===f):void 0,v=[o];p&&v.push({label:p.name,viewMode:{kind:"project",projectId:p.id}});for(let b=0;b<u.length-1;b++)v.push({label:u[b].title,viewMode:{kind:"task",taskId:u[b].id}});const g=u[u.length-1];return v.push({label:(g==null?void 0:g.title)??a.taskId,viewMode:void 0}),v}case"new_chat":return[o,{label:"New Chat",viewMode:void 0}];case"session":return[o,{label:`Session ${a.sessionId.slice(0,8)}`,viewMode:void 0}];default:return[{label:"Home",viewMode:void 0}]}}function Sk({sessionId:a,session:i,isActive:l,onKill:o}){return d.jsxs("div",{className:A.header,children:[d.jsxs("span",{children:["Session: ",a.slice(0,8),i&&` | ${i.runtime} | ${i.status}`]}),d.jsxs("span",{className:A.headerInfo,children:[i&&d.jsx("span",{children:i.prompt.length>60?i.prompt.slice(0,60)+"...":i.prompt}),l&&d.jsx("button",{onClick:()=>o(a),title:"Stop session",className:A.killButton,children:"×"})]})]})}function _y({eventsDropped:a}){return a<=0?d.jsx(d.Fragment,{}):d.jsxs("div",{className:A.eventOverflowWarning,role:"alert",children:["⚠ ",a.toLocaleString()," older event",a===1?"":"s"," were dropped — only the most recent 5,000 are shown. Full history is available in the session log."]})}function _k({sessionEvents:a,session:i,eventsDropped:l,scrollRef:o}){const u=i&&["completed","failed","killed"].includes(i.status),h=u?`Session ${i.status} with no events recorded.`:"Waiting for events...";return d.jsxs("div",{ref:o,className:A.eventScroll,children:[a.length===0&&d.jsx("div",{className:u?A.errorMessage:A.waitingMessage,children:h}),d.jsx(_y,{eventsDropped:l}),a.map((f,p)=>d.jsx(vy,{event:f,toolUseCtx:f.toolUseCtx},`${f.sessionId}-${f.timestamp}-${p}`))]})}function Tk(a){const i=[];for(const l of a){const o=i[i.length-1];l.eventType==="text"&&(o==null?void 0:o.eventType)==="text"?i[i.length-1]={...o,content:o.content+l.content}:i.push(l)}return i}function xk(a){const i=new Map;for(const h of a)if(h.raw)try{i.set(h,JSON.parse(h.raw))}catch{}const l=new Map;for(const h of a){if(h.eventType!=="tool_use")continue;const f=i.get(h);if(!(!f||typeof f.id!="string"))try{const p=JSON.parse(h.content);l.set(f.id,{tool:p.tool??"",args:p.args})}catch{}}const o=new Set;return a.map(h=>{if(h.eventType!=="tool_result")return h;const f=i.get(h);if(!f||typeof f.tool_use_id!="string")return h;const p=l.get(f.tool_use_id);return p?(o.add(f.tool_use_id),{...h,toolUseCtx:p}):h}).filter(h=>{if(h.eventType!=="tool_use")return!0;const f=i.get(h);return f&&typeof f.id=="string"?!o.has(f.id):!0})}function er(a){if(!a)return"—";const i=new Date(a);return isNaN(i.getTime())?"—":i.toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})}function Xu(a,i){if(!a||!i)return;const l=new Date(i).getTime()-new Date(a).getTime();if(isNaN(l)||l<0)return;const o=Math.floor(l/6e4),u=Math.floor(l%6e4/1e3);if(o===0)return`${u}s`;const h=Math.floor(o/60),f=o%60;return h===0?`${o}m ${u}s`:`${h}h ${f}m`}function Ty(a){const i=a.toLowerCase();return i==="ready"||i==="running"||i==="available"||i==="connected"?A.envDotGreen:i==="provisioning"||i==="starting"||i==="pending"||i==="connecting"?A.envDotYellow:i==="error"||i==="failed"||i==="disconnected"?A.envDotRed:A.envDotGray}function Mg(a){if(!a)return"";const i=new Date(a);if(isNaN(i.getTime()))return"";const o=Date.now()-i.getTime();if(o<0)return"just now";const u=Math.floor(o/6e4);if(u<1)return"just now";if(u<60)return`${u}m ago`;const h=Math.floor(u/60);if(h<24)return`${h}h ago`;const f=Math.floor(h/24);return f<30?`${f}d ago`:i.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}function jk({status:a}){const i={pending:"Pending",assigned:"Assigned",in_progress:"In Progress",waiting_input:"Waiting for Input",review:"Review",done:"Done",failed:"Failed"},l={pending:A.statusPending,assigned:A.statusAssigned,in_progress:A.statusInProgress,waiting_input:A.statusWaitingInput,review:A.statusReview,done:A.statusDone,failed:A.statusFailed};return d.jsx("span",{className:`${A.statusBadge} ${l[a]??A.statusPending}`,children:i[a]??a})}function Ak({task:a,tasksById:i,environments:l,projects:o}){const u=l.find(p=>p.id===a.environmentId),h=o.find(p=>p.id===a.projectId),f=a.branch&&(h!=null&&h.repoUrl)?`${h.repoUrl.replace(/\/$/,"")}/tree/${encodeURIComponent(a.branch)}`:void 0;return d.jsxs("div",{className:A.overviewDashboard,children:[d.jsxs("div",{className:A.overviewHero,children:[d.jsx(jk,{status:a.status}),a.branch&&d.jsx("span",{className:A.overviewBranchPill,children:f?d.jsxs("a",{href:f,target:"_blank",rel:"noreferrer noopener",className:A.branchLink,children:["🔗"," ",a.branch]}):d.jsxs("span",{children:["🔗"," ",a.branch]})})]}),typeof a.description=="string"&&a.description&&d.jsxs("div",{className:A.overviewSection,children:[d.jsx("div",{className:A.overviewLabel,children:"Description"}),d.jsx("div",{className:A.overviewMarkdown,children:d.jsx(fd,{remarkPlugins:[hd],children:a.description})})]}),a.environmentId&&d.jsxs("div",{className:A.overviewSection,children:[d.jsx("div",{className:A.overviewLabel,children:"Environment"}),d.jsxs("div",{className:A.envRow,children:[u&&d.jsx("span",{className:`${A.envDot} ${Ty(u.status)}`,title:u.status,"aria-label":`Status: ${u.status}`,role:"img"}),d.jsx("span",{className:A.overviewValue,children:(u==null?void 0:u.displayName)??a.environmentId})]})]}),d.jsxs("div",{className:A.overviewSection,children:[d.jsx("div",{className:A.overviewLabel,children:"Dependencies"}),a.dependsOn.length===0?d.jsx("div",{className:A.overviewMuted,children:"None"}):d.jsx("div",{className:A.depList,children:a.dependsOn.map(p=>{const v=i.get(p),g=(v==null?void 0:v.status)==="done";return d.jsxs("div",{className:`${A.depItem} ${g?A.depDone:A.depBlocked}`,children:[d.jsx("span",{children:g?"✓":"○"}),d.jsx("span",{children:(v==null?void 0:v.title)??p})]},p)})})]}),d.jsxs("div",{className:A.overviewSection,children:[d.jsx("div",{className:A.overviewLabel,children:"Timeline"}),d.jsxs("div",{className:A.timeline,children:[a.createdAt&&d.jsxs("div",{className:A.timelineRow,children:[d.jsx("span",{className:A.timelineKey,children:"Created"}),d.jsx("span",{className:A.timelineValue,children:er(a.createdAt)})]}),a.assignedAt&&(()=>{const p=Xu(a.createdAt,a.assignedAt);return d.jsxs("div",{className:A.timelineRow,children:[d.jsx("span",{className:A.timelineKey,children:"Assigned"}),d.jsx("span",{className:A.timelineValue,children:er(a.assignedAt)}),p!==void 0&&d.jsx("span",{className:A.timelineDelta,children:p})]})})(),a.startedAt&&(()=>{const p=Xu(a.assignedAt??a.createdAt,a.startedAt);return d.jsxs("div",{className:A.timelineRow,children:[d.jsx("span",{className:A.timelineKey,children:"Started"}),d.jsx("span",{className:A.timelineValue,children:er(a.startedAt)}),p!==void 0&&d.jsx("span",{className:A.timelineDelta,children:p})]})})(),a.completedAt&&(()=>{const p=Xu(a.startedAt,a.completedAt);return d.jsxs("div",{className:A.timelineRow,children:[d.jsx("span",{className:A.timelineKey,children:"Completed"}),d.jsx("span",{className:A.timelineValue,children:er(a.completedAt)}),p!==void 0&&d.jsx("span",{className:A.timelineDelta,children:p})]})})(),!a.createdAt&&!a.assignedAt&&!a.startedAt&&!a.completedAt&&d.jsx("div",{className:A.overviewMuted,children:"No timing data"})]})]}),a.reviewNotes&&d.jsxs("div",{className:A.overviewSection,children:[d.jsx("div",{className:A.overviewLabel,children:"Review Notes"}),d.jsx("div",{className:A.reviewNotes,children:a.reviewNotes})]})]})}function Nk({task:a,sessionId:i,isBlocked:l,rejectNotes:o,onRejectNotesChange:u,onStart:h,onStop:f,onApprove:p,onReject:v,onDelete:g,onEdit:b}){if(a.status==="pending"||a.status==="assigned")return l?d.jsxs("div",{className:A.headerActions,children:[d.jsx("button",{onClick:b,className:A.btnGhost,children:"Edit"}),d.jsx("button",{onClick:g,className:A.btnDanger,children:"Delete"})]}):d.jsxs("div",{className:A.headerActions,children:[d.jsx("button",{onClick:h,className:A.btnPrimary,children:"Start"}),d.jsx("button",{onClick:b,className:A.btnGhost,children:"Edit"}),d.jsx("button",{onClick:g,className:A.btnDanger,children:"Delete"})]});if(a.status==="in_progress"||a.status==="waiting_input")return d.jsx("div",{className:A.headerActions,children:d.jsx("button",{onClick:f,disabled:!i,className:A.btnDanger,children:"Stop"})});if(a.status==="review")return d.jsxs("div",{className:A.headerActions,children:[d.jsx("input",{type:"text",value:o,onChange:S=>u(S.target.value),placeholder:"Rejection notes...",className:A.rejectInput}),d.jsx("button",{onClick:p,className:A.btnPrimary,children:"Approve"}),d.jsx("button",{onClick:v,className:A.btnDanger,children:"Reject"})]});if(a.status==="done")return d.jsx("div",{className:A.headerActions,children:d.jsx("button",{onClick:g,className:A.btnDanger,children:"Delete"})});if(a.status==="failed")return d.jsxs("div",{className:A.headerActions,children:[d.jsx("button",{onClick:h,className:A.btnPrimary,children:"Retry"}),d.jsx("button",{onClick:g,className:A.btnDanger,children:"Delete"})]})}function Ek({taskSessions:a,selectedSessionId:i,onSelect:l}){if(!(a.length<2))return d.jsxs("div",{className:A.attemptSelector,"data-testid":"attempt-selector",children:[d.jsx("span",{className:A.attemptLabel,children:"Attempts:"}),a.map((o,u)=>{const h=o.id===i,f=o.status==="completed"?"✓":o.status==="failed"?"✗":o.status==="running"||o.status==="waiting_input"?"●":"";return d.jsxs("button",{className:`${A.attemptButton} ${h?A.attemptActive:""}`,onClick:()=>l(o.id),title:`Attempt #${u+1} — ${o.status}`,"aria-label":`Attempt #${u+1}, ${o.status}`,"aria-pressed":h,"data-testid":`attempt-${u+1}`,children:["#",u+1,f&&d.jsx("span",{className:A.attemptStatus,children:f})]},o.id)})]})}function Ck({viewMode:a,setViewMode:i}){const{events:l,eventsDropped:o,sessions:u,tasks:h,environments:f,loadSessionEvents:p,loadFindings:v,kill:g,startTask:b,approveTask:S,rejectTask:x,deleteTask:E,projects:M,createProject:R,archiveProject:K,updateProject:O,taskSessions:P,loadTaskSessions:Y}=On(),et=_.useRef(null),X=_.useRef(void 0),[L,tt]=_.useState("overview"),[U,nt]=_.useState("tasks"),[at,mt]=_.useState(""),[Dt,$]=_.useState(!1),[st,_t]=_.useState(!1),[B,Q]=_.useState(void 0),lt=_.useRef(void 0),Ct=_.useRef(void 0),[vt,Pt]=_.useState(null),[bt,St]=_.useState(""),[G,ae]=_.useState(""),[ye,en]=_.useState(!1),He=_.useRef(void 0),Wt=_.useRef(null),nn=_.useRef(null),Ue=_.useRef(null),It=_.useRef(null),Kt=_.useRef(null),me=a.kind==="project"?a.projectId:void 0;_.useEffect(()=>{const H=He.current;He.current=me,!(H===void 0||H===me)&&(vt!==null||bt!=="")&&(Pt(null),St(""))},[me,vt,bt]),_.useEffect(()=>{if(vt===null)return;const H=vt==="name"?nn.current:vt==="description"?Ue.current:vt==="repoUrl"?It.current:Kt.current;if(!H)return;const Vt=window.setTimeout(()=>{H.focus()},0);return()=>{window.clearTimeout(Vt)}},[vt]);let F,Rt;a.kind==="task"&&(F=h.find(H=>H.id===a.taskId),Rt=(F==null?void 0:F.projectId)||void 0);const xt=F?P[F.id]??[]:[];let w;a.kind==="session"?w=a.sessionId:a.kind==="task"&&(B&&xt.some(H=>H.id===B)?w=B:w=(F==null?void 0:F.sessionId)||void 0);const V=()=>{$(!0)},W=()=>{F&&(E(F.id),$(!1),i({kind:"project",projectId:F.projectId}))};a.kind==="task"&&(F==null?void 0:F.id)!==lt.current&&(lt.current=F==null?void 0:F.id,L!=="overview"&&tt("overview"),at!==""&&mt(""),B!==void 0&&Q(void 0));const ot=_.useRef(void 0),jt=_.useRef(void 0);if(_.useEffect(()=>{if(!(F!=null&&F.id))return;const H=F.id!==ot.current,Vt=F.sessionId!==jt.current;(H||Vt)&&(ot.current=F.id,jt.current=F.sessionId,Y(F.id))},[F==null?void 0:F.id,F==null?void 0:F.sessionId,Y]),(F==null?void 0:F.status)!==Ct.current){Ct.current=F==null?void 0:F.status;const H=(F==null?void 0:F.status)==="pending"||(F==null?void 0:F.status)==="assigned"?"overview":(F==null?void 0:F.status)==="in_progress"||(F==null?void 0:F.status)==="waiting_input"||(F==null?void 0:F.status)==="review"?"stream":(F==null?void 0:F.status)==="done"?"findings":void 0;H&&H!==L&&tt(H)}const At=_.useMemo(()=>{const H=w?l.filter(Vt=>Vt.sessionId===w):[];return xk(Tk(H))},[l,w]),ht=_.useMemo(()=>new Map(h.map(H=>[H.id,H])),[h]),de=F?F.dependsOn.some(H=>{const Vt=ht.get(H);return Vt!==void 0&&Vt.status!=="done"}):!1,kt=_.useMemo(()=>bk(a,M,ht),[a,M,ht]),pe=H=>{H.viewMode&&i(H.viewMode)},se=w?u.find(H=>H.id===w)??void 0:void 0;if(_.useEffect(()=>{w&&w!==X.current&&(X.current=w,p(w))},[w,p]),_.useEffect(()=>{L==="findings"&&Rt&&v(Rt)},[L,Rt,v]),_.useEffect(()=>{et.current&&L==="stream"&&(et.current.scrollTop=et.current.scrollHeight)},[At.length,L]),a.kind==="settings")return d.jsxs("div",{className:A.panelContainer,children:[d.jsx(ps,{segments:kt,onNavigate:pe}),d.jsx(TE,{viewMode:a,setViewMode:i})]});if(a.kind==="persona_management")return d.jsxs("div",{className:A.panelContainer,children:[d.jsx(ps,{segments:kt,onNavigate:pe}),d.jsx(oC,{})]});if(a.kind==="empty")return M.length===0?d.jsxs("div",{className:A.emptyCta,children:[d.jsx("div",{className:A.ctaTitle,children:"Welcome to Grackle"}),d.jsx("div",{className:A.ctaDescription,children:"Organize your work into projects and let agents tackle the tasks."}),d.jsx("button",{className:A.ctaButton,onClick:()=>{const H=window.prompt("Project name:");H!=null&&H.trim()&&R(H.trim())},children:"Create Your First Project"})]}):d.jsx("div",{className:A.emptyState,children:"Select a project or task to get started"});if(a.kind==="new_chat")return d.jsxs("div",{className:A.panelContainer,children:[d.jsx(ps,{segments:kt,onNavigate:pe}),d.jsx("div",{className:A.emptyState,children:"Enter a prompt below to start a new session"})]});if(a.kind==="project"){const H=M.find(it=>it.id===a.projectId),Vt=h.filter(it=>it.projectId===a.projectId),Fn=Vt.filter(it=>it.status==="done").length,Ie=Vt.length,Re=Ie>0?Math.round(Fn/Ie*100):0,an=100,J=(it,fe)=>{Wt.current=it,Pt(it),St(fe),ae("")},Tt=()=>{Wt.current=null,Pt(null),St(""),ae("")},le=(it,fe)=>{if(it==="name"){const fn=fe.trim();if(!fn)return"Name is required";if(fn.length>an)return`Max ${an} characters`}if(it==="repoUrl"){const fn=fe.trim();if(fn&&!/^https?:\/\/.+/.test(fn))return"Must be a valid http(s) URL"}return""},Xt=it=>{if(!H)return;const fe=bt.trim(),fn=le(it,bt);if(fn){ae(fn);return}if(it==="name"){if(fe===H.name){Tt();return}O(H.id,{name:fe})}else if(it==="description"){const ya=bt;if(ya===H.description){Tt();return}O(H.id,{description:ya})}else if(it==="repoUrl"){if(fe===H.repoUrl){Tt();return}O(H.id,{repoUrl:fe})}else if(it==="defaultEnvironmentId"){if(bt===H.defaultEnvironmentId){Tt();return}O(H.id,{defaultEnvironmentId:bt})}Tt()},ft=(it,fe)=>{it.key==="Escape"?Tt():it.key==="Enter"&&fe!=="description"&&Xt(fe)},Oe=it=>H?it==="name"?bt.trim()!==H.name:it==="description"?bt!==H.description:it==="repoUrl"?bt.trim()!==H.repoUrl:it==="defaultEnvironmentId"?bt!==H.defaultEnvironmentId:!1:!1,Je=f.find(it=>it.id===(H==null?void 0:H.defaultEnvironmentId)),sn=vt==="description"?"Tab to save · Esc to cancel":"Enter to save · Esc to cancel";return d.jsxs("div",{className:A.panelContainer,children:[d.jsx(ps,{segments:kt,onNavigate:pe}),d.jsxs("div",{className:A.projectHeader,children:[d.jsx("span",{className:A.projectName,"data-testid":"project-name",children:vt==="name"?d.jsxs("div",{className:A.editFieldWrapper,children:[d.jsx("input",{ref:nn,className:`${A.editInput} ${G?A.editInputInvalid:""}`,value:bt,onChange:it=>{St(it.target.value),ae("")},onBlur:it=>{if(Wt.current==="name"){Wt.current=null;return}it.relatedTarget instanceof HTMLElement&&it.relatedTarget.dataset.editAction==="name"||Xt("name")},onKeyDown:it=>ft(it,"name"),maxLength:an,"aria-label":"Project name","data-testid":"edit-name-input"}),Oe("name")&&d.jsx("span",{className:A.unsavedDot,title:"Unsaved changes"}),G&&d.jsx("span",{className:A.editError,"data-testid":"edit-error",children:G}),d.jsx("span",{className:A.editHint,children:sn})]}):d.jsxs("button",{type:"button",className:A.metaValueClickable,onClick:()=>J("name",(H==null?void 0:H.name)||""),title:"Click to edit name","aria-label":`Edit project name: ${(H==null?void 0:H.name)||a.projectId}`,"data-testid":"edit-name-button",children:[(H==null?void 0:H.name)||a.projectId,d.jsx("span",{className:A.editButton,"aria-hidden":"true",children:"✏️"})]})}),d.jsx("button",{className:A.archiveButton,onClick:()=>_t(!0),title:"Archive project","data-testid":"archive-project-button",children:"Archive"})]}),d.jsxs("button",{className:A.metaToggle,onClick:()=>en(!ye),"aria-expanded":!ye,"aria-controls":"project-meta-panel","data-testid":"meta-toggle",children:[d.jsx("span",{className:`${A.metaToggleArrow} ${ye?"":A.metaToggleArrowOpen}`,children:"▶"}),"Details"]}),!ye&&d.jsxs("div",{className:A.projectMeta,"data-testid":"project-meta",id:"project-meta-panel",children:[d.jsxs("div",{className:A.metaRow,children:[d.jsx("span",{className:A.metaLabel,children:"Description"}),d.jsx("div",{className:A.metaValue,children:vt==="description"?d.jsxs("div",{className:A.editFieldWrapper,children:[d.jsx("textarea",{ref:Ue,className:A.editTextarea,value:bt,onChange:it=>{St(it.target.value),ae("")},onBlur:it=>{if(Wt.current==="description"){Wt.current=null;return}it.relatedTarget instanceof HTMLElement&&it.relatedTarget.dataset.editAction==="description"||Xt("description")},onKeyDown:it=>ft(it,"description"),title:"Project description","aria-label":"Project description","data-testid":"edit-description-input"}),Oe("description")&&d.jsx("span",{className:A.unsavedDot,title:"Unsaved changes"}),d.jsx("span",{className:A.editHint,children:sn})]}):d.jsxs("button",{type:"button",className:A.metaValueClickable,onClick:()=>J("description",(H==null?void 0:H.description)||""),title:"Click to edit description","aria-label":"Edit project description","data-testid":"edit-description-button",children:[H!=null&&H.description?d.jsx("span",{className:A.overviewMarkdown,children:d.jsx(fd,{remarkPlugins:[hd],children:H.description})}):d.jsx("span",{className:A.metaPlaceholder,children:"No description"}),d.jsx("span",{className:A.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),d.jsxs("div",{className:A.metaRow,children:[d.jsx("span",{className:A.metaLabel,children:"Repository"}),d.jsx("div",{className:A.metaValue,children:vt==="repoUrl"?d.jsxs("div",{className:A.editFieldWrapper,children:[d.jsx("input",{ref:It,className:`${A.editInput} ${G?A.editInputInvalid:""}`,value:bt,onChange:it=>{St(it.target.value),ae("")},onBlur:it=>{if(Wt.current==="repoUrl"){Wt.current=null;return}it.relatedTarget instanceof HTMLElement&&it.relatedTarget.dataset.editAction==="repoUrl"||Xt("repoUrl")},onKeyDown:it=>ft(it,"repoUrl"),placeholder:"https://github.com/...","aria-label":"Project repository URL","data-testid":"edit-repo-input"}),Oe("repoUrl")&&d.jsx("span",{className:A.unsavedDot,title:"Unsaved changes"}),G&&d.jsx("span",{className:A.editError,"data-testid":"edit-error",children:G}),d.jsx("span",{className:A.editHint,children:sn})]}):d.jsxs("button",{type:"button",className:A.metaValueClickable,onClick:it=>{it.preventDefault(),J("repoUrl",(H==null?void 0:H.repoUrl)||"")},title:"Click to edit repository URL","aria-label":"Edit project repository URL","data-testid":"edit-repo-button",children:[H!=null&&H.repoUrl&&/^https?:\/\//i.test(H.repoUrl)?d.jsx("a",{className:A.repoLink,href:H.repoUrl,target:"_blank",rel:"noopener noreferrer",onClick:it=>it.stopPropagation(),children:H.repoUrl}):H!=null&&H.repoUrl?d.jsx("span",{children:H.repoUrl}):d.jsx("span",{className:A.metaPlaceholder,children:"No repository"}),d.jsx("span",{className:A.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),d.jsxs("div",{className:A.metaRow,children:[d.jsx("span",{className:A.metaLabel,children:"Environment"}),d.jsx("div",{className:A.metaValue,children:vt==="defaultEnvironmentId"?d.jsxs("select",{ref:Kt,className:A.editSelect,value:bt,onChange:it=>{Wt.current=null,St(it.target.value);const fe=it.target.value;H&&fe!==H.defaultEnvironmentId&&O(H.id,{defaultEnvironmentId:fe}),Tt()},onBlur:it=>{if(Wt.current==="defaultEnvironmentId"){Wt.current=null;return}it.relatedTarget instanceof HTMLElement&&it.relatedTarget.dataset.editAction==="defaultEnvironmentId"||Tt()},title:"Default environment","aria-label":"Project default environment","data-testid":"edit-env-select",children:[d.jsx("option",{value:"",children:"None"}),f.map(it=>d.jsx("option",{value:it.id,children:it.displayName},it.id))]}):d.jsxs("button",{type:"button",className:A.metaValueClickable,onClick:()=>J("defaultEnvironmentId",(H==null?void 0:H.defaultEnvironmentId)||""),title:"Click to change default environment","aria-label":"Edit project default environment","data-testid":"edit-env-button",children:[Je?d.jsxs("span",{className:A.envRow,children:[d.jsx("span",{className:`${A.envDot} ${Ty(Je.status)}`}),Je.displayName]}):d.jsx("span",{className:A.metaPlaceholder,children:(H==null?void 0:H.defaultEnvironmentId)||"No default environment"}),d.jsx("span",{className:A.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),H&&d.jsxs("div",{className:A.metaTimestamps,children:[d.jsxs("span",{className:A.metaTimestamp,children:["Created ",Mg(H.createdAt)]}),H.updatedAt&&H.updatedAt!==H.createdAt&&d.jsxs("span",{className:A.metaTimestamp,children:["· Updated ",Mg(H.updatedAt)]})]})]}),Ie>0&&d.jsxs("div",{className:A.progressBarContainer,"data-testid":"progress-bar",children:[d.jsx("div",{className:A.progressBar,children:d.jsx("div",{className:A.progressFill,style:{width:`${Re}%`}})}),d.jsxs("span",{className:A.progressLabel,children:[Fn,"/",Ie]})]}),d.jsxs("div",{className:A.tabBar,role:"tablist","aria-label":"Project view",children:[d.jsx("button",{role:"tab","aria-selected":U==="graph",className:`${A.tab} ${U==="graph"?A.active:""}`,onClick:()=>nt("graph"),children:"Graph"}),d.jsx("button",{role:"tab","aria-selected":U==="tasks",className:`${A.tab} ${U==="tasks"?A.active:""}`,onClick:()=>nt("tasks"),children:"Tasks"})]}),U==="tasks"&&Ie>0&&d.jsxs("div",{className:A.projectSummary,children:[d.jsx("span",{className:A.projectSummaryTitle,children:`${Fn}/${Ie} tasks complete`}),d.jsx("span",{className:A.projectSummarySubtitle,children:"Select a task or click + to create one"})]}),U==="tasks"&&Ie===0&&d.jsxs("div",{className:A.emptyCta,children:[d.jsx("button",{className:A.ctaButton,onClick:()=>i({kind:"new_task",projectId:a.projectId}),children:"Create Task"}),d.jsx("div",{className:A.ctaDescription,children:"Break your work into tasks and let agents tackle them"})]}),U==="graph"&&d.jsx(DC,{projectId:a.projectId,setViewMode:i}),d.jsx(pr,{isOpen:st,title:"Archive Project?",description:"This will hide the project from the sidebar. Tasks will not be deleted.",confirmLabel:"Archive",onConfirm:()=>{H&&(K(H.id),i({kind:"empty"})),_t(!1)},onCancel:()=>_t(!1)})]})}if(a.kind==="new_environment")return d.jsxs("div",{className:A.panelContainer,children:[d.jsx(ps,{segments:kt,onNavigate:pe}),d.jsx("div",{className:A.emptyState,children:"Configure the new environment below"})]});if(a.kind==="new_task")return d.jsx(Ng,{viewMode:a,setViewMode:i});if(a.kind==="edit_task")return d.jsx(Ng,{viewMode:a,setViewMode:i});if(a.kind==="task")return d.jsxs("div",{className:A.panelContainer,children:[d.jsx(ps,{segments:kt,onNavigate:pe}),d.jsxs("div",{className:A.header,children:[d.jsxs("span",{className:A.headerTitle,children:[d.jsx("span",{"data-testid":"task-title",children:(F==null?void 0:F.title)||a.taskId}),F&&d.jsx("span",{className:A.taskStatusBadge,"data-testid":"task-status",children:F.status}),(F==null?void 0:F.branch)&&d.jsx("span",{className:A.taskBranch,children:F.branch}),de&&d.jsx("span",{className:A.taskBlockedBadge,children:"blocked"})]}),F&&d.jsx(Nk,{task:F,sessionId:w,isBlocked:de,rejectNotes:at,onRejectNotesChange:mt,onStart:()=>b(F.id),onStop:()=>w&&g(w),onApprove:()=>S(F.id),onReject:()=>{x(F.id,at),mt("")},onDelete:V,onEdit:()=>i({kind:"edit_task",taskId:F.id})})]}),d.jsxs("div",{className:A.tabBar,role:"tablist","aria-label":"Task view",children:[d.jsx("button",{role:"tab","aria-selected":L==="overview",className:`${A.tab} ${L==="overview"?A.active:""}`,onClick:()=>tt("overview"),children:"Overview"}),d.jsx("button",{role:"tab","aria-selected":L==="stream",className:`${A.tab} ${L==="stream"?A.active:""}`,onClick:()=>tt("stream"),children:"Stream"}),d.jsx("button",{role:"tab","aria-selected":L==="findings",className:`${A.tab} ${L==="findings"?A.active:""}`,onClick:()=>tt("findings"),children:"Findings"})]}),d.jsxs(yi,{mode:"wait",children:[L==="overview"&&d.jsx(Pn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:A.overviewContent,children:F?d.jsx(Ak,{task:F,tasksById:ht,environments:f,projects:M}):d.jsx("div",{className:A.waitingMessage,children:"No additional details"})},"overview"),L==="stream"&&d.jsxs(Pn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},style:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden"},children:[d.jsx(Ek,{taskSessions:xt,selectedSessionId:w,onSelect:H=>{Q(H)}}),d.jsxs("div",{ref:et,className:A.eventScroll,children:[!w&&F&&d.jsxs("div",{className:A.emptyCta,children:[d.jsx("button",{className:A.ctaButton,onClick:()=>b(F.id),children:"Start Task"}),d.jsx("div",{className:A.ctaDescription,children:"Click to begin agent execution"})]}),w&&At.length===0&&d.jsx("div",{className:A.waitingMessage,children:"Waiting for events..."}),d.jsx(_y,{eventsDropped:o}),At.map((H,Vt)=>d.jsx(vy,{event:H,toolUseCtx:H.toolUseCtx},`${H.sessionId}-${H.timestamp}-${Vt}`))]})]},"stream"),L==="findings"&&d.jsx(Pn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:A.tabContent,children:Rt?d.jsx(pN,{projectId:Rt}):d.jsx("div",{className:A.noContext,children:"Navigate to a task within a project to view findings"})},"findings")]}),F&&d.jsx(pr,{isOpen:Dt,title:"Delete Task?",description:`"${F.title}" will be permanently removed.`,onConfirm:W,onCancel:()=>$(!1)})]});if(!w)return d.jsx("div",{className:A.emptyState,children:"No session selected"});const Me=(se==null?void 0:se.status)==="running"||(se==null?void 0:se.status)==="waiting_input";return d.jsxs("div",{className:A.panelContainer,children:[d.jsx(ps,{segments:kt,onNavigate:pe}),d.jsx(Sk,{sessionId:w,session:se,isActive:Me,onKill:g}),d.jsx(_k,{sessionEvents:At,session:se,eventsDropped:o,scrollRef:et})]})}const Dk="_toast_sfumy_1",kk="_success_sfumy_18",wk="_icon_sfumy_22",Mk="_error_sfumy_25",Rk="_warning_sfumy_32",Ok="_info_sfumy_38",zk="_message_sfumy_53",Bk="_close_sfumy_60",gl={toast:Dk,success:kk,icon:wk,error:Mk,warning:Rk,info:Ok,message:zk,close:Bk},Uk={success:"✓",error:"✕",warning:"⚠",info:"ℹ"};function Vk({toast:a,onDismiss:i}){return _.useEffect(()=>{const l=setTimeout(()=>i(a.id),a.duration);return()=>clearTimeout(l)},[a.id,a.duration,i]),d.jsxs(Pn.div,{className:`${gl.toast} ${gl[a.variant]}`,role:"status",initial:{opacity:0,y:-16,scale:.94},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-8,scale:.94},transition:{duration:.2,ease:"easeOut"},layout:!0,children:[d.jsx("span",{className:gl.icon,"aria-hidden":"true",children:Uk[a.variant]}),d.jsx("span",{className:gl.message,children:a.message}),d.jsx("button",{type:"button",className:gl.close,onClick:()=>i(a.id),"aria-label":"Dismiss notification",children:"×"})]})}const Lk="_container_qqse2_1",qk={container:Lk};function Hk(){const{toasts:a,dismissToast:i}=vr();return d.jsx("div",{className:qk.container,"data-testid":"toast-container",children:d.jsx(yi,{children:a.map(l=>d.jsx(Vk,{toast:l,onDismiss:i},l.id))})})}const Ik="_root_cdda9_1",Gk="_body_cdda9_7",Yk="_main_cdda9_13",Qu={root:Ik,body:Gk,main:Yk},Zk=typeof window<"u"&&new URLSearchParams(window.location.search).has("mock");function Kk(){const[a,i]=_.useState({kind:"empty"}),{lastSpawnedId:l}=On();return _.useEffect(()=>{l&&i({kind:"session",sessionId:l})},[l]),d.jsxs("div",{className:Qu.root,children:[d.jsx(DS,{setViewMode:i}),d.jsxs("div",{className:Qu.body,children:[d.jsx(BA,{viewMode:a,setViewMode:i}),d.jsxs("div",{className:Qu.main,children:[d.jsx(Ck,{viewMode:a,setViewMode:i},a.kind==="task"?a.taskId:a.kind==="edit_task"?`edit_task:${a.taskId}`:a.kind==="new_task"?`new_task:${a.projectId}:${a.parentTaskId??""}`:a.kind==="session"?a.sessionId:a.kind),d.jsx(eN,{viewMode:a,setViewMode:i})]})]}),d.jsx(Hk,{})]})}function Xk(){const a=Zk?mS:iS;return d.jsx(SS,{children:d.jsx(vS,{children:d.jsx(a,{children:d.jsx(Kk,{})})})})}Xb.createRoot(document.getElementById("root")).render(d.jsx(_.StrictMode,{children:d.jsx(Xk,{})}));
80
+ `),b=((l==null?void 0:l.tool)??"")||(h?"Tool error":"Tool output"),_=l?Bj(l.tool,l.args):"",x=d.jsxs(d.Fragment,{children:[d.jsx("span",{className:h?ve.toolResultIndicatorError:ve.toolResultIndicatorOk,"aria-label":h?"error":"success",children:h?"✗":"✓"}),d.jsx("span",{className:ve.toolResultLabel,children:b}),p&&d.jsx("span",{className:ve.toolResultToggle,"aria-hidden":"true",children:o?"▾":"▸"})]});return d.jsxs("div",{className:ve.toolResultEvent,children:[p?d.jsx("button",{className:ve.toolResultHeader,onClick:()=>{u(E=>!E)},"aria-expanded":o,children:x}):d.jsx("div",{className:ve.toolResultHeader,children:x}),_&&d.jsx("div",{className:ve.toolResultCommand,children:_}),d.jsxs("pre",{className:ve.toolResultPre,children:[v,!o&&p&&d.jsx("span",{className:ve.toolResultEllipsis,children:"…"})]})]})}function Vj({content:a}){return d.jsxs("div",{className:ve.errorEvent,children:["Error: ",a]})}function Lj({content:a}){return d.jsxs("div",{className:ve.statusEvent,children:["--- ",a," ---"]})}function qj({content:a}){return d.jsx("div",{className:ve.userInputEvent,children:d.jsx("span",{className:ve.userInputContent,children:a})})}function Hj({content:a}){return d.jsx("div",{className:ve.defaultEvent,children:a})}function vy({event:a,toolUseCtx:i}){const l=new Date(a.timestamp).toLocaleTimeString();switch(a.eventType){case"system":return d.jsx(Rj,{time:l,content:a.content});case"text":case"output":return d.jsx(Oj,{content:a.content});case"tool_use":return d.jsx(zj,{content:a.content});case"tool_result":return d.jsx(Uj,{content:a.content,raw:a.raw,toolUseCtx:i});case"error":return d.jsx(Vj,{content:a.content});case"status":return d.jsx(Lj,{content:a.content});case"user_input":return d.jsx(qj,{content:a.content});default:return d.jsx(Hj,{content:a.content})}}const Ij="_overlay_9j2g5_1",Gj="_dialog_9j2g5_11",Yj="_title_9j2g5_30",Zj="_description_9j2g5_38",Kj="_actions_9j2g5_45",Xj="_cancelButton_9j2g5_52",Qj="_confirmButton_9j2g5_79",vs={overlay:Ij,dialog:Gj,title:Yj,description:Zj,actions:Kj,cancelButton:Xj,confirmButton:Qj};function pr({isOpen:a,title:i,description:l,confirmLabel:o="Delete",onConfirm:u,onCancel:h}){const f=S.useId(),p=S.useId();return d.jsx(yi,{children:a&&d.jsx(Pn.div,{className:vs.overlay,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},onClick:h,onKeyDown:v=>{v.key==="Escape"&&h()},role:"dialog","aria-modal":"true","aria-labelledby":f,"aria-describedby":l?p:void 0,children:d.jsxs(Pn.div,{className:vs.dialog,initial:{opacity:0,scale:.93,y:-10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.93,y:-10},transition:{duration:.15,ease:[.16,1,.3,1]},onClick:v=>v.stopPropagation(),children:[d.jsx("h3",{id:f,className:vs.title,children:i}),l&&d.jsx("p",{id:p,className:vs.description,children:l}),d.jsxs("div",{className:vs.actions,children:[d.jsx("button",{type:"button",className:vs.cancelButton,onClick:h,autoFocus:!0,children:"Cancel"}),d.jsx("button",{type:"button",className:vs.confirmButton,onClick:u,children:o})]})]})})})}const Pj="_spinner_13c8l_1",Fj="_spin_13c8l_1",Jj="_sm_13c8l_14",$j="_md_13c8l_20",Wj="_lg_13c8l_26",yg={spinner:Pj,spin:Fj,sm:Jj,md:$j,lg:Wj};function bg({size:a="md",className:i,label:l="Loading",liveRegion:o=!1}){return d.jsx("span",{className:`${yg.spinner} ${yg[a]} ${i??""}`,role:o?"status":void 0,"aria-label":l,"aria-hidden":o?void 0:!0})}const tA="_container_1vu3l_1",eA="_header_1vu3l_5",nA="_addButton_1vu3l_17",aA="_createForm_1vu3l_44",sA="_createInput_1vu3l_50",iA="_createButton_1vu3l_81",lA="_creatingHint_1vu3l_122",oA="_projectRow_1vu3l_131",rA="_selected_1vu3l_149",cA="_expandArrow_1vu3l_154",uA="_expanded_1vu3l_161",dA="_projectName_1vu3l_165",fA="_taskCount_1vu3l_169",hA="_newTaskButton_1vu3l_175",mA="_taskRow_1vu3l_202",pA="_taskStatusIcon_1vu3l_227",vA="_taskTitle_1vu3l_231",gA="_dependencyBadge_1vu3l_238",yA="_blockedBadge_1vu3l_250",bA="_leafSpacer_1vu3l_255",_A="_childCountBadge_1vu3l_260",SA="_addChildButton_1vu3l_273",TA="_emptyCta_1vu3l_317",xA="_ctaDescription_1vu3l_330",jA="_ctaButton_1vu3l_336",AA="_emptyTaskCta_1vu3l_371",NA="_createTaskLink_1vu3l_376",Zt={container:tA,header:eA,addButton:nA,createForm:aA,createInput:sA,createButton:iA,creatingHint:lA,projectRow:oA,selected:rA,expandArrow:cA,expanded:uA,projectName:dA,taskCount:fA,newTaskButton:hA,taskRow:mA,taskStatusIcon:pA,taskTitle:vA,dependencyBadge:gA,blockedBadge:yA,leafSpacer:bA,childCountBadge:_A,addChildButton:SA,emptyCta:TA,ctaDescription:xA,ctaButton:jA,emptyTaskCta:AA,createTaskLink:NA},_g={pending:{color:"var(--text-tertiary)",icon:"○"},assigned:{color:"var(--accent-blue)",icon:"◎"},in_progress:{color:"var(--accent-green)",icon:"●"},review:{color:"var(--accent-yellow)",icon:"◉"},done:{color:"var(--accent-green)",icon:"✓"},failed:{color:"var(--accent-red)",icon:"✗"},waiting_input:{color:"var(--accent-yellow)",icon:"⧖"}};function EA(a){const i=new Map(a.map(o=>[o.id,{...o,children:[]}])),l=[];for(const o of i.values())o.parentTaskId&&i.has(o.parentTaskId)?i.get(o.parentTaskId).children.push(o):l.push(o);for(const o of i.values())o.children.sort((u,h)=>u.sortOrder-h.sortOrder);return l.sort((o,u)=>o.sortOrder-u.sortOrder)}const CA=34,DA=16;function gy({node:a,depth:i,expandedTasks:l,toggleTask:o,selectedTaskId:u,setViewMode:h,projectId:f,taskStatusById:p}){const{personas:v}=On(),g=_g[a.status]||_g.pending,b=a.dependsOn.length>0&&a.dependsOn.some(R=>p.get(R)!=="done"),_=l.has(a.id),x=a.children.length>0,E=u===a.id,M=CA+i*DA;return d.jsxs(d.Fragment,{children:[d.jsxs("div",{onClick:()=>h({kind:"task",taskId:a.id}),className:`${Zt.taskRow} ${E?Zt.selected:""}`,style:{paddingLeft:M},"data-task-id":a.id,children:[x&&d.jsx("span",{className:`${Zt.expandArrow} ${_?Zt.expanded:""}`,role:"button",tabIndex:0,"aria-label":_?"Collapse task":"Expand task",onClick:R=>{R.stopPropagation(),o(a.id)},onKeyDown:R=>{(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),R.stopPropagation(),o(a.id))},children:"▸"}),!x&&d.jsx("span",{className:Zt.leafSpacer}),d.jsx("span",{className:Zt.taskStatusIcon,style:{color:g.color},children:g.icon}),d.jsx("span",{className:Zt.taskTitle,title:a.title,children:a.title}),x&&d.jsxs("span",{className:Zt.childCountBadge,children:[a.children.filter(R=>R.status==="done").length,"/",a.children.length]}),a.dependsOn.length>0&&d.jsx("span",{className:`${Zt.dependencyBadge} ${b?Zt.blockedBadge:""}`,title:`Depends on: ${a.dependsOn.join(", ")}`,children:b?"blocked":"dep"}),a.personaId&&(()=>{const R=v.find(K=>K.id===a.personaId);return R?d.jsx("span",{className:Zt.dependencyBadge,title:`Persona: ${R.name}`,style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"8rem"},children:R.name}):null})(),i<nj&&d.jsx("button",{onClick:R=>{R.stopPropagation(),h({kind:"new_task",projectId:f,parentTaskId:a.id})},title:"Add child task","aria-label":"Add child task",className:Zt.addChildButton,children:"+"})]}),d.jsx(yi,{children:x&&_&&d.jsx(Pn.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.15},style:{overflow:"hidden"},children:a.children.map(R=>d.jsx(gy,{node:R,depth:i+1,expandedTasks:l,toggleTask:o,selectedTaskId:u,setViewMode:h,projectId:f,taskStatusById:p},R.id))})})]})}function kA({viewMode:a,setViewMode:i}){const{projects:l,tasks:o,loadTasks:u,createProject:h,projectCreating:f}=On(),[p,v]=S.useState(new Set),[g,b]=S.useState(new Set),[_,x]=S.useState(new Set),[E,M]=S.useState(!1),[R,K]=S.useState(""),O=a.kind==="project"?a.projectId:void 0,P=a.kind==="task"?a.taskId:void 0,Y=S.useRef(p);Y.current=p;const et=S.useMemo(()=>new Map(o.map(U=>[U.id,U.status])),[o]),X=U=>{v(nt=>{const at=new Set(nt);return at.has(U)?at.delete(U):(at.add(U),u(U)),at})},L=U=>{b(nt=>{const at=new Set(nt);return at.has(U)?(at.delete(U),x(mt=>new Set(mt).add(U))):(at.add(U),x(mt=>{const Dt=new Set(mt);return Dt.delete(U),Dt})),at})};S.useEffect(()=>{const U=new Set(o.filter(nt=>nt.parentTaskId).map(nt=>nt.parentTaskId));U.size>0&&b(nt=>{const at=new Set(nt);for(const mt of U)_.has(mt)||at.add(mt);return at})},[o,_]),S.useEffect(()=>{O&&!Y.current.has(O)&&(v(U=>new Set(U).add(O)),u(O))},[O,u]);const tt=()=>{!R.trim()||f||(h(R.trim()),K(""),M(!1))};return d.jsxs("div",{className:Zt.container,children:[d.jsxs("div",{className:Zt.header,children:[d.jsx("span",{children:"Projects"}),d.jsx("button",{className:Zt.addButton,onClick:()=>M(!E),"aria-label":"Create project",title:"Create project",children:"+"})]}),E&&d.jsxs("div",{className:Zt.createForm,children:[d.jsx("input",{type:"text",value:R,onChange:U=>K(U.target.value),onKeyDown:U=>U.key==="Enter"&&tt(),placeholder:"Project name...",autoFocus:!0,disabled:f,className:Zt.createInput}),d.jsx("button",{onClick:tt,className:Zt.createButton,disabled:f,children:f?d.jsx(bg,{size:"sm",label:"Creating project"}):"OK"})]}),f&&d.jsxs("div",{className:Zt.creatingHint,children:[d.jsx(bg,{size:"sm",label:"Creating project"}),"Creating project…"]}),l.length===0&&!E&&d.jsxs("div",{className:Zt.emptyCta,children:[d.jsx("button",{className:Zt.ctaButton,onClick:()=>M(!0),children:"Create Project"}),d.jsx("div",{className:Zt.ctaDescription,children:"Organize your work into projects"})]}),l.map(U=>{const nt=p.has(U.id),at=o.filter($=>$.projectId===U.id),mt=O===U.id,Dt=nt?EA(at):[];return d.jsxs("div",{children:[d.jsxs("div",{onClick:()=>{mt?X(U.id):(nt||X(U.id),i({kind:"project",projectId:U.id}))},className:`${Zt.projectRow} ${mt?Zt.selected:""}`,children:[d.jsx("span",{className:`${Zt.expandArrow} ${nt?Zt.expanded:""}`,children:"▸"}),d.jsx("span",{className:Zt.projectName,title:U.name,children:U.name}),d.jsx("span",{className:Zt.taskCount,children:at.length>0&&`${at.filter($=>$.status==="done").length}/${at.length}`}),d.jsx("button",{onClick:$=>{$.stopPropagation(),i({kind:"new_task",projectId:U.id})},title:"New task",className:Zt.newTaskButton,children:"+"})]}),d.jsx(yi,{children:nt&&d.jsxs(Pn.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2,ease:"easeInOut"},style:{overflow:"hidden"},children:[Dt.map($=>d.jsx(gy,{node:$,depth:0,expandedTasks:g,toggleTask:L,selectedTaskId:P,setViewMode:i,projectId:U.id,taskStatusById:et},$.id)),at.length===0&&d.jsx("div",{className:Zt.emptyTaskCta,children:d.jsx("button",{className:Zt.createTaskLink,onClick:()=>i({kind:"new_task",projectId:U.id}),children:"+ Create Task"})})]})})]},U.id)})]})}const wA="_container_17mc8_1",MA="_content_17mc8_30",Sg={container:wA,content:MA},RA=320,yy=220,by=600,_y="grackle-sidebar-width";function OA(){try{const a=localStorage.getItem(_y);if(a!==null){const i=Number(a);if(Number.isFinite(i)&&i>=yy&&i<=by)return i}}catch{}return RA}function zA(a){try{localStorage.setItem(_y,String(a))}catch{}}function BA({viewMode:a,setViewMode:i}){const[l]=S.useState(OA),o=S.useRef(null);return S.useEffect(()=>{const u=o.current;if(!u)return;const h=new ResizeObserver(f=>{for(const p of f){const v=p.borderBoxSize[0];if(v){const g=Math.round(v.inlineSize);g>=yy&&g<=by&&zA(g)}}});return h.observe(u),()=>{h.disconnect()}},[]),d.jsx("div",{className:Sg.container,ref:o,"data-testid":"sidebar",style:{width:l},children:d.jsx("div",{className:Sg.content,children:d.jsx(kA,{viewMode:a,setViewMode:i})})})}const UA="_bar_23ni8_1",VA="_barColumn_23ni8_26",LA="_barRow_23ni8_52",qA="_input_23ni8_58",HA="_inputSmall_23ni8_87",IA="_select_23ni8_150",GA="_btnPrimary_23ni8_180",YA="_btnDanger_23ni8_211",ZA="_btnGhost_23ni8_250",KA="_badge_23ni8_278",XA="_statusText_23ni8_288",QA="_statusCompleted_23ni8_293",PA="_statusFailed_23ni8_297",FA="_statusBlocked_23ni8_301",JA="_hintText_23ni8_306",$A="_creatingHint_23ni8_311",WA="_errorHint_23ni8_319",tN="_disconnectHint_23ni8_325",ut={bar:UA,barColumn:VA,barRow:LA,input:qA,inputSmall:HA,select:IA,btnPrimary:GA,btnDanger:YA,btnGhost:ZA,badge:KA,statusText:XA,statusCompleted:QA,statusFailed:PA,statusBlocked:FA,hintText:JA,creatingHint:$A,errorHint:WA,disconnectHint:tN};function Tg({value:a,onChange:i,testId:l}){return d.jsxs("select",{"data-testid":l,value:a,onChange:o=>i(o.target.value),className:ut.select,children:[d.jsx("option",{value:"claude-code",children:"claude-code"}),d.jsx("option",{value:"codex",children:"codex"}),d.jsx("option",{value:"copilot",children:"copilot"}),d.jsx("option",{value:"stub",children:"stub"})]})}function xg(a,i){if(!a)return!1;const l=i.find(o=>o.id===a);return l!==void 0&&(l.status==="disconnected"||l.status==="error")}function jg({environmentId:a,onReconnect:i}){return d.jsxs(d.Fragment,{children:[d.jsx("span",{className:ut.disconnectHint,"data-testid":"env-disconnect-hint",children:"Environment unavailable"}),d.jsx("button",{type:"button",onClick:()=>i(a),className:ut.btnGhost,"data-testid":"reconnect-btn",title:"Reconnect the environment to resume messaging",children:"Reconnect"})]})}function eN({viewMode:a,setViewMode:i}){const{spawn:l,sendInput:o,kill:u,sessions:h,tasks:f,environments:p,personas:v,addEnvironment:g,provisionEnvironment:b,codespaces:_,codespaceError:x,codespaceCreating:E,listCodespaces:M,createCodespace:R}=On(),{showToast:K}=vr(),[O,P]=S.useState(""),[Y,et]=S.useState(a.kind==="new_chat"?a.runtime:"claude-code"),[X,L]=S.useState(""),tt=Rt=>{if(L(Rt),Rt){const xt=v.find(w=>w.id===Rt);xt!=null&&xt.runtime&&et(xt.runtime)}},[U,nt]=S.useState(""),[at,mt]=S.useState("local"),[Dt,$]=S.useState("claude-code"),[st,St]=S.useState(""),[B,Q]=S.useState(""),[lt,Ct]=S.useState(""),[vt,Ft]=S.useState(""),[bt,_t]=S.useState(""),[G,ae]=S.useState(""),[ye,en]=S.useState(""),[He,Wt]=S.useState(""),[nn,Ue]=S.useState("pick");S.useEffect(()=>{a.kind==="new_chat"&&et(a.runtime)},[a]);const It=a.kind==="session"?h.find(Rt=>Rt.id===a.sessionId):void 0,Kt=a.kind==="task"?f.find(Rt=>Rt.id===a.taskId):void 0,me=Kt!=null&&Kt.sessionId?h.find(Rt=>Rt.id===Kt.sessionId):void 0,F=Kt?Kt.dependsOn.some(Rt=>{const xt=f.find(w=>w.id===Rt);return xt&&xt.status!=="done"}):!1;if(a.kind==="empty")return d.jsx("div",{className:ut.bar,children:d.jsx("span",{className:ut.hintText,children:"Select a session or click + to start"})});if(a.kind==="edit_task")return d.jsx(d.Fragment,{});if(a.kind==="new_environment"){const Rt=V=>{if(!V.trim())return!0;const W=Number(V);return Number.isInteger(W)&&W>=1&&W<=65535},xt=()=>!(!U.trim()||at==="ssh"&&!st.trim()||at==="codespace"&&!G.trim()||(at==="local"||at==="ssh")&&!Rt(B)),w=()=>{if(!xt())return;const V={};if(at==="local"){if(st.trim()&&(V.host=st.trim()),B.trim()){const W=Number(B);Number.isInteger(W)&&(V.port=W)}}else if(at==="ssh"){if(V.host=st.trim(),lt.trim()&&(V.user=lt.trim()),B.trim()){const W=Number(B);Number.isInteger(W)&&(V.sshPort=W)}ye.trim()&&(V.identityFile=ye.trim())}else at==="docker"?(vt.trim()&&(V.image=vt.trim()),bt.trim()&&(V.repo=bt.trim())):at==="codespace"&&(V.codespaceName=G.trim());g(U.trim(),at,V,Dt),K("Environment added successfully","success"),nt(""),mt("local"),$("claude-code"),St(""),Q(""),Ct(""),Ft(""),_t(""),ae(""),en(""),Wt(""),Ue("pick"),i({kind:"settings"})};return d.jsxs("div",{className:ut.barColumn,children:[d.jsxs("div",{className:ut.barRow,children:[d.jsx("span",{className:ut.badge,children:"new env"}),d.jsx("input",{type:"text",value:U,onChange:V=>nt(V.target.value),placeholder:"Environment name...",autoFocus:!0,className:ut.input}),d.jsxs("select",{value:at,onChange:V=>{mt(V.target.value),V.target.value==="codespace"&&(M(),Ue("pick"),ae(""))},className:ut.select,children:[d.jsx("option",{value:"local",children:"local"}),d.jsx("option",{value:"ssh",children:"ssh"}),d.jsx("option",{value:"docker",children:"docker"}),d.jsx("option",{value:"codespace",children:"codespace"})]}),d.jsx(Tg,{value:Dt,onChange:$,testId:"new-environment-runtime-select"}),d.jsx("button",{onClick:w,disabled:!xt(),className:ut.btnPrimary,children:"Add"})]}),d.jsxs("div",{className:ut.barRow,children:[at==="local"&&d.jsxs(d.Fragment,{children:[d.jsx("input",{type:"text",value:st,onChange:V=>St(V.target.value),placeholder:"Host (optional)...",className:ut.inputSmall}),d.jsx("input",{type:"number",min:1,max:65535,value:B,onChange:V=>Q(V.target.value),placeholder:"Port (optional)...",className:ut.inputSmall})]}),at==="ssh"&&d.jsxs(d.Fragment,{children:[d.jsx("input",{type:"text",value:st,onChange:V=>St(V.target.value),placeholder:"Host (required)...",className:ut.inputSmall}),d.jsx("input",{type:"text",value:lt,onChange:V=>Ct(V.target.value),placeholder:"User (optional)...",className:ut.inputSmall}),d.jsx("input",{type:"number",min:1,max:65535,value:B,onChange:V=>Q(V.target.value),placeholder:"SSH port (optional)...",className:ut.inputSmall}),d.jsx("input",{type:"text",value:ye,onChange:V=>en(V.target.value),placeholder:"Identity file (optional)...",className:ut.inputSmall})]}),at==="docker"&&d.jsxs(d.Fragment,{children:[d.jsx("input",{type:"text",value:vt,onChange:V=>Ft(V.target.value),placeholder:"Image (optional)...",className:ut.inputSmall}),d.jsx("input",{type:"text",value:bt,onChange:V=>_t(V.target.value),placeholder:"Repo (optional)...",className:ut.inputSmall})]}),at==="codespace"&&nn==="pick"&&d.jsxs(d.Fragment,{children:[d.jsxs("select",{value:G,onChange:V=>{V.target.value==="__create__"?(Ue("create"),ae("")):(ae(V.target.value),V.target.value&&!U.trim()&&nt(V.target.value))},disabled:E,className:ut.select,children:[d.jsx("option",{value:"",children:"Select a codespace..."}),_.map(V=>d.jsxs("option",{value:V.name,children:[V.name," (",V.repository,") — ",V.state]},V.name)),d.jsx("option",{value:"__create__",children:"Create new from repo..."})]}),E&&d.jsx("span",{className:ut.creatingHint,children:"Creating codespace..."}),x&&d.jsx("span",{className:ut.errorHint,children:x})]}),at==="codespace"&&nn==="create"&&d.jsxs(d.Fragment,{children:[d.jsx("input",{type:"text",value:He,onChange:V=>Wt(V.target.value),placeholder:"owner/repo",className:ut.inputSmall}),d.jsx("button",{onClick:()=>{He.trim()&&(R(He.trim()),Ue("pick"),Wt(""))},disabled:!He.trim(),className:ut.btnPrimary,children:"Create"}),d.jsx("button",{onClick:()=>{Ue("pick"),Wt("")},className:ut.btnGhost,children:"Cancel"})]})]})]})}if(a.kind==="project")return d.jsx("div",{className:ut.bar,children:d.jsx("span",{className:ut.hintText,children:"Select a task or click + to create one"})});if(a.kind==="new_task")return d.jsx(d.Fragment,{});if(a.kind==="task"&&Kt){if(Kt.status==="pending"||Kt.status==="assigned"){const Rt=F?Kt.dependsOn.map(xt=>f.find(w=>w.id===xt)).filter(xt=>xt&&xt.status!=="done").map(xt=>xt.title):[];return d.jsx("div",{className:ut.bar,children:F?d.jsxs("span",{className:ut.statusBlocked,children:["Blocked by: ",Rt.join(", ")]}):d.jsx("span",{className:ut.hintText,children:"Use the buttons above to start or manage this task"})})}if(Kt.status==="in_progress"||Kt.status==="waiting_input"){if((me==null?void 0:me.status)==="waiting_input"){const xt=(me==null?void 0:me.environmentId)||Kt.environmentId,w=xg(xt,p),V=W=>{W.preventDefault(),!(!O.trim()||!Kt.sessionId||w)&&(o(Kt.sessionId,O),P(""))};return d.jsxs("form",{onSubmit:V,className:ut.bar,children:[w&&xt&&d.jsx(jg,{environmentId:xt,onReconnect:b}),d.jsx("input",{type:"text",value:O,onChange:W=>P(W.target.value),placeholder:"Type a message...",autoFocus:!w,disabled:w,className:ut.input}),d.jsx("span",{title:w?"Environment is unavailable — reconnect first":void 0,children:d.jsx("button",{type:"submit",disabled:!O.trim()||w,className:ut.btnPrimary,children:"Send"})})]})}return d.jsx("div",{className:ut.bar,children:d.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:ut.input})})}if(Kt.status==="review")return d.jsx("div",{className:ut.bar,children:d.jsx("span",{className:ut.hintText,children:"Review the changes above, then approve or reject in the header"})});if(Kt.status==="done")return d.jsxs("div",{className:ut.bar,children:[d.jsx("span",{className:`${ut.statusText} ${ut.statusCompleted}`,children:"Task completed"}),d.jsx("button",{onClick:()=>i({kind:"new_task",projectId:Kt.projectId}),className:ut.btnPrimary,children:"+ New Task"})]});if(Kt.status==="failed")return d.jsx("div",{className:ut.bar,children:d.jsx("span",{className:`${ut.statusText} ${ut.statusFailed}`,children:"Task failed"})})}if(a.kind==="new_chat"){const Rt=xt=>{xt.preventDefault(),O.trim()&&(l(a.environmentId,O,void 0,Y,X),K("Session started","success"),P(""),L(""))};return d.jsxs("form",{onSubmit:Rt,className:ut.bar,children:[d.jsx("span",{className:ut.badge,children:"new chat"}),d.jsx("input",{type:"text",value:O,onChange:xt=>P(xt.target.value),placeholder:"Enter prompt...",autoFocus:!0,className:ut.input}),d.jsx(Tg,{value:Y,onChange:et,testId:"new-chat-runtime-select"}),d.jsxs("select",{value:X,onChange:xt=>tt(xt.target.value),className:ut.select,children:[d.jsx("option",{value:"",children:"No persona"}),v.map(xt=>d.jsx("option",{value:xt.id,children:xt.name},xt.id))]}),d.jsx("button",{type:"submit",disabled:!O.trim(),className:ut.btnPrimary,children:"Go"})]})}if(a.kind==="session"){const Rt=(It==null?void 0:It.status)==="running",xt=(It==null?void 0:It.status)==="waiting_input",w=It!==void 0&&["completed","failed","killed"].includes(It.status);if(Rt)return d.jsxs("div",{className:ut.bar,children:[d.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:ut.input}),d.jsx("button",{onClick:()=>u(a.sessionId),className:ut.btnDanger,title:"Stop session",children:"Stop"})]});if(xt){const V=xg(It==null?void 0:It.environmentId,p),W=ot=>{ot.preventDefault(),!(!O.trim()||V)&&(o(a.sessionId,O),P(""))};return d.jsxs("form",{onSubmit:W,className:ut.bar,children:[V&&(It==null?void 0:It.environmentId)&&d.jsx(jg,{environmentId:It.environmentId,onReconnect:b}),d.jsx("input",{type:"text",value:O,onChange:ot=>P(ot.target.value),placeholder:"Type a message...",autoFocus:!V,disabled:V,className:ut.input}),d.jsx("span",{title:V?"Environment is unavailable — reconnect first":void 0,children:d.jsx("button",{type:"submit",disabled:!O.trim()||V,className:ut.btnPrimary,children:"Send"})}),d.jsx("button",{type:"button",onClick:()=>u(a.sessionId),className:ut.btnDanger,title:"Stop session",children:"Stop"})]})}if(w&&It)return d.jsxs("div",{className:ut.bar,children:[d.jsxs("span",{className:`${ut.statusText} ${ut.hintText}`,children:["Session ",It.status]}),d.jsx("button",{onClick:()=>i({kind:"new_chat",environmentId:It.environmentId,runtime:It.runtime}),className:ut.btnPrimary,children:"+ New Chat"})]})}return d.jsx("div",{className:ut.bar,children:d.jsx("span",{className:ut.hintText,children:"Loading..."})})}const nN="_container_654kj_1",aN="_emptyState_654kj_8",sN="_card_654kj_14",iN="_cardHeader_654kj_34",lN="_categoryBadge_654kj_41",oN="_findingTitle_654kj_49",rN="_findingDate_654kj_55",cN="_findingContent_654kj_61",uN="_tags_654kj_67",dN="_tag_654kj_67",Kn={container:nN,emptyState:aN,card:sN,cardHeader:iN,categoryBadge:lN,findingTitle:oN,findingDate:rN,findingContent:cN,tags:uN,tag:dN};function fN(a){const i=new Date(a),l=new Date,o=l.getTime()-i.getTime(),u=Math.floor(o/1e3),h=Math.floor(u/60),f=Math.floor(h/60),p=Math.floor(f/24);if(u<60)return"just now";if(h<60)return`${h}m ago`;if(f<24)return`${f}h ago`;if(p===1)return"yesterday";if(p<7)return`${p} days ago`;const v=i.getFullYear()===l.getFullYear(),g=i.toLocaleString("en-US",{month:"short"}),b=i.getDate();return v?`${g} ${b}`:`${g} ${b} ${i.getFullYear()}`}const hN={architecture:{text:"var(--accent-blue)",bg:"var(--accent-blue-dim)"},api:{text:"var(--accent-green)",bg:"var(--accent-green-dim)"},bug:{text:"var(--accent-red)",bg:"var(--accent-red-dim)"},decision:{text:"var(--accent-yellow)",bg:"var(--accent-yellow-dim)"},dependency:{text:"var(--accent-purple)",bg:"var(--accent-purple-dim)"},pattern:{text:"var(--accent-cyan)",bg:"var(--accent-cyan-dim)"},general:{text:"var(--text-secondary)",bg:"var(--bg-elevated)"}},mN={text:"var(--text-secondary)",bg:"var(--bg-elevated)"};function pN({projectId:a}){const{findings:i}=On(),l=i.filter(o=>o.projectId===a);return l.length===0?d.jsx("div",{className:Kn.emptyState,children:"No findings yet. Agents will post discoveries here."}):d.jsx("div",{className:Kn.container,children:l.map((o,u)=>{const h=hN[o.category]||mN;return d.jsxs(Pn.div,{className:Kn.card,initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:u*.05,duration:.2},children:[d.jsxs("div",{className:Kn.cardHeader,children:[d.jsx("span",{className:Kn.categoryBadge,style:{background:h.bg,color:h.text},children:o.category}),d.jsx("span",{className:Kn.findingTitle,children:o.title}),d.jsx("span",{className:Kn.findingDate,title:o.createdAt,children:fN(o.createdAt)})]}),d.jsx("div",{className:Kn.findingContent,children:o.content.length>300?o.content.slice(0,300)+"...":o.content}),o.tags.length>0&&d.jsx("div",{className:Kn.tags,children:o.tags.map(f=>d.jsx("span",{className:Kn.tag,style:{color:h.text,textShadow:`0 0 8px ${h.text}`},children:f},f))})]},o.id)})})}const vN="_container_bge4k_1",gN="_header_bge4k_5",yN="_headerLabel_bge4k_12",bN="_addButton_bge4k_20",_N="_envRow_bge4k_55",SN="_targeted_bge4k_69",TN="_expanded_bge4k_72",xN="_statusDot_bge4k_76",jN="_pulse_bge4k_79",AN="_envName_bge4k_83",NN="_envActions_bge4k_87",EN="_idleLabel_bge4k_94",CN="_newChatButton_bge4k_99",DN="_envActionsRow_bge4k_126",kN="_connectButton_bge4k_134",wN="_stopButton_bge4k_160",MN="_deleteButton_bge4k_186",RN="_provisionMessage_bge4k_213",ON="_errorMessage_bge4k_220",zN="_sessionRow_bge4k_227",BN="_selected_bge4k_243",UN="_sessionDot_bge4k_248",VN="_sessionSummaryRow_bge4k_252",LN="_sessionExpandArrow_bge4k_272",qN="_sessionSummaryText_bge4k_283",HN="_sessionCountBadge_bge4k_290",IN="_emptyCta_bge4k_313",GN="_ctaDescription_bge4k_326",YN="_ctaButton_bge4k_332",Pt={container:vN,header:gN,headerLabel:yN,addButton:bN,envRow:_N,targeted:SN,expanded:TN,statusDot:xN,pulse:jN,envName:AN,envActions:NN,idleLabel:EN,newChatButton:CN,envActionsRow:DN,connectButton:kN,stopButton:wN,deleteButton:MN,provisionMessage:RN,errorMessage:ON,sessionRow:zN,selected:BN,sessionDot:UN,sessionSummaryRow:VN,sessionExpandArrow:LN,sessionSummaryText:qN,sessionCountBadge:HN,emptyCta:IN,ctaDescription:GN,ctaButton:YN},ZN={connected:"var(--accent-green)",sleeping:"var(--accent-yellow)",error:"var(--accent-red)",disconnected:"var(--text-tertiary)",connecting:"var(--accent-blue)"},KN={running:"running",waiting_input:"awaiting input",failed:"failed",killed:"killed",completed:"completed"},Ag=["running","waiting_input","failed","killed","completed"],XN=.2;function QN(a){const i={};for(const h of a)i[h.status]=(i[h.status]||0)+1;const l=Ag.filter(h=>i[h]>0).map(h=>`${i[h]} ${KN[h]||h}`),o=new Set(Ag),u=Object.keys(i).filter(h=>!o.has(h)).sort().map(h=>`${i[h]} ${h}`);return[...l,...u].join(", ")}function PN({status:a}){const i=a==="running"?"var(--accent-green)":a==="waiting_input"?"var(--accent-yellow)":a==="completed"?"var(--text-secondary)":a==="failed"||a==="killed"?"var(--accent-red)":"var(--text-tertiary)";return d.jsx("span",{className:Pt.sessionDot,style:{color:i},children:"●"})}function FN({env:a,envSessions:i,selectedSessionId:l,isNewChatTarget:o,expanded:u,onToggleExpand:h,sessionsExpanded:f,onToggleSessionsExpand:p,provisionProgress:v,onProvision:g,onStop:b,onRemove:_,setViewMode:x}){const[E,M]=S.useState(!1),R=ZN[a.status]||"var(--text-tertiary)",K=a.status==="connected",O=a.status==="connecting",P=a.status==="disconnected"||a.status==="error";return d.jsxs("div",{children:[d.jsx(pr,{isOpen:E,title:"Delete Environment?",description:`"${a.displayName||a.id}" will be permanently removed. This destroys the workspace and removes all data.`,onConfirm:()=>{_(a.id),M(!1)},onCancel:()=>M(!1)}),d.jsxs("div",{className:`${Pt.envRow} ${o?Pt.targeted:""} ${u?Pt.expanded:""}`,"data-testid":"env-row",onClick:h,children:[d.jsx("span",{className:`${Pt.statusDot} ${K?Pt.pulse:""}`,style:{color:R},children:"●"}),d.jsx("span",{className:Pt.envName,title:a.displayName||a.id,children:a.displayName||a.id}),d.jsxs("span",{className:Pt.envActions,children:[i.length===0&&!o&&!u&&d.jsx("span",{className:Pt.idleLabel,children:"(idle)"}),K&&d.jsx("button",{onClick:Y=>{Y.stopPropagation(),x({kind:"new_chat",environmentId:a.id,runtime:a.defaultRuntime||"claude-code"})},title:"New chat",className:Pt.newChatButton,children:"+"})]})]}),u&&d.jsxs("div",{className:Pt.envActionsRow,children:[O&&v&&d.jsx("span",{className:Pt.provisionMessage,children:v.message}),a.status==="error"&&(v==null?void 0:v.stage)==="error"&&d.jsx("span",{className:Pt.errorMessage,children:v.message}),P&&d.jsx("button",{onClick:Y=>{Y.stopPropagation(),g(a.id)},className:Pt.connectButton,children:a.status==="error"?"Retry":"Connect"}),K&&d.jsx("button",{onClick:Y=>{Y.stopPropagation(),b(a.id)},className:Pt.stopButton,children:"Stop"}),!O&&d.jsx("button",{onClick:Y=>{Y.stopPropagation(),M(!0)},className:Pt.deleteButton,children:"Delete"})]}),i.length>0&&d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:Pt.sessionSummaryRow,"data-testid":"session-summary-row",role:"button",tabIndex:0,"aria-expanded":f,"aria-label":f?"Collapse sessions":"Expand sessions",onClick:p,onKeyDown:Y=>{(Y.key==="Enter"||Y.key===" ")&&(Y.preventDefault(),p())},children:[d.jsx("span",{className:`${Pt.sessionExpandArrow} ${f?Pt.expanded:""}`,children:"▸"}),d.jsx("span",{className:Pt.sessionSummaryText,children:QN(i)}),d.jsx("span",{className:Pt.sessionCountBadge,children:i.length})]}),d.jsx(yi,{children:f&&d.jsx(Pn.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:XN,ease:"easeInOut"},style:{overflow:"hidden"},children:i.map(Y=>d.jsxs("div",{onClick:et=>{et.stopPropagation(),x({kind:"session",sessionId:Y.id})},className:`${Pt.sessionRow} ${l===Y.id?Pt.selected:""}`,title:Y.prompt,"data-testid":"session-row",children:[d.jsx(PN,{status:Y.status})," ",Y.prompt.length>24?Y.prompt.slice(0,24)+"...":Y.prompt]},Y.id))})})]})]})}function JN({viewMode:a,setViewMode:i}){const{environments:l,sessions:o,provisionStatus:u,provisionEnvironment:h,stopEnvironment:f,removeEnvironment:p}=On(),[v,g]=S.useState(null),[b,_]=S.useState(new Set),x=a.kind==="session"?a.sessionId:void 0,E=a.kind==="new_chat"?a.environmentId:void 0;return d.jsxs("div",{className:Pt.container,children:[d.jsxs("div",{className:Pt.header,children:[d.jsx("span",{className:Pt.headerLabel,children:"Environments"}),d.jsx("button",{className:Pt.addButton,onClick:()=>i({kind:"new_environment"}),title:"Add environment",children:"+ Add Environment"})]}),l.length===0&&d.jsxs("div",{className:Pt.emptyCta,children:[d.jsx("button",{className:Pt.ctaButton,onClick:()=>i({kind:"new_environment"}),children:"Add Environment"}),d.jsx("div",{className:Pt.ctaDescription,children:"Connect an environment to run agents"})]}),l.map(M=>{const R=o.filter(K=>K.environmentId===M.id);return d.jsx(FN,{env:M,envSessions:R,selectedSessionId:x,isNewChatTarget:E===M.id,expanded:v===M.id,onToggleExpand:()=>g(v===M.id?null:M.id),sessionsExpanded:b.has(M.id),onToggleSessionsExpand:()=>{_(K=>{const O=new Set(K);return O.has(M.id)?O.delete(M.id):O.add(M.id),O})},provisionProgress:u[M.id],onProvision:h,onStop:f,onRemove:p,setViewMode:i},M.id)})]})}const $N="_container_ifz7r_1",WN="_heading_ifz7r_7",tE="_section_ifz7r_14",eE="_sectionTitle_ifz7r_26",nE="_sectionDescription_ifz7r_35",aE="_tokenList_ifz7r_48",sE="_tokenRow_ifz7r_55",iE="_tokenBadge_ifz7r_68",lE="_tokenName_ifz7r_83",oE="_tokenTarget_ifz7r_90",rE="_deleteButton_ifz7r_99",cE="_addForm_ifz7r_113",uE="_formRow_ifz7r_119",dE="_input_ifz7r_125",fE="_select_ifz7r_155",hE="_addButton_ifz7r_187",mE="_emptyStateInfo_ifz7r_221",pE="_themeOptions_ifz7r_229",vE="_themeOption_ifz7r_229",gE="_themeOptionSelected_ifz7r_254",yE="_themeOptionLabel_ifz7r_259",bE="_themeOptionDesc_ifz7r_265",_E="_themeActive_ifz7r_270",Ht={container:$N,heading:WN,section:tE,sectionTitle:eE,sectionDescription:nE,tokenList:aE,tokenRow:sE,tokenBadge:iE,tokenName:lE,tokenTarget:oE,deleteButton:rE,addForm:cE,formRow:uE,input:dE,select:fE,addButton:hE,emptyStateInfo:mE,themeOptions:pE,themeOption:vE,themeOptionSelected:gE,themeOptionLabel:yE,themeOptionDesc:bE,themeActive:_E},SE=[{value:"env_var",label:"Environment Variable"},{value:"file",label:"File"}];function TE({viewMode:a,setViewMode:i}){const{tokens:l,setToken:o,deleteToken:u}=On(),{showToast:h}=vr(),{themeId:f,resolvedThemeId:p,setTheme:v}=S_(),[g,b]=S.useState(""),[_,x]=S.useState(""),[E,M]=S.useState("env_var"),[R,K]=S.useState(""),[O,P]=S.useState(null),Y=L=>{if(L.preventDefault(),!g||!_)return;const tt=E==="env_var"?R||g.toUpperCase()+"_TOKEN":"";o(g,_,E,tt,E==="file"?R:""),h("Token saved successfully","success"),b(""),x(""),K("")},et=L=>{P(L)},X=()=>{O&&(u(O),h("Token deleted","info")),P(null)};return d.jsxs("div",{className:Ht.container,children:[d.jsx(pr,{isOpen:O!==null,title:"Delete Token?",description:O?`"${O}" will be permanently removed.`:void 0,onConfirm:X,onCancel:()=>P(null)}),d.jsx("h2",{className:Ht.heading,children:"Settings"}),d.jsxs("section",{className:Ht.section,children:[d.jsx("h3",{className:Ht.sectionTitle,children:"Appearance"}),d.jsx("p",{className:Ht.sectionDescription,children:"Choose how Grackle looks across the app."}),d.jsx("div",{className:Ht.themeOptions,children:pd.map(L=>{const tt=f===L.id;return d.jsxs("button",{type:"button",className:`${Ht.themeOption} ${tt?Ht.themeOptionSelected:""}`,"aria-pressed":tt,onClick:()=>v(L.id),children:[d.jsx("span",{className:Ht.themeOptionLabel,children:L.label}),d.jsx("span",{className:Ht.themeOptionDesc,children:L.description})]},L.id)})}),d.jsxs("p",{className:Ht.themeActive,children:["Active theme: ",d.jsx("strong",{children:p})]})]}),d.jsxs("section",{className:Ht.section,children:[d.jsx("h3",{className:Ht.sectionTitle,children:"Environments"}),d.jsx("p",{className:Ht.sectionDescription,children:"Environments are compute workspaces where agents run. Configure once, reuse across projects."}),d.jsx(JN,{viewMode:a,setViewMode:i})]}),d.jsxs("section",{className:Ht.section,children:[d.jsx("h3",{className:Ht.sectionTitle,children:"Tokens"}),d.jsx("p",{className:Ht.sectionDescription,children:"API tokens are auto-pushed to environments when set or updated. Values are write-only."}),l.length===0?d.jsx("div",{className:Ht.emptyStateInfo,children:"Add your first API token to enable service integrations."}):d.jsx("div",{className:Ht.tokenList,children:l.map(L=>d.jsxs("div",{className:Ht.tokenRow,children:[d.jsx("span",{className:Ht.tokenBadge,children:L.tokenType}),d.jsx("span",{className:Ht.tokenName,children:L.name}),d.jsx("span",{className:Ht.tokenTarget,children:L.tokenType==="env_var"?L.envVar:L.filePath}),d.jsx("button",{className:Ht.deleteButton,onClick:()=>et(L.name),title:`Delete ${L.name}`,children:"×"})]},L.name))}),d.jsxs("form",{className:Ht.addForm,onSubmit:Y,children:[d.jsxs("div",{className:Ht.formRow,children:[d.jsx("input",{className:Ht.input,type:"text",placeholder:"Token name",value:g,onChange:L=>b(L.target.value)}),d.jsx("input",{className:Ht.input,type:"password",placeholder:"Value",value:_,onChange:L=>x(L.target.value)})]}),d.jsxs("div",{className:Ht.formRow,children:[d.jsx("select",{className:Ht.select,value:E,onChange:L=>M(L.target.value),children:SE.map(L=>d.jsx("option",{value:L.value,children:L.label},L.value))}),d.jsx("input",{className:Ht.input,type:"text",placeholder:E==="env_var"?"Env var name (e.g. API_TOKEN)":"File path (e.g. /home/user/.token)",value:R,onChange:L=>K(L.target.value)}),d.jsx("button",{className:Ht.addButton,type:"submit",children:"Add Token"})]})]})]})]})}const xE="_container_1m894_1",jE="_header_1m894_8",AE="_headerTitle_1m894_35",NE="_badge_1m894_44",EE="_headerActions_1m894_54",CE="_body_1m894_61",DE="_formContent_1m894_68",kE="_section_1m894_75",wE="_label_1m894_81",ME="_titleInput_1m894_88",RE="_descriptionTextarea_1m894_121",OE="_parentContext_1m894_157",zE="_parentLabel_1m894_165",BE="_parentName_1m894_172",UE="_personaSelect_1m894_176",VE="_depList_1m894_210",LE="_depItem_1m894_216",qE="_depItemSelected_1m894_238",HE="_noDeps_1m894_242",IE="_btnPrimary_1m894_248",GE="_btnGhost_1m894_279",Qt={container:xE,header:jE,headerTitle:AE,badge:NE,headerActions:EE,body:CE,formContent:DE,section:kE,label:wE,titleInput:ME,descriptionTextarea:RE,parentContext:OE,parentLabel:zE,parentName:BE,personaSelect:UE,depList:VE,depItem:LE,depItemSelected:qE,noDeps:HE,btnPrimary:IE,btnGhost:GE};function Ng({viewMode:a,setViewMode:i}){const{tasks:l,createTask:o,updateTask:u,personas:h,environments:f}=On(),{showToast:p}=vr(),v=a.kind==="edit_task",g=v?l.find(st=>st.id===a.taskId):void 0,b=v?(g==null?void 0:g.projectId)??"":a.projectId,_=v?(g==null?void 0:g.parentTaskId)??"":a.kind==="new_task"?a.parentTaskId??"":"",x=_?l.find(st=>st.id===_):void 0,[E,M]=S.useState((g==null?void 0:g.title)??""),[R,K]=S.useState((g==null?void 0:g.description)??""),[O,P]=S.useState((g==null?void 0:g.dependsOn)??[]),[Y,et]=S.useState((g==null?void 0:g.personaId)??""),[X,L]=S.useState((g==null?void 0:g.environmentId)??""),tt=S.useRef(!1);S.useEffect(()=>{v&&g&&!tt.current&&(tt.current=!0,M(g.title),K(g.description??""),P(g.dependsOn??[]),et(g.personaId??""),L(g.environmentId??""))},[v,g]);const U=l.filter(st=>st.projectId===b&&(!v||st.id!==a.taskId)&&st.id!==_),nt=E.trim().length>0&&(!v||g!==void 0),at=st=>{P(St=>St.includes(st)?St.filter(B=>B!==st):[...St,st])},mt=()=>{nt&&(v&&g===void 0||(v?(u(a.taskId,E.trim(),R,O,X,Y),p("Task updated","success"),i({kind:"task",taskId:a.taskId})):(o(b,E.trim(),R,X||void 0,O.length>0?O:void 0,_||void 0,Y||void 0),p("Task created","success"),i({kind:"project",projectId:b}))))},Dt=()=>{i(v?{kind:"task",taskId:a.taskId}:{kind:"project",projectId:b})},$=v?"edit task":_?"child task":"new task";return d.jsxs("div",{className:Qt.container,children:[d.jsxs("div",{className:Qt.header,children:[d.jsxs("div",{className:Qt.headerTitle,children:[d.jsx("span",{className:Qt.badge,children:$}),x&&d.jsxs("span",{className:Qt.parentContext,children:[d.jsx("span",{className:Qt.parentLabel,children:"Child of"}),d.jsx("span",{className:Qt.parentName,children:x.title})]})]}),d.jsxs("div",{className:Qt.headerActions,children:[d.jsx("button",{onClick:mt,disabled:!nt,className:Qt.btnPrimary,"data-testid":"task-edit-save",children:v?"Save Changes":"Create"}),d.jsx("button",{onClick:Dt,className:Qt.btnGhost,children:"Cancel"})]})]}),d.jsx("div",{className:Qt.body,children:d.jsxs("div",{className:Qt.formContent,children:[d.jsxs("div",{className:Qt.section,children:[d.jsx("label",{className:Qt.label,htmlFor:"task-edit-title",children:"Title"}),d.jsx("input",{id:"task-edit-title",type:"text",value:E,onChange:st=>M(st.target.value),placeholder:"Task title...",autoFocus:!0,className:Qt.titleInput,"data-testid":"task-edit-title",onKeyDown:st=>{st.key==="Enter"&&nt&&mt()}})]}),d.jsxs("div",{className:Qt.section,children:[d.jsx("label",{className:Qt.label,htmlFor:"task-edit-description",children:"Description"}),d.jsx("textarea",{id:"task-edit-description",value:R,onChange:st=>K(st.target.value),placeholder:"Describe the task... (markdown supported)",className:Qt.descriptionTextarea,"data-testid":"task-edit-description",rows:8})]}),f.length>0&&d.jsxs("div",{className:Qt.section,children:[d.jsx("label",{className:Qt.label,htmlFor:"task-edit-environment",children:"Environment"}),d.jsxs("select",{id:"task-edit-environment",value:X,onChange:st=>L(st.target.value),className:Qt.personaSelect,"data-testid":"task-edit-environment",children:[d.jsx("option",{value:"",children:"No environment"}),f.map(st=>d.jsx("option",{value:st.id,children:st.displayName||st.id},st.id))]})]}),h.length>0&&d.jsxs("div",{className:Qt.section,children:[d.jsx("label",{className:Qt.label,htmlFor:"task-edit-persona",children:"Persona"}),d.jsxs("select",{id:"task-edit-persona",value:Y,onChange:st=>et(st.target.value),className:Qt.personaSelect,"data-testid":"task-edit-persona",children:[d.jsx("option",{value:"",children:"No persona"}),h.map(st=>d.jsx("option",{value:st.id,children:st.name},st.id))]})]}),d.jsxs("div",{className:Qt.section,children:[d.jsx("div",{className:Qt.label,children:"Dependencies"}),U.length===0?d.jsx("div",{className:Qt.noDeps,children:"No other tasks in this project"}):d.jsx("div",{className:Qt.depList,children:U.map(st=>{const St=O.includes(st.id);return d.jsxs("label",{className:`${Qt.depItem} ${St?Qt.depItemSelected:""}`,"data-testid":`dep-option-${st.id}`,children:[d.jsx("input",{type:"checkbox",checked:St,onChange:()=>at(st.id)}),st.title,d.jsxs("span",{style:{opacity:.5,fontSize:"11px",marginLeft:"4px"},children:["(",st.status,")"]})]},st.id)})})]})]})})]})}const YE="_container_1xczq_1",ZE="_header_1xczq_7",KE="_form_1xczq_19",XE="_formActions_1xczq_87",QE="_list_1xczq_93",PE="_card_1xczq_99",FE="_active_1xczq_109",JE="_cardHeader_1xczq_113",$E="_cardActions_1xczq_123",WE="_description_1xczq_128",tC="_meta_1xczq_134",eC="_promptDetails_1xczq_151",nC="_promptText_1xczq_163",aC="_empty_1xczq_180",sC="_btnPrimary_1xczq_186",iC="_btnSecondary_1xczq_220",lC="_btnSmall_1xczq_247",oC="_btnDanger_1xczq_273",Ae={container:YE,header:ZE,form:KE,formActions:XE,list:QE,card:PE,active:FE,cardHeader:JE,cardActions:$E,description:WE,meta:tC,promptDetails:eC,promptText:nC,empty:aC,btnPrimary:sC,btnSecondary:iC,btnSmall:lC,btnDanger:oC};function rC(){const{personas:a,createPersona:i,updatePersona:l,deletePersona:o}=On(),[u,h]=S.useState(null),[f,p]=S.useState(!1),[v,g]=S.useState(null),[b,_]=S.useState(""),[x,E]=S.useState(""),[M,R]=S.useState(""),[K,O]=S.useState(""),[P,Y]=S.useState(""),[et,X]=S.useState(0),L=()=>{_(""),E(""),R(""),O(""),Y(""),X(0)},tt=()=>{L(),h(null),p(!0)},U=$=>{_($.name),E($.description),R($.systemPrompt),O($.runtime),Y($.model),X($.maxTurns),h($),p(!1)},nt=$=>{$.preventDefault(),!(!b.trim()||!M.trim())&&(u?(l(u.id,b,x,M,K,P,et),h(null)):(i(b,x,M,K,P,et),p(!1)),L())},at=$=>{o($),g(null),(u==null?void 0:u.id)===$&&(h(null),L())},mt=()=>{h(null),p(!1),L()},Dt=()=>d.jsxs("form",{onSubmit:nt,className:Ae.form,children:[d.jsx("h3",{children:u?"Edit Persona":"Create Persona"}),d.jsxs("label",{children:["Name",d.jsx("input",{type:"text",value:b,onChange:$=>_($.target.value),placeholder:"e.g. Frontend Engineer",required:!0})]}),d.jsxs("label",{children:["Description",d.jsx("input",{type:"text",value:x,onChange:$=>E($.target.value),placeholder:"Brief description..."})]}),d.jsxs("label",{children:["Runtime",d.jsxs("select",{value:K,onChange:$=>O($.target.value),children:[d.jsx("option",{value:"",children:"Default"}),d.jsx("option",{value:"claude-code",children:"claude-code"}),d.jsx("option",{value:"codex",children:"codex"}),d.jsx("option",{value:"copilot",children:"copilot"})]})]}),d.jsxs("label",{children:["Model",d.jsx("input",{type:"text",value:P,onChange:$=>Y($.target.value),placeholder:"e.g. sonnet"})]}),d.jsxs("label",{children:["Max Turns",d.jsx("input",{type:"number",value:et,onChange:$=>X(parseInt($.target.value,10)||0),min:0})]}),d.jsxs("label",{children:["System Prompt",d.jsx("textarea",{value:M,onChange:$=>R($.target.value),placeholder:"You are a senior frontend engineer...",rows:10,required:!0})]}),d.jsxs("div",{className:Ae.formActions,children:[d.jsx("button",{type:"submit",className:Ae.btnPrimary,children:u?"Save":"Create"}),d.jsx("button",{type:"button",onClick:mt,className:Ae.btnSecondary,children:"Cancel"})]})]});return d.jsxs("div",{className:Ae.container,children:[d.jsxs("div",{className:Ae.header,children:[d.jsx("h2",{children:"Personas"}),d.jsx("button",{onClick:tt,className:Ae.btnPrimary,children:"+ New Persona"})]}),(f||u)&&Dt(),a.length===0&&!f?d.jsx("p",{className:Ae.empty,children:"No personas yet. Create one to get started."}):d.jsx("div",{className:Ae.list,children:a.map($=>d.jsxs("div",{className:`${Ae.card} ${(u==null?void 0:u.id)===$.id?Ae.active:""}`,children:[d.jsxs("div",{className:Ae.cardHeader,children:[d.jsx("strong",{children:$.name}),d.jsxs("div",{className:Ae.cardActions,children:[d.jsx("button",{onClick:()=>U($),className:Ae.btnSmall,children:"Edit"}),v===$.id?d.jsxs(d.Fragment,{children:[d.jsx("button",{onClick:()=>at($.id),className:Ae.btnDanger,children:"Confirm"}),d.jsx("button",{onClick:()=>g(null),className:Ae.btnSmall,children:"Cancel"})]}):d.jsx("button",{onClick:()=>g($.id),className:Ae.btnSmall,children:"Delete"})]})]}),$.description&&d.jsx("p",{className:Ae.description,children:$.description}),d.jsxs("div",{className:Ae.meta,children:[$.runtime&&d.jsxs("span",{children:["Runtime: ",$.runtime]}),$.model&&d.jsxs("span",{children:["Model: ",$.model]}),$.maxTurns>0&&d.jsxs("span",{children:["Max turns: ",$.maxTurns]})]}),d.jsxs("details",{className:Ae.promptDetails,children:[d.jsx("summary",{children:"System Prompt"}),d.jsx("pre",{className:Ae.promptText,children:$.systemPrompt})]})]},$.id))})]})}const Eg=220,Cg=70,cC=40,uC=60,dC="hierarchy",fC="dependency";function hC(a){return S.useMemo(()=>{if(a.length===0)return{nodes:[],edges:[]};const i=new Hp.graphlib.Graph({multigraph:!0});i.setDefaultEdgeLabel(()=>({})),i.setGraph({rankdir:"TB",nodesep:cC,ranksep:uC});const l=new Map(a.map(f=>[f.id,f])),o=new Map;for(const f of a)if(f.parentTaskId&&l.has(f.parentTaskId)){const p=o.get(f.parentTaskId)||[];p.push(f),o.set(f.parentTaskId,p)}for(const f of a)i.setNode(f.id,{width:Eg,height:Cg});const u=[];for(const f of a){if(f.parentTaskId&&l.has(f.parentTaskId)){const p=`hierarchy-${f.parentTaskId}-${f.id}`;i.setEdge(f.parentTaskId,f.id,{},p),u.push({id:p,source:f.parentTaskId,target:f.id,type:"smoothstep",data:{edgeType:dC},style:{stroke:"var(--accent-green)",strokeWidth:2},animated:!1})}for(const p of f.dependsOn)if(l.has(p)){const v=`dependency-${p}-${f.id}`;i.setEdge(p,f.id,{},v),u.push({id:v,source:p,target:f.id,type:"smoothstep",data:{edgeType:fC},style:{stroke:"var(--text-tertiary)",strokeWidth:1.5,strokeDasharray:"6 3"},animated:!1})}}return Hp.layout(i),{nodes:a.map(f=>{const p=i.node(f.id),v=o.get(f.id)||[];return{id:f.id,type:"task",position:{x:p.x-Eg/2,y:p.y-Cg/2},data:{task:f,childCount:v.length,doneChildCount:v.filter(g=>g.status==="done").length,hasDependencies:f.dependsOn.length>0}}}),edges:u}},[a])}const mC="_dagContainer_iuddu_1",pC="_taskNode_iuddu_26",vC="_taskNodeBorder_iuddu_48",gC="_taskNodeContent_iuddu_54",yC="_taskNodeHeader_iuddu_64",bC="_taskNodeIcon_iuddu_71",_C="_taskNodeTitle_iuddu_76",SC="_taskNodeBadges_iuddu_84",TC="_childBadge_iuddu_89",xC="_depBadge_iuddu_101",jC="_handle_iuddu_113",AC="_emptyCta_iuddu_120",NC="_ctaDescription_iuddu_131",EC="_ctaButton_iuddu_138",We={dagContainer:mC,taskNode:pC,taskNodeBorder:vC,taskNodeContent:gC,taskNodeHeader:yC,taskNodeIcon:bC,taskNodeTitle:_C,taskNodeBadges:SC,childBadge:TC,depBadge:xC,handle:jC,emptyCta:AC,ctaDescription:NC,ctaButton:EC},Dg={pending:{color:"var(--text-tertiary)",icon:"○"},assigned:{color:"var(--accent-blue)",icon:"◎"},in_progress:{color:"var(--accent-green)",icon:"●"},review:{color:"var(--accent-yellow)",icon:"◉"},done:{color:"var(--accent-green)",icon:"✓"},failed:{color:"var(--accent-red)",icon:"✗"},waiting_input:{color:"var(--accent-yellow)",icon:"⧖"}};function CC({data:a}){const{task:i,childCount:l,doneChildCount:o,hasDependencies:u}=a,h=Dg[i.status]||Dg.pending;return d.jsxs("div",{className:We.taskNode,"data-task-id":i.id,"data-task-title":i.title,children:[d.jsx(Ip,{type:"target",position:Gp.Top,className:We.handle}),d.jsx("div",{className:We.taskNodeBorder,style:{backgroundColor:h.color}}),d.jsxs("div",{className:We.taskNodeContent,children:[d.jsxs("div",{className:We.taskNodeHeader,children:[d.jsx("span",{className:We.taskNodeIcon,style:{color:h.color},children:h.icon}),d.jsx("span",{className:We.taskNodeTitle,children:i.title})]}),d.jsxs("div",{className:We.taskNodeBadges,children:[l>0&&d.jsxs("span",{className:We.childBadge,children:[o,"/",l]}),u&&d.jsx("span",{className:We.depBadge,children:"dep"})]})]}),d.jsx(Ip,{type:"source",position:Gp.Bottom,className:We.handle})]})}const kg={pending:"#6b7a8d",assigned:"#70a1ff",in_progress:"#4ecca3",review:"#f0c040",done:"#4ecca3",failed:"#e94560",waiting_input:"#f0c040"},DC={task:CC};function kC({projectId:a,setViewMode:i}){const{tasks:l}=On(),o=S.useMemo(()=>l.filter(v=>v.projectId===a),[l,a]),{nodes:u,edges:h}=hC(o),f=S.useCallback((v,g)=>{i({kind:"task",taskId:g.id})},[i]),p=S.useCallback(v=>{const g=v.data;return kg[g.task.status]||kg.pending},[]);return o.length===0?d.jsxs("div",{className:We.emptyCta,children:[d.jsx("button",{className:We.ctaButton,onClick:()=>i({kind:"new_task",projectId:a}),children:"Create Task"}),d.jsx("div",{className:We.ctaDescription,children:"Create tasks to see the dependency graph"})]}):d.jsx("div",{className:We.dagContainer,children:d.jsxs(Vb,{nodes:u,edges:h,nodeTypes:DC,onNodeClick:f,fitView:!0,fitViewOptions:{padding:.2},minZoom:.3,maxZoom:2,children:[d.jsx(Lb,{variant:qb.Dots,gap:24,size:1,color:"var(--text-disabled)"}),d.jsx(Hb,{showInteractive:!1}),d.jsx(Ib,{nodeColor:p,maskColor:"var(--bg-overlay)",style:{background:"var(--bg-inset)"}})]})})}const wC="_panelContainer_1fq0v_1",MC="_emptyState_1fq0v_8",RC="_projectSummary_1fq0v_17",OC="_projectSummaryTitle_1fq0v_28",zC="_projectSummarySubtitle_1fq0v_32",BC="_header_1fq0v_36",UC="_headerInfo_1fq0v_63",VC="_killButton_1fq0v_69",LC="_headerTitle_1fq0v_98",qC="_headerActions_1fq0v_108",HC="_taskStatusBadge_1fq0v_115",IC="_taskBranch_1fq0v_124",GC="_taskBlockedBadge_1fq0v_130",YC="_btnPrimary_1fq0v_138",ZC="_btnDanger_1fq0v_169",KC="_btnGhost_1fq0v_208",XC="_rejectInput_1fq0v_234",QC="_tabBar_1fq0v_264",PC="_tab_1fq0v_264",FC="_active_1fq0v_285",JC="_eventScroll_1fq0v_290",$C="_tabContent_1fq0v_296",WC="_noContext_1fq0v_301",tD="_overviewContent_1fq0v_307",eD="_overviewDashboard_1fq0v_316",nD="_overviewHero_1fq0v_322",aD="_statusBadge_1fq0v_329",sD="_statusPending_1fq0v_341",iD="_statusAssigned_1fq0v_346",lD="_statusInProgress_1fq0v_351",oD="_statusReview_1fq0v_356",rD="_statusDone_1fq0v_361",cD="_statusFailed_1fq0v_366",uD="_statusWaitingInput_1fq0v_371",dD="_overviewBranchPill_1fq0v_376",fD="_branchLink_1fq0v_391",hD="_overviewSection_1fq0v_402",mD="_overviewLabel_1fq0v_408",pD="_overviewValue_1fq0v_415",vD="_overviewMuted_1fq0v_420",gD="_overviewMarkdown_1fq0v_426",yD="_envRow_1fq0v_495",bD="_envDot_1fq0v_501",_D="_envDotGreen_1fq0v_508",SD="_envDotYellow_1fq0v_512",TD="_envDotRed_1fq0v_516",xD="_envDotGray_1fq0v_520",jD="_depList_1fq0v_524",AD="_depItem_1fq0v_530",ND="_depBlocked_1fq0v_537",ED="_depDone_1fq0v_541",CD="_timeline_1fq0v_545",DD="_timelineRow_1fq0v_551",kD="_timelineKey_1fq0v_558",wD="_timelineValue_1fq0v_564",MD="_timelineDelta_1fq0v_568",RD="_reviewNotes_1fq0v_579",OD="_waitingMessage_1fq0v_596",zD="_errorMessage_1fq0v_600",BD="_eventOverflowWarning_1fq0v_604",UD="_attemptSelector_1fq0v_618",VD="_attemptLabel_1fq0v_629",LD="_attemptButton_1fq0v_633",qD="_attemptActive_1fq0v_650",HD="_attemptStatus_1fq0v_656",ID="_emptyCta_1fq0v_662",GD="_ctaTitle_1fq0v_674",YD="_ctaDescription_1fq0v_680",ZD="_ctaButton_1fq0v_687",KD="_projectHeader_1fq0v_736",XD="_projectName_1fq0v_761",QD="_projectMeta_1fq0v_774",PD="_metaRow_1fq0v_782",FD="_metaLabel_1fq0v_789",JD="_metaValue_1fq0v_799",$D="_metaPlaceholder_1fq0v_809",WD="_editButton_1fq0v_814",tk="_editInput_1fq0v_830",ek="_editTextarea_1fq0v_862",nk="_editSelect_1fq0v_898",ak="_archiveButton_1fq0v_931",sk="_repoLink_1fq0v_961",ik="_metaValueClickable_1fq0v_971",lk="_editHint_1fq0v_990",ok="_editError_1fq0v_999",rk="_editInputInvalid_1fq0v_1006",ck="_unsavedDot_1fq0v_1011",uk="_metaToggle_1fq0v_1019",dk="_metaToggleArrow_1fq0v_1040",fk="_metaToggleArrowOpen_1fq0v_1045",hk="_progressBarContainer_1fq0v_1049",mk="_progressBar_1fq0v_1049",pk="_progressFill_1fq0v_1065",vk="_progressLabel_1fq0v_1072",gk="_metaTimestamps_1fq0v_1079",yk="_metaTimestamp_1fq0v_1079",bk="_editFieldWrapper_1fq0v_1095",A={panelContainer:wC,emptyState:MC,projectSummary:RC,projectSummaryTitle:OC,projectSummarySubtitle:zC,header:BC,headerInfo:UC,killButton:VC,headerTitle:LC,headerActions:qC,taskStatusBadge:HC,taskBranch:IC,taskBlockedBadge:GC,btnPrimary:YC,btnDanger:ZC,btnGhost:KC,rejectInput:XC,tabBar:QC,tab:PC,active:FC,eventScroll:JC,tabContent:$C,noContext:WC,overviewContent:tD,overviewDashboard:eD,overviewHero:nD,statusBadge:aD,statusPending:sD,statusAssigned:iD,statusInProgress:lD,statusReview:oD,statusDone:rD,statusFailed:cD,statusWaitingInput:uD,overviewBranchPill:dD,branchLink:fD,overviewSection:hD,overviewLabel:mD,overviewValue:pD,overviewMuted:vD,overviewMarkdown:gD,envRow:yD,envDot:bD,envDotGreen:_D,envDotYellow:SD,envDotRed:TD,envDotGray:xD,depList:jD,depItem:AD,depBlocked:ND,depDone:ED,timeline:CD,timelineRow:DD,timelineKey:kD,timelineValue:wD,timelineDelta:MD,reviewNotes:RD,waitingMessage:OD,errorMessage:zD,eventOverflowWarning:BD,attemptSelector:UD,attemptLabel:VD,attemptButton:LD,attemptActive:qD,attemptStatus:HD,emptyCta:ID,ctaTitle:GD,ctaDescription:YD,ctaButton:ZD,projectHeader:KD,projectName:XD,projectMeta:QD,metaRow:PD,metaLabel:FD,metaValue:JD,metaPlaceholder:$D,editButton:WD,editInput:tk,editTextarea:ek,editSelect:nk,archiveButton:ak,repoLink:sk,metaValueClickable:ik,editHint:lk,editError:ok,editInputInvalid:rk,unsavedDot:ck,metaToggle:uk,metaToggleArrow:dk,metaToggleArrowOpen:fk,progressBarContainer:hk,progressBar:mk,progressFill:pk,progressLabel:vk,metaTimestamps:gk,metaTimestamp:yk,editFieldWrapper:bk};function wg(a,i){const l=[];let o=a;const u=new Set;for(;o&&i.has(o)&&!u.has(o);){u.add(o);const h=i.get(o);l.unshift(h),o=h.parentTaskId||void 0}return l}function _k(a,i,l){const o={label:"Home",viewMode:{kind:"empty"}};switch(a.kind){case"empty":return[{label:"Home",viewMode:void 0}];case"settings":return[o,{label:"Settings",viewMode:void 0}];case"persona_management":return[o,{label:"Personas",viewMode:void 0}];case"new_environment":return[o,{label:"New Environment",viewMode:void 0}];case"project":{const u=i.find(h=>h.id===a.projectId);return[o,{label:(u==null?void 0:u.name)??"Project",viewMode:void 0}]}case"new_task":{const u=i.find(f=>f.id===a.projectId),h=[o,{label:(u==null?void 0:u.name)??"Project",viewMode:{kind:"project",projectId:a.projectId}}];if(a.parentTaskId){const f=wg(a.parentTaskId,l);for(const p of f)h.push({label:p.title,viewMode:{kind:"task",taskId:p.id}})}return h.push({label:"New Task",viewMode:void 0}),h}case"task":{const u=wg(a.taskId,l),h=l.get(a.taskId),f=h==null?void 0:h.projectId,p=f?i.find(b=>b.id===f):void 0,v=[o];p&&v.push({label:p.name,viewMode:{kind:"project",projectId:p.id}});for(let b=0;b<u.length-1;b++)v.push({label:u[b].title,viewMode:{kind:"task",taskId:u[b].id}});const g=u[u.length-1];return v.push({label:(g==null?void 0:g.title)??a.taskId,viewMode:void 0}),v}case"new_chat":return[o,{label:"New Chat",viewMode:void 0}];case"session":return[o,{label:`Session ${a.sessionId.slice(0,8)}`,viewMode:void 0}];default:return[{label:"Home",viewMode:void 0}]}}function Sk({sessionId:a,session:i,isActive:l,onKill:o}){return d.jsxs("div",{className:A.header,children:[d.jsxs("span",{children:["Session: ",a.slice(0,8),i&&` | ${i.runtime} | ${i.status}`]}),d.jsxs("span",{className:A.headerInfo,children:[i&&d.jsx("span",{children:i.prompt.length>60?i.prompt.slice(0,60)+"...":i.prompt}),l&&d.jsx("button",{onClick:()=>o(a),title:"Stop session",className:A.killButton,children:"×"})]})]})}function Sy({eventsDropped:a}){return a<=0?d.jsx(d.Fragment,{}):d.jsxs("div",{className:A.eventOverflowWarning,role:"alert",children:["⚠ ",a.toLocaleString()," older event",a===1?"":"s"," were dropped — only the most recent 5,000 are shown. Full history is available in the session log."]})}function Tk({sessionEvents:a,session:i,eventsDropped:l,scrollRef:o}){const u=i&&["completed","failed","killed"].includes(i.status),h=u?`Session ${i.status} with no events recorded.`:"Waiting for events...";return d.jsxs("div",{ref:o,className:A.eventScroll,children:[a.length===0&&d.jsx("div",{className:u?A.errorMessage:A.waitingMessage,children:h}),d.jsx(Sy,{eventsDropped:l}),a.map((f,p)=>d.jsx(vy,{event:f,toolUseCtx:f.toolUseCtx},`${f.sessionId}-${f.timestamp}-${p}`))]})}function xk(a){const i=[];for(const l of a){const o=i[i.length-1];l.eventType==="text"&&(o==null?void 0:o.eventType)==="text"?i[i.length-1]={...o,content:o.content+l.content}:i.push(l)}return i}function jk(a){const i=new Map;for(const h of a)if(h.raw)try{i.set(h,JSON.parse(h.raw))}catch{}const l=new Map;for(const h of a){if(h.eventType!=="tool_use")continue;const f=i.get(h);if(!(!f||typeof f.id!="string"))try{const p=JSON.parse(h.content);l.set(f.id,{tool:p.tool??"",args:p.args})}catch{}}const o=new Set;return a.map(h=>{if(h.eventType!=="tool_result")return h;const f=i.get(h);if(!f||typeof f.tool_use_id!="string")return h;const p=l.get(f.tool_use_id);return p?(o.add(f.tool_use_id),{...h,toolUseCtx:p}):h}).filter(h=>{if(h.eventType!=="tool_use")return!0;const f=i.get(h);return f&&typeof f.id=="string"?!o.has(f.id):!0})}function er(a){if(!a)return"—";const i=new Date(a);return isNaN(i.getTime())?"—":i.toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})}function Xu(a,i){if(!a||!i)return;const l=new Date(i).getTime()-new Date(a).getTime();if(isNaN(l)||l<0)return;const o=Math.floor(l/6e4),u=Math.floor(l%6e4/1e3);if(o===0)return`${u}s`;const h=Math.floor(o/60),f=o%60;return h===0?`${o}m ${u}s`:`${h}h ${f}m`}function Ty(a){const i=a.toLowerCase();return i==="ready"||i==="running"||i==="available"||i==="connected"?A.envDotGreen:i==="provisioning"||i==="starting"||i==="pending"||i==="connecting"?A.envDotYellow:i==="error"||i==="failed"||i==="disconnected"?A.envDotRed:A.envDotGray}function Mg(a){if(!a)return"";const i=new Date(a);if(isNaN(i.getTime()))return"";const o=Date.now()-i.getTime();if(o<0)return"just now";const u=Math.floor(o/6e4);if(u<1)return"just now";if(u<60)return`${u}m ago`;const h=Math.floor(u/60);if(h<24)return`${h}h ago`;const f=Math.floor(h/24);return f<30?`${f}d ago`:i.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}function Ak({status:a}){const i={pending:"Pending",assigned:"Assigned",in_progress:"In Progress",waiting_input:"Waiting for Input",review:"Review",done:"Done",failed:"Failed"},l={pending:A.statusPending,assigned:A.statusAssigned,in_progress:A.statusInProgress,waiting_input:A.statusWaitingInput,review:A.statusReview,done:A.statusDone,failed:A.statusFailed};return d.jsx("span",{className:`${A.statusBadge} ${l[a]??A.statusPending}`,children:i[a]??a})}function Nk({task:a,tasksById:i,environments:l,projects:o}){const u=l.find(p=>p.id===a.environmentId),h=o.find(p=>p.id===a.projectId),f=a.branch&&(h!=null&&h.repoUrl)?`${h.repoUrl.replace(/\/$/,"")}/tree/${encodeURIComponent(a.branch)}`:void 0;return d.jsxs("div",{className:A.overviewDashboard,children:[d.jsxs("div",{className:A.overviewHero,children:[d.jsx(Ak,{status:a.status}),a.branch&&d.jsx("span",{className:A.overviewBranchPill,children:f?d.jsxs("a",{href:f,target:"_blank",rel:"noreferrer noopener",className:A.branchLink,children:["🔗"," ",a.branch]}):d.jsxs("span",{children:["🔗"," ",a.branch]})})]}),typeof a.description=="string"&&a.description&&d.jsxs("div",{className:A.overviewSection,children:[d.jsx("div",{className:A.overviewLabel,children:"Description"}),d.jsx("div",{className:A.overviewMarkdown,children:d.jsx(fd,{remarkPlugins:[hd],children:a.description})})]}),a.environmentId&&d.jsxs("div",{className:A.overviewSection,children:[d.jsx("div",{className:A.overviewLabel,children:"Environment"}),d.jsxs("div",{className:A.envRow,children:[u&&d.jsx("span",{className:`${A.envDot} ${Ty(u.status)}`,title:u.status,"aria-label":`Status: ${u.status}`,role:"img"}),d.jsx("span",{className:A.overviewValue,children:(u==null?void 0:u.displayName)??a.environmentId})]})]}),d.jsxs("div",{className:A.overviewSection,children:[d.jsx("div",{className:A.overviewLabel,children:"Dependencies"}),a.dependsOn.length===0?d.jsx("div",{className:A.overviewMuted,children:"None"}):d.jsx("div",{className:A.depList,children:a.dependsOn.map(p=>{const v=i.get(p),g=(v==null?void 0:v.status)==="done";return d.jsxs("div",{className:`${A.depItem} ${g?A.depDone:A.depBlocked}`,children:[d.jsx("span",{children:g?"✓":"○"}),d.jsx("span",{children:(v==null?void 0:v.title)??p})]},p)})})]}),d.jsxs("div",{className:A.overviewSection,children:[d.jsx("div",{className:A.overviewLabel,children:"Timeline"}),d.jsxs("div",{className:A.timeline,children:[a.createdAt&&d.jsxs("div",{className:A.timelineRow,children:[d.jsx("span",{className:A.timelineKey,children:"Created"}),d.jsx("span",{className:A.timelineValue,children:er(a.createdAt)})]}),a.assignedAt&&(()=>{const p=Xu(a.createdAt,a.assignedAt);return d.jsxs("div",{className:A.timelineRow,children:[d.jsx("span",{className:A.timelineKey,children:"Assigned"}),d.jsx("span",{className:A.timelineValue,children:er(a.assignedAt)}),p!==void 0&&d.jsx("span",{className:A.timelineDelta,children:p})]})})(),a.startedAt&&(()=>{const p=Xu(a.assignedAt??a.createdAt,a.startedAt);return d.jsxs("div",{className:A.timelineRow,children:[d.jsx("span",{className:A.timelineKey,children:"Started"}),d.jsx("span",{className:A.timelineValue,children:er(a.startedAt)}),p!==void 0&&d.jsx("span",{className:A.timelineDelta,children:p})]})})(),a.completedAt&&(()=>{const p=Xu(a.startedAt,a.completedAt);return d.jsxs("div",{className:A.timelineRow,children:[d.jsx("span",{className:A.timelineKey,children:"Completed"}),d.jsx("span",{className:A.timelineValue,children:er(a.completedAt)}),p!==void 0&&d.jsx("span",{className:A.timelineDelta,children:p})]})})(),!a.createdAt&&!a.assignedAt&&!a.startedAt&&!a.completedAt&&d.jsx("div",{className:A.overviewMuted,children:"No timing data"})]})]}),a.reviewNotes&&d.jsxs("div",{className:A.overviewSection,children:[d.jsx("div",{className:A.overviewLabel,children:"Review Notes"}),d.jsx("div",{className:A.reviewNotes,children:a.reviewNotes})]})]})}function Ek({task:a,sessionId:i,isBlocked:l,rejectNotes:o,onRejectNotesChange:u,onStart:h,onStop:f,onApprove:p,onReject:v,onDelete:g,onEdit:b}){if(a.status==="pending"||a.status==="assigned")return l?d.jsxs("div",{className:A.headerActions,children:[d.jsx("button",{onClick:b,className:A.btnGhost,children:"Edit"}),d.jsx("button",{onClick:g,className:A.btnDanger,children:"Delete"})]}):d.jsxs("div",{className:A.headerActions,children:[d.jsx("button",{onClick:h,className:A.btnPrimary,children:"Start"}),d.jsx("button",{onClick:b,className:A.btnGhost,children:"Edit"}),d.jsx("button",{onClick:g,className:A.btnDanger,children:"Delete"})]});if(a.status==="in_progress"||a.status==="waiting_input")return d.jsx("div",{className:A.headerActions,children:d.jsx("button",{onClick:f,disabled:!i,className:A.btnDanger,children:"Stop"})});if(a.status==="review")return d.jsxs("div",{className:A.headerActions,children:[d.jsx("input",{type:"text",value:o,onChange:_=>u(_.target.value),placeholder:"Rejection notes...",className:A.rejectInput}),d.jsx("button",{onClick:p,className:A.btnPrimary,children:"Approve"}),d.jsx("button",{onClick:v,className:A.btnDanger,children:"Reject"})]});if(a.status==="done")return d.jsx("div",{className:A.headerActions,children:d.jsx("button",{onClick:g,className:A.btnDanger,children:"Delete"})});if(a.status==="failed")return d.jsxs("div",{className:A.headerActions,children:[d.jsx("button",{onClick:h,className:A.btnPrimary,children:"Retry"}),d.jsx("button",{onClick:g,className:A.btnDanger,children:"Delete"})]})}function Ck({taskSessions:a,selectedSessionId:i,onSelect:l}){if(!(a.length<2))return d.jsxs("div",{className:A.attemptSelector,"data-testid":"attempt-selector",children:[d.jsx("span",{className:A.attemptLabel,children:"Attempts:"}),a.map((o,u)=>{const h=o.id===i,f=o.status==="completed"?"✓":o.status==="failed"?"✗":o.status==="running"||o.status==="waiting_input"?"●":"";return d.jsxs("button",{className:`${A.attemptButton} ${h?A.attemptActive:""}`,onClick:()=>l(o.id),title:`Attempt #${u+1} — ${o.status}`,"aria-label":`Attempt #${u+1}, ${o.status}`,"aria-pressed":h,"data-testid":`attempt-${u+1}`,children:["#",u+1,f&&d.jsx("span",{className:A.attemptStatus,children:f})]},o.id)})]})}function Dk({viewMode:a,setViewMode:i}){const{events:l,eventsDropped:o,sessions:u,tasks:h,environments:f,loadSessionEvents:p,loadFindings:v,kill:g,startTask:b,approveTask:_,rejectTask:x,deleteTask:E,projects:M,createProject:R,archiveProject:K,updateProject:O,taskSessions:P,loadTaskSessions:Y}=On(),et=S.useRef(null),X=S.useRef(void 0),[L,tt]=S.useState("overview"),[U,nt]=S.useState("tasks"),[at,mt]=S.useState(""),[Dt,$]=S.useState(!1),[st,St]=S.useState(!1),[B,Q]=S.useState(void 0),lt=S.useRef(void 0),Ct=S.useRef(void 0),[vt,Ft]=S.useState(null),[bt,_t]=S.useState(""),[G,ae]=S.useState(""),[ye,en]=S.useState(!1),He=S.useRef(void 0),Wt=S.useRef(null),nn=S.useRef(null),Ue=S.useRef(null),It=S.useRef(null),Kt=S.useRef(null),me=a.kind==="project"?a.projectId:void 0;S.useEffect(()=>{const H=He.current;He.current=me,!(H===void 0||H===me)&&(vt!==null||bt!=="")&&(Ft(null),_t(""))},[me,vt,bt]),S.useEffect(()=>{if(vt===null)return;const H=vt==="name"?nn.current:vt==="description"?Ue.current:vt==="repoUrl"?It.current:Kt.current;if(!H)return;const Vt=window.setTimeout(()=>{H.focus()},0);return()=>{window.clearTimeout(Vt)}},[vt]);let F,Rt;a.kind==="task"&&(F=h.find(H=>H.id===a.taskId),Rt=(F==null?void 0:F.projectId)||void 0);const xt=F?P[F.id]??[]:[];let w;a.kind==="session"?w=a.sessionId:a.kind==="task"&&(B&&xt.some(H=>H.id===B)?w=B:w=(F==null?void 0:F.sessionId)||void 0);const V=()=>{$(!0)},W=()=>{F&&(E(F.id),$(!1),i({kind:"project",projectId:F.projectId}))};a.kind==="task"&&(F==null?void 0:F.id)!==lt.current&&(lt.current=F==null?void 0:F.id,L!=="overview"&&tt("overview"),at!==""&&mt(""),B!==void 0&&Q(void 0));const ot=S.useRef(void 0),jt=S.useRef(void 0);if(S.useEffect(()=>{if(!(F!=null&&F.id))return;const H=F.id!==ot.current,Vt=F.sessionId!==jt.current;(H||Vt)&&(ot.current=F.id,jt.current=F.sessionId,Y(F.id))},[F==null?void 0:F.id,F==null?void 0:F.sessionId,Y]),(F==null?void 0:F.status)!==Ct.current){Ct.current=F==null?void 0:F.status;const H=(F==null?void 0:F.status)==="pending"||(F==null?void 0:F.status)==="assigned"?"overview":(F==null?void 0:F.status)==="in_progress"||(F==null?void 0:F.status)==="waiting_input"||(F==null?void 0:F.status)==="review"?"stream":(F==null?void 0:F.status)==="done"?"findings":void 0;H&&H!==L&&tt(H)}const At=S.useMemo(()=>{const H=w?l.filter(Vt=>Vt.sessionId===w):[];return jk(xk(H))},[l,w]),ht=S.useMemo(()=>new Map(h.map(H=>[H.id,H])),[h]),de=F?F.dependsOn.some(H=>{const Vt=ht.get(H);return Vt!==void 0&&Vt.status!=="done"}):!1,kt=S.useMemo(()=>_k(a,M,ht),[a,M,ht]),pe=H=>{H.viewMode&&i(H.viewMode)},se=w?u.find(H=>H.id===w)??void 0:void 0;if(S.useEffect(()=>{w&&w!==X.current&&(X.current=w,p(w))},[w,p]),S.useEffect(()=>{L==="findings"&&Rt&&v(Rt)},[L,Rt,v]),S.useEffect(()=>{et.current&&L==="stream"&&(et.current.scrollTop=et.current.scrollHeight)},[At.length,L]),a.kind==="settings")return d.jsxs("div",{className:A.panelContainer,children:[d.jsx(ps,{segments:kt,onNavigate:pe}),d.jsx(TE,{viewMode:a,setViewMode:i})]});if(a.kind==="persona_management")return d.jsxs("div",{className:A.panelContainer,children:[d.jsx(ps,{segments:kt,onNavigate:pe}),d.jsx(rC,{})]});if(a.kind==="empty")return M.length===0?d.jsxs("div",{className:A.emptyCta,children:[d.jsx("div",{className:A.ctaTitle,children:"Welcome to Grackle"}),d.jsx("div",{className:A.ctaDescription,children:"Organize your work into projects and let agents tackle the tasks."}),d.jsx("button",{className:A.ctaButton,onClick:()=>{const H=window.prompt("Project name:");H!=null&&H.trim()&&R(H.trim())},children:"Create Your First Project"})]}):d.jsx("div",{className:A.emptyState,children:"Select a project or task to get started"});if(a.kind==="new_chat")return d.jsxs("div",{className:A.panelContainer,children:[d.jsx(ps,{segments:kt,onNavigate:pe}),d.jsx("div",{className:A.emptyState,children:"Enter a prompt below to start a new session"})]});if(a.kind==="project"){const H=M.find(it=>it.id===a.projectId),Vt=h.filter(it=>it.projectId===a.projectId),Fn=Vt.filter(it=>it.status==="done").length,Ie=Vt.length,Re=Ie>0?Math.round(Fn/Ie*100):0,an=100,J=(it,fe)=>{Wt.current=it,Ft(it),_t(fe),ae("")},Tt=()=>{Wt.current=null,Ft(null),_t(""),ae("")},le=(it,fe)=>{if(it==="name"){const fn=fe.trim();if(!fn)return"Name is required";if(fn.length>an)return`Max ${an} characters`}if(it==="repoUrl"){const fn=fe.trim();if(fn&&!/^https?:\/\/.+/.test(fn))return"Must be a valid http(s) URL"}return""},Xt=it=>{if(!H)return;const fe=bt.trim(),fn=le(it,bt);if(fn){ae(fn);return}if(it==="name"){if(fe===H.name){Tt();return}O(H.id,{name:fe})}else if(it==="description"){const ya=bt;if(ya===H.description){Tt();return}O(H.id,{description:ya})}else if(it==="repoUrl"){if(fe===H.repoUrl){Tt();return}O(H.id,{repoUrl:fe})}else if(it==="defaultEnvironmentId"){if(bt===H.defaultEnvironmentId){Tt();return}O(H.id,{defaultEnvironmentId:bt})}Tt()},ft=(it,fe)=>{it.key==="Escape"?Tt():it.key==="Enter"&&fe!=="description"&&Xt(fe)},Oe=it=>H?it==="name"?bt.trim()!==H.name:it==="description"?bt!==H.description:it==="repoUrl"?bt.trim()!==H.repoUrl:it==="defaultEnvironmentId"?bt!==H.defaultEnvironmentId:!1:!1,Je=f.find(it=>it.id===(H==null?void 0:H.defaultEnvironmentId)),sn=vt==="description"?"Tab to save · Esc to cancel":"Enter to save · Esc to cancel";return d.jsxs("div",{className:A.panelContainer,children:[d.jsx(ps,{segments:kt,onNavigate:pe}),d.jsxs("div",{className:A.projectHeader,children:[d.jsx("span",{className:A.projectName,"data-testid":"project-name",children:vt==="name"?d.jsxs("div",{className:A.editFieldWrapper,children:[d.jsx("input",{ref:nn,className:`${A.editInput} ${G?A.editInputInvalid:""}`,value:bt,onChange:it=>{_t(it.target.value),ae("")},onBlur:it=>{if(Wt.current==="name"){Wt.current=null;return}it.relatedTarget instanceof HTMLElement&&it.relatedTarget.dataset.editAction==="name"||Xt("name")},onKeyDown:it=>ft(it,"name"),maxLength:an,"aria-label":"Project name","data-testid":"edit-name-input"}),Oe("name")&&d.jsx("span",{className:A.unsavedDot,title:"Unsaved changes"}),G&&d.jsx("span",{className:A.editError,"data-testid":"edit-error",children:G}),d.jsx("span",{className:A.editHint,children:sn})]}):d.jsxs("button",{type:"button",className:A.metaValueClickable,onClick:()=>J("name",(H==null?void 0:H.name)||""),title:"Click to edit name","aria-label":`Edit project name: ${(H==null?void 0:H.name)||a.projectId}`,"data-testid":"edit-name-button",children:[(H==null?void 0:H.name)||a.projectId,d.jsx("span",{className:A.editButton,"aria-hidden":"true",children:"✏️"})]})}),d.jsx("button",{className:A.archiveButton,onClick:()=>St(!0),title:"Archive project","data-testid":"archive-project-button",children:"Archive"})]}),d.jsxs("button",{className:A.metaToggle,onClick:()=>en(!ye),"aria-expanded":!ye,"aria-controls":"project-meta-panel","data-testid":"meta-toggle",children:[d.jsx("span",{className:`${A.metaToggleArrow} ${ye?"":A.metaToggleArrowOpen}`,children:"▶"}),"Details"]}),!ye&&d.jsxs("div",{className:A.projectMeta,"data-testid":"project-meta",id:"project-meta-panel",children:[d.jsxs("div",{className:A.metaRow,children:[d.jsx("span",{className:A.metaLabel,children:"Description"}),d.jsx("div",{className:A.metaValue,children:vt==="description"?d.jsxs("div",{className:A.editFieldWrapper,children:[d.jsx("textarea",{ref:Ue,className:A.editTextarea,value:bt,onChange:it=>{_t(it.target.value),ae("")},onBlur:it=>{if(Wt.current==="description"){Wt.current=null;return}it.relatedTarget instanceof HTMLElement&&it.relatedTarget.dataset.editAction==="description"||Xt("description")},onKeyDown:it=>ft(it,"description"),title:"Project description","aria-label":"Project description","data-testid":"edit-description-input"}),Oe("description")&&d.jsx("span",{className:A.unsavedDot,title:"Unsaved changes"}),d.jsx("span",{className:A.editHint,children:sn})]}):d.jsxs("button",{type:"button",className:A.metaValueClickable,onClick:()=>J("description",(H==null?void 0:H.description)||""),title:"Click to edit description","aria-label":"Edit project description","data-testid":"edit-description-button",children:[H!=null&&H.description?d.jsx("span",{className:A.overviewMarkdown,children:d.jsx(fd,{remarkPlugins:[hd],children:H.description})}):d.jsx("span",{className:A.metaPlaceholder,children:"No description"}),d.jsx("span",{className:A.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),d.jsxs("div",{className:A.metaRow,children:[d.jsx("span",{className:A.metaLabel,children:"Repository"}),d.jsx("div",{className:A.metaValue,children:vt==="repoUrl"?d.jsxs("div",{className:A.editFieldWrapper,children:[d.jsx("input",{ref:It,className:`${A.editInput} ${G?A.editInputInvalid:""}`,value:bt,onChange:it=>{_t(it.target.value),ae("")},onBlur:it=>{if(Wt.current==="repoUrl"){Wt.current=null;return}it.relatedTarget instanceof HTMLElement&&it.relatedTarget.dataset.editAction==="repoUrl"||Xt("repoUrl")},onKeyDown:it=>ft(it,"repoUrl"),placeholder:"https://github.com/...","aria-label":"Project repository URL","data-testid":"edit-repo-input"}),Oe("repoUrl")&&d.jsx("span",{className:A.unsavedDot,title:"Unsaved changes"}),G&&d.jsx("span",{className:A.editError,"data-testid":"edit-error",children:G}),d.jsx("span",{className:A.editHint,children:sn})]}):d.jsxs("button",{type:"button",className:A.metaValueClickable,onClick:it=>{it.preventDefault(),J("repoUrl",(H==null?void 0:H.repoUrl)||"")},title:"Click to edit repository URL","aria-label":"Edit project repository URL","data-testid":"edit-repo-button",children:[H!=null&&H.repoUrl&&/^https?:\/\//i.test(H.repoUrl)?d.jsx("a",{className:A.repoLink,href:H.repoUrl,target:"_blank",rel:"noopener noreferrer",onClick:it=>it.stopPropagation(),children:H.repoUrl}):H!=null&&H.repoUrl?d.jsx("span",{children:H.repoUrl}):d.jsx("span",{className:A.metaPlaceholder,children:"No repository"}),d.jsx("span",{className:A.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),d.jsxs("div",{className:A.metaRow,children:[d.jsx("span",{className:A.metaLabel,children:"Environment"}),d.jsx("div",{className:A.metaValue,children:vt==="defaultEnvironmentId"?d.jsxs("select",{ref:Kt,className:A.editSelect,value:bt,onChange:it=>{Wt.current=null,_t(it.target.value);const fe=it.target.value;H&&fe!==H.defaultEnvironmentId&&O(H.id,{defaultEnvironmentId:fe}),Tt()},onBlur:it=>{if(Wt.current==="defaultEnvironmentId"){Wt.current=null;return}it.relatedTarget instanceof HTMLElement&&it.relatedTarget.dataset.editAction==="defaultEnvironmentId"||Tt()},title:"Default environment","aria-label":"Project default environment","data-testid":"edit-env-select",children:[d.jsx("option",{value:"",children:"None"}),f.map(it=>d.jsx("option",{value:it.id,children:it.displayName},it.id))]}):d.jsxs("button",{type:"button",className:A.metaValueClickable,onClick:()=>J("defaultEnvironmentId",(H==null?void 0:H.defaultEnvironmentId)||""),title:"Click to change default environment","aria-label":"Edit project default environment","data-testid":"edit-env-button",children:[Je?d.jsxs("span",{className:A.envRow,children:[d.jsx("span",{className:`${A.envDot} ${Ty(Je.status)}`}),Je.displayName]}):d.jsx("span",{className:A.metaPlaceholder,children:(H==null?void 0:H.defaultEnvironmentId)||"No default environment"}),d.jsx("span",{className:A.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),H&&d.jsxs("div",{className:A.metaTimestamps,children:[d.jsxs("span",{className:A.metaTimestamp,children:["Created ",Mg(H.createdAt)]}),H.updatedAt&&H.updatedAt!==H.createdAt&&d.jsxs("span",{className:A.metaTimestamp,children:["· Updated ",Mg(H.updatedAt)]})]})]}),Ie>0&&d.jsxs("div",{className:A.progressBarContainer,"data-testid":"progress-bar",children:[d.jsx("div",{className:A.progressBar,children:d.jsx("div",{className:A.progressFill,style:{width:`${Re}%`}})}),d.jsxs("span",{className:A.progressLabel,children:[Fn,"/",Ie]})]}),d.jsxs("div",{className:A.tabBar,role:"tablist","aria-label":"Project view",children:[d.jsx("button",{role:"tab","aria-selected":U==="graph",className:`${A.tab} ${U==="graph"?A.active:""}`,onClick:()=>nt("graph"),children:"Graph"}),d.jsx("button",{role:"tab","aria-selected":U==="tasks",className:`${A.tab} ${U==="tasks"?A.active:""}`,onClick:()=>nt("tasks"),children:"Tasks"})]}),U==="tasks"&&Ie>0&&d.jsxs("div",{className:A.projectSummary,children:[d.jsx("span",{className:A.projectSummaryTitle,children:`${Fn}/${Ie} tasks complete`}),d.jsx("span",{className:A.projectSummarySubtitle,children:"Select a task or click + to create one"})]}),U==="tasks"&&Ie===0&&d.jsxs("div",{className:A.emptyCta,children:[d.jsx("button",{className:A.ctaButton,onClick:()=>i({kind:"new_task",projectId:a.projectId}),children:"Create Task"}),d.jsx("div",{className:A.ctaDescription,children:"Break your work into tasks and let agents tackle them"})]}),U==="graph"&&d.jsx(kC,{projectId:a.projectId,setViewMode:i}),d.jsx(pr,{isOpen:st,title:"Archive Project?",description:"This will hide the project from the sidebar. Tasks will not be deleted.",confirmLabel:"Archive",onConfirm:()=>{H&&(K(H.id),i({kind:"empty"})),St(!1)},onCancel:()=>St(!1)})]})}if(a.kind==="new_environment")return d.jsxs("div",{className:A.panelContainer,children:[d.jsx(ps,{segments:kt,onNavigate:pe}),d.jsx("div",{className:A.emptyState,children:"Configure the new environment below"})]});if(a.kind==="new_task")return d.jsx(Ng,{viewMode:a,setViewMode:i});if(a.kind==="edit_task")return d.jsx(Ng,{viewMode:a,setViewMode:i});if(a.kind==="task")return d.jsxs("div",{className:A.panelContainer,children:[d.jsx(ps,{segments:kt,onNavigate:pe}),d.jsxs("div",{className:A.header,children:[d.jsxs("span",{className:A.headerTitle,children:[d.jsx("span",{"data-testid":"task-title",children:(F==null?void 0:F.title)||a.taskId}),F&&d.jsx("span",{className:A.taskStatusBadge,"data-testid":"task-status",children:F.status}),(F==null?void 0:F.branch)&&d.jsx("span",{className:A.taskBranch,children:F.branch}),de&&d.jsx("span",{className:A.taskBlockedBadge,children:"blocked"})]}),F&&d.jsx(Ek,{task:F,sessionId:w,isBlocked:de,rejectNotes:at,onRejectNotesChange:mt,onStart:()=>b(F.id),onStop:()=>w&&g(w),onApprove:()=>_(F.id),onReject:()=>{x(F.id,at),mt("")},onDelete:V,onEdit:()=>i({kind:"edit_task",taskId:F.id})})]}),d.jsxs("div",{className:A.tabBar,role:"tablist","aria-label":"Task view",children:[d.jsx("button",{role:"tab","aria-selected":L==="overview",className:`${A.tab} ${L==="overview"?A.active:""}`,onClick:()=>tt("overview"),children:"Overview"}),d.jsx("button",{role:"tab","aria-selected":L==="stream",className:`${A.tab} ${L==="stream"?A.active:""}`,onClick:()=>tt("stream"),children:"Stream"}),d.jsx("button",{role:"tab","aria-selected":L==="findings",className:`${A.tab} ${L==="findings"?A.active:""}`,onClick:()=>tt("findings"),children:"Findings"})]}),d.jsxs(yi,{mode:"wait",children:[L==="overview"&&d.jsx(Pn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:A.overviewContent,children:F?d.jsx(Nk,{task:F,tasksById:ht,environments:f,projects:M}):d.jsx("div",{className:A.waitingMessage,children:"No additional details"})},"overview"),L==="stream"&&d.jsxs(Pn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},style:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden"},children:[d.jsx(Ck,{taskSessions:xt,selectedSessionId:w,onSelect:H=>{Q(H)}}),d.jsxs("div",{ref:et,className:A.eventScroll,children:[!w&&F&&d.jsxs("div",{className:A.emptyCta,children:[d.jsx("button",{className:A.ctaButton,onClick:()=>b(F.id),children:"Start Task"}),d.jsx("div",{className:A.ctaDescription,children:"Click to begin agent execution"})]}),w&&At.length===0&&d.jsx("div",{className:A.waitingMessage,children:"Waiting for events..."}),d.jsx(Sy,{eventsDropped:o}),At.map((H,Vt)=>d.jsx(vy,{event:H,toolUseCtx:H.toolUseCtx},`${H.sessionId}-${H.timestamp}-${Vt}`))]})]},"stream"),L==="findings"&&d.jsx(Pn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:A.tabContent,children:Rt?d.jsx(pN,{projectId:Rt}):d.jsx("div",{className:A.noContext,children:"Navigate to a task within a project to view findings"})},"findings")]}),F&&d.jsx(pr,{isOpen:Dt,title:"Delete Task?",description:`"${F.title}" will be permanently removed.`,onConfirm:W,onCancel:()=>$(!1)})]});if(!w)return d.jsx("div",{className:A.emptyState,children:"No session selected"});const Me=(se==null?void 0:se.status)==="running"||(se==null?void 0:se.status)==="waiting_input";return d.jsxs("div",{className:A.panelContainer,children:[d.jsx(ps,{segments:kt,onNavigate:pe}),d.jsx(Sk,{sessionId:w,session:se,isActive:Me,onKill:g}),d.jsx(Tk,{sessionEvents:At,session:se,eventsDropped:o,scrollRef:et})]})}const kk="_toast_sfumy_1",wk="_success_sfumy_18",Mk="_icon_sfumy_22",Rk="_error_sfumy_25",Ok="_warning_sfumy_32",zk="_info_sfumy_38",Bk="_message_sfumy_53",Uk="_close_sfumy_60",gl={toast:kk,success:wk,icon:Mk,error:Rk,warning:Ok,info:zk,message:Bk,close:Uk},Vk={success:"✓",error:"✕",warning:"⚠",info:"ℹ"};function Lk({toast:a,onDismiss:i}){return S.useEffect(()=>{const l=setTimeout(()=>i(a.id),a.duration);return()=>clearTimeout(l)},[a.id,a.duration,i]),d.jsxs(Pn.div,{className:`${gl.toast} ${gl[a.variant]}`,role:"status",initial:{opacity:0,y:-16,scale:.94},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-8,scale:.94},transition:{duration:.2,ease:"easeOut"},layout:!0,children:[d.jsx("span",{className:gl.icon,"aria-hidden":"true",children:Vk[a.variant]}),d.jsx("span",{className:gl.message,children:a.message}),d.jsx("button",{type:"button",className:gl.close,onClick:()=>i(a.id),"aria-label":"Dismiss notification",children:"×"})]})}const qk="_container_qqse2_1",Hk={container:qk};function Ik(){const{toasts:a,dismissToast:i}=vr();return d.jsx("div",{className:Hk.container,"data-testid":"toast-container",children:d.jsx(yi,{children:a.map(l=>d.jsx(Lk,{toast:l,onDismiss:i},l.id))})})}const Gk="_root_cdda9_1",Yk="_body_cdda9_7",Zk="_main_cdda9_13",Qu={root:Gk,body:Yk,main:Zk},Kk=typeof window<"u"&&new URLSearchParams(window.location.search).has("mock");function Xk(){const[a,i]=S.useState({kind:"empty"}),{lastSpawnedId:l}=On();return S.useEffect(()=>{l&&i({kind:"session",sessionId:l})},[l]),d.jsxs("div",{className:Qu.root,children:[d.jsx(D_,{setViewMode:i}),d.jsxs("div",{className:Qu.body,children:[d.jsx(BA,{viewMode:a,setViewMode:i}),d.jsxs("div",{className:Qu.main,children:[d.jsx(Dk,{viewMode:a,setViewMode:i},a.kind==="task"?a.taskId:a.kind==="edit_task"?`edit_task:${a.taskId}`:a.kind==="new_task"?`new_task:${a.projectId}:${a.parentTaskId??""}`:a.kind==="session"?a.sessionId:a.kind),d.jsx(eN,{viewMode:a,setViewMode:i})]})]}),d.jsx(Ik,{})]})}function Qk(){const a=Kk?m_:i_;return d.jsx(__,{children:d.jsx(v_,{children:d.jsx(a,{children:d.jsx(Xk,{})})})})}Xb.createRoot(document.getElementById("root")).render(d.jsx(S.StrictMode,{children:d.jsx(Qk,{})}));